]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20120114
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.36 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="gen/gen.c"
109
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561
562 #
563 # Report the --help message.
564 #
565 if test "$ac_init_help" = "long"; then
566   # Omit some internal or obsolete options to make the list less imposing.
567   # This message is too long to be a string in the A/UX 3.1 sh.
568   cat <<EOF
569 \`configure' configures this package to adapt to many kinds of systems.
570
571 Usage: $0 [OPTION]... [VAR=VALUE]...
572
573 To assign environment variables (e.g., CC, CFLAGS...), specify them as
574 VAR=VALUE.  See below for descriptions of some of the useful variables.
575
576 Defaults for the options are specified in brackets.
577
578 Configuration:
579   -h, --help              display this help and exit
580       --help=short        display options specific to this package
581       --help=recursive    display the short help of all the included packages
582   -V, --version           display version information and exit
583   -q, --quiet, --silent   do not print \`checking...' messages
584       --cache-file=FILE   cache test results in FILE [disabled]
585   -C, --config-cache      alias for \`--cache-file=config.cache'
586   -n, --no-create         do not create output files
587       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
588
589 EOF
590
591   cat <<EOF
592 Installation directories:
593   --prefix=PREFIX         install architecture-independent files in PREFIX
594                           [$ac_default_prefix]
595   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
596                           [PREFIX]
597
598 By default, \`make install' will install all the files in
599 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
600 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
601 for instance \`--prefix=\$HOME'.
602
603 For better control, use the options below.
604
605 Fine tuning of the installation directories:
606   --bindir=DIR            user executables [EPREFIX/bin]
607   --sbindir=DIR           system admin executables [EPREFIX/sbin]
608   --libexecdir=DIR        program executables [EPREFIX/libexec]
609   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
610   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
611   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
612   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
613   --libdir=DIR            object code libraries [EPREFIX/lib]
614   --includedir=DIR        C header files [PREFIX/include]
615   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
616   --infodir=DIR           info documentation [PREFIX/info]
617   --mandir=DIR            man documentation [PREFIX/man]
618 EOF
619
620   cat <<\EOF
621
622 Program names:
623   --program-prefix=PREFIX            prepend PREFIX to installed program names
624   --program-suffix=SUFFIX            append SUFFIX to installed program names
625   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
626
627 System types:
628   --build=BUILD           configure for building on BUILD [guessed]
629   --host=HOST       build programs to run on HOST [BUILD]
630   --target=TARGET   configure for building compilers for TARGET [HOST]
631 EOF
632 fi
633
634 if test -n "$ac_init_help"; then
635
636   cat <<\EOF
637
638 Optional Packages:
639   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
640   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
641
642 Optional Features:
643   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
644   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
645
646   --with-system-type=XXX  test: override derived host system-type
647   --with-pkg-config{=path} enable/disable use of pkg-config
648   --with-pkg-config-libdir=XXX use given directory for installing pc-files
649   --enable-pc-files       generate and install .pc files for pkg-config
650   --without-tests         suppress build with test-programs
651   --enable-mixed-case     tic should assume mixed-case filenames
652   --with-install-prefix   prefixes actual install-location ($DESTDIR)
653 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
654   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
655   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
656   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
657   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
658   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
659   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
660 Options to Specify the Libraries Built/Used:
661   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
662   --enable-widec          compile with wide-char/UTF-8 code
663   --with-curses-dir=DIR   directory in which (n)curses is installed
664   --with-shlib-version=X  Specify rel or abi version for shared libs
665   --enable-rpath-link     link sample programs with rpath option
666 Fine-Tuning Your Configuration:
667   --enable-broken_linker  compile with broken-linker support code
668   --disable-largefile     omit support for large files
669   --with-rcs-ids          compile-in RCS identifiers
670 Extensions:
671   --disable-ext-funcs     disable function-extensions
672   --enable-const          compile with extra/non-standard const
673 Development Code:
674   --without-develop       disable development options
675 Experimental Code:
676   --with-pthread          use POSIX thread library
677   --enable-weak-symbols   enable weak-symbols for pthreads
678   --enable-reentrant      compile with experimental reentrant code
679   --with-wrap-prefix=XXX  override prefix used for public variables
680 Testing/development Options:
681   --enable-echo           build: display "compiling" commands (default)
682   --enable-warnings       build: turn on GCC compiler warnings
683   --enable-assertions     test: turn on generation of assertion code
684   --enable-expanded       test: generate functions for certain macros
685   --disable-macros        test: use functions rather than macros
686   --with-trace            test: add trace() function to all models of ncurses
687 Ada95 Binding Options:
688   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
689   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
690   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
691   --with-ada-sharedlib=XX build Ada95 shared-library
692
693 Some influential environment variables:
694   CC          C compiler command
695   CFLAGS      C compiler flags
696   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
697               nonstandard directory <lib dir>
698   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
699               headers in a nonstandard directory <include dir>
700   CPP         C preprocessor
701
702 Use these variables to override the choices made by `configure' or to help
703 it to find libraries and programs with nonstandard names/locations.
704
705 EOF
706 fi
707
708 if test "$ac_init_help" = "recursive"; then
709   # If there are subdirs, report their specific --help.
710   ac_popdir=`pwd`
711   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
712     cd $ac_subdir
713     # A "../" for each directory in /$ac_subdir.
714     ac_dots=`echo $ac_subdir |
715              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
716
717     case $srcdir in
718     .) # No --srcdir option.  We are building in place.
719       ac_sub_srcdir=$srcdir ;;
720     [\\/]* | ?:[\\/]* ) # Absolute path.
721       ac_sub_srcdir=$srcdir/$ac_subdir ;;
722     *) # Relative path.
723       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
724     esac
725
726     # Check for guested configure; otherwise get Cygnus style configure.
727     if test -f $ac_sub_srcdir/configure.gnu; then
728       echo
729       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
730     elif test -f $ac_sub_srcdir/configure; then
731       echo
732       $SHELL $ac_sub_srcdir/configure  --help=recursive
733     elif test -f $ac_sub_srcdir/configure.ac ||
734            test -f $ac_sub_srcdir/configure.in; then
735       echo
736       $ac_configure --help
737     else
738       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
739     fi
740     cd $ac_popdir
741   done
742 fi
743
744 test -n "$ac_init_help" && exit 0
745 if $ac_init_version; then
746   cat <<\EOF
747
748 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
749 Free Software Foundation, Inc.
750 This configure script is free software; the Free Software Foundation
751 gives unlimited permission to copy, distribute and modify it.
752 EOF
753   exit 0
754 fi
755 exec 5>config.log
756 cat >&5 <<EOF
757 This file contains any messages produced by compilers while
758 running configure, to aid debugging if configure makes a mistake.
759
760 It was created by $as_me, which was
761 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
762
763   $ $0 $@
764
765 EOF
766 {
767 cat <<_ASUNAME
768 ## ---------- ##
769 ## Platform.  ##
770 ## ---------- ##
771
772 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
773 uname -m = `(uname -m) 2>/dev/null || echo unknown`
774 uname -r = `(uname -r) 2>/dev/null || echo unknown`
775 uname -s = `(uname -s) 2>/dev/null || echo unknown`
776 uname -v = `(uname -v) 2>/dev/null || echo unknown`
777
778 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
779 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
780
781 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
782 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
783 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
784 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
785 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
786 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
787 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
788
789 PATH = $PATH
790
791 _ASUNAME
792 } >&5
793
794 cat >&5 <<EOF
795 ## ------------ ##
796 ## Core tests.  ##
797 ## ------------ ##
798
799 EOF
800
801 # Keep a trace of the command line.
802 # Strip out --no-create and --no-recursion so they do not pile up.
803 # Also quote any args containing shell meta-characters.
804 ac_configure_args=
805 ac_sep=
806 for ac_arg
807 do
808   case $ac_arg in
809   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
810   | --no-cr | --no-c) ;;
811   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
812   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
813   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
814     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
815     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
816     ac_sep=" " ;;
817   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
818      ac_sep=" " ;;
819   esac
820   # Get rid of the leading space.
821 done
822
823 # When interrupted or exit'd, cleanup temporary files, and complete
824 # config.log.  We remove comments because anyway the quotes in there
825 # would cause problems or look ugly.
826 trap 'exit_status=$?
827   # Save into config.log some information that might help in debugging.
828   echo >&5
829   echo "## ----------------- ##" >&5
830   echo "## Cache variables.  ##" >&5
831   echo "## ----------------- ##" >&5
832   echo >&5
833   # The following way of writing the cache mishandles newlines in values,
834 {
835   (set) 2>&1 |
836     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
837     *ac_space=\ *)
838       sed -n \
839         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
840           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
841       ;;
842     *)
843       sed -n \
844         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
845       ;;
846     esac;
847 } >&5
848   sed "/^$/d" confdefs.h >conftest.log
849   if test -s conftest.log; then
850     echo >&5
851     echo "## ------------ ##" >&5
852     echo "## confdefs.h.  ##" >&5
853     echo "## ------------ ##" >&5
854     echo >&5
855     cat conftest.log >&5
856   fi
857   (echo; echo) >&5
858   test "$ac_signal" != 0 &&
859     echo "$as_me: caught signal $ac_signal" >&5
860   echo "$as_me: exit $exit_status" >&5
861   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
862     exit $exit_status
863      ' 0
864 for ac_signal in 1 2 13 15; do
865   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
866 done
867 ac_signal=0
868
869 # confdefs.h avoids OS command line length limits that DEFS can exceed.
870 rm -rf conftest* confdefs.h
871 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
872 echo >confdefs.h
873
874 # Let the site file select an alternate cache file if it wants to.
875 # Prefer explicitly selected file to automatically selected ones.
876 if test -z "$CONFIG_SITE"; then
877   if test "x$prefix" != xNONE; then
878     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
879   else
880     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
881   fi
882 fi
883 for ac_site_file in $CONFIG_SITE; do
884   if test -r "$ac_site_file"; then
885     { echo "$as_me:885: loading site script $ac_site_file" >&5
886 echo "$as_me: loading site script $ac_site_file" >&6;}
887     cat "$ac_site_file" >&5
888     . "$ac_site_file"
889   fi
890 done
891
892 if test -r "$cache_file"; then
893   # Some versions of bash will fail to source /dev/null (special
894   # files actually), so we avoid doing that.
895   if test -f "$cache_file"; then
896     { echo "$as_me:896: loading cache $cache_file" >&5
897 echo "$as_me: loading cache $cache_file" >&6;}
898     case $cache_file in
899       [\\/]* | ?:[\\/]* ) . $cache_file;;
900       *)                      . ./$cache_file;;
901     esac
902   fi
903 else
904   { echo "$as_me:904: creating cache $cache_file" >&5
905 echo "$as_me: creating cache $cache_file" >&6;}
906   >$cache_file
907 fi
908
909 # Check that the precious variables saved in the cache have kept the same
910 # value.
911 ac_cache_corrupted=false
912 for ac_var in `(set) 2>&1 |
913                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
914   eval ac_old_set=\$ac_cv_env_${ac_var}_set
915   eval ac_new_set=\$ac_env_${ac_var}_set
916   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
917   eval ac_new_val="\$ac_env_${ac_var}_value"
918   case $ac_old_set,$ac_new_set in
919     set,)
920       { echo "$as_me:920: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
921 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
922       ac_cache_corrupted=: ;;
923     ,set)
924       { echo "$as_me:924: error: \`$ac_var' was not set in the previous run" >&5
925 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
926       ac_cache_corrupted=: ;;
927     ,);;
928     *)
929       if test "x$ac_old_val" != "x$ac_new_val"; then
930         { echo "$as_me:930: error: \`$ac_var' has changed since the previous run:" >&5
931 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
932         { echo "$as_me:932:   former value:  $ac_old_val" >&5
933 echo "$as_me:   former value:  $ac_old_val" >&2;}
934         { echo "$as_me:934:   current value: $ac_new_val" >&5
935 echo "$as_me:   current value: $ac_new_val" >&2;}
936         ac_cache_corrupted=:
937       fi;;
938   esac
939   # Pass precious variables to config.status.  It doesn't matter if
940   # we pass some twice (in addition to the command line arguments).
941   if test "$ac_new_set" = set; then
942     case $ac_new_val in
943     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
944       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
945       ac_configure_args="$ac_configure_args '$ac_arg'"
946       ;;
947     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
948        ;;
949     esac
950   fi
951 done
952 if $ac_cache_corrupted; then
953   { echo "$as_me:953: error: changes in the environment can compromise the build" >&5
954 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
955   { { echo "$as_me:955: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
956 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
957    { (exit 1); exit 1; }; }
958 fi
959
960 ac_ext=c
961 ac_cpp='$CPP $CPPFLAGS'
962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
965 ac_main_return=return
966
967 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
968   *c*,-n*) ECHO_N= ECHO_C='
969 ' ECHO_T='      ' ;;
970   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
971   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
972 esac
973 echo "#! $SHELL" >conftest.sh
974 echo  "exit 0"   >>conftest.sh
975 chmod +x conftest.sh
976 if { (echo "$as_me:976: PATH=\".;.\"; conftest.sh") >&5
977   (PATH=".;."; conftest.sh) 2>&5
978   ac_status=$?
979   echo "$as_me:979: \$? = $ac_status" >&5
980   (exit $ac_status); }; then
981   ac_path_separator=';'
982 else
983   ac_path_separator=:
984 fi
985 PATH_SEPARATOR="$ac_path_separator"
986 rm -f conftest.sh
987
988 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
989
990 top_builddir=`pwd`
991
992 ac_aux_dir=
993 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
994   if test -f $ac_dir/install-sh; then
995     ac_aux_dir=$ac_dir
996     ac_install_sh="$ac_aux_dir/install-sh -c"
997     break
998   elif test -f $ac_dir/install.sh; then
999     ac_aux_dir=$ac_dir
1000     ac_install_sh="$ac_aux_dir/install.sh -c"
1001     break
1002   elif test -f $ac_dir/shtool; then
1003     ac_aux_dir=$ac_dir
1004     ac_install_sh="$ac_aux_dir/shtool install -c"
1005     break
1006   fi
1007 done
1008 if test -z "$ac_aux_dir"; then
1009   { { echo "$as_me:1009: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1010 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1011    { (exit 1); exit 1; }; }
1012 fi
1013 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1014 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1015 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1016
1017 # Make sure we can run config.sub.
1018 $ac_config_sub sun4 >/dev/null 2>&1 ||
1019   { { echo "$as_me:1019: error: cannot run $ac_config_sub" >&5
1020 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1021    { (exit 1); exit 1; }; }
1022
1023 echo "$as_me:1023: checking build system type" >&5
1024 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1025 if test "${ac_cv_build+set}" = set; then
1026   echo $ECHO_N "(cached) $ECHO_C" >&6
1027 else
1028   ac_cv_build_alias=$build_alias
1029 test -z "$ac_cv_build_alias" &&
1030   ac_cv_build_alias=`$ac_config_guess`
1031 test -z "$ac_cv_build_alias" &&
1032   { { echo "$as_me:1032: error: cannot guess build type; you must specify one" >&5
1033 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1034    { (exit 1); exit 1; }; }
1035 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1036   { { echo "$as_me:1036: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1037 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1038    { (exit 1); exit 1; }; }
1039
1040 fi
1041 echo "$as_me:1041: result: $ac_cv_build" >&5
1042 echo "${ECHO_T}$ac_cv_build" >&6
1043 build=$ac_cv_build
1044 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1045 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1046 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1047
1048 echo "$as_me:1048: checking host system type" >&5
1049 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1050 if test "${ac_cv_host+set}" = set; then
1051   echo $ECHO_N "(cached) $ECHO_C" >&6
1052 else
1053   ac_cv_host_alias=$host_alias
1054 test -z "$ac_cv_host_alias" &&
1055   ac_cv_host_alias=$ac_cv_build_alias
1056 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1057   { { echo "$as_me:1057: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1058 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1059    { (exit 1); exit 1; }; }
1060
1061 fi
1062 echo "$as_me:1062: result: $ac_cv_host" >&5
1063 echo "${ECHO_T}$ac_cv_host" >&6
1064 host=$ac_cv_host
1065 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1066 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1067 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1068
1069 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1070         echo "$as_me:1070: checking target system type" >&5
1071 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1072 if test "${ac_cv_target+set}" = set; then
1073   echo $ECHO_N "(cached) $ECHO_C" >&6
1074 else
1075   ac_cv_target_alias=$target_alias
1076 test "x$ac_cv_target_alias" = "x" &&
1077   ac_cv_target_alias=$ac_cv_host_alias
1078 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1079   { { echo "$as_me:1079: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1080 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1081    { (exit 1); exit 1; }; }
1082
1083 fi
1084 echo "$as_me:1084: result: $ac_cv_target" >&5
1085 echo "${ECHO_T}$ac_cv_target" >&6
1086 target=$ac_cv_target
1087 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1088 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1089 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1090
1091 # The aliases save the names the user supplied, while $host etc.
1092 # will get canonicalized.
1093 test -n "$target_alias" &&
1094   test "$program_prefix$program_suffix$program_transform_name" = \
1095     NONENONEs,x,x, &&
1096   program_prefix=${target_alias}-
1097         system_name="$host_os"
1098 else
1099         system_name="`(uname -s -r) 2>/dev/null`"
1100         if test -z "$system_name" ; then
1101                 system_name="`(hostname) 2>/dev/null`"
1102         fi
1103 fi
1104 test -n "$system_name" && cat >>confdefs.h <<EOF
1105 #define SYSTEM_NAME "$system_name"
1106 EOF
1107
1108 if test "${cf_cv_system_name+set}" = set; then
1109   echo $ECHO_N "(cached) $ECHO_C" >&6
1110 else
1111   cf_cv_system_name="$system_name"
1112 fi
1113
1114 test -z "$system_name" && system_name="$cf_cv_system_name"
1115 test -n "$cf_cv_system_name" && echo "$as_me:1115: result: Configuring for $cf_cv_system_name" >&5
1116 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1117
1118 if test ".$system_name" != ".$cf_cv_system_name" ; then
1119         echo "$as_me:1119: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1120 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1121         { { echo "$as_me:1121: error: \"Please remove config.cache and try again.\"" >&5
1122 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1123    { (exit 1); exit 1; }; }
1124 fi
1125
1126 # Check whether --with-system-type or --without-system-type was given.
1127 if test "${with_system_type+set}" = set; then
1128   withval="$with_system_type"
1129   { echo "$as_me:1129: WARNING: overriding system type to $withval" >&5
1130 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1131  cf_cv_system_name=$withval
1132 fi;
1133
1134 ###     Save the given $CFLAGS to allow user-override.
1135 cf_user_CFLAGS="$CFLAGS"
1136
1137 ###     Default install-location
1138
1139 echo "$as_me:1139: checking for prefix" >&5
1140 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1141 if test "x$prefix" = "xNONE" ; then
1142         case "$cf_cv_system_name" in
1143                 # non-vendor systems don't have a conflict
1144         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1145                 prefix=/usr
1146                 ;;
1147         *)      prefix=$ac_default_prefix
1148                 ;;
1149         esac
1150 fi
1151 echo "$as_me:1151: result: $prefix" >&5
1152 echo "${ECHO_T}$prefix" >&6
1153
1154 if test "x$prefix" = "xNONE" ; then
1155 echo "$as_me:1155: checking for default include-directory" >&5
1156 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1157 test -n "$verbose" && echo 1>&6
1158 for cf_symbol in \
1159         $includedir \
1160         $includedir/ncurses \
1161         $prefix/include \
1162         $prefix/include/ncurses \
1163         /usr/local/include \
1164         /usr/local/include/ncurses \
1165         /usr/include \
1166         /usr/include/ncurses
1167 do
1168         cf_dir=`eval echo $cf_symbol`
1169         if test -f $cf_dir/curses.h ; then
1170         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1171                 includedir="$cf_symbol"
1172                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1173                 break
1174         fi
1175         fi
1176         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1177 done
1178 echo "$as_me:1178: result: $includedir" >&5
1179 echo "${ECHO_T}$includedir" >&6
1180 fi
1181
1182 ###     Checks for programs.
1183 ac_ext=c
1184 ac_cpp='$CPP $CPPFLAGS'
1185 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1186 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1187 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1188 ac_main_return=return
1189 if test -n "$ac_tool_prefix"; then
1190   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1191 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1192 echo "$as_me:1192: checking for $ac_word" >&5
1193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1194 if test "${ac_cv_prog_CC+set}" = set; then
1195   echo $ECHO_N "(cached) $ECHO_C" >&6
1196 else
1197   if test -n "$CC"; then
1198   ac_cv_prog_CC="$CC" # Let the user override the test.
1199 else
1200   ac_save_IFS=$IFS; IFS=$ac_path_separator
1201 ac_dummy="$PATH"
1202 for ac_dir in $ac_dummy; do
1203   IFS=$ac_save_IFS
1204   test -z "$ac_dir" && ac_dir=.
1205   $as_executable_p "$ac_dir/$ac_word" || continue
1206 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1207 echo "$as_me:1207: found $ac_dir/$ac_word" >&5
1208 break
1209 done
1210
1211 fi
1212 fi
1213 CC=$ac_cv_prog_CC
1214 if test -n "$CC"; then
1215   echo "$as_me:1215: result: $CC" >&5
1216 echo "${ECHO_T}$CC" >&6
1217 else
1218   echo "$as_me:1218: result: no" >&5
1219 echo "${ECHO_T}no" >&6
1220 fi
1221
1222 fi
1223 if test -z "$ac_cv_prog_CC"; then
1224   ac_ct_CC=$CC
1225   # Extract the first word of "gcc", so it can be a program name with args.
1226 set dummy gcc; ac_word=$2
1227 echo "$as_me:1227: checking for $ac_word" >&5
1228 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1229 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1230   echo $ECHO_N "(cached) $ECHO_C" >&6
1231 else
1232   if test -n "$ac_ct_CC"; then
1233   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1234 else
1235   ac_save_IFS=$IFS; IFS=$ac_path_separator
1236 ac_dummy="$PATH"
1237 for ac_dir in $ac_dummy; do
1238   IFS=$ac_save_IFS
1239   test -z "$ac_dir" && ac_dir=.
1240   $as_executable_p "$ac_dir/$ac_word" || continue
1241 ac_cv_prog_ac_ct_CC="gcc"
1242 echo "$as_me:1242: found $ac_dir/$ac_word" >&5
1243 break
1244 done
1245
1246 fi
1247 fi
1248 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1249 if test -n "$ac_ct_CC"; then
1250   echo "$as_me:1250: result: $ac_ct_CC" >&5
1251 echo "${ECHO_T}$ac_ct_CC" >&6
1252 else
1253   echo "$as_me:1253: result: no" >&5
1254 echo "${ECHO_T}no" >&6
1255 fi
1256
1257   CC=$ac_ct_CC
1258 else
1259   CC="$ac_cv_prog_CC"
1260 fi
1261
1262 if test -z "$CC"; then
1263   if test -n "$ac_tool_prefix"; then
1264   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1265 set dummy ${ac_tool_prefix}cc; ac_word=$2
1266 echo "$as_me:1266: checking for $ac_word" >&5
1267 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1268 if test "${ac_cv_prog_CC+set}" = set; then
1269   echo $ECHO_N "(cached) $ECHO_C" >&6
1270 else
1271   if test -n "$CC"; then
1272   ac_cv_prog_CC="$CC" # Let the user override the test.
1273 else
1274   ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 ac_dummy="$PATH"
1276 for ac_dir in $ac_dummy; do
1277   IFS=$ac_save_IFS
1278   test -z "$ac_dir" && ac_dir=.
1279   $as_executable_p "$ac_dir/$ac_word" || continue
1280 ac_cv_prog_CC="${ac_tool_prefix}cc"
1281 echo "$as_me:1281: found $ac_dir/$ac_word" >&5
1282 break
1283 done
1284
1285 fi
1286 fi
1287 CC=$ac_cv_prog_CC
1288 if test -n "$CC"; then
1289   echo "$as_me:1289: result: $CC" >&5
1290 echo "${ECHO_T}$CC" >&6
1291 else
1292   echo "$as_me:1292: result: no" >&5
1293 echo "${ECHO_T}no" >&6
1294 fi
1295
1296 fi
1297 if test -z "$ac_cv_prog_CC"; then
1298   ac_ct_CC=$CC
1299   # Extract the first word of "cc", so it can be a program name with args.
1300 set dummy cc; ac_word=$2
1301 echo "$as_me:1301: checking for $ac_word" >&5
1302 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1303 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1304   echo $ECHO_N "(cached) $ECHO_C" >&6
1305 else
1306   if test -n "$ac_ct_CC"; then
1307   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1308 else
1309   ac_save_IFS=$IFS; IFS=$ac_path_separator
1310 ac_dummy="$PATH"
1311 for ac_dir in $ac_dummy; do
1312   IFS=$ac_save_IFS
1313   test -z "$ac_dir" && ac_dir=.
1314   $as_executable_p "$ac_dir/$ac_word" || continue
1315 ac_cv_prog_ac_ct_CC="cc"
1316 echo "$as_me:1316: found $ac_dir/$ac_word" >&5
1317 break
1318 done
1319
1320 fi
1321 fi
1322 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1323 if test -n "$ac_ct_CC"; then
1324   echo "$as_me:1324: result: $ac_ct_CC" >&5
1325 echo "${ECHO_T}$ac_ct_CC" >&6
1326 else
1327   echo "$as_me:1327: result: no" >&5
1328 echo "${ECHO_T}no" >&6
1329 fi
1330
1331   CC=$ac_ct_CC
1332 else
1333   CC="$ac_cv_prog_CC"
1334 fi
1335
1336 fi
1337 if test -z "$CC"; then
1338   # Extract the first word of "cc", so it can be a program name with args.
1339 set dummy cc; ac_word=$2
1340 echo "$as_me:1340: checking for $ac_word" >&5
1341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1342 if test "${ac_cv_prog_CC+set}" = set; then
1343   echo $ECHO_N "(cached) $ECHO_C" >&6
1344 else
1345   if test -n "$CC"; then
1346   ac_cv_prog_CC="$CC" # Let the user override the test.
1347 else
1348   ac_prog_rejected=no
1349   ac_save_IFS=$IFS; IFS=$ac_path_separator
1350 ac_dummy="$PATH"
1351 for ac_dir in $ac_dummy; do
1352   IFS=$ac_save_IFS
1353   test -z "$ac_dir" && ac_dir=.
1354   $as_executable_p "$ac_dir/$ac_word" || continue
1355 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1356   ac_prog_rejected=yes
1357   continue
1358 fi
1359 ac_cv_prog_CC="cc"
1360 echo "$as_me:1360: found $ac_dir/$ac_word" >&5
1361 break
1362 done
1363
1364 if test $ac_prog_rejected = yes; then
1365   # We found a bogon in the path, so make sure we never use it.
1366   set dummy $ac_cv_prog_CC
1367   shift
1368   if test $# != 0; then
1369     # We chose a different compiler from the bogus one.
1370     # However, it has the same basename, so the bogon will be chosen
1371     # first if we set CC to just the basename; use the full file name.
1372     shift
1373     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1374     shift
1375     ac_cv_prog_CC="$@"
1376   fi
1377 fi
1378 fi
1379 fi
1380 CC=$ac_cv_prog_CC
1381 if test -n "$CC"; then
1382   echo "$as_me:1382: result: $CC" >&5
1383 echo "${ECHO_T}$CC" >&6
1384 else
1385   echo "$as_me:1385: result: no" >&5
1386 echo "${ECHO_T}no" >&6
1387 fi
1388
1389 fi
1390 if test -z "$CC"; then
1391   if test -n "$ac_tool_prefix"; then
1392   for ac_prog in cl
1393   do
1394     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1395 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1396 echo "$as_me:1396: checking for $ac_word" >&5
1397 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1398 if test "${ac_cv_prog_CC+set}" = set; then
1399   echo $ECHO_N "(cached) $ECHO_C" >&6
1400 else
1401   if test -n "$CC"; then
1402   ac_cv_prog_CC="$CC" # Let the user override the test.
1403 else
1404   ac_save_IFS=$IFS; IFS=$ac_path_separator
1405 ac_dummy="$PATH"
1406 for ac_dir in $ac_dummy; do
1407   IFS=$ac_save_IFS
1408   test -z "$ac_dir" && ac_dir=.
1409   $as_executable_p "$ac_dir/$ac_word" || continue
1410 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1411 echo "$as_me:1411: found $ac_dir/$ac_word" >&5
1412 break
1413 done
1414
1415 fi
1416 fi
1417 CC=$ac_cv_prog_CC
1418 if test -n "$CC"; then
1419   echo "$as_me:1419: result: $CC" >&5
1420 echo "${ECHO_T}$CC" >&6
1421 else
1422   echo "$as_me:1422: result: no" >&5
1423 echo "${ECHO_T}no" >&6
1424 fi
1425
1426     test -n "$CC" && break
1427   done
1428 fi
1429 if test -z "$CC"; then
1430   ac_ct_CC=$CC
1431   for ac_prog in cl
1432 do
1433   # Extract the first word of "$ac_prog", so it can be a program name with args.
1434 set dummy $ac_prog; ac_word=$2
1435 echo "$as_me:1435: checking for $ac_word" >&5
1436 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1437 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1438   echo $ECHO_N "(cached) $ECHO_C" >&6
1439 else
1440   if test -n "$ac_ct_CC"; then
1441   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1442 else
1443   ac_save_IFS=$IFS; IFS=$ac_path_separator
1444 ac_dummy="$PATH"
1445 for ac_dir in $ac_dummy; do
1446   IFS=$ac_save_IFS
1447   test -z "$ac_dir" && ac_dir=.
1448   $as_executable_p "$ac_dir/$ac_word" || continue
1449 ac_cv_prog_ac_ct_CC="$ac_prog"
1450 echo "$as_me:1450: found $ac_dir/$ac_word" >&5
1451 break
1452 done
1453
1454 fi
1455 fi
1456 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1457 if test -n "$ac_ct_CC"; then
1458   echo "$as_me:1458: result: $ac_ct_CC" >&5
1459 echo "${ECHO_T}$ac_ct_CC" >&6
1460 else
1461   echo "$as_me:1461: result: no" >&5
1462 echo "${ECHO_T}no" >&6
1463 fi
1464
1465   test -n "$ac_ct_CC" && break
1466 done
1467
1468   CC=$ac_ct_CC
1469 fi
1470
1471 fi
1472
1473 test -z "$CC" && { { echo "$as_me:1473: error: no acceptable cc found in \$PATH" >&5
1474 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1475    { (exit 1); exit 1; }; }
1476
1477 # Provide some information about the compiler.
1478 echo "$as_me:1478:" \
1479      "checking for C compiler version" >&5
1480 ac_compiler=`set X $ac_compile; echo $2`
1481 { (eval echo "$as_me:1481: \"$ac_compiler --version </dev/null >&5\"") >&5
1482   (eval $ac_compiler --version </dev/null >&5) 2>&5
1483   ac_status=$?
1484   echo "$as_me:1484: \$? = $ac_status" >&5
1485   (exit $ac_status); }
1486 { (eval echo "$as_me:1486: \"$ac_compiler -v </dev/null >&5\"") >&5
1487   (eval $ac_compiler -v </dev/null >&5) 2>&5
1488   ac_status=$?
1489   echo "$as_me:1489: \$? = $ac_status" >&5
1490   (exit $ac_status); }
1491 { (eval echo "$as_me:1491: \"$ac_compiler -V </dev/null >&5\"") >&5
1492   (eval $ac_compiler -V </dev/null >&5) 2>&5
1493   ac_status=$?
1494   echo "$as_me:1494: \$? = $ac_status" >&5
1495   (exit $ac_status); }
1496
1497 cat >conftest.$ac_ext <<_ACEOF
1498 #line 1498 "configure"
1499 #include "confdefs.h"
1500
1501 int
1502 main ()
1503 {
1504
1505   ;
1506   return 0;
1507 }
1508 _ACEOF
1509 ac_clean_files_save=$ac_clean_files
1510 ac_clean_files="$ac_clean_files a.out a.exe"
1511 # Try to create an executable without -o first, disregard a.out.
1512 # It will help us diagnose broken compilers, and finding out an intuition
1513 # of exeext.
1514 echo "$as_me:1514: checking for C compiler default output" >&5
1515 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1516 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1517 if { (eval echo "$as_me:1517: \"$ac_link_default\"") >&5
1518   (eval $ac_link_default) 2>&5
1519   ac_status=$?
1520   echo "$as_me:1520: \$? = $ac_status" >&5
1521   (exit $ac_status); }; then
1522   # Find the output, starting from the most likely.  This scheme is
1523 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1524 # resort.
1525 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1526                 ls a.out conftest 2>/dev/null;
1527                 ls a.* conftest.* 2>/dev/null`; do
1528   case $ac_file in
1529     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1530     a.out ) # We found the default executable, but exeext='' is most
1531             # certainly right.
1532             break;;
1533     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1534           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1535           export ac_cv_exeext
1536           break;;
1537     * ) break;;
1538   esac
1539 done
1540 else
1541   echo "$as_me: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
1543 { { echo "$as_me:1543: error: C compiler cannot create executables" >&5
1544 echo "$as_me: error: C compiler cannot create executables" >&2;}
1545    { (exit 77); exit 77; }; }
1546 fi
1547
1548 ac_exeext=$ac_cv_exeext
1549 echo "$as_me:1549: result: $ac_file" >&5
1550 echo "${ECHO_T}$ac_file" >&6
1551
1552 # Check the compiler produces executables we can run.  If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether the C compiler works" >&5
1555 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1556 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1557 # If not cross compiling, check that we can run a simple program.
1558 if test "$cross_compiling" != yes; then
1559   if { ac_try='./$ac_file'
1560   { (eval echo "$as_me:1560: \"$ac_try\"") >&5
1561   (eval $ac_try) 2>&5
1562   ac_status=$?
1563   echo "$as_me:1563: \$? = $ac_status" >&5
1564   (exit $ac_status); }; }; then
1565     cross_compiling=no
1566   else
1567     if test "$cross_compiling" = maybe; then
1568         cross_compiling=yes
1569     else
1570         { { echo "$as_me:1570: error: cannot run C compiled programs.
1571 If you meant to cross compile, use \`--host'." >&5
1572 echo "$as_me: error: cannot run C compiled programs.
1573 If you meant to cross compile, use \`--host'." >&2;}
1574    { (exit 1); exit 1; }; }
1575     fi
1576   fi
1577 fi
1578 echo "$as_me:1578: result: yes" >&5
1579 echo "${ECHO_T}yes" >&6
1580
1581 rm -f a.out a.exe conftest$ac_cv_exeext
1582 ac_clean_files=$ac_clean_files_save
1583 # Check the compiler produces executables we can run.  If not, either
1584 # the compiler is broken, or we cross compile.
1585 echo "$as_me:1585: checking whether we are cross compiling" >&5
1586 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1587 echo "$as_me:1587: result: $cross_compiling" >&5
1588 echo "${ECHO_T}$cross_compiling" >&6
1589
1590 echo "$as_me:1590: checking for executable suffix" >&5
1591 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1592 if { (eval echo "$as_me:1592: \"$ac_link\"") >&5
1593   (eval $ac_link) 2>&5
1594   ac_status=$?
1595   echo "$as_me:1595: \$? = $ac_status" >&5
1596   (exit $ac_status); }; then
1597   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1598 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1599 # work properly (i.e., refer to `conftest.exe'), while it won't with
1600 # `rm'.
1601 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1602   case $ac_file in
1603     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1604     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1605           export ac_cv_exeext
1606           break;;
1607     * ) break;;
1608   esac
1609 done
1610 else
1611   { { echo "$as_me:1611: error: cannot compute EXEEXT: cannot compile and link" >&5
1612 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1613    { (exit 1); exit 1; }; }
1614 fi
1615
1616 rm -f conftest$ac_cv_exeext
1617 echo "$as_me:1617: result: $ac_cv_exeext" >&5
1618 echo "${ECHO_T}$ac_cv_exeext" >&6
1619
1620 rm -f conftest.$ac_ext
1621 EXEEXT=$ac_cv_exeext
1622 ac_exeext=$EXEEXT
1623 echo "$as_me:1623: checking for object suffix" >&5
1624 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1625 if test "${ac_cv_objext+set}" = set; then
1626   echo $ECHO_N "(cached) $ECHO_C" >&6
1627 else
1628   cat >conftest.$ac_ext <<_ACEOF
1629 #line 1629 "configure"
1630 #include "confdefs.h"
1631
1632 int
1633 main ()
1634 {
1635
1636   ;
1637   return 0;
1638 }
1639 _ACEOF
1640 rm -f conftest.o conftest.obj
1641 if { (eval echo "$as_me:1641: \"$ac_compile\"") >&5
1642   (eval $ac_compile) 2>&5
1643   ac_status=$?
1644   echo "$as_me:1644: \$? = $ac_status" >&5
1645   (exit $ac_status); }; then
1646   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1647   case $ac_file in
1648     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1649     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1650        break;;
1651   esac
1652 done
1653 else
1654   echo "$as_me: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
1656 { { echo "$as_me:1656: error: cannot compute OBJEXT: cannot compile" >&5
1657 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1658    { (exit 1); exit 1; }; }
1659 fi
1660
1661 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1662 fi
1663 echo "$as_me:1663: result: $ac_cv_objext" >&5
1664 echo "${ECHO_T}$ac_cv_objext" >&6
1665 OBJEXT=$ac_cv_objext
1666 ac_objext=$OBJEXT
1667 echo "$as_me:1667: checking whether we are using the GNU C compiler" >&5
1668 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1669 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1670   echo $ECHO_N "(cached) $ECHO_C" >&6
1671 else
1672   cat >conftest.$ac_ext <<_ACEOF
1673 #line 1673 "configure"
1674 #include "confdefs.h"
1675
1676 int
1677 main ()
1678 {
1679 #ifndef __GNUC__
1680        choke me
1681 #endif
1682
1683   ;
1684   return 0;
1685 }
1686 _ACEOF
1687 rm -f conftest.$ac_objext
1688 if { (eval echo "$as_me:1688: \"$ac_compile\"") >&5
1689   (eval $ac_compile) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); } &&
1693          { ac_try='test -s conftest.$ac_objext'
1694   { (eval echo "$as_me:1694: \"$ac_try\"") >&5
1695   (eval $ac_try) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }; }; then
1699   ac_compiler_gnu=yes
1700 else
1701   echo "$as_me: failed program was:" >&5
1702 cat conftest.$ac_ext >&5
1703 ac_compiler_gnu=no
1704 fi
1705 rm -f conftest.$ac_objext conftest.$ac_ext
1706 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1707
1708 fi
1709 echo "$as_me:1709: result: $ac_cv_c_compiler_gnu" >&5
1710 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1711 GCC=`test $ac_compiler_gnu = yes && echo yes`
1712 ac_test_CFLAGS=${CFLAGS+set}
1713 ac_save_CFLAGS=$CFLAGS
1714 CFLAGS="-g"
1715 echo "$as_me:1715: checking whether $CC accepts -g" >&5
1716 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1717 if test "${ac_cv_prog_cc_g+set}" = set; then
1718   echo $ECHO_N "(cached) $ECHO_C" >&6
1719 else
1720   cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 rm -f conftest.$ac_objext
1733 if { (eval echo "$as_me:1733: \"$ac_compile\"") >&5
1734   (eval $ac_compile) 2>&5
1735   ac_status=$?
1736   echo "$as_me:1736: \$? = $ac_status" >&5
1737   (exit $ac_status); } &&
1738          { ac_try='test -s conftest.$ac_objext'
1739   { (eval echo "$as_me:1739: \"$ac_try\"") >&5
1740   (eval $ac_try) 2>&5
1741   ac_status=$?
1742   echo "$as_me:1742: \$? = $ac_status" >&5
1743   (exit $ac_status); }; }; then
1744   ac_cv_prog_cc_g=yes
1745 else
1746   echo "$as_me: failed program was:" >&5
1747 cat conftest.$ac_ext >&5
1748 ac_cv_prog_cc_g=no
1749 fi
1750 rm -f conftest.$ac_objext conftest.$ac_ext
1751 fi
1752 echo "$as_me:1752: result: $ac_cv_prog_cc_g" >&5
1753 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1754 if test "$ac_test_CFLAGS" = set; then
1755   CFLAGS=$ac_save_CFLAGS
1756 elif test $ac_cv_prog_cc_g = yes; then
1757   if test "$GCC" = yes; then
1758     CFLAGS="-g -O2"
1759   else
1760     CFLAGS="-g"
1761   fi
1762 else
1763   if test "$GCC" = yes; then
1764     CFLAGS="-O2"
1765   else
1766     CFLAGS=
1767   fi
1768 fi
1769 # Some people use a C++ compiler to compile C.  Since we use `exit',
1770 # in C++ we need to declare it.  In case someone uses the same compiler
1771 # for both compiling C and C++ we need to have the C++ compiler decide
1772 # the declaration of exit, since it's the most demanding environment.
1773 cat >conftest.$ac_ext <<_ACEOF
1774 #ifndef __cplusplus
1775   choke me
1776 #endif
1777 _ACEOF
1778 rm -f conftest.$ac_objext
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780   (eval $ac_compile) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); } &&
1784          { ac_try='test -s conftest.$ac_objext'
1785   { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1786   (eval $ac_try) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); }; }; then
1790   for ac_declaration in \
1791    ''\
1792    '#include <stdlib.h>' \
1793    'extern "C" void std::exit (int) throw (); using std::exit;' \
1794    'extern "C" void std::exit (int); using std::exit;' \
1795    'extern "C" void exit (int) throw ();' \
1796    'extern "C" void exit (int);' \
1797    'void exit (int);'
1798 do
1799   cat >conftest.$ac_ext <<_ACEOF
1800 #line 1800 "configure"
1801 #include "confdefs.h"
1802 #include <stdlib.h>
1803 $ac_declaration
1804 int
1805 main ()
1806 {
1807 exit (42);
1808   ;
1809   return 0;
1810 }
1811 _ACEOF
1812 rm -f conftest.$ac_objext
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814   (eval $ac_compile) 2>&5
1815   ac_status=$?
1816   echo "$as_me:1816: \$? = $ac_status" >&5
1817   (exit $ac_status); } &&
1818          { ac_try='test -s conftest.$ac_objext'
1819   { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1820   (eval $ac_try) 2>&5
1821   ac_status=$?
1822   echo "$as_me:1822: \$? = $ac_status" >&5
1823   (exit $ac_status); }; }; then
1824   :
1825 else
1826   echo "$as_me: failed program was:" >&5
1827 cat conftest.$ac_ext >&5
1828 continue
1829 fi
1830 rm -f conftest.$ac_objext conftest.$ac_ext
1831   cat >conftest.$ac_ext <<_ACEOF
1832 #line 1832 "configure"
1833 #include "confdefs.h"
1834 $ac_declaration
1835 int
1836 main ()
1837 {
1838 exit (42);
1839   ;
1840   return 0;
1841 }
1842 _ACEOF
1843 rm -f conftest.$ac_objext
1844 if { (eval echo "$as_me:1844: \"$ac_compile\"") >&5
1845   (eval $ac_compile) 2>&5
1846   ac_status=$?
1847   echo "$as_me:1847: \$? = $ac_status" >&5
1848   (exit $ac_status); } &&
1849          { ac_try='test -s conftest.$ac_objext'
1850   { (eval echo "$as_me:1850: \"$ac_try\"") >&5
1851   (eval $ac_try) 2>&5
1852   ac_status=$?
1853   echo "$as_me:1853: \$? = $ac_status" >&5
1854   (exit $ac_status); }; }; then
1855   break
1856 else
1857   echo "$as_me: failed program was:" >&5
1858 cat conftest.$ac_ext >&5
1859 fi
1860 rm -f conftest.$ac_objext conftest.$ac_ext
1861 done
1862 rm -rf conftest*
1863 if test -n "$ac_declaration"; then
1864   echo '#ifdef __cplusplus' >>confdefs.h
1865   echo $ac_declaration      >>confdefs.h
1866   echo '#endif'             >>confdefs.h
1867 fi
1868
1869 else
1870   echo "$as_me: failed program was:" >&5
1871 cat conftest.$ac_ext >&5
1872 fi
1873 rm -f conftest.$ac_objext conftest.$ac_ext
1874 ac_ext=c
1875 ac_cpp='$CPP $CPPFLAGS'
1876 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1877 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1878 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1879 ac_main_return=return
1880
1881 GCC_VERSION=none
1882 if test "$GCC" = yes ; then
1883         echo "$as_me:1883: checking version of $CC" >&5
1884 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1885         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1886         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1887         echo "$as_me:1887: result: $GCC_VERSION" >&5
1888 echo "${ECHO_T}$GCC_VERSION" >&6
1889 fi
1890
1891 ac_ext=c
1892 ac_cpp='$CPP $CPPFLAGS'
1893 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1894 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1895 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1896 ac_main_return=return
1897 echo "$as_me:1897: checking how to run the C preprocessor" >&5
1898 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1899 # On Suns, sometimes $CPP names a directory.
1900 if test -n "$CPP" && test -d "$CPP"; then
1901   CPP=
1902 fi
1903 if test -z "$CPP"; then
1904   if test "${ac_cv_prog_CPP+set}" = set; then
1905   echo $ECHO_N "(cached) $ECHO_C" >&6
1906 else
1907       # Double quotes because CPP needs to be expanded
1908     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1909     do
1910       ac_preproc_ok=false
1911 for ac_c_preproc_warn_flag in '' yes
1912 do
1913   # Use a header file that comes with gcc, so configuring glibc
1914   # with a fresh cross-compiler works.
1915   # On the NeXT, cc -E runs the code through the compiler's parser,
1916   # not just through cpp. "Syntax error" is here to catch this case.
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1920 #include <assert.h>
1921                      Syntax error
1922 _ACEOF
1923 if { (eval echo "$as_me:1923: \"$ac_cpp conftest.$ac_ext\"") >&5
1924   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1925   ac_status=$?
1926   egrep -v '^ *\+' conftest.er1 >conftest.err
1927   rm -f conftest.er1
1928   cat conftest.err >&5
1929   echo "$as_me:1929: \$? = $ac_status" >&5
1930   (exit $ac_status); } >/dev/null; then
1931   if test -s conftest.err; then
1932     ac_cpp_err=$ac_c_preproc_warn_flag
1933   else
1934     ac_cpp_err=
1935   fi
1936 else
1937   ac_cpp_err=yes
1938 fi
1939 if test -z "$ac_cpp_err"; then
1940   :
1941 else
1942   echo "$as_me: failed program was:" >&5
1943   cat conftest.$ac_ext >&5
1944   # Broken: fails on valid input.
1945 continue
1946 fi
1947 rm -f conftest.err conftest.$ac_ext
1948
1949   # OK, works on sane cases.  Now check whether non-existent headers
1950   # can be detected and how.
1951   cat >conftest.$ac_ext <<_ACEOF
1952 #line 1952 "configure"
1953 #include "confdefs.h"
1954 #include <ac_nonexistent.h>
1955 _ACEOF
1956 if { (eval echo "$as_me:1956: \"$ac_cpp conftest.$ac_ext\"") >&5
1957   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1958   ac_status=$?
1959   egrep -v '^ *\+' conftest.er1 >conftest.err
1960   rm -f conftest.er1
1961   cat conftest.err >&5
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit $ac_status); } >/dev/null; then
1964   if test -s conftest.err; then
1965     ac_cpp_err=$ac_c_preproc_warn_flag
1966   else
1967     ac_cpp_err=
1968   fi
1969 else
1970   ac_cpp_err=yes
1971 fi
1972 if test -z "$ac_cpp_err"; then
1973   # Broken: success on invalid input.
1974 continue
1975 else
1976   echo "$as_me: failed program was:" >&5
1977   cat conftest.$ac_ext >&5
1978   # Passes both tests.
1979 ac_preproc_ok=:
1980 break
1981 fi
1982 rm -f conftest.err conftest.$ac_ext
1983
1984 done
1985 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1986 rm -f conftest.err conftest.$ac_ext
1987 if $ac_preproc_ok; then
1988   break
1989 fi
1990
1991     done
1992     ac_cv_prog_CPP=$CPP
1993
1994 fi
1995   CPP=$ac_cv_prog_CPP
1996 else
1997   ac_cv_prog_CPP=$CPP
1998 fi
1999 echo "$as_me:1999: result: $CPP" >&5
2000 echo "${ECHO_T}$CPP" >&6
2001 ac_preproc_ok=false
2002 for ac_c_preproc_warn_flag in '' yes
2003 do
2004   # Use a header file that comes with gcc, so configuring glibc
2005   # with a fresh cross-compiler works.
2006   # On the NeXT, cc -E runs the code through the compiler's parser,
2007   # not just through cpp. "Syntax error" is here to catch this case.
2008   cat >conftest.$ac_ext <<_ACEOF
2009 #line 2009 "configure"
2010 #include "confdefs.h"
2011 #include <assert.h>
2012                      Syntax error
2013 _ACEOF
2014 if { (eval echo "$as_me:2014: \"$ac_cpp conftest.$ac_ext\"") >&5
2015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2016   ac_status=$?
2017   egrep -v '^ *\+' conftest.er1 >conftest.err
2018   rm -f conftest.er1
2019   cat conftest.err >&5
2020   echo "$as_me:2020: \$? = $ac_status" >&5
2021   (exit $ac_status); } >/dev/null; then
2022   if test -s conftest.err; then
2023     ac_cpp_err=$ac_c_preproc_warn_flag
2024   else
2025     ac_cpp_err=
2026   fi
2027 else
2028   ac_cpp_err=yes
2029 fi
2030 if test -z "$ac_cpp_err"; then
2031   :
2032 else
2033   echo "$as_me: failed program was:" >&5
2034   cat conftest.$ac_ext >&5
2035   # Broken: fails on valid input.
2036 continue
2037 fi
2038 rm -f conftest.err conftest.$ac_ext
2039
2040   # OK, works on sane cases.  Now check whether non-existent headers
2041   # can be detected and how.
2042   cat >conftest.$ac_ext <<_ACEOF
2043 #line 2043 "configure"
2044 #include "confdefs.h"
2045 #include <ac_nonexistent.h>
2046 _ACEOF
2047 if { (eval echo "$as_me:2047: \"$ac_cpp conftest.$ac_ext\"") >&5
2048   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2049   ac_status=$?
2050   egrep -v '^ *\+' conftest.er1 >conftest.err
2051   rm -f conftest.er1
2052   cat conftest.err >&5
2053   echo "$as_me:2053: \$? = $ac_status" >&5
2054   (exit $ac_status); } >/dev/null; then
2055   if test -s conftest.err; then
2056     ac_cpp_err=$ac_c_preproc_warn_flag
2057   else
2058     ac_cpp_err=
2059   fi
2060 else
2061   ac_cpp_err=yes
2062 fi
2063 if test -z "$ac_cpp_err"; then
2064   # Broken: success on invalid input.
2065 continue
2066 else
2067   echo "$as_me: failed program was:" >&5
2068   cat conftest.$ac_ext >&5
2069   # Passes both tests.
2070 ac_preproc_ok=:
2071 break
2072 fi
2073 rm -f conftest.err conftest.$ac_ext
2074
2075 done
2076 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2077 rm -f conftest.err conftest.$ac_ext
2078 if $ac_preproc_ok; then
2079   :
2080 else
2081   { { echo "$as_me:2081: error: C preprocessor \"$CPP\" fails sanity check" >&5
2082 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2083    { (exit 1); exit 1; }; }
2084 fi
2085
2086 ac_ext=c
2087 ac_cpp='$CPP $CPPFLAGS'
2088 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2089 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2090 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2091 ac_main_return=return
2092
2093 if test $ac_cv_c_compiler_gnu = yes; then
2094     echo "$as_me:2094: checking whether $CC needs -traditional" >&5
2095 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2096 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2097   echo $ECHO_N "(cached) $ECHO_C" >&6
2098 else
2099     ac_pattern="Autoconf.*'x'"
2100   cat >conftest.$ac_ext <<_ACEOF
2101 #line 2101 "configure"
2102 #include "confdefs.h"
2103 #include <sgtty.h>
2104 int Autoconf = TIOCGETP;
2105 _ACEOF
2106 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2107   egrep "$ac_pattern" >/dev/null 2>&1; then
2108   ac_cv_prog_gcc_traditional=yes
2109 else
2110   ac_cv_prog_gcc_traditional=no
2111 fi
2112 rm -rf conftest*
2113
2114   if test $ac_cv_prog_gcc_traditional = no; then
2115     cat >conftest.$ac_ext <<_ACEOF
2116 #line 2116 "configure"
2117 #include "confdefs.h"
2118 #include <termio.h>
2119 int Autoconf = TCGETA;
2120 _ACEOF
2121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2122   egrep "$ac_pattern" >/dev/null 2>&1; then
2123   ac_cv_prog_gcc_traditional=yes
2124 fi
2125 rm -rf conftest*
2126
2127   fi
2128 fi
2129 echo "$as_me:2129: result: $ac_cv_prog_gcc_traditional" >&5
2130 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2131   if test $ac_cv_prog_gcc_traditional = yes; then
2132     CC="$CC -traditional"
2133   fi
2134 fi
2135
2136 echo "$as_me:2136: checking whether $CC understands -c and -o together" >&5
2137 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2138 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2139   echo $ECHO_N "(cached) $ECHO_C" >&6
2140 else
2141
2142 cat > conftest.$ac_ext <<CF_EOF
2143 #include <stdio.h>
2144 int main()
2145 {
2146         ${cf_cv_main_return:-return}(0);
2147 }
2148 CF_EOF
2149 # We do the test twice because some compilers refuse to overwrite an
2150 # existing .o file with -o, though they will create one.
2151 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2152 if { (eval echo "$as_me:2152: \"$ac_try\"") >&5
2153   (eval $ac_try) 2>&5
2154   ac_status=$?
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); } &&
2157   test -f conftest2.$ac_objext && { (eval echo "$as_me:2157: \"$ac_try\"") >&5
2158   (eval $ac_try) 2>&5
2159   ac_status=$?
2160   echo "$as_me:2160: \$? = $ac_status" >&5
2161   (exit $ac_status); };
2162 then
2163   eval cf_cv_prog_CC_c_o=yes
2164 else
2165   eval cf_cv_prog_CC_c_o=no
2166 fi
2167 rm -rf conftest*
2168
2169 fi
2170 if test $cf_cv_prog_CC_c_o = yes; then
2171   echo "$as_me:2171: result: yes" >&5
2172 echo "${ECHO_T}yes" >&6
2173 else
2174   echo "$as_me:2174: result: no" >&5
2175 echo "${ECHO_T}no" >&6
2176 fi
2177
2178 echo "$as_me:2178: checking for POSIXized ISC" >&5
2179 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2180 if test -d /etc/conf/kconfig.d &&
2181    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2182 then
2183   echo "$as_me:2183: result: yes" >&5
2184 echo "${ECHO_T}yes" >&6
2185   ISC=yes # If later tests want to check for ISC.
2186
2187 cat >>confdefs.h <<\EOF
2188 #define _POSIX_SOURCE 1
2189 EOF
2190
2191   if test "$GCC" = yes; then
2192     CC="$CC -posix"
2193   else
2194     CC="$CC -Xp"
2195   fi
2196 else
2197   echo "$as_me:2197: result: no" >&5
2198 echo "${ECHO_T}no" >&6
2199   ISC=
2200 fi
2201
2202 # This should have been defined by AC_PROG_CC
2203 : ${CC:=cc}
2204
2205 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2206 # into CC.  This will not help with broken scripts that wrap the compiler with
2207 # options, but eliminates a more common category of user confusion.
2208 echo "$as_me:2208: checking \$CC variable" >&5
2209 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2210 case "$CC" in #(vi
2211 *[\ \   ]-[IUD]*)
2212         echo "$as_me:2212: result: broken" >&5
2213 echo "${ECHO_T}broken" >&6
2214         { echo "$as_me:2214: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2215 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2216         # humor him...
2217         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2218         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2219
2220 cf_fix_cppflags=no
2221 cf_new_cflags=
2222 cf_new_cppflags=
2223 cf_new_extra_cppflags=
2224
2225 for cf_add_cflags in $cf_flags
2226 do
2227 case $cf_fix_cppflags in
2228 no)
2229         case $cf_add_cflags in #(vi
2230         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2231                 case $cf_add_cflags in
2232                 -D*)
2233                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2234
2235                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2236                                 && test -z "${cf_tst_cflags}" \
2237                                 && cf_fix_cppflags=yes
2238
2239                         if test $cf_fix_cppflags = yes ; then
2240                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2241                                 continue
2242                         elif test "${cf_tst_cflags}" = "\"'" ; then
2243                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2244                                 continue
2245                         fi
2246                         ;;
2247                 esac
2248                 case "$CPPFLAGS" in
2249                 *$cf_add_cflags) #(vi
2250                         ;;
2251                 *) #(vi
2252                         case $cf_add_cflags in #(vi
2253                         -D*)
2254                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2255
2256 CPPFLAGS=`echo "$CPPFLAGS" | \
2257         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2258                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2259
2260                                 ;;
2261                         esac
2262                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2263                         ;;
2264                 esac
2265                 ;;
2266         *)
2267                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2268                 ;;
2269         esac
2270         ;;
2271 yes)
2272         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2273
2274         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2275
2276         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2277                 && test -z "${cf_tst_cflags}" \
2278                 && cf_fix_cppflags=no
2279         ;;
2280 esac
2281 done
2282
2283 if test -n "$cf_new_cflags" ; then
2284
2285         CFLAGS="$CFLAGS $cf_new_cflags"
2286 fi
2287
2288 if test -n "$cf_new_cppflags" ; then
2289
2290         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2291 fi
2292
2293 if test -n "$cf_new_extra_cppflags" ; then
2294
2295         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2296 fi
2297
2298         ;;
2299 *)
2300         echo "$as_me:2300: result: ok" >&5
2301 echo "${ECHO_T}ok" >&6
2302         ;;
2303 esac
2304
2305 echo "$as_me:2305: checking for ${CC:-cc} option to accept ANSI C" >&5
2306 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2307 if test "${cf_cv_ansi_cc+set}" = set; then
2308   echo $ECHO_N "(cached) $ECHO_C" >&6
2309 else
2310
2311 cf_cv_ansi_cc=no
2312 cf_save_CFLAGS="$CFLAGS"
2313 cf_save_CPPFLAGS="$CPPFLAGS"
2314 # Don't try gcc -ansi; that turns off useful extensions and
2315 # breaks some systems' header files.
2316 # AIX                   -qlanglvl=ansi
2317 # Ultrix and OSF/1      -std1
2318 # HP-UX                 -Aa -D_HPUX_SOURCE
2319 # SVR4                  -Xc
2320 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2321 for cf_arg in "-DCC_HAS_PROTOS" \
2322         "" \
2323         -qlanglvl=ansi \
2324         -std1 \
2325         -Ae \
2326         "-Aa -D_HPUX_SOURCE" \
2327         -Xc
2328 do
2329
2330 cf_fix_cppflags=no
2331 cf_new_cflags=
2332 cf_new_cppflags=
2333 cf_new_extra_cppflags=
2334
2335 for cf_add_cflags in $cf_arg
2336 do
2337 case $cf_fix_cppflags in
2338 no)
2339         case $cf_add_cflags in #(vi
2340         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2341                 case $cf_add_cflags in
2342                 -D*)
2343                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2344
2345                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2346                                 && test -z "${cf_tst_cflags}" \
2347                                 && cf_fix_cppflags=yes
2348
2349                         if test $cf_fix_cppflags = yes ; then
2350                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2351                                 continue
2352                         elif test "${cf_tst_cflags}" = "\"'" ; then
2353                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2354                                 continue
2355                         fi
2356                         ;;
2357                 esac
2358                 case "$CPPFLAGS" in
2359                 *$cf_add_cflags) #(vi
2360                         ;;
2361                 *) #(vi
2362                         case $cf_add_cflags in #(vi
2363                         -D*)
2364                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2365
2366 CPPFLAGS=`echo "$CPPFLAGS" | \
2367         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2368                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2369
2370                                 ;;
2371                         esac
2372                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2373                         ;;
2374                 esac
2375                 ;;
2376         *)
2377                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2378                 ;;
2379         esac
2380         ;;
2381 yes)
2382         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2383
2384         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2385
2386         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2387                 && test -z "${cf_tst_cflags}" \
2388                 && cf_fix_cppflags=no
2389         ;;
2390 esac
2391 done
2392
2393 if test -n "$cf_new_cflags" ; then
2394
2395         CFLAGS="$CFLAGS $cf_new_cflags"
2396 fi
2397
2398 if test -n "$cf_new_cppflags" ; then
2399
2400         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2401 fi
2402
2403 if test -n "$cf_new_extra_cppflags" ; then
2404
2405         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2406 fi
2407
2408         cat >conftest.$ac_ext <<_ACEOF
2409 #line 2409 "configure"
2410 #include "confdefs.h"
2411
2412 #ifndef CC_HAS_PROTOS
2413 #if !defined(__STDC__) || (__STDC__ != 1)
2414 choke me
2415 #endif
2416 #endif
2417
2418 int
2419 main ()
2420 {
2421
2422         int test (int i, double x);
2423         struct s1 {int (*f) (int a);};
2424         struct s2 {int (*f) (double a);};
2425   ;
2426   return 0;
2427 }
2428 _ACEOF
2429 rm -f conftest.$ac_objext
2430 if { (eval echo "$as_me:2430: \"$ac_compile\"") >&5
2431   (eval $ac_compile) 2>&5
2432   ac_status=$?
2433   echo "$as_me:2433: \$? = $ac_status" >&5
2434   (exit $ac_status); } &&
2435          { ac_try='test -s conftest.$ac_objext'
2436   { (eval echo "$as_me:2436: \"$ac_try\"") >&5
2437   (eval $ac_try) 2>&5
2438   ac_status=$?
2439   echo "$as_me:2439: \$? = $ac_status" >&5
2440   (exit $ac_status); }; }; then
2441   cf_cv_ansi_cc="$cf_arg"; break
2442 else
2443   echo "$as_me: failed program was:" >&5
2444 cat conftest.$ac_ext >&5
2445 fi
2446 rm -f conftest.$ac_objext conftest.$ac_ext
2447 done
2448 CFLAGS="$cf_save_CFLAGS"
2449 CPPFLAGS="$cf_save_CPPFLAGS"
2450
2451 fi
2452 echo "$as_me:2452: result: $cf_cv_ansi_cc" >&5
2453 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2454
2455 if test "$cf_cv_ansi_cc" != "no"; then
2456 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2457
2458 cf_fix_cppflags=no
2459 cf_new_cflags=
2460 cf_new_cppflags=
2461 cf_new_extra_cppflags=
2462
2463 for cf_add_cflags in $cf_cv_ansi_cc
2464 do
2465 case $cf_fix_cppflags in
2466 no)
2467         case $cf_add_cflags in #(vi
2468         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2469                 case $cf_add_cflags in
2470                 -D*)
2471                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2472
2473                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2474                                 && test -z "${cf_tst_cflags}" \
2475                                 && cf_fix_cppflags=yes
2476
2477                         if test $cf_fix_cppflags = yes ; then
2478                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2479                                 continue
2480                         elif test "${cf_tst_cflags}" = "\"'" ; then
2481                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2482                                 continue
2483                         fi
2484                         ;;
2485                 esac
2486                 case "$CPPFLAGS" in
2487                 *$cf_add_cflags) #(vi
2488                         ;;
2489                 *) #(vi
2490                         case $cf_add_cflags in #(vi
2491                         -D*)
2492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2493
2494 CPPFLAGS=`echo "$CPPFLAGS" | \
2495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2497
2498                                 ;;
2499                         esac
2500                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2501                         ;;
2502                 esac
2503                 ;;
2504         *)
2505                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2506                 ;;
2507         esac
2508         ;;
2509 yes)
2510         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2511
2512         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2513
2514         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2515                 && test -z "${cf_tst_cflags}" \
2516                 && cf_fix_cppflags=no
2517         ;;
2518 esac
2519 done
2520
2521 if test -n "$cf_new_cflags" ; then
2522
2523         CFLAGS="$CFLAGS $cf_new_cflags"
2524 fi
2525
2526 if test -n "$cf_new_cppflags" ; then
2527
2528         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2529 fi
2530
2531 if test -n "$cf_new_extra_cppflags" ; then
2532
2533         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2534 fi
2535
2536 else
2537         cat >>confdefs.h <<\EOF
2538 #define CC_HAS_PROTOS 1
2539 EOF
2540
2541 fi
2542 fi
2543
2544 if test "$cf_cv_ansi_cc" = "no"; then
2545         { { echo "$as_me:2545: error: Your compiler does not appear to recognize prototypes.
2546 You have the following choices:
2547         a. adjust your compiler options
2548         b. get an up-to-date compiler
2549         c. use a wrapper such as unproto" >&5
2550 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2551 You have the following choices:
2552         a. adjust your compiler options
2553         b. get an up-to-date compiler
2554         c. use a wrapper such as unproto" >&2;}
2555    { (exit 1); exit 1; }; }
2556 fi
2557
2558 case $cf_cv_system_name in
2559 os2*)
2560     CFLAGS="$CFLAGS -Zmt"
2561     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2562     CXXFLAGS="$CXXFLAGS -Zmt"
2563     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2564     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2565     ac_cv_exeext=.exe
2566     ;;
2567 esac
2568
2569 PROG_EXT="$EXEEXT"
2570
2571 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2572 #define PROG_EXT "$PROG_EXT"
2573 EOF
2574
2575 test "$program_prefix" != NONE &&
2576   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2577 # Use a double $ so make ignores it.
2578 test "$program_suffix" != NONE &&
2579   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2580 # Double any \ or $.  echo might interpret backslashes.
2581 # By default was `s,x,x', remove it if useless.
2582 cat <<\_ACEOF >conftest.sed
2583 s/[\\$]/&&/g;s/;s,x,x,$//
2584 _ACEOF
2585 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2586 rm conftest.sed
2587
2588 for ac_prog in mawk gawk nawk awk
2589 do
2590   # Extract the first word of "$ac_prog", so it can be a program name with args.
2591 set dummy $ac_prog; ac_word=$2
2592 echo "$as_me:2592: checking for $ac_word" >&5
2593 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2594 if test "${ac_cv_prog_AWK+set}" = set; then
2595   echo $ECHO_N "(cached) $ECHO_C" >&6
2596 else
2597   if test -n "$AWK"; then
2598   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2599 else
2600   ac_save_IFS=$IFS; IFS=$ac_path_separator
2601 ac_dummy="$PATH"
2602 for ac_dir in $ac_dummy; do
2603   IFS=$ac_save_IFS
2604   test -z "$ac_dir" && ac_dir=.
2605   $as_executable_p "$ac_dir/$ac_word" || continue
2606 ac_cv_prog_AWK="$ac_prog"
2607 echo "$as_me:2607: found $ac_dir/$ac_word" >&5
2608 break
2609 done
2610
2611 fi
2612 fi
2613 AWK=$ac_cv_prog_AWK
2614 if test -n "$AWK"; then
2615   echo "$as_me:2615: result: $AWK" >&5
2616 echo "${ECHO_T}$AWK" >&6
2617 else
2618   echo "$as_me:2618: result: no" >&5
2619 echo "${ECHO_T}no" >&6
2620 fi
2621
2622   test -n "$AWK" && break
2623 done
2624
2625 test -z "$AWK" && { { echo "$as_me:2625: error: No awk program found" >&5
2626 echo "$as_me: error: No awk program found" >&2;}
2627    { (exit 1); exit 1; }; }
2628
2629 echo "$as_me:2629: checking for egrep" >&5
2630 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2631 if test "${ac_cv_prog_egrep+set}" = set; then
2632   echo $ECHO_N "(cached) $ECHO_C" >&6
2633 else
2634   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2635     then ac_cv_prog_egrep='grep -E'
2636     else ac_cv_prog_egrep='egrep'
2637     fi
2638 fi
2639 echo "$as_me:2639: result: $ac_cv_prog_egrep" >&5
2640 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2641  EGREP=$ac_cv_prog_egrep
2642
2643 test -z "$EGREP" && { { echo "$as_me:2643: error: No egrep program found" >&5
2644 echo "$as_me: error: No egrep program found" >&2;}
2645    { (exit 1); exit 1; }; }
2646
2647 # Find a good install program.  We prefer a C program (faster),
2648 # so one script is as good as another.  But avoid the broken or
2649 # incompatible versions:
2650 # SysV /etc/install, /usr/sbin/install
2651 # SunOS /usr/etc/install
2652 # IRIX /sbin/install
2653 # AIX /bin/install
2654 # AmigaOS /C/install, which installs bootblocks on floppy discs
2655 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2656 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2657 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2658 # ./install, which can be erroneously created by make from ./install.sh.
2659 echo "$as_me:2659: checking for a BSD compatible install" >&5
2660 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2661 if test -z "$INSTALL"; then
2662 if test "${ac_cv_path_install+set}" = set; then
2663   echo $ECHO_N "(cached) $ECHO_C" >&6
2664 else
2665     ac_save_IFS=$IFS; IFS=$ac_path_separator
2666   for ac_dir in $PATH; do
2667     IFS=$ac_save_IFS
2668     # Account for people who put trailing slashes in PATH elements.
2669     case $ac_dir/ in
2670     / | ./ | .// | /cC/* \
2671     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2672     | /usr/ucb/* ) ;;
2673     *)
2674       # OSF1 and SCO ODT 3.0 have their own names for install.
2675       # Don't use installbsd from OSF since it installs stuff as root
2676       # by default.
2677       for ac_prog in ginstall scoinst install; do
2678         if $as_executable_p "$ac_dir/$ac_prog"; then
2679           if test $ac_prog = install &&
2680             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2681             # AIX install.  It has an incompatible calling convention.
2682             :
2683           elif test $ac_prog = install &&
2684             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2685             # program-specific install script used by HP pwplus--don't use.
2686             :
2687           else
2688             ac_cv_path_install="$ac_dir/$ac_prog -c"
2689             break 2
2690           fi
2691         fi
2692       done
2693       ;;
2694     esac
2695   done
2696
2697 fi
2698   if test "${ac_cv_path_install+set}" = set; then
2699     INSTALL=$ac_cv_path_install
2700   else
2701     # As a last resort, use the slow shell script.  We don't cache a
2702     # path for INSTALL within a source directory, because that will
2703     # break other packages using the cache if that directory is
2704     # removed, or if the path is relative.
2705     INSTALL=$ac_install_sh
2706   fi
2707 fi
2708 echo "$as_me:2708: result: $INSTALL" >&5
2709 echo "${ECHO_T}$INSTALL" >&6
2710
2711 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2712 # It thinks the first close brace ends the variable substitution.
2713 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2714
2715 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2716
2717 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2718
2719 echo "$as_me:2719: checking whether ln -s works" >&5
2720 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2721 LN_S=$as_ln_s
2722 if test "$LN_S" = "ln -s"; then
2723   echo "$as_me:2723: result: yes" >&5
2724 echo "${ECHO_T}yes" >&6
2725 else
2726   echo "$as_me:2726: result: no, using $LN_S" >&5
2727 echo "${ECHO_T}no, using $LN_S" >&6
2728 fi
2729
2730 echo "$as_me:2730: checking if $LN_S -f options work" >&5
2731 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2732
2733 rm -f conf$$.src conf$$dst
2734 echo >conf$$.dst
2735 echo first >conf$$.src
2736 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2737         cf_prog_ln_sf=yes
2738 else
2739         cf_prog_ln_sf=no
2740 fi
2741 rm -f conf$$.dst conf$$src
2742 echo "$as_me:2742: result: $cf_prog_ln_sf" >&5
2743 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2744
2745 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2746
2747 echo "$as_me:2747: checking for long file names" >&5
2748 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2749 if test "${ac_cv_sys_long_file_names+set}" = set; then
2750   echo $ECHO_N "(cached) $ECHO_C" >&6
2751 else
2752   ac_cv_sys_long_file_names=yes
2753 # Test for long file names in all the places we know might matter:
2754 #      .                the current directory, where building will happen
2755 #      $prefix/lib      where we will be installing things
2756 #      $exec_prefix/lib likewise
2757 # eval it to expand exec_prefix.
2758 #      $TMPDIR          if set, where it might want to write temporary files
2759 # if $TMPDIR is not set:
2760 #      /tmp             where it might want to write temporary files
2761 #      /var/tmp         likewise
2762 #      /usr/tmp         likewise
2763 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2764   ac_tmpdirs=$TMPDIR
2765 else
2766   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2767 fi
2768 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2769   test -d $ac_dir || continue
2770   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2771   ac_xdir=$ac_dir/cf$$
2772   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2773   ac_tf1=$ac_xdir/conftest9012345
2774   ac_tf2=$ac_xdir/conftest9012346
2775   (echo 1 >$ac_tf1) 2>/dev/null
2776   (echo 2 >$ac_tf2) 2>/dev/null
2777   ac_val=`cat $ac_tf1 2>/dev/null`
2778   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2779     ac_cv_sys_long_file_names=no
2780     rm -rf $ac_xdir 2>/dev/null
2781     break
2782   fi
2783   rm -rf $ac_xdir 2>/dev/null
2784 done
2785 fi
2786 echo "$as_me:2786: result: $ac_cv_sys_long_file_names" >&5
2787 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2788 if test $ac_cv_sys_long_file_names = yes; then
2789
2790 cat >>confdefs.h <<\EOF
2791 #define HAVE_LONG_FILE_NAMES 1
2792 EOF
2793
2794 fi
2795
2796 # if we find pkg-config, check if we should install the ".pc" files.
2797
2798 echo "$as_me:2798: checking if you want to use pkg-config" >&5
2799 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2800
2801 # Check whether --with-pkg-config or --without-pkg-config was given.
2802 if test "${with_pkg_config+set}" = set; then
2803   withval="$with_pkg_config"
2804   cf_pkg_config=$withval
2805 else
2806   cf_pkg_config=yes
2807 fi;
2808 echo "$as_me:2808: result: $cf_pkg_config" >&5
2809 echo "${ECHO_T}$cf_pkg_config" >&6
2810
2811 case $cf_pkg_config in #(vi
2812 no) #(vi
2813         PKG_CONFIG=none
2814         ;;
2815 yes) #(vi
2816
2817 if test -n "$ac_tool_prefix"; then
2818   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2819 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2820 echo "$as_me:2820: checking for $ac_word" >&5
2821 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2822 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2823   echo $ECHO_N "(cached) $ECHO_C" >&6
2824 else
2825   case $PKG_CONFIG in
2826   [\\/]* | ?:[\\/]*)
2827   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2828   ;;
2829   *)
2830   ac_save_IFS=$IFS; IFS=$ac_path_separator
2831 ac_dummy="$PATH"
2832 for ac_dir in $ac_dummy; do
2833   IFS=$ac_save_IFS
2834   test -z "$ac_dir" && ac_dir=.
2835   if $as_executable_p "$ac_dir/$ac_word"; then
2836    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2837    echo "$as_me:2837: found $ac_dir/$ac_word" >&5
2838    break
2839 fi
2840 done
2841
2842   ;;
2843 esac
2844 fi
2845 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2846
2847 if test -n "$PKG_CONFIG"; then
2848   echo "$as_me:2848: result: $PKG_CONFIG" >&5
2849 echo "${ECHO_T}$PKG_CONFIG" >&6
2850 else
2851   echo "$as_me:2851: result: no" >&5
2852 echo "${ECHO_T}no" >&6
2853 fi
2854
2855 fi
2856 if test -z "$ac_cv_path_PKG_CONFIG"; then
2857   ac_pt_PKG_CONFIG=$PKG_CONFIG
2858   # Extract the first word of "pkg-config", so it can be a program name with args.
2859 set dummy pkg-config; ac_word=$2
2860 echo "$as_me:2860: checking for $ac_word" >&5
2861 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2862 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2863   echo $ECHO_N "(cached) $ECHO_C" >&6
2864 else
2865   case $ac_pt_PKG_CONFIG in
2866   [\\/]* | ?:[\\/]*)
2867   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2868   ;;
2869   *)
2870   ac_save_IFS=$IFS; IFS=$ac_path_separator
2871 ac_dummy="$PATH"
2872 for ac_dir in $ac_dummy; do
2873   IFS=$ac_save_IFS
2874   test -z "$ac_dir" && ac_dir=.
2875   if $as_executable_p "$ac_dir/$ac_word"; then
2876    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2877    echo "$as_me:2877: found $ac_dir/$ac_word" >&5
2878    break
2879 fi
2880 done
2881
2882   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2883   ;;
2884 esac
2885 fi
2886 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2887
2888 if test -n "$ac_pt_PKG_CONFIG"; then
2889   echo "$as_me:2889: result: $ac_pt_PKG_CONFIG" >&5
2890 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2891 else
2892   echo "$as_me:2892: result: no" >&5
2893 echo "${ECHO_T}no" >&6
2894 fi
2895
2896   PKG_CONFIG=$ac_pt_PKG_CONFIG
2897 else
2898   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2899 fi
2900
2901         ;;
2902 *)
2903         PKG_CONFIG=$withval
2904         ;;
2905 esac
2906
2907 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2908 if test "$PKG_CONFIG" != none ; then
2909
2910 if test "x$prefix" != xNONE; then
2911   cf_path_syntax="$prefix"
2912 else
2913   cf_path_syntax="$ac_default_prefix"
2914 fi
2915
2916 case ".$PKG_CONFIG" in #(vi
2917 .\$\(*\)*|.\'*\'*) #(vi
2918   ;;
2919 ..|./*|.\\*) #(vi
2920   ;;
2921 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2922   ;;
2923 .\${*prefix}*) #(vi
2924   eval PKG_CONFIG="$PKG_CONFIG"
2925   case ".$PKG_CONFIG" in #(vi
2926   .NONE/*)
2927     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2928     ;;
2929   esac
2930   ;; #(vi
2931 .no|.NONE/*)
2932   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2933   ;;
2934 *)
2935   { { echo "$as_me:2935: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2936 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2937    { (exit 1); exit 1; }; }
2938   ;;
2939 esac
2940
2941 fi
2942
2943 if test "$PKG_CONFIG" != none ; then
2944         echo "$as_me:2944: checking for $PKG_CONFIG library directory" >&5
2945 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2946
2947 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2948 if test "${with_pkg_config_libdir+set}" = set; then
2949   withval="$with_pkg_config_libdir"
2950   PKG_CONFIG_LIBDIR=$withval
2951 else
2952   PKG_CONFIG_LIBDIR=yes
2953 fi;
2954
2955         case x$PKG_CONFIG_LIBDIR in #(vi
2956         x/*) #(vi
2957                 ;;
2958         xyes) #(vi
2959                 # look for the library directory using the same prefix as the executable
2960                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2961                 case x`(arch) 2>/dev/null` in #(vi
2962                 *64) #(vi
2963                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
2964                         do
2965                                 if test -d $cf_config/pkgconfig
2966                                 then
2967                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2968                                         break
2969                                 fi
2970                         done
2971                         ;;
2972                 *)
2973                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
2974                         ;;
2975                 esac
2976                 ;;
2977         *)
2978                 ;;
2979         esac
2980
2981         echo "$as_me:2981: result: $PKG_CONFIG_LIBDIR" >&5
2982 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2983 fi
2984
2985 if test "$PKG_CONFIG" != none ; then
2986         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2987                 echo "$as_me:2987: checking if we should install .pc files for $PKG_CONFIG" >&5
2988 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2989
2990 # Check whether --enable-pc-files or --disable-pc-files was given.
2991 if test "${enable_pc_files+set}" = set; then
2992   enableval="$enable_pc_files"
2993   enable_pc_files=$enableval
2994 else
2995   enable_pc_files=no
2996 fi;
2997                 echo "$as_me:2997: result: $enable_pc_files" >&5
2998 echo "${ECHO_T}$enable_pc_files" >&6
2999         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3000                 enable_pc_files=no
3001                 { echo "$as_me:3001: WARNING: did not find $PKG_CONFIG library" >&5
3002 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3003         fi
3004 else
3005         enable_pc_files=no
3006 fi
3007
3008 echo "$as_me:3008: checking if you want to build test-programs" >&5
3009 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3010
3011 # Check whether --with-tests or --without-tests was given.
3012 if test "${with_tests+set}" = set; then
3013   withval="$with_tests"
3014   cf_with_tests=$withval
3015 else
3016   cf_with_tests=yes
3017 fi;
3018 echo "$as_me:3018: result: $cf_with_tests" >&5
3019 echo "${ECHO_T}$cf_with_tests" >&6
3020
3021 echo "$as_me:3021: checking if we should assume mixed-case filenames" >&5
3022 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3023
3024 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3025 if test "${enable_mixed_case+set}" = set; then
3026   enableval="$enable_mixed_case"
3027   enable_mixedcase=$enableval
3028 else
3029   enable_mixedcase=auto
3030 fi;
3031 echo "$as_me:3031: result: $enable_mixedcase" >&5
3032 echo "${ECHO_T}$enable_mixedcase" >&6
3033 if test "$enable_mixedcase" = "auto" ; then
3034
3035 echo "$as_me:3035: checking if filesystem supports mixed-case filenames" >&5
3036 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3037 if test "${cf_cv_mixedcase+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040
3041 if test "$cross_compiling" = yes ; then
3042         case $target_alias in #(vi
3043         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3044                 cf_cv_mixedcase=no
3045                 ;;
3046         *)
3047                 cf_cv_mixedcase=yes
3048                 ;;
3049         esac
3050 else
3051         rm -f conftest CONFTEST
3052         echo test >conftest
3053         if test -f CONFTEST ; then
3054                 cf_cv_mixedcase=no
3055         else
3056                 cf_cv_mixedcase=yes
3057         fi
3058         rm -f conftest CONFTEST
3059 fi
3060
3061 fi
3062 echo "$as_me:3062: result: $cf_cv_mixedcase" >&5
3063 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3064 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3065 #define MIXEDCASE_FILENAMES 1
3066 EOF
3067
3068 else
3069     cf_cv_mixedcase=$enable_mixedcase
3070     if test "$enable_mixedcase" = "yes" ; then
3071         cat >>confdefs.h <<\EOF
3072 #define MIXEDCASE_FILENAMES 1
3073 EOF
3074
3075     fi
3076 fi
3077
3078 # do this after mixed-case option (tags/TAGS is not as important as tic).
3079 echo "$as_me:3079: checking whether ${MAKE-make} sets \${MAKE}" >&5
3080 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3081 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3082 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3083   echo $ECHO_N "(cached) $ECHO_C" >&6
3084 else
3085   cat >conftest.make <<\EOF
3086 all:
3087         @echo 'ac_maketemp="${MAKE}"'
3088 EOF
3089 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3090 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3091 if test -n "$ac_maketemp"; then
3092   eval ac_cv_prog_make_${ac_make}_set=yes
3093 else
3094   eval ac_cv_prog_make_${ac_make}_set=no
3095 fi
3096 rm -f conftest.make
3097 fi
3098 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3099   echo "$as_me:3099: result: yes" >&5
3100 echo "${ECHO_T}yes" >&6
3101   SET_MAKE=
3102 else
3103   echo "$as_me:3103: result: no" >&5
3104 echo "${ECHO_T}no" >&6
3105   SET_MAKE="MAKE=${MAKE-make}"
3106 fi
3107
3108 for ac_prog in exctags ctags
3109 do
3110   # Extract the first word of "$ac_prog", so it can be a program name with args.
3111 set dummy $ac_prog; ac_word=$2
3112 echo "$as_me:3112: checking for $ac_word" >&5
3113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3114 if test "${ac_cv_prog_CTAGS+set}" = set; then
3115   echo $ECHO_N "(cached) $ECHO_C" >&6
3116 else
3117   if test -n "$CTAGS"; then
3118   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3119 else
3120   ac_save_IFS=$IFS; IFS=$ac_path_separator
3121 ac_dummy="$PATH"
3122 for ac_dir in $ac_dummy; do
3123   IFS=$ac_save_IFS
3124   test -z "$ac_dir" && ac_dir=.
3125   $as_executable_p "$ac_dir/$ac_word" || continue
3126 ac_cv_prog_CTAGS="$ac_prog"
3127 echo "$as_me:3127: found $ac_dir/$ac_word" >&5
3128 break
3129 done
3130
3131 fi
3132 fi
3133 CTAGS=$ac_cv_prog_CTAGS
3134 if test -n "$CTAGS"; then
3135   echo "$as_me:3135: result: $CTAGS" >&5
3136 echo "${ECHO_T}$CTAGS" >&6
3137 else
3138   echo "$as_me:3138: result: no" >&5
3139 echo "${ECHO_T}no" >&6
3140 fi
3141
3142   test -n "$CTAGS" && break
3143 done
3144
3145 for ac_prog in exetags etags
3146 do
3147   # Extract the first word of "$ac_prog", so it can be a program name with args.
3148 set dummy $ac_prog; ac_word=$2
3149 echo "$as_me:3149: checking for $ac_word" >&5
3150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3151 if test "${ac_cv_prog_ETAGS+set}" = set; then
3152   echo $ECHO_N "(cached) $ECHO_C" >&6
3153 else
3154   if test -n "$ETAGS"; then
3155   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3156 else
3157   ac_save_IFS=$IFS; IFS=$ac_path_separator
3158 ac_dummy="$PATH"
3159 for ac_dir in $ac_dummy; do
3160   IFS=$ac_save_IFS
3161   test -z "$ac_dir" && ac_dir=.
3162   $as_executable_p "$ac_dir/$ac_word" || continue
3163 ac_cv_prog_ETAGS="$ac_prog"
3164 echo "$as_me:3164: found $ac_dir/$ac_word" >&5
3165 break
3166 done
3167
3168 fi
3169 fi
3170 ETAGS=$ac_cv_prog_ETAGS
3171 if test -n "$ETAGS"; then
3172   echo "$as_me:3172: result: $ETAGS" >&5
3173 echo "${ECHO_T}$ETAGS" >&6
3174 else
3175   echo "$as_me:3175: result: no" >&5
3176 echo "${ECHO_T}no" >&6
3177 fi
3178
3179   test -n "$ETAGS" && break
3180 done
3181
3182 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3183 set dummy ${CTAGS:-ctags}; ac_word=$2
3184 echo "$as_me:3184: checking for $ac_word" >&5
3185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3186 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3187   echo $ECHO_N "(cached) $ECHO_C" >&6
3188 else
3189   if test -n "$MAKE_LOWER_TAGS"; then
3190   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3191 else
3192   ac_save_IFS=$IFS; IFS=$ac_path_separator
3193 ac_dummy="$PATH"
3194 for ac_dir in $ac_dummy; do
3195   IFS=$ac_save_IFS
3196   test -z "$ac_dir" && ac_dir=.
3197   $as_executable_p "$ac_dir/$ac_word" || continue
3198 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3199 echo "$as_me:3199: found $ac_dir/$ac_word" >&5
3200 break
3201 done
3202
3203   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3204 fi
3205 fi
3206 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3207 if test -n "$MAKE_LOWER_TAGS"; then
3208   echo "$as_me:3208: result: $MAKE_LOWER_TAGS" >&5
3209 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3210 else
3211   echo "$as_me:3211: result: no" >&5
3212 echo "${ECHO_T}no" >&6
3213 fi
3214
3215 if test "$cf_cv_mixedcase" = yes ; then
3216         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3217 set dummy ${ETAGS:-etags}; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   if test -n "$MAKE_UPPER_TAGS"; then
3224   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3225 else
3226   ac_save_IFS=$IFS; IFS=$ac_path_separator
3227 ac_dummy="$PATH"
3228 for ac_dir in $ac_dummy; do
3229   IFS=$ac_save_IFS
3230   test -z "$ac_dir" && ac_dir=.
3231   $as_executable_p "$ac_dir/$ac_word" || continue
3232 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3233 echo "$as_me:3233: found $ac_dir/$ac_word" >&5
3234 break
3235 done
3236
3237   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3238 fi
3239 fi
3240 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3241 if test -n "$MAKE_UPPER_TAGS"; then
3242   echo "$as_me:3242: result: $MAKE_UPPER_TAGS" >&5
3243 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3244 else
3245   echo "$as_me:3245: result: no" >&5
3246 echo "${ECHO_T}no" >&6
3247 fi
3248
3249 else
3250         MAKE_UPPER_TAGS=no
3251 fi
3252
3253 if test "$MAKE_UPPER_TAGS" = yes ; then
3254         MAKE_UPPER_TAGS=
3255 else
3256         MAKE_UPPER_TAGS="#"
3257 fi
3258
3259 if test "$MAKE_LOWER_TAGS" = yes ; then
3260         MAKE_LOWER_TAGS=
3261 else
3262         MAKE_LOWER_TAGS="#"
3263 fi
3264
3265 echo "$as_me:3265: checking for makeflags variable" >&5
3266 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3267 if test "${cf_cv_makeflags+set}" = set; then
3268   echo $ECHO_N "(cached) $ECHO_C" >&6
3269 else
3270
3271         cf_cv_makeflags=''
3272         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3273         do
3274                 cat >cf_makeflags.tmp <<CF_EOF
3275 SHELL = /bin/sh
3276 all :
3277         @ echo '.$cf_option'
3278 CF_EOF
3279                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3280                 case "$cf_result" in
3281                 .*k)
3282                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3283                         case "$cf_result" in
3284                         .*CC=*) cf_cv_makeflags=
3285                                 ;;
3286                         *)      cf_cv_makeflags=$cf_option
3287                                 ;;
3288                         esac
3289                         break
3290                         ;;
3291                 .-)     ;;
3292                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3293                         ;;
3294                 esac
3295         done
3296         rm -f cf_makeflags.tmp
3297
3298 fi
3299 echo "$as_me:3299: result: $cf_cv_makeflags" >&5
3300 echo "${ECHO_T}$cf_cv_makeflags" >&6
3301
3302 if test -n "$ac_tool_prefix"; then
3303   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3305 echo "$as_me:3305: checking for $ac_word" >&5
3306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3307 if test "${ac_cv_prog_RANLIB+set}" = set; then
3308   echo $ECHO_N "(cached) $ECHO_C" >&6
3309 else
3310   if test -n "$RANLIB"; then
3311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3312 else
3313   ac_save_IFS=$IFS; IFS=$ac_path_separator
3314 ac_dummy="$PATH"
3315 for ac_dir in $ac_dummy; do
3316   IFS=$ac_save_IFS
3317   test -z "$ac_dir" && ac_dir=.
3318   $as_executable_p "$ac_dir/$ac_word" || continue
3319 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3320 echo "$as_me:3320: found $ac_dir/$ac_word" >&5
3321 break
3322 done
3323
3324 fi
3325 fi
3326 RANLIB=$ac_cv_prog_RANLIB
3327 if test -n "$RANLIB"; then
3328   echo "$as_me:3328: result: $RANLIB" >&5
3329 echo "${ECHO_T}$RANLIB" >&6
3330 else
3331   echo "$as_me:3331: result: no" >&5
3332 echo "${ECHO_T}no" >&6
3333 fi
3334
3335 fi
3336 if test -z "$ac_cv_prog_RANLIB"; then
3337   ac_ct_RANLIB=$RANLIB
3338   # Extract the first word of "ranlib", so it can be a program name with args.
3339 set dummy ranlib; ac_word=$2
3340 echo "$as_me:3340: checking for $ac_word" >&5
3341 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3342 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3343   echo $ECHO_N "(cached) $ECHO_C" >&6
3344 else
3345   if test -n "$ac_ct_RANLIB"; then
3346   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3347 else
3348   ac_save_IFS=$IFS; IFS=$ac_path_separator
3349 ac_dummy="$PATH"
3350 for ac_dir in $ac_dummy; do
3351   IFS=$ac_save_IFS
3352   test -z "$ac_dir" && ac_dir=.
3353   $as_executable_p "$ac_dir/$ac_word" || continue
3354 ac_cv_prog_ac_ct_RANLIB="ranlib"
3355 echo "$as_me:3355: found $ac_dir/$ac_word" >&5
3356 break
3357 done
3358
3359   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3360 fi
3361 fi
3362 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3363 if test -n "$ac_ct_RANLIB"; then
3364   echo "$as_me:3364: result: $ac_ct_RANLIB" >&5
3365 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3366 else
3367   echo "$as_me:3367: result: no" >&5
3368 echo "${ECHO_T}no" >&6
3369 fi
3370
3371   RANLIB=$ac_ct_RANLIB
3372 else
3373   RANLIB="$ac_cv_prog_RANLIB"
3374 fi
3375
3376 if test -n "$ac_tool_prefix"; then
3377   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3378 set dummy ${ac_tool_prefix}ld; ac_word=$2
3379 echo "$as_me:3379: checking for $ac_word" >&5
3380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3381 if test "${ac_cv_prog_LD+set}" = set; then
3382   echo $ECHO_N "(cached) $ECHO_C" >&6
3383 else
3384   if test -n "$LD"; then
3385   ac_cv_prog_LD="$LD" # Let the user override the test.
3386 else
3387   ac_save_IFS=$IFS; IFS=$ac_path_separator
3388 ac_dummy="$PATH"
3389 for ac_dir in $ac_dummy; do
3390   IFS=$ac_save_IFS
3391   test -z "$ac_dir" && ac_dir=.
3392   $as_executable_p "$ac_dir/$ac_word" || continue
3393 ac_cv_prog_LD="${ac_tool_prefix}ld"
3394 echo "$as_me:3394: found $ac_dir/$ac_word" >&5
3395 break
3396 done
3397
3398 fi
3399 fi
3400 LD=$ac_cv_prog_LD
3401 if test -n "$LD"; then
3402   echo "$as_me:3402: result: $LD" >&5
3403 echo "${ECHO_T}$LD" >&6
3404 else
3405   echo "$as_me:3405: result: no" >&5
3406 echo "${ECHO_T}no" >&6
3407 fi
3408
3409 fi
3410 if test -z "$ac_cv_prog_LD"; then
3411   ac_ct_LD=$LD
3412   # Extract the first word of "ld", so it can be a program name with args.
3413 set dummy ld; ac_word=$2
3414 echo "$as_me:3414: checking for $ac_word" >&5
3415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3416 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3417   echo $ECHO_N "(cached) $ECHO_C" >&6
3418 else
3419   if test -n "$ac_ct_LD"; then
3420   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3421 else
3422   ac_save_IFS=$IFS; IFS=$ac_path_separator
3423 ac_dummy="$PATH"
3424 for ac_dir in $ac_dummy; do
3425   IFS=$ac_save_IFS
3426   test -z "$ac_dir" && ac_dir=.
3427   $as_executable_p "$ac_dir/$ac_word" || continue
3428 ac_cv_prog_ac_ct_LD="ld"
3429 echo "$as_me:3429: found $ac_dir/$ac_word" >&5
3430 break
3431 done
3432
3433   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3434 fi
3435 fi
3436 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3437 if test -n "$ac_ct_LD"; then
3438   echo "$as_me:3438: result: $ac_ct_LD" >&5
3439 echo "${ECHO_T}$ac_ct_LD" >&6
3440 else
3441   echo "$as_me:3441: result: no" >&5
3442 echo "${ECHO_T}no" >&6
3443 fi
3444
3445   LD=$ac_ct_LD
3446 else
3447   LD="$ac_cv_prog_LD"
3448 fi
3449
3450 if test -n "$ac_tool_prefix"; then
3451   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3452 set dummy ${ac_tool_prefix}ar; ac_word=$2
3453 echo "$as_me:3453: checking for $ac_word" >&5
3454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3455 if test "${ac_cv_prog_AR+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" >&6
3457 else
3458   if test -n "$AR"; then
3459   ac_cv_prog_AR="$AR" # Let the user override the test.
3460 else
3461   ac_save_IFS=$IFS; IFS=$ac_path_separator
3462 ac_dummy="$PATH"
3463 for ac_dir in $ac_dummy; do
3464   IFS=$ac_save_IFS
3465   test -z "$ac_dir" && ac_dir=.
3466   $as_executable_p "$ac_dir/$ac_word" || continue
3467 ac_cv_prog_AR="${ac_tool_prefix}ar"
3468 echo "$as_me:3468: found $ac_dir/$ac_word" >&5
3469 break
3470 done
3471
3472 fi
3473 fi
3474 AR=$ac_cv_prog_AR
3475 if test -n "$AR"; then
3476   echo "$as_me:3476: result: $AR" >&5
3477 echo "${ECHO_T}$AR" >&6
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481 fi
3482
3483 fi
3484 if test -z "$ac_cv_prog_AR"; then
3485   ac_ct_AR=$AR
3486   # Extract the first word of "ar", so it can be a program name with args.
3487 set dummy ar; ac_word=$2
3488 echo "$as_me:3488: checking for $ac_word" >&5
3489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   if test -n "$ac_ct_AR"; then
3494   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3495 else
3496   ac_save_IFS=$IFS; IFS=$ac_path_separator
3497 ac_dummy="$PATH"
3498 for ac_dir in $ac_dummy; do
3499   IFS=$ac_save_IFS
3500   test -z "$ac_dir" && ac_dir=.
3501   $as_executable_p "$ac_dir/$ac_word" || continue
3502 ac_cv_prog_ac_ct_AR="ar"
3503 echo "$as_me:3503: found $ac_dir/$ac_word" >&5
3504 break
3505 done
3506
3507   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3508 fi
3509 fi
3510 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3511 if test -n "$ac_ct_AR"; then
3512   echo "$as_me:3512: result: $ac_ct_AR" >&5
3513 echo "${ECHO_T}$ac_ct_AR" >&6
3514 else
3515   echo "$as_me:3515: result: no" >&5
3516 echo "${ECHO_T}no" >&6
3517 fi
3518
3519   AR=$ac_ct_AR
3520 else
3521   AR="$ac_cv_prog_AR"
3522 fi
3523
3524 if test -n "$ac_tool_prefix"; then
3525   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3526 set dummy ${ac_tool_prefix}ar; ac_word=$2
3527 echo "$as_me:3527: checking for $ac_word" >&5
3528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3529 if test "${ac_cv_prog_AR+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if test -n "$AR"; then
3533   ac_cv_prog_AR="$AR" # Let the user override the test.
3534 else
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   $as_executable_p "$ac_dir/$ac_word" || continue
3541 ac_cv_prog_AR="${ac_tool_prefix}ar"
3542 echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543 break
3544 done
3545
3546 fi
3547 fi
3548 AR=$ac_cv_prog_AR
3549 if test -n "$AR"; then
3550   echo "$as_me:3550: result: $AR" >&5
3551 echo "${ECHO_T}$AR" >&6
3552 else
3553   echo "$as_me:3553: result: no" >&5
3554 echo "${ECHO_T}no" >&6
3555 fi
3556
3557 fi
3558 if test -z "$ac_cv_prog_AR"; then
3559   ac_ct_AR=$AR
3560   # Extract the first word of "ar", so it can be a program name with args.
3561 set dummy ar; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567   if test -n "$ac_ct_AR"; then
3568   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3569 else
3570   ac_save_IFS=$IFS; IFS=$ac_path_separator
3571 ac_dummy="$PATH"
3572 for ac_dir in $ac_dummy; do
3573   IFS=$ac_save_IFS
3574   test -z "$ac_dir" && ac_dir=.
3575   $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ac_ct_AR="ar"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3578 break
3579 done
3580
3581   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3582 fi
3583 fi
3584 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3585 if test -n "$ac_ct_AR"; then
3586   echo "$as_me:3586: result: $ac_ct_AR" >&5
3587 echo "${ECHO_T}$ac_ct_AR" >&6
3588 else
3589   echo "$as_me:3589: result: no" >&5
3590 echo "${ECHO_T}no" >&6
3591 fi
3592
3593   AR=$ac_ct_AR
3594 else
3595   AR="$ac_cv_prog_AR"
3596 fi
3597
3598 echo "$as_me:3598: checking for options to update archives" >&5
3599 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3600 if test "${cf_cv_ar_flags+set}" = set; then
3601   echo $ECHO_N "(cached) $ECHO_C" >&6
3602 else
3603
3604         cf_cv_ar_flags=unknown
3605         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3606         do
3607
3608                 # check if $ARFLAGS already contains this choice
3609                 if test "x$ARFLAGS" != "x" ; then
3610                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3611                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3612                                 cf_cv_ar_flags=
3613                                 break
3614                         fi
3615                 fi
3616
3617                 rm -f conftest.$ac_cv_objext
3618                 rm -f conftest.a
3619
3620                 cat >conftest.$ac_ext <<EOF
3621 #line 3621 "configure"
3622 int     testdata[3] = { 123, 456, 789 };
3623 EOF
3624                 if { (eval echo "$as_me:3624: \"$ac_compile\"") >&5
3625   (eval $ac_compile) 2>&5
3626   ac_status=$?
3627   echo "$as_me:3627: \$? = $ac_status" >&5
3628   (exit $ac_status); } ; then
3629                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3630                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3631                         if test -f conftest.a ; then
3632                                 cf_cv_ar_flags=$cf_ar_flags
3633                                 break
3634                         fi
3635                 else
3636                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3637
3638 echo "${as_me:-configure}:3638: testing cannot compile test-program ..." 1>&5
3639
3640                         break
3641                 fi
3642         done
3643         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3644
3645 fi
3646 echo "$as_me:3646: result: $cf_cv_ar_flags" >&5
3647 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3648
3649 if test -n "$ARFLAGS" ; then
3650         if test -n "$cf_cv_ar_flags" ; then
3651                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3652         fi
3653 else
3654         ARFLAGS=$cf_cv_ar_flags
3655 fi
3656
3657 echo "$as_me:3657: checking if you have specified an install-prefix" >&5
3658 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3659
3660 # Check whether --with-install-prefix or --without-install-prefix was given.
3661 if test "${with_install_prefix+set}" = set; then
3662   withval="$with_install_prefix"
3663   case "$withval" in #(vi
3664         yes|no) #(vi
3665                 ;;
3666         *)      DESTDIR="$withval"
3667                 ;;
3668         esac
3669 fi;
3670 echo "$as_me:3670: result: $DESTDIR" >&5
3671 echo "${ECHO_T}$DESTDIR" >&6
3672
3673 ###############################################################################
3674
3675 # If we're cross-compiling, allow the user to override the tools and their
3676 # options.  The configure script is oriented toward identifying the host
3677 # compiler, etc., but we need a build compiler to generate parts of the source.
3678
3679 if test "$cross_compiling" = yes ; then
3680
3681         # defaults that we might want to override
3682         : ${BUILD_CFLAGS:=''}
3683         : ${BUILD_CPPFLAGS:=''}
3684         : ${BUILD_LDFLAGS:=''}
3685         : ${BUILD_LIBS:=''}
3686         : ${BUILD_EXEEXT:='$x'}
3687         : ${BUILD_OBJEXT:='o'}
3688
3689 # Check whether --with-build-cc or --without-build-cc was given.
3690 if test "${with_build_cc+set}" = set; then
3691   withval="$with_build_cc"
3692   BUILD_CC="$withval"
3693 else
3694   for ac_prog in gcc cc cl
3695 do
3696   # Extract the first word of "$ac_prog", so it can be a program name with args.
3697 set dummy $ac_prog; ac_word=$2
3698 echo "$as_me:3698: checking for $ac_word" >&5
3699 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3700 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3701   echo $ECHO_N "(cached) $ECHO_C" >&6
3702 else
3703   if test -n "$BUILD_CC"; then
3704   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3705 else
3706   ac_save_IFS=$IFS; IFS=$ac_path_separator
3707 ac_dummy="$PATH"
3708 for ac_dir in $ac_dummy; do
3709   IFS=$ac_save_IFS
3710   test -z "$ac_dir" && ac_dir=.
3711   $as_executable_p "$ac_dir/$ac_word" || continue
3712 ac_cv_prog_BUILD_CC="$ac_prog"
3713 echo "$as_me:3713: found $ac_dir/$ac_word" >&5
3714 break
3715 done
3716
3717 fi
3718 fi
3719 BUILD_CC=$ac_cv_prog_BUILD_CC
3720 if test -n "$BUILD_CC"; then
3721   echo "$as_me:3721: result: $BUILD_CC" >&5
3722 echo "${ECHO_T}$BUILD_CC" >&6
3723 else
3724   echo "$as_me:3724: result: no" >&5
3725 echo "${ECHO_T}no" >&6
3726 fi
3727
3728   test -n "$BUILD_CC" && break
3729 done
3730
3731 fi;
3732         echo "$as_me:3732: checking for native build C compiler" >&5
3733 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3734         echo "$as_me:3734: result: $BUILD_CC" >&5
3735 echo "${ECHO_T}$BUILD_CC" >&6
3736
3737         echo "$as_me:3737: checking for native build C preprocessor" >&5
3738 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3739
3740 # Check whether --with-build-cpp or --without-build-cpp was given.
3741 if test "${with_build_cpp+set}" = set; then
3742   withval="$with_build_cpp"
3743   BUILD_CPP="$withval"
3744 else
3745   BUILD_CPP='${BUILD_CC} -E'
3746 fi;
3747         echo "$as_me:3747: result: $BUILD_CPP" >&5
3748 echo "${ECHO_T}$BUILD_CPP" >&6
3749
3750         echo "$as_me:3750: checking for native build C flags" >&5
3751 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3752
3753 # Check whether --with-build-cflags or --without-build-cflags was given.
3754 if test "${with_build_cflags+set}" = set; then
3755   withval="$with_build_cflags"
3756   BUILD_CFLAGS="$withval"
3757 fi;
3758         echo "$as_me:3758: result: $BUILD_CFLAGS" >&5
3759 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3760
3761         echo "$as_me:3761: checking for native build C preprocessor-flags" >&5
3762 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3763
3764 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3765 if test "${with_build_cppflags+set}" = set; then
3766   withval="$with_build_cppflags"
3767   BUILD_CPPFLAGS="$withval"
3768 fi;
3769         echo "$as_me:3769: result: $BUILD_CPPFLAGS" >&5
3770 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3771
3772         echo "$as_me:3772: checking for native build linker-flags" >&5
3773 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3774
3775 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3776 if test "${with_build_ldflags+set}" = set; then
3777   withval="$with_build_ldflags"
3778   BUILD_LDFLAGS="$withval"
3779 fi;
3780         echo "$as_me:3780: result: $BUILD_LDFLAGS" >&5
3781 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3782
3783         echo "$as_me:3783: checking for native build linker-libraries" >&5
3784 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3785
3786 # Check whether --with-build-libs or --without-build-libs was given.
3787 if test "${with_build_libs+set}" = set; then
3788   withval="$with_build_libs"
3789   BUILD_LIBS="$withval"
3790 fi;
3791         echo "$as_me:3791: result: $BUILD_LIBS" >&5
3792 echo "${ECHO_T}$BUILD_LIBS" >&6
3793
3794         # this assumes we're on Unix.
3795         BUILD_EXEEXT=
3796         BUILD_OBJEXT=o
3797
3798         : ${BUILD_CC:='${CC}'}
3799
3800         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3801                 { { echo "$as_me:3801: error: Cross-build requires two compilers.
3802 Use --with-build-cc to specify the native compiler." >&5
3803 echo "$as_me: error: Cross-build requires two compilers.
3804 Use --with-build-cc to specify the native compiler." >&2;}
3805    { (exit 1); exit 1; }; }
3806         fi
3807
3808 else
3809         : ${BUILD_CC:='${CC}'}
3810         : ${BUILD_CPP:='${CPP}'}
3811         : ${BUILD_CFLAGS:='${CFLAGS}'}
3812         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3813         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3814         : ${BUILD_LIBS:='${LIBS}'}
3815         : ${BUILD_EXEEXT:='$x'}
3816         : ${BUILD_OBJEXT:='o'}
3817 fi
3818
3819 ###############################################################################
3820
3821 ### Options to allow the user to specify the set of libraries which are used.
3822 ### Use "--without-normal --with-shared" to allow the default model to be
3823 ### shared, for example.
3824 cf_list_models=""
3825
3826 echo "$as_me:3826: checking if you want to build shared C-objects" >&5
3827 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3828
3829 # Check whether --with-shared or --without-shared was given.
3830 if test "${with_shared+set}" = set; then
3831   withval="$with_shared"
3832   with_shared=$withval
3833 else
3834   with_shared=no
3835 fi;
3836 echo "$as_me:3836: result: $with_shared" >&5
3837 echo "${ECHO_T}$with_shared" >&6
3838 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3839
3840 echo "$as_me:3840: checking for specified models" >&5
3841 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3842 test -z "$cf_list_models" && cf_list_models=normal
3843 echo "$as_me:3843: result: $cf_list_models" >&5
3844 echo "${ECHO_T}$cf_list_models" >&6
3845
3846 ### Use the first model as the default, and save its suffix for use in building
3847 ### up test-applications.
3848 echo "$as_me:3848: checking for default model" >&5
3849 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3850 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3851 echo "$as_me:3851: result: $DFT_LWR_MODEL" >&5
3852 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3853
3854 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3855
3856 echo "$as_me:3856: checking for specific curses-directory" >&5
3857 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3858
3859 # Check whether --with-curses-dir or --without-curses-dir was given.
3860 if test "${with_curses_dir+set}" = set; then
3861   withval="$with_curses_dir"
3862   cf_cv_curses_dir=$withval
3863 else
3864   cf_cv_curses_dir=no
3865 fi;
3866 echo "$as_me:3866: result: $cf_cv_curses_dir" >&5
3867 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3868
3869 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3870 then
3871
3872 if test "x$prefix" != xNONE; then
3873   cf_path_syntax="$prefix"
3874 else
3875   cf_path_syntax="$ac_default_prefix"
3876 fi
3877
3878 case ".$withval" in #(vi
3879 .\$\(*\)*|.\'*\'*) #(vi
3880   ;;
3881 ..|./*|.\\*) #(vi
3882   ;;
3883 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3884   ;;
3885 .\${*prefix}*) #(vi
3886   eval withval="$withval"
3887   case ".$withval" in #(vi
3888   .NONE/*)
3889     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3890     ;;
3891   esac
3892   ;; #(vi
3893 .no|.NONE/*)
3894   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3895   ;;
3896 *)
3897   { { echo "$as_me:3897: error: expected a pathname, not \"$withval\"" >&5
3898 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3899    { (exit 1); exit 1; }; }
3900   ;;
3901 esac
3902
3903         if test -d "$cf_cv_curses_dir"
3904         then
3905
3906 if test -n "$cf_cv_curses_dir/include" ; then
3907   for cf_add_incdir in $cf_cv_curses_dir/include
3908   do
3909         while test $cf_add_incdir != /usr/include
3910         do
3911           if test -d $cf_add_incdir
3912           then
3913                 cf_have_incdir=no
3914                 if test -n "$CFLAGS$CPPFLAGS" ; then
3915                   # a loop is needed to ensure we can add subdirs of existing dirs
3916                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3917                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3918                           cf_have_incdir=yes; break
3919                         fi
3920                   done
3921                 fi
3922
3923                 if test "$cf_have_incdir" = no ; then
3924                   if test "$cf_add_incdir" = /usr/local/include ; then
3925                         if test "$GCC" = yes
3926                         then
3927                           cf_save_CPPFLAGS=$CPPFLAGS
3928                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3929                           cat >conftest.$ac_ext <<_ACEOF
3930 #line 3930 "configure"
3931 #include "confdefs.h"
3932 #include <stdio.h>
3933 int
3934 main ()
3935 {
3936 printf("Hello")
3937   ;
3938   return 0;
3939 }
3940 _ACEOF
3941 rm -f conftest.$ac_objext
3942 if { (eval echo "$as_me:3942: \"$ac_compile\"") >&5
3943   (eval $ac_compile) 2>&5
3944   ac_status=$?
3945   echo "$as_me:3945: \$? = $ac_status" >&5
3946   (exit $ac_status); } &&
3947          { ac_try='test -s conftest.$ac_objext'
3948   { (eval echo "$as_me:3948: \"$ac_try\"") >&5
3949   (eval $ac_try) 2>&5
3950   ac_status=$?
3951   echo "$as_me:3951: \$? = $ac_status" >&5
3952   (exit $ac_status); }; }; then
3953   :
3954 else
3955   echo "$as_me: failed program was:" >&5
3956 cat conftest.$ac_ext >&5
3957 cf_have_incdir=yes
3958 fi
3959 rm -f conftest.$ac_objext conftest.$ac_ext
3960                           CPPFLAGS=$cf_save_CPPFLAGS
3961                         fi
3962                   fi
3963                 fi
3964
3965                 if test "$cf_have_incdir" = no ; then
3966                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3967
3968 echo "${as_me:-configure}:3968: testing adding $cf_add_incdir to include-path ..." 1>&5
3969
3970                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3971
3972                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3973                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3974                   cf_add_incdir="$cf_top_incdir"
3975                 else
3976                   break
3977                 fi
3978           fi
3979         done
3980   done
3981 fi
3982
3983 if test -n "$cf_cv_curses_dir/lib" ; then
3984   for cf_add_libdir in $cf_cv_curses_dir/lib
3985   do
3986     if test $cf_add_libdir = /usr/lib ; then
3987       :
3988     elif test -d $cf_add_libdir
3989     then
3990       cf_have_libdir=no
3991       if test -n "$LDFLAGS$LIBS" ; then
3992         # a loop is needed to ensure we can add subdirs of existing dirs
3993         for cf_test_libdir in $LDFLAGS $LIBS ; do
3994           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3995             cf_have_libdir=yes; break
3996           fi
3997         done
3998       fi
3999       if test "$cf_have_libdir" = no ; then
4000         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4001
4002 echo "${as_me:-configure}:4002: testing adding $cf_add_libdir to library-path ..." 1>&5
4003
4004         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4005       fi
4006     fi
4007   done
4008 fi
4009
4010         fi
4011 fi
4012
4013 echo "$as_me:4013: checking if you want wide-character code" >&5
4014 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
4015
4016 # Check whether --enable-widec or --disable-widec was given.
4017 if test "${enable_widec+set}" = set; then
4018   enableval="$enable_widec"
4019   with_widec=$enableval
4020 else
4021   with_widec=no
4022 fi;
4023 echo "$as_me:4023: result: $with_widec" >&5
4024 echo "${ECHO_T}$with_widec" >&6
4025 if test "$with_widec" = yes ; then
4026
4027 echo "$as_me:4027: checking for multibyte character support" >&5
4028 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
4029 if test "${cf_cv_utf8_lib+set}" = set; then
4030   echo $ECHO_N "(cached) $ECHO_C" >&6
4031 else
4032
4033         cf_save_LIBS="$LIBS"
4034         cat >conftest.$ac_ext <<_ACEOF
4035 #line 4035 "configure"
4036 #include "confdefs.h"
4037
4038 #include <stdlib.h>
4039 int
4040 main ()
4041 {
4042 putwc(0,0);
4043   ;
4044   return 0;
4045 }
4046 _ACEOF
4047 rm -f conftest.$ac_objext conftest$ac_exeext
4048 if { (eval echo "$as_me:4048: \"$ac_link\"") >&5
4049   (eval $ac_link) 2>&5
4050   ac_status=$?
4051   echo "$as_me:4051: \$? = $ac_status" >&5
4052   (exit $ac_status); } &&
4053          { ac_try='test -s conftest$ac_exeext'
4054   { (eval echo "$as_me:4054: \"$ac_try\"") >&5
4055   (eval $ac_try) 2>&5
4056   ac_status=$?
4057   echo "$as_me:4057: \$? = $ac_status" >&5
4058   (exit $ac_status); }; }; then
4059   cf_cv_utf8_lib=yes
4060 else
4061   echo "$as_me: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
4063
4064 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4065 # will be set on completion of the AC_TRY_LINK below.
4066 cf_cv_header_path_utf8=
4067 cf_cv_library_path_utf8=
4068
4069 echo "${as_me:-configure}:4069: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4070
4071 cf_save_LIBS="$LIBS"
4072
4073 cat >conftest.$ac_ext <<_ACEOF
4074 #line 4074 "configure"
4075 #include "confdefs.h"
4076
4077 #include <libutf8.h>
4078 int
4079 main ()
4080 {
4081 putwc(0,0);
4082   ;
4083   return 0;
4084 }
4085 _ACEOF
4086 rm -f conftest.$ac_objext conftest$ac_exeext
4087 if { (eval echo "$as_me:4087: \"$ac_link\"") >&5
4088   (eval $ac_link) 2>&5
4089   ac_status=$?
4090   echo "$as_me:4090: \$? = $ac_status" >&5
4091   (exit $ac_status); } &&
4092          { ac_try='test -s conftest$ac_exeext'
4093   { (eval echo "$as_me:4093: \"$ac_try\"") >&5
4094   (eval $ac_try) 2>&5
4095   ac_status=$?
4096   echo "$as_me:4096: \$? = $ac_status" >&5
4097   (exit $ac_status); }; }; then
4098
4099         cf_cv_find_linkage_utf8=yes
4100         cf_cv_header_path_utf8=/usr/include
4101         cf_cv_library_path_utf8=/usr/lib
4102
4103 else
4104   echo "$as_me: failed program was:" >&5
4105 cat conftest.$ac_ext >&5
4106
4107 LIBS="-lutf8  $cf_save_LIBS"
4108
4109 cat >conftest.$ac_ext <<_ACEOF
4110 #line 4110 "configure"
4111 #include "confdefs.h"
4112
4113 #include <libutf8.h>
4114 int
4115 main ()
4116 {
4117 putwc(0,0);
4118   ;
4119   return 0;
4120 }
4121 _ACEOF
4122 rm -f conftest.$ac_objext conftest$ac_exeext
4123 if { (eval echo "$as_me:4123: \"$ac_link\"") >&5
4124   (eval $ac_link) 2>&5
4125   ac_status=$?
4126   echo "$as_me:4126: \$? = $ac_status" >&5
4127   (exit $ac_status); } &&
4128          { ac_try='test -s conftest$ac_exeext'
4129   { (eval echo "$as_me:4129: \"$ac_try\"") >&5
4130   (eval $ac_try) 2>&5
4131   ac_status=$?
4132   echo "$as_me:4132: \$? = $ac_status" >&5
4133   (exit $ac_status); }; }; then
4134
4135         cf_cv_find_linkage_utf8=yes
4136         cf_cv_header_path_utf8=/usr/include
4137         cf_cv_library_path_utf8=/usr/lib
4138         cf_cv_library_file_utf8="-lutf8"
4139
4140 else
4141   echo "$as_me: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143
4144         cf_cv_find_linkage_utf8=no
4145         LIBS="$cf_save_LIBS"
4146
4147     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
4148
4149 echo "${as_me:-configure}:4149: testing find linkage for utf8 library ..." 1>&5
4150
4151 echo "${as_me:-configure}:4151: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4152
4153     cf_save_CPPFLAGS="$CPPFLAGS"
4154     cf_test_CPPFLAGS="$CPPFLAGS"
4155
4156 cf_search=
4157
4158 # collect the current set of include-directories from compiler flags
4159 cf_header_path_list=""
4160 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4161         for cf_header_path in $CPPFLAGS $CFLAGS
4162         do
4163                 case $cf_header_path in #(vi
4164                 -I*)
4165                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4166
4167 test "$cf_header_path" != "NONE" && \
4168 test -d "$cf_header_path" && \
4169  {
4170         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4171         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4172         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4173         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4174         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4175         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4176 }
4177
4178                         cf_header_path_list="$cf_header_path_list $cf_search"
4179                         ;;
4180                 esac
4181         done
4182 fi
4183
4184 # add the variations for the package we are looking for
4185
4186 cf_search=
4187
4188 test "/usr" != "$prefix" && \
4189 test -d "/usr" && \
4190 (test $prefix = NONE || test "/usr" != "$prefix") && {
4191         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4192         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4193         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4194         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4195         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4196         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4197 }
4198
4199 test "$prefix" != "NONE" && \
4200 test -d "$prefix" && \
4201  {
4202         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4203         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4204         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4205         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4206         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4207         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4208 }
4209
4210 test "/usr/local" != "$prefix" && \
4211 test -d "/usr/local" && \
4212 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4213         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4214         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4215         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4216         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4217         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4218         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4219 }
4220
4221 test "/opt" != "$prefix" && \
4222 test -d "/opt" && \
4223 (test $prefix = NONE || test "/opt" != "$prefix") && {
4224         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4225         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4226         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4227         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4228         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4229         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4230 }
4231
4232 test "$HOME" != "$prefix" && \
4233 test -d "$HOME" && \
4234 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4235         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4236         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4237         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4238         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4239         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4240         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4241 }
4242
4243 test "$includedir" != NONE && \
4244 test "$includedir" != "/usr/include" && \
4245 test -d "$includedir" && {
4246         test -d $includedir &&    cf_search="$cf_search $includedir"
4247         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4248 }
4249
4250 test "$oldincludedir" != NONE && \
4251 test "$oldincludedir" != "/usr/include" && \
4252 test -d "$oldincludedir" && {
4253         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4254         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4255 }
4256
4257 cf_search="$cf_search $cf_header_path_list"
4258
4259     for cf_cv_header_path_utf8 in $cf_search
4260     do
4261       if test -d $cf_cv_header_path_utf8 ; then
4262         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4263
4264 echo "${as_me:-configure}:4264: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4265
4266         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4267         cat >conftest.$ac_ext <<_ACEOF
4268 #line 4268 "configure"
4269 #include "confdefs.h"
4270
4271 #include <libutf8.h>
4272 int
4273 main ()
4274 {
4275 putwc(0,0);
4276   ;
4277   return 0;
4278 }
4279 _ACEOF
4280 rm -f conftest.$ac_objext
4281 if { (eval echo "$as_me:4281: \"$ac_compile\"") >&5
4282   (eval $ac_compile) 2>&5
4283   ac_status=$?
4284   echo "$as_me:4284: \$? = $ac_status" >&5
4285   (exit $ac_status); } &&
4286          { ac_try='test -s conftest.$ac_objext'
4287   { (eval echo "$as_me:4287: \"$ac_try\"") >&5
4288   (eval $ac_try) 2>&5
4289   ac_status=$?
4290   echo "$as_me:4290: \$? = $ac_status" >&5
4291   (exit $ac_status); }; }; then
4292
4293             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4294
4295 echo "${as_me:-configure}:4295: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4296
4297             cf_cv_find_linkage_utf8=maybe
4298             cf_test_CPPFLAGS="$CPPFLAGS"
4299             break
4300 else
4301   echo "$as_me: failed program was:" >&5
4302 cat conftest.$ac_ext >&5
4303
4304             CPPFLAGS="$cf_save_CPPFLAGS"
4305
4306 fi
4307 rm -f conftest.$ac_objext conftest.$ac_ext
4308       fi
4309     done
4310
4311     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4312
4313 echo "${as_me:-configure}:4313: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4314
4315       cf_save_LIBS="$LIBS"
4316       cf_save_LDFLAGS="$LDFLAGS"
4317
4318       if test "$cf_cv_find_linkage_utf8" != yes ; then
4319
4320 cf_search=
4321 cf_library_path_list=""
4322 if test -n "${LDFLAGS}${LIBS}" ; then
4323         for cf_library_path in $LDFLAGS $LIBS
4324         do
4325                 case $cf_library_path in #(vi
4326                 -L*)
4327                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4328
4329 test "$cf_library_path" != "NONE" && \
4330 test -d "$cf_library_path" && \
4331  {
4332         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4333         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4334         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4335         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4336         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4337         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4338 }
4339
4340                         cf_library_path_list="$cf_library_path_list $cf_search"
4341                         ;;
4342                 esac
4343         done
4344 fi
4345
4346 cf_search=
4347
4348 test "/usr" != "$prefix" && \
4349 test -d "/usr" && \
4350 (test $prefix = NONE || test "/usr" != "$prefix") && {
4351         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4352         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4353         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4354         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4355         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4356         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4357 }
4358
4359 test "$prefix" != "NONE" && \
4360 test -d "$prefix" && \
4361  {
4362         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4363         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4364         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4365         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4366         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4367         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4368 }
4369
4370 test "/usr/local" != "$prefix" && \
4371 test -d "/usr/local" && \
4372 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4373         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4374         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4375         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4376         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4377         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4378         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4379 }
4380
4381 test "/opt" != "$prefix" && \
4382 test -d "/opt" && \
4383 (test $prefix = NONE || test "/opt" != "$prefix") && {
4384         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4385         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4386         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4387         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4388         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4389         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4390 }
4391
4392 test "$HOME" != "$prefix" && \
4393 test -d "$HOME" && \
4394 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4395         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4396         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4397         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4398         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4399         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4400         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4401 }
4402
4403 cf_search="$cf_library_path_list $cf_search"
4404
4405         for cf_cv_library_path_utf8 in $cf_search
4406         do
4407           if test -d $cf_cv_library_path_utf8 ; then
4408             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4409
4410 echo "${as_me:-configure}:4410: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4411
4412             CPPFLAGS="$cf_test_CPPFLAGS"
4413             LIBS="-lutf8  $cf_save_LIBS"
4414             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4415             cat >conftest.$ac_ext <<_ACEOF
4416 #line 4416 "configure"
4417 #include "confdefs.h"
4418
4419 #include <libutf8.h>
4420 int
4421 main ()
4422 {
4423 putwc(0,0);
4424   ;
4425   return 0;
4426 }
4427 _ACEOF
4428 rm -f conftest.$ac_objext conftest$ac_exeext
4429 if { (eval echo "$as_me:4429: \"$ac_link\"") >&5
4430   (eval $ac_link) 2>&5
4431   ac_status=$?
4432   echo "$as_me:4432: \$? = $ac_status" >&5
4433   (exit $ac_status); } &&
4434          { ac_try='test -s conftest$ac_exeext'
4435   { (eval echo "$as_me:4435: \"$ac_try\"") >&5
4436   (eval $ac_try) 2>&5
4437   ac_status=$?
4438   echo "$as_me:4438: \$? = $ac_status" >&5
4439   (exit $ac_status); }; }; then
4440
4441                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4442
4443 echo "${as_me:-configure}:4443: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4444
4445                 cf_cv_find_linkage_utf8=yes
4446                 cf_cv_library_file_utf8="-lutf8"
4447                 break
4448 else
4449   echo "$as_me: failed program was:" >&5
4450 cat conftest.$ac_ext >&5
4451
4452                 CPPFLAGS="$cf_save_CPPFLAGS"
4453                 LIBS="$cf_save_LIBS"
4454                 LDFLAGS="$cf_save_LDFLAGS"
4455
4456 fi
4457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4458           fi
4459         done
4460         CPPFLAGS="$cf_save_CPPFLAGS"
4461         LDFLAGS="$cf_save_LDFLAGS"
4462       fi
4463
4464     else
4465       cf_cv_find_linkage_utf8=no
4466     fi
4467
4468 fi
4469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4470
4471 fi
4472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4473
4474 LIBS="$cf_save_LIBS"
4475
4476 if test "$cf_cv_find_linkage_utf8" = yes ; then
4477 cf_cv_utf8_lib=add-on
4478 else
4479 cf_cv_utf8_lib=no
4480 fi
4481
4482 fi
4483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4484 fi
4485 echo "$as_me:4485: result: $cf_cv_utf8_lib" >&5
4486 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4487
4488 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4489 # ncurses/ncursesw:
4490 if test "$cf_cv_utf8_lib" = "add-on" ; then
4491         cat >>confdefs.h <<\EOF
4492 #define HAVE_LIBUTF8_H 1
4493 EOF
4494
4495 if test -n "$cf_cv_header_path_utf8" ; then
4496   for cf_add_incdir in $cf_cv_header_path_utf8
4497   do
4498         while test $cf_add_incdir != /usr/include
4499         do
4500           if test -d $cf_add_incdir
4501           then
4502                 cf_have_incdir=no
4503                 if test -n "$CFLAGS$CPPFLAGS" ; then
4504                   # a loop is needed to ensure we can add subdirs of existing dirs
4505                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4506                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4507                           cf_have_incdir=yes; break
4508                         fi
4509                   done
4510                 fi
4511
4512                 if test "$cf_have_incdir" = no ; then
4513                   if test "$cf_add_incdir" = /usr/local/include ; then
4514                         if test "$GCC" = yes
4515                         then
4516                           cf_save_CPPFLAGS=$CPPFLAGS
4517                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4518                           cat >conftest.$ac_ext <<_ACEOF
4519 #line 4519 "configure"
4520 #include "confdefs.h"
4521 #include <stdio.h>
4522 int
4523 main ()
4524 {
4525 printf("Hello")
4526   ;
4527   return 0;
4528 }
4529 _ACEOF
4530 rm -f conftest.$ac_objext
4531 if { (eval echo "$as_me:4531: \"$ac_compile\"") >&5
4532   (eval $ac_compile) 2>&5
4533   ac_status=$?
4534   echo "$as_me:4534: \$? = $ac_status" >&5
4535   (exit $ac_status); } &&
4536          { ac_try='test -s conftest.$ac_objext'
4537   { (eval echo "$as_me:4537: \"$ac_try\"") >&5
4538   (eval $ac_try) 2>&5
4539   ac_status=$?
4540   echo "$as_me:4540: \$? = $ac_status" >&5
4541   (exit $ac_status); }; }; then
4542   :
4543 else
4544   echo "$as_me: failed program was:" >&5
4545 cat conftest.$ac_ext >&5
4546 cf_have_incdir=yes
4547 fi
4548 rm -f conftest.$ac_objext conftest.$ac_ext
4549                           CPPFLAGS=$cf_save_CPPFLAGS
4550                         fi
4551                   fi
4552                 fi
4553
4554                 if test "$cf_have_incdir" = no ; then
4555                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4556
4557 echo "${as_me:-configure}:4557: testing adding $cf_add_incdir to include-path ..." 1>&5
4558
4559                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4560
4561                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4562                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4563                   cf_add_incdir="$cf_top_incdir"
4564                 else
4565                   break
4566                 fi
4567           fi
4568         done
4569   done
4570 fi
4571
4572 if test -n "$cf_cv_library_path_utf8" ; then
4573   for cf_add_libdir in $cf_cv_library_path_utf8
4574   do
4575     if test $cf_add_libdir = /usr/lib ; then
4576       :
4577     elif test -d $cf_add_libdir
4578     then
4579       cf_have_libdir=no
4580       if test -n "$LDFLAGS$LIBS" ; then
4581         # a loop is needed to ensure we can add subdirs of existing dirs
4582         for cf_test_libdir in $LDFLAGS $LIBS ; do
4583           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4584             cf_have_libdir=yes; break
4585           fi
4586         done
4587       fi
4588       if test "$cf_have_libdir" = no ; then
4589         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4590
4591 echo "${as_me:-configure}:4591: testing adding $cf_add_libdir to library-path ..." 1>&5
4592
4593         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4594       fi
4595     fi
4596   done
4597 fi
4598
4599         LIBS="$cf_cv_library_file_utf8 $LIBS"
4600 fi
4601
4602 cf_ncuconfig_root=ncursesw
4603
4604 echo "Looking for ${cf_ncuconfig_root}-config"
4605
4606 if test -n "$ac_tool_prefix"; then
4607   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4608   do
4609     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4610 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4611 echo "$as_me:4611: checking for $ac_word" >&5
4612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4613 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4614   echo $ECHO_N "(cached) $ECHO_C" >&6
4615 else
4616   if test -n "$NCURSES_CONFIG"; then
4617   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4618 else
4619   ac_save_IFS=$IFS; IFS=$ac_path_separator
4620 ac_dummy="$PATH"
4621 for ac_dir in $ac_dummy; do
4622   IFS=$ac_save_IFS
4623   test -z "$ac_dir" && ac_dir=.
4624   $as_executable_p "$ac_dir/$ac_word" || continue
4625 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4626 echo "$as_me:4626: found $ac_dir/$ac_word" >&5
4627 break
4628 done
4629
4630 fi
4631 fi
4632 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4633 if test -n "$NCURSES_CONFIG"; then
4634   echo "$as_me:4634: result: $NCURSES_CONFIG" >&5
4635 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4636 else
4637   echo "$as_me:4637: result: no" >&5
4638 echo "${ECHO_T}no" >&6
4639 fi
4640
4641     test -n "$NCURSES_CONFIG" && break
4642   done
4643 fi
4644 if test -z "$NCURSES_CONFIG"; then
4645   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4646   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4647 do
4648   # Extract the first word of "$ac_prog", so it can be a program name with args.
4649 set dummy $ac_prog; ac_word=$2
4650 echo "$as_me:4650: checking for $ac_word" >&5
4651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4652 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4653   echo $ECHO_N "(cached) $ECHO_C" >&6
4654 else
4655   if test -n "$ac_ct_NCURSES_CONFIG"; then
4656   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4657 else
4658   ac_save_IFS=$IFS; IFS=$ac_path_separator
4659 ac_dummy="$PATH"
4660 for ac_dir in $ac_dummy; do
4661   IFS=$ac_save_IFS
4662   test -z "$ac_dir" && ac_dir=.
4663   $as_executable_p "$ac_dir/$ac_word" || continue
4664 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4665 echo "$as_me:4665: found $ac_dir/$ac_word" >&5
4666 break
4667 done
4668
4669 fi
4670 fi
4671 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4672 if test -n "$ac_ct_NCURSES_CONFIG"; then
4673   echo "$as_me:4673: result: $ac_ct_NCURSES_CONFIG" >&5
4674 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4675 else
4676   echo "$as_me:4676: result: no" >&5
4677 echo "${ECHO_T}no" >&6
4678 fi
4679
4680   test -n "$ac_ct_NCURSES_CONFIG" && break
4681 done
4682 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4683
4684   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4685 fi
4686
4687 if test "$NCURSES_CONFIG" != none ; then
4688
4689 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4690 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4691
4692 # even with config script, some packages use no-override for curses.h
4693
4694 echo "$as_me:4694: checking if we have identified curses headers" >&5
4695 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4696 if test "${cf_cv_ncurses_header+set}" = set; then
4697   echo $ECHO_N "(cached) $ECHO_C" >&6
4698 else
4699
4700 cf_cv_ncurses_header=none
4701 for cf_header in  \
4702     ncursesw/ncurses.h \
4703         ncursesw/curses.h \
4704         ncurses.h \
4705         curses.h
4706 do
4707 cat >conftest.$ac_ext <<_ACEOF
4708 #line 4708 "configure"
4709 #include "confdefs.h"
4710 #include <${cf_header}>
4711 int
4712 main ()
4713 {
4714 initscr(); tgoto("?", 0,0)
4715   ;
4716   return 0;
4717 }
4718 _ACEOF
4719 rm -f conftest.$ac_objext
4720 if { (eval echo "$as_me:4720: \"$ac_compile\"") >&5
4721   (eval $ac_compile) 2>&5
4722   ac_status=$?
4723   echo "$as_me:4723: \$? = $ac_status" >&5
4724   (exit $ac_status); } &&
4725          { ac_try='test -s conftest.$ac_objext'
4726   { (eval echo "$as_me:4726: \"$ac_try\"") >&5
4727   (eval $ac_try) 2>&5
4728   ac_status=$?
4729   echo "$as_me:4729: \$? = $ac_status" >&5
4730   (exit $ac_status); }; }; then
4731   cf_cv_ncurses_header=$cf_header; break
4732 else
4733   echo "$as_me: failed program was:" >&5
4734 cat conftest.$ac_ext >&5
4735 fi
4736 rm -f conftest.$ac_objext conftest.$ac_ext
4737 done
4738
4739 fi
4740 echo "$as_me:4740: result: $cf_cv_ncurses_header" >&5
4741 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4742
4743 if test "$cf_cv_ncurses_header" = none ; then
4744         { { echo "$as_me:4744: error: No curses header-files found" >&5
4745 echo "$as_me: error: No curses header-files found" >&2;}
4746    { (exit 1); exit 1; }; }
4747 fi
4748
4749 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4750
4751 for ac_header in $cf_cv_ncurses_header
4752 do
4753 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4754 echo "$as_me:4754: checking for $ac_header" >&5
4755 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4756 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4757   echo $ECHO_N "(cached) $ECHO_C" >&6
4758 else
4759   cat >conftest.$ac_ext <<_ACEOF
4760 #line 4760 "configure"
4761 #include "confdefs.h"
4762 #include <$ac_header>
4763 _ACEOF
4764 if { (eval echo "$as_me:4764: \"$ac_cpp conftest.$ac_ext\"") >&5
4765   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4766   ac_status=$?
4767   egrep -v '^ *\+' conftest.er1 >conftest.err
4768   rm -f conftest.er1
4769   cat conftest.err >&5
4770   echo "$as_me:4770: \$? = $ac_status" >&5
4771   (exit $ac_status); } >/dev/null; then
4772   if test -s conftest.err; then
4773     ac_cpp_err=$ac_c_preproc_warn_flag
4774   else
4775     ac_cpp_err=
4776   fi
4777 else
4778   ac_cpp_err=yes
4779 fi
4780 if test -z "$ac_cpp_err"; then
4781   eval "$as_ac_Header=yes"
4782 else
4783   echo "$as_me: failed program was:" >&5
4784   cat conftest.$ac_ext >&5
4785   eval "$as_ac_Header=no"
4786 fi
4787 rm -f conftest.err conftest.$ac_ext
4788 fi
4789 echo "$as_me:4789: result: `eval echo '${'$as_ac_Header'}'`" >&5
4790 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4791 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4792   cat >>confdefs.h <<EOF
4793 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4794 EOF
4795
4796 fi
4797 done
4798
4799 cat >>confdefs.h <<\EOF
4800 #define NCURSES 1
4801 EOF
4802
4803 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4804
4805 cat >>confdefs.h <<EOF
4806 #define $cf_nculib_ROOT 1
4807 EOF
4808
4809 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4810
4811 else
4812
4813 cf_ncuhdr_root=ncursesw
4814
4815 test -n "$cf_cv_curses_dir" && \
4816 test "$cf_cv_curses_dir" != "no" && { \
4817
4818 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4819   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4820   do
4821         while test $cf_add_incdir != /usr/include
4822         do
4823           if test -d $cf_add_incdir
4824           then
4825                 cf_have_incdir=no
4826                 if test -n "$CFLAGS$CPPFLAGS" ; then
4827                   # a loop is needed to ensure we can add subdirs of existing dirs
4828                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4829                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4830                           cf_have_incdir=yes; break
4831                         fi
4832                   done
4833                 fi
4834
4835                 if test "$cf_have_incdir" = no ; then
4836                   if test "$cf_add_incdir" = /usr/local/include ; then
4837                         if test "$GCC" = yes
4838                         then
4839                           cf_save_CPPFLAGS=$CPPFLAGS
4840                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4841                           cat >conftest.$ac_ext <<_ACEOF
4842 #line 4842 "configure"
4843 #include "confdefs.h"
4844 #include <stdio.h>
4845 int
4846 main ()
4847 {
4848 printf("Hello")
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 rm -f conftest.$ac_objext
4854 if { (eval echo "$as_me:4854: \"$ac_compile\"") >&5
4855   (eval $ac_compile) 2>&5
4856   ac_status=$?
4857   echo "$as_me:4857: \$? = $ac_status" >&5
4858   (exit $ac_status); } &&
4859          { ac_try='test -s conftest.$ac_objext'
4860   { (eval echo "$as_me:4860: \"$ac_try\"") >&5
4861   (eval $ac_try) 2>&5
4862   ac_status=$?
4863   echo "$as_me:4863: \$? = $ac_status" >&5
4864   (exit $ac_status); }; }; then
4865   :
4866 else
4867   echo "$as_me: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4869 cf_have_incdir=yes
4870 fi
4871 rm -f conftest.$ac_objext conftest.$ac_ext
4872                           CPPFLAGS=$cf_save_CPPFLAGS
4873                         fi
4874                   fi
4875                 fi
4876
4877                 if test "$cf_have_incdir" = no ; then
4878                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4879
4880 echo "${as_me:-configure}:4880: testing adding $cf_add_incdir to include-path ..." 1>&5
4881
4882                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4883
4884                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4885                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4886                   cf_add_incdir="$cf_top_incdir"
4887                 else
4888                   break
4889                 fi
4890           fi
4891         done
4892   done
4893 fi
4894
4895 }
4896
4897 echo "$as_me:4897: checking for $cf_ncuhdr_root header in include-path" >&5
4898 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4899 if test "${cf_cv_ncurses_h+set}" = set; then
4900   echo $ECHO_N "(cached) $ECHO_C" >&6
4901 else
4902
4903         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4904         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4905         for cf_header in $cf_header_list
4906         do
4907
4908         cat >conftest.$ac_ext <<_ACEOF
4909 #line 4909 "configure"
4910 #include "confdefs.h"
4911
4912 #define _XOPEN_SOURCE_EXTENDED
4913 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4914 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4915
4916 #include <$cf_header>
4917 int
4918 main ()
4919 {
4920
4921 #ifdef NCURSES_VERSION
4922
4923 #ifndef WACS_BSSB
4924         make an error
4925 #endif
4926
4927 printf("%s\n", NCURSES_VERSION);
4928 #else
4929 #ifdef __NCURSES_H
4930 printf("old\n");
4931 #else
4932         make an error
4933 #endif
4934 #endif
4935
4936   ;
4937   return 0;
4938 }
4939 _ACEOF
4940 rm -f conftest.$ac_objext
4941 if { (eval echo "$as_me:4941: \"$ac_compile\"") >&5
4942   (eval $ac_compile) 2>&5
4943   ac_status=$?
4944   echo "$as_me:4944: \$? = $ac_status" >&5
4945   (exit $ac_status); } &&
4946          { ac_try='test -s conftest.$ac_objext'
4947   { (eval echo "$as_me:4947: \"$ac_try\"") >&5
4948   (eval $ac_try) 2>&5
4949   ac_status=$?
4950   echo "$as_me:4950: \$? = $ac_status" >&5
4951   (exit $ac_status); }; }; then
4952   cf_cv_ncurses_h=$cf_header
4953
4954 else
4955   echo "$as_me: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
4957 cf_cv_ncurses_h=no
4958 fi
4959 rm -f conftest.$ac_objext conftest.$ac_ext
4960
4961                 test "$cf_cv_ncurses_h" != no && break
4962         done
4963
4964 fi
4965 echo "$as_me:4965: result: $cf_cv_ncurses_h" >&5
4966 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4967
4968 if test "$cf_cv_ncurses_h" != no ; then
4969         cf_cv_ncurses_header=$cf_cv_ncurses_h
4970 else
4971
4972 echo "$as_me:4972: checking for $cf_ncuhdr_root include-path" >&5
4973 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4974 if test "${cf_cv_ncurses_h2+set}" = set; then
4975   echo $ECHO_N "(cached) $ECHO_C" >&6
4976 else
4977
4978         test -n "$verbose" && echo
4979
4980 cf_search=
4981
4982 # collect the current set of include-directories from compiler flags
4983 cf_header_path_list=""
4984 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4985         for cf_header_path in $CPPFLAGS $CFLAGS
4986         do
4987                 case $cf_header_path in #(vi
4988                 -I*)
4989                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4990
4991 test "$cf_header_path" != "NONE" && \
4992 test -d "$cf_header_path" && \
4993  {
4994         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4995         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4996         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4997         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4998         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4999         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"
5000 }
5001
5002                         cf_header_path_list="$cf_header_path_list $cf_search"
5003                         ;;
5004                 esac
5005         done
5006 fi
5007
5008 # add the variations for the package we are looking for
5009
5010 cf_search=
5011
5012 test "/usr" != "$prefix" && \
5013 test -d "/usr" && \
5014 (test $prefix = NONE || test "/usr" != "$prefix") && {
5015         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
5016         test -d /usr/include &&          cf_search="$cf_search /usr/include"
5017         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5018         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5019         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5020         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5021 }
5022
5023 test "$prefix" != "NONE" && \
5024 test -d "$prefix" && \
5025  {
5026         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
5027         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
5028         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5029         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5030         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5031         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5032 }
5033
5034 test "/usr/local" != "$prefix" && \
5035 test -d "/usr/local" && \
5036 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5037         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
5038         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5039         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5040         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5041         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5042         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5043 }
5044
5045 test "/opt" != "$prefix" && \
5046 test -d "/opt" && \
5047 (test $prefix = NONE || test "/opt" != "$prefix") && {
5048         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
5049         test -d /opt/include &&          cf_search="$cf_search /opt/include"
5050         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5051         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5052         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5053         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5054 }
5055
5056 test "$HOME" != "$prefix" && \
5057 test -d "$HOME" && \
5058 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5059         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
5060         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5061         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5062         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5063         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5064         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5065 }
5066
5067 test "$includedir" != NONE && \
5068 test "$includedir" != "/usr/include" && \
5069 test -d "$includedir" && {
5070         test -d $includedir &&    cf_search="$cf_search $includedir"
5071         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5072 }
5073
5074 test "$oldincludedir" != NONE && \
5075 test "$oldincludedir" != "/usr/include" && \
5076 test -d "$oldincludedir" && {
5077         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5078         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5079 }
5080
5081 cf_search="$cf_search $cf_header_path_list"
5082
5083         test -n "$verbose" && echo search path $cf_search
5084         cf_save2_CPPFLAGS="$CPPFLAGS"
5085         for cf_incdir in $cf_search
5086         do
5087
5088 if test -n "$cf_incdir" ; then
5089   for cf_add_incdir in $cf_incdir
5090   do
5091         while test $cf_add_incdir != /usr/include
5092         do
5093           if test -d $cf_add_incdir
5094           then
5095                 cf_have_incdir=no
5096                 if test -n "$CFLAGS$CPPFLAGS" ; then
5097                   # a loop is needed to ensure we can add subdirs of existing dirs
5098                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5099                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5100                           cf_have_incdir=yes; break
5101                         fi
5102                   done
5103                 fi
5104
5105                 if test "$cf_have_incdir" = no ; then
5106                   if test "$cf_add_incdir" = /usr/local/include ; then
5107                         if test "$GCC" = yes
5108                         then
5109                           cf_save_CPPFLAGS=$CPPFLAGS
5110                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5111                           cat >conftest.$ac_ext <<_ACEOF
5112 #line 5112 "configure"
5113 #include "confdefs.h"
5114 #include <stdio.h>
5115 int
5116 main ()
5117 {
5118 printf("Hello")
5119   ;
5120   return 0;
5121 }
5122 _ACEOF
5123 rm -f conftest.$ac_objext
5124 if { (eval echo "$as_me:5124: \"$ac_compile\"") >&5
5125   (eval $ac_compile) 2>&5
5126   ac_status=$?
5127   echo "$as_me:5127: \$? = $ac_status" >&5
5128   (exit $ac_status); } &&
5129          { ac_try='test -s conftest.$ac_objext'
5130   { (eval echo "$as_me:5130: \"$ac_try\"") >&5
5131   (eval $ac_try) 2>&5
5132   ac_status=$?
5133   echo "$as_me:5133: \$? = $ac_status" >&5
5134   (exit $ac_status); }; }; then
5135   :
5136 else
5137   echo "$as_me: failed program was:" >&5
5138 cat conftest.$ac_ext >&5
5139 cf_have_incdir=yes
5140 fi
5141 rm -f conftest.$ac_objext conftest.$ac_ext
5142                           CPPFLAGS=$cf_save_CPPFLAGS
5143                         fi
5144                   fi
5145                 fi
5146
5147                 if test "$cf_have_incdir" = no ; then
5148                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5149
5150 echo "${as_me:-configure}:5150: testing adding $cf_add_incdir to include-path ..." 1>&5
5151
5152                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5153
5154                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5155                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5156                   cf_add_incdir="$cf_top_incdir"
5157                 else
5158                   break
5159                 fi
5160           fi
5161         done
5162   done
5163 fi
5164
5165                 for cf_header in \
5166                         ncurses.h \
5167                         curses.h
5168                 do
5169
5170         cat >conftest.$ac_ext <<_ACEOF
5171 #line 5171 "configure"
5172 #include "confdefs.h"
5173
5174 #include <$cf_header>
5175 int
5176 main ()
5177 {
5178
5179 #ifdef NCURSES_VERSION
5180
5181 printf("%s\n", NCURSES_VERSION);
5182 #else
5183 #ifdef __NCURSES_H
5184 printf("old\n");
5185 #else
5186         make an error
5187 #endif
5188 #endif
5189
5190   ;
5191   return 0;
5192 }
5193 _ACEOF
5194 rm -f conftest.$ac_objext
5195 if { (eval echo "$as_me:5195: \"$ac_compile\"") >&5
5196   (eval $ac_compile) 2>&5
5197   ac_status=$?
5198   echo "$as_me:5198: \$? = $ac_status" >&5
5199   (exit $ac_status); } &&
5200          { ac_try='test -s conftest.$ac_objext'
5201   { (eval echo "$as_me:5201: \"$ac_try\"") >&5
5202   (eval $ac_try) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); }; }; then
5206   cf_cv_ncurses_h2=$cf_header
5207
5208 else
5209   echo "$as_me: failed program was:" >&5
5210 cat conftest.$ac_ext >&5
5211 cf_cv_ncurses_h2=no
5212 fi
5213 rm -f conftest.$ac_objext conftest.$ac_ext
5214
5215                         if test "$cf_cv_ncurses_h2" != no ; then
5216                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5217                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5218                                 break
5219                         fi
5220                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5221                 done
5222                 CPPFLAGS="$cf_save2_CPPFLAGS"
5223                 test "$cf_cv_ncurses_h2" != no && break
5224         done
5225         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5225: error: not found" >&5
5226 echo "$as_me: error: not found" >&2;}
5227    { (exit 1); exit 1; }; }
5228
5229 fi
5230 echo "$as_me:5230: result: $cf_cv_ncurses_h2" >&5
5231 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5232
5233         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5234         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5235         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5236                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5237         fi
5238
5239 if test -n "$cf_1st_incdir" ; then
5240   for cf_add_incdir in $cf_1st_incdir
5241   do
5242         while test $cf_add_incdir != /usr/include
5243         do
5244           if test -d $cf_add_incdir
5245           then
5246                 cf_have_incdir=no
5247                 if test -n "$CFLAGS$CPPFLAGS" ; then
5248                   # a loop is needed to ensure we can add subdirs of existing dirs
5249                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5250                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5251                           cf_have_incdir=yes; break
5252                         fi
5253                   done
5254                 fi
5255
5256                 if test "$cf_have_incdir" = no ; then
5257                   if test "$cf_add_incdir" = /usr/local/include ; then
5258                         if test "$GCC" = yes
5259                         then
5260                           cf_save_CPPFLAGS=$CPPFLAGS
5261                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5262                           cat >conftest.$ac_ext <<_ACEOF
5263 #line 5263 "configure"
5264 #include "confdefs.h"
5265 #include <stdio.h>
5266 int
5267 main ()
5268 {
5269 printf("Hello")
5270   ;
5271   return 0;
5272 }
5273 _ACEOF
5274 rm -f conftest.$ac_objext
5275 if { (eval echo "$as_me:5275: \"$ac_compile\"") >&5
5276   (eval $ac_compile) 2>&5
5277   ac_status=$?
5278   echo "$as_me:5278: \$? = $ac_status" >&5
5279   (exit $ac_status); } &&
5280          { ac_try='test -s conftest.$ac_objext'
5281   { (eval echo "$as_me:5281: \"$ac_try\"") >&5
5282   (eval $ac_try) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); }; }; then
5286   :
5287 else
5288   echo "$as_me: failed program was:" >&5
5289 cat conftest.$ac_ext >&5
5290 cf_have_incdir=yes
5291 fi
5292 rm -f conftest.$ac_objext conftest.$ac_ext
5293                           CPPFLAGS=$cf_save_CPPFLAGS
5294                         fi
5295                   fi
5296                 fi
5297
5298                 if test "$cf_have_incdir" = no ; then
5299                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5300
5301 echo "${as_me:-configure}:5301: testing adding $cf_add_incdir to include-path ..." 1>&5
5302
5303                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5304
5305                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5306                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5307                   cf_add_incdir="$cf_top_incdir"
5308                 else
5309                   break
5310                 fi
5311           fi
5312         done
5313   done
5314 fi
5315
5316 fi
5317
5318 # Set definitions to allow ifdef'ing for ncurses.h
5319
5320 case $cf_cv_ncurses_header in # (vi
5321 *ncurses.h)
5322         cat >>confdefs.h <<\EOF
5323 #define HAVE_NCURSES_H 1
5324 EOF
5325
5326         ;;
5327 esac
5328
5329 case $cf_cv_ncurses_header in # (vi
5330 ncurses/curses.h|ncurses/ncurses.h)
5331         cat >>confdefs.h <<\EOF
5332 #define HAVE_NCURSES_NCURSES_H 1
5333 EOF
5334
5335         ;;
5336 ncursesw/curses.h|ncursesw/ncurses.h)
5337         cat >>confdefs.h <<\EOF
5338 #define HAVE_NCURSESW_NCURSES_H 1
5339 EOF
5340
5341         ;;
5342 esac
5343
5344 echo "$as_me:5344: checking for terminfo header" >&5
5345 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5346 if test "${cf_cv_term_header+set}" = set; then
5347   echo $ECHO_N "(cached) $ECHO_C" >&6
5348 else
5349
5350 case ${cf_cv_ncurses_header} in #(vi
5351 */ncurses.h|*/ncursesw.h) #(vi
5352         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5353         ;;
5354 *)
5355         cf_term_header=term.h
5356         ;;
5357 esac
5358
5359 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5360 do
5361 cat >conftest.$ac_ext <<_ACEOF
5362 #line 5362 "configure"
5363 #include "confdefs.h"
5364 #include <stdio.h>
5365 #include <${cf_cv_ncurses_header:-curses.h}>
5366 #include <$cf_test>
5367
5368 int
5369 main ()
5370 {
5371 int x = auto_left_margin
5372   ;
5373   return 0;
5374 }
5375 _ACEOF
5376 rm -f conftest.$ac_objext
5377 if { (eval echo "$as_me:5377: \"$ac_compile\"") >&5
5378   (eval $ac_compile) 2>&5
5379   ac_status=$?
5380   echo "$as_me:5380: \$? = $ac_status" >&5
5381   (exit $ac_status); } &&
5382          { ac_try='test -s conftest.$ac_objext'
5383   { (eval echo "$as_me:5383: \"$ac_try\"") >&5
5384   (eval $ac_try) 2>&5
5385   ac_status=$?
5386   echo "$as_me:5386: \$? = $ac_status" >&5
5387   (exit $ac_status); }; }; then
5388
5389         cf_cv_term_header="$cf_test"
5390 else
5391   echo "$as_me: failed program was:" >&5
5392 cat conftest.$ac_ext >&5
5393
5394         cf_cv_term_header=unknown
5395
5396 fi
5397 rm -f conftest.$ac_objext conftest.$ac_ext
5398         test "$cf_cv_term_header" != unknown && break
5399 done
5400
5401 fi
5402 echo "$as_me:5402: result: $cf_cv_term_header" >&5
5403 echo "${ECHO_T}$cf_cv_term_header" >&6
5404
5405 # Set definitions to allow ifdef'ing to accommodate subdirectories
5406
5407 case $cf_cv_term_header in # (vi
5408 *term.h)
5409         cat >>confdefs.h <<\EOF
5410 #define HAVE_TERM_H 1
5411 EOF
5412
5413         ;;
5414 esac
5415
5416 case $cf_cv_term_header in # (vi
5417 ncurses/term.h) #(vi
5418         cat >>confdefs.h <<\EOF
5419 #define HAVE_NCURSES_TERM_H 1
5420 EOF
5421
5422         ;;
5423 ncursesw/term.h)
5424         cat >>confdefs.h <<\EOF
5425 #define HAVE_NCURSESW_TERM_H 1
5426 EOF
5427
5428         ;;
5429 esac
5430
5431 # some applications need this, but should check for NCURSES_VERSION
5432 cat >>confdefs.h <<\EOF
5433 #define NCURSES 1
5434 EOF
5435
5436 echo "$as_me:5436: checking for ncurses version" >&5
5437 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5438 if test "${cf_cv_ncurses_version+set}" = set; then
5439   echo $ECHO_N "(cached) $ECHO_C" >&6
5440 else
5441
5442         cf_cv_ncurses_version=no
5443         cf_tempfile=out$$
5444         rm -f $cf_tempfile
5445         if test "$cross_compiling" = yes; then
5446
5447         # This will not work if the preprocessor splits the line after the
5448         # Autoconf token.  The 'unproto' program does that.
5449         cat > conftest.$ac_ext <<EOF
5450 #include <${cf_cv_ncurses_header:-curses.h}>
5451 #undef Autoconf
5452 #ifdef NCURSES_VERSION
5453 Autoconf NCURSES_VERSION
5454 #else
5455 #ifdef __NCURSES_H
5456 Autoconf "old"
5457 #endif
5458 ;
5459 #endif
5460 EOF
5461         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5462         { (eval echo "$as_me:5462: \"$cf_try\"") >&5
5463   (eval $cf_try) 2>&5
5464   ac_status=$?
5465   echo "$as_me:5465: \$? = $ac_status" >&5
5466   (exit $ac_status); }
5467         if test -f conftest.out ; then
5468                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5469                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5470                 rm -f conftest.out
5471         fi
5472
5473 else
5474   cat >conftest.$ac_ext <<_ACEOF
5475 #line 5475 "configure"
5476 #include "confdefs.h"
5477
5478 #include <${cf_cv_ncurses_header:-curses.h}>
5479 #include <stdio.h>
5480 int main()
5481 {
5482         FILE *fp = fopen("$cf_tempfile", "w");
5483 #ifdef NCURSES_VERSION
5484 # ifdef NCURSES_VERSION_PATCH
5485         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5486 # else
5487         fprintf(fp, "%s\n", NCURSES_VERSION);
5488 # endif
5489 #else
5490 # ifdef __NCURSES_H
5491         fprintf(fp, "old\n");
5492 # else
5493         make an error
5494 # endif
5495 #endif
5496         ${cf_cv_main_return:-return}(0);
5497 }
5498 _ACEOF
5499 rm -f conftest$ac_exeext
5500 if { (eval echo "$as_me:5500: \"$ac_link\"") >&5
5501   (eval $ac_link) 2>&5
5502   ac_status=$?
5503   echo "$as_me:5503: \$? = $ac_status" >&5
5504   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5505   { (eval echo "$as_me:5505: \"$ac_try\"") >&5
5506   (eval $ac_try) 2>&5
5507   ac_status=$?
5508   echo "$as_me:5508: \$? = $ac_status" >&5
5509   (exit $ac_status); }; }; then
5510
5511         cf_cv_ncurses_version=`cat $cf_tempfile`
5512 else
5513   echo "$as_me: program exited with status $ac_status" >&5
5514 echo "$as_me: failed program was:" >&5
5515 cat conftest.$ac_ext >&5
5516 fi
5517 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5518 fi
5519         rm -f $cf_tempfile
5520
5521 fi
5522 echo "$as_me:5522: result: $cf_cv_ncurses_version" >&5
5523 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5524 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5525 #define NCURSES 1
5526 EOF
5527
5528 cf_nculib_root=ncursesw
5529         # This works, except for the special case where we find gpm, but
5530         # ncurses is in a nonstandard location via $LIBS, and we really want
5531         # to link gpm.
5532 cf_ncurses_LIBS=""
5533 cf_ncurses_SAVE="$LIBS"
5534 echo "$as_me:5534: checking for Gpm_Open in -lgpm" >&5
5535 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5536 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5537   echo $ECHO_N "(cached) $ECHO_C" >&6
5538 else
5539   ac_check_lib_save_LIBS=$LIBS
5540 LIBS="-lgpm  $LIBS"
5541 cat >conftest.$ac_ext <<_ACEOF
5542 #line 5542 "configure"
5543 #include "confdefs.h"
5544
5545 /* Override any gcc2 internal prototype to avoid an error.  */
5546 #ifdef __cplusplus
5547 extern "C"
5548 #endif
5549 /* We use char because int might match the return type of a gcc2
5550    builtin and then its argument prototype would still apply.  */
5551 char Gpm_Open ();
5552 int
5553 main ()
5554 {
5555 Gpm_Open ();
5556   ;
5557   return 0;
5558 }
5559 _ACEOF
5560 rm -f conftest.$ac_objext conftest$ac_exeext
5561 if { (eval echo "$as_me:5561: \"$ac_link\"") >&5
5562   (eval $ac_link) 2>&5
5563   ac_status=$?
5564   echo "$as_me:5564: \$? = $ac_status" >&5
5565   (exit $ac_status); } &&
5566          { ac_try='test -s conftest$ac_exeext'
5567   { (eval echo "$as_me:5567: \"$ac_try\"") >&5
5568   (eval $ac_try) 2>&5
5569   ac_status=$?
5570   echo "$as_me:5570: \$? = $ac_status" >&5
5571   (exit $ac_status); }; }; then
5572   ac_cv_lib_gpm_Gpm_Open=yes
5573 else
5574   echo "$as_me: failed program was:" >&5
5575 cat conftest.$ac_ext >&5
5576 ac_cv_lib_gpm_Gpm_Open=no
5577 fi
5578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5579 LIBS=$ac_check_lib_save_LIBS
5580 fi
5581 echo "$as_me:5581: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5582 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5583 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5584   echo "$as_me:5584: checking for initscr in -lgpm" >&5
5585 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5586 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5587   echo $ECHO_N "(cached) $ECHO_C" >&6
5588 else
5589   ac_check_lib_save_LIBS=$LIBS
5590 LIBS="-lgpm  $LIBS"
5591 cat >conftest.$ac_ext <<_ACEOF
5592 #line 5592 "configure"
5593 #include "confdefs.h"
5594
5595 /* Override any gcc2 internal prototype to avoid an error.  */
5596 #ifdef __cplusplus
5597 extern "C"
5598 #endif
5599 /* We use char because int might match the return type of a gcc2
5600    builtin and then its argument prototype would still apply.  */
5601 char initscr ();
5602 int
5603 main ()
5604 {
5605 initscr ();
5606   ;
5607   return 0;
5608 }
5609 _ACEOF
5610 rm -f conftest.$ac_objext conftest$ac_exeext
5611 if { (eval echo "$as_me:5611: \"$ac_link\"") >&5
5612   (eval $ac_link) 2>&5
5613   ac_status=$?
5614   echo "$as_me:5614: \$? = $ac_status" >&5
5615   (exit $ac_status); } &&
5616          { ac_try='test -s conftest$ac_exeext'
5617   { (eval echo "$as_me:5617: \"$ac_try\"") >&5
5618   (eval $ac_try) 2>&5
5619   ac_status=$?
5620   echo "$as_me:5620: \$? = $ac_status" >&5
5621   (exit $ac_status); }; }; then
5622   ac_cv_lib_gpm_initscr=yes
5623 else
5624   echo "$as_me: failed program was:" >&5
5625 cat conftest.$ac_ext >&5
5626 ac_cv_lib_gpm_initscr=no
5627 fi
5628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5629 LIBS=$ac_check_lib_save_LIBS
5630 fi
5631 echo "$as_me:5631: result: $ac_cv_lib_gpm_initscr" >&5
5632 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5633 if test $ac_cv_lib_gpm_initscr = yes; then
5634   LIBS="$cf_ncurses_SAVE"
5635 else
5636   cf_ncurses_LIBS="-lgpm"
5637 fi
5638
5639 fi
5640
5641 case $host_os in #(vi
5642 freebsd*)
5643         # This is only necessary if you are linking against an obsolete
5644         # version of ncurses (but it should do no harm, since it's static).
5645         if test "$cf_nculib_root" = ncurses ; then
5646                 echo "$as_me:5646: checking for tgoto in -lmytinfo" >&5
5647 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5648 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5649   echo $ECHO_N "(cached) $ECHO_C" >&6
5650 else
5651   ac_check_lib_save_LIBS=$LIBS
5652 LIBS="-lmytinfo  $LIBS"
5653 cat >conftest.$ac_ext <<_ACEOF
5654 #line 5654 "configure"
5655 #include "confdefs.h"
5656
5657 /* Override any gcc2 internal prototype to avoid an error.  */
5658 #ifdef __cplusplus
5659 extern "C"
5660 #endif
5661 /* We use char because int might match the return type of a gcc2
5662    builtin and then its argument prototype would still apply.  */
5663 char tgoto ();
5664 int
5665 main ()
5666 {
5667 tgoto ();
5668   ;
5669   return 0;
5670 }
5671 _ACEOF
5672 rm -f conftest.$ac_objext conftest$ac_exeext
5673 if { (eval echo "$as_me:5673: \"$ac_link\"") >&5
5674   (eval $ac_link) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -s conftest$ac_exeext'
5679   { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   ac_cv_lib_mytinfo_tgoto=yes
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 ac_cv_lib_mytinfo_tgoto=no
5689 fi
5690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5691 LIBS=$ac_check_lib_save_LIBS
5692 fi
5693 echo "$as_me:5693: result: $ac_cv_lib_mytinfo_tgoto" >&5
5694 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5695 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5696   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5697 fi
5698
5699         fi
5700         ;;
5701 esac
5702
5703 LIBS="$cf_ncurses_LIBS $LIBS"
5704
5705 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5706 then
5707         LIBS="-l$cf_nculib_root $LIBS"
5708 else
5709
5710         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5711         cf_libdir=""
5712         echo "$as_me:5712: checking for initscr" >&5
5713 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5714 if test "${ac_cv_func_initscr+set}" = set; then
5715   echo $ECHO_N "(cached) $ECHO_C" >&6
5716 else
5717   cat >conftest.$ac_ext <<_ACEOF
5718 #line 5718 "configure"
5719 #include "confdefs.h"
5720 /* System header to define __stub macros and hopefully few prototypes,
5721     which can conflict with char initscr (); below.  */
5722 #include <assert.h>
5723 /* Override any gcc2 internal prototype to avoid an error.  */
5724 #ifdef __cplusplus
5725 extern "C"
5726 #endif
5727 /* We use char because int might match the return type of a gcc2
5728    builtin and then its argument prototype would still apply.  */
5729 char initscr ();
5730 char (*f) ();
5731
5732 int
5733 main ()
5734 {
5735 /* The GNU C library defines this for functions which it implements
5736     to always fail with ENOSYS.  Some functions are actually named
5737     something starting with __ and the normal name is an alias.  */
5738 #if defined (__stub_initscr) || defined (__stub___initscr)
5739 choke me
5740 #else
5741 f = initscr;
5742 #endif
5743
5744   ;
5745   return 0;
5746 }
5747 _ACEOF
5748 rm -f conftest.$ac_objext conftest$ac_exeext
5749 if { (eval echo "$as_me:5749: \"$ac_link\"") >&5
5750   (eval $ac_link) 2>&5
5751   ac_status=$?
5752   echo "$as_me:5752: \$? = $ac_status" >&5
5753   (exit $ac_status); } &&
5754          { ac_try='test -s conftest$ac_exeext'
5755   { (eval echo "$as_me:5755: \"$ac_try\"") >&5
5756   (eval $ac_try) 2>&5
5757   ac_status=$?
5758   echo "$as_me:5758: \$? = $ac_status" >&5
5759   (exit $ac_status); }; }; then
5760   ac_cv_func_initscr=yes
5761 else
5762   echo "$as_me: failed program was:" >&5
5763 cat conftest.$ac_ext >&5
5764 ac_cv_func_initscr=no
5765 fi
5766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5767 fi
5768 echo "$as_me:5768: result: $ac_cv_func_initscr" >&5
5769 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5770 if test $ac_cv_func_initscr = yes; then
5771   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5772 else
5773
5774                 cf_save_LIBS="$LIBS"
5775                 echo "$as_me:5775: checking for initscr in -l$cf_nculib_root" >&5
5776 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5777                 LIBS="-l$cf_nculib_root $LIBS"
5778                 cat >conftest.$ac_ext <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5781 #include <${cf_cv_ncurses_header:-curses.h}>
5782 int
5783 main ()
5784 {
5785 initscr()
5786   ;
5787   return 0;
5788 }
5789 _ACEOF
5790 rm -f conftest.$ac_objext conftest$ac_exeext
5791 if { (eval echo "$as_me:5791: \"$ac_link\"") >&5
5792   (eval $ac_link) 2>&5
5793   ac_status=$?
5794   echo "$as_me:5794: \$? = $ac_status" >&5
5795   (exit $ac_status); } &&
5796          { ac_try='test -s conftest$ac_exeext'
5797   { (eval echo "$as_me:5797: \"$ac_try\"") >&5
5798   (eval $ac_try) 2>&5
5799   ac_status=$?
5800   echo "$as_me:5800: \$? = $ac_status" >&5
5801   (exit $ac_status); }; }; then
5802   echo "$as_me:5802: result: yes" >&5
5803 echo "${ECHO_T}yes" >&6
5804                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5805
5806 else
5807   echo "$as_me: failed program was:" >&5
5808 cat conftest.$ac_ext >&5
5809 echo "$as_me:5809: result: no" >&5
5810 echo "${ECHO_T}no" >&6
5811
5812 cf_search=
5813 cf_library_path_list=""
5814 if test -n "${LDFLAGS}${LIBS}" ; then
5815         for cf_library_path in $LDFLAGS $LIBS
5816         do
5817                 case $cf_library_path in #(vi
5818                 -L*)
5819                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5820
5821 test "$cf_library_path" != "NONE" && \
5822 test -d "$cf_library_path" && \
5823  {
5824         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5825         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5826         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5827         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5828         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5829         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"
5830 }
5831
5832                         cf_library_path_list="$cf_library_path_list $cf_search"
5833                         ;;
5834                 esac
5835         done
5836 fi
5837
5838 cf_search=
5839
5840 test "/usr" != "$prefix" && \
5841 test -d "/usr" && \
5842 (test $prefix = NONE || test "/usr" != "$prefix") && {
5843         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5844         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5845         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5846         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5847         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5848         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5849 }
5850
5851 test "$prefix" != "NONE" && \
5852 test -d "$prefix" && \
5853  {
5854         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5855         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5856         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5857         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5858         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5859         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5860 }
5861
5862 test "/usr/local" != "$prefix" && \
5863 test -d "/usr/local" && \
5864 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5865         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5866         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5867         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5868         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5869         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5870         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5871 }
5872
5873 test "/opt" != "$prefix" && \
5874 test -d "/opt" && \
5875 (test $prefix = NONE || test "/opt" != "$prefix") && {
5876         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5877         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5878         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5879         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5880         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5881         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5882 }
5883
5884 test "$HOME" != "$prefix" && \
5885 test -d "$HOME" && \
5886 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5887         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5888         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5889         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5890         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5891         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5892         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5893 }
5894
5895 cf_search="$cf_library_path_list $cf_search"
5896
5897                         for cf_libdir in $cf_search
5898                         do
5899                                 echo "$as_me:5899: checking for -l$cf_nculib_root in $cf_libdir" >&5
5900 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5901                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5902                                 cat >conftest.$ac_ext <<_ACEOF
5903 #line 5903 "configure"
5904 #include "confdefs.h"
5905 #include <${cf_cv_ncurses_header:-curses.h}>
5906 int
5907 main ()
5908 {
5909 initscr()
5910   ;
5911   return 0;
5912 }
5913 _ACEOF
5914 rm -f conftest.$ac_objext conftest$ac_exeext
5915 if { (eval echo "$as_me:5915: \"$ac_link\"") >&5
5916   (eval $ac_link) 2>&5
5917   ac_status=$?
5918   echo "$as_me:5918: \$? = $ac_status" >&5
5919   (exit $ac_status); } &&
5920          { ac_try='test -s conftest$ac_exeext'
5921   { (eval echo "$as_me:5921: \"$ac_try\"") >&5
5922   (eval $ac_try) 2>&5
5923   ac_status=$?
5924   echo "$as_me:5924: \$? = $ac_status" >&5
5925   (exit $ac_status); }; }; then
5926   echo "$as_me:5926: result: yes" >&5
5927 echo "${ECHO_T}yes" >&6
5928                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5929                                          break
5930 else
5931   echo "$as_me: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5933 echo "$as_me:5933: result: no" >&5
5934 echo "${ECHO_T}no" >&6
5935                                          LIBS="$cf_save_LIBS"
5936 fi
5937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5938                         done
5939
5940 fi
5941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5942
5943 fi
5944
5945 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5946
5947 if test $cf_found_library = no ; then
5948         { { echo "$as_me:5948: error: Cannot link $cf_nculib_root library" >&5
5949 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5950    { (exit 1); exit 1; }; }
5951 fi
5952
5953 fi
5954
5955 if test -n "$cf_ncurses_LIBS" ; then
5956         echo "$as_me:5956: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5957 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5958         cf_ncurses_SAVE="$LIBS"
5959         for p in $cf_ncurses_LIBS ; do
5960                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5961                 if test "$q" != "$LIBS" ; then
5962                         LIBS="$q"
5963                 fi
5964         done
5965         cat >conftest.$ac_ext <<_ACEOF
5966 #line 5966 "configure"
5967 #include "confdefs.h"
5968 #include <${cf_cv_ncurses_header:-curses.h}>
5969 int
5970 main ()
5971 {
5972 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5973   ;
5974   return 0;
5975 }
5976 _ACEOF
5977 rm -f conftest.$ac_objext conftest$ac_exeext
5978 if { (eval echo "$as_me:5978: \"$ac_link\"") >&5
5979   (eval $ac_link) 2>&5
5980   ac_status=$?
5981   echo "$as_me:5981: \$? = $ac_status" >&5
5982   (exit $ac_status); } &&
5983          { ac_try='test -s conftest$ac_exeext'
5984   { (eval echo "$as_me:5984: \"$ac_try\"") >&5
5985   (eval $ac_try) 2>&5
5986   ac_status=$?
5987   echo "$as_me:5987: \$? = $ac_status" >&5
5988   (exit $ac_status); }; }; then
5989   echo "$as_me:5989: result: yes" >&5
5990 echo "${ECHO_T}yes" >&6
5991 else
5992   echo "$as_me: failed program was:" >&5
5993 cat conftest.$ac_ext >&5
5994 echo "$as_me:5994: result: no" >&5
5995 echo "${ECHO_T}no" >&6
5996                  LIBS="$cf_ncurses_SAVE"
5997 fi
5998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5999 fi
6000
6001 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6002
6003 cat >>confdefs.h <<EOF
6004 #define $cf_nculib_ROOT 1
6005 EOF
6006
6007 fi
6008
6009 else
6010
6011 cf_ncuconfig_root=ncurses
6012
6013 echo "Looking for ${cf_ncuconfig_root}-config"
6014
6015 if test -n "$ac_tool_prefix"; then
6016   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6017   do
6018     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6019 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6020 echo "$as_me:6020: checking for $ac_word" >&5
6021 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6022 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6023   echo $ECHO_N "(cached) $ECHO_C" >&6
6024 else
6025   if test -n "$NCURSES_CONFIG"; then
6026   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6027 else
6028   ac_save_IFS=$IFS; IFS=$ac_path_separator
6029 ac_dummy="$PATH"
6030 for ac_dir in $ac_dummy; do
6031   IFS=$ac_save_IFS
6032   test -z "$ac_dir" && ac_dir=.
6033   $as_executable_p "$ac_dir/$ac_word" || continue
6034 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6035 echo "$as_me:6035: found $ac_dir/$ac_word" >&5
6036 break
6037 done
6038
6039 fi
6040 fi
6041 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6042 if test -n "$NCURSES_CONFIG"; then
6043   echo "$as_me:6043: result: $NCURSES_CONFIG" >&5
6044 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6045 else
6046   echo "$as_me:6046: result: no" >&5
6047 echo "${ECHO_T}no" >&6
6048 fi
6049
6050     test -n "$NCURSES_CONFIG" && break
6051   done
6052 fi
6053 if test -z "$NCURSES_CONFIG"; then
6054   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6055   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6056 do
6057   # Extract the first word of "$ac_prog", so it can be a program name with args.
6058 set dummy $ac_prog; ac_word=$2
6059 echo "$as_me:6059: checking for $ac_word" >&5
6060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6061 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6062   echo $ECHO_N "(cached) $ECHO_C" >&6
6063 else
6064   if test -n "$ac_ct_NCURSES_CONFIG"; then
6065   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6066 else
6067   ac_save_IFS=$IFS; IFS=$ac_path_separator
6068 ac_dummy="$PATH"
6069 for ac_dir in $ac_dummy; do
6070   IFS=$ac_save_IFS
6071   test -z "$ac_dir" && ac_dir=.
6072   $as_executable_p "$ac_dir/$ac_word" || continue
6073 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6074 echo "$as_me:6074: found $ac_dir/$ac_word" >&5
6075 break
6076 done
6077
6078 fi
6079 fi
6080 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6081 if test -n "$ac_ct_NCURSES_CONFIG"; then
6082   echo "$as_me:6082: result: $ac_ct_NCURSES_CONFIG" >&5
6083 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6084 else
6085   echo "$as_me:6085: result: no" >&5
6086 echo "${ECHO_T}no" >&6
6087 fi
6088
6089   test -n "$ac_ct_NCURSES_CONFIG" && break
6090 done
6091 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6092
6093   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6094 fi
6095
6096 if test "$NCURSES_CONFIG" != none ; then
6097
6098 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6099 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6100
6101 # even with config script, some packages use no-override for curses.h
6102
6103 echo "$as_me:6103: checking if we have identified curses headers" >&5
6104 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6105 if test "${cf_cv_ncurses_header+set}" = set; then
6106   echo $ECHO_N "(cached) $ECHO_C" >&6
6107 else
6108
6109 cf_cv_ncurses_header=none
6110 for cf_header in  \
6111     ncurses/ncurses.h \
6112         ncurses/curses.h \
6113         ncurses.h \
6114         curses.h
6115 do
6116 cat >conftest.$ac_ext <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6119 #include <${cf_header}>
6120 int
6121 main ()
6122 {
6123 initscr(); tgoto("?", 0,0)
6124   ;
6125   return 0;
6126 }
6127 _ACEOF
6128 rm -f conftest.$ac_objext
6129 if { (eval echo "$as_me:6129: \"$ac_compile\"") >&5
6130   (eval $ac_compile) 2>&5
6131   ac_status=$?
6132   echo "$as_me:6132: \$? = $ac_status" >&5
6133   (exit $ac_status); } &&
6134          { ac_try='test -s conftest.$ac_objext'
6135   { (eval echo "$as_me:6135: \"$ac_try\"") >&5
6136   (eval $ac_try) 2>&5
6137   ac_status=$?
6138   echo "$as_me:6138: \$? = $ac_status" >&5
6139   (exit $ac_status); }; }; then
6140   cf_cv_ncurses_header=$cf_header; break
6141 else
6142   echo "$as_me: failed program was:" >&5
6143 cat conftest.$ac_ext >&5
6144 fi
6145 rm -f conftest.$ac_objext conftest.$ac_ext
6146 done
6147
6148 fi
6149 echo "$as_me:6149: result: $cf_cv_ncurses_header" >&5
6150 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6151
6152 if test "$cf_cv_ncurses_header" = none ; then
6153         { { echo "$as_me:6153: error: No curses header-files found" >&5
6154 echo "$as_me: error: No curses header-files found" >&2;}
6155    { (exit 1); exit 1; }; }
6156 fi
6157
6158 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6159
6160 for ac_header in $cf_cv_ncurses_header
6161 do
6162 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6163 echo "$as_me:6163: checking for $ac_header" >&5
6164 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6165 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6166   echo $ECHO_N "(cached) $ECHO_C" >&6
6167 else
6168   cat >conftest.$ac_ext <<_ACEOF
6169 #line 6169 "configure"
6170 #include "confdefs.h"
6171 #include <$ac_header>
6172 _ACEOF
6173 if { (eval echo "$as_me:6173: \"$ac_cpp conftest.$ac_ext\"") >&5
6174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6175   ac_status=$?
6176   egrep -v '^ *\+' conftest.er1 >conftest.err
6177   rm -f conftest.er1
6178   cat conftest.err >&5
6179   echo "$as_me:6179: \$? = $ac_status" >&5
6180   (exit $ac_status); } >/dev/null; then
6181   if test -s conftest.err; then
6182     ac_cpp_err=$ac_c_preproc_warn_flag
6183   else
6184     ac_cpp_err=
6185   fi
6186 else
6187   ac_cpp_err=yes
6188 fi
6189 if test -z "$ac_cpp_err"; then
6190   eval "$as_ac_Header=yes"
6191 else
6192   echo "$as_me: failed program was:" >&5
6193   cat conftest.$ac_ext >&5
6194   eval "$as_ac_Header=no"
6195 fi
6196 rm -f conftest.err conftest.$ac_ext
6197 fi
6198 echo "$as_me:6198: result: `eval echo '${'$as_ac_Header'}'`" >&5
6199 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6200 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6201   cat >>confdefs.h <<EOF
6202 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6203 EOF
6204
6205 fi
6206 done
6207
6208 cat >>confdefs.h <<\EOF
6209 #define NCURSES 1
6210 EOF
6211
6212 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6213
6214 cat >>confdefs.h <<EOF
6215 #define $cf_nculib_ROOT 1
6216 EOF
6217
6218 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6219
6220 else
6221
6222 cf_ncuhdr_root=ncurses
6223
6224 test -n "$cf_cv_curses_dir" && \
6225 test "$cf_cv_curses_dir" != "no" && { \
6226
6227 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6228   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6229   do
6230         while test $cf_add_incdir != /usr/include
6231         do
6232           if test -d $cf_add_incdir
6233           then
6234                 cf_have_incdir=no
6235                 if test -n "$CFLAGS$CPPFLAGS" ; then
6236                   # a loop is needed to ensure we can add subdirs of existing dirs
6237                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6238                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6239                           cf_have_incdir=yes; break
6240                         fi
6241                   done
6242                 fi
6243
6244                 if test "$cf_have_incdir" = no ; then
6245                   if test "$cf_add_incdir" = /usr/local/include ; then
6246                         if test "$GCC" = yes
6247                         then
6248                           cf_save_CPPFLAGS=$CPPFLAGS
6249                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6250                           cat >conftest.$ac_ext <<_ACEOF
6251 #line 6251 "configure"
6252 #include "confdefs.h"
6253 #include <stdio.h>
6254 int
6255 main ()
6256 {
6257 printf("Hello")
6258   ;
6259   return 0;
6260 }
6261 _ACEOF
6262 rm -f conftest.$ac_objext
6263 if { (eval echo "$as_me:6263: \"$ac_compile\"") >&5
6264   (eval $ac_compile) 2>&5
6265   ac_status=$?
6266   echo "$as_me:6266: \$? = $ac_status" >&5
6267   (exit $ac_status); } &&
6268          { ac_try='test -s conftest.$ac_objext'
6269   { (eval echo "$as_me:6269: \"$ac_try\"") >&5
6270   (eval $ac_try) 2>&5
6271   ac_status=$?
6272   echo "$as_me:6272: \$? = $ac_status" >&5
6273   (exit $ac_status); }; }; then
6274   :
6275 else
6276   echo "$as_me: failed program was:" >&5
6277 cat conftest.$ac_ext >&5
6278 cf_have_incdir=yes
6279 fi
6280 rm -f conftest.$ac_objext conftest.$ac_ext
6281                           CPPFLAGS=$cf_save_CPPFLAGS
6282                         fi
6283                   fi
6284                 fi
6285
6286                 if test "$cf_have_incdir" = no ; then
6287                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6288
6289 echo "${as_me:-configure}:6289: testing adding $cf_add_incdir to include-path ..." 1>&5
6290
6291                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6292
6293                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6294                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6295                   cf_add_incdir="$cf_top_incdir"
6296                 else
6297                   break
6298                 fi
6299           fi
6300         done
6301   done
6302 fi
6303
6304 }
6305
6306 echo "$as_me:6306: checking for $cf_ncuhdr_root header in include-path" >&5
6307 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6308 if test "${cf_cv_ncurses_h+set}" = set; then
6309   echo $ECHO_N "(cached) $ECHO_C" >&6
6310 else
6311
6312         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6313         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6314         for cf_header in $cf_header_list
6315         do
6316
6317         cat >conftest.$ac_ext <<_ACEOF
6318 #line 6318 "configure"
6319 #include "confdefs.h"
6320
6321 #include <$cf_header>
6322 int
6323 main ()
6324 {
6325
6326 #ifdef NCURSES_VERSION
6327
6328 printf("%s\n", NCURSES_VERSION);
6329 #else
6330 #ifdef __NCURSES_H
6331 printf("old\n");
6332 #else
6333         make an error
6334 #endif
6335 #endif
6336
6337   ;
6338   return 0;
6339 }
6340 _ACEOF
6341 rm -f conftest.$ac_objext
6342 if { (eval echo "$as_me:6342: \"$ac_compile\"") >&5
6343   (eval $ac_compile) 2>&5
6344   ac_status=$?
6345   echo "$as_me:6345: \$? = $ac_status" >&5
6346   (exit $ac_status); } &&
6347          { ac_try='test -s conftest.$ac_objext'
6348   { (eval echo "$as_me:6348: \"$ac_try\"") >&5
6349   (eval $ac_try) 2>&5
6350   ac_status=$?
6351   echo "$as_me:6351: \$? = $ac_status" >&5
6352   (exit $ac_status); }; }; then
6353   cf_cv_ncurses_h=$cf_header
6354
6355 else
6356   echo "$as_me: failed program was:" >&5
6357 cat conftest.$ac_ext >&5
6358 cf_cv_ncurses_h=no
6359 fi
6360 rm -f conftest.$ac_objext conftest.$ac_ext
6361
6362                 test "$cf_cv_ncurses_h" != no && break
6363         done
6364
6365 fi
6366 echo "$as_me:6366: result: $cf_cv_ncurses_h" >&5
6367 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6368
6369 if test "$cf_cv_ncurses_h" != no ; then
6370         cf_cv_ncurses_header=$cf_cv_ncurses_h
6371 else
6372
6373 echo "$as_me:6373: checking for $cf_ncuhdr_root include-path" >&5
6374 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6375 if test "${cf_cv_ncurses_h2+set}" = set; then
6376   echo $ECHO_N "(cached) $ECHO_C" >&6
6377 else
6378
6379         test -n "$verbose" && echo
6380
6381 cf_search=
6382
6383 # collect the current set of include-directories from compiler flags
6384 cf_header_path_list=""
6385 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6386         for cf_header_path in $CPPFLAGS $CFLAGS
6387         do
6388                 case $cf_header_path in #(vi
6389                 -I*)
6390                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6391
6392 test "$cf_header_path" != "NONE" && \
6393 test -d "$cf_header_path" && \
6394  {
6395         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6396         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6397         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6398         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6399         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6400         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"
6401 }
6402
6403                         cf_header_path_list="$cf_header_path_list $cf_search"
6404                         ;;
6405                 esac
6406         done
6407 fi
6408
6409 # add the variations for the package we are looking for
6410
6411 cf_search=
6412
6413 test "/usr" != "$prefix" && \
6414 test -d "/usr" && \
6415 (test $prefix = NONE || test "/usr" != "$prefix") && {
6416         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6417         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6418         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6419         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6420         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6421         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6422 }
6423
6424 test "$prefix" != "NONE" && \
6425 test -d "$prefix" && \
6426  {
6427         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6428         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6429         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6430         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6431         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6432         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6433 }
6434
6435 test "/usr/local" != "$prefix" && \
6436 test -d "/usr/local" && \
6437 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6438         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6439         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6440         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6441         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6442         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6443         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6444 }
6445
6446 test "/opt" != "$prefix" && \
6447 test -d "/opt" && \
6448 (test $prefix = NONE || test "/opt" != "$prefix") && {
6449         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6450         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6451         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6452         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6453         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6454         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6455 }
6456
6457 test "$HOME" != "$prefix" && \
6458 test -d "$HOME" && \
6459 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6460         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6461         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6462         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6463         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6464         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6465         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6466 }
6467
6468 test "$includedir" != NONE && \
6469 test "$includedir" != "/usr/include" && \
6470 test -d "$includedir" && {
6471         test -d $includedir &&    cf_search="$cf_search $includedir"
6472         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6473 }
6474
6475 test "$oldincludedir" != NONE && \
6476 test "$oldincludedir" != "/usr/include" && \
6477 test -d "$oldincludedir" && {
6478         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6479         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6480 }
6481
6482 cf_search="$cf_search $cf_header_path_list"
6483
6484         test -n "$verbose" && echo search path $cf_search
6485         cf_save2_CPPFLAGS="$CPPFLAGS"
6486         for cf_incdir in $cf_search
6487         do
6488
6489 if test -n "$cf_incdir" ; then
6490   for cf_add_incdir in $cf_incdir
6491   do
6492         while test $cf_add_incdir != /usr/include
6493         do
6494           if test -d $cf_add_incdir
6495           then
6496                 cf_have_incdir=no
6497                 if test -n "$CFLAGS$CPPFLAGS" ; then
6498                   # a loop is needed to ensure we can add subdirs of existing dirs
6499                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6500                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6501                           cf_have_incdir=yes; break
6502                         fi
6503                   done
6504                 fi
6505
6506                 if test "$cf_have_incdir" = no ; then
6507                   if test "$cf_add_incdir" = /usr/local/include ; then
6508                         if test "$GCC" = yes
6509                         then
6510                           cf_save_CPPFLAGS=$CPPFLAGS
6511                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6512                           cat >conftest.$ac_ext <<_ACEOF
6513 #line 6513 "configure"
6514 #include "confdefs.h"
6515 #include <stdio.h>
6516 int
6517 main ()
6518 {
6519 printf("Hello")
6520   ;
6521   return 0;
6522 }
6523 _ACEOF
6524 rm -f conftest.$ac_objext
6525 if { (eval echo "$as_me:6525: \"$ac_compile\"") >&5
6526   (eval $ac_compile) 2>&5
6527   ac_status=$?
6528   echo "$as_me:6528: \$? = $ac_status" >&5
6529   (exit $ac_status); } &&
6530          { ac_try='test -s conftest.$ac_objext'
6531   { (eval echo "$as_me:6531: \"$ac_try\"") >&5
6532   (eval $ac_try) 2>&5
6533   ac_status=$?
6534   echo "$as_me:6534: \$? = $ac_status" >&5
6535   (exit $ac_status); }; }; then
6536   :
6537 else
6538   echo "$as_me: failed program was:" >&5
6539 cat conftest.$ac_ext >&5
6540 cf_have_incdir=yes
6541 fi
6542 rm -f conftest.$ac_objext conftest.$ac_ext
6543                           CPPFLAGS=$cf_save_CPPFLAGS
6544                         fi
6545                   fi
6546                 fi
6547
6548                 if test "$cf_have_incdir" = no ; then
6549                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6550
6551 echo "${as_me:-configure}:6551: testing adding $cf_add_incdir to include-path ..." 1>&5
6552
6553                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6554
6555                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6556                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6557                   cf_add_incdir="$cf_top_incdir"
6558                 else
6559                   break
6560                 fi
6561           fi
6562         done
6563   done
6564 fi
6565
6566                 for cf_header in \
6567                         ncurses.h \
6568                         curses.h
6569                 do
6570
6571         cat >conftest.$ac_ext <<_ACEOF
6572 #line 6572 "configure"
6573 #include "confdefs.h"
6574
6575 #include <$cf_header>
6576 int
6577 main ()
6578 {
6579
6580 #ifdef NCURSES_VERSION
6581
6582 printf("%s\n", NCURSES_VERSION);
6583 #else
6584 #ifdef __NCURSES_H
6585 printf("old\n");
6586 #else
6587         make an error
6588 #endif
6589 #endif
6590
6591   ;
6592   return 0;
6593 }
6594 _ACEOF
6595 rm -f conftest.$ac_objext
6596 if { (eval echo "$as_me:6596: \"$ac_compile\"") >&5
6597   (eval $ac_compile) 2>&5
6598   ac_status=$?
6599   echo "$as_me:6599: \$? = $ac_status" >&5
6600   (exit $ac_status); } &&
6601          { ac_try='test -s conftest.$ac_objext'
6602   { (eval echo "$as_me:6602: \"$ac_try\"") >&5
6603   (eval $ac_try) 2>&5
6604   ac_status=$?
6605   echo "$as_me:6605: \$? = $ac_status" >&5
6606   (exit $ac_status); }; }; then
6607   cf_cv_ncurses_h2=$cf_header
6608
6609 else
6610   echo "$as_me: failed program was:" >&5
6611 cat conftest.$ac_ext >&5
6612 cf_cv_ncurses_h2=no
6613 fi
6614 rm -f conftest.$ac_objext conftest.$ac_ext
6615
6616                         if test "$cf_cv_ncurses_h2" != no ; then
6617                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6618                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6619                                 break
6620                         fi
6621                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6622                 done
6623                 CPPFLAGS="$cf_save2_CPPFLAGS"
6624                 test "$cf_cv_ncurses_h2" != no && break
6625         done
6626         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6626: error: not found" >&5
6627 echo "$as_me: error: not found" >&2;}
6628    { (exit 1); exit 1; }; }
6629
6630 fi
6631 echo "$as_me:6631: result: $cf_cv_ncurses_h2" >&5
6632 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6633
6634         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6635         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6636         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6637                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6638         fi
6639
6640 if test -n "$cf_1st_incdir" ; then
6641   for cf_add_incdir in $cf_1st_incdir
6642   do
6643         while test $cf_add_incdir != /usr/include
6644         do
6645           if test -d $cf_add_incdir
6646           then
6647                 cf_have_incdir=no
6648                 if test -n "$CFLAGS$CPPFLAGS" ; then
6649                   # a loop is needed to ensure we can add subdirs of existing dirs
6650                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6651                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6652                           cf_have_incdir=yes; break
6653                         fi
6654                   done
6655                 fi
6656
6657                 if test "$cf_have_incdir" = no ; then
6658                   if test "$cf_add_incdir" = /usr/local/include ; then
6659                         if test "$GCC" = yes
6660                         then
6661                           cf_save_CPPFLAGS=$CPPFLAGS
6662                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6663                           cat >conftest.$ac_ext <<_ACEOF
6664 #line 6664 "configure"
6665 #include "confdefs.h"
6666 #include <stdio.h>
6667 int
6668 main ()
6669 {
6670 printf("Hello")
6671   ;
6672   return 0;
6673 }
6674 _ACEOF
6675 rm -f conftest.$ac_objext
6676 if { (eval echo "$as_me:6676: \"$ac_compile\"") >&5
6677   (eval $ac_compile) 2>&5
6678   ac_status=$?
6679   echo "$as_me:6679: \$? = $ac_status" >&5
6680   (exit $ac_status); } &&
6681          { ac_try='test -s conftest.$ac_objext'
6682   { (eval echo "$as_me:6682: \"$ac_try\"") >&5
6683   (eval $ac_try) 2>&5
6684   ac_status=$?
6685   echo "$as_me:6685: \$? = $ac_status" >&5
6686   (exit $ac_status); }; }; then
6687   :
6688 else
6689   echo "$as_me: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 cf_have_incdir=yes
6692 fi
6693 rm -f conftest.$ac_objext conftest.$ac_ext
6694                           CPPFLAGS=$cf_save_CPPFLAGS
6695                         fi
6696                   fi
6697                 fi
6698
6699                 if test "$cf_have_incdir" = no ; then
6700                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6701
6702 echo "${as_me:-configure}:6702: testing adding $cf_add_incdir to include-path ..." 1>&5
6703
6704                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6705
6706                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6707                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6708                   cf_add_incdir="$cf_top_incdir"
6709                 else
6710                   break
6711                 fi
6712           fi
6713         done
6714   done
6715 fi
6716
6717 fi
6718
6719 # Set definitions to allow ifdef'ing for ncurses.h
6720
6721 case $cf_cv_ncurses_header in # (vi
6722 *ncurses.h)
6723         cat >>confdefs.h <<\EOF
6724 #define HAVE_NCURSES_H 1
6725 EOF
6726
6727         ;;
6728 esac
6729
6730 case $cf_cv_ncurses_header in # (vi
6731 ncurses/curses.h|ncurses/ncurses.h)
6732         cat >>confdefs.h <<\EOF
6733 #define HAVE_NCURSES_NCURSES_H 1
6734 EOF
6735
6736         ;;
6737 ncursesw/curses.h|ncursesw/ncurses.h)
6738         cat >>confdefs.h <<\EOF
6739 #define HAVE_NCURSESW_NCURSES_H 1
6740 EOF
6741
6742         ;;
6743 esac
6744
6745 echo "$as_me:6745: checking for terminfo header" >&5
6746 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6747 if test "${cf_cv_term_header+set}" = set; then
6748   echo $ECHO_N "(cached) $ECHO_C" >&6
6749 else
6750
6751 case ${cf_cv_ncurses_header} in #(vi
6752 */ncurses.h|*/ncursesw.h) #(vi
6753         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6754         ;;
6755 *)
6756         cf_term_header=term.h
6757         ;;
6758 esac
6759
6760 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6761 do
6762 cat >conftest.$ac_ext <<_ACEOF
6763 #line 6763 "configure"
6764 #include "confdefs.h"
6765 #include <stdio.h>
6766 #include <${cf_cv_ncurses_header:-curses.h}>
6767 #include <$cf_test>
6768
6769 int
6770 main ()
6771 {
6772 int x = auto_left_margin
6773   ;
6774   return 0;
6775 }
6776 _ACEOF
6777 rm -f conftest.$ac_objext
6778 if { (eval echo "$as_me:6778: \"$ac_compile\"") >&5
6779   (eval $ac_compile) 2>&5
6780   ac_status=$?
6781   echo "$as_me:6781: \$? = $ac_status" >&5
6782   (exit $ac_status); } &&
6783          { ac_try='test -s conftest.$ac_objext'
6784   { (eval echo "$as_me:6784: \"$ac_try\"") >&5
6785   (eval $ac_try) 2>&5
6786   ac_status=$?
6787   echo "$as_me:6787: \$? = $ac_status" >&5
6788   (exit $ac_status); }; }; then
6789
6790         cf_cv_term_header="$cf_test"
6791 else
6792   echo "$as_me: failed program was:" >&5
6793 cat conftest.$ac_ext >&5
6794
6795         cf_cv_term_header=unknown
6796
6797 fi
6798 rm -f conftest.$ac_objext conftest.$ac_ext
6799         test "$cf_cv_term_header" != unknown && break
6800 done
6801
6802 fi
6803 echo "$as_me:6803: result: $cf_cv_term_header" >&5
6804 echo "${ECHO_T}$cf_cv_term_header" >&6
6805
6806 # Set definitions to allow ifdef'ing to accommodate subdirectories
6807
6808 case $cf_cv_term_header in # (vi
6809 *term.h)
6810         cat >>confdefs.h <<\EOF
6811 #define HAVE_TERM_H 1
6812 EOF
6813
6814         ;;
6815 esac
6816
6817 case $cf_cv_term_header in # (vi
6818 ncurses/term.h) #(vi
6819         cat >>confdefs.h <<\EOF
6820 #define HAVE_NCURSES_TERM_H 1
6821 EOF
6822
6823         ;;
6824 ncursesw/term.h)
6825         cat >>confdefs.h <<\EOF
6826 #define HAVE_NCURSESW_TERM_H 1
6827 EOF
6828
6829         ;;
6830 esac
6831
6832 # some applications need this, but should check for NCURSES_VERSION
6833 cat >>confdefs.h <<\EOF
6834 #define NCURSES 1
6835 EOF
6836
6837 echo "$as_me:6837: checking for ncurses version" >&5
6838 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6839 if test "${cf_cv_ncurses_version+set}" = set; then
6840   echo $ECHO_N "(cached) $ECHO_C" >&6
6841 else
6842
6843         cf_cv_ncurses_version=no
6844         cf_tempfile=out$$
6845         rm -f $cf_tempfile
6846         if test "$cross_compiling" = yes; then
6847
6848         # This will not work if the preprocessor splits the line after the
6849         # Autoconf token.  The 'unproto' program does that.
6850         cat > conftest.$ac_ext <<EOF
6851 #include <${cf_cv_ncurses_header:-curses.h}>
6852 #undef Autoconf
6853 #ifdef NCURSES_VERSION
6854 Autoconf NCURSES_VERSION
6855 #else
6856 #ifdef __NCURSES_H
6857 Autoconf "old"
6858 #endif
6859 ;
6860 #endif
6861 EOF
6862         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6863         { (eval echo "$as_me:6863: \"$cf_try\"") >&5
6864   (eval $cf_try) 2>&5
6865   ac_status=$?
6866   echo "$as_me:6866: \$? = $ac_status" >&5
6867   (exit $ac_status); }
6868         if test -f conftest.out ; then
6869                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6870                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6871                 rm -f conftest.out
6872         fi
6873
6874 else
6875   cat >conftest.$ac_ext <<_ACEOF
6876 #line 6876 "configure"
6877 #include "confdefs.h"
6878
6879 #include <${cf_cv_ncurses_header:-curses.h}>
6880 #include <stdio.h>
6881 int main()
6882 {
6883         FILE *fp = fopen("$cf_tempfile", "w");
6884 #ifdef NCURSES_VERSION
6885 # ifdef NCURSES_VERSION_PATCH
6886         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6887 # else
6888         fprintf(fp, "%s\n", NCURSES_VERSION);
6889 # endif
6890 #else
6891 # ifdef __NCURSES_H
6892         fprintf(fp, "old\n");
6893 # else
6894         make an error
6895 # endif
6896 #endif
6897         ${cf_cv_main_return:-return}(0);
6898 }
6899 _ACEOF
6900 rm -f conftest$ac_exeext
6901 if { (eval echo "$as_me:6901: \"$ac_link\"") >&5
6902   (eval $ac_link) 2>&5
6903   ac_status=$?
6904   echo "$as_me:6904: \$? = $ac_status" >&5
6905   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6906   { (eval echo "$as_me:6906: \"$ac_try\"") >&5
6907   (eval $ac_try) 2>&5
6908   ac_status=$?
6909   echo "$as_me:6909: \$? = $ac_status" >&5
6910   (exit $ac_status); }; }; then
6911
6912         cf_cv_ncurses_version=`cat $cf_tempfile`
6913 else
6914   echo "$as_me: program exited with status $ac_status" >&5
6915 echo "$as_me: failed program was:" >&5
6916 cat conftest.$ac_ext >&5
6917 fi
6918 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6919 fi
6920         rm -f $cf_tempfile
6921
6922 fi
6923 echo "$as_me:6923: result: $cf_cv_ncurses_version" >&5
6924 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6925 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6926 #define NCURSES 1
6927 EOF
6928
6929 cf_nculib_root=ncurses
6930         # This works, except for the special case where we find gpm, but
6931         # ncurses is in a nonstandard location via $LIBS, and we really want
6932         # to link gpm.
6933 cf_ncurses_LIBS=""
6934 cf_ncurses_SAVE="$LIBS"
6935 echo "$as_me:6935: checking for Gpm_Open in -lgpm" >&5
6936 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6937 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6938   echo $ECHO_N "(cached) $ECHO_C" >&6
6939 else
6940   ac_check_lib_save_LIBS=$LIBS
6941 LIBS="-lgpm  $LIBS"
6942 cat >conftest.$ac_ext <<_ACEOF
6943 #line 6943 "configure"
6944 #include "confdefs.h"
6945
6946 /* Override any gcc2 internal prototype to avoid an error.  */
6947 #ifdef __cplusplus
6948 extern "C"
6949 #endif
6950 /* We use char because int might match the return type of a gcc2
6951    builtin and then its argument prototype would still apply.  */
6952 char Gpm_Open ();
6953 int
6954 main ()
6955 {
6956 Gpm_Open ();
6957   ;
6958   return 0;
6959 }
6960 _ACEOF
6961 rm -f conftest.$ac_objext conftest$ac_exeext
6962 if { (eval echo "$as_me:6962: \"$ac_link\"") >&5
6963   (eval $ac_link) 2>&5
6964   ac_status=$?
6965   echo "$as_me:6965: \$? = $ac_status" >&5
6966   (exit $ac_status); } &&
6967          { ac_try='test -s conftest$ac_exeext'
6968   { (eval echo "$as_me:6968: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:6971: \$? = $ac_status" >&5
6972   (exit $ac_status); }; }; then
6973   ac_cv_lib_gpm_Gpm_Open=yes
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 cat conftest.$ac_ext >&5
6977 ac_cv_lib_gpm_Gpm_Open=no
6978 fi
6979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6980 LIBS=$ac_check_lib_save_LIBS
6981 fi
6982 echo "$as_me:6982: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6983 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6984 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6985   echo "$as_me:6985: checking for initscr in -lgpm" >&5
6986 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6987 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6988   echo $ECHO_N "(cached) $ECHO_C" >&6
6989 else
6990   ac_check_lib_save_LIBS=$LIBS
6991 LIBS="-lgpm  $LIBS"
6992 cat >conftest.$ac_ext <<_ACEOF
6993 #line 6993 "configure"
6994 #include "confdefs.h"
6995
6996 /* Override any gcc2 internal prototype to avoid an error.  */
6997 #ifdef __cplusplus
6998 extern "C"
6999 #endif
7000 /* We use char because int might match the return type of a gcc2
7001    builtin and then its argument prototype would still apply.  */
7002 char initscr ();
7003 int
7004 main ()
7005 {
7006 initscr ();
7007   ;
7008   return 0;
7009 }
7010 _ACEOF
7011 rm -f conftest.$ac_objext conftest$ac_exeext
7012 if { (eval echo "$as_me:7012: \"$ac_link\"") >&5
7013   (eval $ac_link) 2>&5
7014   ac_status=$?
7015   echo "$as_me:7015: \$? = $ac_status" >&5
7016   (exit $ac_status); } &&
7017          { ac_try='test -s conftest$ac_exeext'
7018   { (eval echo "$as_me:7018: \"$ac_try\"") >&5
7019   (eval $ac_try) 2>&5
7020   ac_status=$?
7021   echo "$as_me:7021: \$? = $ac_status" >&5
7022   (exit $ac_status); }; }; then
7023   ac_cv_lib_gpm_initscr=yes
7024 else
7025   echo "$as_me: failed program was:" >&5
7026 cat conftest.$ac_ext >&5
7027 ac_cv_lib_gpm_initscr=no
7028 fi
7029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7030 LIBS=$ac_check_lib_save_LIBS
7031 fi
7032 echo "$as_me:7032: result: $ac_cv_lib_gpm_initscr" >&5
7033 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7034 if test $ac_cv_lib_gpm_initscr = yes; then
7035   LIBS="$cf_ncurses_SAVE"
7036 else
7037   cf_ncurses_LIBS="-lgpm"
7038 fi
7039
7040 fi
7041
7042 case $host_os in #(vi
7043 freebsd*)
7044         # This is only necessary if you are linking against an obsolete
7045         # version of ncurses (but it should do no harm, since it's static).
7046         if test "$cf_nculib_root" = ncurses ; then
7047                 echo "$as_me:7047: checking for tgoto in -lmytinfo" >&5
7048 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7049 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7050   echo $ECHO_N "(cached) $ECHO_C" >&6
7051 else
7052   ac_check_lib_save_LIBS=$LIBS
7053 LIBS="-lmytinfo  $LIBS"
7054 cat >conftest.$ac_ext <<_ACEOF
7055 #line 7055 "configure"
7056 #include "confdefs.h"
7057
7058 /* Override any gcc2 internal prototype to avoid an error.  */
7059 #ifdef __cplusplus
7060 extern "C"
7061 #endif
7062 /* We use char because int might match the return type of a gcc2
7063    builtin and then its argument prototype would still apply.  */
7064 char tgoto ();
7065 int
7066 main ()
7067 {
7068 tgoto ();
7069   ;
7070   return 0;
7071 }
7072 _ACEOF
7073 rm -f conftest.$ac_objext conftest$ac_exeext
7074 if { (eval echo "$as_me:7074: \"$ac_link\"") >&5
7075   (eval $ac_link) 2>&5
7076   ac_status=$?
7077   echo "$as_me:7077: \$? = $ac_status" >&5
7078   (exit $ac_status); } &&
7079          { ac_try='test -s conftest$ac_exeext'
7080   { (eval echo "$as_me:7080: \"$ac_try\"") >&5
7081   (eval $ac_try) 2>&5
7082   ac_status=$?
7083   echo "$as_me:7083: \$? = $ac_status" >&5
7084   (exit $ac_status); }; }; then
7085   ac_cv_lib_mytinfo_tgoto=yes
7086 else
7087   echo "$as_me: failed program was:" >&5
7088 cat conftest.$ac_ext >&5
7089 ac_cv_lib_mytinfo_tgoto=no
7090 fi
7091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7092 LIBS=$ac_check_lib_save_LIBS
7093 fi
7094 echo "$as_me:7094: result: $ac_cv_lib_mytinfo_tgoto" >&5
7095 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7096 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7097   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7098 fi
7099
7100         fi
7101         ;;
7102 esac
7103
7104 LIBS="$cf_ncurses_LIBS $LIBS"
7105
7106 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7107 then
7108         LIBS="-l$cf_nculib_root $LIBS"
7109 else
7110
7111         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7112         cf_libdir=""
7113         echo "$as_me:7113: checking for initscr" >&5
7114 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7115 if test "${ac_cv_func_initscr+set}" = set; then
7116   echo $ECHO_N "(cached) $ECHO_C" >&6
7117 else
7118   cat >conftest.$ac_ext <<_ACEOF
7119 #line 7119 "configure"
7120 #include "confdefs.h"
7121 /* System header to define __stub macros and hopefully few prototypes,
7122     which can conflict with char initscr (); below.  */
7123 #include <assert.h>
7124 /* Override any gcc2 internal prototype to avoid an error.  */
7125 #ifdef __cplusplus
7126 extern "C"
7127 #endif
7128 /* We use char because int might match the return type of a gcc2
7129    builtin and then its argument prototype would still apply.  */
7130 char initscr ();
7131 char (*f) ();
7132
7133 int
7134 main ()
7135 {
7136 /* The GNU C library defines this for functions which it implements
7137     to always fail with ENOSYS.  Some functions are actually named
7138     something starting with __ and the normal name is an alias.  */
7139 #if defined (__stub_initscr) || defined (__stub___initscr)
7140 choke me
7141 #else
7142 f = initscr;
7143 #endif
7144
7145   ;
7146   return 0;
7147 }
7148 _ACEOF
7149 rm -f conftest.$ac_objext conftest$ac_exeext
7150 if { (eval echo "$as_me:7150: \"$ac_link\"") >&5
7151   (eval $ac_link) 2>&5
7152   ac_status=$?
7153   echo "$as_me:7153: \$? = $ac_status" >&5
7154   (exit $ac_status); } &&
7155          { ac_try='test -s conftest$ac_exeext'
7156   { (eval echo "$as_me:7156: \"$ac_try\"") >&5
7157   (eval $ac_try) 2>&5
7158   ac_status=$?
7159   echo "$as_me:7159: \$? = $ac_status" >&5
7160   (exit $ac_status); }; }; then
7161   ac_cv_func_initscr=yes
7162 else
7163   echo "$as_me: failed program was:" >&5
7164 cat conftest.$ac_ext >&5
7165 ac_cv_func_initscr=no
7166 fi
7167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7168 fi
7169 echo "$as_me:7169: result: $ac_cv_func_initscr" >&5
7170 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7171 if test $ac_cv_func_initscr = yes; then
7172   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7173 else
7174
7175                 cf_save_LIBS="$LIBS"
7176                 echo "$as_me:7176: checking for initscr in -l$cf_nculib_root" >&5
7177 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7178                 LIBS="-l$cf_nculib_root $LIBS"
7179                 cat >conftest.$ac_ext <<_ACEOF
7180 #line 7180 "configure"
7181 #include "confdefs.h"
7182 #include <${cf_cv_ncurses_header:-curses.h}>
7183 int
7184 main ()
7185 {
7186 initscr()
7187   ;
7188   return 0;
7189 }
7190 _ACEOF
7191 rm -f conftest.$ac_objext conftest$ac_exeext
7192 if { (eval echo "$as_me:7192: \"$ac_link\"") >&5
7193   (eval $ac_link) 2>&5
7194   ac_status=$?
7195   echo "$as_me:7195: \$? = $ac_status" >&5
7196   (exit $ac_status); } &&
7197          { ac_try='test -s conftest$ac_exeext'
7198   { (eval echo "$as_me:7198: \"$ac_try\"") >&5
7199   (eval $ac_try) 2>&5
7200   ac_status=$?
7201   echo "$as_me:7201: \$? = $ac_status" >&5
7202   (exit $ac_status); }; }; then
7203   echo "$as_me:7203: result: yes" >&5
7204 echo "${ECHO_T}yes" >&6
7205                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7206
7207 else
7208   echo "$as_me: failed program was:" >&5
7209 cat conftest.$ac_ext >&5
7210 echo "$as_me:7210: result: no" >&5
7211 echo "${ECHO_T}no" >&6
7212
7213 cf_search=
7214 cf_library_path_list=""
7215 if test -n "${LDFLAGS}${LIBS}" ; then
7216         for cf_library_path in $LDFLAGS $LIBS
7217         do
7218                 case $cf_library_path in #(vi
7219                 -L*)
7220                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7221
7222 test "$cf_library_path" != "NONE" && \
7223 test -d "$cf_library_path" && \
7224  {
7225         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7226         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7227         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7228         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7229         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7230         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"
7231 }
7232
7233                         cf_library_path_list="$cf_library_path_list $cf_search"
7234                         ;;
7235                 esac
7236         done
7237 fi
7238
7239 cf_search=
7240
7241 test "/usr" != "$prefix" && \
7242 test -d "/usr" && \
7243 (test $prefix = NONE || test "/usr" != "$prefix") && {
7244         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7245         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7246         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7247         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7248         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7249         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7250 }
7251
7252 test "$prefix" != "NONE" && \
7253 test -d "$prefix" && \
7254  {
7255         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7256         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7257         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7258         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7259         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7260         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7261 }
7262
7263 test "/usr/local" != "$prefix" && \
7264 test -d "/usr/local" && \
7265 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7266         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7267         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7268         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7269         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7270         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7271         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7272 }
7273
7274 test "/opt" != "$prefix" && \
7275 test -d "/opt" && \
7276 (test $prefix = NONE || test "/opt" != "$prefix") && {
7277         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7278         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7279         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7280         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7281         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7282         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7283 }
7284
7285 test "$HOME" != "$prefix" && \
7286 test -d "$HOME" && \
7287 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7288         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7289         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7290         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7291         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7292         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7293         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7294 }
7295
7296 cf_search="$cf_library_path_list $cf_search"
7297
7298                         for cf_libdir in $cf_search
7299                         do
7300                                 echo "$as_me:7300: checking for -l$cf_nculib_root in $cf_libdir" >&5
7301 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7302                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7303                                 cat >conftest.$ac_ext <<_ACEOF
7304 #line 7304 "configure"
7305 #include "confdefs.h"
7306 #include <${cf_cv_ncurses_header:-curses.h}>
7307 int
7308 main ()
7309 {
7310 initscr()
7311   ;
7312   return 0;
7313 }
7314 _ACEOF
7315 rm -f conftest.$ac_objext conftest$ac_exeext
7316 if { (eval echo "$as_me:7316: \"$ac_link\"") >&5
7317   (eval $ac_link) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); } &&
7321          { ac_try='test -s conftest$ac_exeext'
7322   { (eval echo "$as_me:7322: \"$ac_try\"") >&5
7323   (eval $ac_try) 2>&5
7324   ac_status=$?
7325   echo "$as_me:7325: \$? = $ac_status" >&5
7326   (exit $ac_status); }; }; then
7327   echo "$as_me:7327: result: yes" >&5
7328 echo "${ECHO_T}yes" >&6
7329                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7330                                          break
7331 else
7332   echo "$as_me: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 echo "$as_me:7334: result: no" >&5
7335 echo "${ECHO_T}no" >&6
7336                                          LIBS="$cf_save_LIBS"
7337 fi
7338 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7339                         done
7340
7341 fi
7342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7343
7344 fi
7345
7346 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7347
7348 if test $cf_found_library = no ; then
7349         { { echo "$as_me:7349: error: Cannot link $cf_nculib_root library" >&5
7350 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7351    { (exit 1); exit 1; }; }
7352 fi
7353
7354 fi
7355
7356 if test -n "$cf_ncurses_LIBS" ; then
7357         echo "$as_me:7357: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7358 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7359         cf_ncurses_SAVE="$LIBS"
7360         for p in $cf_ncurses_LIBS ; do
7361                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7362                 if test "$q" != "$LIBS" ; then
7363                         LIBS="$q"
7364                 fi
7365         done
7366         cat >conftest.$ac_ext <<_ACEOF
7367 #line 7367 "configure"
7368 #include "confdefs.h"
7369 #include <${cf_cv_ncurses_header:-curses.h}>
7370 int
7371 main ()
7372 {
7373 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7374   ;
7375   return 0;
7376 }
7377 _ACEOF
7378 rm -f conftest.$ac_objext conftest$ac_exeext
7379 if { (eval echo "$as_me:7379: \"$ac_link\"") >&5
7380   (eval $ac_link) 2>&5
7381   ac_status=$?
7382   echo "$as_me:7382: \$? = $ac_status" >&5
7383   (exit $ac_status); } &&
7384          { ac_try='test -s conftest$ac_exeext'
7385   { (eval echo "$as_me:7385: \"$ac_try\"") >&5
7386   (eval $ac_try) 2>&5
7387   ac_status=$?
7388   echo "$as_me:7388: \$? = $ac_status" >&5
7389   (exit $ac_status); }; }; then
7390   echo "$as_me:7390: result: yes" >&5
7391 echo "${ECHO_T}yes" >&6
7392 else
7393   echo "$as_me: failed program was:" >&5
7394 cat conftest.$ac_ext >&5
7395 echo "$as_me:7395: result: no" >&5
7396 echo "${ECHO_T}no" >&6
7397                  LIBS="$cf_ncurses_SAVE"
7398 fi
7399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7400 fi
7401
7402 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7403
7404 cat >>confdefs.h <<EOF
7405 #define $cf_nculib_ROOT 1
7406 EOF
7407
7408 fi
7409
7410 fi
7411
7412 if test "$NCURSES_CONFIG" != none ; then
7413
7414 cf_version=`$NCURSES_CONFIG --version`
7415
7416 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7417 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7418 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7419
7420 # ABI version is not available from headers
7421 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7422
7423 else
7424
7425 for cf_name in MAJOR MINOR PATCH
7426 do
7427 cat >conftest.$ac_ext <<CF_EOF
7428 #include <${cf_cv_ncurses_header:-curses.h}>
7429 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7430 CF_EOF
7431         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7432         { (eval echo "$as_me:7432: \"$cf_try\"") >&5
7433   (eval $cf_try) 2>&5
7434   ac_status=$?
7435   echo "$as_me:7435: \$? = $ac_status" >&5
7436   (exit $ac_status); }
7437         if test -f conftest.out ; then
7438                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7439                 eval NCURSES_$cf_name=\"$cf_result\"
7440                 # cat conftest.$ac_ext
7441                 # cat conftest.out
7442         fi
7443 done
7444
7445 cf_cv_abi_version=${NCURSES_MAJOR}
7446
7447 fi
7448
7449 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7450
7451 cf_cv_timestamp=`date`
7452
7453 echo "$as_me:7453: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7454 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7455
7456         case $cf_cv_system_name in #(vi
7457         OS/2*|os2*) #(vi
7458         LIB_PREFIX=''
7459         ;;
7460         *)      LIB_PREFIX='lib'
7461         ;;
7462         esac
7463 cf_prefix=$LIB_PREFIX
7464
7465 LIB_PREFIX=$cf_prefix
7466
7467 LIB_SUFFIX=
7468
7469 ###############################################################################
7470
7471 if test X"$CC_G_OPT" = X"" ; then
7472         CC_G_OPT='-g'
7473         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7474 fi
7475
7476 echo "$as_me:7476: checking for default loader flags" >&5
7477 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7478 case $DFT_LWR_MODEL in
7479 normal)  LD_MODEL=''   ;;
7480 debug)   LD_MODEL=$CC_G_OPT ;;
7481 profile) LD_MODEL='-pg';;
7482 shared)  LD_MODEL=''   ;;
7483 esac
7484 echo "$as_me:7484: result: $LD_MODEL" >&5
7485 echo "${ECHO_T}$LD_MODEL" >&6
7486
7487 LD_RPATH_OPT=
7488 echo "$as_me:7488: checking for an rpath option" >&5
7489 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7490 case $cf_cv_system_name in #(vi
7491 irix*) #(vi
7492         if test "$GCC" = yes; then
7493                 LD_RPATH_OPT="-Wl,-rpath,"
7494         else
7495                 LD_RPATH_OPT="-rpath "
7496         fi
7497         ;;
7498 linux*|gnu*|k*bsd*-gnu) #(vi
7499         LD_RPATH_OPT="-Wl,-rpath,"
7500         ;;
7501 openbsd[2-9].*|mirbsd*) #(vi
7502         LD_RPATH_OPT="-Wl,-rpath,"
7503         ;;
7504 dragonfly*|freebsd*) #(vi
7505         LD_RPATH_OPT="-rpath "
7506         ;;
7507 netbsd*) #(vi
7508         LD_RPATH_OPT="-Wl,-rpath,"
7509         ;;
7510 osf*|mls+*) #(vi
7511         LD_RPATH_OPT="-rpath "
7512         ;;
7513 solaris2*) #(vi
7514         LD_RPATH_OPT="-R"
7515         ;;
7516 *)
7517         ;;
7518 esac
7519 echo "$as_me:7519: result: $LD_RPATH_OPT" >&5
7520 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7521
7522 case "x$LD_RPATH_OPT" in #(vi
7523 x-R*)
7524         echo "$as_me:7524: checking if we need a space after rpath option" >&5
7525 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7526         cf_save_LIBS="$LIBS"
7527         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7528         cat >conftest.$ac_ext <<_ACEOF
7529 #line 7529 "configure"
7530 #include "confdefs.h"
7531
7532 int
7533 main ()
7534 {
7535
7536   ;
7537   return 0;
7538 }
7539 _ACEOF
7540 rm -f conftest.$ac_objext conftest$ac_exeext
7541 if { (eval echo "$as_me:7541: \"$ac_link\"") >&5
7542   (eval $ac_link) 2>&5
7543   ac_status=$?
7544   echo "$as_me:7544: \$? = $ac_status" >&5
7545   (exit $ac_status); } &&
7546          { ac_try='test -s conftest$ac_exeext'
7547   { (eval echo "$as_me:7547: \"$ac_try\"") >&5
7548   (eval $ac_try) 2>&5
7549   ac_status=$?
7550   echo "$as_me:7550: \$? = $ac_status" >&5
7551   (exit $ac_status); }; }; then
7552   cf_rpath_space=no
7553 else
7554   echo "$as_me: failed program was:" >&5
7555 cat conftest.$ac_ext >&5
7556 cf_rpath_space=yes
7557 fi
7558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7559         LIBS="$cf_save_LIBS"
7560         echo "$as_me:7560: result: $cf_rpath_space" >&5
7561 echo "${ECHO_T}$cf_rpath_space" >&6
7562         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7563         ;;
7564 esac
7565
7566         LOCAL_LDFLAGS=
7567         LOCAL_LDFLAGS2=
7568         LD_SHARED_OPTS=
7569         INSTALL_LIB="-m 644"
7570
7571         cf_cv_do_symlinks=no
7572         cf_ld_rpath_opt=
7573         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7574
7575         echo "$as_me:7575: checking if release/abi version should be used for shared libs" >&5
7576 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7577
7578 # Check whether --with-shlib-version or --without-shlib-version was given.
7579 if test "${with_shlib_version+set}" = set; then
7580   withval="$with_shlib_version"
7581   test -z "$withval" && withval=auto
7582         case $withval in #(vi
7583         yes) #(vi
7584                 cf_cv_shlib_version=auto
7585                 ;;
7586         rel|abi|auto|no) #(vi
7587                 cf_cv_shlib_version=$withval
7588                 ;;
7589         *)
7590                 { { echo "$as_me:7590: error: option value must be one of: rel, abi, auto or no" >&5
7591 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7592    { (exit 1); exit 1; }; }
7593                 ;;
7594         esac
7595
7596 else
7597   cf_cv_shlib_version=auto
7598 fi;
7599         echo "$as_me:7599: result: $cf_cv_shlib_version" >&5
7600 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7601
7602         cf_cv_rm_so_locs=no
7603
7604         # Some less-capable ports of gcc support only -fpic
7605         CC_SHARED_OPTS=
7606         if test "$GCC" = yes
7607         then
7608                 echo "$as_me:7608: checking which $CC option to use" >&5
7609 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7610                 cf_save_CFLAGS="$CFLAGS"
7611                 for CC_SHARED_OPTS in -fPIC -fpic ''
7612                 do
7613                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7614                         cat >conftest.$ac_ext <<_ACEOF
7615 #line 7615 "configure"
7616 #include "confdefs.h"
7617 #include <stdio.h>
7618 int
7619 main ()
7620 {
7621 int x = 1
7622   ;
7623   return 0;
7624 }
7625 _ACEOF
7626 rm -f conftest.$ac_objext
7627 if { (eval echo "$as_me:7627: \"$ac_compile\"") >&5
7628   (eval $ac_compile) 2>&5
7629   ac_status=$?
7630   echo "$as_me:7630: \$? = $ac_status" >&5
7631   (exit $ac_status); } &&
7632          { ac_try='test -s conftest.$ac_objext'
7633   { (eval echo "$as_me:7633: \"$ac_try\"") >&5
7634   (eval $ac_try) 2>&5
7635   ac_status=$?
7636   echo "$as_me:7636: \$? = $ac_status" >&5
7637   (exit $ac_status); }; }; then
7638   break
7639 else
7640   echo "$as_me: failed program was:" >&5
7641 cat conftest.$ac_ext >&5
7642 fi
7643 rm -f conftest.$ac_objext conftest.$ac_ext
7644                 done
7645                 echo "$as_me:7645: result: $CC_SHARED_OPTS" >&5
7646 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7647                 CFLAGS="$cf_save_CFLAGS"
7648         fi
7649
7650         cf_cv_shlib_version_infix=no
7651
7652         case $cf_cv_system_name in #(vi
7653         aix4.3-9*|aix[5-7]*) #(vi
7654                 if test "$GCC" = yes; then
7655                         CC_SHARED_OPTS=
7656                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7657                 else
7658                         # CC_SHARED_OPTS='-qpic=large -G'
7659                         # perhaps "-bM:SRE -bnoentry -bexpall"
7660                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
7661                 fi
7662                 ;;
7663         beos*) #(vi
7664                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7665                 ;;
7666         cygwin*) #(vi
7667                 CC_SHARED_OPTS=
7668                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7669                 cf_cv_shlib_version=cygdll
7670                 cf_cv_shlib_version_infix=cygdll
7671                 cat >mk_shared_lib.sh <<-CF_EOF
7672                 #!/bin/sh
7673                 SHARED_LIB=\$1
7674                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7675                 shift
7676                 cat <<-EOF
7677                 Linking shared library
7678                 ** SHARED_LIB \$SHARED_LIB
7679                 ** IMPORT_LIB \$IMPORT_LIB
7680 EOF
7681                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7682 CF_EOF
7683                 chmod +x mk_shared_lib.sh
7684                 ;;
7685         darwin*) #(vi
7686                 EXTRA_CFLAGS="-no-cpp-precomp"
7687                 CC_SHARED_OPTS="-dynamic"
7688                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7689                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7690                 cf_cv_shlib_version_infix=yes
7691                 echo "$as_me:7691: checking if ld -search_paths_first works" >&5
7692 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7693 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7694   echo $ECHO_N "(cached) $ECHO_C" >&6
7695 else
7696
7697                         cf_save_LDFLAGS=$LDFLAGS
7698                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7699                         cat >conftest.$ac_ext <<_ACEOF
7700 #line 7700 "configure"
7701 #include "confdefs.h"
7702
7703 int
7704 main ()
7705 {
7706 int i;
7707   ;
7708   return 0;
7709 }
7710 _ACEOF
7711 rm -f conftest.$ac_objext conftest$ac_exeext
7712 if { (eval echo "$as_me:7712: \"$ac_link\"") >&5
7713   (eval $ac_link) 2>&5
7714   ac_status=$?
7715   echo "$as_me:7715: \$? = $ac_status" >&5
7716   (exit $ac_status); } &&
7717          { ac_try='test -s conftest$ac_exeext'
7718   { (eval echo "$as_me:7718: \"$ac_try\"") >&5
7719   (eval $ac_try) 2>&5
7720   ac_status=$?
7721   echo "$as_me:7721: \$? = $ac_status" >&5
7722   (exit $ac_status); }; }; then
7723   cf_cv_ldflags_search_paths_first=yes
7724 else
7725   echo "$as_me: failed program was:" >&5
7726 cat conftest.$ac_ext >&5
7727 cf_cv_ldflags_search_paths_first=no
7728 fi
7729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7730                                 LDFLAGS=$cf_save_LDFLAGS
7731 fi
7732 echo "$as_me:7732: result: $cf_cv_ldflags_search_paths_first" >&5
7733 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7734                 if test $cf_cv_ldflags_search_paths_first = yes; then
7735                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7736                 fi
7737                 ;;
7738         hpux*) #(vi
7739                 # (tested with gcc 2.7.2 -- I don't have c89)
7740                 if test "$GCC" = yes; then
7741                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7742                 else
7743                         CC_SHARED_OPTS='+Z'
7744                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7745                 fi
7746                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7747                 # HP-UX shared libraries must be executable, and should be
7748                 # readonly to exploit a quirk in the memory manager.
7749                 INSTALL_LIB="-m 555"
7750                 ;;
7751         interix*)
7752                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7753                 if test "$cf_cv_shlib_version" = rel; then
7754                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
7755                 else
7756                         cf_shared_soname='`basename `'
7757                 fi
7758                 CC_SHARED_OPTS=
7759                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
7760                 ;;
7761         irix*) #(vi
7762                 if test "$cf_cv_enable_rpath" = yes ; then
7763                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7764                 fi
7765                 # tested with IRIX 5.2 and 'cc'.
7766                 if test "$GCC" != yes; then
7767                         CC_SHARED_OPTS='-KPIC'
7768                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7769                 else
7770                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7771                 fi
7772                 cf_cv_rm_so_locs=yes
7773                 ;;
7774         linux*|gnu*|k*bsd*-gnu) #(vi
7775                 if test "$DFT_LWR_MODEL" = "shared" ; then
7776                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7777                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7778                 fi
7779                 if test "$cf_cv_enable_rpath" = yes ; then
7780                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7781                 fi
7782
7783         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7784         if test "$cf_cv_shlib_version" = rel; then
7785                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7786         else
7787                 cf_cv_shared_soname='`basename $@`'
7788         fi
7789
7790                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7791                 ;;
7792         openbsd[2-9].*|mirbsd*) #(vi
7793                 if test "$DFT_LWR_MODEL" = "shared" ; then
7794                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7795                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7796                 fi
7797                 if test "$cf_cv_enable_rpath" = yes ; then
7798                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7799                 fi
7800                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7801
7802         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7803         if test "$cf_cv_shlib_version" = rel; then
7804                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7805         else
7806                 cf_cv_shared_soname='`basename $@`'
7807         fi
7808
7809                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7810                 ;;
7811         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7812                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7813                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7814                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7815                 ;;
7816         dragonfly*|freebsd*) #(vi
7817                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7818                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7819                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7820                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7821                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7822                 fi
7823
7824         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7825         if test "$cf_cv_shlib_version" = rel; then
7826                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7827         else
7828                 cf_cv_shared_soname='`basename $@`'
7829         fi
7830
7831                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7832                 ;;
7833         netbsd*) #(vi
7834                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7835                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7836                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7837                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7838                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7839                         if test "$cf_cv_shlib_version" = auto; then
7840                         if test -f /usr/libexec/ld.elf_so; then
7841                                 cf_cv_shlib_version=abi
7842                         else
7843                                 cf_cv_shlib_version=rel
7844                         fi
7845                         fi
7846
7847         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7848         if test "$cf_cv_shlib_version" = rel; then
7849                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7850         else
7851                 cf_cv_shared_soname='`basename $@`'
7852         fi
7853
7854                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7855                 else
7856                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7857                 fi
7858                 ;;
7859         osf*|mls+*) #(vi
7860                 # tested with OSF/1 V3.2 and 'cc'
7861                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7862                 # link with shared libs).
7863                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7864                 case $host_os in #(vi
7865                 osf4*)
7866                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7867                         ;;
7868                 esac
7869                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7870                 if test "$DFT_LWR_MODEL" = "shared" ; then
7871                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7872                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7873                 fi
7874                 cf_cv_rm_so_locs=yes
7875                 ;;
7876         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7877                 # tested with osr5.0.5
7878                 if test "$GCC" != yes; then
7879                         CC_SHARED_OPTS='-belf -KPIC'
7880                 fi
7881                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7882                 if test "$cf_cv_enable_rpath" = yes ; then
7883                         # only way is to set LD_RUN_PATH but no switch for it
7884                         RUN_PATH=$libdir
7885                 fi
7886                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7887                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7888                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7889                 ;;
7890         sunos4*) #(vi
7891                 # tested with SunOS 4.1.1 and gcc 2.7.0
7892                 if test "$GCC" != yes; then
7893                         CC_SHARED_OPTS='-KPIC'
7894                 fi
7895                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7896                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7897                 ;;
7898         solaris2*) #(vi
7899                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7900                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7901                 if test "$DFT_LWR_MODEL" = "shared" ; then
7902                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7903                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7904                 fi
7905                 if test "$cf_cv_enable_rpath" = yes ; then
7906                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7907                 fi
7908
7909         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7910         if test "$cf_cv_shlib_version" = rel; then
7911                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7912         else
7913                 cf_cv_shared_soname='`basename $@`'
7914         fi
7915
7916                 if test "$GCC" != yes; then
7917                         cf_save_CFLAGS="$CFLAGS"
7918                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7919                         do
7920                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7921                                 cat >conftest.$ac_ext <<_ACEOF
7922 #line 7922 "configure"
7923 #include "confdefs.h"
7924 #include <stdio.h>
7925 int
7926 main ()
7927 {
7928 printf("Hello\n");
7929   ;
7930   return 0;
7931 }
7932 _ACEOF
7933 rm -f conftest.$ac_objext
7934 if { (eval echo "$as_me:7934: \"$ac_compile\"") >&5
7935   (eval $ac_compile) 2>&5
7936   ac_status=$?
7937   echo "$as_me:7937: \$? = $ac_status" >&5
7938   (exit $ac_status); } &&
7939          { ac_try='test -s conftest.$ac_objext'
7940   { (eval echo "$as_me:7940: \"$ac_try\"") >&5
7941   (eval $ac_try) 2>&5
7942   ac_status=$?
7943   echo "$as_me:7943: \$? = $ac_status" >&5
7944   (exit $ac_status); }; }; then
7945   break
7946 else
7947   echo "$as_me: failed program was:" >&5
7948 cat conftest.$ac_ext >&5
7949 fi
7950 rm -f conftest.$ac_objext conftest.$ac_ext
7951                         done
7952                         CFLAGS="$cf_save_CFLAGS"
7953                         CC_SHARED_OPTS=$cf_shared_opts
7954                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7955                 else
7956                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7957                 fi
7958                 ;;
7959         sysv5uw7*|unix_sv*) #(vi
7960                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7961                 if test "$GCC" != yes; then
7962                         CC_SHARED_OPTS='-KPIC'
7963                 fi
7964                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7965                 ;;
7966         *)
7967                 CC_SHARED_OPTS='unknown'
7968                 MK_SHARED_LIB='echo unknown'
7969                 ;;
7970         esac
7971
7972         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7973         case "$cf_cv_shlib_version" in #(vi
7974         rel|abi)
7975                 case "$MK_SHARED_LIB" in #(vi
7976                 *'-o $@') #(vi
7977                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7978                         ;;
7979                 *)
7980                         { echo "$as_me:7980: WARNING: ignored --with-shlib-version" >&5
7981 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7982                         ;;
7983                 esac
7984                 ;;
7985         esac
7986
7987         # RPATH_LIST is a colon-separated list of directories
7988         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7989         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7990
7991 # The test/sample programs in the original tree link using rpath option.
7992 # Make it optional for packagers.
7993 if test -n "$LOCAL_LDFLAGS"
7994 then
7995         echo "$as_me:7995: checking if you want to link sample programs with rpath option" >&5
7996 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7997
7998 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7999 if test "${enable_rpath_link+set}" = set; then
8000   enableval="$enable_rpath_link"
8001   with_rpath_link=$enableval
8002 else
8003   with_rpath_link=yes
8004 fi;
8005         echo "$as_me:8005: result: $with_rpath_link" >&5
8006 echo "${ECHO_T}$with_rpath_link" >&6
8007         if test "$with_rpath_link" = no
8008         then
8009                 LOCAL_LDFLAGS=
8010                 LOCAL_LDFLAGS2=
8011         fi
8012 fi
8013
8014 ###############################################################################
8015
8016 ###   use option --enable-broken-linker to force on use of broken-linker support
8017 echo "$as_me:8017: checking if you want broken-linker support code" >&5
8018 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8019
8020 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8021 if test "${enable_broken_linker+set}" = set; then
8022   enableval="$enable_broken_linker"
8023   with_broken_linker=$enableval
8024 else
8025   with_broken_linker=${BROKEN_LINKER:-no}
8026 fi;
8027 echo "$as_me:8027: result: $with_broken_linker" >&5
8028 echo "${ECHO_T}$with_broken_linker" >&6
8029
8030 BROKEN_LINKER=0
8031 if test "$with_broken_linker" = yes ; then
8032         cat >>confdefs.h <<\EOF
8033 #define BROKEN_LINKER 1
8034 EOF
8035
8036         BROKEN_LINKER=1
8037 elif test "$DFT_LWR_MODEL" = shared ; then
8038         case $cf_cv_system_name in #(vi
8039         cygwin*)
8040                 cat >>confdefs.h <<\EOF
8041 #define BROKEN_LINKER 1
8042 EOF
8043
8044                 BROKEN_LINKER=1
8045                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8046
8047 echo "${as_me:-configure}:8047: testing cygwin linker is broken anyway ..." 1>&5
8048
8049                 ;;
8050         esac
8051 fi
8052
8053 # Check to define _XOPEN_SOURCE "automatically"
8054
8055 cf_XOPEN_SOURCE=500
8056 cf_POSIX_C_SOURCE=199506L
8057 cf_xopen_source=
8058
8059 case $host_os in #(vi
8060 aix[4-7]*) #(vi
8061         cf_xopen_source="-D_ALL_SOURCE"
8062         ;;
8063 cygwin) #(vi
8064         cf_XOPEN_SOURCE=600
8065         ;;
8066 darwin[0-8].*) #(vi
8067         cf_xopen_source="-D_APPLE_C_SOURCE"
8068         ;;
8069 darwin*) #(vi
8070         cf_xopen_source="-D_DARWIN_C_SOURCE"
8071         cf_XOPEN_SOURCE=
8072         ;;
8073 freebsd*|dragonfly*) #(vi
8074         # 5.x headers associate
8075         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8076         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8077         cf_POSIX_C_SOURCE=200112L
8078         cf_XOPEN_SOURCE=600
8079         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8080         ;;
8081 hpux11*) #(vi
8082         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8083         ;;
8084 hpux*) #(vi
8085         cf_xopen_source="-D_HPUX_SOURCE"
8086         ;;
8087 irix[56].*) #(vi
8088         cf_xopen_source="-D_SGI_SOURCE"
8089         cf_XOPEN_SOURCE=
8090         ;;
8091 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
8092
8093 echo "$as_me:8093: checking if we must define _GNU_SOURCE" >&5
8094 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8095 if test "${cf_cv_gnu_source+set}" = set; then
8096   echo $ECHO_N "(cached) $ECHO_C" >&6
8097 else
8098
8099 cat >conftest.$ac_ext <<_ACEOF
8100 #line 8100 "configure"
8101 #include "confdefs.h"
8102 #include <sys/types.h>
8103 int
8104 main ()
8105 {
8106
8107 #ifndef _XOPEN_SOURCE
8108 make an error
8109 #endif
8110   ;
8111   return 0;
8112 }
8113 _ACEOF
8114 rm -f conftest.$ac_objext
8115 if { (eval echo "$as_me:8115: \"$ac_compile\"") >&5
8116   (eval $ac_compile) 2>&5
8117   ac_status=$?
8118   echo "$as_me:8118: \$? = $ac_status" >&5
8119   (exit $ac_status); } &&
8120          { ac_try='test -s conftest.$ac_objext'
8121   { (eval echo "$as_me:8121: \"$ac_try\"") >&5
8122   (eval $ac_try) 2>&5
8123   ac_status=$?
8124   echo "$as_me:8124: \$? = $ac_status" >&5
8125   (exit $ac_status); }; }; then
8126   cf_cv_gnu_source=no
8127 else
8128   echo "$as_me: failed program was:" >&5
8129 cat conftest.$ac_ext >&5
8130 cf_save="$CPPFLAGS"
8131          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8132          cat >conftest.$ac_ext <<_ACEOF
8133 #line 8133 "configure"
8134 #include "confdefs.h"
8135 #include <sys/types.h>
8136 int
8137 main ()
8138 {
8139
8140 #ifdef _XOPEN_SOURCE
8141 make an error
8142 #endif
8143   ;
8144   return 0;
8145 }
8146 _ACEOF
8147 rm -f conftest.$ac_objext
8148 if { (eval echo "$as_me:8148: \"$ac_compile\"") >&5
8149   (eval $ac_compile) 2>&5
8150   ac_status=$?
8151   echo "$as_me:8151: \$? = $ac_status" >&5
8152   (exit $ac_status); } &&
8153          { ac_try='test -s conftest.$ac_objext'
8154   { (eval echo "$as_me:8154: \"$ac_try\"") >&5
8155   (eval $ac_try) 2>&5
8156   ac_status=$?
8157   echo "$as_me:8157: \$? = $ac_status" >&5
8158   (exit $ac_status); }; }; then
8159   cf_cv_gnu_source=no
8160 else
8161   echo "$as_me: failed program was:" >&5
8162 cat conftest.$ac_ext >&5
8163 cf_cv_gnu_source=yes
8164 fi
8165 rm -f conftest.$ac_objext conftest.$ac_ext
8166         CPPFLAGS="$cf_save"
8167
8168 fi
8169 rm -f conftest.$ac_objext conftest.$ac_ext
8170
8171 fi
8172 echo "$as_me:8172: result: $cf_cv_gnu_source" >&5
8173 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8174 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8175
8176         ;;
8177 mirbsd*) #(vi
8178         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8179         cf_XOPEN_SOURCE=
8180
8181 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8182
8183 cf_save_CFLAGS="$CFLAGS"
8184 cf_save_CPPFLAGS="$CPPFLAGS"
8185
8186 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8187         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8188                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8189
8190 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8191         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8192                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8193
8194 echo "$as_me:8194: checking if we should define _POSIX_C_SOURCE" >&5
8195 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8196 if test "${cf_cv_posix_c_source+set}" = set; then
8197   echo $ECHO_N "(cached) $ECHO_C" >&6
8198 else
8199
8200 echo "${as_me:-configure}:8200: testing if the symbol is already defined go no further ..." 1>&5
8201
8202         cat >conftest.$ac_ext <<_ACEOF
8203 #line 8203 "configure"
8204 #include "confdefs.h"
8205 #include <sys/types.h>
8206 int
8207 main ()
8208 {
8209
8210 #ifndef _POSIX_C_SOURCE
8211 make an error
8212 #endif
8213   ;
8214   return 0;
8215 }
8216 _ACEOF
8217 rm -f conftest.$ac_objext
8218 if { (eval echo "$as_me:8218: \"$ac_compile\"") >&5
8219   (eval $ac_compile) 2>&5
8220   ac_status=$?
8221   echo "$as_me:8221: \$? = $ac_status" >&5
8222   (exit $ac_status); } &&
8223          { ac_try='test -s conftest.$ac_objext'
8224   { (eval echo "$as_me:8224: \"$ac_try\"") >&5
8225   (eval $ac_try) 2>&5
8226   ac_status=$?
8227   echo "$as_me:8227: \$? = $ac_status" >&5
8228   (exit $ac_status); }; }; then
8229   cf_cv_posix_c_source=no
8230 else
8231   echo "$as_me: failed program was:" >&5
8232 cat conftest.$ac_ext >&5
8233 cf_want_posix_source=no
8234          case .$cf_POSIX_C_SOURCE in #(vi
8235          .[12]??*) #(vi
8236                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8237                 ;;
8238          .2) #(vi
8239                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8240                 cf_want_posix_source=yes
8241                 ;;
8242          .*)
8243                 cf_want_posix_source=yes
8244                 ;;
8245          esac
8246          if test "$cf_want_posix_source" = yes ; then
8247                 cat >conftest.$ac_ext <<_ACEOF
8248 #line 8248 "configure"
8249 #include "confdefs.h"
8250 #include <sys/types.h>
8251 int
8252 main ()
8253 {
8254
8255 #ifdef _POSIX_SOURCE
8256 make an error
8257 #endif
8258   ;
8259   return 0;
8260 }
8261 _ACEOF
8262 rm -f conftest.$ac_objext
8263 if { (eval echo "$as_me:8263: \"$ac_compile\"") >&5
8264   (eval $ac_compile) 2>&5
8265   ac_status=$?
8266   echo "$as_me:8266: \$? = $ac_status" >&5
8267   (exit $ac_status); } &&
8268          { ac_try='test -s conftest.$ac_objext'
8269   { (eval echo "$as_me:8269: \"$ac_try\"") >&5
8270   (eval $ac_try) 2>&5
8271   ac_status=$?
8272   echo "$as_me:8272: \$? = $ac_status" >&5
8273   (exit $ac_status); }; }; then
8274   :
8275 else
8276   echo "$as_me: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8278 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8279 fi
8280 rm -f conftest.$ac_objext conftest.$ac_ext
8281          fi
8282
8283 echo "${as_me:-configure}:8283: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8284
8285          CFLAGS="$cf_trim_CFLAGS"
8286          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8287
8288 echo "${as_me:-configure}:8288: testing if the second compile does not leave our definition intact error ..." 1>&5
8289
8290          cat >conftest.$ac_ext <<_ACEOF
8291 #line 8291 "configure"
8292 #include "confdefs.h"
8293 #include <sys/types.h>
8294 int
8295 main ()
8296 {
8297
8298 #ifndef _POSIX_C_SOURCE
8299 make an error
8300 #endif
8301   ;
8302   return 0;
8303 }
8304 _ACEOF
8305 rm -f conftest.$ac_objext
8306 if { (eval echo "$as_me:8306: \"$ac_compile\"") >&5
8307   (eval $ac_compile) 2>&5
8308   ac_status=$?
8309   echo "$as_me:8309: \$? = $ac_status" >&5
8310   (exit $ac_status); } &&
8311          { ac_try='test -s conftest.$ac_objext'
8312   { (eval echo "$as_me:8312: \"$ac_try\"") >&5
8313   (eval $ac_try) 2>&5
8314   ac_status=$?
8315   echo "$as_me:8315: \$? = $ac_status" >&5
8316   (exit $ac_status); }; }; then
8317   :
8318 else
8319   echo "$as_me: failed program was:" >&5
8320 cat conftest.$ac_ext >&5
8321 cf_cv_posix_c_source=no
8322 fi
8323 rm -f conftest.$ac_objext conftest.$ac_ext
8324          CFLAGS="$cf_save_CFLAGS"
8325          CPPFLAGS="$cf_save_CPPFLAGS"
8326
8327 fi
8328 rm -f conftest.$ac_objext conftest.$ac_ext
8329
8330 fi
8331 echo "$as_me:8331: result: $cf_cv_posix_c_source" >&5
8332 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8333
8334 if test "$cf_cv_posix_c_source" != no ; then
8335         CFLAGS="$cf_trim_CFLAGS"
8336         CPPFLAGS="$cf_trim_CPPFLAGS"
8337
8338 cf_fix_cppflags=no
8339 cf_new_cflags=
8340 cf_new_cppflags=
8341 cf_new_extra_cppflags=
8342
8343 for cf_add_cflags in $cf_cv_posix_c_source
8344 do
8345 case $cf_fix_cppflags in
8346 no)
8347         case $cf_add_cflags in #(vi
8348         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8349                 case $cf_add_cflags in
8350                 -D*)
8351                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8352
8353                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8354                                 && test -z "${cf_tst_cflags}" \
8355                                 && cf_fix_cppflags=yes
8356
8357                         if test $cf_fix_cppflags = yes ; then
8358                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8359                                 continue
8360                         elif test "${cf_tst_cflags}" = "\"'" ; then
8361                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8362                                 continue
8363                         fi
8364                         ;;
8365                 esac
8366                 case "$CPPFLAGS" in
8367                 *$cf_add_cflags) #(vi
8368                         ;;
8369                 *) #(vi
8370                         case $cf_add_cflags in #(vi
8371                         -D*)
8372                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8373
8374 CPPFLAGS=`echo "$CPPFLAGS" | \
8375         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8376                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8377
8378                                 ;;
8379                         esac
8380                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8381                         ;;
8382                 esac
8383                 ;;
8384         *)
8385                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8386                 ;;
8387         esac
8388         ;;
8389 yes)
8390         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8391
8392         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8393
8394         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8395                 && test -z "${cf_tst_cflags}" \
8396                 && cf_fix_cppflags=no
8397         ;;
8398 esac
8399 done
8400
8401 if test -n "$cf_new_cflags" ; then
8402
8403         CFLAGS="$CFLAGS $cf_new_cflags"
8404 fi
8405
8406 if test -n "$cf_new_cppflags" ; then
8407
8408         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8409 fi
8410
8411 if test -n "$cf_new_extra_cppflags" ; then
8412
8413         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8414 fi
8415
8416 fi
8417
8418         ;;
8419 netbsd*) #(vi
8420         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8421         ;;
8422 openbsd[4-9]*) #(vi
8423         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8424         cf_xopen_source="-D_BSD_SOURCE"
8425         cf_XOPEN_SOURCE=600
8426         ;;
8427 openbsd*) #(vi
8428         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8429         ;;
8430 osf[45]*) #(vi
8431         cf_xopen_source="-D_OSF_SOURCE"
8432         ;;
8433 nto-qnx*) #(vi
8434         cf_xopen_source="-D_QNX_SOURCE"
8435         ;;
8436 sco*) #(vi
8437         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8438         ;;
8439 solaris2.*) #(vi
8440         cf_xopen_source="-D__EXTENSIONS__"
8441         ;;
8442 *)
8443
8444 echo "$as_me:8444: checking if we should define _XOPEN_SOURCE" >&5
8445 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8446 if test "${cf_cv_xopen_source+set}" = set; then
8447   echo $ECHO_N "(cached) $ECHO_C" >&6
8448 else
8449
8450         cat >conftest.$ac_ext <<_ACEOF
8451 #line 8451 "configure"
8452 #include "confdefs.h"
8453
8454 #include <stdlib.h>
8455 #include <string.h>
8456 #include <sys/types.h>
8457
8458 int
8459 main ()
8460 {
8461
8462 #ifndef _XOPEN_SOURCE
8463 make an error
8464 #endif
8465   ;
8466   return 0;
8467 }
8468 _ACEOF
8469 rm -f conftest.$ac_objext
8470 if { (eval echo "$as_me:8470: \"$ac_compile\"") >&5
8471   (eval $ac_compile) 2>&5
8472   ac_status=$?
8473   echo "$as_me:8473: \$? = $ac_status" >&5
8474   (exit $ac_status); } &&
8475          { ac_try='test -s conftest.$ac_objext'
8476   { (eval echo "$as_me:8476: \"$ac_try\"") >&5
8477   (eval $ac_try) 2>&5
8478   ac_status=$?
8479   echo "$as_me:8479: \$? = $ac_status" >&5
8480   (exit $ac_status); }; }; then
8481   cf_cv_xopen_source=no
8482 else
8483   echo "$as_me: failed program was:" >&5
8484 cat conftest.$ac_ext >&5
8485 cf_save="$CPPFLAGS"
8486          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8487          cat >conftest.$ac_ext <<_ACEOF
8488 #line 8488 "configure"
8489 #include "confdefs.h"
8490
8491 #include <stdlib.h>
8492 #include <string.h>
8493 #include <sys/types.h>
8494
8495 int
8496 main ()
8497 {
8498
8499 #ifdef _XOPEN_SOURCE
8500 make an error
8501 #endif
8502   ;
8503   return 0;
8504 }
8505 _ACEOF
8506 rm -f conftest.$ac_objext
8507 if { (eval echo "$as_me:8507: \"$ac_compile\"") >&5
8508   (eval $ac_compile) 2>&5
8509   ac_status=$?
8510   echo "$as_me:8510: \$? = $ac_status" >&5
8511   (exit $ac_status); } &&
8512          { ac_try='test -s conftest.$ac_objext'
8513   { (eval echo "$as_me:8513: \"$ac_try\"") >&5
8514   (eval $ac_try) 2>&5
8515   ac_status=$?
8516   echo "$as_me:8516: \$? = $ac_status" >&5
8517   (exit $ac_status); }; }; then
8518   cf_cv_xopen_source=no
8519 else
8520   echo "$as_me: failed program was:" >&5
8521 cat conftest.$ac_ext >&5
8522 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8523 fi
8524 rm -f conftest.$ac_objext conftest.$ac_ext
8525         CPPFLAGS="$cf_save"
8526
8527 fi
8528 rm -f conftest.$ac_objext conftest.$ac_ext
8529
8530 fi
8531 echo "$as_me:8531: result: $cf_cv_xopen_source" >&5
8532 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8533
8534 if test "$cf_cv_xopen_source" != no ; then
8535
8536 CFLAGS=`echo "$CFLAGS" | \
8537         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8538                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8539
8540 CPPFLAGS=`echo "$CPPFLAGS" | \
8541         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8542                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8543
8544         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8545
8546 cf_fix_cppflags=no
8547 cf_new_cflags=
8548 cf_new_cppflags=
8549 cf_new_extra_cppflags=
8550
8551 for cf_add_cflags in $cf_temp_xopen_source
8552 do
8553 case $cf_fix_cppflags in
8554 no)
8555         case $cf_add_cflags in #(vi
8556         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8557                 case $cf_add_cflags in
8558                 -D*)
8559                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8560
8561                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8562                                 && test -z "${cf_tst_cflags}" \
8563                                 && cf_fix_cppflags=yes
8564
8565                         if test $cf_fix_cppflags = yes ; then
8566                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8567                                 continue
8568                         elif test "${cf_tst_cflags}" = "\"'" ; then
8569                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8570                                 continue
8571                         fi
8572                         ;;
8573                 esac
8574                 case "$CPPFLAGS" in
8575                 *$cf_add_cflags) #(vi
8576                         ;;
8577                 *) #(vi
8578                         case $cf_add_cflags in #(vi
8579                         -D*)
8580                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8581
8582 CPPFLAGS=`echo "$CPPFLAGS" | \
8583         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8584                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8585
8586                                 ;;
8587                         esac
8588                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8589                         ;;
8590                 esac
8591                 ;;
8592         *)
8593                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8594                 ;;
8595         esac
8596         ;;
8597 yes)
8598         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8599
8600         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8601
8602         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8603                 && test -z "${cf_tst_cflags}" \
8604                 && cf_fix_cppflags=no
8605         ;;
8606 esac
8607 done
8608
8609 if test -n "$cf_new_cflags" ; then
8610
8611         CFLAGS="$CFLAGS $cf_new_cflags"
8612 fi
8613
8614 if test -n "$cf_new_cppflags" ; then
8615
8616         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8617 fi
8618
8619 if test -n "$cf_new_extra_cppflags" ; then
8620
8621         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8622 fi
8623
8624 fi
8625
8626 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8627
8628 cf_save_CFLAGS="$CFLAGS"
8629 cf_save_CPPFLAGS="$CPPFLAGS"
8630
8631 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8632         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8633                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8634
8635 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8636         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8637                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8638
8639 echo "$as_me:8639: checking if we should define _POSIX_C_SOURCE" >&5
8640 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8641 if test "${cf_cv_posix_c_source+set}" = set; then
8642   echo $ECHO_N "(cached) $ECHO_C" >&6
8643 else
8644
8645 echo "${as_me:-configure}:8645: testing if the symbol is already defined go no further ..." 1>&5
8646
8647         cat >conftest.$ac_ext <<_ACEOF
8648 #line 8648 "configure"
8649 #include "confdefs.h"
8650 #include <sys/types.h>
8651 int
8652 main ()
8653 {
8654
8655 #ifndef _POSIX_C_SOURCE
8656 make an error
8657 #endif
8658   ;
8659   return 0;
8660 }
8661 _ACEOF
8662 rm -f conftest.$ac_objext
8663 if { (eval echo "$as_me:8663: \"$ac_compile\"") >&5
8664   (eval $ac_compile) 2>&5
8665   ac_status=$?
8666   echo "$as_me:8666: \$? = $ac_status" >&5
8667   (exit $ac_status); } &&
8668          { ac_try='test -s conftest.$ac_objext'
8669   { (eval echo "$as_me:8669: \"$ac_try\"") >&5
8670   (eval $ac_try) 2>&5
8671   ac_status=$?
8672   echo "$as_me:8672: \$? = $ac_status" >&5
8673   (exit $ac_status); }; }; then
8674   cf_cv_posix_c_source=no
8675 else
8676   echo "$as_me: failed program was:" >&5
8677 cat conftest.$ac_ext >&5
8678 cf_want_posix_source=no
8679          case .$cf_POSIX_C_SOURCE in #(vi
8680          .[12]??*) #(vi
8681                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8682                 ;;
8683          .2) #(vi
8684                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8685                 cf_want_posix_source=yes
8686                 ;;
8687          .*)
8688                 cf_want_posix_source=yes
8689                 ;;
8690          esac
8691          if test "$cf_want_posix_source" = yes ; then
8692                 cat >conftest.$ac_ext <<_ACEOF
8693 #line 8693 "configure"
8694 #include "confdefs.h"
8695 #include <sys/types.h>
8696 int
8697 main ()
8698 {
8699
8700 #ifdef _POSIX_SOURCE
8701 make an error
8702 #endif
8703   ;
8704   return 0;
8705 }
8706 _ACEOF
8707 rm -f conftest.$ac_objext
8708 if { (eval echo "$as_me:8708: \"$ac_compile\"") >&5
8709   (eval $ac_compile) 2>&5
8710   ac_status=$?
8711   echo "$as_me:8711: \$? = $ac_status" >&5
8712   (exit $ac_status); } &&
8713          { ac_try='test -s conftest.$ac_objext'
8714   { (eval echo "$as_me:8714: \"$ac_try\"") >&5
8715   (eval $ac_try) 2>&5
8716   ac_status=$?
8717   echo "$as_me:8717: \$? = $ac_status" >&5
8718   (exit $ac_status); }; }; then
8719   :
8720 else
8721   echo "$as_me: failed program was:" >&5
8722 cat conftest.$ac_ext >&5
8723 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8724 fi
8725 rm -f conftest.$ac_objext conftest.$ac_ext
8726          fi
8727
8728 echo "${as_me:-configure}:8728: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8729
8730          CFLAGS="$cf_trim_CFLAGS"
8731          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8732
8733 echo "${as_me:-configure}:8733: testing if the second compile does not leave our definition intact error ..." 1>&5
8734
8735          cat >conftest.$ac_ext <<_ACEOF
8736 #line 8736 "configure"
8737 #include "confdefs.h"
8738 #include <sys/types.h>
8739 int
8740 main ()
8741 {
8742
8743 #ifndef _POSIX_C_SOURCE
8744 make an error
8745 #endif
8746   ;
8747   return 0;
8748 }
8749 _ACEOF
8750 rm -f conftest.$ac_objext
8751 if { (eval echo "$as_me:8751: \"$ac_compile\"") >&5
8752   (eval $ac_compile) 2>&5
8753   ac_status=$?
8754   echo "$as_me:8754: \$? = $ac_status" >&5
8755   (exit $ac_status); } &&
8756          { ac_try='test -s conftest.$ac_objext'
8757   { (eval echo "$as_me:8757: \"$ac_try\"") >&5
8758   (eval $ac_try) 2>&5
8759   ac_status=$?
8760   echo "$as_me:8760: \$? = $ac_status" >&5
8761   (exit $ac_status); }; }; then
8762   :
8763 else
8764   echo "$as_me: failed program was:" >&5
8765 cat conftest.$ac_ext >&5
8766 cf_cv_posix_c_source=no
8767 fi
8768 rm -f conftest.$ac_objext conftest.$ac_ext
8769          CFLAGS="$cf_save_CFLAGS"
8770          CPPFLAGS="$cf_save_CPPFLAGS"
8771
8772 fi
8773 rm -f conftest.$ac_objext conftest.$ac_ext
8774
8775 fi
8776 echo "$as_me:8776: result: $cf_cv_posix_c_source" >&5
8777 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8778
8779 if test "$cf_cv_posix_c_source" != no ; then
8780         CFLAGS="$cf_trim_CFLAGS"
8781         CPPFLAGS="$cf_trim_CPPFLAGS"
8782
8783 cf_fix_cppflags=no
8784 cf_new_cflags=
8785 cf_new_cppflags=
8786 cf_new_extra_cppflags=
8787
8788 for cf_add_cflags in $cf_cv_posix_c_source
8789 do
8790 case $cf_fix_cppflags in
8791 no)
8792         case $cf_add_cflags in #(vi
8793         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8794                 case $cf_add_cflags in
8795                 -D*)
8796                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8797
8798                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8799                                 && test -z "${cf_tst_cflags}" \
8800                                 && cf_fix_cppflags=yes
8801
8802                         if test $cf_fix_cppflags = yes ; then
8803                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8804                                 continue
8805                         elif test "${cf_tst_cflags}" = "\"'" ; then
8806                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8807                                 continue
8808                         fi
8809                         ;;
8810                 esac
8811                 case "$CPPFLAGS" in
8812                 *$cf_add_cflags) #(vi
8813                         ;;
8814                 *) #(vi
8815                         case $cf_add_cflags in #(vi
8816                         -D*)
8817                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8818
8819 CPPFLAGS=`echo "$CPPFLAGS" | \
8820         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8821                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8822
8823                                 ;;
8824                         esac
8825                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8826                         ;;
8827                 esac
8828                 ;;
8829         *)
8830                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8831                 ;;
8832         esac
8833         ;;
8834 yes)
8835         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8836
8837         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8838
8839         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8840                 && test -z "${cf_tst_cflags}" \
8841                 && cf_fix_cppflags=no
8842         ;;
8843 esac
8844 done
8845
8846 if test -n "$cf_new_cflags" ; then
8847
8848         CFLAGS="$CFLAGS $cf_new_cflags"
8849 fi
8850
8851 if test -n "$cf_new_cppflags" ; then
8852
8853         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8854 fi
8855
8856 if test -n "$cf_new_extra_cppflags" ; then
8857
8858         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8859 fi
8860
8861 fi
8862
8863         ;;
8864 esac
8865
8866 if test -n "$cf_xopen_source" ; then
8867
8868 cf_fix_cppflags=no
8869 cf_new_cflags=
8870 cf_new_cppflags=
8871 cf_new_extra_cppflags=
8872
8873 for cf_add_cflags in $cf_xopen_source
8874 do
8875 case $cf_fix_cppflags in
8876 no)
8877         case $cf_add_cflags in #(vi
8878         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8879                 case $cf_add_cflags in
8880                 -D*)
8881                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8882
8883                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8884                                 && test -z "${cf_tst_cflags}" \
8885                                 && cf_fix_cppflags=yes
8886
8887                         if test $cf_fix_cppflags = yes ; then
8888                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8889                                 continue
8890                         elif test "${cf_tst_cflags}" = "\"'" ; then
8891                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8892                                 continue
8893                         fi
8894                         ;;
8895                 esac
8896                 case "$CPPFLAGS" in
8897                 *$cf_add_cflags) #(vi
8898                         ;;
8899                 *) #(vi
8900                         case $cf_add_cflags in #(vi
8901                         -D*)
8902                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8903
8904 CPPFLAGS=`echo "$CPPFLAGS" | \
8905         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8906                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8907
8908                                 ;;
8909                         esac
8910                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8911                         ;;
8912                 esac
8913                 ;;
8914         *)
8915                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8916                 ;;
8917         esac
8918         ;;
8919 yes)
8920         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8921
8922         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8923
8924         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8925                 && test -z "${cf_tst_cflags}" \
8926                 && cf_fix_cppflags=no
8927         ;;
8928 esac
8929 done
8930
8931 if test -n "$cf_new_cflags" ; then
8932
8933         CFLAGS="$CFLAGS $cf_new_cflags"
8934 fi
8935
8936 if test -n "$cf_new_cppflags" ; then
8937
8938         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8939 fi
8940
8941 if test -n "$cf_new_extra_cppflags" ; then
8942
8943         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8944 fi
8945
8946 fi
8947
8948 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8949         echo "$as_me:8949: checking if _XOPEN_SOURCE really is set" >&5
8950 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8951         cat >conftest.$ac_ext <<_ACEOF
8952 #line 8952 "configure"
8953 #include "confdefs.h"
8954 #include <stdlib.h>
8955 int
8956 main ()
8957 {
8958
8959 #ifndef _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_XOPEN_SOURCE_set=yes
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 cat conftest.$ac_ext >&5
8982 cf_XOPEN_SOURCE_set=no
8983 fi
8984 rm -f conftest.$ac_objext conftest.$ac_ext
8985         echo "$as_me:8985: result: $cf_XOPEN_SOURCE_set" >&5
8986 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8987         if test $cf_XOPEN_SOURCE_set = yes
8988         then
8989                 cat >conftest.$ac_ext <<_ACEOF
8990 #line 8990 "configure"
8991 #include "confdefs.h"
8992 #include <stdlib.h>
8993 int
8994 main ()
8995 {
8996
8997 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8998 make an error
8999 #endif
9000   ;
9001   return 0;
9002 }
9003 _ACEOF
9004 rm -f conftest.$ac_objext
9005 if { (eval echo "$as_me:9005: \"$ac_compile\"") >&5
9006   (eval $ac_compile) 2>&5
9007   ac_status=$?
9008   echo "$as_me:9008: \$? = $ac_status" >&5
9009   (exit $ac_status); } &&
9010          { ac_try='test -s conftest.$ac_objext'
9011   { (eval echo "$as_me:9011: \"$ac_try\"") >&5
9012   (eval $ac_try) 2>&5
9013   ac_status=$?
9014   echo "$as_me:9014: \$? = $ac_status" >&5
9015   (exit $ac_status); }; }; then
9016   cf_XOPEN_SOURCE_set_ok=yes
9017 else
9018   echo "$as_me: failed program was:" >&5
9019 cat conftest.$ac_ext >&5
9020 cf_XOPEN_SOURCE_set_ok=no
9021 fi
9022 rm -f conftest.$ac_objext conftest.$ac_ext
9023                 if test $cf_XOPEN_SOURCE_set_ok = no
9024                 then
9025                         { echo "$as_me:9025: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9026 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9027                 fi
9028         else
9029
9030 echo "$as_me:9030: checking if we should define _XOPEN_SOURCE" >&5
9031 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9032 if test "${cf_cv_xopen_source+set}" = set; then
9033   echo $ECHO_N "(cached) $ECHO_C" >&6
9034 else
9035
9036         cat >conftest.$ac_ext <<_ACEOF
9037 #line 9037 "configure"
9038 #include "confdefs.h"
9039
9040 #include <stdlib.h>
9041 #include <string.h>
9042 #include <sys/types.h>
9043
9044 int
9045 main ()
9046 {
9047
9048 #ifndef _XOPEN_SOURCE
9049 make an error
9050 #endif
9051   ;
9052   return 0;
9053 }
9054 _ACEOF
9055 rm -f conftest.$ac_objext
9056 if { (eval echo "$as_me:9056: \"$ac_compile\"") >&5
9057   (eval $ac_compile) 2>&5
9058   ac_status=$?
9059   echo "$as_me:9059: \$? = $ac_status" >&5
9060   (exit $ac_status); } &&
9061          { ac_try='test -s conftest.$ac_objext'
9062   { (eval echo "$as_me:9062: \"$ac_try\"") >&5
9063   (eval $ac_try) 2>&5
9064   ac_status=$?
9065   echo "$as_me:9065: \$? = $ac_status" >&5
9066   (exit $ac_status); }; }; then
9067   cf_cv_xopen_source=no
9068 else
9069   echo "$as_me: failed program was:" >&5
9070 cat conftest.$ac_ext >&5
9071 cf_save="$CPPFLAGS"
9072          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9073          cat >conftest.$ac_ext <<_ACEOF
9074 #line 9074 "configure"
9075 #include "confdefs.h"
9076
9077 #include <stdlib.h>
9078 #include <string.h>
9079 #include <sys/types.h>
9080
9081 int
9082 main ()
9083 {
9084
9085 #ifdef _XOPEN_SOURCE
9086 make an error
9087 #endif
9088   ;
9089   return 0;
9090 }
9091 _ACEOF
9092 rm -f conftest.$ac_objext
9093 if { (eval echo "$as_me:9093: \"$ac_compile\"") >&5
9094   (eval $ac_compile) 2>&5
9095   ac_status=$?
9096   echo "$as_me:9096: \$? = $ac_status" >&5
9097   (exit $ac_status); } &&
9098          { ac_try='test -s conftest.$ac_objext'
9099   { (eval echo "$as_me:9099: \"$ac_try\"") >&5
9100   (eval $ac_try) 2>&5
9101   ac_status=$?
9102   echo "$as_me:9102: \$? = $ac_status" >&5
9103   (exit $ac_status); }; }; then
9104   cf_cv_xopen_source=no
9105 else
9106   echo "$as_me: failed program was:" >&5
9107 cat conftest.$ac_ext >&5
9108 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9109 fi
9110 rm -f conftest.$ac_objext conftest.$ac_ext
9111         CPPFLAGS="$cf_save"
9112
9113 fi
9114 rm -f conftest.$ac_objext conftest.$ac_ext
9115
9116 fi
9117 echo "$as_me:9117: result: $cf_cv_xopen_source" >&5
9118 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9119
9120 if test "$cf_cv_xopen_source" != no ; then
9121
9122 CFLAGS=`echo "$CFLAGS" | \
9123         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9124                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9125
9126 CPPFLAGS=`echo "$CPPFLAGS" | \
9127         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9128                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9129
9130         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9131
9132 cf_fix_cppflags=no
9133 cf_new_cflags=
9134 cf_new_cppflags=
9135 cf_new_extra_cppflags=
9136
9137 for cf_add_cflags in $cf_temp_xopen_source
9138 do
9139 case $cf_fix_cppflags in
9140 no)
9141         case $cf_add_cflags in #(vi
9142         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9143                 case $cf_add_cflags in
9144                 -D*)
9145                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9146
9147                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9148                                 && test -z "${cf_tst_cflags}" \
9149                                 && cf_fix_cppflags=yes
9150
9151                         if test $cf_fix_cppflags = yes ; then
9152                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9153                                 continue
9154                         elif test "${cf_tst_cflags}" = "\"'" ; then
9155                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9156                                 continue
9157                         fi
9158                         ;;
9159                 esac
9160                 case "$CPPFLAGS" in
9161                 *$cf_add_cflags) #(vi
9162                         ;;
9163                 *) #(vi
9164                         case $cf_add_cflags in #(vi
9165                         -D*)
9166                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9167
9168 CPPFLAGS=`echo "$CPPFLAGS" | \
9169         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9170                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9171
9172                                 ;;
9173                         esac
9174                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9175                         ;;
9176                 esac
9177                 ;;
9178         *)
9179                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9180                 ;;
9181         esac
9182         ;;
9183 yes)
9184         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9185
9186         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9187
9188         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9189                 && test -z "${cf_tst_cflags}" \
9190                 && cf_fix_cppflags=no
9191         ;;
9192 esac
9193 done
9194
9195 if test -n "$cf_new_cflags" ; then
9196
9197         CFLAGS="$CFLAGS $cf_new_cflags"
9198 fi
9199
9200 if test -n "$cf_new_cppflags" ; then
9201
9202         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9203 fi
9204
9205 if test -n "$cf_new_extra_cppflags" ; then
9206
9207         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9208 fi
9209
9210 fi
9211
9212         fi
9213 fi
9214
9215 # Check whether --enable-largefile or --disable-largefile was given.
9216 if test "${enable_largefile+set}" = set; then
9217   enableval="$enable_largefile"
9218
9219 fi;
9220 if test "$enable_largefile" != no; then
9221
9222   echo "$as_me:9222: checking for special C compiler options needed for large files" >&5
9223 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9224 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9225   echo $ECHO_N "(cached) $ECHO_C" >&6
9226 else
9227   ac_cv_sys_largefile_CC=no
9228      if test "$GCC" != yes; then
9229        ac_save_CC=$CC
9230        while :; do
9231          # IRIX 6.2 and later do not support large files by default,
9232          # so use the C compiler's -n32 option if that helps.
9233          cat >conftest.$ac_ext <<_ACEOF
9234 #line 9234 "configure"
9235 #include "confdefs.h"
9236 #include <sys/types.h>
9237  /* Check that off_t can represent 2**63 - 1 correctly.
9238     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9239     since some C++ compilers masquerading as C compilers
9240     incorrectly reject 9223372036854775807.  */
9241 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9242   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9243                        && LARGE_OFF_T % 2147483647 == 1)
9244                       ? 1 : -1];
9245 int
9246 main ()
9247 {
9248
9249   ;
9250   return 0;
9251 }
9252 _ACEOF
9253          rm -f conftest.$ac_objext
9254 if { (eval echo "$as_me:9254: \"$ac_compile\"") >&5
9255   (eval $ac_compile) 2>&5
9256   ac_status=$?
9257   echo "$as_me:9257: \$? = $ac_status" >&5
9258   (exit $ac_status); } &&
9259          { ac_try='test -s conftest.$ac_objext'
9260   { (eval echo "$as_me:9260: \"$ac_try\"") >&5
9261   (eval $ac_try) 2>&5
9262   ac_status=$?
9263   echo "$as_me:9263: \$? = $ac_status" >&5
9264   (exit $ac_status); }; }; then
9265   break
9266 else
9267   echo "$as_me: failed program was:" >&5
9268 cat conftest.$ac_ext >&5
9269 fi
9270 rm -f conftest.$ac_objext
9271          CC="$CC -n32"
9272          rm -f conftest.$ac_objext
9273 if { (eval echo "$as_me:9273: \"$ac_compile\"") >&5
9274   (eval $ac_compile) 2>&5
9275   ac_status=$?
9276   echo "$as_me:9276: \$? = $ac_status" >&5
9277   (exit $ac_status); } &&
9278          { ac_try='test -s conftest.$ac_objext'
9279   { (eval echo "$as_me:9279: \"$ac_try\"") >&5
9280   (eval $ac_try) 2>&5
9281   ac_status=$?
9282   echo "$as_me:9282: \$? = $ac_status" >&5
9283   (exit $ac_status); }; }; then
9284   ac_cv_sys_largefile_CC=' -n32'; break
9285 else
9286   echo "$as_me: failed program was:" >&5
9287 cat conftest.$ac_ext >&5
9288 fi
9289 rm -f conftest.$ac_objext
9290          break
9291        done
9292        CC=$ac_save_CC
9293        rm -f conftest.$ac_ext
9294     fi
9295 fi
9296 echo "$as_me:9296: result: $ac_cv_sys_largefile_CC" >&5
9297 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9298   if test "$ac_cv_sys_largefile_CC" != no; then
9299     CC=$CC$ac_cv_sys_largefile_CC
9300   fi
9301
9302   echo "$as_me:9302: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9303 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9304 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9305   echo $ECHO_N "(cached) $ECHO_C" >&6
9306 else
9307   while :; do
9308   ac_cv_sys_file_offset_bits=no
9309   cat >conftest.$ac_ext <<_ACEOF
9310 #line 9310 "configure"
9311 #include "confdefs.h"
9312 #include <sys/types.h>
9313  /* Check that off_t can represent 2**63 - 1 correctly.
9314     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9315     since some C++ compilers masquerading as C compilers
9316     incorrectly reject 9223372036854775807.  */
9317 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9318   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9319                        && LARGE_OFF_T % 2147483647 == 1)
9320                       ? 1 : -1];
9321 int
9322 main ()
9323 {
9324
9325   ;
9326   return 0;
9327 }
9328 _ACEOF
9329 rm -f conftest.$ac_objext
9330 if { (eval echo "$as_me:9330: \"$ac_compile\"") >&5
9331   (eval $ac_compile) 2>&5
9332   ac_status=$?
9333   echo "$as_me:9333: \$? = $ac_status" >&5
9334   (exit $ac_status); } &&
9335          { ac_try='test -s conftest.$ac_objext'
9336   { (eval echo "$as_me:9336: \"$ac_try\"") >&5
9337   (eval $ac_try) 2>&5
9338   ac_status=$?
9339   echo "$as_me:9339: \$? = $ac_status" >&5
9340   (exit $ac_status); }; }; then
9341   break
9342 else
9343   echo "$as_me: failed program was:" >&5
9344 cat conftest.$ac_ext >&5
9345 fi
9346 rm -f conftest.$ac_objext conftest.$ac_ext
9347   cat >conftest.$ac_ext <<_ACEOF
9348 #line 9348 "configure"
9349 #include "confdefs.h"
9350 #define _FILE_OFFSET_BITS 64
9351 #include <sys/types.h>
9352  /* Check that off_t can represent 2**63 - 1 correctly.
9353     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9354     since some C++ compilers masquerading as C compilers
9355     incorrectly reject 9223372036854775807.  */
9356 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9357   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9358                        && LARGE_OFF_T % 2147483647 == 1)
9359                       ? 1 : -1];
9360 int
9361 main ()
9362 {
9363
9364   ;
9365   return 0;
9366 }
9367 _ACEOF
9368 rm -f conftest.$ac_objext
9369 if { (eval echo "$as_me:9369: \"$ac_compile\"") >&5
9370   (eval $ac_compile) 2>&5
9371   ac_status=$?
9372   echo "$as_me:9372: \$? = $ac_status" >&5
9373   (exit $ac_status); } &&
9374          { ac_try='test -s conftest.$ac_objext'
9375   { (eval echo "$as_me:9375: \"$ac_try\"") >&5
9376   (eval $ac_try) 2>&5
9377   ac_status=$?
9378   echo "$as_me:9378: \$? = $ac_status" >&5
9379   (exit $ac_status); }; }; then
9380   ac_cv_sys_file_offset_bits=64; break
9381 else
9382   echo "$as_me: failed program was:" >&5
9383 cat conftest.$ac_ext >&5
9384 fi
9385 rm -f conftest.$ac_objext conftest.$ac_ext
9386   break
9387 done
9388 fi
9389 echo "$as_me:9389: result: $ac_cv_sys_file_offset_bits" >&5
9390 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9391 if test "$ac_cv_sys_file_offset_bits" != no; then
9392
9393 cat >>confdefs.h <<EOF
9394 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9395 EOF
9396
9397 fi
9398 rm -rf conftest*
9399   echo "$as_me:9399: checking for _LARGE_FILES value needed for large files" >&5
9400 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9401 if test "${ac_cv_sys_large_files+set}" = set; then
9402   echo $ECHO_N "(cached) $ECHO_C" >&6
9403 else
9404   while :; do
9405   ac_cv_sys_large_files=no
9406   cat >conftest.$ac_ext <<_ACEOF
9407 #line 9407 "configure"
9408 #include "confdefs.h"
9409 #include <sys/types.h>
9410  /* Check that off_t can represent 2**63 - 1 correctly.
9411     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9412     since some C++ compilers masquerading as C compilers
9413     incorrectly reject 9223372036854775807.  */
9414 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9415   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9416                        && LARGE_OFF_T % 2147483647 == 1)
9417                       ? 1 : -1];
9418 int
9419 main ()
9420 {
9421
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 rm -f conftest.$ac_objext
9427 if { (eval echo "$as_me:9427: \"$ac_compile\"") >&5
9428   (eval $ac_compile) 2>&5
9429   ac_status=$?
9430   echo "$as_me:9430: \$? = $ac_status" >&5
9431   (exit $ac_status); } &&
9432          { ac_try='test -s conftest.$ac_objext'
9433   { (eval echo "$as_me:9433: \"$ac_try\"") >&5
9434   (eval $ac_try) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); }; }; then
9438   break
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442 fi
9443 rm -f conftest.$ac_objext conftest.$ac_ext
9444   cat >conftest.$ac_ext <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447 #define _LARGE_FILES 1
9448 #include <sys/types.h>
9449  /* Check that off_t can represent 2**63 - 1 correctly.
9450     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9451     since some C++ compilers masquerading as C compilers
9452     incorrectly reject 9223372036854775807.  */
9453 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9454   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9455                        && LARGE_OFF_T % 2147483647 == 1)
9456                       ? 1 : -1];
9457 int
9458 main ()
9459 {
9460
9461   ;
9462   return 0;
9463 }
9464 _ACEOF
9465 rm -f conftest.$ac_objext
9466 if { (eval echo "$as_me:9466: \"$ac_compile\"") >&5
9467   (eval $ac_compile) 2>&5
9468   ac_status=$?
9469   echo "$as_me:9469: \$? = $ac_status" >&5
9470   (exit $ac_status); } &&
9471          { ac_try='test -s conftest.$ac_objext'
9472   { (eval echo "$as_me:9472: \"$ac_try\"") >&5
9473   (eval $ac_try) 2>&5
9474   ac_status=$?
9475   echo "$as_me:9475: \$? = $ac_status" >&5
9476   (exit $ac_status); }; }; then
9477   ac_cv_sys_large_files=1; break
9478 else
9479   echo "$as_me: failed program was:" >&5
9480 cat conftest.$ac_ext >&5
9481 fi
9482 rm -f conftest.$ac_objext conftest.$ac_ext
9483   break
9484 done
9485 fi
9486 echo "$as_me:9486: result: $ac_cv_sys_large_files" >&5
9487 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9488 if test "$ac_cv_sys_large_files" != no; then
9489
9490 cat >>confdefs.h <<EOF
9491 #define _LARGE_FILES $ac_cv_sys_large_files
9492 EOF
9493
9494 fi
9495 rm -rf conftest*
9496 fi
9497
9498     if test "$enable_largefile" != no ; then
9499         echo "$as_me:9499: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9500 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9501 if test "${ac_cv_sys_largefile_source+set}" = set; then
9502   echo $ECHO_N "(cached) $ECHO_C" >&6
9503 else
9504   while :; do
9505   ac_cv_sys_largefile_source=no
9506   cat >conftest.$ac_ext <<_ACEOF
9507 #line 9507 "configure"
9508 #include "confdefs.h"
9509 #include <stdio.h>
9510 int
9511 main ()
9512 {
9513 return !fseeko;
9514   ;
9515   return 0;
9516 }
9517 _ACEOF
9518 rm -f conftest.$ac_objext
9519 if { (eval echo "$as_me:9519: \"$ac_compile\"") >&5
9520   (eval $ac_compile) 2>&5
9521   ac_status=$?
9522   echo "$as_me:9522: \$? = $ac_status" >&5
9523   (exit $ac_status); } &&
9524          { ac_try='test -s conftest.$ac_objext'
9525   { (eval echo "$as_me:9525: \"$ac_try\"") >&5
9526   (eval $ac_try) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); }; }; then
9530   break
9531 else
9532   echo "$as_me: failed program was:" >&5
9533 cat conftest.$ac_ext >&5
9534 fi
9535 rm -f conftest.$ac_objext conftest.$ac_ext
9536   cat >conftest.$ac_ext <<_ACEOF
9537 #line 9537 "configure"
9538 #include "confdefs.h"
9539 #define _LARGEFILE_SOURCE 1
9540 #include <stdio.h>
9541 int
9542 main ()
9543 {
9544 return !fseeko;
9545   ;
9546   return 0;
9547 }
9548 _ACEOF
9549 rm -f conftest.$ac_objext
9550 if { (eval echo "$as_me:9550: \"$ac_compile\"") >&5
9551   (eval $ac_compile) 2>&5
9552   ac_status=$?
9553   echo "$as_me:9553: \$? = $ac_status" >&5
9554   (exit $ac_status); } &&
9555          { ac_try='test -s conftest.$ac_objext'
9556   { (eval echo "$as_me:9556: \"$ac_try\"") >&5
9557   (eval $ac_try) 2>&5
9558   ac_status=$?
9559   echo "$as_me:9559: \$? = $ac_status" >&5
9560   (exit $ac_status); }; }; then
9561   ac_cv_sys_largefile_source=1; break
9562 else
9563   echo "$as_me: failed program was:" >&5
9564 cat conftest.$ac_ext >&5
9565 fi
9566 rm -f conftest.$ac_objext conftest.$ac_ext
9567   break
9568 done
9569 fi
9570 echo "$as_me:9570: result: $ac_cv_sys_largefile_source" >&5
9571 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9572 if test "$ac_cv_sys_largefile_source" != no; then
9573
9574 cat >>confdefs.h <<EOF
9575 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9576 EOF
9577
9578 fi
9579 rm -rf conftest*
9580
9581 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9582 # in glibc 2.1.3, but that breaks too many other things.
9583 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9584 echo "$as_me:9584: checking for fseeko" >&5
9585 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9586 if test "${ac_cv_func_fseeko+set}" = set; then
9587   echo $ECHO_N "(cached) $ECHO_C" >&6
9588 else
9589   cat >conftest.$ac_ext <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592 #include <stdio.h>
9593 int
9594 main ()
9595 {
9596 return fseeko && fseeko (stdin, 0, 0);
9597   ;
9598   return 0;
9599 }
9600 _ACEOF
9601 rm -f conftest.$ac_objext conftest$ac_exeext
9602 if { (eval echo "$as_me:9602: \"$ac_link\"") >&5
9603   (eval $ac_link) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); } &&
9607          { ac_try='test -s conftest$ac_exeext'
9608   { (eval echo "$as_me:9608: \"$ac_try\"") >&5
9609   (eval $ac_try) 2>&5
9610   ac_status=$?
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); }; }; then
9613   ac_cv_func_fseeko=yes
9614 else
9615   echo "$as_me: failed program was:" >&5
9616 cat conftest.$ac_ext >&5
9617 ac_cv_func_fseeko=no
9618 fi
9619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9620 fi
9621 echo "$as_me:9621: result: $ac_cv_func_fseeko" >&5
9622 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9623 if test $ac_cv_func_fseeko = yes; then
9624
9625 cat >>confdefs.h <<\EOF
9626 #define HAVE_FSEEKO 1
9627 EOF
9628
9629 fi
9630
9631         # Normally we would collect these definitions in the config.h,
9632         # but (like _XOPEN_SOURCE), some environments rely on having these
9633         # defined before any of the system headers are included.  Another
9634         # case comes up with C++, e.g., on AIX the compiler compiles the
9635         # header files by themselves before looking at the body files it is
9636         # told to compile.  For ncurses, those header files do not include
9637         # the config.h
9638         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9639         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9640         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9641
9642         echo "$as_me:9642: checking whether to use struct dirent64" >&5
9643 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9644 if test "${cf_cv_struct_dirent64+set}" = set; then
9645   echo $ECHO_N "(cached) $ECHO_C" >&6
9646 else
9647
9648                 cat >conftest.$ac_ext <<_ACEOF
9649 #line 9649 "configure"
9650 #include "confdefs.h"
9651
9652 #include <sys/types.h>
9653 #include <dirent.h>
9654
9655 int
9656 main ()
9657 {
9658
9659                 /* if transitional largefile support is setup, this is true */
9660                 extern struct dirent64 * readdir(DIR *);
9661                 struct dirent64 *x = readdir((DIR *)0);
9662                 struct dirent *y = readdir((DIR *)0);
9663                 int z = x - y;
9664
9665   ;
9666   return 0;
9667 }
9668 _ACEOF
9669 rm -f conftest.$ac_objext
9670 if { (eval echo "$as_me:9670: \"$ac_compile\"") >&5
9671   (eval $ac_compile) 2>&5
9672   ac_status=$?
9673   echo "$as_me:9673: \$? = $ac_status" >&5
9674   (exit $ac_status); } &&
9675          { ac_try='test -s conftest.$ac_objext'
9676   { (eval echo "$as_me:9676: \"$ac_try\"") >&5
9677   (eval $ac_try) 2>&5
9678   ac_status=$?
9679   echo "$as_me:9679: \$? = $ac_status" >&5
9680   (exit $ac_status); }; }; then
9681   cf_cv_struct_dirent64=yes
9682 else
9683   echo "$as_me: failed program was:" >&5
9684 cat conftest.$ac_ext >&5
9685 cf_cv_struct_dirent64=no
9686 fi
9687 rm -f conftest.$ac_objext conftest.$ac_ext
9688
9689 fi
9690 echo "$as_me:9690: result: $cf_cv_struct_dirent64" >&5
9691 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9692         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9693 #define HAVE_STRUCT_DIRENT64 1
9694 EOF
9695
9696     fi
9697
9698 ### Enable compiling-in rcs id's
9699 echo "$as_me:9699: checking if RCS identifiers should be compiled-in" >&5
9700 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9701
9702 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9703 if test "${with_rcs_ids+set}" = set; then
9704   withval="$with_rcs_ids"
9705   with_rcs_ids=$withval
9706 else
9707   with_rcs_ids=no
9708 fi;
9709 echo "$as_me:9709: result: $with_rcs_ids" >&5
9710 echo "${ECHO_T}$with_rcs_ids" >&6
9711 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9712 #define USE_RCS_IDS 1
9713 EOF
9714
9715 ###############################################################################
9716
9717 ### Note that some functions (such as const) are normally disabled anyway.
9718 echo "$as_me:9718: checking if you want to build with function extensions" >&5
9719 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9720
9721 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9722 if test "${enable_ext_funcs+set}" = set; then
9723   enableval="$enable_ext_funcs"
9724   with_ext_funcs=$enableval
9725 else
9726   with_ext_funcs=yes
9727 fi;
9728 echo "$as_me:9728: result: $with_ext_funcs" >&5
9729 echo "${ECHO_T}$with_ext_funcs" >&6
9730 if test "$with_ext_funcs" = yes ; then
9731         NCURSES_EXT_FUNCS=1
9732         cat >>confdefs.h <<\EOF
9733 #define HAVE_USE_DEFAULT_COLORS 1
9734 EOF
9735
9736         cat >>confdefs.h <<\EOF
9737 #define NCURSES_EXT_FUNCS 1
9738 EOF
9739
9740 else
9741         NCURSES_EXT_FUNCS=0
9742 fi
9743
9744 ###   use option --enable-const to turn on use of const beyond that in XSI.
9745 echo "$as_me:9745: checking for extended use of const keyword" >&5
9746 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9747
9748 # Check whether --enable-const or --disable-const was given.
9749 if test "${enable_const+set}" = set; then
9750   enableval="$enable_const"
9751   with_ext_const=$enableval
9752 else
9753   with_ext_const=no
9754 fi;
9755 echo "$as_me:9755: result: $with_ext_const" >&5
9756 echo "${ECHO_T}$with_ext_const" >&6
9757 NCURSES_CONST='/*nothing*/'
9758 if test "$with_ext_const" = yes ; then
9759         NCURSES_CONST=const
9760 fi
9761
9762 ###############################################################################
9763 # These options are relatively safe to experiment with.
9764
9765 echo "$as_me:9765: checking if you want all development code" >&5
9766 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9767
9768 # Check whether --with-develop or --without-develop was given.
9769 if test "${with_develop+set}" = set; then
9770   withval="$with_develop"
9771   with_develop=$withval
9772 else
9773   with_develop=no
9774 fi;
9775 echo "$as_me:9775: result: $with_develop" >&5
9776 echo "${ECHO_T}$with_develop" >&6
9777
9778 ###############################################################################
9779 # These are just experimental, probably should not be in a package:
9780
9781 # This is still experimental (20080329), but should ultimately be moved to
9782 # the script-block --with-normal, etc.
9783
9784 echo "$as_me:9784: checking if you want to link with the pthread library" >&5
9785 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9786
9787 # Check whether --with-pthread or --without-pthread was given.
9788 if test "${with_pthread+set}" = set; then
9789   withval="$with_pthread"
9790   with_pthread=$withval
9791 else
9792   with_pthread=no
9793 fi;
9794 echo "$as_me:9794: result: $with_pthread" >&5
9795 echo "${ECHO_T}$with_pthread" >&6
9796
9797 if test "$with_pthread" != no ; then
9798     echo "$as_me:9798: checking for pthread.h" >&5
9799 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9800 if test "${ac_cv_header_pthread_h+set}" = set; then
9801   echo $ECHO_N "(cached) $ECHO_C" >&6
9802 else
9803   cat >conftest.$ac_ext <<_ACEOF
9804 #line 9804 "configure"
9805 #include "confdefs.h"
9806 #include <pthread.h>
9807 _ACEOF
9808 if { (eval echo "$as_me:9808: \"$ac_cpp conftest.$ac_ext\"") >&5
9809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9810   ac_status=$?
9811   egrep -v '^ *\+' conftest.er1 >conftest.err
9812   rm -f conftest.er1
9813   cat conftest.err >&5
9814   echo "$as_me:9814: \$? = $ac_status" >&5
9815   (exit $ac_status); } >/dev/null; then
9816   if test -s conftest.err; then
9817     ac_cpp_err=$ac_c_preproc_warn_flag
9818   else
9819     ac_cpp_err=
9820   fi
9821 else
9822   ac_cpp_err=yes
9823 fi
9824 if test -z "$ac_cpp_err"; then
9825   ac_cv_header_pthread_h=yes
9826 else
9827   echo "$as_me: failed program was:" >&5
9828   cat conftest.$ac_ext >&5
9829   ac_cv_header_pthread_h=no
9830 fi
9831 rm -f conftest.err conftest.$ac_ext
9832 fi
9833 echo "$as_me:9833: result: $ac_cv_header_pthread_h" >&5
9834 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9835 if test $ac_cv_header_pthread_h = yes; then
9836
9837         cat >>confdefs.h <<\EOF
9838 #define HAVE_PTHREADS_H 1
9839 EOF
9840
9841         for cf_lib_pthread in pthread c_r
9842         do
9843             echo "$as_me:9843: checking if we can link with the $cf_lib_pthread library" >&5
9844 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
9845             cf_save_LIBS="$LIBS"
9846             LIBS="-l$cf_lib_pthread $LIBS"
9847             cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850
9851 #include <pthread.h>
9852
9853 int
9854 main ()
9855 {
9856
9857                 int rc = pthread_create(0,0,0,0);
9858                 int r2 = pthread_mutexattr_settype(0, 0);
9859
9860   ;
9861   return 0;
9862 }
9863 _ACEOF
9864 rm -f conftest.$ac_objext conftest$ac_exeext
9865 if { (eval echo "$as_me:9865: \"$ac_link\"") >&5
9866   (eval $ac_link) 2>&5
9867   ac_status=$?
9868   echo "$as_me:9868: \$? = $ac_status" >&5
9869   (exit $ac_status); } &&
9870          { ac_try='test -s conftest$ac_exeext'
9871   { (eval echo "$as_me:9871: \"$ac_try\"") >&5
9872   (eval $ac_try) 2>&5
9873   ac_status=$?
9874   echo "$as_me:9874: \$? = $ac_status" >&5
9875   (exit $ac_status); }; }; then
9876   with_pthread=yes
9877 else
9878   echo "$as_me: failed program was:" >&5
9879 cat conftest.$ac_ext >&5
9880 with_pthread=no
9881 fi
9882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9883             LIBS="$cf_save_LIBS"
9884             echo "$as_me:9884: result: $with_pthread" >&5
9885 echo "${ECHO_T}$with_pthread" >&6
9886             test "$with_pthread" = yes && break
9887         done
9888
9889         if test "$with_pthread" = yes ; then
9890             LIBS="-l$cf_lib_pthread $LIBS"
9891             cat >>confdefs.h <<\EOF
9892 #define HAVE_LIBPTHREADS 1
9893 EOF
9894
9895         else
9896             { { echo "$as_me:9896: error: Cannot link with pthread library" >&5
9897 echo "$as_me: error: Cannot link with pthread library" >&2;}
9898    { (exit 1); exit 1; }; }
9899         fi
9900
9901 fi
9902
9903 fi
9904
9905 echo "$as_me:9905: checking if you want to use weak-symbols for pthreads" >&5
9906 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9907
9908 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9909 if test "${enable_weak_symbols+set}" = set; then
9910   enableval="$enable_weak_symbols"
9911   use_weak_symbols=$withval
9912 else
9913   use_weak_symbols=no
9914 fi;
9915 echo "$as_me:9915: result: $use_weak_symbols" >&5
9916 echo "${ECHO_T}$use_weak_symbols" >&6
9917 if test "$use_weak_symbols" = yes ; then
9918
9919 echo "$as_me:9919: checking if $CC supports weak symbols" >&5
9920 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9921 if test "${cf_cv_weak_symbols+set}" = set; then
9922   echo $ECHO_N "(cached) $ECHO_C" >&6
9923 else
9924
9925 cat >conftest.$ac_ext <<_ACEOF
9926 #line 9926 "configure"
9927 #include "confdefs.h"
9928
9929 #include <stdio.h>
9930 int
9931 main ()
9932 {
9933
9934 #if defined(__GNUC__)
9935 #  if defined __USE_ISOC99
9936 #    define _cat_pragma(exp)    _Pragma(#exp)
9937 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9938 #  else
9939 #    define _weak_pragma(exp)
9940 #  endif
9941 #  define _declare(name)        __extension__ extern __typeof__(name) name
9942 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9943 #endif
9944
9945 weak_symbol(fopen);
9946
9947   ;
9948   return 0;
9949 }
9950 _ACEOF
9951 rm -f conftest.$ac_objext
9952 if { (eval echo "$as_me:9952: \"$ac_compile\"") >&5
9953   (eval $ac_compile) 2>&5
9954   ac_status=$?
9955   echo "$as_me:9955: \$? = $ac_status" >&5
9956   (exit $ac_status); } &&
9957          { ac_try='test -s conftest.$ac_objext'
9958   { (eval echo "$as_me:9958: \"$ac_try\"") >&5
9959   (eval $ac_try) 2>&5
9960   ac_status=$?
9961   echo "$as_me:9961: \$? = $ac_status" >&5
9962   (exit $ac_status); }; }; then
9963   cf_cv_weak_symbols=yes
9964 else
9965   echo "$as_me: failed program was:" >&5
9966 cat conftest.$ac_ext >&5
9967 cf_cv_weak_symbols=no
9968 fi
9969 rm -f conftest.$ac_objext conftest.$ac_ext
9970
9971 fi
9972 echo "$as_me:9972: result: $cf_cv_weak_symbols" >&5
9973 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9974
9975 else
9976     cf_cv_weak_symbols=no
9977 fi
9978
9979 if test $cf_cv_weak_symbols = yes ; then
9980     cat >>confdefs.h <<\EOF
9981 #define USE_WEAK_SYMBOLS 1
9982 EOF
9983
9984 fi
9985
9986 PTHREAD=
9987 if test "$with_pthread" = "yes" ; then
9988     cat >>confdefs.h <<\EOF
9989 #define USE_PTHREADS 1
9990 EOF
9991
9992     enable_reentrant=yes
9993     if test $cf_cv_weak_symbols = yes ; then
9994         PTHREAD=-lpthread
9995     fi
9996 fi
9997
9998 # OpenSUSE is installing ncurses6, using reentrant option.
9999 echo "$as_me:9999: checking for _nc_TABSIZE" >&5
10000 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
10001 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
10002   echo $ECHO_N "(cached) $ECHO_C" >&6
10003 else
10004   cat >conftest.$ac_ext <<_ACEOF
10005 #line 10005 "configure"
10006 #include "confdefs.h"
10007 /* System header to define __stub macros and hopefully few prototypes,
10008     which can conflict with char _nc_TABSIZE (); below.  */
10009 #include <assert.h>
10010 /* Override any gcc2 internal prototype to avoid an error.  */
10011 #ifdef __cplusplus
10012 extern "C"
10013 #endif
10014 /* We use char because int might match the return type of a gcc2
10015    builtin and then its argument prototype would still apply.  */
10016 char _nc_TABSIZE ();
10017 char (*f) ();
10018
10019 int
10020 main ()
10021 {
10022 /* The GNU C library defines this for functions which it implements
10023     to always fail with ENOSYS.  Some functions are actually named
10024     something starting with __ and the normal name is an alias.  */
10025 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
10026 choke me
10027 #else
10028 f = _nc_TABSIZE;
10029 #endif
10030
10031   ;
10032   return 0;
10033 }
10034 _ACEOF
10035 rm -f conftest.$ac_objext conftest$ac_exeext
10036 if { (eval echo "$as_me:10036: \"$ac_link\"") >&5
10037   (eval $ac_link) 2>&5
10038   ac_status=$?
10039   echo "$as_me:10039: \$? = $ac_status" >&5
10040   (exit $ac_status); } &&
10041          { ac_try='test -s conftest$ac_exeext'
10042   { (eval echo "$as_me:10042: \"$ac_try\"") >&5
10043   (eval $ac_try) 2>&5
10044   ac_status=$?
10045   echo "$as_me:10045: \$? = $ac_status" >&5
10046   (exit $ac_status); }; }; then
10047   ac_cv_func__nc_TABSIZE=yes
10048 else
10049   echo "$as_me: failed program was:" >&5
10050 cat conftest.$ac_ext >&5
10051 ac_cv_func__nc_TABSIZE=no
10052 fi
10053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10054 fi
10055 echo "$as_me:10055: result: $ac_cv_func__nc_TABSIZE" >&5
10056 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
10057 if test $ac_cv_func__nc_TABSIZE = yes; then
10058   assume_reentrant=yes
10059 else
10060   assume_reentrant=no
10061 fi
10062
10063 # Reentrant code has to be opaque; there's little advantage to making ncurses
10064 # opaque outside of that, so there is no --enable-opaque option.  We can use
10065 # this option without --with-pthreads, but this will be always set for
10066 # pthreads.
10067 echo "$as_me:10067: checking if you want experimental reentrant code" >&5
10068 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10069
10070 # Check whether --enable-reentrant or --disable-reentrant was given.
10071 if test "${enable_reentrant+set}" = set; then
10072   enableval="$enable_reentrant"
10073   with_reentrant=$enableval
10074 else
10075   with_reentrant=$assume_reentrant
10076 fi;
10077 echo "$as_me:10077: result: $with_reentrant" >&5
10078 echo "${ECHO_T}$with_reentrant" >&6
10079 if test "$with_reentrant" = yes ; then
10080         cf_cv_enable_reentrant=1
10081         if test $cf_cv_weak_symbols = yes ; then
10082
10083 # remove pthread library from $LIBS
10084 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10085
10086         elif test "$assume_reentrant" = no ; then
10087                 LIB_SUFFIX="t${LIB_SUFFIX}"
10088         fi
10089         cat >>confdefs.h <<\EOF
10090 #define USE_REENTRANT 1
10091 EOF
10092
10093 else
10094         cf_cv_enable_reentrant=0
10095 fi
10096
10097 ### Allow using a different wrap-prefix
10098 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10099         echo "$as_me:10099: checking for prefix used to wrap public variables" >&5
10100 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10101
10102 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10103 if test "${with_wrap_prefix+set}" = set; then
10104   withval="$with_wrap_prefix"
10105   NCURSES_WRAP_PREFIX=$withval
10106 else
10107   NCURSES_WRAP_PREFIX=_nc_
10108 fi;
10109         echo "$as_me:10109: result: $NCURSES_WRAP_PREFIX" >&5
10110 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10111 else
10112         NCURSES_WRAP_PREFIX=_nc_
10113 fi
10114
10115 cat >>confdefs.h <<EOF
10116 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10117 EOF
10118
10119 ###############################################################################
10120
10121 ###     use option --disable-echo to suppress full display compiling commands
10122 echo "$as_me:10122: checking if you want to display full commands during build" >&5
10123 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10124
10125 # Check whether --enable-echo or --disable-echo was given.
10126 if test "${enable_echo+set}" = set; then
10127   enableval="$enable_echo"
10128   with_echo=$enableval
10129 else
10130   with_echo=yes
10131 fi;
10132 if test "$with_echo" = yes; then
10133         ECHO_LINK=
10134 else
10135         ECHO_LINK='@ echo linking $@ ... ;'
10136 fi
10137 echo "$as_me:10137: result: $with_echo" >&5
10138 echo "${ECHO_T}$with_echo" >&6
10139
10140 ###     use option --enable-warnings to turn on all gcc warnings
10141 echo "$as_me:10141: checking if you want to see compiler warnings" >&5
10142 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10143
10144 # Check whether --enable-warnings or --disable-warnings was given.
10145 if test "${enable_warnings+set}" = set; then
10146   enableval="$enable_warnings"
10147   with_warnings=$enableval
10148 fi;
10149 echo "$as_me:10149: result: $with_warnings" >&5
10150 echo "${ECHO_T}$with_warnings" >&6
10151
10152 if test "x$with_warnings" = "xyes"; then
10153
10154         ADAFLAGS="$ADAFLAGS -gnatg"
10155
10156 INTEL_COMPILER=no
10157
10158 if test "$GCC" = yes ; then
10159         case $host_os in
10160         linux*|gnu*)
10161                 echo "$as_me:10161: checking if this is really Intel C compiler" >&5
10162 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10163                 cf_save_CFLAGS="$CFLAGS"
10164                 CFLAGS="$CFLAGS -no-gcc"
10165                 cat >conftest.$ac_ext <<_ACEOF
10166 #line 10166 "configure"
10167 #include "confdefs.h"
10168
10169 int
10170 main ()
10171 {
10172
10173 #ifdef __INTEL_COMPILER
10174 #else
10175 make an error
10176 #endif
10177
10178   ;
10179   return 0;
10180 }
10181 _ACEOF
10182 rm -f conftest.$ac_objext
10183 if { (eval echo "$as_me:10183: \"$ac_compile\"") >&5
10184   (eval $ac_compile) 2>&5
10185   ac_status=$?
10186   echo "$as_me:10186: \$? = $ac_status" >&5
10187   (exit $ac_status); } &&
10188          { ac_try='test -s conftest.$ac_objext'
10189   { (eval echo "$as_me:10189: \"$ac_try\"") >&5
10190   (eval $ac_try) 2>&5
10191   ac_status=$?
10192   echo "$as_me:10192: \$? = $ac_status" >&5
10193   (exit $ac_status); }; }; then
10194   INTEL_COMPILER=yes
10195 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10196
10197 else
10198   echo "$as_me: failed program was:" >&5
10199 cat conftest.$ac_ext >&5
10200 fi
10201 rm -f conftest.$ac_objext conftest.$ac_ext
10202                 CFLAGS="$cf_save_CFLAGS"
10203                 echo "$as_me:10203: result: $INTEL_COMPILER" >&5
10204 echo "${ECHO_T}$INTEL_COMPILER" >&6
10205                 ;;
10206         esac
10207 fi
10208
10209 cat > conftest.$ac_ext <<EOF
10210 #line 10210 "${as_me:-configure}"
10211 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10212 EOF
10213
10214 if test "$INTEL_COMPILER" = yes
10215 then
10216 # The "-wdXXX" options suppress warnings:
10217 # remark #1419: external declaration in primary source file
10218 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10219 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10220 # remark #193: zero used for undefined preprocessing identifier
10221 # remark #593: variable "curs_sb_left_arrow" was set but never used
10222 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10223 # remark #869: parameter "tw" was never referenced
10224 # remark #981: operands are evaluated in unspecified order
10225 # warning #279: controlling expression is constant
10226
10227         { echo "$as_me:10227: checking for $CC warning options..." >&5
10228 echo "$as_me: checking for $CC warning options..." >&6;}
10229         cf_save_CFLAGS="$CFLAGS"
10230         EXTRA_CFLAGS="-Wall"
10231         for cf_opt in \
10232                 wd1419 \
10233                 wd1683 \
10234                 wd1684 \
10235                 wd193 \
10236                 wd593 \
10237                 wd279 \
10238                 wd810 \
10239                 wd869 \
10240                 wd981
10241         do
10242                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10243                 if { (eval echo "$as_me:10243: \"$ac_compile\"") >&5
10244   (eval $ac_compile) 2>&5
10245   ac_status=$?
10246   echo "$as_me:10246: \$? = $ac_status" >&5
10247   (exit $ac_status); }; then
10248                         test -n "$verbose" && echo "$as_me:10248: result: ... -$cf_opt" >&5
10249 echo "${ECHO_T}... -$cf_opt" >&6
10250                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10251                 fi
10252         done
10253         CFLAGS="$cf_save_CFLAGS"
10254
10255 elif test "$GCC" = yes
10256 then
10257         { echo "$as_me:10257: checking for $CC warning options..." >&5
10258 echo "$as_me: checking for $CC warning options..." >&6;}
10259         cf_save_CFLAGS="$CFLAGS"
10260         EXTRA_CFLAGS=
10261         cf_warn_CONST=""
10262         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10263         for cf_opt in W Wall \
10264                 Wbad-function-cast \
10265                 Wcast-align \
10266                 Wcast-qual \
10267                 Winline \
10268                 Wmissing-declarations \
10269                 Wmissing-prototypes \
10270                 Wnested-externs \
10271                 Wpointer-arith \
10272                 Wshadow \
10273                 Wstrict-prototypes \
10274                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10275         do
10276                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10277                 if { (eval echo "$as_me:10277: \"$ac_compile\"") >&5
10278   (eval $ac_compile) 2>&5
10279   ac_status=$?
10280   echo "$as_me:10280: \$? = $ac_status" >&5
10281   (exit $ac_status); }; then
10282                         test -n "$verbose" && echo "$as_me:10282: result: ... -$cf_opt" >&5
10283 echo "${ECHO_T}... -$cf_opt" >&6
10284                         case $cf_opt in #(vi
10285                         Wcast-qual) #(vi
10286                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10287                                 ;;
10288                         Winline) #(vi
10289                                 case $GCC_VERSION in
10290                                 [34].*)
10291                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10292
10293 echo "${as_me:-configure}:10293: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10294
10295                                         continue;;
10296                                 esac
10297                                 ;;
10298                         esac
10299                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10300                 fi
10301         done
10302         CFLAGS="$cf_save_CFLAGS"
10303 fi
10304 rm -rf conftest*
10305
10306 fi
10307
10308 if test "$GCC" = yes
10309 then
10310 cat > conftest.i <<EOF
10311 #ifndef GCC_PRINTF
10312 #define GCC_PRINTF 0
10313 #endif
10314 #ifndef GCC_SCANF
10315 #define GCC_SCANF 0
10316 #endif
10317 #ifndef GCC_NORETURN
10318 #define GCC_NORETURN /* nothing */
10319 #endif
10320 #ifndef GCC_UNUSED
10321 #define GCC_UNUSED /* nothing */
10322 #endif
10323 EOF
10324 if test "$GCC" = yes
10325 then
10326         { echo "$as_me:10326: checking for $CC __attribute__ directives..." >&5
10327 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10328 cat > conftest.$ac_ext <<EOF
10329 #line 10329 "${as_me:-configure}"
10330 #include "confdefs.h"
10331 #include "conftest.h"
10332 #include "conftest.i"
10333 #if     GCC_PRINTF
10334 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10335 #else
10336 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10337 #endif
10338 #if     GCC_SCANF
10339 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10340 #else
10341 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10342 #endif
10343 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10344 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10345 extern void foo(void) GCC_NORETURN;
10346 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10347 EOF
10348         cf_printf_attribute=no
10349         cf_scanf_attribute=no
10350         for cf_attribute in scanf printf unused noreturn
10351         do
10352
10353 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10354
10355                 cf_directive="__attribute__(($cf_attribute))"
10356                 echo "checking for $CC $cf_directive" 1>&5
10357
10358                 case $cf_attribute in #(vi
10359                 printf) #(vi
10360                         cf_printf_attribute=yes
10361                         cat >conftest.h <<EOF
10362 #define GCC_$cf_ATTRIBUTE 1
10363 EOF
10364                         ;;
10365                 scanf) #(vi
10366                         cf_scanf_attribute=yes
10367                         cat >conftest.h <<EOF
10368 #define GCC_$cf_ATTRIBUTE 1
10369 EOF
10370                         ;;
10371                 *) #(vi
10372                         cat >conftest.h <<EOF
10373 #define GCC_$cf_ATTRIBUTE $cf_directive
10374 EOF
10375                         ;;
10376                 esac
10377
10378                 if { (eval echo "$as_me:10378: \"$ac_compile\"") >&5
10379   (eval $ac_compile) 2>&5
10380   ac_status=$?
10381   echo "$as_me:10381: \$? = $ac_status" >&5
10382   (exit $ac_status); }; then
10383                         test -n "$verbose" && echo "$as_me:10383: result: ... $cf_attribute" >&5
10384 echo "${ECHO_T}... $cf_attribute" >&6
10385                         cat conftest.h >>confdefs.h
10386                         case $cf_attribute in #(vi
10387                         printf) #(vi
10388                                 if test "$cf_printf_attribute" = no ; then
10389                                         cat >>confdefs.h <<EOF
10390 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
10391 EOF
10392                                 else
10393                                         cat >>confdefs.h <<EOF
10394 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10395 EOF
10396                                 fi
10397                                 ;;
10398                         scanf) #(vi
10399                                 if test "$cf_scanf_attribute" = no ; then
10400                                         cat >>confdefs.h <<EOF
10401 #define GCC_SCANFLIKE(fmt,var) /* nothing */
10402 EOF
10403                                 else
10404                                         cat >>confdefs.h <<EOF
10405 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10406 EOF
10407                                 fi
10408                                 ;;
10409                         esac
10410                 fi
10411         done
10412 else
10413         fgrep define conftest.i >>confdefs.h
10414 fi
10415 rm -rf conftest*
10416 fi
10417
10418 ###     use option --enable-assertions to turn on generation of assertion code
10419 echo "$as_me:10419: checking if you want to enable runtime assertions" >&5
10420 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10421
10422 # Check whether --enable-assertions or --disable-assertions was given.
10423 if test "${enable_assertions+set}" = set; then
10424   enableval="$enable_assertions"
10425   with_assertions=$enableval
10426 else
10427   with_assertions=no
10428 fi;
10429 echo "$as_me:10429: result: $with_assertions" >&5
10430 echo "${ECHO_T}$with_assertions" >&6
10431 if test -n "$GCC"
10432 then
10433         if test "$with_assertions" = no
10434         then
10435                 cat >>confdefs.h <<\EOF
10436 #define NDEBUG 1
10437 EOF
10438
10439                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10440         else
10441
10442         ADAFLAGS="$ADAFLAGS -gnata"
10443
10444         fi
10445 fi
10446
10447 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10448 cat >>confdefs.h <<\EOF
10449 #define HAVE_NC_ALLOC_H 1
10450 EOF
10451
10452 ###     use option --enable-expanded to generate certain macros as functions
10453
10454 # Check whether --enable-expanded or --disable-expanded was given.
10455 if test "${enable_expanded+set}" = set; then
10456   enableval="$enable_expanded"
10457   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10458 #define NCURSES_EXPANDED 1
10459 EOF
10460
10461 fi;
10462
10463 ###     use option --disable-macros to suppress macros in favor of functions
10464
10465 # Check whether --enable-macros or --disable-macros was given.
10466 if test "${enable_macros+set}" = set; then
10467   enableval="$enable_macros"
10468   test "$enableval" = no && cat >>confdefs.h <<\EOF
10469 #define NCURSES_NOMACROS 1
10470 EOF
10471
10472 fi;
10473
10474 # Normally we only add trace() to the debug-library.  Allow this to be
10475 # extended to all models of the ncurses library:
10476 cf_all_traces=no
10477 case "$CFLAGS $CPPFLAGS" in
10478 *-DTRACE*)
10479         cf_all_traces=yes
10480         ;;
10481 esac
10482
10483 echo "$as_me:10483: checking whether to add trace feature to all models" >&5
10484 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10485
10486 # Check whether --with-trace or --without-trace was given.
10487 if test "${with_trace+set}" = set; then
10488   withval="$with_trace"
10489   cf_with_trace=$withval
10490 else
10491   cf_with_trace=$cf_all_traces
10492 fi;
10493 echo "$as_me:10493: result: $cf_with_trace" >&5
10494 echo "${ECHO_T}$cf_with_trace" >&6
10495
10496 if test "$cf_with_trace" = yes ; then
10497         ADA_TRACE=TRUE
10498
10499 cf_fix_cppflags=no
10500 cf_new_cflags=
10501 cf_new_cppflags=
10502 cf_new_extra_cppflags=
10503
10504 for cf_add_cflags in -DTRACE
10505 do
10506 case $cf_fix_cppflags in
10507 no)
10508         case $cf_add_cflags in #(vi
10509         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10510                 case $cf_add_cflags in
10511                 -D*)
10512                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10513
10514                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10515                                 && test -z "${cf_tst_cflags}" \
10516                                 && cf_fix_cppflags=yes
10517
10518                         if test $cf_fix_cppflags = yes ; then
10519                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10520                                 continue
10521                         elif test "${cf_tst_cflags}" = "\"'" ; then
10522                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10523                                 continue
10524                         fi
10525                         ;;
10526                 esac
10527                 case "$CPPFLAGS" in
10528                 *$cf_add_cflags) #(vi
10529                         ;;
10530                 *) #(vi
10531                         case $cf_add_cflags in #(vi
10532                         -D*)
10533                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10534
10535 CPPFLAGS=`echo "$CPPFLAGS" | \
10536         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10537                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10538
10539                                 ;;
10540                         esac
10541                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10542                         ;;
10543                 esac
10544                 ;;
10545         *)
10546                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10547                 ;;
10548         esac
10549         ;;
10550 yes)
10551         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10552
10553         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10554
10555         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10556                 && test -z "${cf_tst_cflags}" \
10557                 && cf_fix_cppflags=no
10558         ;;
10559 esac
10560 done
10561
10562 if test -n "$cf_new_cflags" ; then
10563
10564         CFLAGS="$CFLAGS $cf_new_cflags"
10565 fi
10566
10567 if test -n "$cf_new_cppflags" ; then
10568
10569         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10570 fi
10571
10572 if test -n "$cf_new_extra_cppflags" ; then
10573
10574         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10575 fi
10576
10577 else
10578         ADA_TRACE=FALSE
10579 fi
10580
10581 ###     Checks for libraries.
10582 case $cf_cv_system_name in #(vi
10583 *mingw32*) #(vi
10584         ;;
10585 *)
10586 echo "$as_me:10586: checking for gettimeofday" >&5
10587 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10588 if test "${ac_cv_func_gettimeofday+set}" = set; then
10589   echo $ECHO_N "(cached) $ECHO_C" >&6
10590 else
10591   cat >conftest.$ac_ext <<_ACEOF
10592 #line 10592 "configure"
10593 #include "confdefs.h"
10594 /* System header to define __stub macros and hopefully few prototypes,
10595     which can conflict with char gettimeofday (); below.  */
10596 #include <assert.h>
10597 /* Override any gcc2 internal prototype to avoid an error.  */
10598 #ifdef __cplusplus
10599 extern "C"
10600 #endif
10601 /* We use char because int might match the return type of a gcc2
10602    builtin and then its argument prototype would still apply.  */
10603 char gettimeofday ();
10604 char (*f) ();
10605
10606 int
10607 main ()
10608 {
10609 /* The GNU C library defines this for functions which it implements
10610     to always fail with ENOSYS.  Some functions are actually named
10611     something starting with __ and the normal name is an alias.  */
10612 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10613 choke me
10614 #else
10615 f = gettimeofday;
10616 #endif
10617
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 rm -f conftest.$ac_objext conftest$ac_exeext
10623 if { (eval echo "$as_me:10623: \"$ac_link\"") >&5
10624   (eval $ac_link) 2>&5
10625   ac_status=$?
10626   echo "$as_me:10626: \$? = $ac_status" >&5
10627   (exit $ac_status); } &&
10628          { ac_try='test -s conftest$ac_exeext'
10629   { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630   (eval $ac_try) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); }; }; then
10634   ac_cv_func_gettimeofday=yes
10635 else
10636   echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 ac_cv_func_gettimeofday=no
10639 fi
10640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10641 fi
10642 echo "$as_me:10642: result: $ac_cv_func_gettimeofday" >&5
10643 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10644 if test $ac_cv_func_gettimeofday = yes; then
10645   cat >>confdefs.h <<\EOF
10646 #define HAVE_GETTIMEOFDAY 1
10647 EOF
10648
10649 else
10650
10651 echo "$as_me:10651: checking for gettimeofday in -lbsd" >&5
10652 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10653 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10654   echo $ECHO_N "(cached) $ECHO_C" >&6
10655 else
10656   ac_check_lib_save_LIBS=$LIBS
10657 LIBS="-lbsd  $LIBS"
10658 cat >conftest.$ac_ext <<_ACEOF
10659 #line 10659 "configure"
10660 #include "confdefs.h"
10661
10662 /* Override any gcc2 internal prototype to avoid an error.  */
10663 #ifdef __cplusplus
10664 extern "C"
10665 #endif
10666 /* We use char because int might match the return type of a gcc2
10667    builtin and then its argument prototype would still apply.  */
10668 char gettimeofday ();
10669 int
10670 main ()
10671 {
10672 gettimeofday ();
10673   ;
10674   return 0;
10675 }
10676 _ACEOF
10677 rm -f conftest.$ac_objext conftest$ac_exeext
10678 if { (eval echo "$as_me:10678: \"$ac_link\"") >&5
10679   (eval $ac_link) 2>&5
10680   ac_status=$?
10681   echo "$as_me:10681: \$? = $ac_status" >&5
10682   (exit $ac_status); } &&
10683          { ac_try='test -s conftest$ac_exeext'
10684   { (eval echo "$as_me:10684: \"$ac_try\"") >&5
10685   (eval $ac_try) 2>&5
10686   ac_status=$?
10687   echo "$as_me:10687: \$? = $ac_status" >&5
10688   (exit $ac_status); }; }; then
10689   ac_cv_lib_bsd_gettimeofday=yes
10690 else
10691   echo "$as_me: failed program was:" >&5
10692 cat conftest.$ac_ext >&5
10693 ac_cv_lib_bsd_gettimeofday=no
10694 fi
10695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10696 LIBS=$ac_check_lib_save_LIBS
10697 fi
10698 echo "$as_me:10698: result: $ac_cv_lib_bsd_gettimeofday" >&5
10699 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10700 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10701   cat >>confdefs.h <<\EOF
10702 #define HAVE_GETTIMEOFDAY 1
10703 EOF
10704
10705         LIBS="$LIBS -lbsd"
10706 fi
10707
10708 fi
10709         ;;
10710 esac
10711
10712 ###     Checks for header files.
10713 echo "$as_me:10713: checking for ANSI C header files" >&5
10714 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10715 if test "${ac_cv_header_stdc+set}" = set; then
10716   echo $ECHO_N "(cached) $ECHO_C" >&6
10717 else
10718   cat >conftest.$ac_ext <<_ACEOF
10719 #line 10719 "configure"
10720 #include "confdefs.h"
10721 #include <stdlib.h>
10722 #include <stdarg.h>
10723 #include <string.h>
10724 #include <float.h>
10725
10726 _ACEOF
10727 if { (eval echo "$as_me:10727: \"$ac_cpp conftest.$ac_ext\"") >&5
10728   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10729   ac_status=$?
10730   egrep -v '^ *\+' conftest.er1 >conftest.err
10731   rm -f conftest.er1
10732   cat conftest.err >&5
10733   echo "$as_me:10733: \$? = $ac_status" >&5
10734   (exit $ac_status); } >/dev/null; then
10735   if test -s conftest.err; then
10736     ac_cpp_err=$ac_c_preproc_warn_flag
10737   else
10738     ac_cpp_err=
10739   fi
10740 else
10741   ac_cpp_err=yes
10742 fi
10743 if test -z "$ac_cpp_err"; then
10744   ac_cv_header_stdc=yes
10745 else
10746   echo "$as_me: failed program was:" >&5
10747   cat conftest.$ac_ext >&5
10748   ac_cv_header_stdc=no
10749 fi
10750 rm -f conftest.err conftest.$ac_ext
10751
10752 if test $ac_cv_header_stdc = yes; then
10753   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10754   cat >conftest.$ac_ext <<_ACEOF
10755 #line 10755 "configure"
10756 #include "confdefs.h"
10757 #include <string.h>
10758
10759 _ACEOF
10760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10761   egrep "memchr" >/dev/null 2>&1; then
10762   :
10763 else
10764   ac_cv_header_stdc=no
10765 fi
10766 rm -rf conftest*
10767
10768 fi
10769
10770 if test $ac_cv_header_stdc = yes; then
10771   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10772   cat >conftest.$ac_ext <<_ACEOF
10773 #line 10773 "configure"
10774 #include "confdefs.h"
10775 #include <stdlib.h>
10776
10777 _ACEOF
10778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10779   egrep "free" >/dev/null 2>&1; then
10780   :
10781 else
10782   ac_cv_header_stdc=no
10783 fi
10784 rm -rf conftest*
10785
10786 fi
10787
10788 if test $ac_cv_header_stdc = yes; then
10789   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10790   if test "$cross_compiling" = yes; then
10791   :
10792 else
10793   cat >conftest.$ac_ext <<_ACEOF
10794 #line 10794 "configure"
10795 #include "confdefs.h"
10796 #include <ctype.h>
10797 #if ((' ' & 0x0FF) == 0x020)
10798 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10799 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10800 #else
10801 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10802                      || ('j' <= (c) && (c) <= 'r') \
10803                      || ('s' <= (c) && (c) <= 'z'))
10804 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10805 #endif
10806
10807 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10808 int
10809 main ()
10810 {
10811   int i;
10812   for (i = 0; i < 256; i++)
10813     if (XOR (islower (i), ISLOWER (i))
10814         || toupper (i) != TOUPPER (i))
10815       $ac_main_return(2);
10816   $ac_main_return (0);
10817 }
10818 _ACEOF
10819 rm -f conftest$ac_exeext
10820 if { (eval echo "$as_me:10820: \"$ac_link\"") >&5
10821   (eval $ac_link) 2>&5
10822   ac_status=$?
10823   echo "$as_me:10823: \$? = $ac_status" >&5
10824   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10825   { (eval echo "$as_me:10825: \"$ac_try\"") >&5
10826   (eval $ac_try) 2>&5
10827   ac_status=$?
10828   echo "$as_me:10828: \$? = $ac_status" >&5
10829   (exit $ac_status); }; }; then
10830   :
10831 else
10832   echo "$as_me: program exited with status $ac_status" >&5
10833 echo "$as_me: failed program was:" >&5
10834 cat conftest.$ac_ext >&5
10835 ac_cv_header_stdc=no
10836 fi
10837 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10838 fi
10839 fi
10840 fi
10841 echo "$as_me:10841: result: $ac_cv_header_stdc" >&5
10842 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10843 if test $ac_cv_header_stdc = yes; then
10844
10845 cat >>confdefs.h <<\EOF
10846 #define STDC_HEADERS 1
10847 EOF
10848
10849 fi
10850
10851 ac_header_dirent=no
10852 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10853   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10854 echo "$as_me:10854: checking for $ac_hdr that defines DIR" >&5
10855 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10856 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10857   echo $ECHO_N "(cached) $ECHO_C" >&6
10858 else
10859   cat >conftest.$ac_ext <<_ACEOF
10860 #line 10860 "configure"
10861 #include "confdefs.h"
10862 #include <sys/types.h>
10863 #include <$ac_hdr>
10864
10865 int
10866 main ()
10867 {
10868 if ((DIR *) 0)
10869 return 0;
10870   ;
10871   return 0;
10872 }
10873 _ACEOF
10874 rm -f conftest.$ac_objext
10875 if { (eval echo "$as_me:10875: \"$ac_compile\"") >&5
10876   (eval $ac_compile) 2>&5
10877   ac_status=$?
10878   echo "$as_me:10878: \$? = $ac_status" >&5
10879   (exit $ac_status); } &&
10880          { ac_try='test -s conftest.$ac_objext'
10881   { (eval echo "$as_me:10881: \"$ac_try\"") >&5
10882   (eval $ac_try) 2>&5
10883   ac_status=$?
10884   echo "$as_me:10884: \$? = $ac_status" >&5
10885   (exit $ac_status); }; }; then
10886   eval "$as_ac_Header=yes"
10887 else
10888   echo "$as_me: failed program was:" >&5
10889 cat conftest.$ac_ext >&5
10890 eval "$as_ac_Header=no"
10891 fi
10892 rm -f conftest.$ac_objext conftest.$ac_ext
10893 fi
10894 echo "$as_me:10894: result: `eval echo '${'$as_ac_Header'}'`" >&5
10895 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10896 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10897   cat >>confdefs.h <<EOF
10898 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10899 EOF
10900
10901 ac_header_dirent=$ac_hdr; break
10902 fi
10903
10904 done
10905 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10906 if test $ac_header_dirent = dirent.h; then
10907   echo "$as_me:10907: checking for opendir in -ldir" >&5
10908 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10909 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10910   echo $ECHO_N "(cached) $ECHO_C" >&6
10911 else
10912   ac_check_lib_save_LIBS=$LIBS
10913 LIBS="-ldir  $LIBS"
10914 cat >conftest.$ac_ext <<_ACEOF
10915 #line 10915 "configure"
10916 #include "confdefs.h"
10917
10918 /* Override any gcc2 internal prototype to avoid an error.  */
10919 #ifdef __cplusplus
10920 extern "C"
10921 #endif
10922 /* We use char because int might match the return type of a gcc2
10923    builtin and then its argument prototype would still apply.  */
10924 char opendir ();
10925 int
10926 main ()
10927 {
10928 opendir ();
10929   ;
10930   return 0;
10931 }
10932 _ACEOF
10933 rm -f conftest.$ac_objext conftest$ac_exeext
10934 if { (eval echo "$as_me:10934: \"$ac_link\"") >&5
10935   (eval $ac_link) 2>&5
10936   ac_status=$?
10937   echo "$as_me:10937: \$? = $ac_status" >&5
10938   (exit $ac_status); } &&
10939          { ac_try='test -s conftest$ac_exeext'
10940   { (eval echo "$as_me:10940: \"$ac_try\"") >&5
10941   (eval $ac_try) 2>&5
10942   ac_status=$?
10943   echo "$as_me:10943: \$? = $ac_status" >&5
10944   (exit $ac_status); }; }; then
10945   ac_cv_lib_dir_opendir=yes
10946 else
10947   echo "$as_me: failed program was:" >&5
10948 cat conftest.$ac_ext >&5
10949 ac_cv_lib_dir_opendir=no
10950 fi
10951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10952 LIBS=$ac_check_lib_save_LIBS
10953 fi
10954 echo "$as_me:10954: result: $ac_cv_lib_dir_opendir" >&5
10955 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10956 if test $ac_cv_lib_dir_opendir = yes; then
10957   LIBS="$LIBS -ldir"
10958 fi
10959
10960 else
10961   echo "$as_me:10961: checking for opendir in -lx" >&5
10962 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10963 if test "${ac_cv_lib_x_opendir+set}" = set; then
10964   echo $ECHO_N "(cached) $ECHO_C" >&6
10965 else
10966   ac_check_lib_save_LIBS=$LIBS
10967 LIBS="-lx  $LIBS"
10968 cat >conftest.$ac_ext <<_ACEOF
10969 #line 10969 "configure"
10970 #include "confdefs.h"
10971
10972 /* Override any gcc2 internal prototype to avoid an error.  */
10973 #ifdef __cplusplus
10974 extern "C"
10975 #endif
10976 /* We use char because int might match the return type of a gcc2
10977    builtin and then its argument prototype would still apply.  */
10978 char opendir ();
10979 int
10980 main ()
10981 {
10982 opendir ();
10983   ;
10984   return 0;
10985 }
10986 _ACEOF
10987 rm -f conftest.$ac_objext conftest$ac_exeext
10988 if { (eval echo "$as_me:10988: \"$ac_link\"") >&5
10989   (eval $ac_link) 2>&5
10990   ac_status=$?
10991   echo "$as_me:10991: \$? = $ac_status" >&5
10992   (exit $ac_status); } &&
10993          { ac_try='test -s conftest$ac_exeext'
10994   { (eval echo "$as_me:10994: \"$ac_try\"") >&5
10995   (eval $ac_try) 2>&5
10996   ac_status=$?
10997   echo "$as_me:10997: \$? = $ac_status" >&5
10998   (exit $ac_status); }; }; then
10999   ac_cv_lib_x_opendir=yes
11000 else
11001   echo "$as_me: failed program was:" >&5
11002 cat conftest.$ac_ext >&5
11003 ac_cv_lib_x_opendir=no
11004 fi
11005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11006 LIBS=$ac_check_lib_save_LIBS
11007 fi
11008 echo "$as_me:11008: result: $ac_cv_lib_x_opendir" >&5
11009 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11010 if test $ac_cv_lib_x_opendir = yes; then
11011   LIBS="$LIBS -lx"
11012 fi
11013
11014 fi
11015
11016 echo "$as_me:11016: checking whether time.h and sys/time.h may both be included" >&5
11017 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11018 if test "${ac_cv_header_time+set}" = set; then
11019   echo $ECHO_N "(cached) $ECHO_C" >&6
11020 else
11021   cat >conftest.$ac_ext <<_ACEOF
11022 #line 11022 "configure"
11023 #include "confdefs.h"
11024 #include <sys/types.h>
11025 #include <sys/time.h>
11026 #include <time.h>
11027
11028 int
11029 main ()
11030 {
11031 if ((struct tm *) 0)
11032 return 0;
11033   ;
11034   return 0;
11035 }
11036 _ACEOF
11037 rm -f conftest.$ac_objext
11038 if { (eval echo "$as_me:11038: \"$ac_compile\"") >&5
11039   (eval $ac_compile) 2>&5
11040   ac_status=$?
11041   echo "$as_me:11041: \$? = $ac_status" >&5
11042   (exit $ac_status); } &&
11043          { ac_try='test -s conftest.$ac_objext'
11044   { (eval echo "$as_me:11044: \"$ac_try\"") >&5
11045   (eval $ac_try) 2>&5
11046   ac_status=$?
11047   echo "$as_me:11047: \$? = $ac_status" >&5
11048   (exit $ac_status); }; }; then
11049   ac_cv_header_time=yes
11050 else
11051   echo "$as_me: failed program was:" >&5
11052 cat conftest.$ac_ext >&5
11053 ac_cv_header_time=no
11054 fi
11055 rm -f conftest.$ac_objext conftest.$ac_ext
11056 fi
11057 echo "$as_me:11057: result: $ac_cv_header_time" >&5
11058 echo "${ECHO_T}$ac_cv_header_time" >&6
11059 if test $ac_cv_header_time = yes; then
11060
11061 cat >>confdefs.h <<\EOF
11062 #define TIME_WITH_SYS_TIME 1
11063 EOF
11064
11065 fi
11066
11067 ###     checks for compiler characteristics
11068 ac_ext=c
11069 ac_cpp='$CPP $CPPFLAGS'
11070 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11071 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11072 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11073 ac_main_return=return
11074
11075 echo "$as_me:11075: checking for $CC option to accept ANSI C" >&5
11076 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11077 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11078   echo $ECHO_N "(cached) $ECHO_C" >&6
11079 else
11080   ac_cv_prog_cc_stdc=no
11081 ac_save_CC=$CC
11082 cat >conftest.$ac_ext <<_ACEOF
11083 #line 11083 "configure"
11084 #include "confdefs.h"
11085 #include <stdarg.h>
11086 #include <stdio.h>
11087 #include <sys/types.h>
11088 #include <sys/stat.h>
11089 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11090 struct buf { int x; };
11091 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11092 static char *e (p, i)
11093      char **p;
11094      int i;
11095 {
11096   return p[i];
11097 }
11098 static char *f (char * (*g) (char **, int), char **p, ...)
11099 {
11100   char *s;
11101   va_list v;
11102   va_start (v,p);
11103   s = g (p, va_arg (v,int));
11104   va_end (v);
11105   return s;
11106 }
11107 int test (int i, double x);
11108 struct s1 {int (*f) (int a);};
11109 struct s2 {int (*f) (double a);};
11110 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11111 int argc;
11112 char **argv;
11113 int
11114 main ()
11115 {
11116 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11117   ;
11118   return 0;
11119 }
11120 _ACEOF
11121 # Don't try gcc -ansi; that turns off useful extensions and
11122 # breaks some systems' header files.
11123 # AIX                   -qlanglvl=ansi
11124 # Ultrix and OSF/1      -std1
11125 # HP-UX 10.20 and later -Ae
11126 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11127 # SVR4                  -Xc -D__EXTENSIONS__
11128 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11129 do
11130   CC="$ac_save_CC $ac_arg"
11131   rm -f conftest.$ac_objext
11132 if { (eval echo "$as_me:11132: \"$ac_compile\"") >&5
11133   (eval $ac_compile) 2>&5
11134   ac_status=$?
11135   echo "$as_me:11135: \$? = $ac_status" >&5
11136   (exit $ac_status); } &&
11137          { ac_try='test -s conftest.$ac_objext'
11138   { (eval echo "$as_me:11138: \"$ac_try\"") >&5
11139   (eval $ac_try) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit $ac_status); }; }; then
11143   ac_cv_prog_cc_stdc=$ac_arg
11144 break
11145 else
11146   echo "$as_me: failed program was:" >&5
11147 cat conftest.$ac_ext >&5
11148 fi
11149 rm -f conftest.$ac_objext
11150 done
11151 rm -f conftest.$ac_ext conftest.$ac_objext
11152 CC=$ac_save_CC
11153
11154 fi
11155
11156 case "x$ac_cv_prog_cc_stdc" in
11157   x|xno)
11158     echo "$as_me:11158: result: none needed" >&5
11159 echo "${ECHO_T}none needed" >&6 ;;
11160   *)
11161     echo "$as_me:11161: result: $ac_cv_prog_cc_stdc" >&5
11162 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11163     CC="$CC $ac_cv_prog_cc_stdc" ;;
11164 esac
11165
11166 echo "$as_me:11166: checking for an ANSI C-conforming const" >&5
11167 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11168 if test "${ac_cv_c_const+set}" = set; then
11169   echo $ECHO_N "(cached) $ECHO_C" >&6
11170 else
11171   cat >conftest.$ac_ext <<_ACEOF
11172 #line 11172 "configure"
11173 #include "confdefs.h"
11174
11175 int
11176 main ()
11177 {
11178 /* FIXME: Include the comments suggested by Paul. */
11179 #ifndef __cplusplus
11180   /* Ultrix mips cc rejects this.  */
11181   typedef int charset[2];
11182   const charset x;
11183   /* SunOS 4.1.1 cc rejects this.  */
11184   char const *const *ccp;
11185   char **p;
11186   /* NEC SVR4.0.2 mips cc rejects this.  */
11187   struct point {int x, y;};
11188   static struct point const zero = {0,0};
11189   /* AIX XL C 1.02.0.0 rejects this.
11190      It does not let you subtract one const X* pointer from another in
11191      an arm of an if-expression whose if-part is not a constant
11192      expression */
11193   const char *g = "string";
11194   ccp = &g + (g ? g-g : 0);
11195   /* HPUX 7.0 cc rejects these. */
11196   ++ccp;
11197   p = (char**) ccp;
11198   ccp = (char const *const *) p;
11199   { /* SCO 3.2v4 cc rejects this.  */
11200     char *t;
11201     char const *s = 0 ? (char *) 0 : (char const *) 0;
11202
11203     *t++ = 0;
11204   }
11205   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11206     int x[] = {25, 17};
11207     const int *foo = &x[0];
11208     ++foo;
11209   }
11210   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11211     typedef const int *iptr;
11212     iptr p = 0;
11213     ++p;
11214   }
11215   { /* AIX XL C 1.02.0.0 rejects this saying
11216        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11217     struct s { int j; const int *ap[3]; };
11218     struct s *b; b->j = 5;
11219   }
11220   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11221     const int foo = 10;
11222   }
11223 #endif
11224
11225   ;
11226   return 0;
11227 }
11228 _ACEOF
11229 rm -f conftest.$ac_objext
11230 if { (eval echo "$as_me:11230: \"$ac_compile\"") >&5
11231   (eval $ac_compile) 2>&5
11232   ac_status=$?
11233   echo "$as_me:11233: \$? = $ac_status" >&5
11234   (exit $ac_status); } &&
11235          { ac_try='test -s conftest.$ac_objext'
11236   { (eval echo "$as_me:11236: \"$ac_try\"") >&5
11237   (eval $ac_try) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); }; }; then
11241   ac_cv_c_const=yes
11242 else
11243   echo "$as_me: failed program was:" >&5
11244 cat conftest.$ac_ext >&5
11245 ac_cv_c_const=no
11246 fi
11247 rm -f conftest.$ac_objext conftest.$ac_ext
11248 fi
11249 echo "$as_me:11249: result: $ac_cv_c_const" >&5
11250 echo "${ECHO_T}$ac_cv_c_const" >&6
11251 if test $ac_cv_c_const = no; then
11252
11253 cat >>confdefs.h <<\EOF
11254 #define const
11255 EOF
11256
11257 fi
11258
11259 ###     Checks for external-data
11260
11261 echo "$as_me:11261: checking if data-only library module links" >&5
11262 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11263 if test "${cf_cv_link_dataonly+set}" = set; then
11264   echo $ECHO_N "(cached) $ECHO_C" >&6
11265 else
11266
11267         rm -f conftest.a
11268         cat >conftest.$ac_ext <<EOF
11269 #line 11269 "configure"
11270 int     testdata[3] = { 123, 456, 789 };
11271 EOF
11272         if { (eval echo "$as_me:11272: \"$ac_compile\"") >&5
11273   (eval $ac_compile) 2>&5
11274   ac_status=$?
11275   echo "$as_me:11275: \$? = $ac_status" >&5
11276   (exit $ac_status); } ; then
11277                 mv conftest.o data.o && \
11278                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
11279         fi
11280         rm -f conftest.$ac_ext data.o
11281         cat >conftest.$ac_ext <<EOF
11282 #line 11282 "configure"
11283 int     testfunc()
11284 {
11285 #if defined(NeXT)
11286         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11287 #else
11288         extern int testdata[3];
11289         return testdata[0] == 123
11290            &&  testdata[1] == 456
11291            &&  testdata[2] == 789;
11292 #endif
11293 }
11294 EOF
11295         if { (eval echo "$as_me:11295: \"$ac_compile\"") >&5
11296   (eval $ac_compile) 2>&5
11297   ac_status=$?
11298   echo "$as_me:11298: \$? = $ac_status" >&5
11299   (exit $ac_status); }; then
11300                 mv conftest.o func.o && \
11301                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
11302         fi
11303         rm -f conftest.$ac_ext func.o
11304         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11305         cf_saveLIBS="$LIBS"
11306         LIBS="conftest.a $LIBS"
11307         if test "$cross_compiling" = yes; then
11308   cf_cv_link_dataonly=unknown
11309 else
11310   cat >conftest.$ac_ext <<_ACEOF
11311 #line 11311 "configure"
11312 #include "confdefs.h"
11313
11314         int main()
11315         {
11316                 extern int testfunc();
11317                 ${cf_cv_main_return:-return} (!testfunc());
11318         }
11319
11320 _ACEOF
11321 rm -f conftest$ac_exeext
11322 if { (eval echo "$as_me:11322: \"$ac_link\"") >&5
11323   (eval $ac_link) 2>&5
11324   ac_status=$?
11325   echo "$as_me:11325: \$? = $ac_status" >&5
11326   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11327   { (eval echo "$as_me:11327: \"$ac_try\"") >&5
11328   (eval $ac_try) 2>&5
11329   ac_status=$?
11330   echo "$as_me:11330: \$? = $ac_status" >&5
11331   (exit $ac_status); }; }; then
11332   cf_cv_link_dataonly=yes
11333 else
11334   echo "$as_me: program exited with status $ac_status" >&5
11335 echo "$as_me: failed program was:" >&5
11336 cat conftest.$ac_ext >&5
11337 cf_cv_link_dataonly=no
11338 fi
11339 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11340 fi
11341         LIBS="$cf_saveLIBS"
11342
11343 fi
11344
11345 echo "$as_me:11345: result: $cf_cv_link_dataonly" >&5
11346 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11347
11348 if test "$cf_cv_link_dataonly" = no ; then
11349         cat >>confdefs.h <<\EOF
11350 #define BROKEN_LINKER 1
11351 EOF
11352
11353         BROKEN_LINKER=1
11354 fi
11355
11356 ###     Checks for library functions.
11357
11358 echo "$as_me:11358: checking for working mkstemp" >&5
11359 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11360 if test "${cf_cv_func_mkstemp+set}" = set; then
11361   echo $ECHO_N "(cached) $ECHO_C" >&6
11362 else
11363
11364 rm -rf conftest*
11365 if test "$cross_compiling" = yes; then
11366   echo "$as_me:11366: checking for mkstemp" >&5
11367 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11368 if test "${ac_cv_func_mkstemp+set}" = set; then
11369   echo $ECHO_N "(cached) $ECHO_C" >&6
11370 else
11371   cat >conftest.$ac_ext <<_ACEOF
11372 #line 11372 "configure"
11373 #include "confdefs.h"
11374 /* System header to define __stub macros and hopefully few prototypes,
11375     which can conflict with char mkstemp (); below.  */
11376 #include <assert.h>
11377 /* Override any gcc2 internal prototype to avoid an error.  */
11378 #ifdef __cplusplus
11379 extern "C"
11380 #endif
11381 /* We use char because int might match the return type of a gcc2
11382    builtin and then its argument prototype would still apply.  */
11383 char mkstemp ();
11384 char (*f) ();
11385
11386 int
11387 main ()
11388 {
11389 /* The GNU C library defines this for functions which it implements
11390     to always fail with ENOSYS.  Some functions are actually named
11391     something starting with __ and the normal name is an alias.  */
11392 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11393 choke me
11394 #else
11395 f = mkstemp;
11396 #endif
11397
11398   ;
11399   return 0;
11400 }
11401 _ACEOF
11402 rm -f conftest.$ac_objext conftest$ac_exeext
11403 if { (eval echo "$as_me:11403: \"$ac_link\"") >&5
11404   (eval $ac_link) 2>&5
11405   ac_status=$?
11406   echo "$as_me:11406: \$? = $ac_status" >&5
11407   (exit $ac_status); } &&
11408          { ac_try='test -s conftest$ac_exeext'
11409   { (eval echo "$as_me:11409: \"$ac_try\"") >&5
11410   (eval $ac_try) 2>&5
11411   ac_status=$?
11412   echo "$as_me:11412: \$? = $ac_status" >&5
11413   (exit $ac_status); }; }; then
11414   ac_cv_func_mkstemp=yes
11415 else
11416   echo "$as_me: failed program was:" >&5
11417 cat conftest.$ac_ext >&5
11418 ac_cv_func_mkstemp=no
11419 fi
11420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11421 fi
11422 echo "$as_me:11422: result: $ac_cv_func_mkstemp" >&5
11423 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11424
11425 else
11426   cat >conftest.$ac_ext <<_ACEOF
11427 #line 11427 "configure"
11428 #include "confdefs.h"
11429
11430 #include <sys/types.h>
11431 #include <stdlib.h>
11432 #include <stdio.h>
11433 #include <string.h>
11434 #include <sys/stat.h>
11435 int main()
11436 {
11437         char *tmpl = "conftestXXXXXX";
11438         char name[2][80];
11439         int n;
11440         int result = 0;
11441         int fd;
11442         struct stat sb;
11443
11444         umask(077);
11445         for (n = 0; n < 2; ++n) {
11446                 strcpy(name[n], tmpl);
11447                 if ((fd = mkstemp(name[n])) >= 0) {
11448                         if (!strcmp(name[n], tmpl)
11449                          || stat(name[n], &sb) != 0
11450                          || (sb.st_mode & S_IFMT) != S_IFREG
11451                          || (sb.st_mode & 077) != 0) {
11452                                 result = 1;
11453                         }
11454                         close(fd);
11455                 }
11456         }
11457         if (result == 0
11458          && !strcmp(name[0], name[1]))
11459                 result = 1;
11460         ${cf_cv_main_return:-return}(result);
11461 }
11462
11463 _ACEOF
11464 rm -f conftest$ac_exeext
11465 if { (eval echo "$as_me:11465: \"$ac_link\"") >&5
11466   (eval $ac_link) 2>&5
11467   ac_status=$?
11468   echo "$as_me:11468: \$? = $ac_status" >&5
11469   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11470   { (eval echo "$as_me:11470: \"$ac_try\"") >&5
11471   (eval $ac_try) 2>&5
11472   ac_status=$?
11473   echo "$as_me:11473: \$? = $ac_status" >&5
11474   (exit $ac_status); }; }; then
11475   cf_cv_func_mkstemp=yes
11476
11477 else
11478   echo "$as_me: program exited with status $ac_status" >&5
11479 echo "$as_me: failed program was:" >&5
11480 cat conftest.$ac_ext >&5
11481 cf_cv_func_mkstemp=no
11482
11483 fi
11484 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11485 fi
11486
11487 fi
11488 echo "$as_me:11488: result: $cf_cv_func_mkstemp" >&5
11489 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11490 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
11491         cat >>confdefs.h <<\EOF
11492 #define HAVE_MKSTEMP 1
11493 EOF
11494
11495 fi
11496
11497 echo "$as_me:11497: checking return type of signal handlers" >&5
11498 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11499 if test "${ac_cv_type_signal+set}" = set; then
11500   echo $ECHO_N "(cached) $ECHO_C" >&6
11501 else
11502   cat >conftest.$ac_ext <<_ACEOF
11503 #line 11503 "configure"
11504 #include "confdefs.h"
11505 #include <sys/types.h>
11506 #include <signal.h>
11507 #ifdef signal
11508 # undef signal
11509 #endif
11510 #ifdef __cplusplus
11511 extern "C" void (*signal (int, void (*)(int)))(int);
11512 #else
11513 void (*signal ()) ();
11514 #endif
11515
11516 int
11517 main ()
11518 {
11519 int i;
11520   ;
11521   return 0;
11522 }
11523 _ACEOF
11524 rm -f conftest.$ac_objext
11525 if { (eval echo "$as_me:11525: \"$ac_compile\"") >&5
11526   (eval $ac_compile) 2>&5
11527   ac_status=$?
11528   echo "$as_me:11528: \$? = $ac_status" >&5
11529   (exit $ac_status); } &&
11530          { ac_try='test -s conftest.$ac_objext'
11531   { (eval echo "$as_me:11531: \"$ac_try\"") >&5
11532   (eval $ac_try) 2>&5
11533   ac_status=$?
11534   echo "$as_me:11534: \$? = $ac_status" >&5
11535   (exit $ac_status); }; }; then
11536   ac_cv_type_signal=void
11537 else
11538   echo "$as_me: failed program was:" >&5
11539 cat conftest.$ac_ext >&5
11540 ac_cv_type_signal=int
11541 fi
11542 rm -f conftest.$ac_objext conftest.$ac_ext
11543 fi
11544 echo "$as_me:11544: result: $ac_cv_type_signal" >&5
11545 echo "${ECHO_T}$ac_cv_type_signal" >&6
11546
11547 cat >>confdefs.h <<EOF
11548 #define RETSIGTYPE $ac_cv_type_signal
11549 EOF
11550
11551 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
11552         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11553         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11554 fi
11555
11556 cf_with_ada=yes
11557 if test "$cf_with_ada" != "no" ; then
11558
11559 cf_ada_make=gnatmake
11560 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
11561 set dummy $cf_ada_make; ac_word=$2
11562 echo "$as_me:11562: checking for $ac_word" >&5
11563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11564 if test "${ac_cv_prog_gnat_exists+set}" = set; then
11565   echo $ECHO_N "(cached) $ECHO_C" >&6
11566 else
11567   if test -n "$gnat_exists"; then
11568   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
11569 else
11570   ac_save_IFS=$IFS; IFS=$ac_path_separator
11571 ac_dummy="$PATH"
11572 for ac_dir in $ac_dummy; do
11573   IFS=$ac_save_IFS
11574   test -z "$ac_dir" && ac_dir=.
11575   $as_executable_p "$ac_dir/$ac_word" || continue
11576 ac_cv_prog_gnat_exists="yes"
11577 echo "$as_me:11577: found $ac_dir/$ac_word" >&5
11578 break
11579 done
11580
11581   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
11582 fi
11583 fi
11584 gnat_exists=$ac_cv_prog_gnat_exists
11585 if test -n "$gnat_exists"; then
11586   echo "$as_me:11586: result: $gnat_exists" >&5
11587 echo "${ECHO_T}$gnat_exists" >&6
11588 else
11589   echo "$as_me:11589: result: no" >&5
11590 echo "${ECHO_T}no" >&6
11591 fi
11592
11593 if test "$ac_cv_prog_gnat_exists" = no; then
11594    cf_ada_make=
11595    cf_cv_prog_gnat_correct=no
11596 else
11597
11598 echo "$as_me:11598: checking for gnat version" >&5
11599 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
11600 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
11601         grep '[0-9].[0-9][0-9]*' |\
11602     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
11603 echo "$as_me:11603: result: $cf_gnat_version" >&5
11604 echo "${ECHO_T}$cf_gnat_version" >&6
11605
11606 case $cf_gnat_version in #(vi
11607 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
11608         cf_cv_prog_gnat_correct=yes
11609         ;;
11610 *)
11611         { echo "$as_me:11611: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
11612 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
11613         cf_cv_prog_gnat_correct=no
11614         ;;
11615 esac
11616
11617    # Extract the first word of "m4", so it can be a program name with args.
11618 set dummy m4; ac_word=$2
11619 echo "$as_me:11619: checking for $ac_word" >&5
11620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11621 if test "${ac_cv_prog_M4_exists+set}" = set; then
11622   echo $ECHO_N "(cached) $ECHO_C" >&6
11623 else
11624   if test -n "$M4_exists"; then
11625   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
11626 else
11627   ac_save_IFS=$IFS; IFS=$ac_path_separator
11628 ac_dummy="$PATH"
11629 for ac_dir in $ac_dummy; do
11630   IFS=$ac_save_IFS
11631   test -z "$ac_dir" && ac_dir=.
11632   $as_executable_p "$ac_dir/$ac_word" || continue
11633 ac_cv_prog_M4_exists="yes"
11634 echo "$as_me:11634: found $ac_dir/$ac_word" >&5
11635 break
11636 done
11637
11638   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
11639 fi
11640 fi
11641 M4_exists=$ac_cv_prog_M4_exists
11642 if test -n "$M4_exists"; then
11643   echo "$as_me:11643: result: $M4_exists" >&5
11644 echo "${ECHO_T}$M4_exists" >&6
11645 else
11646   echo "$as_me:11646: result: no" >&5
11647 echo "${ECHO_T}no" >&6
11648 fi
11649
11650    if test "$ac_cv_prog_M4_exists" = no; then
11651       cf_cv_prog_gnat_correct=no
11652       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
11653    fi
11654    if test "$cf_cv_prog_gnat_correct" = yes; then
11655       echo "$as_me:11655: checking if GNAT works" >&5
11656 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
11657
11658 rm -rf conftest* *~conftest*
11659 cat >>conftest.ads <<CF_EOF
11660 procedure conftest;
11661 CF_EOF
11662 cat >>conftest.adb <<CF_EOF
11663 with Text_IO;
11664 with GNAT.OS_Lib;
11665 procedure conftest is
11666 begin
11667    Text_IO.Put ("Hello World");
11668    Text_IO.New_Line;
11669    GNAT.OS_Lib.OS_Exit (0);
11670 end conftest;
11671 CF_EOF
11672 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11673    if ( ./conftest 1>&5 2>&1 ) ; then
11674       cf_cv_prog_gnat_correct=yes
11675    else
11676       cf_cv_prog_gnat_correct=no
11677    fi
11678 else
11679    cf_cv_prog_gnat_correct=no
11680 fi
11681 rm -rf conftest* *~conftest*
11682
11683       echo "$as_me:11683: result: $cf_cv_prog_gnat_correct" >&5
11684 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
11685    fi
11686 fi
11687
11688         if test "$cf_cv_prog_gnat_correct" = yes; then
11689
11690                 # make ADAFLAGS consistent with CFLAGS
11691                 case "$CFLAGS" in
11692                 *-g*)
11693
11694         ADAFLAGS="$ADAFLAGS -g"
11695
11696                         ;;
11697                 esac
11698                 case "$CFLAGS" in
11699                 *-O*)
11700
11701         ADAFLAGS="$ADAFLAGS -O3"
11702
11703                         ;;
11704                 esac
11705
11706 echo "$as_me:11706: checking if GNAT supports generics" >&5
11707 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
11708 case $cf_gnat_version in #(vi
11709 3.[1-9]*|[4-9].*) #(vi
11710         cf_gnat_generics=yes
11711         ;;
11712 *)
11713         cf_gnat_generics=no
11714         ;;
11715 esac
11716 echo "$as_me:11716: result: $cf_gnat_generics" >&5
11717 echo "${ECHO_T}$cf_gnat_generics" >&6
11718
11719 if test "$cf_gnat_generics" = yes
11720 then
11721         cf_compile_generics=generics
11722         cf_generic_objects="\${GENOBJS}"
11723 else
11724         cf_compile_generics=
11725         cf_generic_objects=
11726 fi
11727
11728 echo "$as_me:11728: checking if GNAT supports SIGINT" >&5
11729 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
11730 if test "${cf_cv_gnat_sigint+set}" = set; then
11731   echo $ECHO_N "(cached) $ECHO_C" >&6
11732 else
11733
11734 rm -rf conftest* *~conftest*
11735 cat >>conftest.ads <<CF_EOF
11736 with Ada.Interrupts.Names;
11737
11738 package ConfTest is
11739
11740    pragma Warnings (Off);  --  the next pragma exists since 3.11p
11741    pragma Unreserve_All_Interrupts;
11742    pragma Warnings (On);
11743
11744    protected Process is
11745       procedure Stop;
11746       function Continue return Boolean;
11747       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
11748    private
11749       Done : Boolean := False;
11750    end Process;
11751
11752 end ConfTest;
11753 CF_EOF
11754 cat >>conftest.adb <<CF_EOF
11755 package body ConfTest is
11756    protected body Process is
11757       procedure Stop is
11758       begin
11759          Done := True;
11760       end Stop;
11761       function Continue return Boolean is
11762       begin
11763          return not Done;
11764       end Continue;
11765    end Process;
11766 end ConfTest;
11767 CF_EOF
11768 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11769       cf_cv_gnat_sigint=yes
11770 else
11771    cf_cv_gnat_sigint=no
11772 fi
11773 rm -rf conftest* *~conftest*
11774
11775 fi
11776 echo "$as_me:11776: result: $cf_cv_gnat_sigint" >&5
11777 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11778
11779 if test $cf_cv_gnat_sigint = yes ; then
11780         USE_GNAT_SIGINT=""
11781 else
11782         USE_GNAT_SIGINT="#"
11783 fi
11784
11785 echo "$as_me:11785: checking if GNAT pragma Unreferenced works" >&5
11786 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11787 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11788   echo $ECHO_N "(cached) $ECHO_C" >&6
11789 else
11790
11791 rm -rf conftest* *~conftest*
11792 cat >>conftest.ads <<CF_EOF
11793 procedure conftest;
11794 CF_EOF
11795 cat >>conftest.adb <<CF_EOF
11796 with Text_IO;
11797 with GNAT.OS_Lib;
11798 procedure conftest is
11799    test : Integer;
11800    pragma Unreferenced (test);
11801 begin
11802    test := 1;
11803    Text_IO.Put ("Hello World");
11804    Text_IO.New_Line;
11805    GNAT.OS_Lib.OS_Exit (0);
11806 end conftest;
11807 CF_EOF
11808 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11809       cf_cv_pragma_unreferenced=yes
11810 else
11811    cf_cv_pragma_unreferenced=no
11812 fi
11813 rm -rf conftest* *~conftest*
11814
11815 fi
11816 echo "$as_me:11816: result: $cf_cv_pragma_unreferenced" >&5
11817 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11818
11819 # if the pragma is supported, use it (needed in the Trace code).
11820 if test $cf_cv_pragma_unreferenced = yes ; then
11821         PRAGMA_UNREF=TRUE
11822 else
11823         PRAGMA_UNREF=FALSE
11824 fi
11825
11826 cf_gnat_libraries=no
11827 cf_gnat_projects=no
11828
11829 echo "$as_me:11829: checking if GNAT supports project files" >&5
11830 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11831 case $cf_gnat_version in #(vi
11832 3.[0-9]*) #(vi
11833         ;;
11834 *)
11835         case $cf_cv_system_name in #(vi
11836         cygwin*) #(vi
11837                 ;;
11838         *)
11839                 mkdir conftest.src conftest.bin conftest.lib
11840                 cd conftest.src
11841                 rm -rf conftest* *~conftest*
11842                 cat >>library.gpr <<CF_EOF
11843 project Library is
11844   Kind := External ("LIB_KIND");
11845   for Library_Name use "ConfTest";
11846   for Object_Dir use ".";
11847   for Library_ALI_Dir use External("LIBRARY_DIR");
11848   for Library_Version use External ("SONAME");
11849   for Library_Kind use Kind;
11850   for Library_Dir use External("BUILD_DIR");
11851   Source_Dir := External ("SOURCE_DIR");
11852   for Source_Dirs use (Source_Dir);
11853   package Compiler is
11854      for Default_Switches ("Ada") use
11855        ("-g",
11856         "-O2",
11857         "-gnatafno",
11858         "-gnatVa",   -- All validity checks
11859         "-gnatwa");  -- Activate all optional errors
11860   end Compiler;
11861 end Library;
11862 CF_EOF
11863                 cat >>confpackage.ads <<CF_EOF
11864 package ConfPackage is
11865    procedure conftest;
11866 end ConfPackage;
11867 CF_EOF
11868                 cat >>confpackage.adb <<CF_EOF
11869 with Text_IO;
11870 package body ConfPackage is
11871    procedure conftest is
11872    begin
11873       Text_IO.Put ("Hello World");
11874       Text_IO.New_Line;
11875    end conftest;
11876 end ConfPackage;
11877 CF_EOF
11878                 if ( $cf_ada_make $ADAFLAGS \
11879                                 -Plibrary.gpr \
11880                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11881                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11882                                 -XSOURCE_DIR=`pwd` \
11883                                 -XSONAME=libConfTest.so.1 \
11884                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11885                         cf_gnat_projects=yes
11886                 fi
11887                 cd ..
11888                 if test -f conftest.lib/confpackage.ali
11889                 then
11890                         cf_gnat_libraries=yes
11891                 fi
11892                 rm -rf conftest* *~conftest*
11893                 ;;
11894         esac
11895         ;;
11896 esac
11897 echo "$as_me:11897: result: $cf_gnat_projects" >&5
11898 echo "${ECHO_T}$cf_gnat_projects" >&6
11899
11900 if test $cf_gnat_projects = yes
11901 then
11902         echo "$as_me:11902: checking if GNAT supports libraries" >&5
11903 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11904         echo "$as_me:11904: result: $cf_gnat_libraries" >&5
11905 echo "${ECHO_T}$cf_gnat_libraries" >&6
11906 fi
11907
11908 if test "$cf_gnat_projects" = yes
11909 then
11910         USE_OLD_MAKERULES="#"
11911         USE_GNAT_PROJECTS=""
11912 else
11913         USE_OLD_MAKERULES=""
11914         USE_GNAT_PROJECTS="#"
11915 fi
11916
11917 if test "$cf_gnat_libraries" = yes
11918 then
11919         USE_GNAT_LIBRARIES=""
11920 else
11921         USE_GNAT_LIBRARIES="#"
11922 fi
11923
11924 echo "$as_me:11924: checking for ada-compiler" >&5
11925 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11926
11927 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11928 if test "${with_ada_compiler+set}" = set; then
11929   withval="$with_ada_compiler"
11930   cf_ada_compiler=$withval
11931 else
11932   cf_ada_compiler=gnatmake
11933 fi;
11934
11935 echo "$as_me:11935: result: $cf_ada_compiler" >&5
11936 echo "${ECHO_T}$cf_ada_compiler" >&6
11937
11938                 cf_ada_package=terminal_interface
11939
11940 echo "$as_me:11940: checking for ada-include" >&5
11941 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11942
11943 # Check whether --with-ada-include or --without-ada-include was given.
11944 if test "${with_ada_include+set}" = set; then
11945   withval="$with_ada_include"
11946
11947 else
11948   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11949 fi; if test -n "$prefix/share/ada/adainclude" ; then
11950
11951 if test "x$prefix" != xNONE; then
11952   cf_path_syntax="$prefix"
11953 else
11954   cf_path_syntax="$ac_default_prefix"
11955 fi
11956
11957 case ".$withval" in #(vi
11958 .\$\(*\)*|.\'*\'*) #(vi
11959   ;;
11960 ..|./*|.\\*) #(vi
11961   ;;
11962 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11963   ;;
11964 .\${*prefix}*) #(vi
11965   eval withval="$withval"
11966   case ".$withval" in #(vi
11967   .NONE/*)
11968     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11969     ;;
11970   esac
11971   ;; #(vi
11972 .no|.NONE/*)
11973   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11974   ;;
11975 *)
11976   { { echo "$as_me:11976: error: expected a pathname, not \"$withval\"" >&5
11977 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11978    { (exit 1); exit 1; }; }
11979   ;;
11980 esac
11981
11982 fi
11983 ADA_INCLUDE="$withval"
11984
11985 echo "$as_me:11985: result: $ADA_INCLUDE" >&5
11986 echo "${ECHO_T}$ADA_INCLUDE" >&6
11987
11988 echo "$as_me:11988: checking for ada-objects" >&5
11989 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11990
11991 # Check whether --with-ada-objects or --without-ada-objects was given.
11992 if test "${with_ada_objects+set}" = set; then
11993   withval="$with_ada_objects"
11994
11995 else
11996   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11997 fi; if test -n "$prefix/lib/ada/adalib" ; then
11998
11999 if test "x$prefix" != xNONE; then
12000   cf_path_syntax="$prefix"
12001 else
12002   cf_path_syntax="$ac_default_prefix"
12003 fi
12004
12005 case ".$withval" in #(vi
12006 .\$\(*\)*|.\'*\'*) #(vi
12007   ;;
12008 ..|./*|.\\*) #(vi
12009   ;;
12010 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
12011   ;;
12012 .\${*prefix}*) #(vi
12013   eval withval="$withval"
12014   case ".$withval" in #(vi
12015   .NONE/*)
12016     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
12017     ;;
12018   esac
12019   ;; #(vi
12020 .no|.NONE/*)
12021   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
12022   ;;
12023 *)
12024   { { echo "$as_me:12024: error: expected a pathname, not \"$withval\"" >&5
12025 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
12026    { (exit 1); exit 1; }; }
12027   ;;
12028 esac
12029
12030 fi
12031 ADA_OBJECTS="$withval"
12032
12033 echo "$as_me:12033: result: $ADA_OBJECTS" >&5
12034 echo "${ECHO_T}$ADA_OBJECTS" >&6
12035
12036 echo "$as_me:12036: checking if an Ada95 shared-library should be built" >&5
12037 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
12038
12039 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
12040 if test "${with_ada_sharedlib+set}" = set; then
12041   withval="$with_ada_sharedlib"
12042   with_ada_sharedlib=$withval
12043 else
12044   with_ada_sharedlib=no
12045 fi;
12046 echo "$as_me:12046: result: $with_ada_sharedlib" >&5
12047 echo "${ECHO_T}$with_ada_sharedlib" >&6
12048
12049 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
12050 MAKE_ADA_SHAREDLIB="#"
12051
12052 if test "x$with_ada_sharedlib" != xno
12053 then
12054         MAKE_ADA_SHAREDLIB=
12055         if test "x$with_ada_sharedlib" != xyes
12056         then
12057                 ADA_SHAREDLIB="$with_ada_sharedlib"
12058         fi
12059 fi
12060
12061         else
12062                 { { echo "$as_me:12062: error: No usable Ada compiler found" >&5
12063 echo "$as_me: error: No usable Ada compiler found" >&2;}
12064    { (exit 1); exit 1; }; }
12065         fi
12066 else
12067         { { echo "$as_me:12067: error: The Ada compiler is needed for this package" >&5
12068 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
12069    { (exit 1); exit 1; }; }
12070 fi
12071
12072 ################################################################################
12073
12074 # not needed
12075 TINFO_LDFLAGS2=
12076
12077 TINFO_LIBS=
12078
12079 ### Construct the list of include-directories to be generated
12080
12081 CPPFLAGS="$CPPFLAGS -I. -I../include"
12082 if test "$srcdir" != "."; then
12083         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
12084 fi
12085 if test "$GCC" != yes; then
12086         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12087 elif test "$includedir" != "/usr/include"; then
12088         if test "$includedir" = '${prefix}/include' ; then
12089                 if test $prefix != /usr ; then
12090                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
12091                 fi
12092         else
12093                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
12094         fi
12095 fi
12096
12097 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
12098 if test "$srcdir" != "."; then
12099         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
12100 fi
12101 if test "$GCC" != yes; then
12102         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12103 elif test "$includedir" != "/usr/include"; then
12104         if test "$includedir" = '${prefix}/include' ; then
12105                 if test $prefix != /usr ; then
12106                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12107                 fi
12108         else
12109                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
12110         fi
12111 fi
12112
12113 ### Build up pieces for makefile rules
12114 echo "$as_me:12114: checking default library suffix" >&5
12115 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
12116
12117         case $DFT_LWR_MODEL in
12118         libtool) DFT_ARG_SUFFIX=''   ;;
12119         normal)  DFT_ARG_SUFFIX=''   ;;
12120         debug)   DFT_ARG_SUFFIX='_g' ;;
12121         profile) DFT_ARG_SUFFIX='_p' ;;
12122         shared)  DFT_ARG_SUFFIX=''   ;;
12123         esac
12124         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
12125 echo "$as_me:12125: result: $DFT_ARG_SUFFIX" >&5
12126 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
12127
12128 echo "$as_me:12128: checking default library-dependency suffix" >&5
12129 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
12130
12131         case $DFT_LWR_MODEL in #(vi
12132         libtool) #(vi
12133                 DFT_LIB_SUFFIX='.la'
12134                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12135                 ;;
12136         normal) #(vi
12137                 DFT_LIB_SUFFIX='.a'
12138                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12139                 ;;
12140         debug) #(vi
12141                 DFT_LIB_SUFFIX='_g.a'
12142                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12143                 ;;
12144         profile) #(vi
12145                 DFT_LIB_SUFFIX='_p.a'
12146                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12147                 ;;
12148         shared) #(vi
12149                 case $cf_cv_system_name in
12150                 aix[5-7]*) #(vi
12151                         DFT_LIB_SUFFIX='.a'
12152                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12153                         ;;
12154                 cygwin*) #(vi
12155                         DFT_LIB_SUFFIX='.dll'
12156                         DFT_DEP_SUFFIX='.dll.a'
12157                         ;;
12158                 darwin*) #(vi
12159                         DFT_LIB_SUFFIX='.dylib'
12160                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12161                         ;;
12162                 hpux*) #(vi
12163                         case $target in
12164                         ia64*) #(vi
12165                                 DFT_LIB_SUFFIX='.so'
12166                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12167                                 ;;
12168                         *) #(vi
12169                                 DFT_LIB_SUFFIX='.sl'
12170                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12171                                 ;;
12172                         esac
12173                         ;;
12174                 *)      DFT_LIB_SUFFIX='.so'
12175                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
12176                         ;;
12177                 esac
12178         esac
12179         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
12180         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
12181 echo "$as_me:12181: result: $DFT_DEP_SUFFIX" >&5
12182 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
12183
12184 echo "$as_me:12184: checking default object directory" >&5
12185 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
12186
12187         case $DFT_LWR_MODEL in
12188         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
12189         normal)  DFT_OBJ_SUBDIR='objects' ;;
12190         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
12191         profile) DFT_OBJ_SUBDIR='obj_p' ;;
12192         shared)
12193                 case $cf_cv_system_name in #(vi
12194                 cygwin) #(vi
12195                         DFT_OBJ_SUBDIR='objects' ;;
12196                 *)
12197                         DFT_OBJ_SUBDIR='obj_s' ;;
12198                 esac
12199         esac
12200 echo "$as_me:12200: result: $DFT_OBJ_SUBDIR" >&5
12201 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
12202
12203 ### Set up low-level terminfo dependencies for makefiles.
12204
12205 if test "$DFT_LWR_MODEL" = shared ; then
12206         case $cf_cv_system_name in #(vi
12207         cygwin*)
12208                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
12209                 ;;
12210         esac
12211 fi
12212
12213 ### Construct the list of subdirectories for which we'll customize makefiles
12214 ### with the appropriate compile-rules.
12215
12216 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
12217
12218 cat >>confdefs.h <<EOF
12219 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
12220 EOF
12221
12222 ### Now that we're done running tests, add the compiler-warnings, if any
12223
12224 cf_fix_cppflags=no
12225 cf_new_cflags=
12226 cf_new_cppflags=
12227 cf_new_extra_cppflags=
12228
12229 for cf_add_cflags in $EXTRA_CFLAGS
12230 do
12231 case $cf_fix_cppflags in
12232 no)
12233         case $cf_add_cflags in #(vi
12234         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12235                 case $cf_add_cflags in
12236                 -D*)
12237                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12238
12239                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12240                                 && test -z "${cf_tst_cflags}" \
12241                                 && cf_fix_cppflags=yes
12242
12243                         if test $cf_fix_cppflags = yes ; then
12244                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12245                                 continue
12246                         elif test "${cf_tst_cflags}" = "\"'" ; then
12247                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12248                                 continue
12249                         fi
12250                         ;;
12251                 esac
12252                 case "$CPPFLAGS" in
12253                 *$cf_add_cflags) #(vi
12254                         ;;
12255                 *) #(vi
12256                         case $cf_add_cflags in #(vi
12257                         -D*)
12258                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12259
12260 CPPFLAGS=`echo "$CPPFLAGS" | \
12261         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12262                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12263
12264                                 ;;
12265                         esac
12266                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12267                         ;;
12268                 esac
12269                 ;;
12270         *)
12271                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12272                 ;;
12273         esac
12274         ;;
12275 yes)
12276         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12277
12278         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12279
12280         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12281                 && test -z "${cf_tst_cflags}" \
12282                 && cf_fix_cppflags=no
12283         ;;
12284 esac
12285 done
12286
12287 if test -n "$cf_new_cflags" ; then
12288
12289         CFLAGS="$CFLAGS $cf_new_cflags"
12290 fi
12291
12292 if test -n "$cf_new_cppflags" ; then
12293
12294         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12295 fi
12296
12297 if test -n "$cf_new_extra_cppflags" ; then
12298
12299         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12300 fi
12301
12302 ################################################################################
12303
12304 if test x"$enable_pc_files" = xyes ; then \
12305 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
12306 MAKE_PC_FILES=
12307 else
12308 MAKE_PC_FILES="#"
12309 fi
12310
12311 ################################################################################
12312
12313 TEST_ARG2=
12314
12315 TEST_LIBS2=
12316
12317 NCURSES_SHLIB2="sh -c"
12318
12319 ADA_SUBDIRS="include gen src doc"
12320 if test "x$cf_with_tests" != "xno" ; then
12321         ADA_SUBDIRS="$ADA_SUBDIRS samples"
12322 fi
12323 for cf_dir in $ADA_SUBDIRS
12324 do
12325         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
12326 done
12327
12328 NCURSES_TREE="#"
12329
12330 EXTERNAL_TREE=
12331
12332 # match layout used by make-tar.sh
12333 ADAHTML_DIR=../doc/ada
12334
12335 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
12336 ac_config_commands="$ac_config_commands default"
12337 cat >confcache <<\_ACEOF
12338 # This file is a shell script that caches the results of configure
12339 # tests run on this system so they can be shared between configure
12340 # scripts and configure runs, see configure's option --config-cache.
12341 # It is not useful on other systems.  If it contains results you don't
12342 # want to keep, you may remove or edit it.
12343 #
12344 # config.status only pays attention to the cache file if you give it
12345 # the --recheck option to rerun configure.
12346 #
12347 # `ac_cv_env_foo' variables (set or unset) will be overriden when
12348 # loading this file, other *unset* `ac_cv_foo' will be assigned the
12349 # following values.
12350
12351 _ACEOF
12352
12353 # The following way of writing the cache mishandles newlines in values,
12354 # but we know of no workaround that is simple, portable, and efficient.
12355 # So, don't put newlines in cache variables' values.
12356 # Ultrix sh set writes to stderr and can't be redirected directly,
12357 # and sets the high bit in the cache file unless we assign to the vars.
12358 {
12359   (set) 2>&1 |
12360     case `(ac_space=' '; set | grep ac_space) 2>&1` in
12361     *ac_space=\ *)
12362       # `set' does not quote correctly, so add quotes (double-quote
12363       # substitution turns \\\\ into \\, and sed turns \\ into \).
12364       sed -n \
12365         "s/'/'\\\\''/g;
12366           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
12367       ;;
12368     *)
12369       # `set' quotes correctly as required by POSIX, so do not add quotes.
12370       sed -n \
12371         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
12372       ;;
12373     esac;
12374 } |
12375   sed '
12376      t clear
12377      : clear
12378      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
12379      t end
12380      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
12381      : end' >>confcache
12382 if cmp -s $cache_file confcache; then :; else
12383   if test -w $cache_file; then
12384     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
12385     cat confcache >$cache_file
12386   else
12387     echo "not updating unwritable cache $cache_file"
12388   fi
12389 fi
12390 rm -f confcache
12391
12392 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12393 # Let make expand exec_prefix.
12394 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12395
12396 # VPATH may cause trouble with some makes, so we remove $(srcdir),
12397 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
12398 # trailing colons and then remove the whole line if VPATH becomes empty
12399 # (actually we leave an empty line to preserve line numbers).
12400 if test "x$srcdir" = x.; then
12401   ac_vpsub='/^[         ]*VPATH[        ]*=/{
12402 s/:*\$(srcdir):*/:/;
12403 s/:*\${srcdir}:*/:/;
12404 s/:*@srcdir@:*/:/;
12405 s/^\([^=]*=[    ]*\):*/\1/;
12406 s/:*$//;
12407 s/^[^=]*=[      ]*$//;
12408 }'
12409 fi
12410
12411 DEFS=-DHAVE_CONFIG_H
12412
12413 : ${CONFIG_STATUS=./config.status}
12414 ac_clean_files_save=$ac_clean_files
12415 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
12416 { echo "$as_me:12416: creating $CONFIG_STATUS" >&5
12417 echo "$as_me: creating $CONFIG_STATUS" >&6;}
12418 cat >$CONFIG_STATUS <<_ACEOF
12419 #! $SHELL
12420 # Generated automatically by configure.
12421 # Run this file to recreate the current configuration.
12422 # Compiler output produced by configure, useful for debugging
12423 # configure, is in config.log if it exists.
12424
12425 debug=false
12426 SHELL=\${CONFIG_SHELL-$SHELL}
12427 ac_cs_invocation="\$0 \$@"
12428
12429 _ACEOF
12430
12431 cat >>$CONFIG_STATUS <<\_ACEOF
12432 # Be Bourne compatible
12433 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
12434   emulate sh
12435   NULLCMD=:
12436 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
12437   set -o posix
12438 fi
12439
12440 # Name of the executable.
12441 as_me=`echo "$0" |sed 's,.*[\\/],,'`
12442
12443 if expr a : '\(a\)' >/dev/null 2>&1; then
12444   as_expr=expr
12445 else
12446   as_expr=false
12447 fi
12448
12449 rm -f conf$$ conf$$.exe conf$$.file
12450 echo >conf$$.file
12451 if ln -s conf$$.file conf$$ 2>/dev/null; then
12452   # We could just check for DJGPP; but this test a) works b) is more generic
12453   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
12454   if test -f conf$$.exe; then
12455     # Don't use ln at all; we don't have any links
12456     as_ln_s='cp -p'
12457   else
12458     as_ln_s='ln -s'
12459   fi
12460 elif ln conf$$.file conf$$ 2>/dev/null; then
12461   as_ln_s=ln
12462 else
12463   as_ln_s='cp -p'
12464 fi
12465 rm -f conf$$ conf$$.exe conf$$.file
12466
12467 as_executable_p="test -f"
12468
12469 # Support unset when possible.
12470 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
12471   as_unset=unset
12472 else
12473   as_unset=false
12474 fi
12475
12476 # NLS nuisances.
12477 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
12478 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
12479 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
12480 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
12481 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
12482 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
12483 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
12484 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
12485
12486 # IFS
12487 # We need space, tab and new line, in precisely that order.
12488 as_nl='
12489 '
12490 IFS="   $as_nl"
12491
12492 # CDPATH.
12493 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
12494
12495 exec 6>&1
12496
12497 _ACEOF
12498
12499 # Files that config.status was made for.
12500 if test -n "$ac_config_files"; then
12501   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
12502 fi
12503
12504 if test -n "$ac_config_headers"; then
12505   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
12506 fi
12507
12508 if test -n "$ac_config_links"; then
12509   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
12510 fi
12511
12512 if test -n "$ac_config_commands"; then
12513   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
12514 fi
12515
12516 cat >>$CONFIG_STATUS <<\EOF
12517
12518 ac_cs_usage="\
12519 \`$as_me' instantiates files from templates according to the
12520 current configuration.
12521
12522 Usage: $0 [OPTIONS] [FILE]...
12523
12524   -h, --help       print this help, then exit
12525   -V, --version    print version number, then exit
12526   -d, --debug      don't remove temporary files
12527       --recheck    update $as_me by reconfiguring in the same conditions
12528   --file=FILE[:TEMPLATE]
12529                    instantiate the configuration file FILE
12530   --header=FILE[:TEMPLATE]
12531                    instantiate the configuration header FILE
12532
12533 Configuration files:
12534 $config_files
12535
12536 Configuration headers:
12537 $config_headers
12538
12539 Configuration commands:
12540 $config_commands
12541
12542 Report bugs to <dickey@invisible-island.net>."
12543 EOF
12544
12545 cat >>$CONFIG_STATUS <<EOF
12546 ac_cs_version="\\
12547 config.status
12548 configured by $0, generated by GNU Autoconf 2.52.20101002,
12549   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
12550
12551 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
12552 Free Software Foundation, Inc.
12553 This config.status script is free software; the Free Software Foundation
12554 gives unlimited permission to copy, distribute and modify it."
12555 srcdir=$srcdir
12556 INSTALL="$INSTALL"
12557 EOF
12558
12559 cat >>$CONFIG_STATUS <<\EOF
12560 # If no file are specified by the user, then we need to provide default
12561 # value.  By we need to know if files were specified by the user.
12562 ac_need_defaults=:
12563 while test $# != 0
12564 do
12565   case $1 in
12566   --*=*)
12567     ac_option=`expr "x$1" : 'x\([^=]*\)='`
12568     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
12569     shift
12570     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
12571     shift
12572     ;;
12573   -*);;
12574   *) # This is not an option, so the user has probably given explicit
12575      # arguments.
12576      ac_need_defaults=false;;
12577   esac
12578
12579   case $1 in
12580   # Handling of the options.
12581 EOF
12582 cat >>$CONFIG_STATUS <<EOF
12583   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12584     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
12585     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
12586 EOF
12587 cat >>$CONFIG_STATUS <<\EOF
12588   --version | --vers* | -V )
12589     echo "$ac_cs_version"; exit 0 ;;
12590   --he | --h)
12591     # Conflict between --help and --header
12592     { { echo "$as_me:12592: error: ambiguous option: $1
12593 Try \`$0 --help' for more information." >&5
12594 echo "$as_me: error: ambiguous option: $1
12595 Try \`$0 --help' for more information." >&2;}
12596    { (exit 1); exit 1; }; };;
12597   --help | --hel | -h )
12598     echo "$ac_cs_usage"; exit 0 ;;
12599   --debug | --d* | -d )
12600     debug=: ;;
12601   --file | --fil | --fi | --f )
12602     shift
12603     CONFIG_FILES="$CONFIG_FILES $1"
12604     ac_need_defaults=false;;
12605   --header | --heade | --head | --hea )
12606     shift
12607     CONFIG_HEADERS="$CONFIG_HEADERS $1"
12608     ac_need_defaults=false;;
12609
12610   # This is an error.
12611   -*) { { echo "$as_me:12611: error: unrecognized option: $1
12612 Try \`$0 --help' for more information." >&5
12613 echo "$as_me: error: unrecognized option: $1
12614 Try \`$0 --help' for more information." >&2;}
12615    { (exit 1); exit 1; }; } ;;
12616
12617   *) ac_config_targets="$ac_config_targets $1" ;;
12618
12619   esac
12620   shift
12621 done
12622
12623 exec 5>>config.log
12624 cat >&5 << _ACEOF
12625
12626 ## ----------------------- ##
12627 ## Running config.status.  ##
12628 ## ----------------------- ##
12629
12630 This file was extended by $as_me 2.52.20101002, executed with
12631   CONFIG_FILES    = $CONFIG_FILES
12632   CONFIG_HEADERS  = $CONFIG_HEADERS
12633   CONFIG_LINKS    = $CONFIG_LINKS
12634   CONFIG_COMMANDS = $CONFIG_COMMANDS
12635   > $ac_cs_invocation
12636 on `(hostname || uname -n) 2>/dev/null | sed 1q`
12637
12638 _ACEOF
12639 EOF
12640
12641 cat >>$CONFIG_STATUS <<EOF
12642 #
12643 # INIT-COMMANDS section.
12644 #
12645
12646 ### Special initialization commands, used to pass information from the
12647 ### configuration-run into config.status
12648
12649 AWK="$AWK"
12650 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
12651 DFT_LWR_MODEL="$DFT_LWR_MODEL"
12652 ECHO_LINK="$ECHO_LINK"
12653 LIB_NAME="$LIB_NAME"
12654 LIB_SUFFIX="$LIB_SUFFIX"
12655 LN_S="$LN_S"
12656 NCURSES_MAJOR="$NCURSES_MAJOR"
12657 NCURSES_MINOR="$NCURSES_MINOR"
12658 NCURSES_PATCH="$NCURSES_PATCH"
12659 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
12660 cf_cv_abi_version="$cf_cv_abi_version"
12661 cf_cv_rel_version="$cf_cv_rel_version"
12662 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
12663 cf_cv_shared_soname='$cf_cv_shared_soname'
12664 cf_cv_shlib_version="$cf_cv_shlib_version"
12665 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
12666 cf_cv_system_name="$cf_cv_system_name"
12667 host="$host"
12668 target="$target"
12669
12670 EOF
12671
12672 cat >>$CONFIG_STATUS <<\EOF
12673 for ac_config_target in $ac_config_targets
12674 do
12675   case "$ac_config_target" in
12676   # Handling of arguments.
12677   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
12678   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
12679   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
12680   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
12681   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
12682   *) { { echo "$as_me:12682: error: invalid argument: $ac_config_target" >&5
12683 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
12684    { (exit 1); exit 1; }; };;
12685   esac
12686 done
12687
12688 # If the user did not use the arguments to specify the items to instantiate,
12689 # then the envvar interface is used.  Set only those that are not.
12690 # We use the long form for the default assignment because of an extremely
12691 # bizarre bug on SunOS 4.1.3.
12692 if $ac_need_defaults; then
12693   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
12694   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
12695   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
12696 fi
12697
12698 # Create a temporary directory, and hook for its removal unless debugging.
12699 $debug ||
12700 {
12701   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
12702   trap '{ (exit 1); exit 1; }' 1 2 13 15
12703 }
12704
12705 # Create a (secure) tmp directory for tmp files.
12706 : ${TMPDIR=/tmp}
12707 {
12708   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
12709   test -n "$tmp" && test -d "$tmp"
12710 }  ||
12711 {
12712   tmp=$TMPDIR/cs$$-$RANDOM
12713   (umask 077 && mkdir $tmp)
12714 } ||
12715 {
12716    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
12717    { (exit 1); exit 1; }
12718 }
12719
12720 EOF
12721
12722 cat >>$CONFIG_STATUS <<EOF
12723
12724 #
12725 # CONFIG_FILES section.
12726 #
12727
12728 # No need to generate the scripts if there are no CONFIG_FILES.
12729 # This happens for instance when ./config.status config.h
12730 if test -n "\$CONFIG_FILES"; then
12731   # Protect against being on the right side of a sed subst in config.status.
12732   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
12733    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
12734 s,@SHELL@,$SHELL,;t t
12735 s,@exec_prefix@,$exec_prefix,;t t
12736 s,@prefix@,$prefix,;t t
12737 s,@program_transform_name@,$program_transform_name,;t t
12738 s,@bindir@,$bindir,;t t
12739 s,@sbindir@,$sbindir,;t t
12740 s,@libexecdir@,$libexecdir,;t t
12741 s,@datadir@,$datadir,;t t
12742 s,@sysconfdir@,$sysconfdir,;t t
12743 s,@sharedstatedir@,$sharedstatedir,;t t
12744 s,@localstatedir@,$localstatedir,;t t
12745 s,@libdir@,$libdir,;t t
12746 s,@includedir@,$includedir,;t t
12747 s,@oldincludedir@,$oldincludedir,;t t
12748 s,@infodir@,$infodir,;t t
12749 s,@mandir@,$mandir,;t t
12750 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
12751 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
12752 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
12753 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
12754 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
12755 s,@build_alias@,$build_alias,;t t
12756 s,@host_alias@,$host_alias,;t t
12757 s,@target_alias@,$target_alias,;t t
12758 s,@ECHO_C@,$ECHO_C,;t t
12759 s,@ECHO_N@,$ECHO_N,;t t
12760 s,@ECHO_T@,$ECHO_T,;t t
12761 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12762 s,@DEFS@,$DEFS,;t t
12763 s,@LIBS@,$LIBS,;t t
12764 s,@top_builddir@,$top_builddir,;t t
12765 s,@build@,$build,;t t
12766 s,@build_cpu@,$build_cpu,;t t
12767 s,@build_vendor@,$build_vendor,;t t
12768 s,@build_os@,$build_os,;t t
12769 s,@host@,$host,;t t
12770 s,@host_cpu@,$host_cpu,;t t
12771 s,@host_vendor@,$host_vendor,;t t
12772 s,@host_os@,$host_os,;t t
12773 s,@target@,$target,;t t
12774 s,@target_cpu@,$target_cpu,;t t
12775 s,@target_vendor@,$target_vendor,;t t
12776 s,@target_os@,$target_os,;t t
12777 s,@CC@,$CC,;t t
12778 s,@CFLAGS@,$CFLAGS,;t t
12779 s,@LDFLAGS@,$LDFLAGS,;t t
12780 s,@CPPFLAGS@,$CPPFLAGS,;t t
12781 s,@ac_ct_CC@,$ac_ct_CC,;t t
12782 s,@EXEEXT@,$EXEEXT,;t t
12783 s,@OBJEXT@,$OBJEXT,;t t
12784 s,@CPP@,$CPP,;t t
12785 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12786 s,@PROG_EXT@,$PROG_EXT,;t t
12787 s,@AWK@,$AWK,;t t
12788 s,@EGREP@,$EGREP,;t t
12789 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12790 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12791 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12792 s,@LN_S@,$LN_S,;t t
12793 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12794 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12795 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12796 s,@SET_MAKE@,$SET_MAKE,;t t
12797 s,@CTAGS@,$CTAGS,;t t
12798 s,@ETAGS@,$ETAGS,;t t
12799 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12800 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12801 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12802 s,@RANLIB@,$RANLIB,;t t
12803 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12804 s,@LD@,$LD,;t t
12805 s,@ac_ct_LD@,$ac_ct_LD,;t t
12806 s,@AR@,$AR,;t t
12807 s,@ac_ct_AR@,$ac_ct_AR,;t t
12808 s,@ARFLAGS@,$ARFLAGS,;t t
12809 s,@DESTDIR@,$DESTDIR,;t t
12810 s,@BUILD_CC@,$BUILD_CC,;t t
12811 s,@BUILD_CPP@,$BUILD_CPP,;t t
12812 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12813 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12814 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12815 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12816 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12817 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12818 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12819 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12820 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12821 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
12822 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12823 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12824 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12825 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12826 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12827 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12828 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12829 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12830 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12831 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12832 s,@CC_G_OPT@,$CC_G_OPT,;t t
12833 s,@LD_MODEL@,$LD_MODEL,;t t
12834 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12835 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12836 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12837 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12838 s,@LINK_PROGS@,$LINK_PROGS,;t t
12839 s,@LINK_TESTS@,$LINK_TESTS,;t t
12840 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12841 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12842 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12843 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12844 s,@RPATH_LIST@,$RPATH_LIST,;t t
12845 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12846 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12847 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12848 s,@PTHREAD@,$PTHREAD,;t t
12849 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12850 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12851 s,@ECHO_LINK@,$ECHO_LINK,;t t
12852 s,@ADAFLAGS@,$ADAFLAGS,;t t
12853 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12854 s,@ADA_TRACE@,$ADA_TRACE,;t t
12855 s,@gnat_exists@,$gnat_exists,;t t
12856 s,@M4_exists@,$M4_exists,;t t
12857 s,@cf_ada_make@,$cf_ada_make,;t t
12858 s,@cf_compile_generics@,$cf_compile_generics,;t t
12859 s,@cf_generic_objects@,$cf_generic_objects,;t t
12860 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12861 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12862 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12863 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12864 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12865 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12866 s,@cf_ada_package@,$cf_ada_package,;t t
12867 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12868 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12869 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12870 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12871 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
12872 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
12873 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12874 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12875 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12876 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12877 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12878 s,@cross_compiling@,$cross_compiling,;t t
12879 s,@TEST_ARG2@,$TEST_ARG2,;t t
12880 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12881 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12882 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12883 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12884 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12885 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12886 CEOF
12887
12888 EOF
12889
12890   cat >>$CONFIG_STATUS <<\EOF
12891   # Split the substitutions into bite-sized pieces for seds with
12892   # small command number limits, like on Digital OSF/1 and HP-UX.
12893   ac_max_sed_lines=48
12894   ac_sed_frag=1 # Number of current file.
12895   ac_beg=1 # First line for current file.
12896   ac_end=$ac_max_sed_lines # Line after last line for current file.
12897   ac_more_lines=:
12898   ac_sed_cmds=
12899   while $ac_more_lines; do
12900     if test $ac_beg -gt 1; then
12901       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12902     else
12903       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12904     fi
12905     if test ! -s $tmp/subs.frag; then
12906       ac_more_lines=false
12907     else
12908       # The purpose of the label and of the branching condition is to
12909       # speed up the sed processing (if there are no `@' at all, there
12910       # is no need to browse any of the substitutions).
12911       # These are the two extra sed commands mentioned above.
12912       (echo ':t
12913   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12914       if test -z "$ac_sed_cmds"; then
12915         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12916       else
12917         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12918       fi
12919       ac_sed_frag=`expr $ac_sed_frag + 1`
12920       ac_beg=$ac_end
12921       ac_end=`expr $ac_end + $ac_max_sed_lines`
12922     fi
12923   done
12924   if test -z "$ac_sed_cmds"; then
12925     ac_sed_cmds=cat
12926   fi
12927 fi # test -n "$CONFIG_FILES"
12928
12929 EOF
12930 cat >>$CONFIG_STATUS <<\EOF
12931 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12932   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12933   case $ac_file in
12934   - | *:- | *:-:* ) # input from stdin
12935         cat >$tmp/stdin
12936         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12937         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12938   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12939         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12940   * )   ac_file_in=$ac_file.in ;;
12941   esac
12942
12943   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12944   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12945          X"$ac_file" : 'X\(//\)[^/]' \| \
12946          X"$ac_file" : 'X\(//\)$' \| \
12947          X"$ac_file" : 'X\(/\)' \| \
12948          .     : '\(.\)' 2>/dev/null ||
12949 echo X"$ac_file" |
12950     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12951           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12952           /^X\(\/\/\)$/{ s//\1/; q; }
12953           /^X\(\/\).*/{ s//\1/; q; }
12954           s/.*/./; q'`
12955   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12956     { case "$ac_dir" in
12957   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12958   *)                      as_incr_dir=.;;
12959 esac
12960 as_dummy="$ac_dir"
12961 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12962   case $as_mkdir_dir in
12963     # Skip DOS drivespec
12964     ?:) as_incr_dir=$as_mkdir_dir ;;
12965     *)
12966       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12967       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12968     ;;
12969   esac
12970 done; }
12971
12972     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12973     # A "../" for each directory in $ac_dir_suffix.
12974     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12975   else
12976     ac_dir_suffix= ac_dots=
12977   fi
12978
12979   case $srcdir in
12980   .)  ac_srcdir=.
12981       if test -z "$ac_dots"; then
12982          ac_top_srcdir=.
12983       else
12984          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12985       fi ;;
12986   [\\/]* | ?:[\\/]* )
12987       ac_srcdir=$srcdir$ac_dir_suffix;
12988       ac_top_srcdir=$srcdir ;;
12989   *) # Relative path.
12990     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12991     ac_top_srcdir=$ac_dots$srcdir ;;
12992   esac
12993
12994   case $INSTALL in
12995   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12996   *) ac_INSTALL=$ac_dots$INSTALL ;;
12997   esac
12998
12999   if test x"$ac_file" != x-; then
13000     { echo "$as_me:13000: creating $ac_file" >&5
13001 echo "$as_me: creating $ac_file" >&6;}
13002     rm -f "$ac_file"
13003   fi
13004   # Let's still pretend it is `configure' which instantiates (i.e., don't
13005   # use $as_me), people would be surprised to read:
13006   #    /* config.h.  Generated automatically by config.status.  */
13007   configure_input="Generated automatically from `echo $ac_file_in |
13008                                                  sed 's,.*/,,'` by configure."
13009
13010   # First look for the input files in the build tree, otherwise in the
13011   # src tree.
13012   ac_file_inputs=`IFS=:
13013     for f in $ac_file_in; do
13014       case $f in
13015       -) echo $tmp/stdin ;;
13016       [\\/$]*)
13017          # Absolute (can't be DOS-style, as IFS=:)
13018          test -f "$f" || { { echo "$as_me:13018: error: cannot find input file: $f" >&5
13019 echo "$as_me: error: cannot find input file: $f" >&2;}
13020    { (exit 1); exit 1; }; }
13021          echo $f;;
13022       *) # Relative
13023          if test -f "$f"; then
13024            # Build tree
13025            echo $f
13026          elif test -f "$srcdir/$f"; then
13027            # Source tree
13028            echo $srcdir/$f
13029          else
13030            # /dev/null tree
13031            { { echo "$as_me:13031: error: cannot find input file: $f" >&5
13032 echo "$as_me: error: cannot find input file: $f" >&2;}
13033    { (exit 1); exit 1; }; }
13034          fi;;
13035       esac
13036     done` || { (exit 1); exit 1; }
13037 EOF
13038 cat >>$CONFIG_STATUS <<EOF
13039   sed "$ac_vpsub
13040 $extrasub
13041 EOF
13042 cat >>$CONFIG_STATUS <<\EOF
13043 :t
13044 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
13045 s,@configure_input@,$configure_input,;t t
13046 s,@srcdir@,$ac_srcdir,;t t
13047 s,@top_srcdir@,$ac_top_srcdir,;t t
13048 s,@INSTALL@,$ac_INSTALL,;t t
13049 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
13050   rm -f $tmp/stdin
13051   if test x"$ac_file" != x-; then
13052     mv $tmp/out $ac_file
13053   else
13054     cat $tmp/out
13055     rm -f $tmp/out
13056   fi
13057
13058 done
13059 EOF
13060 cat >>$CONFIG_STATUS <<\EOF
13061
13062 #
13063 # CONFIG_HEADER section.
13064 #
13065
13066 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13067 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13068 #
13069 # ac_d sets the value in "#define NAME VALUE" lines.
13070 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13071 ac_dB='[        ].*$,\1#\2'
13072 ac_dC=' '
13073 ac_dD=',;t'
13074 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13075 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13076 ac_iB='\([      ]\),\1#\2define\3'
13077 ac_iC=' '
13078 ac_iD='\4,;t'
13079 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13080 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13081 ac_uB='$,\1#\2define\3'
13082 ac_uC=' '
13083 ac_uD=',;t'
13084
13085 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
13086   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13087   case $ac_file in
13088   - | *:- | *:-:* ) # input from stdin
13089         cat >$tmp/stdin
13090         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13091         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13092   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
13093         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
13094   * )   ac_file_in=$ac_file.in ;;
13095   esac
13096
13097   test x"$ac_file" != x- && { echo "$as_me:13097: creating $ac_file" >&5
13098 echo "$as_me: creating $ac_file" >&6;}
13099
13100   # First look for the input files in the build tree, otherwise in the
13101   # src tree.
13102   ac_file_inputs=`IFS=:
13103     for f in $ac_file_in; do
13104       case $f in
13105       -) echo $tmp/stdin ;;
13106       [\\/$]*)
13107          # Absolute (can't be DOS-style, as IFS=:)
13108          test -f "$f" || { { echo "$as_me:13108: error: cannot find input file: $f" >&5
13109 echo "$as_me: error: cannot find input file: $f" >&2;}
13110    { (exit 1); exit 1; }; }
13111          echo $f;;
13112       *) # Relative
13113          if test -f "$f"; then
13114            # Build tree
13115            echo $f
13116          elif test -f "$srcdir/$f"; then
13117            # Source tree
13118            echo $srcdir/$f
13119          else
13120            # /dev/null tree
13121            { { echo "$as_me:13121: error: cannot find input file: $f" >&5
13122 echo "$as_me: error: cannot find input file: $f" >&2;}
13123    { (exit 1); exit 1; }; }
13124          fi;;
13125       esac
13126     done` || { (exit 1); exit 1; }
13127   # Remove the trailing spaces.
13128   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
13129
13130 EOF
13131
13132 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
13133 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
13134 # be either 'cat' or 'sort'.
13135 cat confdefs.h | uniq >conftest.vals
13136
13137 # Break up conftest.vals because some shells have a limit on
13138 # the size of here documents, and old seds have small limits too.
13139
13140 rm -f conftest.tail
13141 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
13142 while grep . conftest.vals >/dev/null
13143 do
13144   # Write chunks of a limited-size here document to conftest.frag.
13145   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
13146   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
13147   echo 'CEOF' >> $CONFIG_STATUS
13148   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13149   rm -f conftest.vals
13150   mv conftest.tail conftest.vals
13151 done
13152 rm -f conftest.vals
13153
13154 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
13155 # marker @DEFS@.
13156 echo '  cat >> conftest.edit <<CEOF
13157 /@DEFS@/r conftest.frag
13158 /@DEFS@/d
13159 CEOF
13160 sed -f conftest.edit $tmp/in > $tmp/out
13161 rm -f $tmp/in
13162 mv $tmp/out $tmp/in
13163 rm -f conftest.edit conftest.frag
13164 ' >> $CONFIG_STATUS
13165
13166 cat >>$CONFIG_STATUS <<\EOF
13167   # Let's still pretend it is `configure' which instantiates (i.e., don't
13168   # use $as_me), people would be surprised to read:
13169   #    /* config.h.  Generated automatically by config.status.  */
13170   if test x"$ac_file" = x-; then
13171     echo "/* Generated automatically by configure.  */" >$tmp/config.h
13172   else
13173     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
13174   fi
13175   cat $tmp/in >>$tmp/config.h
13176   rm -f $tmp/in
13177   if test x"$ac_file" != x-; then
13178     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
13179       { echo "$as_me:13179: $ac_file is unchanged" >&5
13180 echo "$as_me: $ac_file is unchanged" >&6;}
13181     else
13182       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13183          X"$ac_file" : 'X\(//\)[^/]' \| \
13184          X"$ac_file" : 'X\(//\)$' \| \
13185          X"$ac_file" : 'X\(/\)' \| \
13186          .     : '\(.\)' 2>/dev/null ||
13187 echo X"$ac_file" |
13188     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
13189           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
13190           /^X\(\/\/\)$/{ s//\1/; q; }
13191           /^X\(\/\).*/{ s//\1/; q; }
13192           s/.*/./; q'`
13193       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13194         { case "$ac_dir" in
13195   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
13196   *)                      as_incr_dir=.;;
13197 esac
13198 as_dummy="$ac_dir"
13199 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
13200   case $as_mkdir_dir in
13201     # Skip DOS drivespec
13202     ?:) as_incr_dir=$as_mkdir_dir ;;
13203     *)
13204       as_incr_dir=$as_incr_dir/$as_mkdir_dir
13205       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
13206     ;;
13207   esac
13208 done; }
13209
13210       fi
13211       rm -f $ac_file
13212       mv $tmp/config.h $ac_file
13213     fi
13214   else
13215     cat $tmp/config.h
13216     rm -f $tmp/config.h
13217   fi
13218 done
13219 EOF
13220 cat >>$CONFIG_STATUS <<\EOF
13221 #
13222 # CONFIG_COMMANDS section.
13223 #
13224 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
13225   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
13226   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
13227
13228   case $ac_dest in
13229     default )
13230 if test -z "$USE_OLD_MAKERULES" ; then
13231         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
13232 fi
13233  ;;
13234   esac
13235 done
13236 EOF
13237
13238 cat >>$CONFIG_STATUS <<\EOF
13239
13240 { (exit 0); exit 0; }
13241 EOF
13242 chmod +x $CONFIG_STATUS
13243 ac_clean_files=$ac_clean_files_save
13244
13245 # configure is writing to config.log, and then calls config.status.
13246 # config.status does its own redirection, appending to config.log.
13247 # Unfortunately, on DOS this fails, as config.log is still kept open
13248 # by configure, so config.status won't be able to write to it; its
13249 # output is simply discarded.  So we exec the FD to /dev/null,
13250 # effectively closing config.log, so it can be properly (re)opened and
13251 # appended to by config.status.  When coming back to configure, we
13252 # need to make the FD available again.
13253 if test "$no_create" != yes; then
13254   ac_cs_success=:
13255   exec 5>/dev/null
13256   $SHELL $CONFIG_STATUS || ac_cs_success=false
13257   exec 5>>config.log
13258   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
13259   # would make configure fail if this is the last instruction.
13260   $ac_cs_success || { (exit 1); exit 1; }
13261 fi
13262 ${MAKE:-make} preinstall