]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20141206
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.56 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
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   --without-tests         suppress build with test-programs
659   --enable-mixed-case     tic should assume mixed-case filenames
660   --with-install-prefix   prefixes actual install-location ($DESTDIR)
661 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
662   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
663   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
664   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
665   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
666   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
667   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
668 Options to Specify the Libraries Built/Used:
669   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
670   --enable-widec          compile with wide-char/UTF-8 code
671   --with-curses-dir=DIR   directory in which (n)curses is installed
672   --with-lib-prefix       override library-prefix
673   --with-shlib-version=X  Specify rel or abi version for shared libs
674   --enable-rpath-link     link sample programs with rpath option
675 Fine-Tuning Your Configuration:
676   --enable-broken_linker  compile with broken-linker support code
677   --disable-largefile     omit support for large files
678   --with-rcs-ids          compile-in RCS identifiers
679 Extensions:
680   --disable-ext-funcs     disable function-extensions
681   --enable-const          compile with extra/non-standard const
682 Development Code:
683   --without-develop       disable development options
684 Experimental Code:
685   --with-pthread          use POSIX thread library
686   --enable-weak-symbols   enable weak-symbols for pthreads
687   --enable-reentrant      compile with experimental reentrant code
688   --with-wrap-prefix=XXX  override prefix used for public variables
689 Testing/development Options:
690   --disable-echo          do not display "compiling" commands
691   --enable-warnings       build: turn on GCC compiler warnings
692   --enable-assertions     test: turn on generation of assertion code
693   --enable-expanded       test: generate functions for certain macros
694   --disable-macros        test: use functions rather than macros
695   --with-trace            test: add trace() function to all models of ncurses
696   --disable-gnat-projects test: disable GNAT projects even if usable
697 Ada95 Binding Options:
698   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
699   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
700   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
701   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
702
703 Some influential environment variables:
704   CC          C compiler command
705   CFLAGS      C compiler flags
706   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
707               nonstandard directory <lib dir>
708   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
709               headers in a nonstandard directory <include dir>
710   CPP         C preprocessor
711
712 Use these variables to override the choices made by `configure' or to help
713 it to find libraries and programs with nonstandard names/locations.
714
715 EOF
716 fi
717
718 if test "$ac_init_help" = "recursive"; then
719   # If there are subdirs, report their specific --help.
720   ac_popdir=`pwd`
721   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
722     cd $ac_subdir
723     # A "../" for each directory in /$ac_subdir.
724     ac_dots=`echo $ac_subdir |
725              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
726
727     case $srcdir in
728     .) # No --srcdir option.  We are building in place.
729       ac_sub_srcdir=$srcdir ;;
730     [\\/]* | ?:[\\/]* ) # Absolute path.
731       ac_sub_srcdir=$srcdir/$ac_subdir ;;
732     *) # Relative path.
733       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
734     esac
735
736     # Check for guested configure; otherwise get Cygnus style configure.
737     if test -f $ac_sub_srcdir/configure.gnu; then
738       echo
739       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
740     elif test -f $ac_sub_srcdir/configure; then
741       echo
742       $SHELL $ac_sub_srcdir/configure  --help=recursive
743     elif test -f $ac_sub_srcdir/configure.ac ||
744            test -f $ac_sub_srcdir/configure.in; then
745       echo
746       $ac_configure --help
747     else
748       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
749     fi
750     cd $ac_popdir
751   done
752 fi
753
754 test -n "$ac_init_help" && exit 0
755 if $ac_init_version; then
756   cat <<\EOF
757
758 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
759 Free Software Foundation, Inc.
760 This configure script is free software; the Free Software Foundation
761 gives unlimited permission to copy, distribute and modify it.
762 EOF
763   exit 0
764 fi
765 exec 5>config.log
766 cat >&5 <<EOF
767 This file contains any messages produced by compilers while
768 running configure, to aid debugging if configure makes a mistake.
769
770 It was created by $as_me, which was
771 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
772
773   $ $0 $@
774
775 EOF
776 {
777 cat <<_ASUNAME
778 ## ---------- ##
779 ## Platform.  ##
780 ## ---------- ##
781
782 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
783 uname -m = `(uname -m) 2>/dev/null || echo unknown`
784 uname -r = `(uname -r) 2>/dev/null || echo unknown`
785 uname -s = `(uname -s) 2>/dev/null || echo unknown`
786 uname -v = `(uname -v) 2>/dev/null || echo unknown`
787
788 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
789 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
790
791 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
792 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
793 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
794 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
795 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
796 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
797 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
798
799 PATH = $PATH
800
801 _ASUNAME
802 } >&5
803
804 cat >&5 <<EOF
805 ## ------------ ##
806 ## Core tests.  ##
807 ## ------------ ##
808
809 EOF
810
811 # Keep a trace of the command line.
812 # Strip out --no-create and --no-recursion so they do not pile up.
813 # Also quote any args containing shell meta-characters.
814 ac_configure_args=
815 ac_sep=
816 for ac_arg
817 do
818   case $ac_arg in
819   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
820   | --no-cr | --no-c) ;;
821   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
822   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
823   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
824     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
825     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
826     ac_sep=" " ;;
827   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
828      ac_sep=" " ;;
829   esac
830   # Get rid of the leading space.
831 done
832
833 # When interrupted or exit'd, cleanup temporary files, and complete
834 # config.log.  We remove comments because anyway the quotes in there
835 # would cause problems or look ugly.
836 trap 'exit_status=$?
837   # Save into config.log some information that might help in debugging.
838   echo >&5
839   echo "## ----------------- ##" >&5
840   echo "## Cache variables.  ##" >&5
841   echo "## ----------------- ##" >&5
842   echo >&5
843   # The following way of writing the cache mishandles newlines in values,
844 {
845   (set) 2>&1 |
846     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
847     *ac_space=\ *)
848       sed -n \
849         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
850           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
851       ;;
852     *)
853       sed -n \
854         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
855       ;;
856     esac;
857 } >&5
858   sed "/^$/d" confdefs.h >conftest.log
859   if test -s conftest.log; then
860     echo >&5
861     echo "## ------------ ##" >&5
862     echo "## confdefs.h.  ##" >&5
863     echo "## ------------ ##" >&5
864     echo >&5
865     cat conftest.log >&5
866   fi
867   (echo; echo) >&5
868   test "$ac_signal" != 0 &&
869     echo "$as_me: caught signal $ac_signal" >&5
870   echo "$as_me: exit $exit_status" >&5
871   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
872     exit $exit_status
873      ' 0
874 for ac_signal in 1 2 13 15; do
875   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
876 done
877 ac_signal=0
878
879 # confdefs.h avoids OS command line length limits that DEFS can exceed.
880 rm -rf conftest* confdefs.h
881 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
882 echo >confdefs.h
883
884 # Let the site file select an alternate cache file if it wants to.
885 # Prefer explicitly selected file to automatically selected ones.
886 if test -z "$CONFIG_SITE"; then
887   if test "x$prefix" != xNONE; then
888     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
889   else
890     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
891   fi
892 fi
893 for ac_site_file in $CONFIG_SITE; do
894   if test -r "$ac_site_file"; then
895     { echo "$as_me:895: loading site script $ac_site_file" >&5
896 echo "$as_me: loading site script $ac_site_file" >&6;}
897     cat "$ac_site_file" >&5
898     . "$ac_site_file"
899   fi
900 done
901
902 if test -r "$cache_file"; then
903   # Some versions of bash will fail to source /dev/null (special
904   # files actually), so we avoid doing that.
905   if test -f "$cache_file"; then
906     { echo "$as_me:906: loading cache $cache_file" >&5
907 echo "$as_me: loading cache $cache_file" >&6;}
908     case $cache_file in
909       [\\/]* | ?:[\\/]* ) . $cache_file;;
910       *)                      . ./$cache_file;;
911     esac
912   fi
913 else
914   { echo "$as_me:914: creating cache $cache_file" >&5
915 echo "$as_me: creating cache $cache_file" >&6;}
916   >$cache_file
917 fi
918
919 # Check that the precious variables saved in the cache have kept the same
920 # value.
921 ac_cache_corrupted=false
922 for ac_var in `(set) 2>&1 |
923                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
924   eval ac_old_set=\$ac_cv_env_${ac_var}_set
925   eval ac_new_set=\$ac_env_${ac_var}_set
926   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
927   eval ac_new_val="\$ac_env_${ac_var}_value"
928   case $ac_old_set,$ac_new_set in
929     set,)
930       { echo "$as_me:930: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
931 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
932       ac_cache_corrupted=: ;;
933     ,set)
934       { echo "$as_me:934: error: \`$ac_var' was not set in the previous run" >&5
935 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
936       ac_cache_corrupted=: ;;
937     ,);;
938     *)
939       if test "x$ac_old_val" != "x$ac_new_val"; then
940         { echo "$as_me:940: error: \`$ac_var' has changed since the previous run:" >&5
941 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
942         { echo "$as_me:942:   former value:  $ac_old_val" >&5
943 echo "$as_me:   former value:  $ac_old_val" >&2;}
944         { echo "$as_me:944:   current value: $ac_new_val" >&5
945 echo "$as_me:   current value: $ac_new_val" >&2;}
946         ac_cache_corrupted=:
947       fi;;
948   esac
949   # Pass precious variables to config.status.  It doesn't matter if
950   # we pass some twice (in addition to the command line arguments).
951   if test "$ac_new_set" = set; then
952     case $ac_new_val in
953     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
955       ac_configure_args="$ac_configure_args '$ac_arg'"
956       ;;
957     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
958        ;;
959     esac
960   fi
961 done
962 if $ac_cache_corrupted; then
963   { echo "$as_me:963: error: changes in the environment can compromise the build" >&5
964 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
965   { { echo "$as_me:965: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
966 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
967    { (exit 1); exit 1; }; }
968 fi
969
970 ac_ext=c
971 ac_cpp='$CPP $CPPFLAGS'
972 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
973 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
974 ac_compiler_gnu=$ac_cv_c_compiler_gnu
975 ac_main_return=return
976
977 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
978   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
979                    ECHO_T='     ' ;;
980   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
981   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
982 esac
983 echo "#! $SHELL" >conftest.sh
984 echo  "exit 0"   >>conftest.sh
985 chmod +x conftest.sh
986 if { (echo "$as_me:986: PATH=\".;.\"; conftest.sh") >&5
987   (PATH=".;."; conftest.sh) 2>&5
988   ac_status=$?
989   echo "$as_me:989: \$? = $ac_status" >&5
990   (exit $ac_status); }; then
991   ac_path_separator=';'
992 else
993   ac_path_separator=:
994 fi
995 PATH_SEPARATOR="$ac_path_separator"
996 rm -f conftest.sh
997
998 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
999
1000 top_builddir=`pwd`
1001
1002 ac_aux_dir=
1003 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1004   if test -f $ac_dir/install-sh; then
1005     ac_aux_dir=$ac_dir
1006     ac_install_sh="$ac_aux_dir/install-sh -c"
1007     break
1008   elif test -f $ac_dir/install.sh; then
1009     ac_aux_dir=$ac_dir
1010     ac_install_sh="$ac_aux_dir/install.sh -c"
1011     break
1012   elif test -f $ac_dir/shtool; then
1013     ac_aux_dir=$ac_dir
1014     ac_install_sh="$ac_aux_dir/shtool install -c"
1015     break
1016   fi
1017 done
1018 if test -z "$ac_aux_dir"; then
1019   { { echo "$as_me:1019: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1020 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1021    { (exit 1); exit 1; }; }
1022 fi
1023 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1024 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1025 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1026
1027 # Make sure we can run config.sub.
1028 $ac_config_sub sun4 >/dev/null 2>&1 ||
1029   { { echo "$as_me:1029: error: cannot run $ac_config_sub" >&5
1030 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1031    { (exit 1); exit 1; }; }
1032
1033 echo "$as_me:1033: checking build system type" >&5
1034 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1035 if test "${ac_cv_build+set}" = set; then
1036   echo $ECHO_N "(cached) $ECHO_C" >&6
1037 else
1038   ac_cv_build_alias=$build_alias
1039 test -z "$ac_cv_build_alias" &&
1040   ac_cv_build_alias=`$ac_config_guess`
1041 test -z "$ac_cv_build_alias" &&
1042   { { echo "$as_me:1042: error: cannot guess build type; you must specify one" >&5
1043 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1044    { (exit 1); exit 1; }; }
1045 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1046   { { echo "$as_me:1046: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1047 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1048    { (exit 1); exit 1; }; }
1049
1050 fi
1051 echo "$as_me:1051: result: $ac_cv_build" >&5
1052 echo "${ECHO_T}$ac_cv_build" >&6
1053 build=$ac_cv_build
1054 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1055 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1056 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1057
1058 echo "$as_me:1058: checking host system type" >&5
1059 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1060 if test "${ac_cv_host+set}" = set; then
1061   echo $ECHO_N "(cached) $ECHO_C" >&6
1062 else
1063   ac_cv_host_alias=$host_alias
1064 test -z "$ac_cv_host_alias" &&
1065   ac_cv_host_alias=$ac_cv_build_alias
1066 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1067   { { echo "$as_me:1067: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1068 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1069    { (exit 1); exit 1; }; }
1070
1071 fi
1072 echo "$as_me:1072: result: $ac_cv_host" >&5
1073 echo "${ECHO_T}$ac_cv_host" >&6
1074 host=$ac_cv_host
1075 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1076 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1077 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1078
1079 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1080         echo "$as_me:1080: checking target system type" >&5
1081 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1082 if test "${ac_cv_target+set}" = set; then
1083   echo $ECHO_N "(cached) $ECHO_C" >&6
1084 else
1085   ac_cv_target_alias=$target_alias
1086 test "x$ac_cv_target_alias" = "x" &&
1087   ac_cv_target_alias=$ac_cv_host_alias
1088 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1089   { { echo "$as_me:1089: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1090 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1091    { (exit 1); exit 1; }; }
1092
1093 fi
1094 echo "$as_me:1094: result: $ac_cv_target" >&5
1095 echo "${ECHO_T}$ac_cv_target" >&6
1096 target=$ac_cv_target
1097 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1098 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1099 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1100
1101 # The aliases save the names the user supplied, while $host etc.
1102 # will get canonicalized.
1103 test -n "$target_alias" &&
1104   test "$program_prefix$program_suffix$program_transform_name" = \
1105     NONENONEs,x,x, &&
1106   program_prefix=${target_alias}-
1107         system_name="$host_os"
1108 else
1109         system_name="`(uname -s -r) 2>/dev/null`"
1110         if test -z "$system_name" ; then
1111                 system_name="`(hostname) 2>/dev/null`"
1112         fi
1113 fi
1114 test -n "$system_name" &&
1115 cat >>confdefs.h <<EOF
1116 #define SYSTEM_NAME "$system_name"
1117 EOF
1118
1119 if test "${cf_cv_system_name+set}" = set; then
1120   echo $ECHO_N "(cached) $ECHO_C" >&6
1121 else
1122   cf_cv_system_name="$system_name"
1123 fi
1124
1125 test -z "$system_name" && system_name="$cf_cv_system_name"
1126 test -n "$cf_cv_system_name" && echo "$as_me:1126: result: Configuring for $cf_cv_system_name" >&5
1127 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1128
1129 if test ".$system_name" != ".$cf_cv_system_name" ; then
1130         echo "$as_me:1130: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1131 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1132         { { echo "$as_me:1132: error: \"Please remove config.cache and try again.\"" >&5
1133 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1134    { (exit 1); exit 1; }; }
1135 fi
1136
1137 # Check whether --with-system-type or --without-system-type was given.
1138 if test "${with_system_type+set}" = set; then
1139   withval="$with_system_type"
1140   { echo "$as_me:1140: WARNING: overriding system type to $withval" >&5
1141 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1142         cf_cv_system_name=$withval
1143         host_os=$withval
1144
1145 fi;
1146
1147 ###     Save the given $CFLAGS to allow user-override.
1148 cf_user_CFLAGS="$CFLAGS"
1149
1150 ###     Default install-location
1151
1152 echo "$as_me:1152: checking for prefix" >&5
1153 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1154 if test "x$prefix" = "xNONE" ; then
1155         case "$cf_cv_system_name" in
1156                 # non-vendor systems don't have a conflict
1157         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1158                 prefix=/usr
1159                 ;;
1160         *)      prefix=$ac_default_prefix
1161                 ;;
1162         esac
1163 fi
1164 echo "$as_me:1164: result: $prefix" >&5
1165 echo "${ECHO_T}$prefix" >&6
1166
1167 if test "x$prefix" = "xNONE" ; then
1168 echo "$as_me:1168: checking for default include-directory" >&5
1169 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1170 test -n "$verbose" && echo 1>&6
1171 for cf_symbol in \
1172         $includedir \
1173         $includedir/ncurses \
1174         $prefix/include \
1175         $prefix/include/ncurses \
1176         /usr/local/include \
1177         /usr/local/include/ncurses \
1178         /usr/include \
1179         /usr/include/ncurses
1180 do
1181         cf_dir=`eval echo $cf_symbol`
1182         if test -f $cf_dir/curses.h ; then
1183         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1184                 includedir="$cf_symbol"
1185                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1186                 break
1187         fi
1188         fi
1189         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1190 done
1191 echo "$as_me:1191: result: $includedir" >&5
1192 echo "${ECHO_T}$includedir" >&6
1193 fi
1194
1195 ###     Checks for programs.
1196
1197 ac_ext=c
1198 ac_cpp='$CPP $CPPFLAGS'
1199 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1200 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1201 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1202 ac_main_return=return
1203 if test -n "$ac_tool_prefix"; then
1204   for ac_prog in gnatgcc gcc cc
1205   do
1206     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1207 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1208 echo "$as_me:1208: checking for $ac_word" >&5
1209 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1210 if test "${ac_cv_prog_CC+set}" = set; then
1211   echo $ECHO_N "(cached) $ECHO_C" >&6
1212 else
1213   if test -n "$CC"; then
1214   ac_cv_prog_CC="$CC" # Let the user override the test.
1215 else
1216   ac_save_IFS=$IFS; IFS=$ac_path_separator
1217 ac_dummy="$PATH"
1218 for ac_dir in $ac_dummy; do
1219   IFS=$ac_save_IFS
1220   test -z "$ac_dir" && ac_dir=.
1221   $as_executable_p "$ac_dir/$ac_word" || continue
1222 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1223 echo "$as_me:1223: found $ac_dir/$ac_word" >&5
1224 break
1225 done
1226
1227 fi
1228 fi
1229 CC=$ac_cv_prog_CC
1230 if test -n "$CC"; then
1231   echo "$as_me:1231: result: $CC" >&5
1232 echo "${ECHO_T}$CC" >&6
1233 else
1234   echo "$as_me:1234: result: no" >&5
1235 echo "${ECHO_T}no" >&6
1236 fi
1237
1238     test -n "$CC" && break
1239   done
1240 fi
1241 if test -z "$CC"; then
1242   ac_ct_CC=$CC
1243   for ac_prog in gnatgcc gcc cc
1244 do
1245   # Extract the first word of "$ac_prog", so it can be a program name with args.
1246 set dummy $ac_prog; ac_word=$2
1247 echo "$as_me:1247: checking for $ac_word" >&5
1248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1249 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1250   echo $ECHO_N "(cached) $ECHO_C" >&6
1251 else
1252   if test -n "$ac_ct_CC"; then
1253   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1254 else
1255   ac_save_IFS=$IFS; IFS=$ac_path_separator
1256 ac_dummy="$PATH"
1257 for ac_dir in $ac_dummy; do
1258   IFS=$ac_save_IFS
1259   test -z "$ac_dir" && ac_dir=.
1260   $as_executable_p "$ac_dir/$ac_word" || continue
1261 ac_cv_prog_ac_ct_CC="$ac_prog"
1262 echo "$as_me:1262: found $ac_dir/$ac_word" >&5
1263 break
1264 done
1265
1266 fi
1267 fi
1268 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1269 if test -n "$ac_ct_CC"; then
1270   echo "$as_me:1270: result: $ac_ct_CC" >&5
1271 echo "${ECHO_T}$ac_ct_CC" >&6
1272 else
1273   echo "$as_me:1273: result: no" >&5
1274 echo "${ECHO_T}no" >&6
1275 fi
1276
1277   test -n "$ac_ct_CC" && break
1278 done
1279
1280   CC=$ac_ct_CC
1281 fi
1282
1283 test -z "$CC" && { { echo "$as_me:1283: error: no acceptable cc found in \$PATH" >&5
1284 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1285    { (exit 1); exit 1; }; }
1286
1287 # Provide some information about the compiler.
1288 echo "$as_me:1288:" \
1289      "checking for C compiler version" >&5
1290 ac_compiler=`set X $ac_compile; echo $2`
1291 { (eval echo "$as_me:1291: \"$ac_compiler --version </dev/null >&5\"") >&5
1292   (eval $ac_compiler --version </dev/null >&5) 2>&5
1293   ac_status=$?
1294   echo "$as_me:1294: \$? = $ac_status" >&5
1295   (exit $ac_status); }
1296 { (eval echo "$as_me:1296: \"$ac_compiler -v </dev/null >&5\"") >&5
1297   (eval $ac_compiler -v </dev/null >&5) 2>&5
1298   ac_status=$?
1299   echo "$as_me:1299: \$? = $ac_status" >&5
1300   (exit $ac_status); }
1301 { (eval echo "$as_me:1301: \"$ac_compiler -V </dev/null >&5\"") >&5
1302   (eval $ac_compiler -V </dev/null >&5) 2>&5
1303   ac_status=$?
1304   echo "$as_me:1304: \$? = $ac_status" >&5
1305   (exit $ac_status); }
1306
1307 cat >conftest.$ac_ext <<_ACEOF
1308 #line 1308 "configure"
1309 #include "confdefs.h"
1310
1311 int
1312 main ()
1313 {
1314
1315   ;
1316   return 0;
1317 }
1318 _ACEOF
1319 ac_clean_files_save=$ac_clean_files
1320 ac_clean_files="$ac_clean_files a.out a.exe"
1321 # Try to create an executable without -o first, disregard a.out.
1322 # It will help us diagnose broken compilers, and finding out an intuition
1323 # of exeext.
1324 echo "$as_me:1324: checking for C compiler default output" >&5
1325 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1326 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1327 if { (eval echo "$as_me:1327: \"$ac_link_default\"") >&5
1328   (eval $ac_link_default) 2>&5
1329   ac_status=$?
1330   echo "$as_me:1330: \$? = $ac_status" >&5
1331   (exit $ac_status); }; then
1332   # Find the output, starting from the most likely.  This scheme is
1333 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1334 # resort.
1335 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1336                 ls a.out conftest 2>/dev/null;
1337                 ls a.* conftest.* 2>/dev/null`; do
1338   case $ac_file in
1339     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1340     a.out ) # We found the default executable, but exeext='' is most
1341             # certainly right.
1342             break;;
1343     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1344           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1345           export ac_cv_exeext
1346           break;;
1347     * ) break;;
1348   esac
1349 done
1350 else
1351   echo "$as_me: failed program was:" >&5
1352 cat conftest.$ac_ext >&5
1353 { { echo "$as_me:1353: error: C compiler cannot create executables" >&5
1354 echo "$as_me: error: C compiler cannot create executables" >&2;}
1355    { (exit 77); exit 77; }; }
1356 fi
1357
1358 ac_exeext=$ac_cv_exeext
1359 echo "$as_me:1359: result: $ac_file" >&5
1360 echo "${ECHO_T}$ac_file" >&6
1361
1362 # Check the compiler produces executables we can run.  If not, either
1363 # the compiler is broken, or we cross compile.
1364 echo "$as_me:1364: checking whether the C compiler works" >&5
1365 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1366 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1367 # If not cross compiling, check that we can run a simple program.
1368 if test "$cross_compiling" != yes; then
1369   if { ac_try='./$ac_file'
1370   { (eval echo "$as_me:1370: \"$ac_try\"") >&5
1371   (eval $ac_try) 2>&5
1372   ac_status=$?
1373   echo "$as_me:1373: \$? = $ac_status" >&5
1374   (exit $ac_status); }; }; then
1375     cross_compiling=no
1376   else
1377     if test "$cross_compiling" = maybe; then
1378         cross_compiling=yes
1379     else
1380         { { echo "$as_me:1380: error: cannot run C compiled programs.
1381 If you meant to cross compile, use \`--host'." >&5
1382 echo "$as_me: error: cannot run C compiled programs.
1383 If you meant to cross compile, use \`--host'." >&2;}
1384    { (exit 1); exit 1; }; }
1385     fi
1386   fi
1387 fi
1388 echo "$as_me:1388: result: yes" >&5
1389 echo "${ECHO_T}yes" >&6
1390
1391 rm -f a.out a.exe conftest$ac_cv_exeext
1392 ac_clean_files=$ac_clean_files_save
1393 # Check the compiler produces executables we can run.  If not, either
1394 # the compiler is broken, or we cross compile.
1395 echo "$as_me:1395: checking whether we are cross compiling" >&5
1396 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1397 echo "$as_me:1397: result: $cross_compiling" >&5
1398 echo "${ECHO_T}$cross_compiling" >&6
1399
1400 echo "$as_me:1400: checking for executable suffix" >&5
1401 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1402 if { (eval echo "$as_me:1402: \"$ac_link\"") >&5
1403   (eval $ac_link) 2>&5
1404   ac_status=$?
1405   echo "$as_me:1405: \$? = $ac_status" >&5
1406   (exit $ac_status); }; then
1407   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1408 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1409 # work properly (i.e., refer to `conftest.exe'), while it won't with
1410 # `rm'.
1411 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1412   case $ac_file in
1413     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1414     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1415           export ac_cv_exeext
1416           break;;
1417     * ) break;;
1418   esac
1419 done
1420 else
1421   { { echo "$as_me:1421: error: cannot compute EXEEXT: cannot compile and link" >&5
1422 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1423    { (exit 1); exit 1; }; }
1424 fi
1425
1426 rm -f conftest$ac_cv_exeext
1427 echo "$as_me:1427: result: $ac_cv_exeext" >&5
1428 echo "${ECHO_T}$ac_cv_exeext" >&6
1429
1430 rm -f conftest.$ac_ext
1431 EXEEXT=$ac_cv_exeext
1432 ac_exeext=$EXEEXT
1433 echo "$as_me:1433: checking for object suffix" >&5
1434 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1435 if test "${ac_cv_objext+set}" = set; then
1436   echo $ECHO_N "(cached) $ECHO_C" >&6
1437 else
1438   cat >conftest.$ac_ext <<_ACEOF
1439 #line 1439 "configure"
1440 #include "confdefs.h"
1441
1442 int
1443 main ()
1444 {
1445
1446   ;
1447   return 0;
1448 }
1449 _ACEOF
1450 rm -f conftest.o conftest.obj
1451 if { (eval echo "$as_me:1451: \"$ac_compile\"") >&5
1452   (eval $ac_compile) 2>&5
1453   ac_status=$?
1454   echo "$as_me:1454: \$? = $ac_status" >&5
1455   (exit $ac_status); }; then
1456   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1457   case $ac_file in
1458     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1459     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1460        break;;
1461   esac
1462 done
1463 else
1464   echo "$as_me: failed program was:" >&5
1465 cat conftest.$ac_ext >&5
1466 { { echo "$as_me:1466: error: cannot compute OBJEXT: cannot compile" >&5
1467 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1468    { (exit 1); exit 1; }; }
1469 fi
1470
1471 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1472 fi
1473 echo "$as_me:1473: result: $ac_cv_objext" >&5
1474 echo "${ECHO_T}$ac_cv_objext" >&6
1475 OBJEXT=$ac_cv_objext
1476 ac_objext=$OBJEXT
1477 echo "$as_me:1477: checking whether we are using the GNU C compiler" >&5
1478 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1479 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1480   echo $ECHO_N "(cached) $ECHO_C" >&6
1481 else
1482   cat >conftest.$ac_ext <<_ACEOF
1483 #line 1483 "configure"
1484 #include "confdefs.h"
1485
1486 int
1487 main ()
1488 {
1489 #ifndef __GNUC__
1490        choke me
1491 #endif
1492
1493   ;
1494   return 0;
1495 }
1496 _ACEOF
1497 rm -f conftest.$ac_objext
1498 if { (eval echo "$as_me:1498: \"$ac_compile\"") >&5
1499   (eval $ac_compile) 2>&5
1500   ac_status=$?
1501   echo "$as_me:1501: \$? = $ac_status" >&5
1502   (exit $ac_status); } &&
1503          { ac_try='test -s conftest.$ac_objext'
1504   { (eval echo "$as_me:1504: \"$ac_try\"") >&5
1505   (eval $ac_try) 2>&5
1506   ac_status=$?
1507   echo "$as_me:1507: \$? = $ac_status" >&5
1508   (exit $ac_status); }; }; then
1509   ac_compiler_gnu=yes
1510 else
1511   echo "$as_me: failed program was:" >&5
1512 cat conftest.$ac_ext >&5
1513 ac_compiler_gnu=no
1514 fi
1515 rm -f conftest.$ac_objext conftest.$ac_ext
1516 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1517
1518 fi
1519 echo "$as_me:1519: result: $ac_cv_c_compiler_gnu" >&5
1520 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1521 GCC=`test $ac_compiler_gnu = yes && echo yes`
1522 ac_test_CFLAGS=${CFLAGS+set}
1523 ac_save_CFLAGS=$CFLAGS
1524 CFLAGS="-g"
1525 echo "$as_me:1525: checking whether $CC accepts -g" >&5
1526 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1527 if test "${ac_cv_prog_cc_g+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   cat >conftest.$ac_ext <<_ACEOF
1531 #line 1531 "configure"
1532 #include "confdefs.h"
1533
1534 int
1535 main ()
1536 {
1537
1538   ;
1539   return 0;
1540 }
1541 _ACEOF
1542 rm -f conftest.$ac_objext
1543 if { (eval echo "$as_me:1543: \"$ac_compile\"") >&5
1544   (eval $ac_compile) 2>&5
1545   ac_status=$?
1546   echo "$as_me:1546: \$? = $ac_status" >&5
1547   (exit $ac_status); } &&
1548          { ac_try='test -s conftest.$ac_objext'
1549   { (eval echo "$as_me:1549: \"$ac_try\"") >&5
1550   (eval $ac_try) 2>&5
1551   ac_status=$?
1552   echo "$as_me:1552: \$? = $ac_status" >&5
1553   (exit $ac_status); }; }; then
1554   ac_cv_prog_cc_g=yes
1555 else
1556   echo "$as_me: failed program was:" >&5
1557 cat conftest.$ac_ext >&5
1558 ac_cv_prog_cc_g=no
1559 fi
1560 rm -f conftest.$ac_objext conftest.$ac_ext
1561 fi
1562 echo "$as_me:1562: result: $ac_cv_prog_cc_g" >&5
1563 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1564 if test "$ac_test_CFLAGS" = set; then
1565   CFLAGS=$ac_save_CFLAGS
1566 elif test $ac_cv_prog_cc_g = yes; then
1567   if test "$GCC" = yes; then
1568     CFLAGS="-g -O2"
1569   else
1570     CFLAGS="-g"
1571   fi
1572 else
1573   if test "$GCC" = yes; then
1574     CFLAGS="-O2"
1575   else
1576     CFLAGS=
1577   fi
1578 fi
1579 # Some people use a C++ compiler to compile C.  Since we use `exit',
1580 # in C++ we need to declare it.  In case someone uses the same compiler
1581 # for both compiling C and C++ we need to have the C++ compiler decide
1582 # the declaration of exit, since it's the most demanding environment.
1583 cat >conftest.$ac_ext <<_ACEOF
1584 #ifndef __cplusplus
1585   choke me
1586 #endif
1587 _ACEOF
1588 rm -f conftest.$ac_objext
1589 if { (eval echo "$as_me:1589: \"$ac_compile\"") >&5
1590   (eval $ac_compile) 2>&5
1591   ac_status=$?
1592   echo "$as_me:1592: \$? = $ac_status" >&5
1593   (exit $ac_status); } &&
1594          { ac_try='test -s conftest.$ac_objext'
1595   { (eval echo "$as_me:1595: \"$ac_try\"") >&5
1596   (eval $ac_try) 2>&5
1597   ac_status=$?
1598   echo "$as_me:1598: \$? = $ac_status" >&5
1599   (exit $ac_status); }; }; then
1600   for ac_declaration in \
1601    ''\
1602    '#include <stdlib.h>' \
1603    'extern "C" void std::exit (int) throw (); using std::exit;' \
1604    'extern "C" void std::exit (int); using std::exit;' \
1605    'extern "C" void exit (int) throw ();' \
1606    'extern "C" void exit (int);' \
1607    'void exit (int);'
1608 do
1609   cat >conftest.$ac_ext <<_ACEOF
1610 #line 1610 "configure"
1611 #include "confdefs.h"
1612 #include <stdlib.h>
1613 $ac_declaration
1614 int
1615 main ()
1616 {
1617 exit (42);
1618   ;
1619   return 0;
1620 }
1621 _ACEOF
1622 rm -f conftest.$ac_objext
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624   (eval $ac_compile) 2>&5
1625   ac_status=$?
1626   echo "$as_me:1626: \$? = $ac_status" >&5
1627   (exit $ac_status); } &&
1628          { ac_try='test -s conftest.$ac_objext'
1629   { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1630   (eval $ac_try) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }; }; then
1634   :
1635 else
1636   echo "$as_me: failed program was:" >&5
1637 cat conftest.$ac_ext >&5
1638 continue
1639 fi
1640 rm -f conftest.$ac_objext conftest.$ac_ext
1641   cat >conftest.$ac_ext <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1644 $ac_declaration
1645 int
1646 main ()
1647 {
1648 exit (42);
1649   ;
1650   return 0;
1651 }
1652 _ACEOF
1653 rm -f conftest.$ac_objext
1654 if { (eval echo "$as_me:1654: \"$ac_compile\"") >&5
1655   (eval $ac_compile) 2>&5
1656   ac_status=$?
1657   echo "$as_me:1657: \$? = $ac_status" >&5
1658   (exit $ac_status); } &&
1659          { ac_try='test -s conftest.$ac_objext'
1660   { (eval echo "$as_me:1660: \"$ac_try\"") >&5
1661   (eval $ac_try) 2>&5
1662   ac_status=$?
1663   echo "$as_me:1663: \$? = $ac_status" >&5
1664   (exit $ac_status); }; }; then
1665   break
1666 else
1667   echo "$as_me: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1669 fi
1670 rm -f conftest.$ac_objext conftest.$ac_ext
1671 done
1672 rm -rf conftest*
1673 if test -n "$ac_declaration"; then
1674   echo '#ifdef __cplusplus' >>confdefs.h
1675   echo $ac_declaration      >>confdefs.h
1676   echo '#endif'             >>confdefs.h
1677 fi
1678
1679 else
1680   echo "$as_me: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1682 fi
1683 rm -f conftest.$ac_objext conftest.$ac_ext
1684 ac_ext=c
1685 ac_cpp='$CPP $CPPFLAGS'
1686 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1687 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1688 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1689 ac_main_return=return
1690
1691 GCC_VERSION=none
1692 if test "$GCC" = yes ; then
1693         echo "$as_me:1693: checking version of $CC" >&5
1694 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1695         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.].*//'`"
1696         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1697         echo "$as_me:1697: result: $GCC_VERSION" >&5
1698 echo "${ECHO_T}$GCC_VERSION" >&6
1699 fi
1700
1701 echo "$as_me:1701: checking for $CC option to accept ANSI C" >&5
1702 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1703 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1704   echo $ECHO_N "(cached) $ECHO_C" >&6
1705 else
1706   ac_cv_prog_cc_stdc=no
1707 ac_save_CC=$CC
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #line 1709 "configure"
1710 #include "confdefs.h"
1711 #include <stdarg.h>
1712 #include <stdio.h>
1713 #include <sys/types.h>
1714 #include <sys/stat.h>
1715 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1716 struct buf { int x; };
1717 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1718 static char *e (p, i)
1719      char **p;
1720      int i;
1721 {
1722   return p[i];
1723 }
1724 static char *f (char * (*g) (char **, int), char **p, ...)
1725 {
1726   char *s;
1727   va_list v;
1728   va_start (v,p);
1729   s = g (p, va_arg (v,int));
1730   va_end (v);
1731   return s;
1732 }
1733 int test (int i, double x);
1734 struct s1 {int (*f) (int a);};
1735 struct s2 {int (*f) (double a);};
1736 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1737 int argc;
1738 char **argv;
1739 int
1740 main ()
1741 {
1742 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1743   ;
1744   return 0;
1745 }
1746 _ACEOF
1747 # Don't try gcc -ansi; that turns off useful extensions and
1748 # breaks some systems' header files.
1749 # AIX                   -qlanglvl=ansi
1750 # Ultrix and OSF/1      -std1
1751 # HP-UX 10.20 and later -Ae
1752 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1753 # SVR4                  -Xc -D__EXTENSIONS__
1754 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1755 do
1756   CC="$ac_save_CC $ac_arg"
1757   rm -f conftest.$ac_objext
1758 if { (eval echo "$as_me:1758: \"$ac_compile\"") >&5
1759   (eval $ac_compile) 2>&5
1760   ac_status=$?
1761   echo "$as_me:1761: \$? = $ac_status" >&5
1762   (exit $ac_status); } &&
1763          { ac_try='test -s conftest.$ac_objext'
1764   { (eval echo "$as_me:1764: \"$ac_try\"") >&5
1765   (eval $ac_try) 2>&5
1766   ac_status=$?
1767   echo "$as_me:1767: \$? = $ac_status" >&5
1768   (exit $ac_status); }; }; then
1769   ac_cv_prog_cc_stdc=$ac_arg
1770 break
1771 else
1772   echo "$as_me: failed program was:" >&5
1773 cat conftest.$ac_ext >&5
1774 fi
1775 rm -f conftest.$ac_objext
1776 done
1777 rm -f conftest.$ac_ext conftest.$ac_objext
1778 CC=$ac_save_CC
1779
1780 fi
1781
1782 case "x$ac_cv_prog_cc_stdc" in
1783   x|xno)
1784     echo "$as_me:1784: result: none needed" >&5
1785 echo "${ECHO_T}none needed" >&6 ;;
1786   *)
1787     echo "$as_me:1787: result: $ac_cv_prog_cc_stdc" >&5
1788 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1789     CC="$CC $ac_cv_prog_cc_stdc" ;;
1790 esac
1791
1792 # This should have been defined by AC_PROG_CC
1793 : ${CC:=cc}
1794
1795 echo "$as_me:1795: checking \$CC variable" >&5
1796 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1797 case "$CC" in #(vi
1798 *[\ \   ]-[IUD]*)
1799         echo "$as_me:1799: result: broken" >&5
1800 echo "${ECHO_T}broken" >&6
1801         { echo "$as_me:1801: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1802 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1803         # humor him...
1804         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
1805         CC=`echo "$CC" | sed -e 's/[    ].*//'`
1806
1807 cf_fix_cppflags=no
1808 cf_new_cflags=
1809 cf_new_cppflags=
1810 cf_new_extra_cppflags=
1811
1812 for cf_add_cflags in $cf_flags
1813 do
1814 case $cf_fix_cppflags in
1815 no)
1816         case $cf_add_cflags in #(vi
1817         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1818                 case $cf_add_cflags in
1819                 -D*)
1820                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1821
1822                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1823                                 && test -z "${cf_tst_cflags}" \
1824                                 && cf_fix_cppflags=yes
1825
1826                         if test $cf_fix_cppflags = yes ; then
1827                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1828                                 continue
1829                         elif test "${cf_tst_cflags}" = "\"'" ; then
1830                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1831                                 continue
1832                         fi
1833                         ;;
1834                 esac
1835                 case "$CPPFLAGS" in
1836                 *$cf_add_cflags) #(vi
1837                         ;;
1838                 *) #(vi
1839                         case $cf_add_cflags in #(vi
1840                         -D*)
1841                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1842
1843 CPPFLAGS=`echo "$CPPFLAGS" | \
1844         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
1845                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
1846
1847                                 ;;
1848                         esac
1849                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1850                         ;;
1851                 esac
1852                 ;;
1853         *)
1854                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1855                 ;;
1856         esac
1857         ;;
1858 yes)
1859         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1860
1861         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1862
1863         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1864                 && test -z "${cf_tst_cflags}" \
1865                 && cf_fix_cppflags=no
1866         ;;
1867 esac
1868 done
1869
1870 if test -n "$cf_new_cflags" ; then
1871
1872         CFLAGS="$CFLAGS $cf_new_cflags"
1873 fi
1874
1875 if test -n "$cf_new_cppflags" ; then
1876
1877         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1878 fi
1879
1880 if test -n "$cf_new_extra_cppflags" ; then
1881
1882         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1883 fi
1884
1885         ;;
1886 *)
1887         echo "$as_me:1887: result: ok" >&5
1888 echo "${ECHO_T}ok" >&6
1889         ;;
1890 esac
1891
1892 ac_ext=c
1893 ac_cpp='$CPP $CPPFLAGS'
1894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1897 ac_main_return=return
1898 echo "$as_me:1898: checking how to run the C preprocessor" >&5
1899 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1900 # On Suns, sometimes $CPP names a directory.
1901 if test -n "$CPP" && test -d "$CPP"; then
1902   CPP=
1903 fi
1904 if test -z "$CPP"; then
1905   if test "${ac_cv_prog_CPP+set}" = set; then
1906   echo $ECHO_N "(cached) $ECHO_C" >&6
1907 else
1908       # Double quotes because CPP needs to be expanded
1909     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1910     do
1911       ac_preproc_ok=false
1912 for ac_c_preproc_warn_flag in '' yes
1913 do
1914   # Use a header file that comes with gcc, so configuring glibc
1915   # with a fresh cross-compiler works.
1916   # On the NeXT, cc -E runs the code through the compiler's parser,
1917   # not just through cpp. "Syntax error" is here to catch this case.
1918   cat >conftest.$ac_ext <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1921 #include <assert.h>
1922                      Syntax error
1923 _ACEOF
1924 if { (eval echo "$as_me:1924: \"$ac_cpp conftest.$ac_ext\"") >&5
1925   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1926   ac_status=$?
1927   egrep -v '^ *\+' conftest.er1 >conftest.err
1928   rm -f conftest.er1
1929   cat conftest.err >&5
1930   echo "$as_me:1930: \$? = $ac_status" >&5
1931   (exit $ac_status); } >/dev/null; then
1932   if test -s conftest.err; then
1933     ac_cpp_err=$ac_c_preproc_warn_flag
1934   else
1935     ac_cpp_err=
1936   fi
1937 else
1938   ac_cpp_err=yes
1939 fi
1940 if test -z "$ac_cpp_err"; then
1941   :
1942 else
1943   echo "$as_me: failed program was:" >&5
1944   cat conftest.$ac_ext >&5
1945   # Broken: fails on valid input.
1946 continue
1947 fi
1948 rm -f conftest.err conftest.$ac_ext
1949
1950   # OK, works on sane cases.  Now check whether non-existent headers
1951   # can be detected and how.
1952   cat >conftest.$ac_ext <<_ACEOF
1953 #line 1953 "configure"
1954 #include "confdefs.h"
1955 #include <ac_nonexistent.h>
1956 _ACEOF
1957 if { (eval echo "$as_me:1957: \"$ac_cpp conftest.$ac_ext\"") >&5
1958   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1959   ac_status=$?
1960   egrep -v '^ *\+' conftest.er1 >conftest.err
1961   rm -f conftest.er1
1962   cat conftest.err >&5
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit $ac_status); } >/dev/null; then
1965   if test -s conftest.err; then
1966     ac_cpp_err=$ac_c_preproc_warn_flag
1967   else
1968     ac_cpp_err=
1969   fi
1970 else
1971   ac_cpp_err=yes
1972 fi
1973 if test -z "$ac_cpp_err"; then
1974   # Broken: success on invalid input.
1975 continue
1976 else
1977   echo "$as_me: failed program was:" >&5
1978   cat conftest.$ac_ext >&5
1979   # Passes both tests.
1980 ac_preproc_ok=:
1981 break
1982 fi
1983 rm -f conftest.err conftest.$ac_ext
1984
1985 done
1986 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1987 rm -f conftest.err conftest.$ac_ext
1988 if $ac_preproc_ok; then
1989   break
1990 fi
1991
1992     done
1993     ac_cv_prog_CPP=$CPP
1994
1995 fi
1996   CPP=$ac_cv_prog_CPP
1997 else
1998   ac_cv_prog_CPP=$CPP
1999 fi
2000 echo "$as_me:2000: result: $CPP" >&5
2001 echo "${ECHO_T}$CPP" >&6
2002 ac_preproc_ok=false
2003 for ac_c_preproc_warn_flag in '' yes
2004 do
2005   # Use a header file that comes with gcc, so configuring glibc
2006   # with a fresh cross-compiler works.
2007   # On the NeXT, cc -E runs the code through the compiler's parser,
2008   # not just through cpp. "Syntax error" is here to catch this case.
2009   cat >conftest.$ac_ext <<_ACEOF
2010 #line 2010 "configure"
2011 #include "confdefs.h"
2012 #include <assert.h>
2013                      Syntax error
2014 _ACEOF
2015 if { (eval echo "$as_me:2015: \"$ac_cpp conftest.$ac_ext\"") >&5
2016   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2017   ac_status=$?
2018   egrep -v '^ *\+' conftest.er1 >conftest.err
2019   rm -f conftest.er1
2020   cat conftest.err >&5
2021   echo "$as_me:2021: \$? = $ac_status" >&5
2022   (exit $ac_status); } >/dev/null; then
2023   if test -s conftest.err; then
2024     ac_cpp_err=$ac_c_preproc_warn_flag
2025   else
2026     ac_cpp_err=
2027   fi
2028 else
2029   ac_cpp_err=yes
2030 fi
2031 if test -z "$ac_cpp_err"; then
2032   :
2033 else
2034   echo "$as_me: failed program was:" >&5
2035   cat conftest.$ac_ext >&5
2036   # Broken: fails on valid input.
2037 continue
2038 fi
2039 rm -f conftest.err conftest.$ac_ext
2040
2041   # OK, works on sane cases.  Now check whether non-existent headers
2042   # can be detected and how.
2043   cat >conftest.$ac_ext <<_ACEOF
2044 #line 2044 "configure"
2045 #include "confdefs.h"
2046 #include <ac_nonexistent.h>
2047 _ACEOF
2048 if { (eval echo "$as_me:2048: \"$ac_cpp conftest.$ac_ext\"") >&5
2049   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2050   ac_status=$?
2051   egrep -v '^ *\+' conftest.er1 >conftest.err
2052   rm -f conftest.er1
2053   cat conftest.err >&5
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } >/dev/null; then
2056   if test -s conftest.err; then
2057     ac_cpp_err=$ac_c_preproc_warn_flag
2058   else
2059     ac_cpp_err=
2060   fi
2061 else
2062   ac_cpp_err=yes
2063 fi
2064 if test -z "$ac_cpp_err"; then
2065   # Broken: success on invalid input.
2066 continue
2067 else
2068   echo "$as_me: failed program was:" >&5
2069   cat conftest.$ac_ext >&5
2070   # Passes both tests.
2071 ac_preproc_ok=:
2072 break
2073 fi
2074 rm -f conftest.err conftest.$ac_ext
2075
2076 done
2077 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2078 rm -f conftest.err conftest.$ac_ext
2079 if $ac_preproc_ok; then
2080   :
2081 else
2082   { { echo "$as_me:2082: error: C preprocessor \"$CPP\" fails sanity check" >&5
2083 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2084    { (exit 1); exit 1; }; }
2085 fi
2086
2087 ac_ext=c
2088 ac_cpp='$CPP $CPPFLAGS'
2089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2092 ac_main_return=return
2093
2094 if test $ac_cv_c_compiler_gnu = yes; then
2095     echo "$as_me:2095: checking whether $CC needs -traditional" >&5
2096 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2097 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2098   echo $ECHO_N "(cached) $ECHO_C" >&6
2099 else
2100     ac_pattern="Autoconf.*'x'"
2101   cat >conftest.$ac_ext <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104 #include <sgtty.h>
2105 int Autoconf = TIOCGETP;
2106 _ACEOF
2107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2108   egrep "$ac_pattern" >/dev/null 2>&1; then
2109   ac_cv_prog_gcc_traditional=yes
2110 else
2111   ac_cv_prog_gcc_traditional=no
2112 fi
2113 rm -rf conftest*
2114
2115   if test $ac_cv_prog_gcc_traditional = no; then
2116     cat >conftest.$ac_ext <<_ACEOF
2117 #line 2117 "configure"
2118 #include "confdefs.h"
2119 #include <termio.h>
2120 int Autoconf = TCGETA;
2121 _ACEOF
2122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2123   egrep "$ac_pattern" >/dev/null 2>&1; then
2124   ac_cv_prog_gcc_traditional=yes
2125 fi
2126 rm -rf conftest*
2127
2128   fi
2129 fi
2130 echo "$as_me:2130: result: $ac_cv_prog_gcc_traditional" >&5
2131 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2132   if test $ac_cv_prog_gcc_traditional = yes; then
2133     CC="$CC -traditional"
2134   fi
2135 fi
2136
2137 echo "$as_me:2137: checking whether $CC understands -c and -o together" >&5
2138 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2139 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2140   echo $ECHO_N "(cached) $ECHO_C" >&6
2141 else
2142
2143 cat > conftest.$ac_ext <<CF_EOF
2144 #include <stdio.h>
2145 int main()
2146 {
2147         ${cf_cv_main_return:-return}(0);
2148 }
2149 CF_EOF
2150 # We do the test twice because some compilers refuse to overwrite an
2151 # existing .o file with -o, though they will create one.
2152 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2153 if { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2154   (eval $ac_try) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); } &&
2158   test -f conftest2.$ac_objext && { (eval echo "$as_me:2158: \"$ac_try\"") >&5
2159   (eval $ac_try) 2>&5
2160   ac_status=$?
2161   echo "$as_me:2161: \$? = $ac_status" >&5
2162   (exit $ac_status); };
2163 then
2164   eval cf_cv_prog_CC_c_o=yes
2165 else
2166   eval cf_cv_prog_CC_c_o=no
2167 fi
2168 rm -rf conftest*
2169
2170 fi
2171 if test $cf_cv_prog_CC_c_o = yes; then
2172   echo "$as_me:2172: result: yes" >&5
2173 echo "${ECHO_T}yes" >&6
2174 else
2175   echo "$as_me:2175: result: no" >&5
2176 echo "${ECHO_T}no" >&6
2177 fi
2178
2179 test "$program_prefix" != NONE &&
2180   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2181 # Use a double $ so make ignores it.
2182 test "$program_suffix" != NONE &&
2183   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2184 # Double any \ or $.  echo might interpret backslashes.
2185 # By default was `s,x,x', remove it if useless.
2186 cat <<\_ACEOF >conftest.sed
2187 s/[\\$]/&&/g;s/;s,x,x,$//
2188 _ACEOF
2189 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2190 rm conftest.sed
2191
2192 for ac_prog in mawk gawk nawk awk
2193 do
2194   # Extract the first word of "$ac_prog", so it can be a program name with args.
2195 set dummy $ac_prog; ac_word=$2
2196 echo "$as_me:2196: checking for $ac_word" >&5
2197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2198 if test "${ac_cv_prog_AWK+set}" = set; then
2199   echo $ECHO_N "(cached) $ECHO_C" >&6
2200 else
2201   if test -n "$AWK"; then
2202   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2203 else
2204   ac_save_IFS=$IFS; IFS=$ac_path_separator
2205 ac_dummy="$PATH"
2206 for ac_dir in $ac_dummy; do
2207   IFS=$ac_save_IFS
2208   test -z "$ac_dir" && ac_dir=.
2209   $as_executable_p "$ac_dir/$ac_word" || continue
2210 ac_cv_prog_AWK="$ac_prog"
2211 echo "$as_me:2211: found $ac_dir/$ac_word" >&5
2212 break
2213 done
2214
2215 fi
2216 fi
2217 AWK=$ac_cv_prog_AWK
2218 if test -n "$AWK"; then
2219   echo "$as_me:2219: result: $AWK" >&5
2220 echo "${ECHO_T}$AWK" >&6
2221 else
2222   echo "$as_me:2222: result: no" >&5
2223 echo "${ECHO_T}no" >&6
2224 fi
2225
2226   test -n "$AWK" && break
2227 done
2228
2229 test -z "$AWK" && { { echo "$as_me:2229: error: No awk program found" >&5
2230 echo "$as_me: error: No awk program found" >&2;}
2231    { (exit 1); exit 1; }; }
2232
2233 echo "$as_me:2233: checking for egrep" >&5
2234 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2235 if test "${ac_cv_prog_egrep+set}" = set; then
2236   echo $ECHO_N "(cached) $ECHO_C" >&6
2237 else
2238   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2239     then ac_cv_prog_egrep='grep -E'
2240     else ac_cv_prog_egrep='egrep'
2241     fi
2242 fi
2243 echo "$as_me:2243: result: $ac_cv_prog_egrep" >&5
2244 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2245  EGREP=$ac_cv_prog_egrep
2246
2247 test -z "$EGREP" && { { echo "$as_me:2247: error: No egrep program found" >&5
2248 echo "$as_me: error: No egrep program found" >&2;}
2249    { (exit 1); exit 1; }; }
2250
2251 # Find a good install program.  We prefer a C program (faster),
2252 # so one script is as good as another.  But avoid the broken or
2253 # incompatible versions:
2254 # SysV /etc/install, /usr/sbin/install
2255 # SunOS /usr/etc/install
2256 # IRIX /sbin/install
2257 # AIX /bin/install
2258 # AmigaOS /C/install, which installs bootblocks on floppy discs
2259 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2260 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2261 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2262 # ./install, which can be erroneously created by make from ./install.sh.
2263 echo "$as_me:2263: checking for a BSD compatible install" >&5
2264 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2265 if test -z "$INSTALL"; then
2266 if test "${ac_cv_path_install+set}" = set; then
2267   echo $ECHO_N "(cached) $ECHO_C" >&6
2268 else
2269     ac_save_IFS=$IFS; IFS=$ac_path_separator
2270   for ac_dir in $PATH; do
2271     IFS=$ac_save_IFS
2272     # Account for people who put trailing slashes in PATH elements.
2273     case $ac_dir/ in
2274     / | ./ | .// | /cC/* \
2275     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2276     | /usr/ucb/* ) ;;
2277     *)
2278       # OSF1 and SCO ODT 3.0 have their own names for install.
2279       # Don't use installbsd from OSF since it installs stuff as root
2280       # by default.
2281       for ac_prog in ginstall scoinst install; do
2282         if $as_executable_p "$ac_dir/$ac_prog"; then
2283           if test $ac_prog = install &&
2284             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2285             # AIX install.  It has an incompatible calling convention.
2286             :
2287           elif test $ac_prog = install &&
2288             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2289             # program-specific install script used by HP pwplus--don't use.
2290             :
2291           else
2292             ac_cv_path_install="$ac_dir/$ac_prog -c"
2293             break 2
2294           fi
2295         fi
2296       done
2297       ;;
2298     esac
2299   done
2300
2301 fi
2302   if test "${ac_cv_path_install+set}" = set; then
2303     INSTALL=$ac_cv_path_install
2304   else
2305     # As a last resort, use the slow shell script.  We don't cache a
2306     # path for INSTALL within a source directory, because that will
2307     # break other packages using the cache if that directory is
2308     # removed, or if the path is relative.
2309     INSTALL=$ac_install_sh
2310   fi
2311 fi
2312 echo "$as_me:2312: result: $INSTALL" >&5
2313 echo "${ECHO_T}$INSTALL" >&6
2314
2315 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2316 # It thinks the first close brace ends the variable substitution.
2317 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2318
2319 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2320
2321 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2322
2323 echo "$as_me:2323: checking whether ln -s works" >&5
2324 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2325 LN_S=$as_ln_s
2326 if test "$LN_S" = "ln -s"; then
2327   echo "$as_me:2327: result: yes" >&5
2328 echo "${ECHO_T}yes" >&6
2329 else
2330   echo "$as_me:2330: result: no, using $LN_S" >&5
2331 echo "${ECHO_T}no, using $LN_S" >&6
2332 fi
2333
2334 echo "$as_me:2334: checking if $LN_S -f options work" >&5
2335 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2336
2337 rm -f conf$$.src conf$$dst
2338 echo >conf$$.dst
2339 echo first >conf$$.src
2340 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2341         cf_prog_ln_sf=yes
2342 else
2343         cf_prog_ln_sf=no
2344 fi
2345 rm -f conf$$.dst conf$$src
2346 echo "$as_me:2346: result: $cf_prog_ln_sf" >&5
2347 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2348
2349 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2350
2351 echo "$as_me:2351: checking for long file names" >&5
2352 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2353 if test "${ac_cv_sys_long_file_names+set}" = set; then
2354   echo $ECHO_N "(cached) $ECHO_C" >&6
2355 else
2356   ac_cv_sys_long_file_names=yes
2357 # Test for long file names in all the places we know might matter:
2358 #      .                the current directory, where building will happen
2359 #      $prefix/lib      where we will be installing things
2360 #      $exec_prefix/lib likewise
2361 # eval it to expand exec_prefix.
2362 #      $TMPDIR          if set, where it might want to write temporary files
2363 # if $TMPDIR is not set:
2364 #      /tmp             where it might want to write temporary files
2365 #      /var/tmp         likewise
2366 #      /usr/tmp         likewise
2367 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2368   ac_tmpdirs=$TMPDIR
2369 else
2370   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2371 fi
2372 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2373   test -d $ac_dir || continue
2374   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2375   ac_xdir=$ac_dir/cf$$
2376   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2377   ac_tf1=$ac_xdir/conftest9012345
2378   ac_tf2=$ac_xdir/conftest9012346
2379   (echo 1 >$ac_tf1) 2>/dev/null
2380   (echo 2 >$ac_tf2) 2>/dev/null
2381   ac_val=`cat $ac_tf1 2>/dev/null`
2382   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2383     ac_cv_sys_long_file_names=no
2384     rm -rf $ac_xdir 2>/dev/null
2385     break
2386   fi
2387   rm -rf $ac_xdir 2>/dev/null
2388 done
2389 fi
2390 echo "$as_me:2390: result: $ac_cv_sys_long_file_names" >&5
2391 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2392 if test $ac_cv_sys_long_file_names = yes; then
2393
2394 cat >>confdefs.h <<\EOF
2395 #define HAVE_LONG_FILE_NAMES 1
2396 EOF
2397
2398 fi
2399
2400 # if we find pkg-config, check if we should install the ".pc" files.
2401
2402 echo "$as_me:2402: checking if you want to use pkg-config" >&5
2403 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2404
2405 # Check whether --with-pkg-config or --without-pkg-config was given.
2406 if test "${with_pkg_config+set}" = set; then
2407   withval="$with_pkg_config"
2408   cf_pkg_config=$withval
2409 else
2410   cf_pkg_config=yes
2411 fi;
2412 echo "$as_me:2412: result: $cf_pkg_config" >&5
2413 echo "${ECHO_T}$cf_pkg_config" >&6
2414
2415 case $cf_pkg_config in #(vi
2416 no) #(vi
2417         PKG_CONFIG=none
2418         ;;
2419 yes) #(vi
2420
2421 if test -n "$ac_tool_prefix"; then
2422   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2423 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2424 echo "$as_me:2424: checking for $ac_word" >&5
2425 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2426 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2427   echo $ECHO_N "(cached) $ECHO_C" >&6
2428 else
2429   case $PKG_CONFIG in
2430   [\\/]* | ?:[\\/]*)
2431   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2432   ;;
2433   *)
2434   ac_save_IFS=$IFS; IFS=$ac_path_separator
2435 ac_dummy="$PATH"
2436 for ac_dir in $ac_dummy; do
2437   IFS=$ac_save_IFS
2438   test -z "$ac_dir" && ac_dir=.
2439   if $as_executable_p "$ac_dir/$ac_word"; then
2440    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2441    echo "$as_me:2441: found $ac_dir/$ac_word" >&5
2442    break
2443 fi
2444 done
2445
2446   ;;
2447 esac
2448 fi
2449 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2450
2451 if test -n "$PKG_CONFIG"; then
2452   echo "$as_me:2452: result: $PKG_CONFIG" >&5
2453 echo "${ECHO_T}$PKG_CONFIG" >&6
2454 else
2455   echo "$as_me:2455: result: no" >&5
2456 echo "${ECHO_T}no" >&6
2457 fi
2458
2459 fi
2460 if test -z "$ac_cv_path_PKG_CONFIG"; then
2461   ac_pt_PKG_CONFIG=$PKG_CONFIG
2462   # Extract the first word of "pkg-config", so it can be a program name with args.
2463 set dummy pkg-config; ac_word=$2
2464 echo "$as_me:2464: checking for $ac_word" >&5
2465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2466 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2467   echo $ECHO_N "(cached) $ECHO_C" >&6
2468 else
2469   case $ac_pt_PKG_CONFIG in
2470   [\\/]* | ?:[\\/]*)
2471   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2472   ;;
2473   *)
2474   ac_save_IFS=$IFS; IFS=$ac_path_separator
2475 ac_dummy="$PATH"
2476 for ac_dir in $ac_dummy; do
2477   IFS=$ac_save_IFS
2478   test -z "$ac_dir" && ac_dir=.
2479   if $as_executable_p "$ac_dir/$ac_word"; then
2480    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2481    echo "$as_me:2481: found $ac_dir/$ac_word" >&5
2482    break
2483 fi
2484 done
2485
2486   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2487   ;;
2488 esac
2489 fi
2490 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2491
2492 if test -n "$ac_pt_PKG_CONFIG"; then
2493   echo "$as_me:2493: result: $ac_pt_PKG_CONFIG" >&5
2494 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2495 else
2496   echo "$as_me:2496: result: no" >&5
2497 echo "${ECHO_T}no" >&6
2498 fi
2499
2500   PKG_CONFIG=$ac_pt_PKG_CONFIG
2501 else
2502   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2503 fi
2504
2505         ;;
2506 *)
2507         PKG_CONFIG=$withval
2508         ;;
2509 esac
2510
2511 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2512 if test "$PKG_CONFIG" != none ; then
2513
2514 if test "x$prefix" != xNONE; then
2515   cf_path_syntax="$prefix"
2516 else
2517   cf_path_syntax="$ac_default_prefix"
2518 fi
2519
2520 case ".$PKG_CONFIG" in #(vi
2521 .\$\(*\)*|.\'*\'*) #(vi
2522   ;;
2523 ..|./*|.\\*) #(vi
2524   ;;
2525 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2526   ;;
2527 .\${*prefix}*|.\${*dir}*) #(vi
2528   eval PKG_CONFIG="$PKG_CONFIG"
2529   case ".$PKG_CONFIG" in #(vi
2530   .NONE/*)
2531     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2532     ;;
2533   esac
2534   ;; #(vi
2535 .no|.NONE/*)
2536   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2537   ;;
2538 *)
2539   { { echo "$as_me:2539: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2540 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2541    { (exit 1); exit 1; }; }
2542   ;;
2543 esac
2544
2545 fi
2546
2547 if test "$PKG_CONFIG" != none ; then
2548         echo "$as_me:2548: checking for $PKG_CONFIG library directory" >&5
2549 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2550
2551 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2552 if test "${with_pkg_config_libdir+set}" = set; then
2553   withval="$with_pkg_config_libdir"
2554   PKG_CONFIG_LIBDIR=$withval
2555 else
2556   PKG_CONFIG_LIBDIR=yes
2557 fi;
2558
2559         case x$PKG_CONFIG_LIBDIR in #(vi
2560         x/*) #(vi
2561                 ;;
2562         xyes) #(vi
2563                 # look for the library directory using the same prefix as the executable
2564                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2565                 case x`(arch) 2>/dev/null` in #(vi
2566                 *64) #(vi
2567                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
2568                         do
2569                                 if test -d $cf_config/pkgconfig
2570                                 then
2571                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2572                                         break
2573                                 fi
2574                         done
2575                         ;;
2576                 *)
2577                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
2578                         ;;
2579                 esac
2580                 ;;
2581         *)
2582                 ;;
2583         esac
2584
2585         echo "$as_me:2585: result: $PKG_CONFIG_LIBDIR" >&5
2586 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2587 fi
2588
2589 echo "$as_me:2589: checking if you want to build test-programs" >&5
2590 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2591
2592 # Check whether --with-tests or --without-tests was given.
2593 if test "${with_tests+set}" = set; then
2594   withval="$with_tests"
2595   cf_with_tests=$withval
2596 else
2597   cf_with_tests=yes
2598 fi;
2599 echo "$as_me:2599: result: $cf_with_tests" >&5
2600 echo "${ECHO_T}$cf_with_tests" >&6
2601
2602 echo "$as_me:2602: checking if we should assume mixed-case filenames" >&5
2603 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2604
2605 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2606 if test "${enable_mixed_case+set}" = set; then
2607   enableval="$enable_mixed_case"
2608   enable_mixedcase=$enableval
2609 else
2610   enable_mixedcase=auto
2611 fi;
2612 echo "$as_me:2612: result: $enable_mixedcase" >&5
2613 echo "${ECHO_T}$enable_mixedcase" >&6
2614 if test "$enable_mixedcase" = "auto" ; then
2615
2616 echo "$as_me:2616: checking if filesystem supports mixed-case filenames" >&5
2617 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2618 if test "${cf_cv_mixedcase+set}" = set; then
2619   echo $ECHO_N "(cached) $ECHO_C" >&6
2620 else
2621
2622 if test "$cross_compiling" = yes ; then
2623         case $target_alias in #(vi
2624         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
2625                 cf_cv_mixedcase=no
2626                 ;;
2627         *)
2628                 cf_cv_mixedcase=yes
2629                 ;;
2630         esac
2631 else
2632         rm -f conftest CONFTEST
2633         echo test >conftest
2634         if test -f CONFTEST ; then
2635                 cf_cv_mixedcase=no
2636         else
2637                 cf_cv_mixedcase=yes
2638         fi
2639         rm -f conftest CONFTEST
2640 fi
2641
2642 fi
2643 echo "$as_me:2643: result: $cf_cv_mixedcase" >&5
2644 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2645 test "$cf_cv_mixedcase" = yes &&
2646 cat >>confdefs.h <<\EOF
2647 #define MIXEDCASE_FILENAMES 1
2648 EOF
2649
2650 else
2651     cf_cv_mixedcase=$enable_mixedcase
2652     if test "$enable_mixedcase" = "yes" ; then
2653         cat >>confdefs.h <<\EOF
2654 #define MIXEDCASE_FILENAMES 1
2655 EOF
2656
2657     fi
2658 fi
2659
2660 # do this after mixed-case option (tags/TAGS is not as important as tic).
2661 echo "$as_me:2661: checking whether ${MAKE-make} sets \${MAKE}" >&5
2662 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2663 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2664 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2665   echo $ECHO_N "(cached) $ECHO_C" >&6
2666 else
2667   cat >conftest.make <<\EOF
2668 all:
2669         @echo 'ac_maketemp="${MAKE}"'
2670 EOF
2671 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2672 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2673 if test -n "$ac_maketemp"; then
2674   eval ac_cv_prog_make_${ac_make}_set=yes
2675 else
2676   eval ac_cv_prog_make_${ac_make}_set=no
2677 fi
2678 rm -f conftest.make
2679 fi
2680 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2681   echo "$as_me:2681: result: yes" >&5
2682 echo "${ECHO_T}yes" >&6
2683   SET_MAKE=
2684 else
2685   echo "$as_me:2685: result: no" >&5
2686 echo "${ECHO_T}no" >&6
2687   SET_MAKE="MAKE=${MAKE-make}"
2688 fi
2689
2690 for ac_prog in exctags ctags
2691 do
2692   # Extract the first word of "$ac_prog", so it can be a program name with args.
2693 set dummy $ac_prog; ac_word=$2
2694 echo "$as_me:2694: checking for $ac_word" >&5
2695 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2696 if test "${ac_cv_prog_CTAGS+set}" = set; then
2697   echo $ECHO_N "(cached) $ECHO_C" >&6
2698 else
2699   if test -n "$CTAGS"; then
2700   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2701 else
2702   ac_save_IFS=$IFS; IFS=$ac_path_separator
2703 ac_dummy="$PATH"
2704 for ac_dir in $ac_dummy; do
2705   IFS=$ac_save_IFS
2706   test -z "$ac_dir" && ac_dir=.
2707   $as_executable_p "$ac_dir/$ac_word" || continue
2708 ac_cv_prog_CTAGS="$ac_prog"
2709 echo "$as_me:2709: found $ac_dir/$ac_word" >&5
2710 break
2711 done
2712
2713 fi
2714 fi
2715 CTAGS=$ac_cv_prog_CTAGS
2716 if test -n "$CTAGS"; then
2717   echo "$as_me:2717: result: $CTAGS" >&5
2718 echo "${ECHO_T}$CTAGS" >&6
2719 else
2720   echo "$as_me:2720: result: no" >&5
2721 echo "${ECHO_T}no" >&6
2722 fi
2723
2724   test -n "$CTAGS" && break
2725 done
2726
2727 for ac_prog in exetags etags
2728 do
2729   # Extract the first word of "$ac_prog", so it can be a program name with args.
2730 set dummy $ac_prog; ac_word=$2
2731 echo "$as_me:2731: checking for $ac_word" >&5
2732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733 if test "${ac_cv_prog_ETAGS+set}" = set; then
2734   echo $ECHO_N "(cached) $ECHO_C" >&6
2735 else
2736   if test -n "$ETAGS"; then
2737   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2738 else
2739   ac_save_IFS=$IFS; IFS=$ac_path_separator
2740 ac_dummy="$PATH"
2741 for ac_dir in $ac_dummy; do
2742   IFS=$ac_save_IFS
2743   test -z "$ac_dir" && ac_dir=.
2744   $as_executable_p "$ac_dir/$ac_word" || continue
2745 ac_cv_prog_ETAGS="$ac_prog"
2746 echo "$as_me:2746: found $ac_dir/$ac_word" >&5
2747 break
2748 done
2749
2750 fi
2751 fi
2752 ETAGS=$ac_cv_prog_ETAGS
2753 if test -n "$ETAGS"; then
2754   echo "$as_me:2754: result: $ETAGS" >&5
2755 echo "${ECHO_T}$ETAGS" >&6
2756 else
2757   echo "$as_me:2757: result: no" >&5
2758 echo "${ECHO_T}no" >&6
2759 fi
2760
2761   test -n "$ETAGS" && break
2762 done
2763
2764 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2765 set dummy ${CTAGS:-ctags}; ac_word=$2
2766 echo "$as_me:2766: checking for $ac_word" >&5
2767 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2768 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2769   echo $ECHO_N "(cached) $ECHO_C" >&6
2770 else
2771   if test -n "$MAKE_LOWER_TAGS"; then
2772   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2773 else
2774   ac_save_IFS=$IFS; IFS=$ac_path_separator
2775 ac_dummy="$PATH"
2776 for ac_dir in $ac_dummy; do
2777   IFS=$ac_save_IFS
2778   test -z "$ac_dir" && ac_dir=.
2779   $as_executable_p "$ac_dir/$ac_word" || continue
2780 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2781 echo "$as_me:2781: found $ac_dir/$ac_word" >&5
2782 break
2783 done
2784
2785   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2786 fi
2787 fi
2788 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2789 if test -n "$MAKE_LOWER_TAGS"; then
2790   echo "$as_me:2790: result: $MAKE_LOWER_TAGS" >&5
2791 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2792 else
2793   echo "$as_me:2793: result: no" >&5
2794 echo "${ECHO_T}no" >&6
2795 fi
2796
2797 if test "$cf_cv_mixedcase" = yes ; then
2798         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2799 set dummy ${ETAGS:-etags}; ac_word=$2
2800 echo "$as_me:2800: checking for $ac_word" >&5
2801 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2802 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2803   echo $ECHO_N "(cached) $ECHO_C" >&6
2804 else
2805   if test -n "$MAKE_UPPER_TAGS"; then
2806   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2807 else
2808   ac_save_IFS=$IFS; IFS=$ac_path_separator
2809 ac_dummy="$PATH"
2810 for ac_dir in $ac_dummy; do
2811   IFS=$ac_save_IFS
2812   test -z "$ac_dir" && ac_dir=.
2813   $as_executable_p "$ac_dir/$ac_word" || continue
2814 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2815 echo "$as_me:2815: found $ac_dir/$ac_word" >&5
2816 break
2817 done
2818
2819   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2820 fi
2821 fi
2822 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2823 if test -n "$MAKE_UPPER_TAGS"; then
2824   echo "$as_me:2824: result: $MAKE_UPPER_TAGS" >&5
2825 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2826 else
2827   echo "$as_me:2827: result: no" >&5
2828 echo "${ECHO_T}no" >&6
2829 fi
2830
2831 else
2832         MAKE_UPPER_TAGS=no
2833 fi
2834
2835 if test "$MAKE_UPPER_TAGS" = yes ; then
2836         MAKE_UPPER_TAGS=
2837 else
2838         MAKE_UPPER_TAGS="#"
2839 fi
2840
2841 if test "$MAKE_LOWER_TAGS" = yes ; then
2842         MAKE_LOWER_TAGS=
2843 else
2844         MAKE_LOWER_TAGS="#"
2845 fi
2846
2847 echo "$as_me:2847: checking for makeflags variable" >&5
2848 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2849 if test "${cf_cv_makeflags+set}" = set; then
2850   echo $ECHO_N "(cached) $ECHO_C" >&6
2851 else
2852
2853         cf_cv_makeflags=''
2854         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2855         do
2856                 cat >cf_makeflags.tmp <<CF_EOF
2857 SHELL = /bin/sh
2858 all :
2859         @ echo '.$cf_option'
2860 CF_EOF
2861                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
2862                 case "$cf_result" in
2863                 .*k|.*kw)
2864                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2865                         case "$cf_result" in
2866                         .*CC=*) cf_cv_makeflags=
2867                                 ;;
2868                         *)      cf_cv_makeflags=$cf_option
2869                                 ;;
2870                         esac
2871                         break
2872                         ;;
2873                 .-)     ;;
2874                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
2875                         ;;
2876                 esac
2877         done
2878         rm -f cf_makeflags.tmp
2879
2880 fi
2881 echo "$as_me:2881: result: $cf_cv_makeflags" >&5
2882 echo "${ECHO_T}$cf_cv_makeflags" >&6
2883
2884 if test -n "$ac_tool_prefix"; then
2885   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2886 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2887 echo "$as_me:2887: checking for $ac_word" >&5
2888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2889 if test "${ac_cv_prog_RANLIB+set}" = set; then
2890   echo $ECHO_N "(cached) $ECHO_C" >&6
2891 else
2892   if test -n "$RANLIB"; then
2893   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2894 else
2895   ac_save_IFS=$IFS; IFS=$ac_path_separator
2896 ac_dummy="$PATH"
2897 for ac_dir in $ac_dummy; do
2898   IFS=$ac_save_IFS
2899   test -z "$ac_dir" && ac_dir=.
2900   $as_executable_p "$ac_dir/$ac_word" || continue
2901 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2902 echo "$as_me:2902: found $ac_dir/$ac_word" >&5
2903 break
2904 done
2905
2906 fi
2907 fi
2908 RANLIB=$ac_cv_prog_RANLIB
2909 if test -n "$RANLIB"; then
2910   echo "$as_me:2910: result: $RANLIB" >&5
2911 echo "${ECHO_T}$RANLIB" >&6
2912 else
2913   echo "$as_me:2913: result: no" >&5
2914 echo "${ECHO_T}no" >&6
2915 fi
2916
2917 fi
2918 if test -z "$ac_cv_prog_RANLIB"; then
2919   ac_ct_RANLIB=$RANLIB
2920   # Extract the first word of "ranlib", so it can be a program name with args.
2921 set dummy ranlib; ac_word=$2
2922 echo "$as_me:2922: checking for $ac_word" >&5
2923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2924 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2925   echo $ECHO_N "(cached) $ECHO_C" >&6
2926 else
2927   if test -n "$ac_ct_RANLIB"; then
2928   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2929 else
2930   ac_save_IFS=$IFS; IFS=$ac_path_separator
2931 ac_dummy="$PATH"
2932 for ac_dir in $ac_dummy; do
2933   IFS=$ac_save_IFS
2934   test -z "$ac_dir" && ac_dir=.
2935   $as_executable_p "$ac_dir/$ac_word" || continue
2936 ac_cv_prog_ac_ct_RANLIB="ranlib"
2937 echo "$as_me:2937: found $ac_dir/$ac_word" >&5
2938 break
2939 done
2940
2941   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
2942 fi
2943 fi
2944 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2945 if test -n "$ac_ct_RANLIB"; then
2946   echo "$as_me:2946: result: $ac_ct_RANLIB" >&5
2947 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2948 else
2949   echo "$as_me:2949: result: no" >&5
2950 echo "${ECHO_T}no" >&6
2951 fi
2952
2953   RANLIB=$ac_ct_RANLIB
2954 else
2955   RANLIB="$ac_cv_prog_RANLIB"
2956 fi
2957
2958 if test -n "$ac_tool_prefix"; then
2959   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
2960 set dummy ${ac_tool_prefix}ld; ac_word=$2
2961 echo "$as_me:2961: checking for $ac_word" >&5
2962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2963 if test "${ac_cv_prog_LD+set}" = set; then
2964   echo $ECHO_N "(cached) $ECHO_C" >&6
2965 else
2966   if test -n "$LD"; then
2967   ac_cv_prog_LD="$LD" # Let the user override the test.
2968 else
2969   ac_save_IFS=$IFS; IFS=$ac_path_separator
2970 ac_dummy="$PATH"
2971 for ac_dir in $ac_dummy; do
2972   IFS=$ac_save_IFS
2973   test -z "$ac_dir" && ac_dir=.
2974   $as_executable_p "$ac_dir/$ac_word" || continue
2975 ac_cv_prog_LD="${ac_tool_prefix}ld"
2976 echo "$as_me:2976: found $ac_dir/$ac_word" >&5
2977 break
2978 done
2979
2980 fi
2981 fi
2982 LD=$ac_cv_prog_LD
2983 if test -n "$LD"; then
2984   echo "$as_me:2984: result: $LD" >&5
2985 echo "${ECHO_T}$LD" >&6
2986 else
2987   echo "$as_me:2987: result: no" >&5
2988 echo "${ECHO_T}no" >&6
2989 fi
2990
2991 fi
2992 if test -z "$ac_cv_prog_LD"; then
2993   ac_ct_LD=$LD
2994   # Extract the first word of "ld", so it can be a program name with args.
2995 set dummy ld; ac_word=$2
2996 echo "$as_me:2996: checking for $ac_word" >&5
2997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2998 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   if test -n "$ac_ct_LD"; then
3002   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3003 else
3004   ac_save_IFS=$IFS; IFS=$ac_path_separator
3005 ac_dummy="$PATH"
3006 for ac_dir in $ac_dummy; do
3007   IFS=$ac_save_IFS
3008   test -z "$ac_dir" && ac_dir=.
3009   $as_executable_p "$ac_dir/$ac_word" || continue
3010 ac_cv_prog_ac_ct_LD="ld"
3011 echo "$as_me:3011: found $ac_dir/$ac_word" >&5
3012 break
3013 done
3014
3015   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3016 fi
3017 fi
3018 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3019 if test -n "$ac_ct_LD"; then
3020   echo "$as_me:3020: result: $ac_ct_LD" >&5
3021 echo "${ECHO_T}$ac_ct_LD" >&6
3022 else
3023   echo "$as_me:3023: result: no" >&5
3024 echo "${ECHO_T}no" >&6
3025 fi
3026
3027   LD=$ac_ct_LD
3028 else
3029   LD="$ac_cv_prog_LD"
3030 fi
3031
3032 if test -n "$ac_tool_prefix"; then
3033   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3034 set dummy ${ac_tool_prefix}ar; ac_word=$2
3035 echo "$as_me:3035: checking for $ac_word" >&5
3036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3037 if test "${ac_cv_prog_AR+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040   if test -n "$AR"; then
3041   ac_cv_prog_AR="$AR" # Let the user override the test.
3042 else
3043   ac_save_IFS=$IFS; IFS=$ac_path_separator
3044 ac_dummy="$PATH"
3045 for ac_dir in $ac_dummy; do
3046   IFS=$ac_save_IFS
3047   test -z "$ac_dir" && ac_dir=.
3048   $as_executable_p "$ac_dir/$ac_word" || continue
3049 ac_cv_prog_AR="${ac_tool_prefix}ar"
3050 echo "$as_me:3050: found $ac_dir/$ac_word" >&5
3051 break
3052 done
3053
3054 fi
3055 fi
3056 AR=$ac_cv_prog_AR
3057 if test -n "$AR"; then
3058   echo "$as_me:3058: result: $AR" >&5
3059 echo "${ECHO_T}$AR" >&6
3060 else
3061   echo "$as_me:3061: result: no" >&5
3062 echo "${ECHO_T}no" >&6
3063 fi
3064
3065 fi
3066 if test -z "$ac_cv_prog_AR"; then
3067   ac_ct_AR=$AR
3068   # Extract the first word of "ar", so it can be a program name with args.
3069 set dummy ar; ac_word=$2
3070 echo "$as_me:3070: checking for $ac_word" >&5
3071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3072 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3073   echo $ECHO_N "(cached) $ECHO_C" >&6
3074 else
3075   if test -n "$ac_ct_AR"; then
3076   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3077 else
3078   ac_save_IFS=$IFS; IFS=$ac_path_separator
3079 ac_dummy="$PATH"
3080 for ac_dir in $ac_dummy; do
3081   IFS=$ac_save_IFS
3082   test -z "$ac_dir" && ac_dir=.
3083   $as_executable_p "$ac_dir/$ac_word" || continue
3084 ac_cv_prog_ac_ct_AR="ar"
3085 echo "$as_me:3085: found $ac_dir/$ac_word" >&5
3086 break
3087 done
3088
3089   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3090 fi
3091 fi
3092 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3093 if test -n "$ac_ct_AR"; then
3094   echo "$as_me:3094: result: $ac_ct_AR" >&5
3095 echo "${ECHO_T}$ac_ct_AR" >&6
3096 else
3097   echo "$as_me:3097: result: no" >&5
3098 echo "${ECHO_T}no" >&6
3099 fi
3100
3101   AR=$ac_ct_AR
3102 else
3103   AR="$ac_cv_prog_AR"
3104 fi
3105
3106 if test -n "$ac_tool_prefix"; then
3107   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3108 set dummy ${ac_tool_prefix}ar; ac_word=$2
3109 echo "$as_me:3109: checking for $ac_word" >&5
3110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3111 if test "${ac_cv_prog_AR+set}" = set; then
3112   echo $ECHO_N "(cached) $ECHO_C" >&6
3113 else
3114   if test -n "$AR"; then
3115   ac_cv_prog_AR="$AR" # Let the user override the test.
3116 else
3117   ac_save_IFS=$IFS; IFS=$ac_path_separator
3118 ac_dummy="$PATH"
3119 for ac_dir in $ac_dummy; do
3120   IFS=$ac_save_IFS
3121   test -z "$ac_dir" && ac_dir=.
3122   $as_executable_p "$ac_dir/$ac_word" || continue
3123 ac_cv_prog_AR="${ac_tool_prefix}ar"
3124 echo "$as_me:3124: found $ac_dir/$ac_word" >&5
3125 break
3126 done
3127
3128 fi
3129 fi
3130 AR=$ac_cv_prog_AR
3131 if test -n "$AR"; then
3132   echo "$as_me:3132: result: $AR" >&5
3133 echo "${ECHO_T}$AR" >&6
3134 else
3135   echo "$as_me:3135: result: no" >&5
3136 echo "${ECHO_T}no" >&6
3137 fi
3138
3139 fi
3140 if test -z "$ac_cv_prog_AR"; then
3141   ac_ct_AR=$AR
3142   # Extract the first word of "ar", so it can be a program name with args.
3143 set dummy ar; ac_word=$2
3144 echo "$as_me:3144: checking for $ac_word" >&5
3145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3147   echo $ECHO_N "(cached) $ECHO_C" >&6
3148 else
3149   if test -n "$ac_ct_AR"; then
3150   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3151 else
3152   ac_save_IFS=$IFS; IFS=$ac_path_separator
3153 ac_dummy="$PATH"
3154 for ac_dir in $ac_dummy; do
3155   IFS=$ac_save_IFS
3156   test -z "$ac_dir" && ac_dir=.
3157   $as_executable_p "$ac_dir/$ac_word" || continue
3158 ac_cv_prog_ac_ct_AR="ar"
3159 echo "$as_me:3159: found $ac_dir/$ac_word" >&5
3160 break
3161 done
3162
3163   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3164 fi
3165 fi
3166 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3167 if test -n "$ac_ct_AR"; then
3168   echo "$as_me:3168: result: $ac_ct_AR" >&5
3169 echo "${ECHO_T}$ac_ct_AR" >&6
3170 else
3171   echo "$as_me:3171: result: no" >&5
3172 echo "${ECHO_T}no" >&6
3173 fi
3174
3175   AR=$ac_ct_AR
3176 else
3177   AR="$ac_cv_prog_AR"
3178 fi
3179
3180 echo "$as_me:3180: checking for options to update archives" >&5
3181 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3182 if test "${cf_cv_ar_flags+set}" = set; then
3183   echo $ECHO_N "(cached) $ECHO_C" >&6
3184 else
3185
3186         cf_cv_ar_flags=unknown
3187         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3188         do
3189
3190                 # check if $ARFLAGS already contains this choice
3191                 if test "x$ARFLAGS" != "x" ; then
3192                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3193                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3194                                 cf_cv_ar_flags=
3195                                 break
3196                         fi
3197                 fi
3198
3199                 rm -f conftest.$ac_cv_objext
3200                 rm -f conftest.a
3201
3202                 cat >conftest.$ac_ext <<EOF
3203 #line 3203 "configure"
3204 int     testdata[3] = { 123, 456, 789 };
3205 EOF
3206                 if { (eval echo "$as_me:3206: \"$ac_compile\"") >&5
3207   (eval $ac_compile) 2>&5
3208   ac_status=$?
3209   echo "$as_me:3209: \$? = $ac_status" >&5
3210   (exit $ac_status); } ; then
3211                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3212                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3213                         if test -f conftest.a ; then
3214                                 cf_cv_ar_flags=$cf_ar_flags
3215                                 break
3216                         fi
3217                 else
3218                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3219
3220 echo "${as_me:-configure}:3220: testing cannot compile test-program ..." 1>&5
3221
3222                         break
3223                 fi
3224         done
3225         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3226
3227 fi
3228 echo "$as_me:3228: result: $cf_cv_ar_flags" >&5
3229 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3230
3231 if test -n "$ARFLAGS" ; then
3232         if test -n "$cf_cv_ar_flags" ; then
3233                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3234         fi
3235 else
3236         ARFLAGS=$cf_cv_ar_flags
3237 fi
3238
3239         echo "$as_me:3239: checking for PATH separator" >&5
3240 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3241         case $cf_cv_system_name in
3242         os2*)   PATH_SEPARATOR=';'  ;;
3243         *)      ${PATH_SEPARATOR:=':'}  ;;
3244         esac
3245
3246         echo "$as_me:3246: result: $PATH_SEPARATOR" >&5
3247 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3248
3249 echo "$as_me:3249: checking if you have specified an install-prefix" >&5
3250 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3251
3252 # Check whether --with-install-prefix or --without-install-prefix was given.
3253 if test "${with_install_prefix+set}" = set; then
3254   withval="$with_install_prefix"
3255   case "$withval" in #(vi
3256         yes|no) #(vi
3257                 ;;
3258         *)      DESTDIR="$withval"
3259                 ;;
3260         esac
3261 fi;
3262 echo "$as_me:3262: result: $DESTDIR" >&5
3263 echo "${ECHO_T}$DESTDIR" >&6
3264
3265 ###############################################################################
3266
3267 # If we're cross-compiling, allow the user to override the tools and their
3268 # options.  The configure script is oriented toward identifying the host
3269 # compiler, etc., but we need a build compiler to generate parts of the source.
3270
3271 if test "$cross_compiling" = yes ; then
3272
3273         # defaults that we might want to override
3274         : ${BUILD_CFLAGS:=''}
3275         : ${BUILD_CPPFLAGS:=''}
3276         : ${BUILD_LDFLAGS:=''}
3277         : ${BUILD_LIBS:=''}
3278         : ${BUILD_EXEEXT:='$x'}
3279         : ${BUILD_OBJEXT:='o'}
3280
3281 # Check whether --with-build-cc or --without-build-cc was given.
3282 if test "${with_build_cc+set}" = set; then
3283   withval="$with_build_cc"
3284   BUILD_CC="$withval"
3285 else
3286   for ac_prog in gcc cc cl
3287 do
3288   # Extract the first word of "$ac_prog", so it can be a program name with args.
3289 set dummy $ac_prog; ac_word=$2
3290 echo "$as_me:3290: checking for $ac_word" >&5
3291 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3292 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3293   echo $ECHO_N "(cached) $ECHO_C" >&6
3294 else
3295   if test -n "$BUILD_CC"; then
3296   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3297 else
3298   ac_save_IFS=$IFS; IFS=$ac_path_separator
3299 ac_dummy="$PATH"
3300 for ac_dir in $ac_dummy; do
3301   IFS=$ac_save_IFS
3302   test -z "$ac_dir" && ac_dir=.
3303   $as_executable_p "$ac_dir/$ac_word" || continue
3304 ac_cv_prog_BUILD_CC="$ac_prog"
3305 echo "$as_me:3305: found $ac_dir/$ac_word" >&5
3306 break
3307 done
3308
3309 fi
3310 fi
3311 BUILD_CC=$ac_cv_prog_BUILD_CC
3312 if test -n "$BUILD_CC"; then
3313   echo "$as_me:3313: result: $BUILD_CC" >&5
3314 echo "${ECHO_T}$BUILD_CC" >&6
3315 else
3316   echo "$as_me:3316: result: no" >&5
3317 echo "${ECHO_T}no" >&6
3318 fi
3319
3320   test -n "$BUILD_CC" && break
3321 done
3322
3323 fi;
3324         echo "$as_me:3324: checking for native build C compiler" >&5
3325 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3326         echo "$as_me:3326: result: $BUILD_CC" >&5
3327 echo "${ECHO_T}$BUILD_CC" >&6
3328
3329         echo "$as_me:3329: checking for native build C preprocessor" >&5
3330 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3331
3332 # Check whether --with-build-cpp or --without-build-cpp was given.
3333 if test "${with_build_cpp+set}" = set; then
3334   withval="$with_build_cpp"
3335   BUILD_CPP="$withval"
3336 else
3337   BUILD_CPP='${BUILD_CC} -E'
3338 fi;
3339         echo "$as_me:3339: result: $BUILD_CPP" >&5
3340 echo "${ECHO_T}$BUILD_CPP" >&6
3341
3342         echo "$as_me:3342: checking for native build C flags" >&5
3343 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3344
3345 # Check whether --with-build-cflags or --without-build-cflags was given.
3346 if test "${with_build_cflags+set}" = set; then
3347   withval="$with_build_cflags"
3348   BUILD_CFLAGS="$withval"
3349 fi;
3350         echo "$as_me:3350: result: $BUILD_CFLAGS" >&5
3351 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3352
3353         echo "$as_me:3353: checking for native build C preprocessor-flags" >&5
3354 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3355
3356 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3357 if test "${with_build_cppflags+set}" = set; then
3358   withval="$with_build_cppflags"
3359   BUILD_CPPFLAGS="$withval"
3360 fi;
3361         echo "$as_me:3361: result: $BUILD_CPPFLAGS" >&5
3362 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3363
3364         echo "$as_me:3364: checking for native build linker-flags" >&5
3365 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3366
3367 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3368 if test "${with_build_ldflags+set}" = set; then
3369   withval="$with_build_ldflags"
3370   BUILD_LDFLAGS="$withval"
3371 fi;
3372         echo "$as_me:3372: result: $BUILD_LDFLAGS" >&5
3373 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3374
3375         echo "$as_me:3375: checking for native build linker-libraries" >&5
3376 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3377
3378 # Check whether --with-build-libs or --without-build-libs was given.
3379 if test "${with_build_libs+set}" = set; then
3380   withval="$with_build_libs"
3381   BUILD_LIBS="$withval"
3382 fi;
3383         echo "$as_me:3383: result: $BUILD_LIBS" >&5
3384 echo "${ECHO_T}$BUILD_LIBS" >&6
3385
3386         # this assumes we're on Unix.
3387         BUILD_EXEEXT=
3388         BUILD_OBJEXT=o
3389
3390         : ${BUILD_CC:='${CC}'}
3391
3392         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3393                 { { echo "$as_me:3393: error: Cross-build requires two compilers.
3394 Use --with-build-cc to specify the native compiler." >&5
3395 echo "$as_me: error: Cross-build requires two compilers.
3396 Use --with-build-cc to specify the native compiler." >&2;}
3397    { (exit 1); exit 1; }; }
3398         fi
3399
3400 else
3401         : ${BUILD_CC:='${CC}'}
3402         : ${BUILD_CPP:='${CPP}'}
3403         : ${BUILD_CFLAGS:='${CFLAGS}'}
3404         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3405         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3406         : ${BUILD_LIBS:='${LIBS}'}
3407         : ${BUILD_EXEEXT:='$x'}
3408         : ${BUILD_OBJEXT:='o'}
3409 fi
3410
3411 ###############################################################################
3412
3413 ### Options to allow the user to specify the set of libraries which are used.
3414 ### Use "--without-normal --with-shared" to allow the default model to be
3415 ### shared, for example.
3416 cf_list_models=""
3417
3418 echo "$as_me:3418: checking if you want to build shared C-objects" >&5
3419 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3420
3421 # Check whether --with-shared or --without-shared was given.
3422 if test "${with_shared+set}" = set; then
3423   withval="$with_shared"
3424   with_shared=$withval
3425 else
3426   with_shared=no
3427 fi;
3428 echo "$as_me:3428: result: $with_shared" >&5
3429 echo "${ECHO_T}$with_shared" >&6
3430 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3431
3432 echo "$as_me:3432: checking for specified models" >&5
3433 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3434 test -z "$cf_list_models" && cf_list_models=normal
3435 echo "$as_me:3435: result: $cf_list_models" >&5
3436 echo "${ECHO_T}$cf_list_models" >&6
3437
3438 ### Use the first model as the default, and save its suffix for use in building
3439 ### up test-applications.
3440 echo "$as_me:3440: checking for default model" >&5
3441 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3442 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3443 echo "$as_me:3443: result: $DFT_LWR_MODEL" >&5
3444 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3445
3446 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3447
3448 echo "$as_me:3448: checking for specific curses-directory" >&5
3449 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3450
3451 # Check whether --with-curses-dir or --without-curses-dir was given.
3452 if test "${with_curses_dir+set}" = set; then
3453   withval="$with_curses_dir"
3454   cf_cv_curses_dir=$withval
3455 else
3456   cf_cv_curses_dir=no
3457 fi;
3458 echo "$as_me:3458: result: $cf_cv_curses_dir" >&5
3459 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3460
3461 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3462 then
3463
3464 if test "x$prefix" != xNONE; then
3465   cf_path_syntax="$prefix"
3466 else
3467   cf_path_syntax="$ac_default_prefix"
3468 fi
3469
3470 case ".$withval" in #(vi
3471 .\$\(*\)*|.\'*\'*) #(vi
3472   ;;
3473 ..|./*|.\\*) #(vi
3474   ;;
3475 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3476   ;;
3477 .\${*prefix}*|.\${*dir}*) #(vi
3478   eval withval="$withval"
3479   case ".$withval" in #(vi
3480   .NONE/*)
3481     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3482     ;;
3483   esac
3484   ;; #(vi
3485 .no|.NONE/*)
3486   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3487   ;;
3488 *)
3489   { { echo "$as_me:3489: error: expected a pathname, not \"$withval\"" >&5
3490 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3491    { (exit 1); exit 1; }; }
3492   ;;
3493 esac
3494
3495         if test -d "$cf_cv_curses_dir"
3496         then
3497
3498 if test -n "$cf_cv_curses_dir/include" ; then
3499   for cf_add_incdir in $cf_cv_curses_dir/include
3500   do
3501         while test $cf_add_incdir != /usr/include
3502         do
3503           if test -d $cf_add_incdir
3504           then
3505                 cf_have_incdir=no
3506                 if test -n "$CFLAGS$CPPFLAGS" ; then
3507                   # a loop is needed to ensure we can add subdirs of existing dirs
3508                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3509                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3510                           cf_have_incdir=yes; break
3511                         fi
3512                   done
3513                 fi
3514
3515                 if test "$cf_have_incdir" = no ; then
3516                   if test "$cf_add_incdir" = /usr/local/include ; then
3517                         if test "$GCC" = yes
3518                         then
3519                           cf_save_CPPFLAGS=$CPPFLAGS
3520                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3521                           cat >conftest.$ac_ext <<_ACEOF
3522 #line 3522 "configure"
3523 #include "confdefs.h"
3524 #include <stdio.h>
3525 int
3526 main ()
3527 {
3528 printf("Hello")
3529   ;
3530   return 0;
3531 }
3532 _ACEOF
3533 rm -f conftest.$ac_objext
3534 if { (eval echo "$as_me:3534: \"$ac_compile\"") >&5
3535   (eval $ac_compile) 2>&5
3536   ac_status=$?
3537   echo "$as_me:3537: \$? = $ac_status" >&5
3538   (exit $ac_status); } &&
3539          { ac_try='test -s conftest.$ac_objext'
3540   { (eval echo "$as_me:3540: \"$ac_try\"") >&5
3541   (eval $ac_try) 2>&5
3542   ac_status=$?
3543   echo "$as_me:3543: \$? = $ac_status" >&5
3544   (exit $ac_status); }; }; then
3545   :
3546 else
3547   echo "$as_me: failed program was:" >&5
3548 cat conftest.$ac_ext >&5
3549 cf_have_incdir=yes
3550 fi
3551 rm -f conftest.$ac_objext conftest.$ac_ext
3552                           CPPFLAGS=$cf_save_CPPFLAGS
3553                         fi
3554                   fi
3555                 fi
3556
3557                 if test "$cf_have_incdir" = no ; then
3558                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3559
3560 echo "${as_me:-configure}:3560: testing adding $cf_add_incdir to include-path ..." 1>&5
3561
3562                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3563
3564                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3565                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3566                   cf_add_incdir="$cf_top_incdir"
3567                 else
3568                   break
3569                 fi
3570           fi
3571         done
3572   done
3573 fi
3574
3575 if test -n "$cf_cv_curses_dir/lib" ; then
3576   for cf_add_libdir in $cf_cv_curses_dir/lib
3577   do
3578     if test $cf_add_libdir = /usr/lib ; then
3579       :
3580     elif test -d $cf_add_libdir
3581     then
3582       cf_have_libdir=no
3583       if test -n "$LDFLAGS$LIBS" ; then
3584         # a loop is needed to ensure we can add subdirs of existing dirs
3585         for cf_test_libdir in $LDFLAGS $LIBS ; do
3586           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3587             cf_have_libdir=yes; break
3588           fi
3589         done
3590       fi
3591       if test "$cf_have_libdir" = no ; then
3592         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3593
3594 echo "${as_me:-configure}:3594: testing adding $cf_add_libdir to library-path ..." 1>&5
3595
3596         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3597       fi
3598     fi
3599   done
3600 fi
3601
3602         fi
3603 fi
3604
3605 echo "$as_me:3605: checking if you want wide-character code" >&5
3606 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3607
3608 # Check whether --enable-widec or --disable-widec was given.
3609 if test "${enable_widec+set}" = set; then
3610   enableval="$enable_widec"
3611   with_widec=$enableval
3612 else
3613   with_widec=no
3614 fi;
3615 echo "$as_me:3615: result: $with_widec" >&5
3616 echo "${ECHO_T}$with_widec" >&6
3617 if test "$with_widec" = yes ; then
3618
3619 echo "$as_me:3619: checking for multibyte character support" >&5
3620 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3621 if test "${cf_cv_utf8_lib+set}" = set; then
3622   echo $ECHO_N "(cached) $ECHO_C" >&6
3623 else
3624
3625         cf_save_LIBS="$LIBS"
3626         cat >conftest.$ac_ext <<_ACEOF
3627 #line 3627 "configure"
3628 #include "confdefs.h"
3629
3630 #include <stdlib.h>
3631 int
3632 main ()
3633 {
3634 putwc(0,0);
3635   ;
3636   return 0;
3637 }
3638 _ACEOF
3639 rm -f conftest.$ac_objext conftest$ac_exeext
3640 if { (eval echo "$as_me:3640: \"$ac_link\"") >&5
3641   (eval $ac_link) 2>&5
3642   ac_status=$?
3643   echo "$as_me:3643: \$? = $ac_status" >&5
3644   (exit $ac_status); } &&
3645          { ac_try='test -s conftest$ac_exeext'
3646   { (eval echo "$as_me:3646: \"$ac_try\"") >&5
3647   (eval $ac_try) 2>&5
3648   ac_status=$?
3649   echo "$as_me:3649: \$? = $ac_status" >&5
3650   (exit $ac_status); }; }; then
3651   cf_cv_utf8_lib=yes
3652 else
3653   echo "$as_me: failed program was:" >&5
3654 cat conftest.$ac_ext >&5
3655
3656 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3657 # will be set on completion of the AC_TRY_LINK below.
3658 cf_cv_header_path_utf8=
3659 cf_cv_library_path_utf8=
3660
3661 echo "${as_me:-configure}:3661: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3662
3663 cf_save_LIBS="$LIBS"
3664
3665 cat >conftest.$ac_ext <<_ACEOF
3666 #line 3666 "configure"
3667 #include "confdefs.h"
3668
3669 #include <libutf8.h>
3670 int
3671 main ()
3672 {
3673 putwc(0,0);
3674   ;
3675   return 0;
3676 }
3677 _ACEOF
3678 rm -f conftest.$ac_objext conftest$ac_exeext
3679 if { (eval echo "$as_me:3679: \"$ac_link\"") >&5
3680   (eval $ac_link) 2>&5
3681   ac_status=$?
3682   echo "$as_me:3682: \$? = $ac_status" >&5
3683   (exit $ac_status); } &&
3684          { ac_try='test -s conftest$ac_exeext'
3685   { (eval echo "$as_me:3685: \"$ac_try\"") >&5
3686   (eval $ac_try) 2>&5
3687   ac_status=$?
3688   echo "$as_me:3688: \$? = $ac_status" >&5
3689   (exit $ac_status); }; }; then
3690
3691         cf_cv_find_linkage_utf8=yes
3692         cf_cv_header_path_utf8=/usr/include
3693         cf_cv_library_path_utf8=/usr/lib
3694
3695 else
3696   echo "$as_me: failed program was:" >&5
3697 cat conftest.$ac_ext >&5
3698
3699 LIBS="-lutf8  $cf_save_LIBS"
3700
3701 cat >conftest.$ac_ext <<_ACEOF
3702 #line 3702 "configure"
3703 #include "confdefs.h"
3704
3705 #include <libutf8.h>
3706 int
3707 main ()
3708 {
3709 putwc(0,0);
3710   ;
3711   return 0;
3712 }
3713 _ACEOF
3714 rm -f conftest.$ac_objext conftest$ac_exeext
3715 if { (eval echo "$as_me:3715: \"$ac_link\"") >&5
3716   (eval $ac_link) 2>&5
3717   ac_status=$?
3718   echo "$as_me:3718: \$? = $ac_status" >&5
3719   (exit $ac_status); } &&
3720          { ac_try='test -s conftest$ac_exeext'
3721   { (eval echo "$as_me:3721: \"$ac_try\"") >&5
3722   (eval $ac_try) 2>&5
3723   ac_status=$?
3724   echo "$as_me:3724: \$? = $ac_status" >&5
3725   (exit $ac_status); }; }; then
3726
3727         cf_cv_find_linkage_utf8=yes
3728         cf_cv_header_path_utf8=/usr/include
3729         cf_cv_library_path_utf8=/usr/lib
3730         cf_cv_library_file_utf8="-lutf8"
3731
3732 else
3733   echo "$as_me: failed program was:" >&5
3734 cat conftest.$ac_ext >&5
3735
3736         cf_cv_find_linkage_utf8=no
3737         LIBS="$cf_save_LIBS"
3738
3739     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3740
3741 echo "${as_me:-configure}:3741: testing find linkage for utf8 library ..." 1>&5
3742
3743 echo "${as_me:-configure}:3743: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3744
3745     cf_save_CPPFLAGS="$CPPFLAGS"
3746     cf_test_CPPFLAGS="$CPPFLAGS"
3747
3748 cf_search=
3749
3750 # collect the current set of include-directories from compiler flags
3751 cf_header_path_list=""
3752 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3753         for cf_header_path in $CPPFLAGS $CFLAGS
3754         do
3755                 case $cf_header_path in #(vi
3756                 -I*)
3757                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3758
3759 test "x$cf_header_path" != "xNONE" && \
3760 test -d "$cf_header_path" && \
3761  {
3762         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
3763         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
3764         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
3765         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
3766         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
3767         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
3768 }
3769
3770                         cf_header_path_list="$cf_header_path_list $cf_search"
3771                         ;;
3772                 esac
3773         done
3774 fi
3775
3776 # add the variations for the package we are looking for
3777
3778 cf_search=
3779
3780 test "x$prefix" != "xNONE" && \
3781 test -d "$prefix" && \
3782  {
3783         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
3784         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
3785         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
3786         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
3787         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
3788         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
3789 }
3790
3791 for cf_subdir_prefix in \
3792         /usr \
3793         /usr/local \
3794         /usr/pkg \
3795         /opt \
3796         /opt/local \
3797         $HOME
3798 do
3799
3800 test "x$cf_subdir_prefix" != "x$prefix" && \
3801 test -d "$cf_subdir_prefix" && \
3802 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
3803         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
3804         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
3805         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
3806         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
3807         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
3808         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
3809 }
3810
3811 done
3812
3813 test "$includedir" != NONE && \
3814 test "$includedir" != "/usr/include" && \
3815 test -d "$includedir" && {
3816         test -d $includedir &&    cf_search="$cf_search $includedir"
3817         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
3818 }
3819
3820 test "$oldincludedir" != NONE && \
3821 test "$oldincludedir" != "/usr/include" && \
3822 test -d "$oldincludedir" && {
3823         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
3824         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
3825 }
3826
3827 cf_search="$cf_search $cf_header_path_list"
3828
3829     for cf_cv_header_path_utf8 in $cf_search
3830     do
3831       if test -d $cf_cv_header_path_utf8 ; then
3832         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
3833
3834 echo "${as_me:-configure}:3834: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
3835
3836         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
3837         cat >conftest.$ac_ext <<_ACEOF
3838 #line 3838 "configure"
3839 #include "confdefs.h"
3840
3841 #include <libutf8.h>
3842 int
3843 main ()
3844 {
3845 putwc(0,0);
3846   ;
3847   return 0;
3848 }
3849 _ACEOF
3850 rm -f conftest.$ac_objext
3851 if { (eval echo "$as_me:3851: \"$ac_compile\"") >&5
3852   (eval $ac_compile) 2>&5
3853   ac_status=$?
3854   echo "$as_me:3854: \$? = $ac_status" >&5
3855   (exit $ac_status); } &&
3856          { ac_try='test -s conftest.$ac_objext'
3857   { (eval echo "$as_me:3857: \"$ac_try\"") >&5
3858   (eval $ac_try) 2>&5
3859   ac_status=$?
3860   echo "$as_me:3860: \$? = $ac_status" >&5
3861   (exit $ac_status); }; }; then
3862
3863             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
3864
3865 echo "${as_me:-configure}:3865: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
3866
3867             cf_cv_find_linkage_utf8=maybe
3868             cf_test_CPPFLAGS="$CPPFLAGS"
3869             break
3870 else
3871   echo "$as_me: failed program was:" >&5
3872 cat conftest.$ac_ext >&5
3873
3874             CPPFLAGS="$cf_save_CPPFLAGS"
3875
3876 fi
3877 rm -f conftest.$ac_objext conftest.$ac_ext
3878       fi
3879     done
3880
3881     if test "$cf_cv_find_linkage_utf8" = maybe ; then
3882
3883 echo "${as_me:-configure}:3883: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
3884
3885       cf_save_LIBS="$LIBS"
3886       cf_save_LDFLAGS="$LDFLAGS"
3887
3888       if test "$cf_cv_find_linkage_utf8" != yes ; then
3889
3890 cf_search=
3891 cf_library_path_list=""
3892 if test -n "${LDFLAGS}${LIBS}" ; then
3893         for cf_library_path in $LDFLAGS $LIBS
3894         do
3895                 case $cf_library_path in #(vi
3896                 -L*)
3897                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
3898
3899 test "x$cf_library_path" != "xNONE" && \
3900 test -d "$cf_library_path" && \
3901  {
3902         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
3903         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
3904         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
3905         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
3906         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
3907         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
3908 }
3909
3910                         cf_library_path_list="$cf_library_path_list $cf_search"
3911                         ;;
3912                 esac
3913         done
3914 fi
3915
3916 cf_search=
3917
3918 test "x$prefix" != "xNONE" && \
3919 test -d "$prefix" && \
3920  {
3921         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
3922         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
3923         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
3924         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
3925         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
3926         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
3927 }
3928
3929 for cf_subdir_prefix in \
3930         /usr \
3931         /usr/local \
3932         /usr/pkg \
3933         /opt \
3934         /opt/local \
3935         $HOME
3936 do
3937
3938 test "x$cf_subdir_prefix" != "x$prefix" && \
3939 test -d "$cf_subdir_prefix" && \
3940 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
3941         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
3942         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
3943         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
3944         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
3945         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
3946         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
3947 }
3948
3949 done
3950
3951 cf_search="$cf_library_path_list $cf_search"
3952
3953         for cf_cv_library_path_utf8 in $cf_search
3954         do
3955           if test -d $cf_cv_library_path_utf8 ; then
3956             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
3957
3958 echo "${as_me:-configure}:3958: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
3959
3960             CPPFLAGS="$cf_test_CPPFLAGS"
3961             LIBS="-lutf8  $cf_save_LIBS"
3962             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
3963             cat >conftest.$ac_ext <<_ACEOF
3964 #line 3964 "configure"
3965 #include "confdefs.h"
3966
3967 #include <libutf8.h>
3968 int
3969 main ()
3970 {
3971 putwc(0,0);
3972   ;
3973   return 0;
3974 }
3975 _ACEOF
3976 rm -f conftest.$ac_objext conftest$ac_exeext
3977 if { (eval echo "$as_me:3977: \"$ac_link\"") >&5
3978   (eval $ac_link) 2>&5
3979   ac_status=$?
3980   echo "$as_me:3980: \$? = $ac_status" >&5
3981   (exit $ac_status); } &&
3982          { ac_try='test -s conftest$ac_exeext'
3983   { (eval echo "$as_me:3983: \"$ac_try\"") >&5
3984   (eval $ac_try) 2>&5
3985   ac_status=$?
3986   echo "$as_me:3986: \$? = $ac_status" >&5
3987   (exit $ac_status); }; }; then
3988
3989                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
3990
3991 echo "${as_me:-configure}:3991: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
3992
3993                 cf_cv_find_linkage_utf8=yes
3994                 cf_cv_library_file_utf8="-lutf8"
3995                 break
3996 else
3997   echo "$as_me: failed program was:" >&5
3998 cat conftest.$ac_ext >&5
3999
4000                 CPPFLAGS="$cf_save_CPPFLAGS"
4001                 LIBS="$cf_save_LIBS"
4002                 LDFLAGS="$cf_save_LDFLAGS"
4003
4004 fi
4005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4006           fi
4007         done
4008         CPPFLAGS="$cf_save_CPPFLAGS"
4009         LDFLAGS="$cf_save_LDFLAGS"
4010       fi
4011
4012     else
4013       cf_cv_find_linkage_utf8=no
4014     fi
4015
4016 fi
4017 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4018
4019 fi
4020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4021
4022 LIBS="$cf_save_LIBS"
4023
4024 if test "$cf_cv_find_linkage_utf8" = yes ; then
4025 cf_cv_utf8_lib=add-on
4026 else
4027 cf_cv_utf8_lib=no
4028 fi
4029
4030 fi
4031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4032 fi
4033 echo "$as_me:4033: result: $cf_cv_utf8_lib" >&5
4034 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4035
4036 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4037 # ncurses/ncursesw:
4038 if test "$cf_cv_utf8_lib" = "add-on" ; then
4039
4040 cat >>confdefs.h <<\EOF
4041 #define HAVE_LIBUTF8_H 1
4042 EOF
4043
4044 if test -n "$cf_cv_header_path_utf8" ; then
4045   for cf_add_incdir in $cf_cv_header_path_utf8
4046   do
4047         while test $cf_add_incdir != /usr/include
4048         do
4049           if test -d $cf_add_incdir
4050           then
4051                 cf_have_incdir=no
4052                 if test -n "$CFLAGS$CPPFLAGS" ; then
4053                   # a loop is needed to ensure we can add subdirs of existing dirs
4054                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4055                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4056                           cf_have_incdir=yes; break
4057                         fi
4058                   done
4059                 fi
4060
4061                 if test "$cf_have_incdir" = no ; then
4062                   if test "$cf_add_incdir" = /usr/local/include ; then
4063                         if test "$GCC" = yes
4064                         then
4065                           cf_save_CPPFLAGS=$CPPFLAGS
4066                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4067                           cat >conftest.$ac_ext <<_ACEOF
4068 #line 4068 "configure"
4069 #include "confdefs.h"
4070 #include <stdio.h>
4071 int
4072 main ()
4073 {
4074 printf("Hello")
4075   ;
4076   return 0;
4077 }
4078 _ACEOF
4079 rm -f conftest.$ac_objext
4080 if { (eval echo "$as_me:4080: \"$ac_compile\"") >&5
4081   (eval $ac_compile) 2>&5
4082   ac_status=$?
4083   echo "$as_me:4083: \$? = $ac_status" >&5
4084   (exit $ac_status); } &&
4085          { ac_try='test -s conftest.$ac_objext'
4086   { (eval echo "$as_me:4086: \"$ac_try\"") >&5
4087   (eval $ac_try) 2>&5
4088   ac_status=$?
4089   echo "$as_me:4089: \$? = $ac_status" >&5
4090   (exit $ac_status); }; }; then
4091   :
4092 else
4093   echo "$as_me: failed program was:" >&5
4094 cat conftest.$ac_ext >&5
4095 cf_have_incdir=yes
4096 fi
4097 rm -f conftest.$ac_objext conftest.$ac_ext
4098                           CPPFLAGS=$cf_save_CPPFLAGS
4099                         fi
4100                   fi
4101                 fi
4102
4103                 if test "$cf_have_incdir" = no ; then
4104                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4105
4106 echo "${as_me:-configure}:4106: testing adding $cf_add_incdir to include-path ..." 1>&5
4107
4108                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4109
4110                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4111                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4112                   cf_add_incdir="$cf_top_incdir"
4113                 else
4114                   break
4115                 fi
4116           fi
4117         done
4118   done
4119 fi
4120
4121 if test -n "$cf_cv_library_path_utf8" ; then
4122   for cf_add_libdir in $cf_cv_library_path_utf8
4123   do
4124     if test $cf_add_libdir = /usr/lib ; then
4125       :
4126     elif test -d $cf_add_libdir
4127     then
4128       cf_have_libdir=no
4129       if test -n "$LDFLAGS$LIBS" ; then
4130         # a loop is needed to ensure we can add subdirs of existing dirs
4131         for cf_test_libdir in $LDFLAGS $LIBS ; do
4132           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4133             cf_have_libdir=yes; break
4134           fi
4135         done
4136       fi
4137       if test "$cf_have_libdir" = no ; then
4138         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4139
4140 echo "${as_me:-configure}:4140: testing adding $cf_add_libdir to library-path ..." 1>&5
4141
4142         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4143       fi
4144     fi
4145   done
4146 fi
4147
4148 cf_add_libs="$cf_cv_library_file_utf8"
4149 # Filter out duplicates - this happens with badly-designed ".pc" files...
4150 for cf_add_1lib in $LIBS
4151 do
4152         for cf_add_2lib in $cf_add_libs
4153         do
4154                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4155                 then
4156                         cf_add_1lib=
4157                         break
4158                 fi
4159         done
4160         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4161 done
4162 LIBS="$cf_add_libs"
4163
4164 fi
4165
4166 cf_ncuconfig_root=ncursesw
4167
4168 echo "Looking for ${cf_ncuconfig_root}-config"
4169
4170 if test -n "$ac_tool_prefix"; then
4171   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4172   do
4173     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4174 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4175 echo "$as_me:4175: checking for $ac_word" >&5
4176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4177 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4178   echo $ECHO_N "(cached) $ECHO_C" >&6
4179 else
4180   if test -n "$NCURSES_CONFIG"; then
4181   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4182 else
4183   ac_save_IFS=$IFS; IFS=$ac_path_separator
4184 ac_dummy="$PATH"
4185 for ac_dir in $ac_dummy; do
4186   IFS=$ac_save_IFS
4187   test -z "$ac_dir" && ac_dir=.
4188   $as_executable_p "$ac_dir/$ac_word" || continue
4189 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4190 echo "$as_me:4190: found $ac_dir/$ac_word" >&5
4191 break
4192 done
4193
4194 fi
4195 fi
4196 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4197 if test -n "$NCURSES_CONFIG"; then
4198   echo "$as_me:4198: result: $NCURSES_CONFIG" >&5
4199 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4200 else
4201   echo "$as_me:4201: result: no" >&5
4202 echo "${ECHO_T}no" >&6
4203 fi
4204
4205     test -n "$NCURSES_CONFIG" && break
4206   done
4207 fi
4208 if test -z "$NCURSES_CONFIG"; then
4209   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4210   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4211 do
4212   # Extract the first word of "$ac_prog", so it can be a program name with args.
4213 set dummy $ac_prog; ac_word=$2
4214 echo "$as_me:4214: checking for $ac_word" >&5
4215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4216 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4217   echo $ECHO_N "(cached) $ECHO_C" >&6
4218 else
4219   if test -n "$ac_ct_NCURSES_CONFIG"; then
4220   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4221 else
4222   ac_save_IFS=$IFS; IFS=$ac_path_separator
4223 ac_dummy="$PATH"
4224 for ac_dir in $ac_dummy; do
4225   IFS=$ac_save_IFS
4226   test -z "$ac_dir" && ac_dir=.
4227   $as_executable_p "$ac_dir/$ac_word" || continue
4228 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4229 echo "$as_me:4229: found $ac_dir/$ac_word" >&5
4230 break
4231 done
4232
4233 fi
4234 fi
4235 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4236 if test -n "$ac_ct_NCURSES_CONFIG"; then
4237   echo "$as_me:4237: result: $ac_ct_NCURSES_CONFIG" >&5
4238 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4239 else
4240   echo "$as_me:4240: result: no" >&5
4241 echo "${ECHO_T}no" >&6
4242 fi
4243
4244   test -n "$ac_ct_NCURSES_CONFIG" && break
4245 done
4246 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4247
4248   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4249 fi
4250
4251 if test "$NCURSES_CONFIG" != none ; then
4252
4253 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4254
4255 cf_add_libs="`$NCURSES_CONFIG --libs`"
4256 # Filter out duplicates - this happens with badly-designed ".pc" files...
4257 for cf_add_1lib in $LIBS
4258 do
4259         for cf_add_2lib in $cf_add_libs
4260         do
4261                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4262                 then
4263                         cf_add_1lib=
4264                         break
4265                 fi
4266         done
4267         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4268 done
4269 LIBS="$cf_add_libs"
4270
4271 # even with config script, some packages use no-override for curses.h
4272
4273 echo "$as_me:4273: checking if we have identified curses headers" >&5
4274 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4275 if test "${cf_cv_ncurses_header+set}" = set; then
4276   echo $ECHO_N "(cached) $ECHO_C" >&6
4277 else
4278
4279 cf_cv_ncurses_header=none
4280 for cf_header in  \
4281     ncursesw/ncurses.h \
4282         ncursesw/curses.h \
4283         ncurses.h \
4284         curses.h
4285 do
4286 cat >conftest.$ac_ext <<_ACEOF
4287 #line 4287 "configure"
4288 #include "confdefs.h"
4289 #include <${cf_header}>
4290 int
4291 main ()
4292 {
4293 initscr(); tgoto("?", 0,0)
4294   ;
4295   return 0;
4296 }
4297 _ACEOF
4298 rm -f conftest.$ac_objext
4299 if { (eval echo "$as_me:4299: \"$ac_compile\"") >&5
4300   (eval $ac_compile) 2>&5
4301   ac_status=$?
4302   echo "$as_me:4302: \$? = $ac_status" >&5
4303   (exit $ac_status); } &&
4304          { ac_try='test -s conftest.$ac_objext'
4305   { (eval echo "$as_me:4305: \"$ac_try\"") >&5
4306   (eval $ac_try) 2>&5
4307   ac_status=$?
4308   echo "$as_me:4308: \$? = $ac_status" >&5
4309   (exit $ac_status); }; }; then
4310   cf_cv_ncurses_header=$cf_header; break
4311 else
4312   echo "$as_me: failed program was:" >&5
4313 cat conftest.$ac_ext >&5
4314 fi
4315 rm -f conftest.$ac_objext conftest.$ac_ext
4316 done
4317
4318 fi
4319 echo "$as_me:4319: result: $cf_cv_ncurses_header" >&5
4320 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4321
4322 if test "$cf_cv_ncurses_header" = none ; then
4323         { { echo "$as_me:4323: error: No curses header-files found" >&5
4324 echo "$as_me: error: No curses header-files found" >&2;}
4325    { (exit 1); exit 1; }; }
4326 fi
4327
4328 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4329
4330 for ac_header in $cf_cv_ncurses_header
4331 do
4332 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4333 echo "$as_me:4333: checking for $ac_header" >&5
4334 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4335 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4336   echo $ECHO_N "(cached) $ECHO_C" >&6
4337 else
4338   cat >conftest.$ac_ext <<_ACEOF
4339 #line 4339 "configure"
4340 #include "confdefs.h"
4341 #include <$ac_header>
4342 _ACEOF
4343 if { (eval echo "$as_me:4343: \"$ac_cpp conftest.$ac_ext\"") >&5
4344   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4345   ac_status=$?
4346   egrep -v '^ *\+' conftest.er1 >conftest.err
4347   rm -f conftest.er1
4348   cat conftest.err >&5
4349   echo "$as_me:4349: \$? = $ac_status" >&5
4350   (exit $ac_status); } >/dev/null; then
4351   if test -s conftest.err; then
4352     ac_cpp_err=$ac_c_preproc_warn_flag
4353   else
4354     ac_cpp_err=
4355   fi
4356 else
4357   ac_cpp_err=yes
4358 fi
4359 if test -z "$ac_cpp_err"; then
4360   eval "$as_ac_Header=yes"
4361 else
4362   echo "$as_me: failed program was:" >&5
4363   cat conftest.$ac_ext >&5
4364   eval "$as_ac_Header=no"
4365 fi
4366 rm -f conftest.err conftest.$ac_ext
4367 fi
4368 echo "$as_me:4368: result: `eval echo '${'$as_ac_Header'}'`" >&5
4369 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4370 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4371   cat >>confdefs.h <<EOF
4372 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4373 EOF
4374
4375 fi
4376 done
4377
4378 cat >>confdefs.h <<\EOF
4379 #define NCURSES 1
4380 EOF
4381
4382 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4383
4384 cat >>confdefs.h <<EOF
4385 #define $cf_nculib_ROOT 1
4386 EOF
4387
4388 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4389
4390 else
4391
4392 cf_ncuhdr_root=ncursesw
4393
4394 test -n "$cf_cv_curses_dir" && \
4395 test "$cf_cv_curses_dir" != "no" && { \
4396
4397 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4398   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4399   do
4400         while test $cf_add_incdir != /usr/include
4401         do
4402           if test -d $cf_add_incdir
4403           then
4404                 cf_have_incdir=no
4405                 if test -n "$CFLAGS$CPPFLAGS" ; then
4406                   # a loop is needed to ensure we can add subdirs of existing dirs
4407                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4408                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4409                           cf_have_incdir=yes; break
4410                         fi
4411                   done
4412                 fi
4413
4414                 if test "$cf_have_incdir" = no ; then
4415                   if test "$cf_add_incdir" = /usr/local/include ; then
4416                         if test "$GCC" = yes
4417                         then
4418                           cf_save_CPPFLAGS=$CPPFLAGS
4419                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4420                           cat >conftest.$ac_ext <<_ACEOF
4421 #line 4421 "configure"
4422 #include "confdefs.h"
4423 #include <stdio.h>
4424 int
4425 main ()
4426 {
4427 printf("Hello")
4428   ;
4429   return 0;
4430 }
4431 _ACEOF
4432 rm -f conftest.$ac_objext
4433 if { (eval echo "$as_me:4433: \"$ac_compile\"") >&5
4434   (eval $ac_compile) 2>&5
4435   ac_status=$?
4436   echo "$as_me:4436: \$? = $ac_status" >&5
4437   (exit $ac_status); } &&
4438          { ac_try='test -s conftest.$ac_objext'
4439   { (eval echo "$as_me:4439: \"$ac_try\"") >&5
4440   (eval $ac_try) 2>&5
4441   ac_status=$?
4442   echo "$as_me:4442: \$? = $ac_status" >&5
4443   (exit $ac_status); }; }; then
4444   :
4445 else
4446   echo "$as_me: failed program was:" >&5
4447 cat conftest.$ac_ext >&5
4448 cf_have_incdir=yes
4449 fi
4450 rm -f conftest.$ac_objext conftest.$ac_ext
4451                           CPPFLAGS=$cf_save_CPPFLAGS
4452                         fi
4453                   fi
4454                 fi
4455
4456                 if test "$cf_have_incdir" = no ; then
4457                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4458
4459 echo "${as_me:-configure}:4459: testing adding $cf_add_incdir to include-path ..." 1>&5
4460
4461                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4462
4463                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4464                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4465                   cf_add_incdir="$cf_top_incdir"
4466                 else
4467                   break
4468                 fi
4469           fi
4470         done
4471   done
4472 fi
4473
4474 }
4475
4476 echo "$as_me:4476: checking for $cf_ncuhdr_root header in include-path" >&5
4477 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4478 if test "${cf_cv_ncurses_h+set}" = set; then
4479   echo $ECHO_N "(cached) $ECHO_C" >&6
4480 else
4481
4482         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4483         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4484         for cf_header in $cf_header_list
4485         do
4486
4487         cat >conftest.$ac_ext <<_ACEOF
4488 #line 4488 "configure"
4489 #include "confdefs.h"
4490
4491 #define _XOPEN_SOURCE_EXTENDED
4492 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4493 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4494
4495 #include <$cf_header>
4496 int
4497 main ()
4498 {
4499
4500 #ifdef NCURSES_VERSION
4501
4502 #ifndef WACS_BSSB
4503         make an error
4504 #endif
4505
4506 printf("%s\n", NCURSES_VERSION);
4507 #else
4508 #ifdef __NCURSES_H
4509 printf("old\n");
4510 #else
4511         make an error
4512 #endif
4513 #endif
4514
4515   ;
4516   return 0;
4517 }
4518 _ACEOF
4519 rm -f conftest.$ac_objext
4520 if { (eval echo "$as_me:4520: \"$ac_compile\"") >&5
4521   (eval $ac_compile) 2>&5
4522   ac_status=$?
4523   echo "$as_me:4523: \$? = $ac_status" >&5
4524   (exit $ac_status); } &&
4525          { ac_try='test -s conftest.$ac_objext'
4526   { (eval echo "$as_me:4526: \"$ac_try\"") >&5
4527   (eval $ac_try) 2>&5
4528   ac_status=$?
4529   echo "$as_me:4529: \$? = $ac_status" >&5
4530   (exit $ac_status); }; }; then
4531   cf_cv_ncurses_h=$cf_header
4532
4533 else
4534   echo "$as_me: failed program was:" >&5
4535 cat conftest.$ac_ext >&5
4536 cf_cv_ncurses_h=no
4537 fi
4538 rm -f conftest.$ac_objext conftest.$ac_ext
4539
4540                 test "$cf_cv_ncurses_h" != no && break
4541         done
4542
4543 fi
4544 echo "$as_me:4544: result: $cf_cv_ncurses_h" >&5
4545 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4546
4547 if test "$cf_cv_ncurses_h" != no ; then
4548         cf_cv_ncurses_header=$cf_cv_ncurses_h
4549 else
4550
4551 echo "$as_me:4551: checking for $cf_ncuhdr_root include-path" >&5
4552 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4553 if test "${cf_cv_ncurses_h2+set}" = set; then
4554   echo $ECHO_N "(cached) $ECHO_C" >&6
4555 else
4556
4557         test -n "$verbose" && echo
4558
4559 cf_search=
4560
4561 # collect the current set of include-directories from compiler flags
4562 cf_header_path_list=""
4563 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4564         for cf_header_path in $CPPFLAGS $CFLAGS
4565         do
4566                 case $cf_header_path in #(vi
4567                 -I*)
4568                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4569
4570 test "x$cf_header_path" != "xNONE" && \
4571 test -d "$cf_header_path" && \
4572  {
4573         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4574         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4575         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4576         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4577         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4578         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"
4579 }
4580
4581                         cf_header_path_list="$cf_header_path_list $cf_search"
4582                         ;;
4583                 esac
4584         done
4585 fi
4586
4587 # add the variations for the package we are looking for
4588
4589 cf_search=
4590
4591 test "x$prefix" != "xNONE" && \
4592 test -d "$prefix" && \
4593  {
4594         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4595         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4596         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4597         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4598         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4599         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4600 }
4601
4602 for cf_subdir_prefix in \
4603         /usr \
4604         /usr/local \
4605         /usr/pkg \
4606         /opt \
4607         /opt/local \
4608         $HOME
4609 do
4610
4611 test "x$cf_subdir_prefix" != "x$prefix" && \
4612 test -d "$cf_subdir_prefix" && \
4613 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4614         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
4615         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
4616         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4617         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4618         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4619         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4620 }
4621
4622 done
4623
4624 test "$includedir" != NONE && \
4625 test "$includedir" != "/usr/include" && \
4626 test -d "$includedir" && {
4627         test -d $includedir &&    cf_search="$cf_search $includedir"
4628         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4629 }
4630
4631 test "$oldincludedir" != NONE && \
4632 test "$oldincludedir" != "/usr/include" && \
4633 test -d "$oldincludedir" && {
4634         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4635         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4636 }
4637
4638 cf_search="$cf_search $cf_header_path_list"
4639
4640         test -n "$verbose" && echo search path $cf_search
4641         cf_save2_CPPFLAGS="$CPPFLAGS"
4642         for cf_incdir in $cf_search
4643         do
4644
4645 if test -n "$cf_incdir" ; then
4646   for cf_add_incdir in $cf_incdir
4647   do
4648         while test $cf_add_incdir != /usr/include
4649         do
4650           if test -d $cf_add_incdir
4651           then
4652                 cf_have_incdir=no
4653                 if test -n "$CFLAGS$CPPFLAGS" ; then
4654                   # a loop is needed to ensure we can add subdirs of existing dirs
4655                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4656                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4657                           cf_have_incdir=yes; break
4658                         fi
4659                   done
4660                 fi
4661
4662                 if test "$cf_have_incdir" = no ; then
4663                   if test "$cf_add_incdir" = /usr/local/include ; then
4664                         if test "$GCC" = yes
4665                         then
4666                           cf_save_CPPFLAGS=$CPPFLAGS
4667                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4668                           cat >conftest.$ac_ext <<_ACEOF
4669 #line 4669 "configure"
4670 #include "confdefs.h"
4671 #include <stdio.h>
4672 int
4673 main ()
4674 {
4675 printf("Hello")
4676   ;
4677   return 0;
4678 }
4679 _ACEOF
4680 rm -f conftest.$ac_objext
4681 if { (eval echo "$as_me:4681: \"$ac_compile\"") >&5
4682   (eval $ac_compile) 2>&5
4683   ac_status=$?
4684   echo "$as_me:4684: \$? = $ac_status" >&5
4685   (exit $ac_status); } &&
4686          { ac_try='test -s conftest.$ac_objext'
4687   { (eval echo "$as_me:4687: \"$ac_try\"") >&5
4688   (eval $ac_try) 2>&5
4689   ac_status=$?
4690   echo "$as_me:4690: \$? = $ac_status" >&5
4691   (exit $ac_status); }; }; then
4692   :
4693 else
4694   echo "$as_me: failed program was:" >&5
4695 cat conftest.$ac_ext >&5
4696 cf_have_incdir=yes
4697 fi
4698 rm -f conftest.$ac_objext conftest.$ac_ext
4699                           CPPFLAGS=$cf_save_CPPFLAGS
4700                         fi
4701                   fi
4702                 fi
4703
4704                 if test "$cf_have_incdir" = no ; then
4705                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4706
4707 echo "${as_me:-configure}:4707: testing adding $cf_add_incdir to include-path ..." 1>&5
4708
4709                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4710
4711                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4712                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4713                   cf_add_incdir="$cf_top_incdir"
4714                 else
4715                   break
4716                 fi
4717           fi
4718         done
4719   done
4720 fi
4721
4722                 for cf_header in \
4723                         ncurses.h \
4724                         curses.h
4725                 do
4726
4727         cat >conftest.$ac_ext <<_ACEOF
4728 #line 4728 "configure"
4729 #include "confdefs.h"
4730
4731 #include <$cf_header>
4732 int
4733 main ()
4734 {
4735
4736 #ifdef NCURSES_VERSION
4737
4738 printf("%s\n", NCURSES_VERSION);
4739 #else
4740 #ifdef __NCURSES_H
4741 printf("old\n");
4742 #else
4743         make an error
4744 #endif
4745 #endif
4746
4747   ;
4748   return 0;
4749 }
4750 _ACEOF
4751 rm -f conftest.$ac_objext
4752 if { (eval echo "$as_me:4752: \"$ac_compile\"") >&5
4753   (eval $ac_compile) 2>&5
4754   ac_status=$?
4755   echo "$as_me:4755: \$? = $ac_status" >&5
4756   (exit $ac_status); } &&
4757          { ac_try='test -s conftest.$ac_objext'
4758   { (eval echo "$as_me:4758: \"$ac_try\"") >&5
4759   (eval $ac_try) 2>&5
4760   ac_status=$?
4761   echo "$as_me:4761: \$? = $ac_status" >&5
4762   (exit $ac_status); }; }; then
4763   cf_cv_ncurses_h2=$cf_header
4764
4765 else
4766   echo "$as_me: failed program was:" >&5
4767 cat conftest.$ac_ext >&5
4768 cf_cv_ncurses_h2=no
4769 fi
4770 rm -f conftest.$ac_objext conftest.$ac_ext
4771
4772                         if test "$cf_cv_ncurses_h2" != no ; then
4773                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4774                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
4775                                 break
4776                         fi
4777                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
4778                 done
4779                 CPPFLAGS="$cf_save2_CPPFLAGS"
4780                 test "$cf_cv_ncurses_h2" != no && break
4781         done
4782         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4782: error: not found" >&5
4783 echo "$as_me: error: not found" >&2;}
4784    { (exit 1); exit 1; }; }
4785
4786 fi
4787 echo "$as_me:4787: result: $cf_cv_ncurses_h2" >&5
4788 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4789
4790         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4791         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4792         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4793                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4794         fi
4795
4796 if test -n "$cf_1st_incdir" ; then
4797   for cf_add_incdir in $cf_1st_incdir
4798   do
4799         while test $cf_add_incdir != /usr/include
4800         do
4801           if test -d $cf_add_incdir
4802           then
4803                 cf_have_incdir=no
4804                 if test -n "$CFLAGS$CPPFLAGS" ; then
4805                   # a loop is needed to ensure we can add subdirs of existing dirs
4806                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4807                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4808                           cf_have_incdir=yes; break
4809                         fi
4810                   done
4811                 fi
4812
4813                 if test "$cf_have_incdir" = no ; then
4814                   if test "$cf_add_incdir" = /usr/local/include ; then
4815                         if test "$GCC" = yes
4816                         then
4817                           cf_save_CPPFLAGS=$CPPFLAGS
4818                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4819                           cat >conftest.$ac_ext <<_ACEOF
4820 #line 4820 "configure"
4821 #include "confdefs.h"
4822 #include <stdio.h>
4823 int
4824 main ()
4825 {
4826 printf("Hello")
4827   ;
4828   return 0;
4829 }
4830 _ACEOF
4831 rm -f conftest.$ac_objext
4832 if { (eval echo "$as_me:4832: \"$ac_compile\"") >&5
4833   (eval $ac_compile) 2>&5
4834   ac_status=$?
4835   echo "$as_me:4835: \$? = $ac_status" >&5
4836   (exit $ac_status); } &&
4837          { ac_try='test -s conftest.$ac_objext'
4838   { (eval echo "$as_me:4838: \"$ac_try\"") >&5
4839   (eval $ac_try) 2>&5
4840   ac_status=$?
4841   echo "$as_me:4841: \$? = $ac_status" >&5
4842   (exit $ac_status); }; }; then
4843   :
4844 else
4845   echo "$as_me: failed program was:" >&5
4846 cat conftest.$ac_ext >&5
4847 cf_have_incdir=yes
4848 fi
4849 rm -f conftest.$ac_objext conftest.$ac_ext
4850                           CPPFLAGS=$cf_save_CPPFLAGS
4851                         fi
4852                   fi
4853                 fi
4854
4855                 if test "$cf_have_incdir" = no ; then
4856                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4857
4858 echo "${as_me:-configure}:4858: testing adding $cf_add_incdir to include-path ..." 1>&5
4859
4860                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4861
4862                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4863                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4864                   cf_add_incdir="$cf_top_incdir"
4865                 else
4866                   break
4867                 fi
4868           fi
4869         done
4870   done
4871 fi
4872
4873 fi
4874
4875 # Set definitions to allow ifdef'ing for ncurses.h
4876
4877 case $cf_cv_ncurses_header in # (vi
4878 *ncurses.h)
4879
4880 cat >>confdefs.h <<\EOF
4881 #define HAVE_NCURSES_H 1
4882 EOF
4883
4884         ;;
4885 esac
4886
4887 case $cf_cv_ncurses_header in # (vi
4888 ncurses/curses.h|ncurses/ncurses.h)
4889
4890 cat >>confdefs.h <<\EOF
4891 #define HAVE_NCURSES_NCURSES_H 1
4892 EOF
4893
4894         ;;
4895 ncursesw/curses.h|ncursesw/ncurses.h)
4896
4897 cat >>confdefs.h <<\EOF
4898 #define HAVE_NCURSESW_NCURSES_H 1
4899 EOF
4900
4901         ;;
4902 esac
4903
4904 echo "$as_me:4904: checking for terminfo header" >&5
4905 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4906 if test "${cf_cv_term_header+set}" = set; then
4907   echo $ECHO_N "(cached) $ECHO_C" >&6
4908 else
4909
4910 case ${cf_cv_ncurses_header} in #(vi
4911 */ncurses.h|*/ncursesw.h) #(vi
4912         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4913         ;;
4914 *)
4915         cf_term_header=term.h
4916         ;;
4917 esac
4918
4919 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4920 do
4921 cat >conftest.$ac_ext <<_ACEOF
4922 #line 4922 "configure"
4923 #include "confdefs.h"
4924 #include <stdio.h>
4925 #include <${cf_cv_ncurses_header:-curses.h}>
4926 #include <$cf_test>
4927
4928 int
4929 main ()
4930 {
4931 int x = auto_left_margin
4932   ;
4933   return 0;
4934 }
4935 _ACEOF
4936 rm -f conftest.$ac_objext
4937 if { (eval echo "$as_me:4937: \"$ac_compile\"") >&5
4938   (eval $ac_compile) 2>&5
4939   ac_status=$?
4940   echo "$as_me:4940: \$? = $ac_status" >&5
4941   (exit $ac_status); } &&
4942          { ac_try='test -s conftest.$ac_objext'
4943   { (eval echo "$as_me:4943: \"$ac_try\"") >&5
4944   (eval $ac_try) 2>&5
4945   ac_status=$?
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); }; }; then
4948
4949         cf_cv_term_header="$cf_test"
4950 else
4951   echo "$as_me: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4953
4954         cf_cv_term_header=unknown
4955
4956 fi
4957 rm -f conftest.$ac_objext conftest.$ac_ext
4958         test "$cf_cv_term_header" != unknown && break
4959 done
4960
4961 fi
4962 echo "$as_me:4962: result: $cf_cv_term_header" >&5
4963 echo "${ECHO_T}$cf_cv_term_header" >&6
4964
4965 # Set definitions to allow ifdef'ing to accommodate subdirectories
4966
4967 case $cf_cv_term_header in # (vi
4968 *term.h)
4969
4970 cat >>confdefs.h <<\EOF
4971 #define HAVE_TERM_H 1
4972 EOF
4973
4974         ;;
4975 esac
4976
4977 case $cf_cv_term_header in # (vi
4978 ncurses/term.h) #(vi
4979
4980 cat >>confdefs.h <<\EOF
4981 #define HAVE_NCURSES_TERM_H 1
4982 EOF
4983
4984         ;;
4985 ncursesw/term.h)
4986
4987 cat >>confdefs.h <<\EOF
4988 #define HAVE_NCURSESW_TERM_H 1
4989 EOF
4990
4991         ;;
4992 esac
4993
4994 # some applications need this, but should check for NCURSES_VERSION
4995
4996 cat >>confdefs.h <<\EOF
4997 #define NCURSES 1
4998 EOF
4999
5000 echo "$as_me:5000: checking for ncurses version" >&5
5001 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5002 if test "${cf_cv_ncurses_version+set}" = set; then
5003   echo $ECHO_N "(cached) $ECHO_C" >&6
5004 else
5005
5006         cf_cv_ncurses_version=no
5007         cf_tempfile=out$$
5008         rm -f $cf_tempfile
5009         if test "$cross_compiling" = yes; then
5010
5011         # This will not work if the preprocessor splits the line after the
5012         # Autoconf token.  The 'unproto' program does that.
5013         cat > conftest.$ac_ext <<EOF
5014 #include <${cf_cv_ncurses_header:-curses.h}>
5015 #undef Autoconf
5016 #ifdef NCURSES_VERSION
5017 Autoconf NCURSES_VERSION
5018 #else
5019 #ifdef __NCURSES_H
5020 Autoconf "old"
5021 #endif
5022 ;
5023 #endif
5024 EOF
5025         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5026         { (eval echo "$as_me:5026: \"$cf_try\"") >&5
5027   (eval $cf_try) 2>&5
5028   ac_status=$?
5029   echo "$as_me:5029: \$? = $ac_status" >&5
5030   (exit $ac_status); }
5031         if test -f conftest.out ; then
5032                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5033                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5034                 rm -f conftest.out
5035         fi
5036
5037 else
5038   cat >conftest.$ac_ext <<_ACEOF
5039 #line 5039 "configure"
5040 #include "confdefs.h"
5041
5042 #include <${cf_cv_ncurses_header:-curses.h}>
5043 #include <stdio.h>
5044 int main()
5045 {
5046         FILE *fp = fopen("$cf_tempfile", "w");
5047 #ifdef NCURSES_VERSION
5048 # ifdef NCURSES_VERSION_PATCH
5049         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5050 # else
5051         fprintf(fp, "%s\n", NCURSES_VERSION);
5052 # endif
5053 #else
5054 # ifdef __NCURSES_H
5055         fprintf(fp, "old\n");
5056 # else
5057         make an error
5058 # endif
5059 #endif
5060         ${cf_cv_main_return:-return}(0);
5061 }
5062 _ACEOF
5063 rm -f conftest$ac_exeext
5064 if { (eval echo "$as_me:5064: \"$ac_link\"") >&5
5065   (eval $ac_link) 2>&5
5066   ac_status=$?
5067   echo "$as_me:5067: \$? = $ac_status" >&5
5068   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5069   { (eval echo "$as_me:5069: \"$ac_try\"") >&5
5070   (eval $ac_try) 2>&5
5071   ac_status=$?
5072   echo "$as_me:5072: \$? = $ac_status" >&5
5073   (exit $ac_status); }; }; then
5074
5075         cf_cv_ncurses_version=`cat $cf_tempfile`
5076 else
5077   echo "$as_me: program exited with status $ac_status" >&5
5078 echo "$as_me: failed program was:" >&5
5079 cat conftest.$ac_ext >&5
5080 fi
5081 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5082 fi
5083         rm -f $cf_tempfile
5084
5085 fi
5086 echo "$as_me:5086: result: $cf_cv_ncurses_version" >&5
5087 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5088 test "$cf_cv_ncurses_version" = no ||
5089 cat >>confdefs.h <<\EOF
5090 #define NCURSES 1
5091 EOF
5092
5093 cf_nculib_root=ncursesw
5094         # This works, except for the special case where we find gpm, but
5095         # ncurses is in a nonstandard location via $LIBS, and we really want
5096         # to link gpm.
5097 cf_ncurses_LIBS=""
5098 cf_ncurses_SAVE="$LIBS"
5099 echo "$as_me:5099: checking for Gpm_Open in -lgpm" >&5
5100 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5101 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5102   echo $ECHO_N "(cached) $ECHO_C" >&6
5103 else
5104   ac_check_lib_save_LIBS=$LIBS
5105 LIBS="-lgpm  $LIBS"
5106 cat >conftest.$ac_ext <<_ACEOF
5107 #line 5107 "configure"
5108 #include "confdefs.h"
5109
5110 /* Override any gcc2 internal prototype to avoid an error.  */
5111 #ifdef __cplusplus
5112 extern "C"
5113 #endif
5114 /* We use char because int might match the return type of a gcc2
5115    builtin and then its argument prototype would still apply.  */
5116 char Gpm_Open ();
5117 int
5118 main ()
5119 {
5120 Gpm_Open ();
5121   ;
5122   return 0;
5123 }
5124 _ACEOF
5125 rm -f conftest.$ac_objext conftest$ac_exeext
5126 if { (eval echo "$as_me:5126: \"$ac_link\"") >&5
5127   (eval $ac_link) 2>&5
5128   ac_status=$?
5129   echo "$as_me:5129: \$? = $ac_status" >&5
5130   (exit $ac_status); } &&
5131          { ac_try='test -s conftest$ac_exeext'
5132   { (eval echo "$as_me:5132: \"$ac_try\"") >&5
5133   (eval $ac_try) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); }; }; then
5137   ac_cv_lib_gpm_Gpm_Open=yes
5138 else
5139   echo "$as_me: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
5141 ac_cv_lib_gpm_Gpm_Open=no
5142 fi
5143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5144 LIBS=$ac_check_lib_save_LIBS
5145 fi
5146 echo "$as_me:5146: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5147 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5148 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5149   echo "$as_me:5149: checking for initscr in -lgpm" >&5
5150 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5151 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5152   echo $ECHO_N "(cached) $ECHO_C" >&6
5153 else
5154   ac_check_lib_save_LIBS=$LIBS
5155 LIBS="-lgpm  $LIBS"
5156 cat >conftest.$ac_ext <<_ACEOF
5157 #line 5157 "configure"
5158 #include "confdefs.h"
5159
5160 /* Override any gcc2 internal prototype to avoid an error.  */
5161 #ifdef __cplusplus
5162 extern "C"
5163 #endif
5164 /* We use char because int might match the return type of a gcc2
5165    builtin and then its argument prototype would still apply.  */
5166 char initscr ();
5167 int
5168 main ()
5169 {
5170 initscr ();
5171   ;
5172   return 0;
5173 }
5174 _ACEOF
5175 rm -f conftest.$ac_objext conftest$ac_exeext
5176 if { (eval echo "$as_me:5176: \"$ac_link\"") >&5
5177   (eval $ac_link) 2>&5
5178   ac_status=$?
5179   echo "$as_me:5179: \$? = $ac_status" >&5
5180   (exit $ac_status); } &&
5181          { ac_try='test -s conftest$ac_exeext'
5182   { (eval echo "$as_me:5182: \"$ac_try\"") >&5
5183   (eval $ac_try) 2>&5
5184   ac_status=$?
5185   echo "$as_me:5185: \$? = $ac_status" >&5
5186   (exit $ac_status); }; }; then
5187   ac_cv_lib_gpm_initscr=yes
5188 else
5189   echo "$as_me: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 ac_cv_lib_gpm_initscr=no
5192 fi
5193 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5194 LIBS=$ac_check_lib_save_LIBS
5195 fi
5196 echo "$as_me:5196: result: $ac_cv_lib_gpm_initscr" >&5
5197 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5198 if test $ac_cv_lib_gpm_initscr = yes; then
5199   LIBS="$cf_ncurses_SAVE"
5200 else
5201   cf_ncurses_LIBS="-lgpm"
5202 fi
5203
5204 fi
5205
5206 case $host_os in #(vi
5207 freebsd*)
5208         # This is only necessary if you are linking against an obsolete
5209         # version of ncurses (but it should do no harm, since it's static).
5210         if test "$cf_nculib_root" = ncurses ; then
5211                 echo "$as_me:5211: checking for tgoto in -lmytinfo" >&5
5212 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5213 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5214   echo $ECHO_N "(cached) $ECHO_C" >&6
5215 else
5216   ac_check_lib_save_LIBS=$LIBS
5217 LIBS="-lmytinfo  $LIBS"
5218 cat >conftest.$ac_ext <<_ACEOF
5219 #line 5219 "configure"
5220 #include "confdefs.h"
5221
5222 /* Override any gcc2 internal prototype to avoid an error.  */
5223 #ifdef __cplusplus
5224 extern "C"
5225 #endif
5226 /* We use char because int might match the return type of a gcc2
5227    builtin and then its argument prototype would still apply.  */
5228 char tgoto ();
5229 int
5230 main ()
5231 {
5232 tgoto ();
5233   ;
5234   return 0;
5235 }
5236 _ACEOF
5237 rm -f conftest.$ac_objext conftest$ac_exeext
5238 if { (eval echo "$as_me:5238: \"$ac_link\"") >&5
5239   (eval $ac_link) 2>&5
5240   ac_status=$?
5241   echo "$as_me:5241: \$? = $ac_status" >&5
5242   (exit $ac_status); } &&
5243          { ac_try='test -s conftest$ac_exeext'
5244   { (eval echo "$as_me:5244: \"$ac_try\"") >&5
5245   (eval $ac_try) 2>&5
5246   ac_status=$?
5247   echo "$as_me:5247: \$? = $ac_status" >&5
5248   (exit $ac_status); }; }; then
5249   ac_cv_lib_mytinfo_tgoto=yes
5250 else
5251   echo "$as_me: failed program was:" >&5
5252 cat conftest.$ac_ext >&5
5253 ac_cv_lib_mytinfo_tgoto=no
5254 fi
5255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5256 LIBS=$ac_check_lib_save_LIBS
5257 fi
5258 echo "$as_me:5258: result: $ac_cv_lib_mytinfo_tgoto" >&5
5259 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5260 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5261   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5262 fi
5263
5264         fi
5265         ;;
5266 esac
5267
5268 cf_add_libs="$cf_ncurses_LIBS"
5269 # Filter out duplicates - this happens with badly-designed ".pc" files...
5270 for cf_add_1lib in $LIBS
5271 do
5272         for cf_add_2lib in $cf_add_libs
5273         do
5274                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5275                 then
5276                         cf_add_1lib=
5277                         break
5278                 fi
5279         done
5280         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5281 done
5282 LIBS="$cf_add_libs"
5283
5284 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5285 then
5286
5287 cf_add_libs="-l$cf_nculib_root"
5288 # Filter out duplicates - this happens with badly-designed ".pc" files...
5289 for cf_add_1lib in $LIBS
5290 do
5291         for cf_add_2lib in $cf_add_libs
5292         do
5293                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5294                 then
5295                         cf_add_1lib=
5296                         break
5297                 fi
5298         done
5299         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5300 done
5301 LIBS="$cf_add_libs"
5302
5303 else
5304
5305         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5306         cf_libdir=""
5307         echo "$as_me:5307: checking for initscr" >&5
5308 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5309 if test "${ac_cv_func_initscr+set}" = set; then
5310   echo $ECHO_N "(cached) $ECHO_C" >&6
5311 else
5312   cat >conftest.$ac_ext <<_ACEOF
5313 #line 5313 "configure"
5314 #include "confdefs.h"
5315 /* System header to define __stub macros and hopefully few prototypes,
5316     which can conflict with char initscr (); below.  */
5317 #include <assert.h>
5318 /* Override any gcc2 internal prototype to avoid an error.  */
5319 #ifdef __cplusplus
5320 extern "C"
5321 #endif
5322 /* We use char because int might match the return type of a gcc2
5323    builtin and then its argument prototype would still apply.  */
5324 char initscr ();
5325 char (*f) ();
5326
5327 int
5328 main ()
5329 {
5330 /* The GNU C library defines this for functions which it implements
5331     to always fail with ENOSYS.  Some functions are actually named
5332     something starting with __ and the normal name is an alias.  */
5333 #if defined (__stub_initscr) || defined (__stub___initscr)
5334 choke me
5335 #else
5336 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5337 #endif
5338
5339   ;
5340   return 0;
5341 }
5342 _ACEOF
5343 rm -f conftest.$ac_objext conftest$ac_exeext
5344 if { (eval echo "$as_me:5344: \"$ac_link\"") >&5
5345   (eval $ac_link) 2>&5
5346   ac_status=$?
5347   echo "$as_me:5347: \$? = $ac_status" >&5
5348   (exit $ac_status); } &&
5349          { ac_try='test -s conftest$ac_exeext'
5350   { (eval echo "$as_me:5350: \"$ac_try\"") >&5
5351   (eval $ac_try) 2>&5
5352   ac_status=$?
5353   echo "$as_me:5353: \$? = $ac_status" >&5
5354   (exit $ac_status); }; }; then
5355   ac_cv_func_initscr=yes
5356 else
5357   echo "$as_me: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5359 ac_cv_func_initscr=no
5360 fi
5361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5362 fi
5363 echo "$as_me:5363: result: $ac_cv_func_initscr" >&5
5364 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5365 if test $ac_cv_func_initscr = yes; then
5366   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5367 else
5368
5369                 cf_save_LIBS="$LIBS"
5370                 echo "$as_me:5370: checking for initscr in -l$cf_nculib_root" >&5
5371 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5372                 LIBS="-l$cf_nculib_root $LIBS"
5373                 cat >conftest.$ac_ext <<_ACEOF
5374 #line 5374 "configure"
5375 #include "confdefs.h"
5376 #include <${cf_cv_ncurses_header:-curses.h}>
5377 int
5378 main ()
5379 {
5380 initscr()
5381   ;
5382   return 0;
5383 }
5384 _ACEOF
5385 rm -f conftest.$ac_objext conftest$ac_exeext
5386 if { (eval echo "$as_me:5386: \"$ac_link\"") >&5
5387   (eval $ac_link) 2>&5
5388   ac_status=$?
5389   echo "$as_me:5389: \$? = $ac_status" >&5
5390   (exit $ac_status); } &&
5391          { ac_try='test -s conftest$ac_exeext'
5392   { (eval echo "$as_me:5392: \"$ac_try\"") >&5
5393   (eval $ac_try) 2>&5
5394   ac_status=$?
5395   echo "$as_me:5395: \$? = $ac_status" >&5
5396   (exit $ac_status); }; }; then
5397   echo "$as_me:5397: result: yes" >&5
5398 echo "${ECHO_T}yes" >&6
5399                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5400
5401 else
5402   echo "$as_me: failed program was:" >&5
5403 cat conftest.$ac_ext >&5
5404 echo "$as_me:5404: result: no" >&5
5405 echo "${ECHO_T}no" >&6
5406
5407 cf_search=
5408 cf_library_path_list=""
5409 if test -n "${LDFLAGS}${LIBS}" ; then
5410         for cf_library_path in $LDFLAGS $LIBS
5411         do
5412                 case $cf_library_path in #(vi
5413                 -L*)
5414                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5415
5416 test "x$cf_library_path" != "xNONE" && \
5417 test -d "$cf_library_path" && \
5418  {
5419         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5420         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5421         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5422         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5423         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5424         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"
5425 }
5426
5427                         cf_library_path_list="$cf_library_path_list $cf_search"
5428                         ;;
5429                 esac
5430         done
5431 fi
5432
5433 cf_search=
5434
5435 test "x$prefix" != "xNONE" && \
5436 test -d "$prefix" && \
5437  {
5438         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5439         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5440         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5441         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5442         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5443         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5444 }
5445
5446 for cf_subdir_prefix in \
5447         /usr \
5448         /usr/local \
5449         /usr/pkg \
5450         /opt \
5451         /opt/local \
5452         $HOME
5453 do
5454
5455 test "x$cf_subdir_prefix" != "x$prefix" && \
5456 test -d "$cf_subdir_prefix" && \
5457 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5458         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
5459         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
5460         test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5461         test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5462         test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5463         test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
5464 }
5465
5466 done
5467
5468 cf_search="$cf_library_path_list $cf_search"
5469
5470                         for cf_libdir in $cf_search
5471                         do
5472                                 echo "$as_me:5472: checking for -l$cf_nculib_root in $cf_libdir" >&5
5473 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5474                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5475                                 cat >conftest.$ac_ext <<_ACEOF
5476 #line 5476 "configure"
5477 #include "confdefs.h"
5478 #include <${cf_cv_ncurses_header:-curses.h}>
5479 int
5480 main ()
5481 {
5482 initscr()
5483   ;
5484   return 0;
5485 }
5486 _ACEOF
5487 rm -f conftest.$ac_objext conftest$ac_exeext
5488 if { (eval echo "$as_me:5488: \"$ac_link\"") >&5
5489   (eval $ac_link) 2>&5
5490   ac_status=$?
5491   echo "$as_me:5491: \$? = $ac_status" >&5
5492   (exit $ac_status); } &&
5493          { ac_try='test -s conftest$ac_exeext'
5494   { (eval echo "$as_me:5494: \"$ac_try\"") >&5
5495   (eval $ac_try) 2>&5
5496   ac_status=$?
5497   echo "$as_me:5497: \$? = $ac_status" >&5
5498   (exit $ac_status); }; }; then
5499   echo "$as_me:5499: result: yes" >&5
5500 echo "${ECHO_T}yes" >&6
5501                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5502                                          break
5503 else
5504   echo "$as_me: failed program was:" >&5
5505 cat conftest.$ac_ext >&5
5506 echo "$as_me:5506: result: no" >&5
5507 echo "${ECHO_T}no" >&6
5508                                          LIBS="$cf_save_LIBS"
5509 fi
5510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5511                         done
5512
5513 fi
5514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5515
5516 fi
5517
5518 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5519
5520 if test $cf_found_library = no ; then
5521         { { echo "$as_me:5521: error: Cannot link $cf_nculib_root library" >&5
5522 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5523    { (exit 1); exit 1; }; }
5524 fi
5525
5526 fi
5527
5528 if test -n "$cf_ncurses_LIBS" ; then
5529         echo "$as_me:5529: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5530 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5531         cf_ncurses_SAVE="$LIBS"
5532         for p in $cf_ncurses_LIBS ; do
5533                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5534                 if test "$q" != "$LIBS" ; then
5535                         LIBS="$q"
5536                 fi
5537         done
5538         cat >conftest.$ac_ext <<_ACEOF
5539 #line 5539 "configure"
5540 #include "confdefs.h"
5541 #include <${cf_cv_ncurses_header:-curses.h}>
5542 int
5543 main ()
5544 {
5545 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5546   ;
5547   return 0;
5548 }
5549 _ACEOF
5550 rm -f conftest.$ac_objext conftest$ac_exeext
5551 if { (eval echo "$as_me:5551: \"$ac_link\"") >&5
5552   (eval $ac_link) 2>&5
5553   ac_status=$?
5554   echo "$as_me:5554: \$? = $ac_status" >&5
5555   (exit $ac_status); } &&
5556          { ac_try='test -s conftest$ac_exeext'
5557   { (eval echo "$as_me:5557: \"$ac_try\"") >&5
5558   (eval $ac_try) 2>&5
5559   ac_status=$?
5560   echo "$as_me:5560: \$? = $ac_status" >&5
5561   (exit $ac_status); }; }; then
5562   echo "$as_me:5562: result: yes" >&5
5563 echo "${ECHO_T}yes" >&6
5564 else
5565   echo "$as_me: failed program was:" >&5
5566 cat conftest.$ac_ext >&5
5567 echo "$as_me:5567: result: no" >&5
5568 echo "${ECHO_T}no" >&6
5569                  LIBS="$cf_ncurses_SAVE"
5570 fi
5571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5572 fi
5573
5574 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5575
5576 cat >>confdefs.h <<EOF
5577 #define $cf_nculib_ROOT 1
5578 EOF
5579
5580 fi
5581
5582 else
5583
5584 cf_ncuconfig_root=ncurses
5585
5586 echo "Looking for ${cf_ncuconfig_root}-config"
5587
5588 if test -n "$ac_tool_prefix"; then
5589   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5590   do
5591     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5592 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5593 echo "$as_me:5593: checking for $ac_word" >&5
5594 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5595 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5596   echo $ECHO_N "(cached) $ECHO_C" >&6
5597 else
5598   if test -n "$NCURSES_CONFIG"; then
5599   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5600 else
5601   ac_save_IFS=$IFS; IFS=$ac_path_separator
5602 ac_dummy="$PATH"
5603 for ac_dir in $ac_dummy; do
5604   IFS=$ac_save_IFS
5605   test -z "$ac_dir" && ac_dir=.
5606   $as_executable_p "$ac_dir/$ac_word" || continue
5607 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5608 echo "$as_me:5608: found $ac_dir/$ac_word" >&5
5609 break
5610 done
5611
5612 fi
5613 fi
5614 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5615 if test -n "$NCURSES_CONFIG"; then
5616   echo "$as_me:5616: result: $NCURSES_CONFIG" >&5
5617 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5618 else
5619   echo "$as_me:5619: result: no" >&5
5620 echo "${ECHO_T}no" >&6
5621 fi
5622
5623     test -n "$NCURSES_CONFIG" && break
5624   done
5625 fi
5626 if test -z "$NCURSES_CONFIG"; then
5627   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5628   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5629 do
5630   # Extract the first word of "$ac_prog", so it can be a program name with args.
5631 set dummy $ac_prog; ac_word=$2
5632 echo "$as_me:5632: checking for $ac_word" >&5
5633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5634 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5635   echo $ECHO_N "(cached) $ECHO_C" >&6
5636 else
5637   if test -n "$ac_ct_NCURSES_CONFIG"; then
5638   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5639 else
5640   ac_save_IFS=$IFS; IFS=$ac_path_separator
5641 ac_dummy="$PATH"
5642 for ac_dir in $ac_dummy; do
5643   IFS=$ac_save_IFS
5644   test -z "$ac_dir" && ac_dir=.
5645   $as_executable_p "$ac_dir/$ac_word" || continue
5646 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5647 echo "$as_me:5647: found $ac_dir/$ac_word" >&5
5648 break
5649 done
5650
5651 fi
5652 fi
5653 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5654 if test -n "$ac_ct_NCURSES_CONFIG"; then
5655   echo "$as_me:5655: result: $ac_ct_NCURSES_CONFIG" >&5
5656 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5657 else
5658   echo "$as_me:5658: result: no" >&5
5659 echo "${ECHO_T}no" >&6
5660 fi
5661
5662   test -n "$ac_ct_NCURSES_CONFIG" && break
5663 done
5664 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5665
5666   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5667 fi
5668
5669 if test "$NCURSES_CONFIG" != none ; then
5670
5671 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5672
5673 cf_add_libs="`$NCURSES_CONFIG --libs`"
5674 # Filter out duplicates - this happens with badly-designed ".pc" files...
5675 for cf_add_1lib in $LIBS
5676 do
5677         for cf_add_2lib in $cf_add_libs
5678         do
5679                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5680                 then
5681                         cf_add_1lib=
5682                         break
5683                 fi
5684         done
5685         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5686 done
5687 LIBS="$cf_add_libs"
5688
5689 # even with config script, some packages use no-override for curses.h
5690
5691 echo "$as_me:5691: checking if we have identified curses headers" >&5
5692 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5693 if test "${cf_cv_ncurses_header+set}" = set; then
5694   echo $ECHO_N "(cached) $ECHO_C" >&6
5695 else
5696
5697 cf_cv_ncurses_header=none
5698 for cf_header in  \
5699     ncurses/ncurses.h \
5700         ncurses/curses.h \
5701         ncurses.h \
5702         curses.h
5703 do
5704 cat >conftest.$ac_ext <<_ACEOF
5705 #line 5705 "configure"
5706 #include "confdefs.h"
5707 #include <${cf_header}>
5708 int
5709 main ()
5710 {
5711 initscr(); tgoto("?", 0,0)
5712   ;
5713   return 0;
5714 }
5715 _ACEOF
5716 rm -f conftest.$ac_objext
5717 if { (eval echo "$as_me:5717: \"$ac_compile\"") >&5
5718   (eval $ac_compile) 2>&5
5719   ac_status=$?
5720   echo "$as_me:5720: \$? = $ac_status" >&5
5721   (exit $ac_status); } &&
5722          { ac_try='test -s conftest.$ac_objext'
5723   { (eval echo "$as_me:5723: \"$ac_try\"") >&5
5724   (eval $ac_try) 2>&5
5725   ac_status=$?
5726   echo "$as_me:5726: \$? = $ac_status" >&5
5727   (exit $ac_status); }; }; then
5728   cf_cv_ncurses_header=$cf_header; break
5729 else
5730   echo "$as_me: failed program was:" >&5
5731 cat conftest.$ac_ext >&5
5732 fi
5733 rm -f conftest.$ac_objext conftest.$ac_ext
5734 done
5735
5736 fi
5737 echo "$as_me:5737: result: $cf_cv_ncurses_header" >&5
5738 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5739
5740 if test "$cf_cv_ncurses_header" = none ; then
5741         { { echo "$as_me:5741: error: No curses header-files found" >&5
5742 echo "$as_me: error: No curses header-files found" >&2;}
5743    { (exit 1); exit 1; }; }
5744 fi
5745
5746 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5747
5748 for ac_header in $cf_cv_ncurses_header
5749 do
5750 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5751 echo "$as_me:5751: checking for $ac_header" >&5
5752 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5753 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5754   echo $ECHO_N "(cached) $ECHO_C" >&6
5755 else
5756   cat >conftest.$ac_ext <<_ACEOF
5757 #line 5757 "configure"
5758 #include "confdefs.h"
5759 #include <$ac_header>
5760 _ACEOF
5761 if { (eval echo "$as_me:5761: \"$ac_cpp conftest.$ac_ext\"") >&5
5762   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5763   ac_status=$?
5764   egrep -v '^ *\+' conftest.er1 >conftest.err
5765   rm -f conftest.er1
5766   cat conftest.err >&5
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); } >/dev/null; then
5769   if test -s conftest.err; then
5770     ac_cpp_err=$ac_c_preproc_warn_flag
5771   else
5772     ac_cpp_err=
5773   fi
5774 else
5775   ac_cpp_err=yes
5776 fi
5777 if test -z "$ac_cpp_err"; then
5778   eval "$as_ac_Header=yes"
5779 else
5780   echo "$as_me: failed program was:" >&5
5781   cat conftest.$ac_ext >&5
5782   eval "$as_ac_Header=no"
5783 fi
5784 rm -f conftest.err conftest.$ac_ext
5785 fi
5786 echo "$as_me:5786: result: `eval echo '${'$as_ac_Header'}'`" >&5
5787 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5788 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5789   cat >>confdefs.h <<EOF
5790 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5791 EOF
5792
5793 fi
5794 done
5795
5796 cat >>confdefs.h <<\EOF
5797 #define NCURSES 1
5798 EOF
5799
5800 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5801
5802 cat >>confdefs.h <<EOF
5803 #define $cf_nculib_ROOT 1
5804 EOF
5805
5806 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5807
5808 else
5809
5810 cf_ncuhdr_root=ncurses
5811
5812 test -n "$cf_cv_curses_dir" && \
5813 test "$cf_cv_curses_dir" != "no" && { \
5814
5815 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5816   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5817   do
5818         while test $cf_add_incdir != /usr/include
5819         do
5820           if test -d $cf_add_incdir
5821           then
5822                 cf_have_incdir=no
5823                 if test -n "$CFLAGS$CPPFLAGS" ; then
5824                   # a loop is needed to ensure we can add subdirs of existing dirs
5825                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5826                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5827                           cf_have_incdir=yes; break
5828                         fi
5829                   done
5830                 fi
5831
5832                 if test "$cf_have_incdir" = no ; then
5833                   if test "$cf_add_incdir" = /usr/local/include ; then
5834                         if test "$GCC" = yes
5835                         then
5836                           cf_save_CPPFLAGS=$CPPFLAGS
5837                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5838                           cat >conftest.$ac_ext <<_ACEOF
5839 #line 5839 "configure"
5840 #include "confdefs.h"
5841 #include <stdio.h>
5842 int
5843 main ()
5844 {
5845 printf("Hello")
5846   ;
5847   return 0;
5848 }
5849 _ACEOF
5850 rm -f conftest.$ac_objext
5851 if { (eval echo "$as_me:5851: \"$ac_compile\"") >&5
5852   (eval $ac_compile) 2>&5
5853   ac_status=$?
5854   echo "$as_me:5854: \$? = $ac_status" >&5
5855   (exit $ac_status); } &&
5856          { ac_try='test -s conftest.$ac_objext'
5857   { (eval echo "$as_me:5857: \"$ac_try\"") >&5
5858   (eval $ac_try) 2>&5
5859   ac_status=$?
5860   echo "$as_me:5860: \$? = $ac_status" >&5
5861   (exit $ac_status); }; }; then
5862   :
5863 else
5864   echo "$as_me: failed program was:" >&5
5865 cat conftest.$ac_ext >&5
5866 cf_have_incdir=yes
5867 fi
5868 rm -f conftest.$ac_objext conftest.$ac_ext
5869                           CPPFLAGS=$cf_save_CPPFLAGS
5870                         fi
5871                   fi
5872                 fi
5873
5874                 if test "$cf_have_incdir" = no ; then
5875                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5876
5877 echo "${as_me:-configure}:5877: testing adding $cf_add_incdir to include-path ..." 1>&5
5878
5879                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5880
5881                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5882                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5883                   cf_add_incdir="$cf_top_incdir"
5884                 else
5885                   break
5886                 fi
5887           fi
5888         done
5889   done
5890 fi
5891
5892 }
5893
5894 echo "$as_me:5894: checking for $cf_ncuhdr_root header in include-path" >&5
5895 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5896 if test "${cf_cv_ncurses_h+set}" = set; then
5897   echo $ECHO_N "(cached) $ECHO_C" >&6
5898 else
5899
5900         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5901         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5902         for cf_header in $cf_header_list
5903         do
5904
5905         cat >conftest.$ac_ext <<_ACEOF
5906 #line 5906 "configure"
5907 #include "confdefs.h"
5908
5909 #include <$cf_header>
5910 int
5911 main ()
5912 {
5913
5914 #ifdef NCURSES_VERSION
5915
5916 printf("%s\n", NCURSES_VERSION);
5917 #else
5918 #ifdef __NCURSES_H
5919 printf("old\n");
5920 #else
5921         make an error
5922 #endif
5923 #endif
5924
5925   ;
5926   return 0;
5927 }
5928 _ACEOF
5929 rm -f conftest.$ac_objext
5930 if { (eval echo "$as_me:5930: \"$ac_compile\"") >&5
5931   (eval $ac_compile) 2>&5
5932   ac_status=$?
5933   echo "$as_me:5933: \$? = $ac_status" >&5
5934   (exit $ac_status); } &&
5935          { ac_try='test -s conftest.$ac_objext'
5936   { (eval echo "$as_me:5936: \"$ac_try\"") >&5
5937   (eval $ac_try) 2>&5
5938   ac_status=$?
5939   echo "$as_me:5939: \$? = $ac_status" >&5
5940   (exit $ac_status); }; }; then
5941   cf_cv_ncurses_h=$cf_header
5942
5943 else
5944   echo "$as_me: failed program was:" >&5
5945 cat conftest.$ac_ext >&5
5946 cf_cv_ncurses_h=no
5947 fi
5948 rm -f conftest.$ac_objext conftest.$ac_ext
5949
5950                 test "$cf_cv_ncurses_h" != no && break
5951         done
5952
5953 fi
5954 echo "$as_me:5954: result: $cf_cv_ncurses_h" >&5
5955 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5956
5957 if test "$cf_cv_ncurses_h" != no ; then
5958         cf_cv_ncurses_header=$cf_cv_ncurses_h
5959 else
5960
5961 echo "$as_me:5961: checking for $cf_ncuhdr_root include-path" >&5
5962 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5963 if test "${cf_cv_ncurses_h2+set}" = set; then
5964   echo $ECHO_N "(cached) $ECHO_C" >&6
5965 else
5966
5967         test -n "$verbose" && echo
5968
5969 cf_search=
5970
5971 # collect the current set of include-directories from compiler flags
5972 cf_header_path_list=""
5973 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5974         for cf_header_path in $CPPFLAGS $CFLAGS
5975         do
5976                 case $cf_header_path in #(vi
5977                 -I*)
5978                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5979
5980 test "x$cf_header_path" != "xNONE" && \
5981 test -d "$cf_header_path" && \
5982  {
5983         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
5984         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
5985         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5986         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5987         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5988         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"
5989 }
5990
5991                         cf_header_path_list="$cf_header_path_list $cf_search"
5992                         ;;
5993                 esac
5994         done
5995 fi
5996
5997 # add the variations for the package we are looking for
5998
5999 cf_search=
6000
6001 test "x$prefix" != "xNONE" && \
6002 test -d "$prefix" && \
6003  {
6004         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6005         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6006         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6007         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6008         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6009         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6010 }
6011
6012 for cf_subdir_prefix in \
6013         /usr \
6014         /usr/local \
6015         /usr/pkg \
6016         /opt \
6017         /opt/local \
6018         $HOME
6019 do
6020
6021 test "x$cf_subdir_prefix" != "x$prefix" && \
6022 test -d "$cf_subdir_prefix" && \
6023 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6024         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
6025         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
6026         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6027         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6028         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6029         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6030 }
6031
6032 done
6033
6034 test "$includedir" != NONE && \
6035 test "$includedir" != "/usr/include" && \
6036 test -d "$includedir" && {
6037         test -d $includedir &&    cf_search="$cf_search $includedir"
6038         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6039 }
6040
6041 test "$oldincludedir" != NONE && \
6042 test "$oldincludedir" != "/usr/include" && \
6043 test -d "$oldincludedir" && {
6044         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6045         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6046 }
6047
6048 cf_search="$cf_search $cf_header_path_list"
6049
6050         test -n "$verbose" && echo search path $cf_search
6051         cf_save2_CPPFLAGS="$CPPFLAGS"
6052         for cf_incdir in $cf_search
6053         do
6054
6055 if test -n "$cf_incdir" ; then
6056   for cf_add_incdir in $cf_incdir
6057   do
6058         while test $cf_add_incdir != /usr/include
6059         do
6060           if test -d $cf_add_incdir
6061           then
6062                 cf_have_incdir=no
6063                 if test -n "$CFLAGS$CPPFLAGS" ; then
6064                   # a loop is needed to ensure we can add subdirs of existing dirs
6065                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6066                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6067                           cf_have_incdir=yes; break
6068                         fi
6069                   done
6070                 fi
6071
6072                 if test "$cf_have_incdir" = no ; then
6073                   if test "$cf_add_incdir" = /usr/local/include ; then
6074                         if test "$GCC" = yes
6075                         then
6076                           cf_save_CPPFLAGS=$CPPFLAGS
6077                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6078                           cat >conftest.$ac_ext <<_ACEOF
6079 #line 6079 "configure"
6080 #include "confdefs.h"
6081 #include <stdio.h>
6082 int
6083 main ()
6084 {
6085 printf("Hello")
6086   ;
6087   return 0;
6088 }
6089 _ACEOF
6090 rm -f conftest.$ac_objext
6091 if { (eval echo "$as_me:6091: \"$ac_compile\"") >&5
6092   (eval $ac_compile) 2>&5
6093   ac_status=$?
6094   echo "$as_me:6094: \$? = $ac_status" >&5
6095   (exit $ac_status); } &&
6096          { ac_try='test -s conftest.$ac_objext'
6097   { (eval echo "$as_me:6097: \"$ac_try\"") >&5
6098   (eval $ac_try) 2>&5
6099   ac_status=$?
6100   echo "$as_me:6100: \$? = $ac_status" >&5
6101   (exit $ac_status); }; }; then
6102   :
6103 else
6104   echo "$as_me: failed program was:" >&5
6105 cat conftest.$ac_ext >&5
6106 cf_have_incdir=yes
6107 fi
6108 rm -f conftest.$ac_objext conftest.$ac_ext
6109                           CPPFLAGS=$cf_save_CPPFLAGS
6110                         fi
6111                   fi
6112                 fi
6113
6114                 if test "$cf_have_incdir" = no ; then
6115                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6116
6117 echo "${as_me:-configure}:6117: testing adding $cf_add_incdir to include-path ..." 1>&5
6118
6119                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6120
6121                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6122                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6123                   cf_add_incdir="$cf_top_incdir"
6124                 else
6125                   break
6126                 fi
6127           fi
6128         done
6129   done
6130 fi
6131
6132                 for cf_header in \
6133                         ncurses.h \
6134                         curses.h
6135                 do
6136
6137         cat >conftest.$ac_ext <<_ACEOF
6138 #line 6138 "configure"
6139 #include "confdefs.h"
6140
6141 #include <$cf_header>
6142 int
6143 main ()
6144 {
6145
6146 #ifdef NCURSES_VERSION
6147
6148 printf("%s\n", NCURSES_VERSION);
6149 #else
6150 #ifdef __NCURSES_H
6151 printf("old\n");
6152 #else
6153         make an error
6154 #endif
6155 #endif
6156
6157   ;
6158   return 0;
6159 }
6160 _ACEOF
6161 rm -f conftest.$ac_objext
6162 if { (eval echo "$as_me:6162: \"$ac_compile\"") >&5
6163   (eval $ac_compile) 2>&5
6164   ac_status=$?
6165   echo "$as_me:6165: \$? = $ac_status" >&5
6166   (exit $ac_status); } &&
6167          { ac_try='test -s conftest.$ac_objext'
6168   { (eval echo "$as_me:6168: \"$ac_try\"") >&5
6169   (eval $ac_try) 2>&5
6170   ac_status=$?
6171   echo "$as_me:6171: \$? = $ac_status" >&5
6172   (exit $ac_status); }; }; then
6173   cf_cv_ncurses_h2=$cf_header
6174
6175 else
6176   echo "$as_me: failed program was:" >&5
6177 cat conftest.$ac_ext >&5
6178 cf_cv_ncurses_h2=no
6179 fi
6180 rm -f conftest.$ac_objext conftest.$ac_ext
6181
6182                         if test "$cf_cv_ncurses_h2" != no ; then
6183                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6184                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6185                                 break
6186                         fi
6187                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6188                 done
6189                 CPPFLAGS="$cf_save2_CPPFLAGS"
6190                 test "$cf_cv_ncurses_h2" != no && break
6191         done
6192         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6192: error: not found" >&5
6193 echo "$as_me: error: not found" >&2;}
6194    { (exit 1); exit 1; }; }
6195
6196 fi
6197 echo "$as_me:6197: result: $cf_cv_ncurses_h2" >&5
6198 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6199
6200         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6201         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6202         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6203                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6204         fi
6205
6206 if test -n "$cf_1st_incdir" ; then
6207   for cf_add_incdir in $cf_1st_incdir
6208   do
6209         while test $cf_add_incdir != /usr/include
6210         do
6211           if test -d $cf_add_incdir
6212           then
6213                 cf_have_incdir=no
6214                 if test -n "$CFLAGS$CPPFLAGS" ; then
6215                   # a loop is needed to ensure we can add subdirs of existing dirs
6216                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6217                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6218                           cf_have_incdir=yes; break
6219                         fi
6220                   done
6221                 fi
6222
6223                 if test "$cf_have_incdir" = no ; then
6224                   if test "$cf_add_incdir" = /usr/local/include ; then
6225                         if test "$GCC" = yes
6226                         then
6227                           cf_save_CPPFLAGS=$CPPFLAGS
6228                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6229                           cat >conftest.$ac_ext <<_ACEOF
6230 #line 6230 "configure"
6231 #include "confdefs.h"
6232 #include <stdio.h>
6233 int
6234 main ()
6235 {
6236 printf("Hello")
6237   ;
6238   return 0;
6239 }
6240 _ACEOF
6241 rm -f conftest.$ac_objext
6242 if { (eval echo "$as_me:6242: \"$ac_compile\"") >&5
6243   (eval $ac_compile) 2>&5
6244   ac_status=$?
6245   echo "$as_me:6245: \$? = $ac_status" >&5
6246   (exit $ac_status); } &&
6247          { ac_try='test -s conftest.$ac_objext'
6248   { (eval echo "$as_me:6248: \"$ac_try\"") >&5
6249   (eval $ac_try) 2>&5
6250   ac_status=$?
6251   echo "$as_me:6251: \$? = $ac_status" >&5
6252   (exit $ac_status); }; }; then
6253   :
6254 else
6255   echo "$as_me: failed program was:" >&5
6256 cat conftest.$ac_ext >&5
6257 cf_have_incdir=yes
6258 fi
6259 rm -f conftest.$ac_objext conftest.$ac_ext
6260                           CPPFLAGS=$cf_save_CPPFLAGS
6261                         fi
6262                   fi
6263                 fi
6264
6265                 if test "$cf_have_incdir" = no ; then
6266                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6267
6268 echo "${as_me:-configure}:6268: testing adding $cf_add_incdir to include-path ..." 1>&5
6269
6270                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6271
6272                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6273                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6274                   cf_add_incdir="$cf_top_incdir"
6275                 else
6276                   break
6277                 fi
6278           fi
6279         done
6280   done
6281 fi
6282
6283 fi
6284
6285 # Set definitions to allow ifdef'ing for ncurses.h
6286
6287 case $cf_cv_ncurses_header in # (vi
6288 *ncurses.h)
6289
6290 cat >>confdefs.h <<\EOF
6291 #define HAVE_NCURSES_H 1
6292 EOF
6293
6294         ;;
6295 esac
6296
6297 case $cf_cv_ncurses_header in # (vi
6298 ncurses/curses.h|ncurses/ncurses.h)
6299
6300 cat >>confdefs.h <<\EOF
6301 #define HAVE_NCURSES_NCURSES_H 1
6302 EOF
6303
6304         ;;
6305 ncursesw/curses.h|ncursesw/ncurses.h)
6306
6307 cat >>confdefs.h <<\EOF
6308 #define HAVE_NCURSESW_NCURSES_H 1
6309 EOF
6310
6311         ;;
6312 esac
6313
6314 echo "$as_me:6314: checking for terminfo header" >&5
6315 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6316 if test "${cf_cv_term_header+set}" = set; then
6317   echo $ECHO_N "(cached) $ECHO_C" >&6
6318 else
6319
6320 case ${cf_cv_ncurses_header} in #(vi
6321 */ncurses.h|*/ncursesw.h) #(vi
6322         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6323         ;;
6324 *)
6325         cf_term_header=term.h
6326         ;;
6327 esac
6328
6329 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6330 do
6331 cat >conftest.$ac_ext <<_ACEOF
6332 #line 6332 "configure"
6333 #include "confdefs.h"
6334 #include <stdio.h>
6335 #include <${cf_cv_ncurses_header:-curses.h}>
6336 #include <$cf_test>
6337
6338 int
6339 main ()
6340 {
6341 int x = auto_left_margin
6342   ;
6343   return 0;
6344 }
6345 _ACEOF
6346 rm -f conftest.$ac_objext
6347 if { (eval echo "$as_me:6347: \"$ac_compile\"") >&5
6348   (eval $ac_compile) 2>&5
6349   ac_status=$?
6350   echo "$as_me:6350: \$? = $ac_status" >&5
6351   (exit $ac_status); } &&
6352          { ac_try='test -s conftest.$ac_objext'
6353   { (eval echo "$as_me:6353: \"$ac_try\"") >&5
6354   (eval $ac_try) 2>&5
6355   ac_status=$?
6356   echo "$as_me:6356: \$? = $ac_status" >&5
6357   (exit $ac_status); }; }; then
6358
6359         cf_cv_term_header="$cf_test"
6360 else
6361   echo "$as_me: failed program was:" >&5
6362 cat conftest.$ac_ext >&5
6363
6364         cf_cv_term_header=unknown
6365
6366 fi
6367 rm -f conftest.$ac_objext conftest.$ac_ext
6368         test "$cf_cv_term_header" != unknown && break
6369 done
6370
6371 fi
6372 echo "$as_me:6372: result: $cf_cv_term_header" >&5
6373 echo "${ECHO_T}$cf_cv_term_header" >&6
6374
6375 # Set definitions to allow ifdef'ing to accommodate subdirectories
6376
6377 case $cf_cv_term_header in # (vi
6378 *term.h)
6379
6380 cat >>confdefs.h <<\EOF
6381 #define HAVE_TERM_H 1
6382 EOF
6383
6384         ;;
6385 esac
6386
6387 case $cf_cv_term_header in # (vi
6388 ncurses/term.h) #(vi
6389
6390 cat >>confdefs.h <<\EOF
6391 #define HAVE_NCURSES_TERM_H 1
6392 EOF
6393
6394         ;;
6395 ncursesw/term.h)
6396
6397 cat >>confdefs.h <<\EOF
6398 #define HAVE_NCURSESW_TERM_H 1
6399 EOF
6400
6401         ;;
6402 esac
6403
6404 # some applications need this, but should check for NCURSES_VERSION
6405
6406 cat >>confdefs.h <<\EOF
6407 #define NCURSES 1
6408 EOF
6409
6410 echo "$as_me:6410: checking for ncurses version" >&5
6411 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6412 if test "${cf_cv_ncurses_version+set}" = set; then
6413   echo $ECHO_N "(cached) $ECHO_C" >&6
6414 else
6415
6416         cf_cv_ncurses_version=no
6417         cf_tempfile=out$$
6418         rm -f $cf_tempfile
6419         if test "$cross_compiling" = yes; then
6420
6421         # This will not work if the preprocessor splits the line after the
6422         # Autoconf token.  The 'unproto' program does that.
6423         cat > conftest.$ac_ext <<EOF
6424 #include <${cf_cv_ncurses_header:-curses.h}>
6425 #undef Autoconf
6426 #ifdef NCURSES_VERSION
6427 Autoconf NCURSES_VERSION
6428 #else
6429 #ifdef __NCURSES_H
6430 Autoconf "old"
6431 #endif
6432 ;
6433 #endif
6434 EOF
6435         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6436         { (eval echo "$as_me:6436: \"$cf_try\"") >&5
6437   (eval $cf_try) 2>&5
6438   ac_status=$?
6439   echo "$as_me:6439: \$? = $ac_status" >&5
6440   (exit $ac_status); }
6441         if test -f conftest.out ; then
6442                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6443                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6444                 rm -f conftest.out
6445         fi
6446
6447 else
6448   cat >conftest.$ac_ext <<_ACEOF
6449 #line 6449 "configure"
6450 #include "confdefs.h"
6451
6452 #include <${cf_cv_ncurses_header:-curses.h}>
6453 #include <stdio.h>
6454 int main()
6455 {
6456         FILE *fp = fopen("$cf_tempfile", "w");
6457 #ifdef NCURSES_VERSION
6458 # ifdef NCURSES_VERSION_PATCH
6459         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6460 # else
6461         fprintf(fp, "%s\n", NCURSES_VERSION);
6462 # endif
6463 #else
6464 # ifdef __NCURSES_H
6465         fprintf(fp, "old\n");
6466 # else
6467         make an error
6468 # endif
6469 #endif
6470         ${cf_cv_main_return:-return}(0);
6471 }
6472 _ACEOF
6473 rm -f conftest$ac_exeext
6474 if { (eval echo "$as_me:6474: \"$ac_link\"") >&5
6475   (eval $ac_link) 2>&5
6476   ac_status=$?
6477   echo "$as_me:6477: \$? = $ac_status" >&5
6478   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6479   { (eval echo "$as_me:6479: \"$ac_try\"") >&5
6480   (eval $ac_try) 2>&5
6481   ac_status=$?
6482   echo "$as_me:6482: \$? = $ac_status" >&5
6483   (exit $ac_status); }; }; then
6484
6485         cf_cv_ncurses_version=`cat $cf_tempfile`
6486 else
6487   echo "$as_me: program exited with status $ac_status" >&5
6488 echo "$as_me: failed program was:" >&5
6489 cat conftest.$ac_ext >&5
6490 fi
6491 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6492 fi
6493         rm -f $cf_tempfile
6494
6495 fi
6496 echo "$as_me:6496: result: $cf_cv_ncurses_version" >&5
6497 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6498 test "$cf_cv_ncurses_version" = no ||
6499 cat >>confdefs.h <<\EOF
6500 #define NCURSES 1
6501 EOF
6502
6503 cf_nculib_root=ncurses
6504         # This works, except for the special case where we find gpm, but
6505         # ncurses is in a nonstandard location via $LIBS, and we really want
6506         # to link gpm.
6507 cf_ncurses_LIBS=""
6508 cf_ncurses_SAVE="$LIBS"
6509 echo "$as_me:6509: checking for Gpm_Open in -lgpm" >&5
6510 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6511 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6512   echo $ECHO_N "(cached) $ECHO_C" >&6
6513 else
6514   ac_check_lib_save_LIBS=$LIBS
6515 LIBS="-lgpm  $LIBS"
6516 cat >conftest.$ac_ext <<_ACEOF
6517 #line 6517 "configure"
6518 #include "confdefs.h"
6519
6520 /* Override any gcc2 internal prototype to avoid an error.  */
6521 #ifdef __cplusplus
6522 extern "C"
6523 #endif
6524 /* We use char because int might match the return type of a gcc2
6525    builtin and then its argument prototype would still apply.  */
6526 char Gpm_Open ();
6527 int
6528 main ()
6529 {
6530 Gpm_Open ();
6531   ;
6532   return 0;
6533 }
6534 _ACEOF
6535 rm -f conftest.$ac_objext conftest$ac_exeext
6536 if { (eval echo "$as_me:6536: \"$ac_link\"") >&5
6537   (eval $ac_link) 2>&5
6538   ac_status=$?
6539   echo "$as_me:6539: \$? = $ac_status" >&5
6540   (exit $ac_status); } &&
6541          { ac_try='test -s conftest$ac_exeext'
6542   { (eval echo "$as_me:6542: \"$ac_try\"") >&5
6543   (eval $ac_try) 2>&5
6544   ac_status=$?
6545   echo "$as_me:6545: \$? = $ac_status" >&5
6546   (exit $ac_status); }; }; then
6547   ac_cv_lib_gpm_Gpm_Open=yes
6548 else
6549   echo "$as_me: failed program was:" >&5
6550 cat conftest.$ac_ext >&5
6551 ac_cv_lib_gpm_Gpm_Open=no
6552 fi
6553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6554 LIBS=$ac_check_lib_save_LIBS
6555 fi
6556 echo "$as_me:6556: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6557 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6558 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6559   echo "$as_me:6559: checking for initscr in -lgpm" >&5
6560 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6561 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6562   echo $ECHO_N "(cached) $ECHO_C" >&6
6563 else
6564   ac_check_lib_save_LIBS=$LIBS
6565 LIBS="-lgpm  $LIBS"
6566 cat >conftest.$ac_ext <<_ACEOF
6567 #line 6567 "configure"
6568 #include "confdefs.h"
6569
6570 /* Override any gcc2 internal prototype to avoid an error.  */
6571 #ifdef __cplusplus
6572 extern "C"
6573 #endif
6574 /* We use char because int might match the return type of a gcc2
6575    builtin and then its argument prototype would still apply.  */
6576 char initscr ();
6577 int
6578 main ()
6579 {
6580 initscr ();
6581   ;
6582   return 0;
6583 }
6584 _ACEOF
6585 rm -f conftest.$ac_objext conftest$ac_exeext
6586 if { (eval echo "$as_me:6586: \"$ac_link\"") >&5
6587   (eval $ac_link) 2>&5
6588   ac_status=$?
6589   echo "$as_me:6589: \$? = $ac_status" >&5
6590   (exit $ac_status); } &&
6591          { ac_try='test -s conftest$ac_exeext'
6592   { (eval echo "$as_me:6592: \"$ac_try\"") >&5
6593   (eval $ac_try) 2>&5
6594   ac_status=$?
6595   echo "$as_me:6595: \$? = $ac_status" >&5
6596   (exit $ac_status); }; }; then
6597   ac_cv_lib_gpm_initscr=yes
6598 else
6599   echo "$as_me: failed program was:" >&5
6600 cat conftest.$ac_ext >&5
6601 ac_cv_lib_gpm_initscr=no
6602 fi
6603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6604 LIBS=$ac_check_lib_save_LIBS
6605 fi
6606 echo "$as_me:6606: result: $ac_cv_lib_gpm_initscr" >&5
6607 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6608 if test $ac_cv_lib_gpm_initscr = yes; then
6609   LIBS="$cf_ncurses_SAVE"
6610 else
6611   cf_ncurses_LIBS="-lgpm"
6612 fi
6613
6614 fi
6615
6616 case $host_os in #(vi
6617 freebsd*)
6618         # This is only necessary if you are linking against an obsolete
6619         # version of ncurses (but it should do no harm, since it's static).
6620         if test "$cf_nculib_root" = ncurses ; then
6621                 echo "$as_me:6621: checking for tgoto in -lmytinfo" >&5
6622 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6623 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6624   echo $ECHO_N "(cached) $ECHO_C" >&6
6625 else
6626   ac_check_lib_save_LIBS=$LIBS
6627 LIBS="-lmytinfo  $LIBS"
6628 cat >conftest.$ac_ext <<_ACEOF
6629 #line 6629 "configure"
6630 #include "confdefs.h"
6631
6632 /* Override any gcc2 internal prototype to avoid an error.  */
6633 #ifdef __cplusplus
6634 extern "C"
6635 #endif
6636 /* We use char because int might match the return type of a gcc2
6637    builtin and then its argument prototype would still apply.  */
6638 char tgoto ();
6639 int
6640 main ()
6641 {
6642 tgoto ();
6643   ;
6644   return 0;
6645 }
6646 _ACEOF
6647 rm -f conftest.$ac_objext conftest$ac_exeext
6648 if { (eval echo "$as_me:6648: \"$ac_link\"") >&5
6649   (eval $ac_link) 2>&5
6650   ac_status=$?
6651   echo "$as_me:6651: \$? = $ac_status" >&5
6652   (exit $ac_status); } &&
6653          { ac_try='test -s conftest$ac_exeext'
6654   { (eval echo "$as_me:6654: \"$ac_try\"") >&5
6655   (eval $ac_try) 2>&5
6656   ac_status=$?
6657   echo "$as_me:6657: \$? = $ac_status" >&5
6658   (exit $ac_status); }; }; then
6659   ac_cv_lib_mytinfo_tgoto=yes
6660 else
6661   echo "$as_me: failed program was:" >&5
6662 cat conftest.$ac_ext >&5
6663 ac_cv_lib_mytinfo_tgoto=no
6664 fi
6665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6666 LIBS=$ac_check_lib_save_LIBS
6667 fi
6668 echo "$as_me:6668: result: $ac_cv_lib_mytinfo_tgoto" >&5
6669 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6670 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6671   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6672 fi
6673
6674         fi
6675         ;;
6676 esac
6677
6678 cf_add_libs="$cf_ncurses_LIBS"
6679 # Filter out duplicates - this happens with badly-designed ".pc" files...
6680 for cf_add_1lib in $LIBS
6681 do
6682         for cf_add_2lib in $cf_add_libs
6683         do
6684                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6685                 then
6686                         cf_add_1lib=
6687                         break
6688                 fi
6689         done
6690         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6691 done
6692 LIBS="$cf_add_libs"
6693
6694 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6695 then
6696
6697 cf_add_libs="-l$cf_nculib_root"
6698 # Filter out duplicates - this happens with badly-designed ".pc" files...
6699 for cf_add_1lib in $LIBS
6700 do
6701         for cf_add_2lib in $cf_add_libs
6702         do
6703                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6704                 then
6705                         cf_add_1lib=
6706                         break
6707                 fi
6708         done
6709         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6710 done
6711 LIBS="$cf_add_libs"
6712
6713 else
6714
6715         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6716         cf_libdir=""
6717         echo "$as_me:6717: checking for initscr" >&5
6718 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6719 if test "${ac_cv_func_initscr+set}" = set; then
6720   echo $ECHO_N "(cached) $ECHO_C" >&6
6721 else
6722   cat >conftest.$ac_ext <<_ACEOF
6723 #line 6723 "configure"
6724 #include "confdefs.h"
6725 /* System header to define __stub macros and hopefully few prototypes,
6726     which can conflict with char initscr (); below.  */
6727 #include <assert.h>
6728 /* Override any gcc2 internal prototype to avoid an error.  */
6729 #ifdef __cplusplus
6730 extern "C"
6731 #endif
6732 /* We use char because int might match the return type of a gcc2
6733    builtin and then its argument prototype would still apply.  */
6734 char initscr ();
6735 char (*f) ();
6736
6737 int
6738 main ()
6739 {
6740 /* The GNU C library defines this for functions which it implements
6741     to always fail with ENOSYS.  Some functions are actually named
6742     something starting with __ and the normal name is an alias.  */
6743 #if defined (__stub_initscr) || defined (__stub___initscr)
6744 choke me
6745 #else
6746 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6747 #endif
6748
6749   ;
6750   return 0;
6751 }
6752 _ACEOF
6753 rm -f conftest.$ac_objext conftest$ac_exeext
6754 if { (eval echo "$as_me:6754: \"$ac_link\"") >&5
6755   (eval $ac_link) 2>&5
6756   ac_status=$?
6757   echo "$as_me:6757: \$? = $ac_status" >&5
6758   (exit $ac_status); } &&
6759          { ac_try='test -s conftest$ac_exeext'
6760   { (eval echo "$as_me:6760: \"$ac_try\"") >&5
6761   (eval $ac_try) 2>&5
6762   ac_status=$?
6763   echo "$as_me:6763: \$? = $ac_status" >&5
6764   (exit $ac_status); }; }; then
6765   ac_cv_func_initscr=yes
6766 else
6767   echo "$as_me: failed program was:" >&5
6768 cat conftest.$ac_ext >&5
6769 ac_cv_func_initscr=no
6770 fi
6771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6772 fi
6773 echo "$as_me:6773: result: $ac_cv_func_initscr" >&5
6774 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6775 if test $ac_cv_func_initscr = yes; then
6776   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6777 else
6778
6779                 cf_save_LIBS="$LIBS"
6780                 echo "$as_me:6780: checking for initscr in -l$cf_nculib_root" >&5
6781 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6782                 LIBS="-l$cf_nculib_root $LIBS"
6783                 cat >conftest.$ac_ext <<_ACEOF
6784 #line 6784 "configure"
6785 #include "confdefs.h"
6786 #include <${cf_cv_ncurses_header:-curses.h}>
6787 int
6788 main ()
6789 {
6790 initscr()
6791   ;
6792   return 0;
6793 }
6794 _ACEOF
6795 rm -f conftest.$ac_objext conftest$ac_exeext
6796 if { (eval echo "$as_me:6796: \"$ac_link\"") >&5
6797   (eval $ac_link) 2>&5
6798   ac_status=$?
6799   echo "$as_me:6799: \$? = $ac_status" >&5
6800   (exit $ac_status); } &&
6801          { ac_try='test -s conftest$ac_exeext'
6802   { (eval echo "$as_me:6802: \"$ac_try\"") >&5
6803   (eval $ac_try) 2>&5
6804   ac_status=$?
6805   echo "$as_me:6805: \$? = $ac_status" >&5
6806   (exit $ac_status); }; }; then
6807   echo "$as_me:6807: result: yes" >&5
6808 echo "${ECHO_T}yes" >&6
6809                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6810
6811 else
6812   echo "$as_me: failed program was:" >&5
6813 cat conftest.$ac_ext >&5
6814 echo "$as_me:6814: result: no" >&5
6815 echo "${ECHO_T}no" >&6
6816
6817 cf_search=
6818 cf_library_path_list=""
6819 if test -n "${LDFLAGS}${LIBS}" ; then
6820         for cf_library_path in $LDFLAGS $LIBS
6821         do
6822                 case $cf_library_path in #(vi
6823                 -L*)
6824                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6825
6826 test "x$cf_library_path" != "xNONE" && \
6827 test -d "$cf_library_path" && \
6828  {
6829         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6830         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6831         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6832         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6833         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6834         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"
6835 }
6836
6837                         cf_library_path_list="$cf_library_path_list $cf_search"
6838                         ;;
6839                 esac
6840         done
6841 fi
6842
6843 cf_search=
6844
6845 test "x$prefix" != "xNONE" && \
6846 test -d "$prefix" && \
6847  {
6848         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6849         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6850         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6851         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6852         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6853         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6854 }
6855
6856 for cf_subdir_prefix in \
6857         /usr \
6858         /usr/local \
6859         /usr/pkg \
6860         /opt \
6861         /opt/local \
6862         $HOME
6863 do
6864
6865 test "x$cf_subdir_prefix" != "x$prefix" && \
6866 test -d "$cf_subdir_prefix" && \
6867 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6868         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
6869         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
6870         test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6871         test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6872         test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6873         test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
6874 }
6875
6876 done
6877
6878 cf_search="$cf_library_path_list $cf_search"
6879
6880                         for cf_libdir in $cf_search
6881                         do
6882                                 echo "$as_me:6882: checking for -l$cf_nculib_root in $cf_libdir" >&5
6883 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6884                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6885                                 cat >conftest.$ac_ext <<_ACEOF
6886 #line 6886 "configure"
6887 #include "confdefs.h"
6888 #include <${cf_cv_ncurses_header:-curses.h}>
6889 int
6890 main ()
6891 {
6892 initscr()
6893   ;
6894   return 0;
6895 }
6896 _ACEOF
6897 rm -f conftest.$ac_objext conftest$ac_exeext
6898 if { (eval echo "$as_me:6898: \"$ac_link\"") >&5
6899   (eval $ac_link) 2>&5
6900   ac_status=$?
6901   echo "$as_me:6901: \$? = $ac_status" >&5
6902   (exit $ac_status); } &&
6903          { ac_try='test -s conftest$ac_exeext'
6904   { (eval echo "$as_me:6904: \"$ac_try\"") >&5
6905   (eval $ac_try) 2>&5
6906   ac_status=$?
6907   echo "$as_me:6907: \$? = $ac_status" >&5
6908   (exit $ac_status); }; }; then
6909   echo "$as_me:6909: result: yes" >&5
6910 echo "${ECHO_T}yes" >&6
6911                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6912                                          break
6913 else
6914   echo "$as_me: failed program was:" >&5
6915 cat conftest.$ac_ext >&5
6916 echo "$as_me:6916: result: no" >&5
6917 echo "${ECHO_T}no" >&6
6918                                          LIBS="$cf_save_LIBS"
6919 fi
6920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6921                         done
6922
6923 fi
6924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6925
6926 fi
6927
6928 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6929
6930 if test $cf_found_library = no ; then
6931         { { echo "$as_me:6931: error: Cannot link $cf_nculib_root library" >&5
6932 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6933    { (exit 1); exit 1; }; }
6934 fi
6935
6936 fi
6937
6938 if test -n "$cf_ncurses_LIBS" ; then
6939         echo "$as_me:6939: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6940 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6941         cf_ncurses_SAVE="$LIBS"
6942         for p in $cf_ncurses_LIBS ; do
6943                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6944                 if test "$q" != "$LIBS" ; then
6945                         LIBS="$q"
6946                 fi
6947         done
6948         cat >conftest.$ac_ext <<_ACEOF
6949 #line 6949 "configure"
6950 #include "confdefs.h"
6951 #include <${cf_cv_ncurses_header:-curses.h}>
6952 int
6953 main ()
6954 {
6955 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6956   ;
6957   return 0;
6958 }
6959 _ACEOF
6960 rm -f conftest.$ac_objext conftest$ac_exeext
6961 if { (eval echo "$as_me:6961: \"$ac_link\"") >&5
6962   (eval $ac_link) 2>&5
6963   ac_status=$?
6964   echo "$as_me:6964: \$? = $ac_status" >&5
6965   (exit $ac_status); } &&
6966          { ac_try='test -s conftest$ac_exeext'
6967   { (eval echo "$as_me:6967: \"$ac_try\"") >&5
6968   (eval $ac_try) 2>&5
6969   ac_status=$?
6970   echo "$as_me:6970: \$? = $ac_status" >&5
6971   (exit $ac_status); }; }; then
6972   echo "$as_me:6972: result: yes" >&5
6973 echo "${ECHO_T}yes" >&6
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 cat conftest.$ac_ext >&5
6977 echo "$as_me:6977: result: no" >&5
6978 echo "${ECHO_T}no" >&6
6979                  LIBS="$cf_ncurses_SAVE"
6980 fi
6981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6982 fi
6983
6984 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6985
6986 cat >>confdefs.h <<EOF
6987 #define $cf_nculib_ROOT 1
6988 EOF
6989
6990 fi
6991
6992 fi
6993
6994 if test "$NCURSES_CONFIG" != none ; then
6995
6996 cf_version=`$NCURSES_CONFIG --version`
6997
6998 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
6999 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7000 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7001
7002 # ABI version is not available from headers
7003 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7004
7005 else
7006
7007 for cf_name in MAJOR MINOR PATCH
7008 do
7009 cat >conftest.$ac_ext <<CF_EOF
7010 #include <${cf_cv_ncurses_header:-curses.h}>
7011 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7012 CF_EOF
7013         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7014         { (eval echo "$as_me:7014: \"$cf_try\"") >&5
7015   (eval $cf_try) 2>&5
7016   ac_status=$?
7017   echo "$as_me:7017: \$? = $ac_status" >&5
7018   (exit $ac_status); }
7019         if test -f conftest.out ; then
7020                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7021                 eval NCURSES_$cf_name=\"$cf_result\"
7022                 # cat conftest.$ac_ext
7023                 # cat conftest.out
7024         fi
7025 done
7026
7027 cf_cv_abi_version=${NCURSES_MAJOR}
7028
7029 fi
7030
7031 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7032
7033 cf_cv_timestamp=`date`
7034
7035 echo "$as_me:7035: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7036 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7037
7038 echo "$as_me:7038: checking if you want to have a library-prefix" >&5
7039 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
7040
7041 # Check whether --with-lib-prefix or --without-lib-prefix was given.
7042 if test "${with_lib_prefix+set}" = set; then
7043   withval="$with_lib_prefix"
7044   with_lib_prefix=$withval
7045 else
7046   with_lib_prefix=auto
7047 fi;
7048 echo "$as_me:7048: result: $with_lib_prefix" >&5
7049 echo "${ECHO_T}$with_lib_prefix" >&6
7050
7051 if test $with_lib_prefix = auto
7052 then
7053
7054         case $cf_cv_system_name in #(vi
7055         OS/2*|os2*) #(vi
7056         LIB_PREFIX=''
7057         ;;
7058         *)      LIB_PREFIX='lib'
7059         ;;
7060         esac
7061 cf_prefix=$LIB_PREFIX
7062
7063 elif test $with_lib_prefix = no
7064 then
7065         LIB_PREFIX=
7066 else
7067         LIB_PREFIX=$with_lib_prefix
7068 fi
7069
7070 LIB_SUFFIX=
7071
7072 ###############################################################################
7073
7074 if test X"$CC_G_OPT" = X"" ; then
7075         CC_G_OPT='-g'
7076         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7077 fi
7078
7079 echo "$as_me:7079: checking for default loader flags" >&5
7080 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7081 case $DFT_LWR_MODEL in
7082 normal)  LD_MODEL=''   ;;
7083 debug)   LD_MODEL=$CC_G_OPT ;;
7084 profile) LD_MODEL='-pg';;
7085 shared)  LD_MODEL=''   ;;
7086 esac
7087 echo "$as_me:7087: result: $LD_MODEL" >&5
7088 echo "${ECHO_T}$LD_MODEL" >&6
7089
7090 LD_RPATH_OPT=
7091 echo "$as_me:7091: checking for an rpath option" >&5
7092 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7093 case $cf_cv_system_name in #(vi
7094 irix*) #(vi
7095         if test "$GCC" = yes; then
7096                 LD_RPATH_OPT="-Wl,-rpath,"
7097         else
7098                 LD_RPATH_OPT="-rpath "
7099         fi
7100         ;;
7101 linux*|gnu*|k*bsd*-gnu) #(vi
7102         LD_RPATH_OPT="-Wl,-rpath,"
7103         ;;
7104 openbsd[2-9].*|mirbsd*) #(vi
7105         LD_RPATH_OPT="-Wl,-rpath,"
7106         ;;
7107 dragonfly*|freebsd*) #(vi
7108         LD_RPATH_OPT="-rpath "
7109         ;;
7110 netbsd*) #(vi
7111         LD_RPATH_OPT="-Wl,-rpath,"
7112         ;;
7113 osf*|mls+*) #(vi
7114         LD_RPATH_OPT="-rpath "
7115         ;;
7116 solaris2*) #(vi
7117         LD_RPATH_OPT="-R"
7118         ;;
7119 *)
7120         ;;
7121 esac
7122 echo "$as_me:7122: result: $LD_RPATH_OPT" >&5
7123 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7124
7125 case "x$LD_RPATH_OPT" in #(vi
7126 x-R*)
7127         echo "$as_me:7127: checking if we need a space after rpath option" >&5
7128 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7129         cf_save_LIBS="$LIBS"
7130
7131 cf_add_libs="${LD_RPATH_OPT}$libdir"
7132 # Filter out duplicates - this happens with badly-designed ".pc" files...
7133 for cf_add_1lib in $LIBS
7134 do
7135         for cf_add_2lib in $cf_add_libs
7136         do
7137                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7138                 then
7139                         cf_add_1lib=
7140                         break
7141                 fi
7142         done
7143         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7144 done
7145 LIBS="$cf_add_libs"
7146
7147         cat >conftest.$ac_ext <<_ACEOF
7148 #line 7148 "configure"
7149 #include "confdefs.h"
7150
7151 int
7152 main ()
7153 {
7154
7155   ;
7156   return 0;
7157 }
7158 _ACEOF
7159 rm -f conftest.$ac_objext conftest$ac_exeext
7160 if { (eval echo "$as_me:7160: \"$ac_link\"") >&5
7161   (eval $ac_link) 2>&5
7162   ac_status=$?
7163   echo "$as_me:7163: \$? = $ac_status" >&5
7164   (exit $ac_status); } &&
7165          { ac_try='test -s conftest$ac_exeext'
7166   { (eval echo "$as_me:7166: \"$ac_try\"") >&5
7167   (eval $ac_try) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); }; }; then
7171   cf_rpath_space=no
7172 else
7173   echo "$as_me: failed program was:" >&5
7174 cat conftest.$ac_ext >&5
7175 cf_rpath_space=yes
7176 fi
7177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7178         LIBS="$cf_save_LIBS"
7179         echo "$as_me:7179: result: $cf_rpath_space" >&5
7180 echo "${ECHO_T}$cf_rpath_space" >&6
7181         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7182         ;;
7183 esac
7184
7185         RM_SHARED_OPTS=
7186         LOCAL_LDFLAGS=
7187         LOCAL_LDFLAGS2=
7188         LD_SHARED_OPTS=
7189         INSTALL_LIB="-m 644"
7190         : ${rel_builddir:=.}
7191
7192         shlibdir=$libdir
7193
7194         MAKE_DLLS="#"
7195
7196         cf_cv_do_symlinks=no
7197         cf_ld_rpath_opt=
7198         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7199
7200         echo "$as_me:7200: checking if release/abi version should be used for shared libs" >&5
7201 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7202
7203 # Check whether --with-shlib-version or --without-shlib-version was given.
7204 if test "${with_shlib_version+set}" = set; then
7205   withval="$with_shlib_version"
7206   test -z "$withval" && withval=auto
7207         case $withval in #(vi
7208         yes) #(vi
7209                 cf_cv_shlib_version=auto
7210                 ;;
7211         rel|abi|auto|no) #(vi
7212                 cf_cv_shlib_version=$withval
7213                 ;;
7214         *)
7215                 { { echo "$as_me:7215: error: option value must be one of: rel, abi, auto or no" >&5
7216 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7217    { (exit 1); exit 1; }; }
7218                 ;;
7219         esac
7220
7221 else
7222   cf_cv_shlib_version=auto
7223 fi;
7224         echo "$as_me:7224: result: $cf_cv_shlib_version" >&5
7225 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7226
7227         cf_cv_rm_so_locs=no
7228         cf_try_cflags=
7229
7230         # Some less-capable ports of gcc support only -fpic
7231         CC_SHARED_OPTS=
7232         if test "$GCC" = yes
7233         then
7234                 echo "$as_me:7234: checking which $CC option to use" >&5
7235 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7236                 cf_save_CFLAGS="$CFLAGS"
7237                 for CC_SHARED_OPTS in -fPIC -fpic ''
7238                 do
7239                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7240                         cat >conftest.$ac_ext <<_ACEOF
7241 #line 7241 "configure"
7242 #include "confdefs.h"
7243 #include <stdio.h>
7244 int
7245 main ()
7246 {
7247 int x = 1
7248   ;
7249   return 0;
7250 }
7251 _ACEOF
7252 rm -f conftest.$ac_objext
7253 if { (eval echo "$as_me:7253: \"$ac_compile\"") >&5
7254   (eval $ac_compile) 2>&5
7255   ac_status=$?
7256   echo "$as_me:7256: \$? = $ac_status" >&5
7257   (exit $ac_status); } &&
7258          { ac_try='test -s conftest.$ac_objext'
7259   { (eval echo "$as_me:7259: \"$ac_try\"") >&5
7260   (eval $ac_try) 2>&5
7261   ac_status=$?
7262   echo "$as_me:7262: \$? = $ac_status" >&5
7263   (exit $ac_status); }; }; then
7264   break
7265 else
7266   echo "$as_me: failed program was:" >&5
7267 cat conftest.$ac_ext >&5
7268 fi
7269 rm -f conftest.$ac_objext conftest.$ac_ext
7270                 done
7271                 echo "$as_me:7271: result: $CC_SHARED_OPTS" >&5
7272 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7273                 CFLAGS="$cf_save_CFLAGS"
7274         fi
7275
7276         cf_cv_shlib_version_infix=no
7277
7278         case $cf_cv_system_name in #(vi
7279         aix4.3-9*|aix[5-7]*) #(vi
7280                 if test "$GCC" = yes; then
7281                         CC_SHARED_OPTS=
7282                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7283                 else
7284                         # CC_SHARED_OPTS='-qpic=large -G'
7285                         # perhaps "-bM:SRE -bnoentry -bexpall"
7286                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7287                 fi
7288                 ;;
7289         beos*) #(vi
7290                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7291                 ;;
7292         cygwin*) #(vi
7293                 CC_SHARED_OPTS=
7294                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7295                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7296                 cf_cv_shlib_version=cygdll
7297                 cf_cv_shlib_version_infix=cygdll
7298                 shlibdir=$bindir
7299                 MAKE_DLLS=
7300                 cat >mk_shared_lib.sh <<-CF_EOF
7301                 #!/bin/sh
7302                 SHARED_LIB=\$1
7303                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7304                 shift
7305                 cat <<-EOF
7306                 Linking shared library
7307                 ** SHARED_LIB \$SHARED_LIB
7308                 ** IMPORT_LIB \$IMPORT_LIB
7309 EOF
7310                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7311 CF_EOF
7312                 chmod +x mk_shared_lib.sh
7313                 ;;
7314         msys*) #(vi
7315                 CC_SHARED_OPTS=
7316                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7317                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7318                 cf_cv_shlib_version=msysdll
7319                 cf_cv_shlib_version_infix=msysdll
7320                 shlibdir=$bindir
7321                 MAKE_DLLS=
7322                 cat >mk_shared_lib.sh <<-CF_EOF
7323                 #!/bin/sh
7324                 SHARED_LIB=\$1
7325                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7326                 shift
7327                 cat <<-EOF
7328                 Linking shared library
7329                 ** SHARED_LIB \$SHARED_LIB
7330                 ** IMPORT_LIB \$IMPORT_LIB
7331 EOF
7332                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7333 CF_EOF
7334                 chmod +x mk_shared_lib.sh
7335                 ;;
7336         darwin*) #(vi
7337                 cf_try_cflags="no-cpp-precomp"
7338                 CC_SHARED_OPTS="-dynamic"
7339                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7340                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7341                 cf_cv_shlib_version_infix=yes
7342                 echo "$as_me:7342: checking if ld -search_paths_first works" >&5
7343 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7344 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7345   echo $ECHO_N "(cached) $ECHO_C" >&6
7346 else
7347
7348                         cf_save_LDFLAGS=$LDFLAGS
7349                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7350                         cat >conftest.$ac_ext <<_ACEOF
7351 #line 7351 "configure"
7352 #include "confdefs.h"
7353
7354 int
7355 main ()
7356 {
7357 int i;
7358   ;
7359   return 0;
7360 }
7361 _ACEOF
7362 rm -f conftest.$ac_objext conftest$ac_exeext
7363 if { (eval echo "$as_me:7363: \"$ac_link\"") >&5
7364   (eval $ac_link) 2>&5
7365   ac_status=$?
7366   echo "$as_me:7366: \$? = $ac_status" >&5
7367   (exit $ac_status); } &&
7368          { ac_try='test -s conftest$ac_exeext'
7369   { (eval echo "$as_me:7369: \"$ac_try\"") >&5
7370   (eval $ac_try) 2>&5
7371   ac_status=$?
7372   echo "$as_me:7372: \$? = $ac_status" >&5
7373   (exit $ac_status); }; }; then
7374   cf_cv_ldflags_search_paths_first=yes
7375 else
7376   echo "$as_me: failed program was:" >&5
7377 cat conftest.$ac_ext >&5
7378 cf_cv_ldflags_search_paths_first=no
7379 fi
7380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7381                                 LDFLAGS=$cf_save_LDFLAGS
7382 fi
7383 echo "$as_me:7383: result: $cf_cv_ldflags_search_paths_first" >&5
7384 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7385                 if test $cf_cv_ldflags_search_paths_first = yes; then
7386                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7387                 fi
7388                 ;;
7389         hpux[7-8]*) #(vi
7390                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
7391                 if test "$GCC" != yes; then
7392                         CC_SHARED_OPTS='+Z'
7393                 fi
7394                 MK_SHARED_LIB='${LD} -b -o $@'
7395                 INSTALL_LIB="-m 555"
7396                 ;;
7397         hpux*) #(vi
7398                 # (tested with gcc 2.7.2 -- I don't have c89)
7399                 if test "$GCC" = yes; then
7400                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7401                 else
7402                         CC_SHARED_OPTS='+Z'
7403                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7404                 fi
7405                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7406                 # HP-UX shared libraries must be executable, and should be
7407                 # readonly to exploit a quirk in the memory manager.
7408                 INSTALL_LIB="-m 555"
7409                 ;;
7410         interix*)
7411                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7412                 if test "$cf_cv_shlib_version" = rel; then
7413                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7414                 else
7415                         cf_shared_soname='`basename `'
7416                 fi
7417                 CC_SHARED_OPTS=
7418                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
7419                 ;;
7420         irix*) #(vi
7421                 if test "$cf_cv_enable_rpath" = yes ; then
7422                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7423                 fi
7424                 # tested with IRIX 5.2 and 'cc'.
7425                 if test "$GCC" != yes; then
7426                         CC_SHARED_OPTS='-KPIC'
7427                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7428                 else
7429                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7430                 fi
7431                 cf_cv_rm_so_locs=yes
7432                 ;;
7433         linux*|gnu*|k*bsd*-gnu) #(vi
7434                 if test "$DFT_LWR_MODEL" = "shared" ; then
7435                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7436                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7437                 fi
7438                 if test "$cf_cv_enable_rpath" = yes ; then
7439                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7440                 fi
7441
7442         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7443         if test "$cf_cv_shlib_version" = rel; then
7444                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7445         else
7446                 cf_cv_shared_soname='`basename $@`'
7447         fi
7448
7449                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7450                 ;;
7451         mingw*) #(vi
7452                 cf_cv_shlib_version=mingw
7453                 cf_cv_shlib_version_infix=mingw
7454                 shlibdir=$bindir
7455                 MAKE_DLLS=
7456                 if test "$DFT_LWR_MODEL" = "shared" ; then
7457                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
7458                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7459                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
7460                 fi
7461                 CC_SHARED_OPTS=
7462                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7463                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7464                 cat >mk_shared_lib.sh <<-CF_EOF
7465                 #!/bin/sh
7466                 SHARED_LIB=\$1
7467                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7468                 shift
7469                 cat <<-EOF
7470                 Linking shared library
7471                 ** SHARED_LIB \$SHARED_LIB
7472                 ** IMPORT_LIB \$IMPORT_LIB
7473 EOF
7474                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7475 CF_EOF
7476                 chmod +x mk_shared_lib.sh
7477                 ;;
7478         openbsd[2-9].*|mirbsd*) #(vi
7479                 if test "$DFT_LWR_MODEL" = "shared" ; then
7480                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7481                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7482                 fi
7483                 if test "$cf_cv_enable_rpath" = yes ; then
7484                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7485                 fi
7486                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7487
7488         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7489         if test "$cf_cv_shlib_version" = rel; then
7490                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7491         else
7492                 cf_cv_shared_soname='`basename $@`'
7493         fi
7494
7495                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7496                 ;;
7497         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7499                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7500                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7501                 ;;
7502         dragonfly*|freebsd*) #(vi
7503                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7504                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7505                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7506                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7507                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7508                 fi
7509
7510         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7511         if test "$cf_cv_shlib_version" = rel; then
7512                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7513         else
7514                 cf_cv_shared_soname='`basename $@`'
7515         fi
7516
7517                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7518                 ;;
7519         netbsd*) #(vi
7520                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7521                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7522                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7523                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7524                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7525                         if test "$cf_cv_shlib_version" = auto; then
7526                         if test -f /usr/libexec/ld.elf_so; then
7527                                 cf_cv_shlib_version=abi
7528                         else
7529                                 cf_cv_shlib_version=rel
7530                         fi
7531                         fi
7532
7533         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7534         if test "$cf_cv_shlib_version" = rel; then
7535                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7536         else
7537                 cf_cv_shared_soname='`basename $@`'
7538         fi
7539
7540                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7541                 else
7542                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
7543                 fi
7544                 ;;
7545         osf*|mls+*) #(vi
7546                 # tested with OSF/1 V3.2 and 'cc'
7547                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7548                 # link with shared libs).
7549                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7550                 case $host_os in #(vi
7551                 osf4*)
7552                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7553                         ;;
7554                 esac
7555                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7556                 if test "$DFT_LWR_MODEL" = "shared" ; then
7557                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7558                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7559                 fi
7560                 cf_cv_rm_so_locs=yes
7561                 ;;
7562         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7563                 # tested with osr5.0.5
7564                 if test "$GCC" != yes; then
7565                         CC_SHARED_OPTS='-belf -KPIC'
7566                 fi
7567                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7568                 if test "$cf_cv_enable_rpath" = yes ; then
7569                         # only way is to set LD_RUN_PATH but no switch for it
7570                         RUN_PATH=$libdir
7571                 fi
7572                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7573                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7574                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7575                 ;;
7576         sunos4*) #(vi
7577                 # tested with SunOS 4.1.1 and gcc 2.7.0
7578                 if test "$GCC" != yes; then
7579                         CC_SHARED_OPTS='-KPIC'
7580                 fi
7581                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7582                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7583                 ;;
7584         solaris2*) #(vi
7585                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7586                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7587                 if test "$DFT_LWR_MODEL" = "shared" ; then
7588                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7589                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7590                 fi
7591                 if test "$cf_cv_enable_rpath" = yes ; then
7592                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7593                 fi
7594
7595         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7596         if test "$cf_cv_shlib_version" = rel; then
7597                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7598         else
7599                 cf_cv_shared_soname='`basename $@`'
7600         fi
7601
7602                 if test "$GCC" != yes; then
7603                         cf_save_CFLAGS="$CFLAGS"
7604                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7605                         do
7606                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7607                                 cat >conftest.$ac_ext <<_ACEOF
7608 #line 7608 "configure"
7609 #include "confdefs.h"
7610 #include <stdio.h>
7611 int
7612 main ()
7613 {
7614 printf("Hello\n");
7615   ;
7616   return 0;
7617 }
7618 _ACEOF
7619 rm -f conftest.$ac_objext
7620 if { (eval echo "$as_me:7620: \"$ac_compile\"") >&5
7621   (eval $ac_compile) 2>&5
7622   ac_status=$?
7623   echo "$as_me:7623: \$? = $ac_status" >&5
7624   (exit $ac_status); } &&
7625          { ac_try='test -s conftest.$ac_objext'
7626   { (eval echo "$as_me:7626: \"$ac_try\"") >&5
7627   (eval $ac_try) 2>&5
7628   ac_status=$?
7629   echo "$as_me:7629: \$? = $ac_status" >&5
7630   (exit $ac_status); }; }; then
7631   break
7632 else
7633   echo "$as_me: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7635 fi
7636 rm -f conftest.$ac_objext conftest.$ac_ext
7637                         done
7638                         CFLAGS="$cf_save_CFLAGS"
7639                         CC_SHARED_OPTS=$cf_shared_opts
7640                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7641                 else
7642                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7643                 fi
7644                 ;;
7645         sysv5uw7*|unix_sv*) #(vi
7646                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7647                 if test "$GCC" != yes; then
7648                         CC_SHARED_OPTS='-KPIC'
7649                 fi
7650                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7651                 ;;
7652         *)
7653                 CC_SHARED_OPTS='unknown'
7654                 MK_SHARED_LIB='echo unknown'
7655                 ;;
7656         esac
7657
7658         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7659         case "$cf_cv_shlib_version" in #(vi
7660         rel|abi)
7661                 case "$MK_SHARED_LIB" in #(vi
7662                 *'-o $@') #(vi
7663                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7664                         ;;
7665                 *)
7666                         { echo "$as_me:7666: WARNING: ignored --with-shlib-version" >&5
7667 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7668                         ;;
7669                 esac
7670                 ;;
7671         esac
7672
7673         if test -n "$cf_try_cflags"
7674         then
7675 cat > conftest.$ac_ext <<EOF
7676 #line 7676 "${as_me:-configure}"
7677 #include <stdio.h>
7678 int main(int argc, char *argv[])
7679 {
7680         printf("hello\n");
7681         return (argv[argc-1] == 0) ;
7682 }
7683 EOF
7684                 cf_save_CFLAGS="$CFLAGS"
7685                 for cf_opt in $cf_try_cflags
7686                 do
7687                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7688                         echo "$as_me:7688: checking if CFLAGS option -$cf_opt works" >&5
7689 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7690                         if { (eval echo "$as_me:7690: \"$ac_compile\"") >&5
7691   (eval $ac_compile) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); }; then
7695                                 echo "$as_me:7695: result: yes" >&5
7696 echo "${ECHO_T}yes" >&6
7697                                 cf_save_CFLAGS="$CFLAGS"
7698                         else
7699                                 echo "$as_me:7699: result: no" >&5
7700 echo "${ECHO_T}no" >&6
7701                         fi
7702                 done
7703                 CFLAGS="$cf_save_CFLAGS"
7704         fi
7705
7706         # RPATH_LIST is a colon-separated list of directories
7707         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7708         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7709
7710         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7711
7712         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7713
7714 echo "${as_me:-configure}:7714: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7715
7716         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7717
7718 echo "${as_me:-configure}:7718: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7719
7720 # The test/sample programs in the original tree link using rpath option.
7721 # Make it optional for packagers.
7722 if test -n "$LOCAL_LDFLAGS"
7723 then
7724         echo "$as_me:7724: checking if you want to link sample programs with rpath option" >&5
7725 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7726
7727 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7728 if test "${enable_rpath_link+set}" = set; then
7729   enableval="$enable_rpath_link"
7730   with_rpath_link=$enableval
7731 else
7732   with_rpath_link=yes
7733 fi;
7734         echo "$as_me:7734: result: $with_rpath_link" >&5
7735 echo "${ECHO_T}$with_rpath_link" >&6
7736         if test "$with_rpath_link" = no
7737         then
7738                 LOCAL_LDFLAGS=
7739                 LOCAL_LDFLAGS2=
7740         fi
7741 fi
7742
7743 ###############################################################################
7744
7745 ###   use option --enable-broken-linker to force on use of broken-linker support
7746 echo "$as_me:7746: checking if you want broken-linker support code" >&5
7747 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7748
7749 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7750 if test "${enable_broken_linker+set}" = set; then
7751   enableval="$enable_broken_linker"
7752   with_broken_linker=$enableval
7753 else
7754   with_broken_linker=${BROKEN_LINKER:-no}
7755 fi;
7756 echo "$as_me:7756: result: $with_broken_linker" >&5
7757 echo "${ECHO_T}$with_broken_linker" >&6
7758
7759 BROKEN_LINKER=0
7760 if test "$with_broken_linker" = yes ; then
7761         cat >>confdefs.h <<\EOF
7762 #define BROKEN_LINKER 1
7763 EOF
7764
7765         BROKEN_LINKER=1
7766 elif test "$DFT_LWR_MODEL" = shared ; then
7767         case $cf_cv_system_name in #(vi
7768         cygwin*)
7769                 cat >>confdefs.h <<\EOF
7770 #define BROKEN_LINKER 1
7771 EOF
7772
7773                 BROKEN_LINKER=1
7774                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7775
7776 echo "${as_me:-configure}:7776: testing cygwin linker is broken anyway ..." 1>&5
7777
7778                 ;;
7779         esac
7780 fi
7781
7782 # Check to define _XOPEN_SOURCE "automatically"
7783
7784 cf_XOPEN_SOURCE=500
7785 cf_POSIX_C_SOURCE=199506L
7786 cf_xopen_source=
7787
7788 case $host_os in #(vi
7789 aix[4-7]*) #(vi
7790         cf_xopen_source="-D_ALL_SOURCE"
7791         ;;
7792 cygwin|msys) #(vi
7793         cf_XOPEN_SOURCE=600
7794         ;;
7795 darwin[0-8].*) #(vi
7796         cf_xopen_source="-D_APPLE_C_SOURCE"
7797         ;;
7798 darwin*) #(vi
7799         cf_xopen_source="-D_DARWIN_C_SOURCE"
7800         cf_XOPEN_SOURCE=
7801         ;;
7802 freebsd*|dragonfly*) #(vi
7803         # 5.x headers associate
7804         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7805         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7806         cf_POSIX_C_SOURCE=200112L
7807         cf_XOPEN_SOURCE=600
7808         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7809         ;;
7810 hpux11*) #(vi
7811         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7812         ;;
7813 hpux*) #(vi
7814         cf_xopen_source="-D_HPUX_SOURCE"
7815         ;;
7816 irix[56].*) #(vi
7817         cf_xopen_source="-D_SGI_SOURCE"
7818         cf_XOPEN_SOURCE=
7819         ;;
7820 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7821
7822 echo "$as_me:7822: checking if we must define _GNU_SOURCE" >&5
7823 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7824 if test "${cf_cv_gnu_source+set}" = set; then
7825   echo $ECHO_N "(cached) $ECHO_C" >&6
7826 else
7827
7828 cat >conftest.$ac_ext <<_ACEOF
7829 #line 7829 "configure"
7830 #include "confdefs.h"
7831 #include <sys/types.h>
7832 int
7833 main ()
7834 {
7835
7836 #ifndef _XOPEN_SOURCE
7837 make an error
7838 #endif
7839   ;
7840   return 0;
7841 }
7842 _ACEOF
7843 rm -f conftest.$ac_objext
7844 if { (eval echo "$as_me:7844: \"$ac_compile\"") >&5
7845   (eval $ac_compile) 2>&5
7846   ac_status=$?
7847   echo "$as_me:7847: \$? = $ac_status" >&5
7848   (exit $ac_status); } &&
7849          { ac_try='test -s conftest.$ac_objext'
7850   { (eval echo "$as_me:7850: \"$ac_try\"") >&5
7851   (eval $ac_try) 2>&5
7852   ac_status=$?
7853   echo "$as_me:7853: \$? = $ac_status" >&5
7854   (exit $ac_status); }; }; then
7855   cf_cv_gnu_source=no
7856 else
7857   echo "$as_me: failed program was:" >&5
7858 cat conftest.$ac_ext >&5
7859 cf_save="$CPPFLAGS"
7860          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7861          cat >conftest.$ac_ext <<_ACEOF
7862 #line 7862 "configure"
7863 #include "confdefs.h"
7864 #include <sys/types.h>
7865 int
7866 main ()
7867 {
7868
7869 #ifdef _XOPEN_SOURCE
7870 make an error
7871 #endif
7872   ;
7873   return 0;
7874 }
7875 _ACEOF
7876 rm -f conftest.$ac_objext
7877 if { (eval echo "$as_me:7877: \"$ac_compile\"") >&5
7878   (eval $ac_compile) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); } &&
7882          { ac_try='test -s conftest.$ac_objext'
7883   { (eval echo "$as_me:7883: \"$ac_try\"") >&5
7884   (eval $ac_try) 2>&5
7885   ac_status=$?
7886   echo "$as_me:7886: \$? = $ac_status" >&5
7887   (exit $ac_status); }; }; then
7888   cf_cv_gnu_source=no
7889 else
7890   echo "$as_me: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 cf_cv_gnu_source=yes
7893 fi
7894 rm -f conftest.$ac_objext conftest.$ac_ext
7895         CPPFLAGS="$cf_save"
7896
7897 fi
7898 rm -f conftest.$ac_objext conftest.$ac_ext
7899
7900 fi
7901 echo "$as_me:7901: result: $cf_cv_gnu_source" >&5
7902 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7903 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7904
7905         ;;
7906 minix*) #(vi
7907         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7908         ;;
7909 mirbsd*) #(vi
7910         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7911         cf_XOPEN_SOURCE=
7912
7913 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7914
7915 cf_save_CFLAGS="$CFLAGS"
7916 cf_save_CPPFLAGS="$CPPFLAGS"
7917
7918 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7919         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7920                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7921
7922 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7923         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7924                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7925
7926 echo "$as_me:7926: checking if we should define _POSIX_C_SOURCE" >&5
7927 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7928 if test "${cf_cv_posix_c_source+set}" = set; then
7929   echo $ECHO_N "(cached) $ECHO_C" >&6
7930 else
7931
7932 echo "${as_me:-configure}:7932: testing if the symbol is already defined go no further ..." 1>&5
7933
7934         cat >conftest.$ac_ext <<_ACEOF
7935 #line 7935 "configure"
7936 #include "confdefs.h"
7937 #include <sys/types.h>
7938 int
7939 main ()
7940 {
7941
7942 #ifndef _POSIX_C_SOURCE
7943 make an error
7944 #endif
7945   ;
7946   return 0;
7947 }
7948 _ACEOF
7949 rm -f conftest.$ac_objext
7950 if { (eval echo "$as_me:7950: \"$ac_compile\"") >&5
7951   (eval $ac_compile) 2>&5
7952   ac_status=$?
7953   echo "$as_me:7953: \$? = $ac_status" >&5
7954   (exit $ac_status); } &&
7955          { ac_try='test -s conftest.$ac_objext'
7956   { (eval echo "$as_me:7956: \"$ac_try\"") >&5
7957   (eval $ac_try) 2>&5
7958   ac_status=$?
7959   echo "$as_me:7959: \$? = $ac_status" >&5
7960   (exit $ac_status); }; }; then
7961   cf_cv_posix_c_source=no
7962 else
7963   echo "$as_me: failed program was:" >&5
7964 cat conftest.$ac_ext >&5
7965 cf_want_posix_source=no
7966          case .$cf_POSIX_C_SOURCE in #(vi
7967          .[12]??*) #(vi
7968                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7969                 ;;
7970          .2) #(vi
7971                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7972                 cf_want_posix_source=yes
7973                 ;;
7974          .*)
7975                 cf_want_posix_source=yes
7976                 ;;
7977          esac
7978          if test "$cf_want_posix_source" = yes ; then
7979                 cat >conftest.$ac_ext <<_ACEOF
7980 #line 7980 "configure"
7981 #include "confdefs.h"
7982 #include <sys/types.h>
7983 int
7984 main ()
7985 {
7986
7987 #ifdef _POSIX_SOURCE
7988 make an error
7989 #endif
7990   ;
7991   return 0;
7992 }
7993 _ACEOF
7994 rm -f conftest.$ac_objext
7995 if { (eval echo "$as_me:7995: \"$ac_compile\"") >&5
7996   (eval $ac_compile) 2>&5
7997   ac_status=$?
7998   echo "$as_me:7998: \$? = $ac_status" >&5
7999   (exit $ac_status); } &&
8000          { ac_try='test -s conftest.$ac_objext'
8001   { (eval echo "$as_me:8001: \"$ac_try\"") >&5
8002   (eval $ac_try) 2>&5
8003   ac_status=$?
8004   echo "$as_me:8004: \$? = $ac_status" >&5
8005   (exit $ac_status); }; }; then
8006   :
8007 else
8008   echo "$as_me: failed program was:" >&5
8009 cat conftest.$ac_ext >&5
8010 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8011 fi
8012 rm -f conftest.$ac_objext conftest.$ac_ext
8013          fi
8014
8015 echo "${as_me:-configure}:8015: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8016
8017          CFLAGS="$cf_trim_CFLAGS"
8018          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8019
8020 echo "${as_me:-configure}:8020: testing if the second compile does not leave our definition intact error ..." 1>&5
8021
8022          cat >conftest.$ac_ext <<_ACEOF
8023 #line 8023 "configure"
8024 #include "confdefs.h"
8025 #include <sys/types.h>
8026 int
8027 main ()
8028 {
8029
8030 #ifndef _POSIX_C_SOURCE
8031 make an error
8032 #endif
8033   ;
8034   return 0;
8035 }
8036 _ACEOF
8037 rm -f conftest.$ac_objext
8038 if { (eval echo "$as_me:8038: \"$ac_compile\"") >&5
8039   (eval $ac_compile) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit $ac_status); } &&
8043          { ac_try='test -s conftest.$ac_objext'
8044   { (eval echo "$as_me:8044: \"$ac_try\"") >&5
8045   (eval $ac_try) 2>&5
8046   ac_status=$?
8047   echo "$as_me:8047: \$? = $ac_status" >&5
8048   (exit $ac_status); }; }; then
8049   :
8050 else
8051   echo "$as_me: failed program was:" >&5
8052 cat conftest.$ac_ext >&5
8053 cf_cv_posix_c_source=no
8054 fi
8055 rm -f conftest.$ac_objext conftest.$ac_ext
8056          CFLAGS="$cf_save_CFLAGS"
8057          CPPFLAGS="$cf_save_CPPFLAGS"
8058
8059 fi
8060 rm -f conftest.$ac_objext conftest.$ac_ext
8061
8062 fi
8063 echo "$as_me:8063: result: $cf_cv_posix_c_source" >&5
8064 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8065
8066 if test "$cf_cv_posix_c_source" != no ; then
8067         CFLAGS="$cf_trim_CFLAGS"
8068         CPPFLAGS="$cf_trim_CPPFLAGS"
8069
8070 cf_fix_cppflags=no
8071 cf_new_cflags=
8072 cf_new_cppflags=
8073 cf_new_extra_cppflags=
8074
8075 for cf_add_cflags in $cf_cv_posix_c_source
8076 do
8077 case $cf_fix_cppflags in
8078 no)
8079         case $cf_add_cflags in #(vi
8080         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8081                 case $cf_add_cflags in
8082                 -D*)
8083                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8084
8085                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8086                                 && test -z "${cf_tst_cflags}" \
8087                                 && cf_fix_cppflags=yes
8088
8089                         if test $cf_fix_cppflags = yes ; then
8090                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8091                                 continue
8092                         elif test "${cf_tst_cflags}" = "\"'" ; then
8093                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8094                                 continue
8095                         fi
8096                         ;;
8097                 esac
8098                 case "$CPPFLAGS" in
8099                 *$cf_add_cflags) #(vi
8100                         ;;
8101                 *) #(vi
8102                         case $cf_add_cflags in #(vi
8103                         -D*)
8104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8105
8106 CPPFLAGS=`echo "$CPPFLAGS" | \
8107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8109
8110                                 ;;
8111                         esac
8112                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8113                         ;;
8114                 esac
8115                 ;;
8116         *)
8117                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8118                 ;;
8119         esac
8120         ;;
8121 yes)
8122         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8123
8124         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8125
8126         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8127                 && test -z "${cf_tst_cflags}" \
8128                 && cf_fix_cppflags=no
8129         ;;
8130 esac
8131 done
8132
8133 if test -n "$cf_new_cflags" ; then
8134
8135         CFLAGS="$CFLAGS $cf_new_cflags"
8136 fi
8137
8138 if test -n "$cf_new_cppflags" ; then
8139
8140         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8141 fi
8142
8143 if test -n "$cf_new_extra_cppflags" ; then
8144
8145         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8146 fi
8147
8148 fi
8149
8150         ;;
8151 netbsd*) #(vi
8152         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8153         ;;
8154 openbsd[4-9]*) #(vi
8155         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8156         cf_xopen_source="-D_BSD_SOURCE"
8157         cf_XOPEN_SOURCE=600
8158         ;;
8159 openbsd*) #(vi
8160         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8161         ;;
8162 osf[45]*) #(vi
8163         cf_xopen_source="-D_OSF_SOURCE"
8164         ;;
8165 nto-qnx*) #(vi
8166         cf_xopen_source="-D_QNX_SOURCE"
8167         ;;
8168 sco*) #(vi
8169         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8170         ;;
8171 solaris2.*) #(vi
8172         cf_xopen_source="-D__EXTENSIONS__"
8173         cf_cv_xopen_source=broken
8174         ;;
8175 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8176         cf_XOPEN_SOURCE=
8177         cf_POSIX_C_SOURCE=
8178         ;;
8179 *)
8180
8181 echo "$as_me:8181: checking if we should define _XOPEN_SOURCE" >&5
8182 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8183 if test "${cf_cv_xopen_source+set}" = set; then
8184   echo $ECHO_N "(cached) $ECHO_C" >&6
8185 else
8186
8187         cat >conftest.$ac_ext <<_ACEOF
8188 #line 8188 "configure"
8189 #include "confdefs.h"
8190
8191 #include <stdlib.h>
8192 #include <string.h>
8193 #include <sys/types.h>
8194
8195 int
8196 main ()
8197 {
8198
8199 #ifndef _XOPEN_SOURCE
8200 make an error
8201 #endif
8202   ;
8203   return 0;
8204 }
8205 _ACEOF
8206 rm -f conftest.$ac_objext
8207 if { (eval echo "$as_me:8207: \"$ac_compile\"") >&5
8208   (eval $ac_compile) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); } &&
8212          { ac_try='test -s conftest.$ac_objext'
8213   { (eval echo "$as_me:8213: \"$ac_try\"") >&5
8214   (eval $ac_try) 2>&5
8215   ac_status=$?
8216   echo "$as_me:8216: \$? = $ac_status" >&5
8217   (exit $ac_status); }; }; then
8218   cf_cv_xopen_source=no
8219 else
8220   echo "$as_me: failed program was:" >&5
8221 cat conftest.$ac_ext >&5
8222 cf_save="$CPPFLAGS"
8223          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8224          cat >conftest.$ac_ext <<_ACEOF
8225 #line 8225 "configure"
8226 #include "confdefs.h"
8227
8228 #include <stdlib.h>
8229 #include <string.h>
8230 #include <sys/types.h>
8231
8232 int
8233 main ()
8234 {
8235
8236 #ifdef _XOPEN_SOURCE
8237 make an error
8238 #endif
8239   ;
8240   return 0;
8241 }
8242 _ACEOF
8243 rm -f conftest.$ac_objext
8244 if { (eval echo "$as_me:8244: \"$ac_compile\"") >&5
8245   (eval $ac_compile) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit $ac_status); } &&
8249          { ac_try='test -s conftest.$ac_objext'
8250   { (eval echo "$as_me:8250: \"$ac_try\"") >&5
8251   (eval $ac_try) 2>&5
8252   ac_status=$?
8253   echo "$as_me:8253: \$? = $ac_status" >&5
8254   (exit $ac_status); }; }; then
8255   cf_cv_xopen_source=no
8256 else
8257   echo "$as_me: failed program was:" >&5
8258 cat conftest.$ac_ext >&5
8259 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8260 fi
8261 rm -f conftest.$ac_objext conftest.$ac_ext
8262         CPPFLAGS="$cf_save"
8263
8264 fi
8265 rm -f conftest.$ac_objext conftest.$ac_ext
8266
8267 fi
8268 echo "$as_me:8268: result: $cf_cv_xopen_source" >&5
8269 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8270
8271 if test "$cf_cv_xopen_source" != no ; then
8272
8273 CFLAGS=`echo "$CFLAGS" | \
8274         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8275                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8276
8277 CPPFLAGS=`echo "$CPPFLAGS" | \
8278         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8279                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8280
8281         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8282
8283 cf_fix_cppflags=no
8284 cf_new_cflags=
8285 cf_new_cppflags=
8286 cf_new_extra_cppflags=
8287
8288 for cf_add_cflags in $cf_temp_xopen_source
8289 do
8290 case $cf_fix_cppflags in
8291 no)
8292         case $cf_add_cflags in #(vi
8293         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8294                 case $cf_add_cflags in
8295                 -D*)
8296                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8297
8298                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8299                                 && test -z "${cf_tst_cflags}" \
8300                                 && cf_fix_cppflags=yes
8301
8302                         if test $cf_fix_cppflags = yes ; then
8303                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8304                                 continue
8305                         elif test "${cf_tst_cflags}" = "\"'" ; then
8306                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8307                                 continue
8308                         fi
8309                         ;;
8310                 esac
8311                 case "$CPPFLAGS" in
8312                 *$cf_add_cflags) #(vi
8313                         ;;
8314                 *) #(vi
8315                         case $cf_add_cflags in #(vi
8316                         -D*)
8317                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8318
8319 CPPFLAGS=`echo "$CPPFLAGS" | \
8320         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8321                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8322
8323                                 ;;
8324                         esac
8325                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8326                         ;;
8327                 esac
8328                 ;;
8329         *)
8330                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8331                 ;;
8332         esac
8333         ;;
8334 yes)
8335         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8336
8337         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8338
8339         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8340                 && test -z "${cf_tst_cflags}" \
8341                 && cf_fix_cppflags=no
8342         ;;
8343 esac
8344 done
8345
8346 if test -n "$cf_new_cflags" ; then
8347
8348         CFLAGS="$CFLAGS $cf_new_cflags"
8349 fi
8350
8351 if test -n "$cf_new_cppflags" ; then
8352
8353         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8354 fi
8355
8356 if test -n "$cf_new_extra_cppflags" ; then
8357
8358         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8359 fi
8360
8361 fi
8362
8363 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8364
8365 cf_save_CFLAGS="$CFLAGS"
8366 cf_save_CPPFLAGS="$CPPFLAGS"
8367
8368 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8369         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8370                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8371
8372 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8373         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8374                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8375
8376 echo "$as_me:8376: checking if we should define _POSIX_C_SOURCE" >&5
8377 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8378 if test "${cf_cv_posix_c_source+set}" = set; then
8379   echo $ECHO_N "(cached) $ECHO_C" >&6
8380 else
8381
8382 echo "${as_me:-configure}:8382: testing if the symbol is already defined go no further ..." 1>&5
8383
8384         cat >conftest.$ac_ext <<_ACEOF
8385 #line 8385 "configure"
8386 #include "confdefs.h"
8387 #include <sys/types.h>
8388 int
8389 main ()
8390 {
8391
8392 #ifndef _POSIX_C_SOURCE
8393 make an error
8394 #endif
8395   ;
8396   return 0;
8397 }
8398 _ACEOF
8399 rm -f conftest.$ac_objext
8400 if { (eval echo "$as_me:8400: \"$ac_compile\"") >&5
8401   (eval $ac_compile) 2>&5
8402   ac_status=$?
8403   echo "$as_me:8403: \$? = $ac_status" >&5
8404   (exit $ac_status); } &&
8405          { ac_try='test -s conftest.$ac_objext'
8406   { (eval echo "$as_me:8406: \"$ac_try\"") >&5
8407   (eval $ac_try) 2>&5
8408   ac_status=$?
8409   echo "$as_me:8409: \$? = $ac_status" >&5
8410   (exit $ac_status); }; }; then
8411   cf_cv_posix_c_source=no
8412 else
8413   echo "$as_me: failed program was:" >&5
8414 cat conftest.$ac_ext >&5
8415 cf_want_posix_source=no
8416          case .$cf_POSIX_C_SOURCE in #(vi
8417          .[12]??*) #(vi
8418                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8419                 ;;
8420          .2) #(vi
8421                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8422                 cf_want_posix_source=yes
8423                 ;;
8424          .*)
8425                 cf_want_posix_source=yes
8426                 ;;
8427          esac
8428          if test "$cf_want_posix_source" = yes ; then
8429                 cat >conftest.$ac_ext <<_ACEOF
8430 #line 8430 "configure"
8431 #include "confdefs.h"
8432 #include <sys/types.h>
8433 int
8434 main ()
8435 {
8436
8437 #ifdef _POSIX_SOURCE
8438 make an error
8439 #endif
8440   ;
8441   return 0;
8442 }
8443 _ACEOF
8444 rm -f conftest.$ac_objext
8445 if { (eval echo "$as_me:8445: \"$ac_compile\"") >&5
8446   (eval $ac_compile) 2>&5
8447   ac_status=$?
8448   echo "$as_me:8448: \$? = $ac_status" >&5
8449   (exit $ac_status); } &&
8450          { ac_try='test -s conftest.$ac_objext'
8451   { (eval echo "$as_me:8451: \"$ac_try\"") >&5
8452   (eval $ac_try) 2>&5
8453   ac_status=$?
8454   echo "$as_me:8454: \$? = $ac_status" >&5
8455   (exit $ac_status); }; }; then
8456   :
8457 else
8458   echo "$as_me: failed program was:" >&5
8459 cat conftest.$ac_ext >&5
8460 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8461 fi
8462 rm -f conftest.$ac_objext conftest.$ac_ext
8463          fi
8464
8465 echo "${as_me:-configure}:8465: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8466
8467          CFLAGS="$cf_trim_CFLAGS"
8468          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8469
8470 echo "${as_me:-configure}:8470: testing if the second compile does not leave our definition intact error ..." 1>&5
8471
8472          cat >conftest.$ac_ext <<_ACEOF
8473 #line 8473 "configure"
8474 #include "confdefs.h"
8475 #include <sys/types.h>
8476 int
8477 main ()
8478 {
8479
8480 #ifndef _POSIX_C_SOURCE
8481 make an error
8482 #endif
8483   ;
8484   return 0;
8485 }
8486 _ACEOF
8487 rm -f conftest.$ac_objext
8488 if { (eval echo "$as_me:8488: \"$ac_compile\"") >&5
8489   (eval $ac_compile) 2>&5
8490   ac_status=$?
8491   echo "$as_me:8491: \$? = $ac_status" >&5
8492   (exit $ac_status); } &&
8493          { ac_try='test -s conftest.$ac_objext'
8494   { (eval echo "$as_me:8494: \"$ac_try\"") >&5
8495   (eval $ac_try) 2>&5
8496   ac_status=$?
8497   echo "$as_me:8497: \$? = $ac_status" >&5
8498   (exit $ac_status); }; }; then
8499   :
8500 else
8501   echo "$as_me: failed program was:" >&5
8502 cat conftest.$ac_ext >&5
8503 cf_cv_posix_c_source=no
8504 fi
8505 rm -f conftest.$ac_objext conftest.$ac_ext
8506          CFLAGS="$cf_save_CFLAGS"
8507          CPPFLAGS="$cf_save_CPPFLAGS"
8508
8509 fi
8510 rm -f conftest.$ac_objext conftest.$ac_ext
8511
8512 fi
8513 echo "$as_me:8513: result: $cf_cv_posix_c_source" >&5
8514 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8515
8516 if test "$cf_cv_posix_c_source" != no ; then
8517         CFLAGS="$cf_trim_CFLAGS"
8518         CPPFLAGS="$cf_trim_CPPFLAGS"
8519
8520 cf_fix_cppflags=no
8521 cf_new_cflags=
8522 cf_new_cppflags=
8523 cf_new_extra_cppflags=
8524
8525 for cf_add_cflags in $cf_cv_posix_c_source
8526 do
8527 case $cf_fix_cppflags in
8528 no)
8529         case $cf_add_cflags in #(vi
8530         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8531                 case $cf_add_cflags in
8532                 -D*)
8533                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8534
8535                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8536                                 && test -z "${cf_tst_cflags}" \
8537                                 && cf_fix_cppflags=yes
8538
8539                         if test $cf_fix_cppflags = yes ; then
8540                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8541                                 continue
8542                         elif test "${cf_tst_cflags}" = "\"'" ; then
8543                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8544                                 continue
8545                         fi
8546                         ;;
8547                 esac
8548                 case "$CPPFLAGS" in
8549                 *$cf_add_cflags) #(vi
8550                         ;;
8551                 *) #(vi
8552                         case $cf_add_cflags in #(vi
8553                         -D*)
8554                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8555
8556 CPPFLAGS=`echo "$CPPFLAGS" | \
8557         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8558                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8559
8560                                 ;;
8561                         esac
8562                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8563                         ;;
8564                 esac
8565                 ;;
8566         *)
8567                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8568                 ;;
8569         esac
8570         ;;
8571 yes)
8572         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8573
8574         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8575
8576         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8577                 && test -z "${cf_tst_cflags}" \
8578                 && cf_fix_cppflags=no
8579         ;;
8580 esac
8581 done
8582
8583 if test -n "$cf_new_cflags" ; then
8584
8585         CFLAGS="$CFLAGS $cf_new_cflags"
8586 fi
8587
8588 if test -n "$cf_new_cppflags" ; then
8589
8590         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8591 fi
8592
8593 if test -n "$cf_new_extra_cppflags" ; then
8594
8595         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8596 fi
8597
8598 fi
8599
8600         ;;
8601 esac
8602
8603 if test -n "$cf_xopen_source" ; then
8604
8605 cf_fix_cppflags=no
8606 cf_new_cflags=
8607 cf_new_cppflags=
8608 cf_new_extra_cppflags=
8609
8610 for cf_add_cflags in $cf_xopen_source
8611 do
8612 case $cf_fix_cppflags in
8613 no)
8614         case $cf_add_cflags in #(vi
8615         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8616                 case $cf_add_cflags in
8617                 -D*)
8618                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8619
8620                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8621                                 && test -z "${cf_tst_cflags}" \
8622                                 && cf_fix_cppflags=yes
8623
8624                         if test $cf_fix_cppflags = yes ; then
8625                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8626                                 continue
8627                         elif test "${cf_tst_cflags}" = "\"'" ; then
8628                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8629                                 continue
8630                         fi
8631                         ;;
8632                 esac
8633                 case "$CPPFLAGS" in
8634                 *$cf_add_cflags) #(vi
8635                         ;;
8636                 *) #(vi
8637                         case $cf_add_cflags in #(vi
8638                         -D*)
8639                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8640
8641 CPPFLAGS=`echo "$CPPFLAGS" | \
8642         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8643                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8644
8645                                 ;;
8646                         esac
8647                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8648                         ;;
8649                 esac
8650                 ;;
8651         *)
8652                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8653                 ;;
8654         esac
8655         ;;
8656 yes)
8657         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8658
8659         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8660
8661         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8662                 && test -z "${cf_tst_cflags}" \
8663                 && cf_fix_cppflags=no
8664         ;;
8665 esac
8666 done
8667
8668 if test -n "$cf_new_cflags" ; then
8669         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8670
8671 echo "${as_me:-configure}:8671: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8672
8673         CFLAGS="$CFLAGS $cf_new_cflags"
8674 fi
8675
8676 if test -n "$cf_new_cppflags" ; then
8677         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8678
8679 echo "${as_me:-configure}:8679: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8680
8681         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8682 fi
8683
8684 if test -n "$cf_new_extra_cppflags" ; then
8685         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8686
8687 echo "${as_me:-configure}:8687: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8688
8689         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8690 fi
8691
8692 fi
8693
8694 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8695         echo "$as_me:8695: checking if _XOPEN_SOURCE really is set" >&5
8696 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8697         cat >conftest.$ac_ext <<_ACEOF
8698 #line 8698 "configure"
8699 #include "confdefs.h"
8700 #include <stdlib.h>
8701 int
8702 main ()
8703 {
8704
8705 #ifndef _XOPEN_SOURCE
8706 make an error
8707 #endif
8708   ;
8709   return 0;
8710 }
8711 _ACEOF
8712 rm -f conftest.$ac_objext
8713 if { (eval echo "$as_me:8713: \"$ac_compile\"") >&5
8714   (eval $ac_compile) 2>&5
8715   ac_status=$?
8716   echo "$as_me:8716: \$? = $ac_status" >&5
8717   (exit $ac_status); } &&
8718          { ac_try='test -s conftest.$ac_objext'
8719   { (eval echo "$as_me:8719: \"$ac_try\"") >&5
8720   (eval $ac_try) 2>&5
8721   ac_status=$?
8722   echo "$as_me:8722: \$? = $ac_status" >&5
8723   (exit $ac_status); }; }; then
8724   cf_XOPEN_SOURCE_set=yes
8725 else
8726   echo "$as_me: failed program was:" >&5
8727 cat conftest.$ac_ext >&5
8728 cf_XOPEN_SOURCE_set=no
8729 fi
8730 rm -f conftest.$ac_objext conftest.$ac_ext
8731         echo "$as_me:8731: result: $cf_XOPEN_SOURCE_set" >&5
8732 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8733         if test $cf_XOPEN_SOURCE_set = yes
8734         then
8735                 cat >conftest.$ac_ext <<_ACEOF
8736 #line 8736 "configure"
8737 #include "confdefs.h"
8738 #include <stdlib.h>
8739 int
8740 main ()
8741 {
8742
8743 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8744 make an error
8745 #endif
8746   ;
8747   return 0;
8748 }
8749 _ACEOF
8750 rm -f conftest.$ac_objext
8751 if { (eval echo "$as_me:8751: \"$ac_compile\"") >&5
8752   (eval $ac_compile) 2>&5
8753   ac_status=$?
8754   echo "$as_me:8754: \$? = $ac_status" >&5
8755   (exit $ac_status); } &&
8756          { ac_try='test -s conftest.$ac_objext'
8757   { (eval echo "$as_me:8757: \"$ac_try\"") >&5
8758   (eval $ac_try) 2>&5
8759   ac_status=$?
8760   echo "$as_me:8760: \$? = $ac_status" >&5
8761   (exit $ac_status); }; }; then
8762   cf_XOPEN_SOURCE_set_ok=yes
8763 else
8764   echo "$as_me: failed program was:" >&5
8765 cat conftest.$ac_ext >&5
8766 cf_XOPEN_SOURCE_set_ok=no
8767 fi
8768 rm -f conftest.$ac_objext conftest.$ac_ext
8769                 if test $cf_XOPEN_SOURCE_set_ok = no
8770                 then
8771                         { echo "$as_me:8771: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8772 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8773                 fi
8774         else
8775
8776 echo "$as_me:8776: checking if we should define _XOPEN_SOURCE" >&5
8777 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8778 if test "${cf_cv_xopen_source+set}" = set; then
8779   echo $ECHO_N "(cached) $ECHO_C" >&6
8780 else
8781
8782         cat >conftest.$ac_ext <<_ACEOF
8783 #line 8783 "configure"
8784 #include "confdefs.h"
8785
8786 #include <stdlib.h>
8787 #include <string.h>
8788 #include <sys/types.h>
8789
8790 int
8791 main ()
8792 {
8793
8794 #ifndef _XOPEN_SOURCE
8795 make an error
8796 #endif
8797   ;
8798   return 0;
8799 }
8800 _ACEOF
8801 rm -f conftest.$ac_objext
8802 if { (eval echo "$as_me:8802: \"$ac_compile\"") >&5
8803   (eval $ac_compile) 2>&5
8804   ac_status=$?
8805   echo "$as_me:8805: \$? = $ac_status" >&5
8806   (exit $ac_status); } &&
8807          { ac_try='test -s conftest.$ac_objext'
8808   { (eval echo "$as_me:8808: \"$ac_try\"") >&5
8809   (eval $ac_try) 2>&5
8810   ac_status=$?
8811   echo "$as_me:8811: \$? = $ac_status" >&5
8812   (exit $ac_status); }; }; then
8813   cf_cv_xopen_source=no
8814 else
8815   echo "$as_me: failed program was:" >&5
8816 cat conftest.$ac_ext >&5
8817 cf_save="$CPPFLAGS"
8818          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8819          cat >conftest.$ac_ext <<_ACEOF
8820 #line 8820 "configure"
8821 #include "confdefs.h"
8822
8823 #include <stdlib.h>
8824 #include <string.h>
8825 #include <sys/types.h>
8826
8827 int
8828 main ()
8829 {
8830
8831 #ifdef _XOPEN_SOURCE
8832 make an error
8833 #endif
8834   ;
8835   return 0;
8836 }
8837 _ACEOF
8838 rm -f conftest.$ac_objext
8839 if { (eval echo "$as_me:8839: \"$ac_compile\"") >&5
8840   (eval $ac_compile) 2>&5
8841   ac_status=$?
8842   echo "$as_me:8842: \$? = $ac_status" >&5
8843   (exit $ac_status); } &&
8844          { ac_try='test -s conftest.$ac_objext'
8845   { (eval echo "$as_me:8845: \"$ac_try\"") >&5
8846   (eval $ac_try) 2>&5
8847   ac_status=$?
8848   echo "$as_me:8848: \$? = $ac_status" >&5
8849   (exit $ac_status); }; }; then
8850   cf_cv_xopen_source=no
8851 else
8852   echo "$as_me: failed program was:" >&5
8853 cat conftest.$ac_ext >&5
8854 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8855 fi
8856 rm -f conftest.$ac_objext conftest.$ac_ext
8857         CPPFLAGS="$cf_save"
8858
8859 fi
8860 rm -f conftest.$ac_objext conftest.$ac_ext
8861
8862 fi
8863 echo "$as_me:8863: result: $cf_cv_xopen_source" >&5
8864 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8865
8866 if test "$cf_cv_xopen_source" != no ; then
8867
8868 CFLAGS=`echo "$CFLAGS" | \
8869         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8870                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8871
8872 CPPFLAGS=`echo "$CPPFLAGS" | \
8873         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8874                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8875
8876         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8877
8878 cf_fix_cppflags=no
8879 cf_new_cflags=
8880 cf_new_cppflags=
8881 cf_new_extra_cppflags=
8882
8883 for cf_add_cflags in $cf_temp_xopen_source
8884 do
8885 case $cf_fix_cppflags in
8886 no)
8887         case $cf_add_cflags in #(vi
8888         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8889                 case $cf_add_cflags in
8890                 -D*)
8891                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8892
8893                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8894                                 && test -z "${cf_tst_cflags}" \
8895                                 && cf_fix_cppflags=yes
8896
8897                         if test $cf_fix_cppflags = yes ; then
8898                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8899                                 continue
8900                         elif test "${cf_tst_cflags}" = "\"'" ; then
8901                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8902                                 continue
8903                         fi
8904                         ;;
8905                 esac
8906                 case "$CPPFLAGS" in
8907                 *$cf_add_cflags) #(vi
8908                         ;;
8909                 *) #(vi
8910                         case $cf_add_cflags in #(vi
8911                         -D*)
8912                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8913
8914 CPPFLAGS=`echo "$CPPFLAGS" | \
8915         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8916                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8917
8918                                 ;;
8919                         esac
8920                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8921                         ;;
8922                 esac
8923                 ;;
8924         *)
8925                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8926                 ;;
8927         esac
8928         ;;
8929 yes)
8930         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8931
8932         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8933
8934         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8935                 && test -z "${cf_tst_cflags}" \
8936                 && cf_fix_cppflags=no
8937         ;;
8938 esac
8939 done
8940
8941 if test -n "$cf_new_cflags" ; then
8942
8943         CFLAGS="$CFLAGS $cf_new_cflags"
8944 fi
8945
8946 if test -n "$cf_new_cppflags" ; then
8947
8948         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8949 fi
8950
8951 if test -n "$cf_new_extra_cppflags" ; then
8952
8953         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8954 fi
8955
8956 fi
8957
8958         fi
8959 fi
8960
8961 # Check whether --enable-largefile or --disable-largefile was given.
8962 if test "${enable_largefile+set}" = set; then
8963   enableval="$enable_largefile"
8964
8965 fi;
8966 if test "$enable_largefile" != no; then
8967
8968   echo "$as_me:8968: checking for special C compiler options needed for large files" >&5
8969 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8970 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8971   echo $ECHO_N "(cached) $ECHO_C" >&6
8972 else
8973   ac_cv_sys_largefile_CC=no
8974      if test "$GCC" != yes; then
8975        ac_save_CC=$CC
8976        while :; do
8977          # IRIX 6.2 and later do not support large files by default,
8978          # so use the C compiler's -n32 option if that helps.
8979          cat >conftest.$ac_ext <<_ACEOF
8980 #line 8980 "configure"
8981 #include "confdefs.h"
8982 #include <sys/types.h>
8983  /* Check that off_t can represent 2**63 - 1 correctly.
8984     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8985     since some C++ compilers masquerading as C compilers
8986     incorrectly reject 9223372036854775807.  */
8987 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8988   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8989                        && LARGE_OFF_T % 2147483647 == 1)
8990                       ? 1 : -1];
8991 int
8992 main ()
8993 {
8994
8995   ;
8996   return 0;
8997 }
8998 _ACEOF
8999          rm -f conftest.$ac_objext
9000 if { (eval echo "$as_me:9000: \"$ac_compile\"") >&5
9001   (eval $ac_compile) 2>&5
9002   ac_status=$?
9003   echo "$as_me:9003: \$? = $ac_status" >&5
9004   (exit $ac_status); } &&
9005          { ac_try='test -s conftest.$ac_objext'
9006   { (eval echo "$as_me:9006: \"$ac_try\"") >&5
9007   (eval $ac_try) 2>&5
9008   ac_status=$?
9009   echo "$as_me:9009: \$? = $ac_status" >&5
9010   (exit $ac_status); }; }; then
9011   break
9012 else
9013   echo "$as_me: failed program was:" >&5
9014 cat conftest.$ac_ext >&5
9015 fi
9016 rm -f conftest.$ac_objext
9017          CC="$CC -n32"
9018          rm -f conftest.$ac_objext
9019 if { (eval echo "$as_me:9019: \"$ac_compile\"") >&5
9020   (eval $ac_compile) 2>&5
9021   ac_status=$?
9022   echo "$as_me:9022: \$? = $ac_status" >&5
9023   (exit $ac_status); } &&
9024          { ac_try='test -s conftest.$ac_objext'
9025   { (eval echo "$as_me:9025: \"$ac_try\"") >&5
9026   (eval $ac_try) 2>&5
9027   ac_status=$?
9028   echo "$as_me:9028: \$? = $ac_status" >&5
9029   (exit $ac_status); }; }; then
9030   ac_cv_sys_largefile_CC=' -n32'; break
9031 else
9032   echo "$as_me: failed program was:" >&5
9033 cat conftest.$ac_ext >&5
9034 fi
9035 rm -f conftest.$ac_objext
9036          break
9037        done
9038        CC=$ac_save_CC
9039        rm -f conftest.$ac_ext
9040     fi
9041 fi
9042 echo "$as_me:9042: result: $ac_cv_sys_largefile_CC" >&5
9043 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9044   if test "$ac_cv_sys_largefile_CC" != no; then
9045     CC=$CC$ac_cv_sys_largefile_CC
9046   fi
9047
9048   echo "$as_me:9048: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9049 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9050 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9051   echo $ECHO_N "(cached) $ECHO_C" >&6
9052 else
9053   while :; do
9054   ac_cv_sys_file_offset_bits=no
9055   cat >conftest.$ac_ext <<_ACEOF
9056 #line 9056 "configure"
9057 #include "confdefs.h"
9058 #include <sys/types.h>
9059  /* Check that off_t can represent 2**63 - 1 correctly.
9060     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9061     since some C++ compilers masquerading as C compilers
9062     incorrectly reject 9223372036854775807.  */
9063 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9064   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9065                        && LARGE_OFF_T % 2147483647 == 1)
9066                       ? 1 : -1];
9067 int
9068 main ()
9069 {
9070
9071   ;
9072   return 0;
9073 }
9074 _ACEOF
9075 rm -f conftest.$ac_objext
9076 if { (eval echo "$as_me:9076: \"$ac_compile\"") >&5
9077   (eval $ac_compile) 2>&5
9078   ac_status=$?
9079   echo "$as_me:9079: \$? = $ac_status" >&5
9080   (exit $ac_status); } &&
9081          { ac_try='test -s conftest.$ac_objext'
9082   { (eval echo "$as_me:9082: \"$ac_try\"") >&5
9083   (eval $ac_try) 2>&5
9084   ac_status=$?
9085   echo "$as_me:9085: \$? = $ac_status" >&5
9086   (exit $ac_status); }; }; then
9087   break
9088 else
9089   echo "$as_me: failed program was:" >&5
9090 cat conftest.$ac_ext >&5
9091 fi
9092 rm -f conftest.$ac_objext conftest.$ac_ext
9093   cat >conftest.$ac_ext <<_ACEOF
9094 #line 9094 "configure"
9095 #include "confdefs.h"
9096 #define _FILE_OFFSET_BITS 64
9097 #include <sys/types.h>
9098  /* Check that off_t can represent 2**63 - 1 correctly.
9099     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9100     since some C++ compilers masquerading as C compilers
9101     incorrectly reject 9223372036854775807.  */
9102 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9103   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9104                        && LARGE_OFF_T % 2147483647 == 1)
9105                       ? 1 : -1];
9106 int
9107 main ()
9108 {
9109
9110   ;
9111   return 0;
9112 }
9113 _ACEOF
9114 rm -f conftest.$ac_objext
9115 if { (eval echo "$as_me:9115: \"$ac_compile\"") >&5
9116   (eval $ac_compile) 2>&5
9117   ac_status=$?
9118   echo "$as_me:9118: \$? = $ac_status" >&5
9119   (exit $ac_status); } &&
9120          { ac_try='test -s conftest.$ac_objext'
9121   { (eval echo "$as_me:9121: \"$ac_try\"") >&5
9122   (eval $ac_try) 2>&5
9123   ac_status=$?
9124   echo "$as_me:9124: \$? = $ac_status" >&5
9125   (exit $ac_status); }; }; then
9126   ac_cv_sys_file_offset_bits=64; break
9127 else
9128   echo "$as_me: failed program was:" >&5
9129 cat conftest.$ac_ext >&5
9130 fi
9131 rm -f conftest.$ac_objext conftest.$ac_ext
9132   break
9133 done
9134 fi
9135 echo "$as_me:9135: result: $ac_cv_sys_file_offset_bits" >&5
9136 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9137 if test "$ac_cv_sys_file_offset_bits" != no; then
9138
9139 cat >>confdefs.h <<EOF
9140 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9141 EOF
9142
9143 fi
9144 rm -rf conftest*
9145   echo "$as_me:9145: checking for _LARGE_FILES value needed for large files" >&5
9146 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9147 if test "${ac_cv_sys_large_files+set}" = set; then
9148   echo $ECHO_N "(cached) $ECHO_C" >&6
9149 else
9150   while :; do
9151   ac_cv_sys_large_files=no
9152   cat >conftest.$ac_ext <<_ACEOF
9153 #line 9153 "configure"
9154 #include "confdefs.h"
9155 #include <sys/types.h>
9156  /* Check that off_t can represent 2**63 - 1 correctly.
9157     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9158     since some C++ compilers masquerading as C compilers
9159     incorrectly reject 9223372036854775807.  */
9160 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9161   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9162                        && LARGE_OFF_T % 2147483647 == 1)
9163                       ? 1 : -1];
9164 int
9165 main ()
9166 {
9167
9168   ;
9169   return 0;
9170 }
9171 _ACEOF
9172 rm -f conftest.$ac_objext
9173 if { (eval echo "$as_me:9173: \"$ac_compile\"") >&5
9174   (eval $ac_compile) 2>&5
9175   ac_status=$?
9176   echo "$as_me:9176: \$? = $ac_status" >&5
9177   (exit $ac_status); } &&
9178          { ac_try='test -s conftest.$ac_objext'
9179   { (eval echo "$as_me:9179: \"$ac_try\"") >&5
9180   (eval $ac_try) 2>&5
9181   ac_status=$?
9182   echo "$as_me:9182: \$? = $ac_status" >&5
9183   (exit $ac_status); }; }; then
9184   break
9185 else
9186   echo "$as_me: failed program was:" >&5
9187 cat conftest.$ac_ext >&5
9188 fi
9189 rm -f conftest.$ac_objext conftest.$ac_ext
9190   cat >conftest.$ac_ext <<_ACEOF
9191 #line 9191 "configure"
9192 #include "confdefs.h"
9193 #define _LARGE_FILES 1
9194 #include <sys/types.h>
9195  /* Check that off_t can represent 2**63 - 1 correctly.
9196     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9197     since some C++ compilers masquerading as C compilers
9198     incorrectly reject 9223372036854775807.  */
9199 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9200   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9201                        && LARGE_OFF_T % 2147483647 == 1)
9202                       ? 1 : -1];
9203 int
9204 main ()
9205 {
9206
9207   ;
9208   return 0;
9209 }
9210 _ACEOF
9211 rm -f conftest.$ac_objext
9212 if { (eval echo "$as_me:9212: \"$ac_compile\"") >&5
9213   (eval $ac_compile) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); } &&
9217          { ac_try='test -s conftest.$ac_objext'
9218   { (eval echo "$as_me:9218: \"$ac_try\"") >&5
9219   (eval $ac_try) 2>&5
9220   ac_status=$?
9221   echo "$as_me:9221: \$? = $ac_status" >&5
9222   (exit $ac_status); }; }; then
9223   ac_cv_sys_large_files=1; break
9224 else
9225   echo "$as_me: failed program was:" >&5
9226 cat conftest.$ac_ext >&5
9227 fi
9228 rm -f conftest.$ac_objext conftest.$ac_ext
9229   break
9230 done
9231 fi
9232 echo "$as_me:9232: result: $ac_cv_sys_large_files" >&5
9233 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9234 if test "$ac_cv_sys_large_files" != no; then
9235
9236 cat >>confdefs.h <<EOF
9237 #define _LARGE_FILES $ac_cv_sys_large_files
9238 EOF
9239
9240 fi
9241 rm -rf conftest*
9242 fi
9243
9244     if test "$enable_largefile" != no ; then
9245         echo "$as_me:9245: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9246 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9247 if test "${ac_cv_sys_largefile_source+set}" = set; then
9248   echo $ECHO_N "(cached) $ECHO_C" >&6
9249 else
9250   while :; do
9251   ac_cv_sys_largefile_source=no
9252   cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255 #include <stdio.h>
9256 int
9257 main ()
9258 {
9259 return !fseeko;
9260   ;
9261   return 0;
9262 }
9263 _ACEOF
9264 rm -f conftest.$ac_objext
9265 if { (eval echo "$as_me:9265: \"$ac_compile\"") >&5
9266   (eval $ac_compile) 2>&5
9267   ac_status=$?
9268   echo "$as_me:9268: \$? = $ac_status" >&5
9269   (exit $ac_status); } &&
9270          { ac_try='test -s conftest.$ac_objext'
9271   { (eval echo "$as_me:9271: \"$ac_try\"") >&5
9272   (eval $ac_try) 2>&5
9273   ac_status=$?
9274   echo "$as_me:9274: \$? = $ac_status" >&5
9275   (exit $ac_status); }; }; then
9276   break
9277 else
9278   echo "$as_me: failed program was:" >&5
9279 cat conftest.$ac_ext >&5
9280 fi
9281 rm -f conftest.$ac_objext conftest.$ac_ext
9282   cat >conftest.$ac_ext <<_ACEOF
9283 #line 9283 "configure"
9284 #include "confdefs.h"
9285 #define _LARGEFILE_SOURCE 1
9286 #include <stdio.h>
9287 int
9288 main ()
9289 {
9290 return !fseeko;
9291   ;
9292   return 0;
9293 }
9294 _ACEOF
9295 rm -f conftest.$ac_objext
9296 if { (eval echo "$as_me:9296: \"$ac_compile\"") >&5
9297   (eval $ac_compile) 2>&5
9298   ac_status=$?
9299   echo "$as_me:9299: \$? = $ac_status" >&5
9300   (exit $ac_status); } &&
9301          { ac_try='test -s conftest.$ac_objext'
9302   { (eval echo "$as_me:9302: \"$ac_try\"") >&5
9303   (eval $ac_try) 2>&5
9304   ac_status=$?
9305   echo "$as_me:9305: \$? = $ac_status" >&5
9306   (exit $ac_status); }; }; then
9307   ac_cv_sys_largefile_source=1; break
9308 else
9309   echo "$as_me: failed program was:" >&5
9310 cat conftest.$ac_ext >&5
9311 fi
9312 rm -f conftest.$ac_objext conftest.$ac_ext
9313   break
9314 done
9315 fi
9316 echo "$as_me:9316: result: $ac_cv_sys_largefile_source" >&5
9317 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9318 if test "$ac_cv_sys_largefile_source" != no; then
9319
9320 cat >>confdefs.h <<EOF
9321 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9322 EOF
9323
9324 fi
9325 rm -rf conftest*
9326
9327 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9328 # in glibc 2.1.3, but that breaks too many other things.
9329 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9330 echo "$as_me:9330: checking for fseeko" >&5
9331 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9332 if test "${ac_cv_func_fseeko+set}" = set; then
9333   echo $ECHO_N "(cached) $ECHO_C" >&6
9334 else
9335   cat >conftest.$ac_ext <<_ACEOF
9336 #line 9336 "configure"
9337 #include "confdefs.h"
9338 #include <stdio.h>
9339 int
9340 main ()
9341 {
9342 return fseeko && fseeko (stdin, 0, 0);
9343   ;
9344   return 0;
9345 }
9346 _ACEOF
9347 rm -f conftest.$ac_objext conftest$ac_exeext
9348 if { (eval echo "$as_me:9348: \"$ac_link\"") >&5
9349   (eval $ac_link) 2>&5
9350   ac_status=$?
9351   echo "$as_me:9351: \$? = $ac_status" >&5
9352   (exit $ac_status); } &&
9353          { ac_try='test -s conftest$ac_exeext'
9354   { (eval echo "$as_me:9354: \"$ac_try\"") >&5
9355   (eval $ac_try) 2>&5
9356   ac_status=$?
9357   echo "$as_me:9357: \$? = $ac_status" >&5
9358   (exit $ac_status); }; }; then
9359   ac_cv_func_fseeko=yes
9360 else
9361   echo "$as_me: failed program was:" >&5
9362 cat conftest.$ac_ext >&5
9363 ac_cv_func_fseeko=no
9364 fi
9365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9366 fi
9367 echo "$as_me:9367: result: $ac_cv_func_fseeko" >&5
9368 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9369 if test $ac_cv_func_fseeko = yes; then
9370
9371 cat >>confdefs.h <<\EOF
9372 #define HAVE_FSEEKO 1
9373 EOF
9374
9375 fi
9376
9377         # Normally we would collect these definitions in the config.h,
9378         # but (like _XOPEN_SOURCE), some environments rely on having these
9379         # defined before any of the system headers are included.  Another
9380         # case comes up with C++, e.g., on AIX the compiler compiles the
9381         # header files by themselves before looking at the body files it is
9382         # told to compile.  For ncurses, those header files do not include
9383         # the config.h
9384         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9385         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9386         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9387
9388         echo "$as_me:9388: checking whether to use struct dirent64" >&5
9389 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9390 if test "${cf_cv_struct_dirent64+set}" = set; then
9391   echo $ECHO_N "(cached) $ECHO_C" >&6
9392 else
9393
9394                 cat >conftest.$ac_ext <<_ACEOF
9395 #line 9395 "configure"
9396 #include "confdefs.h"
9397
9398 #include <sys/types.h>
9399 #include <dirent.h>
9400
9401 int
9402 main ()
9403 {
9404
9405                 /* if transitional largefile support is setup, this is true */
9406                 extern struct dirent64 * readdir(DIR *);
9407                 struct dirent64 *x = readdir((DIR *)0);
9408                 struct dirent *y = readdir((DIR *)0);
9409                 int z = x - y;
9410
9411   ;
9412   return 0;
9413 }
9414 _ACEOF
9415 rm -f conftest.$ac_objext
9416 if { (eval echo "$as_me:9416: \"$ac_compile\"") >&5
9417   (eval $ac_compile) 2>&5
9418   ac_status=$?
9419   echo "$as_me:9419: \$? = $ac_status" >&5
9420   (exit $ac_status); } &&
9421          { ac_try='test -s conftest.$ac_objext'
9422   { (eval echo "$as_me:9422: \"$ac_try\"") >&5
9423   (eval $ac_try) 2>&5
9424   ac_status=$?
9425   echo "$as_me:9425: \$? = $ac_status" >&5
9426   (exit $ac_status); }; }; then
9427   cf_cv_struct_dirent64=yes
9428 else
9429   echo "$as_me: failed program was:" >&5
9430 cat conftest.$ac_ext >&5
9431 cf_cv_struct_dirent64=no
9432 fi
9433 rm -f conftest.$ac_objext conftest.$ac_ext
9434
9435 fi
9436 echo "$as_me:9436: result: $cf_cv_struct_dirent64" >&5
9437 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9438         test "$cf_cv_struct_dirent64" = yes &&
9439 cat >>confdefs.h <<\EOF
9440 #define HAVE_STRUCT_DIRENT64 1
9441 EOF
9442
9443     fi
9444
9445 ### Enable compiling-in rcs id's
9446 echo "$as_me:9446: checking if RCS identifiers should be compiled-in" >&5
9447 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9448
9449 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9450 if test "${with_rcs_ids+set}" = set; then
9451   withval="$with_rcs_ids"
9452   with_rcs_ids=$withval
9453 else
9454   with_rcs_ids=no
9455 fi;
9456 echo "$as_me:9456: result: $with_rcs_ids" >&5
9457 echo "${ECHO_T}$with_rcs_ids" >&6
9458 test "$with_rcs_ids" = yes &&
9459 cat >>confdefs.h <<\EOF
9460 #define USE_RCS_IDS 1
9461 EOF
9462
9463 ###############################################################################
9464
9465 ### Note that some functions (such as const) are normally disabled anyway.
9466 echo "$as_me:9466: checking if you want to build with function extensions" >&5
9467 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9468
9469 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9470 if test "${enable_ext_funcs+set}" = set; then
9471   enableval="$enable_ext_funcs"
9472   with_ext_funcs=$enableval
9473 else
9474   with_ext_funcs=yes
9475 fi;
9476 echo "$as_me:9476: result: $with_ext_funcs" >&5
9477 echo "${ECHO_T}$with_ext_funcs" >&6
9478 if test "$with_ext_funcs" = yes ; then
9479         NCURSES_EXT_FUNCS=1
9480
9481 cat >>confdefs.h <<\EOF
9482 #define HAVE_USE_DEFAULT_COLORS 1
9483 EOF
9484
9485 cat >>confdefs.h <<\EOF
9486 #define NCURSES_EXT_FUNCS 1
9487 EOF
9488
9489 else
9490         NCURSES_EXT_FUNCS=0
9491 fi
9492
9493 ###   use option --enable-const to turn on use of const beyond that in XSI.
9494 echo "$as_me:9494: checking for extended use of const keyword" >&5
9495 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9496
9497 # Check whether --enable-const or --disable-const was given.
9498 if test "${enable_const+set}" = set; then
9499   enableval="$enable_const"
9500   with_ext_const=$enableval
9501 else
9502   with_ext_const=no
9503 fi;
9504 echo "$as_me:9504: result: $with_ext_const" >&5
9505 echo "${ECHO_T}$with_ext_const" >&6
9506 NCURSES_CONST='/*nothing*/'
9507 if test "$with_ext_const" = yes ; then
9508         NCURSES_CONST=const
9509 fi
9510
9511 ###############################################################################
9512 # These options are relatively safe to experiment with.
9513
9514 echo "$as_me:9514: checking if you want all development code" >&5
9515 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9516
9517 # Check whether --with-develop or --without-develop was given.
9518 if test "${with_develop+set}" = set; then
9519   withval="$with_develop"
9520   with_develop=$withval
9521 else
9522   with_develop=no
9523 fi;
9524 echo "$as_me:9524: result: $with_develop" >&5
9525 echo "${ECHO_T}$with_develop" >&6
9526
9527 ###############################################################################
9528 # These are just experimental, probably should not be in a package:
9529
9530 # This is still experimental (20080329), but should ultimately be moved to
9531 # the script-block --with-normal, etc.
9532
9533 echo "$as_me:9533: checking if you want to link with the pthread library" >&5
9534 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9535
9536 # Check whether --with-pthread or --without-pthread was given.
9537 if test "${with_pthread+set}" = set; then
9538   withval="$with_pthread"
9539   with_pthread=$withval
9540 else
9541   with_pthread=no
9542 fi;
9543 echo "$as_me:9543: result: $with_pthread" >&5
9544 echo "${ECHO_T}$with_pthread" >&6
9545
9546 if test "$with_pthread" != no ; then
9547     echo "$as_me:9547: checking for pthread.h" >&5
9548 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9549 if test "${ac_cv_header_pthread_h+set}" = set; then
9550   echo $ECHO_N "(cached) $ECHO_C" >&6
9551 else
9552   cat >conftest.$ac_ext <<_ACEOF
9553 #line 9553 "configure"
9554 #include "confdefs.h"
9555 #include <pthread.h>
9556 _ACEOF
9557 if { (eval echo "$as_me:9557: \"$ac_cpp conftest.$ac_ext\"") >&5
9558   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9559   ac_status=$?
9560   egrep -v '^ *\+' conftest.er1 >conftest.err
9561   rm -f conftest.er1
9562   cat conftest.err >&5
9563   echo "$as_me:9563: \$? = $ac_status" >&5
9564   (exit $ac_status); } >/dev/null; then
9565   if test -s conftest.err; then
9566     ac_cpp_err=$ac_c_preproc_warn_flag
9567   else
9568     ac_cpp_err=
9569   fi
9570 else
9571   ac_cpp_err=yes
9572 fi
9573 if test -z "$ac_cpp_err"; then
9574   ac_cv_header_pthread_h=yes
9575 else
9576   echo "$as_me: failed program was:" >&5
9577   cat conftest.$ac_ext >&5
9578   ac_cv_header_pthread_h=no
9579 fi
9580 rm -f conftest.err conftest.$ac_ext
9581 fi
9582 echo "$as_me:9582: result: $ac_cv_header_pthread_h" >&5
9583 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9584 if test $ac_cv_header_pthread_h = yes; then
9585
9586 cat >>confdefs.h <<\EOF
9587 #define HAVE_PTHREADS_H 1
9588 EOF
9589
9590         for cf_lib_pthread in pthread c_r
9591         do
9592             echo "$as_me:9592: checking if we can link with the $cf_lib_pthread library" >&5
9593 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
9594             cf_save_LIBS="$LIBS"
9595
9596 cf_add_libs="-l$cf_lib_pthread"
9597 # Filter out duplicates - this happens with badly-designed ".pc" files...
9598 for cf_add_1lib in $LIBS
9599 do
9600         for cf_add_2lib in $cf_add_libs
9601         do
9602                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9603                 then
9604                         cf_add_1lib=
9605                         break
9606                 fi
9607         done
9608         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9609 done
9610 LIBS="$cf_add_libs"
9611
9612             cat >conftest.$ac_ext <<_ACEOF
9613 #line 9613 "configure"
9614 #include "confdefs.h"
9615
9616 #include <pthread.h>
9617
9618 int
9619 main ()
9620 {
9621
9622                 int rc = pthread_create(0,0,0,0);
9623                 int r2 = pthread_mutexattr_settype(0, 0);
9624
9625   ;
9626   return 0;
9627 }
9628 _ACEOF
9629 rm -f conftest.$ac_objext conftest$ac_exeext
9630 if { (eval echo "$as_me:9630: \"$ac_link\"") >&5
9631   (eval $ac_link) 2>&5
9632   ac_status=$?
9633   echo "$as_me:9633: \$? = $ac_status" >&5
9634   (exit $ac_status); } &&
9635          { ac_try='test -s conftest$ac_exeext'
9636   { (eval echo "$as_me:9636: \"$ac_try\"") >&5
9637   (eval $ac_try) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); }; }; then
9641   with_pthread=yes
9642 else
9643   echo "$as_me: failed program was:" >&5
9644 cat conftest.$ac_ext >&5
9645 with_pthread=no
9646 fi
9647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9648             LIBS="$cf_save_LIBS"
9649             echo "$as_me:9649: result: $with_pthread" >&5
9650 echo "${ECHO_T}$with_pthread" >&6
9651             test "$with_pthread" = yes && break
9652         done
9653
9654         if test "$with_pthread" = yes ; then
9655
9656 cf_add_libs="-l$cf_lib_pthread"
9657 # Filter out duplicates - this happens with badly-designed ".pc" files...
9658 for cf_add_1lib in $LIBS
9659 do
9660         for cf_add_2lib in $cf_add_libs
9661         do
9662                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9663                 then
9664                         cf_add_1lib=
9665                         break
9666                 fi
9667         done
9668         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9669 done
9670 LIBS="$cf_add_libs"
9671
9672 cat >>confdefs.h <<\EOF
9673 #define HAVE_LIBPTHREADS 1
9674 EOF
9675
9676         else
9677             { { echo "$as_me:9677: error: Cannot link with pthread library" >&5
9678 echo "$as_me: error: Cannot link with pthread library" >&2;}
9679    { (exit 1); exit 1; }; }
9680         fi
9681
9682 fi
9683
9684 fi
9685
9686 echo "$as_me:9686: checking if you want to use weak-symbols for pthreads" >&5
9687 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9688
9689 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9690 if test "${enable_weak_symbols+set}" = set; then
9691   enableval="$enable_weak_symbols"
9692   use_weak_symbols=$withval
9693 else
9694   use_weak_symbols=no
9695 fi;
9696 echo "$as_me:9696: result: $use_weak_symbols" >&5
9697 echo "${ECHO_T}$use_weak_symbols" >&6
9698 if test "$use_weak_symbols" = yes ; then
9699
9700 echo "$as_me:9700: checking if $CC supports weak symbols" >&5
9701 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9702 if test "${cf_cv_weak_symbols+set}" = set; then
9703   echo $ECHO_N "(cached) $ECHO_C" >&6
9704 else
9705
9706 cat >conftest.$ac_ext <<_ACEOF
9707 #line 9707 "configure"
9708 #include "confdefs.h"
9709
9710 #include <stdio.h>
9711 int
9712 main ()
9713 {
9714
9715 #if defined(__GNUC__)
9716 #  if defined __USE_ISOC99
9717 #    define _cat_pragma(exp)    _Pragma(#exp)
9718 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9719 #  else
9720 #    define _weak_pragma(exp)
9721 #  endif
9722 #  define _declare(name)        __extension__ extern __typeof__(name) name
9723 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9724 #endif
9725
9726 weak_symbol(fopen);
9727
9728   ;
9729   return 0;
9730 }
9731 _ACEOF
9732 rm -f conftest.$ac_objext
9733 if { (eval echo "$as_me:9733: \"$ac_compile\"") >&5
9734   (eval $ac_compile) 2>&5
9735   ac_status=$?
9736   echo "$as_me:9736: \$? = $ac_status" >&5
9737   (exit $ac_status); } &&
9738          { ac_try='test -s conftest.$ac_objext'
9739   { (eval echo "$as_me:9739: \"$ac_try\"") >&5
9740   (eval $ac_try) 2>&5
9741   ac_status=$?
9742   echo "$as_me:9742: \$? = $ac_status" >&5
9743   (exit $ac_status); }; }; then
9744   cf_cv_weak_symbols=yes
9745 else
9746   echo "$as_me: failed program was:" >&5
9747 cat conftest.$ac_ext >&5
9748 cf_cv_weak_symbols=no
9749 fi
9750 rm -f conftest.$ac_objext conftest.$ac_ext
9751
9752 fi
9753 echo "$as_me:9753: result: $cf_cv_weak_symbols" >&5
9754 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9755
9756 else
9757     cf_cv_weak_symbols=no
9758 fi
9759
9760 if test $cf_cv_weak_symbols = yes ; then
9761
9762 cat >>confdefs.h <<\EOF
9763 #define USE_WEAK_SYMBOLS 1
9764 EOF
9765
9766 fi
9767
9768 PTHREAD=
9769 if test "$with_pthread" = "yes" ; then
9770
9771 cat >>confdefs.h <<\EOF
9772 #define USE_PTHREADS 1
9773 EOF
9774
9775     enable_reentrant=yes
9776     if test $cf_cv_weak_symbols = yes ; then
9777         PTHREAD=-lpthread
9778     fi
9779 fi
9780
9781 # OpenSUSE is installing ncurses6, using reentrant option.
9782 echo "$as_me:9782: checking for _nc_TABSIZE" >&5
9783 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9784 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9785   echo $ECHO_N "(cached) $ECHO_C" >&6
9786 else
9787   cat >conftest.$ac_ext <<_ACEOF
9788 #line 9788 "configure"
9789 #include "confdefs.h"
9790 /* System header to define __stub macros and hopefully few prototypes,
9791     which can conflict with char _nc_TABSIZE (); below.  */
9792 #include <assert.h>
9793 /* Override any gcc2 internal prototype to avoid an error.  */
9794 #ifdef __cplusplus
9795 extern "C"
9796 #endif
9797 /* We use char because int might match the return type of a gcc2
9798    builtin and then its argument prototype would still apply.  */
9799 char _nc_TABSIZE ();
9800 char (*f) ();
9801
9802 int
9803 main ()
9804 {
9805 /* The GNU C library defines this for functions which it implements
9806     to always fail with ENOSYS.  Some functions are actually named
9807     something starting with __ and the normal name is an alias.  */
9808 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9809 choke me
9810 #else
9811 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9812 #endif
9813
9814   ;
9815   return 0;
9816 }
9817 _ACEOF
9818 rm -f conftest.$ac_objext conftest$ac_exeext
9819 if { (eval echo "$as_me:9819: \"$ac_link\"") >&5
9820   (eval $ac_link) 2>&5
9821   ac_status=$?
9822   echo "$as_me:9822: \$? = $ac_status" >&5
9823   (exit $ac_status); } &&
9824          { ac_try='test -s conftest$ac_exeext'
9825   { (eval echo "$as_me:9825: \"$ac_try\"") >&5
9826   (eval $ac_try) 2>&5
9827   ac_status=$?
9828   echo "$as_me:9828: \$? = $ac_status" >&5
9829   (exit $ac_status); }; }; then
9830   ac_cv_func__nc_TABSIZE=yes
9831 else
9832   echo "$as_me: failed program was:" >&5
9833 cat conftest.$ac_ext >&5
9834 ac_cv_func__nc_TABSIZE=no
9835 fi
9836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9837 fi
9838 echo "$as_me:9838: result: $ac_cv_func__nc_TABSIZE" >&5
9839 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9840 if test $ac_cv_func__nc_TABSIZE = yes; then
9841   assume_reentrant=yes
9842 else
9843   assume_reentrant=no
9844 fi
9845
9846 # Reentrant code has to be opaque; there's little advantage to making ncurses
9847 # opaque outside of that, so there is no --enable-opaque option.  We can use
9848 # this option without --with-pthreads, but this will be always set for
9849 # pthreads.
9850 echo "$as_me:9850: checking if you want experimental reentrant code" >&5
9851 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9852
9853 # Check whether --enable-reentrant or --disable-reentrant was given.
9854 if test "${enable_reentrant+set}" = set; then
9855   enableval="$enable_reentrant"
9856   with_reentrant=$enableval
9857 else
9858   with_reentrant=$assume_reentrant
9859 fi;
9860 echo "$as_me:9860: result: $with_reentrant" >&5
9861 echo "${ECHO_T}$with_reentrant" >&6
9862 if test "$with_reentrant" = yes ; then
9863         cf_cv_enable_reentrant=1
9864         if test $cf_cv_weak_symbols = yes ; then
9865
9866 # remove pthread library from $LIBS
9867 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9868
9869         elif test "$assume_reentrant" = no ; then
9870                 LIB_SUFFIX="t${LIB_SUFFIX}"
9871         fi
9872
9873 cat >>confdefs.h <<\EOF
9874 #define USE_REENTRANT 1
9875 EOF
9876
9877 else
9878         cf_cv_enable_reentrant=0
9879 fi
9880
9881 ### Allow using a different wrap-prefix
9882 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9883         echo "$as_me:9883: checking for prefix used to wrap public variables" >&5
9884 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9885
9886 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9887 if test "${with_wrap_prefix+set}" = set; then
9888   withval="$with_wrap_prefix"
9889   NCURSES_WRAP_PREFIX=$withval
9890 else
9891   NCURSES_WRAP_PREFIX=_nc_
9892 fi;
9893         echo "$as_me:9893: result: $NCURSES_WRAP_PREFIX" >&5
9894 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9895 else
9896         NCURSES_WRAP_PREFIX=_nc_
9897 fi
9898
9899 cat >>confdefs.h <<EOF
9900 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9901 EOF
9902
9903 ###############################################################################
9904
9905 ###     use option --disable-echo to suppress full display compiling commands
9906
9907 echo "$as_me:9907: checking if you want to see long compiling messages" >&5
9908 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
9909
9910 # Check whether --enable-echo or --disable-echo was given.
9911 if test "${enable_echo+set}" = set; then
9912   enableval="$enable_echo"
9913   test "$enableval" != no && enableval=yes
9914   if test "$enableval" != "yes" ; then
9915
9916     ECHO_LT='--silent'
9917     ECHO_LD='@echo linking $@;'
9918     RULE_CC='@echo compiling $<'
9919     SHOW_CC='@echo compiling $@'
9920     ECHO_CC='@'
9921
9922   else
9923
9924     ECHO_LT=''
9925     ECHO_LD=''
9926     RULE_CC=''
9927     SHOW_CC=''
9928     ECHO_CC=''
9929
9930   fi
9931 else
9932   enableval=yes
9933
9934     ECHO_LT=''
9935     ECHO_LD=''
9936     RULE_CC=''
9937     SHOW_CC=''
9938     ECHO_CC=''
9939
9940 fi;
9941 echo "$as_me:9941: result: $enableval" >&5
9942 echo "${ECHO_T}$enableval" >&6
9943
9944 ###     use option --enable-warnings to turn on all gcc warnings
9945 echo "$as_me:9945: checking if you want to see compiler warnings" >&5
9946 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9947
9948 # Check whether --enable-warnings or --disable-warnings was given.
9949 if test "${enable_warnings+set}" = set; then
9950   enableval="$enable_warnings"
9951   with_warnings=$enableval
9952 fi;
9953 echo "$as_me:9953: result: $with_warnings" >&5
9954 echo "${ECHO_T}$with_warnings" >&6
9955
9956 if test "x$with_warnings" = "xyes"; then
9957
9958         ADAFLAGS="$ADAFLAGS -gnatg"
9959
9960 INTEL_COMPILER=no
9961
9962 if test "$GCC" = yes ; then
9963         case $host_os in
9964         linux*|gnu*)
9965                 echo "$as_me:9965: checking if this is really Intel C compiler" >&5
9966 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9967                 cf_save_CFLAGS="$CFLAGS"
9968                 CFLAGS="$CFLAGS -no-gcc"
9969                 cat >conftest.$ac_ext <<_ACEOF
9970 #line 9970 "configure"
9971 #include "confdefs.h"
9972
9973 int
9974 main ()
9975 {
9976
9977 #ifdef __INTEL_COMPILER
9978 #else
9979 make an error
9980 #endif
9981
9982   ;
9983   return 0;
9984 }
9985 _ACEOF
9986 rm -f conftest.$ac_objext
9987 if { (eval echo "$as_me:9987: \"$ac_compile\"") >&5
9988   (eval $ac_compile) 2>&5
9989   ac_status=$?
9990   echo "$as_me:9990: \$? = $ac_status" >&5
9991   (exit $ac_status); } &&
9992          { ac_try='test -s conftest.$ac_objext'
9993   { (eval echo "$as_me:9993: \"$ac_try\"") >&5
9994   (eval $ac_try) 2>&5
9995   ac_status=$?
9996   echo "$as_me:9996: \$? = $ac_status" >&5
9997   (exit $ac_status); }; }; then
9998   INTEL_COMPILER=yes
9999 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
10000
10001 else
10002   echo "$as_me: failed program was:" >&5
10003 cat conftest.$ac_ext >&5
10004 fi
10005 rm -f conftest.$ac_objext conftest.$ac_ext
10006                 CFLAGS="$cf_save_CFLAGS"
10007                 echo "$as_me:10007: result: $INTEL_COMPILER" >&5
10008 echo "${ECHO_T}$INTEL_COMPILER" >&6
10009                 ;;
10010         esac
10011 fi
10012
10013 CLANG_COMPILER=no
10014
10015 if test "$GCC" = yes ; then
10016         echo "$as_me:10016: checking if this is really Clang C compiler" >&5
10017 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
10018         cf_save_CFLAGS="$CFLAGS"
10019         CFLAGS="$CFLAGS -Qunused-arguments"
10020         cat >conftest.$ac_ext <<_ACEOF
10021 #line 10021 "configure"
10022 #include "confdefs.h"
10023
10024 int
10025 main ()
10026 {
10027
10028 #ifdef __clang__
10029 #else
10030 make an error
10031 #endif
10032
10033   ;
10034   return 0;
10035 }
10036 _ACEOF
10037 rm -f conftest.$ac_objext
10038 if { (eval echo "$as_me:10038: \"$ac_compile\"") >&5
10039   (eval $ac_compile) 2>&5
10040   ac_status=$?
10041   echo "$as_me:10041: \$? = $ac_status" >&5
10042   (exit $ac_status); } &&
10043          { ac_try='test -s conftest.$ac_objext'
10044   { (eval echo "$as_me:10044: \"$ac_try\"") >&5
10045   (eval $ac_try) 2>&5
10046   ac_status=$?
10047   echo "$as_me:10047: \$? = $ac_status" >&5
10048   (exit $ac_status); }; }; then
10049   CLANG_COMPILER=yes
10050 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
10051
10052 else
10053   echo "$as_me: failed program was:" >&5
10054 cat conftest.$ac_ext >&5
10055 fi
10056 rm -f conftest.$ac_objext conftest.$ac_ext
10057         CFLAGS="$cf_save_CFLAGS"
10058         echo "$as_me:10058: result: $CLANG_COMPILER" >&5
10059 echo "${ECHO_T}$CLANG_COMPILER" >&6
10060 fi
10061
10062 cat > conftest.$ac_ext <<EOF
10063 #line 10063 "${as_me:-configure}"
10064 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10065 EOF
10066
10067 if test "$INTEL_COMPILER" = yes
10068 then
10069 # The "-wdXXX" options suppress warnings:
10070 # remark #1419: external declaration in primary source file
10071 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10072 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10073 # remark #193: zero used for undefined preprocessing identifier
10074 # remark #593: variable "curs_sb_left_arrow" was set but never used
10075 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10076 # remark #869: parameter "tw" was never referenced
10077 # remark #981: operands are evaluated in unspecified order
10078 # warning #279: controlling expression is constant
10079
10080         { echo "$as_me:10080: checking for $CC warning options..." >&5
10081 echo "$as_me: checking for $CC warning options..." >&6;}
10082         cf_save_CFLAGS="$CFLAGS"
10083         EXTRA_CFLAGS="-Wall"
10084         for cf_opt in \
10085                 wd1419 \
10086                 wd1683 \
10087                 wd1684 \
10088                 wd193 \
10089                 wd593 \
10090                 wd279 \
10091                 wd810 \
10092                 wd869 \
10093                 wd981
10094         do
10095                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10096                 if { (eval echo "$as_me:10096: \"$ac_compile\"") >&5
10097   (eval $ac_compile) 2>&5
10098   ac_status=$?
10099   echo "$as_me:10099: \$? = $ac_status" >&5
10100   (exit $ac_status); }; then
10101                         test -n "$verbose" && echo "$as_me:10101: result: ... -$cf_opt" >&5
10102 echo "${ECHO_T}... -$cf_opt" >&6
10103                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10104                 fi
10105         done
10106         CFLAGS="$cf_save_CFLAGS"
10107
10108 elif test "$GCC" = yes
10109 then
10110         { echo "$as_me:10110: checking for $CC warning options..." >&5
10111 echo "$as_me: checking for $CC warning options..." >&6;}
10112         cf_save_CFLAGS="$CFLAGS"
10113         EXTRA_CFLAGS=
10114         cf_warn_CONST=""
10115         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10116         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
10117         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
10118         for cf_opt in W Wall \
10119                 Wbad-function-cast \
10120                 Wcast-align \
10121                 Wcast-qual \
10122                 Wdeclaration-after-statement \
10123                 Wextra \
10124                 Winline \
10125                 Wmissing-declarations \
10126                 Wmissing-prototypes \
10127                 Wnested-externs \
10128                 Wpointer-arith \
10129                 Wshadow \
10130                 Wstrict-prototypes \
10131                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
10132         do
10133                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10134                 if { (eval echo "$as_me:10134: \"$ac_compile\"") >&5
10135   (eval $ac_compile) 2>&5
10136   ac_status=$?
10137   echo "$as_me:10137: \$? = $ac_status" >&5
10138   (exit $ac_status); }; then
10139                         test -n "$verbose" && echo "$as_me:10139: result: ... -$cf_opt" >&5
10140 echo "${ECHO_T}... -$cf_opt" >&6
10141                         case $cf_opt in #(vi
10142                         Wcast-qual) #(vi
10143                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10144                                 ;;
10145                         Winline) #(vi
10146                                 case $GCC_VERSION in
10147                                 [34].*)
10148                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10149
10150 echo "${as_me:-configure}:10150: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10151
10152                                         continue;;
10153                                 esac
10154                                 ;;
10155                         Wpointer-arith) #(vi
10156                                 case $GCC_VERSION in
10157                                 [12].*)
10158                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10159
10160 echo "${as_me:-configure}:10160: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10161
10162                                         continue;;
10163                                 esac
10164                                 ;;
10165                         esac
10166                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10167                 fi
10168         done
10169         CFLAGS="$cf_save_CFLAGS"
10170 fi
10171 rm -rf conftest*
10172
10173 fi
10174
10175 if test "$GCC" = yes
10176 then
10177 cat > conftest.i <<EOF
10178 #ifndef GCC_PRINTF
10179 #define GCC_PRINTF 0
10180 #endif
10181 #ifndef GCC_SCANF
10182 #define GCC_SCANF 0
10183 #endif
10184 #ifndef GCC_NORETURN
10185 #define GCC_NORETURN /* nothing */
10186 #endif
10187 #ifndef GCC_UNUSED
10188 #define GCC_UNUSED /* nothing */
10189 #endif
10190 EOF
10191 if test "$GCC" = yes
10192 then
10193         { echo "$as_me:10193: checking for $CC __attribute__ directives..." >&5
10194 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10195 cat > conftest.$ac_ext <<EOF
10196 #line 10196 "${as_me:-configure}"
10197 #include "confdefs.h"
10198 #include "conftest.h"
10199 #include "conftest.i"
10200 #if     GCC_PRINTF
10201 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10202 #else
10203 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10204 #endif
10205 #if     GCC_SCANF
10206 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10207 #else
10208 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10209 #endif
10210 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10211 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10212 extern void foo(void) GCC_NORETURN;
10213 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10214 EOF
10215         cf_printf_attribute=no
10216         cf_scanf_attribute=no
10217         for cf_attribute in scanf printf unused noreturn
10218         do
10219
10220 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10221
10222                 cf_directive="__attribute__(($cf_attribute))"
10223                 echo "checking for $CC $cf_directive" 1>&5
10224
10225                 case $cf_attribute in #(vi
10226                 printf) #(vi
10227                         cf_printf_attribute=yes
10228                         cat >conftest.h <<EOF
10229 #define GCC_$cf_ATTRIBUTE 1
10230 EOF
10231                         ;;
10232                 scanf) #(vi
10233                         cf_scanf_attribute=yes
10234                         cat >conftest.h <<EOF
10235 #define GCC_$cf_ATTRIBUTE 1
10236 EOF
10237                         ;;
10238                 *) #(vi
10239                         cat >conftest.h <<EOF
10240 #define GCC_$cf_ATTRIBUTE $cf_directive
10241 EOF
10242                         ;;
10243                 esac
10244
10245                 if { (eval echo "$as_me:10245: \"$ac_compile\"") >&5
10246   (eval $ac_compile) 2>&5
10247   ac_status=$?
10248   echo "$as_me:10248: \$? = $ac_status" >&5
10249   (exit $ac_status); }; then
10250                         test -n "$verbose" && echo "$as_me:10250: result: ... $cf_attribute" >&5
10251 echo "${ECHO_T}... $cf_attribute" >&6
10252                         cat conftest.h >>confdefs.h
10253                         case $cf_attribute in #(vi
10254                         noreturn) #(vi
10255
10256 cat >>confdefs.h <<EOF
10257 #define GCC_NORETURN $cf_directive
10258 EOF
10259
10260                                 ;;
10261                         printf) #(vi
10262                                 cf_value='/* nothing */'
10263                                 if test "$cf_printf_attribute" != no ; then
10264                                         cf_value='__attribute__((format(printf,fmt,var)))'
10265
10266 cat >>confdefs.h <<\EOF
10267 #define GCC_PRINTF 1
10268 EOF
10269
10270                                 fi
10271
10272 cat >>confdefs.h <<EOF
10273 #define GCC_PRINTFLIKE(fmt,var) $cf_value
10274 EOF
10275
10276                                 ;;
10277                         scanf) #(vi
10278                                 cf_value='/* nothing */'
10279                                 if test "$cf_scanf_attribute" != no ; then
10280                                         cf_value='__attribute__((format(scanf,fmt,var)))'
10281
10282 cat >>confdefs.h <<\EOF
10283 #define GCC_SCANF 1
10284 EOF
10285
10286                                 fi
10287
10288 cat >>confdefs.h <<EOF
10289 #define GCC_SCANFLIKE(fmt,var) $cf_value
10290 EOF
10291
10292                                 ;;
10293                         unused) #(vi
10294
10295 cat >>confdefs.h <<EOF
10296 #define GCC_UNUSED $cf_directive
10297 EOF
10298
10299                                 ;;
10300                         esac
10301                 fi
10302         done
10303 else
10304         fgrep define conftest.i >>confdefs.h
10305 fi
10306 rm -rf conftest*
10307 fi
10308
10309 ###     use option --enable-assertions to turn on generation of assertion code
10310 echo "$as_me:10310: checking if you want to enable runtime assertions" >&5
10311 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10312
10313 # Check whether --enable-assertions or --disable-assertions was given.
10314 if test "${enable_assertions+set}" = set; then
10315   enableval="$enable_assertions"
10316   with_assertions=$enableval
10317 else
10318   with_assertions=no
10319 fi;
10320 echo "$as_me:10320: result: $with_assertions" >&5
10321 echo "${ECHO_T}$with_assertions" >&6
10322 if test -n "$GCC"
10323 then
10324         if test "$with_assertions" = no
10325         then
10326                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10327         else
10328
10329         ADAFLAGS="$ADAFLAGS -gnata"
10330
10331         fi
10332 fi
10333
10334 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10335
10336 cat >>confdefs.h <<\EOF
10337 #define HAVE_NC_ALLOC_H 1
10338 EOF
10339
10340 ###     use option --enable-expanded to generate certain macros as functions
10341
10342 # Check whether --enable-expanded or --disable-expanded was given.
10343 if test "${enable_expanded+set}" = set; then
10344   enableval="$enable_expanded"
10345   test "$enableval" = yes &&
10346 cat >>confdefs.h <<\EOF
10347 #define NCURSES_EXPANDED 1
10348 EOF
10349
10350 fi;
10351
10352 ###     use option --disable-macros to suppress macros in favor of functions
10353
10354 # Check whether --enable-macros or --disable-macros was given.
10355 if test "${enable_macros+set}" = set; then
10356   enableval="$enable_macros"
10357   test "$enableval" = no &&
10358 cat >>confdefs.h <<\EOF
10359 #define NCURSES_NOMACROS 1
10360 EOF
10361
10362 fi;
10363
10364 # Normally we only add trace() to the debug-library.  Allow this to be
10365 # extended to all models of the ncurses library:
10366 cf_all_traces=no
10367 case "$CFLAGS $CPPFLAGS" in
10368 *-DTRACE*)
10369         cf_all_traces=yes
10370         ;;
10371 esac
10372
10373 echo "$as_me:10373: checking whether to add trace feature to all models" >&5
10374 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10375
10376 # Check whether --with-trace or --without-trace was given.
10377 if test "${with_trace+set}" = set; then
10378   withval="$with_trace"
10379   cf_with_trace=$withval
10380 else
10381   cf_with_trace=$cf_all_traces
10382 fi;
10383 echo "$as_me:10383: result: $cf_with_trace" >&5
10384 echo "${ECHO_T}$cf_with_trace" >&6
10385
10386 if test "$cf_with_trace" = yes ; then
10387         ADA_TRACE=TRUE
10388
10389 cf_fix_cppflags=no
10390 cf_new_cflags=
10391 cf_new_cppflags=
10392 cf_new_extra_cppflags=
10393
10394 for cf_add_cflags in -DTRACE
10395 do
10396 case $cf_fix_cppflags in
10397 no)
10398         case $cf_add_cflags in #(vi
10399         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10400                 case $cf_add_cflags in
10401                 -D*)
10402                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10403
10404                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10405                                 && test -z "${cf_tst_cflags}" \
10406                                 && cf_fix_cppflags=yes
10407
10408                         if test $cf_fix_cppflags = yes ; then
10409                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10410                                 continue
10411                         elif test "${cf_tst_cflags}" = "\"'" ; then
10412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10413                                 continue
10414                         fi
10415                         ;;
10416                 esac
10417                 case "$CPPFLAGS" in
10418                 *$cf_add_cflags) #(vi
10419                         ;;
10420                 *) #(vi
10421                         case $cf_add_cflags in #(vi
10422                         -D*)
10423                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10424
10425 CPPFLAGS=`echo "$CPPFLAGS" | \
10426         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10427                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10428
10429                                 ;;
10430                         esac
10431                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10432                         ;;
10433                 esac
10434                 ;;
10435         *)
10436                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10437                 ;;
10438         esac
10439         ;;
10440 yes)
10441         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10442
10443         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10444
10445         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10446                 && test -z "${cf_tst_cflags}" \
10447                 && cf_fix_cppflags=no
10448         ;;
10449 esac
10450 done
10451
10452 if test -n "$cf_new_cflags" ; then
10453
10454         CFLAGS="$CFLAGS $cf_new_cflags"
10455 fi
10456
10457 if test -n "$cf_new_cppflags" ; then
10458
10459         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10460 fi
10461
10462 if test -n "$cf_new_extra_cppflags" ; then
10463
10464         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10465 fi
10466
10467 else
10468         ADA_TRACE=FALSE
10469 fi
10470
10471 echo "$as_me:10471: checking if we want to use GNAT projects" >&5
10472 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
10473
10474 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
10475 if test "${enable_gnat_projects+set}" = set; then
10476   enableval="$enable_gnat_projects"
10477   test "$enableval" != no && enableval=yes
10478   if test "$enableval" != "yes" ; then
10479     enable_gnat_projects=no
10480   else
10481     enable_gnat_projects=yes
10482   fi
10483 else
10484   enableval=yes
10485   enable_gnat_projects=yes
10486
10487 fi;
10488 echo "$as_me:10488: result: $enable_gnat_projects" >&5
10489 echo "${ECHO_T}$enable_gnat_projects" >&6
10490
10491 ###     Checks for libraries.
10492 case $cf_cv_system_name in #(vi
10493 *mingw32*) #(vi
10494         ;;
10495 *)
10496 echo "$as_me:10496: checking for gettimeofday" >&5
10497 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10498 if test "${ac_cv_func_gettimeofday+set}" = set; then
10499   echo $ECHO_N "(cached) $ECHO_C" >&6
10500 else
10501   cat >conftest.$ac_ext <<_ACEOF
10502 #line 10502 "configure"
10503 #include "confdefs.h"
10504 /* System header to define __stub macros and hopefully few prototypes,
10505     which can conflict with char gettimeofday (); below.  */
10506 #include <assert.h>
10507 /* Override any gcc2 internal prototype to avoid an error.  */
10508 #ifdef __cplusplus
10509 extern "C"
10510 #endif
10511 /* We use char because int might match the return type of a gcc2
10512    builtin and then its argument prototype would still apply.  */
10513 char gettimeofday ();
10514 char (*f) ();
10515
10516 int
10517 main ()
10518 {
10519 /* The GNU C library defines this for functions which it implements
10520     to always fail with ENOSYS.  Some functions are actually named
10521     something starting with __ and the normal name is an alias.  */
10522 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10523 choke me
10524 #else
10525 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10526 #endif
10527
10528   ;
10529   return 0;
10530 }
10531 _ACEOF
10532 rm -f conftest.$ac_objext conftest$ac_exeext
10533 if { (eval echo "$as_me:10533: \"$ac_link\"") >&5
10534   (eval $ac_link) 2>&5
10535   ac_status=$?
10536   echo "$as_me:10536: \$? = $ac_status" >&5
10537   (exit $ac_status); } &&
10538          { ac_try='test -s conftest$ac_exeext'
10539   { (eval echo "$as_me:10539: \"$ac_try\"") >&5
10540   (eval $ac_try) 2>&5
10541   ac_status=$?
10542   echo "$as_me:10542: \$? = $ac_status" >&5
10543   (exit $ac_status); }; }; then
10544   ac_cv_func_gettimeofday=yes
10545 else
10546   echo "$as_me: failed program was:" >&5
10547 cat conftest.$ac_ext >&5
10548 ac_cv_func_gettimeofday=no
10549 fi
10550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10551 fi
10552 echo "$as_me:10552: result: $ac_cv_func_gettimeofday" >&5
10553 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10554 if test $ac_cv_func_gettimeofday = yes; then
10555   cat >>confdefs.h <<\EOF
10556 #define HAVE_GETTIMEOFDAY 1
10557 EOF
10558
10559 else
10560
10561 echo "$as_me:10561: checking for gettimeofday in -lbsd" >&5
10562 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10563 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10564   echo $ECHO_N "(cached) $ECHO_C" >&6
10565 else
10566   ac_check_lib_save_LIBS=$LIBS
10567 LIBS="-lbsd  $LIBS"
10568 cat >conftest.$ac_ext <<_ACEOF
10569 #line 10569 "configure"
10570 #include "confdefs.h"
10571
10572 /* Override any gcc2 internal prototype to avoid an error.  */
10573 #ifdef __cplusplus
10574 extern "C"
10575 #endif
10576 /* We use char because int might match the return type of a gcc2
10577    builtin and then its argument prototype would still apply.  */
10578 char gettimeofday ();
10579 int
10580 main ()
10581 {
10582 gettimeofday ();
10583   ;
10584   return 0;
10585 }
10586 _ACEOF
10587 rm -f conftest.$ac_objext conftest$ac_exeext
10588 if { (eval echo "$as_me:10588: \"$ac_link\"") >&5
10589   (eval $ac_link) 2>&5
10590   ac_status=$?
10591   echo "$as_me:10591: \$? = $ac_status" >&5
10592   (exit $ac_status); } &&
10593          { ac_try='test -s conftest$ac_exeext'
10594   { (eval echo "$as_me:10594: \"$ac_try\"") >&5
10595   (eval $ac_try) 2>&5
10596   ac_status=$?
10597   echo "$as_me:10597: \$? = $ac_status" >&5
10598   (exit $ac_status); }; }; then
10599   ac_cv_lib_bsd_gettimeofday=yes
10600 else
10601   echo "$as_me: failed program was:" >&5
10602 cat conftest.$ac_ext >&5
10603 ac_cv_lib_bsd_gettimeofday=no
10604 fi
10605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10606 LIBS=$ac_check_lib_save_LIBS
10607 fi
10608 echo "$as_me:10608: result: $ac_cv_lib_bsd_gettimeofday" >&5
10609 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10610 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10611
10612 cat >>confdefs.h <<\EOF
10613 #define HAVE_GETTIMEOFDAY 1
10614 EOF
10615
10616         LIBS="$LIBS -lbsd"
10617 fi
10618
10619 fi
10620         ;;
10621 esac
10622
10623 ###     Checks for header files.
10624 echo "$as_me:10624: checking for ANSI C header files" >&5
10625 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10626 if test "${ac_cv_header_stdc+set}" = set; then
10627   echo $ECHO_N "(cached) $ECHO_C" >&6
10628 else
10629   cat >conftest.$ac_ext <<_ACEOF
10630 #line 10630 "configure"
10631 #include "confdefs.h"
10632 #include <stdlib.h>
10633 #include <stdarg.h>
10634 #include <string.h>
10635 #include <float.h>
10636
10637 _ACEOF
10638 if { (eval echo "$as_me:10638: \"$ac_cpp conftest.$ac_ext\"") >&5
10639   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10640   ac_status=$?
10641   egrep -v '^ *\+' conftest.er1 >conftest.err
10642   rm -f conftest.er1
10643   cat conftest.err >&5
10644   echo "$as_me:10644: \$? = $ac_status" >&5
10645   (exit $ac_status); } >/dev/null; then
10646   if test -s conftest.err; then
10647     ac_cpp_err=$ac_c_preproc_warn_flag
10648   else
10649     ac_cpp_err=
10650   fi
10651 else
10652   ac_cpp_err=yes
10653 fi
10654 if test -z "$ac_cpp_err"; then
10655   ac_cv_header_stdc=yes
10656 else
10657   echo "$as_me: failed program was:" >&5
10658   cat conftest.$ac_ext >&5
10659   ac_cv_header_stdc=no
10660 fi
10661 rm -f conftest.err conftest.$ac_ext
10662
10663 if test $ac_cv_header_stdc = yes; then
10664   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10665   cat >conftest.$ac_ext <<_ACEOF
10666 #line 10666 "configure"
10667 #include "confdefs.h"
10668 #include <string.h>
10669
10670 _ACEOF
10671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10672   egrep "memchr" >/dev/null 2>&1; then
10673   :
10674 else
10675   ac_cv_header_stdc=no
10676 fi
10677 rm -rf conftest*
10678
10679 fi
10680
10681 if test $ac_cv_header_stdc = yes; then
10682   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10683   cat >conftest.$ac_ext <<_ACEOF
10684 #line 10684 "configure"
10685 #include "confdefs.h"
10686 #include <stdlib.h>
10687
10688 _ACEOF
10689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10690   egrep "free" >/dev/null 2>&1; then
10691   :
10692 else
10693   ac_cv_header_stdc=no
10694 fi
10695 rm -rf conftest*
10696
10697 fi
10698
10699 if test $ac_cv_header_stdc = yes; then
10700   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10701   if test "$cross_compiling" = yes; then
10702   :
10703 else
10704   cat >conftest.$ac_ext <<_ACEOF
10705 #line 10705 "configure"
10706 #include "confdefs.h"
10707 #include <ctype.h>
10708 #if ((' ' & 0x0FF) == 0x020)
10709 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10710 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10711 #else
10712 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10713                      || ('j' <= (c) && (c) <= 'r') \
10714                      || ('s' <= (c) && (c) <= 'z'))
10715 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10716 #endif
10717
10718 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10719 int
10720 main ()
10721 {
10722   int i;
10723   for (i = 0; i < 256; i++)
10724     if (XOR (islower (i), ISLOWER (i))
10725         || toupper (i) != TOUPPER (i))
10726       $ac_main_return(2);
10727   $ac_main_return (0);
10728 }
10729 _ACEOF
10730 rm -f conftest$ac_exeext
10731 if { (eval echo "$as_me:10731: \"$ac_link\"") >&5
10732   (eval $ac_link) 2>&5
10733   ac_status=$?
10734   echo "$as_me:10734: \$? = $ac_status" >&5
10735   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10736   { (eval echo "$as_me:10736: \"$ac_try\"") >&5
10737   (eval $ac_try) 2>&5
10738   ac_status=$?
10739   echo "$as_me:10739: \$? = $ac_status" >&5
10740   (exit $ac_status); }; }; then
10741   :
10742 else
10743   echo "$as_me: program exited with status $ac_status" >&5
10744 echo "$as_me: failed program was:" >&5
10745 cat conftest.$ac_ext >&5
10746 ac_cv_header_stdc=no
10747 fi
10748 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10749 fi
10750 fi
10751 fi
10752 echo "$as_me:10752: result: $ac_cv_header_stdc" >&5
10753 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10754 if test $ac_cv_header_stdc = yes; then
10755
10756 cat >>confdefs.h <<\EOF
10757 #define STDC_HEADERS 1
10758 EOF
10759
10760 fi
10761
10762 ac_header_dirent=no
10763 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10764   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10765 echo "$as_me:10765: checking for $ac_hdr that defines DIR" >&5
10766 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10767 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10768   echo $ECHO_N "(cached) $ECHO_C" >&6
10769 else
10770   cat >conftest.$ac_ext <<_ACEOF
10771 #line 10771 "configure"
10772 #include "confdefs.h"
10773 #include <sys/types.h>
10774 #include <$ac_hdr>
10775
10776 int
10777 main ()
10778 {
10779 if ((DIR *) 0)
10780 return 0;
10781   ;
10782   return 0;
10783 }
10784 _ACEOF
10785 rm -f conftest.$ac_objext
10786 if { (eval echo "$as_me:10786: \"$ac_compile\"") >&5
10787   (eval $ac_compile) 2>&5
10788   ac_status=$?
10789   echo "$as_me:10789: \$? = $ac_status" >&5
10790   (exit $ac_status); } &&
10791          { ac_try='test -s conftest.$ac_objext'
10792   { (eval echo "$as_me:10792: \"$ac_try\"") >&5
10793   (eval $ac_try) 2>&5
10794   ac_status=$?
10795   echo "$as_me:10795: \$? = $ac_status" >&5
10796   (exit $ac_status); }; }; then
10797   eval "$as_ac_Header=yes"
10798 else
10799   echo "$as_me: failed program was:" >&5
10800 cat conftest.$ac_ext >&5
10801 eval "$as_ac_Header=no"
10802 fi
10803 rm -f conftest.$ac_objext conftest.$ac_ext
10804 fi
10805 echo "$as_me:10805: result: `eval echo '${'$as_ac_Header'}'`" >&5
10806 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10807 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10808   cat >>confdefs.h <<EOF
10809 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10810 EOF
10811
10812 ac_header_dirent=$ac_hdr; break
10813 fi
10814
10815 done
10816 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10817 if test $ac_header_dirent = dirent.h; then
10818   echo "$as_me:10818: checking for opendir in -ldir" >&5
10819 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10820 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10821   echo $ECHO_N "(cached) $ECHO_C" >&6
10822 else
10823   ac_check_lib_save_LIBS=$LIBS
10824 LIBS="-ldir  $LIBS"
10825 cat >conftest.$ac_ext <<_ACEOF
10826 #line 10826 "configure"
10827 #include "confdefs.h"
10828
10829 /* Override any gcc2 internal prototype to avoid an error.  */
10830 #ifdef __cplusplus
10831 extern "C"
10832 #endif
10833 /* We use char because int might match the return type of a gcc2
10834    builtin and then its argument prototype would still apply.  */
10835 char opendir ();
10836 int
10837 main ()
10838 {
10839 opendir ();
10840   ;
10841   return 0;
10842 }
10843 _ACEOF
10844 rm -f conftest.$ac_objext conftest$ac_exeext
10845 if { (eval echo "$as_me:10845: \"$ac_link\"") >&5
10846   (eval $ac_link) 2>&5
10847   ac_status=$?
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit $ac_status); } &&
10850          { ac_try='test -s conftest$ac_exeext'
10851   { (eval echo "$as_me:10851: \"$ac_try\"") >&5
10852   (eval $ac_try) 2>&5
10853   ac_status=$?
10854   echo "$as_me:10854: \$? = $ac_status" >&5
10855   (exit $ac_status); }; }; then
10856   ac_cv_lib_dir_opendir=yes
10857 else
10858   echo "$as_me: failed program was:" >&5
10859 cat conftest.$ac_ext >&5
10860 ac_cv_lib_dir_opendir=no
10861 fi
10862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10863 LIBS=$ac_check_lib_save_LIBS
10864 fi
10865 echo "$as_me:10865: result: $ac_cv_lib_dir_opendir" >&5
10866 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10867 if test $ac_cv_lib_dir_opendir = yes; then
10868   LIBS="$LIBS -ldir"
10869 fi
10870
10871 else
10872   echo "$as_me:10872: checking for opendir in -lx" >&5
10873 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10874 if test "${ac_cv_lib_x_opendir+set}" = set; then
10875   echo $ECHO_N "(cached) $ECHO_C" >&6
10876 else
10877   ac_check_lib_save_LIBS=$LIBS
10878 LIBS="-lx  $LIBS"
10879 cat >conftest.$ac_ext <<_ACEOF
10880 #line 10880 "configure"
10881 #include "confdefs.h"
10882
10883 /* Override any gcc2 internal prototype to avoid an error.  */
10884 #ifdef __cplusplus
10885 extern "C"
10886 #endif
10887 /* We use char because int might match the return type of a gcc2
10888    builtin and then its argument prototype would still apply.  */
10889 char opendir ();
10890 int
10891 main ()
10892 {
10893 opendir ();
10894   ;
10895   return 0;
10896 }
10897 _ACEOF
10898 rm -f conftest.$ac_objext conftest$ac_exeext
10899 if { (eval echo "$as_me:10899: \"$ac_link\"") >&5
10900   (eval $ac_link) 2>&5
10901   ac_status=$?
10902   echo "$as_me:10902: \$? = $ac_status" >&5
10903   (exit $ac_status); } &&
10904          { ac_try='test -s conftest$ac_exeext'
10905   { (eval echo "$as_me:10905: \"$ac_try\"") >&5
10906   (eval $ac_try) 2>&5
10907   ac_status=$?
10908   echo "$as_me:10908: \$? = $ac_status" >&5
10909   (exit $ac_status); }; }; then
10910   ac_cv_lib_x_opendir=yes
10911 else
10912   echo "$as_me: failed program was:" >&5
10913 cat conftest.$ac_ext >&5
10914 ac_cv_lib_x_opendir=no
10915 fi
10916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10917 LIBS=$ac_check_lib_save_LIBS
10918 fi
10919 echo "$as_me:10919: result: $ac_cv_lib_x_opendir" >&5
10920 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10921 if test $ac_cv_lib_x_opendir = yes; then
10922   LIBS="$LIBS -lx"
10923 fi
10924
10925 fi
10926
10927 echo "$as_me:10927: checking whether time.h and sys/time.h may both be included" >&5
10928 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10929 if test "${ac_cv_header_time+set}" = set; then
10930   echo $ECHO_N "(cached) $ECHO_C" >&6
10931 else
10932   cat >conftest.$ac_ext <<_ACEOF
10933 #line 10933 "configure"
10934 #include "confdefs.h"
10935 #include <sys/types.h>
10936 #include <sys/time.h>
10937 #include <time.h>
10938
10939 int
10940 main ()
10941 {
10942 if ((struct tm *) 0)
10943 return 0;
10944   ;
10945   return 0;
10946 }
10947 _ACEOF
10948 rm -f conftest.$ac_objext
10949 if { (eval echo "$as_me:10949: \"$ac_compile\"") >&5
10950   (eval $ac_compile) 2>&5
10951   ac_status=$?
10952   echo "$as_me:10952: \$? = $ac_status" >&5
10953   (exit $ac_status); } &&
10954          { ac_try='test -s conftest.$ac_objext'
10955   { (eval echo "$as_me:10955: \"$ac_try\"") >&5
10956   (eval $ac_try) 2>&5
10957   ac_status=$?
10958   echo "$as_me:10958: \$? = $ac_status" >&5
10959   (exit $ac_status); }; }; then
10960   ac_cv_header_time=yes
10961 else
10962   echo "$as_me: failed program was:" >&5
10963 cat conftest.$ac_ext >&5
10964 ac_cv_header_time=no
10965 fi
10966 rm -f conftest.$ac_objext conftest.$ac_ext
10967 fi
10968 echo "$as_me:10968: result: $ac_cv_header_time" >&5
10969 echo "${ECHO_T}$ac_cv_header_time" >&6
10970 if test $ac_cv_header_time = yes; then
10971
10972 cat >>confdefs.h <<\EOF
10973 #define TIME_WITH_SYS_TIME 1
10974 EOF
10975
10976 fi
10977
10978 ###     checks for compiler characteristics
10979 ac_ext=c
10980 ac_cpp='$CPP $CPPFLAGS'
10981 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10982 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10983 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10984 ac_main_return=return
10985
10986 echo "$as_me:10986: checking for an ANSI C-conforming const" >&5
10987 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10988 if test "${ac_cv_c_const+set}" = set; then
10989   echo $ECHO_N "(cached) $ECHO_C" >&6
10990 else
10991   cat >conftest.$ac_ext <<_ACEOF
10992 #line 10992 "configure"
10993 #include "confdefs.h"
10994
10995 int
10996 main ()
10997 {
10998 /* FIXME: Include the comments suggested by Paul. */
10999 #ifndef __cplusplus
11000   /* Ultrix mips cc rejects this.  */
11001   typedef int charset[2];
11002   const charset x;
11003   /* SunOS 4.1.1 cc rejects this.  */
11004   char const *const *ccp;
11005   char **p;
11006   /* NEC SVR4.0.2 mips cc rejects this.  */
11007   struct point {int x, y;};
11008   static struct point const zero = {0,0};
11009   /* AIX XL C 1.02.0.0 rejects this.
11010      It does not let you subtract one const X* pointer from another in
11011      an arm of an if-expression whose if-part is not a constant
11012      expression */
11013   const char *g = "string";
11014   ccp = &g + (g ? g-g : 0);
11015   /* HPUX 7.0 cc rejects these. */
11016   ++ccp;
11017   p = (char**) ccp;
11018   ccp = (char const *const *) p;
11019   { /* SCO 3.2v4 cc rejects this.  */
11020     char *t;
11021     char const *s = 0 ? (char *) 0 : (char const *) 0;
11022
11023     *t++ = 0;
11024   }
11025   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11026     int x[] = {25, 17};
11027     const int *foo = &x[0];
11028     ++foo;
11029   }
11030   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11031     typedef const int *iptr;
11032     iptr p = 0;
11033     ++p;
11034   }
11035   { /* AIX XL C 1.02.0.0 rejects this saying
11036        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11037     struct s { int j; const int *ap[3]; };
11038     struct s *b; b->j = 5;
11039   }
11040   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11041     const int foo = 10;
11042   }
11043 #endif
11044
11045   ;
11046   return 0;
11047 }
11048 _ACEOF
11049 rm -f conftest.$ac_objext
11050 if { (eval echo "$as_me:11050: \"$ac_compile\"") >&5
11051   (eval $ac_compile) 2>&5
11052   ac_status=$?
11053   echo "$as_me:11053: \$? = $ac_status" >&5
11054   (exit $ac_status); } &&
11055          { ac_try='test -s conftest.$ac_objext'
11056   { (eval echo "$as_me:11056: \"$ac_try\"") >&5
11057   (eval $ac_try) 2>&5
11058   ac_status=$?
11059   echo "$as_me:11059: \$? = $ac_status" >&5
11060   (exit $ac_status); }; }; then
11061   ac_cv_c_const=yes
11062 else
11063   echo "$as_me: failed program was:" >&5
11064 cat conftest.$ac_ext >&5
11065 ac_cv_c_const=no
11066 fi
11067 rm -f conftest.$ac_objext conftest.$ac_ext
11068 fi
11069 echo "$as_me:11069: result: $ac_cv_c_const" >&5
11070 echo "${ECHO_T}$ac_cv_c_const" >&6
11071 if test $ac_cv_c_const = no; then
11072
11073 cat >>confdefs.h <<\EOF
11074 #define const
11075 EOF
11076
11077 fi
11078
11079 ###     Checks for external-data
11080
11081 echo "$as_me:11081: checking if data-only library module links" >&5
11082 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11083 if test "${cf_cv_link_dataonly+set}" = set; then
11084   echo $ECHO_N "(cached) $ECHO_C" >&6
11085 else
11086
11087         rm -f conftest.a
11088         cat >conftest.$ac_ext <<EOF
11089 #line 11089 "configure"
11090 int     testdata[3] = { 123, 456, 789 };
11091 EOF
11092         if { (eval echo "$as_me:11092: \"$ac_compile\"") >&5
11093   (eval $ac_compile) 2>&5
11094   ac_status=$?
11095   echo "$as_me:11095: \$? = $ac_status" >&5
11096   (exit $ac_status); } ; then
11097                 mv conftest.o data.o && \
11098                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
11099         fi
11100         rm -f conftest.$ac_ext data.o
11101         cat >conftest.$ac_ext <<EOF
11102 #line 11102 "configure"
11103 int     testfunc()
11104 {
11105 #if defined(NeXT)
11106         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11107 #else
11108         extern int testdata[3];
11109         return testdata[0] == 123
11110            &&  testdata[1] == 456
11111            &&  testdata[2] == 789;
11112 #endif
11113 }
11114 EOF
11115         if { (eval echo "$as_me:11115: \"$ac_compile\"") >&5
11116   (eval $ac_compile) 2>&5
11117   ac_status=$?
11118   echo "$as_me:11118: \$? = $ac_status" >&5
11119   (exit $ac_status); }; then
11120                 mv conftest.o func.o && \
11121                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
11122         fi
11123         rm -f conftest.$ac_ext func.o
11124         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11125         cf_saveLIBS="$LIBS"
11126         LIBS="conftest.a $LIBS"
11127         if test "$cross_compiling" = yes; then
11128   cf_cv_link_dataonly=unknown
11129 else
11130   cat >conftest.$ac_ext <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11133
11134         int main()
11135         {
11136                 extern int testfunc();
11137                 ${cf_cv_main_return:-return} (!testfunc());
11138         }
11139
11140 _ACEOF
11141 rm -f conftest$ac_exeext
11142 if { (eval echo "$as_me:11142: \"$ac_link\"") >&5
11143   (eval $ac_link) 2>&5
11144   ac_status=$?
11145   echo "$as_me:11145: \$? = $ac_status" >&5
11146   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11147   { (eval echo "$as_me:11147: \"$ac_try\"") >&5
11148   (eval $ac_try) 2>&5
11149   ac_status=$?
11150   echo "$as_me:11150: \$? = $ac_status" >&5
11151   (exit $ac_status); }; }; then
11152   cf_cv_link_dataonly=yes
11153 else
11154   echo "$as_me: program exited with status $ac_status" >&5
11155 echo "$as_me: failed program was:" >&5
11156 cat conftest.$ac_ext >&5
11157 cf_cv_link_dataonly=no
11158 fi
11159 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11160 fi
11161         LIBS="$cf_saveLIBS"
11162
11163 fi
11164
11165 echo "$as_me:11165: result: $cf_cv_link_dataonly" >&5
11166 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11167
11168 if test "$cf_cv_link_dataonly" = no ; then
11169
11170 cat >>confdefs.h <<\EOF
11171 #define BROKEN_LINKER 1
11172 EOF
11173
11174         BROKEN_LINKER=1
11175 fi
11176
11177 ###     Checks for library functions.
11178
11179 echo "$as_me:11179: checking for working mkstemp" >&5
11180 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11181 if test "${cf_cv_func_mkstemp+set}" = set; then
11182   echo $ECHO_N "(cached) $ECHO_C" >&6
11183 else
11184
11185 rm -rf conftest*
11186 if test "$cross_compiling" = yes; then
11187   cf_cv_func_mkstemp=maybe
11188 else
11189   cat >conftest.$ac_ext <<_ACEOF
11190 #line 11190 "configure"
11191 #include "confdefs.h"
11192
11193 #include <sys/types.h>
11194 #include <stdlib.h>
11195 #include <stdio.h>
11196 #include <string.h>
11197 #include <sys/stat.h>
11198 int main()
11199 {
11200         char *tmpl = "conftestXXXXXX";
11201         char name[2][80];
11202         int n;
11203         int result = 0;
11204         int fd;
11205         struct stat sb;
11206
11207         umask(077);
11208         for (n = 0; n < 2; ++n) {
11209                 strcpy(name[n], tmpl);
11210                 if ((fd = mkstemp(name[n])) >= 0) {
11211                         if (!strcmp(name[n], tmpl)
11212                          || stat(name[n], &sb) != 0
11213                          || (sb.st_mode & S_IFMT) != S_IFREG
11214                          || (sb.st_mode & 077) != 0) {
11215                                 result = 1;
11216                         }
11217                         close(fd);
11218                 }
11219         }
11220         if (result == 0
11221          && !strcmp(name[0], name[1]))
11222                 result = 1;
11223         ${cf_cv_main_return:-return}(result);
11224 }
11225
11226 _ACEOF
11227 rm -f conftest$ac_exeext
11228 if { (eval echo "$as_me:11228: \"$ac_link\"") >&5
11229   (eval $ac_link) 2>&5
11230   ac_status=$?
11231   echo "$as_me:11231: \$? = $ac_status" >&5
11232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11233   { (eval echo "$as_me:11233: \"$ac_try\"") >&5
11234   (eval $ac_try) 2>&5
11235   ac_status=$?
11236   echo "$as_me:11236: \$? = $ac_status" >&5
11237   (exit $ac_status); }; }; then
11238   cf_cv_func_mkstemp=yes
11239
11240 else
11241   echo "$as_me: program exited with status $ac_status" >&5
11242 echo "$as_me: failed program was:" >&5
11243 cat conftest.$ac_ext >&5
11244 cf_cv_func_mkstemp=no
11245
11246 fi
11247 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11248 fi
11249
11250 fi
11251 echo "$as_me:11251: result: $cf_cv_func_mkstemp" >&5
11252 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11253 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
11254         echo "$as_me:11254: checking for mkstemp" >&5
11255 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11256 if test "${ac_cv_func_mkstemp+set}" = set; then
11257   echo $ECHO_N "(cached) $ECHO_C" >&6
11258 else
11259   cat >conftest.$ac_ext <<_ACEOF
11260 #line 11260 "configure"
11261 #include "confdefs.h"
11262 /* System header to define __stub macros and hopefully few prototypes,
11263     which can conflict with char mkstemp (); below.  */
11264 #include <assert.h>
11265 /* Override any gcc2 internal prototype to avoid an error.  */
11266 #ifdef __cplusplus
11267 extern "C"
11268 #endif
11269 /* We use char because int might match the return type of a gcc2
11270    builtin and then its argument prototype would still apply.  */
11271 char mkstemp ();
11272 char (*f) ();
11273
11274 int
11275 main ()
11276 {
11277 /* The GNU C library defines this for functions which it implements
11278     to always fail with ENOSYS.  Some functions are actually named
11279     something starting with __ and the normal name is an alias.  */
11280 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11281 choke me
11282 #else
11283 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11284 #endif
11285
11286   ;
11287   return 0;
11288 }
11289 _ACEOF
11290 rm -f conftest.$ac_objext conftest$ac_exeext
11291 if { (eval echo "$as_me:11291: \"$ac_link\"") >&5
11292   (eval $ac_link) 2>&5
11293   ac_status=$?
11294   echo "$as_me:11294: \$? = $ac_status" >&5
11295   (exit $ac_status); } &&
11296          { ac_try='test -s conftest$ac_exeext'
11297   { (eval echo "$as_me:11297: \"$ac_try\"") >&5
11298   (eval $ac_try) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); }; }; then
11302   ac_cv_func_mkstemp=yes
11303 else
11304   echo "$as_me: failed program was:" >&5
11305 cat conftest.$ac_ext >&5
11306 ac_cv_func_mkstemp=no
11307 fi
11308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11309 fi
11310 echo "$as_me:11310: result: $ac_cv_func_mkstemp" >&5
11311 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11312
11313 fi
11314 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
11315
11316 cat >>confdefs.h <<\EOF
11317 #define HAVE_MKSTEMP 1
11318 EOF
11319
11320 fi
11321
11322 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
11323         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11324         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11325 fi
11326
11327 cf_with_ada=yes
11328 if test "$cf_with_ada" != "no" ; then
11329
11330 cf_ada_make=gnatmake
11331 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11332 set dummy $cf_ada_make; ac_word=$2
11333 echo "$as_me:11333: checking for $ac_word" >&5
11334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11335 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11336   echo $ECHO_N "(cached) $ECHO_C" >&6
11337 else
11338   if test -n "$gnat_exists"; then
11339   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11340 else
11341   ac_save_IFS=$IFS; IFS=$ac_path_separator
11342 ac_dummy="$PATH"
11343 for ac_dir in $ac_dummy; do
11344   IFS=$ac_save_IFS
11345   test -z "$ac_dir" && ac_dir=.
11346   $as_executable_p "$ac_dir/$ac_word" || continue
11347 ac_cv_prog_gnat_exists="yes"
11348 echo "$as_me:11348: found $ac_dir/$ac_word" >&5
11349 break
11350 done
11351
11352   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11353 fi
11354 fi
11355 gnat_exists=$ac_cv_prog_gnat_exists
11356 if test -n "$gnat_exists"; then
11357   echo "$as_me:11357: result: $gnat_exists" >&5
11358 echo "${ECHO_T}$gnat_exists" >&6
11359 else
11360   echo "$as_me:11360: result: no" >&5
11361 echo "${ECHO_T}no" >&6
11362 fi
11363
11364 if test "$ac_cv_prog_gnat_exists" = no; then
11365    cf_ada_make=
11366    cf_cv_prog_gnat_correct=no
11367 else
11368
11369 echo "$as_me:11369: checking for gnat version" >&5
11370 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11371 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
11372         grep '[0-9].[0-9][0-9]*' |\
11373     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11374 echo "$as_me:11374: result: $cf_gnat_version" >&5
11375 echo "${ECHO_T}$cf_gnat_version" >&6
11376
11377 case $cf_gnat_version in #(vi
11378 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
11379         cf_cv_prog_gnat_correct=yes
11380         ;;
11381 *)
11382         { echo "$as_me:11382: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11383 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11384         cf_cv_prog_gnat_correct=no
11385         ;;
11386 esac
11387
11388    # Extract the first word of "m4", so it can be a program name with args.
11389 set dummy m4; ac_word=$2
11390 echo "$as_me:11390: checking for $ac_word" >&5
11391 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11392 if test "${ac_cv_prog_M4_exists+set}" = set; then
11393   echo $ECHO_N "(cached) $ECHO_C" >&6
11394 else
11395   if test -n "$M4_exists"; then
11396   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11397 else
11398   ac_save_IFS=$IFS; IFS=$ac_path_separator
11399 ac_dummy="$PATH"
11400 for ac_dir in $ac_dummy; do
11401   IFS=$ac_save_IFS
11402   test -z "$ac_dir" && ac_dir=.
11403   $as_executable_p "$ac_dir/$ac_word" || continue
11404 ac_cv_prog_M4_exists="yes"
11405 echo "$as_me:11405: found $ac_dir/$ac_word" >&5
11406 break
11407 done
11408
11409   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11410 fi
11411 fi
11412 M4_exists=$ac_cv_prog_M4_exists
11413 if test -n "$M4_exists"; then
11414   echo "$as_me:11414: result: $M4_exists" >&5
11415 echo "${ECHO_T}$M4_exists" >&6
11416 else
11417   echo "$as_me:11417: result: no" >&5
11418 echo "${ECHO_T}no" >&6
11419 fi
11420
11421    if test "$ac_cv_prog_M4_exists" = no; then
11422       cf_cv_prog_gnat_correct=no
11423       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11424    fi
11425    if test "$cf_cv_prog_gnat_correct" = yes; then
11426       echo "$as_me:11426: checking if GNAT works" >&5
11427 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11428
11429 rm -rf conftest* *~conftest*
11430 cat >>conftest.ads <<CF_EOF
11431 procedure conftest;
11432 CF_EOF
11433 cat >>conftest.adb <<CF_EOF
11434 with Text_IO;
11435 with GNAT.OS_Lib;
11436 procedure conftest is
11437 begin
11438    Text_IO.Put ("Hello World");
11439    Text_IO.New_Line;
11440    GNAT.OS_Lib.OS_Exit (0);
11441 end conftest;
11442 CF_EOF
11443 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11444    if ( ./conftest 1>&5 2>&1 ) ; then
11445       cf_cv_prog_gnat_correct=yes
11446    else
11447       cf_cv_prog_gnat_correct=no
11448    fi
11449 else
11450    cf_cv_prog_gnat_correct=no
11451 fi
11452 rm -rf conftest* *~conftest*
11453
11454       echo "$as_me:11454: result: $cf_cv_prog_gnat_correct" >&5
11455 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11456    fi
11457 fi
11458
11459         if test "$cf_cv_prog_gnat_correct" = yes; then
11460
11461         echo "$as_me:11461: checking optimization options for ADAFLAGS" >&5
11462 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
11463         case "$CFLAGS" in
11464         *-g*)
11465
11466         ADAFLAGS="$ADAFLAGS -g"
11467
11468                 ;;
11469         esac
11470         case "$CFLAGS" in
11471         *-O*)
11472                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
11473
11474         ADAFLAGS="$ADAFLAGS $cf_O_flag"
11475
11476                 ;;
11477         esac
11478         echo "$as_me:11478: result: $ADAFLAGS" >&5
11479 echo "${ECHO_T}$ADAFLAGS" >&6
11480
11481 echo "$as_me:11481: checking if GNATPREP supports -T option" >&5
11482 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
11483 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
11484   echo $ECHO_N "(cached) $ECHO_C" >&6
11485 else
11486
11487 cf_cv_gnatprep_opt_t=no
11488 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
11489
11490 fi
11491 echo "$as_me:11491: result: $cf_cv_gnatprep_opt_t" >&5
11492 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
11493 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
11494
11495 echo "$as_me:11495: checking if GNAT supports generics" >&5
11496 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11497 case $cf_gnat_version in #(vi
11498 3.[1-9]*|[4-9].*) #(vi
11499         cf_gnat_generics=yes
11500         ;;
11501 *)
11502         cf_gnat_generics=no
11503         ;;
11504 esac
11505 echo "$as_me:11505: result: $cf_gnat_generics" >&5
11506 echo "${ECHO_T}$cf_gnat_generics" >&6
11507
11508 if test "$cf_gnat_generics" = yes
11509 then
11510         cf_compile_generics=generics
11511         cf_generic_objects="\${GENOBJS}"
11512 else
11513         cf_compile_generics=
11514         cf_generic_objects=
11515 fi
11516
11517 echo "$as_me:11517: checking if GNAT supports SIGINT" >&5
11518 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11519 if test "${cf_cv_gnat_sigint+set}" = set; then
11520   echo $ECHO_N "(cached) $ECHO_C" >&6
11521 else
11522
11523 rm -rf conftest* *~conftest*
11524 cat >>conftest.ads <<CF_EOF
11525 with Ada.Interrupts.Names;
11526
11527 package ConfTest is
11528
11529    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11530    pragma Unreserve_All_Interrupts;
11531    pragma Warnings (On);
11532
11533    protected Process is
11534       procedure Stop;
11535       function Continue return Boolean;
11536       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11537    private
11538       Done : Boolean := False;
11539    end Process;
11540
11541 end ConfTest;
11542 CF_EOF
11543 cat >>conftest.adb <<CF_EOF
11544 package body ConfTest is
11545    protected body Process is
11546       procedure Stop is
11547       begin
11548          Done := True;
11549       end Stop;
11550       function Continue return Boolean is
11551       begin
11552          return not Done;
11553       end Continue;
11554    end Process;
11555 end ConfTest;
11556 CF_EOF
11557 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11558       cf_cv_gnat_sigint=yes
11559 else
11560    cf_cv_gnat_sigint=no
11561 fi
11562 rm -rf conftest* *~conftest*
11563
11564 fi
11565 echo "$as_me:11565: result: $cf_cv_gnat_sigint" >&5
11566 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11567
11568 if test $cf_cv_gnat_sigint = yes ; then
11569         USE_GNAT_SIGINT=""
11570 else
11571         USE_GNAT_SIGINT="#"
11572 fi
11573
11574 cf_gnat_libraries=no
11575 cf_gnat_projects=no
11576
11577 if test "$enable_gnat_projects" != no ; then
11578 echo "$as_me:11578: checking if GNAT supports project files" >&5
11579 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11580 case $cf_gnat_version in #(vi
11581 3.[0-9]*) #(vi
11582         ;;
11583 *)
11584         case $cf_cv_system_name in #(vi
11585         cygwin*|msys*) #(vi
11586                 ;;
11587         *)
11588                 mkdir conftest.src conftest.bin conftest.lib
11589                 cd conftest.src
11590                 rm -rf conftest* *~conftest*
11591                 cat >>library.gpr <<CF_EOF
11592 project Library is
11593   Kind := External ("LIB_KIND");
11594   for Library_Name use "ConfTest";
11595   for Object_Dir use ".";
11596   for Library_ALI_Dir use External("LIBRARY_DIR");
11597   for Library_Version use External ("SONAME");
11598   for Library_Kind use Kind;
11599   for Library_Dir use External("BUILD_DIR");
11600   Source_Dir := External ("SOURCE_DIR");
11601   for Source_Dirs use (Source_Dir);
11602 end Library;
11603 CF_EOF
11604                 cat >>confpackage.ads <<CF_EOF
11605 package ConfPackage is
11606    procedure conftest;
11607 end ConfPackage;
11608 CF_EOF
11609                 cat >>confpackage.adb <<CF_EOF
11610 with Text_IO;
11611 package body ConfPackage is
11612    procedure conftest is
11613    begin
11614       Text_IO.Put ("Hello World");
11615       Text_IO.New_Line;
11616    end conftest;
11617 end ConfPackage;
11618 CF_EOF
11619                 if ( $cf_ada_make $ADAFLAGS \
11620                                 -Plibrary.gpr \
11621                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11622                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11623                                 -XSOURCE_DIR=`pwd` \
11624                                 -XSONAME=libConfTest.so.1 \
11625                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11626                         cf_gnat_projects=yes
11627                 fi
11628                 cd ..
11629                 if test -f conftest.lib/confpackage.ali
11630                 then
11631                         cf_gnat_libraries=yes
11632                 fi
11633                 rm -rf conftest* *~conftest*
11634                 ;;
11635         esac
11636         ;;
11637 esac
11638 echo "$as_me:11638: result: $cf_gnat_projects" >&5
11639 echo "${ECHO_T}$cf_gnat_projects" >&6
11640 fi # enable_gnat_projects
11641
11642 if test $cf_gnat_projects = yes
11643 then
11644         echo "$as_me:11644: checking if GNAT supports libraries" >&5
11645 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11646         echo "$as_me:11646: result: $cf_gnat_libraries" >&5
11647 echo "${ECHO_T}$cf_gnat_libraries" >&6
11648 fi
11649
11650 if test "$cf_gnat_projects" = yes
11651 then
11652         USE_OLD_MAKERULES="#"
11653         USE_GNAT_PROJECTS=""
11654 else
11655         USE_OLD_MAKERULES=""
11656         USE_GNAT_PROJECTS="#"
11657 fi
11658
11659 if test "$cf_gnat_libraries" = yes
11660 then
11661         USE_GNAT_LIBRARIES=""
11662 else
11663         USE_GNAT_LIBRARIES="#"
11664 fi
11665
11666 echo "$as_me:11666: checking for ada-compiler" >&5
11667 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11668
11669 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11670 if test "${with_ada_compiler+set}" = set; then
11671   withval="$with_ada_compiler"
11672   cf_ada_compiler=$withval
11673 else
11674   cf_ada_compiler=gnatmake
11675 fi;
11676
11677 echo "$as_me:11677: result: $cf_ada_compiler" >&5
11678 echo "${ECHO_T}$cf_ada_compiler" >&6
11679
11680                 cf_ada_package=terminal_interface
11681
11682 echo "$as_me:11682: checking for ada-include" >&5
11683 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11684
11685 # Check whether --with-ada-include or --without-ada-include was given.
11686 if test "${with_ada_include+set}" = set; then
11687   withval="$with_ada_include"
11688
11689 else
11690   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11691 fi; if test -n "$prefix/share/ada/adainclude" ; then
11692
11693 if test "x$prefix" != xNONE; then
11694   cf_path_syntax="$prefix"
11695 else
11696   cf_path_syntax="$ac_default_prefix"
11697 fi
11698
11699 case ".$withval" in #(vi
11700 .\$\(*\)*|.\'*\'*) #(vi
11701   ;;
11702 ..|./*|.\\*) #(vi
11703   ;;
11704 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11705   ;;
11706 .\${*prefix}*|.\${*dir}*) #(vi
11707   eval withval="$withval"
11708   case ".$withval" in #(vi
11709   .NONE/*)
11710     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11711     ;;
11712   esac
11713   ;; #(vi
11714 .no|.NONE/*)
11715   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11716   ;;
11717 *)
11718   { { echo "$as_me:11718: error: expected a pathname, not \"$withval\"" >&5
11719 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11720    { (exit 1); exit 1; }; }
11721   ;;
11722 esac
11723
11724 fi
11725 eval ADA_INCLUDE="$withval"
11726
11727 echo "$as_me:11727: result: $ADA_INCLUDE" >&5
11728 echo "${ECHO_T}$ADA_INCLUDE" >&6
11729
11730 echo "$as_me:11730: checking for ada-objects" >&5
11731 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11732
11733 # Check whether --with-ada-objects or --without-ada-objects was given.
11734 if test "${with_ada_objects+set}" = set; then
11735   withval="$with_ada_objects"
11736
11737 else
11738   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11739 fi; if test -n "$prefix/lib/ada/adalib" ; then
11740
11741 if test "x$prefix" != xNONE; then
11742   cf_path_syntax="$prefix"
11743 else
11744   cf_path_syntax="$ac_default_prefix"
11745 fi
11746
11747 case ".$withval" in #(vi
11748 .\$\(*\)*|.\'*\'*) #(vi
11749   ;;
11750 ..|./*|.\\*) #(vi
11751   ;;
11752 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11753   ;;
11754 .\${*prefix}*|.\${*dir}*) #(vi
11755   eval withval="$withval"
11756   case ".$withval" in #(vi
11757   .NONE/*)
11758     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11759     ;;
11760   esac
11761   ;; #(vi
11762 .no|.NONE/*)
11763   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11764   ;;
11765 *)
11766   { { echo "$as_me:11766: error: expected a pathname, not \"$withval\"" >&5
11767 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11768    { (exit 1); exit 1; }; }
11769   ;;
11770 esac
11771
11772 fi
11773 eval ADA_OBJECTS="$withval"
11774
11775 echo "$as_me:11775: result: $ADA_OBJECTS" >&5
11776 echo "${ECHO_T}$ADA_OBJECTS" >&6
11777
11778 echo "$as_me:11778: checking if an Ada95 shared-library should be built" >&5
11779 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11780
11781 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11782 if test "${with_ada_sharedlib+set}" = set; then
11783   withval="$with_ada_sharedlib"
11784   with_ada_sharedlib=$withval
11785 else
11786   with_ada_sharedlib=no
11787 fi;
11788 echo "$as_me:11788: result: $with_ada_sharedlib" >&5
11789 echo "${ECHO_T}$with_ada_sharedlib" >&6
11790
11791 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11792 MAKE_ADA_SHAREDLIB="#"
11793
11794 if test "x$with_ada_sharedlib" != xno
11795 then
11796         MAKE_ADA_SHAREDLIB=
11797         if test "x$with_ada_sharedlib" != xyes
11798         then
11799                 ADA_SHAREDLIB="$with_ada_sharedlib"
11800         fi
11801 fi
11802
11803         else
11804                 { { echo "$as_me:11804: error: No usable Ada compiler found" >&5
11805 echo "$as_me: error: No usable Ada compiler found" >&2;}
11806    { (exit 1); exit 1; }; }
11807         fi
11808 else
11809         { { echo "$as_me:11809: error: The Ada compiler is needed for this package" >&5
11810 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11811    { (exit 1); exit 1; }; }
11812 fi
11813
11814 ################################################################################
11815
11816 # not needed
11817 TINFO_LDFLAGS2=
11818
11819 TINFO_LIBS=
11820
11821 ### Construct the list of include-directories to be generated
11822
11823 if test "$srcdir" != "."; then
11824         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
11825 fi
11826 CPPFLAGS="-I../include $CPPFLAGS"
11827 if test "$srcdir" != "."; then
11828         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
11829 fi
11830 CPPFLAGS="-I. $CPPFLAGS"
11831
11832 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11833 if test "$srcdir" != "."; then
11834         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11835 fi
11836 if test "$GCC" != yes; then
11837         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11838 elif test "$includedir" != "/usr/include"; then
11839         if test "$includedir" = '${prefix}/include' ; then
11840                 if test x$prefix != x/usr ; then
11841                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11842                 fi
11843         else
11844                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11845         fi
11846 fi
11847
11848 ### Build up pieces for makefile rules
11849 echo "$as_me:11849: checking default library suffix" >&5
11850 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11851
11852         case $DFT_LWR_MODEL in
11853         libtool) DFT_ARG_SUFFIX=''   ;;
11854         normal)  DFT_ARG_SUFFIX=''   ;;
11855         debug)   DFT_ARG_SUFFIX='_g' ;;
11856         profile) DFT_ARG_SUFFIX='_p' ;;
11857         shared)  DFT_ARG_SUFFIX=''   ;;
11858         esac
11859         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11860 echo "$as_me:11860: result: $DFT_ARG_SUFFIX" >&5
11861 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11862
11863 echo "$as_me:11863: checking default library-dependency suffix" >&5
11864 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11865
11866         case X$DFT_LWR_MODEL in #(vi
11867         Xlibtool) #(vi
11868                 DFT_LIB_SUFFIX='.la'
11869                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11870                 ;;
11871         Xdebug) #(vi
11872                 DFT_LIB_SUFFIX='_g.a'
11873                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11874                 ;;
11875         Xprofile) #(vi
11876                 DFT_LIB_SUFFIX='_p.a'
11877                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11878                 ;;
11879         Xshared) #(vi
11880                 case $cf_cv_system_name in
11881                 aix[5-7]*) #(vi
11882                         DFT_LIB_SUFFIX='.so'
11883                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11884                         ;;
11885                 cygwin*|msys*|mingw*) #(vi
11886                         DFT_LIB_SUFFIX='.dll'
11887                         DFT_DEP_SUFFIX='.dll.a'
11888                         ;;
11889                 darwin*) #(vi
11890                         DFT_LIB_SUFFIX='.dylib'
11891                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11892                         ;;
11893                 hpux*) #(vi
11894                         case $target in
11895                         ia64*) #(vi
11896                                 DFT_LIB_SUFFIX='.so'
11897                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11898                                 ;;
11899                         *) #(vi
11900                                 DFT_LIB_SUFFIX='.sl'
11901                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11902                                 ;;
11903                         esac
11904                         ;;
11905                 *) #(vi
11906                         DFT_LIB_SUFFIX='.so'
11907                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11908                         ;;
11909                 esac
11910                 ;;
11911         *)
11912                 DFT_LIB_SUFFIX='.a'
11913                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11914                 ;;
11915         esac
11916         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11917         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11918 echo "$as_me:11918: result: $DFT_DEP_SUFFIX" >&5
11919 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11920
11921 echo "$as_me:11921: checking default object directory" >&5
11922 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11923
11924         case $DFT_LWR_MODEL in
11925         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11926         normal)  DFT_OBJ_SUBDIR='objects' ;;
11927         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11928         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11929         shared)
11930                 case $cf_cv_system_name in #(vi
11931                 cygwin|msys) #(vi
11932                         DFT_OBJ_SUBDIR='objects' ;;
11933                 *)
11934                         DFT_OBJ_SUBDIR='obj_s' ;;
11935                 esac
11936         esac
11937 echo "$as_me:11937: result: $DFT_OBJ_SUBDIR" >&5
11938 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11939
11940 ### Set up low-level terminfo dependencies for makefiles.
11941
11942 if test "$DFT_LWR_MODEL" = shared ; then
11943         case $cf_cv_system_name in #(vi
11944         cygwin*)
11945                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11946                 ;;
11947         msys*)
11948                 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
11949                 ;;
11950         esac
11951 fi
11952
11953 ### Construct the list of subdirectories for which we'll customize makefiles
11954 ### with the appropriate compile-rules.
11955
11956 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11957
11958 cat >>confdefs.h <<EOF
11959 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11960 EOF
11961
11962 ### Now that we're done running tests, add the compiler-warnings, if any
11963
11964 cf_fix_cppflags=no
11965 cf_new_cflags=
11966 cf_new_cppflags=
11967 cf_new_extra_cppflags=
11968
11969 for cf_add_cflags in $EXTRA_CFLAGS
11970 do
11971 case $cf_fix_cppflags in
11972 no)
11973         case $cf_add_cflags in #(vi
11974         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11975                 case $cf_add_cflags in
11976                 -D*)
11977                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11978
11979                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11980                                 && test -z "${cf_tst_cflags}" \
11981                                 && cf_fix_cppflags=yes
11982
11983                         if test $cf_fix_cppflags = yes ; then
11984                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11985                                 continue
11986                         elif test "${cf_tst_cflags}" = "\"'" ; then
11987                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11988                                 continue
11989                         fi
11990                         ;;
11991                 esac
11992                 case "$CPPFLAGS" in
11993                 *$cf_add_cflags) #(vi
11994                         ;;
11995                 *) #(vi
11996                         case $cf_add_cflags in #(vi
11997                         -D*)
11998                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11999
12000 CPPFLAGS=`echo "$CPPFLAGS" | \
12001         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12002                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12003
12004                                 ;;
12005                         esac
12006                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12007                         ;;
12008                 esac
12009                 ;;
12010         *)
12011                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12012                 ;;
12013         esac
12014         ;;
12015 yes)
12016         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12017
12018         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12019
12020         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12021                 && test -z "${cf_tst_cflags}" \
12022                 && cf_fix_cppflags=no
12023         ;;
12024 esac
12025 done
12026
12027 if test -n "$cf_new_cflags" ; then
12028
12029         CFLAGS="$CFLAGS $cf_new_cflags"
12030 fi
12031
12032 if test -n "$cf_new_cppflags" ; then
12033
12034         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12035 fi
12036
12037 if test -n "$cf_new_extra_cppflags" ; then
12038
12039         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12040 fi
12041
12042 ################################################################################
12043
12044 TEST_ARG2=
12045
12046 TEST_LIBS2=
12047
12048 NCURSES_SHLIB2="sh -c"
12049
12050 ADA_SUBDIRS="include gen src doc"
12051 if test "x$cf_with_tests" != "xno" ; then
12052         ADA_SUBDIRS="$ADA_SUBDIRS samples"
12053 fi
12054 for cf_dir in $ADA_SUBDIRS
12055 do
12056         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
12057 done
12058
12059 NCURSES_TREE="#"
12060
12061 EXTERNAL_TREE=
12062
12063 # match layout used by make-tar.sh
12064 ADAHTML_DIR=../doc/ada
12065
12066 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
12067 ac_config_commands="$ac_config_commands default"
12068 cat >confcache <<\_ACEOF
12069 # This file is a shell script that caches the results of configure
12070 # tests run on this system so they can be shared between configure
12071 # scripts and configure runs, see configure's option --config-cache.
12072 # It is not useful on other systems.  If it contains results you don't
12073 # want to keep, you may remove or edit it.
12074 #
12075 # config.status only pays attention to the cache file if you give it
12076 # the --recheck option to rerun configure.
12077 #
12078 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12079 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12080 # following values.
12081
12082 _ACEOF
12083
12084 # The following way of writing the cache mishandles newlines in values,
12085 # but we know of no workaround that is simple, portable, and efficient.
12086 # So, don't put newlines in cache variables' values.
12087 # Ultrix sh set writes to stderr and can't be redirected directly,
12088 # and sets the high bit in the cache file unless we assign to the vars.
12089 {
12090   (set) 2>&1 |
12091     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12092     *ac_space=\ *)
12093       # `set' does not quote correctly, so add quotes (double-quote
12094       # substitution turns \\\\ into \\, and sed turns \\ into \).
12095       sed -n \
12096         "s/'/'\\\\''/g;
12097           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12098       ;;
12099     *)
12100       # `set' quotes correctly as required by POSIX, so do not add quotes.
12101       sed -n \
12102         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12103       ;;
12104     esac;
12105 } |
12106   sed '
12107      t clear
12108      : clear
12109      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12110      t end
12111      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12112      : end' >>confcache
12113 if cmp -s $cache_file confcache; then :; else
12114   if test -w $cache_file; then
12115     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12116     cat confcache >$cache_file
12117   else
12118     echo "not updating unwritable cache $cache_file"
12119   fi
12120 fi
12121 rm -f confcache
12122
12123 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12124 # Let make expand exec_prefix.
12125 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12126
12127 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12128 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12129 # trailing colons and then remove the whole line if VPATH becomes empty
12130 # (actually we leave an empty line to preserve line numbers).
12131 if test "x$srcdir" = x.; then
12132   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12133 s/:*\$(srcdir):*/:/;
12134 s/:*\${srcdir}:*/:/;
12135 s/:*@srcdir@:*/:/;
12136 s/^\([^=]*=[    ]*\):*/\1/;
12137 s/:*$//;
12138 s/^[^=]*=[      ]*$//;
12139 }'
12140 fi
12141
12142 DEFS=-DHAVE_CONFIG_H
12143
12144 : ${CONFIG_STATUS=./config.status}
12145 ac_clean_files_save=$ac_clean_files
12146 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12147 { echo "$as_me:12147: creating $CONFIG_STATUS" >&5
12148 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12149 cat >$CONFIG_STATUS <<_ACEOF
12150 #! $SHELL
12151 # Generated automatically by configure.
12152 # Run this file to recreate the current configuration.
12153 # Compiler output produced by configure, useful for debugging
12154 # configure, is in config.log if it exists.
12155
12156 debug=false
12157 SHELL=\${CONFIG_SHELL-$SHELL}
12158 ac_cs_invocation="\$0 \$@"
12159
12160 _ACEOF
12161
12162 cat >>$CONFIG_STATUS <<\_ACEOF
12163 # Be Bourne compatible
12164 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12165   emulate sh
12166   NULLCMD=:
12167 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12168   set -o posix
12169 fi
12170
12171 # Name of the executable.
12172 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12173
12174 if expr a : '\(a\)' >/dev/null 2>&1; then
12175   as_expr=expr
12176 else
12177   as_expr=false
12178 fi
12179
12180 rm -f conf$$ conf$$.exe conf$$.file
12181 echo >conf$$.file
12182 if ln -s conf$$.file conf$$ 2>/dev/null; then
12183   # We could just check for DJGPP; but this test a) works b) is more generic
12184   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12185   if test -f conf$$.exe; then
12186     # Don't use ln at all; we don't have any links
12187     as_ln_s='cp -p'
12188   else
12189     as_ln_s='ln -s'
12190   fi
12191 elif ln conf$$.file conf$$ 2>/dev/null; then
12192   as_ln_s=ln
12193 else
12194   as_ln_s='cp -p'
12195 fi
12196 rm -f conf$$ conf$$.exe conf$$.file
12197
12198 as_executable_p="test -f"
12199
12200 # Support unset when possible.
12201 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12202   as_unset=unset
12203 else
12204   as_unset=false
12205 fi
12206
12207 # NLS nuisances.
12208 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12209 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12210 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12211 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12212 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12213 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12214 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12215 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12216
12217 # IFS
12218 # We need space, tab and new line, in precisely that order.
12219 as_nl='
12220 '
12221 IFS="   $as_nl"
12222
12223 # CDPATH.
12224 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12225
12226 exec 6>&1
12227
12228 _ACEOF
12229
12230 # Files that config.status was made for.
12231 if test -n "$ac_config_files"; then
12232   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12233 fi
12234
12235 if test -n "$ac_config_headers"; then
12236   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12237 fi
12238
12239 if test -n "$ac_config_links"; then
12240   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12241 fi
12242
12243 if test -n "$ac_config_commands"; then
12244   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12245 fi
12246
12247 cat >>$CONFIG_STATUS <<\EOF
12248
12249 ac_cs_usage="\
12250 \`$as_me' instantiates files from templates according to the
12251 current configuration.
12252
12253 Usage: $0 [OPTIONS] [FILE]...
12254
12255   -h, --help       print this help, then exit
12256   -V, --version    print version number, then exit
12257   -d, --debug      don't remove temporary files
12258       --recheck    update $as_me by reconfiguring in the same conditions
12259   --file=FILE[:TEMPLATE]
12260                    instantiate the configuration file FILE
12261   --header=FILE[:TEMPLATE]
12262                    instantiate the configuration header FILE
12263
12264 Configuration files:
12265 $config_files
12266
12267 Configuration headers:
12268 $config_headers
12269
12270 Configuration commands:
12271 $config_commands
12272
12273 Report bugs to <dickey@invisible-island.net>."
12274 EOF
12275
12276 cat >>$CONFIG_STATUS <<EOF
12277 ac_cs_version="\\
12278 config.status
12279 configured by $0, generated by GNU Autoconf 2.52.20141204,
12280   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12281
12282 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12283 Free Software Foundation, Inc.
12284 This config.status script is free software; the Free Software Foundation
12285 gives unlimited permission to copy, distribute and modify it."
12286 srcdir=$srcdir
12287 INSTALL="$INSTALL"
12288 EOF
12289
12290 cat >>$CONFIG_STATUS <<\EOF
12291 # If no file are specified by the user, then we need to provide default
12292 # value.  By we need to know if files were specified by the user.
12293 ac_need_defaults=:
12294 while test $# != 0
12295 do
12296   case $1 in
12297   --*=*)
12298     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12299     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12300     shift
12301     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12302     shift
12303     ;;
12304   -*);;
12305   *) # This is not an option, so the user has probably given explicit
12306      # arguments.
12307      ac_need_defaults=false;;
12308   esac
12309
12310   case $1 in
12311   # Handling of the options.
12312 EOF
12313 cat >>$CONFIG_STATUS <<EOF
12314   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12315     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12316     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12317 EOF
12318 cat >>$CONFIG_STATUS <<\EOF
12319   --version | --vers* | -V )
12320     echo "$ac_cs_version"; exit 0 ;;
12321   --he | --h)
12322     # Conflict between --help and --header
12323     { { echo "$as_me:12323: error: ambiguous option: $1
12324 Try \`$0 --help' for more information." >&5
12325 echo "$as_me: error: ambiguous option: $1
12326 Try \`$0 --help' for more information." >&2;}
12327    { (exit 1); exit 1; }; };;
12328   --help | --hel | -h )
12329     echo "$ac_cs_usage"; exit 0 ;;
12330   --debug | --d* | -d )
12331     debug=: ;;
12332   --file | --fil | --fi | --f )
12333     shift
12334     CONFIG_FILES="$CONFIG_FILES $1"
12335     ac_need_defaults=false;;
12336   --header | --heade | --head | --hea )
12337     shift
12338     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12339     ac_need_defaults=false;;
12340
12341   # This is an error.
12342   -*) { { echo "$as_me:12342: error: unrecognized option: $1
12343 Try \`$0 --help' for more information." >&5
12344 echo "$as_me: error: unrecognized option: $1
12345 Try \`$0 --help' for more information." >&2;}
12346    { (exit 1); exit 1; }; } ;;
12347
12348   *) ac_config_targets="$ac_config_targets $1" ;;
12349
12350   esac
12351   shift
12352 done
12353
12354 exec 5>>config.log
12355 cat >&5 << _ACEOF
12356
12357 ## ----------------------- ##
12358 ## Running config.status.  ##
12359 ## ----------------------- ##
12360
12361 This file was extended by $as_me 2.52.20141204, executed with
12362   CONFIG_FILES    = $CONFIG_FILES
12363   CONFIG_HEADERS  = $CONFIG_HEADERS
12364   CONFIG_LINKS    = $CONFIG_LINKS
12365   CONFIG_COMMANDS = $CONFIG_COMMANDS
12366   > $ac_cs_invocation
12367 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12368
12369 _ACEOF
12370 EOF
12371
12372 cat >>$CONFIG_STATUS <<EOF
12373 #
12374 # INIT-COMMANDS section.
12375 #
12376
12377 ### Special initialization commands, used to pass information from the
12378 ### configuration-run into config.status
12379
12380 AWK="$AWK"
12381 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12382 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12383 LIB_NAME="$LIB_NAME"
12384 LIB_PREFIX="$LIB_PREFIX"
12385 LIB_SUFFIX="$LIB_SUFFIX"
12386 LN_S="$LN_S"
12387 NCURSES_MAJOR="$NCURSES_MAJOR"
12388 NCURSES_MINOR="$NCURSES_MINOR"
12389 NCURSES_PATCH="$NCURSES_PATCH"
12390 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12391 cf_cv_abi_version="$cf_cv_abi_version"
12392 cf_cv_rel_version="$cf_cv_rel_version"
12393 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12394 cf_cv_shared_soname='$cf_cv_shared_soname'
12395 cf_cv_shlib_version="$cf_cv_shlib_version"
12396 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12397 cf_cv_system_name="$cf_cv_system_name"
12398 host="$host"
12399 target="$target"
12400
12401 EOF
12402
12403 cat >>$CONFIG_STATUS <<\EOF
12404 for ac_config_target in $ac_config_targets
12405 do
12406   case "$ac_config_target" in
12407   # Handling of arguments.
12408   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12409   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12410   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12411   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12412   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12413   *) { { echo "$as_me:12413: error: invalid argument: $ac_config_target" >&5
12414 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12415    { (exit 1); exit 1; }; };;
12416   esac
12417 done
12418
12419 # If the user did not use the arguments to specify the items to instantiate,
12420 # then the envvar interface is used.  Set only those that are not.
12421 # We use the long form for the default assignment because of an extremely
12422 # bizarre bug on SunOS 4.1.3.
12423 if $ac_need_defaults; then
12424   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12425   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12426   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12427 fi
12428
12429 # Create a temporary directory, and hook for its removal unless debugging.
12430 $debug ||
12431 {
12432   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12433   trap '{ (exit 1); exit 1; }' 1 2 13 15
12434 }
12435
12436 # Create a (secure) tmp directory for tmp files.
12437 : ${TMPDIR=/tmp}
12438 {
12439   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12440   test -n "$tmp" && test -d "$tmp"
12441 }  ||
12442 {
12443   tmp=$TMPDIR/cs$$-$RANDOM
12444   (umask 077 && mkdir $tmp)
12445 } ||
12446 {
12447    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12448    { (exit 1); exit 1; }
12449 }
12450
12451 EOF
12452
12453 cat >>$CONFIG_STATUS <<EOF
12454
12455 #
12456 # CONFIG_FILES section.
12457 #
12458
12459 # No need to generate the scripts if there are no CONFIG_FILES.
12460 # This happens for instance when ./config.status config.h
12461 if test -n "\$CONFIG_FILES"; then
12462   # Protect against being on the right side of a sed subst in config.status.
12463   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12464    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12465 s,@SHELL@,$SHELL,;t t
12466 s,@exec_prefix@,$exec_prefix,;t t
12467 s,@prefix@,$prefix,;t t
12468 s,@program_transform_name@,$program_transform_name,;t t
12469 s,@bindir@,$bindir,;t t
12470 s,@sbindir@,$sbindir,;t t
12471 s,@libexecdir@,$libexecdir,;t t
12472 s,@datarootdir@,$datarootdir,;t t
12473 s,@datadir@,$datadir,;t t
12474 s,@sysconfdir@,$sysconfdir,;t t
12475 s,@sharedstatedir@,$sharedstatedir,;t t
12476 s,@localstatedir@,$localstatedir,;t t
12477 s,@libdir@,$libdir,;t t
12478 s,@includedir@,$includedir,;t t
12479 s,@oldincludedir@,$oldincludedir,;t t
12480 s,@infodir@,$infodir,;t t
12481 s,@mandir@,$mandir,;t t
12482 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12483 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12484 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12485 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12486 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12487 s,@build_alias@,$build_alias,;t t
12488 s,@host_alias@,$host_alias,;t t
12489 s,@target_alias@,$target_alias,;t t
12490 s,@ECHO_C@,$ECHO_C,;t t
12491 s,@ECHO_N@,$ECHO_N,;t t
12492 s,@ECHO_T@,$ECHO_T,;t t
12493 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12494 s,@DEFS@,$DEFS,;t t
12495 s,@LIBS@,$LIBS,;t t
12496 s,@top_builddir@,$top_builddir,;t t
12497 s,@build@,$build,;t t
12498 s,@build_cpu@,$build_cpu,;t t
12499 s,@build_vendor@,$build_vendor,;t t
12500 s,@build_os@,$build_os,;t t
12501 s,@host@,$host,;t t
12502 s,@host_cpu@,$host_cpu,;t t
12503 s,@host_vendor@,$host_vendor,;t t
12504 s,@host_os@,$host_os,;t t
12505 s,@target@,$target,;t t
12506 s,@target_cpu@,$target_cpu,;t t
12507 s,@target_vendor@,$target_vendor,;t t
12508 s,@target_os@,$target_os,;t t
12509 s,@CC@,$CC,;t t
12510 s,@CFLAGS@,$CFLAGS,;t t
12511 s,@LDFLAGS@,$LDFLAGS,;t t
12512 s,@CPPFLAGS@,$CPPFLAGS,;t t
12513 s,@ac_ct_CC@,$ac_ct_CC,;t t
12514 s,@EXEEXT@,$EXEEXT,;t t
12515 s,@OBJEXT@,$OBJEXT,;t t
12516 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12517 s,@CPP@,$CPP,;t t
12518 s,@AWK@,$AWK,;t t
12519 s,@EGREP@,$EGREP,;t t
12520 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12521 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12522 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12523 s,@LN_S@,$LN_S,;t t
12524 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12525 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12526 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12527 s,@SET_MAKE@,$SET_MAKE,;t t
12528 s,@CTAGS@,$CTAGS,;t t
12529 s,@ETAGS@,$ETAGS,;t t
12530 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12531 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12532 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12533 s,@RANLIB@,$RANLIB,;t t
12534 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12535 s,@LD@,$LD,;t t
12536 s,@ac_ct_LD@,$ac_ct_LD,;t t
12537 s,@AR@,$AR,;t t
12538 s,@ac_ct_AR@,$ac_ct_AR,;t t
12539 s,@ARFLAGS@,$ARFLAGS,;t t
12540 s,@DESTDIR@,$DESTDIR,;t t
12541 s,@BUILD_CC@,$BUILD_CC,;t t
12542 s,@BUILD_CPP@,$BUILD_CPP,;t t
12543 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12544 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12545 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12546 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12547 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12548 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12549 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12550 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12551 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12552 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
12553 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12554 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12555 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12556 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12557 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12558 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12559 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12560 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12561 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12562 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12563 s,@CC_G_OPT@,$CC_G_OPT,;t t
12564 s,@LD_MODEL@,$LD_MODEL,;t t
12565 s,@shlibdir@,$shlibdir,;t t
12566 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
12567 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12568 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12569 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12570 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12571 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
12572 s,@LINK_PROGS@,$LINK_PROGS,;t t
12573 s,@LINK_TESTS@,$LINK_TESTS,;t t
12574 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12575 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12576 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12577 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12578 s,@RPATH_LIST@,$RPATH_LIST,;t t
12579 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12580 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12581 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12582 s,@PTHREAD@,$PTHREAD,;t t
12583 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12584 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12585 s,@ECHO_LT@,$ECHO_LT,;t t
12586 s,@ECHO_LD@,$ECHO_LD,;t t
12587 s,@RULE_CC@,$RULE_CC,;t t
12588 s,@SHOW_CC@,$SHOW_CC,;t t
12589 s,@ECHO_CC@,$ECHO_CC,;t t
12590 s,@ADAFLAGS@,$ADAFLAGS,;t t
12591 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12592 s,@ADA_TRACE@,$ADA_TRACE,;t t
12593 s,@gnat_exists@,$gnat_exists,;t t
12594 s,@M4_exists@,$M4_exists,;t t
12595 s,@cf_ada_make@,$cf_ada_make,;t t
12596 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
12597 s,@cf_compile_generics@,$cf_compile_generics,;t t
12598 s,@cf_generic_objects@,$cf_generic_objects,;t t
12599 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12600 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12601 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12602 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12603 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12604 s,@cf_ada_package@,$cf_ada_package,;t t
12605 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12606 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12607 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12608 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12609 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
12610 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
12611 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12612 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12613 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12614 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12615 s,@TEST_ARG2@,$TEST_ARG2,;t t
12616 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12617 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12618 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12619 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12620 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12621 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12622 CEOF
12623
12624 EOF
12625
12626   cat >>$CONFIG_STATUS <<\EOF
12627   # Split the substitutions into bite-sized pieces for seds with
12628   # small command number limits, like on Digital OSF/1 and HP-UX.
12629   ac_max_sed_lines=48
12630   ac_sed_frag=1 # Number of current file.
12631   ac_beg=1 # First line for current file.
12632   ac_end=$ac_max_sed_lines # Line after last line for current file.
12633   ac_more_lines=:
12634   ac_sed_cmds=
12635   while $ac_more_lines; do
12636     if test $ac_beg -gt 1; then
12637       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12638     else
12639       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12640     fi
12641     if test ! -s $tmp/subs.frag; then
12642       ac_more_lines=false
12643     else
12644       # The purpose of the label and of the branching condition is to
12645       # speed up the sed processing (if there are no `@' at all, there
12646       # is no need to browse any of the substitutions).
12647       # These are the two extra sed commands mentioned above.
12648       (echo ':t
12649   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12650       if test -z "$ac_sed_cmds"; then
12651         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12652       else
12653         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12654       fi
12655       ac_sed_frag=`expr $ac_sed_frag + 1`
12656       ac_beg=$ac_end
12657       ac_end=`expr $ac_end + $ac_max_sed_lines`
12658     fi
12659   done
12660   if test -z "$ac_sed_cmds"; then
12661     ac_sed_cmds=cat
12662   fi
12663 fi # test -n "$CONFIG_FILES"
12664
12665 EOF
12666 cat >>$CONFIG_STATUS <<\EOF
12667 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12668   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12669   case $ac_file in
12670   - | *:- | *:-:* ) # input from stdin
12671         cat >$tmp/stdin
12672         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12673         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12674   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12675         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12676   * )   ac_file_in=$ac_file.in ;;
12677   esac
12678
12679   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12680   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12681          X"$ac_file" : 'X\(//\)[^/]' \| \
12682          X"$ac_file" : 'X\(//\)$' \| \
12683          X"$ac_file" : 'X\(/\)' \| \
12684          .     : '\(.\)' 2>/dev/null ||
12685 echo X"$ac_file" |
12686     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12687           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12688           /^X\(\/\/\)$/{ s//\1/; q; }
12689           /^X\(\/\).*/{ s//\1/; q; }
12690           s/.*/./; q'`
12691   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12692     { case "$ac_dir" in
12693   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12694   *)                      as_incr_dir=.;;
12695 esac
12696 as_dummy="$ac_dir"
12697 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12698   case $as_mkdir_dir in
12699     # Skip DOS drivespec
12700     ?:) as_incr_dir=$as_mkdir_dir ;;
12701     *)
12702       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12703       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12704     ;;
12705   esac
12706 done; }
12707
12708     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12709     # A "../" for each directory in $ac_dir_suffix.
12710     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12711   else
12712     ac_dir_suffix= ac_dots=
12713   fi
12714
12715   case $srcdir in
12716   .)  ac_srcdir=.
12717       if test -z "$ac_dots"; then
12718          ac_top_srcdir=.
12719       else
12720          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12721       fi ;;
12722   [\\/]* | ?:[\\/]* )
12723       ac_srcdir=$srcdir$ac_dir_suffix;
12724       ac_top_srcdir=$srcdir ;;
12725   *) # Relative path.
12726     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12727     ac_top_srcdir=$ac_dots$srcdir ;;
12728   esac
12729
12730   case $INSTALL in
12731   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12732   *) ac_INSTALL=$ac_dots$INSTALL ;;
12733   esac
12734
12735   if test x"$ac_file" != x-; then
12736     { echo "$as_me:12736: creating $ac_file" >&5
12737 echo "$as_me: creating $ac_file" >&6;}
12738     rm -f "$ac_file"
12739   fi
12740   # Let's still pretend it is `configure' which instantiates (i.e., don't
12741   # use $as_me), people would be surprised to read:
12742   #    /* config.h.  Generated automatically by config.status.  */
12743   configure_input="Generated automatically from `echo $ac_file_in |
12744                                                  sed 's,.*/,,'` by configure."
12745
12746   # First look for the input files in the build tree, otherwise in the
12747   # src tree.
12748   ac_file_inputs=`IFS=:
12749     for f in $ac_file_in; do
12750       case $f in
12751       -) echo $tmp/stdin ;;
12752       [\\/$]*)
12753          # Absolute (can't be DOS-style, as IFS=:)
12754          test -f "$f" || { { echo "$as_me:12754: error: cannot find input file: $f" >&5
12755 echo "$as_me: error: cannot find input file: $f" >&2;}
12756    { (exit 1); exit 1; }; }
12757          echo $f;;
12758       *) # Relative
12759          if test -f "$f"; then
12760            # Build tree
12761            echo $f
12762          elif test -f "$srcdir/$f"; then
12763            # Source tree
12764            echo $srcdir/$f
12765          else
12766            # /dev/null tree
12767            { { echo "$as_me:12767: error: cannot find input file: $f" >&5
12768 echo "$as_me: error: cannot find input file: $f" >&2;}
12769    { (exit 1); exit 1; }; }
12770          fi;;
12771       esac
12772     done` || { (exit 1); exit 1; }
12773 EOF
12774 cat >>$CONFIG_STATUS <<\EOF
12775   ac_warn_datarootdir=no
12776   if test x"$ac_file" != x-; then
12777     for ac_item in $ac_file_inputs
12778     do
12779       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
12780       if test -n "$ac_seen"; then
12781         ac_used=`grep '@datarootdir@' $ac_item`
12782         if test -z "$ac_used"; then
12783           { echo "$as_me:12783: WARNING: datarootdir was used implicitly but not set:
12784 $ac_seen" >&5
12785 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
12786 $ac_seen" >&2;}
12787           ac_warn_datarootdir=yes
12788         fi
12789       fi
12790       ac_seen=`grep '${datarootdir}' $ac_item`
12791       if test -n "$ac_seen"; then
12792         { echo "$as_me:12792: WARNING: datarootdir was used explicitly but not set:
12793 $ac_seen" >&5
12794 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
12795 $ac_seen" >&2;}
12796         ac_warn_datarootdir=yes
12797       fi
12798     done
12799   fi
12800
12801 if test "x$ac_warn_datarootdir" = xyes; then
12802   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
12803 fi
12804
12805 EOF
12806 cat >>$CONFIG_STATUS <<EOF
12807   sed "$ac_vpsub
12808 $extrasub
12809 EOF
12810 cat >>$CONFIG_STATUS <<\EOF
12811 :t
12812 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12813 s,@configure_input@,$configure_input,;t t
12814 s,@srcdir@,$ac_srcdir,;t t
12815 s,@top_srcdir@,$ac_top_srcdir,;t t
12816 s,@INSTALL@,$ac_INSTALL,;t t
12817 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12818   rm -f $tmp/stdin
12819   if test x"$ac_file" != x-; then
12820     cp $tmp/out $ac_file
12821
12822     for ac_name in prefix exec_prefix datarootdir
12823     do
12824         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
12825         if test -n "$ac_seen"; then
12826             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
12827             if test -z "$ac_init"; then
12828               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
12829               { echo "$as_me:12829: WARNING: Variable $ac_name is used but was not set:
12830 $ac_seen" >&5
12831 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
12832 $ac_seen" >&2;}
12833             fi
12834         fi
12835     done
12836     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
12837     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
12838     if test -s $tmp/out; then
12839       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
12840       { echo "$as_me:12840: WARNING: Some variables may not be substituted:
12841 $ac_seen" >&5
12842 echo "$as_me: WARNING: Some variables may not be substituted:
12843 $ac_seen" >&2;}
12844     fi
12845   else
12846     cat $tmp/out
12847   fi
12848   rm -f $tmp/out
12849
12850 done
12851 EOF
12852 cat >>$CONFIG_STATUS <<\EOF
12853
12854 #
12855 # CONFIG_HEADER section.
12856 #
12857
12858 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12859 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12860 #
12861 # ac_d sets the value in "#define NAME VALUE" lines.
12862 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12863 ac_dB='[        ].*$,\1#\2'
12864 ac_dC=' '
12865 ac_dD=',;t'
12866 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12867 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12868 ac_iB='\([      ]\),\1#\2define\3'
12869 ac_iC=' '
12870 ac_iD='\4,;t'
12871 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12872 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12873 ac_uB='$,\1#\2define\3'
12874 ac_uC=' '
12875 ac_uD=',;t'
12876
12877 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12878   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12879   case $ac_file in
12880   - | *:- | *:-:* ) # input from stdin
12881         cat >$tmp/stdin
12882         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12883         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12884   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12885         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12886   * )   ac_file_in=$ac_file.in ;;
12887   esac
12888
12889   test x"$ac_file" != x- && { echo "$as_me:12889: creating $ac_file" >&5
12890 echo "$as_me: creating $ac_file" >&6;}
12891
12892   # First look for the input files in the build tree, otherwise in the
12893   # src tree.
12894   ac_file_inputs=`IFS=:
12895     for f in $ac_file_in; do
12896       case $f in
12897       -) echo $tmp/stdin ;;
12898       [\\/$]*)
12899          # Absolute (can't be DOS-style, as IFS=:)
12900          test -f "$f" || { { echo "$as_me:12900: error: cannot find input file: $f" >&5
12901 echo "$as_me: error: cannot find input file: $f" >&2;}
12902    { (exit 1); exit 1; }; }
12903          echo $f;;
12904       *) # Relative
12905          if test -f "$f"; then
12906            # Build tree
12907            echo $f
12908          elif test -f "$srcdir/$f"; then
12909            # Source tree
12910            echo $srcdir/$f
12911          else
12912            # /dev/null tree
12913            { { echo "$as_me:12913: error: cannot find input file: $f" >&5
12914 echo "$as_me: error: cannot find input file: $f" >&2;}
12915    { (exit 1); exit 1; }; }
12916          fi;;
12917       esac
12918     done` || { (exit 1); exit 1; }
12919   # Remove the trailing spaces.
12920   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12921
12922 EOF
12923
12924 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12925 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12926 # be either 'cat' or 'sort'.
12927 cat confdefs.h | uniq >conftest.vals
12928
12929 # Break up conftest.vals because some shells have a limit on
12930 # the size of here documents, and old seds have small limits too.
12931
12932 rm -f conftest.tail
12933 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12934 while grep . conftest.vals >/dev/null
12935 do
12936   # Write chunks of a limited-size here document to conftest.frag.
12937   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12938   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12939   echo 'CEOF' >> $CONFIG_STATUS
12940   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12941   rm -f conftest.vals
12942   mv conftest.tail conftest.vals
12943 done
12944 rm -f conftest.vals
12945
12946 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12947 # marker @DEFS@.
12948 echo '  cat >> conftest.edit <<CEOF
12949 /@DEFS@/r conftest.frag
12950 /@DEFS@/d
12951 CEOF
12952 sed -f conftest.edit $tmp/in > $tmp/out
12953 rm -f $tmp/in
12954 mv $tmp/out $tmp/in
12955 rm -f conftest.edit conftest.frag
12956 ' >> $CONFIG_STATUS
12957
12958 cat >>$CONFIG_STATUS <<\EOF
12959   # Let's still pretend it is `configure' which instantiates (i.e., don't
12960   # use $as_me), people would be surprised to read:
12961   #    /* config.h.  Generated automatically by config.status.  */
12962   if test x"$ac_file" = x-; then
12963     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12964   else
12965     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12966   fi
12967   cat $tmp/in >>$tmp/config.h
12968   rm -f $tmp/in
12969   if test x"$ac_file" != x-; then
12970     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12971       { echo "$as_me:12971: $ac_file is unchanged" >&5
12972 echo "$as_me: $ac_file is unchanged" >&6;}
12973     else
12974       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12975          X"$ac_file" : 'X\(//\)[^/]' \| \
12976          X"$ac_file" : 'X\(//\)$' \| \
12977          X"$ac_file" : 'X\(/\)' \| \
12978          .     : '\(.\)' 2>/dev/null ||
12979 echo X"$ac_file" |
12980     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12981           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12982           /^X\(\/\/\)$/{ s//\1/; q; }
12983           /^X\(\/\).*/{ s//\1/; q; }
12984           s/.*/./; q'`
12985       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12986         { case "$ac_dir" in
12987   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12988   *)                      as_incr_dir=.;;
12989 esac
12990 as_dummy="$ac_dir"
12991 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12992   case $as_mkdir_dir in
12993     # Skip DOS drivespec
12994     ?:) as_incr_dir=$as_mkdir_dir ;;
12995     *)
12996       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12997       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12998     ;;
12999   esac
13000 done; }
13001
13002       fi
13003       rm -f $ac_file
13004       mv $tmp/config.h $ac_file
13005     fi
13006   else
13007     cat $tmp/config.h
13008     rm -f $tmp/config.h
13009   fi
13010 done
13011 EOF
13012 cat >>$CONFIG_STATUS <<\EOF
13013 #
13014 # CONFIG_COMMANDS section.
13015 #
13016 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13017   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13018   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13019
13020   case $ac_dest in
13021     default )
13022 if test -z "$USE_OLD_MAKERULES" ; then
13023         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
13024 fi
13025  ;;
13026   esac
13027 done
13028 EOF
13029
13030 cat >>$CONFIG_STATUS <<\EOF
13031
13032 { (exit 0); exit 0; }
13033 EOF
13034 chmod +x $CONFIG_STATUS
13035 ac_clean_files=$ac_clean_files_save
13036
13037 # configure is writing to config.log, and then calls config.status.
13038 # config.status does its own redirection, appending to config.log.
13039 # Unfortunately, on DOS this fails, as config.log is still kept open
13040 # by configure, so config.status won't be able to write to it; its
13041 # output is simply discarded.  So we exec the FD to /dev/null,
13042 # effectively closing config.log, so it can be properly (re)opened and
13043 # appended to by config.status.  When coming back to configure, we
13044 # need to make the FD available again.
13045 if test "$no_create" != yes; then
13046   ac_cs_success=:
13047   exec 5>/dev/null
13048   $SHELL $CONFIG_STATUS || ac_cs_success=false
13049   exec 5>>config.log
13050   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13051   # would make configure fail if this is the last instruction.
13052   $ac_cs_success || { (exit 1); exit 1; }
13053 fi
13054 ${MAKE:-make} preinstall