]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20140823
[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.20121002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="gen/gen.c"
109
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datarootdir='${prefix}/share'
139 datadir='${datarootdir}'
140 sysconfdir='${prefix}/etc'
141 sharedstatedir='${prefix}/com'
142 localstatedir='${prefix}/var'
143 libdir='${exec_prefix}/lib'
144 includedir='${prefix}/include'
145 oldincludedir='/usr/include'
146 infodir='${datarootdir}/info'
147 mandir='${datarootdir}/man'
148
149 # Identity of this package.
150 PACKAGE_NAME=
151 PACKAGE_TARNAME=
152 PACKAGE_VERSION=
153 PACKAGE_STRING=
154 PACKAGE_BUGREPORT=
155
156 ac_prev=
157 for ac_option
158 do
159   # If the previous option needs an argument, assign it.
160   if test -n "$ac_prev"; then
161     eval "$ac_prev=\$ac_option"
162     ac_prev=
163     continue
164   fi
165
166   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
167
168   # Accept the important Cygnus configure options, so we can diagnose typos.
169
170   case $ac_option in
171
172   -bindir | --bindir | --bindi | --bind | --bin | --bi)
173     ac_prev=bindir ;;
174   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
175     bindir=$ac_optarg ;;
176
177   -build | --build | --buil | --bui | --bu)
178     ac_prev=build_alias ;;
179   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
180     build_alias=$ac_optarg ;;
181
182   -cache-file | --cache-file | --cache-fil | --cache-fi \
183   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
184     ac_prev=cache_file ;;
185   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
186   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
187     cache_file=$ac_optarg ;;
188
189   --config-cache | -C)
190     cache_file=config.cache ;;
191
192   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
193     ac_prev=datadir ;;
194   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
195   | --da=*)
196     datadir=$ac_optarg ;;
197
198   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
199   | --dataroo | --dataro | --datar)
200     ac_prev=datarootdir ;;
201   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
202   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
203     datarootdir=$ac_optarg ;;
204
205   -disable-* | --disable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     eval "enable_$ac_feature=no" ;;
213
214   -enable-* | --enable-*)
215     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
216     # Reject names that are not valid shell variable names.
217     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
218       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
219    { (exit 1); exit 1; }; }
220     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
221     case $ac_option in
222       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
223       *) ac_optarg=yes ;;
224     esac
225     eval "enable_$ac_feature='$ac_optarg'" ;;
226
227   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
228   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
229   | --exec | --exe | --ex)
230     ac_prev=exec_prefix ;;
231   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
232   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
233   | --exec=* | --exe=* | --ex=*)
234     exec_prefix=$ac_optarg ;;
235
236   -gas | --gas | --ga | --g)
237     # Obsolete; use --with-gas.
238     with_gas=yes ;;
239
240   -help | --help | --hel | --he | -h)
241     ac_init_help=long ;;
242   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
243     ac_init_help=recursive ;;
244   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
245     ac_init_help=short ;;
246
247   -host | --host | --hos | --ho)
248     ac_prev=host_alias ;;
249   -host=* | --host=* | --hos=* | --ho=*)
250     host_alias=$ac_optarg ;;
251
252   -includedir | --includedir | --includedi | --included | --include \
253   | --includ | --inclu | --incl | --inc)
254     ac_prev=includedir ;;
255   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256   | --includ=* | --inclu=* | --incl=* | --inc=*)
257     includedir=$ac_optarg ;;
258
259   -infodir | --infodir | --infodi | --infod | --info | --inf)
260     ac_prev=infodir ;;
261   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262     infodir=$ac_optarg ;;
263
264   -libdir | --libdir | --libdi | --libd)
265     ac_prev=libdir ;;
266   -libdir=* | --libdir=* | --libdi=* | --libd=*)
267     libdir=$ac_optarg ;;
268
269   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270   | --libexe | --libex | --libe)
271     ac_prev=libexecdir ;;
272   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273   | --libexe=* | --libex=* | --libe=*)
274     libexecdir=$ac_optarg ;;
275
276   -localstatedir | --localstatedir | --localstatedi | --localstated \
277   | --localstate | --localstat | --localsta | --localst \
278   | --locals | --local | --loca | --loc | --lo)
279     ac_prev=localstatedir ;;
280   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283     localstatedir=$ac_optarg ;;
284
285   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286     ac_prev=mandir ;;
287   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
288     mandir=$ac_optarg ;;
289
290   -nfp | --nfp | --nf)
291     # Obsolete; use --without-fp.
292     with_fp=no ;;
293
294   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
295   | --no-cr | --no-c)
296     no_create=yes ;;
297
298   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
299   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
300     no_recursion=yes ;;
301
302   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
303   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
304   | --oldin | --oldi | --old | --ol | --o)
305     ac_prev=oldincludedir ;;
306   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
307   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
308   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
309     oldincludedir=$ac_optarg ;;
310
311   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312     ac_prev=prefix ;;
313   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
314     prefix=$ac_optarg ;;
315
316   -program-prefix | --program-prefix | --program-prefi | --program-pref \
317   | --program-pre | --program-pr | --program-p)
318     ac_prev=program_prefix ;;
319   -program-prefix=* | --program-prefix=* | --program-prefi=* \
320   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
321     program_prefix=$ac_optarg ;;
322
323   -program-suffix | --program-suffix | --program-suffi | --program-suff \
324   | --program-suf | --program-su | --program-s)
325     ac_prev=program_suffix ;;
326   -program-suffix=* | --program-suffix=* | --program-suffi=* \
327   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
328     program_suffix=$ac_optarg ;;
329
330   -program-transform-name | --program-transform-name \
331   | --program-transform-nam | --program-transform-na \
332   | --program-transform-n | --program-transform- \
333   | --program-transform | --program-transfor \
334   | --program-transfo | --program-transf \
335   | --program-trans | --program-tran \
336   | --progr-tra | --program-tr | --program-t)
337     ac_prev=program_transform_name ;;
338   -program-transform-name=* | --program-transform-name=* \
339   | --program-transform-nam=* | --program-transform-na=* \
340   | --program-transform-n=* | --program-transform-=* \
341   | --program-transform=* | --program-transfor=* \
342   | --program-transfo=* | --program-transf=* \
343   | --program-trans=* | --program-tran=* \
344   | --progr-tra=* | --program-tr=* | --program-t=*)
345     program_transform_name=$ac_optarg ;;
346
347   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
348   | -silent | --silent | --silen | --sile | --sil)
349     silent=yes ;;
350
351   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352     ac_prev=sbindir ;;
353   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354   | --sbi=* | --sb=*)
355     sbindir=$ac_optarg ;;
356
357   -sharedstatedir | --sharedstatedir | --sharedstatedi \
358   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
359   | --sharedst | --shareds | --shared | --share | --shar \
360   | --sha | --sh)
361     ac_prev=sharedstatedir ;;
362   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
363   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
364   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365   | --sha=* | --sh=*)
366     sharedstatedir=$ac_optarg ;;
367
368   -site | --site | --sit)
369     ac_prev=site ;;
370   -site=* | --site=* | --sit=*)
371     site=$ac_optarg ;;
372
373   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374     ac_prev=srcdir ;;
375   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376     srcdir=$ac_optarg ;;
377
378   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379   | --syscon | --sysco | --sysc | --sys | --sy)
380     ac_prev=sysconfdir ;;
381   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383     sysconfdir=$ac_optarg ;;
384
385   -target | --target | --targe | --targ | --tar | --ta | --t)
386     ac_prev=target_alias ;;
387   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388     target_alias=$ac_optarg ;;
389
390   -v | -verbose | --verbose | --verbos | --verbo | --verb)
391     verbose=yes ;;
392
393   -version | --version | --versio | --versi | --vers | -V)
394     ac_init_version=: ;;
395
396   -with-* | --with-*)
397     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
398     # Reject names that are not valid shell variable names.
399     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400       { echo "$as_me: error: invalid package name: $ac_package" >&2
401    { (exit 1); exit 1; }; }
402     ac_package=`echo $ac_package| sed 's/-/_/g'`
403     case $ac_option in
404       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
405       *) ac_optarg=yes ;;
406     esac
407     eval "with_$ac_package='$ac_optarg'" ;;
408
409   -without-* | --without-*)
410     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
411     # Reject names that are not valid shell variable names.
412     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
413       { echo "$as_me: error: invalid package name: $ac_package" >&2
414    { (exit 1); exit 1; }; }
415     ac_package=`echo $ac_package | sed 's/-/_/g'`
416     eval "with_$ac_package=no" ;;
417
418   --x)
419     # Obsolete; use --with-x.
420     with_x=yes ;;
421
422   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
423   | --x-incl | --x-inc | --x-in | --x-i)
424     ac_prev=x_includes ;;
425   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
426   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
427     x_includes=$ac_optarg ;;
428
429   -x-libraries | --x-libraries | --x-librarie | --x-librari \
430   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
431     ac_prev=x_libraries ;;
432   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
433   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
434     x_libraries=$ac_optarg ;;
435
436   -*) { echo "$as_me: error: unrecognized option: $ac_option
437 Try \`$0 --help' for more information." >&2
438    { (exit 1); exit 1; }; }
439     ;;
440
441   *=*)
442     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
443     # Reject names that are not valid shell variable names.
444     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
445       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
446    { (exit 1); exit 1; }; }
447     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
448     eval "$ac_envvar='$ac_optarg'"
449     export $ac_envvar ;;
450
451   *)
452     # FIXME: should be removed in autoconf 3.0.
453     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
454     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
455       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
456     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
457     ;;
458
459   esac
460 done
461
462 if test -n "$ac_prev"; then
463   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
464   { echo "$as_me: error: missing argument to $ac_option" >&2
465    { (exit 1); exit 1; }; }
466 fi
467
468 # Be sure to have absolute paths.
469 for ac_var in exec_prefix prefix
470 do
471   eval ac_val=$`echo $ac_var`
472   case $ac_val in
473     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
474     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
475    { (exit 1); exit 1; }; };;
476   esac
477 done
478
479 # Be sure to have absolute paths.
480 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
481               localstatedir libdir includedir oldincludedir infodir mandir
482 do
483   eval ac_val=$`echo $ac_var`
484   case $ac_val in
485     [\\/$]* | ?:[\\/]* ) ;;
486     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
487    { (exit 1); exit 1; }; };;
488   esac
489 done
490
491 # There might be people who depend on the old broken behavior: `$host'
492 # used to hold the argument of --host etc.
493 build=$build_alias
494 host=$host_alias
495 target=$target_alias
496
497 # FIXME: should be removed in autoconf 3.0.
498 if test "x$host_alias" != x; then
499   if test "x$build_alias" = x; then
500     cross_compiling=maybe
501     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
502     If a cross compiler is detected then cross compile mode will be used." >&2
503   elif test "x$build_alias" != "x$host_alias"; then
504     cross_compiling=yes
505   fi
506 fi
507
508 ac_tool_prefix=
509 test -n "$host_alias" && ac_tool_prefix=$host_alias-
510
511 test "$silent" = yes && exec 6>/dev/null
512
513 # Find the source files, if location was not specified.
514 if test -z "$srcdir"; then
515   ac_srcdir_defaulted=yes
516   # Try the directory containing this script, then its parent.
517   ac_prog=$0
518   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
519   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
520   srcdir=$ac_confdir
521   if test ! -r $srcdir/$ac_unique_file; then
522     srcdir=..
523   fi
524 else
525   ac_srcdir_defaulted=no
526 fi
527 if test ! -r $srcdir/$ac_unique_file; then
528   if test "$ac_srcdir_defaulted" = yes; then
529     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
530    { (exit 1); exit 1; }; }
531   else
532     { echo "$as_me: error: cannot find sources in $srcdir" >&2
533    { (exit 1); exit 1; }; }
534   fi
535 fi
536 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
537 ac_env_build_alias_set=${build_alias+set}
538 ac_env_build_alias_value=$build_alias
539 ac_cv_env_build_alias_set=${build_alias+set}
540 ac_cv_env_build_alias_value=$build_alias
541 ac_env_host_alias_set=${host_alias+set}
542 ac_env_host_alias_value=$host_alias
543 ac_cv_env_host_alias_set=${host_alias+set}
544 ac_cv_env_host_alias_value=$host_alias
545 ac_env_target_alias_set=${target_alias+set}
546 ac_env_target_alias_value=$target_alias
547 ac_cv_env_target_alias_set=${target_alias+set}
548 ac_cv_env_target_alias_value=$target_alias
549 ac_env_CC_set=${CC+set}
550 ac_env_CC_value=$CC
551 ac_cv_env_CC_set=${CC+set}
552 ac_cv_env_CC_value=$CC
553 ac_env_CFLAGS_set=${CFLAGS+set}
554 ac_env_CFLAGS_value=$CFLAGS
555 ac_cv_env_CFLAGS_set=${CFLAGS+set}
556 ac_cv_env_CFLAGS_value=$CFLAGS
557 ac_env_LDFLAGS_set=${LDFLAGS+set}
558 ac_env_LDFLAGS_value=$LDFLAGS
559 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
560 ac_cv_env_LDFLAGS_value=$LDFLAGS
561 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
562 ac_env_CPPFLAGS_value=$CPPFLAGS
563 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
564 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
565 ac_env_CPP_set=${CPP+set}
566 ac_env_CPP_value=$CPP
567 ac_cv_env_CPP_set=${CPP+set}
568 ac_cv_env_CPP_value=$CPP
569
570 #
571 # Report the --help message.
572 #
573 if test "$ac_init_help" = "long"; then
574   # Omit some internal or obsolete options to make the list less imposing.
575   # This message is too long to be a string in the A/UX 3.1 sh.
576   cat <<EOF
577 \`configure' configures this package to adapt to many kinds of systems.
578
579 Usage: $0 [OPTION]... [VAR=VALUE]...
580
581 To assign environment variables (e.g., CC, CFLAGS...), specify them as
582 VAR=VALUE.  See below for descriptions of some of the useful variables.
583
584 Defaults for the options are specified in brackets.
585
586 Configuration:
587   -h, --help              display this help and exit
588       --help=short        display options specific to this package
589       --help=recursive    display the short help of all the included packages
590   -V, --version           display version information and exit
591   -q, --quiet, --silent   do not print \`checking...' messages
592       --cache-file=FILE   cache test results in FILE [disabled]
593   -C, --config-cache      alias for \`--cache-file=config.cache'
594   -n, --no-create         do not create output files
595       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
596
597 EOF
598
599   cat <<EOF
600 Installation directories:
601   --prefix=PREFIX         install architecture-independent files in PREFIX
602                           [$ac_default_prefix]
603   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
604                           [PREFIX]
605
606 By default, \`make install' will install all the files in
607 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
608 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
609 for instance \`--prefix=\$HOME'.
610
611 For better control, use the options below.
612
613 Fine tuning of the installation directories:
614   --bindir=DIR            user executables [EPREFIX/bin]
615   --sbindir=DIR           system admin executables [EPREFIX/sbin]
616   --libexecdir=DIR        program executables [EPREFIX/libexec]
617   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
618   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
619   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
620   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
621   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
622   --libdir=DIR            object code libraries [EPREFIX/lib]
623   --includedir=DIR        C header files [PREFIX/include]
624   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
625   --infodir=DIR           info documentation [DATAROOTDIR/info]
626   --mandir=DIR            man documentation [DATAROOTDIR/man]
627 EOF
628
629   cat <<\EOF
630
631 Program names:
632   --program-prefix=PREFIX            prepend PREFIX to installed program names
633   --program-suffix=SUFFIX            append SUFFIX to installed program names
634   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
635
636 System types:
637   --build=BUILD           configure for building on BUILD [guessed]
638   --host=HOST       build programs to run on HOST [BUILD]
639   --target=TARGET   configure for building compilers for TARGET [HOST]
640 EOF
641 fi
642
643 if test -n "$ac_init_help"; then
644
645   cat <<\EOF
646
647 Optional Packages:
648   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
649   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
650
651 Optional Features:
652   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
653   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
654
655   --with-system-type=XXX  test: override derived host system-type
656   --with-pkg-config{=path} enable/disable use of pkg-config
657   --with-pkg-config-libdir=XXX use given directory for installing pc-files
658   --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.20121002.  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"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
978   *c*,-n*) ECHO_N= ECHO_C='
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/usr" != "x$prefix" && \
3781 test -d "/usr" && \
3782 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
3783         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
3784         test -d /usr/include &&          cf_search="$cf_search /usr/include"
3785         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
3786         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
3787         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
3788         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
3789 }
3790
3791 test "x$prefix" != "xNONE" && \
3792 test -d "$prefix" && \
3793  {
3794         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
3795         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
3796         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
3797         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
3798         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
3799         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
3800 }
3801
3802 test "x/usr/local" != "x$prefix" && \
3803 test -d "/usr/local" && \
3804 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
3805         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
3806         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
3807         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
3808         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
3809         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
3810         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
3811 }
3812
3813 test "x/opt" != "x$prefix" && \
3814 test -d "/opt" && \
3815 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
3816         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
3817         test -d /opt/include &&          cf_search="$cf_search /opt/include"
3818         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
3819         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
3820         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
3821         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
3822 }
3823
3824 test "x$HOME" != "x$prefix" && \
3825 test -d "$HOME" && \
3826 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
3827         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
3828         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
3829         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
3830         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
3831         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
3832         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
3833 }
3834
3835 test "$includedir" != NONE && \
3836 test "$includedir" != "/usr/include" && \
3837 test -d "$includedir" && {
3838         test -d $includedir &&    cf_search="$cf_search $includedir"
3839         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
3840 }
3841
3842 test "$oldincludedir" != NONE && \
3843 test "$oldincludedir" != "/usr/include" && \
3844 test -d "$oldincludedir" && {
3845         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
3846         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
3847 }
3848
3849 cf_search="$cf_search $cf_header_path_list"
3850
3851     for cf_cv_header_path_utf8 in $cf_search
3852     do
3853       if test -d $cf_cv_header_path_utf8 ; then
3854         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
3855
3856 echo "${as_me:-configure}:3856: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
3857
3858         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
3859         cat >conftest.$ac_ext <<_ACEOF
3860 #line 3860 "configure"
3861 #include "confdefs.h"
3862
3863 #include <libutf8.h>
3864 int
3865 main ()
3866 {
3867 putwc(0,0);
3868   ;
3869   return 0;
3870 }
3871 _ACEOF
3872 rm -f conftest.$ac_objext
3873 if { (eval echo "$as_me:3873: \"$ac_compile\"") >&5
3874   (eval $ac_compile) 2>&5
3875   ac_status=$?
3876   echo "$as_me:3876: \$? = $ac_status" >&5
3877   (exit $ac_status); } &&
3878          { ac_try='test -s conftest.$ac_objext'
3879   { (eval echo "$as_me:3879: \"$ac_try\"") >&5
3880   (eval $ac_try) 2>&5
3881   ac_status=$?
3882   echo "$as_me:3882: \$? = $ac_status" >&5
3883   (exit $ac_status); }; }; then
3884
3885             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
3886
3887 echo "${as_me:-configure}:3887: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
3888
3889             cf_cv_find_linkage_utf8=maybe
3890             cf_test_CPPFLAGS="$CPPFLAGS"
3891             break
3892 else
3893   echo "$as_me: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3895
3896             CPPFLAGS="$cf_save_CPPFLAGS"
3897
3898 fi
3899 rm -f conftest.$ac_objext conftest.$ac_ext
3900       fi
3901     done
3902
3903     if test "$cf_cv_find_linkage_utf8" = maybe ; then
3904
3905 echo "${as_me:-configure}:3905: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
3906
3907       cf_save_LIBS="$LIBS"
3908       cf_save_LDFLAGS="$LDFLAGS"
3909
3910       if test "$cf_cv_find_linkage_utf8" != yes ; then
3911
3912 cf_search=
3913 cf_library_path_list=""
3914 if test -n "${LDFLAGS}${LIBS}" ; then
3915         for cf_library_path in $LDFLAGS $LIBS
3916         do
3917                 case $cf_library_path in #(vi
3918                 -L*)
3919                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
3920
3921 test "x$cf_library_path" != "xNONE" && \
3922 test -d "$cf_library_path" && \
3923  {
3924         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
3925         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
3926         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
3927         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
3928         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
3929         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
3930 }
3931
3932                         cf_library_path_list="$cf_library_path_list $cf_search"
3933                         ;;
3934                 esac
3935         done
3936 fi
3937
3938 cf_search=
3939
3940 test "x/usr" != "x$prefix" && \
3941 test -d "/usr" && \
3942 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
3943         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
3944         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
3945         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
3946         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
3947         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
3948         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
3949 }
3950
3951 test "x$prefix" != "xNONE" && \
3952 test -d "$prefix" && \
3953  {
3954         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
3955         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
3956         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
3957         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
3958         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
3959         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
3960 }
3961
3962 test "x/usr/local" != "x$prefix" && \
3963 test -d "/usr/local" && \
3964 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
3965         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
3966         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
3967         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
3968         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
3969         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
3970         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
3971 }
3972
3973 test "x/opt" != "x$prefix" && \
3974 test -d "/opt" && \
3975 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
3976         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
3977         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
3978         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
3979         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
3980         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
3981         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
3982 }
3983
3984 test "x$HOME" != "x$prefix" && \
3985 test -d "$HOME" && \
3986 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
3987         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
3988         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
3989         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
3990         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
3991         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
3992         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
3993 }
3994
3995 cf_search="$cf_library_path_list $cf_search"
3996
3997         for cf_cv_library_path_utf8 in $cf_search
3998         do
3999           if test -d $cf_cv_library_path_utf8 ; then
4000             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4001
4002 echo "${as_me:-configure}:4002: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4003
4004             CPPFLAGS="$cf_test_CPPFLAGS"
4005             LIBS="-lutf8  $cf_save_LIBS"
4006             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4007             cat >conftest.$ac_ext <<_ACEOF
4008 #line 4008 "configure"
4009 #include "confdefs.h"
4010
4011 #include <libutf8.h>
4012 int
4013 main ()
4014 {
4015 putwc(0,0);
4016   ;
4017   return 0;
4018 }
4019 _ACEOF
4020 rm -f conftest.$ac_objext conftest$ac_exeext
4021 if { (eval echo "$as_me:4021: \"$ac_link\"") >&5
4022   (eval $ac_link) 2>&5
4023   ac_status=$?
4024   echo "$as_me:4024: \$? = $ac_status" >&5
4025   (exit $ac_status); } &&
4026          { ac_try='test -s conftest$ac_exeext'
4027   { (eval echo "$as_me:4027: \"$ac_try\"") >&5
4028   (eval $ac_try) 2>&5
4029   ac_status=$?
4030   echo "$as_me:4030: \$? = $ac_status" >&5
4031   (exit $ac_status); }; }; then
4032
4033                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4034
4035 echo "${as_me:-configure}:4035: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4036
4037                 cf_cv_find_linkage_utf8=yes
4038                 cf_cv_library_file_utf8="-lutf8"
4039                 break
4040 else
4041   echo "$as_me: failed program was:" >&5
4042 cat conftest.$ac_ext >&5
4043
4044                 CPPFLAGS="$cf_save_CPPFLAGS"
4045                 LIBS="$cf_save_LIBS"
4046                 LDFLAGS="$cf_save_LDFLAGS"
4047
4048 fi
4049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4050           fi
4051         done
4052         CPPFLAGS="$cf_save_CPPFLAGS"
4053         LDFLAGS="$cf_save_LDFLAGS"
4054       fi
4055
4056     else
4057       cf_cv_find_linkage_utf8=no
4058     fi
4059
4060 fi
4061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4062
4063 fi
4064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4065
4066 LIBS="$cf_save_LIBS"
4067
4068 if test "$cf_cv_find_linkage_utf8" = yes ; then
4069 cf_cv_utf8_lib=add-on
4070 else
4071 cf_cv_utf8_lib=no
4072 fi
4073
4074 fi
4075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4076 fi
4077 echo "$as_me:4077: result: $cf_cv_utf8_lib" >&5
4078 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4079
4080 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4081 # ncurses/ncursesw:
4082 if test "$cf_cv_utf8_lib" = "add-on" ; then
4083
4084 cat >>confdefs.h <<\EOF
4085 #define HAVE_LIBUTF8_H 1
4086 EOF
4087
4088 if test -n "$cf_cv_header_path_utf8" ; then
4089   for cf_add_incdir in $cf_cv_header_path_utf8
4090   do
4091         while test $cf_add_incdir != /usr/include
4092         do
4093           if test -d $cf_add_incdir
4094           then
4095                 cf_have_incdir=no
4096                 if test -n "$CFLAGS$CPPFLAGS" ; then
4097                   # a loop is needed to ensure we can add subdirs of existing dirs
4098                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4099                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4100                           cf_have_incdir=yes; break
4101                         fi
4102                   done
4103                 fi
4104
4105                 if test "$cf_have_incdir" = no ; then
4106                   if test "$cf_add_incdir" = /usr/local/include ; then
4107                         if test "$GCC" = yes
4108                         then
4109                           cf_save_CPPFLAGS=$CPPFLAGS
4110                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4111                           cat >conftest.$ac_ext <<_ACEOF
4112 #line 4112 "configure"
4113 #include "confdefs.h"
4114 #include <stdio.h>
4115 int
4116 main ()
4117 {
4118 printf("Hello")
4119   ;
4120   return 0;
4121 }
4122 _ACEOF
4123 rm -f conftest.$ac_objext
4124 if { (eval echo "$as_me:4124: \"$ac_compile\"") >&5
4125   (eval $ac_compile) 2>&5
4126   ac_status=$?
4127   echo "$as_me:4127: \$? = $ac_status" >&5
4128   (exit $ac_status); } &&
4129          { ac_try='test -s conftest.$ac_objext'
4130   { (eval echo "$as_me:4130: \"$ac_try\"") >&5
4131   (eval $ac_try) 2>&5
4132   ac_status=$?
4133   echo "$as_me:4133: \$? = $ac_status" >&5
4134   (exit $ac_status); }; }; then
4135   :
4136 else
4137   echo "$as_me: failed program was:" >&5
4138 cat conftest.$ac_ext >&5
4139 cf_have_incdir=yes
4140 fi
4141 rm -f conftest.$ac_objext conftest.$ac_ext
4142                           CPPFLAGS=$cf_save_CPPFLAGS
4143                         fi
4144                   fi
4145                 fi
4146
4147                 if test "$cf_have_incdir" = no ; then
4148                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4149
4150 echo "${as_me:-configure}:4150: testing adding $cf_add_incdir to include-path ..." 1>&5
4151
4152                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4153
4154                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4155                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4156                   cf_add_incdir="$cf_top_incdir"
4157                 else
4158                   break
4159                 fi
4160           fi
4161         done
4162   done
4163 fi
4164
4165 if test -n "$cf_cv_library_path_utf8" ; then
4166   for cf_add_libdir in $cf_cv_library_path_utf8
4167   do
4168     if test $cf_add_libdir = /usr/lib ; then
4169       :
4170     elif test -d $cf_add_libdir
4171     then
4172       cf_have_libdir=no
4173       if test -n "$LDFLAGS$LIBS" ; then
4174         # a loop is needed to ensure we can add subdirs of existing dirs
4175         for cf_test_libdir in $LDFLAGS $LIBS ; do
4176           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4177             cf_have_libdir=yes; break
4178           fi
4179         done
4180       fi
4181       if test "$cf_have_libdir" = no ; then
4182         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4183
4184 echo "${as_me:-configure}:4184: testing adding $cf_add_libdir to library-path ..." 1>&5
4185
4186         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4187       fi
4188     fi
4189   done
4190 fi
4191
4192 cf_add_libs="$cf_cv_library_file_utf8"
4193 # Filter out duplicates - this happens with badly-designed ".pc" files...
4194 for cf_add_1lib in $LIBS
4195 do
4196         for cf_add_2lib in $cf_add_libs
4197         do
4198                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4199                 then
4200                         cf_add_1lib=
4201                         break
4202                 fi
4203         done
4204         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4205 done
4206 LIBS="$cf_add_libs"
4207
4208 fi
4209
4210 cf_ncuconfig_root=ncursesw
4211
4212 echo "Looking for ${cf_ncuconfig_root}-config"
4213
4214 if test -n "$ac_tool_prefix"; then
4215   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4216   do
4217     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4218 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4219 echo "$as_me:4219: checking for $ac_word" >&5
4220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4221 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4222   echo $ECHO_N "(cached) $ECHO_C" >&6
4223 else
4224   if test -n "$NCURSES_CONFIG"; then
4225   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4226 else
4227   ac_save_IFS=$IFS; IFS=$ac_path_separator
4228 ac_dummy="$PATH"
4229 for ac_dir in $ac_dummy; do
4230   IFS=$ac_save_IFS
4231   test -z "$ac_dir" && ac_dir=.
4232   $as_executable_p "$ac_dir/$ac_word" || continue
4233 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4234 echo "$as_me:4234: found $ac_dir/$ac_word" >&5
4235 break
4236 done
4237
4238 fi
4239 fi
4240 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4241 if test -n "$NCURSES_CONFIG"; then
4242   echo "$as_me:4242: result: $NCURSES_CONFIG" >&5
4243 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4244 else
4245   echo "$as_me:4245: result: no" >&5
4246 echo "${ECHO_T}no" >&6
4247 fi
4248
4249     test -n "$NCURSES_CONFIG" && break
4250   done
4251 fi
4252 if test -z "$NCURSES_CONFIG"; then
4253   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4254   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4255 do
4256   # Extract the first word of "$ac_prog", so it can be a program name with args.
4257 set dummy $ac_prog; ac_word=$2
4258 echo "$as_me:4258: checking for $ac_word" >&5
4259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4260 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4261   echo $ECHO_N "(cached) $ECHO_C" >&6
4262 else
4263   if test -n "$ac_ct_NCURSES_CONFIG"; then
4264   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4265 else
4266   ac_save_IFS=$IFS; IFS=$ac_path_separator
4267 ac_dummy="$PATH"
4268 for ac_dir in $ac_dummy; do
4269   IFS=$ac_save_IFS
4270   test -z "$ac_dir" && ac_dir=.
4271   $as_executable_p "$ac_dir/$ac_word" || continue
4272 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4273 echo "$as_me:4273: found $ac_dir/$ac_word" >&5
4274 break
4275 done
4276
4277 fi
4278 fi
4279 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4280 if test -n "$ac_ct_NCURSES_CONFIG"; then
4281   echo "$as_me:4281: result: $ac_ct_NCURSES_CONFIG" >&5
4282 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288   test -n "$ac_ct_NCURSES_CONFIG" && break
4289 done
4290 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4291
4292   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4293 fi
4294
4295 if test "$NCURSES_CONFIG" != none ; then
4296
4297 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4298
4299 cf_add_libs="`$NCURSES_CONFIG --libs`"
4300 # Filter out duplicates - this happens with badly-designed ".pc" files...
4301 for cf_add_1lib in $LIBS
4302 do
4303         for cf_add_2lib in $cf_add_libs
4304         do
4305                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4306                 then
4307                         cf_add_1lib=
4308                         break
4309                 fi
4310         done
4311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4312 done
4313 LIBS="$cf_add_libs"
4314
4315 # even with config script, some packages use no-override for curses.h
4316
4317 echo "$as_me:4317: checking if we have identified curses headers" >&5
4318 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4319 if test "${cf_cv_ncurses_header+set}" = set; then
4320   echo $ECHO_N "(cached) $ECHO_C" >&6
4321 else
4322
4323 cf_cv_ncurses_header=none
4324 for cf_header in  \
4325     ncursesw/ncurses.h \
4326         ncursesw/curses.h \
4327         ncurses.h \
4328         curses.h
4329 do
4330 cat >conftest.$ac_ext <<_ACEOF
4331 #line 4331 "configure"
4332 #include "confdefs.h"
4333 #include <${cf_header}>
4334 int
4335 main ()
4336 {
4337 initscr(); tgoto("?", 0,0)
4338   ;
4339   return 0;
4340 }
4341 _ACEOF
4342 rm -f conftest.$ac_objext
4343 if { (eval echo "$as_me:4343: \"$ac_compile\"") >&5
4344   (eval $ac_compile) 2>&5
4345   ac_status=$?
4346   echo "$as_me:4346: \$? = $ac_status" >&5
4347   (exit $ac_status); } &&
4348          { ac_try='test -s conftest.$ac_objext'
4349   { (eval echo "$as_me:4349: \"$ac_try\"") >&5
4350   (eval $ac_try) 2>&5
4351   ac_status=$?
4352   echo "$as_me:4352: \$? = $ac_status" >&5
4353   (exit $ac_status); }; }; then
4354   cf_cv_ncurses_header=$cf_header; break
4355 else
4356   echo "$as_me: failed program was:" >&5
4357 cat conftest.$ac_ext >&5
4358 fi
4359 rm -f conftest.$ac_objext conftest.$ac_ext
4360 done
4361
4362 fi
4363 echo "$as_me:4363: result: $cf_cv_ncurses_header" >&5
4364 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4365
4366 if test "$cf_cv_ncurses_header" = none ; then
4367         { { echo "$as_me:4367: error: No curses header-files found" >&5
4368 echo "$as_me: error: No curses header-files found" >&2;}
4369    { (exit 1); exit 1; }; }
4370 fi
4371
4372 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4373
4374 for ac_header in $cf_cv_ncurses_header
4375 do
4376 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4377 echo "$as_me:4377: checking for $ac_header" >&5
4378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4380   echo $ECHO_N "(cached) $ECHO_C" >&6
4381 else
4382   cat >conftest.$ac_ext <<_ACEOF
4383 #line 4383 "configure"
4384 #include "confdefs.h"
4385 #include <$ac_header>
4386 _ACEOF
4387 if { (eval echo "$as_me:4387: \"$ac_cpp conftest.$ac_ext\"") >&5
4388   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4389   ac_status=$?
4390   egrep -v '^ *\+' conftest.er1 >conftest.err
4391   rm -f conftest.er1
4392   cat conftest.err >&5
4393   echo "$as_me:4393: \$? = $ac_status" >&5
4394   (exit $ac_status); } >/dev/null; then
4395   if test -s conftest.err; then
4396     ac_cpp_err=$ac_c_preproc_warn_flag
4397   else
4398     ac_cpp_err=
4399   fi
4400 else
4401   ac_cpp_err=yes
4402 fi
4403 if test -z "$ac_cpp_err"; then
4404   eval "$as_ac_Header=yes"
4405 else
4406   echo "$as_me: failed program was:" >&5
4407   cat conftest.$ac_ext >&5
4408   eval "$as_ac_Header=no"
4409 fi
4410 rm -f conftest.err conftest.$ac_ext
4411 fi
4412 echo "$as_me:4412: result: `eval echo '${'$as_ac_Header'}'`" >&5
4413 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4414 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4415   cat >>confdefs.h <<EOF
4416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4417 EOF
4418
4419 fi
4420 done
4421
4422 cat >>confdefs.h <<\EOF
4423 #define NCURSES 1
4424 EOF
4425
4426 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4427
4428 cat >>confdefs.h <<EOF
4429 #define $cf_nculib_ROOT 1
4430 EOF
4431
4432 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4433
4434 else
4435
4436 cf_ncuhdr_root=ncursesw
4437
4438 test -n "$cf_cv_curses_dir" && \
4439 test "$cf_cv_curses_dir" != "no" && { \
4440
4441 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4442   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4443   do
4444         while test $cf_add_incdir != /usr/include
4445         do
4446           if test -d $cf_add_incdir
4447           then
4448                 cf_have_incdir=no
4449                 if test -n "$CFLAGS$CPPFLAGS" ; then
4450                   # a loop is needed to ensure we can add subdirs of existing dirs
4451                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4452                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4453                           cf_have_incdir=yes; break
4454                         fi
4455                   done
4456                 fi
4457
4458                 if test "$cf_have_incdir" = no ; then
4459                   if test "$cf_add_incdir" = /usr/local/include ; then
4460                         if test "$GCC" = yes
4461                         then
4462                           cf_save_CPPFLAGS=$CPPFLAGS
4463                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4464                           cat >conftest.$ac_ext <<_ACEOF
4465 #line 4465 "configure"
4466 #include "confdefs.h"
4467 #include <stdio.h>
4468 int
4469 main ()
4470 {
4471 printf("Hello")
4472   ;
4473   return 0;
4474 }
4475 _ACEOF
4476 rm -f conftest.$ac_objext
4477 if { (eval echo "$as_me:4477: \"$ac_compile\"") >&5
4478   (eval $ac_compile) 2>&5
4479   ac_status=$?
4480   echo "$as_me:4480: \$? = $ac_status" >&5
4481   (exit $ac_status); } &&
4482          { ac_try='test -s conftest.$ac_objext'
4483   { (eval echo "$as_me:4483: \"$ac_try\"") >&5
4484   (eval $ac_try) 2>&5
4485   ac_status=$?
4486   echo "$as_me:4486: \$? = $ac_status" >&5
4487   (exit $ac_status); }; }; then
4488   :
4489 else
4490   echo "$as_me: failed program was:" >&5
4491 cat conftest.$ac_ext >&5
4492 cf_have_incdir=yes
4493 fi
4494 rm -f conftest.$ac_objext conftest.$ac_ext
4495                           CPPFLAGS=$cf_save_CPPFLAGS
4496                         fi
4497                   fi
4498                 fi
4499
4500                 if test "$cf_have_incdir" = no ; then
4501                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4502
4503 echo "${as_me:-configure}:4503: testing adding $cf_add_incdir to include-path ..." 1>&5
4504
4505                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4506
4507                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4508                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4509                   cf_add_incdir="$cf_top_incdir"
4510                 else
4511                   break
4512                 fi
4513           fi
4514         done
4515   done
4516 fi
4517
4518 }
4519
4520 echo "$as_me:4520: checking for $cf_ncuhdr_root header in include-path" >&5
4521 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4522 if test "${cf_cv_ncurses_h+set}" = set; then
4523   echo $ECHO_N "(cached) $ECHO_C" >&6
4524 else
4525
4526         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4527         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4528         for cf_header in $cf_header_list
4529         do
4530
4531         cat >conftest.$ac_ext <<_ACEOF
4532 #line 4532 "configure"
4533 #include "confdefs.h"
4534
4535 #define _XOPEN_SOURCE_EXTENDED
4536 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4537 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4538
4539 #include <$cf_header>
4540 int
4541 main ()
4542 {
4543
4544 #ifdef NCURSES_VERSION
4545
4546 #ifndef WACS_BSSB
4547         make an error
4548 #endif
4549
4550 printf("%s\n", NCURSES_VERSION);
4551 #else
4552 #ifdef __NCURSES_H
4553 printf("old\n");
4554 #else
4555         make an error
4556 #endif
4557 #endif
4558
4559   ;
4560   return 0;
4561 }
4562 _ACEOF
4563 rm -f conftest.$ac_objext
4564 if { (eval echo "$as_me:4564: \"$ac_compile\"") >&5
4565   (eval $ac_compile) 2>&5
4566   ac_status=$?
4567   echo "$as_me:4567: \$? = $ac_status" >&5
4568   (exit $ac_status); } &&
4569          { ac_try='test -s conftest.$ac_objext'
4570   { (eval echo "$as_me:4570: \"$ac_try\"") >&5
4571   (eval $ac_try) 2>&5
4572   ac_status=$?
4573   echo "$as_me:4573: \$? = $ac_status" >&5
4574   (exit $ac_status); }; }; then
4575   cf_cv_ncurses_h=$cf_header
4576
4577 else
4578   echo "$as_me: failed program was:" >&5
4579 cat conftest.$ac_ext >&5
4580 cf_cv_ncurses_h=no
4581 fi
4582 rm -f conftest.$ac_objext conftest.$ac_ext
4583
4584                 test "$cf_cv_ncurses_h" != no && break
4585         done
4586
4587 fi
4588 echo "$as_me:4588: result: $cf_cv_ncurses_h" >&5
4589 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4590
4591 if test "$cf_cv_ncurses_h" != no ; then
4592         cf_cv_ncurses_header=$cf_cv_ncurses_h
4593 else
4594
4595 echo "$as_me:4595: checking for $cf_ncuhdr_root include-path" >&5
4596 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4597 if test "${cf_cv_ncurses_h2+set}" = set; then
4598   echo $ECHO_N "(cached) $ECHO_C" >&6
4599 else
4600
4601         test -n "$verbose" && echo
4602
4603 cf_search=
4604
4605 # collect the current set of include-directories from compiler flags
4606 cf_header_path_list=""
4607 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4608         for cf_header_path in $CPPFLAGS $CFLAGS
4609         do
4610                 case $cf_header_path in #(vi
4611                 -I*)
4612                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4613
4614 test "x$cf_header_path" != "xNONE" && \
4615 test -d "$cf_header_path" && \
4616  {
4617         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4618         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4619         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4620         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4621         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4622         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"
4623 }
4624
4625                         cf_header_path_list="$cf_header_path_list $cf_search"
4626                         ;;
4627                 esac
4628         done
4629 fi
4630
4631 # add the variations for the package we are looking for
4632
4633 cf_search=
4634
4635 test "x/usr" != "x$prefix" && \
4636 test -d "/usr" && \
4637 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
4638         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4639         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4640         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4641         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4642         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4643         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4644 }
4645
4646 test "x$prefix" != "xNONE" && \
4647 test -d "$prefix" && \
4648  {
4649         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4650         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4651         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4652         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4653         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4654         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4655 }
4656
4657 test "x/usr/local" != "x$prefix" && \
4658 test -d "/usr/local" && \
4659 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
4660         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4661         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4662         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4663         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4664         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4665         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4666 }
4667
4668 test "x/opt" != "x$prefix" && \
4669 test -d "/opt" && \
4670 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
4671         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4672         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4673         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4674         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4675         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4676         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4677 }
4678
4679 test "x$HOME" != "x$prefix" && \
4680 test -d "$HOME" && \
4681 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
4682         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4683         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4684         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4685         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4686         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4687         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4688 }
4689
4690 test "$includedir" != NONE && \
4691 test "$includedir" != "/usr/include" && \
4692 test -d "$includedir" && {
4693         test -d $includedir &&    cf_search="$cf_search $includedir"
4694         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4695 }
4696
4697 test "$oldincludedir" != NONE && \
4698 test "$oldincludedir" != "/usr/include" && \
4699 test -d "$oldincludedir" && {
4700         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4701         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4702 }
4703
4704 cf_search="$cf_search $cf_header_path_list"
4705
4706         test -n "$verbose" && echo search path $cf_search
4707         cf_save2_CPPFLAGS="$CPPFLAGS"
4708         for cf_incdir in $cf_search
4709         do
4710
4711 if test -n "$cf_incdir" ; then
4712   for cf_add_incdir in $cf_incdir
4713   do
4714         while test $cf_add_incdir != /usr/include
4715         do
4716           if test -d $cf_add_incdir
4717           then
4718                 cf_have_incdir=no
4719                 if test -n "$CFLAGS$CPPFLAGS" ; then
4720                   # a loop is needed to ensure we can add subdirs of existing dirs
4721                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4722                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4723                           cf_have_incdir=yes; break
4724                         fi
4725                   done
4726                 fi
4727
4728                 if test "$cf_have_incdir" = no ; then
4729                   if test "$cf_add_incdir" = /usr/local/include ; then
4730                         if test "$GCC" = yes
4731                         then
4732                           cf_save_CPPFLAGS=$CPPFLAGS
4733                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4734                           cat >conftest.$ac_ext <<_ACEOF
4735 #line 4735 "configure"
4736 #include "confdefs.h"
4737 #include <stdio.h>
4738 int
4739 main ()
4740 {
4741 printf("Hello")
4742   ;
4743   return 0;
4744 }
4745 _ACEOF
4746 rm -f conftest.$ac_objext
4747 if { (eval echo "$as_me:4747: \"$ac_compile\"") >&5
4748   (eval $ac_compile) 2>&5
4749   ac_status=$?
4750   echo "$as_me:4750: \$? = $ac_status" >&5
4751   (exit $ac_status); } &&
4752          { ac_try='test -s conftest.$ac_objext'
4753   { (eval echo "$as_me:4753: \"$ac_try\"") >&5
4754   (eval $ac_try) 2>&5
4755   ac_status=$?
4756   echo "$as_me:4756: \$? = $ac_status" >&5
4757   (exit $ac_status); }; }; then
4758   :
4759 else
4760   echo "$as_me: failed program was:" >&5
4761 cat conftest.$ac_ext >&5
4762 cf_have_incdir=yes
4763 fi
4764 rm -f conftest.$ac_objext conftest.$ac_ext
4765                           CPPFLAGS=$cf_save_CPPFLAGS
4766                         fi
4767                   fi
4768                 fi
4769
4770                 if test "$cf_have_incdir" = no ; then
4771                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4772
4773 echo "${as_me:-configure}:4773: testing adding $cf_add_incdir to include-path ..." 1>&5
4774
4775                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4776
4777                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4778                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4779                   cf_add_incdir="$cf_top_incdir"
4780                 else
4781                   break
4782                 fi
4783           fi
4784         done
4785   done
4786 fi
4787
4788                 for cf_header in \
4789                         ncurses.h \
4790                         curses.h
4791                 do
4792
4793         cat >conftest.$ac_ext <<_ACEOF
4794 #line 4794 "configure"
4795 #include "confdefs.h"
4796
4797 #include <$cf_header>
4798 int
4799 main ()
4800 {
4801
4802 #ifdef NCURSES_VERSION
4803
4804 printf("%s\n", NCURSES_VERSION);
4805 #else
4806 #ifdef __NCURSES_H
4807 printf("old\n");
4808 #else
4809         make an error
4810 #endif
4811 #endif
4812
4813   ;
4814   return 0;
4815 }
4816 _ACEOF
4817 rm -f conftest.$ac_objext
4818 if { (eval echo "$as_me:4818: \"$ac_compile\"") >&5
4819   (eval $ac_compile) 2>&5
4820   ac_status=$?
4821   echo "$as_me:4821: \$? = $ac_status" >&5
4822   (exit $ac_status); } &&
4823          { ac_try='test -s conftest.$ac_objext'
4824   { (eval echo "$as_me:4824: \"$ac_try\"") >&5
4825   (eval $ac_try) 2>&5
4826   ac_status=$?
4827   echo "$as_me:4827: \$? = $ac_status" >&5
4828   (exit $ac_status); }; }; then
4829   cf_cv_ncurses_h2=$cf_header
4830
4831 else
4832   echo "$as_me: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
4834 cf_cv_ncurses_h2=no
4835 fi
4836 rm -f conftest.$ac_objext conftest.$ac_ext
4837
4838                         if test "$cf_cv_ncurses_h2" != no ; then
4839                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4840                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
4841                                 break
4842                         fi
4843                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
4844                 done
4845                 CPPFLAGS="$cf_save2_CPPFLAGS"
4846                 test "$cf_cv_ncurses_h2" != no && break
4847         done
4848         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4848: error: not found" >&5
4849 echo "$as_me: error: not found" >&2;}
4850    { (exit 1); exit 1; }; }
4851
4852 fi
4853 echo "$as_me:4853: result: $cf_cv_ncurses_h2" >&5
4854 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4855
4856         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4857         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4858         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4859                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4860         fi
4861
4862 if test -n "$cf_1st_incdir" ; then
4863   for cf_add_incdir in $cf_1st_incdir
4864   do
4865         while test $cf_add_incdir != /usr/include
4866         do
4867           if test -d $cf_add_incdir
4868           then
4869                 cf_have_incdir=no
4870                 if test -n "$CFLAGS$CPPFLAGS" ; then
4871                   # a loop is needed to ensure we can add subdirs of existing dirs
4872                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4873                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4874                           cf_have_incdir=yes; break
4875                         fi
4876                   done
4877                 fi
4878
4879                 if test "$cf_have_incdir" = no ; then
4880                   if test "$cf_add_incdir" = /usr/local/include ; then
4881                         if test "$GCC" = yes
4882                         then
4883                           cf_save_CPPFLAGS=$CPPFLAGS
4884                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4885                           cat >conftest.$ac_ext <<_ACEOF
4886 #line 4886 "configure"
4887 #include "confdefs.h"
4888 #include <stdio.h>
4889 int
4890 main ()
4891 {
4892 printf("Hello")
4893   ;
4894   return 0;
4895 }
4896 _ACEOF
4897 rm -f conftest.$ac_objext
4898 if { (eval echo "$as_me:4898: \"$ac_compile\"") >&5
4899   (eval $ac_compile) 2>&5
4900   ac_status=$?
4901   echo "$as_me:4901: \$? = $ac_status" >&5
4902   (exit $ac_status); } &&
4903          { ac_try='test -s conftest.$ac_objext'
4904   { (eval echo "$as_me:4904: \"$ac_try\"") >&5
4905   (eval $ac_try) 2>&5
4906   ac_status=$?
4907   echo "$as_me:4907: \$? = $ac_status" >&5
4908   (exit $ac_status); }; }; then
4909   :
4910 else
4911   echo "$as_me: failed program was:" >&5
4912 cat conftest.$ac_ext >&5
4913 cf_have_incdir=yes
4914 fi
4915 rm -f conftest.$ac_objext conftest.$ac_ext
4916                           CPPFLAGS=$cf_save_CPPFLAGS
4917                         fi
4918                   fi
4919                 fi
4920
4921                 if test "$cf_have_incdir" = no ; then
4922                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4923
4924 echo "${as_me:-configure}:4924: testing adding $cf_add_incdir to include-path ..." 1>&5
4925
4926                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4927
4928                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4929                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4930                   cf_add_incdir="$cf_top_incdir"
4931                 else
4932                   break
4933                 fi
4934           fi
4935         done
4936   done
4937 fi
4938
4939 fi
4940
4941 # Set definitions to allow ifdef'ing for ncurses.h
4942
4943 case $cf_cv_ncurses_header in # (vi
4944 *ncurses.h)
4945
4946 cat >>confdefs.h <<\EOF
4947 #define HAVE_NCURSES_H 1
4948 EOF
4949
4950         ;;
4951 esac
4952
4953 case $cf_cv_ncurses_header in # (vi
4954 ncurses/curses.h|ncurses/ncurses.h)
4955
4956 cat >>confdefs.h <<\EOF
4957 #define HAVE_NCURSES_NCURSES_H 1
4958 EOF
4959
4960         ;;
4961 ncursesw/curses.h|ncursesw/ncurses.h)
4962
4963 cat >>confdefs.h <<\EOF
4964 #define HAVE_NCURSESW_NCURSES_H 1
4965 EOF
4966
4967         ;;
4968 esac
4969
4970 echo "$as_me:4970: checking for terminfo header" >&5
4971 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4972 if test "${cf_cv_term_header+set}" = set; then
4973   echo $ECHO_N "(cached) $ECHO_C" >&6
4974 else
4975
4976 case ${cf_cv_ncurses_header} in #(vi
4977 */ncurses.h|*/ncursesw.h) #(vi
4978         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4979         ;;
4980 *)
4981         cf_term_header=term.h
4982         ;;
4983 esac
4984
4985 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4986 do
4987 cat >conftest.$ac_ext <<_ACEOF
4988 #line 4988 "configure"
4989 #include "confdefs.h"
4990 #include <stdio.h>
4991 #include <${cf_cv_ncurses_header:-curses.h}>
4992 #include <$cf_test>
4993
4994 int
4995 main ()
4996 {
4997 int x = auto_left_margin
4998   ;
4999   return 0;
5000 }
5001 _ACEOF
5002 rm -f conftest.$ac_objext
5003 if { (eval echo "$as_me:5003: \"$ac_compile\"") >&5
5004   (eval $ac_compile) 2>&5
5005   ac_status=$?
5006   echo "$as_me:5006: \$? = $ac_status" >&5
5007   (exit $ac_status); } &&
5008          { ac_try='test -s conftest.$ac_objext'
5009   { (eval echo "$as_me:5009: \"$ac_try\"") >&5
5010   (eval $ac_try) 2>&5
5011   ac_status=$?
5012   echo "$as_me:5012: \$? = $ac_status" >&5
5013   (exit $ac_status); }; }; then
5014
5015         cf_cv_term_header="$cf_test"
5016 else
5017   echo "$as_me: failed program was:" >&5
5018 cat conftest.$ac_ext >&5
5019
5020         cf_cv_term_header=unknown
5021
5022 fi
5023 rm -f conftest.$ac_objext conftest.$ac_ext
5024         test "$cf_cv_term_header" != unknown && break
5025 done
5026
5027 fi
5028 echo "$as_me:5028: result: $cf_cv_term_header" >&5
5029 echo "${ECHO_T}$cf_cv_term_header" >&6
5030
5031 # Set definitions to allow ifdef'ing to accommodate subdirectories
5032
5033 case $cf_cv_term_header in # (vi
5034 *term.h)
5035
5036 cat >>confdefs.h <<\EOF
5037 #define HAVE_TERM_H 1
5038 EOF
5039
5040         ;;
5041 esac
5042
5043 case $cf_cv_term_header in # (vi
5044 ncurses/term.h) #(vi
5045
5046 cat >>confdefs.h <<\EOF
5047 #define HAVE_NCURSES_TERM_H 1
5048 EOF
5049
5050         ;;
5051 ncursesw/term.h)
5052
5053 cat >>confdefs.h <<\EOF
5054 #define HAVE_NCURSESW_TERM_H 1
5055 EOF
5056
5057         ;;
5058 esac
5059
5060 # some applications need this, but should check for NCURSES_VERSION
5061
5062 cat >>confdefs.h <<\EOF
5063 #define NCURSES 1
5064 EOF
5065
5066 echo "$as_me:5066: checking for ncurses version" >&5
5067 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5068 if test "${cf_cv_ncurses_version+set}" = set; then
5069   echo $ECHO_N "(cached) $ECHO_C" >&6
5070 else
5071
5072         cf_cv_ncurses_version=no
5073         cf_tempfile=out$$
5074         rm -f $cf_tempfile
5075         if test "$cross_compiling" = yes; then
5076
5077         # This will not work if the preprocessor splits the line after the
5078         # Autoconf token.  The 'unproto' program does that.
5079         cat > conftest.$ac_ext <<EOF
5080 #include <${cf_cv_ncurses_header:-curses.h}>
5081 #undef Autoconf
5082 #ifdef NCURSES_VERSION
5083 Autoconf NCURSES_VERSION
5084 #else
5085 #ifdef __NCURSES_H
5086 Autoconf "old"
5087 #endif
5088 ;
5089 #endif
5090 EOF
5091         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5092         { (eval echo "$as_me:5092: \"$cf_try\"") >&5
5093   (eval $cf_try) 2>&5
5094   ac_status=$?
5095   echo "$as_me:5095: \$? = $ac_status" >&5
5096   (exit $ac_status); }
5097         if test -f conftest.out ; then
5098                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5099                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5100                 rm -f conftest.out
5101         fi
5102
5103 else
5104   cat >conftest.$ac_ext <<_ACEOF
5105 #line 5105 "configure"
5106 #include "confdefs.h"
5107
5108 #include <${cf_cv_ncurses_header:-curses.h}>
5109 #include <stdio.h>
5110 int main()
5111 {
5112         FILE *fp = fopen("$cf_tempfile", "w");
5113 #ifdef NCURSES_VERSION
5114 # ifdef NCURSES_VERSION_PATCH
5115         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5116 # else
5117         fprintf(fp, "%s\n", NCURSES_VERSION);
5118 # endif
5119 #else
5120 # ifdef __NCURSES_H
5121         fprintf(fp, "old\n");
5122 # else
5123         make an error
5124 # endif
5125 #endif
5126         ${cf_cv_main_return:-return}(0);
5127 }
5128 _ACEOF
5129 rm -f conftest$ac_exeext
5130 if { (eval echo "$as_me:5130: \"$ac_link\"") >&5
5131   (eval $ac_link) 2>&5
5132   ac_status=$?
5133   echo "$as_me:5133: \$? = $ac_status" >&5
5134   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5135   { (eval echo "$as_me:5135: \"$ac_try\"") >&5
5136   (eval $ac_try) 2>&5
5137   ac_status=$?
5138   echo "$as_me:5138: \$? = $ac_status" >&5
5139   (exit $ac_status); }; }; then
5140
5141         cf_cv_ncurses_version=`cat $cf_tempfile`
5142 else
5143   echo "$as_me: program exited with status $ac_status" >&5
5144 echo "$as_me: failed program was:" >&5
5145 cat conftest.$ac_ext >&5
5146 fi
5147 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5148 fi
5149         rm -f $cf_tempfile
5150
5151 fi
5152 echo "$as_me:5152: result: $cf_cv_ncurses_version" >&5
5153 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5154 test "$cf_cv_ncurses_version" = no ||
5155 cat >>confdefs.h <<\EOF
5156 #define NCURSES 1
5157 EOF
5158
5159 cf_nculib_root=ncursesw
5160         # This works, except for the special case where we find gpm, but
5161         # ncurses is in a nonstandard location via $LIBS, and we really want
5162         # to link gpm.
5163 cf_ncurses_LIBS=""
5164 cf_ncurses_SAVE="$LIBS"
5165 echo "$as_me:5165: checking for Gpm_Open in -lgpm" >&5
5166 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5167 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170   ac_check_lib_save_LIBS=$LIBS
5171 LIBS="-lgpm  $LIBS"
5172 cat >conftest.$ac_ext <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175
5176 /* Override any gcc2 internal prototype to avoid an error.  */
5177 #ifdef __cplusplus
5178 extern "C"
5179 #endif
5180 /* We use char because int might match the return type of a gcc2
5181    builtin and then its argument prototype would still apply.  */
5182 char Gpm_Open ();
5183 int
5184 main ()
5185 {
5186 Gpm_Open ();
5187   ;
5188   return 0;
5189 }
5190 _ACEOF
5191 rm -f conftest.$ac_objext conftest$ac_exeext
5192 if { (eval echo "$as_me:5192: \"$ac_link\"") >&5
5193   (eval $ac_link) 2>&5
5194   ac_status=$?
5195   echo "$as_me:5195: \$? = $ac_status" >&5
5196   (exit $ac_status); } &&
5197          { ac_try='test -s conftest$ac_exeext'
5198   { (eval echo "$as_me:5198: \"$ac_try\"") >&5
5199   (eval $ac_try) 2>&5
5200   ac_status=$?
5201   echo "$as_me:5201: \$? = $ac_status" >&5
5202   (exit $ac_status); }; }; then
5203   ac_cv_lib_gpm_Gpm_Open=yes
5204 else
5205   echo "$as_me: failed program was:" >&5
5206 cat conftest.$ac_ext >&5
5207 ac_cv_lib_gpm_Gpm_Open=no
5208 fi
5209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5210 LIBS=$ac_check_lib_save_LIBS
5211 fi
5212 echo "$as_me:5212: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5213 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5214 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5215   echo "$as_me:5215: checking for initscr in -lgpm" >&5
5216 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5217 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5218   echo $ECHO_N "(cached) $ECHO_C" >&6
5219 else
5220   ac_check_lib_save_LIBS=$LIBS
5221 LIBS="-lgpm  $LIBS"
5222 cat >conftest.$ac_ext <<_ACEOF
5223 #line 5223 "configure"
5224 #include "confdefs.h"
5225
5226 /* Override any gcc2 internal prototype to avoid an error.  */
5227 #ifdef __cplusplus
5228 extern "C"
5229 #endif
5230 /* We use char because int might match the return type of a gcc2
5231    builtin and then its argument prototype would still apply.  */
5232 char initscr ();
5233 int
5234 main ()
5235 {
5236 initscr ();
5237   ;
5238   return 0;
5239 }
5240 _ACEOF
5241 rm -f conftest.$ac_objext conftest$ac_exeext
5242 if { (eval echo "$as_me:5242: \"$ac_link\"") >&5
5243   (eval $ac_link) 2>&5
5244   ac_status=$?
5245   echo "$as_me:5245: \$? = $ac_status" >&5
5246   (exit $ac_status); } &&
5247          { ac_try='test -s conftest$ac_exeext'
5248   { (eval echo "$as_me:5248: \"$ac_try\"") >&5
5249   (eval $ac_try) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); }; }; then
5253   ac_cv_lib_gpm_initscr=yes
5254 else
5255   echo "$as_me: failed program was:" >&5
5256 cat conftest.$ac_ext >&5
5257 ac_cv_lib_gpm_initscr=no
5258 fi
5259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5260 LIBS=$ac_check_lib_save_LIBS
5261 fi
5262 echo "$as_me:5262: result: $ac_cv_lib_gpm_initscr" >&5
5263 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5264 if test $ac_cv_lib_gpm_initscr = yes; then
5265   LIBS="$cf_ncurses_SAVE"
5266 else
5267   cf_ncurses_LIBS="-lgpm"
5268 fi
5269
5270 fi
5271
5272 case $host_os in #(vi
5273 freebsd*)
5274         # This is only necessary if you are linking against an obsolete
5275         # version of ncurses (but it should do no harm, since it's static).
5276         if test "$cf_nculib_root" = ncurses ; then
5277                 echo "$as_me:5277: checking for tgoto in -lmytinfo" >&5
5278 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5279 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5280   echo $ECHO_N "(cached) $ECHO_C" >&6
5281 else
5282   ac_check_lib_save_LIBS=$LIBS
5283 LIBS="-lmytinfo  $LIBS"
5284 cat >conftest.$ac_ext <<_ACEOF
5285 #line 5285 "configure"
5286 #include "confdefs.h"
5287
5288 /* Override any gcc2 internal prototype to avoid an error.  */
5289 #ifdef __cplusplus
5290 extern "C"
5291 #endif
5292 /* We use char because int might match the return type of a gcc2
5293    builtin and then its argument prototype would still apply.  */
5294 char tgoto ();
5295 int
5296 main ()
5297 {
5298 tgoto ();
5299   ;
5300   return 0;
5301 }
5302 _ACEOF
5303 rm -f conftest.$ac_objext conftest$ac_exeext
5304 if { (eval echo "$as_me:5304: \"$ac_link\"") >&5
5305   (eval $ac_link) 2>&5
5306   ac_status=$?
5307   echo "$as_me:5307: \$? = $ac_status" >&5
5308   (exit $ac_status); } &&
5309          { ac_try='test -s conftest$ac_exeext'
5310   { (eval echo "$as_me:5310: \"$ac_try\"") >&5
5311   (eval $ac_try) 2>&5
5312   ac_status=$?
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); }; }; then
5315   ac_cv_lib_mytinfo_tgoto=yes
5316 else
5317   echo "$as_me: failed program was:" >&5
5318 cat conftest.$ac_ext >&5
5319 ac_cv_lib_mytinfo_tgoto=no
5320 fi
5321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5322 LIBS=$ac_check_lib_save_LIBS
5323 fi
5324 echo "$as_me:5324: result: $ac_cv_lib_mytinfo_tgoto" >&5
5325 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5326 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5327   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5328 fi
5329
5330         fi
5331         ;;
5332 esac
5333
5334 cf_add_libs="$cf_ncurses_LIBS"
5335 # Filter out duplicates - this happens with badly-designed ".pc" files...
5336 for cf_add_1lib in $LIBS
5337 do
5338         for cf_add_2lib in $cf_add_libs
5339         do
5340                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5341                 then
5342                         cf_add_1lib=
5343                         break
5344                 fi
5345         done
5346         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5347 done
5348 LIBS="$cf_add_libs"
5349
5350 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5351 then
5352
5353 cf_add_libs="-l$cf_nculib_root"
5354 # Filter out duplicates - this happens with badly-designed ".pc" files...
5355 for cf_add_1lib in $LIBS
5356 do
5357         for cf_add_2lib in $cf_add_libs
5358         do
5359                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5360                 then
5361                         cf_add_1lib=
5362                         break
5363                 fi
5364         done
5365         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5366 done
5367 LIBS="$cf_add_libs"
5368
5369 else
5370
5371         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5372         cf_libdir=""
5373         echo "$as_me:5373: checking for initscr" >&5
5374 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5375 if test "${ac_cv_func_initscr+set}" = set; then
5376   echo $ECHO_N "(cached) $ECHO_C" >&6
5377 else
5378   cat >conftest.$ac_ext <<_ACEOF
5379 #line 5379 "configure"
5380 #include "confdefs.h"
5381 /* System header to define __stub macros and hopefully few prototypes,
5382     which can conflict with char initscr (); below.  */
5383 #include <assert.h>
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 #ifdef __cplusplus
5386 extern "C"
5387 #endif
5388 /* We use char because int might match the return type of a gcc2
5389    builtin and then its argument prototype would still apply.  */
5390 char initscr ();
5391 char (*f) ();
5392
5393 int
5394 main ()
5395 {
5396 /* The GNU C library defines this for functions which it implements
5397     to always fail with ENOSYS.  Some functions are actually named
5398     something starting with __ and the normal name is an alias.  */
5399 #if defined (__stub_initscr) || defined (__stub___initscr)
5400 choke me
5401 #else
5402 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5403 #endif
5404
5405   ;
5406   return 0;
5407 }
5408 _ACEOF
5409 rm -f conftest.$ac_objext conftest$ac_exeext
5410 if { (eval echo "$as_me:5410: \"$ac_link\"") >&5
5411   (eval $ac_link) 2>&5
5412   ac_status=$?
5413   echo "$as_me:5413: \$? = $ac_status" >&5
5414   (exit $ac_status); } &&
5415          { ac_try='test -s conftest$ac_exeext'
5416   { (eval echo "$as_me:5416: \"$ac_try\"") >&5
5417   (eval $ac_try) 2>&5
5418   ac_status=$?
5419   echo "$as_me:5419: \$? = $ac_status" >&5
5420   (exit $ac_status); }; }; then
5421   ac_cv_func_initscr=yes
5422 else
5423   echo "$as_me: failed program was:" >&5
5424 cat conftest.$ac_ext >&5
5425 ac_cv_func_initscr=no
5426 fi
5427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5428 fi
5429 echo "$as_me:5429: result: $ac_cv_func_initscr" >&5
5430 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5431 if test $ac_cv_func_initscr = yes; then
5432   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5433 else
5434
5435                 cf_save_LIBS="$LIBS"
5436                 echo "$as_me:5436: checking for initscr in -l$cf_nculib_root" >&5
5437 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5438                 LIBS="-l$cf_nculib_root $LIBS"
5439                 cat >conftest.$ac_ext <<_ACEOF
5440 #line 5440 "configure"
5441 #include "confdefs.h"
5442 #include <${cf_cv_ncurses_header:-curses.h}>
5443 int
5444 main ()
5445 {
5446 initscr()
5447   ;
5448   return 0;
5449 }
5450 _ACEOF
5451 rm -f conftest.$ac_objext conftest$ac_exeext
5452 if { (eval echo "$as_me:5452: \"$ac_link\"") >&5
5453   (eval $ac_link) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); } &&
5457          { ac_try='test -s conftest$ac_exeext'
5458   { (eval echo "$as_me:5458: \"$ac_try\"") >&5
5459   (eval $ac_try) 2>&5
5460   ac_status=$?
5461   echo "$as_me:5461: \$? = $ac_status" >&5
5462   (exit $ac_status); }; }; then
5463   echo "$as_me:5463: result: yes" >&5
5464 echo "${ECHO_T}yes" >&6
5465                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5466
5467 else
5468   echo "$as_me: failed program was:" >&5
5469 cat conftest.$ac_ext >&5
5470 echo "$as_me:5470: result: no" >&5
5471 echo "${ECHO_T}no" >&6
5472
5473 cf_search=
5474 cf_library_path_list=""
5475 if test -n "${LDFLAGS}${LIBS}" ; then
5476         for cf_library_path in $LDFLAGS $LIBS
5477         do
5478                 case $cf_library_path in #(vi
5479                 -L*)
5480                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5481
5482 test "x$cf_library_path" != "xNONE" && \
5483 test -d "$cf_library_path" && \
5484  {
5485         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5486         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5487         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5488         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5489         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5490         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"
5491 }
5492
5493                         cf_library_path_list="$cf_library_path_list $cf_search"
5494                         ;;
5495                 esac
5496         done
5497 fi
5498
5499 cf_search=
5500
5501 test "x/usr" != "x$prefix" && \
5502 test -d "/usr" && \
5503 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
5504         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5505         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5506         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5507         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5508         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5509         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5510 }
5511
5512 test "x$prefix" != "xNONE" && \
5513 test -d "$prefix" && \
5514  {
5515         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5516         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5517         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5518         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5519         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5520         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5521 }
5522
5523 test "x/usr/local" != "x$prefix" && \
5524 test -d "/usr/local" && \
5525 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
5526         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5527         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5528         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5529         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5530         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5531         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5532 }
5533
5534 test "x/opt" != "x$prefix" && \
5535 test -d "/opt" && \
5536 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
5537         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5538         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5539         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5540         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5541         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5542         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5543 }
5544
5545 test "x$HOME" != "x$prefix" && \
5546 test -d "$HOME" && \
5547 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
5548         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5549         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5550         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5551         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5552         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5553         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5554 }
5555
5556 cf_search="$cf_library_path_list $cf_search"
5557
5558                         for cf_libdir in $cf_search
5559                         do
5560                                 echo "$as_me:5560: checking for -l$cf_nculib_root in $cf_libdir" >&5
5561 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5562                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5563                                 cat >conftest.$ac_ext <<_ACEOF
5564 #line 5564 "configure"
5565 #include "confdefs.h"
5566 #include <${cf_cv_ncurses_header:-curses.h}>
5567 int
5568 main ()
5569 {
5570 initscr()
5571   ;
5572   return 0;
5573 }
5574 _ACEOF
5575 rm -f conftest.$ac_objext conftest$ac_exeext
5576 if { (eval echo "$as_me:5576: \"$ac_link\"") >&5
5577   (eval $ac_link) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); } &&
5581          { ac_try='test -s conftest$ac_exeext'
5582   { (eval echo "$as_me:5582: \"$ac_try\"") >&5
5583   (eval $ac_try) 2>&5
5584   ac_status=$?
5585   echo "$as_me:5585: \$? = $ac_status" >&5
5586   (exit $ac_status); }; }; then
5587   echo "$as_me:5587: result: yes" >&5
5588 echo "${ECHO_T}yes" >&6
5589                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5590                                          break
5591 else
5592   echo "$as_me: failed program was:" >&5
5593 cat conftest.$ac_ext >&5
5594 echo "$as_me:5594: result: no" >&5
5595 echo "${ECHO_T}no" >&6
5596                                          LIBS="$cf_save_LIBS"
5597 fi
5598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5599                         done
5600
5601 fi
5602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5603
5604 fi
5605
5606 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5607
5608 if test $cf_found_library = no ; then
5609         { { echo "$as_me:5609: error: Cannot link $cf_nculib_root library" >&5
5610 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5611    { (exit 1); exit 1; }; }
5612 fi
5613
5614 fi
5615
5616 if test -n "$cf_ncurses_LIBS" ; then
5617         echo "$as_me:5617: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5618 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5619         cf_ncurses_SAVE="$LIBS"
5620         for p in $cf_ncurses_LIBS ; do
5621                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5622                 if test "$q" != "$LIBS" ; then
5623                         LIBS="$q"
5624                 fi
5625         done
5626         cat >conftest.$ac_ext <<_ACEOF
5627 #line 5627 "configure"
5628 #include "confdefs.h"
5629 #include <${cf_cv_ncurses_header:-curses.h}>
5630 int
5631 main ()
5632 {
5633 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5634   ;
5635   return 0;
5636 }
5637 _ACEOF
5638 rm -f conftest.$ac_objext conftest$ac_exeext
5639 if { (eval echo "$as_me:5639: \"$ac_link\"") >&5
5640   (eval $ac_link) 2>&5
5641   ac_status=$?
5642   echo "$as_me:5642: \$? = $ac_status" >&5
5643   (exit $ac_status); } &&
5644          { ac_try='test -s conftest$ac_exeext'
5645   { (eval echo "$as_me:5645: \"$ac_try\"") >&5
5646   (eval $ac_try) 2>&5
5647   ac_status=$?
5648   echo "$as_me:5648: \$? = $ac_status" >&5
5649   (exit $ac_status); }; }; then
5650   echo "$as_me:5650: result: yes" >&5
5651 echo "${ECHO_T}yes" >&6
5652 else
5653   echo "$as_me: failed program was:" >&5
5654 cat conftest.$ac_ext >&5
5655 echo "$as_me:5655: result: no" >&5
5656 echo "${ECHO_T}no" >&6
5657                  LIBS="$cf_ncurses_SAVE"
5658 fi
5659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5660 fi
5661
5662 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5663
5664 cat >>confdefs.h <<EOF
5665 #define $cf_nculib_ROOT 1
5666 EOF
5667
5668 fi
5669
5670 else
5671
5672 cf_ncuconfig_root=ncurses
5673
5674 echo "Looking for ${cf_ncuconfig_root}-config"
5675
5676 if test -n "$ac_tool_prefix"; then
5677   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5678   do
5679     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5680 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5681 echo "$as_me:5681: checking for $ac_word" >&5
5682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5683 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5684   echo $ECHO_N "(cached) $ECHO_C" >&6
5685 else
5686   if test -n "$NCURSES_CONFIG"; then
5687   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5688 else
5689   ac_save_IFS=$IFS; IFS=$ac_path_separator
5690 ac_dummy="$PATH"
5691 for ac_dir in $ac_dummy; do
5692   IFS=$ac_save_IFS
5693   test -z "$ac_dir" && ac_dir=.
5694   $as_executable_p "$ac_dir/$ac_word" || continue
5695 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5696 echo "$as_me:5696: found $ac_dir/$ac_word" >&5
5697 break
5698 done
5699
5700 fi
5701 fi
5702 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5703 if test -n "$NCURSES_CONFIG"; then
5704   echo "$as_me:5704: result: $NCURSES_CONFIG" >&5
5705 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5706 else
5707   echo "$as_me:5707: result: no" >&5
5708 echo "${ECHO_T}no" >&6
5709 fi
5710
5711     test -n "$NCURSES_CONFIG" && break
5712   done
5713 fi
5714 if test -z "$NCURSES_CONFIG"; then
5715   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5716   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5717 do
5718   # Extract the first word of "$ac_prog", so it can be a program name with args.
5719 set dummy $ac_prog; ac_word=$2
5720 echo "$as_me:5720: checking for $ac_word" >&5
5721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5722 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5723   echo $ECHO_N "(cached) $ECHO_C" >&6
5724 else
5725   if test -n "$ac_ct_NCURSES_CONFIG"; then
5726   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5727 else
5728   ac_save_IFS=$IFS; IFS=$ac_path_separator
5729 ac_dummy="$PATH"
5730 for ac_dir in $ac_dummy; do
5731   IFS=$ac_save_IFS
5732   test -z "$ac_dir" && ac_dir=.
5733   $as_executable_p "$ac_dir/$ac_word" || continue
5734 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5735 echo "$as_me:5735: found $ac_dir/$ac_word" >&5
5736 break
5737 done
5738
5739 fi
5740 fi
5741 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5742 if test -n "$ac_ct_NCURSES_CONFIG"; then
5743   echo "$as_me:5743: result: $ac_ct_NCURSES_CONFIG" >&5
5744 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5745 else
5746   echo "$as_me:5746: result: no" >&5
5747 echo "${ECHO_T}no" >&6
5748 fi
5749
5750   test -n "$ac_ct_NCURSES_CONFIG" && break
5751 done
5752 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5753
5754   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5755 fi
5756
5757 if test "$NCURSES_CONFIG" != none ; then
5758
5759 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5760
5761 cf_add_libs="`$NCURSES_CONFIG --libs`"
5762 # Filter out duplicates - this happens with badly-designed ".pc" files...
5763 for cf_add_1lib in $LIBS
5764 do
5765         for cf_add_2lib in $cf_add_libs
5766         do
5767                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5768                 then
5769                         cf_add_1lib=
5770                         break
5771                 fi
5772         done
5773         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5774 done
5775 LIBS="$cf_add_libs"
5776
5777 # even with config script, some packages use no-override for curses.h
5778
5779 echo "$as_me:5779: checking if we have identified curses headers" >&5
5780 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5781 if test "${cf_cv_ncurses_header+set}" = set; then
5782   echo $ECHO_N "(cached) $ECHO_C" >&6
5783 else
5784
5785 cf_cv_ncurses_header=none
5786 for cf_header in  \
5787     ncurses/ncurses.h \
5788         ncurses/curses.h \
5789         ncurses.h \
5790         curses.h
5791 do
5792 cat >conftest.$ac_ext <<_ACEOF
5793 #line 5793 "configure"
5794 #include "confdefs.h"
5795 #include <${cf_header}>
5796 int
5797 main ()
5798 {
5799 initscr(); tgoto("?", 0,0)
5800   ;
5801   return 0;
5802 }
5803 _ACEOF
5804 rm -f conftest.$ac_objext
5805 if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5
5806   (eval $ac_compile) 2>&5
5807   ac_status=$?
5808   echo "$as_me:5808: \$? = $ac_status" >&5
5809   (exit $ac_status); } &&
5810          { ac_try='test -s conftest.$ac_objext'
5811   { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5812   (eval $ac_try) 2>&5
5813   ac_status=$?
5814   echo "$as_me:5814: \$? = $ac_status" >&5
5815   (exit $ac_status); }; }; then
5816   cf_cv_ncurses_header=$cf_header; break
5817 else
5818   echo "$as_me: failed program was:" >&5
5819 cat conftest.$ac_ext >&5
5820 fi
5821 rm -f conftest.$ac_objext conftest.$ac_ext
5822 done
5823
5824 fi
5825 echo "$as_me:5825: result: $cf_cv_ncurses_header" >&5
5826 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5827
5828 if test "$cf_cv_ncurses_header" = none ; then
5829         { { echo "$as_me:5829: error: No curses header-files found" >&5
5830 echo "$as_me: error: No curses header-files found" >&2;}
5831    { (exit 1); exit 1; }; }
5832 fi
5833
5834 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5835
5836 for ac_header in $cf_cv_ncurses_header
5837 do
5838 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5839 echo "$as_me:5839: checking for $ac_header" >&5
5840 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5842   echo $ECHO_N "(cached) $ECHO_C" >&6
5843 else
5844   cat >conftest.$ac_ext <<_ACEOF
5845 #line 5845 "configure"
5846 #include "confdefs.h"
5847 #include <$ac_header>
5848 _ACEOF
5849 if { (eval echo "$as_me:5849: \"$ac_cpp conftest.$ac_ext\"") >&5
5850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5851   ac_status=$?
5852   egrep -v '^ *\+' conftest.er1 >conftest.err
5853   rm -f conftest.er1
5854   cat conftest.err >&5
5855   echo "$as_me:5855: \$? = $ac_status" >&5
5856   (exit $ac_status); } >/dev/null; then
5857   if test -s conftest.err; then
5858     ac_cpp_err=$ac_c_preproc_warn_flag
5859   else
5860     ac_cpp_err=
5861   fi
5862 else
5863   ac_cpp_err=yes
5864 fi
5865 if test -z "$ac_cpp_err"; then
5866   eval "$as_ac_Header=yes"
5867 else
5868   echo "$as_me: failed program was:" >&5
5869   cat conftest.$ac_ext >&5
5870   eval "$as_ac_Header=no"
5871 fi
5872 rm -f conftest.err conftest.$ac_ext
5873 fi
5874 echo "$as_me:5874: result: `eval echo '${'$as_ac_Header'}'`" >&5
5875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5876 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5877   cat >>confdefs.h <<EOF
5878 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5879 EOF
5880
5881 fi
5882 done
5883
5884 cat >>confdefs.h <<\EOF
5885 #define NCURSES 1
5886 EOF
5887
5888 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5889
5890 cat >>confdefs.h <<EOF
5891 #define $cf_nculib_ROOT 1
5892 EOF
5893
5894 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5895
5896 else
5897
5898 cf_ncuhdr_root=ncurses
5899
5900 test -n "$cf_cv_curses_dir" && \
5901 test "$cf_cv_curses_dir" != "no" && { \
5902
5903 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5904   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5905   do
5906         while test $cf_add_incdir != /usr/include
5907         do
5908           if test -d $cf_add_incdir
5909           then
5910                 cf_have_incdir=no
5911                 if test -n "$CFLAGS$CPPFLAGS" ; then
5912                   # a loop is needed to ensure we can add subdirs of existing dirs
5913                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5914                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5915                           cf_have_incdir=yes; break
5916                         fi
5917                   done
5918                 fi
5919
5920                 if test "$cf_have_incdir" = no ; then
5921                   if test "$cf_add_incdir" = /usr/local/include ; then
5922                         if test "$GCC" = yes
5923                         then
5924                           cf_save_CPPFLAGS=$CPPFLAGS
5925                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5926                           cat >conftest.$ac_ext <<_ACEOF
5927 #line 5927 "configure"
5928 #include "confdefs.h"
5929 #include <stdio.h>
5930 int
5931 main ()
5932 {
5933 printf("Hello")
5934   ;
5935   return 0;
5936 }
5937 _ACEOF
5938 rm -f conftest.$ac_objext
5939 if { (eval echo "$as_me:5939: \"$ac_compile\"") >&5
5940   (eval $ac_compile) 2>&5
5941   ac_status=$?
5942   echo "$as_me:5942: \$? = $ac_status" >&5
5943   (exit $ac_status); } &&
5944          { ac_try='test -s conftest.$ac_objext'
5945   { (eval echo "$as_me:5945: \"$ac_try\"") >&5
5946   (eval $ac_try) 2>&5
5947   ac_status=$?
5948   echo "$as_me:5948: \$? = $ac_status" >&5
5949   (exit $ac_status); }; }; then
5950   :
5951 else
5952   echo "$as_me: failed program was:" >&5
5953 cat conftest.$ac_ext >&5
5954 cf_have_incdir=yes
5955 fi
5956 rm -f conftest.$ac_objext conftest.$ac_ext
5957                           CPPFLAGS=$cf_save_CPPFLAGS
5958                         fi
5959                   fi
5960                 fi
5961
5962                 if test "$cf_have_incdir" = no ; then
5963                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5964
5965 echo "${as_me:-configure}:5965: testing adding $cf_add_incdir to include-path ..." 1>&5
5966
5967                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5968
5969                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5970                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5971                   cf_add_incdir="$cf_top_incdir"
5972                 else
5973                   break
5974                 fi
5975           fi
5976         done
5977   done
5978 fi
5979
5980 }
5981
5982 echo "$as_me:5982: checking for $cf_ncuhdr_root header in include-path" >&5
5983 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5984 if test "${cf_cv_ncurses_h+set}" = set; then
5985   echo $ECHO_N "(cached) $ECHO_C" >&6
5986 else
5987
5988         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5989         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5990         for cf_header in $cf_header_list
5991         do
5992
5993         cat >conftest.$ac_ext <<_ACEOF
5994 #line 5994 "configure"
5995 #include "confdefs.h"
5996
5997 #include <$cf_header>
5998 int
5999 main ()
6000 {
6001
6002 #ifdef NCURSES_VERSION
6003
6004 printf("%s\n", NCURSES_VERSION);
6005 #else
6006 #ifdef __NCURSES_H
6007 printf("old\n");
6008 #else
6009         make an error
6010 #endif
6011 #endif
6012
6013   ;
6014   return 0;
6015 }
6016 _ACEOF
6017 rm -f conftest.$ac_objext
6018 if { (eval echo "$as_me:6018: \"$ac_compile\"") >&5
6019   (eval $ac_compile) 2>&5
6020   ac_status=$?
6021   echo "$as_me:6021: \$? = $ac_status" >&5
6022   (exit $ac_status); } &&
6023          { ac_try='test -s conftest.$ac_objext'
6024   { (eval echo "$as_me:6024: \"$ac_try\"") >&5
6025   (eval $ac_try) 2>&5
6026   ac_status=$?
6027   echo "$as_me:6027: \$? = $ac_status" >&5
6028   (exit $ac_status); }; }; then
6029   cf_cv_ncurses_h=$cf_header
6030
6031 else
6032   echo "$as_me: failed program was:" >&5
6033 cat conftest.$ac_ext >&5
6034 cf_cv_ncurses_h=no
6035 fi
6036 rm -f conftest.$ac_objext conftest.$ac_ext
6037
6038                 test "$cf_cv_ncurses_h" != no && break
6039         done
6040
6041 fi
6042 echo "$as_me:6042: result: $cf_cv_ncurses_h" >&5
6043 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6044
6045 if test "$cf_cv_ncurses_h" != no ; then
6046         cf_cv_ncurses_header=$cf_cv_ncurses_h
6047 else
6048
6049 echo "$as_me:6049: checking for $cf_ncuhdr_root include-path" >&5
6050 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6051 if test "${cf_cv_ncurses_h2+set}" = set; then
6052   echo $ECHO_N "(cached) $ECHO_C" >&6
6053 else
6054
6055         test -n "$verbose" && echo
6056
6057 cf_search=
6058
6059 # collect the current set of include-directories from compiler flags
6060 cf_header_path_list=""
6061 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6062         for cf_header_path in $CPPFLAGS $CFLAGS
6063         do
6064                 case $cf_header_path in #(vi
6065                 -I*)
6066                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6067
6068 test "x$cf_header_path" != "xNONE" && \
6069 test -d "$cf_header_path" && \
6070  {
6071         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6072         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6073         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6074         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6075         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6076         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"
6077 }
6078
6079                         cf_header_path_list="$cf_header_path_list $cf_search"
6080                         ;;
6081                 esac
6082         done
6083 fi
6084
6085 # add the variations for the package we are looking for
6086
6087 cf_search=
6088
6089 test "x/usr" != "x$prefix" && \
6090 test -d "/usr" && \
6091 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
6092         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6093         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6094         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6095         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6096         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6097         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6098 }
6099
6100 test "x$prefix" != "xNONE" && \
6101 test -d "$prefix" && \
6102  {
6103         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6104         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6105         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6106         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6107         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6108         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6109 }
6110
6111 test "x/usr/local" != "x$prefix" && \
6112 test -d "/usr/local" && \
6113 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
6114         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6115         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6116         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6117         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6118         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6119         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6120 }
6121
6122 test "x/opt" != "x$prefix" && \
6123 test -d "/opt" && \
6124 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
6125         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6126         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6127         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6128         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6129         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6130         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6131 }
6132
6133 test "x$HOME" != "x$prefix" && \
6134 test -d "$HOME" && \
6135 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
6136         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6137         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6138         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6139         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6140         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6141         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6142 }
6143
6144 test "$includedir" != NONE && \
6145 test "$includedir" != "/usr/include" && \
6146 test -d "$includedir" && {
6147         test -d $includedir &&    cf_search="$cf_search $includedir"
6148         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6149 }
6150
6151 test "$oldincludedir" != NONE && \
6152 test "$oldincludedir" != "/usr/include" && \
6153 test -d "$oldincludedir" && {
6154         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6155         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6156 }
6157
6158 cf_search="$cf_search $cf_header_path_list"
6159
6160         test -n "$verbose" && echo search path $cf_search
6161         cf_save2_CPPFLAGS="$CPPFLAGS"
6162         for cf_incdir in $cf_search
6163         do
6164
6165 if test -n "$cf_incdir" ; then
6166   for cf_add_incdir in $cf_incdir
6167   do
6168         while test $cf_add_incdir != /usr/include
6169         do
6170           if test -d $cf_add_incdir
6171           then
6172                 cf_have_incdir=no
6173                 if test -n "$CFLAGS$CPPFLAGS" ; then
6174                   # a loop is needed to ensure we can add subdirs of existing dirs
6175                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6176                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6177                           cf_have_incdir=yes; break
6178                         fi
6179                   done
6180                 fi
6181
6182                 if test "$cf_have_incdir" = no ; then
6183                   if test "$cf_add_incdir" = /usr/local/include ; then
6184                         if test "$GCC" = yes
6185                         then
6186                           cf_save_CPPFLAGS=$CPPFLAGS
6187                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6188                           cat >conftest.$ac_ext <<_ACEOF
6189 #line 6189 "configure"
6190 #include "confdefs.h"
6191 #include <stdio.h>
6192 int
6193 main ()
6194 {
6195 printf("Hello")
6196   ;
6197   return 0;
6198 }
6199 _ACEOF
6200 rm -f conftest.$ac_objext
6201 if { (eval echo "$as_me:6201: \"$ac_compile\"") >&5
6202   (eval $ac_compile) 2>&5
6203   ac_status=$?
6204   echo "$as_me:6204: \$? = $ac_status" >&5
6205   (exit $ac_status); } &&
6206          { ac_try='test -s conftest.$ac_objext'
6207   { (eval echo "$as_me:6207: \"$ac_try\"") >&5
6208   (eval $ac_try) 2>&5
6209   ac_status=$?
6210   echo "$as_me:6210: \$? = $ac_status" >&5
6211   (exit $ac_status); }; }; then
6212   :
6213 else
6214   echo "$as_me: failed program was:" >&5
6215 cat conftest.$ac_ext >&5
6216 cf_have_incdir=yes
6217 fi
6218 rm -f conftest.$ac_objext conftest.$ac_ext
6219                           CPPFLAGS=$cf_save_CPPFLAGS
6220                         fi
6221                   fi
6222                 fi
6223
6224                 if test "$cf_have_incdir" = no ; then
6225                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6226
6227 echo "${as_me:-configure}:6227: testing adding $cf_add_incdir to include-path ..." 1>&5
6228
6229                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6230
6231                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6232                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6233                   cf_add_incdir="$cf_top_incdir"
6234                 else
6235                   break
6236                 fi
6237           fi
6238         done
6239   done
6240 fi
6241
6242                 for cf_header in \
6243                         ncurses.h \
6244                         curses.h
6245                 do
6246
6247         cat >conftest.$ac_ext <<_ACEOF
6248 #line 6248 "configure"
6249 #include "confdefs.h"
6250
6251 #include <$cf_header>
6252 int
6253 main ()
6254 {
6255
6256 #ifdef NCURSES_VERSION
6257
6258 printf("%s\n", NCURSES_VERSION);
6259 #else
6260 #ifdef __NCURSES_H
6261 printf("old\n");
6262 #else
6263         make an error
6264 #endif
6265 #endif
6266
6267   ;
6268   return 0;
6269 }
6270 _ACEOF
6271 rm -f conftest.$ac_objext
6272 if { (eval echo "$as_me:6272: \"$ac_compile\"") >&5
6273   (eval $ac_compile) 2>&5
6274   ac_status=$?
6275   echo "$as_me:6275: \$? = $ac_status" >&5
6276   (exit $ac_status); } &&
6277          { ac_try='test -s conftest.$ac_objext'
6278   { (eval echo "$as_me:6278: \"$ac_try\"") >&5
6279   (eval $ac_try) 2>&5
6280   ac_status=$?
6281   echo "$as_me:6281: \$? = $ac_status" >&5
6282   (exit $ac_status); }; }; then
6283   cf_cv_ncurses_h2=$cf_header
6284
6285 else
6286   echo "$as_me: failed program was:" >&5
6287 cat conftest.$ac_ext >&5
6288 cf_cv_ncurses_h2=no
6289 fi
6290 rm -f conftest.$ac_objext conftest.$ac_ext
6291
6292                         if test "$cf_cv_ncurses_h2" != no ; then
6293                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6294                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6295                                 break
6296                         fi
6297                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6298                 done
6299                 CPPFLAGS="$cf_save2_CPPFLAGS"
6300                 test "$cf_cv_ncurses_h2" != no && break
6301         done
6302         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6302: error: not found" >&5
6303 echo "$as_me: error: not found" >&2;}
6304    { (exit 1); exit 1; }; }
6305
6306 fi
6307 echo "$as_me:6307: result: $cf_cv_ncurses_h2" >&5
6308 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6309
6310         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6311         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6312         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6313                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6314         fi
6315
6316 if test -n "$cf_1st_incdir" ; then
6317   for cf_add_incdir in $cf_1st_incdir
6318   do
6319         while test $cf_add_incdir != /usr/include
6320         do
6321           if test -d $cf_add_incdir
6322           then
6323                 cf_have_incdir=no
6324                 if test -n "$CFLAGS$CPPFLAGS" ; then
6325                   # a loop is needed to ensure we can add subdirs of existing dirs
6326                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6327                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6328                           cf_have_incdir=yes; break
6329                         fi
6330                   done
6331                 fi
6332
6333                 if test "$cf_have_incdir" = no ; then
6334                   if test "$cf_add_incdir" = /usr/local/include ; then
6335                         if test "$GCC" = yes
6336                         then
6337                           cf_save_CPPFLAGS=$CPPFLAGS
6338                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6339                           cat >conftest.$ac_ext <<_ACEOF
6340 #line 6340 "configure"
6341 #include "confdefs.h"
6342 #include <stdio.h>
6343 int
6344 main ()
6345 {
6346 printf("Hello")
6347   ;
6348   return 0;
6349 }
6350 _ACEOF
6351 rm -f conftest.$ac_objext
6352 if { (eval echo "$as_me:6352: \"$ac_compile\"") >&5
6353   (eval $ac_compile) 2>&5
6354   ac_status=$?
6355   echo "$as_me:6355: \$? = $ac_status" >&5
6356   (exit $ac_status); } &&
6357          { ac_try='test -s conftest.$ac_objext'
6358   { (eval echo "$as_me:6358: \"$ac_try\"") >&5
6359   (eval $ac_try) 2>&5
6360   ac_status=$?
6361   echo "$as_me:6361: \$? = $ac_status" >&5
6362   (exit $ac_status); }; }; then
6363   :
6364 else
6365   echo "$as_me: failed program was:" >&5
6366 cat conftest.$ac_ext >&5
6367 cf_have_incdir=yes
6368 fi
6369 rm -f conftest.$ac_objext conftest.$ac_ext
6370                           CPPFLAGS=$cf_save_CPPFLAGS
6371                         fi
6372                   fi
6373                 fi
6374
6375                 if test "$cf_have_incdir" = no ; then
6376                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6377
6378 echo "${as_me:-configure}:6378: testing adding $cf_add_incdir to include-path ..." 1>&5
6379
6380                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6381
6382                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6383                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6384                   cf_add_incdir="$cf_top_incdir"
6385                 else
6386                   break
6387                 fi
6388           fi
6389         done
6390   done
6391 fi
6392
6393 fi
6394
6395 # Set definitions to allow ifdef'ing for ncurses.h
6396
6397 case $cf_cv_ncurses_header in # (vi
6398 *ncurses.h)
6399
6400 cat >>confdefs.h <<\EOF
6401 #define HAVE_NCURSES_H 1
6402 EOF
6403
6404         ;;
6405 esac
6406
6407 case $cf_cv_ncurses_header in # (vi
6408 ncurses/curses.h|ncurses/ncurses.h)
6409
6410 cat >>confdefs.h <<\EOF
6411 #define HAVE_NCURSES_NCURSES_H 1
6412 EOF
6413
6414         ;;
6415 ncursesw/curses.h|ncursesw/ncurses.h)
6416
6417 cat >>confdefs.h <<\EOF
6418 #define HAVE_NCURSESW_NCURSES_H 1
6419 EOF
6420
6421         ;;
6422 esac
6423
6424 echo "$as_me:6424: checking for terminfo header" >&5
6425 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6426 if test "${cf_cv_term_header+set}" = set; then
6427   echo $ECHO_N "(cached) $ECHO_C" >&6
6428 else
6429
6430 case ${cf_cv_ncurses_header} in #(vi
6431 */ncurses.h|*/ncursesw.h) #(vi
6432         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6433         ;;
6434 *)
6435         cf_term_header=term.h
6436         ;;
6437 esac
6438
6439 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6440 do
6441 cat >conftest.$ac_ext <<_ACEOF
6442 #line 6442 "configure"
6443 #include "confdefs.h"
6444 #include <stdio.h>
6445 #include <${cf_cv_ncurses_header:-curses.h}>
6446 #include <$cf_test>
6447
6448 int
6449 main ()
6450 {
6451 int x = auto_left_margin
6452   ;
6453   return 0;
6454 }
6455 _ACEOF
6456 rm -f conftest.$ac_objext
6457 if { (eval echo "$as_me:6457: \"$ac_compile\"") >&5
6458   (eval $ac_compile) 2>&5
6459   ac_status=$?
6460   echo "$as_me:6460: \$? = $ac_status" >&5
6461   (exit $ac_status); } &&
6462          { ac_try='test -s conftest.$ac_objext'
6463   { (eval echo "$as_me:6463: \"$ac_try\"") >&5
6464   (eval $ac_try) 2>&5
6465   ac_status=$?
6466   echo "$as_me:6466: \$? = $ac_status" >&5
6467   (exit $ac_status); }; }; then
6468
6469         cf_cv_term_header="$cf_test"
6470 else
6471   echo "$as_me: failed program was:" >&5
6472 cat conftest.$ac_ext >&5
6473
6474         cf_cv_term_header=unknown
6475
6476 fi
6477 rm -f conftest.$ac_objext conftest.$ac_ext
6478         test "$cf_cv_term_header" != unknown && break
6479 done
6480
6481 fi
6482 echo "$as_me:6482: result: $cf_cv_term_header" >&5
6483 echo "${ECHO_T}$cf_cv_term_header" >&6
6484
6485 # Set definitions to allow ifdef'ing to accommodate subdirectories
6486
6487 case $cf_cv_term_header in # (vi
6488 *term.h)
6489
6490 cat >>confdefs.h <<\EOF
6491 #define HAVE_TERM_H 1
6492 EOF
6493
6494         ;;
6495 esac
6496
6497 case $cf_cv_term_header in # (vi
6498 ncurses/term.h) #(vi
6499
6500 cat >>confdefs.h <<\EOF
6501 #define HAVE_NCURSES_TERM_H 1
6502 EOF
6503
6504         ;;
6505 ncursesw/term.h)
6506
6507 cat >>confdefs.h <<\EOF
6508 #define HAVE_NCURSESW_TERM_H 1
6509 EOF
6510
6511         ;;
6512 esac
6513
6514 # some applications need this, but should check for NCURSES_VERSION
6515
6516 cat >>confdefs.h <<\EOF
6517 #define NCURSES 1
6518 EOF
6519
6520 echo "$as_me:6520: checking for ncurses version" >&5
6521 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6522 if test "${cf_cv_ncurses_version+set}" = set; then
6523   echo $ECHO_N "(cached) $ECHO_C" >&6
6524 else
6525
6526         cf_cv_ncurses_version=no
6527         cf_tempfile=out$$
6528         rm -f $cf_tempfile
6529         if test "$cross_compiling" = yes; then
6530
6531         # This will not work if the preprocessor splits the line after the
6532         # Autoconf token.  The 'unproto' program does that.
6533         cat > conftest.$ac_ext <<EOF
6534 #include <${cf_cv_ncurses_header:-curses.h}>
6535 #undef Autoconf
6536 #ifdef NCURSES_VERSION
6537 Autoconf NCURSES_VERSION
6538 #else
6539 #ifdef __NCURSES_H
6540 Autoconf "old"
6541 #endif
6542 ;
6543 #endif
6544 EOF
6545         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6546         { (eval echo "$as_me:6546: \"$cf_try\"") >&5
6547   (eval $cf_try) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); }
6551         if test -f conftest.out ; then
6552                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6553                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6554                 rm -f conftest.out
6555         fi
6556
6557 else
6558   cat >conftest.$ac_ext <<_ACEOF
6559 #line 6559 "configure"
6560 #include "confdefs.h"
6561
6562 #include <${cf_cv_ncurses_header:-curses.h}>
6563 #include <stdio.h>
6564 int main()
6565 {
6566         FILE *fp = fopen("$cf_tempfile", "w");
6567 #ifdef NCURSES_VERSION
6568 # ifdef NCURSES_VERSION_PATCH
6569         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6570 # else
6571         fprintf(fp, "%s\n", NCURSES_VERSION);
6572 # endif
6573 #else
6574 # ifdef __NCURSES_H
6575         fprintf(fp, "old\n");
6576 # else
6577         make an error
6578 # endif
6579 #endif
6580         ${cf_cv_main_return:-return}(0);
6581 }
6582 _ACEOF
6583 rm -f conftest$ac_exeext
6584 if { (eval echo "$as_me:6584: \"$ac_link\"") >&5
6585   (eval $ac_link) 2>&5
6586   ac_status=$?
6587   echo "$as_me:6587: \$? = $ac_status" >&5
6588   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6589   { (eval echo "$as_me:6589: \"$ac_try\"") >&5
6590   (eval $ac_try) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); }; }; then
6594
6595         cf_cv_ncurses_version=`cat $cf_tempfile`
6596 else
6597   echo "$as_me: program exited with status $ac_status" >&5
6598 echo "$as_me: failed program was:" >&5
6599 cat conftest.$ac_ext >&5
6600 fi
6601 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6602 fi
6603         rm -f $cf_tempfile
6604
6605 fi
6606 echo "$as_me:6606: result: $cf_cv_ncurses_version" >&5
6607 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6608 test "$cf_cv_ncurses_version" = no ||
6609 cat >>confdefs.h <<\EOF
6610 #define NCURSES 1
6611 EOF
6612
6613 cf_nculib_root=ncurses
6614         # This works, except for the special case where we find gpm, but
6615         # ncurses is in a nonstandard location via $LIBS, and we really want
6616         # to link gpm.
6617 cf_ncurses_LIBS=""
6618 cf_ncurses_SAVE="$LIBS"
6619 echo "$as_me:6619: checking for Gpm_Open in -lgpm" >&5
6620 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6621 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6622   echo $ECHO_N "(cached) $ECHO_C" >&6
6623 else
6624   ac_check_lib_save_LIBS=$LIBS
6625 LIBS="-lgpm  $LIBS"
6626 cat >conftest.$ac_ext <<_ACEOF
6627 #line 6627 "configure"
6628 #include "confdefs.h"
6629
6630 /* Override any gcc2 internal prototype to avoid an error.  */
6631 #ifdef __cplusplus
6632 extern "C"
6633 #endif
6634 /* We use char because int might match the return type of a gcc2
6635    builtin and then its argument prototype would still apply.  */
6636 char Gpm_Open ();
6637 int
6638 main ()
6639 {
6640 Gpm_Open ();
6641   ;
6642   return 0;
6643 }
6644 _ACEOF
6645 rm -f conftest.$ac_objext conftest$ac_exeext
6646 if { (eval echo "$as_me:6646: \"$ac_link\"") >&5
6647   (eval $ac_link) 2>&5
6648   ac_status=$?
6649   echo "$as_me:6649: \$? = $ac_status" >&5
6650   (exit $ac_status); } &&
6651          { ac_try='test -s conftest$ac_exeext'
6652   { (eval echo "$as_me:6652: \"$ac_try\"") >&5
6653   (eval $ac_try) 2>&5
6654   ac_status=$?
6655   echo "$as_me:6655: \$? = $ac_status" >&5
6656   (exit $ac_status); }; }; then
6657   ac_cv_lib_gpm_Gpm_Open=yes
6658 else
6659   echo "$as_me: failed program was:" >&5
6660 cat conftest.$ac_ext >&5
6661 ac_cv_lib_gpm_Gpm_Open=no
6662 fi
6663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6664 LIBS=$ac_check_lib_save_LIBS
6665 fi
6666 echo "$as_me:6666: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6667 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6668 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6669   echo "$as_me:6669: checking for initscr in -lgpm" >&5
6670 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6671 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6672   echo $ECHO_N "(cached) $ECHO_C" >&6
6673 else
6674   ac_check_lib_save_LIBS=$LIBS
6675 LIBS="-lgpm  $LIBS"
6676 cat >conftest.$ac_ext <<_ACEOF
6677 #line 6677 "configure"
6678 #include "confdefs.h"
6679
6680 /* Override any gcc2 internal prototype to avoid an error.  */
6681 #ifdef __cplusplus
6682 extern "C"
6683 #endif
6684 /* We use char because int might match the return type of a gcc2
6685    builtin and then its argument prototype would still apply.  */
6686 char initscr ();
6687 int
6688 main ()
6689 {
6690 initscr ();
6691   ;
6692   return 0;
6693 }
6694 _ACEOF
6695 rm -f conftest.$ac_objext conftest$ac_exeext
6696 if { (eval echo "$as_me:6696: \"$ac_link\"") >&5
6697   (eval $ac_link) 2>&5
6698   ac_status=$?
6699   echo "$as_me:6699: \$? = $ac_status" >&5
6700   (exit $ac_status); } &&
6701          { ac_try='test -s conftest$ac_exeext'
6702   { (eval echo "$as_me:6702: \"$ac_try\"") >&5
6703   (eval $ac_try) 2>&5
6704   ac_status=$?
6705   echo "$as_me:6705: \$? = $ac_status" >&5
6706   (exit $ac_status); }; }; then
6707   ac_cv_lib_gpm_initscr=yes
6708 else
6709   echo "$as_me: failed program was:" >&5
6710 cat conftest.$ac_ext >&5
6711 ac_cv_lib_gpm_initscr=no
6712 fi
6713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6714 LIBS=$ac_check_lib_save_LIBS
6715 fi
6716 echo "$as_me:6716: result: $ac_cv_lib_gpm_initscr" >&5
6717 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6718 if test $ac_cv_lib_gpm_initscr = yes; then
6719   LIBS="$cf_ncurses_SAVE"
6720 else
6721   cf_ncurses_LIBS="-lgpm"
6722 fi
6723
6724 fi
6725
6726 case $host_os in #(vi
6727 freebsd*)
6728         # This is only necessary if you are linking against an obsolete
6729         # version of ncurses (but it should do no harm, since it's static).
6730         if test "$cf_nculib_root" = ncurses ; then
6731                 echo "$as_me:6731: checking for tgoto in -lmytinfo" >&5
6732 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6733 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6734   echo $ECHO_N "(cached) $ECHO_C" >&6
6735 else
6736   ac_check_lib_save_LIBS=$LIBS
6737 LIBS="-lmytinfo  $LIBS"
6738 cat >conftest.$ac_ext <<_ACEOF
6739 #line 6739 "configure"
6740 #include "confdefs.h"
6741
6742 /* Override any gcc2 internal prototype to avoid an error.  */
6743 #ifdef __cplusplus
6744 extern "C"
6745 #endif
6746 /* We use char because int might match the return type of a gcc2
6747    builtin and then its argument prototype would still apply.  */
6748 char tgoto ();
6749 int
6750 main ()
6751 {
6752 tgoto ();
6753   ;
6754   return 0;
6755 }
6756 _ACEOF
6757 rm -f conftest.$ac_objext conftest$ac_exeext
6758 if { (eval echo "$as_me:6758: \"$ac_link\"") >&5
6759   (eval $ac_link) 2>&5
6760   ac_status=$?
6761   echo "$as_me:6761: \$? = $ac_status" >&5
6762   (exit $ac_status); } &&
6763          { ac_try='test -s conftest$ac_exeext'
6764   { (eval echo "$as_me:6764: \"$ac_try\"") >&5
6765   (eval $ac_try) 2>&5
6766   ac_status=$?
6767   echo "$as_me:6767: \$? = $ac_status" >&5
6768   (exit $ac_status); }; }; then
6769   ac_cv_lib_mytinfo_tgoto=yes
6770 else
6771   echo "$as_me: failed program was:" >&5
6772 cat conftest.$ac_ext >&5
6773 ac_cv_lib_mytinfo_tgoto=no
6774 fi
6775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6776 LIBS=$ac_check_lib_save_LIBS
6777 fi
6778 echo "$as_me:6778: result: $ac_cv_lib_mytinfo_tgoto" >&5
6779 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6780 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6781   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6782 fi
6783
6784         fi
6785         ;;
6786 esac
6787
6788 cf_add_libs="$cf_ncurses_LIBS"
6789 # Filter out duplicates - this happens with badly-designed ".pc" files...
6790 for cf_add_1lib in $LIBS
6791 do
6792         for cf_add_2lib in $cf_add_libs
6793         do
6794                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6795                 then
6796                         cf_add_1lib=
6797                         break
6798                 fi
6799         done
6800         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6801 done
6802 LIBS="$cf_add_libs"
6803
6804 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6805 then
6806
6807 cf_add_libs="-l$cf_nculib_root"
6808 # Filter out duplicates - this happens with badly-designed ".pc" files...
6809 for cf_add_1lib in $LIBS
6810 do
6811         for cf_add_2lib in $cf_add_libs
6812         do
6813                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6814                 then
6815                         cf_add_1lib=
6816                         break
6817                 fi
6818         done
6819         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6820 done
6821 LIBS="$cf_add_libs"
6822
6823 else
6824
6825         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6826         cf_libdir=""
6827         echo "$as_me:6827: checking for initscr" >&5
6828 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6829 if test "${ac_cv_func_initscr+set}" = set; then
6830   echo $ECHO_N "(cached) $ECHO_C" >&6
6831 else
6832   cat >conftest.$ac_ext <<_ACEOF
6833 #line 6833 "configure"
6834 #include "confdefs.h"
6835 /* System header to define __stub macros and hopefully few prototypes,
6836     which can conflict with char initscr (); below.  */
6837 #include <assert.h>
6838 /* Override any gcc2 internal prototype to avoid an error.  */
6839 #ifdef __cplusplus
6840 extern "C"
6841 #endif
6842 /* We use char because int might match the return type of a gcc2
6843    builtin and then its argument prototype would still apply.  */
6844 char initscr ();
6845 char (*f) ();
6846
6847 int
6848 main ()
6849 {
6850 /* The GNU C library defines this for functions which it implements
6851     to always fail with ENOSYS.  Some functions are actually named
6852     something starting with __ and the normal name is an alias.  */
6853 #if defined (__stub_initscr) || defined (__stub___initscr)
6854 choke me
6855 #else
6856 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6857 #endif
6858
6859   ;
6860   return 0;
6861 }
6862 _ACEOF
6863 rm -f conftest.$ac_objext conftest$ac_exeext
6864 if { (eval echo "$as_me:6864: \"$ac_link\"") >&5
6865   (eval $ac_link) 2>&5
6866   ac_status=$?
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit $ac_status); } &&
6869          { ac_try='test -s conftest$ac_exeext'
6870   { (eval echo "$as_me:6870: \"$ac_try\"") >&5
6871   (eval $ac_try) 2>&5
6872   ac_status=$?
6873   echo "$as_me:6873: \$? = $ac_status" >&5
6874   (exit $ac_status); }; }; then
6875   ac_cv_func_initscr=yes
6876 else
6877   echo "$as_me: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6879 ac_cv_func_initscr=no
6880 fi
6881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6882 fi
6883 echo "$as_me:6883: result: $ac_cv_func_initscr" >&5
6884 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6885 if test $ac_cv_func_initscr = yes; then
6886   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6887 else
6888
6889                 cf_save_LIBS="$LIBS"
6890                 echo "$as_me:6890: checking for initscr in -l$cf_nculib_root" >&5
6891 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6892                 LIBS="-l$cf_nculib_root $LIBS"
6893                 cat >conftest.$ac_ext <<_ACEOF
6894 #line 6894 "configure"
6895 #include "confdefs.h"
6896 #include <${cf_cv_ncurses_header:-curses.h}>
6897 int
6898 main ()
6899 {
6900 initscr()
6901   ;
6902   return 0;
6903 }
6904 _ACEOF
6905 rm -f conftest.$ac_objext conftest$ac_exeext
6906 if { (eval echo "$as_me:6906: \"$ac_link\"") >&5
6907   (eval $ac_link) 2>&5
6908   ac_status=$?
6909   echo "$as_me:6909: \$? = $ac_status" >&5
6910   (exit $ac_status); } &&
6911          { ac_try='test -s conftest$ac_exeext'
6912   { (eval echo "$as_me:6912: \"$ac_try\"") >&5
6913   (eval $ac_try) 2>&5
6914   ac_status=$?
6915   echo "$as_me:6915: \$? = $ac_status" >&5
6916   (exit $ac_status); }; }; then
6917   echo "$as_me:6917: result: yes" >&5
6918 echo "${ECHO_T}yes" >&6
6919                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6920
6921 else
6922   echo "$as_me: failed program was:" >&5
6923 cat conftest.$ac_ext >&5
6924 echo "$as_me:6924: result: no" >&5
6925 echo "${ECHO_T}no" >&6
6926
6927 cf_search=
6928 cf_library_path_list=""
6929 if test -n "${LDFLAGS}${LIBS}" ; then
6930         for cf_library_path in $LDFLAGS $LIBS
6931         do
6932                 case $cf_library_path in #(vi
6933                 -L*)
6934                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6935
6936 test "x$cf_library_path" != "xNONE" && \
6937 test -d "$cf_library_path" && \
6938  {
6939         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6940         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6941         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6942         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6943         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6944         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"
6945 }
6946
6947                         cf_library_path_list="$cf_library_path_list $cf_search"
6948                         ;;
6949                 esac
6950         done
6951 fi
6952
6953 cf_search=
6954
6955 test "x/usr" != "x$prefix" && \
6956 test -d "/usr" && \
6957 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
6958         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6959         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6960         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6961         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6962         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6963         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6964 }
6965
6966 test "x$prefix" != "xNONE" && \
6967 test -d "$prefix" && \
6968  {
6969         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6970         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6971         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6972         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6973         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6974         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6975 }
6976
6977 test "x/usr/local" != "x$prefix" && \
6978 test -d "/usr/local" && \
6979 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
6980         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6981         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6982         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6983         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6984         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6985         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6986 }
6987
6988 test "x/opt" != "x$prefix" && \
6989 test -d "/opt" && \
6990 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
6991         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6992         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6993         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6994         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6995         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
6996         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6997 }
6998
6999 test "x$HOME" != "x$prefix" && \
7000 test -d "$HOME" && \
7001 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
7002         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7003         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7004         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7005         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7006         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7007         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7008 }
7009
7010 cf_search="$cf_library_path_list $cf_search"
7011
7012                         for cf_libdir in $cf_search
7013                         do
7014                                 echo "$as_me:7014: checking for -l$cf_nculib_root in $cf_libdir" >&5
7015 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7016                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7017                                 cat >conftest.$ac_ext <<_ACEOF
7018 #line 7018 "configure"
7019 #include "confdefs.h"
7020 #include <${cf_cv_ncurses_header:-curses.h}>
7021 int
7022 main ()
7023 {
7024 initscr()
7025   ;
7026   return 0;
7027 }
7028 _ACEOF
7029 rm -f conftest.$ac_objext conftest$ac_exeext
7030 if { (eval echo "$as_me:7030: \"$ac_link\"") >&5
7031   (eval $ac_link) 2>&5
7032   ac_status=$?
7033   echo "$as_me:7033: \$? = $ac_status" >&5
7034   (exit $ac_status); } &&
7035          { ac_try='test -s conftest$ac_exeext'
7036   { (eval echo "$as_me:7036: \"$ac_try\"") >&5
7037   (eval $ac_try) 2>&5
7038   ac_status=$?
7039   echo "$as_me:7039: \$? = $ac_status" >&5
7040   (exit $ac_status); }; }; then
7041   echo "$as_me:7041: result: yes" >&5
7042 echo "${ECHO_T}yes" >&6
7043                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7044                                          break
7045 else
7046   echo "$as_me: failed program was:" >&5
7047 cat conftest.$ac_ext >&5
7048 echo "$as_me:7048: result: no" >&5
7049 echo "${ECHO_T}no" >&6
7050                                          LIBS="$cf_save_LIBS"
7051 fi
7052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7053                         done
7054
7055 fi
7056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7057
7058 fi
7059
7060 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7061
7062 if test $cf_found_library = no ; then
7063         { { echo "$as_me:7063: error: Cannot link $cf_nculib_root library" >&5
7064 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7065    { (exit 1); exit 1; }; }
7066 fi
7067
7068 fi
7069
7070 if test -n "$cf_ncurses_LIBS" ; then
7071         echo "$as_me:7071: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7072 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7073         cf_ncurses_SAVE="$LIBS"
7074         for p in $cf_ncurses_LIBS ; do
7075                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7076                 if test "$q" != "$LIBS" ; then
7077                         LIBS="$q"
7078                 fi
7079         done
7080         cat >conftest.$ac_ext <<_ACEOF
7081 #line 7081 "configure"
7082 #include "confdefs.h"
7083 #include <${cf_cv_ncurses_header:-curses.h}>
7084 int
7085 main ()
7086 {
7087 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7088   ;
7089   return 0;
7090 }
7091 _ACEOF
7092 rm -f conftest.$ac_objext conftest$ac_exeext
7093 if { (eval echo "$as_me:7093: \"$ac_link\"") >&5
7094   (eval $ac_link) 2>&5
7095   ac_status=$?
7096   echo "$as_me:7096: \$? = $ac_status" >&5
7097   (exit $ac_status); } &&
7098          { ac_try='test -s conftest$ac_exeext'
7099   { (eval echo "$as_me:7099: \"$ac_try\"") >&5
7100   (eval $ac_try) 2>&5
7101   ac_status=$?
7102   echo "$as_me:7102: \$? = $ac_status" >&5
7103   (exit $ac_status); }; }; then
7104   echo "$as_me:7104: result: yes" >&5
7105 echo "${ECHO_T}yes" >&6
7106 else
7107   echo "$as_me: failed program was:" >&5
7108 cat conftest.$ac_ext >&5
7109 echo "$as_me:7109: result: no" >&5
7110 echo "${ECHO_T}no" >&6
7111                  LIBS="$cf_ncurses_SAVE"
7112 fi
7113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7114 fi
7115
7116 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7117
7118 cat >>confdefs.h <<EOF
7119 #define $cf_nculib_ROOT 1
7120 EOF
7121
7122 fi
7123
7124 fi
7125
7126 if test "$NCURSES_CONFIG" != none ; then
7127
7128 cf_version=`$NCURSES_CONFIG --version`
7129
7130 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7131 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7132 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7133
7134 # ABI version is not available from headers
7135 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7136
7137 else
7138
7139 for cf_name in MAJOR MINOR PATCH
7140 do
7141 cat >conftest.$ac_ext <<CF_EOF
7142 #include <${cf_cv_ncurses_header:-curses.h}>
7143 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7144 CF_EOF
7145         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7146         { (eval echo "$as_me:7146: \"$cf_try\"") >&5
7147   (eval $cf_try) 2>&5
7148   ac_status=$?
7149   echo "$as_me:7149: \$? = $ac_status" >&5
7150   (exit $ac_status); }
7151         if test -f conftest.out ; then
7152                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7153                 eval NCURSES_$cf_name=\"$cf_result\"
7154                 # cat conftest.$ac_ext
7155                 # cat conftest.out
7156         fi
7157 done
7158
7159 cf_cv_abi_version=${NCURSES_MAJOR}
7160
7161 fi
7162
7163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7164
7165 cf_cv_timestamp=`date`
7166
7167 echo "$as_me:7167: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7168 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7169
7170 echo "$as_me:7170: checking if you want to have a library-prefix" >&5
7171 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
7172
7173 # Check whether --with-lib-prefix or --without-lib-prefix was given.
7174 if test "${with_lib_prefix+set}" = set; then
7175   withval="$with_lib_prefix"
7176   with_lib_prefix=$withval
7177 else
7178   with_lib_prefix=auto
7179 fi;
7180 echo "$as_me:7180: result: $with_lib_prefix" >&5
7181 echo "${ECHO_T}$with_lib_prefix" >&6
7182
7183 if test $with_lib_prefix = auto
7184 then
7185
7186         case $cf_cv_system_name in #(vi
7187         OS/2*|os2*) #(vi
7188         LIB_PREFIX=''
7189         ;;
7190         *)      LIB_PREFIX='lib'
7191         ;;
7192         esac
7193 cf_prefix=$LIB_PREFIX
7194
7195 elif test $with_lib_prefix = no
7196 then
7197         LIB_PREFIX=
7198 else
7199         LIB_PREFIX=$with_lib_prefix
7200 fi
7201
7202 LIB_SUFFIX=
7203
7204 ###############################################################################
7205
7206 if test X"$CC_G_OPT" = X"" ; then
7207         CC_G_OPT='-g'
7208         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7209 fi
7210
7211 echo "$as_me:7211: checking for default loader flags" >&5
7212 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7213 case $DFT_LWR_MODEL in
7214 normal)  LD_MODEL=''   ;;
7215 debug)   LD_MODEL=$CC_G_OPT ;;
7216 profile) LD_MODEL='-pg';;
7217 shared)  LD_MODEL=''   ;;
7218 esac
7219 echo "$as_me:7219: result: $LD_MODEL" >&5
7220 echo "${ECHO_T}$LD_MODEL" >&6
7221
7222 LD_RPATH_OPT=
7223 echo "$as_me:7223: checking for an rpath option" >&5
7224 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7225 case $cf_cv_system_name in #(vi
7226 irix*) #(vi
7227         if test "$GCC" = yes; then
7228                 LD_RPATH_OPT="-Wl,-rpath,"
7229         else
7230                 LD_RPATH_OPT="-rpath "
7231         fi
7232         ;;
7233 linux*|gnu*|k*bsd*-gnu) #(vi
7234         LD_RPATH_OPT="-Wl,-rpath,"
7235         ;;
7236 openbsd[2-9].*|mirbsd*) #(vi
7237         LD_RPATH_OPT="-Wl,-rpath,"
7238         ;;
7239 dragonfly*|freebsd*) #(vi
7240         LD_RPATH_OPT="-rpath "
7241         ;;
7242 netbsd*) #(vi
7243         LD_RPATH_OPT="-Wl,-rpath,"
7244         ;;
7245 osf*|mls+*) #(vi
7246         LD_RPATH_OPT="-rpath "
7247         ;;
7248 solaris2*) #(vi
7249         LD_RPATH_OPT="-R"
7250         ;;
7251 *)
7252         ;;
7253 esac
7254 echo "$as_me:7254: result: $LD_RPATH_OPT" >&5
7255 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7256
7257 case "x$LD_RPATH_OPT" in #(vi
7258 x-R*)
7259         echo "$as_me:7259: checking if we need a space after rpath option" >&5
7260 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7261         cf_save_LIBS="$LIBS"
7262
7263 cf_add_libs="${LD_RPATH_OPT}$libdir"
7264 # Filter out duplicates - this happens with badly-designed ".pc" files...
7265 for cf_add_1lib in $LIBS
7266 do
7267         for cf_add_2lib in $cf_add_libs
7268         do
7269                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7270                 then
7271                         cf_add_1lib=
7272                         break
7273                 fi
7274         done
7275         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7276 done
7277 LIBS="$cf_add_libs"
7278
7279         cat >conftest.$ac_ext <<_ACEOF
7280 #line 7280 "configure"
7281 #include "confdefs.h"
7282
7283 int
7284 main ()
7285 {
7286
7287   ;
7288   return 0;
7289 }
7290 _ACEOF
7291 rm -f conftest.$ac_objext conftest$ac_exeext
7292 if { (eval echo "$as_me:7292: \"$ac_link\"") >&5
7293   (eval $ac_link) 2>&5
7294   ac_status=$?
7295   echo "$as_me:7295: \$? = $ac_status" >&5
7296   (exit $ac_status); } &&
7297          { ac_try='test -s conftest$ac_exeext'
7298   { (eval echo "$as_me:7298: \"$ac_try\"") >&5
7299   (eval $ac_try) 2>&5
7300   ac_status=$?
7301   echo "$as_me:7301: \$? = $ac_status" >&5
7302   (exit $ac_status); }; }; then
7303   cf_rpath_space=no
7304 else
7305   echo "$as_me: failed program was:" >&5
7306 cat conftest.$ac_ext >&5
7307 cf_rpath_space=yes
7308 fi
7309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7310         LIBS="$cf_save_LIBS"
7311         echo "$as_me:7311: result: $cf_rpath_space" >&5
7312 echo "${ECHO_T}$cf_rpath_space" >&6
7313         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7314         ;;
7315 esac
7316
7317         RM_SHARED_OPTS=
7318         LOCAL_LDFLAGS=
7319         LOCAL_LDFLAGS2=
7320         LD_SHARED_OPTS=
7321         INSTALL_LIB="-m 644"
7322         : ${rel_builddir:=.}
7323
7324         shlibdir=$libdir
7325
7326         MAKE_DLLS="#"
7327
7328         cf_cv_do_symlinks=no
7329         cf_ld_rpath_opt=
7330         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7331
7332         echo "$as_me:7332: checking if release/abi version should be used for shared libs" >&5
7333 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7334
7335 # Check whether --with-shlib-version or --without-shlib-version was given.
7336 if test "${with_shlib_version+set}" = set; then
7337   withval="$with_shlib_version"
7338   test -z "$withval" && withval=auto
7339         case $withval in #(vi
7340         yes) #(vi
7341                 cf_cv_shlib_version=auto
7342                 ;;
7343         rel|abi|auto|no) #(vi
7344                 cf_cv_shlib_version=$withval
7345                 ;;
7346         *)
7347                 { { echo "$as_me:7347: error: option value must be one of: rel, abi, auto or no" >&5
7348 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7349    { (exit 1); exit 1; }; }
7350                 ;;
7351         esac
7352
7353 else
7354   cf_cv_shlib_version=auto
7355 fi;
7356         echo "$as_me:7356: result: $cf_cv_shlib_version" >&5
7357 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7358
7359         cf_cv_rm_so_locs=no
7360         cf_try_cflags=
7361
7362         # Some less-capable ports of gcc support only -fpic
7363         CC_SHARED_OPTS=
7364         if test "$GCC" = yes
7365         then
7366                 echo "$as_me:7366: checking which $CC option to use" >&5
7367 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7368                 cf_save_CFLAGS="$CFLAGS"
7369                 for CC_SHARED_OPTS in -fPIC -fpic ''
7370                 do
7371                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7372                         cat >conftest.$ac_ext <<_ACEOF
7373 #line 7373 "configure"
7374 #include "confdefs.h"
7375 #include <stdio.h>
7376 int
7377 main ()
7378 {
7379 int x = 1
7380   ;
7381   return 0;
7382 }
7383 _ACEOF
7384 rm -f conftest.$ac_objext
7385 if { (eval echo "$as_me:7385: \"$ac_compile\"") >&5
7386   (eval $ac_compile) 2>&5
7387   ac_status=$?
7388   echo "$as_me:7388: \$? = $ac_status" >&5
7389   (exit $ac_status); } &&
7390          { ac_try='test -s conftest.$ac_objext'
7391   { (eval echo "$as_me:7391: \"$ac_try\"") >&5
7392   (eval $ac_try) 2>&5
7393   ac_status=$?
7394   echo "$as_me:7394: \$? = $ac_status" >&5
7395   (exit $ac_status); }; }; then
7396   break
7397 else
7398   echo "$as_me: failed program was:" >&5
7399 cat conftest.$ac_ext >&5
7400 fi
7401 rm -f conftest.$ac_objext conftest.$ac_ext
7402                 done
7403                 echo "$as_me:7403: result: $CC_SHARED_OPTS" >&5
7404 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7405                 CFLAGS="$cf_save_CFLAGS"
7406         fi
7407
7408         cf_cv_shlib_version_infix=no
7409
7410         case $cf_cv_system_name in #(vi
7411         aix4.3-9*|aix[5-7]*) #(vi
7412                 if test "$GCC" = yes; then
7413                         CC_SHARED_OPTS=
7414                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7415                 else
7416                         # CC_SHARED_OPTS='-qpic=large -G'
7417                         # perhaps "-bM:SRE -bnoentry -bexpall"
7418                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7419                 fi
7420                 ;;
7421         beos*) #(vi
7422                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7423                 ;;
7424         cygwin*) #(vi
7425                 CC_SHARED_OPTS=
7426                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7427                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7428                 cf_cv_shlib_version=cygdll
7429                 cf_cv_shlib_version_infix=cygdll
7430                 shlibdir=$bindir
7431                 MAKE_DLLS=
7432                 cat >mk_shared_lib.sh <<-CF_EOF
7433                 #!/bin/sh
7434                 SHARED_LIB=\$1
7435                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7436                 shift
7437                 cat <<-EOF
7438                 Linking shared library
7439                 ** SHARED_LIB \$SHARED_LIB
7440                 ** IMPORT_LIB \$IMPORT_LIB
7441 EOF
7442                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7443 CF_EOF
7444                 chmod +x mk_shared_lib.sh
7445                 ;;
7446         msys*) #(vi
7447                 CC_SHARED_OPTS=
7448                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7449                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7450                 cf_cv_shlib_version=msysdll
7451                 cf_cv_shlib_version_infix=msysdll
7452                 shlibdir=$bindir
7453                 MAKE_DLLS=
7454                 cat >mk_shared_lib.sh <<-CF_EOF
7455                 #!/bin/sh
7456                 SHARED_LIB=\$1
7457                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7458                 shift
7459                 cat <<-EOF
7460                 Linking shared library
7461                 ** SHARED_LIB \$SHARED_LIB
7462                 ** IMPORT_LIB \$IMPORT_LIB
7463 EOF
7464                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7465 CF_EOF
7466                 chmod +x mk_shared_lib.sh
7467                 ;;
7468         darwin*) #(vi
7469                 cf_try_cflags="no-cpp-precomp"
7470                 CC_SHARED_OPTS="-dynamic"
7471                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7472                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7473                 cf_cv_shlib_version_infix=yes
7474                 echo "$as_me:7474: checking if ld -search_paths_first works" >&5
7475 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7476 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7477   echo $ECHO_N "(cached) $ECHO_C" >&6
7478 else
7479
7480                         cf_save_LDFLAGS=$LDFLAGS
7481                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7482                         cat >conftest.$ac_ext <<_ACEOF
7483 #line 7483 "configure"
7484 #include "confdefs.h"
7485
7486 int
7487 main ()
7488 {
7489 int i;
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 rm -f conftest.$ac_objext conftest$ac_exeext
7495 if { (eval echo "$as_me:7495: \"$ac_link\"") >&5
7496   (eval $ac_link) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); } &&
7500          { ac_try='test -s conftest$ac_exeext'
7501   { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506   cf_cv_ldflags_search_paths_first=yes
7507 else
7508   echo "$as_me: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7510 cf_cv_ldflags_search_paths_first=no
7511 fi
7512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7513                                 LDFLAGS=$cf_save_LDFLAGS
7514 fi
7515 echo "$as_me:7515: result: $cf_cv_ldflags_search_paths_first" >&5
7516 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7517                 if test $cf_cv_ldflags_search_paths_first = yes; then
7518                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7519                 fi
7520                 ;;
7521         hpux[7-8]*) #(vi
7522                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
7523                 if test "$GCC" != yes; then
7524                         CC_SHARED_OPTS='+Z'
7525                 fi
7526                 MK_SHARED_LIB='${LD} -b -o $@'
7527                 INSTALL_LIB="-m 555"
7528                 ;;
7529         hpux*) #(vi
7530                 # (tested with gcc 2.7.2 -- I don't have c89)
7531                 if test "$GCC" = yes; then
7532                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7533                 else
7534                         CC_SHARED_OPTS='+Z'
7535                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7536                 fi
7537                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7538                 # HP-UX shared libraries must be executable, and should be
7539                 # readonly to exploit a quirk in the memory manager.
7540                 INSTALL_LIB="-m 555"
7541                 ;;
7542         interix*)
7543                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7544                 if test "$cf_cv_shlib_version" = rel; then
7545                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7546                 else
7547                         cf_shared_soname='`basename `'
7548                 fi
7549                 CC_SHARED_OPTS=
7550                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
7551                 ;;
7552         irix*) #(vi
7553                 if test "$cf_cv_enable_rpath" = yes ; then
7554                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7555                 fi
7556                 # tested with IRIX 5.2 and 'cc'.
7557                 if test "$GCC" != yes; then
7558                         CC_SHARED_OPTS='-KPIC'
7559                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7560                 else
7561                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7562                 fi
7563                 cf_cv_rm_so_locs=yes
7564                 ;;
7565         linux*|gnu*|k*bsd*-gnu) #(vi
7566                 if test "$DFT_LWR_MODEL" = "shared" ; then
7567                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7568                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7569                 fi
7570                 if test "$cf_cv_enable_rpath" = yes ; then
7571                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7572                 fi
7573
7574         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7575         if test "$cf_cv_shlib_version" = rel; then
7576                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7577         else
7578                 cf_cv_shared_soname='`basename $@`'
7579         fi
7580
7581                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7582                 ;;
7583         mingw*) #(vi
7584                 cf_cv_shlib_version=mingw
7585                 cf_cv_shlib_version_infix=mingw
7586                 shlibdir=$bindir
7587                 MAKE_DLLS=
7588                 if test "$DFT_LWR_MODEL" = "shared" ; then
7589                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
7590                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7591                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
7592                 fi
7593                 CC_SHARED_OPTS=
7594                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7595                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7596                 cat >mk_shared_lib.sh <<-CF_EOF
7597                 #!/bin/sh
7598                 SHARED_LIB=\$1
7599                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7600                 shift
7601                 cat <<-EOF
7602                 Linking shared library
7603                 ** SHARED_LIB \$SHARED_LIB
7604                 ** IMPORT_LIB \$IMPORT_LIB
7605 EOF
7606                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7607 CF_EOF
7608                 chmod +x mk_shared_lib.sh
7609                 ;;
7610         openbsd[2-9].*|mirbsd*) #(vi
7611                 if test "$DFT_LWR_MODEL" = "shared" ; then
7612                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7613                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7614                 fi
7615                 if test "$cf_cv_enable_rpath" = yes ; then
7616                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7617                 fi
7618                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7619
7620         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7621         if test "$cf_cv_shlib_version" = rel; then
7622                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7623         else
7624                 cf_cv_shared_soname='`basename $@`'
7625         fi
7626
7627                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7628                 ;;
7629         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7630                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7631                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7632                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7633                 ;;
7634         dragonfly*|freebsd*) #(vi
7635                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7636                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7637                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7638                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7639                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7640                 fi
7641
7642         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7643         if test "$cf_cv_shlib_version" = rel; then
7644                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7645         else
7646                 cf_cv_shared_soname='`basename $@`'
7647         fi
7648
7649                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7650                 ;;
7651         netbsd*) #(vi
7652                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7653                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7654                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7655                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7656                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7657                         if test "$cf_cv_shlib_version" = auto; then
7658                         if test -f /usr/libexec/ld.elf_so; then
7659                                 cf_cv_shlib_version=abi
7660                         else
7661                                 cf_cv_shlib_version=rel
7662                         fi
7663                         fi
7664
7665         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7666         if test "$cf_cv_shlib_version" = rel; then
7667                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7668         else
7669                 cf_cv_shared_soname='`basename $@`'
7670         fi
7671
7672                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7673                 else
7674                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
7675                 fi
7676                 ;;
7677         osf*|mls+*) #(vi
7678                 # tested with OSF/1 V3.2 and 'cc'
7679                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7680                 # link with shared libs).
7681                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7682                 case $host_os in #(vi
7683                 osf4*)
7684                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7685                         ;;
7686                 esac
7687                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7688                 if test "$DFT_LWR_MODEL" = "shared" ; then
7689                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7690                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7691                 fi
7692                 cf_cv_rm_so_locs=yes
7693                 ;;
7694         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7695                 # tested with osr5.0.5
7696                 if test "$GCC" != yes; then
7697                         CC_SHARED_OPTS='-belf -KPIC'
7698                 fi
7699                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7700                 if test "$cf_cv_enable_rpath" = yes ; then
7701                         # only way is to set LD_RUN_PATH but no switch for it
7702                         RUN_PATH=$libdir
7703                 fi
7704                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7705                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7706                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7707                 ;;
7708         sunos4*) #(vi
7709                 # tested with SunOS 4.1.1 and gcc 2.7.0
7710                 if test "$GCC" != yes; then
7711                         CC_SHARED_OPTS='-KPIC'
7712                 fi
7713                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7714                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7715                 ;;
7716         solaris2*) #(vi
7717                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7718                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7719                 if test "$DFT_LWR_MODEL" = "shared" ; then
7720                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7721                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7722                 fi
7723                 if test "$cf_cv_enable_rpath" = yes ; then
7724                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7725                 fi
7726
7727         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7728         if test "$cf_cv_shlib_version" = rel; then
7729                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7730         else
7731                 cf_cv_shared_soname='`basename $@`'
7732         fi
7733
7734                 if test "$GCC" != yes; then
7735                         cf_save_CFLAGS="$CFLAGS"
7736                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7737                         do
7738                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7739                                 cat >conftest.$ac_ext <<_ACEOF
7740 #line 7740 "configure"
7741 #include "confdefs.h"
7742 #include <stdio.h>
7743 int
7744 main ()
7745 {
7746 printf("Hello\n");
7747   ;
7748   return 0;
7749 }
7750 _ACEOF
7751 rm -f conftest.$ac_objext
7752 if { (eval echo "$as_me:7752: \"$ac_compile\"") >&5
7753   (eval $ac_compile) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); } &&
7757          { ac_try='test -s conftest.$ac_objext'
7758   { (eval echo "$as_me:7758: \"$ac_try\"") >&5
7759   (eval $ac_try) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); }; }; then
7763   break
7764 else
7765   echo "$as_me: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 fi
7768 rm -f conftest.$ac_objext conftest.$ac_ext
7769                         done
7770                         CFLAGS="$cf_save_CFLAGS"
7771                         CC_SHARED_OPTS=$cf_shared_opts
7772                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7773                 else
7774                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7775                 fi
7776                 ;;
7777         sysv5uw7*|unix_sv*) #(vi
7778                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7779                 if test "$GCC" != yes; then
7780                         CC_SHARED_OPTS='-KPIC'
7781                 fi
7782                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7783                 ;;
7784         *)
7785                 CC_SHARED_OPTS='unknown'
7786                 MK_SHARED_LIB='echo unknown'
7787                 ;;
7788         esac
7789
7790         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7791         case "$cf_cv_shlib_version" in #(vi
7792         rel|abi)
7793                 case "$MK_SHARED_LIB" in #(vi
7794                 *'-o $@') #(vi
7795                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7796                         ;;
7797                 *)
7798                         { echo "$as_me:7798: WARNING: ignored --with-shlib-version" >&5
7799 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7800                         ;;
7801                 esac
7802                 ;;
7803         esac
7804
7805         if test -n "$cf_try_cflags"
7806         then
7807 cat > conftest.$ac_ext <<EOF
7808 #line 7808 "${as_me:-configure}"
7809 #include <stdio.h>
7810 int main(int argc, char *argv[])
7811 {
7812         printf("hello\n");
7813         return (argv[argc-1] == 0) ;
7814 }
7815 EOF
7816                 cf_save_CFLAGS="$CFLAGS"
7817                 for cf_opt in $cf_try_cflags
7818                 do
7819                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7820                         echo "$as_me:7820: checking if CFLAGS option -$cf_opt works" >&5
7821 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7822                         if { (eval echo "$as_me:7822: \"$ac_compile\"") >&5
7823   (eval $ac_compile) 2>&5
7824   ac_status=$?
7825   echo "$as_me:7825: \$? = $ac_status" >&5
7826   (exit $ac_status); }; then
7827                                 echo "$as_me:7827: result: yes" >&5
7828 echo "${ECHO_T}yes" >&6
7829                                 cf_save_CFLAGS="$CFLAGS"
7830                         else
7831                                 echo "$as_me:7831: result: no" >&5
7832 echo "${ECHO_T}no" >&6
7833                         fi
7834                 done
7835                 CFLAGS="$cf_save_CFLAGS"
7836         fi
7837
7838         # RPATH_LIST is a colon-separated list of directories
7839         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7840         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7841
7842         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7843
7844         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7845
7846 echo "${as_me:-configure}:7846: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7847
7848         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7849
7850 echo "${as_me:-configure}:7850: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7851
7852 # The test/sample programs in the original tree link using rpath option.
7853 # Make it optional for packagers.
7854 if test -n "$LOCAL_LDFLAGS"
7855 then
7856         echo "$as_me:7856: checking if you want to link sample programs with rpath option" >&5
7857 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7858
7859 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7860 if test "${enable_rpath_link+set}" = set; then
7861   enableval="$enable_rpath_link"
7862   with_rpath_link=$enableval
7863 else
7864   with_rpath_link=yes
7865 fi;
7866         echo "$as_me:7866: result: $with_rpath_link" >&5
7867 echo "${ECHO_T}$with_rpath_link" >&6
7868         if test "$with_rpath_link" = no
7869         then
7870                 LOCAL_LDFLAGS=
7871                 LOCAL_LDFLAGS2=
7872         fi
7873 fi
7874
7875 ###############################################################################
7876
7877 ###   use option --enable-broken-linker to force on use of broken-linker support
7878 echo "$as_me:7878: checking if you want broken-linker support code" >&5
7879 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7880
7881 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7882 if test "${enable_broken_linker+set}" = set; then
7883   enableval="$enable_broken_linker"
7884   with_broken_linker=$enableval
7885 else
7886   with_broken_linker=${BROKEN_LINKER:-no}
7887 fi;
7888 echo "$as_me:7888: result: $with_broken_linker" >&5
7889 echo "${ECHO_T}$with_broken_linker" >&6
7890
7891 BROKEN_LINKER=0
7892 if test "$with_broken_linker" = yes ; then
7893         cat >>confdefs.h <<\EOF
7894 #define BROKEN_LINKER 1
7895 EOF
7896
7897         BROKEN_LINKER=1
7898 elif test "$DFT_LWR_MODEL" = shared ; then
7899         case $cf_cv_system_name in #(vi
7900         cygwin*)
7901                 cat >>confdefs.h <<\EOF
7902 #define BROKEN_LINKER 1
7903 EOF
7904
7905                 BROKEN_LINKER=1
7906                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7907
7908 echo "${as_me:-configure}:7908: testing cygwin linker is broken anyway ..." 1>&5
7909
7910                 ;;
7911         esac
7912 fi
7913
7914 # Check to define _XOPEN_SOURCE "automatically"
7915
7916 cf_XOPEN_SOURCE=500
7917 cf_POSIX_C_SOURCE=199506L
7918 cf_xopen_source=
7919
7920 case $host_os in #(vi
7921 aix[4-7]*) #(vi
7922         cf_xopen_source="-D_ALL_SOURCE"
7923         ;;
7924 cygwin|msys) #(vi
7925         cf_XOPEN_SOURCE=600
7926         ;;
7927 darwin[0-8].*) #(vi
7928         cf_xopen_source="-D_APPLE_C_SOURCE"
7929         ;;
7930 darwin*) #(vi
7931         cf_xopen_source="-D_DARWIN_C_SOURCE"
7932         cf_XOPEN_SOURCE=
7933         ;;
7934 freebsd*|dragonfly*) #(vi
7935         # 5.x headers associate
7936         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7937         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7938         cf_POSIX_C_SOURCE=200112L
7939         cf_XOPEN_SOURCE=600
7940         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7941         ;;
7942 hpux11*) #(vi
7943         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7944         ;;
7945 hpux*) #(vi
7946         cf_xopen_source="-D_HPUX_SOURCE"
7947         ;;
7948 irix[56].*) #(vi
7949         cf_xopen_source="-D_SGI_SOURCE"
7950         cf_XOPEN_SOURCE=
7951         ;;
7952 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7953
7954 echo "$as_me:7954: checking if we must define _GNU_SOURCE" >&5
7955 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7956 if test "${cf_cv_gnu_source+set}" = set; then
7957   echo $ECHO_N "(cached) $ECHO_C" >&6
7958 else
7959
7960 cat >conftest.$ac_ext <<_ACEOF
7961 #line 7961 "configure"
7962 #include "confdefs.h"
7963 #include <sys/types.h>
7964 int
7965 main ()
7966 {
7967
7968 #ifndef _XOPEN_SOURCE
7969 make an error
7970 #endif
7971   ;
7972   return 0;
7973 }
7974 _ACEOF
7975 rm -f conftest.$ac_objext
7976 if { (eval echo "$as_me:7976: \"$ac_compile\"") >&5
7977   (eval $ac_compile) 2>&5
7978   ac_status=$?
7979   echo "$as_me:7979: \$? = $ac_status" >&5
7980   (exit $ac_status); } &&
7981          { ac_try='test -s conftest.$ac_objext'
7982   { (eval echo "$as_me:7982: \"$ac_try\"") >&5
7983   (eval $ac_try) 2>&5
7984   ac_status=$?
7985   echo "$as_me:7985: \$? = $ac_status" >&5
7986   (exit $ac_status); }; }; then
7987   cf_cv_gnu_source=no
7988 else
7989   echo "$as_me: failed program was:" >&5
7990 cat conftest.$ac_ext >&5
7991 cf_save="$CPPFLAGS"
7992          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7993          cat >conftest.$ac_ext <<_ACEOF
7994 #line 7994 "configure"
7995 #include "confdefs.h"
7996 #include <sys/types.h>
7997 int
7998 main ()
7999 {
8000
8001 #ifdef _XOPEN_SOURCE
8002 make an error
8003 #endif
8004   ;
8005   return 0;
8006 }
8007 _ACEOF
8008 rm -f conftest.$ac_objext
8009 if { (eval echo "$as_me:8009: \"$ac_compile\"") >&5
8010   (eval $ac_compile) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit $ac_status); } &&
8014          { ac_try='test -s conftest.$ac_objext'
8015   { (eval echo "$as_me:8015: \"$ac_try\"") >&5
8016   (eval $ac_try) 2>&5
8017   ac_status=$?
8018   echo "$as_me:8018: \$? = $ac_status" >&5
8019   (exit $ac_status); }; }; then
8020   cf_cv_gnu_source=no
8021 else
8022   echo "$as_me: failed program was:" >&5
8023 cat conftest.$ac_ext >&5
8024 cf_cv_gnu_source=yes
8025 fi
8026 rm -f conftest.$ac_objext conftest.$ac_ext
8027         CPPFLAGS="$cf_save"
8028
8029 fi
8030 rm -f conftest.$ac_objext conftest.$ac_ext
8031
8032 fi
8033 echo "$as_me:8033: result: $cf_cv_gnu_source" >&5
8034 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8035 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8036
8037         ;;
8038 minix*) #(vi
8039         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8040         ;;
8041 mirbsd*) #(vi
8042         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8043         cf_XOPEN_SOURCE=
8044
8045 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8046
8047 cf_save_CFLAGS="$CFLAGS"
8048 cf_save_CPPFLAGS="$CPPFLAGS"
8049
8050 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8051         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8052                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8053
8054 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8055         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8056                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8057
8058 echo "$as_me:8058: checking if we should define _POSIX_C_SOURCE" >&5
8059 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8060 if test "${cf_cv_posix_c_source+set}" = set; then
8061   echo $ECHO_N "(cached) $ECHO_C" >&6
8062 else
8063
8064 echo "${as_me:-configure}:8064: testing if the symbol is already defined go no further ..." 1>&5
8065
8066         cat >conftest.$ac_ext <<_ACEOF
8067 #line 8067 "configure"
8068 #include "confdefs.h"
8069 #include <sys/types.h>
8070 int
8071 main ()
8072 {
8073
8074 #ifndef _POSIX_C_SOURCE
8075 make an error
8076 #endif
8077   ;
8078   return 0;
8079 }
8080 _ACEOF
8081 rm -f conftest.$ac_objext
8082 if { (eval echo "$as_me:8082: \"$ac_compile\"") >&5
8083   (eval $ac_compile) 2>&5
8084   ac_status=$?
8085   echo "$as_me:8085: \$? = $ac_status" >&5
8086   (exit $ac_status); } &&
8087          { ac_try='test -s conftest.$ac_objext'
8088   { (eval echo "$as_me:8088: \"$ac_try\"") >&5
8089   (eval $ac_try) 2>&5
8090   ac_status=$?
8091   echo "$as_me:8091: \$? = $ac_status" >&5
8092   (exit $ac_status); }; }; then
8093   cf_cv_posix_c_source=no
8094 else
8095   echo "$as_me: failed program was:" >&5
8096 cat conftest.$ac_ext >&5
8097 cf_want_posix_source=no
8098          case .$cf_POSIX_C_SOURCE in #(vi
8099          .[12]??*) #(vi
8100                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8101                 ;;
8102          .2) #(vi
8103                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8104                 cf_want_posix_source=yes
8105                 ;;
8106          .*)
8107                 cf_want_posix_source=yes
8108                 ;;
8109          esac
8110          if test "$cf_want_posix_source" = yes ; then
8111                 cat >conftest.$ac_ext <<_ACEOF
8112 #line 8112 "configure"
8113 #include "confdefs.h"
8114 #include <sys/types.h>
8115 int
8116 main ()
8117 {
8118
8119 #ifdef _POSIX_SOURCE
8120 make an error
8121 #endif
8122   ;
8123   return 0;
8124 }
8125 _ACEOF
8126 rm -f conftest.$ac_objext
8127 if { (eval echo "$as_me:8127: \"$ac_compile\"") >&5
8128   (eval $ac_compile) 2>&5
8129   ac_status=$?
8130   echo "$as_me:8130: \$? = $ac_status" >&5
8131   (exit $ac_status); } &&
8132          { ac_try='test -s conftest.$ac_objext'
8133   { (eval echo "$as_me:8133: \"$ac_try\"") >&5
8134   (eval $ac_try) 2>&5
8135   ac_status=$?
8136   echo "$as_me:8136: \$? = $ac_status" >&5
8137   (exit $ac_status); }; }; then
8138   :
8139 else
8140   echo "$as_me: failed program was:" >&5
8141 cat conftest.$ac_ext >&5
8142 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8143 fi
8144 rm -f conftest.$ac_objext conftest.$ac_ext
8145          fi
8146
8147 echo "${as_me:-configure}:8147: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8148
8149          CFLAGS="$cf_trim_CFLAGS"
8150          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8151
8152 echo "${as_me:-configure}:8152: testing if the second compile does not leave our definition intact error ..." 1>&5
8153
8154          cat >conftest.$ac_ext <<_ACEOF
8155 #line 8155 "configure"
8156 #include "confdefs.h"
8157 #include <sys/types.h>
8158 int
8159 main ()
8160 {
8161
8162 #ifndef _POSIX_C_SOURCE
8163 make an error
8164 #endif
8165   ;
8166   return 0;
8167 }
8168 _ACEOF
8169 rm -f conftest.$ac_objext
8170 if { (eval echo "$as_me:8170: \"$ac_compile\"") >&5
8171   (eval $ac_compile) 2>&5
8172   ac_status=$?
8173   echo "$as_me:8173: \$? = $ac_status" >&5
8174   (exit $ac_status); } &&
8175          { ac_try='test -s conftest.$ac_objext'
8176   { (eval echo "$as_me:8176: \"$ac_try\"") >&5
8177   (eval $ac_try) 2>&5
8178   ac_status=$?
8179   echo "$as_me:8179: \$? = $ac_status" >&5
8180   (exit $ac_status); }; }; then
8181   :
8182 else
8183   echo "$as_me: failed program was:" >&5
8184 cat conftest.$ac_ext >&5
8185 cf_cv_posix_c_source=no
8186 fi
8187 rm -f conftest.$ac_objext conftest.$ac_ext
8188          CFLAGS="$cf_save_CFLAGS"
8189          CPPFLAGS="$cf_save_CPPFLAGS"
8190
8191 fi
8192 rm -f conftest.$ac_objext conftest.$ac_ext
8193
8194 fi
8195 echo "$as_me:8195: result: $cf_cv_posix_c_source" >&5
8196 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8197
8198 if test "$cf_cv_posix_c_source" != no ; then
8199         CFLAGS="$cf_trim_CFLAGS"
8200         CPPFLAGS="$cf_trim_CPPFLAGS"
8201
8202 cf_fix_cppflags=no
8203 cf_new_cflags=
8204 cf_new_cppflags=
8205 cf_new_extra_cppflags=
8206
8207 for cf_add_cflags in $cf_cv_posix_c_source
8208 do
8209 case $cf_fix_cppflags in
8210 no)
8211         case $cf_add_cflags in #(vi
8212         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8213                 case $cf_add_cflags in
8214                 -D*)
8215                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8216
8217                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8218                                 && test -z "${cf_tst_cflags}" \
8219                                 && cf_fix_cppflags=yes
8220
8221                         if test $cf_fix_cppflags = yes ; then
8222                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8223                                 continue
8224                         elif test "${cf_tst_cflags}" = "\"'" ; then
8225                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8226                                 continue
8227                         fi
8228                         ;;
8229                 esac
8230                 case "$CPPFLAGS" in
8231                 *$cf_add_cflags) #(vi
8232                         ;;
8233                 *) #(vi
8234                         case $cf_add_cflags in #(vi
8235                         -D*)
8236                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8237
8238 CPPFLAGS=`echo "$CPPFLAGS" | \
8239         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8240                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8241
8242                                 ;;
8243                         esac
8244                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8245                         ;;
8246                 esac
8247                 ;;
8248         *)
8249                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8250                 ;;
8251         esac
8252         ;;
8253 yes)
8254         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8255
8256         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8257
8258         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8259                 && test -z "${cf_tst_cflags}" \
8260                 && cf_fix_cppflags=no
8261         ;;
8262 esac
8263 done
8264
8265 if test -n "$cf_new_cflags" ; then
8266
8267         CFLAGS="$CFLAGS $cf_new_cflags"
8268 fi
8269
8270 if test -n "$cf_new_cppflags" ; then
8271
8272         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8273 fi
8274
8275 if test -n "$cf_new_extra_cppflags" ; then
8276
8277         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8278 fi
8279
8280 fi
8281
8282         ;;
8283 netbsd*) #(vi
8284         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8285         ;;
8286 openbsd[4-9]*) #(vi
8287         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8288         cf_xopen_source="-D_BSD_SOURCE"
8289         cf_XOPEN_SOURCE=600
8290         ;;
8291 openbsd*) #(vi
8292         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8293         ;;
8294 osf[45]*) #(vi
8295         cf_xopen_source="-D_OSF_SOURCE"
8296         ;;
8297 nto-qnx*) #(vi
8298         cf_xopen_source="-D_QNX_SOURCE"
8299         ;;
8300 sco*) #(vi
8301         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8302         ;;
8303 solaris2.*) #(vi
8304         cf_xopen_source="-D__EXTENSIONS__"
8305         cf_cv_xopen_source=broken
8306         ;;
8307 *)
8308
8309 echo "$as_me:8309: checking if we should define _XOPEN_SOURCE" >&5
8310 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8311 if test "${cf_cv_xopen_source+set}" = set; then
8312   echo $ECHO_N "(cached) $ECHO_C" >&6
8313 else
8314
8315         cat >conftest.$ac_ext <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8318
8319 #include <stdlib.h>
8320 #include <string.h>
8321 #include <sys/types.h>
8322
8323 int
8324 main ()
8325 {
8326
8327 #ifndef _XOPEN_SOURCE
8328 make an error
8329 #endif
8330   ;
8331   return 0;
8332 }
8333 _ACEOF
8334 rm -f conftest.$ac_objext
8335 if { (eval echo "$as_me:8335: \"$ac_compile\"") >&5
8336   (eval $ac_compile) 2>&5
8337   ac_status=$?
8338   echo "$as_me:8338: \$? = $ac_status" >&5
8339   (exit $ac_status); } &&
8340          { ac_try='test -s conftest.$ac_objext'
8341   { (eval echo "$as_me:8341: \"$ac_try\"") >&5
8342   (eval $ac_try) 2>&5
8343   ac_status=$?
8344   echo "$as_me:8344: \$? = $ac_status" >&5
8345   (exit $ac_status); }; }; then
8346   cf_cv_xopen_source=no
8347 else
8348   echo "$as_me: failed program was:" >&5
8349 cat conftest.$ac_ext >&5
8350 cf_save="$CPPFLAGS"
8351          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8352          cat >conftest.$ac_ext <<_ACEOF
8353 #line 8353 "configure"
8354 #include "confdefs.h"
8355
8356 #include <stdlib.h>
8357 #include <string.h>
8358 #include <sys/types.h>
8359
8360 int
8361 main ()
8362 {
8363
8364 #ifdef _XOPEN_SOURCE
8365 make an error
8366 #endif
8367   ;
8368   return 0;
8369 }
8370 _ACEOF
8371 rm -f conftest.$ac_objext
8372 if { (eval echo "$as_me:8372: \"$ac_compile\"") >&5
8373   (eval $ac_compile) 2>&5
8374   ac_status=$?
8375   echo "$as_me:8375: \$? = $ac_status" >&5
8376   (exit $ac_status); } &&
8377          { ac_try='test -s conftest.$ac_objext'
8378   { (eval echo "$as_me:8378: \"$ac_try\"") >&5
8379   (eval $ac_try) 2>&5
8380   ac_status=$?
8381   echo "$as_me:8381: \$? = $ac_status" >&5
8382   (exit $ac_status); }; }; then
8383   cf_cv_xopen_source=no
8384 else
8385   echo "$as_me: failed program was:" >&5
8386 cat conftest.$ac_ext >&5
8387 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8388 fi
8389 rm -f conftest.$ac_objext conftest.$ac_ext
8390         CPPFLAGS="$cf_save"
8391
8392 fi
8393 rm -f conftest.$ac_objext conftest.$ac_ext
8394
8395 fi
8396 echo "$as_me:8396: result: $cf_cv_xopen_source" >&5
8397 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8398
8399 if test "$cf_cv_xopen_source" != no ; then
8400
8401 CFLAGS=`echo "$CFLAGS" | \
8402         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8403                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8404
8405 CPPFLAGS=`echo "$CPPFLAGS" | \
8406         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8407                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8408
8409         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8410
8411 cf_fix_cppflags=no
8412 cf_new_cflags=
8413 cf_new_cppflags=
8414 cf_new_extra_cppflags=
8415
8416 for cf_add_cflags in $cf_temp_xopen_source
8417 do
8418 case $cf_fix_cppflags in
8419 no)
8420         case $cf_add_cflags in #(vi
8421         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8422                 case $cf_add_cflags in
8423                 -D*)
8424                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8425
8426                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8427                                 && test -z "${cf_tst_cflags}" \
8428                                 && cf_fix_cppflags=yes
8429
8430                         if test $cf_fix_cppflags = yes ; then
8431                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8432                                 continue
8433                         elif test "${cf_tst_cflags}" = "\"'" ; then
8434                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8435                                 continue
8436                         fi
8437                         ;;
8438                 esac
8439                 case "$CPPFLAGS" in
8440                 *$cf_add_cflags) #(vi
8441                         ;;
8442                 *) #(vi
8443                         case $cf_add_cflags in #(vi
8444                         -D*)
8445                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8446
8447 CPPFLAGS=`echo "$CPPFLAGS" | \
8448         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8449                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8450
8451                                 ;;
8452                         esac
8453                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8454                         ;;
8455                 esac
8456                 ;;
8457         *)
8458                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8459                 ;;
8460         esac
8461         ;;
8462 yes)
8463         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8464
8465         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8466
8467         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8468                 && test -z "${cf_tst_cflags}" \
8469                 && cf_fix_cppflags=no
8470         ;;
8471 esac
8472 done
8473
8474 if test -n "$cf_new_cflags" ; then
8475
8476         CFLAGS="$CFLAGS $cf_new_cflags"
8477 fi
8478
8479 if test -n "$cf_new_cppflags" ; then
8480
8481         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8482 fi
8483
8484 if test -n "$cf_new_extra_cppflags" ; then
8485
8486         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8487 fi
8488
8489 fi
8490
8491 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8492
8493 cf_save_CFLAGS="$CFLAGS"
8494 cf_save_CPPFLAGS="$CPPFLAGS"
8495
8496 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8497         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8498                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8499
8500 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8501         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8502                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8503
8504 echo "$as_me:8504: checking if we should define _POSIX_C_SOURCE" >&5
8505 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8506 if test "${cf_cv_posix_c_source+set}" = set; then
8507   echo $ECHO_N "(cached) $ECHO_C" >&6
8508 else
8509
8510 echo "${as_me:-configure}:8510: testing if the symbol is already defined go no further ..." 1>&5
8511
8512         cat >conftest.$ac_ext <<_ACEOF
8513 #line 8513 "configure"
8514 #include "confdefs.h"
8515 #include <sys/types.h>
8516 int
8517 main ()
8518 {
8519
8520 #ifndef _POSIX_C_SOURCE
8521 make an error
8522 #endif
8523   ;
8524   return 0;
8525 }
8526 _ACEOF
8527 rm -f conftest.$ac_objext
8528 if { (eval echo "$as_me:8528: \"$ac_compile\"") >&5
8529   (eval $ac_compile) 2>&5
8530   ac_status=$?
8531   echo "$as_me:8531: \$? = $ac_status" >&5
8532   (exit $ac_status); } &&
8533          { ac_try='test -s conftest.$ac_objext'
8534   { (eval echo "$as_me:8534: \"$ac_try\"") >&5
8535   (eval $ac_try) 2>&5
8536   ac_status=$?
8537   echo "$as_me:8537: \$? = $ac_status" >&5
8538   (exit $ac_status); }; }; then
8539   cf_cv_posix_c_source=no
8540 else
8541   echo "$as_me: failed program was:" >&5
8542 cat conftest.$ac_ext >&5
8543 cf_want_posix_source=no
8544          case .$cf_POSIX_C_SOURCE in #(vi
8545          .[12]??*) #(vi
8546                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8547                 ;;
8548          .2) #(vi
8549                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8550                 cf_want_posix_source=yes
8551                 ;;
8552          .*)
8553                 cf_want_posix_source=yes
8554                 ;;
8555          esac
8556          if test "$cf_want_posix_source" = yes ; then
8557                 cat >conftest.$ac_ext <<_ACEOF
8558 #line 8558 "configure"
8559 #include "confdefs.h"
8560 #include <sys/types.h>
8561 int
8562 main ()
8563 {
8564
8565 #ifdef _POSIX_SOURCE
8566 make an error
8567 #endif
8568   ;
8569   return 0;
8570 }
8571 _ACEOF
8572 rm -f conftest.$ac_objext
8573 if { (eval echo "$as_me:8573: \"$ac_compile\"") >&5
8574   (eval $ac_compile) 2>&5
8575   ac_status=$?
8576   echo "$as_me:8576: \$? = $ac_status" >&5
8577   (exit $ac_status); } &&
8578          { ac_try='test -s conftest.$ac_objext'
8579   { (eval echo "$as_me:8579: \"$ac_try\"") >&5
8580   (eval $ac_try) 2>&5
8581   ac_status=$?
8582   echo "$as_me:8582: \$? = $ac_status" >&5
8583   (exit $ac_status); }; }; then
8584   :
8585 else
8586   echo "$as_me: failed program was:" >&5
8587 cat conftest.$ac_ext >&5
8588 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8589 fi
8590 rm -f conftest.$ac_objext conftest.$ac_ext
8591          fi
8592
8593 echo "${as_me:-configure}:8593: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8594
8595          CFLAGS="$cf_trim_CFLAGS"
8596          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8597
8598 echo "${as_me:-configure}:8598: testing if the second compile does not leave our definition intact error ..." 1>&5
8599
8600          cat >conftest.$ac_ext <<_ACEOF
8601 #line 8601 "configure"
8602 #include "confdefs.h"
8603 #include <sys/types.h>
8604 int
8605 main ()
8606 {
8607
8608 #ifndef _POSIX_C_SOURCE
8609 make an error
8610 #endif
8611   ;
8612   return 0;
8613 }
8614 _ACEOF
8615 rm -f conftest.$ac_objext
8616 if { (eval echo "$as_me:8616: \"$ac_compile\"") >&5
8617   (eval $ac_compile) 2>&5
8618   ac_status=$?
8619   echo "$as_me:8619: \$? = $ac_status" >&5
8620   (exit $ac_status); } &&
8621          { ac_try='test -s conftest.$ac_objext'
8622   { (eval echo "$as_me:8622: \"$ac_try\"") >&5
8623   (eval $ac_try) 2>&5
8624   ac_status=$?
8625   echo "$as_me:8625: \$? = $ac_status" >&5
8626   (exit $ac_status); }; }; then
8627   :
8628 else
8629   echo "$as_me: failed program was:" >&5
8630 cat conftest.$ac_ext >&5
8631 cf_cv_posix_c_source=no
8632 fi
8633 rm -f conftest.$ac_objext conftest.$ac_ext
8634          CFLAGS="$cf_save_CFLAGS"
8635          CPPFLAGS="$cf_save_CPPFLAGS"
8636
8637 fi
8638 rm -f conftest.$ac_objext conftest.$ac_ext
8639
8640 fi
8641 echo "$as_me:8641: result: $cf_cv_posix_c_source" >&5
8642 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8643
8644 if test "$cf_cv_posix_c_source" != no ; then
8645         CFLAGS="$cf_trim_CFLAGS"
8646         CPPFLAGS="$cf_trim_CPPFLAGS"
8647
8648 cf_fix_cppflags=no
8649 cf_new_cflags=
8650 cf_new_cppflags=
8651 cf_new_extra_cppflags=
8652
8653 for cf_add_cflags in $cf_cv_posix_c_source
8654 do
8655 case $cf_fix_cppflags in
8656 no)
8657         case $cf_add_cflags in #(vi
8658         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8659                 case $cf_add_cflags in
8660                 -D*)
8661                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8662
8663                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8664                                 && test -z "${cf_tst_cflags}" \
8665                                 && cf_fix_cppflags=yes
8666
8667                         if test $cf_fix_cppflags = yes ; then
8668                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8669                                 continue
8670                         elif test "${cf_tst_cflags}" = "\"'" ; then
8671                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8672                                 continue
8673                         fi
8674                         ;;
8675                 esac
8676                 case "$CPPFLAGS" in
8677                 *$cf_add_cflags) #(vi
8678                         ;;
8679                 *) #(vi
8680                         case $cf_add_cflags in #(vi
8681                         -D*)
8682                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8683
8684 CPPFLAGS=`echo "$CPPFLAGS" | \
8685         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8686                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8687
8688                                 ;;
8689                         esac
8690                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8691                         ;;
8692                 esac
8693                 ;;
8694         *)
8695                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8696                 ;;
8697         esac
8698         ;;
8699 yes)
8700         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8701
8702         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8703
8704         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8705                 && test -z "${cf_tst_cflags}" \
8706                 && cf_fix_cppflags=no
8707         ;;
8708 esac
8709 done
8710
8711 if test -n "$cf_new_cflags" ; then
8712
8713         CFLAGS="$CFLAGS $cf_new_cflags"
8714 fi
8715
8716 if test -n "$cf_new_cppflags" ; then
8717
8718         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8719 fi
8720
8721 if test -n "$cf_new_extra_cppflags" ; then
8722
8723         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8724 fi
8725
8726 fi
8727
8728         ;;
8729 esac
8730
8731 if test -n "$cf_xopen_source" ; then
8732
8733 cf_fix_cppflags=no
8734 cf_new_cflags=
8735 cf_new_cppflags=
8736 cf_new_extra_cppflags=
8737
8738 for cf_add_cflags in $cf_xopen_source
8739 do
8740 case $cf_fix_cppflags in
8741 no)
8742         case $cf_add_cflags in #(vi
8743         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8744                 case $cf_add_cflags in
8745                 -D*)
8746                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8747
8748                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8749                                 && test -z "${cf_tst_cflags}" \
8750                                 && cf_fix_cppflags=yes
8751
8752                         if test $cf_fix_cppflags = yes ; then
8753                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8754                                 continue
8755                         elif test "${cf_tst_cflags}" = "\"'" ; then
8756                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8757                                 continue
8758                         fi
8759                         ;;
8760                 esac
8761                 case "$CPPFLAGS" in
8762                 *$cf_add_cflags) #(vi
8763                         ;;
8764                 *) #(vi
8765                         case $cf_add_cflags in #(vi
8766                         -D*)
8767                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8768
8769 CPPFLAGS=`echo "$CPPFLAGS" | \
8770         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8771                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8772
8773                                 ;;
8774                         esac
8775                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8776                         ;;
8777                 esac
8778                 ;;
8779         *)
8780                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8781                 ;;
8782         esac
8783         ;;
8784 yes)
8785         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8786
8787         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8788
8789         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8790                 && test -z "${cf_tst_cflags}" \
8791                 && cf_fix_cppflags=no
8792         ;;
8793 esac
8794 done
8795
8796 if test -n "$cf_new_cflags" ; then
8797         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8798
8799 echo "${as_me:-configure}:8799: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8800
8801         CFLAGS="$CFLAGS $cf_new_cflags"
8802 fi
8803
8804 if test -n "$cf_new_cppflags" ; then
8805         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8806
8807 echo "${as_me:-configure}:8807: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8808
8809         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8810 fi
8811
8812 if test -n "$cf_new_extra_cppflags" ; then
8813         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8814
8815 echo "${as_me:-configure}:8815: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8816
8817         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8818 fi
8819
8820 fi
8821
8822 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8823         echo "$as_me:8823: checking if _XOPEN_SOURCE really is set" >&5
8824 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8825         cat >conftest.$ac_ext <<_ACEOF
8826 #line 8826 "configure"
8827 #include "confdefs.h"
8828 #include <stdlib.h>
8829 int
8830 main ()
8831 {
8832
8833 #ifndef _XOPEN_SOURCE
8834 make an error
8835 #endif
8836   ;
8837   return 0;
8838 }
8839 _ACEOF
8840 rm -f conftest.$ac_objext
8841 if { (eval echo "$as_me:8841: \"$ac_compile\"") >&5
8842   (eval $ac_compile) 2>&5
8843   ac_status=$?
8844   echo "$as_me:8844: \$? = $ac_status" >&5
8845   (exit $ac_status); } &&
8846          { ac_try='test -s conftest.$ac_objext'
8847   { (eval echo "$as_me:8847: \"$ac_try\"") >&5
8848   (eval $ac_try) 2>&5
8849   ac_status=$?
8850   echo "$as_me:8850: \$? = $ac_status" >&5
8851   (exit $ac_status); }; }; then
8852   cf_XOPEN_SOURCE_set=yes
8853 else
8854   echo "$as_me: failed program was:" >&5
8855 cat conftest.$ac_ext >&5
8856 cf_XOPEN_SOURCE_set=no
8857 fi
8858 rm -f conftest.$ac_objext conftest.$ac_ext
8859         echo "$as_me:8859: result: $cf_XOPEN_SOURCE_set" >&5
8860 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8861         if test $cf_XOPEN_SOURCE_set = yes
8862         then
8863                 cat >conftest.$ac_ext <<_ACEOF
8864 #line 8864 "configure"
8865 #include "confdefs.h"
8866 #include <stdlib.h>
8867 int
8868 main ()
8869 {
8870
8871 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8872 make an error
8873 #endif
8874   ;
8875   return 0;
8876 }
8877 _ACEOF
8878 rm -f conftest.$ac_objext
8879 if { (eval echo "$as_me:8879: \"$ac_compile\"") >&5
8880   (eval $ac_compile) 2>&5
8881   ac_status=$?
8882   echo "$as_me:8882: \$? = $ac_status" >&5
8883   (exit $ac_status); } &&
8884          { ac_try='test -s conftest.$ac_objext'
8885   { (eval echo "$as_me:8885: \"$ac_try\"") >&5
8886   (eval $ac_try) 2>&5
8887   ac_status=$?
8888   echo "$as_me:8888: \$? = $ac_status" >&5
8889   (exit $ac_status); }; }; then
8890   cf_XOPEN_SOURCE_set_ok=yes
8891 else
8892   echo "$as_me: failed program was:" >&5
8893 cat conftest.$ac_ext >&5
8894 cf_XOPEN_SOURCE_set_ok=no
8895 fi
8896 rm -f conftest.$ac_objext conftest.$ac_ext
8897                 if test $cf_XOPEN_SOURCE_set_ok = no
8898                 then
8899                         { echo "$as_me:8899: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8900 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8901                 fi
8902         else
8903
8904 echo "$as_me:8904: checking if we should define _XOPEN_SOURCE" >&5
8905 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8906 if test "${cf_cv_xopen_source+set}" = set; then
8907   echo $ECHO_N "(cached) $ECHO_C" >&6
8908 else
8909
8910         cat >conftest.$ac_ext <<_ACEOF
8911 #line 8911 "configure"
8912 #include "confdefs.h"
8913
8914 #include <stdlib.h>
8915 #include <string.h>
8916 #include <sys/types.h>
8917
8918 int
8919 main ()
8920 {
8921
8922 #ifndef _XOPEN_SOURCE
8923 make an error
8924 #endif
8925   ;
8926   return 0;
8927 }
8928 _ACEOF
8929 rm -f conftest.$ac_objext
8930 if { (eval echo "$as_me:8930: \"$ac_compile\"") >&5
8931   (eval $ac_compile) 2>&5
8932   ac_status=$?
8933   echo "$as_me:8933: \$? = $ac_status" >&5
8934   (exit $ac_status); } &&
8935          { ac_try='test -s conftest.$ac_objext'
8936   { (eval echo "$as_me:8936: \"$ac_try\"") >&5
8937   (eval $ac_try) 2>&5
8938   ac_status=$?
8939   echo "$as_me:8939: \$? = $ac_status" >&5
8940   (exit $ac_status); }; }; then
8941   cf_cv_xopen_source=no
8942 else
8943   echo "$as_me: failed program was:" >&5
8944 cat conftest.$ac_ext >&5
8945 cf_save="$CPPFLAGS"
8946          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8947          cat >conftest.$ac_ext <<_ACEOF
8948 #line 8948 "configure"
8949 #include "confdefs.h"
8950
8951 #include <stdlib.h>
8952 #include <string.h>
8953 #include <sys/types.h>
8954
8955 int
8956 main ()
8957 {
8958
8959 #ifdef _XOPEN_SOURCE
8960 make an error
8961 #endif
8962   ;
8963   return 0;
8964 }
8965 _ACEOF
8966 rm -f conftest.$ac_objext
8967 if { (eval echo "$as_me:8967: \"$ac_compile\"") >&5
8968   (eval $ac_compile) 2>&5
8969   ac_status=$?
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); } &&
8972          { ac_try='test -s conftest.$ac_objext'
8973   { (eval echo "$as_me:8973: \"$ac_try\"") >&5
8974   (eval $ac_try) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); }; }; then
8978   cf_cv_xopen_source=no
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 cat conftest.$ac_ext >&5
8982 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8983 fi
8984 rm -f conftest.$ac_objext conftest.$ac_ext
8985         CPPFLAGS="$cf_save"
8986
8987 fi
8988 rm -f conftest.$ac_objext conftest.$ac_ext
8989
8990 fi
8991 echo "$as_me:8991: result: $cf_cv_xopen_source" >&5
8992 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8993
8994 if test "$cf_cv_xopen_source" != no ; then
8995
8996 CFLAGS=`echo "$CFLAGS" | \
8997         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8998                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8999
9000 CPPFLAGS=`echo "$CPPFLAGS" | \
9001         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9002                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9003
9004         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9005
9006 cf_fix_cppflags=no
9007 cf_new_cflags=
9008 cf_new_cppflags=
9009 cf_new_extra_cppflags=
9010
9011 for cf_add_cflags in $cf_temp_xopen_source
9012 do
9013 case $cf_fix_cppflags in
9014 no)
9015         case $cf_add_cflags in #(vi
9016         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9017                 case $cf_add_cflags in
9018                 -D*)
9019                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9020
9021                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9022                                 && test -z "${cf_tst_cflags}" \
9023                                 && cf_fix_cppflags=yes
9024
9025                         if test $cf_fix_cppflags = yes ; then
9026                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9027                                 continue
9028                         elif test "${cf_tst_cflags}" = "\"'" ; then
9029                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9030                                 continue
9031                         fi
9032                         ;;
9033                 esac
9034                 case "$CPPFLAGS" in
9035                 *$cf_add_cflags) #(vi
9036                         ;;
9037                 *) #(vi
9038                         case $cf_add_cflags in #(vi
9039                         -D*)
9040                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9041
9042 CPPFLAGS=`echo "$CPPFLAGS" | \
9043         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9044                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9045
9046                                 ;;
9047                         esac
9048                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9049                         ;;
9050                 esac
9051                 ;;
9052         *)
9053                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9054                 ;;
9055         esac
9056         ;;
9057 yes)
9058         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9059
9060         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9061
9062         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9063                 && test -z "${cf_tst_cflags}" \
9064                 && cf_fix_cppflags=no
9065         ;;
9066 esac
9067 done
9068
9069 if test -n "$cf_new_cflags" ; then
9070
9071         CFLAGS="$CFLAGS $cf_new_cflags"
9072 fi
9073
9074 if test -n "$cf_new_cppflags" ; then
9075
9076         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9077 fi
9078
9079 if test -n "$cf_new_extra_cppflags" ; then
9080
9081         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9082 fi
9083
9084 fi
9085
9086         fi
9087 fi
9088
9089 # Check whether --enable-largefile or --disable-largefile was given.
9090 if test "${enable_largefile+set}" = set; then
9091   enableval="$enable_largefile"
9092
9093 fi;
9094 if test "$enable_largefile" != no; then
9095
9096   echo "$as_me:9096: checking for special C compiler options needed for large files" >&5
9097 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9098 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9099   echo $ECHO_N "(cached) $ECHO_C" >&6
9100 else
9101   ac_cv_sys_largefile_CC=no
9102      if test "$GCC" != yes; then
9103        ac_save_CC=$CC
9104        while :; do
9105          # IRIX 6.2 and later do not support large files by default,
9106          # so use the C compiler's -n32 option if that helps.
9107          cat >conftest.$ac_ext <<_ACEOF
9108 #line 9108 "configure"
9109 #include "confdefs.h"
9110 #include <sys/types.h>
9111  /* Check that off_t can represent 2**63 - 1 correctly.
9112     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9113     since some C++ compilers masquerading as C compilers
9114     incorrectly reject 9223372036854775807.  */
9115 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9116   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9117                        && LARGE_OFF_T % 2147483647 == 1)
9118                       ? 1 : -1];
9119 int
9120 main ()
9121 {
9122
9123   ;
9124   return 0;
9125 }
9126 _ACEOF
9127          rm -f conftest.$ac_objext
9128 if { (eval echo "$as_me:9128: \"$ac_compile\"") >&5
9129   (eval $ac_compile) 2>&5
9130   ac_status=$?
9131   echo "$as_me:9131: \$? = $ac_status" >&5
9132   (exit $ac_status); } &&
9133          { ac_try='test -s conftest.$ac_objext'
9134   { (eval echo "$as_me:9134: \"$ac_try\"") >&5
9135   (eval $ac_try) 2>&5
9136   ac_status=$?
9137   echo "$as_me:9137: \$? = $ac_status" >&5
9138   (exit $ac_status); }; }; then
9139   break
9140 else
9141   echo "$as_me: failed program was:" >&5
9142 cat conftest.$ac_ext >&5
9143 fi
9144 rm -f conftest.$ac_objext
9145          CC="$CC -n32"
9146          rm -f conftest.$ac_objext
9147 if { (eval echo "$as_me:9147: \"$ac_compile\"") >&5
9148   (eval $ac_compile) 2>&5
9149   ac_status=$?
9150   echo "$as_me:9150: \$? = $ac_status" >&5
9151   (exit $ac_status); } &&
9152          { ac_try='test -s conftest.$ac_objext'
9153   { (eval echo "$as_me:9153: \"$ac_try\"") >&5
9154   (eval $ac_try) 2>&5
9155   ac_status=$?
9156   echo "$as_me:9156: \$? = $ac_status" >&5
9157   (exit $ac_status); }; }; then
9158   ac_cv_sys_largefile_CC=' -n32'; break
9159 else
9160   echo "$as_me: failed program was:" >&5
9161 cat conftest.$ac_ext >&5
9162 fi
9163 rm -f conftest.$ac_objext
9164          break
9165        done
9166        CC=$ac_save_CC
9167        rm -f conftest.$ac_ext
9168     fi
9169 fi
9170 echo "$as_me:9170: result: $ac_cv_sys_largefile_CC" >&5
9171 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9172   if test "$ac_cv_sys_largefile_CC" != no; then
9173     CC=$CC$ac_cv_sys_largefile_CC
9174   fi
9175
9176   echo "$as_me:9176: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9177 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9178 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9179   echo $ECHO_N "(cached) $ECHO_C" >&6
9180 else
9181   while :; do
9182   ac_cv_sys_file_offset_bits=no
9183   cat >conftest.$ac_ext <<_ACEOF
9184 #line 9184 "configure"
9185 #include "confdefs.h"
9186 #include <sys/types.h>
9187  /* Check that off_t can represent 2**63 - 1 correctly.
9188     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9189     since some C++ compilers masquerading as C compilers
9190     incorrectly reject 9223372036854775807.  */
9191 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9192   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9193                        && LARGE_OFF_T % 2147483647 == 1)
9194                       ? 1 : -1];
9195 int
9196 main ()
9197 {
9198
9199   ;
9200   return 0;
9201 }
9202 _ACEOF
9203 rm -f conftest.$ac_objext
9204 if { (eval echo "$as_me:9204: \"$ac_compile\"") >&5
9205   (eval $ac_compile) 2>&5
9206   ac_status=$?
9207   echo "$as_me:9207: \$? = $ac_status" >&5
9208   (exit $ac_status); } &&
9209          { ac_try='test -s conftest.$ac_objext'
9210   { (eval echo "$as_me:9210: \"$ac_try\"") >&5
9211   (eval $ac_try) 2>&5
9212   ac_status=$?
9213   echo "$as_me:9213: \$? = $ac_status" >&5
9214   (exit $ac_status); }; }; then
9215   break
9216 else
9217   echo "$as_me: failed program was:" >&5
9218 cat conftest.$ac_ext >&5
9219 fi
9220 rm -f conftest.$ac_objext conftest.$ac_ext
9221   cat >conftest.$ac_ext <<_ACEOF
9222 #line 9222 "configure"
9223 #include "confdefs.h"
9224 #define _FILE_OFFSET_BITS 64
9225 #include <sys/types.h>
9226  /* Check that off_t can represent 2**63 - 1 correctly.
9227     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9228     since some C++ compilers masquerading as C compilers
9229     incorrectly reject 9223372036854775807.  */
9230 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9231   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9232                        && LARGE_OFF_T % 2147483647 == 1)
9233                       ? 1 : -1];
9234 int
9235 main ()
9236 {
9237
9238   ;
9239   return 0;
9240 }
9241 _ACEOF
9242 rm -f conftest.$ac_objext
9243 if { (eval echo "$as_me:9243: \"$ac_compile\"") >&5
9244   (eval $ac_compile) 2>&5
9245   ac_status=$?
9246   echo "$as_me:9246: \$? = $ac_status" >&5
9247   (exit $ac_status); } &&
9248          { ac_try='test -s conftest.$ac_objext'
9249   { (eval echo "$as_me:9249: \"$ac_try\"") >&5
9250   (eval $ac_try) 2>&5
9251   ac_status=$?
9252   echo "$as_me:9252: \$? = $ac_status" >&5
9253   (exit $ac_status); }; }; then
9254   ac_cv_sys_file_offset_bits=64; break
9255 else
9256   echo "$as_me: failed program was:" >&5
9257 cat conftest.$ac_ext >&5
9258 fi
9259 rm -f conftest.$ac_objext conftest.$ac_ext
9260   break
9261 done
9262 fi
9263 echo "$as_me:9263: result: $ac_cv_sys_file_offset_bits" >&5
9264 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9265 if test "$ac_cv_sys_file_offset_bits" != no; then
9266
9267 cat >>confdefs.h <<EOF
9268 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9269 EOF
9270
9271 fi
9272 rm -rf conftest*
9273   echo "$as_me:9273: checking for _LARGE_FILES value needed for large files" >&5
9274 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9275 if test "${ac_cv_sys_large_files+set}" = set; then
9276   echo $ECHO_N "(cached) $ECHO_C" >&6
9277 else
9278   while :; do
9279   ac_cv_sys_large_files=no
9280   cat >conftest.$ac_ext <<_ACEOF
9281 #line 9281 "configure"
9282 #include "confdefs.h"
9283 #include <sys/types.h>
9284  /* Check that off_t can represent 2**63 - 1 correctly.
9285     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9286     since some C++ compilers masquerading as C compilers
9287     incorrectly reject 9223372036854775807.  */
9288 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9289   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9290                        && LARGE_OFF_T % 2147483647 == 1)
9291                       ? 1 : -1];
9292 int
9293 main ()
9294 {
9295
9296   ;
9297   return 0;
9298 }
9299 _ACEOF
9300 rm -f conftest.$ac_objext
9301 if { (eval echo "$as_me:9301: \"$ac_compile\"") >&5
9302   (eval $ac_compile) 2>&5
9303   ac_status=$?
9304   echo "$as_me:9304: \$? = $ac_status" >&5
9305   (exit $ac_status); } &&
9306          { ac_try='test -s conftest.$ac_objext'
9307   { (eval echo "$as_me:9307: \"$ac_try\"") >&5
9308   (eval $ac_try) 2>&5
9309   ac_status=$?
9310   echo "$as_me:9310: \$? = $ac_status" >&5
9311   (exit $ac_status); }; }; then
9312   break
9313 else
9314   echo "$as_me: failed program was:" >&5
9315 cat conftest.$ac_ext >&5
9316 fi
9317 rm -f conftest.$ac_objext conftest.$ac_ext
9318   cat >conftest.$ac_ext <<_ACEOF
9319 #line 9319 "configure"
9320 #include "confdefs.h"
9321 #define _LARGE_FILES 1
9322 #include <sys/types.h>
9323  /* Check that off_t can represent 2**63 - 1 correctly.
9324     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9325     since some C++ compilers masquerading as C compilers
9326     incorrectly reject 9223372036854775807.  */
9327 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9328   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9329                        && LARGE_OFF_T % 2147483647 == 1)
9330                       ? 1 : -1];
9331 int
9332 main ()
9333 {
9334
9335   ;
9336   return 0;
9337 }
9338 _ACEOF
9339 rm -f conftest.$ac_objext
9340 if { (eval echo "$as_me:9340: \"$ac_compile\"") >&5
9341   (eval $ac_compile) 2>&5
9342   ac_status=$?
9343   echo "$as_me:9343: \$? = $ac_status" >&5
9344   (exit $ac_status); } &&
9345          { ac_try='test -s conftest.$ac_objext'
9346   { (eval echo "$as_me:9346: \"$ac_try\"") >&5
9347   (eval $ac_try) 2>&5
9348   ac_status=$?
9349   echo "$as_me:9349: \$? = $ac_status" >&5
9350   (exit $ac_status); }; }; then
9351   ac_cv_sys_large_files=1; break
9352 else
9353   echo "$as_me: failed program was:" >&5
9354 cat conftest.$ac_ext >&5
9355 fi
9356 rm -f conftest.$ac_objext conftest.$ac_ext
9357   break
9358 done
9359 fi
9360 echo "$as_me:9360: result: $ac_cv_sys_large_files" >&5
9361 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9362 if test "$ac_cv_sys_large_files" != no; then
9363
9364 cat >>confdefs.h <<EOF
9365 #define _LARGE_FILES $ac_cv_sys_large_files
9366 EOF
9367
9368 fi
9369 rm -rf conftest*
9370 fi
9371
9372     if test "$enable_largefile" != no ; then
9373         echo "$as_me:9373: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9374 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9375 if test "${ac_cv_sys_largefile_source+set}" = set; then
9376   echo $ECHO_N "(cached) $ECHO_C" >&6
9377 else
9378   while :; do
9379   ac_cv_sys_largefile_source=no
9380   cat >conftest.$ac_ext <<_ACEOF
9381 #line 9381 "configure"
9382 #include "confdefs.h"
9383 #include <stdio.h>
9384 int
9385 main ()
9386 {
9387 return !fseeko;
9388   ;
9389   return 0;
9390 }
9391 _ACEOF
9392 rm -f conftest.$ac_objext
9393 if { (eval echo "$as_me:9393: \"$ac_compile\"") >&5
9394   (eval $ac_compile) 2>&5
9395   ac_status=$?
9396   echo "$as_me:9396: \$? = $ac_status" >&5
9397   (exit $ac_status); } &&
9398          { ac_try='test -s conftest.$ac_objext'
9399   { (eval echo "$as_me:9399: \"$ac_try\"") >&5
9400   (eval $ac_try) 2>&5
9401   ac_status=$?
9402   echo "$as_me:9402: \$? = $ac_status" >&5
9403   (exit $ac_status); }; }; then
9404   break
9405 else
9406   echo "$as_me: failed program was:" >&5
9407 cat conftest.$ac_ext >&5
9408 fi
9409 rm -f conftest.$ac_objext conftest.$ac_ext
9410   cat >conftest.$ac_ext <<_ACEOF
9411 #line 9411 "configure"
9412 #include "confdefs.h"
9413 #define _LARGEFILE_SOURCE 1
9414 #include <stdio.h>
9415 int
9416 main ()
9417 {
9418 return !fseeko;
9419   ;
9420   return 0;
9421 }
9422 _ACEOF
9423 rm -f conftest.$ac_objext
9424 if { (eval echo "$as_me:9424: \"$ac_compile\"") >&5
9425   (eval $ac_compile) 2>&5
9426   ac_status=$?
9427   echo "$as_me:9427: \$? = $ac_status" >&5
9428   (exit $ac_status); } &&
9429          { ac_try='test -s conftest.$ac_objext'
9430   { (eval echo "$as_me:9430: \"$ac_try\"") >&5
9431   (eval $ac_try) 2>&5
9432   ac_status=$?
9433   echo "$as_me:9433: \$? = $ac_status" >&5
9434   (exit $ac_status); }; }; then
9435   ac_cv_sys_largefile_source=1; break
9436 else
9437   echo "$as_me: failed program was:" >&5
9438 cat conftest.$ac_ext >&5
9439 fi
9440 rm -f conftest.$ac_objext conftest.$ac_ext
9441   break
9442 done
9443 fi
9444 echo "$as_me:9444: result: $ac_cv_sys_largefile_source" >&5
9445 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9446 if test "$ac_cv_sys_largefile_source" != no; then
9447
9448 cat >>confdefs.h <<EOF
9449 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9450 EOF
9451
9452 fi
9453 rm -rf conftest*
9454
9455 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9456 # in glibc 2.1.3, but that breaks too many other things.
9457 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9458 echo "$as_me:9458: checking for fseeko" >&5
9459 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9460 if test "${ac_cv_func_fseeko+set}" = set; then
9461   echo $ECHO_N "(cached) $ECHO_C" >&6
9462 else
9463   cat >conftest.$ac_ext <<_ACEOF
9464 #line 9464 "configure"
9465 #include "confdefs.h"
9466 #include <stdio.h>
9467 int
9468 main ()
9469 {
9470 return fseeko && fseeko (stdin, 0, 0);
9471   ;
9472   return 0;
9473 }
9474 _ACEOF
9475 rm -f conftest.$ac_objext conftest$ac_exeext
9476 if { (eval echo "$as_me:9476: \"$ac_link\"") >&5
9477   (eval $ac_link) 2>&5
9478   ac_status=$?
9479   echo "$as_me:9479: \$? = $ac_status" >&5
9480   (exit $ac_status); } &&
9481          { ac_try='test -s conftest$ac_exeext'
9482   { (eval echo "$as_me:9482: \"$ac_try\"") >&5
9483   (eval $ac_try) 2>&5
9484   ac_status=$?
9485   echo "$as_me:9485: \$? = $ac_status" >&5
9486   (exit $ac_status); }; }; then
9487   ac_cv_func_fseeko=yes
9488 else
9489   echo "$as_me: failed program was:" >&5
9490 cat conftest.$ac_ext >&5
9491 ac_cv_func_fseeko=no
9492 fi
9493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9494 fi
9495 echo "$as_me:9495: result: $ac_cv_func_fseeko" >&5
9496 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9497 if test $ac_cv_func_fseeko = yes; then
9498
9499 cat >>confdefs.h <<\EOF
9500 #define HAVE_FSEEKO 1
9501 EOF
9502
9503 fi
9504
9505         # Normally we would collect these definitions in the config.h,
9506         # but (like _XOPEN_SOURCE), some environments rely on having these
9507         # defined before any of the system headers are included.  Another
9508         # case comes up with C++, e.g., on AIX the compiler compiles the
9509         # header files by themselves before looking at the body files it is
9510         # told to compile.  For ncurses, those header files do not include
9511         # the config.h
9512         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9513         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9514         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9515
9516         echo "$as_me:9516: checking whether to use struct dirent64" >&5
9517 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9518 if test "${cf_cv_struct_dirent64+set}" = set; then
9519   echo $ECHO_N "(cached) $ECHO_C" >&6
9520 else
9521
9522                 cat >conftest.$ac_ext <<_ACEOF
9523 #line 9523 "configure"
9524 #include "confdefs.h"
9525
9526 #include <sys/types.h>
9527 #include <dirent.h>
9528
9529 int
9530 main ()
9531 {
9532
9533                 /* if transitional largefile support is setup, this is true */
9534                 extern struct dirent64 * readdir(DIR *);
9535                 struct dirent64 *x = readdir((DIR *)0);
9536                 struct dirent *y = readdir((DIR *)0);
9537                 int z = x - y;
9538
9539   ;
9540   return 0;
9541 }
9542 _ACEOF
9543 rm -f conftest.$ac_objext
9544 if { (eval echo "$as_me:9544: \"$ac_compile\"") >&5
9545   (eval $ac_compile) 2>&5
9546   ac_status=$?
9547   echo "$as_me:9547: \$? = $ac_status" >&5
9548   (exit $ac_status); } &&
9549          { ac_try='test -s conftest.$ac_objext'
9550   { (eval echo "$as_me:9550: \"$ac_try\"") >&5
9551   (eval $ac_try) 2>&5
9552   ac_status=$?
9553   echo "$as_me:9553: \$? = $ac_status" >&5
9554   (exit $ac_status); }; }; then
9555   cf_cv_struct_dirent64=yes
9556 else
9557   echo "$as_me: failed program was:" >&5
9558 cat conftest.$ac_ext >&5
9559 cf_cv_struct_dirent64=no
9560 fi
9561 rm -f conftest.$ac_objext conftest.$ac_ext
9562
9563 fi
9564 echo "$as_me:9564: result: $cf_cv_struct_dirent64" >&5
9565 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9566         test "$cf_cv_struct_dirent64" = yes &&
9567 cat >>confdefs.h <<\EOF
9568 #define HAVE_STRUCT_DIRENT64 1
9569 EOF
9570
9571     fi
9572
9573 ### Enable compiling-in rcs id's
9574 echo "$as_me:9574: checking if RCS identifiers should be compiled-in" >&5
9575 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9576
9577 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9578 if test "${with_rcs_ids+set}" = set; then
9579   withval="$with_rcs_ids"
9580   with_rcs_ids=$withval
9581 else
9582   with_rcs_ids=no
9583 fi;
9584 echo "$as_me:9584: result: $with_rcs_ids" >&5
9585 echo "${ECHO_T}$with_rcs_ids" >&6
9586 test "$with_rcs_ids" = yes &&
9587 cat >>confdefs.h <<\EOF
9588 #define USE_RCS_IDS 1
9589 EOF
9590
9591 ###############################################################################
9592
9593 ### Note that some functions (such as const) are normally disabled anyway.
9594 echo "$as_me:9594: checking if you want to build with function extensions" >&5
9595 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9596
9597 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9598 if test "${enable_ext_funcs+set}" = set; then
9599   enableval="$enable_ext_funcs"
9600   with_ext_funcs=$enableval
9601 else
9602   with_ext_funcs=yes
9603 fi;
9604 echo "$as_me:9604: result: $with_ext_funcs" >&5
9605 echo "${ECHO_T}$with_ext_funcs" >&6
9606 if test "$with_ext_funcs" = yes ; then
9607         NCURSES_EXT_FUNCS=1
9608
9609 cat >>confdefs.h <<\EOF
9610 #define HAVE_USE_DEFAULT_COLORS 1
9611 EOF
9612
9613 cat >>confdefs.h <<\EOF
9614 #define NCURSES_EXT_FUNCS 1
9615 EOF
9616
9617 else
9618         NCURSES_EXT_FUNCS=0
9619 fi
9620
9621 ###   use option --enable-const to turn on use of const beyond that in XSI.
9622 echo "$as_me:9622: checking for extended use of const keyword" >&5
9623 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9624
9625 # Check whether --enable-const or --disable-const was given.
9626 if test "${enable_const+set}" = set; then
9627   enableval="$enable_const"
9628   with_ext_const=$enableval
9629 else
9630   with_ext_const=no
9631 fi;
9632 echo "$as_me:9632: result: $with_ext_const" >&5
9633 echo "${ECHO_T}$with_ext_const" >&6
9634 NCURSES_CONST='/*nothing*/'
9635 if test "$with_ext_const" = yes ; then
9636         NCURSES_CONST=const
9637 fi
9638
9639 ###############################################################################
9640 # These options are relatively safe to experiment with.
9641
9642 echo "$as_me:9642: checking if you want all development code" >&5
9643 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9644
9645 # Check whether --with-develop or --without-develop was given.
9646 if test "${with_develop+set}" = set; then
9647   withval="$with_develop"
9648   with_develop=$withval
9649 else
9650   with_develop=no
9651 fi;
9652 echo "$as_me:9652: result: $with_develop" >&5
9653 echo "${ECHO_T}$with_develop" >&6
9654
9655 ###############################################################################
9656 # These are just experimental, probably should not be in a package:
9657
9658 # This is still experimental (20080329), but should ultimately be moved to
9659 # the script-block --with-normal, etc.
9660
9661 echo "$as_me:9661: checking if you want to link with the pthread library" >&5
9662 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9663
9664 # Check whether --with-pthread or --without-pthread was given.
9665 if test "${with_pthread+set}" = set; then
9666   withval="$with_pthread"
9667   with_pthread=$withval
9668 else
9669   with_pthread=no
9670 fi;
9671 echo "$as_me:9671: result: $with_pthread" >&5
9672 echo "${ECHO_T}$with_pthread" >&6
9673
9674 if test "$with_pthread" != no ; then
9675     echo "$as_me:9675: checking for pthread.h" >&5
9676 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9677 if test "${ac_cv_header_pthread_h+set}" = set; then
9678   echo $ECHO_N "(cached) $ECHO_C" >&6
9679 else
9680   cat >conftest.$ac_ext <<_ACEOF
9681 #line 9681 "configure"
9682 #include "confdefs.h"
9683 #include <pthread.h>
9684 _ACEOF
9685 if { (eval echo "$as_me:9685: \"$ac_cpp conftest.$ac_ext\"") >&5
9686   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9687   ac_status=$?
9688   egrep -v '^ *\+' conftest.er1 >conftest.err
9689   rm -f conftest.er1
9690   cat conftest.err >&5
9691   echo "$as_me:9691: \$? = $ac_status" >&5
9692   (exit $ac_status); } >/dev/null; then
9693   if test -s conftest.err; then
9694     ac_cpp_err=$ac_c_preproc_warn_flag
9695   else
9696     ac_cpp_err=
9697   fi
9698 else
9699   ac_cpp_err=yes
9700 fi
9701 if test -z "$ac_cpp_err"; then
9702   ac_cv_header_pthread_h=yes
9703 else
9704   echo "$as_me: failed program was:" >&5
9705   cat conftest.$ac_ext >&5
9706   ac_cv_header_pthread_h=no
9707 fi
9708 rm -f conftest.err conftest.$ac_ext
9709 fi
9710 echo "$as_me:9710: result: $ac_cv_header_pthread_h" >&5
9711 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9712 if test $ac_cv_header_pthread_h = yes; then
9713
9714 cat >>confdefs.h <<\EOF
9715 #define HAVE_PTHREADS_H 1
9716 EOF
9717
9718         for cf_lib_pthread in pthread c_r
9719         do
9720             echo "$as_me:9720: checking if we can link with the $cf_lib_pthread library" >&5
9721 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
9722             cf_save_LIBS="$LIBS"
9723
9724 cf_add_libs="-l$cf_lib_pthread"
9725 # Filter out duplicates - this happens with badly-designed ".pc" files...
9726 for cf_add_1lib in $LIBS
9727 do
9728         for cf_add_2lib in $cf_add_libs
9729         do
9730                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9731                 then
9732                         cf_add_1lib=
9733                         break
9734                 fi
9735         done
9736         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9737 done
9738 LIBS="$cf_add_libs"
9739
9740             cat >conftest.$ac_ext <<_ACEOF
9741 #line 9741 "configure"
9742 #include "confdefs.h"
9743
9744 #include <pthread.h>
9745
9746 int
9747 main ()
9748 {
9749
9750                 int rc = pthread_create(0,0,0,0);
9751                 int r2 = pthread_mutexattr_settype(0, 0);
9752
9753   ;
9754   return 0;
9755 }
9756 _ACEOF
9757 rm -f conftest.$ac_objext conftest$ac_exeext
9758 if { (eval echo "$as_me:9758: \"$ac_link\"") >&5
9759   (eval $ac_link) 2>&5
9760   ac_status=$?
9761   echo "$as_me:9761: \$? = $ac_status" >&5
9762   (exit $ac_status); } &&
9763          { ac_try='test -s conftest$ac_exeext'
9764   { (eval echo "$as_me:9764: \"$ac_try\"") >&5
9765   (eval $ac_try) 2>&5
9766   ac_status=$?
9767   echo "$as_me:9767: \$? = $ac_status" >&5
9768   (exit $ac_status); }; }; then
9769   with_pthread=yes
9770 else
9771   echo "$as_me: failed program was:" >&5
9772 cat conftest.$ac_ext >&5
9773 with_pthread=no
9774 fi
9775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9776             LIBS="$cf_save_LIBS"
9777             echo "$as_me:9777: result: $with_pthread" >&5
9778 echo "${ECHO_T}$with_pthread" >&6
9779             test "$with_pthread" = yes && break
9780         done
9781
9782         if test "$with_pthread" = yes ; then
9783
9784 cf_add_libs="-l$cf_lib_pthread"
9785 # Filter out duplicates - this happens with badly-designed ".pc" files...
9786 for cf_add_1lib in $LIBS
9787 do
9788         for cf_add_2lib in $cf_add_libs
9789         do
9790                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9791                 then
9792                         cf_add_1lib=
9793                         break
9794                 fi
9795         done
9796         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9797 done
9798 LIBS="$cf_add_libs"
9799
9800 cat >>confdefs.h <<\EOF
9801 #define HAVE_LIBPTHREADS 1
9802 EOF
9803
9804         else
9805             { { echo "$as_me:9805: error: Cannot link with pthread library" >&5
9806 echo "$as_me: error: Cannot link with pthread library" >&2;}
9807    { (exit 1); exit 1; }; }
9808         fi
9809
9810 fi
9811
9812 fi
9813
9814 echo "$as_me:9814: checking if you want to use weak-symbols for pthreads" >&5
9815 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9816
9817 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9818 if test "${enable_weak_symbols+set}" = set; then
9819   enableval="$enable_weak_symbols"
9820   use_weak_symbols=$withval
9821 else
9822   use_weak_symbols=no
9823 fi;
9824 echo "$as_me:9824: result: $use_weak_symbols" >&5
9825 echo "${ECHO_T}$use_weak_symbols" >&6
9826 if test "$use_weak_symbols" = yes ; then
9827
9828 echo "$as_me:9828: checking if $CC supports weak symbols" >&5
9829 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9830 if test "${cf_cv_weak_symbols+set}" = set; then
9831   echo $ECHO_N "(cached) $ECHO_C" >&6
9832 else
9833
9834 cat >conftest.$ac_ext <<_ACEOF
9835 #line 9835 "configure"
9836 #include "confdefs.h"
9837
9838 #include <stdio.h>
9839 int
9840 main ()
9841 {
9842
9843 #if defined(__GNUC__)
9844 #  if defined __USE_ISOC99
9845 #    define _cat_pragma(exp)    _Pragma(#exp)
9846 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9847 #  else
9848 #    define _weak_pragma(exp)
9849 #  endif
9850 #  define _declare(name)        __extension__ extern __typeof__(name) name
9851 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9852 #endif
9853
9854 weak_symbol(fopen);
9855
9856   ;
9857   return 0;
9858 }
9859 _ACEOF
9860 rm -f conftest.$ac_objext
9861 if { (eval echo "$as_me:9861: \"$ac_compile\"") >&5
9862   (eval $ac_compile) 2>&5
9863   ac_status=$?
9864   echo "$as_me:9864: \$? = $ac_status" >&5
9865   (exit $ac_status); } &&
9866          { ac_try='test -s conftest.$ac_objext'
9867   { (eval echo "$as_me:9867: \"$ac_try\"") >&5
9868   (eval $ac_try) 2>&5
9869   ac_status=$?
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit $ac_status); }; }; then
9872   cf_cv_weak_symbols=yes
9873 else
9874   echo "$as_me: failed program was:" >&5
9875 cat conftest.$ac_ext >&5
9876 cf_cv_weak_symbols=no
9877 fi
9878 rm -f conftest.$ac_objext conftest.$ac_ext
9879
9880 fi
9881 echo "$as_me:9881: result: $cf_cv_weak_symbols" >&5
9882 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9883
9884 else
9885     cf_cv_weak_symbols=no
9886 fi
9887
9888 if test $cf_cv_weak_symbols = yes ; then
9889
9890 cat >>confdefs.h <<\EOF
9891 #define USE_WEAK_SYMBOLS 1
9892 EOF
9893
9894 fi
9895
9896 PTHREAD=
9897 if test "$with_pthread" = "yes" ; then
9898
9899 cat >>confdefs.h <<\EOF
9900 #define USE_PTHREADS 1
9901 EOF
9902
9903     enable_reentrant=yes
9904     if test $cf_cv_weak_symbols = yes ; then
9905         PTHREAD=-lpthread
9906     fi
9907 fi
9908
9909 # OpenSUSE is installing ncurses6, using reentrant option.
9910 echo "$as_me:9910: checking for _nc_TABSIZE" >&5
9911 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9912 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9913   echo $ECHO_N "(cached) $ECHO_C" >&6
9914 else
9915   cat >conftest.$ac_ext <<_ACEOF
9916 #line 9916 "configure"
9917 #include "confdefs.h"
9918 /* System header to define __stub macros and hopefully few prototypes,
9919     which can conflict with char _nc_TABSIZE (); below.  */
9920 #include <assert.h>
9921 /* Override any gcc2 internal prototype to avoid an error.  */
9922 #ifdef __cplusplus
9923 extern "C"
9924 #endif
9925 /* We use char because int might match the return type of a gcc2
9926    builtin and then its argument prototype would still apply.  */
9927 char _nc_TABSIZE ();
9928 char (*f) ();
9929
9930 int
9931 main ()
9932 {
9933 /* The GNU C library defines this for functions which it implements
9934     to always fail with ENOSYS.  Some functions are actually named
9935     something starting with __ and the normal name is an alias.  */
9936 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9937 choke me
9938 #else
9939 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9940 #endif
9941
9942   ;
9943   return 0;
9944 }
9945 _ACEOF
9946 rm -f conftest.$ac_objext conftest$ac_exeext
9947 if { (eval echo "$as_me:9947: \"$ac_link\"") >&5
9948   (eval $ac_link) 2>&5
9949   ac_status=$?
9950   echo "$as_me:9950: \$? = $ac_status" >&5
9951   (exit $ac_status); } &&
9952          { ac_try='test -s conftest$ac_exeext'
9953   { (eval echo "$as_me:9953: \"$ac_try\"") >&5
9954   (eval $ac_try) 2>&5
9955   ac_status=$?
9956   echo "$as_me:9956: \$? = $ac_status" >&5
9957   (exit $ac_status); }; }; then
9958   ac_cv_func__nc_TABSIZE=yes
9959 else
9960   echo "$as_me: failed program was:" >&5
9961 cat conftest.$ac_ext >&5
9962 ac_cv_func__nc_TABSIZE=no
9963 fi
9964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9965 fi
9966 echo "$as_me:9966: result: $ac_cv_func__nc_TABSIZE" >&5
9967 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9968 if test $ac_cv_func__nc_TABSIZE = yes; then
9969   assume_reentrant=yes
9970 else
9971   assume_reentrant=no
9972 fi
9973
9974 # Reentrant code has to be opaque; there's little advantage to making ncurses
9975 # opaque outside of that, so there is no --enable-opaque option.  We can use
9976 # this option without --with-pthreads, but this will be always set for
9977 # pthreads.
9978 echo "$as_me:9978: checking if you want experimental reentrant code" >&5
9979 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9980
9981 # Check whether --enable-reentrant or --disable-reentrant was given.
9982 if test "${enable_reentrant+set}" = set; then
9983   enableval="$enable_reentrant"
9984   with_reentrant=$enableval
9985 else
9986   with_reentrant=$assume_reentrant
9987 fi;
9988 echo "$as_me:9988: result: $with_reentrant" >&5
9989 echo "${ECHO_T}$with_reentrant" >&6
9990 if test "$with_reentrant" = yes ; then
9991         cf_cv_enable_reentrant=1
9992         if test $cf_cv_weak_symbols = yes ; then
9993
9994 # remove pthread library from $LIBS
9995 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9996
9997         elif test "$assume_reentrant" = no ; then
9998                 LIB_SUFFIX="t${LIB_SUFFIX}"
9999         fi
10000
10001 cat >>confdefs.h <<\EOF
10002 #define USE_REENTRANT 1
10003 EOF
10004
10005 else
10006         cf_cv_enable_reentrant=0
10007 fi
10008
10009 ### Allow using a different wrap-prefix
10010 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10011         echo "$as_me:10011: checking for prefix used to wrap public variables" >&5
10012 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10013
10014 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10015 if test "${with_wrap_prefix+set}" = set; then
10016   withval="$with_wrap_prefix"
10017   NCURSES_WRAP_PREFIX=$withval
10018 else
10019   NCURSES_WRAP_PREFIX=_nc_
10020 fi;
10021         echo "$as_me:10021: result: $NCURSES_WRAP_PREFIX" >&5
10022 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10023 else
10024         NCURSES_WRAP_PREFIX=_nc_
10025 fi
10026
10027 cat >>confdefs.h <<EOF
10028 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10029 EOF
10030
10031 ###############################################################################
10032
10033 ###     use option --disable-echo to suppress full display compiling commands
10034
10035 echo "$as_me:10035: checking if you want to see long compiling messages" >&5
10036 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
10037
10038 # Check whether --enable-echo or --disable-echo was given.
10039 if test "${enable_echo+set}" = set; then
10040   enableval="$enable_echo"
10041   test "$enableval" != no && enableval=yes
10042   if test "$enableval" != "yes" ; then
10043
10044     ECHO_LT='--silent'
10045     ECHO_LD='@echo linking $@;'
10046     RULE_CC='@echo compiling $<'
10047     SHOW_CC='@echo compiling $@'
10048     ECHO_CC='@'
10049
10050   else
10051
10052     ECHO_LT=''
10053     ECHO_LD=''
10054     RULE_CC=''
10055     SHOW_CC=''
10056     ECHO_CC=''
10057
10058   fi
10059 else
10060   enableval=yes
10061
10062     ECHO_LT=''
10063     ECHO_LD=''
10064     RULE_CC=''
10065     SHOW_CC=''
10066     ECHO_CC=''
10067
10068 fi;
10069 echo "$as_me:10069: result: $enableval" >&5
10070 echo "${ECHO_T}$enableval" >&6
10071
10072 ###     use option --enable-warnings to turn on all gcc warnings
10073 echo "$as_me:10073: checking if you want to see compiler warnings" >&5
10074 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10075
10076 # Check whether --enable-warnings or --disable-warnings was given.
10077 if test "${enable_warnings+set}" = set; then
10078   enableval="$enable_warnings"
10079   with_warnings=$enableval
10080 fi;
10081 echo "$as_me:10081: result: $with_warnings" >&5
10082 echo "${ECHO_T}$with_warnings" >&6
10083
10084 if test "x$with_warnings" = "xyes"; then
10085
10086         ADAFLAGS="$ADAFLAGS -gnatg"
10087
10088 INTEL_COMPILER=no
10089
10090 if test "$GCC" = yes ; then
10091         case $host_os in
10092         linux*|gnu*)
10093                 echo "$as_me:10093: checking if this is really Intel C compiler" >&5
10094 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10095                 cf_save_CFLAGS="$CFLAGS"
10096                 CFLAGS="$CFLAGS -no-gcc"
10097                 cat >conftest.$ac_ext <<_ACEOF
10098 #line 10098 "configure"
10099 #include "confdefs.h"
10100
10101 int
10102 main ()
10103 {
10104
10105 #ifdef __INTEL_COMPILER
10106 #else
10107 make an error
10108 #endif
10109
10110   ;
10111   return 0;
10112 }
10113 _ACEOF
10114 rm -f conftest.$ac_objext
10115 if { (eval echo "$as_me:10115: \"$ac_compile\"") >&5
10116   (eval $ac_compile) 2>&5
10117   ac_status=$?
10118   echo "$as_me:10118: \$? = $ac_status" >&5
10119   (exit $ac_status); } &&
10120          { ac_try='test -s conftest.$ac_objext'
10121   { (eval echo "$as_me:10121: \"$ac_try\"") >&5
10122   (eval $ac_try) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit $ac_status); }; }; then
10126   INTEL_COMPILER=yes
10127 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
10128
10129 else
10130   echo "$as_me: failed program was:" >&5
10131 cat conftest.$ac_ext >&5
10132 fi
10133 rm -f conftest.$ac_objext conftest.$ac_ext
10134                 CFLAGS="$cf_save_CFLAGS"
10135                 echo "$as_me:10135: result: $INTEL_COMPILER" >&5
10136 echo "${ECHO_T}$INTEL_COMPILER" >&6
10137                 ;;
10138         esac
10139 fi
10140
10141 CLANG_COMPILER=no
10142
10143 if test "$GCC" = yes ; then
10144         echo "$as_me:10144: checking if this is really Clang C compiler" >&5
10145 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
10146         cf_save_CFLAGS="$CFLAGS"
10147         CFLAGS="$CFLAGS -Qunused-arguments"
10148         cat >conftest.$ac_ext <<_ACEOF
10149 #line 10149 "configure"
10150 #include "confdefs.h"
10151
10152 int
10153 main ()
10154 {
10155
10156 #ifdef __clang__
10157 #else
10158 make an error
10159 #endif
10160
10161   ;
10162   return 0;
10163 }
10164 _ACEOF
10165 rm -f conftest.$ac_objext
10166 if { (eval echo "$as_me:10166: \"$ac_compile\"") >&5
10167   (eval $ac_compile) 2>&5
10168   ac_status=$?
10169   echo "$as_me:10169: \$? = $ac_status" >&5
10170   (exit $ac_status); } &&
10171          { ac_try='test -s conftest.$ac_objext'
10172   { (eval echo "$as_me:10172: \"$ac_try\"") >&5
10173   (eval $ac_try) 2>&5
10174   ac_status=$?
10175   echo "$as_me:10175: \$? = $ac_status" >&5
10176   (exit $ac_status); }; }; then
10177   CLANG_COMPILER=yes
10178 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
10179
10180 else
10181   echo "$as_me: failed program was:" >&5
10182 cat conftest.$ac_ext >&5
10183 fi
10184 rm -f conftest.$ac_objext conftest.$ac_ext
10185         CFLAGS="$cf_save_CFLAGS"
10186         echo "$as_me:10186: result: $CLANG_COMPILER" >&5
10187 echo "${ECHO_T}$CLANG_COMPILER" >&6
10188 fi
10189
10190 cat > conftest.$ac_ext <<EOF
10191 #line 10191 "${as_me:-configure}"
10192 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10193 EOF
10194
10195 if test "$INTEL_COMPILER" = yes
10196 then
10197 # The "-wdXXX" options suppress warnings:
10198 # remark #1419: external declaration in primary source file
10199 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10200 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10201 # remark #193: zero used for undefined preprocessing identifier
10202 # remark #593: variable "curs_sb_left_arrow" was set but never used
10203 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10204 # remark #869: parameter "tw" was never referenced
10205 # remark #981: operands are evaluated in unspecified order
10206 # warning #279: controlling expression is constant
10207
10208         { echo "$as_me:10208: checking for $CC warning options..." >&5
10209 echo "$as_me: checking for $CC warning options..." >&6;}
10210         cf_save_CFLAGS="$CFLAGS"
10211         EXTRA_CFLAGS="-Wall"
10212         for cf_opt in \
10213                 wd1419 \
10214                 wd1683 \
10215                 wd1684 \
10216                 wd193 \
10217                 wd593 \
10218                 wd279 \
10219                 wd810 \
10220                 wd869 \
10221                 wd981
10222         do
10223                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10224                 if { (eval echo "$as_me:10224: \"$ac_compile\"") >&5
10225   (eval $ac_compile) 2>&5
10226   ac_status=$?
10227   echo "$as_me:10227: \$? = $ac_status" >&5
10228   (exit $ac_status); }; then
10229                         test -n "$verbose" && echo "$as_me:10229: result: ... -$cf_opt" >&5
10230 echo "${ECHO_T}... -$cf_opt" >&6
10231                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10232                 fi
10233         done
10234         CFLAGS="$cf_save_CFLAGS"
10235
10236 elif test "$GCC" = yes
10237 then
10238         { echo "$as_me:10238: checking for $CC warning options..." >&5
10239 echo "$as_me: checking for $CC warning options..." >&6;}
10240         cf_save_CFLAGS="$CFLAGS"
10241         EXTRA_CFLAGS=
10242         cf_warn_CONST=""
10243         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10244         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
10245         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
10246         for cf_opt in W Wall \
10247                 Wbad-function-cast \
10248                 Wcast-align \
10249                 Wcast-qual \
10250                 Wdeclaration-after-statement \
10251                 Wextra \
10252                 Winline \
10253                 Wmissing-declarations \
10254                 Wmissing-prototypes \
10255                 Wnested-externs \
10256                 Wpointer-arith \
10257                 Wshadow \
10258                 Wstrict-prototypes \
10259                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
10260         do
10261                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10262                 if { (eval echo "$as_me:10262: \"$ac_compile\"") >&5
10263   (eval $ac_compile) 2>&5
10264   ac_status=$?
10265   echo "$as_me:10265: \$? = $ac_status" >&5
10266   (exit $ac_status); }; then
10267                         test -n "$verbose" && echo "$as_me:10267: result: ... -$cf_opt" >&5
10268 echo "${ECHO_T}... -$cf_opt" >&6
10269                         case $cf_opt in #(vi
10270                         Wcast-qual) #(vi
10271                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10272                                 ;;
10273                         Winline) #(vi
10274                                 case $GCC_VERSION in
10275                                 [34].*)
10276                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10277
10278 echo "${as_me:-configure}:10278: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10279
10280                                         continue;;
10281                                 esac
10282                                 ;;
10283                         Wpointer-arith) #(vi
10284                                 case $GCC_VERSION in
10285                                 [12].*)
10286                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10287
10288 echo "${as_me:-configure}:10288: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10289
10290                                         continue;;
10291                                 esac
10292                                 ;;
10293                         esac
10294                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10295                 fi
10296         done
10297         CFLAGS="$cf_save_CFLAGS"
10298 fi
10299 rm -rf conftest*
10300
10301 fi
10302
10303 if test "$GCC" = yes
10304 then
10305 cat > conftest.i <<EOF
10306 #ifndef GCC_PRINTF
10307 #define GCC_PRINTF 0
10308 #endif
10309 #ifndef GCC_SCANF
10310 #define GCC_SCANF 0
10311 #endif
10312 #ifndef GCC_NORETURN
10313 #define GCC_NORETURN /* nothing */
10314 #endif
10315 #ifndef GCC_UNUSED
10316 #define GCC_UNUSED /* nothing */
10317 #endif
10318 EOF
10319 if test "$GCC" = yes
10320 then
10321         { echo "$as_me:10321: checking for $CC __attribute__ directives..." >&5
10322 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10323 cat > conftest.$ac_ext <<EOF
10324 #line 10324 "${as_me:-configure}"
10325 #include "confdefs.h"
10326 #include "conftest.h"
10327 #include "conftest.i"
10328 #if     GCC_PRINTF
10329 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10330 #else
10331 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10332 #endif
10333 #if     GCC_SCANF
10334 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10335 #else
10336 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10337 #endif
10338 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10339 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10340 extern void foo(void) GCC_NORETURN;
10341 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10342 EOF
10343         cf_printf_attribute=no
10344         cf_scanf_attribute=no
10345         for cf_attribute in scanf printf unused noreturn
10346         do
10347
10348 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10349
10350                 cf_directive="__attribute__(($cf_attribute))"
10351                 echo "checking for $CC $cf_directive" 1>&5
10352
10353                 case $cf_attribute in #(vi
10354                 printf) #(vi
10355                         cf_printf_attribute=yes
10356                         cat >conftest.h <<EOF
10357 #define GCC_$cf_ATTRIBUTE 1
10358 EOF
10359                         ;;
10360                 scanf) #(vi
10361                         cf_scanf_attribute=yes
10362                         cat >conftest.h <<EOF
10363 #define GCC_$cf_ATTRIBUTE 1
10364 EOF
10365                         ;;
10366                 *) #(vi
10367                         cat >conftest.h <<EOF
10368 #define GCC_$cf_ATTRIBUTE $cf_directive
10369 EOF
10370                         ;;
10371                 esac
10372
10373                 if { (eval echo "$as_me:10373: \"$ac_compile\"") >&5
10374   (eval $ac_compile) 2>&5
10375   ac_status=$?
10376   echo "$as_me:10376: \$? = $ac_status" >&5
10377   (exit $ac_status); }; then
10378                         test -n "$verbose" && echo "$as_me:10378: result: ... $cf_attribute" >&5
10379 echo "${ECHO_T}... $cf_attribute" >&6
10380                         cat conftest.h >>confdefs.h
10381                         case $cf_attribute in #(vi
10382                         noreturn) #(vi
10383
10384 cat >>confdefs.h <<EOF
10385 #define GCC_NORETURN $cf_directive
10386 EOF
10387
10388                                 ;;
10389                         printf) #(vi
10390                                 cf_value='/* nothing */'
10391                                 if test "$cf_printf_attribute" != no ; then
10392                                         cf_value='__attribute__((format(printf,fmt,var)))'
10393
10394 cat >>confdefs.h <<\EOF
10395 #define GCC_PRINTF 1
10396 EOF
10397
10398                                 fi
10399
10400 cat >>confdefs.h <<EOF
10401 #define GCC_PRINTFLIKE(fmt,var) $cf_value
10402 EOF
10403
10404                                 ;;
10405                         scanf) #(vi
10406                                 cf_value='/* nothing */'
10407                                 if test "$cf_scanf_attribute" != no ; then
10408                                         cf_value='__attribute__((format(scanf,fmt,var)))'
10409
10410 cat >>confdefs.h <<\EOF
10411 #define GCC_SCANF 1
10412 EOF
10413
10414                                 fi
10415
10416 cat >>confdefs.h <<EOF
10417 #define GCC_SCANFLIKE(fmt,var) $cf_value
10418 EOF
10419
10420                                 ;;
10421                         unused) #(vi
10422
10423 cat >>confdefs.h <<EOF
10424 #define GCC_UNUSED $cf_directive
10425 EOF
10426
10427                                 ;;
10428                         esac
10429                 fi
10430         done
10431 else
10432         fgrep define conftest.i >>confdefs.h
10433 fi
10434 rm -rf conftest*
10435 fi
10436
10437 ###     use option --enable-assertions to turn on generation of assertion code
10438 echo "$as_me:10438: checking if you want to enable runtime assertions" >&5
10439 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10440
10441 # Check whether --enable-assertions or --disable-assertions was given.
10442 if test "${enable_assertions+set}" = set; then
10443   enableval="$enable_assertions"
10444   with_assertions=$enableval
10445 else
10446   with_assertions=no
10447 fi;
10448 echo "$as_me:10448: result: $with_assertions" >&5
10449 echo "${ECHO_T}$with_assertions" >&6
10450 if test -n "$GCC"
10451 then
10452         if test "$with_assertions" = no
10453         then
10454                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10455         else
10456
10457         ADAFLAGS="$ADAFLAGS -gnata"
10458
10459         fi
10460 fi
10461
10462 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10463
10464 cat >>confdefs.h <<\EOF
10465 #define HAVE_NC_ALLOC_H 1
10466 EOF
10467
10468 ###     use option --enable-expanded to generate certain macros as functions
10469
10470 # Check whether --enable-expanded or --disable-expanded was given.
10471 if test "${enable_expanded+set}" = set; then
10472   enableval="$enable_expanded"
10473   test "$enableval" = yes &&
10474 cat >>confdefs.h <<\EOF
10475 #define NCURSES_EXPANDED 1
10476 EOF
10477
10478 fi;
10479
10480 ###     use option --disable-macros to suppress macros in favor of functions
10481
10482 # Check whether --enable-macros or --disable-macros was given.
10483 if test "${enable_macros+set}" = set; then
10484   enableval="$enable_macros"
10485   test "$enableval" = no &&
10486 cat >>confdefs.h <<\EOF
10487 #define NCURSES_NOMACROS 1
10488 EOF
10489
10490 fi;
10491
10492 # Normally we only add trace() to the debug-library.  Allow this to be
10493 # extended to all models of the ncurses library:
10494 cf_all_traces=no
10495 case "$CFLAGS $CPPFLAGS" in
10496 *-DTRACE*)
10497         cf_all_traces=yes
10498         ;;
10499 esac
10500
10501 echo "$as_me:10501: checking whether to add trace feature to all models" >&5
10502 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10503
10504 # Check whether --with-trace or --without-trace was given.
10505 if test "${with_trace+set}" = set; then
10506   withval="$with_trace"
10507   cf_with_trace=$withval
10508 else
10509   cf_with_trace=$cf_all_traces
10510 fi;
10511 echo "$as_me:10511: result: $cf_with_trace" >&5
10512 echo "${ECHO_T}$cf_with_trace" >&6
10513
10514 if test "$cf_with_trace" = yes ; then
10515         ADA_TRACE=TRUE
10516
10517 cf_fix_cppflags=no
10518 cf_new_cflags=
10519 cf_new_cppflags=
10520 cf_new_extra_cppflags=
10521
10522 for cf_add_cflags in -DTRACE
10523 do
10524 case $cf_fix_cppflags in
10525 no)
10526         case $cf_add_cflags in #(vi
10527         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10528                 case $cf_add_cflags in
10529                 -D*)
10530                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10531
10532                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10533                                 && test -z "${cf_tst_cflags}" \
10534                                 && cf_fix_cppflags=yes
10535
10536                         if test $cf_fix_cppflags = yes ; then
10537                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10538                                 continue
10539                         elif test "${cf_tst_cflags}" = "\"'" ; then
10540                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10541                                 continue
10542                         fi
10543                         ;;
10544                 esac
10545                 case "$CPPFLAGS" in
10546                 *$cf_add_cflags) #(vi
10547                         ;;
10548                 *) #(vi
10549                         case $cf_add_cflags in #(vi
10550                         -D*)
10551                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10552
10553 CPPFLAGS=`echo "$CPPFLAGS" | \
10554         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10555                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10556
10557                                 ;;
10558                         esac
10559                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10560                         ;;
10561                 esac
10562                 ;;
10563         *)
10564                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10565                 ;;
10566         esac
10567         ;;
10568 yes)
10569         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10570
10571         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10572
10573         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10574                 && test -z "${cf_tst_cflags}" \
10575                 && cf_fix_cppflags=no
10576         ;;
10577 esac
10578 done
10579
10580 if test -n "$cf_new_cflags" ; then
10581
10582         CFLAGS="$CFLAGS $cf_new_cflags"
10583 fi
10584
10585 if test -n "$cf_new_cppflags" ; then
10586
10587         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10588 fi
10589
10590 if test -n "$cf_new_extra_cppflags" ; then
10591
10592         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10593 fi
10594
10595 else
10596         ADA_TRACE=FALSE
10597 fi
10598
10599 echo "$as_me:10599: checking if we want to use GNAT projects" >&5
10600 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
10601
10602 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
10603 if test "${enable_gnat_projects+set}" = set; then
10604   enableval="$enable_gnat_projects"
10605   test "$enableval" != no && enableval=yes
10606   if test "$enableval" != "yes" ; then
10607     enable_gnat_projects=no
10608   else
10609     enable_gnat_projects=yes
10610   fi
10611 else
10612   enableval=yes
10613   enable_gnat_projects=yes
10614
10615 fi;
10616 echo "$as_me:10616: result: $enable_gnat_projects" >&5
10617 echo "${ECHO_T}$enable_gnat_projects" >&6
10618
10619 ###     Checks for libraries.
10620 case $cf_cv_system_name in #(vi
10621 *mingw32*) #(vi
10622         ;;
10623 *)
10624 echo "$as_me:10624: checking for gettimeofday" >&5
10625 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10626 if test "${ac_cv_func_gettimeofday+set}" = set; then
10627   echo $ECHO_N "(cached) $ECHO_C" >&6
10628 else
10629   cat >conftest.$ac_ext <<_ACEOF
10630 #line 10630 "configure"
10631 #include "confdefs.h"
10632 /* System header to define __stub macros and hopefully few prototypes,
10633     which can conflict with char gettimeofday (); below.  */
10634 #include <assert.h>
10635 /* Override any gcc2 internal prototype to avoid an error.  */
10636 #ifdef __cplusplus
10637 extern "C"
10638 #endif
10639 /* We use char because int might match the return type of a gcc2
10640    builtin and then its argument prototype would still apply.  */
10641 char gettimeofday ();
10642 char (*f) ();
10643
10644 int
10645 main ()
10646 {
10647 /* The GNU C library defines this for functions which it implements
10648     to always fail with ENOSYS.  Some functions are actually named
10649     something starting with __ and the normal name is an alias.  */
10650 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10651 choke me
10652 #else
10653 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10654 #endif
10655
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 rm -f conftest.$ac_objext conftest$ac_exeext
10661 if { (eval echo "$as_me:10661: \"$ac_link\"") >&5
10662   (eval $ac_link) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit $ac_status); } &&
10666          { ac_try='test -s conftest$ac_exeext'
10667   { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668   (eval $ac_try) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); }; }; then
10672   ac_cv_func_gettimeofday=yes
10673 else
10674   echo "$as_me: failed program was:" >&5
10675 cat conftest.$ac_ext >&5
10676 ac_cv_func_gettimeofday=no
10677 fi
10678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10679 fi
10680 echo "$as_me:10680: result: $ac_cv_func_gettimeofday" >&5
10681 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10682 if test $ac_cv_func_gettimeofday = yes; then
10683   cat >>confdefs.h <<\EOF
10684 #define HAVE_GETTIMEOFDAY 1
10685 EOF
10686
10687 else
10688
10689 echo "$as_me:10689: checking for gettimeofday in -lbsd" >&5
10690 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10691 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10692   echo $ECHO_N "(cached) $ECHO_C" >&6
10693 else
10694   ac_check_lib_save_LIBS=$LIBS
10695 LIBS="-lbsd  $LIBS"
10696 cat >conftest.$ac_ext <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699
10700 /* Override any gcc2 internal prototype to avoid an error.  */
10701 #ifdef __cplusplus
10702 extern "C"
10703 #endif
10704 /* We use char because int might match the return type of a gcc2
10705    builtin and then its argument prototype would still apply.  */
10706 char gettimeofday ();
10707 int
10708 main ()
10709 {
10710 gettimeofday ();
10711   ;
10712   return 0;
10713 }
10714 _ACEOF
10715 rm -f conftest.$ac_objext conftest$ac_exeext
10716 if { (eval echo "$as_me:10716: \"$ac_link\"") >&5
10717   (eval $ac_link) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit $ac_status); } &&
10721          { ac_try='test -s conftest$ac_exeext'
10722   { (eval echo "$as_me:10722: \"$ac_try\"") >&5
10723   (eval $ac_try) 2>&5
10724   ac_status=$?
10725   echo "$as_me:10725: \$? = $ac_status" >&5
10726   (exit $ac_status); }; }; then
10727   ac_cv_lib_bsd_gettimeofday=yes
10728 else
10729   echo "$as_me: failed program was:" >&5
10730 cat conftest.$ac_ext >&5
10731 ac_cv_lib_bsd_gettimeofday=no
10732 fi
10733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10734 LIBS=$ac_check_lib_save_LIBS
10735 fi
10736 echo "$as_me:10736: result: $ac_cv_lib_bsd_gettimeofday" >&5
10737 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10738 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10739
10740 cat >>confdefs.h <<\EOF
10741 #define HAVE_GETTIMEOFDAY 1
10742 EOF
10743
10744         LIBS="$LIBS -lbsd"
10745 fi
10746
10747 fi
10748         ;;
10749 esac
10750
10751 ###     Checks for header files.
10752 echo "$as_me:10752: checking for ANSI C header files" >&5
10753 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10754 if test "${ac_cv_header_stdc+set}" = set; then
10755   echo $ECHO_N "(cached) $ECHO_C" >&6
10756 else
10757   cat >conftest.$ac_ext <<_ACEOF
10758 #line 10758 "configure"
10759 #include "confdefs.h"
10760 #include <stdlib.h>
10761 #include <stdarg.h>
10762 #include <string.h>
10763 #include <float.h>
10764
10765 _ACEOF
10766 if { (eval echo "$as_me:10766: \"$ac_cpp conftest.$ac_ext\"") >&5
10767   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10768   ac_status=$?
10769   egrep -v '^ *\+' conftest.er1 >conftest.err
10770   rm -f conftest.er1
10771   cat conftest.err >&5
10772   echo "$as_me:10772: \$? = $ac_status" >&5
10773   (exit $ac_status); } >/dev/null; then
10774   if test -s conftest.err; then
10775     ac_cpp_err=$ac_c_preproc_warn_flag
10776   else
10777     ac_cpp_err=
10778   fi
10779 else
10780   ac_cpp_err=yes
10781 fi
10782 if test -z "$ac_cpp_err"; then
10783   ac_cv_header_stdc=yes
10784 else
10785   echo "$as_me: failed program was:" >&5
10786   cat conftest.$ac_ext >&5
10787   ac_cv_header_stdc=no
10788 fi
10789 rm -f conftest.err conftest.$ac_ext
10790
10791 if test $ac_cv_header_stdc = yes; then
10792   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10793   cat >conftest.$ac_ext <<_ACEOF
10794 #line 10794 "configure"
10795 #include "confdefs.h"
10796 #include <string.h>
10797
10798 _ACEOF
10799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10800   egrep "memchr" >/dev/null 2>&1; then
10801   :
10802 else
10803   ac_cv_header_stdc=no
10804 fi
10805 rm -rf conftest*
10806
10807 fi
10808
10809 if test $ac_cv_header_stdc = yes; then
10810   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10811   cat >conftest.$ac_ext <<_ACEOF
10812 #line 10812 "configure"
10813 #include "confdefs.h"
10814 #include <stdlib.h>
10815
10816 _ACEOF
10817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10818   egrep "free" >/dev/null 2>&1; then
10819   :
10820 else
10821   ac_cv_header_stdc=no
10822 fi
10823 rm -rf conftest*
10824
10825 fi
10826
10827 if test $ac_cv_header_stdc = yes; then
10828   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10829   if test "$cross_compiling" = yes; then
10830   :
10831 else
10832   cat >conftest.$ac_ext <<_ACEOF
10833 #line 10833 "configure"
10834 #include "confdefs.h"
10835 #include <ctype.h>
10836 #if ((' ' & 0x0FF) == 0x020)
10837 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10838 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10839 #else
10840 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10841                      || ('j' <= (c) && (c) <= 'r') \
10842                      || ('s' <= (c) && (c) <= 'z'))
10843 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10844 #endif
10845
10846 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10847 int
10848 main ()
10849 {
10850   int i;
10851   for (i = 0; i < 256; i++)
10852     if (XOR (islower (i), ISLOWER (i))
10853         || toupper (i) != TOUPPER (i))
10854       $ac_main_return(2);
10855   $ac_main_return (0);
10856 }
10857 _ACEOF
10858 rm -f conftest$ac_exeext
10859 if { (eval echo "$as_me:10859: \"$ac_link\"") >&5
10860   (eval $ac_link) 2>&5
10861   ac_status=$?
10862   echo "$as_me:10862: \$? = $ac_status" >&5
10863   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10864   { (eval echo "$as_me:10864: \"$ac_try\"") >&5
10865   (eval $ac_try) 2>&5
10866   ac_status=$?
10867   echo "$as_me:10867: \$? = $ac_status" >&5
10868   (exit $ac_status); }; }; then
10869   :
10870 else
10871   echo "$as_me: program exited with status $ac_status" >&5
10872 echo "$as_me: failed program was:" >&5
10873 cat conftest.$ac_ext >&5
10874 ac_cv_header_stdc=no
10875 fi
10876 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10877 fi
10878 fi
10879 fi
10880 echo "$as_me:10880: result: $ac_cv_header_stdc" >&5
10881 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10882 if test $ac_cv_header_stdc = yes; then
10883
10884 cat >>confdefs.h <<\EOF
10885 #define STDC_HEADERS 1
10886 EOF
10887
10888 fi
10889
10890 ac_header_dirent=no
10891 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10892   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10893 echo "$as_me:10893: checking for $ac_hdr that defines DIR" >&5
10894 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10895 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10896   echo $ECHO_N "(cached) $ECHO_C" >&6
10897 else
10898   cat >conftest.$ac_ext <<_ACEOF
10899 #line 10899 "configure"
10900 #include "confdefs.h"
10901 #include <sys/types.h>
10902 #include <$ac_hdr>
10903
10904 int
10905 main ()
10906 {
10907 if ((DIR *) 0)
10908 return 0;
10909   ;
10910   return 0;
10911 }
10912 _ACEOF
10913 rm -f conftest.$ac_objext
10914 if { (eval echo "$as_me:10914: \"$ac_compile\"") >&5
10915   (eval $ac_compile) 2>&5
10916   ac_status=$?
10917   echo "$as_me:10917: \$? = $ac_status" >&5
10918   (exit $ac_status); } &&
10919          { ac_try='test -s conftest.$ac_objext'
10920   { (eval echo "$as_me:10920: \"$ac_try\"") >&5
10921   (eval $ac_try) 2>&5
10922   ac_status=$?
10923   echo "$as_me:10923: \$? = $ac_status" >&5
10924   (exit $ac_status); }; }; then
10925   eval "$as_ac_Header=yes"
10926 else
10927   echo "$as_me: failed program was:" >&5
10928 cat conftest.$ac_ext >&5
10929 eval "$as_ac_Header=no"
10930 fi
10931 rm -f conftest.$ac_objext conftest.$ac_ext
10932 fi
10933 echo "$as_me:10933: result: `eval echo '${'$as_ac_Header'}'`" >&5
10934 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10935 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10936   cat >>confdefs.h <<EOF
10937 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10938 EOF
10939
10940 ac_header_dirent=$ac_hdr; break
10941 fi
10942
10943 done
10944 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10945 if test $ac_header_dirent = dirent.h; then
10946   echo "$as_me:10946: checking for opendir in -ldir" >&5
10947 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10948 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10949   echo $ECHO_N "(cached) $ECHO_C" >&6
10950 else
10951   ac_check_lib_save_LIBS=$LIBS
10952 LIBS="-ldir  $LIBS"
10953 cat >conftest.$ac_ext <<_ACEOF
10954 #line 10954 "configure"
10955 #include "confdefs.h"
10956
10957 /* Override any gcc2 internal prototype to avoid an error.  */
10958 #ifdef __cplusplus
10959 extern "C"
10960 #endif
10961 /* We use char because int might match the return type of a gcc2
10962    builtin and then its argument prototype would still apply.  */
10963 char opendir ();
10964 int
10965 main ()
10966 {
10967 opendir ();
10968   ;
10969   return 0;
10970 }
10971 _ACEOF
10972 rm -f conftest.$ac_objext conftest$ac_exeext
10973 if { (eval echo "$as_me:10973: \"$ac_link\"") >&5
10974   (eval $ac_link) 2>&5
10975   ac_status=$?
10976   echo "$as_me:10976: \$? = $ac_status" >&5
10977   (exit $ac_status); } &&
10978          { ac_try='test -s conftest$ac_exeext'
10979   { (eval echo "$as_me:10979: \"$ac_try\"") >&5
10980   (eval $ac_try) 2>&5
10981   ac_status=$?
10982   echo "$as_me:10982: \$? = $ac_status" >&5
10983   (exit $ac_status); }; }; then
10984   ac_cv_lib_dir_opendir=yes
10985 else
10986   echo "$as_me: failed program was:" >&5
10987 cat conftest.$ac_ext >&5
10988 ac_cv_lib_dir_opendir=no
10989 fi
10990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10991 LIBS=$ac_check_lib_save_LIBS
10992 fi
10993 echo "$as_me:10993: result: $ac_cv_lib_dir_opendir" >&5
10994 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10995 if test $ac_cv_lib_dir_opendir = yes; then
10996   LIBS="$LIBS -ldir"
10997 fi
10998
10999 else
11000   echo "$as_me:11000: checking for opendir in -lx" >&5
11001 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11002 if test "${ac_cv_lib_x_opendir+set}" = set; then
11003   echo $ECHO_N "(cached) $ECHO_C" >&6
11004 else
11005   ac_check_lib_save_LIBS=$LIBS
11006 LIBS="-lx  $LIBS"
11007 cat >conftest.$ac_ext <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11010
11011 /* Override any gcc2 internal prototype to avoid an error.  */
11012 #ifdef __cplusplus
11013 extern "C"
11014 #endif
11015 /* We use char because int might match the return type of a gcc2
11016    builtin and then its argument prototype would still apply.  */
11017 char opendir ();
11018 int
11019 main ()
11020 {
11021 opendir ();
11022   ;
11023   return 0;
11024 }
11025 _ACEOF
11026 rm -f conftest.$ac_objext conftest$ac_exeext
11027 if { (eval echo "$as_me:11027: \"$ac_link\"") >&5
11028   (eval $ac_link) 2>&5
11029   ac_status=$?
11030   echo "$as_me:11030: \$? = $ac_status" >&5
11031   (exit $ac_status); } &&
11032          { ac_try='test -s conftest$ac_exeext'
11033   { (eval echo "$as_me:11033: \"$ac_try\"") >&5
11034   (eval $ac_try) 2>&5
11035   ac_status=$?
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); }; }; then
11038   ac_cv_lib_x_opendir=yes
11039 else
11040   echo "$as_me: failed program was:" >&5
11041 cat conftest.$ac_ext >&5
11042 ac_cv_lib_x_opendir=no
11043 fi
11044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11045 LIBS=$ac_check_lib_save_LIBS
11046 fi
11047 echo "$as_me:11047: result: $ac_cv_lib_x_opendir" >&5
11048 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11049 if test $ac_cv_lib_x_opendir = yes; then
11050   LIBS="$LIBS -lx"
11051 fi
11052
11053 fi
11054
11055 echo "$as_me:11055: checking whether time.h and sys/time.h may both be included" >&5
11056 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11057 if test "${ac_cv_header_time+set}" = set; then
11058   echo $ECHO_N "(cached) $ECHO_C" >&6
11059 else
11060   cat >conftest.$ac_ext <<_ACEOF
11061 #line 11061 "configure"
11062 #include "confdefs.h"
11063 #include <sys/types.h>
11064 #include <sys/time.h>
11065 #include <time.h>
11066
11067 int
11068 main ()
11069 {
11070 if ((struct tm *) 0)
11071 return 0;
11072   ;
11073   return 0;
11074 }
11075 _ACEOF
11076 rm -f conftest.$ac_objext
11077 if { (eval echo "$as_me:11077: \"$ac_compile\"") >&5
11078   (eval $ac_compile) 2>&5
11079   ac_status=$?
11080   echo "$as_me:11080: \$? = $ac_status" >&5
11081   (exit $ac_status); } &&
11082          { ac_try='test -s conftest.$ac_objext'
11083   { (eval echo "$as_me:11083: \"$ac_try\"") >&5
11084   (eval $ac_try) 2>&5
11085   ac_status=$?
11086   echo "$as_me:11086: \$? = $ac_status" >&5
11087   (exit $ac_status); }; }; then
11088   ac_cv_header_time=yes
11089 else
11090   echo "$as_me: failed program was:" >&5
11091 cat conftest.$ac_ext >&5
11092 ac_cv_header_time=no
11093 fi
11094 rm -f conftest.$ac_objext conftest.$ac_ext
11095 fi
11096 echo "$as_me:11096: result: $ac_cv_header_time" >&5
11097 echo "${ECHO_T}$ac_cv_header_time" >&6
11098 if test $ac_cv_header_time = yes; then
11099
11100 cat >>confdefs.h <<\EOF
11101 #define TIME_WITH_SYS_TIME 1
11102 EOF
11103
11104 fi
11105
11106 ###     checks for compiler characteristics
11107 ac_ext=c
11108 ac_cpp='$CPP $CPPFLAGS'
11109 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11110 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11111 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11112 ac_main_return=return
11113
11114 echo "$as_me:11114: checking for an ANSI C-conforming const" >&5
11115 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11116 if test "${ac_cv_c_const+set}" = set; then
11117   echo $ECHO_N "(cached) $ECHO_C" >&6
11118 else
11119   cat >conftest.$ac_ext <<_ACEOF
11120 #line 11120 "configure"
11121 #include "confdefs.h"
11122
11123 int
11124 main ()
11125 {
11126 /* FIXME: Include the comments suggested by Paul. */
11127 #ifndef __cplusplus
11128   /* Ultrix mips cc rejects this.  */
11129   typedef int charset[2];
11130   const charset x;
11131   /* SunOS 4.1.1 cc rejects this.  */
11132   char const *const *ccp;
11133   char **p;
11134   /* NEC SVR4.0.2 mips cc rejects this.  */
11135   struct point {int x, y;};
11136   static struct point const zero = {0,0};
11137   /* AIX XL C 1.02.0.0 rejects this.
11138      It does not let you subtract one const X* pointer from another in
11139      an arm of an if-expression whose if-part is not a constant
11140      expression */
11141   const char *g = "string";
11142   ccp = &g + (g ? g-g : 0);
11143   /* HPUX 7.0 cc rejects these. */
11144   ++ccp;
11145   p = (char**) ccp;
11146   ccp = (char const *const *) p;
11147   { /* SCO 3.2v4 cc rejects this.  */
11148     char *t;
11149     char const *s = 0 ? (char *) 0 : (char const *) 0;
11150
11151     *t++ = 0;
11152   }
11153   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11154     int x[] = {25, 17};
11155     const int *foo = &x[0];
11156     ++foo;
11157   }
11158   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11159     typedef const int *iptr;
11160     iptr p = 0;
11161     ++p;
11162   }
11163   { /* AIX XL C 1.02.0.0 rejects this saying
11164        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11165     struct s { int j; const int *ap[3]; };
11166     struct s *b; b->j = 5;
11167   }
11168   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11169     const int foo = 10;
11170   }
11171 #endif
11172
11173   ;
11174   return 0;
11175 }
11176 _ACEOF
11177 rm -f conftest.$ac_objext
11178 if { (eval echo "$as_me:11178: \"$ac_compile\"") >&5
11179   (eval $ac_compile) 2>&5
11180   ac_status=$?
11181   echo "$as_me:11181: \$? = $ac_status" >&5
11182   (exit $ac_status); } &&
11183          { ac_try='test -s conftest.$ac_objext'
11184   { (eval echo "$as_me:11184: \"$ac_try\"") >&5
11185   (eval $ac_try) 2>&5
11186   ac_status=$?
11187   echo "$as_me:11187: \$? = $ac_status" >&5
11188   (exit $ac_status); }; }; then
11189   ac_cv_c_const=yes
11190 else
11191   echo "$as_me: failed program was:" >&5
11192 cat conftest.$ac_ext >&5
11193 ac_cv_c_const=no
11194 fi
11195 rm -f conftest.$ac_objext conftest.$ac_ext
11196 fi
11197 echo "$as_me:11197: result: $ac_cv_c_const" >&5
11198 echo "${ECHO_T}$ac_cv_c_const" >&6
11199 if test $ac_cv_c_const = no; then
11200
11201 cat >>confdefs.h <<\EOF
11202 #define const
11203 EOF
11204
11205 fi
11206
11207 ###     Checks for external-data
11208
11209 echo "$as_me:11209: checking if data-only library module links" >&5
11210 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11211 if test "${cf_cv_link_dataonly+set}" = set; then
11212   echo $ECHO_N "(cached) $ECHO_C" >&6
11213 else
11214
11215         rm -f conftest.a
11216         cat >conftest.$ac_ext <<EOF
11217 #line 11217 "configure"
11218 int     testdata[3] = { 123, 456, 789 };
11219 EOF
11220         if { (eval echo "$as_me:11220: \"$ac_compile\"") >&5
11221   (eval $ac_compile) 2>&5
11222   ac_status=$?
11223   echo "$as_me:11223: \$? = $ac_status" >&5
11224   (exit $ac_status); } ; then
11225                 mv conftest.o data.o && \
11226                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
11227         fi
11228         rm -f conftest.$ac_ext data.o
11229         cat >conftest.$ac_ext <<EOF
11230 #line 11230 "configure"
11231 int     testfunc()
11232 {
11233 #if defined(NeXT)
11234         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11235 #else
11236         extern int testdata[3];
11237         return testdata[0] == 123
11238            &&  testdata[1] == 456
11239            &&  testdata[2] == 789;
11240 #endif
11241 }
11242 EOF
11243         if { (eval echo "$as_me:11243: \"$ac_compile\"") >&5
11244   (eval $ac_compile) 2>&5
11245   ac_status=$?
11246   echo "$as_me:11246: \$? = $ac_status" >&5
11247   (exit $ac_status); }; then
11248                 mv conftest.o func.o && \
11249                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
11250         fi
11251         rm -f conftest.$ac_ext func.o
11252         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11253         cf_saveLIBS="$LIBS"
11254         LIBS="conftest.a $LIBS"
11255         if test "$cross_compiling" = yes; then
11256   cf_cv_link_dataonly=unknown
11257 else
11258   cat >conftest.$ac_ext <<_ACEOF
11259 #line 11259 "configure"
11260 #include "confdefs.h"
11261
11262         int main()
11263         {
11264                 extern int testfunc();
11265                 ${cf_cv_main_return:-return} (!testfunc());
11266         }
11267
11268 _ACEOF
11269 rm -f conftest$ac_exeext
11270 if { (eval echo "$as_me:11270: \"$ac_link\"") >&5
11271   (eval $ac_link) 2>&5
11272   ac_status=$?
11273   echo "$as_me:11273: \$? = $ac_status" >&5
11274   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11275   { (eval echo "$as_me:11275: \"$ac_try\"") >&5
11276   (eval $ac_try) 2>&5
11277   ac_status=$?
11278   echo "$as_me:11278: \$? = $ac_status" >&5
11279   (exit $ac_status); }; }; then
11280   cf_cv_link_dataonly=yes
11281 else
11282   echo "$as_me: program exited with status $ac_status" >&5
11283 echo "$as_me: failed program was:" >&5
11284 cat conftest.$ac_ext >&5
11285 cf_cv_link_dataonly=no
11286 fi
11287 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11288 fi
11289         LIBS="$cf_saveLIBS"
11290
11291 fi
11292
11293 echo "$as_me:11293: result: $cf_cv_link_dataonly" >&5
11294 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11295
11296 if test "$cf_cv_link_dataonly" = no ; then
11297
11298 cat >>confdefs.h <<\EOF
11299 #define BROKEN_LINKER 1
11300 EOF
11301
11302         BROKEN_LINKER=1
11303 fi
11304
11305 ###     Checks for library functions.
11306
11307 echo "$as_me:11307: checking for working mkstemp" >&5
11308 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11309 if test "${cf_cv_func_mkstemp+set}" = set; then
11310   echo $ECHO_N "(cached) $ECHO_C" >&6
11311 else
11312
11313 rm -rf conftest*
11314 if test "$cross_compiling" = yes; then
11315   cf_cv_func_mkstemp=maybe
11316 else
11317   cat >conftest.$ac_ext <<_ACEOF
11318 #line 11318 "configure"
11319 #include "confdefs.h"
11320
11321 #include <sys/types.h>
11322 #include <stdlib.h>
11323 #include <stdio.h>
11324 #include <string.h>
11325 #include <sys/stat.h>
11326 int main()
11327 {
11328         char *tmpl = "conftestXXXXXX";
11329         char name[2][80];
11330         int n;
11331         int result = 0;
11332         int fd;
11333         struct stat sb;
11334
11335         umask(077);
11336         for (n = 0; n < 2; ++n) {
11337                 strcpy(name[n], tmpl);
11338                 if ((fd = mkstemp(name[n])) >= 0) {
11339                         if (!strcmp(name[n], tmpl)
11340                          || stat(name[n], &sb) != 0
11341                          || (sb.st_mode & S_IFMT) != S_IFREG
11342                          || (sb.st_mode & 077) != 0) {
11343                                 result = 1;
11344                         }
11345                         close(fd);
11346                 }
11347         }
11348         if (result == 0
11349          && !strcmp(name[0], name[1]))
11350                 result = 1;
11351         ${cf_cv_main_return:-return}(result);
11352 }
11353
11354 _ACEOF
11355 rm -f conftest$ac_exeext
11356 if { (eval echo "$as_me:11356: \"$ac_link\"") >&5
11357   (eval $ac_link) 2>&5
11358   ac_status=$?
11359   echo "$as_me:11359: \$? = $ac_status" >&5
11360   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11361   { (eval echo "$as_me:11361: \"$ac_try\"") >&5
11362   (eval $ac_try) 2>&5
11363   ac_status=$?
11364   echo "$as_me:11364: \$? = $ac_status" >&5
11365   (exit $ac_status); }; }; then
11366   cf_cv_func_mkstemp=yes
11367
11368 else
11369   echo "$as_me: program exited with status $ac_status" >&5
11370 echo "$as_me: failed program was:" >&5
11371 cat conftest.$ac_ext >&5
11372 cf_cv_func_mkstemp=no
11373
11374 fi
11375 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11376 fi
11377
11378 fi
11379 echo "$as_me:11379: result: $cf_cv_func_mkstemp" >&5
11380 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11381 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
11382         echo "$as_me:11382: checking for mkstemp" >&5
11383 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11384 if test "${ac_cv_func_mkstemp+set}" = set; then
11385   echo $ECHO_N "(cached) $ECHO_C" >&6
11386 else
11387   cat >conftest.$ac_ext <<_ACEOF
11388 #line 11388 "configure"
11389 #include "confdefs.h"
11390 /* System header to define __stub macros and hopefully few prototypes,
11391     which can conflict with char mkstemp (); below.  */
11392 #include <assert.h>
11393 /* Override any gcc2 internal prototype to avoid an error.  */
11394 #ifdef __cplusplus
11395 extern "C"
11396 #endif
11397 /* We use char because int might match the return type of a gcc2
11398    builtin and then its argument prototype would still apply.  */
11399 char mkstemp ();
11400 char (*f) ();
11401
11402 int
11403 main ()
11404 {
11405 /* The GNU C library defines this for functions which it implements
11406     to always fail with ENOSYS.  Some functions are actually named
11407     something starting with __ and the normal name is an alias.  */
11408 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11409 choke me
11410 #else
11411 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11412 #endif
11413
11414   ;
11415   return 0;
11416 }
11417 _ACEOF
11418 rm -f conftest.$ac_objext conftest$ac_exeext
11419 if { (eval echo "$as_me:11419: \"$ac_link\"") >&5
11420   (eval $ac_link) 2>&5
11421   ac_status=$?
11422   echo "$as_me:11422: \$? = $ac_status" >&5
11423   (exit $ac_status); } &&
11424          { ac_try='test -s conftest$ac_exeext'
11425   { (eval echo "$as_me:11425: \"$ac_try\"") >&5
11426   (eval $ac_try) 2>&5
11427   ac_status=$?
11428   echo "$as_me:11428: \$? = $ac_status" >&5
11429   (exit $ac_status); }; }; then
11430   ac_cv_func_mkstemp=yes
11431 else
11432   echo "$as_me: failed program was:" >&5
11433 cat conftest.$ac_ext >&5
11434 ac_cv_func_mkstemp=no
11435 fi
11436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11437 fi
11438 echo "$as_me:11438: result: $ac_cv_func_mkstemp" >&5
11439 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11440
11441 fi
11442 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
11443
11444 cat >>confdefs.h <<\EOF
11445 #define HAVE_MKSTEMP 1
11446 EOF
11447
11448 fi
11449
11450 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
11451         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11452         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11453 fi
11454
11455 cf_with_ada=yes
11456 if test "$cf_with_ada" != "no" ; then
11457
11458 cf_ada_make=gnatmake
11459 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11460 set dummy $cf_ada_make; ac_word=$2
11461 echo "$as_me:11461: checking for $ac_word" >&5
11462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11463 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11464   echo $ECHO_N "(cached) $ECHO_C" >&6
11465 else
11466   if test -n "$gnat_exists"; then
11467   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11468 else
11469   ac_save_IFS=$IFS; IFS=$ac_path_separator
11470 ac_dummy="$PATH"
11471 for ac_dir in $ac_dummy; do
11472   IFS=$ac_save_IFS
11473   test -z "$ac_dir" && ac_dir=.
11474   $as_executable_p "$ac_dir/$ac_word" || continue
11475 ac_cv_prog_gnat_exists="yes"
11476 echo "$as_me:11476: found $ac_dir/$ac_word" >&5
11477 break
11478 done
11479
11480   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11481 fi
11482 fi
11483 gnat_exists=$ac_cv_prog_gnat_exists
11484 if test -n "$gnat_exists"; then
11485   echo "$as_me:11485: result: $gnat_exists" >&5
11486 echo "${ECHO_T}$gnat_exists" >&6
11487 else
11488   echo "$as_me:11488: result: no" >&5
11489 echo "${ECHO_T}no" >&6
11490 fi
11491
11492 if test "$ac_cv_prog_gnat_exists" = no; then
11493    cf_ada_make=
11494    cf_cv_prog_gnat_correct=no
11495 else
11496
11497 echo "$as_me:11497: checking for gnat version" >&5
11498 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11499 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
11500         grep '[0-9].[0-9][0-9]*' |\
11501     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11502 echo "$as_me:11502: result: $cf_gnat_version" >&5
11503 echo "${ECHO_T}$cf_gnat_version" >&6
11504
11505 case $cf_gnat_version in #(vi
11506 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
11507         cf_cv_prog_gnat_correct=yes
11508         ;;
11509 *)
11510         { echo "$as_me:11510: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11511 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11512         cf_cv_prog_gnat_correct=no
11513         ;;
11514 esac
11515
11516    # Extract the first word of "m4", so it can be a program name with args.
11517 set dummy m4; ac_word=$2
11518 echo "$as_me:11518: checking for $ac_word" >&5
11519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11520 if test "${ac_cv_prog_M4_exists+set}" = set; then
11521   echo $ECHO_N "(cached) $ECHO_C" >&6
11522 else
11523   if test -n "$M4_exists"; then
11524   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11525 else
11526   ac_save_IFS=$IFS; IFS=$ac_path_separator
11527 ac_dummy="$PATH"
11528 for ac_dir in $ac_dummy; do
11529   IFS=$ac_save_IFS
11530   test -z "$ac_dir" && ac_dir=.
11531   $as_executable_p "$ac_dir/$ac_word" || continue
11532 ac_cv_prog_M4_exists="yes"
11533 echo "$as_me:11533: found $ac_dir/$ac_word" >&5
11534 break
11535 done
11536
11537   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11538 fi
11539 fi
11540 M4_exists=$ac_cv_prog_M4_exists
11541 if test -n "$M4_exists"; then
11542   echo "$as_me:11542: result: $M4_exists" >&5
11543 echo "${ECHO_T}$M4_exists" >&6
11544 else
11545   echo "$as_me:11545: result: no" >&5
11546 echo "${ECHO_T}no" >&6
11547 fi
11548
11549    if test "$ac_cv_prog_M4_exists" = no; then
11550       cf_cv_prog_gnat_correct=no
11551       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11552    fi
11553    if test "$cf_cv_prog_gnat_correct" = yes; then
11554       echo "$as_me:11554: checking if GNAT works" >&5
11555 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11556
11557 rm -rf conftest* *~conftest*
11558 cat >>conftest.ads <<CF_EOF
11559 procedure conftest;
11560 CF_EOF
11561 cat >>conftest.adb <<CF_EOF
11562 with Text_IO;
11563 with GNAT.OS_Lib;
11564 procedure conftest is
11565 begin
11566    Text_IO.Put ("Hello World");
11567    Text_IO.New_Line;
11568    GNAT.OS_Lib.OS_Exit (0);
11569 end conftest;
11570 CF_EOF
11571 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11572    if ( ./conftest 1>&5 2>&1 ) ; then
11573       cf_cv_prog_gnat_correct=yes
11574    else
11575       cf_cv_prog_gnat_correct=no
11576    fi
11577 else
11578    cf_cv_prog_gnat_correct=no
11579 fi
11580 rm -rf conftest* *~conftest*
11581
11582       echo "$as_me:11582: result: $cf_cv_prog_gnat_correct" >&5
11583 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11584    fi
11585 fi
11586
11587         if test "$cf_cv_prog_gnat_correct" = yes; then
11588
11589         echo "$as_me:11589: checking optimization options for ADAFLAGS" >&5
11590 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
11591         case "$CFLAGS" in
11592         *-g*)
11593
11594         ADAFLAGS="$ADAFLAGS -g"
11595
11596                 ;;
11597         esac
11598         case "$CFLAGS" in
11599         *-O*)
11600                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
11601
11602         ADAFLAGS="$ADAFLAGS $cf_O_flag"
11603
11604                 ;;
11605         esac
11606         echo "$as_me:11606: result: $ADAFLAGS" >&5
11607 echo "${ECHO_T}$ADAFLAGS" >&6
11608
11609 echo "$as_me:11609: checking if GNATPREP supports -T option" >&5
11610 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
11611 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
11612   echo $ECHO_N "(cached) $ECHO_C" >&6
11613 else
11614
11615 cf_cv_gnatprep_opt_t=no
11616 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
11617
11618 fi
11619 echo "$as_me:11619: result: $cf_cv_gnatprep_opt_t" >&5
11620 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
11621 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
11622
11623 echo "$as_me:11623: checking if GNAT supports generics" >&5
11624 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11625 case $cf_gnat_version in #(vi
11626 3.[1-9]*|[4-9].*) #(vi
11627         cf_gnat_generics=yes
11628         ;;
11629 *)
11630         cf_gnat_generics=no
11631         ;;
11632 esac
11633 echo "$as_me:11633: result: $cf_gnat_generics" >&5
11634 echo "${ECHO_T}$cf_gnat_generics" >&6
11635
11636 if test "$cf_gnat_generics" = yes
11637 then
11638         cf_compile_generics=generics
11639         cf_generic_objects="\${GENOBJS}"
11640 else
11641         cf_compile_generics=
11642         cf_generic_objects=
11643 fi
11644
11645 echo "$as_me:11645: checking if GNAT supports SIGINT" >&5
11646 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11647 if test "${cf_cv_gnat_sigint+set}" = set; then
11648   echo $ECHO_N "(cached) $ECHO_C" >&6
11649 else
11650
11651 rm -rf conftest* *~conftest*
11652 cat >>conftest.ads <<CF_EOF
11653 with Ada.Interrupts.Names;
11654
11655 package ConfTest is
11656
11657    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11658    pragma Unreserve_All_Interrupts;
11659    pragma Warnings (On);
11660
11661    protected Process is
11662       procedure Stop;
11663       function Continue return Boolean;
11664       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11665    private
11666       Done : Boolean := False;
11667    end Process;
11668
11669 end ConfTest;
11670 CF_EOF
11671 cat >>conftest.adb <<CF_EOF
11672 package body ConfTest is
11673    protected body Process is
11674       procedure Stop is
11675       begin
11676          Done := True;
11677       end Stop;
11678       function Continue return Boolean is
11679       begin
11680          return not Done;
11681       end Continue;
11682    end Process;
11683 end ConfTest;
11684 CF_EOF
11685 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11686       cf_cv_gnat_sigint=yes
11687 else
11688    cf_cv_gnat_sigint=no
11689 fi
11690 rm -rf conftest* *~conftest*
11691
11692 fi
11693 echo "$as_me:11693: result: $cf_cv_gnat_sigint" >&5
11694 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11695
11696 if test $cf_cv_gnat_sigint = yes ; then
11697         USE_GNAT_SIGINT=""
11698 else
11699         USE_GNAT_SIGINT="#"
11700 fi
11701
11702 cf_gnat_libraries=no
11703 cf_gnat_projects=no
11704
11705 if test "$enable_gnat_projects" != no ; then
11706 echo "$as_me:11706: checking if GNAT supports project files" >&5
11707 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11708 case $cf_gnat_version in #(vi
11709 3.[0-9]*) #(vi
11710         ;;
11711 *)
11712         case $cf_cv_system_name in #(vi
11713         cygwin*|msys*) #(vi
11714                 ;;
11715         *)
11716                 mkdir conftest.src conftest.bin conftest.lib
11717                 cd conftest.src
11718                 rm -rf conftest* *~conftest*
11719                 cat >>library.gpr <<CF_EOF
11720 project Library is
11721   Kind := External ("LIB_KIND");
11722   for Library_Name use "ConfTest";
11723   for Object_Dir use ".";
11724   for Library_ALI_Dir use External("LIBRARY_DIR");
11725   for Library_Version use External ("SONAME");
11726   for Library_Kind use Kind;
11727   for Library_Dir use External("BUILD_DIR");
11728   Source_Dir := External ("SOURCE_DIR");
11729   for Source_Dirs use (Source_Dir);
11730 end Library;
11731 CF_EOF
11732                 cat >>confpackage.ads <<CF_EOF
11733 package ConfPackage is
11734    procedure conftest;
11735 end ConfPackage;
11736 CF_EOF
11737                 cat >>confpackage.adb <<CF_EOF
11738 with Text_IO;
11739 package body ConfPackage is
11740    procedure conftest is
11741    begin
11742       Text_IO.Put ("Hello World");
11743       Text_IO.New_Line;
11744    end conftest;
11745 end ConfPackage;
11746 CF_EOF
11747                 if ( $cf_ada_make $ADAFLAGS \
11748                                 -Plibrary.gpr \
11749                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11750                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11751                                 -XSOURCE_DIR=`pwd` \
11752                                 -XSONAME=libConfTest.so.1 \
11753                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11754                         cf_gnat_projects=yes
11755                 fi
11756                 cd ..
11757                 if test -f conftest.lib/confpackage.ali
11758                 then
11759                         cf_gnat_libraries=yes
11760                 fi
11761                 rm -rf conftest* *~conftest*
11762                 ;;
11763         esac
11764         ;;
11765 esac
11766 echo "$as_me:11766: result: $cf_gnat_projects" >&5
11767 echo "${ECHO_T}$cf_gnat_projects" >&6
11768 fi # enable_gnat_projects
11769
11770 if test $cf_gnat_projects = yes
11771 then
11772         echo "$as_me:11772: checking if GNAT supports libraries" >&5
11773 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11774         echo "$as_me:11774: result: $cf_gnat_libraries" >&5
11775 echo "${ECHO_T}$cf_gnat_libraries" >&6
11776 fi
11777
11778 if test "$cf_gnat_projects" = yes
11779 then
11780         USE_OLD_MAKERULES="#"
11781         USE_GNAT_PROJECTS=""
11782 else
11783         USE_OLD_MAKERULES=""
11784         USE_GNAT_PROJECTS="#"
11785 fi
11786
11787 if test "$cf_gnat_libraries" = yes
11788 then
11789         USE_GNAT_LIBRARIES=""
11790 else
11791         USE_GNAT_LIBRARIES="#"
11792 fi
11793
11794 echo "$as_me:11794: checking for ada-compiler" >&5
11795 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11796
11797 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11798 if test "${with_ada_compiler+set}" = set; then
11799   withval="$with_ada_compiler"
11800   cf_ada_compiler=$withval
11801 else
11802   cf_ada_compiler=gnatmake
11803 fi;
11804
11805 echo "$as_me:11805: result: $cf_ada_compiler" >&5
11806 echo "${ECHO_T}$cf_ada_compiler" >&6
11807
11808                 cf_ada_package=terminal_interface
11809
11810 echo "$as_me:11810: checking for ada-include" >&5
11811 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11812
11813 # Check whether --with-ada-include or --without-ada-include was given.
11814 if test "${with_ada_include+set}" = set; then
11815   withval="$with_ada_include"
11816
11817 else
11818   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11819 fi; if test -n "$prefix/share/ada/adainclude" ; then
11820
11821 if test "x$prefix" != xNONE; then
11822   cf_path_syntax="$prefix"
11823 else
11824   cf_path_syntax="$ac_default_prefix"
11825 fi
11826
11827 case ".$withval" in #(vi
11828 .\$\(*\)*|.\'*\'*) #(vi
11829   ;;
11830 ..|./*|.\\*) #(vi
11831   ;;
11832 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11833   ;;
11834 .\${*prefix}*|.\${*dir}*) #(vi
11835   eval withval="$withval"
11836   case ".$withval" in #(vi
11837   .NONE/*)
11838     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11839     ;;
11840   esac
11841   ;; #(vi
11842 .no|.NONE/*)
11843   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11844   ;;
11845 *)
11846   { { echo "$as_me:11846: error: expected a pathname, not \"$withval\"" >&5
11847 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11848    { (exit 1); exit 1; }; }
11849   ;;
11850 esac
11851
11852 fi
11853 eval ADA_INCLUDE="$withval"
11854
11855 echo "$as_me:11855: result: $ADA_INCLUDE" >&5
11856 echo "${ECHO_T}$ADA_INCLUDE" >&6
11857
11858 echo "$as_me:11858: checking for ada-objects" >&5
11859 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11860
11861 # Check whether --with-ada-objects or --without-ada-objects was given.
11862 if test "${with_ada_objects+set}" = set; then
11863   withval="$with_ada_objects"
11864
11865 else
11866   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11867 fi; if test -n "$prefix/lib/ada/adalib" ; then
11868
11869 if test "x$prefix" != xNONE; then
11870   cf_path_syntax="$prefix"
11871 else
11872   cf_path_syntax="$ac_default_prefix"
11873 fi
11874
11875 case ".$withval" in #(vi
11876 .\$\(*\)*|.\'*\'*) #(vi
11877   ;;
11878 ..|./*|.\\*) #(vi
11879   ;;
11880 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11881   ;;
11882 .\${*prefix}*|.\${*dir}*) #(vi
11883   eval withval="$withval"
11884   case ".$withval" in #(vi
11885   .NONE/*)
11886     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11887     ;;
11888   esac
11889   ;; #(vi
11890 .no|.NONE/*)
11891   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11892   ;;
11893 *)
11894   { { echo "$as_me:11894: error: expected a pathname, not \"$withval\"" >&5
11895 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11896    { (exit 1); exit 1; }; }
11897   ;;
11898 esac
11899
11900 fi
11901 eval ADA_OBJECTS="$withval"
11902
11903 echo "$as_me:11903: result: $ADA_OBJECTS" >&5
11904 echo "${ECHO_T}$ADA_OBJECTS" >&6
11905
11906 echo "$as_me:11906: checking if an Ada95 shared-library should be built" >&5
11907 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11908
11909 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11910 if test "${with_ada_sharedlib+set}" = set; then
11911   withval="$with_ada_sharedlib"
11912   with_ada_sharedlib=$withval
11913 else
11914   with_ada_sharedlib=no
11915 fi;
11916 echo "$as_me:11916: result: $with_ada_sharedlib" >&5
11917 echo "${ECHO_T}$with_ada_sharedlib" >&6
11918
11919 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11920 MAKE_ADA_SHAREDLIB="#"
11921
11922 if test "x$with_ada_sharedlib" != xno
11923 then
11924         MAKE_ADA_SHAREDLIB=
11925         if test "x$with_ada_sharedlib" != xyes
11926         then
11927                 ADA_SHAREDLIB="$with_ada_sharedlib"
11928         fi
11929 fi
11930
11931         else
11932                 { { echo "$as_me:11932: error: No usable Ada compiler found" >&5
11933 echo "$as_me: error: No usable Ada compiler found" >&2;}
11934    { (exit 1); exit 1; }; }
11935         fi
11936 else
11937         { { echo "$as_me:11937: error: The Ada compiler is needed for this package" >&5
11938 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11939    { (exit 1); exit 1; }; }
11940 fi
11941
11942 ################################################################################
11943
11944 # not needed
11945 TINFO_LDFLAGS2=
11946
11947 TINFO_LIBS=
11948
11949 ### Construct the list of include-directories to be generated
11950
11951 if test "$GCC" != yes; then
11952         CPPFLAGS="-I\${includedir} $CPPFLAGS"
11953 elif test "$includedir" != "/usr/include"; then
11954         if test "$includedir" = '${prefix}/include' ; then
11955                 if test x$prefix != x/usr ; then
11956                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
11957                 fi
11958         else
11959                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
11960         fi
11961 fi
11962 if test "$srcdir" != "."; then
11963         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
11964 fi
11965 CPPFLAGS="-I../include $CPPFLAGS"
11966 if test "$srcdir" != "."; then
11967         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
11968 fi
11969 CPPFLAGS="-I. $CPPFLAGS"
11970
11971 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11972 if test "$srcdir" != "."; then
11973         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11974 fi
11975 if test "$GCC" != yes; then
11976         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11977 elif test "$includedir" != "/usr/include"; then
11978         if test "$includedir" = '${prefix}/include' ; then
11979                 if test x$prefix != x/usr ; then
11980                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11981                 fi
11982         else
11983                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11984         fi
11985 fi
11986
11987 ### Build up pieces for makefile rules
11988 echo "$as_me:11988: checking default library suffix" >&5
11989 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11990
11991         case $DFT_LWR_MODEL in
11992         libtool) DFT_ARG_SUFFIX=''   ;;
11993         normal)  DFT_ARG_SUFFIX=''   ;;
11994         debug)   DFT_ARG_SUFFIX='_g' ;;
11995         profile) DFT_ARG_SUFFIX='_p' ;;
11996         shared)  DFT_ARG_SUFFIX=''   ;;
11997         esac
11998         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11999 echo "$as_me:11999: result: $DFT_ARG_SUFFIX" >&5
12000 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
12001
12002 echo "$as_me:12002: checking default library-dependency suffix" >&5
12003 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
12004
12005         case X$DFT_LWR_MODEL in #(vi
12006         Xlibtool) #(vi
12007                 DFT_LIB_SUFFIX='.la'
12008                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12009                 ;;
12010         Xdebug) #(vi
12011                 DFT_LIB_SUFFIX='_g.a'
12012                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12013                 ;;
12014         Xprofile) #(vi
12015                 DFT_LIB_SUFFIX='_p.a'
12016                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12017                 ;;
12018         Xshared) #(vi
12019                 case $cf_cv_system_name in
12020                 aix[5-7]*) #(vi
12021                         DFT_LIB_SUFFIX='.so'
12022                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12023                         ;;
12024                 cygwin*|msys*|mingw*) #(vi
12025                         DFT_LIB_SUFFIX='.dll'
12026                         DFT_DEP_SUFFIX='.dll.a'
12027                         ;;
12028                 darwin*) #(vi
12029                         DFT_LIB_SUFFIX='.dylib'
12030                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12031                         ;;
12032                 hpux*) #(vi
12033                         case $target in
12034                         ia64*) #(vi
12035                                 DFT_LIB_SUFFIX='.so'
12036                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12037                                 ;;
12038                         *) #(vi
12039                                 DFT_LIB_SUFFIX='.sl'
12040                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12041                                 ;;
12042                         esac
12043                         ;;
12044                 *) #(vi
12045                         DFT_LIB_SUFFIX='.so'
12046                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12047                         ;;
12048                 esac
12049                 ;;
12050         *)
12051                 DFT_LIB_SUFFIX='.a'
12052                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12053                 ;;
12054         esac
12055         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
12056         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
12057 echo "$as_me:12057: result: $DFT_DEP_SUFFIX" >&5
12058 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
12059
12060 echo "$as_me:12060: checking default object directory" >&5
12061 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
12062
12063         case $DFT_LWR_MODEL in
12064         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
12065         normal)  DFT_OBJ_SUBDIR='objects' ;;
12066         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
12067         profile) DFT_OBJ_SUBDIR='obj_p' ;;
12068         shared)
12069                 case $cf_cv_system_name in #(vi
12070                 cygwin|msys) #(vi
12071                         DFT_OBJ_SUBDIR='objects' ;;
12072                 *)
12073                         DFT_OBJ_SUBDIR='obj_s' ;;
12074                 esac
12075         esac
12076 echo "$as_me:12076: result: $DFT_OBJ_SUBDIR" >&5
12077 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
12078
12079 ### Set up low-level terminfo dependencies for makefiles.
12080
12081 if test "$DFT_LWR_MODEL" = shared ; then
12082         case $cf_cv_system_name in #(vi
12083         cygwin*)
12084                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
12085                 ;;
12086         msys*)
12087                 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
12088                 ;;
12089         esac
12090 fi
12091
12092 ### Construct the list of subdirectories for which we'll customize makefiles
12093 ### with the appropriate compile-rules.
12094
12095 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
12096
12097 cat >>confdefs.h <<EOF
12098 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
12099 EOF
12100
12101 ### Now that we're done running tests, add the compiler-warnings, if any
12102
12103 cf_fix_cppflags=no
12104 cf_new_cflags=
12105 cf_new_cppflags=
12106 cf_new_extra_cppflags=
12107
12108 for cf_add_cflags in $EXTRA_CFLAGS
12109 do
12110 case $cf_fix_cppflags in
12111 no)
12112         case $cf_add_cflags in #(vi
12113         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12114                 case $cf_add_cflags in
12115                 -D*)
12116                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12117
12118                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12119                                 && test -z "${cf_tst_cflags}" \
12120                                 && cf_fix_cppflags=yes
12121
12122                         if test $cf_fix_cppflags = yes ; then
12123                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12124                                 continue
12125                         elif test "${cf_tst_cflags}" = "\"'" ; then
12126                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12127                                 continue
12128                         fi
12129                         ;;
12130                 esac
12131                 case "$CPPFLAGS" in
12132                 *$cf_add_cflags) #(vi
12133                         ;;
12134                 *) #(vi
12135                         case $cf_add_cflags in #(vi
12136                         -D*)
12137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12138
12139 CPPFLAGS=`echo "$CPPFLAGS" | \
12140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12142
12143                                 ;;
12144                         esac
12145                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12146                         ;;
12147                 esac
12148                 ;;
12149         *)
12150                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12151                 ;;
12152         esac
12153         ;;
12154 yes)
12155         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12156
12157         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12158
12159         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12160                 && test -z "${cf_tst_cflags}" \
12161                 && cf_fix_cppflags=no
12162         ;;
12163 esac
12164 done
12165
12166 if test -n "$cf_new_cflags" ; then
12167
12168         CFLAGS="$CFLAGS $cf_new_cflags"
12169 fi
12170
12171 if test -n "$cf_new_cppflags" ; then
12172
12173         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12174 fi
12175
12176 if test -n "$cf_new_extra_cppflags" ; then
12177
12178         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12179 fi
12180
12181 ################################################################################
12182
12183 TEST_ARG2=
12184
12185 TEST_LIBS2=
12186
12187 NCURSES_SHLIB2="sh -c"
12188
12189 ADA_SUBDIRS="include gen src doc"
12190 if test "x$cf_with_tests" != "xno" ; then
12191         ADA_SUBDIRS="$ADA_SUBDIRS samples"
12192 fi
12193 for cf_dir in $ADA_SUBDIRS
12194 do
12195         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
12196 done
12197
12198 NCURSES_TREE="#"
12199
12200 EXTERNAL_TREE=
12201
12202 # match layout used by make-tar.sh
12203 ADAHTML_DIR=../doc/ada
12204
12205 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
12206 ac_config_commands="$ac_config_commands default"
12207 cat >confcache <<\_ACEOF
12208 # This file is a shell script that caches the results of configure
12209 # tests run on this system so they can be shared between configure
12210 # scripts and configure runs, see configure's option --config-cache.
12211 # It is not useful on other systems.  If it contains results you don't
12212 # want to keep, you may remove or edit it.
12213 #
12214 # config.status only pays attention to the cache file if you give it
12215 # the --recheck option to rerun configure.
12216 #
12217 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12218 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12219 # following values.
12220
12221 _ACEOF
12222
12223 # The following way of writing the cache mishandles newlines in values,
12224 # but we know of no workaround that is simple, portable, and efficient.
12225 # So, don't put newlines in cache variables' values.
12226 # Ultrix sh set writes to stderr and can't be redirected directly,
12227 # and sets the high bit in the cache file unless we assign to the vars.
12228 {
12229   (set) 2>&1 |
12230     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12231     *ac_space=\ *)
12232       # `set' does not quote correctly, so add quotes (double-quote
12233       # substitution turns \\\\ into \\, and sed turns \\ into \).
12234       sed -n \
12235         "s/'/'\\\\''/g;
12236           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12237       ;;
12238     *)
12239       # `set' quotes correctly as required by POSIX, so do not add quotes.
12240       sed -n \
12241         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12242       ;;
12243     esac;
12244 } |
12245   sed '
12246      t clear
12247      : clear
12248      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12249      t end
12250      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12251      : end' >>confcache
12252 if cmp -s $cache_file confcache; then :; else
12253   if test -w $cache_file; then
12254     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12255     cat confcache >$cache_file
12256   else
12257     echo "not updating unwritable cache $cache_file"
12258   fi
12259 fi
12260 rm -f confcache
12261
12262 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12263 # Let make expand exec_prefix.
12264 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12265
12266 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12267 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12268 # trailing colons and then remove the whole line if VPATH becomes empty
12269 # (actually we leave an empty line to preserve line numbers).
12270 if test "x$srcdir" = x.; then
12271   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12272 s/:*\$(srcdir):*/:/;
12273 s/:*\${srcdir}:*/:/;
12274 s/:*@srcdir@:*/:/;
12275 s/^\([^=]*=[    ]*\):*/\1/;
12276 s/:*$//;
12277 s/^[^=]*=[      ]*$//;
12278 }'
12279 fi
12280
12281 DEFS=-DHAVE_CONFIG_H
12282
12283 : ${CONFIG_STATUS=./config.status}
12284 ac_clean_files_save=$ac_clean_files
12285 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12286 { echo "$as_me:12286: creating $CONFIG_STATUS" >&5
12287 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12288 cat >$CONFIG_STATUS <<_ACEOF
12289 #! $SHELL
12290 # Generated automatically by configure.
12291 # Run this file to recreate the current configuration.
12292 # Compiler output produced by configure, useful for debugging
12293 # configure, is in config.log if it exists.
12294
12295 debug=false
12296 SHELL=\${CONFIG_SHELL-$SHELL}
12297 ac_cs_invocation="\$0 \$@"
12298
12299 _ACEOF
12300
12301 cat >>$CONFIG_STATUS <<\_ACEOF
12302 # Be Bourne compatible
12303 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12304   emulate sh
12305   NULLCMD=:
12306 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12307   set -o posix
12308 fi
12309
12310 # Name of the executable.
12311 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12312
12313 if expr a : '\(a\)' >/dev/null 2>&1; then
12314   as_expr=expr
12315 else
12316   as_expr=false
12317 fi
12318
12319 rm -f conf$$ conf$$.exe conf$$.file
12320 echo >conf$$.file
12321 if ln -s conf$$.file conf$$ 2>/dev/null; then
12322   # We could just check for DJGPP; but this test a) works b) is more generic
12323   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12324   if test -f conf$$.exe; then
12325     # Don't use ln at all; we don't have any links
12326     as_ln_s='cp -p'
12327   else
12328     as_ln_s='ln -s'
12329   fi
12330 elif ln conf$$.file conf$$ 2>/dev/null; then
12331   as_ln_s=ln
12332 else
12333   as_ln_s='cp -p'
12334 fi
12335 rm -f conf$$ conf$$.exe conf$$.file
12336
12337 as_executable_p="test -f"
12338
12339 # Support unset when possible.
12340 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12341   as_unset=unset
12342 else
12343   as_unset=false
12344 fi
12345
12346 # NLS nuisances.
12347 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12348 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12349 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12350 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12351 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12352 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12353 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12354 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12355
12356 # IFS
12357 # We need space, tab and new line, in precisely that order.
12358 as_nl='
12359 '
12360 IFS="   $as_nl"
12361
12362 # CDPATH.
12363 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12364
12365 exec 6>&1
12366
12367 _ACEOF
12368
12369 # Files that config.status was made for.
12370 if test -n "$ac_config_files"; then
12371   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12372 fi
12373
12374 if test -n "$ac_config_headers"; then
12375   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12376 fi
12377
12378 if test -n "$ac_config_links"; then
12379   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12380 fi
12381
12382 if test -n "$ac_config_commands"; then
12383   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12384 fi
12385
12386 cat >>$CONFIG_STATUS <<\EOF
12387
12388 ac_cs_usage="\
12389 \`$as_me' instantiates files from templates according to the
12390 current configuration.
12391
12392 Usage: $0 [OPTIONS] [FILE]...
12393
12394   -h, --help       print this help, then exit
12395   -V, --version    print version number, then exit
12396   -d, --debug      don't remove temporary files
12397       --recheck    update $as_me by reconfiguring in the same conditions
12398   --file=FILE[:TEMPLATE]
12399                    instantiate the configuration file FILE
12400   --header=FILE[:TEMPLATE]
12401                    instantiate the configuration header FILE
12402
12403 Configuration files:
12404 $config_files
12405
12406 Configuration headers:
12407 $config_headers
12408
12409 Configuration commands:
12410 $config_commands
12411
12412 Report bugs to <dickey@invisible-island.net>."
12413 EOF
12414
12415 cat >>$CONFIG_STATUS <<EOF
12416 ac_cs_version="\\
12417 config.status
12418 configured by $0, generated by GNU Autoconf 2.52.20121002,
12419   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12420
12421 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12422 Free Software Foundation, Inc.
12423 This config.status script is free software; the Free Software Foundation
12424 gives unlimited permission to copy, distribute and modify it."
12425 srcdir=$srcdir
12426 INSTALL="$INSTALL"
12427 EOF
12428
12429 cat >>$CONFIG_STATUS <<\EOF
12430 # If no file are specified by the user, then we need to provide default
12431 # value.  By we need to know if files were specified by the user.
12432 ac_need_defaults=:
12433 while test $# != 0
12434 do
12435   case $1 in
12436   --*=*)
12437     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12438     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12439     shift
12440     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12441     shift
12442     ;;
12443   -*);;
12444   *) # This is not an option, so the user has probably given explicit
12445      # arguments.
12446      ac_need_defaults=false;;
12447   esac
12448
12449   case $1 in
12450   # Handling of the options.
12451 EOF
12452 cat >>$CONFIG_STATUS <<EOF
12453   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12454     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12455     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12456 EOF
12457 cat >>$CONFIG_STATUS <<\EOF
12458   --version | --vers* | -V )
12459     echo "$ac_cs_version"; exit 0 ;;
12460   --he | --h)
12461     # Conflict between --help and --header
12462     { { echo "$as_me:12462: error: ambiguous option: $1
12463 Try \`$0 --help' for more information." >&5
12464 echo "$as_me: error: ambiguous option: $1
12465 Try \`$0 --help' for more information." >&2;}
12466    { (exit 1); exit 1; }; };;
12467   --help | --hel | -h )
12468     echo "$ac_cs_usage"; exit 0 ;;
12469   --debug | --d* | -d )
12470     debug=: ;;
12471   --file | --fil | --fi | --f )
12472     shift
12473     CONFIG_FILES="$CONFIG_FILES $1"
12474     ac_need_defaults=false;;
12475   --header | --heade | --head | --hea )
12476     shift
12477     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12478     ac_need_defaults=false;;
12479
12480   # This is an error.
12481   -*) { { echo "$as_me:12481: error: unrecognized option: $1
12482 Try \`$0 --help' for more information." >&5
12483 echo "$as_me: error: unrecognized option: $1
12484 Try \`$0 --help' for more information." >&2;}
12485    { (exit 1); exit 1; }; } ;;
12486
12487   *) ac_config_targets="$ac_config_targets $1" ;;
12488
12489   esac
12490   shift
12491 done
12492
12493 exec 5>>config.log
12494 cat >&5 << _ACEOF
12495
12496 ## ----------------------- ##
12497 ## Running config.status.  ##
12498 ## ----------------------- ##
12499
12500 This file was extended by $as_me 2.52.20121002, executed with
12501   CONFIG_FILES    = $CONFIG_FILES
12502   CONFIG_HEADERS  = $CONFIG_HEADERS
12503   CONFIG_LINKS    = $CONFIG_LINKS
12504   CONFIG_COMMANDS = $CONFIG_COMMANDS
12505   > $ac_cs_invocation
12506 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12507
12508 _ACEOF
12509 EOF
12510
12511 cat >>$CONFIG_STATUS <<EOF
12512 #
12513 # INIT-COMMANDS section.
12514 #
12515
12516 ### Special initialization commands, used to pass information from the
12517 ### configuration-run into config.status
12518
12519 AWK="$AWK"
12520 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12521 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12522 LIB_NAME="$LIB_NAME"
12523 LIB_PREFIX="$LIB_PREFIX"
12524 LIB_SUFFIX="$LIB_SUFFIX"
12525 LN_S="$LN_S"
12526 NCURSES_MAJOR="$NCURSES_MAJOR"
12527 NCURSES_MINOR="$NCURSES_MINOR"
12528 NCURSES_PATCH="$NCURSES_PATCH"
12529 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12530 cf_cv_abi_version="$cf_cv_abi_version"
12531 cf_cv_rel_version="$cf_cv_rel_version"
12532 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12533 cf_cv_shared_soname='$cf_cv_shared_soname'
12534 cf_cv_shlib_version="$cf_cv_shlib_version"
12535 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12536 cf_cv_system_name="$cf_cv_system_name"
12537 host="$host"
12538 target="$target"
12539
12540 EOF
12541
12542 cat >>$CONFIG_STATUS <<\EOF
12543 for ac_config_target in $ac_config_targets
12544 do
12545   case "$ac_config_target" in
12546   # Handling of arguments.
12547   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12548   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12549   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12550   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12551   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12552   *) { { echo "$as_me:12552: error: invalid argument: $ac_config_target" >&5
12553 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12554    { (exit 1); exit 1; }; };;
12555   esac
12556 done
12557
12558 # If the user did not use the arguments to specify the items to instantiate,
12559 # then the envvar interface is used.  Set only those that are not.
12560 # We use the long form for the default assignment because of an extremely
12561 # bizarre bug on SunOS 4.1.3.
12562 if $ac_need_defaults; then
12563   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12564   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12565   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12566 fi
12567
12568 # Create a temporary directory, and hook for its removal unless debugging.
12569 $debug ||
12570 {
12571   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12572   trap '{ (exit 1); exit 1; }' 1 2 13 15
12573 }
12574
12575 # Create a (secure) tmp directory for tmp files.
12576 : ${TMPDIR=/tmp}
12577 {
12578   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12579   test -n "$tmp" && test -d "$tmp"
12580 }  ||
12581 {
12582   tmp=$TMPDIR/cs$$-$RANDOM
12583   (umask 077 && mkdir $tmp)
12584 } ||
12585 {
12586    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12587    { (exit 1); exit 1; }
12588 }
12589
12590 EOF
12591
12592 cat >>$CONFIG_STATUS <<EOF
12593
12594 #
12595 # CONFIG_FILES section.
12596 #
12597
12598 # No need to generate the scripts if there are no CONFIG_FILES.
12599 # This happens for instance when ./config.status config.h
12600 if test -n "\$CONFIG_FILES"; then
12601   # Protect against being on the right side of a sed subst in config.status.
12602   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12603    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12604 s,@SHELL@,$SHELL,;t t
12605 s,@exec_prefix@,$exec_prefix,;t t
12606 s,@prefix@,$prefix,;t t
12607 s,@program_transform_name@,$program_transform_name,;t t
12608 s,@bindir@,$bindir,;t t
12609 s,@sbindir@,$sbindir,;t t
12610 s,@libexecdir@,$libexecdir,;t t
12611 s,@datarootdir@,$datarootdir,;t t
12612 s,@datadir@,$datadir,;t t
12613 s,@sysconfdir@,$sysconfdir,;t t
12614 s,@sharedstatedir@,$sharedstatedir,;t t
12615 s,@localstatedir@,$localstatedir,;t t
12616 s,@libdir@,$libdir,;t t
12617 s,@includedir@,$includedir,;t t
12618 s,@oldincludedir@,$oldincludedir,;t t
12619 s,@infodir@,$infodir,;t t
12620 s,@mandir@,$mandir,;t t
12621 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12622 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12623 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12624 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12625 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12626 s,@build_alias@,$build_alias,;t t
12627 s,@host_alias@,$host_alias,;t t
12628 s,@target_alias@,$target_alias,;t t
12629 s,@ECHO_C@,$ECHO_C,;t t
12630 s,@ECHO_N@,$ECHO_N,;t t
12631 s,@ECHO_T@,$ECHO_T,;t t
12632 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12633 s,@DEFS@,$DEFS,;t t
12634 s,@LIBS@,$LIBS,;t t
12635 s,@top_builddir@,$top_builddir,;t t
12636 s,@build@,$build,;t t
12637 s,@build_cpu@,$build_cpu,;t t
12638 s,@build_vendor@,$build_vendor,;t t
12639 s,@build_os@,$build_os,;t t
12640 s,@host@,$host,;t t
12641 s,@host_cpu@,$host_cpu,;t t
12642 s,@host_vendor@,$host_vendor,;t t
12643 s,@host_os@,$host_os,;t t
12644 s,@target@,$target,;t t
12645 s,@target_cpu@,$target_cpu,;t t
12646 s,@target_vendor@,$target_vendor,;t t
12647 s,@target_os@,$target_os,;t t
12648 s,@CC@,$CC,;t t
12649 s,@CFLAGS@,$CFLAGS,;t t
12650 s,@LDFLAGS@,$LDFLAGS,;t t
12651 s,@CPPFLAGS@,$CPPFLAGS,;t t
12652 s,@ac_ct_CC@,$ac_ct_CC,;t t
12653 s,@EXEEXT@,$EXEEXT,;t t
12654 s,@OBJEXT@,$OBJEXT,;t t
12655 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12656 s,@CPP@,$CPP,;t t
12657 s,@AWK@,$AWK,;t t
12658 s,@EGREP@,$EGREP,;t t
12659 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12660 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12661 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12662 s,@LN_S@,$LN_S,;t t
12663 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12664 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12665 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12666 s,@SET_MAKE@,$SET_MAKE,;t t
12667 s,@CTAGS@,$CTAGS,;t t
12668 s,@ETAGS@,$ETAGS,;t t
12669 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12670 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12671 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12672 s,@RANLIB@,$RANLIB,;t t
12673 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12674 s,@LD@,$LD,;t t
12675 s,@ac_ct_LD@,$ac_ct_LD,;t t
12676 s,@AR@,$AR,;t t
12677 s,@ac_ct_AR@,$ac_ct_AR,;t t
12678 s,@ARFLAGS@,$ARFLAGS,;t t
12679 s,@DESTDIR@,$DESTDIR,;t t
12680 s,@BUILD_CC@,$BUILD_CC,;t t
12681 s,@BUILD_CPP@,$BUILD_CPP,;t t
12682 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12683 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12684 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12685 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12686 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12687 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12688 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12689 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12690 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12691 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
12692 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12693 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12694 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12695 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12696 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12697 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12698 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12699 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12700 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12701 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12702 s,@CC_G_OPT@,$CC_G_OPT,;t t
12703 s,@LD_MODEL@,$LD_MODEL,;t t
12704 s,@shlibdir@,$shlibdir,;t t
12705 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
12706 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12707 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12708 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12709 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12710 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
12711 s,@LINK_PROGS@,$LINK_PROGS,;t t
12712 s,@LINK_TESTS@,$LINK_TESTS,;t t
12713 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12714 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12715 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12716 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12717 s,@RPATH_LIST@,$RPATH_LIST,;t t
12718 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12719 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12720 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12721 s,@PTHREAD@,$PTHREAD,;t t
12722 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12723 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12724 s,@ECHO_LT@,$ECHO_LT,;t t
12725 s,@ECHO_LD@,$ECHO_LD,;t t
12726 s,@RULE_CC@,$RULE_CC,;t t
12727 s,@SHOW_CC@,$SHOW_CC,;t t
12728 s,@ECHO_CC@,$ECHO_CC,;t t
12729 s,@ADAFLAGS@,$ADAFLAGS,;t t
12730 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12731 s,@ADA_TRACE@,$ADA_TRACE,;t t
12732 s,@gnat_exists@,$gnat_exists,;t t
12733 s,@M4_exists@,$M4_exists,;t t
12734 s,@cf_ada_make@,$cf_ada_make,;t t
12735 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
12736 s,@cf_compile_generics@,$cf_compile_generics,;t t
12737 s,@cf_generic_objects@,$cf_generic_objects,;t t
12738 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12739 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12740 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12741 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12742 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12743 s,@cf_ada_package@,$cf_ada_package,;t t
12744 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12745 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12746 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12747 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12748 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
12749 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
12750 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12751 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12752 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12753 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12754 s,@TEST_ARG2@,$TEST_ARG2,;t t
12755 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12756 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12757 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12758 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12759 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12760 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12761 CEOF
12762
12763 EOF
12764
12765   cat >>$CONFIG_STATUS <<\EOF
12766   # Split the substitutions into bite-sized pieces for seds with
12767   # small command number limits, like on Digital OSF/1 and HP-UX.
12768   ac_max_sed_lines=48
12769   ac_sed_frag=1 # Number of current file.
12770   ac_beg=1 # First line for current file.
12771   ac_end=$ac_max_sed_lines # Line after last line for current file.
12772   ac_more_lines=:
12773   ac_sed_cmds=
12774   while $ac_more_lines; do
12775     if test $ac_beg -gt 1; then
12776       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12777     else
12778       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12779     fi
12780     if test ! -s $tmp/subs.frag; then
12781       ac_more_lines=false
12782     else
12783       # The purpose of the label and of the branching condition is to
12784       # speed up the sed processing (if there are no `@' at all, there
12785       # is no need to browse any of the substitutions).
12786       # These are the two extra sed commands mentioned above.
12787       (echo ':t
12788   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12789       if test -z "$ac_sed_cmds"; then
12790         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12791       else
12792         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12793       fi
12794       ac_sed_frag=`expr $ac_sed_frag + 1`
12795       ac_beg=$ac_end
12796       ac_end=`expr $ac_end + $ac_max_sed_lines`
12797     fi
12798   done
12799   if test -z "$ac_sed_cmds"; then
12800     ac_sed_cmds=cat
12801   fi
12802 fi # test -n "$CONFIG_FILES"
12803
12804 EOF
12805 cat >>$CONFIG_STATUS <<\EOF
12806 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12807   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12808   case $ac_file in
12809   - | *:- | *:-:* ) # input from stdin
12810         cat >$tmp/stdin
12811         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12812         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12813   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12814         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12815   * )   ac_file_in=$ac_file.in ;;
12816   esac
12817
12818   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12819   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12820          X"$ac_file" : 'X\(//\)[^/]' \| \
12821          X"$ac_file" : 'X\(//\)$' \| \
12822          X"$ac_file" : 'X\(/\)' \| \
12823          .     : '\(.\)' 2>/dev/null ||
12824 echo X"$ac_file" |
12825     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12826           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12827           /^X\(\/\/\)$/{ s//\1/; q; }
12828           /^X\(\/\).*/{ s//\1/; q; }
12829           s/.*/./; q'`
12830   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12831     { case "$ac_dir" in
12832   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12833   *)                      as_incr_dir=.;;
12834 esac
12835 as_dummy="$ac_dir"
12836 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12837   case $as_mkdir_dir in
12838     # Skip DOS drivespec
12839     ?:) as_incr_dir=$as_mkdir_dir ;;
12840     *)
12841       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12842       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12843     ;;
12844   esac
12845 done; }
12846
12847     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12848     # A "../" for each directory in $ac_dir_suffix.
12849     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12850   else
12851     ac_dir_suffix= ac_dots=
12852   fi
12853
12854   case $srcdir in
12855   .)  ac_srcdir=.
12856       if test -z "$ac_dots"; then
12857          ac_top_srcdir=.
12858       else
12859          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12860       fi ;;
12861   [\\/]* | ?:[\\/]* )
12862       ac_srcdir=$srcdir$ac_dir_suffix;
12863       ac_top_srcdir=$srcdir ;;
12864   *) # Relative path.
12865     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12866     ac_top_srcdir=$ac_dots$srcdir ;;
12867   esac
12868
12869   case $INSTALL in
12870   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12871   *) ac_INSTALL=$ac_dots$INSTALL ;;
12872   esac
12873
12874   if test x"$ac_file" != x-; then
12875     { echo "$as_me:12875: creating $ac_file" >&5
12876 echo "$as_me: creating $ac_file" >&6;}
12877     rm -f "$ac_file"
12878   fi
12879   # Let's still pretend it is `configure' which instantiates (i.e., don't
12880   # use $as_me), people would be surprised to read:
12881   #    /* config.h.  Generated automatically by config.status.  */
12882   configure_input="Generated automatically from `echo $ac_file_in |
12883                                                  sed 's,.*/,,'` by configure."
12884
12885   # First look for the input files in the build tree, otherwise in the
12886   # src tree.
12887   ac_file_inputs=`IFS=:
12888     for f in $ac_file_in; do
12889       case $f in
12890       -) echo $tmp/stdin ;;
12891       [\\/$]*)
12892          # Absolute (can't be DOS-style, as IFS=:)
12893          test -f "$f" || { { echo "$as_me:12893: error: cannot find input file: $f" >&5
12894 echo "$as_me: error: cannot find input file: $f" >&2;}
12895    { (exit 1); exit 1; }; }
12896          echo $f;;
12897       *) # Relative
12898          if test -f "$f"; then
12899            # Build tree
12900            echo $f
12901          elif test -f "$srcdir/$f"; then
12902            # Source tree
12903            echo $srcdir/$f
12904          else
12905            # /dev/null tree
12906            { { echo "$as_me:12906: error: cannot find input file: $f" >&5
12907 echo "$as_me: error: cannot find input file: $f" >&2;}
12908    { (exit 1); exit 1; }; }
12909          fi;;
12910       esac
12911     done` || { (exit 1); exit 1; }
12912 EOF
12913 cat >>$CONFIG_STATUS <<\EOF
12914   ac_warn_datarootdir=no
12915   if test x"$ac_file" != x-; then
12916     for ac_item in $ac_file_inputs
12917     do
12918       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
12919       if test -n "$ac_seen"; then
12920         ac_used=`grep '@datarootdir@' $ac_item`
12921         if test -z "$ac_used"; then
12922           { echo "$as_me:12922: WARNING: datarootdir was used implicitly but not set:
12923 $ac_seen" >&5
12924 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
12925 $ac_seen" >&2;}
12926           ac_warn_datarootdir=yes
12927         fi
12928       fi
12929       ac_seen=`grep '${datarootdir}' $ac_item`
12930       if test -n "$ac_seen"; then
12931         { echo "$as_me:12931: WARNING: datarootdir was used explicitly but not set:
12932 $ac_seen" >&5
12933 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
12934 $ac_seen" >&2;}
12935         ac_warn_datarootdir=yes
12936       fi
12937     done
12938   fi
12939
12940 if test "x$ac_warn_datarootdir" = xyes; then
12941   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
12942 fi
12943
12944 EOF
12945 cat >>$CONFIG_STATUS <<EOF
12946   sed "$ac_vpsub
12947 $extrasub
12948 EOF
12949 cat >>$CONFIG_STATUS <<\EOF
12950 :t
12951 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12952 s,@configure_input@,$configure_input,;t t
12953 s,@srcdir@,$ac_srcdir,;t t
12954 s,@top_srcdir@,$ac_top_srcdir,;t t
12955 s,@INSTALL@,$ac_INSTALL,;t t
12956 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12957   rm -f $tmp/stdin
12958   if test x"$ac_file" != x-; then
12959     cp $tmp/out $ac_file
12960
12961     for ac_name in prefix exec_prefix datarootdir
12962     do
12963         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
12964         if test -n "$ac_seen"; then
12965             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
12966             if test -z "$ac_init"; then
12967               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
12968               { echo "$as_me:12968: WARNING: Variable $ac_name is used but was not set:
12969 $ac_seen" >&5
12970 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
12971 $ac_seen" >&2;}
12972             fi
12973         fi
12974     done
12975     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
12976     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
12977     if test -s $tmp/out; then
12978       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
12979       { echo "$as_me:12979: WARNING: Some variables may not be substituted:
12980 $ac_seen" >&5
12981 echo "$as_me: WARNING: Some variables may not be substituted:
12982 $ac_seen" >&2;}
12983     fi
12984   else
12985     cat $tmp/out
12986   fi
12987   rm -f $tmp/out
12988
12989 done
12990 EOF
12991 cat >>$CONFIG_STATUS <<\EOF
12992
12993 #
12994 # CONFIG_HEADER section.
12995 #
12996
12997 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12998 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12999 #
13000 # ac_d sets the value in "#define NAME VALUE" lines.
13001 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13002 ac_dB='[        ].*$,\1#\2'
13003 ac_dC=' '
13004 ac_dD=',;t'
13005 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13006 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13007 ac_iB='\([      ]\),\1#\2define\3'
13008 ac_iC=' '
13009 ac_iD='\4,;t'
13010 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13011 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13012 ac_uB='$,\1#\2define\3'
13013 ac_uC=' '
13014 ac_uD=',;t'
13015
13016 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13017   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13018   case $ac_file in
13019   - | *:- | *:-:* ) # input from stdin
13020         cat >$tmp/stdin
13021         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13022         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13023   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13024         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13025   * )   ac_file_in=$ac_file.in ;;
13026   esac
13027
13028   test x"$ac_file" != x- && { echo "$as_me:13028: creating $ac_file" >&5
13029 echo "$as_me: creating $ac_file" >&6;}
13030
13031   # First look for the input files in the build tree, otherwise in the
13032   # src tree.
13033   ac_file_inputs=`IFS=:
13034     for f in $ac_file_in; do
13035       case $f in
13036       -) echo $tmp/stdin ;;
13037       [\\/$]*)
13038          # Absolute (can't be DOS-style, as IFS=:)
13039          test -f "$f" || { { echo "$as_me:13039: error: cannot find input file: $f" >&5
13040 echo "$as_me: error: cannot find input file: $f" >&2;}
13041    { (exit 1); exit 1; }; }
13042          echo $f;;
13043       *) # Relative
13044          if test -f "$f"; then
13045            # Build tree
13046            echo $f
13047          elif test -f "$srcdir/$f"; then
13048            # Source tree
13049            echo $srcdir/$f
13050          else
13051            # /dev/null tree
13052            { { echo "$as_me:13052: error: cannot find input file: $f" >&5
13053 echo "$as_me: error: cannot find input file: $f" >&2;}
13054    { (exit 1); exit 1; }; }
13055          fi;;
13056       esac
13057     done` || { (exit 1); exit 1; }
13058   # Remove the trailing spaces.
13059   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
13060
13061 EOF
13062
13063 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
13064 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
13065 # be either 'cat' or 'sort'.
13066 cat confdefs.h | uniq >conftest.vals
13067
13068 # Break up conftest.vals because some shells have a limit on
13069 # the size of here documents, and old seds have small limits too.
13070
13071 rm -f conftest.tail
13072 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
13073 while grep . conftest.vals >/dev/null
13074 do
13075   # Write chunks of a limited-size here document to conftest.frag.
13076   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
13077   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
13078   echo 'CEOF' >> $CONFIG_STATUS
13079   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13080   rm -f conftest.vals
13081   mv conftest.tail conftest.vals
13082 done
13083 rm -f conftest.vals
13084
13085 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
13086 # marker @DEFS@.
13087 echo '  cat >> conftest.edit <<CEOF
13088 /@DEFS@/r conftest.frag
13089 /@DEFS@/d
13090 CEOF
13091 sed -f conftest.edit $tmp/in > $tmp/out
13092 rm -f $tmp/in
13093 mv $tmp/out $tmp/in
13094 rm -f conftest.edit conftest.frag
13095 ' >> $CONFIG_STATUS
13096
13097 cat >>$CONFIG_STATUS <<\EOF
13098   # Let's still pretend it is `configure' which instantiates (i.e., don't
13099   # use $as_me), people would be surprised to read:
13100   #    /* config.h.  Generated automatically by config.status.  */
13101   if test x"$ac_file" = x-; then
13102     echo "/* Generated automatically by configure.  */" >$tmp/config.h
13103   else
13104     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
13105   fi
13106   cat $tmp/in >>$tmp/config.h
13107   rm -f $tmp/in
13108   if test x"$ac_file" != x-; then
13109     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
13110       { echo "$as_me:13110: $ac_file is unchanged" >&5
13111 echo "$as_me: $ac_file is unchanged" >&6;}
13112     else
13113       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13114          X"$ac_file" : 'X\(//\)[^/]' \| \
13115          X"$ac_file" : 'X\(//\)$' \| \
13116          X"$ac_file" : 'X\(/\)' \| \
13117          .     : '\(.\)' 2>/dev/null ||
13118 echo X"$ac_file" |
13119     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13120           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13121           /^X\(\/\/\)$/{ s//\1/; q; }
13122           /^X\(\/\).*/{ s//\1/; q; }
13123           s/.*/./; q'`
13124       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13125         { case "$ac_dir" in
13126   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13127   *)                      as_incr_dir=.;;
13128 esac
13129 as_dummy="$ac_dir"
13130 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13131   case $as_mkdir_dir in
13132     # Skip DOS drivespec
13133     ?:) as_incr_dir=$as_mkdir_dir ;;
13134     *)
13135       as_incr_dir=$as_incr_dir/$as_mkdir_dir
13136       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13137     ;;
13138   esac
13139 done; }
13140
13141       fi
13142       rm -f $ac_file
13143       mv $tmp/config.h $ac_file
13144     fi
13145   else
13146     cat $tmp/config.h
13147     rm -f $tmp/config.h
13148   fi
13149 done
13150 EOF
13151 cat >>$CONFIG_STATUS <<\EOF
13152 #
13153 # CONFIG_COMMANDS section.
13154 #
13155 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13156   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13157   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13158
13159   case $ac_dest in
13160     default )
13161 if test -z "$USE_OLD_MAKERULES" ; then
13162         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
13163 fi
13164  ;;
13165   esac
13166 done
13167 EOF
13168
13169 cat >>$CONFIG_STATUS <<\EOF
13170
13171 { (exit 0); exit 0; }
13172 EOF
13173 chmod +x $CONFIG_STATUS
13174 ac_clean_files=$ac_clean_files_save
13175
13176 # configure is writing to config.log, and then calls config.status.
13177 # config.status does its own redirection, appending to config.log.
13178 # Unfortunately, on DOS this fails, as config.log is still kept open
13179 # by configure, so config.status won't be able to write to it; its
13180 # output is simply discarded.  So we exec the FD to /dev/null,
13181 # effectively closing config.log, so it can be properly (re)opened and
13182 # appended to by config.status.  When coming back to configure, we
13183 # need to make the FD available again.
13184 if test "$no_create" != yes; then
13185   ac_cs_success=:
13186   exec 5>/dev/null
13187   $SHELL $CONFIG_STATUS || ac_cs_success=false
13188   exec 5>>config.log
13189   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13190   # would make configure fail if this is the last instruction.
13191   $ac_cs_success || { (exit 1); exit 1; }
13192 fi
13193 ${MAKE:-make} preinstall