]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
ncurses 5.9 - patch 20110514
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.30 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="gen/gen.c"
109
110 # Initialize some variables set by options.
111 ac_init_help=
112 ac_init_version=false
113 # The variables have the same names as the options, with
114 # dashes changed to underlines.
115 cache_file=/dev/null
116 exec_prefix=NONE
117 no_create=
118 no_recursion=
119 prefix=NONE
120 program_prefix=NONE
121 program_suffix=NONE
122 program_transform_name=s,x,x,
123 silent=
124 site=
125 srcdir=
126 verbose=
127 x_includes=NONE
128 x_libraries=NONE
129
130 # Installation directory options.
131 # These are left unexpanded so users can "make install exec_prefix=/foo"
132 # and all the variables that are supposed to be based on exec_prefix
133 # by default will actually change.
134 # Use braces instead of parens because sh, perl, etc. also accept them.
135 bindir='${exec_prefix}/bin'
136 sbindir='${exec_prefix}/sbin'
137 libexecdir='${exec_prefix}/libexec'
138 datadir='${prefix}/share'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${prefix}/info'
146 mandir='${prefix}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -disable-* | --disable-*)
198     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199     # Reject names that are not valid shell variable names.
200     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202    { (exit 1); exit 1; }; }
203     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204     eval "enable_$ac_feature=no" ;;
205
206   -enable-* | --enable-*)
207     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208     # Reject names that are not valid shell variable names.
209     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211    { (exit 1); exit 1; }; }
212     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213     case $ac_option in
214       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215       *) ac_optarg=yes ;;
216     esac
217     eval "enable_$ac_feature='$ac_optarg'" ;;
218
219   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221   | --exec | --exe | --ex)
222     ac_prev=exec_prefix ;;
223   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225   | --exec=* | --exe=* | --ex=*)
226     exec_prefix=$ac_optarg ;;
227
228   -gas | --gas | --ga | --g)
229     # Obsolete; use --with-gas.
230     with_gas=yes ;;
231
232   -help | --help | --hel | --he | -h)
233     ac_init_help=long ;;
234   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235     ac_init_help=recursive ;;
236   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237     ac_init_help=short ;;
238
239   -host | --host | --hos | --ho)
240     ac_prev=host_alias ;;
241   -host=* | --host=* | --hos=* | --ho=*)
242     host_alias=$ac_optarg ;;
243
244   -includedir | --includedir | --includedi | --included | --include \
245   | --includ | --inclu | --incl | --inc)
246     ac_prev=includedir ;;
247   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248   | --includ=* | --inclu=* | --incl=* | --inc=*)
249     includedir=$ac_optarg ;;
250
251   -infodir | --infodir | --infodi | --infod | --info | --inf)
252     ac_prev=infodir ;;
253   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254     infodir=$ac_optarg ;;
255
256   -libdir | --libdir | --libdi | --libd)
257     ac_prev=libdir ;;
258   -libdir=* | --libdir=* | --libdi=* | --libd=*)
259     libdir=$ac_optarg ;;
260
261   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262   | --libexe | --libex | --libe)
263     ac_prev=libexecdir ;;
264   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265   | --libexe=* | --libex=* | --libe=*)
266     libexecdir=$ac_optarg ;;
267
268   -localstatedir | --localstatedir | --localstatedi | --localstated \
269   | --localstate | --localstat | --localsta | --localst \
270   | --locals | --local | --loca | --loc | --lo)
271     ac_prev=localstatedir ;;
272   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275     localstatedir=$ac_optarg ;;
276
277   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278     ac_prev=mandir ;;
279   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280     mandir=$ac_optarg ;;
281
282   -nfp | --nfp | --nf)
283     # Obsolete; use --without-fp.
284     with_fp=no ;;
285
286   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287   | --no-cr | --no-c)
288     no_create=yes ;;
289
290   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292     no_recursion=yes ;;
293
294   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296   | --oldin | --oldi | --old | --ol | --o)
297     ac_prev=oldincludedir ;;
298   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301     oldincludedir=$ac_optarg ;;
302
303   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304     ac_prev=prefix ;;
305   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306     prefix=$ac_optarg ;;
307
308   -program-prefix | --program-prefix | --program-prefi | --program-pref \
309   | --program-pre | --program-pr | --program-p)
310     ac_prev=program_prefix ;;
311   -program-prefix=* | --program-prefix=* | --program-prefi=* \
312   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313     program_prefix=$ac_optarg ;;
314
315   -program-suffix | --program-suffix | --program-suffi | --program-suff \
316   | --program-suf | --program-su | --program-s)
317     ac_prev=program_suffix ;;
318   -program-suffix=* | --program-suffix=* | --program-suffi=* \
319   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320     program_suffix=$ac_optarg ;;
321
322   -program-transform-name | --program-transform-name \
323   | --program-transform-nam | --program-transform-na \
324   | --program-transform-n | --program-transform- \
325   | --program-transform | --program-transfor \
326   | --program-transfo | --program-transf \
327   | --program-trans | --program-tran \
328   | --progr-tra | --program-tr | --program-t)
329     ac_prev=program_transform_name ;;
330   -program-transform-name=* | --program-transform-name=* \
331   | --program-transform-nam=* | --program-transform-na=* \
332   | --program-transform-n=* | --program-transform-=* \
333   | --program-transform=* | --program-transfor=* \
334   | --program-transfo=* | --program-transf=* \
335   | --program-trans=* | --program-tran=* \
336   | --progr-tra=* | --program-tr=* | --program-t=*)
337     program_transform_name=$ac_optarg ;;
338
339   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340   | -silent | --silent | --silen | --sile | --sil)
341     silent=yes ;;
342
343   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344     ac_prev=sbindir ;;
345   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346   | --sbi=* | --sb=*)
347     sbindir=$ac_optarg ;;
348
349   -sharedstatedir | --sharedstatedir | --sharedstatedi \
350   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351   | --sharedst | --shareds | --shared | --share | --shar \
352   | --sha | --sh)
353     ac_prev=sharedstatedir ;;
354   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357   | --sha=* | --sh=*)
358     sharedstatedir=$ac_optarg ;;
359
360   -site | --site | --sit)
361     ac_prev=site ;;
362   -site=* | --site=* | --sit=*)
363     site=$ac_optarg ;;
364
365   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366     ac_prev=srcdir ;;
367   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368     srcdir=$ac_optarg ;;
369
370   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371   | --syscon | --sysco | --sysc | --sys | --sy)
372     ac_prev=sysconfdir ;;
373   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375     sysconfdir=$ac_optarg ;;
376
377   -target | --target | --targe | --targ | --tar | --ta | --t)
378     ac_prev=target_alias ;;
379   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380     target_alias=$ac_optarg ;;
381
382   -v | -verbose | --verbose | --verbos | --verbo | --verb)
383     verbose=yes ;;
384
385   -version | --version | --versio | --versi | --vers | -V)
386     ac_init_version=: ;;
387
388   -with-* | --with-*)
389     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390     # Reject names that are not valid shell variable names.
391     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392       { echo "$as_me: error: invalid package name: $ac_package" >&2
393    { (exit 1); exit 1; }; }
394     ac_package=`echo $ac_package| sed 's/-/_/g'`
395     case $ac_option in
396       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397       *) ac_optarg=yes ;;
398     esac
399     eval "with_$ac_package='$ac_optarg'" ;;
400
401   -without-* | --without-*)
402     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403     # Reject names that are not valid shell variable names.
404     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405       { echo "$as_me: error: invalid package name: $ac_package" >&2
406    { (exit 1); exit 1; }; }
407     ac_package=`echo $ac_package | sed 's/-/_/g'`
408     eval "with_$ac_package=no" ;;
409
410   --x)
411     # Obsolete; use --with-x.
412     with_x=yes ;;
413
414   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415   | --x-incl | --x-inc | --x-in | --x-i)
416     ac_prev=x_includes ;;
417   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419     x_includes=$ac_optarg ;;
420
421   -x-libraries | --x-libraries | --x-librarie | --x-librari \
422   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423     ac_prev=x_libraries ;;
424   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426     x_libraries=$ac_optarg ;;
427
428   -*) { echo "$as_me: error: unrecognized option: $ac_option
429 Try \`$0 --help' for more information." >&2
430    { (exit 1); exit 1; }; }
431     ;;
432
433   *=*)
434     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435     # Reject names that are not valid shell variable names.
436     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438    { (exit 1); exit 1; }; }
439     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440     eval "$ac_envvar='$ac_optarg'"
441     export $ac_envvar ;;
442
443   *)
444     # FIXME: should be removed in autoconf 3.0.
445     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449     ;;
450
451   esac
452 done
453
454 if test -n "$ac_prev"; then
455   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456   { echo "$as_me: error: missing argument to $ac_option" >&2
457    { (exit 1); exit 1; }; }
458 fi
459
460 # Be sure to have absolute paths.
461 for ac_var in exec_prefix prefix
462 do
463   eval ac_val=$`echo $ac_var`
464   case $ac_val in
465     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467    { (exit 1); exit 1; }; };;
468   esac
469 done
470
471 # Be sure to have absolute paths.
472 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473               localstatedir libdir includedir oldincludedir infodir mandir
474 do
475   eval ac_val=$`echo $ac_var`
476   case $ac_val in
477     [\\/$]* | ?:[\\/]* ) ;;
478     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479    { (exit 1); exit 1; }; };;
480   esac
481 done
482
483 # There might be people who depend on the old broken behavior: `$host'
484 # used to hold the argument of --host etc.
485 build=$build_alias
486 host=$host_alias
487 target=$target_alias
488
489 # FIXME: should be removed in autoconf 3.0.
490 if test "x$host_alias" != x; then
491   if test "x$build_alias" = x; then
492     cross_compiling=maybe
493     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494     If a cross compiler is detected then cross compile mode will be used." >&2
495   elif test "x$build_alias" != "x$host_alias"; then
496     cross_compiling=yes
497   fi
498 fi
499
500 ac_tool_prefix=
501 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503 test "$silent" = yes && exec 6>/dev/null
504
505 # Find the source files, if location was not specified.
506 if test -z "$srcdir"; then
507   ac_srcdir_defaulted=yes
508   # Try the directory containing this script, then its parent.
509   ac_prog=$0
510   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512   srcdir=$ac_confdir
513   if test ! -r $srcdir/$ac_unique_file; then
514     srcdir=..
515   fi
516 else
517   ac_srcdir_defaulted=no
518 fi
519 if test ! -r $srcdir/$ac_unique_file; then
520   if test "$ac_srcdir_defaulted" = yes; then
521     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522    { (exit 1); exit 1; }; }
523   else
524     { echo "$as_me: error: cannot find sources in $srcdir" >&2
525    { (exit 1); exit 1; }; }
526   fi
527 fi
528 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529 ac_env_build_alias_set=${build_alias+set}
530 ac_env_build_alias_value=$build_alias
531 ac_cv_env_build_alias_set=${build_alias+set}
532 ac_cv_env_build_alias_value=$build_alias
533 ac_env_host_alias_set=${host_alias+set}
534 ac_env_host_alias_value=$host_alias
535 ac_cv_env_host_alias_set=${host_alias+set}
536 ac_cv_env_host_alias_value=$host_alias
537 ac_env_target_alias_set=${target_alias+set}
538 ac_env_target_alias_value=$target_alias
539 ac_cv_env_target_alias_set=${target_alias+set}
540 ac_cv_env_target_alias_value=$target_alias
541 ac_env_CC_set=${CC+set}
542 ac_env_CC_value=$CC
543 ac_cv_env_CC_set=${CC+set}
544 ac_cv_env_CC_value=$CC
545 ac_env_CFLAGS_set=${CFLAGS+set}
546 ac_env_CFLAGS_value=$CFLAGS
547 ac_cv_env_CFLAGS_set=${CFLAGS+set}
548 ac_cv_env_CFLAGS_value=$CFLAGS
549 ac_env_LDFLAGS_set=${LDFLAGS+set}
550 ac_env_LDFLAGS_value=$LDFLAGS
551 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552 ac_cv_env_LDFLAGS_value=$LDFLAGS
553 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554 ac_env_CPPFLAGS_value=$CPPFLAGS
555 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557 ac_env_CPP_set=${CPP+set}
558 ac_env_CPP_value=$CPP
559 ac_cv_env_CPP_set=${CPP+set}
560 ac_cv_env_CPP_value=$CPP
561
562 #
563 # Report the --help message.
564 #
565 if test "$ac_init_help" = "long"; then
566   # Omit some internal or obsolete options to make the list less imposing.
567   # This message is too long to be a string in the A/UX 3.1 sh.
568   cat <<EOF
569 \`configure' configures this package to adapt to many kinds of systems.
570
571 Usage: $0 [OPTION]... [VAR=VALUE]...
572
573 To assign environment variables (e.g., CC, CFLAGS...), specify them as
574 VAR=VALUE.  See below for descriptions of some of the useful variables.
575
576 Defaults for the options are specified in brackets.
577
578 Configuration:
579   -h, --help              display this help and exit
580       --help=short        display options specific to this package
581       --help=recursive    display the short help of all the included packages
582   -V, --version           display version information and exit
583   -q, --quiet, --silent   do not print \`checking...' messages
584       --cache-file=FILE   cache test results in FILE [disabled]
585   -C, --config-cache      alias for \`--cache-file=config.cache'
586   -n, --no-create         do not create output files
587       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
588
589 EOF
590
591   cat <<EOF
592 Installation directories:
593   --prefix=PREFIX         install architecture-independent files in PREFIX
594                           [$ac_default_prefix]
595   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
596                           [PREFIX]
597
598 By default, \`make install' will install all the files in
599 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
600 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
601 for instance \`--prefix=\$HOME'.
602
603 For better control, use the options below.
604
605 Fine tuning of the installation directories:
606   --bindir=DIR            user executables [EPREFIX/bin]
607   --sbindir=DIR           system admin executables [EPREFIX/sbin]
608   --libexecdir=DIR        program executables [EPREFIX/libexec]
609   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
610   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
611   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
612   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
613   --libdir=DIR            object code libraries [EPREFIX/lib]
614   --includedir=DIR        C header files [PREFIX/include]
615   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
616   --infodir=DIR           info documentation [PREFIX/info]
617   --mandir=DIR            man documentation [PREFIX/man]
618 EOF
619
620   cat <<\EOF
621
622 Program names:
623   --program-prefix=PREFIX            prepend PREFIX to installed program names
624   --program-suffix=SUFFIX            append SUFFIX to installed program names
625   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
626
627 System types:
628   --build=BUILD           configure for building on BUILD [guessed]
629   --host=HOST       build programs to run on HOST [BUILD]
630   --target=TARGET   configure for building compilers for TARGET [HOST]
631 EOF
632 fi
633
634 if test -n "$ac_init_help"; then
635
636   cat <<\EOF
637
638 Optional Packages:
639   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
640   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
641
642 Optional Features:
643   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
644   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
645
646   --with-system-type=XXX  test: override derived host system-type
647   --with-pkg-config{=path} enable/disable use of pkg-config
648   --enable-pc-files       generate and install .pc files for pkg-config
649   --without-tests         suppress build with test-programs
650   --enable-mixed-case     tic should assume mixed-case filenames
651   --with-install-prefix   prefixes actual install-location ($DESTDIR)
652 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
653   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
654   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
655   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
656   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
657   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
658   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
659 Options to Specify the Libraries Built/Used:
660   --with-shared           generate shared C-objects (needed for --with-ada-sharedlib)
661   --enable-widec          compile with wide-char/UTF-8 code
662   --with-curses-dir=DIR   directory in which (n)curses is installed
663   --with-shlib-version=X  Specify rel or abi version for shared libs
664   --enable-rpath-link     link sample programs with rpath option
665 Fine-Tuning Your Configuration:
666   --enable-broken_linker  compile with broken-linker support code
667   --disable-largefile     omit support for large files
668   --with-rcs-ids          compile-in RCS identifiers
669 Extensions:
670   --disable-ext-funcs     disable function-extensions
671   --enable-const          compile with extra/non-standard const
672 Development Code:
673   --without-develop       disable development options
674 Experimental Code:
675   --with-pthread          use POSIX thread library
676   --enable-weak-symbols   enable weak-symbols for pthreads
677   --enable-reentrant      compile with experimental reentrant code
678   --with-wrap-prefix=XXX  override prefix used for public variables
679 Testing/development Options:
680   --enable-echo           build: display "compiling" commands (default)
681   --enable-warnings       build: turn on GCC compiler warnings
682   --enable-assertions     test: turn on generation of assertion code
683   --enable-expanded       test: generate functions for certain macros
684   --disable-macros        test: use functions rather than macros
685   --with-trace            test: add trace() function to all models of ncurses
686 Ada95 Binding Options:
687   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
688   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
689   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
690   --with-ada-sharedlib=XX build Ada95 shared-library
691
692 Some influential environment variables:
693   CC          C compiler command
694   CFLAGS      C compiler flags
695   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
696               nonstandard directory <lib dir>
697   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
698               headers in a nonstandard directory <include dir>
699   CPP         C preprocessor
700
701 Use these variables to override the choices made by `configure' or to help
702 it to find libraries and programs with nonstandard names/locations.
703
704 EOF
705 fi
706
707 if test "$ac_init_help" = "recursive"; then
708   # If there are subdirs, report their specific --help.
709   ac_popdir=`pwd`
710   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
711     cd $ac_subdir
712     # A "../" for each directory in /$ac_subdir.
713     ac_dots=`echo $ac_subdir |
714              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
715
716     case $srcdir in
717     .) # No --srcdir option.  We are building in place.
718       ac_sub_srcdir=$srcdir ;;
719     [\\/]* | ?:[\\/]* ) # Absolute path.
720       ac_sub_srcdir=$srcdir/$ac_subdir ;;
721     *) # Relative path.
722       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
723     esac
724
725     # Check for guested configure; otherwise get Cygnus style configure.
726     if test -f $ac_sub_srcdir/configure.gnu; then
727       echo
728       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
729     elif test -f $ac_sub_srcdir/configure; then
730       echo
731       $SHELL $ac_sub_srcdir/configure  --help=recursive
732     elif test -f $ac_sub_srcdir/configure.ac ||
733            test -f $ac_sub_srcdir/configure.in; then
734       echo
735       $ac_configure --help
736     else
737       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
738     fi
739     cd $ac_popdir
740   done
741 fi
742
743 test -n "$ac_init_help" && exit 0
744 if $ac_init_version; then
745   cat <<\EOF
746
747 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
748 Free Software Foundation, Inc.
749 This configure script is free software; the Free Software Foundation
750 gives unlimited permission to copy, distribute and modify it.
751 EOF
752   exit 0
753 fi
754 exec 5>config.log
755 cat >&5 <<EOF
756 This file contains any messages produced by compilers while
757 running configure, to aid debugging if configure makes a mistake.
758
759 It was created by $as_me, which was
760 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
761
762   $ $0 $@
763
764 EOF
765 {
766 cat <<_ASUNAME
767 ## ---------- ##
768 ## Platform.  ##
769 ## ---------- ##
770
771 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
772 uname -m = `(uname -m) 2>/dev/null || echo unknown`
773 uname -r = `(uname -r) 2>/dev/null || echo unknown`
774 uname -s = `(uname -s) 2>/dev/null || echo unknown`
775 uname -v = `(uname -v) 2>/dev/null || echo unknown`
776
777 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
778 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
779
780 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
781 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
782 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
783 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
784 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
785 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
786 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
787
788 PATH = $PATH
789
790 _ASUNAME
791 } >&5
792
793 cat >&5 <<EOF
794 ## ------------ ##
795 ## Core tests.  ##
796 ## ------------ ##
797
798 EOF
799
800 # Keep a trace of the command line.
801 # Strip out --no-create and --no-recursion so they do not pile up.
802 # Also quote any args containing shell meta-characters.
803 ac_configure_args=
804 ac_sep=
805 for ac_arg
806 do
807   case $ac_arg in
808   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
809   | --no-cr | --no-c) ;;
810   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
811   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
812   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
813     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
814     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
815     ac_sep=" " ;;
816   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
817      ac_sep=" " ;;
818   esac
819   # Get rid of the leading space.
820 done
821
822 # When interrupted or exit'd, cleanup temporary files, and complete
823 # config.log.  We remove comments because anyway the quotes in there
824 # would cause problems or look ugly.
825 trap 'exit_status=$?
826   # Save into config.log some information that might help in debugging.
827   echo >&5
828   echo "## ----------------- ##" >&5
829   echo "## Cache variables.  ##" >&5
830   echo "## ----------------- ##" >&5
831   echo >&5
832   # The following way of writing the cache mishandles newlines in values,
833 {
834   (set) 2>&1 |
835     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
836     *ac_space=\ *)
837       sed -n \
838         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
839           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
840       ;;
841     *)
842       sed -n \
843         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
844       ;;
845     esac;
846 } >&5
847   sed "/^$/d" confdefs.h >conftest.log
848   if test -s conftest.log; then
849     echo >&5
850     echo "## ------------ ##" >&5
851     echo "## confdefs.h.  ##" >&5
852     echo "## ------------ ##" >&5
853     echo >&5
854     cat conftest.log >&5
855   fi
856   (echo; echo) >&5
857   test "$ac_signal" != 0 &&
858     echo "$as_me: caught signal $ac_signal" >&5
859   echo "$as_me: exit $exit_status" >&5
860   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
861     exit $exit_status
862      ' 0
863 for ac_signal in 1 2 13 15; do
864   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
865 done
866 ac_signal=0
867
868 # confdefs.h avoids OS command line length limits that DEFS can exceed.
869 rm -rf conftest* confdefs.h
870 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
871 echo >confdefs.h
872
873 # Let the site file select an alternate cache file if it wants to.
874 # Prefer explicitly selected file to automatically selected ones.
875 if test -z "$CONFIG_SITE"; then
876   if test "x$prefix" != xNONE; then
877     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
878   else
879     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
880   fi
881 fi
882 for ac_site_file in $CONFIG_SITE; do
883   if test -r "$ac_site_file"; then
884     { echo "$as_me:884: loading site script $ac_site_file" >&5
885 echo "$as_me: loading site script $ac_site_file" >&6;}
886     cat "$ac_site_file" >&5
887     . "$ac_site_file"
888   fi
889 done
890
891 if test -r "$cache_file"; then
892   # Some versions of bash will fail to source /dev/null (special
893   # files actually), so we avoid doing that.
894   if test -f "$cache_file"; then
895     { echo "$as_me:895: loading cache $cache_file" >&5
896 echo "$as_me: loading cache $cache_file" >&6;}
897     case $cache_file in
898       [\\/]* | ?:[\\/]* ) . $cache_file;;
899       *)                      . ./$cache_file;;
900     esac
901   fi
902 else
903   { echo "$as_me:903: creating cache $cache_file" >&5
904 echo "$as_me: creating cache $cache_file" >&6;}
905   >$cache_file
906 fi
907
908 # Check that the precious variables saved in the cache have kept the same
909 # value.
910 ac_cache_corrupted=false
911 for ac_var in `(set) 2>&1 |
912                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
913   eval ac_old_set=\$ac_cv_env_${ac_var}_set
914   eval ac_new_set=\$ac_env_${ac_var}_set
915   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
916   eval ac_new_val="\$ac_env_${ac_var}_value"
917   case $ac_old_set,$ac_new_set in
918     set,)
919       { echo "$as_me:919: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
920 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
921       ac_cache_corrupted=: ;;
922     ,set)
923       { echo "$as_me:923: error: \`$ac_var' was not set in the previous run" >&5
924 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
925       ac_cache_corrupted=: ;;
926     ,);;
927     *)
928       if test "x$ac_old_val" != "x$ac_new_val"; then
929         { echo "$as_me:929: error: \`$ac_var' has changed since the previous run:" >&5
930 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
931         { echo "$as_me:931:   former value:  $ac_old_val" >&5
932 echo "$as_me:   former value:  $ac_old_val" >&2;}
933         { echo "$as_me:933:   current value: $ac_new_val" >&5
934 echo "$as_me:   current value: $ac_new_val" >&2;}
935         ac_cache_corrupted=:
936       fi;;
937   esac
938   # Pass precious variables to config.status.  It doesn't matter if
939   # we pass some twice (in addition to the command line arguments).
940   if test "$ac_new_set" = set; then
941     case $ac_new_val in
942     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
943       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
944       ac_configure_args="$ac_configure_args '$ac_arg'"
945       ;;
946     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
947        ;;
948     esac
949   fi
950 done
951 if $ac_cache_corrupted; then
952   { echo "$as_me:952: error: changes in the environment can compromise the build" >&5
953 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
954   { { echo "$as_me:954: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
955 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
956    { (exit 1); exit 1; }; }
957 fi
958
959 ac_ext=c
960 ac_cpp='$CPP $CPPFLAGS'
961 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
962 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
963 ac_compiler_gnu=$ac_cv_c_compiler_gnu
964 ac_main_return=return
965
966 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
967   *c*,-n*) ECHO_N= ECHO_C='
968 ' ECHO_T='      ' ;;
969   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
970   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
971 esac
972 echo "#! $SHELL" >conftest.sh
973 echo  "exit 0"   >>conftest.sh
974 chmod +x conftest.sh
975 if { (echo "$as_me:975: PATH=\".;.\"; conftest.sh") >&5
976   (PATH=".;."; conftest.sh) 2>&5
977   ac_status=$?
978   echo "$as_me:978: \$? = $ac_status" >&5
979   (exit $ac_status); }; then
980   ac_path_separator=';'
981 else
982   ac_path_separator=:
983 fi
984 PATH_SEPARATOR="$ac_path_separator"
985 rm -f conftest.sh
986
987 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
988
989 top_builddir=`pwd`
990
991 ac_aux_dir=
992 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
993   if test -f $ac_dir/install-sh; then
994     ac_aux_dir=$ac_dir
995     ac_install_sh="$ac_aux_dir/install-sh -c"
996     break
997   elif test -f $ac_dir/install.sh; then
998     ac_aux_dir=$ac_dir
999     ac_install_sh="$ac_aux_dir/install.sh -c"
1000     break
1001   elif test -f $ac_dir/shtool; then
1002     ac_aux_dir=$ac_dir
1003     ac_install_sh="$ac_aux_dir/shtool install -c"
1004     break
1005   fi
1006 done
1007 if test -z "$ac_aux_dir"; then
1008   { { echo "$as_me:1008: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1009 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1010    { (exit 1); exit 1; }; }
1011 fi
1012 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1013 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1014 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1015
1016 # Make sure we can run config.sub.
1017 $ac_config_sub sun4 >/dev/null 2>&1 ||
1018   { { echo "$as_me:1018: error: cannot run $ac_config_sub" >&5
1019 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1020    { (exit 1); exit 1; }; }
1021
1022 echo "$as_me:1022: checking build system type" >&5
1023 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1024 if test "${ac_cv_build+set}" = set; then
1025   echo $ECHO_N "(cached) $ECHO_C" >&6
1026 else
1027   ac_cv_build_alias=$build_alias
1028 test -z "$ac_cv_build_alias" &&
1029   ac_cv_build_alias=`$ac_config_guess`
1030 test -z "$ac_cv_build_alias" &&
1031   { { echo "$as_me:1031: error: cannot guess build type; you must specify one" >&5
1032 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1033    { (exit 1); exit 1; }; }
1034 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1035   { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1036 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1037    { (exit 1); exit 1; }; }
1038
1039 fi
1040 echo "$as_me:1040: result: $ac_cv_build" >&5
1041 echo "${ECHO_T}$ac_cv_build" >&6
1042 build=$ac_cv_build
1043 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047 echo "$as_me:1047: checking host system type" >&5
1048 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1049 if test "${ac_cv_host+set}" = set; then
1050   echo $ECHO_N "(cached) $ECHO_C" >&6
1051 else
1052   ac_cv_host_alias=$host_alias
1053 test -z "$ac_cv_host_alias" &&
1054   ac_cv_host_alias=$ac_cv_build_alias
1055 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1056   { { echo "$as_me:1056: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1057 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1058    { (exit 1); exit 1; }; }
1059
1060 fi
1061 echo "$as_me:1061: result: $ac_cv_host" >&5
1062 echo "${ECHO_T}$ac_cv_host" >&6
1063 host=$ac_cv_host
1064 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1065 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1066 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1067
1068 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1069         echo "$as_me:1069: checking target system type" >&5
1070 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1071 if test "${ac_cv_target+set}" = set; then
1072   echo $ECHO_N "(cached) $ECHO_C" >&6
1073 else
1074   ac_cv_target_alias=$target_alias
1075 test "x$ac_cv_target_alias" = "x" &&
1076   ac_cv_target_alias=$ac_cv_host_alias
1077 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1078   { { echo "$as_me:1078: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1079 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1080    { (exit 1); exit 1; }; }
1081
1082 fi
1083 echo "$as_me:1083: result: $ac_cv_target" >&5
1084 echo "${ECHO_T}$ac_cv_target" >&6
1085 target=$ac_cv_target
1086 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1087 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1088 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1089
1090 # The aliases save the names the user supplied, while $host etc.
1091 # will get canonicalized.
1092 test -n "$target_alias" &&
1093   test "$program_prefix$program_suffix$program_transform_name" = \
1094     NONENONEs,x,x, &&
1095   program_prefix=${target_alias}-
1096         system_name="$host_os"
1097 else
1098         system_name="`(uname -s -r) 2>/dev/null`"
1099         if test -z "$system_name" ; then
1100                 system_name="`(hostname) 2>/dev/null`"
1101         fi
1102 fi
1103 test -n "$system_name" && cat >>confdefs.h <<EOF
1104 #define SYSTEM_NAME "$system_name"
1105 EOF
1106
1107 if test "${cf_cv_system_name+set}" = set; then
1108   echo $ECHO_N "(cached) $ECHO_C" >&6
1109 else
1110   cf_cv_system_name="$system_name"
1111 fi
1112
1113 test -z "$system_name" && system_name="$cf_cv_system_name"
1114 test -n "$cf_cv_system_name" && echo "$as_me:1114: result: Configuring for $cf_cv_system_name" >&5
1115 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1116
1117 if test ".$system_name" != ".$cf_cv_system_name" ; then
1118         echo "$as_me:1118: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1119 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1120         { { echo "$as_me:1120: error: \"Please remove config.cache and try again.\"" >&5
1121 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1122    { (exit 1); exit 1; }; }
1123 fi
1124
1125 # Check whether --with-system-type or --without-system-type was given.
1126 if test "${with_system_type+set}" = set; then
1127   withval="$with_system_type"
1128   { echo "$as_me:1128: WARNING: overriding system type to $withval" >&5
1129 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1130  cf_cv_system_name=$withval
1131 fi;
1132
1133 ###     Save the given $CFLAGS to allow user-override.
1134 cf_user_CFLAGS="$CFLAGS"
1135
1136 ###     Default install-location
1137
1138 echo "$as_me:1138: checking for prefix" >&5
1139 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1140 if test "x$prefix" = "xNONE" ; then
1141         case "$cf_cv_system_name" in
1142                 # non-vendor systems don't have a conflict
1143         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1144                 prefix=/usr
1145                 ;;
1146         *)      prefix=$ac_default_prefix
1147                 ;;
1148         esac
1149 fi
1150 echo "$as_me:1150: result: $prefix" >&5
1151 echo "${ECHO_T}$prefix" >&6
1152
1153 if test "x$prefix" = "xNONE" ; then
1154 echo "$as_me:1154: checking for default include-directory" >&5
1155 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1156 test -n "$verbose" && echo 1>&6
1157 for cf_symbol in \
1158         $includedir \
1159         $includedir/ncurses \
1160         $prefix/include \
1161         $prefix/include/ncurses \
1162         /usr/local/include \
1163         /usr/local/include/ncurses \
1164         /usr/include \
1165         /usr/include/ncurses
1166 do
1167         cf_dir=`eval echo $cf_symbol`
1168         if test -f $cf_dir/curses.h ; then
1169         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1170                 includedir="$cf_symbol"
1171                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1172                 break
1173         fi
1174         fi
1175         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1176 done
1177 echo "$as_me:1177: result: $includedir" >&5
1178 echo "${ECHO_T}$includedir" >&6
1179 fi
1180
1181 ###     Checks for programs.
1182 ac_ext=c
1183 ac_cpp='$CPP $CPPFLAGS'
1184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1187 ac_main_return=return
1188 if test -n "$ac_tool_prefix"; then
1189   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1190 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1191 echo "$as_me:1191: checking for $ac_word" >&5
1192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1193 if test "${ac_cv_prog_CC+set}" = set; then
1194   echo $ECHO_N "(cached) $ECHO_C" >&6
1195 else
1196   if test -n "$CC"; then
1197   ac_cv_prog_CC="$CC" # Let the user override the test.
1198 else
1199   ac_save_IFS=$IFS; IFS=$ac_path_separator
1200 ac_dummy="$PATH"
1201 for ac_dir in $ac_dummy; do
1202   IFS=$ac_save_IFS
1203   test -z "$ac_dir" && ac_dir=.
1204   $as_executable_p "$ac_dir/$ac_word" || continue
1205 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1206 echo "$as_me:1206: found $ac_dir/$ac_word" >&5
1207 break
1208 done
1209
1210 fi
1211 fi
1212 CC=$ac_cv_prog_CC
1213 if test -n "$CC"; then
1214   echo "$as_me:1214: result: $CC" >&5
1215 echo "${ECHO_T}$CC" >&6
1216 else
1217   echo "$as_me:1217: result: no" >&5
1218 echo "${ECHO_T}no" >&6
1219 fi
1220
1221 fi
1222 if test -z "$ac_cv_prog_CC"; then
1223   ac_ct_CC=$CC
1224   # Extract the first word of "gcc", so it can be a program name with args.
1225 set dummy gcc; ac_word=$2
1226 echo "$as_me:1226: checking for $ac_word" >&5
1227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1228 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   if test -n "$ac_ct_CC"; then
1232   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1233 else
1234   ac_save_IFS=$IFS; IFS=$ac_path_separator
1235 ac_dummy="$PATH"
1236 for ac_dir in $ac_dummy; do
1237   IFS=$ac_save_IFS
1238   test -z "$ac_dir" && ac_dir=.
1239   $as_executable_p "$ac_dir/$ac_word" || continue
1240 ac_cv_prog_ac_ct_CC="gcc"
1241 echo "$as_me:1241: found $ac_dir/$ac_word" >&5
1242 break
1243 done
1244
1245 fi
1246 fi
1247 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1248 if test -n "$ac_ct_CC"; then
1249   echo "$as_me:1249: result: $ac_ct_CC" >&5
1250 echo "${ECHO_T}$ac_ct_CC" >&6
1251 else
1252   echo "$as_me:1252: result: no" >&5
1253 echo "${ECHO_T}no" >&6
1254 fi
1255
1256   CC=$ac_ct_CC
1257 else
1258   CC="$ac_cv_prog_CC"
1259 fi
1260
1261 if test -z "$CC"; then
1262   if test -n "$ac_tool_prefix"; then
1263   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1264 set dummy ${ac_tool_prefix}cc; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_prog_CC+set}" = set; then
1268   echo $ECHO_N "(cached) $ECHO_C" >&6
1269 else
1270   if test -n "$CC"; then
1271   ac_cv_prog_CC="$CC" # Let the user override the test.
1272 else
1273   ac_save_IFS=$IFS; IFS=$ac_path_separator
1274 ac_dummy="$PATH"
1275 for ac_dir in $ac_dummy; do
1276   IFS=$ac_save_IFS
1277   test -z "$ac_dir" && ac_dir=.
1278   $as_executable_p "$ac_dir/$ac_word" || continue
1279 ac_cv_prog_CC="${ac_tool_prefix}cc"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1281 break
1282 done
1283
1284 fi
1285 fi
1286 CC=$ac_cv_prog_CC
1287 if test -n "$CC"; then
1288   echo "$as_me:1288: result: $CC" >&5
1289 echo "${ECHO_T}$CC" >&6
1290 else
1291   echo "$as_me:1291: result: no" >&5
1292 echo "${ECHO_T}no" >&6
1293 fi
1294
1295 fi
1296 if test -z "$ac_cv_prog_CC"; then
1297   ac_ct_CC=$CC
1298   # Extract the first word of "cc", so it can be a program name with args.
1299 set dummy cc; ac_word=$2
1300 echo "$as_me:1300: checking for $ac_word" >&5
1301 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1302 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1303   echo $ECHO_N "(cached) $ECHO_C" >&6
1304 else
1305   if test -n "$ac_ct_CC"; then
1306   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1307 else
1308   ac_save_IFS=$IFS; IFS=$ac_path_separator
1309 ac_dummy="$PATH"
1310 for ac_dir in $ac_dummy; do
1311   IFS=$ac_save_IFS
1312   test -z "$ac_dir" && ac_dir=.
1313   $as_executable_p "$ac_dir/$ac_word" || continue
1314 ac_cv_prog_ac_ct_CC="cc"
1315 echo "$as_me:1315: found $ac_dir/$ac_word" >&5
1316 break
1317 done
1318
1319 fi
1320 fi
1321 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1322 if test -n "$ac_ct_CC"; then
1323   echo "$as_me:1323: result: $ac_ct_CC" >&5
1324 echo "${ECHO_T}$ac_ct_CC" >&6
1325 else
1326   echo "$as_me:1326: result: no" >&5
1327 echo "${ECHO_T}no" >&6
1328 fi
1329
1330   CC=$ac_ct_CC
1331 else
1332   CC="$ac_cv_prog_CC"
1333 fi
1334
1335 fi
1336 if test -z "$CC"; then
1337   # Extract the first word of "cc", so it can be a program name with args.
1338 set dummy cc; ac_word=$2
1339 echo "$as_me:1339: checking for $ac_word" >&5
1340 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1341 if test "${ac_cv_prog_CC+set}" = set; then
1342   echo $ECHO_N "(cached) $ECHO_C" >&6
1343 else
1344   if test -n "$CC"; then
1345   ac_cv_prog_CC="$CC" # Let the user override the test.
1346 else
1347   ac_prog_rejected=no
1348   ac_save_IFS=$IFS; IFS=$ac_path_separator
1349 ac_dummy="$PATH"
1350 for ac_dir in $ac_dummy; do
1351   IFS=$ac_save_IFS
1352   test -z "$ac_dir" && ac_dir=.
1353   $as_executable_p "$ac_dir/$ac_word" || continue
1354 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1355   ac_prog_rejected=yes
1356   continue
1357 fi
1358 ac_cv_prog_CC="cc"
1359 echo "$as_me:1359: found $ac_dir/$ac_word" >&5
1360 break
1361 done
1362
1363 if test $ac_prog_rejected = yes; then
1364   # We found a bogon in the path, so make sure we never use it.
1365   set dummy $ac_cv_prog_CC
1366   shift
1367   if test $# != 0; then
1368     # We chose a different compiler from the bogus one.
1369     # However, it has the same basename, so the bogon will be chosen
1370     # first if we set CC to just the basename; use the full file name.
1371     shift
1372     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1373     shift
1374     ac_cv_prog_CC="$@"
1375   fi
1376 fi
1377 fi
1378 fi
1379 CC=$ac_cv_prog_CC
1380 if test -n "$CC"; then
1381   echo "$as_me:1381: result: $CC" >&5
1382 echo "${ECHO_T}$CC" >&6
1383 else
1384   echo "$as_me:1384: result: no" >&5
1385 echo "${ECHO_T}no" >&6
1386 fi
1387
1388 fi
1389 if test -z "$CC"; then
1390   if test -n "$ac_tool_prefix"; then
1391   for ac_prog in cl
1392   do
1393     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1394 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1395 echo "$as_me:1395: checking for $ac_word" >&5
1396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1397 if test "${ac_cv_prog_CC+set}" = set; then
1398   echo $ECHO_N "(cached) $ECHO_C" >&6
1399 else
1400   if test -n "$CC"; then
1401   ac_cv_prog_CC="$CC" # Let the user override the test.
1402 else
1403   ac_save_IFS=$IFS; IFS=$ac_path_separator
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406   IFS=$ac_save_IFS
1407   test -z "$ac_dir" && ac_dir=.
1408   $as_executable_p "$ac_dir/$ac_word" || continue
1409 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1410 echo "$as_me:1410: found $ac_dir/$ac_word" >&5
1411 break
1412 done
1413
1414 fi
1415 fi
1416 CC=$ac_cv_prog_CC
1417 if test -n "$CC"; then
1418   echo "$as_me:1418: result: $CC" >&5
1419 echo "${ECHO_T}$CC" >&6
1420 else
1421   echo "$as_me:1421: result: no" >&5
1422 echo "${ECHO_T}no" >&6
1423 fi
1424
1425     test -n "$CC" && break
1426   done
1427 fi
1428 if test -z "$CC"; then
1429   ac_ct_CC=$CC
1430   for ac_prog in cl
1431 do
1432   # Extract the first word of "$ac_prog", so it can be a program name with args.
1433 set dummy $ac_prog; ac_word=$2
1434 echo "$as_me:1434: checking for $ac_word" >&5
1435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1436 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1437   echo $ECHO_N "(cached) $ECHO_C" >&6
1438 else
1439   if test -n "$ac_ct_CC"; then
1440   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1441 else
1442   ac_save_IFS=$IFS; IFS=$ac_path_separator
1443 ac_dummy="$PATH"
1444 for ac_dir in $ac_dummy; do
1445   IFS=$ac_save_IFS
1446   test -z "$ac_dir" && ac_dir=.
1447   $as_executable_p "$ac_dir/$ac_word" || continue
1448 ac_cv_prog_ac_ct_CC="$ac_prog"
1449 echo "$as_me:1449: found $ac_dir/$ac_word" >&5
1450 break
1451 done
1452
1453 fi
1454 fi
1455 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1456 if test -n "$ac_ct_CC"; then
1457   echo "$as_me:1457: result: $ac_ct_CC" >&5
1458 echo "${ECHO_T}$ac_ct_CC" >&6
1459 else
1460   echo "$as_me:1460: result: no" >&5
1461 echo "${ECHO_T}no" >&6
1462 fi
1463
1464   test -n "$ac_ct_CC" && break
1465 done
1466
1467   CC=$ac_ct_CC
1468 fi
1469
1470 fi
1471
1472 test -z "$CC" && { { echo "$as_me:1472: error: no acceptable cc found in \$PATH" >&5
1473 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1474    { (exit 1); exit 1; }; }
1475
1476 # Provide some information about the compiler.
1477 echo "$as_me:1477:" \
1478      "checking for C compiler version" >&5
1479 ac_compiler=`set X $ac_compile; echo $2`
1480 { (eval echo "$as_me:1480: \"$ac_compiler --version </dev/null >&5\"") >&5
1481   (eval $ac_compiler --version </dev/null >&5) 2>&5
1482   ac_status=$?
1483   echo "$as_me:1483: \$? = $ac_status" >&5
1484   (exit $ac_status); }
1485 { (eval echo "$as_me:1485: \"$ac_compiler -v </dev/null >&5\"") >&5
1486   (eval $ac_compiler -v </dev/null >&5) 2>&5
1487   ac_status=$?
1488   echo "$as_me:1488: \$? = $ac_status" >&5
1489   (exit $ac_status); }
1490 { (eval echo "$as_me:1490: \"$ac_compiler -V </dev/null >&5\"") >&5
1491   (eval $ac_compiler -V </dev/null >&5) 2>&5
1492   ac_status=$?
1493   echo "$as_me:1493: \$? = $ac_status" >&5
1494   (exit $ac_status); }
1495
1496 cat >conftest.$ac_ext <<_ACEOF
1497 #line 1497 "configure"
1498 #include "confdefs.h"
1499
1500 int
1501 main ()
1502 {
1503
1504   ;
1505   return 0;
1506 }
1507 _ACEOF
1508 ac_clean_files_save=$ac_clean_files
1509 ac_clean_files="$ac_clean_files a.out a.exe"
1510 # Try to create an executable without -o first, disregard a.out.
1511 # It will help us diagnose broken compilers, and finding out an intuition
1512 # of exeext.
1513 echo "$as_me:1513: checking for C compiler default output" >&5
1514 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1515 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1516 if { (eval echo "$as_me:1516: \"$ac_link_default\"") >&5
1517   (eval $ac_link_default) 2>&5
1518   ac_status=$?
1519   echo "$as_me:1519: \$? = $ac_status" >&5
1520   (exit $ac_status); }; then
1521   # Find the output, starting from the most likely.  This scheme is
1522 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1523 # resort.
1524 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1525                 ls a.out conftest 2>/dev/null;
1526                 ls a.* conftest.* 2>/dev/null`; do
1527   case $ac_file in
1528     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1529     a.out ) # We found the default executable, but exeext='' is most
1530             # certainly right.
1531             break;;
1532     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1533           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1534           export ac_cv_exeext
1535           break;;
1536     * ) break;;
1537   esac
1538 done
1539 else
1540   echo "$as_me: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1542 { { echo "$as_me:1542: error: C compiler cannot create executables" >&5
1543 echo "$as_me: error: C compiler cannot create executables" >&2;}
1544    { (exit 77); exit 77; }; }
1545 fi
1546
1547 ac_exeext=$ac_cv_exeext
1548 echo "$as_me:1548: result: $ac_file" >&5
1549 echo "${ECHO_T}$ac_file" >&6
1550
1551 # Check the compiler produces executables we can run.  If not, either
1552 # the compiler is broken, or we cross compile.
1553 echo "$as_me:1553: checking whether the C compiler works" >&5
1554 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1555 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1556 # If not cross compiling, check that we can run a simple program.
1557 if test "$cross_compiling" != yes; then
1558   if { ac_try='./$ac_file'
1559   { (eval echo "$as_me:1559: \"$ac_try\"") >&5
1560   (eval $ac_try) 2>&5
1561   ac_status=$?
1562   echo "$as_me:1562: \$? = $ac_status" >&5
1563   (exit $ac_status); }; }; then
1564     cross_compiling=no
1565   else
1566     if test "$cross_compiling" = maybe; then
1567         cross_compiling=yes
1568     else
1569         { { echo "$as_me:1569: error: cannot run C compiled programs.
1570 If you meant to cross compile, use \`--host'." >&5
1571 echo "$as_me: error: cannot run C compiled programs.
1572 If you meant to cross compile, use \`--host'." >&2;}
1573    { (exit 1); exit 1; }; }
1574     fi
1575   fi
1576 fi
1577 echo "$as_me:1577: result: yes" >&5
1578 echo "${ECHO_T}yes" >&6
1579
1580 rm -f a.out a.exe conftest$ac_cv_exeext
1581 ac_clean_files=$ac_clean_files_save
1582 # Check the compiler produces executables we can run.  If not, either
1583 # the compiler is broken, or we cross compile.
1584 echo "$as_me:1584: checking whether we are cross compiling" >&5
1585 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1586 echo "$as_me:1586: result: $cross_compiling" >&5
1587 echo "${ECHO_T}$cross_compiling" >&6
1588
1589 echo "$as_me:1589: checking for executable suffix" >&5
1590 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1591 if { (eval echo "$as_me:1591: \"$ac_link\"") >&5
1592   (eval $ac_link) 2>&5
1593   ac_status=$?
1594   echo "$as_me:1594: \$? = $ac_status" >&5
1595   (exit $ac_status); }; then
1596   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1597 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1598 # work properly (i.e., refer to `conftest.exe'), while it won't with
1599 # `rm'.
1600 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1601   case $ac_file in
1602     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1603     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1604           export ac_cv_exeext
1605           break;;
1606     * ) break;;
1607   esac
1608 done
1609 else
1610   { { echo "$as_me:1610: error: cannot compute EXEEXT: cannot compile and link" >&5
1611 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1612    { (exit 1); exit 1; }; }
1613 fi
1614
1615 rm -f conftest$ac_cv_exeext
1616 echo "$as_me:1616: result: $ac_cv_exeext" >&5
1617 echo "${ECHO_T}$ac_cv_exeext" >&6
1618
1619 rm -f conftest.$ac_ext
1620 EXEEXT=$ac_cv_exeext
1621 ac_exeext=$EXEEXT
1622 echo "$as_me:1622: checking for object suffix" >&5
1623 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1624 if test "${ac_cv_objext+set}" = set; then
1625   echo $ECHO_N "(cached) $ECHO_C" >&6
1626 else
1627   cat >conftest.$ac_ext <<_ACEOF
1628 #line 1628 "configure"
1629 #include "confdefs.h"
1630
1631 int
1632 main ()
1633 {
1634
1635   ;
1636   return 0;
1637 }
1638 _ACEOF
1639 rm -f conftest.o conftest.obj
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641   (eval $ac_compile) 2>&5
1642   ac_status=$?
1643   echo "$as_me:1643: \$? = $ac_status" >&5
1644   (exit $ac_status); }; then
1645   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1646   case $ac_file in
1647     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1648     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1649        break;;
1650   esac
1651 done
1652 else
1653   echo "$as_me: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1655 { { echo "$as_me:1655: error: cannot compute OBJEXT: cannot compile" >&5
1656 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1657    { (exit 1); exit 1; }; }
1658 fi
1659
1660 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1661 fi
1662 echo "$as_me:1662: result: $ac_cv_objext" >&5
1663 echo "${ECHO_T}$ac_cv_objext" >&6
1664 OBJEXT=$ac_cv_objext
1665 ac_objext=$OBJEXT
1666 echo "$as_me:1666: checking whether we are using the GNU C compiler" >&5
1667 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1668 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   cat >conftest.$ac_ext <<_ACEOF
1672 #line 1672 "configure"
1673 #include "confdefs.h"
1674
1675 int
1676 main ()
1677 {
1678 #ifndef __GNUC__
1679        choke me
1680 #endif
1681
1682   ;
1683   return 0;
1684 }
1685 _ACEOF
1686 rm -f conftest.$ac_objext
1687 if { (eval echo "$as_me:1687: \"$ac_compile\"") >&5
1688   (eval $ac_compile) 2>&5
1689   ac_status=$?
1690   echo "$as_me:1690: \$? = $ac_status" >&5
1691   (exit $ac_status); } &&
1692          { ac_try='test -s conftest.$ac_objext'
1693   { (eval echo "$as_me:1693: \"$ac_try\"") >&5
1694   (eval $ac_try) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; }; then
1698   ac_compiler_gnu=yes
1699 else
1700   echo "$as_me: failed program was:" >&5
1701 cat conftest.$ac_ext >&5
1702 ac_compiler_gnu=no
1703 fi
1704 rm -f conftest.$ac_objext conftest.$ac_ext
1705 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1706
1707 fi
1708 echo "$as_me:1708: result: $ac_cv_c_compiler_gnu" >&5
1709 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1710 GCC=`test $ac_compiler_gnu = yes && echo yes`
1711 ac_test_CFLAGS=${CFLAGS+set}
1712 ac_save_CFLAGS=$CFLAGS
1713 CFLAGS="-g"
1714 echo "$as_me:1714: checking whether $CC accepts -g" >&5
1715 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1716 if test "${ac_cv_prog_cc_g+set}" = set; then
1717   echo $ECHO_N "(cached) $ECHO_C" >&6
1718 else
1719   cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main ()
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 rm -f conftest.$ac_objext
1732 if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5
1733   (eval $ac_compile) 2>&5
1734   ac_status=$?
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); } &&
1737          { ac_try='test -s conftest.$ac_objext'
1738   { (eval echo "$as_me:1738: \"$ac_try\"") >&5
1739   (eval $ac_try) 2>&5
1740   ac_status=$?
1741   echo "$as_me:1741: \$? = $ac_status" >&5
1742   (exit $ac_status); }; }; then
1743   ac_cv_prog_cc_g=yes
1744 else
1745   echo "$as_me: failed program was:" >&5
1746 cat conftest.$ac_ext >&5
1747 ac_cv_prog_cc_g=no
1748 fi
1749 rm -f conftest.$ac_objext conftest.$ac_ext
1750 fi
1751 echo "$as_me:1751: result: $ac_cv_prog_cc_g" >&5
1752 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1753 if test "$ac_test_CFLAGS" = set; then
1754   CFLAGS=$ac_save_CFLAGS
1755 elif test $ac_cv_prog_cc_g = yes; then
1756   if test "$GCC" = yes; then
1757     CFLAGS="-g -O2"
1758   else
1759     CFLAGS="-g"
1760   fi
1761 else
1762   if test "$GCC" = yes; then
1763     CFLAGS="-O2"
1764   else
1765     CFLAGS=
1766   fi
1767 fi
1768 # Some people use a C++ compiler to compile C.  Since we use `exit',
1769 # in C++ we need to declare it.  In case someone uses the same compiler
1770 # for both compiling C and C++ we need to have the C++ compiler decide
1771 # the declaration of exit, since it's the most demanding environment.
1772 cat >conftest.$ac_ext <<_ACEOF
1773 #ifndef __cplusplus
1774   choke me
1775 #endif
1776 _ACEOF
1777 rm -f conftest.$ac_objext
1778 if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
1779   (eval $ac_compile) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); } &&
1783          { ac_try='test -s conftest.$ac_objext'
1784   { (eval echo "$as_me:1784: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789   for ac_declaration in \
1790    ''\
1791    '#include <stdlib.h>' \
1792    'extern "C" void std::exit (int) throw (); using std::exit;' \
1793    'extern "C" void std::exit (int); using std::exit;' \
1794    'extern "C" void exit (int) throw ();' \
1795    'extern "C" void exit (int);' \
1796    'void exit (int);'
1797 do
1798   cat >conftest.$ac_ext <<_ACEOF
1799 #line 1799 "configure"
1800 #include "confdefs.h"
1801 #include <stdlib.h>
1802 $ac_declaration
1803 int
1804 main ()
1805 {
1806 exit (42);
1807   ;
1808   return 0;
1809 }
1810 _ACEOF
1811 rm -f conftest.$ac_objext
1812 if { (eval echo "$as_me:1812: \"$ac_compile\"") >&5
1813   (eval $ac_compile) 2>&5
1814   ac_status=$?
1815   echo "$as_me:1815: \$? = $ac_status" >&5
1816   (exit $ac_status); } &&
1817          { ac_try='test -s conftest.$ac_objext'
1818   { (eval echo "$as_me:1818: \"$ac_try\"") >&5
1819   (eval $ac_try) 2>&5
1820   ac_status=$?
1821   echo "$as_me:1821: \$? = $ac_status" >&5
1822   (exit $ac_status); }; }; then
1823   :
1824 else
1825   echo "$as_me: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1827 continue
1828 fi
1829 rm -f conftest.$ac_objext conftest.$ac_ext
1830   cat >conftest.$ac_ext <<_ACEOF
1831 #line 1831 "configure"
1832 #include "confdefs.h"
1833 $ac_declaration
1834 int
1835 main ()
1836 {
1837 exit (42);
1838   ;
1839   return 0;
1840 }
1841 _ACEOF
1842 rm -f conftest.$ac_objext
1843 if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844   (eval $ac_compile) 2>&5
1845   ac_status=$?
1846   echo "$as_me:1846: \$? = $ac_status" >&5
1847   (exit $ac_status); } &&
1848          { ac_try='test -s conftest.$ac_objext'
1849   { (eval echo "$as_me:1849: \"$ac_try\"") >&5
1850   (eval $ac_try) 2>&5
1851   ac_status=$?
1852   echo "$as_me:1852: \$? = $ac_status" >&5
1853   (exit $ac_status); }; }; then
1854   break
1855 else
1856   echo "$as_me: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 fi
1859 rm -f conftest.$ac_objext conftest.$ac_ext
1860 done
1861 rm -rf conftest*
1862 if test -n "$ac_declaration"; then
1863   echo '#ifdef __cplusplus' >>confdefs.h
1864   echo $ac_declaration      >>confdefs.h
1865   echo '#endif'             >>confdefs.h
1866 fi
1867
1868 else
1869   echo "$as_me: failed program was:" >&5
1870 cat conftest.$ac_ext >&5
1871 fi
1872 rm -f conftest.$ac_objext conftest.$ac_ext
1873 ac_ext=c
1874 ac_cpp='$CPP $CPPFLAGS'
1875 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1876 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1877 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1878 ac_main_return=return
1879
1880 GCC_VERSION=none
1881 if test "$GCC" = yes ; then
1882         echo "$as_me:1882: checking version of $CC" >&5
1883 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1884         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1885         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1886         echo "$as_me:1886: result: $GCC_VERSION" >&5
1887 echo "${ECHO_T}$GCC_VERSION" >&6
1888 fi
1889
1890 ac_ext=c
1891 ac_cpp='$CPP $CPPFLAGS'
1892 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1893 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1894 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1895 ac_main_return=return
1896 echo "$as_me:1896: checking how to run the C preprocessor" >&5
1897 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1898 # On Suns, sometimes $CPP names a directory.
1899 if test -n "$CPP" && test -d "$CPP"; then
1900   CPP=
1901 fi
1902 if test -z "$CPP"; then
1903   if test "${ac_cv_prog_CPP+set}" = set; then
1904   echo $ECHO_N "(cached) $ECHO_C" >&6
1905 else
1906       # Double quotes because CPP needs to be expanded
1907     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1908     do
1909       ac_preproc_ok=false
1910 for ac_c_preproc_warn_flag in '' yes
1911 do
1912   # Use a header file that comes with gcc, so configuring glibc
1913   # with a fresh cross-compiler works.
1914   # On the NeXT, cc -E runs the code through the compiler's parser,
1915   # not just through cpp. "Syntax error" is here to catch this case.
1916   cat >conftest.$ac_ext <<_ACEOF
1917 #line 1917 "configure"
1918 #include "confdefs.h"
1919 #include <assert.h>
1920                      Syntax error
1921 _ACEOF
1922 if { (eval echo "$as_me:1922: \"$ac_cpp conftest.$ac_ext\"") >&5
1923   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1924   ac_status=$?
1925   egrep -v '^ *\+' conftest.er1 >conftest.err
1926   rm -f conftest.er1
1927   cat conftest.err >&5
1928   echo "$as_me:1928: \$? = $ac_status" >&5
1929   (exit $ac_status); } >/dev/null; then
1930   if test -s conftest.err; then
1931     ac_cpp_err=$ac_c_preproc_warn_flag
1932   else
1933     ac_cpp_err=
1934   fi
1935 else
1936   ac_cpp_err=yes
1937 fi
1938 if test -z "$ac_cpp_err"; then
1939   :
1940 else
1941   echo "$as_me: failed program was:" >&5
1942   cat conftest.$ac_ext >&5
1943   # Broken: fails on valid input.
1944 continue
1945 fi
1946 rm -f conftest.err conftest.$ac_ext
1947
1948   # OK, works on sane cases.  Now check whether non-existent headers
1949   # can be detected and how.
1950   cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <ac_nonexistent.h>
1954 _ACEOF
1955 if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5
1956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1957   ac_status=$?
1958   egrep -v '^ *\+' conftest.er1 >conftest.err
1959   rm -f conftest.er1
1960   cat conftest.err >&5
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); } >/dev/null; then
1963   if test -s conftest.err; then
1964     ac_cpp_err=$ac_c_preproc_warn_flag
1965   else
1966     ac_cpp_err=
1967   fi
1968 else
1969   ac_cpp_err=yes
1970 fi
1971 if test -z "$ac_cpp_err"; then
1972   # Broken: success on invalid input.
1973 continue
1974 else
1975   echo "$as_me: failed program was:" >&5
1976   cat conftest.$ac_ext >&5
1977   # Passes both tests.
1978 ac_preproc_ok=:
1979 break
1980 fi
1981 rm -f conftest.err conftest.$ac_ext
1982
1983 done
1984 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1985 rm -f conftest.err conftest.$ac_ext
1986 if $ac_preproc_ok; then
1987   break
1988 fi
1989
1990     done
1991     ac_cv_prog_CPP=$CPP
1992
1993 fi
1994   CPP=$ac_cv_prog_CPP
1995 else
1996   ac_cv_prog_CPP=$CPP
1997 fi
1998 echo "$as_me:1998: result: $CPP" >&5
1999 echo "${ECHO_T}$CPP" >&6
2000 ac_preproc_ok=false
2001 for ac_c_preproc_warn_flag in '' yes
2002 do
2003   # Use a header file that comes with gcc, so configuring glibc
2004   # with a fresh cross-compiler works.
2005   # On the NeXT, cc -E runs the code through the compiler's parser,
2006   # not just through cpp. "Syntax error" is here to catch this case.
2007   cat >conftest.$ac_ext <<_ACEOF
2008 #line 2008 "configure"
2009 #include "confdefs.h"
2010 #include <assert.h>
2011                      Syntax error
2012 _ACEOF
2013 if { (eval echo "$as_me:2013: \"$ac_cpp conftest.$ac_ext\"") >&5
2014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2015   ac_status=$?
2016   egrep -v '^ *\+' conftest.er1 >conftest.err
2017   rm -f conftest.er1
2018   cat conftest.err >&5
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } >/dev/null; then
2021   if test -s conftest.err; then
2022     ac_cpp_err=$ac_c_preproc_warn_flag
2023   else
2024     ac_cpp_err=
2025   fi
2026 else
2027   ac_cpp_err=yes
2028 fi
2029 if test -z "$ac_cpp_err"; then
2030   :
2031 else
2032   echo "$as_me: failed program was:" >&5
2033   cat conftest.$ac_ext >&5
2034   # Broken: fails on valid input.
2035 continue
2036 fi
2037 rm -f conftest.err conftest.$ac_ext
2038
2039   # OK, works on sane cases.  Now check whether non-existent headers
2040   # can be detected and how.
2041   cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <ac_nonexistent.h>
2045 _ACEOF
2046 if { (eval echo "$as_me:2046: \"$ac_cpp conftest.$ac_ext\"") >&5
2047   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2048   ac_status=$?
2049   egrep -v '^ *\+' conftest.er1 >conftest.err
2050   rm -f conftest.er1
2051   cat conftest.err >&5
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); } >/dev/null; then
2054   if test -s conftest.err; then
2055     ac_cpp_err=$ac_c_preproc_warn_flag
2056   else
2057     ac_cpp_err=
2058   fi
2059 else
2060   ac_cpp_err=yes
2061 fi
2062 if test -z "$ac_cpp_err"; then
2063   # Broken: success on invalid input.
2064 continue
2065 else
2066   echo "$as_me: failed program was:" >&5
2067   cat conftest.$ac_ext >&5
2068   # Passes both tests.
2069 ac_preproc_ok=:
2070 break
2071 fi
2072 rm -f conftest.err conftest.$ac_ext
2073
2074 done
2075 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2076 rm -f conftest.err conftest.$ac_ext
2077 if $ac_preproc_ok; then
2078   :
2079 else
2080   { { echo "$as_me:2080: error: C preprocessor \"$CPP\" fails sanity check" >&5
2081 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2082    { (exit 1); exit 1; }; }
2083 fi
2084
2085 ac_ext=c
2086 ac_cpp='$CPP $CPPFLAGS'
2087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2090 ac_main_return=return
2091
2092 if test $ac_cv_c_compiler_gnu = yes; then
2093     echo "$as_me:2093: checking whether $CC needs -traditional" >&5
2094 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2095 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2096   echo $ECHO_N "(cached) $ECHO_C" >&6
2097 else
2098     ac_pattern="Autoconf.*'x'"
2099   cat >conftest.$ac_ext <<_ACEOF
2100 #line 2100 "configure"
2101 #include "confdefs.h"
2102 #include <sgtty.h>
2103 int Autoconf = TIOCGETP;
2104 _ACEOF
2105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2106   egrep "$ac_pattern" >/dev/null 2>&1; then
2107   ac_cv_prog_gcc_traditional=yes
2108 else
2109   ac_cv_prog_gcc_traditional=no
2110 fi
2111 rm -rf conftest*
2112
2113   if test $ac_cv_prog_gcc_traditional = no; then
2114     cat >conftest.$ac_ext <<_ACEOF
2115 #line 2115 "configure"
2116 #include "confdefs.h"
2117 #include <termio.h>
2118 int Autoconf = TCGETA;
2119 _ACEOF
2120 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2121   egrep "$ac_pattern" >/dev/null 2>&1; then
2122   ac_cv_prog_gcc_traditional=yes
2123 fi
2124 rm -rf conftest*
2125
2126   fi
2127 fi
2128 echo "$as_me:2128: result: $ac_cv_prog_gcc_traditional" >&5
2129 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2130   if test $ac_cv_prog_gcc_traditional = yes; then
2131     CC="$CC -traditional"
2132   fi
2133 fi
2134
2135 echo "$as_me:2135: checking whether $CC understands -c and -o together" >&5
2136 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2137 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2138   echo $ECHO_N "(cached) $ECHO_C" >&6
2139 else
2140
2141 cat > conftest.$ac_ext <<CF_EOF
2142 #include <stdio.h>
2143 int main()
2144 {
2145         ${cf_cv_main_return:-return}(0);
2146 }
2147 CF_EOF
2148 # We do the test twice because some compilers refuse to overwrite an
2149 # existing .o file with -o, though they will create one.
2150 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2151 if { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); } &&
2156   test -f conftest2.$ac_objext && { (eval echo "$as_me:2156: \"$ac_try\"") >&5
2157   (eval $ac_try) 2>&5
2158   ac_status=$?
2159   echo "$as_me:2159: \$? = $ac_status" >&5
2160   (exit $ac_status); };
2161 then
2162   eval cf_cv_prog_CC_c_o=yes
2163 else
2164   eval cf_cv_prog_CC_c_o=no
2165 fi
2166 rm -rf conftest*
2167
2168 fi
2169 if test $cf_cv_prog_CC_c_o = yes; then
2170   echo "$as_me:2170: result: yes" >&5
2171 echo "${ECHO_T}yes" >&6
2172 else
2173   echo "$as_me:2173: result: no" >&5
2174 echo "${ECHO_T}no" >&6
2175 fi
2176
2177 echo "$as_me:2177: checking for POSIXized ISC" >&5
2178 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2179 if test -d /etc/conf/kconfig.d &&
2180    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2181 then
2182   echo "$as_me:2182: result: yes" >&5
2183 echo "${ECHO_T}yes" >&6
2184   ISC=yes # If later tests want to check for ISC.
2185
2186 cat >>confdefs.h <<\EOF
2187 #define _POSIX_SOURCE 1
2188 EOF
2189
2190   if test "$GCC" = yes; then
2191     CC="$CC -posix"
2192   else
2193     CC="$CC -Xp"
2194   fi
2195 else
2196   echo "$as_me:2196: result: no" >&5
2197 echo "${ECHO_T}no" >&6
2198   ISC=
2199 fi
2200
2201 echo "$as_me:2201: checking for ${CC:-cc} option to accept ANSI C" >&5
2202 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2203 if test "${cf_cv_ansi_cc+set}" = set; then
2204   echo $ECHO_N "(cached) $ECHO_C" >&6
2205 else
2206
2207 cf_cv_ansi_cc=no
2208 cf_save_CFLAGS="$CFLAGS"
2209 cf_save_CPPFLAGS="$CPPFLAGS"
2210 # Don't try gcc -ansi; that turns off useful extensions and
2211 # breaks some systems' header files.
2212 # AIX                   -qlanglvl=ansi
2213 # Ultrix and OSF/1      -std1
2214 # HP-UX                 -Aa -D_HPUX_SOURCE
2215 # SVR4                  -Xc
2216 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2217 for cf_arg in "-DCC_HAS_PROTOS" \
2218         "" \
2219         -qlanglvl=ansi \
2220         -std1 \
2221         -Ae \
2222         "-Aa -D_HPUX_SOURCE" \
2223         -Xc
2224 do
2225
2226 cf_fix_cppflags=no
2227 cf_new_cflags=
2228 cf_new_cppflags=
2229 cf_new_extra_cppflags=
2230
2231 for cf_add_cflags in $cf_arg
2232 do
2233 case $cf_fix_cppflags in
2234 no)
2235         case $cf_add_cflags in #(vi
2236         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2237                 case $cf_add_cflags in
2238                 -D*)
2239                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2240
2241                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2242                                 && test -z "${cf_tst_cflags}" \
2243                                 && cf_fix_cppflags=yes
2244
2245                         if test $cf_fix_cppflags = yes ; then
2246                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247                                 continue
2248                         elif test "${cf_tst_cflags}" = "\"'" ; then
2249                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2250                                 continue
2251                         fi
2252                         ;;
2253                 esac
2254                 case "$CPPFLAGS" in
2255                 *$cf_add_cflags) #(vi
2256                         ;;
2257                 *) #(vi
2258                         case $cf_add_cflags in #(vi
2259                         -D*)
2260                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2261
2262 CPPFLAGS=`echo "$CPPFLAGS" | \
2263         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2264                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2265
2266                                 ;;
2267                         esac
2268                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2269                         ;;
2270                 esac
2271                 ;;
2272         *)
2273                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2274                 ;;
2275         esac
2276         ;;
2277 yes)
2278         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2279
2280         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2281
2282         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2283                 && test -z "${cf_tst_cflags}" \
2284                 && cf_fix_cppflags=no
2285         ;;
2286 esac
2287 done
2288
2289 if test -n "$cf_new_cflags" ; then
2290
2291         CFLAGS="$CFLAGS $cf_new_cflags"
2292 fi
2293
2294 if test -n "$cf_new_cppflags" ; then
2295
2296         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2297 fi
2298
2299 if test -n "$cf_new_extra_cppflags" ; then
2300
2301         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2302 fi
2303
2304         cat >conftest.$ac_ext <<_ACEOF
2305 #line 2305 "configure"
2306 #include "confdefs.h"
2307
2308 #ifndef CC_HAS_PROTOS
2309 #if !defined(__STDC__) || (__STDC__ != 1)
2310 choke me
2311 #endif
2312 #endif
2313
2314 int
2315 main ()
2316 {
2317
2318         int test (int i, double x);
2319         struct s1 {int (*f) (int a);};
2320         struct s2 {int (*f) (double a);};
2321   ;
2322   return 0;
2323 }
2324 _ACEOF
2325 rm -f conftest.$ac_objext
2326 if { (eval echo "$as_me:2326: \"$ac_compile\"") >&5
2327   (eval $ac_compile) 2>&5
2328   ac_status=$?
2329   echo "$as_me:2329: \$? = $ac_status" >&5
2330   (exit $ac_status); } &&
2331          { ac_try='test -s conftest.$ac_objext'
2332   { (eval echo "$as_me:2332: \"$ac_try\"") >&5
2333   (eval $ac_try) 2>&5
2334   ac_status=$?
2335   echo "$as_me:2335: \$? = $ac_status" >&5
2336   (exit $ac_status); }; }; then
2337   cf_cv_ansi_cc="$cf_arg"; break
2338 else
2339   echo "$as_me: failed program was:" >&5
2340 cat conftest.$ac_ext >&5
2341 fi
2342 rm -f conftest.$ac_objext conftest.$ac_ext
2343 done
2344 CFLAGS="$cf_save_CFLAGS"
2345 CPPFLAGS="$cf_save_CPPFLAGS"
2346
2347 fi
2348 echo "$as_me:2348: result: $cf_cv_ansi_cc" >&5
2349 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2350
2351 if test "$cf_cv_ansi_cc" != "no"; then
2352 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2353
2354 cf_fix_cppflags=no
2355 cf_new_cflags=
2356 cf_new_cppflags=
2357 cf_new_extra_cppflags=
2358
2359 for cf_add_cflags in $cf_cv_ansi_cc
2360 do
2361 case $cf_fix_cppflags in
2362 no)
2363         case $cf_add_cflags in #(vi
2364         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2365                 case $cf_add_cflags in
2366                 -D*)
2367                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2368
2369                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2370                                 && test -z "${cf_tst_cflags}" \
2371                                 && cf_fix_cppflags=yes
2372
2373                         if test $cf_fix_cppflags = yes ; then
2374                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2375                                 continue
2376                         elif test "${cf_tst_cflags}" = "\"'" ; then
2377                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2378                                 continue
2379                         fi
2380                         ;;
2381                 esac
2382                 case "$CPPFLAGS" in
2383                 *$cf_add_cflags) #(vi
2384                         ;;
2385                 *) #(vi
2386                         case $cf_add_cflags in #(vi
2387                         -D*)
2388                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2389
2390 CPPFLAGS=`echo "$CPPFLAGS" | \
2391         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2392                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2393
2394                                 ;;
2395                         esac
2396                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2397                         ;;
2398                 esac
2399                 ;;
2400         *)
2401                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2402                 ;;
2403         esac
2404         ;;
2405 yes)
2406         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2407
2408         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2409
2410         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2411                 && test -z "${cf_tst_cflags}" \
2412                 && cf_fix_cppflags=no
2413         ;;
2414 esac
2415 done
2416
2417 if test -n "$cf_new_cflags" ; then
2418
2419         CFLAGS="$CFLAGS $cf_new_cflags"
2420 fi
2421
2422 if test -n "$cf_new_cppflags" ; then
2423
2424         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2425 fi
2426
2427 if test -n "$cf_new_extra_cppflags" ; then
2428
2429         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2430 fi
2431
2432 else
2433         cat >>confdefs.h <<\EOF
2434 #define CC_HAS_PROTOS 1
2435 EOF
2436
2437 fi
2438 fi
2439
2440 if test "$cf_cv_ansi_cc" = "no"; then
2441         { { echo "$as_me:2441: error: Your compiler does not appear to recognize prototypes.
2442 You have the following choices:
2443         a. adjust your compiler options
2444         b. get an up-to-date compiler
2445         c. use a wrapper such as unproto" >&5
2446 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2447 You have the following choices:
2448         a. adjust your compiler options
2449         b. get an up-to-date compiler
2450         c. use a wrapper such as unproto" >&2;}
2451    { (exit 1); exit 1; }; }
2452 fi
2453
2454 case $cf_cv_system_name in
2455 os2*)
2456     CFLAGS="$CFLAGS -Zmt"
2457     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2458     CXXFLAGS="$CXXFLAGS -Zmt"
2459     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2460     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2461     ac_cv_exeext=.exe
2462     ;;
2463 esac
2464
2465 PROG_EXT="$EXEEXT"
2466
2467 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2468 #define PROG_EXT "$PROG_EXT"
2469 EOF
2470
2471 test "$program_prefix" != NONE &&
2472   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2473 # Use a double $ so make ignores it.
2474 test "$program_suffix" != NONE &&
2475   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2476 # Double any \ or $.  echo might interpret backslashes.
2477 # By default was `s,x,x', remove it if useless.
2478 cat <<\_ACEOF >conftest.sed
2479 s/[\\$]/&&/g;s/;s,x,x,$//
2480 _ACEOF
2481 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2482 rm conftest.sed
2483
2484 for ac_prog in mawk gawk nawk awk
2485 do
2486   # Extract the first word of "$ac_prog", so it can be a program name with args.
2487 set dummy $ac_prog; ac_word=$2
2488 echo "$as_me:2488: checking for $ac_word" >&5
2489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2490 if test "${ac_cv_prog_AWK+set}" = set; then
2491   echo $ECHO_N "(cached) $ECHO_C" >&6
2492 else
2493   if test -n "$AWK"; then
2494   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2495 else
2496   ac_save_IFS=$IFS; IFS=$ac_path_separator
2497 ac_dummy="$PATH"
2498 for ac_dir in $ac_dummy; do
2499   IFS=$ac_save_IFS
2500   test -z "$ac_dir" && ac_dir=.
2501   $as_executable_p "$ac_dir/$ac_word" || continue
2502 ac_cv_prog_AWK="$ac_prog"
2503 echo "$as_me:2503: found $ac_dir/$ac_word" >&5
2504 break
2505 done
2506
2507 fi
2508 fi
2509 AWK=$ac_cv_prog_AWK
2510 if test -n "$AWK"; then
2511   echo "$as_me:2511: result: $AWK" >&5
2512 echo "${ECHO_T}$AWK" >&6
2513 else
2514   echo "$as_me:2514: result: no" >&5
2515 echo "${ECHO_T}no" >&6
2516 fi
2517
2518   test -n "$AWK" && break
2519 done
2520
2521 test -z "$AWK" && { { echo "$as_me:2521: error: No awk program found" >&5
2522 echo "$as_me: error: No awk program found" >&2;}
2523    { (exit 1); exit 1; }; }
2524
2525 echo "$as_me:2525: checking for egrep" >&5
2526 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2527 if test "${ac_cv_prog_egrep+set}" = set; then
2528   echo $ECHO_N "(cached) $ECHO_C" >&6
2529 else
2530   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2531     then ac_cv_prog_egrep='grep -E'
2532     else ac_cv_prog_egrep='egrep'
2533     fi
2534 fi
2535 echo "$as_me:2535: result: $ac_cv_prog_egrep" >&5
2536 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2537  EGREP=$ac_cv_prog_egrep
2538
2539 test -z "$EGREP" && { { echo "$as_me:2539: error: No egrep program found" >&5
2540 echo "$as_me: error: No egrep program found" >&2;}
2541    { (exit 1); exit 1; }; }
2542
2543 # Find a good install program.  We prefer a C program (faster),
2544 # so one script is as good as another.  But avoid the broken or
2545 # incompatible versions:
2546 # SysV /etc/install, /usr/sbin/install
2547 # SunOS /usr/etc/install
2548 # IRIX /sbin/install
2549 # AIX /bin/install
2550 # AmigaOS /C/install, which installs bootblocks on floppy discs
2551 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2552 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2553 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2554 # ./install, which can be erroneously created by make from ./install.sh.
2555 echo "$as_me:2555: checking for a BSD compatible install" >&5
2556 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2557 if test -z "$INSTALL"; then
2558 if test "${ac_cv_path_install+set}" = set; then
2559   echo $ECHO_N "(cached) $ECHO_C" >&6
2560 else
2561     ac_save_IFS=$IFS; IFS=$ac_path_separator
2562   for ac_dir in $PATH; do
2563     IFS=$ac_save_IFS
2564     # Account for people who put trailing slashes in PATH elements.
2565     case $ac_dir/ in
2566     / | ./ | .// | /cC/* \
2567     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2568     | /usr/ucb/* ) ;;
2569     *)
2570       # OSF1 and SCO ODT 3.0 have their own names for install.
2571       # Don't use installbsd from OSF since it installs stuff as root
2572       # by default.
2573       for ac_prog in ginstall scoinst install; do
2574         if $as_executable_p "$ac_dir/$ac_prog"; then
2575           if test $ac_prog = install &&
2576             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2577             # AIX install.  It has an incompatible calling convention.
2578             :
2579           elif test $ac_prog = install &&
2580             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2581             # program-specific install script used by HP pwplus--don't use.
2582             :
2583           else
2584             ac_cv_path_install="$ac_dir/$ac_prog -c"
2585             break 2
2586           fi
2587         fi
2588       done
2589       ;;
2590     esac
2591   done
2592
2593 fi
2594   if test "${ac_cv_path_install+set}" = set; then
2595     INSTALL=$ac_cv_path_install
2596   else
2597     # As a last resort, use the slow shell script.  We don't cache a
2598     # path for INSTALL within a source directory, because that will
2599     # break other packages using the cache if that directory is
2600     # removed, or if the path is relative.
2601     INSTALL=$ac_install_sh
2602   fi
2603 fi
2604 echo "$as_me:2604: result: $INSTALL" >&5
2605 echo "${ECHO_T}$INSTALL" >&6
2606
2607 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2608 # It thinks the first close brace ends the variable substitution.
2609 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2610
2611 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2612
2613 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2614
2615 echo "$as_me:2615: checking whether ln -s works" >&5
2616 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2617 LN_S=$as_ln_s
2618 if test "$LN_S" = "ln -s"; then
2619   echo "$as_me:2619: result: yes" >&5
2620 echo "${ECHO_T}yes" >&6
2621 else
2622   echo "$as_me:2622: result: no, using $LN_S" >&5
2623 echo "${ECHO_T}no, using $LN_S" >&6
2624 fi
2625
2626 echo "$as_me:2626: checking if $LN_S -f options work" >&5
2627 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2628
2629 rm -f conf$$.src conf$$dst
2630 echo >conf$$.dst
2631 echo first >conf$$.src
2632 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2633         cf_prog_ln_sf=yes
2634 else
2635         cf_prog_ln_sf=no
2636 fi
2637 rm -f conf$$.dst conf$$src
2638 echo "$as_me:2638: result: $cf_prog_ln_sf" >&5
2639 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2640
2641 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2642
2643 echo "$as_me:2643: checking for long file names" >&5
2644 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2645 if test "${ac_cv_sys_long_file_names+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   ac_cv_sys_long_file_names=yes
2649 # Test for long file names in all the places we know might matter:
2650 #      .                the current directory, where building will happen
2651 #      $prefix/lib      where we will be installing things
2652 #      $exec_prefix/lib likewise
2653 # eval it to expand exec_prefix.
2654 #      $TMPDIR          if set, where it might want to write temporary files
2655 # if $TMPDIR is not set:
2656 #      /tmp             where it might want to write temporary files
2657 #      /var/tmp         likewise
2658 #      /usr/tmp         likewise
2659 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2660   ac_tmpdirs=$TMPDIR
2661 else
2662   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2663 fi
2664 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2665   test -d $ac_dir || continue
2666   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2667   ac_xdir=$ac_dir/cf$$
2668   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2669   ac_tf1=$ac_xdir/conftest9012345
2670   ac_tf2=$ac_xdir/conftest9012346
2671   (echo 1 >$ac_tf1) 2>/dev/null
2672   (echo 2 >$ac_tf2) 2>/dev/null
2673   ac_val=`cat $ac_tf1 2>/dev/null`
2674   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2675     ac_cv_sys_long_file_names=no
2676     rm -rf $ac_xdir 2>/dev/null
2677     break
2678   fi
2679   rm -rf $ac_xdir 2>/dev/null
2680 done
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_sys_long_file_names" >&5
2683 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2684 if test $ac_cv_sys_long_file_names = yes; then
2685
2686 cat >>confdefs.h <<\EOF
2687 #define HAVE_LONG_FILE_NAMES 1
2688 EOF
2689
2690 fi
2691
2692 # if we find pkg-config, check if we should install the ".pc" files.
2693
2694 echo "$as_me:2694: checking if you want to use pkg-config" >&5
2695 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2696
2697 # Check whether --with-pkg-config or --without-pkg-config was given.
2698 if test "${with_pkg_config+set}" = set; then
2699   withval="$with_pkg_config"
2700   cf_pkg_config=$withval
2701 else
2702   cf_pkg_config=yes
2703 fi;
2704 echo "$as_me:2704: result: $cf_pkg_config" >&5
2705 echo "${ECHO_T}$cf_pkg_config" >&6
2706
2707 case $cf_pkg_config in #(vi
2708 no) #(vi
2709         PKG_CONFIG=none
2710         ;;
2711 yes) #(vi
2712
2713 if test -n "$ac_tool_prefix"; then
2714   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2715 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2716 echo "$as_me:2716: checking for $ac_word" >&5
2717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2718 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2719   echo $ECHO_N "(cached) $ECHO_C" >&6
2720 else
2721   case $PKG_CONFIG in
2722   [\\/]* | ?:[\\/]*)
2723   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2724   ;;
2725   *)
2726   ac_save_IFS=$IFS; IFS=$ac_path_separator
2727 ac_dummy="$PATH"
2728 for ac_dir in $ac_dummy; do
2729   IFS=$ac_save_IFS
2730   test -z "$ac_dir" && ac_dir=.
2731   if $as_executable_p "$ac_dir/$ac_word"; then
2732    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2733    echo "$as_me:2733: found $ac_dir/$ac_word" >&5
2734    break
2735 fi
2736 done
2737
2738   ;;
2739 esac
2740 fi
2741 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2742
2743 if test -n "$PKG_CONFIG"; then
2744   echo "$as_me:2744: result: $PKG_CONFIG" >&5
2745 echo "${ECHO_T}$PKG_CONFIG" >&6
2746 else
2747   echo "$as_me:2747: result: no" >&5
2748 echo "${ECHO_T}no" >&6
2749 fi
2750
2751 fi
2752 if test -z "$ac_cv_path_PKG_CONFIG"; then
2753   ac_pt_PKG_CONFIG=$PKG_CONFIG
2754   # Extract the first word of "pkg-config", so it can be a program name with args.
2755 set dummy pkg-config; ac_word=$2
2756 echo "$as_me:2756: checking for $ac_word" >&5
2757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2758 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2759   echo $ECHO_N "(cached) $ECHO_C" >&6
2760 else
2761   case $ac_pt_PKG_CONFIG in
2762   [\\/]* | ?:[\\/]*)
2763   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2764   ;;
2765   *)
2766   ac_save_IFS=$IFS; IFS=$ac_path_separator
2767 ac_dummy="$PATH"
2768 for ac_dir in $ac_dummy; do
2769   IFS=$ac_save_IFS
2770   test -z "$ac_dir" && ac_dir=.
2771   if $as_executable_p "$ac_dir/$ac_word"; then
2772    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2773    echo "$as_me:2773: found $ac_dir/$ac_word" >&5
2774    break
2775 fi
2776 done
2777
2778   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2779   ;;
2780 esac
2781 fi
2782 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2783
2784 if test -n "$ac_pt_PKG_CONFIG"; then
2785   echo "$as_me:2785: result: $ac_pt_PKG_CONFIG" >&5
2786 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2787 else
2788   echo "$as_me:2788: result: no" >&5
2789 echo "${ECHO_T}no" >&6
2790 fi
2791
2792   PKG_CONFIG=$ac_pt_PKG_CONFIG
2793 else
2794   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2795 fi
2796
2797         ;;
2798 *)
2799         PKG_CONFIG=$withval
2800         ;;
2801 esac
2802
2803 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2804 if test "$PKG_CONFIG" != none ; then
2805
2806 if test "x$prefix" != xNONE; then
2807   cf_path_syntax="$prefix"
2808 else
2809   cf_path_syntax="$ac_default_prefix"
2810 fi
2811
2812 case ".$PKG_CONFIG" in #(vi
2813 .\$\(*\)*|.\'*\'*) #(vi
2814   ;;
2815 ..|./*|.\\*) #(vi
2816   ;;
2817 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2818   ;;
2819 .\${*prefix}*) #(vi
2820   eval PKG_CONFIG="$PKG_CONFIG"
2821   case ".$PKG_CONFIG" in #(vi
2822   .NONE/*)
2823     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2824     ;;
2825   esac
2826   ;; #(vi
2827 .no|.NONE/*)
2828   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2829   ;;
2830 *)
2831   { { echo "$as_me:2831: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2832 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2833    { (exit 1); exit 1; }; }
2834   ;;
2835 esac
2836
2837 fi
2838
2839 if test "$PKG_CONFIG" != none ; then
2840         echo "$as_me:2840: checking if we should install .pc files for $PKG_CONFIG" >&5
2841 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2842
2843         # Leave this as something that can be overridden in the environment.
2844         if test -z "$PKG_CONFIG_LIBDIR" ; then
2845                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2846         fi
2847         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2848         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2849
2850 # Check whether --enable-pc-files or --disable-pc-files was given.
2851 if test "${enable_pc_files+set}" = set; then
2852   enableval="$enable_pc_files"
2853   enable_pc_files=$enableval
2854 else
2855   enable_pc_files=no
2856 fi;
2857                 echo "$as_me:2857: result: $enable_pc_files" >&5
2858 echo "${ECHO_T}$enable_pc_files" >&6
2859         else
2860                 echo "$as_me:2860: result: no" >&5
2861 echo "${ECHO_T}no" >&6
2862                 { echo "$as_me:2862: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2863 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2864                 enable_pc_files=no
2865         fi
2866 fi
2867
2868 echo "$as_me:2868: checking if you want to build test-programs" >&5
2869 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2870
2871 # Check whether --with-tests or --without-tests was given.
2872 if test "${with_tests+set}" = set; then
2873   withval="$with_tests"
2874   cf_with_tests=$withval
2875 else
2876   cf_with_tests=yes
2877 fi;
2878 echo "$as_me:2878: result: $cf_with_tests" >&5
2879 echo "${ECHO_T}$cf_with_tests" >&6
2880
2881 echo "$as_me:2881: checking if we should assume mixed-case filenames" >&5
2882 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2883
2884 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2885 if test "${enable_mixed_case+set}" = set; then
2886   enableval="$enable_mixed_case"
2887   enable_mixedcase=$enableval
2888 else
2889   enable_mixedcase=auto
2890 fi;
2891 echo "$as_me:2891: result: $enable_mixedcase" >&5
2892 echo "${ECHO_T}$enable_mixedcase" >&6
2893 if test "$enable_mixedcase" = "auto" ; then
2894
2895 echo "$as_me:2895: checking if filesystem supports mixed-case filenames" >&5
2896 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2897 if test "${cf_cv_mixedcase+set}" = set; then
2898   echo $ECHO_N "(cached) $ECHO_C" >&6
2899 else
2900
2901 if test "$cross_compiling" = yes ; then
2902         case $target_alias in #(vi
2903         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2904                 cf_cv_mixedcase=no
2905                 ;;
2906         *)
2907                 cf_cv_mixedcase=yes
2908                 ;;
2909         esac
2910 else
2911         rm -f conftest CONFTEST
2912         echo test >conftest
2913         if test -f CONFTEST ; then
2914                 cf_cv_mixedcase=no
2915         else
2916                 cf_cv_mixedcase=yes
2917         fi
2918         rm -f conftest CONFTEST
2919 fi
2920
2921 fi
2922 echo "$as_me:2922: result: $cf_cv_mixedcase" >&5
2923 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2924 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2925 #define MIXEDCASE_FILENAMES 1
2926 EOF
2927
2928 else
2929     cf_cv_mixedcase=$enable_mixedcase
2930     if test "$enable_mixedcase" = "yes" ; then
2931         cat >>confdefs.h <<\EOF
2932 #define MIXEDCASE_FILENAMES 1
2933 EOF
2934
2935     fi
2936 fi
2937
2938 # do this after mixed-case option (tags/TAGS is not as important as tic).
2939 echo "$as_me:2939: checking whether ${MAKE-make} sets \${MAKE}" >&5
2940 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2941 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2942 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2943   echo $ECHO_N "(cached) $ECHO_C" >&6
2944 else
2945   cat >conftest.make <<\EOF
2946 all:
2947         @echo 'ac_maketemp="${MAKE}"'
2948 EOF
2949 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2950 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2951 if test -n "$ac_maketemp"; then
2952   eval ac_cv_prog_make_${ac_make}_set=yes
2953 else
2954   eval ac_cv_prog_make_${ac_make}_set=no
2955 fi
2956 rm -f conftest.make
2957 fi
2958 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2959   echo "$as_me:2959: result: yes" >&5
2960 echo "${ECHO_T}yes" >&6
2961   SET_MAKE=
2962 else
2963   echo "$as_me:2963: result: no" >&5
2964 echo "${ECHO_T}no" >&6
2965   SET_MAKE="MAKE=${MAKE-make}"
2966 fi
2967
2968 for ac_prog in exctags ctags
2969 do
2970   # Extract the first word of "$ac_prog", so it can be a program name with args.
2971 set dummy $ac_prog; ac_word=$2
2972 echo "$as_me:2972: checking for $ac_word" >&5
2973 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2974 if test "${ac_cv_prog_CTAGS+set}" = set; then
2975   echo $ECHO_N "(cached) $ECHO_C" >&6
2976 else
2977   if test -n "$CTAGS"; then
2978   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2979 else
2980   ac_save_IFS=$IFS; IFS=$ac_path_separator
2981 ac_dummy="$PATH"
2982 for ac_dir in $ac_dummy; do
2983   IFS=$ac_save_IFS
2984   test -z "$ac_dir" && ac_dir=.
2985   $as_executable_p "$ac_dir/$ac_word" || continue
2986 ac_cv_prog_CTAGS="$ac_prog"
2987 echo "$as_me:2987: found $ac_dir/$ac_word" >&5
2988 break
2989 done
2990
2991 fi
2992 fi
2993 CTAGS=$ac_cv_prog_CTAGS
2994 if test -n "$CTAGS"; then
2995   echo "$as_me:2995: result: $CTAGS" >&5
2996 echo "${ECHO_T}$CTAGS" >&6
2997 else
2998   echo "$as_me:2998: result: no" >&5
2999 echo "${ECHO_T}no" >&6
3000 fi
3001
3002   test -n "$CTAGS" && break
3003 done
3004
3005 for ac_prog in exetags etags
3006 do
3007   # Extract the first word of "$ac_prog", so it can be a program name with args.
3008 set dummy $ac_prog; ac_word=$2
3009 echo "$as_me:3009: checking for $ac_word" >&5
3010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3011 if test "${ac_cv_prog_ETAGS+set}" = set; then
3012   echo $ECHO_N "(cached) $ECHO_C" >&6
3013 else
3014   if test -n "$ETAGS"; then
3015   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3016 else
3017   ac_save_IFS=$IFS; IFS=$ac_path_separator
3018 ac_dummy="$PATH"
3019 for ac_dir in $ac_dummy; do
3020   IFS=$ac_save_IFS
3021   test -z "$ac_dir" && ac_dir=.
3022   $as_executable_p "$ac_dir/$ac_word" || continue
3023 ac_cv_prog_ETAGS="$ac_prog"
3024 echo "$as_me:3024: found $ac_dir/$ac_word" >&5
3025 break
3026 done
3027
3028 fi
3029 fi
3030 ETAGS=$ac_cv_prog_ETAGS
3031 if test -n "$ETAGS"; then
3032   echo "$as_me:3032: result: $ETAGS" >&5
3033 echo "${ECHO_T}$ETAGS" >&6
3034 else
3035   echo "$as_me:3035: result: no" >&5
3036 echo "${ECHO_T}no" >&6
3037 fi
3038
3039   test -n "$ETAGS" && break
3040 done
3041
3042 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3043 set dummy ${CTAGS:-ctags}; ac_word=$2
3044 echo "$as_me:3044: checking for $ac_word" >&5
3045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3046 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3047   echo $ECHO_N "(cached) $ECHO_C" >&6
3048 else
3049   if test -n "$MAKE_LOWER_TAGS"; then
3050   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3051 else
3052   ac_save_IFS=$IFS; IFS=$ac_path_separator
3053 ac_dummy="$PATH"
3054 for ac_dir in $ac_dummy; do
3055   IFS=$ac_save_IFS
3056   test -z "$ac_dir" && ac_dir=.
3057   $as_executable_p "$ac_dir/$ac_word" || continue
3058 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3059 echo "$as_me:3059: found $ac_dir/$ac_word" >&5
3060 break
3061 done
3062
3063   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3064 fi
3065 fi
3066 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3067 if test -n "$MAKE_LOWER_TAGS"; then
3068   echo "$as_me:3068: result: $MAKE_LOWER_TAGS" >&5
3069 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3070 else
3071   echo "$as_me:3071: result: no" >&5
3072 echo "${ECHO_T}no" >&6
3073 fi
3074
3075 if test "$cf_cv_mixedcase" = yes ; then
3076         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3077 set dummy ${ETAGS:-etags}; ac_word=$2
3078 echo "$as_me:3078: checking for $ac_word" >&5
3079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3080 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3081   echo $ECHO_N "(cached) $ECHO_C" >&6
3082 else
3083   if test -n "$MAKE_UPPER_TAGS"; then
3084   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3085 else
3086   ac_save_IFS=$IFS; IFS=$ac_path_separator
3087 ac_dummy="$PATH"
3088 for ac_dir in $ac_dummy; do
3089   IFS=$ac_save_IFS
3090   test -z "$ac_dir" && ac_dir=.
3091   $as_executable_p "$ac_dir/$ac_word" || continue
3092 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3093 echo "$as_me:3093: found $ac_dir/$ac_word" >&5
3094 break
3095 done
3096
3097   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3098 fi
3099 fi
3100 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3101 if test -n "$MAKE_UPPER_TAGS"; then
3102   echo "$as_me:3102: result: $MAKE_UPPER_TAGS" >&5
3103 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3104 else
3105   echo "$as_me:3105: result: no" >&5
3106 echo "${ECHO_T}no" >&6
3107 fi
3108
3109 else
3110         MAKE_UPPER_TAGS=no
3111 fi
3112
3113 if test "$MAKE_UPPER_TAGS" = yes ; then
3114         MAKE_UPPER_TAGS=
3115 else
3116         MAKE_UPPER_TAGS="#"
3117 fi
3118
3119 if test "$MAKE_LOWER_TAGS" = yes ; then
3120         MAKE_LOWER_TAGS=
3121 else
3122         MAKE_LOWER_TAGS="#"
3123 fi
3124
3125 echo "$as_me:3125: checking for makeflags variable" >&5
3126 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3127 if test "${cf_cv_makeflags+set}" = set; then
3128   echo $ECHO_N "(cached) $ECHO_C" >&6
3129 else
3130
3131         cf_cv_makeflags=''
3132         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3133         do
3134                 cat >cf_makeflags.tmp <<CF_EOF
3135 SHELL = /bin/sh
3136 all :
3137         @ echo '.$cf_option'
3138 CF_EOF
3139                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3140                 case "$cf_result" in
3141                 .*k)
3142                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3143                         case "$cf_result" in
3144                         .*CC=*) cf_cv_makeflags=
3145                                 ;;
3146                         *)      cf_cv_makeflags=$cf_option
3147                                 ;;
3148                         esac
3149                         break
3150                         ;;
3151                 .-)     ;;
3152                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3153                         ;;
3154                 esac
3155         done
3156         rm -f cf_makeflags.tmp
3157
3158 fi
3159 echo "$as_me:3159: result: $cf_cv_makeflags" >&5
3160 echo "${ECHO_T}$cf_cv_makeflags" >&6
3161
3162 if test -n "$ac_tool_prefix"; then
3163   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3164 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_RANLIB+set}" = set; then
3168   echo $ECHO_N "(cached) $ECHO_C" >&6
3169 else
3170   if test -n "$RANLIB"; then
3171   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3172 else
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181 break
3182 done
3183
3184 fi
3185 fi
3186 RANLIB=$ac_cv_prog_RANLIB
3187 if test -n "$RANLIB"; then
3188   echo "$as_me:3188: result: $RANLIB" >&5
3189 echo "${ECHO_T}$RANLIB" >&6
3190 else
3191   echo "$as_me:3191: result: no" >&5
3192 echo "${ECHO_T}no" >&6
3193 fi
3194
3195 fi
3196 if test -z "$ac_cv_prog_RANLIB"; then
3197   ac_ct_RANLIB=$RANLIB
3198   # Extract the first word of "ranlib", so it can be a program name with args.
3199 set dummy ranlib; ac_word=$2
3200 echo "$as_me:3200: checking for $ac_word" >&5
3201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3202 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3203   echo $ECHO_N "(cached) $ECHO_C" >&6
3204 else
3205   if test -n "$ac_ct_RANLIB"; then
3206   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3207 else
3208   ac_save_IFS=$IFS; IFS=$ac_path_separator
3209 ac_dummy="$PATH"
3210 for ac_dir in $ac_dummy; do
3211   IFS=$ac_save_IFS
3212   test -z "$ac_dir" && ac_dir=.
3213   $as_executable_p "$ac_dir/$ac_word" || continue
3214 ac_cv_prog_ac_ct_RANLIB="ranlib"
3215 echo "$as_me:3215: found $ac_dir/$ac_word" >&5
3216 break
3217 done
3218
3219   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3220 fi
3221 fi
3222 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3223 if test -n "$ac_ct_RANLIB"; then
3224   echo "$as_me:3224: result: $ac_ct_RANLIB" >&5
3225 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3226 else
3227   echo "$as_me:3227: result: no" >&5
3228 echo "${ECHO_T}no" >&6
3229 fi
3230
3231   RANLIB=$ac_ct_RANLIB
3232 else
3233   RANLIB="$ac_cv_prog_RANLIB"
3234 fi
3235
3236 if test -n "$ac_tool_prefix"; then
3237   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3238 set dummy ${ac_tool_prefix}ld; ac_word=$2
3239 echo "$as_me:3239: checking for $ac_word" >&5
3240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3241 if test "${ac_cv_prog_LD+set}" = set; then
3242   echo $ECHO_N "(cached) $ECHO_C" >&6
3243 else
3244   if test -n "$LD"; then
3245   ac_cv_prog_LD="$LD" # Let the user override the test.
3246 else
3247   ac_save_IFS=$IFS; IFS=$ac_path_separator
3248 ac_dummy="$PATH"
3249 for ac_dir in $ac_dummy; do
3250   IFS=$ac_save_IFS
3251   test -z "$ac_dir" && ac_dir=.
3252   $as_executable_p "$ac_dir/$ac_word" || continue
3253 ac_cv_prog_LD="${ac_tool_prefix}ld"
3254 echo "$as_me:3254: found $ac_dir/$ac_word" >&5
3255 break
3256 done
3257
3258 fi
3259 fi
3260 LD=$ac_cv_prog_LD
3261 if test -n "$LD"; then
3262   echo "$as_me:3262: result: $LD" >&5
3263 echo "${ECHO_T}$LD" >&6
3264 else
3265   echo "$as_me:3265: result: no" >&5
3266 echo "${ECHO_T}no" >&6
3267 fi
3268
3269 fi
3270 if test -z "$ac_cv_prog_LD"; then
3271   ac_ct_LD=$LD
3272   # Extract the first word of "ld", so it can be a program name with args.
3273 set dummy ld; ac_word=$2
3274 echo "$as_me:3274: checking for $ac_word" >&5
3275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279   if test -n "$ac_ct_LD"; then
3280   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3281 else
3282   ac_save_IFS=$IFS; IFS=$ac_path_separator
3283 ac_dummy="$PATH"
3284 for ac_dir in $ac_dummy; do
3285   IFS=$ac_save_IFS
3286   test -z "$ac_dir" && ac_dir=.
3287   $as_executable_p "$ac_dir/$ac_word" || continue
3288 ac_cv_prog_ac_ct_LD="ld"
3289 echo "$as_me:3289: found $ac_dir/$ac_word" >&5
3290 break
3291 done
3292
3293   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3294 fi
3295 fi
3296 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3297 if test -n "$ac_ct_LD"; then
3298   echo "$as_me:3298: result: $ac_ct_LD" >&5
3299 echo "${ECHO_T}$ac_ct_LD" >&6
3300 else
3301   echo "$as_me:3301: result: no" >&5
3302 echo "${ECHO_T}no" >&6
3303 fi
3304
3305   LD=$ac_ct_LD
3306 else
3307   LD="$ac_cv_prog_LD"
3308 fi
3309
3310 if test -n "$ac_tool_prefix"; then
3311   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3312 set dummy ${ac_tool_prefix}ar; ac_word=$2
3313 echo "$as_me:3313: checking for $ac_word" >&5
3314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3315 if test "${ac_cv_prog_AR+set}" = set; then
3316   echo $ECHO_N "(cached) $ECHO_C" >&6
3317 else
3318   if test -n "$AR"; then
3319   ac_cv_prog_AR="$AR" # Let the user override the test.
3320 else
3321   ac_save_IFS=$IFS; IFS=$ac_path_separator
3322 ac_dummy="$PATH"
3323 for ac_dir in $ac_dummy; do
3324   IFS=$ac_save_IFS
3325   test -z "$ac_dir" && ac_dir=.
3326   $as_executable_p "$ac_dir/$ac_word" || continue
3327 ac_cv_prog_AR="${ac_tool_prefix}ar"
3328 echo "$as_me:3328: found $ac_dir/$ac_word" >&5
3329 break
3330 done
3331
3332 fi
3333 fi
3334 AR=$ac_cv_prog_AR
3335 if test -n "$AR"; then
3336   echo "$as_me:3336: result: $AR" >&5
3337 echo "${ECHO_T}$AR" >&6
3338 else
3339   echo "$as_me:3339: result: no" >&5
3340 echo "${ECHO_T}no" >&6
3341 fi
3342
3343 fi
3344 if test -z "$ac_cv_prog_AR"; then
3345   ac_ct_AR=$AR
3346   # Extract the first word of "ar", so it can be a program name with args.
3347 set dummy ar; ac_word=$2
3348 echo "$as_me:3348: checking for $ac_word" >&5
3349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3351   echo $ECHO_N "(cached) $ECHO_C" >&6
3352 else
3353   if test -n "$ac_ct_AR"; then
3354   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3355 else
3356   ac_save_IFS=$IFS; IFS=$ac_path_separator
3357 ac_dummy="$PATH"
3358 for ac_dir in $ac_dummy; do
3359   IFS=$ac_save_IFS
3360   test -z "$ac_dir" && ac_dir=.
3361   $as_executable_p "$ac_dir/$ac_word" || continue
3362 ac_cv_prog_ac_ct_AR="ar"
3363 echo "$as_me:3363: found $ac_dir/$ac_word" >&5
3364 break
3365 done
3366
3367   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3368 fi
3369 fi
3370 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3371 if test -n "$ac_ct_AR"; then
3372   echo "$as_me:3372: result: $ac_ct_AR" >&5
3373 echo "${ECHO_T}$ac_ct_AR" >&6
3374 else
3375   echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3377 fi
3378
3379   AR=$ac_ct_AR
3380 else
3381   AR="$ac_cv_prog_AR"
3382 fi
3383
3384 if test -n "$ac_tool_prefix"; then
3385   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3386 set dummy ${ac_tool_prefix}ar; ac_word=$2
3387 echo "$as_me:3387: checking for $ac_word" >&5
3388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3389 if test "${ac_cv_prog_AR+set}" = set; then
3390   echo $ECHO_N "(cached) $ECHO_C" >&6
3391 else
3392   if test -n "$AR"; then
3393   ac_cv_prog_AR="$AR" # Let the user override the test.
3394 else
3395   ac_save_IFS=$IFS; IFS=$ac_path_separator
3396 ac_dummy="$PATH"
3397 for ac_dir in $ac_dummy; do
3398   IFS=$ac_save_IFS
3399   test -z "$ac_dir" && ac_dir=.
3400   $as_executable_p "$ac_dir/$ac_word" || continue
3401 ac_cv_prog_AR="${ac_tool_prefix}ar"
3402 echo "$as_me:3402: found $ac_dir/$ac_word" >&5
3403 break
3404 done
3405
3406 fi
3407 fi
3408 AR=$ac_cv_prog_AR
3409 if test -n "$AR"; then
3410   echo "$as_me:3410: result: $AR" >&5
3411 echo "${ECHO_T}$AR" >&6
3412 else
3413   echo "$as_me:3413: result: no" >&5
3414 echo "${ECHO_T}no" >&6
3415 fi
3416
3417 fi
3418 if test -z "$ac_cv_prog_AR"; then
3419   ac_ct_AR=$AR
3420   # Extract the first word of "ar", so it can be a program name with args.
3421 set dummy ar; ac_word=$2
3422 echo "$as_me:3422: checking for $ac_word" >&5
3423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3424 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3425   echo $ECHO_N "(cached) $ECHO_C" >&6
3426 else
3427   if test -n "$ac_ct_AR"; then
3428   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3429 else
3430   ac_save_IFS=$IFS; IFS=$ac_path_separator
3431 ac_dummy="$PATH"
3432 for ac_dir in $ac_dummy; do
3433   IFS=$ac_save_IFS
3434   test -z "$ac_dir" && ac_dir=.
3435   $as_executable_p "$ac_dir/$ac_word" || continue
3436 ac_cv_prog_ac_ct_AR="ar"
3437 echo "$as_me:3437: found $ac_dir/$ac_word" >&5
3438 break
3439 done
3440
3441   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3442 fi
3443 fi
3444 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3445 if test -n "$ac_ct_AR"; then
3446   echo "$as_me:3446: result: $ac_ct_AR" >&5
3447 echo "${ECHO_T}$ac_ct_AR" >&6
3448 else
3449   echo "$as_me:3449: result: no" >&5
3450 echo "${ECHO_T}no" >&6
3451 fi
3452
3453   AR=$ac_ct_AR
3454 else
3455   AR="$ac_cv_prog_AR"
3456 fi
3457
3458 echo "$as_me:3458: checking for options to update archives" >&5
3459 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3460 if test "${cf_cv_ar_flags+set}" = set; then
3461   echo $ECHO_N "(cached) $ECHO_C" >&6
3462 else
3463
3464         cf_cv_ar_flags=unknown
3465         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3466         do
3467
3468                 # check if $ARFLAGS already contains this choice
3469                 if test "x$ARFLAGS" != "x" ; then
3470                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3471                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3472                                 cf_cv_ar_flags=
3473                                 break
3474                         fi
3475                 fi
3476
3477                 rm -f conftest.$ac_cv_objext
3478                 rm -f conftest.a
3479
3480                 cat >conftest.$ac_ext <<EOF
3481 #line 3481 "configure"
3482 int     testdata[3] = { 123, 456, 789 };
3483 EOF
3484                 if { (eval echo "$as_me:3484: \"$ac_compile\"") >&5
3485   (eval $ac_compile) 2>&5
3486   ac_status=$?
3487   echo "$as_me:3487: \$? = $ac_status" >&5
3488   (exit $ac_status); } ; then
3489                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3490                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3491                         if test -f conftest.a ; then
3492                                 cf_cv_ar_flags=$cf_ar_flags
3493                                 break
3494                         fi
3495                 else
3496                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3497
3498 echo "${as_me:-configure}:3498: testing cannot compile test-program ..." 1>&5
3499
3500                         break
3501                 fi
3502         done
3503         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3504
3505 fi
3506 echo "$as_me:3506: result: $cf_cv_ar_flags" >&5
3507 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3508
3509 if test -n "$ARFLAGS" ; then
3510         if test -n "$cf_cv_ar_flags" ; then
3511                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3512         fi
3513 else
3514         ARFLAGS=$cf_cv_ar_flags
3515 fi
3516
3517 echo "$as_me:3517: checking if you have specified an install-prefix" >&5
3518 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3519
3520 # Check whether --with-install-prefix or --without-install-prefix was given.
3521 if test "${with_install_prefix+set}" = set; then
3522   withval="$with_install_prefix"
3523   case "$withval" in #(vi
3524         yes|no) #(vi
3525                 ;;
3526         *)      DESTDIR="$withval"
3527                 ;;
3528         esac
3529 fi;
3530 echo "$as_me:3530: result: $DESTDIR" >&5
3531 echo "${ECHO_T}$DESTDIR" >&6
3532
3533 ###############################################################################
3534
3535 # If we're cross-compiling, allow the user to override the tools and their
3536 # options.  The configure script is oriented toward identifying the host
3537 # compiler, etc., but we need a build compiler to generate parts of the source.
3538
3539 if test "$cross_compiling" = yes ; then
3540
3541         # defaults that we might want to override
3542         : ${BUILD_CFLAGS:=''}
3543         : ${BUILD_CPPFLAGS:=''}
3544         : ${BUILD_LDFLAGS:=''}
3545         : ${BUILD_LIBS:=''}
3546         : ${BUILD_EXEEXT:='$x'}
3547         : ${BUILD_OBJEXT:='o'}
3548
3549 # Check whether --with-build-cc or --without-build-cc was given.
3550 if test "${with_build_cc+set}" = set; then
3551   withval="$with_build_cc"
3552   BUILD_CC="$withval"
3553 else
3554   for ac_prog in gcc cc cl
3555 do
3556   # Extract the first word of "$ac_prog", so it can be a program name with args.
3557 set dummy $ac_prog; ac_word=$2
3558 echo "$as_me:3558: checking for $ac_word" >&5
3559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3560 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563   if test -n "$BUILD_CC"; then
3564   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3565 else
3566   ac_save_IFS=$IFS; IFS=$ac_path_separator
3567 ac_dummy="$PATH"
3568 for ac_dir in $ac_dummy; do
3569   IFS=$ac_save_IFS
3570   test -z "$ac_dir" && ac_dir=.
3571   $as_executable_p "$ac_dir/$ac_word" || continue
3572 ac_cv_prog_BUILD_CC="$ac_prog"
3573 echo "$as_me:3573: found $ac_dir/$ac_word" >&5
3574 break
3575 done
3576
3577 fi
3578 fi
3579 BUILD_CC=$ac_cv_prog_BUILD_CC
3580 if test -n "$BUILD_CC"; then
3581   echo "$as_me:3581: result: $BUILD_CC" >&5
3582 echo "${ECHO_T}$BUILD_CC" >&6
3583 else
3584   echo "$as_me:3584: result: no" >&5
3585 echo "${ECHO_T}no" >&6
3586 fi
3587
3588   test -n "$BUILD_CC" && break
3589 done
3590
3591 fi;
3592         echo "$as_me:3592: checking for native build C compiler" >&5
3593 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3594         echo "$as_me:3594: result: $BUILD_CC" >&5
3595 echo "${ECHO_T}$BUILD_CC" >&6
3596
3597         echo "$as_me:3597: checking for native build C preprocessor" >&5
3598 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3599
3600 # Check whether --with-build-cpp or --without-build-cpp was given.
3601 if test "${with_build_cpp+set}" = set; then
3602   withval="$with_build_cpp"
3603   BUILD_CPP="$withval"
3604 else
3605   BUILD_CPP='${BUILD_CC} -E'
3606 fi;
3607         echo "$as_me:3607: result: $BUILD_CPP" >&5
3608 echo "${ECHO_T}$BUILD_CPP" >&6
3609
3610         echo "$as_me:3610: checking for native build C flags" >&5
3611 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3612
3613 # Check whether --with-build-cflags or --without-build-cflags was given.
3614 if test "${with_build_cflags+set}" = set; then
3615   withval="$with_build_cflags"
3616   BUILD_CFLAGS="$withval"
3617 fi;
3618         echo "$as_me:3618: result: $BUILD_CFLAGS" >&5
3619 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3620
3621         echo "$as_me:3621: checking for native build C preprocessor-flags" >&5
3622 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3623
3624 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3625 if test "${with_build_cppflags+set}" = set; then
3626   withval="$with_build_cppflags"
3627   BUILD_CPPFLAGS="$withval"
3628 fi;
3629         echo "$as_me:3629: result: $BUILD_CPPFLAGS" >&5
3630 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3631
3632         echo "$as_me:3632: checking for native build linker-flags" >&5
3633 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3634
3635 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3636 if test "${with_build_ldflags+set}" = set; then
3637   withval="$with_build_ldflags"
3638   BUILD_LDFLAGS="$withval"
3639 fi;
3640         echo "$as_me:3640: result: $BUILD_LDFLAGS" >&5
3641 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3642
3643         echo "$as_me:3643: checking for native build linker-libraries" >&5
3644 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3645
3646 # Check whether --with-build-libs or --without-build-libs was given.
3647 if test "${with_build_libs+set}" = set; then
3648   withval="$with_build_libs"
3649   BUILD_LIBS="$withval"
3650 fi;
3651         echo "$as_me:3651: result: $BUILD_LIBS" >&5
3652 echo "${ECHO_T}$BUILD_LIBS" >&6
3653
3654         # this assumes we're on Unix.
3655         BUILD_EXEEXT=
3656         BUILD_OBJEXT=o
3657
3658         : ${BUILD_CC:='${CC}'}
3659
3660         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3661                 { { echo "$as_me:3661: error: Cross-build requires two compilers.
3662 Use --with-build-cc to specify the native compiler." >&5
3663 echo "$as_me: error: Cross-build requires two compilers.
3664 Use --with-build-cc to specify the native compiler." >&2;}
3665    { (exit 1); exit 1; }; }
3666         fi
3667
3668 else
3669         : ${BUILD_CC:='${CC}'}
3670         : ${BUILD_CPP:='${CPP}'}
3671         : ${BUILD_CFLAGS:='${CFLAGS}'}
3672         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3673         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3674         : ${BUILD_LIBS:='${LIBS}'}
3675         : ${BUILD_EXEEXT:='$x'}
3676         : ${BUILD_OBJEXT:='o'}
3677 fi
3678
3679 ###############################################################################
3680
3681 ### Options to allow the user to specify the set of libraries which are used.
3682 ### Use "--without-normal --with-shared" to allow the default model to be
3683 ### shared, for example.
3684 cf_list_models=""
3685
3686 echo "$as_me:3686: checking if you want to build shared C-objects" >&5
3687 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3688
3689 # Check whether --with-shared or --without-shared was given.
3690 if test "${with_shared+set}" = set; then
3691   withval="$with_shared"
3692   with_shared=$withval
3693 else
3694   with_shared=no
3695 fi;
3696 echo "$as_me:3696: result: $with_shared" >&5
3697 echo "${ECHO_T}$with_shared" >&6
3698 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3699
3700 echo "$as_me:3700: checking for specified models" >&5
3701 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3702 test -z "$cf_list_models" && cf_list_models=normal
3703 echo "$as_me:3703: result: $cf_list_models" >&5
3704 echo "${ECHO_T}$cf_list_models" >&6
3705
3706 ### Use the first model as the default, and save its suffix for use in building
3707 ### up test-applications.
3708 echo "$as_me:3708: checking for default model" >&5
3709 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3710 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3711 echo "$as_me:3711: result: $DFT_LWR_MODEL" >&5
3712 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3713
3714 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3715
3716 echo "$as_me:3716: checking for specific curses-directory" >&5
3717 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3718
3719 # Check whether --with-curses-dir or --without-curses-dir was given.
3720 if test "${with_curses_dir+set}" = set; then
3721   withval="$with_curses_dir"
3722   cf_cv_curses_dir=$withval
3723 else
3724   cf_cv_curses_dir=no
3725 fi;
3726 echo "$as_me:3726: result: $cf_cv_curses_dir" >&5
3727 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3728
3729 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3730 then
3731
3732 if test "x$prefix" != xNONE; then
3733   cf_path_syntax="$prefix"
3734 else
3735   cf_path_syntax="$ac_default_prefix"
3736 fi
3737
3738 case ".$withval" in #(vi
3739 .\$\(*\)*|.\'*\'*) #(vi
3740   ;;
3741 ..|./*|.\\*) #(vi
3742   ;;
3743 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3744   ;;
3745 .\${*prefix}*) #(vi
3746   eval withval="$withval"
3747   case ".$withval" in #(vi
3748   .NONE/*)
3749     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3750     ;;
3751   esac
3752   ;; #(vi
3753 .no|.NONE/*)
3754   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3755   ;;
3756 *)
3757   { { echo "$as_me:3757: error: expected a pathname, not \"$withval\"" >&5
3758 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3759    { (exit 1); exit 1; }; }
3760   ;;
3761 esac
3762
3763         if test -d "$cf_cv_curses_dir"
3764         then
3765
3766 if test -n "$cf_cv_curses_dir/include" ; then
3767   for cf_add_incdir in $cf_cv_curses_dir/include
3768   do
3769         while test $cf_add_incdir != /usr/include
3770         do
3771           if test -d $cf_add_incdir
3772           then
3773                 cf_have_incdir=no
3774                 if test -n "$CFLAGS$CPPFLAGS" ; then
3775                   # a loop is needed to ensure we can add subdirs of existing dirs
3776                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3777                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3778                           cf_have_incdir=yes; break
3779                         fi
3780                   done
3781                 fi
3782
3783                 if test "$cf_have_incdir" = no ; then
3784                   if test "$cf_add_incdir" = /usr/local/include ; then
3785                         if test "$GCC" = yes
3786                         then
3787                           cf_save_CPPFLAGS=$CPPFLAGS
3788                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3789                           cat >conftest.$ac_ext <<_ACEOF
3790 #line 3790 "configure"
3791 #include "confdefs.h"
3792 #include <stdio.h>
3793 int
3794 main ()
3795 {
3796 printf("Hello")
3797   ;
3798   return 0;
3799 }
3800 _ACEOF
3801 rm -f conftest.$ac_objext
3802 if { (eval echo "$as_me:3802: \"$ac_compile\"") >&5
3803   (eval $ac_compile) 2>&5
3804   ac_status=$?
3805   echo "$as_me:3805: \$? = $ac_status" >&5
3806   (exit $ac_status); } &&
3807          { ac_try='test -s conftest.$ac_objext'
3808   { (eval echo "$as_me:3808: \"$ac_try\"") >&5
3809   (eval $ac_try) 2>&5
3810   ac_status=$?
3811   echo "$as_me:3811: \$? = $ac_status" >&5
3812   (exit $ac_status); }; }; then
3813   :
3814 else
3815   echo "$as_me: failed program was:" >&5
3816 cat conftest.$ac_ext >&5
3817 cf_have_incdir=yes
3818 fi
3819 rm -f conftest.$ac_objext conftest.$ac_ext
3820                           CPPFLAGS=$cf_save_CPPFLAGS
3821                         fi
3822                   fi
3823                 fi
3824
3825                 if test "$cf_have_incdir" = no ; then
3826                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
3827
3828 echo "${as_me:-configure}:3828: testing adding $cf_add_incdir to include-path ..." 1>&5
3829
3830                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3831
3832                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3833                   test "$cf_top_incdir" = "$cf_add_incdir" && break
3834                   cf_add_incdir="$cf_top_incdir"
3835                 else
3836                   break
3837                 fi
3838           fi
3839         done
3840   done
3841 fi
3842
3843 if test -n "$cf_cv_curses_dir/lib" ; then
3844   for cf_add_libdir in $cf_cv_curses_dir/lib
3845   do
3846     if test $cf_add_libdir = /usr/lib ; then
3847       :
3848     elif test -d $cf_add_libdir
3849     then
3850       cf_have_libdir=no
3851       if test -n "$LDFLAGS$LIBS" ; then
3852         # a loop is needed to ensure we can add subdirs of existing dirs
3853         for cf_test_libdir in $LDFLAGS $LIBS ; do
3854           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3855             cf_have_libdir=yes; break
3856           fi
3857         done
3858       fi
3859       if test "$cf_have_libdir" = no ; then
3860         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
3861
3862 echo "${as_me:-configure}:3862: testing adding $cf_add_libdir to library-path ..." 1>&5
3863
3864         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3865       fi
3866     fi
3867   done
3868 fi
3869
3870         fi
3871 fi
3872
3873 echo "$as_me:3873: checking if you want wide-character code" >&5
3874 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3875
3876 # Check whether --enable-widec or --disable-widec was given.
3877 if test "${enable_widec+set}" = set; then
3878   enableval="$enable_widec"
3879   with_widec=$enableval
3880 else
3881   with_widec=no
3882 fi;
3883 echo "$as_me:3883: result: $with_widec" >&5
3884 echo "${ECHO_T}$with_widec" >&6
3885 if test "$with_widec" = yes ; then
3886
3887 echo "$as_me:3887: checking for multibyte character support" >&5
3888 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3889 if test "${cf_cv_utf8_lib+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892
3893         cf_save_LIBS="$LIBS"
3894         cat >conftest.$ac_ext <<_ACEOF
3895 #line 3895 "configure"
3896 #include "confdefs.h"
3897
3898 #include <stdlib.h>
3899 int
3900 main ()
3901 {
3902 putwc(0,0);
3903   ;
3904   return 0;
3905 }
3906 _ACEOF
3907 rm -f conftest.$ac_objext conftest$ac_exeext
3908 if { (eval echo "$as_me:3908: \"$ac_link\"") >&5
3909   (eval $ac_link) 2>&5
3910   ac_status=$?
3911   echo "$as_me:3911: \$? = $ac_status" >&5
3912   (exit $ac_status); } &&
3913          { ac_try='test -s conftest$ac_exeext'
3914   { (eval echo "$as_me:3914: \"$ac_try\"") >&5
3915   (eval $ac_try) 2>&5
3916   ac_status=$?
3917   echo "$as_me:3917: \$? = $ac_status" >&5
3918   (exit $ac_status); }; }; then
3919   cf_cv_utf8_lib=yes
3920 else
3921   echo "$as_me: failed program was:" >&5
3922 cat conftest.$ac_ext >&5
3923
3924 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3925 # will be set on completion of the AC_TRY_LINK below.
3926 cf_cv_header_path_utf8=
3927 cf_cv_library_path_utf8=
3928
3929 echo "${as_me:-configure}:3929: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3930
3931 cf_save_LIBS="$LIBS"
3932
3933 cat >conftest.$ac_ext <<_ACEOF
3934 #line 3934 "configure"
3935 #include "confdefs.h"
3936
3937 #include <libutf8.h>
3938 int
3939 main ()
3940 {
3941 putwc(0,0);
3942   ;
3943   return 0;
3944 }
3945 _ACEOF
3946 rm -f conftest.$ac_objext conftest$ac_exeext
3947 if { (eval echo "$as_me:3947: \"$ac_link\"") >&5
3948   (eval $ac_link) 2>&5
3949   ac_status=$?
3950   echo "$as_me:3950: \$? = $ac_status" >&5
3951   (exit $ac_status); } &&
3952          { ac_try='test -s conftest$ac_exeext'
3953   { (eval echo "$as_me:3953: \"$ac_try\"") >&5
3954   (eval $ac_try) 2>&5
3955   ac_status=$?
3956   echo "$as_me:3956: \$? = $ac_status" >&5
3957   (exit $ac_status); }; }; then
3958
3959         cf_cv_find_linkage_utf8=yes
3960         cf_cv_header_path_utf8=/usr/include
3961         cf_cv_library_path_utf8=/usr/lib
3962
3963 else
3964   echo "$as_me: failed program was:" >&5
3965 cat conftest.$ac_ext >&5
3966
3967 LIBS="-lutf8  $cf_save_LIBS"
3968
3969 cat >conftest.$ac_ext <<_ACEOF
3970 #line 3970 "configure"
3971 #include "confdefs.h"
3972
3973 #include <libutf8.h>
3974 int
3975 main ()
3976 {
3977 putwc(0,0);
3978   ;
3979   return 0;
3980 }
3981 _ACEOF
3982 rm -f conftest.$ac_objext conftest$ac_exeext
3983 if { (eval echo "$as_me:3983: \"$ac_link\"") >&5
3984   (eval $ac_link) 2>&5
3985   ac_status=$?
3986   echo "$as_me:3986: \$? = $ac_status" >&5
3987   (exit $ac_status); } &&
3988          { ac_try='test -s conftest$ac_exeext'
3989   { (eval echo "$as_me:3989: \"$ac_try\"") >&5
3990   (eval $ac_try) 2>&5
3991   ac_status=$?
3992   echo "$as_me:3992: \$? = $ac_status" >&5
3993   (exit $ac_status); }; }; then
3994
3995         cf_cv_find_linkage_utf8=yes
3996         cf_cv_header_path_utf8=/usr/include
3997         cf_cv_library_path_utf8=/usr/lib
3998         cf_cv_library_file_utf8="-lutf8"
3999
4000 else
4001   echo "$as_me: failed program was:" >&5
4002 cat conftest.$ac_ext >&5
4003
4004         cf_cv_find_linkage_utf8=no
4005         LIBS="$cf_save_LIBS"
4006
4007     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
4008
4009 echo "${as_me:-configure}:4009: testing find linkage for utf8 library ..." 1>&5
4010
4011 echo "${as_me:-configure}:4011: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4012
4013     cf_save_CPPFLAGS="$CPPFLAGS"
4014     cf_test_CPPFLAGS="$CPPFLAGS"
4015
4016 cf_search=
4017
4018 # collect the current set of include-directories from compiler flags
4019 cf_header_path_list=""
4020 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4021         for cf_header_path in $CPPFLAGS $CFLAGS
4022         do
4023                 case $cf_header_path in #(vi
4024                 -I*)
4025                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4026
4027 test "$cf_header_path" != "NONE" && \
4028 test -d "$cf_header_path" && \
4029  {
4030         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4031         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4032         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
4033         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
4034         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
4035         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4036 }
4037
4038                         cf_header_path_list="$cf_header_path_list $cf_search"
4039                         ;;
4040                 esac
4041         done
4042 fi
4043
4044 # add the variations for the package we are looking for
4045
4046 cf_search=
4047
4048 test "/usr" != "$prefix" && \
4049 test -d "/usr" && \
4050 (test $prefix = NONE || test "/usr" != "$prefix") && {
4051         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4052         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4053         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
4054         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
4055         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
4056         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
4057 }
4058
4059 test "$prefix" != "NONE" && \
4060 test -d "$prefix" && \
4061  {
4062         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4063         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4064         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
4065         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
4066         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
4067         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
4068 }
4069
4070 test "/usr/local" != "$prefix" && \
4071 test -d "/usr/local" && \
4072 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4073         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4074         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4075         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
4076         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
4077         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
4078         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
4079 }
4080
4081 test "/opt" != "$prefix" && \
4082 test -d "/opt" && \
4083 (test $prefix = NONE || test "/opt" != "$prefix") && {
4084         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4085         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4086         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
4087         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
4088         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
4089         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
4090 }
4091
4092 test "$HOME" != "$prefix" && \
4093 test -d "$HOME" && \
4094 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4095         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4096         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4097         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
4098         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
4099         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
4100         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
4101 }
4102
4103 test "$includedir" != NONE && \
4104 test "$includedir" != "/usr/include" && \
4105 test -d "$includedir" && {
4106         test -d $includedir &&    cf_search="$cf_search $includedir"
4107         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4108 }
4109
4110 test "$oldincludedir" != NONE && \
4111 test "$oldincludedir" != "/usr/include" && \
4112 test -d "$oldincludedir" && {
4113         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4114         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4115 }
4116
4117 cf_search="$cf_search $cf_header_path_list"
4118
4119     for cf_cv_header_path_utf8 in $cf_search
4120     do
4121       if test -d $cf_cv_header_path_utf8 ; then
4122         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
4123
4124 echo "${as_me:-configure}:4124: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4125
4126         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4127         cat >conftest.$ac_ext <<_ACEOF
4128 #line 4128 "configure"
4129 #include "confdefs.h"
4130
4131 #include <libutf8.h>
4132 int
4133 main ()
4134 {
4135 putwc(0,0);
4136   ;
4137   return 0;
4138 }
4139 _ACEOF
4140 rm -f conftest.$ac_objext
4141 if { (eval echo "$as_me:4141: \"$ac_compile\"") >&5
4142   (eval $ac_compile) 2>&5
4143   ac_status=$?
4144   echo "$as_me:4144: \$? = $ac_status" >&5
4145   (exit $ac_status); } &&
4146          { ac_try='test -s conftest.$ac_objext'
4147   { (eval echo "$as_me:4147: \"$ac_try\"") >&5
4148   (eval $ac_try) 2>&5
4149   ac_status=$?
4150   echo "$as_me:4150: \$? = $ac_status" >&5
4151   (exit $ac_status); }; }; then
4152
4153             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4154
4155 echo "${as_me:-configure}:4155: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4156
4157             cf_cv_find_linkage_utf8=maybe
4158             cf_test_CPPFLAGS="$CPPFLAGS"
4159             break
4160 else
4161   echo "$as_me: failed program was:" >&5
4162 cat conftest.$ac_ext >&5
4163
4164             CPPFLAGS="$cf_save_CPPFLAGS"
4165
4166 fi
4167 rm -f conftest.$ac_objext conftest.$ac_ext
4168       fi
4169     done
4170
4171     if test "$cf_cv_find_linkage_utf8" = maybe ; then
4172
4173 echo "${as_me:-configure}:4173: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4174
4175       cf_save_LIBS="$LIBS"
4176       cf_save_LDFLAGS="$LDFLAGS"
4177
4178       if test "$cf_cv_find_linkage_utf8" != yes ; then
4179
4180 cf_search=
4181 cf_library_path_list=""
4182 if test -n "${LDFLAGS}${LIBS}" ; then
4183         for cf_library_path in $LDFLAGS $LIBS
4184         do
4185                 case $cf_library_path in #(vi
4186                 -L*)
4187                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4188
4189 test "$cf_library_path" != "NONE" && \
4190 test -d "$cf_library_path" && \
4191  {
4192         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
4193         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
4194         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
4195         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4196         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
4197         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4198 }
4199
4200                         cf_library_path_list="$cf_library_path_list $cf_search"
4201                         ;;
4202                 esac
4203         done
4204 fi
4205
4206 cf_search=
4207
4208 test "/usr" != "$prefix" && \
4209 test -d "/usr" && \
4210 (test $prefix = NONE || test "/usr" != "$prefix") && {
4211         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
4212         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4213         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4214         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4215         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4216         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4217 }
4218
4219 test "$prefix" != "NONE" && \
4220 test -d "$prefix" && \
4221  {
4222         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4223         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4224         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4225         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4226         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4227         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4228 }
4229
4230 test "/usr/local" != "$prefix" && \
4231 test -d "/usr/local" && \
4232 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4233         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4234         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4235         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4236         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4237         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4238         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4239 }
4240
4241 test "/opt" != "$prefix" && \
4242 test -d "/opt" && \
4243 (test $prefix = NONE || test "/opt" != "$prefix") && {
4244         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4245         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4246         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4247         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4248         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4249         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4250 }
4251
4252 test "$HOME" != "$prefix" && \
4253 test -d "$HOME" && \
4254 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4255         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4256         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4257         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4258         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4259         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4260         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4261 }
4262
4263 cf_search="$cf_library_path_list $cf_search"
4264
4265         for cf_cv_library_path_utf8 in $cf_search
4266         do
4267           if test -d $cf_cv_library_path_utf8 ; then
4268             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4269
4270 echo "${as_me:-configure}:4270: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4271
4272             CPPFLAGS="$cf_test_CPPFLAGS"
4273             LIBS="-lutf8  $cf_save_LIBS"
4274             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4275             cat >conftest.$ac_ext <<_ACEOF
4276 #line 4276 "configure"
4277 #include "confdefs.h"
4278
4279 #include <libutf8.h>
4280 int
4281 main ()
4282 {
4283 putwc(0,0);
4284   ;
4285   return 0;
4286 }
4287 _ACEOF
4288 rm -f conftest.$ac_objext conftest$ac_exeext
4289 if { (eval echo "$as_me:4289: \"$ac_link\"") >&5
4290   (eval $ac_link) 2>&5
4291   ac_status=$?
4292   echo "$as_me:4292: \$? = $ac_status" >&5
4293   (exit $ac_status); } &&
4294          { ac_try='test -s conftest$ac_exeext'
4295   { (eval echo "$as_me:4295: \"$ac_try\"") >&5
4296   (eval $ac_try) 2>&5
4297   ac_status=$?
4298   echo "$as_me:4298: \$? = $ac_status" >&5
4299   (exit $ac_status); }; }; then
4300
4301                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4302
4303 echo "${as_me:-configure}:4303: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4304
4305                 cf_cv_find_linkage_utf8=yes
4306                 cf_cv_library_file_utf8="-lutf8"
4307                 break
4308 else
4309   echo "$as_me: failed program was:" >&5
4310 cat conftest.$ac_ext >&5
4311
4312                 CPPFLAGS="$cf_save_CPPFLAGS"
4313                 LIBS="$cf_save_LIBS"
4314                 LDFLAGS="$cf_save_LDFLAGS"
4315
4316 fi
4317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4318           fi
4319         done
4320         CPPFLAGS="$cf_save_CPPFLAGS"
4321         LDFLAGS="$cf_save_LDFLAGS"
4322       fi
4323
4324     else
4325       cf_cv_find_linkage_utf8=no
4326     fi
4327
4328 fi
4329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4330
4331 fi
4332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4333
4334 LIBS="$cf_save_LIBS"
4335
4336 if test "$cf_cv_find_linkage_utf8" = yes ; then
4337 cf_cv_utf8_lib=add-on
4338 else
4339 cf_cv_utf8_lib=no
4340 fi
4341
4342 fi
4343 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4344 fi
4345 echo "$as_me:4345: result: $cf_cv_utf8_lib" >&5
4346 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4347
4348 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4349 # ncurses/ncursesw:
4350 if test "$cf_cv_utf8_lib" = "add-on" ; then
4351         cat >>confdefs.h <<\EOF
4352 #define HAVE_LIBUTF8_H 1
4353 EOF
4354
4355 if test -n "$cf_cv_header_path_utf8" ; then
4356   for cf_add_incdir in $cf_cv_header_path_utf8
4357   do
4358         while test $cf_add_incdir != /usr/include
4359         do
4360           if test -d $cf_add_incdir
4361           then
4362                 cf_have_incdir=no
4363                 if test -n "$CFLAGS$CPPFLAGS" ; then
4364                   # a loop is needed to ensure we can add subdirs of existing dirs
4365                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4366                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4367                           cf_have_incdir=yes; break
4368                         fi
4369                   done
4370                 fi
4371
4372                 if test "$cf_have_incdir" = no ; then
4373                   if test "$cf_add_incdir" = /usr/local/include ; then
4374                         if test "$GCC" = yes
4375                         then
4376                           cf_save_CPPFLAGS=$CPPFLAGS
4377                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4378                           cat >conftest.$ac_ext <<_ACEOF
4379 #line 4379 "configure"
4380 #include "confdefs.h"
4381 #include <stdio.h>
4382 int
4383 main ()
4384 {
4385 printf("Hello")
4386   ;
4387   return 0;
4388 }
4389 _ACEOF
4390 rm -f conftest.$ac_objext
4391 if { (eval echo "$as_me:4391: \"$ac_compile\"") >&5
4392   (eval $ac_compile) 2>&5
4393   ac_status=$?
4394   echo "$as_me:4394: \$? = $ac_status" >&5
4395   (exit $ac_status); } &&
4396          { ac_try='test -s conftest.$ac_objext'
4397   { (eval echo "$as_me:4397: \"$ac_try\"") >&5
4398   (eval $ac_try) 2>&5
4399   ac_status=$?
4400   echo "$as_me:4400: \$? = $ac_status" >&5
4401   (exit $ac_status); }; }; then
4402   :
4403 else
4404   echo "$as_me: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 cf_have_incdir=yes
4407 fi
4408 rm -f conftest.$ac_objext conftest.$ac_ext
4409                           CPPFLAGS=$cf_save_CPPFLAGS
4410                         fi
4411                   fi
4412                 fi
4413
4414                 if test "$cf_have_incdir" = no ; then
4415                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4416
4417 echo "${as_me:-configure}:4417: testing adding $cf_add_incdir to include-path ..." 1>&5
4418
4419                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4420
4421                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4422                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4423                   cf_add_incdir="$cf_top_incdir"
4424                 else
4425                   break
4426                 fi
4427           fi
4428         done
4429   done
4430 fi
4431
4432 if test -n "$cf_cv_library_path_utf8" ; then
4433   for cf_add_libdir in $cf_cv_library_path_utf8
4434   do
4435     if test $cf_add_libdir = /usr/lib ; then
4436       :
4437     elif test -d $cf_add_libdir
4438     then
4439       cf_have_libdir=no
4440       if test -n "$LDFLAGS$LIBS" ; then
4441         # a loop is needed to ensure we can add subdirs of existing dirs
4442         for cf_test_libdir in $LDFLAGS $LIBS ; do
4443           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4444             cf_have_libdir=yes; break
4445           fi
4446         done
4447       fi
4448       if test "$cf_have_libdir" = no ; then
4449         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4450
4451 echo "${as_me:-configure}:4451: testing adding $cf_add_libdir to library-path ..." 1>&5
4452
4453         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4454       fi
4455     fi
4456   done
4457 fi
4458
4459         LIBS="$cf_cv_library_file_utf8 $LIBS"
4460 fi
4461
4462 cf_ncuconfig_root=ncursesw
4463
4464 echo "Looking for ${cf_ncuconfig_root}-config"
4465 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4466 do
4467   # Extract the first word of "$ac_prog", so it can be a program name with args.
4468 set dummy $ac_prog; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   case $NCURSES_CONFIG in
4475   [\\/]* | ?:[\\/]*)
4476   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4477   ;;
4478   *)
4479   ac_save_IFS=$IFS; IFS=$ac_path_separator
4480 ac_dummy="$PATH"
4481 for ac_dir in $ac_dummy; do
4482   IFS=$ac_save_IFS
4483   test -z "$ac_dir" && ac_dir=.
4484   if $as_executable_p "$ac_dir/$ac_word"; then
4485    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4486    echo "$as_me:4486: found $ac_dir/$ac_word" >&5
4487    break
4488 fi
4489 done
4490
4491   ;;
4492 esac
4493 fi
4494 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4495
4496 if test -n "$NCURSES_CONFIG"; then
4497   echo "$as_me:4497: result: $NCURSES_CONFIG" >&5
4498 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4499 else
4500   echo "$as_me:4500: result: no" >&5
4501 echo "${ECHO_T}no" >&6
4502 fi
4503
4504   test -n "$NCURSES_CONFIG" && break
4505 done
4506 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4507
4508 if test "$NCURSES_CONFIG" != none ; then
4509
4510 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4511 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4512
4513 # even with config script, some packages use no-override for curses.h
4514
4515 echo "$as_me:4515: checking if we have identified curses headers" >&5
4516 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4517 if test "${cf_cv_ncurses_header+set}" = set; then
4518   echo $ECHO_N "(cached) $ECHO_C" >&6
4519 else
4520
4521 cf_cv_ncurses_header=none
4522 for cf_header in  \
4523     ncursesw/ncurses.h \
4524         ncursesw/curses.h \
4525         ncurses.h \
4526         curses.h
4527 do
4528 cat >conftest.$ac_ext <<_ACEOF
4529 #line 4529 "configure"
4530 #include "confdefs.h"
4531 #include <${cf_header}>
4532 int
4533 main ()
4534 {
4535 initscr(); tgoto("?", 0,0)
4536   ;
4537   return 0;
4538 }
4539 _ACEOF
4540 rm -f conftest.$ac_objext
4541 if { (eval echo "$as_me:4541: \"$ac_compile\"") >&5
4542   (eval $ac_compile) 2>&5
4543   ac_status=$?
4544   echo "$as_me:4544: \$? = $ac_status" >&5
4545   (exit $ac_status); } &&
4546          { ac_try='test -s conftest.$ac_objext'
4547   { (eval echo "$as_me:4547: \"$ac_try\"") >&5
4548   (eval $ac_try) 2>&5
4549   ac_status=$?
4550   echo "$as_me:4550: \$? = $ac_status" >&5
4551   (exit $ac_status); }; }; then
4552   cf_cv_ncurses_header=$cf_header; break
4553 else
4554   echo "$as_me: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 fi
4557 rm -f conftest.$ac_objext conftest.$ac_ext
4558 done
4559
4560 fi
4561 echo "$as_me:4561: result: $cf_cv_ncurses_header" >&5
4562 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4563
4564 if test "$cf_cv_ncurses_header" = none ; then
4565         { { echo "$as_me:4565: error: No curses header-files found" >&5
4566 echo "$as_me: error: No curses header-files found" >&2;}
4567    { (exit 1); exit 1; }; }
4568 fi
4569
4570 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4571
4572 for ac_header in $cf_cv_ncurses_header
4573 do
4574 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4575 echo "$as_me:4575: checking for $ac_header" >&5
4576 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4577 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4578   echo $ECHO_N "(cached) $ECHO_C" >&6
4579 else
4580   cat >conftest.$ac_ext <<_ACEOF
4581 #line 4581 "configure"
4582 #include "confdefs.h"
4583 #include <$ac_header>
4584 _ACEOF
4585 if { (eval echo "$as_me:4585: \"$ac_cpp conftest.$ac_ext\"") >&5
4586   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4587   ac_status=$?
4588   egrep -v '^ *\+' conftest.er1 >conftest.err
4589   rm -f conftest.er1
4590   cat conftest.err >&5
4591   echo "$as_me:4591: \$? = $ac_status" >&5
4592   (exit $ac_status); } >/dev/null; then
4593   if test -s conftest.err; then
4594     ac_cpp_err=$ac_c_preproc_warn_flag
4595   else
4596     ac_cpp_err=
4597   fi
4598 else
4599   ac_cpp_err=yes
4600 fi
4601 if test -z "$ac_cpp_err"; then
4602   eval "$as_ac_Header=yes"
4603 else
4604   echo "$as_me: failed program was:" >&5
4605   cat conftest.$ac_ext >&5
4606   eval "$as_ac_Header=no"
4607 fi
4608 rm -f conftest.err conftest.$ac_ext
4609 fi
4610 echo "$as_me:4610: result: `eval echo '${'$as_ac_Header'}'`" >&5
4611 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4613   cat >>confdefs.h <<EOF
4614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4615 EOF
4616
4617 fi
4618 done
4619
4620 cat >>confdefs.h <<\EOF
4621 #define NCURSES 1
4622 EOF
4623
4624 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4625
4626 cat >>confdefs.h <<EOF
4627 #define $cf_nculib_ROOT 1
4628 EOF
4629
4630 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4631
4632 else
4633
4634 cf_ncuhdr_root=ncursesw
4635
4636 test -n "$cf_cv_curses_dir" && \
4637 test "$cf_cv_curses_dir" != "no" && { \
4638
4639 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4640   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4641   do
4642         while test $cf_add_incdir != /usr/include
4643         do
4644           if test -d $cf_add_incdir
4645           then
4646                 cf_have_incdir=no
4647                 if test -n "$CFLAGS$CPPFLAGS" ; then
4648                   # a loop is needed to ensure we can add subdirs of existing dirs
4649                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4650                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4651                           cf_have_incdir=yes; break
4652                         fi
4653                   done
4654                 fi
4655
4656                 if test "$cf_have_incdir" = no ; then
4657                   if test "$cf_add_incdir" = /usr/local/include ; then
4658                         if test "$GCC" = yes
4659                         then
4660                           cf_save_CPPFLAGS=$CPPFLAGS
4661                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4662                           cat >conftest.$ac_ext <<_ACEOF
4663 #line 4663 "configure"
4664 #include "confdefs.h"
4665 #include <stdio.h>
4666 int
4667 main ()
4668 {
4669 printf("Hello")
4670   ;
4671   return 0;
4672 }
4673 _ACEOF
4674 rm -f conftest.$ac_objext
4675 if { (eval echo "$as_me:4675: \"$ac_compile\"") >&5
4676   (eval $ac_compile) 2>&5
4677   ac_status=$?
4678   echo "$as_me:4678: \$? = $ac_status" >&5
4679   (exit $ac_status); } &&
4680          { ac_try='test -s conftest.$ac_objext'
4681   { (eval echo "$as_me:4681: \"$ac_try\"") >&5
4682   (eval $ac_try) 2>&5
4683   ac_status=$?
4684   echo "$as_me:4684: \$? = $ac_status" >&5
4685   (exit $ac_status); }; }; then
4686   :
4687 else
4688   echo "$as_me: failed program was:" >&5
4689 cat conftest.$ac_ext >&5
4690 cf_have_incdir=yes
4691 fi
4692 rm -f conftest.$ac_objext conftest.$ac_ext
4693                           CPPFLAGS=$cf_save_CPPFLAGS
4694                         fi
4695                   fi
4696                 fi
4697
4698                 if test "$cf_have_incdir" = no ; then
4699                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4700
4701 echo "${as_me:-configure}:4701: testing adding $cf_add_incdir to include-path ..." 1>&5
4702
4703                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4704
4705                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4706                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4707                   cf_add_incdir="$cf_top_incdir"
4708                 else
4709                   break
4710                 fi
4711           fi
4712         done
4713   done
4714 fi
4715
4716 }
4717
4718 echo "$as_me:4718: checking for $cf_ncuhdr_root header in include-path" >&5
4719 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4720 if test "${cf_cv_ncurses_h+set}" = set; then
4721   echo $ECHO_N "(cached) $ECHO_C" >&6
4722 else
4723
4724         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4725         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4726         for cf_header in $cf_header_list
4727         do
4728
4729         cat >conftest.$ac_ext <<_ACEOF
4730 #line 4730 "configure"
4731 #include "confdefs.h"
4732
4733 #define _XOPEN_SOURCE_EXTENDED
4734 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4735 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4736
4737 #include <$cf_header>
4738 int
4739 main ()
4740 {
4741
4742 #ifdef NCURSES_VERSION
4743
4744 #ifndef WACS_BSSB
4745         make an error
4746 #endif
4747
4748 printf("%s\n", NCURSES_VERSION);
4749 #else
4750 #ifdef __NCURSES_H
4751 printf("old\n");
4752 #else
4753         make an error
4754 #endif
4755 #endif
4756
4757   ;
4758   return 0;
4759 }
4760 _ACEOF
4761 rm -f conftest.$ac_objext
4762 if { (eval echo "$as_me:4762: \"$ac_compile\"") >&5
4763   (eval $ac_compile) 2>&5
4764   ac_status=$?
4765   echo "$as_me:4765: \$? = $ac_status" >&5
4766   (exit $ac_status); } &&
4767          { ac_try='test -s conftest.$ac_objext'
4768   { (eval echo "$as_me:4768: \"$ac_try\"") >&5
4769   (eval $ac_try) 2>&5
4770   ac_status=$?
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); }; }; then
4773   cf_cv_ncurses_h=$cf_header
4774
4775 else
4776   echo "$as_me: failed program was:" >&5
4777 cat conftest.$ac_ext >&5
4778 cf_cv_ncurses_h=no
4779 fi
4780 rm -f conftest.$ac_objext conftest.$ac_ext
4781
4782                 test "$cf_cv_ncurses_h" != no && break
4783         done
4784
4785 fi
4786 echo "$as_me:4786: result: $cf_cv_ncurses_h" >&5
4787 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4788
4789 if test "$cf_cv_ncurses_h" != no ; then
4790         cf_cv_ncurses_header=$cf_cv_ncurses_h
4791 else
4792
4793 echo "$as_me:4793: checking for $cf_ncuhdr_root include-path" >&5
4794 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4795 if test "${cf_cv_ncurses_h2+set}" = set; then
4796   echo $ECHO_N "(cached) $ECHO_C" >&6
4797 else
4798
4799         test -n "$verbose" && echo
4800
4801 cf_search=
4802
4803 # collect the current set of include-directories from compiler flags
4804 cf_header_path_list=""
4805 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4806         for cf_header_path in $CPPFLAGS $CFLAGS
4807         do
4808                 case $cf_header_path in #(vi
4809                 -I*)
4810                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4811
4812 test "$cf_header_path" != "NONE" && \
4813 test -d "$cf_header_path" && \
4814  {
4815         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4816         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4817         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4818         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4819         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4820         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"
4821 }
4822
4823                         cf_header_path_list="$cf_header_path_list $cf_search"
4824                         ;;
4825                 esac
4826         done
4827 fi
4828
4829 # add the variations for the package we are looking for
4830
4831 cf_search=
4832
4833 test "/usr" != "$prefix" && \
4834 test -d "/usr" && \
4835 (test $prefix = NONE || test "/usr" != "$prefix") && {
4836         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4837         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4838         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4839         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4840         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4841         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4842 }
4843
4844 test "$prefix" != "NONE" && \
4845 test -d "$prefix" && \
4846  {
4847         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4848         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4849         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4850         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4851         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4852         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4853 }
4854
4855 test "/usr/local" != "$prefix" && \
4856 test -d "/usr/local" && \
4857 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
4858         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4859         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4860         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4861         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4862         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4863         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4864 }
4865
4866 test "/opt" != "$prefix" && \
4867 test -d "/opt" && \
4868 (test $prefix = NONE || test "/opt" != "$prefix") && {
4869         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4870         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4871         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4872         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4873         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4874         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4875 }
4876
4877 test "$HOME" != "$prefix" && \
4878 test -d "$HOME" && \
4879 (test $prefix = NONE || test "$HOME" != "$prefix") && {
4880         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4881         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4882         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4883         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4884         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4885         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4886 }
4887
4888 test "$includedir" != NONE && \
4889 test "$includedir" != "/usr/include" && \
4890 test -d "$includedir" && {
4891         test -d $includedir &&    cf_search="$cf_search $includedir"
4892         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4893 }
4894
4895 test "$oldincludedir" != NONE && \
4896 test "$oldincludedir" != "/usr/include" && \
4897 test -d "$oldincludedir" && {
4898         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4899         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4900 }
4901
4902 cf_search="$cf_search $cf_header_path_list"
4903
4904         test -n "$verbose" && echo search path $cf_search
4905         cf_save2_CPPFLAGS="$CPPFLAGS"
4906         for cf_incdir in $cf_search
4907         do
4908
4909 if test -n "$cf_incdir" ; then
4910   for cf_add_incdir in $cf_incdir
4911   do
4912         while test $cf_add_incdir != /usr/include
4913         do
4914           if test -d $cf_add_incdir
4915           then
4916                 cf_have_incdir=no
4917                 if test -n "$CFLAGS$CPPFLAGS" ; then
4918                   # a loop is needed to ensure we can add subdirs of existing dirs
4919                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4920                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4921                           cf_have_incdir=yes; break
4922                         fi
4923                   done
4924                 fi
4925
4926                 if test "$cf_have_incdir" = no ; then
4927                   if test "$cf_add_incdir" = /usr/local/include ; then
4928                         if test "$GCC" = yes
4929                         then
4930                           cf_save_CPPFLAGS=$CPPFLAGS
4931                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4932                           cat >conftest.$ac_ext <<_ACEOF
4933 #line 4933 "configure"
4934 #include "confdefs.h"
4935 #include <stdio.h>
4936 int
4937 main ()
4938 {
4939 printf("Hello")
4940   ;
4941   return 0;
4942 }
4943 _ACEOF
4944 rm -f conftest.$ac_objext
4945 if { (eval echo "$as_me:4945: \"$ac_compile\"") >&5
4946   (eval $ac_compile) 2>&5
4947   ac_status=$?
4948   echo "$as_me:4948: \$? = $ac_status" >&5
4949   (exit $ac_status); } &&
4950          { ac_try='test -s conftest.$ac_objext'
4951   { (eval echo "$as_me:4951: \"$ac_try\"") >&5
4952   (eval $ac_try) 2>&5
4953   ac_status=$?
4954   echo "$as_me:4954: \$? = $ac_status" >&5
4955   (exit $ac_status); }; }; then
4956   :
4957 else
4958   echo "$as_me: failed program was:" >&5
4959 cat conftest.$ac_ext >&5
4960 cf_have_incdir=yes
4961 fi
4962 rm -f conftest.$ac_objext conftest.$ac_ext
4963                           CPPFLAGS=$cf_save_CPPFLAGS
4964                         fi
4965                   fi
4966                 fi
4967
4968                 if test "$cf_have_incdir" = no ; then
4969                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4970
4971 echo "${as_me:-configure}:4971: testing adding $cf_add_incdir to include-path ..." 1>&5
4972
4973                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4974
4975                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4976                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4977                   cf_add_incdir="$cf_top_incdir"
4978                 else
4979                   break
4980                 fi
4981           fi
4982         done
4983   done
4984 fi
4985
4986                 for cf_header in \
4987                         ncurses.h \
4988                         curses.h
4989                 do
4990
4991         cat >conftest.$ac_ext <<_ACEOF
4992 #line 4992 "configure"
4993 #include "confdefs.h"
4994
4995 #include <$cf_header>
4996 int
4997 main ()
4998 {
4999
5000 #ifdef NCURSES_VERSION
5001
5002 printf("%s\n", NCURSES_VERSION);
5003 #else
5004 #ifdef __NCURSES_H
5005 printf("old\n");
5006 #else
5007         make an error
5008 #endif
5009 #endif
5010
5011   ;
5012   return 0;
5013 }
5014 _ACEOF
5015 rm -f conftest.$ac_objext
5016 if { (eval echo "$as_me:5016: \"$ac_compile\"") >&5
5017   (eval $ac_compile) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); } &&
5021          { ac_try='test -s conftest.$ac_objext'
5022   { (eval echo "$as_me:5022: \"$ac_try\"") >&5
5023   (eval $ac_try) 2>&5
5024   ac_status=$?
5025   echo "$as_me:5025: \$? = $ac_status" >&5
5026   (exit $ac_status); }; }; then
5027   cf_cv_ncurses_h2=$cf_header
5028
5029 else
5030   echo "$as_me: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5032 cf_cv_ncurses_h2=no
5033 fi
5034 rm -f conftest.$ac_objext conftest.$ac_ext
5035
5036                         if test "$cf_cv_ncurses_h2" != no ; then
5037                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5038                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5039                                 break
5040                         fi
5041                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5042                 done
5043                 CPPFLAGS="$cf_save2_CPPFLAGS"
5044                 test "$cf_cv_ncurses_h2" != no && break
5045         done
5046         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5046: error: not found" >&5
5047 echo "$as_me: error: not found" >&2;}
5048    { (exit 1); exit 1; }; }
5049
5050 fi
5051 echo "$as_me:5051: result: $cf_cv_ncurses_h2" >&5
5052 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5053
5054         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5055         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5056         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5057                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5058         fi
5059
5060 if test -n "$cf_1st_incdir" ; then
5061   for cf_add_incdir in $cf_1st_incdir
5062   do
5063         while test $cf_add_incdir != /usr/include
5064         do
5065           if test -d $cf_add_incdir
5066           then
5067                 cf_have_incdir=no
5068                 if test -n "$CFLAGS$CPPFLAGS" ; then
5069                   # a loop is needed to ensure we can add subdirs of existing dirs
5070                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5071                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5072                           cf_have_incdir=yes; break
5073                         fi
5074                   done
5075                 fi
5076
5077                 if test "$cf_have_incdir" = no ; then
5078                   if test "$cf_add_incdir" = /usr/local/include ; then
5079                         if test "$GCC" = yes
5080                         then
5081                           cf_save_CPPFLAGS=$CPPFLAGS
5082                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5083                           cat >conftest.$ac_ext <<_ACEOF
5084 #line 5084 "configure"
5085 #include "confdefs.h"
5086 #include <stdio.h>
5087 int
5088 main ()
5089 {
5090 printf("Hello")
5091   ;
5092   return 0;
5093 }
5094 _ACEOF
5095 rm -f conftest.$ac_objext
5096 if { (eval echo "$as_me:5096: \"$ac_compile\"") >&5
5097   (eval $ac_compile) 2>&5
5098   ac_status=$?
5099   echo "$as_me:5099: \$? = $ac_status" >&5
5100   (exit $ac_status); } &&
5101          { ac_try='test -s conftest.$ac_objext'
5102   { (eval echo "$as_me:5102: \"$ac_try\"") >&5
5103   (eval $ac_try) 2>&5
5104   ac_status=$?
5105   echo "$as_me:5105: \$? = $ac_status" >&5
5106   (exit $ac_status); }; }; then
5107   :
5108 else
5109   echo "$as_me: failed program was:" >&5
5110 cat conftest.$ac_ext >&5
5111 cf_have_incdir=yes
5112 fi
5113 rm -f conftest.$ac_objext conftest.$ac_ext
5114                           CPPFLAGS=$cf_save_CPPFLAGS
5115                         fi
5116                   fi
5117                 fi
5118
5119                 if test "$cf_have_incdir" = no ; then
5120                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5121
5122 echo "${as_me:-configure}:5122: testing adding $cf_add_incdir to include-path ..." 1>&5
5123
5124                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5125
5126                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5127                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5128                   cf_add_incdir="$cf_top_incdir"
5129                 else
5130                   break
5131                 fi
5132           fi
5133         done
5134   done
5135 fi
5136
5137 fi
5138
5139 # Set definitions to allow ifdef'ing for ncurses.h
5140
5141 case $cf_cv_ncurses_header in # (vi
5142 *ncurses.h)
5143         cat >>confdefs.h <<\EOF
5144 #define HAVE_NCURSES_H 1
5145 EOF
5146
5147         ;;
5148 esac
5149
5150 case $cf_cv_ncurses_header in # (vi
5151 ncurses/curses.h|ncurses/ncurses.h)
5152         cat >>confdefs.h <<\EOF
5153 #define HAVE_NCURSES_NCURSES_H 1
5154 EOF
5155
5156         ;;
5157 ncursesw/curses.h|ncursesw/ncurses.h)
5158         cat >>confdefs.h <<\EOF
5159 #define HAVE_NCURSESW_NCURSES_H 1
5160 EOF
5161
5162         ;;
5163 esac
5164
5165 echo "$as_me:5165: checking for terminfo header" >&5
5166 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5167 if test "${cf_cv_term_header+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170
5171 case ${cf_cv_ncurses_header} in #(vi
5172 */ncurses.h|*/ncursesw.h) #(vi
5173         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5174         ;;
5175 *)
5176         cf_term_header=term.h
5177         ;;
5178 esac
5179
5180 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5181 do
5182 cat >conftest.$ac_ext <<_ACEOF
5183 #line 5183 "configure"
5184 #include "confdefs.h"
5185 #include <stdio.h>
5186 #include <${cf_cv_ncurses_header:-curses.h}>
5187 #include <$cf_test>
5188
5189 int
5190 main ()
5191 {
5192 int x = auto_left_margin
5193   ;
5194   return 0;
5195 }
5196 _ACEOF
5197 rm -f conftest.$ac_objext
5198 if { (eval echo "$as_me:5198: \"$ac_compile\"") >&5
5199   (eval $ac_compile) 2>&5
5200   ac_status=$?
5201   echo "$as_me:5201: \$? = $ac_status" >&5
5202   (exit $ac_status); } &&
5203          { ac_try='test -s conftest.$ac_objext'
5204   { (eval echo "$as_me:5204: \"$ac_try\"") >&5
5205   (eval $ac_try) 2>&5
5206   ac_status=$?
5207   echo "$as_me:5207: \$? = $ac_status" >&5
5208   (exit $ac_status); }; }; then
5209
5210         cf_cv_term_header="$cf_test"
5211 else
5212   echo "$as_me: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
5214
5215         cf_cv_term_header=unknown
5216
5217 fi
5218 rm -f conftest.$ac_objext conftest.$ac_ext
5219         test "$cf_cv_term_header" != unknown && break
5220 done
5221
5222 fi
5223 echo "$as_me:5223: result: $cf_cv_term_header" >&5
5224 echo "${ECHO_T}$cf_cv_term_header" >&6
5225
5226 # Set definitions to allow ifdef'ing to accommodate subdirectories
5227
5228 case $cf_cv_term_header in # (vi
5229 *term.h)
5230         cat >>confdefs.h <<\EOF
5231 #define HAVE_TERM_H 1
5232 EOF
5233
5234         ;;
5235 esac
5236
5237 case $cf_cv_term_header in # (vi
5238 ncurses/term.h) #(vi
5239         cat >>confdefs.h <<\EOF
5240 #define HAVE_NCURSES_TERM_H 1
5241 EOF
5242
5243         ;;
5244 ncursesw/term.h)
5245         cat >>confdefs.h <<\EOF
5246 #define HAVE_NCURSESW_TERM_H 1
5247 EOF
5248
5249         ;;
5250 esac
5251
5252 # some applications need this, but should check for NCURSES_VERSION
5253 cat >>confdefs.h <<\EOF
5254 #define NCURSES 1
5255 EOF
5256
5257 echo "$as_me:5257: checking for ncurses version" >&5
5258 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5259 if test "${cf_cv_ncurses_version+set}" = set; then
5260   echo $ECHO_N "(cached) $ECHO_C" >&6
5261 else
5262
5263         cf_cv_ncurses_version=no
5264         cf_tempfile=out$$
5265         rm -f $cf_tempfile
5266         if test "$cross_compiling" = yes; then
5267
5268         # This will not work if the preprocessor splits the line after the
5269         # Autoconf token.  The 'unproto' program does that.
5270         cat > conftest.$ac_ext <<EOF
5271 #include <${cf_cv_ncurses_header:-curses.h}>
5272 #undef Autoconf
5273 #ifdef NCURSES_VERSION
5274 Autoconf NCURSES_VERSION
5275 #else
5276 #ifdef __NCURSES_H
5277 Autoconf "old"
5278 #endif
5279 ;
5280 #endif
5281 EOF
5282         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5283         { (eval echo "$as_me:5283: \"$cf_try\"") >&5
5284   (eval $cf_try) 2>&5
5285   ac_status=$?
5286   echo "$as_me:5286: \$? = $ac_status" >&5
5287   (exit $ac_status); }
5288         if test -f conftest.out ; then
5289                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5290                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5291                 rm -f conftest.out
5292         fi
5293
5294 else
5295   cat >conftest.$ac_ext <<_ACEOF
5296 #line 5296 "configure"
5297 #include "confdefs.h"
5298
5299 #include <${cf_cv_ncurses_header:-curses.h}>
5300 #include <stdio.h>
5301 int main()
5302 {
5303         FILE *fp = fopen("$cf_tempfile", "w");
5304 #ifdef NCURSES_VERSION
5305 # ifdef NCURSES_VERSION_PATCH
5306         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5307 # else
5308         fprintf(fp, "%s\n", NCURSES_VERSION);
5309 # endif
5310 #else
5311 # ifdef __NCURSES_H
5312         fprintf(fp, "old\n");
5313 # else
5314         make an error
5315 # endif
5316 #endif
5317         ${cf_cv_main_return:-return}(0);
5318 }
5319 _ACEOF
5320 rm -f conftest$ac_exeext
5321 if { (eval echo "$as_me:5321: \"$ac_link\"") >&5
5322   (eval $ac_link) 2>&5
5323   ac_status=$?
5324   echo "$as_me:5324: \$? = $ac_status" >&5
5325   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5326   { (eval echo "$as_me:5326: \"$ac_try\"") >&5
5327   (eval $ac_try) 2>&5
5328   ac_status=$?
5329   echo "$as_me:5329: \$? = $ac_status" >&5
5330   (exit $ac_status); }; }; then
5331
5332         cf_cv_ncurses_version=`cat $cf_tempfile`
5333 else
5334   echo "$as_me: program exited with status $ac_status" >&5
5335 echo "$as_me: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 fi
5338 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5339 fi
5340         rm -f $cf_tempfile
5341
5342 fi
5343 echo "$as_me:5343: result: $cf_cv_ncurses_version" >&5
5344 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5345 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5346 #define NCURSES 1
5347 EOF
5348
5349 cf_nculib_root=ncursesw
5350         # This works, except for the special case where we find gpm, but
5351         # ncurses is in a nonstandard location via $LIBS, and we really want
5352         # to link gpm.
5353 cf_ncurses_LIBS=""
5354 cf_ncurses_SAVE="$LIBS"
5355 echo "$as_me:5355: checking for Gpm_Open in -lgpm" >&5
5356 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5357 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5358   echo $ECHO_N "(cached) $ECHO_C" >&6
5359 else
5360   ac_check_lib_save_LIBS=$LIBS
5361 LIBS="-lgpm  $LIBS"
5362 cat >conftest.$ac_ext <<_ACEOF
5363 #line 5363 "configure"
5364 #include "confdefs.h"
5365
5366 /* Override any gcc2 internal prototype to avoid an error.  */
5367 #ifdef __cplusplus
5368 extern "C"
5369 #endif
5370 /* We use char because int might match the return type of a gcc2
5371    builtin and then its argument prototype would still apply.  */
5372 char Gpm_Open ();
5373 int
5374 main ()
5375 {
5376 Gpm_Open ();
5377   ;
5378   return 0;
5379 }
5380 _ACEOF
5381 rm -f conftest.$ac_objext conftest$ac_exeext
5382 if { (eval echo "$as_me:5382: \"$ac_link\"") >&5
5383   (eval $ac_link) 2>&5
5384   ac_status=$?
5385   echo "$as_me:5385: \$? = $ac_status" >&5
5386   (exit $ac_status); } &&
5387          { ac_try='test -s conftest$ac_exeext'
5388   { (eval echo "$as_me:5388: \"$ac_try\"") >&5
5389   (eval $ac_try) 2>&5
5390   ac_status=$?
5391   echo "$as_me:5391: \$? = $ac_status" >&5
5392   (exit $ac_status); }; }; then
5393   ac_cv_lib_gpm_Gpm_Open=yes
5394 else
5395   echo "$as_me: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 ac_cv_lib_gpm_Gpm_Open=no
5398 fi
5399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5400 LIBS=$ac_check_lib_save_LIBS
5401 fi
5402 echo "$as_me:5402: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5403 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5404 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5405   echo "$as_me:5405: checking for initscr in -lgpm" >&5
5406 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5407 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5408   echo $ECHO_N "(cached) $ECHO_C" >&6
5409 else
5410   ac_check_lib_save_LIBS=$LIBS
5411 LIBS="-lgpm  $LIBS"
5412 cat >conftest.$ac_ext <<_ACEOF
5413 #line 5413 "configure"
5414 #include "confdefs.h"
5415
5416 /* Override any gcc2 internal prototype to avoid an error.  */
5417 #ifdef __cplusplus
5418 extern "C"
5419 #endif
5420 /* We use char because int might match the return type of a gcc2
5421    builtin and then its argument prototype would still apply.  */
5422 char initscr ();
5423 int
5424 main ()
5425 {
5426 initscr ();
5427   ;
5428   return 0;
5429 }
5430 _ACEOF
5431 rm -f conftest.$ac_objext conftest$ac_exeext
5432 if { (eval echo "$as_me:5432: \"$ac_link\"") >&5
5433   (eval $ac_link) 2>&5
5434   ac_status=$?
5435   echo "$as_me:5435: \$? = $ac_status" >&5
5436   (exit $ac_status); } &&
5437          { ac_try='test -s conftest$ac_exeext'
5438   { (eval echo "$as_me:5438: \"$ac_try\"") >&5
5439   (eval $ac_try) 2>&5
5440   ac_status=$?
5441   echo "$as_me:5441: \$? = $ac_status" >&5
5442   (exit $ac_status); }; }; then
5443   ac_cv_lib_gpm_initscr=yes
5444 else
5445   echo "$as_me: failed program was:" >&5
5446 cat conftest.$ac_ext >&5
5447 ac_cv_lib_gpm_initscr=no
5448 fi
5449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5450 LIBS=$ac_check_lib_save_LIBS
5451 fi
5452 echo "$as_me:5452: result: $ac_cv_lib_gpm_initscr" >&5
5453 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5454 if test $ac_cv_lib_gpm_initscr = yes; then
5455   LIBS="$cf_ncurses_SAVE"
5456 else
5457   cf_ncurses_LIBS="-lgpm"
5458 fi
5459
5460 fi
5461
5462 case $host_os in #(vi
5463 freebsd*)
5464         # This is only necessary if you are linking against an obsolete
5465         # version of ncurses (but it should do no harm, since it's static).
5466         if test "$cf_nculib_root" = ncurses ; then
5467                 echo "$as_me:5467: checking for tgoto in -lmytinfo" >&5
5468 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5469 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5470   echo $ECHO_N "(cached) $ECHO_C" >&6
5471 else
5472   ac_check_lib_save_LIBS=$LIBS
5473 LIBS="-lmytinfo  $LIBS"
5474 cat >conftest.$ac_ext <<_ACEOF
5475 #line 5475 "configure"
5476 #include "confdefs.h"
5477
5478 /* Override any gcc2 internal prototype to avoid an error.  */
5479 #ifdef __cplusplus
5480 extern "C"
5481 #endif
5482 /* We use char because int might match the return type of a gcc2
5483    builtin and then its argument prototype would still apply.  */
5484 char tgoto ();
5485 int
5486 main ()
5487 {
5488 tgoto ();
5489   ;
5490   return 0;
5491 }
5492 _ACEOF
5493 rm -f conftest.$ac_objext conftest$ac_exeext
5494 if { (eval echo "$as_me:5494: \"$ac_link\"") >&5
5495   (eval $ac_link) 2>&5
5496   ac_status=$?
5497   echo "$as_me:5497: \$? = $ac_status" >&5
5498   (exit $ac_status); } &&
5499          { ac_try='test -s conftest$ac_exeext'
5500   { (eval echo "$as_me:5500: \"$ac_try\"") >&5
5501   (eval $ac_try) 2>&5
5502   ac_status=$?
5503   echo "$as_me:5503: \$? = $ac_status" >&5
5504   (exit $ac_status); }; }; then
5505   ac_cv_lib_mytinfo_tgoto=yes
5506 else
5507   echo "$as_me: failed program was:" >&5
5508 cat conftest.$ac_ext >&5
5509 ac_cv_lib_mytinfo_tgoto=no
5510 fi
5511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5512 LIBS=$ac_check_lib_save_LIBS
5513 fi
5514 echo "$as_me:5514: result: $ac_cv_lib_mytinfo_tgoto" >&5
5515 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5516 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5517   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5518 fi
5519
5520         fi
5521         ;;
5522 esac
5523
5524 LIBS="$cf_ncurses_LIBS $LIBS"
5525
5526 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5527 then
5528         LIBS="-l$cf_nculib_root $LIBS"
5529 else
5530
5531         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5532         cf_libdir=""
5533         echo "$as_me:5533: checking for initscr" >&5
5534 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5535 if test "${ac_cv_func_initscr+set}" = set; then
5536   echo $ECHO_N "(cached) $ECHO_C" >&6
5537 else
5538   cat >conftest.$ac_ext <<_ACEOF
5539 #line 5539 "configure"
5540 #include "confdefs.h"
5541 /* System header to define __stub macros and hopefully few prototypes,
5542     which can conflict with char initscr (); below.  */
5543 #include <assert.h>
5544 /* Override any gcc2 internal prototype to avoid an error.  */
5545 #ifdef __cplusplus
5546 extern "C"
5547 #endif
5548 /* We use char because int might match the return type of a gcc2
5549    builtin and then its argument prototype would still apply.  */
5550 char initscr ();
5551 char (*f) ();
5552
5553 int
5554 main ()
5555 {
5556 /* The GNU C library defines this for functions which it implements
5557     to always fail with ENOSYS.  Some functions are actually named
5558     something starting with __ and the normal name is an alias.  */
5559 #if defined (__stub_initscr) || defined (__stub___initscr)
5560 choke me
5561 #else
5562 f = initscr;
5563 #endif
5564
5565   ;
5566   return 0;
5567 }
5568 _ACEOF
5569 rm -f conftest.$ac_objext conftest$ac_exeext
5570 if { (eval echo "$as_me:5570: \"$ac_link\"") >&5
5571   (eval $ac_link) 2>&5
5572   ac_status=$?
5573   echo "$as_me:5573: \$? = $ac_status" >&5
5574   (exit $ac_status); } &&
5575          { ac_try='test -s conftest$ac_exeext'
5576   { (eval echo "$as_me:5576: \"$ac_try\"") >&5
5577   (eval $ac_try) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); }; }; then
5581   ac_cv_func_initscr=yes
5582 else
5583   echo "$as_me: failed program was:" >&5
5584 cat conftest.$ac_ext >&5
5585 ac_cv_func_initscr=no
5586 fi
5587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5588 fi
5589 echo "$as_me:5589: result: $ac_cv_func_initscr" >&5
5590 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5591 if test $ac_cv_func_initscr = yes; then
5592   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5593 else
5594
5595                 cf_save_LIBS="$LIBS"
5596                 echo "$as_me:5596: checking for initscr in -l$cf_nculib_root" >&5
5597 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5598                 LIBS="-l$cf_nculib_root $LIBS"
5599                 cat >conftest.$ac_ext <<_ACEOF
5600 #line 5600 "configure"
5601 #include "confdefs.h"
5602 #include <${cf_cv_ncurses_header:-curses.h}>
5603 int
5604 main ()
5605 {
5606 initscr()
5607   ;
5608   return 0;
5609 }
5610 _ACEOF
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:5612: \"$ac_link\"") >&5
5613   (eval $ac_link) 2>&5
5614   ac_status=$?
5615   echo "$as_me:5615: \$? = $ac_status" >&5
5616   (exit $ac_status); } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:5621: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   echo "$as_me:5623: result: yes" >&5
5624 echo "${ECHO_T}yes" >&6
5625                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5626
5627 else
5628   echo "$as_me: failed program was:" >&5
5629 cat conftest.$ac_ext >&5
5630 echo "$as_me:5630: result: no" >&5
5631 echo "${ECHO_T}no" >&6
5632
5633 cf_search=
5634 cf_library_path_list=""
5635 if test -n "${LDFLAGS}${LIBS}" ; then
5636         for cf_library_path in $LDFLAGS $LIBS
5637         do
5638                 case $cf_library_path in #(vi
5639                 -L*)
5640                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5641
5642 test "$cf_library_path" != "NONE" && \
5643 test -d "$cf_library_path" && \
5644  {
5645         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5646         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5647         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5648         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5649         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5650         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"
5651 }
5652
5653                         cf_library_path_list="$cf_library_path_list $cf_search"
5654                         ;;
5655                 esac
5656         done
5657 fi
5658
5659 cf_search=
5660
5661 test "/usr" != "$prefix" && \
5662 test -d "/usr" && \
5663 (test $prefix = NONE || test "/usr" != "$prefix") && {
5664         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5665         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5666         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5667         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5668         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5669         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5670 }
5671
5672 test "$prefix" != "NONE" && \
5673 test -d "$prefix" && \
5674  {
5675         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5676         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5677         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5678         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5679         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5680         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5681 }
5682
5683 test "/usr/local" != "$prefix" && \
5684 test -d "/usr/local" && \
5685 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5686         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5687         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5688         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5689         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5690         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5691         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5692 }
5693
5694 test "/opt" != "$prefix" && \
5695 test -d "/opt" && \
5696 (test $prefix = NONE || test "/opt" != "$prefix") && {
5697         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5698         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5699         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5700         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5701         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5702         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5703 }
5704
5705 test "$HOME" != "$prefix" && \
5706 test -d "$HOME" && \
5707 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5708         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5709         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5710         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5711         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5712         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5713         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5714 }
5715
5716 cf_search="$cf_library_path_list $cf_search"
5717
5718                         for cf_libdir in $cf_search
5719                         do
5720                                 echo "$as_me:5720: checking for -l$cf_nculib_root in $cf_libdir" >&5
5721 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5722                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5723                                 cat >conftest.$ac_ext <<_ACEOF
5724 #line 5724 "configure"
5725 #include "confdefs.h"
5726 #include <${cf_cv_ncurses_header:-curses.h}>
5727 int
5728 main ()
5729 {
5730 initscr()
5731   ;
5732   return 0;
5733 }
5734 _ACEOF
5735 rm -f conftest.$ac_objext conftest$ac_exeext
5736 if { (eval echo "$as_me:5736: \"$ac_link\"") >&5
5737   (eval $ac_link) 2>&5
5738   ac_status=$?
5739   echo "$as_me:5739: \$? = $ac_status" >&5
5740   (exit $ac_status); } &&
5741          { ac_try='test -s conftest$ac_exeext'
5742   { (eval echo "$as_me:5742: \"$ac_try\"") >&5
5743   (eval $ac_try) 2>&5
5744   ac_status=$?
5745   echo "$as_me:5745: \$? = $ac_status" >&5
5746   (exit $ac_status); }; }; then
5747   echo "$as_me:5747: result: yes" >&5
5748 echo "${ECHO_T}yes" >&6
5749                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5750                                          break
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 echo "$as_me:5754: result: no" >&5
5755 echo "${ECHO_T}no" >&6
5756                                          LIBS="$cf_save_LIBS"
5757 fi
5758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5759                         done
5760
5761 fi
5762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5763
5764 fi
5765
5766 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5767
5768 if test $cf_found_library = no ; then
5769         { { echo "$as_me:5769: error: Cannot link $cf_nculib_root library" >&5
5770 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5771    { (exit 1); exit 1; }; }
5772 fi
5773
5774 fi
5775
5776 if test -n "$cf_ncurses_LIBS" ; then
5777         echo "$as_me:5777: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5778 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5779         cf_ncurses_SAVE="$LIBS"
5780         for p in $cf_ncurses_LIBS ; do
5781                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5782                 if test "$q" != "$LIBS" ; then
5783                         LIBS="$q"
5784                 fi
5785         done
5786         cat >conftest.$ac_ext <<_ACEOF
5787 #line 5787 "configure"
5788 #include "confdefs.h"
5789 #include <${cf_cv_ncurses_header:-curses.h}>
5790 int
5791 main ()
5792 {
5793 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5794   ;
5795   return 0;
5796 }
5797 _ACEOF
5798 rm -f conftest.$ac_objext conftest$ac_exeext
5799 if { (eval echo "$as_me:5799: \"$ac_link\"") >&5
5800   (eval $ac_link) 2>&5
5801   ac_status=$?
5802   echo "$as_me:5802: \$? = $ac_status" >&5
5803   (exit $ac_status); } &&
5804          { ac_try='test -s conftest$ac_exeext'
5805   { (eval echo "$as_me:5805: \"$ac_try\"") >&5
5806   (eval $ac_try) 2>&5
5807   ac_status=$?
5808   echo "$as_me:5808: \$? = $ac_status" >&5
5809   (exit $ac_status); }; }; then
5810   echo "$as_me:5810: result: yes" >&5
5811 echo "${ECHO_T}yes" >&6
5812 else
5813   echo "$as_me: failed program was:" >&5
5814 cat conftest.$ac_ext >&5
5815 echo "$as_me:5815: result: no" >&5
5816 echo "${ECHO_T}no" >&6
5817                  LIBS="$cf_ncurses_SAVE"
5818 fi
5819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5820 fi
5821
5822 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5823
5824 cat >>confdefs.h <<EOF
5825 #define $cf_nculib_ROOT 1
5826 EOF
5827
5828 fi
5829
5830 else
5831
5832 cf_ncuconfig_root=ncurses
5833
5834 echo "Looking for ${cf_ncuconfig_root}-config"
5835 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5836 do
5837   # Extract the first word of "$ac_prog", so it can be a program name with args.
5838 set dummy $ac_prog; ac_word=$2
5839 echo "$as_me:5839: checking for $ac_word" >&5
5840 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5841 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5842   echo $ECHO_N "(cached) $ECHO_C" >&6
5843 else
5844   case $NCURSES_CONFIG in
5845   [\\/]* | ?:[\\/]*)
5846   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5847   ;;
5848   *)
5849   ac_save_IFS=$IFS; IFS=$ac_path_separator
5850 ac_dummy="$PATH"
5851 for ac_dir in $ac_dummy; do
5852   IFS=$ac_save_IFS
5853   test -z "$ac_dir" && ac_dir=.
5854   if $as_executable_p "$ac_dir/$ac_word"; then
5855    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5856    echo "$as_me:5856: found $ac_dir/$ac_word" >&5
5857    break
5858 fi
5859 done
5860
5861   ;;
5862 esac
5863 fi
5864 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5865
5866 if test -n "$NCURSES_CONFIG"; then
5867   echo "$as_me:5867: result: $NCURSES_CONFIG" >&5
5868 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5869 else
5870   echo "$as_me:5870: result: no" >&5
5871 echo "${ECHO_T}no" >&6
5872 fi
5873
5874   test -n "$NCURSES_CONFIG" && break
5875 done
5876 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5877
5878 if test "$NCURSES_CONFIG" != none ; then
5879
5880 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5881 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5882
5883 # even with config script, some packages use no-override for curses.h
5884
5885 echo "$as_me:5885: checking if we have identified curses headers" >&5
5886 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5887 if test "${cf_cv_ncurses_header+set}" = set; then
5888   echo $ECHO_N "(cached) $ECHO_C" >&6
5889 else
5890
5891 cf_cv_ncurses_header=none
5892 for cf_header in  \
5893     ncurses/ncurses.h \
5894         ncurses/curses.h \
5895         ncurses.h \
5896         curses.h
5897 do
5898 cat >conftest.$ac_ext <<_ACEOF
5899 #line 5899 "configure"
5900 #include "confdefs.h"
5901 #include <${cf_header}>
5902 int
5903 main ()
5904 {
5905 initscr(); tgoto("?", 0,0)
5906   ;
5907   return 0;
5908 }
5909 _ACEOF
5910 rm -f conftest.$ac_objext
5911 if { (eval echo "$as_me:5911: \"$ac_compile\"") >&5
5912   (eval $ac_compile) 2>&5
5913   ac_status=$?
5914   echo "$as_me:5914: \$? = $ac_status" >&5
5915   (exit $ac_status); } &&
5916          { ac_try='test -s conftest.$ac_objext'
5917   { (eval echo "$as_me:5917: \"$ac_try\"") >&5
5918   (eval $ac_try) 2>&5
5919   ac_status=$?
5920   echo "$as_me:5920: \$? = $ac_status" >&5
5921   (exit $ac_status); }; }; then
5922   cf_cv_ncurses_header=$cf_header; break
5923 else
5924   echo "$as_me: failed program was:" >&5
5925 cat conftest.$ac_ext >&5
5926 fi
5927 rm -f conftest.$ac_objext conftest.$ac_ext
5928 done
5929
5930 fi
5931 echo "$as_me:5931: result: $cf_cv_ncurses_header" >&5
5932 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5933
5934 if test "$cf_cv_ncurses_header" = none ; then
5935         { { echo "$as_me:5935: error: No curses header-files found" >&5
5936 echo "$as_me: error: No curses header-files found" >&2;}
5937    { (exit 1); exit 1; }; }
5938 fi
5939
5940 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5941
5942 for ac_header in $cf_cv_ncurses_header
5943 do
5944 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5945 echo "$as_me:5945: checking for $ac_header" >&5
5946 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5947 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5948   echo $ECHO_N "(cached) $ECHO_C" >&6
5949 else
5950   cat >conftest.$ac_ext <<_ACEOF
5951 #line 5951 "configure"
5952 #include "confdefs.h"
5953 #include <$ac_header>
5954 _ACEOF
5955 if { (eval echo "$as_me:5955: \"$ac_cpp conftest.$ac_ext\"") >&5
5956   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5957   ac_status=$?
5958   egrep -v '^ *\+' conftest.er1 >conftest.err
5959   rm -f conftest.er1
5960   cat conftest.err >&5
5961   echo "$as_me:5961: \$? = $ac_status" >&5
5962   (exit $ac_status); } >/dev/null; then
5963   if test -s conftest.err; then
5964     ac_cpp_err=$ac_c_preproc_warn_flag
5965   else
5966     ac_cpp_err=
5967   fi
5968 else
5969   ac_cpp_err=yes
5970 fi
5971 if test -z "$ac_cpp_err"; then
5972   eval "$as_ac_Header=yes"
5973 else
5974   echo "$as_me: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   eval "$as_ac_Header=no"
5977 fi
5978 rm -f conftest.err conftest.$ac_ext
5979 fi
5980 echo "$as_me:5980: result: `eval echo '${'$as_ac_Header'}'`" >&5
5981 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5982 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5983   cat >>confdefs.h <<EOF
5984 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5985 EOF
5986
5987 fi
5988 done
5989
5990 cat >>confdefs.h <<\EOF
5991 #define NCURSES 1
5992 EOF
5993
5994 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5995
5996 cat >>confdefs.h <<EOF
5997 #define $cf_nculib_ROOT 1
5998 EOF
5999
6000 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6001
6002 else
6003
6004 cf_ncuhdr_root=ncurses
6005
6006 test -n "$cf_cv_curses_dir" && \
6007 test "$cf_cv_curses_dir" != "no" && { \
6008
6009 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6010   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6011   do
6012         while test $cf_add_incdir != /usr/include
6013         do
6014           if test -d $cf_add_incdir
6015           then
6016                 cf_have_incdir=no
6017                 if test -n "$CFLAGS$CPPFLAGS" ; then
6018                   # a loop is needed to ensure we can add subdirs of existing dirs
6019                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6020                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6021                           cf_have_incdir=yes; break
6022                         fi
6023                   done
6024                 fi
6025
6026                 if test "$cf_have_incdir" = no ; then
6027                   if test "$cf_add_incdir" = /usr/local/include ; then
6028                         if test "$GCC" = yes
6029                         then
6030                           cf_save_CPPFLAGS=$CPPFLAGS
6031                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6032                           cat >conftest.$ac_ext <<_ACEOF
6033 #line 6033 "configure"
6034 #include "confdefs.h"
6035 #include <stdio.h>
6036 int
6037 main ()
6038 {
6039 printf("Hello")
6040   ;
6041   return 0;
6042 }
6043 _ACEOF
6044 rm -f conftest.$ac_objext
6045 if { (eval echo "$as_me:6045: \"$ac_compile\"") >&5
6046   (eval $ac_compile) 2>&5
6047   ac_status=$?
6048   echo "$as_me:6048: \$? = $ac_status" >&5
6049   (exit $ac_status); } &&
6050          { ac_try='test -s conftest.$ac_objext'
6051   { (eval echo "$as_me:6051: \"$ac_try\"") >&5
6052   (eval $ac_try) 2>&5
6053   ac_status=$?
6054   echo "$as_me:6054: \$? = $ac_status" >&5
6055   (exit $ac_status); }; }; then
6056   :
6057 else
6058   echo "$as_me: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6060 cf_have_incdir=yes
6061 fi
6062 rm -f conftest.$ac_objext conftest.$ac_ext
6063                           CPPFLAGS=$cf_save_CPPFLAGS
6064                         fi
6065                   fi
6066                 fi
6067
6068                 if test "$cf_have_incdir" = no ; then
6069                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6070
6071 echo "${as_me:-configure}:6071: testing adding $cf_add_incdir to include-path ..." 1>&5
6072
6073                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6074
6075                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6076                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6077                   cf_add_incdir="$cf_top_incdir"
6078                 else
6079                   break
6080                 fi
6081           fi
6082         done
6083   done
6084 fi
6085
6086 }
6087
6088 echo "$as_me:6088: checking for $cf_ncuhdr_root header in include-path" >&5
6089 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6090 if test "${cf_cv_ncurses_h+set}" = set; then
6091   echo $ECHO_N "(cached) $ECHO_C" >&6
6092 else
6093
6094         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6095         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6096         for cf_header in $cf_header_list
6097         do
6098
6099         cat >conftest.$ac_ext <<_ACEOF
6100 #line 6100 "configure"
6101 #include "confdefs.h"
6102
6103 #include <$cf_header>
6104 int
6105 main ()
6106 {
6107
6108 #ifdef NCURSES_VERSION
6109
6110 printf("%s\n", NCURSES_VERSION);
6111 #else
6112 #ifdef __NCURSES_H
6113 printf("old\n");
6114 #else
6115         make an error
6116 #endif
6117 #endif
6118
6119   ;
6120   return 0;
6121 }
6122 _ACEOF
6123 rm -f conftest.$ac_objext
6124 if { (eval echo "$as_me:6124: \"$ac_compile\"") >&5
6125   (eval $ac_compile) 2>&5
6126   ac_status=$?
6127   echo "$as_me:6127: \$? = $ac_status" >&5
6128   (exit $ac_status); } &&
6129          { ac_try='test -s conftest.$ac_objext'
6130   { (eval echo "$as_me:6130: \"$ac_try\"") >&5
6131   (eval $ac_try) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); }; }; then
6135   cf_cv_ncurses_h=$cf_header
6136
6137 else
6138   echo "$as_me: failed program was:" >&5
6139 cat conftest.$ac_ext >&5
6140 cf_cv_ncurses_h=no
6141 fi
6142 rm -f conftest.$ac_objext conftest.$ac_ext
6143
6144                 test "$cf_cv_ncurses_h" != no && break
6145         done
6146
6147 fi
6148 echo "$as_me:6148: result: $cf_cv_ncurses_h" >&5
6149 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6150
6151 if test "$cf_cv_ncurses_h" != no ; then
6152         cf_cv_ncurses_header=$cf_cv_ncurses_h
6153 else
6154
6155 echo "$as_me:6155: checking for $cf_ncuhdr_root include-path" >&5
6156 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6157 if test "${cf_cv_ncurses_h2+set}" = set; then
6158   echo $ECHO_N "(cached) $ECHO_C" >&6
6159 else
6160
6161         test -n "$verbose" && echo
6162
6163 cf_search=
6164
6165 # collect the current set of include-directories from compiler flags
6166 cf_header_path_list=""
6167 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6168         for cf_header_path in $CPPFLAGS $CFLAGS
6169         do
6170                 case $cf_header_path in #(vi
6171                 -I*)
6172                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6173
6174 test "$cf_header_path" != "NONE" && \
6175 test -d "$cf_header_path" && \
6176  {
6177         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6178         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6179         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6180         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6181         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6182         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"
6183 }
6184
6185                         cf_header_path_list="$cf_header_path_list $cf_search"
6186                         ;;
6187                 esac
6188         done
6189 fi
6190
6191 # add the variations for the package we are looking for
6192
6193 cf_search=
6194
6195 test "/usr" != "$prefix" && \
6196 test -d "/usr" && \
6197 (test $prefix = NONE || test "/usr" != "$prefix") && {
6198         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6199         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6200         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6201         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6202         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6203         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6204 }
6205
6206 test "$prefix" != "NONE" && \
6207 test -d "$prefix" && \
6208  {
6209         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6210         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6211         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6212         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6213         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6214         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6215 }
6216
6217 test "/usr/local" != "$prefix" && \
6218 test -d "/usr/local" && \
6219 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6220         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6221         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6222         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6223         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6224         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6225         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6226 }
6227
6228 test "/opt" != "$prefix" && \
6229 test -d "/opt" && \
6230 (test $prefix = NONE || test "/opt" != "$prefix") && {
6231         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6232         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6233         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6234         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6235         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6236         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6237 }
6238
6239 test "$HOME" != "$prefix" && \
6240 test -d "$HOME" && \
6241 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6242         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6243         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6244         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6245         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6246         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6247         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6248 }
6249
6250 test "$includedir" != NONE && \
6251 test "$includedir" != "/usr/include" && \
6252 test -d "$includedir" && {
6253         test -d $includedir &&    cf_search="$cf_search $includedir"
6254         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6255 }
6256
6257 test "$oldincludedir" != NONE && \
6258 test "$oldincludedir" != "/usr/include" && \
6259 test -d "$oldincludedir" && {
6260         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6261         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6262 }
6263
6264 cf_search="$cf_search $cf_header_path_list"
6265
6266         test -n "$verbose" && echo search path $cf_search
6267         cf_save2_CPPFLAGS="$CPPFLAGS"
6268         for cf_incdir in $cf_search
6269         do
6270
6271 if test -n "$cf_incdir" ; then
6272   for cf_add_incdir in $cf_incdir
6273   do
6274         while test $cf_add_incdir != /usr/include
6275         do
6276           if test -d $cf_add_incdir
6277           then
6278                 cf_have_incdir=no
6279                 if test -n "$CFLAGS$CPPFLAGS" ; then
6280                   # a loop is needed to ensure we can add subdirs of existing dirs
6281                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6282                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6283                           cf_have_incdir=yes; break
6284                         fi
6285                   done
6286                 fi
6287
6288                 if test "$cf_have_incdir" = no ; then
6289                   if test "$cf_add_incdir" = /usr/local/include ; then
6290                         if test "$GCC" = yes
6291                         then
6292                           cf_save_CPPFLAGS=$CPPFLAGS
6293                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6294                           cat >conftest.$ac_ext <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297 #include <stdio.h>
6298 int
6299 main ()
6300 {
6301 printf("Hello")
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f conftest.$ac_objext
6307 if { (eval echo "$as_me:6307: \"$ac_compile\"") >&5
6308   (eval $ac_compile) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit $ac_status); } &&
6312          { ac_try='test -s conftest.$ac_objext'
6313   { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6314   (eval $ac_try) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); }; }; then
6318   :
6319 else
6320   echo "$as_me: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 cf_have_incdir=yes
6323 fi
6324 rm -f conftest.$ac_objext conftest.$ac_ext
6325                           CPPFLAGS=$cf_save_CPPFLAGS
6326                         fi
6327                   fi
6328                 fi
6329
6330                 if test "$cf_have_incdir" = no ; then
6331                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6332
6333 echo "${as_me:-configure}:6333: testing adding $cf_add_incdir to include-path ..." 1>&5
6334
6335                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6336
6337                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6338                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6339                   cf_add_incdir="$cf_top_incdir"
6340                 else
6341                   break
6342                 fi
6343           fi
6344         done
6345   done
6346 fi
6347
6348                 for cf_header in \
6349                         ncurses.h \
6350                         curses.h
6351                 do
6352
6353         cat >conftest.$ac_ext <<_ACEOF
6354 #line 6354 "configure"
6355 #include "confdefs.h"
6356
6357 #include <$cf_header>
6358 int
6359 main ()
6360 {
6361
6362 #ifdef NCURSES_VERSION
6363
6364 printf("%s\n", NCURSES_VERSION);
6365 #else
6366 #ifdef __NCURSES_H
6367 printf("old\n");
6368 #else
6369         make an error
6370 #endif
6371 #endif
6372
6373   ;
6374   return 0;
6375 }
6376 _ACEOF
6377 rm -f conftest.$ac_objext
6378 if { (eval echo "$as_me:6378: \"$ac_compile\"") >&5
6379   (eval $ac_compile) 2>&5
6380   ac_status=$?
6381   echo "$as_me:6381: \$? = $ac_status" >&5
6382   (exit $ac_status); } &&
6383          { ac_try='test -s conftest.$ac_objext'
6384   { (eval echo "$as_me:6384: \"$ac_try\"") >&5
6385   (eval $ac_try) 2>&5
6386   ac_status=$?
6387   echo "$as_me:6387: \$? = $ac_status" >&5
6388   (exit $ac_status); }; }; then
6389   cf_cv_ncurses_h2=$cf_header
6390
6391 else
6392   echo "$as_me: failed program was:" >&5
6393 cat conftest.$ac_ext >&5
6394 cf_cv_ncurses_h2=no
6395 fi
6396 rm -f conftest.$ac_objext conftest.$ac_ext
6397
6398                         if test "$cf_cv_ncurses_h2" != no ; then
6399                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6400                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6401                                 break
6402                         fi
6403                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6404                 done
6405                 CPPFLAGS="$cf_save2_CPPFLAGS"
6406                 test "$cf_cv_ncurses_h2" != no && break
6407         done
6408         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6408: error: not found" >&5
6409 echo "$as_me: error: not found" >&2;}
6410    { (exit 1); exit 1; }; }
6411
6412 fi
6413 echo "$as_me:6413: result: $cf_cv_ncurses_h2" >&5
6414 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6415
6416         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6417         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6418         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6419                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6420         fi
6421
6422 if test -n "$cf_1st_incdir" ; then
6423   for cf_add_incdir in $cf_1st_incdir
6424   do
6425         while test $cf_add_incdir != /usr/include
6426         do
6427           if test -d $cf_add_incdir
6428           then
6429                 cf_have_incdir=no
6430                 if test -n "$CFLAGS$CPPFLAGS" ; then
6431                   # a loop is needed to ensure we can add subdirs of existing dirs
6432                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6433                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6434                           cf_have_incdir=yes; break
6435                         fi
6436                   done
6437                 fi
6438
6439                 if test "$cf_have_incdir" = no ; then
6440                   if test "$cf_add_incdir" = /usr/local/include ; then
6441                         if test "$GCC" = yes
6442                         then
6443                           cf_save_CPPFLAGS=$CPPFLAGS
6444                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6445                           cat >conftest.$ac_ext <<_ACEOF
6446 #line 6446 "configure"
6447 #include "confdefs.h"
6448 #include <stdio.h>
6449 int
6450 main ()
6451 {
6452 printf("Hello")
6453   ;
6454   return 0;
6455 }
6456 _ACEOF
6457 rm -f conftest.$ac_objext
6458 if { (eval echo "$as_me:6458: \"$ac_compile\"") >&5
6459   (eval $ac_compile) 2>&5
6460   ac_status=$?
6461   echo "$as_me:6461: \$? = $ac_status" >&5
6462   (exit $ac_status); } &&
6463          { ac_try='test -s conftest.$ac_objext'
6464   { (eval echo "$as_me:6464: \"$ac_try\"") >&5
6465   (eval $ac_try) 2>&5
6466   ac_status=$?
6467   echo "$as_me:6467: \$? = $ac_status" >&5
6468   (exit $ac_status); }; }; then
6469   :
6470 else
6471   echo "$as_me: failed program was:" >&5
6472 cat conftest.$ac_ext >&5
6473 cf_have_incdir=yes
6474 fi
6475 rm -f conftest.$ac_objext conftest.$ac_ext
6476                           CPPFLAGS=$cf_save_CPPFLAGS
6477                         fi
6478                   fi
6479                 fi
6480
6481                 if test "$cf_have_incdir" = no ; then
6482                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6483
6484 echo "${as_me:-configure}:6484: testing adding $cf_add_incdir to include-path ..." 1>&5
6485
6486                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6487
6488                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6489                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6490                   cf_add_incdir="$cf_top_incdir"
6491                 else
6492                   break
6493                 fi
6494           fi
6495         done
6496   done
6497 fi
6498
6499 fi
6500
6501 # Set definitions to allow ifdef'ing for ncurses.h
6502
6503 case $cf_cv_ncurses_header in # (vi
6504 *ncurses.h)
6505         cat >>confdefs.h <<\EOF
6506 #define HAVE_NCURSES_H 1
6507 EOF
6508
6509         ;;
6510 esac
6511
6512 case $cf_cv_ncurses_header in # (vi
6513 ncurses/curses.h|ncurses/ncurses.h)
6514         cat >>confdefs.h <<\EOF
6515 #define HAVE_NCURSES_NCURSES_H 1
6516 EOF
6517
6518         ;;
6519 ncursesw/curses.h|ncursesw/ncurses.h)
6520         cat >>confdefs.h <<\EOF
6521 #define HAVE_NCURSESW_NCURSES_H 1
6522 EOF
6523
6524         ;;
6525 esac
6526
6527 echo "$as_me:6527: checking for terminfo header" >&5
6528 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6529 if test "${cf_cv_term_header+set}" = set; then
6530   echo $ECHO_N "(cached) $ECHO_C" >&6
6531 else
6532
6533 case ${cf_cv_ncurses_header} in #(vi
6534 */ncurses.h|*/ncursesw.h) #(vi
6535         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6536         ;;
6537 *)
6538         cf_term_header=term.h
6539         ;;
6540 esac
6541
6542 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6543 do
6544 cat >conftest.$ac_ext <<_ACEOF
6545 #line 6545 "configure"
6546 #include "confdefs.h"
6547 #include <stdio.h>
6548 #include <${cf_cv_ncurses_header:-curses.h}>
6549 #include <$cf_test>
6550
6551 int
6552 main ()
6553 {
6554 int x = auto_left_margin
6555   ;
6556   return 0;
6557 }
6558 _ACEOF
6559 rm -f conftest.$ac_objext
6560 if { (eval echo "$as_me:6560: \"$ac_compile\"") >&5
6561   (eval $ac_compile) 2>&5
6562   ac_status=$?
6563   echo "$as_me:6563: \$? = $ac_status" >&5
6564   (exit $ac_status); } &&
6565          { ac_try='test -s conftest.$ac_objext'
6566   { (eval echo "$as_me:6566: \"$ac_try\"") >&5
6567   (eval $ac_try) 2>&5
6568   ac_status=$?
6569   echo "$as_me:6569: \$? = $ac_status" >&5
6570   (exit $ac_status); }; }; then
6571
6572         cf_cv_term_header="$cf_test"
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576
6577         cf_cv_term_header=unknown
6578
6579 fi
6580 rm -f conftest.$ac_objext conftest.$ac_ext
6581         test "$cf_cv_term_header" != unknown && break
6582 done
6583
6584 fi
6585 echo "$as_me:6585: result: $cf_cv_term_header" >&5
6586 echo "${ECHO_T}$cf_cv_term_header" >&6
6587
6588 # Set definitions to allow ifdef'ing to accommodate subdirectories
6589
6590 case $cf_cv_term_header in # (vi
6591 *term.h)
6592         cat >>confdefs.h <<\EOF
6593 #define HAVE_TERM_H 1
6594 EOF
6595
6596         ;;
6597 esac
6598
6599 case $cf_cv_term_header in # (vi
6600 ncurses/term.h) #(vi
6601         cat >>confdefs.h <<\EOF
6602 #define HAVE_NCURSES_TERM_H 1
6603 EOF
6604
6605         ;;
6606 ncursesw/term.h)
6607         cat >>confdefs.h <<\EOF
6608 #define HAVE_NCURSESW_TERM_H 1
6609 EOF
6610
6611         ;;
6612 esac
6613
6614 # some applications need this, but should check for NCURSES_VERSION
6615 cat >>confdefs.h <<\EOF
6616 #define NCURSES 1
6617 EOF
6618
6619 echo "$as_me:6619: checking for ncurses version" >&5
6620 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6621 if test "${cf_cv_ncurses_version+set}" = set; then
6622   echo $ECHO_N "(cached) $ECHO_C" >&6
6623 else
6624
6625         cf_cv_ncurses_version=no
6626         cf_tempfile=out$$
6627         rm -f $cf_tempfile
6628         if test "$cross_compiling" = yes; then
6629
6630         # This will not work if the preprocessor splits the line after the
6631         # Autoconf token.  The 'unproto' program does that.
6632         cat > conftest.$ac_ext <<EOF
6633 #include <${cf_cv_ncurses_header:-curses.h}>
6634 #undef Autoconf
6635 #ifdef NCURSES_VERSION
6636 Autoconf NCURSES_VERSION
6637 #else
6638 #ifdef __NCURSES_H
6639 Autoconf "old"
6640 #endif
6641 ;
6642 #endif
6643 EOF
6644         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6645         { (eval echo "$as_me:6645: \"$cf_try\"") >&5
6646   (eval $cf_try) 2>&5
6647   ac_status=$?
6648   echo "$as_me:6648: \$? = $ac_status" >&5
6649   (exit $ac_status); }
6650         if test -f conftest.out ; then
6651                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6652                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6653                 rm -f conftest.out
6654         fi
6655
6656 else
6657   cat >conftest.$ac_ext <<_ACEOF
6658 #line 6658 "configure"
6659 #include "confdefs.h"
6660
6661 #include <${cf_cv_ncurses_header:-curses.h}>
6662 #include <stdio.h>
6663 int main()
6664 {
6665         FILE *fp = fopen("$cf_tempfile", "w");
6666 #ifdef NCURSES_VERSION
6667 # ifdef NCURSES_VERSION_PATCH
6668         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6669 # else
6670         fprintf(fp, "%s\n", NCURSES_VERSION);
6671 # endif
6672 #else
6673 # ifdef __NCURSES_H
6674         fprintf(fp, "old\n");
6675 # else
6676         make an error
6677 # endif
6678 #endif
6679         ${cf_cv_main_return:-return}(0);
6680 }
6681 _ACEOF
6682 rm -f conftest$ac_exeext
6683 if { (eval echo "$as_me:6683: \"$ac_link\"") >&5
6684   (eval $ac_link) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6688   { (eval echo "$as_me:6688: \"$ac_try\"") >&5
6689   (eval $ac_try) 2>&5
6690   ac_status=$?
6691   echo "$as_me:6691: \$? = $ac_status" >&5
6692   (exit $ac_status); }; }; then
6693
6694         cf_cv_ncurses_version=`cat $cf_tempfile`
6695 else
6696   echo "$as_me: program exited with status $ac_status" >&5
6697 echo "$as_me: failed program was:" >&5
6698 cat conftest.$ac_ext >&5
6699 fi
6700 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6701 fi
6702         rm -f $cf_tempfile
6703
6704 fi
6705 echo "$as_me:6705: result: $cf_cv_ncurses_version" >&5
6706 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6707 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6708 #define NCURSES 1
6709 EOF
6710
6711 cf_nculib_root=ncurses
6712         # This works, except for the special case where we find gpm, but
6713         # ncurses is in a nonstandard location via $LIBS, and we really want
6714         # to link gpm.
6715 cf_ncurses_LIBS=""
6716 cf_ncurses_SAVE="$LIBS"
6717 echo "$as_me:6717: checking for Gpm_Open in -lgpm" >&5
6718 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6719 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6720   echo $ECHO_N "(cached) $ECHO_C" >&6
6721 else
6722   ac_check_lib_save_LIBS=$LIBS
6723 LIBS="-lgpm  $LIBS"
6724 cat >conftest.$ac_ext <<_ACEOF
6725 #line 6725 "configure"
6726 #include "confdefs.h"
6727
6728 /* Override any gcc2 internal prototype to avoid an error.  */
6729 #ifdef __cplusplus
6730 extern "C"
6731 #endif
6732 /* We use char because int might match the return type of a gcc2
6733    builtin and then its argument prototype would still apply.  */
6734 char Gpm_Open ();
6735 int
6736 main ()
6737 {
6738 Gpm_Open ();
6739   ;
6740   return 0;
6741 }
6742 _ACEOF
6743 rm -f conftest.$ac_objext conftest$ac_exeext
6744 if { (eval echo "$as_me:6744: \"$ac_link\"") >&5
6745   (eval $ac_link) 2>&5
6746   ac_status=$?
6747   echo "$as_me:6747: \$? = $ac_status" >&5
6748   (exit $ac_status); } &&
6749          { ac_try='test -s conftest$ac_exeext'
6750   { (eval echo "$as_me:6750: \"$ac_try\"") >&5
6751   (eval $ac_try) 2>&5
6752   ac_status=$?
6753   echo "$as_me:6753: \$? = $ac_status" >&5
6754   (exit $ac_status); }; }; then
6755   ac_cv_lib_gpm_Gpm_Open=yes
6756 else
6757   echo "$as_me: failed program was:" >&5
6758 cat conftest.$ac_ext >&5
6759 ac_cv_lib_gpm_Gpm_Open=no
6760 fi
6761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6762 LIBS=$ac_check_lib_save_LIBS
6763 fi
6764 echo "$as_me:6764: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6765 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6766 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6767   echo "$as_me:6767: checking for initscr in -lgpm" >&5
6768 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6769 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6770   echo $ECHO_N "(cached) $ECHO_C" >&6
6771 else
6772   ac_check_lib_save_LIBS=$LIBS
6773 LIBS="-lgpm  $LIBS"
6774 cat >conftest.$ac_ext <<_ACEOF
6775 #line 6775 "configure"
6776 #include "confdefs.h"
6777
6778 /* Override any gcc2 internal prototype to avoid an error.  */
6779 #ifdef __cplusplus
6780 extern "C"
6781 #endif
6782 /* We use char because int might match the return type of a gcc2
6783    builtin and then its argument prototype would still apply.  */
6784 char initscr ();
6785 int
6786 main ()
6787 {
6788 initscr ();
6789   ;
6790   return 0;
6791 }
6792 _ACEOF
6793 rm -f conftest.$ac_objext conftest$ac_exeext
6794 if { (eval echo "$as_me:6794: \"$ac_link\"") >&5
6795   (eval $ac_link) 2>&5
6796   ac_status=$?
6797   echo "$as_me:6797: \$? = $ac_status" >&5
6798   (exit $ac_status); } &&
6799          { ac_try='test -s conftest$ac_exeext'
6800   { (eval echo "$as_me:6800: \"$ac_try\"") >&5
6801   (eval $ac_try) 2>&5
6802   ac_status=$?
6803   echo "$as_me:6803: \$? = $ac_status" >&5
6804   (exit $ac_status); }; }; then
6805   ac_cv_lib_gpm_initscr=yes
6806 else
6807   echo "$as_me: failed program was:" >&5
6808 cat conftest.$ac_ext >&5
6809 ac_cv_lib_gpm_initscr=no
6810 fi
6811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6812 LIBS=$ac_check_lib_save_LIBS
6813 fi
6814 echo "$as_me:6814: result: $ac_cv_lib_gpm_initscr" >&5
6815 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6816 if test $ac_cv_lib_gpm_initscr = yes; then
6817   LIBS="$cf_ncurses_SAVE"
6818 else
6819   cf_ncurses_LIBS="-lgpm"
6820 fi
6821
6822 fi
6823
6824 case $host_os in #(vi
6825 freebsd*)
6826         # This is only necessary if you are linking against an obsolete
6827         # version of ncurses (but it should do no harm, since it's static).
6828         if test "$cf_nculib_root" = ncurses ; then
6829                 echo "$as_me:6829: checking for tgoto in -lmytinfo" >&5
6830 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6831 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6832   echo $ECHO_N "(cached) $ECHO_C" >&6
6833 else
6834   ac_check_lib_save_LIBS=$LIBS
6835 LIBS="-lmytinfo  $LIBS"
6836 cat >conftest.$ac_ext <<_ACEOF
6837 #line 6837 "configure"
6838 #include "confdefs.h"
6839
6840 /* Override any gcc2 internal prototype to avoid an error.  */
6841 #ifdef __cplusplus
6842 extern "C"
6843 #endif
6844 /* We use char because int might match the return type of a gcc2
6845    builtin and then its argument prototype would still apply.  */
6846 char tgoto ();
6847 int
6848 main ()
6849 {
6850 tgoto ();
6851   ;
6852   return 0;
6853 }
6854 _ACEOF
6855 rm -f conftest.$ac_objext conftest$ac_exeext
6856 if { (eval echo "$as_me:6856: \"$ac_link\"") >&5
6857   (eval $ac_link) 2>&5
6858   ac_status=$?
6859   echo "$as_me:6859: \$? = $ac_status" >&5
6860   (exit $ac_status); } &&
6861          { ac_try='test -s conftest$ac_exeext'
6862   { (eval echo "$as_me:6862: \"$ac_try\"") >&5
6863   (eval $ac_try) 2>&5
6864   ac_status=$?
6865   echo "$as_me:6865: \$? = $ac_status" >&5
6866   (exit $ac_status); }; }; then
6867   ac_cv_lib_mytinfo_tgoto=yes
6868 else
6869   echo "$as_me: failed program was:" >&5
6870 cat conftest.$ac_ext >&5
6871 ac_cv_lib_mytinfo_tgoto=no
6872 fi
6873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6874 LIBS=$ac_check_lib_save_LIBS
6875 fi
6876 echo "$as_me:6876: result: $ac_cv_lib_mytinfo_tgoto" >&5
6877 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6878 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6879   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6880 fi
6881
6882         fi
6883         ;;
6884 esac
6885
6886 LIBS="$cf_ncurses_LIBS $LIBS"
6887
6888 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6889 then
6890         LIBS="-l$cf_nculib_root $LIBS"
6891 else
6892
6893         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6894         cf_libdir=""
6895         echo "$as_me:6895: checking for initscr" >&5
6896 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6897 if test "${ac_cv_func_initscr+set}" = set; then
6898   echo $ECHO_N "(cached) $ECHO_C" >&6
6899 else
6900   cat >conftest.$ac_ext <<_ACEOF
6901 #line 6901 "configure"
6902 #include "confdefs.h"
6903 /* System header to define __stub macros and hopefully few prototypes,
6904     which can conflict with char initscr (); below.  */
6905 #include <assert.h>
6906 /* Override any gcc2 internal prototype to avoid an error.  */
6907 #ifdef __cplusplus
6908 extern "C"
6909 #endif
6910 /* We use char because int might match the return type of a gcc2
6911    builtin and then its argument prototype would still apply.  */
6912 char initscr ();
6913 char (*f) ();
6914
6915 int
6916 main ()
6917 {
6918 /* The GNU C library defines this for functions which it implements
6919     to always fail with ENOSYS.  Some functions are actually named
6920     something starting with __ and the normal name is an alias.  */
6921 #if defined (__stub_initscr) || defined (__stub___initscr)
6922 choke me
6923 #else
6924 f = initscr;
6925 #endif
6926
6927   ;
6928   return 0;
6929 }
6930 _ACEOF
6931 rm -f conftest.$ac_objext conftest$ac_exeext
6932 if { (eval echo "$as_me:6932: \"$ac_link\"") >&5
6933   (eval $ac_link) 2>&5
6934   ac_status=$?
6935   echo "$as_me:6935: \$? = $ac_status" >&5
6936   (exit $ac_status); } &&
6937          { ac_try='test -s conftest$ac_exeext'
6938   { (eval echo "$as_me:6938: \"$ac_try\"") >&5
6939   (eval $ac_try) 2>&5
6940   ac_status=$?
6941   echo "$as_me:6941: \$? = $ac_status" >&5
6942   (exit $ac_status); }; }; then
6943   ac_cv_func_initscr=yes
6944 else
6945   echo "$as_me: failed program was:" >&5
6946 cat conftest.$ac_ext >&5
6947 ac_cv_func_initscr=no
6948 fi
6949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6950 fi
6951 echo "$as_me:6951: result: $ac_cv_func_initscr" >&5
6952 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6953 if test $ac_cv_func_initscr = yes; then
6954   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6955 else
6956
6957                 cf_save_LIBS="$LIBS"
6958                 echo "$as_me:6958: checking for initscr in -l$cf_nculib_root" >&5
6959 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6960                 LIBS="-l$cf_nculib_root $LIBS"
6961                 cat >conftest.$ac_ext <<_ACEOF
6962 #line 6962 "configure"
6963 #include "confdefs.h"
6964 #include <${cf_cv_ncurses_header:-curses.h}>
6965 int
6966 main ()
6967 {
6968 initscr()
6969   ;
6970   return 0;
6971 }
6972 _ACEOF
6973 rm -f conftest.$ac_objext conftest$ac_exeext
6974 if { (eval echo "$as_me:6974: \"$ac_link\"") >&5
6975   (eval $ac_link) 2>&5
6976   ac_status=$?
6977   echo "$as_me:6977: \$? = $ac_status" >&5
6978   (exit $ac_status); } &&
6979          { ac_try='test -s conftest$ac_exeext'
6980   { (eval echo "$as_me:6980: \"$ac_try\"") >&5
6981   (eval $ac_try) 2>&5
6982   ac_status=$?
6983   echo "$as_me:6983: \$? = $ac_status" >&5
6984   (exit $ac_status); }; }; then
6985   echo "$as_me:6985: result: yes" >&5
6986 echo "${ECHO_T}yes" >&6
6987                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6988
6989 else
6990   echo "$as_me: failed program was:" >&5
6991 cat conftest.$ac_ext >&5
6992 echo "$as_me:6992: result: no" >&5
6993 echo "${ECHO_T}no" >&6
6994
6995 cf_search=
6996 cf_library_path_list=""
6997 if test -n "${LDFLAGS}${LIBS}" ; then
6998         for cf_library_path in $LDFLAGS $LIBS
6999         do
7000                 case $cf_library_path in #(vi
7001                 -L*)
7002                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7003
7004 test "$cf_library_path" != "NONE" && \
7005 test -d "$cf_library_path" && \
7006  {
7007         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7008         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7009         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7010         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7011         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7012         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"
7013 }
7014
7015                         cf_library_path_list="$cf_library_path_list $cf_search"
7016                         ;;
7017                 esac
7018         done
7019 fi
7020
7021 cf_search=
7022
7023 test "/usr" != "$prefix" && \
7024 test -d "/usr" && \
7025 (test $prefix = NONE || test "/usr" != "$prefix") && {
7026         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7027         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7028         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7029         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7030         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7031         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7032 }
7033
7034 test "$prefix" != "NONE" && \
7035 test -d "$prefix" && \
7036  {
7037         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7038         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7039         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7040         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7041         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7042         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7043 }
7044
7045 test "/usr/local" != "$prefix" && \
7046 test -d "/usr/local" && \
7047 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7048         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7049         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7050         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7051         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7052         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7053         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7054 }
7055
7056 test "/opt" != "$prefix" && \
7057 test -d "/opt" && \
7058 (test $prefix = NONE || test "/opt" != "$prefix") && {
7059         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7060         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7061         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7062         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7063         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7064         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7065 }
7066
7067 test "$HOME" != "$prefix" && \
7068 test -d "$HOME" && \
7069 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7070         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7071         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7072         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7073         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7074         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7075         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7076 }
7077
7078 cf_search="$cf_library_path_list $cf_search"
7079
7080                         for cf_libdir in $cf_search
7081                         do
7082                                 echo "$as_me:7082: checking for -l$cf_nculib_root in $cf_libdir" >&5
7083 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7084                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7085                                 cat >conftest.$ac_ext <<_ACEOF
7086 #line 7086 "configure"
7087 #include "confdefs.h"
7088 #include <${cf_cv_ncurses_header:-curses.h}>
7089 int
7090 main ()
7091 {
7092 initscr()
7093   ;
7094   return 0;
7095 }
7096 _ACEOF
7097 rm -f conftest.$ac_objext conftest$ac_exeext
7098 if { (eval echo "$as_me:7098: \"$ac_link\"") >&5
7099   (eval $ac_link) 2>&5
7100   ac_status=$?
7101   echo "$as_me:7101: \$? = $ac_status" >&5
7102   (exit $ac_status); } &&
7103          { ac_try='test -s conftest$ac_exeext'
7104   { (eval echo "$as_me:7104: \"$ac_try\"") >&5
7105   (eval $ac_try) 2>&5
7106   ac_status=$?
7107   echo "$as_me:7107: \$? = $ac_status" >&5
7108   (exit $ac_status); }; }; then
7109   echo "$as_me:7109: result: yes" >&5
7110 echo "${ECHO_T}yes" >&6
7111                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7112                                          break
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 cat conftest.$ac_ext >&5
7116 echo "$as_me:7116: result: no" >&5
7117 echo "${ECHO_T}no" >&6
7118                                          LIBS="$cf_save_LIBS"
7119 fi
7120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7121                         done
7122
7123 fi
7124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7125
7126 fi
7127
7128 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7129
7130 if test $cf_found_library = no ; then
7131         { { echo "$as_me:7131: error: Cannot link $cf_nculib_root library" >&5
7132 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7133    { (exit 1); exit 1; }; }
7134 fi
7135
7136 fi
7137
7138 if test -n "$cf_ncurses_LIBS" ; then
7139         echo "$as_me:7139: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7140 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7141         cf_ncurses_SAVE="$LIBS"
7142         for p in $cf_ncurses_LIBS ; do
7143                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7144                 if test "$q" != "$LIBS" ; then
7145                         LIBS="$q"
7146                 fi
7147         done
7148         cat >conftest.$ac_ext <<_ACEOF
7149 #line 7149 "configure"
7150 #include "confdefs.h"
7151 #include <${cf_cv_ncurses_header:-curses.h}>
7152 int
7153 main ()
7154 {
7155 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7156   ;
7157   return 0;
7158 }
7159 _ACEOF
7160 rm -f conftest.$ac_objext conftest$ac_exeext
7161 if { (eval echo "$as_me:7161: \"$ac_link\"") >&5
7162   (eval $ac_link) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); } &&
7166          { ac_try='test -s conftest$ac_exeext'
7167   { (eval echo "$as_me:7167: \"$ac_try\"") >&5
7168   (eval $ac_try) 2>&5
7169   ac_status=$?
7170   echo "$as_me:7170: \$? = $ac_status" >&5
7171   (exit $ac_status); }; }; then
7172   echo "$as_me:7172: result: yes" >&5
7173 echo "${ECHO_T}yes" >&6
7174 else
7175   echo "$as_me: failed program was:" >&5
7176 cat conftest.$ac_ext >&5
7177 echo "$as_me:7177: result: no" >&5
7178 echo "${ECHO_T}no" >&6
7179                  LIBS="$cf_ncurses_SAVE"
7180 fi
7181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7182 fi
7183
7184 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7185
7186 cat >>confdefs.h <<EOF
7187 #define $cf_nculib_ROOT 1
7188 EOF
7189
7190 fi
7191
7192 fi
7193
7194 if test "$NCURSES_CONFIG" != none ; then
7195
7196 cf_version=`$NCURSES_CONFIG --version`
7197
7198 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7199 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
7200 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
7201
7202 # ABI version is not available from headers
7203 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7204
7205 else
7206
7207 for cf_name in MAJOR MINOR PATCH
7208 do
7209 cat >conftest.$ac_ext <<CF_EOF
7210 #include <${cf_cv_ncurses_header:-curses.h}>
7211 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7212 CF_EOF
7213         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7214         { (eval echo "$as_me:7214: \"$cf_try\"") >&5
7215   (eval $cf_try) 2>&5
7216   ac_status=$?
7217   echo "$as_me:7217: \$? = $ac_status" >&5
7218   (exit $ac_status); }
7219         if test -f conftest.out ; then
7220                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ][      ]*//"`
7221                 eval NCURSES_$cf_name=\"$cf_result\"
7222                 # cat conftest.$ac_ext
7223                 # cat conftest.out
7224         fi
7225 done
7226
7227 cf_cv_abi_version=${NCURSES_MAJOR}
7228
7229 fi
7230
7231 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7232
7233 cf_cv_timestamp=`date`
7234
7235 echo "$as_me:7235: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7236 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7237
7238         case $cf_cv_system_name in #(vi
7239         OS/2*|os2*) #(vi
7240         LIB_PREFIX=''
7241         ;;
7242         *)      LIB_PREFIX='lib'
7243         ;;
7244         esac
7245 cf_prefix=$LIB_PREFIX
7246
7247 LIB_PREFIX=$cf_prefix
7248
7249 LIB_SUFFIX=
7250
7251 ###############################################################################
7252
7253 if test X"$CC_G_OPT" = X"" ; then
7254         CC_G_OPT='-g'
7255         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7256 fi
7257
7258 echo "$as_me:7258: checking for default loader flags" >&5
7259 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7260 case $DFT_LWR_MODEL in
7261 normal)  LD_MODEL=''   ;;
7262 debug)   LD_MODEL=$CC_G_OPT ;;
7263 profile) LD_MODEL='-pg';;
7264 shared)  LD_MODEL=''   ;;
7265 esac
7266 echo "$as_me:7266: result: $LD_MODEL" >&5
7267 echo "${ECHO_T}$LD_MODEL" >&6
7268
7269 LD_RPATH_OPT=
7270 echo "$as_me:7270: checking for an rpath option" >&5
7271 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7272 case $cf_cv_system_name in #(vi
7273 irix*) #(vi
7274         if test "$GCC" = yes; then
7275                 LD_RPATH_OPT="-Wl,-rpath,"
7276         else
7277                 LD_RPATH_OPT="-rpath "
7278         fi
7279         ;;
7280 linux*|gnu*|k*bsd*-gnu) #(vi
7281         LD_RPATH_OPT="-Wl,-rpath,"
7282         ;;
7283 openbsd[2-9].*) #(vi
7284         LD_RPATH_OPT="-Wl,-rpath,"
7285         ;;
7286 freebsd*) #(vi
7287         LD_RPATH_OPT="-rpath "
7288         ;;
7289 netbsd*) #(vi
7290         LD_RPATH_OPT="-Wl,-rpath,"
7291         ;;
7292 osf*|mls+*) #(vi
7293         LD_RPATH_OPT="-rpath "
7294         ;;
7295 solaris2*) #(vi
7296         LD_RPATH_OPT="-R"
7297         ;;
7298 *)
7299         ;;
7300 esac
7301 echo "$as_me:7301: result: $LD_RPATH_OPT" >&5
7302 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7303
7304 case "x$LD_RPATH_OPT" in #(vi
7305 x-R*)
7306         echo "$as_me:7306: checking if we need a space after rpath option" >&5
7307 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7308         cf_save_LIBS="$LIBS"
7309         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7310         cat >conftest.$ac_ext <<_ACEOF
7311 #line 7311 "configure"
7312 #include "confdefs.h"
7313
7314 int
7315 main ()
7316 {
7317
7318   ;
7319   return 0;
7320 }
7321 _ACEOF
7322 rm -f conftest.$ac_objext conftest$ac_exeext
7323 if { (eval echo "$as_me:7323: \"$ac_link\"") >&5
7324   (eval $ac_link) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); } &&
7328          { ac_try='test -s conftest$ac_exeext'
7329   { (eval echo "$as_me:7329: \"$ac_try\"") >&5
7330   (eval $ac_try) 2>&5
7331   ac_status=$?
7332   echo "$as_me:7332: \$? = $ac_status" >&5
7333   (exit $ac_status); }; }; then
7334   cf_rpath_space=no
7335 else
7336   echo "$as_me: failed program was:" >&5
7337 cat conftest.$ac_ext >&5
7338 cf_rpath_space=yes
7339 fi
7340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7341         LIBS="$cf_save_LIBS"
7342         echo "$as_me:7342: result: $cf_rpath_space" >&5
7343 echo "${ECHO_T}$cf_rpath_space" >&6
7344         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7345         ;;
7346 esac
7347
7348         LOCAL_LDFLAGS=
7349         LOCAL_LDFLAGS2=
7350         LD_SHARED_OPTS=
7351         INSTALL_LIB="-m 644"
7352
7353         cf_cv_do_symlinks=no
7354         cf_ld_rpath_opt=
7355         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7356
7357         echo "$as_me:7357: checking if release/abi version should be used for shared libs" >&5
7358 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7359
7360 # Check whether --with-shlib-version or --without-shlib-version was given.
7361 if test "${with_shlib_version+set}" = set; then
7362   withval="$with_shlib_version"
7363   test -z "$withval" && withval=auto
7364         case $withval in #(vi
7365         yes) #(vi
7366                 cf_cv_shlib_version=auto
7367                 ;;
7368         rel|abi|auto|no) #(vi
7369                 cf_cv_shlib_version=$withval
7370                 ;;
7371         *)
7372                 { { echo "$as_me:7372: error: option value must be one of: rel, abi, auto or no" >&5
7373 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7374    { (exit 1); exit 1; }; }
7375                 ;;
7376         esac
7377
7378 else
7379   cf_cv_shlib_version=auto
7380 fi;
7381         echo "$as_me:7381: result: $cf_cv_shlib_version" >&5
7382 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7383
7384         cf_cv_rm_so_locs=no
7385
7386         # Some less-capable ports of gcc support only -fpic
7387         CC_SHARED_OPTS=
7388         if test "$GCC" = yes
7389         then
7390                 echo "$as_me:7390: checking which $CC option to use" >&5
7391 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7392                 cf_save_CFLAGS="$CFLAGS"
7393                 for CC_SHARED_OPTS in -fPIC -fpic ''
7394                 do
7395                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7396                         cat >conftest.$ac_ext <<_ACEOF
7397 #line 7397 "configure"
7398 #include "confdefs.h"
7399 #include <stdio.h>
7400 int
7401 main ()
7402 {
7403 int x = 1
7404   ;
7405   return 0;
7406 }
7407 _ACEOF
7408 rm -f conftest.$ac_objext
7409 if { (eval echo "$as_me:7409: \"$ac_compile\"") >&5
7410   (eval $ac_compile) 2>&5
7411   ac_status=$?
7412   echo "$as_me:7412: \$? = $ac_status" >&5
7413   (exit $ac_status); } &&
7414          { ac_try='test -s conftest.$ac_objext'
7415   { (eval echo "$as_me:7415: \"$ac_try\"") >&5
7416   (eval $ac_try) 2>&5
7417   ac_status=$?
7418   echo "$as_me:7418: \$? = $ac_status" >&5
7419   (exit $ac_status); }; }; then
7420   break
7421 else
7422   echo "$as_me: failed program was:" >&5
7423 cat conftest.$ac_ext >&5
7424 fi
7425 rm -f conftest.$ac_objext conftest.$ac_ext
7426                 done
7427                 echo "$as_me:7427: result: $CC_SHARED_OPTS" >&5
7428 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7429                 CFLAGS="$cf_save_CFLAGS"
7430         fi
7431
7432         cf_cv_shlib_version_infix=no
7433
7434         case $cf_cv_system_name in #(vi
7435         aix[56]*) #(vi
7436                 if test "$GCC" = yes; then
7437                         CC_SHARED_OPTS=
7438                         MK_SHARED_LIB='$(CC) -shared'
7439                 fi
7440                 ;;
7441         beos*) #(vi
7442                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7443                 ;;
7444         cygwin*) #(vi
7445                 CC_SHARED_OPTS=
7446                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7447                 cf_cv_shlib_version=cygdll
7448                 cf_cv_shlib_version_infix=cygdll
7449                 cat >mk_shared_lib.sh <<-CF_EOF
7450                 #!/bin/sh
7451                 SHARED_LIB=\$1
7452                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7453                 shift
7454                 cat <<-EOF
7455                 Linking shared library
7456                 ** SHARED_LIB \$SHARED_LIB
7457                 ** IMPORT_LIB \$IMPORT_LIB
7458 EOF
7459                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7460 CF_EOF
7461                 chmod +x mk_shared_lib.sh
7462                 ;;
7463         darwin*) #(vi
7464                 EXTRA_CFLAGS="-no-cpp-precomp"
7465                 CC_SHARED_OPTS="-dynamic"
7466                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7467                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7468                 cf_cv_shlib_version_infix=yes
7469                 echo "$as_me:7469: checking if ld -search_paths_first works" >&5
7470 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7471 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7472   echo $ECHO_N "(cached) $ECHO_C" >&6
7473 else
7474
7475                         cf_save_LDFLAGS=$LDFLAGS
7476                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7477                         cat >conftest.$ac_ext <<_ACEOF
7478 #line 7478 "configure"
7479 #include "confdefs.h"
7480
7481 int
7482 main ()
7483 {
7484 int i;
7485   ;
7486   return 0;
7487 }
7488 _ACEOF
7489 rm -f conftest.$ac_objext conftest$ac_exeext
7490 if { (eval echo "$as_me:7490: \"$ac_link\"") >&5
7491   (eval $ac_link) 2>&5
7492   ac_status=$?
7493   echo "$as_me:7493: \$? = $ac_status" >&5
7494   (exit $ac_status); } &&
7495          { ac_try='test -s conftest$ac_exeext'
7496   { (eval echo "$as_me:7496: \"$ac_try\"") >&5
7497   (eval $ac_try) 2>&5
7498   ac_status=$?
7499   echo "$as_me:7499: \$? = $ac_status" >&5
7500   (exit $ac_status); }; }; then
7501   cf_cv_ldflags_search_paths_first=yes
7502 else
7503   echo "$as_me: failed program was:" >&5
7504 cat conftest.$ac_ext >&5
7505 cf_cv_ldflags_search_paths_first=no
7506 fi
7507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7508                                 LDFLAGS=$cf_save_LDFLAGS
7509 fi
7510 echo "$as_me:7510: result: $cf_cv_ldflags_search_paths_first" >&5
7511 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7512                 if test $cf_cv_ldflags_search_paths_first = yes; then
7513                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7514                 fi
7515                 ;;
7516         hpux*) #(vi
7517                 # (tested with gcc 2.7.2 -- I don't have c89)
7518                 if test "$GCC" = yes; then
7519                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7520                 else
7521                         CC_SHARED_OPTS='+Z'
7522                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7523                 fi
7524                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7525                 # HP-UX shared libraries must be executable, and should be
7526                 # readonly to exploit a quirk in the memory manager.
7527                 INSTALL_LIB="-m 555"
7528                 ;;
7529         irix*) #(vi
7530                 if test "$cf_cv_enable_rpath" = yes ; then
7531                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7532                 fi
7533                 # tested with IRIX 5.2 and 'cc'.
7534                 if test "$GCC" != yes; then
7535                         CC_SHARED_OPTS='-KPIC'
7536                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7537                 else
7538                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7539                 fi
7540                 cf_cv_rm_so_locs=yes
7541                 ;;
7542         linux*|gnu*|k*bsd*-gnu) #(vi
7543                 if test "$DFT_LWR_MODEL" = "shared" ; then
7544                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7545                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7546                 fi
7547                 if test "$cf_cv_enable_rpath" = yes ; then
7548                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7549                 fi
7550
7551         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7552         if test "$cf_cv_shlib_version" = rel; then
7553                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7554         else
7555                 cf_cv_shared_soname='`basename $@`'
7556         fi
7557
7558                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7559                 ;;
7560         openbsd[2-9].*) #(vi
7561                 if test "$DFT_LWR_MODEL" = "shared" ; then
7562                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7563                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7564                 fi
7565                 if test "$cf_cv_enable_rpath" = yes ; then
7566                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7567                 fi
7568                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7569
7570         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7571         if test "$cf_cv_shlib_version" = rel; then
7572                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7573         else
7574                 cf_cv_shared_soname='`basename $@`'
7575         fi
7576
7577                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7578                 ;;
7579         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7580                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7581                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7582                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7583                 ;;
7584         freebsd*) #(vi
7585                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7586                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7587                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7588                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7589                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7590                 fi
7591
7592         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7593         if test "$cf_cv_shlib_version" = rel; then
7594                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7595         else
7596                 cf_cv_shared_soname='`basename $@`'
7597         fi
7598
7599                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7600                 ;;
7601         netbsd*) #(vi
7602                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7603                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7604                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7605                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7606                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7607                         if test "$cf_cv_shlib_version" = auto; then
7608                         if test -f /usr/libexec/ld.elf_so; then
7609                                 cf_cv_shlib_version=abi
7610                         else
7611                                 cf_cv_shlib_version=rel
7612                         fi
7613                         fi
7614
7615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7616         if test "$cf_cv_shlib_version" = rel; then
7617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7618         else
7619                 cf_cv_shared_soname='`basename $@`'
7620         fi
7621
7622                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7623                 else
7624                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7625                 fi
7626                 ;;
7627         osf*|mls+*) #(vi
7628                 # tested with OSF/1 V3.2 and 'cc'
7629                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7630                 # link with shared libs).
7631                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7632                 case $host_os in #(vi
7633                 osf4*)
7634                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7635                         ;;
7636                 esac
7637                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7638                 if test "$DFT_LWR_MODEL" = "shared" ; then
7639                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7640                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7641                 fi
7642                 cf_cv_rm_so_locs=yes
7643                 ;;
7644         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7645                 # tested with osr5.0.5
7646                 if test "$GCC" != yes; then
7647                         CC_SHARED_OPTS='-belf -KPIC'
7648                 fi
7649                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7650                 if test "$cf_cv_enable_rpath" = yes ; then
7651                         # only way is to set LD_RUN_PATH but no switch for it
7652                         RUN_PATH=$libdir
7653                 fi
7654                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7655                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7656                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7657                 ;;
7658         sunos4*) #(vi
7659                 # tested with SunOS 4.1.1 and gcc 2.7.0
7660                 if test "$GCC" != yes; then
7661                         CC_SHARED_OPTS='-KPIC'
7662                 fi
7663                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7664                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7665                 ;;
7666         solaris2*) #(vi
7667                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7668                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7669                 if test "$DFT_LWR_MODEL" = "shared" ; then
7670                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7671                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7672                 fi
7673                 if test "$cf_cv_enable_rpath" = yes ; then
7674                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7675                 fi
7676
7677         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7678         if test "$cf_cv_shlib_version" = rel; then
7679                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7680         else
7681                 cf_cv_shared_soname='`basename $@`'
7682         fi
7683
7684                 if test "$GCC" != yes; then
7685                         cf_save_CFLAGS="$CFLAGS"
7686                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7687                         do
7688                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7689                                 cat >conftest.$ac_ext <<_ACEOF
7690 #line 7690 "configure"
7691 #include "confdefs.h"
7692 #include <stdio.h>
7693 int
7694 main ()
7695 {
7696 printf("Hello\n");
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 rm -f conftest.$ac_objext
7702 if { (eval echo "$as_me:7702: \"$ac_compile\"") >&5
7703   (eval $ac_compile) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit $ac_status); } &&
7707          { ac_try='test -s conftest.$ac_objext'
7708   { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7709   (eval $ac_try) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit $ac_status); }; }; then
7713   break
7714 else
7715   echo "$as_me: failed program was:" >&5
7716 cat conftest.$ac_ext >&5
7717 fi
7718 rm -f conftest.$ac_objext conftest.$ac_ext
7719                         done
7720                         CFLAGS="$cf_save_CFLAGS"
7721                         CC_SHARED_OPTS=$cf_shared_opts
7722                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7723                 else
7724                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7725                 fi
7726                 ;;
7727         sysv5uw7*|unix_sv*) #(vi
7728                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7729                 if test "$GCC" != yes; then
7730                         CC_SHARED_OPTS='-KPIC'
7731                 fi
7732                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7733                 ;;
7734         *)
7735                 CC_SHARED_OPTS='unknown'
7736                 MK_SHARED_LIB='echo unknown'
7737                 ;;
7738         esac
7739
7740         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7741         case "$cf_cv_shlib_version" in #(vi
7742         rel|abi)
7743                 case "$MK_SHARED_LIB" in #(vi
7744                 *'-o $@') #(vi
7745                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7746                         ;;
7747                 *)
7748                         { echo "$as_me:7748: WARNING: ignored --with-shlib-version" >&5
7749 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7750                         ;;
7751                 esac
7752                 ;;
7753         esac
7754
7755         if test -n "$cf_ld_rpath_opt" ; then
7756                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7757         fi
7758
7759 # The test/sample programs in the original tree link using rpath option.
7760 # Make it optional for packagers.
7761 if test -n "$LOCAL_LDFLAGS"
7762 then
7763         echo "$as_me:7763: checking if you want to link sample programs with rpath option" >&5
7764 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
7765
7766 # Check whether --enable-rpath-link or --disable-rpath-link was given.
7767 if test "${enable_rpath_link+set}" = set; then
7768   enableval="$enable_rpath_link"
7769   with_rpath_link=$enableval
7770 else
7771   with_rpath_link=yes
7772 fi;
7773         echo "$as_me:7773: result: $with_rpath_link" >&5
7774 echo "${ECHO_T}$with_rpath_link" >&6
7775         if test "$with_rpath_link" = no
7776         then
7777                 LOCAL_LDFLAGS=
7778                 LOCAL_LDFLAGS2=
7779         fi
7780 fi
7781
7782 ###############################################################################
7783
7784         case $cf_cv_system_name in
7785         os2*)   PATH_SEPARATOR=';'  ;;
7786         *)      PATH_SEPARATOR=':'  ;;
7787         esac
7788
7789 ###   use option --enable-broken-linker to force on use of broken-linker support
7790 echo "$as_me:7790: checking if you want broken-linker support code" >&5
7791 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7792
7793 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7794 if test "${enable_broken_linker+set}" = set; then
7795   enableval="$enable_broken_linker"
7796   with_broken_linker=$enableval
7797 else
7798   with_broken_linker=${BROKEN_LINKER:-no}
7799 fi;
7800 echo "$as_me:7800: result: $with_broken_linker" >&5
7801 echo "${ECHO_T}$with_broken_linker" >&6
7802
7803 BROKEN_LINKER=0
7804 if test "$with_broken_linker" = yes ; then
7805         cat >>confdefs.h <<\EOF
7806 #define BROKEN_LINKER 1
7807 EOF
7808
7809         BROKEN_LINKER=1
7810 elif test "$DFT_LWR_MODEL" = shared ; then
7811         case $cf_cv_system_name in #(vi
7812         cygwin*)
7813                 cat >>confdefs.h <<\EOF
7814 #define BROKEN_LINKER 1
7815 EOF
7816
7817                 BROKEN_LINKER=1
7818                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7819
7820 echo "${as_me:-configure}:7820: testing cygwin linker is broken anyway ..." 1>&5
7821
7822                 ;;
7823         esac
7824 fi
7825
7826 # Check to define _XOPEN_SOURCE "automatically"
7827
7828 cf_XOPEN_SOURCE=500
7829 cf_POSIX_C_SOURCE=199506L
7830 cf_xopen_source=
7831
7832 case $host_os in #(vi
7833 aix[456]*) #(vi
7834         cf_xopen_source="-D_ALL_SOURCE"
7835         ;;
7836 cygwin) #(vi
7837         cf_XOPEN_SOURCE=600
7838         ;;
7839 darwin[0-8].*) #(vi
7840         cf_xopen_source="-D_APPLE_C_SOURCE"
7841         ;;
7842 darwin*) #(vi
7843         cf_xopen_source="-D_DARWIN_C_SOURCE"
7844         ;;
7845 freebsd*|dragonfly*) #(vi
7846         # 5.x headers associate
7847         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7848         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7849         cf_POSIX_C_SOURCE=200112L
7850         cf_XOPEN_SOURCE=600
7851         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7852         ;;
7853 hpux11*) #(vi
7854         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7855         ;;
7856 hpux*) #(vi
7857         cf_xopen_source="-D_HPUX_SOURCE"
7858         ;;
7859 irix[56].*) #(vi
7860         cf_xopen_source="-D_SGI_SOURCE"
7861         ;;
7862 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7863
7864 echo "$as_me:7864: checking if we must define _GNU_SOURCE" >&5
7865 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7866 if test "${cf_cv_gnu_source+set}" = set; then
7867   echo $ECHO_N "(cached) $ECHO_C" >&6
7868 else
7869
7870 cat >conftest.$ac_ext <<_ACEOF
7871 #line 7871 "configure"
7872 #include "confdefs.h"
7873 #include <sys/types.h>
7874 int
7875 main ()
7876 {
7877
7878 #ifndef _XOPEN_SOURCE
7879 make an error
7880 #endif
7881   ;
7882   return 0;
7883 }
7884 _ACEOF
7885 rm -f conftest.$ac_objext
7886 if { (eval echo "$as_me:7886: \"$ac_compile\"") >&5
7887   (eval $ac_compile) 2>&5
7888   ac_status=$?
7889   echo "$as_me:7889: \$? = $ac_status" >&5
7890   (exit $ac_status); } &&
7891          { ac_try='test -s conftest.$ac_objext'
7892   { (eval echo "$as_me:7892: \"$ac_try\"") >&5
7893   (eval $ac_try) 2>&5
7894   ac_status=$?
7895   echo "$as_me:7895: \$? = $ac_status" >&5
7896   (exit $ac_status); }; }; then
7897   cf_cv_gnu_source=no
7898 else
7899   echo "$as_me: failed program was:" >&5
7900 cat conftest.$ac_ext >&5
7901 cf_save="$CPPFLAGS"
7902          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7903          cat >conftest.$ac_ext <<_ACEOF
7904 #line 7904 "configure"
7905 #include "confdefs.h"
7906 #include <sys/types.h>
7907 int
7908 main ()
7909 {
7910
7911 #ifdef _XOPEN_SOURCE
7912 make an error
7913 #endif
7914   ;
7915   return 0;
7916 }
7917 _ACEOF
7918 rm -f conftest.$ac_objext
7919 if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
7920   (eval $ac_compile) 2>&5
7921   ac_status=$?
7922   echo "$as_me:7922: \$? = $ac_status" >&5
7923   (exit $ac_status); } &&
7924          { ac_try='test -s conftest.$ac_objext'
7925   { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); }; }; then
7930   cf_cv_gnu_source=no
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934 cf_cv_gnu_source=yes
7935 fi
7936 rm -f conftest.$ac_objext conftest.$ac_ext
7937         CPPFLAGS="$cf_save"
7938
7939 fi
7940 rm -f conftest.$ac_objext conftest.$ac_ext
7941
7942 fi
7943 echo "$as_me:7943: result: $cf_cv_gnu_source" >&5
7944 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7945 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7946
7947         ;;
7948 mirbsd*) #(vi
7949         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7950         ;;
7951 netbsd*) #(vi
7952         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7953         ;;
7954 openbsd*) #(vi
7955         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7956         ;;
7957 osf[45]*) #(vi
7958         cf_xopen_source="-D_OSF_SOURCE"
7959         ;;
7960 nto-qnx*) #(vi
7961         cf_xopen_source="-D_QNX_SOURCE"
7962         ;;
7963 sco*) #(vi
7964         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7965         ;;
7966 solaris2.1[0-9]) #(vi
7967         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7968         ;;
7969 solaris2.[1-9]) #(vi
7970         cf_xopen_source="-D__EXTENSIONS__"
7971         ;;
7972 *)
7973         echo "$as_me:7973: checking if we should define _XOPEN_SOURCE" >&5
7974 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7975 if test "${cf_cv_xopen_source+set}" = set; then
7976   echo $ECHO_N "(cached) $ECHO_C" >&6
7977 else
7978
7979         cat >conftest.$ac_ext <<_ACEOF
7980 #line 7980 "configure"
7981 #include "confdefs.h"
7982 #include <sys/types.h>
7983 int
7984 main ()
7985 {
7986
7987 #ifndef _XOPEN_SOURCE
7988 make an error
7989 #endif
7990   ;
7991   return 0;
7992 }
7993 _ACEOF
7994 rm -f conftest.$ac_objext
7995 if { (eval echo "$as_me:7995: \"$ac_compile\"") >&5
7996   (eval $ac_compile) 2>&5
7997   ac_status=$?
7998   echo "$as_me:7998: \$? = $ac_status" >&5
7999   (exit $ac_status); } &&
8000          { ac_try='test -s conftest.$ac_objext'
8001   { (eval echo "$as_me:8001: \"$ac_try\"") >&5
8002   (eval $ac_try) 2>&5
8003   ac_status=$?
8004   echo "$as_me:8004: \$? = $ac_status" >&5
8005   (exit $ac_status); }; }; then
8006   cf_cv_xopen_source=no
8007 else
8008   echo "$as_me: failed program was:" >&5
8009 cat conftest.$ac_ext >&5
8010 cf_save="$CPPFLAGS"
8011          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8012          cat >conftest.$ac_ext <<_ACEOF
8013 #line 8013 "configure"
8014 #include "confdefs.h"
8015 #include <sys/types.h>
8016 int
8017 main ()
8018 {
8019
8020 #ifdef _XOPEN_SOURCE
8021 make an error
8022 #endif
8023   ;
8024   return 0;
8025 }
8026 _ACEOF
8027 rm -f conftest.$ac_objext
8028 if { (eval echo "$as_me:8028: \"$ac_compile\"") >&5
8029   (eval $ac_compile) 2>&5
8030   ac_status=$?
8031   echo "$as_me:8031: \$? = $ac_status" >&5
8032   (exit $ac_status); } &&
8033          { ac_try='test -s conftest.$ac_objext'
8034   { (eval echo "$as_me:8034: \"$ac_try\"") >&5
8035   (eval $ac_try) 2>&5
8036   ac_status=$?
8037   echo "$as_me:8037: \$? = $ac_status" >&5
8038   (exit $ac_status); }; }; then
8039   cf_cv_xopen_source=no
8040 else
8041   echo "$as_me: failed program was:" >&5
8042 cat conftest.$ac_ext >&5
8043 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8044 fi
8045 rm -f conftest.$ac_objext conftest.$ac_ext
8046         CPPFLAGS="$cf_save"
8047
8048 fi
8049 rm -f conftest.$ac_objext conftest.$ac_ext
8050
8051 fi
8052 echo "$as_me:8052: result: $cf_cv_xopen_source" >&5
8053 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8054         if test "$cf_cv_xopen_source" != no ; then
8055
8056 CFLAGS=`echo "$CFLAGS" | \
8057         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8058                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8059
8060 CPPFLAGS=`echo "$CPPFLAGS" | \
8061         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8062                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8063
8064                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8065
8066 cf_fix_cppflags=no
8067 cf_new_cflags=
8068 cf_new_cppflags=
8069 cf_new_extra_cppflags=
8070
8071 for cf_add_cflags in $cf_temp_xopen_source
8072 do
8073 case $cf_fix_cppflags in
8074 no)
8075         case $cf_add_cflags in #(vi
8076         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8077                 case $cf_add_cflags in
8078                 -D*)
8079                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8080
8081                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8082                                 && test -z "${cf_tst_cflags}" \
8083                                 && cf_fix_cppflags=yes
8084
8085                         if test $cf_fix_cppflags = yes ; then
8086                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8087                                 continue
8088                         elif test "${cf_tst_cflags}" = "\"'" ; then
8089                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8090                                 continue
8091                         fi
8092                         ;;
8093                 esac
8094                 case "$CPPFLAGS" in
8095                 *$cf_add_cflags) #(vi
8096                         ;;
8097                 *) #(vi
8098                         case $cf_add_cflags in #(vi
8099                         -D*)
8100                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8101
8102 CPPFLAGS=`echo "$CPPFLAGS" | \
8103         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8104                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8105
8106                                 ;;
8107                         esac
8108                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8109                         ;;
8110                 esac
8111                 ;;
8112         *)
8113                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8114                 ;;
8115         esac
8116         ;;
8117 yes)
8118         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8119
8120         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8121
8122         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8123                 && test -z "${cf_tst_cflags}" \
8124                 && cf_fix_cppflags=no
8125         ;;
8126 esac
8127 done
8128
8129 if test -n "$cf_new_cflags" ; then
8130
8131         CFLAGS="$CFLAGS $cf_new_cflags"
8132 fi
8133
8134 if test -n "$cf_new_cppflags" ; then
8135
8136         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8137 fi
8138
8139 if test -n "$cf_new_extra_cppflags" ; then
8140
8141         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8142 fi
8143
8144         fi
8145
8146 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8147
8148 cf_save_CFLAGS="$CFLAGS"
8149 cf_save_CPPFLAGS="$CPPFLAGS"
8150
8151 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8152         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8153                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8154
8155 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8156         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8157                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8158
8159 echo "$as_me:8159: checking if we should define _POSIX_C_SOURCE" >&5
8160 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8161 if test "${cf_cv_posix_c_source+set}" = set; then
8162   echo $ECHO_N "(cached) $ECHO_C" >&6
8163 else
8164
8165 echo "${as_me:-configure}:8165: testing if the symbol is already defined go no further ..." 1>&5
8166
8167         cat >conftest.$ac_ext <<_ACEOF
8168 #line 8168 "configure"
8169 #include "confdefs.h"
8170 #include <sys/types.h>
8171 int
8172 main ()
8173 {
8174
8175 #ifndef _POSIX_C_SOURCE
8176 make an error
8177 #endif
8178   ;
8179   return 0;
8180 }
8181 _ACEOF
8182 rm -f conftest.$ac_objext
8183 if { (eval echo "$as_me:8183: \"$ac_compile\"") >&5
8184   (eval $ac_compile) 2>&5
8185   ac_status=$?
8186   echo "$as_me:8186: \$? = $ac_status" >&5
8187   (exit $ac_status); } &&
8188          { ac_try='test -s conftest.$ac_objext'
8189   { (eval echo "$as_me:8189: \"$ac_try\"") >&5
8190   (eval $ac_try) 2>&5
8191   ac_status=$?
8192   echo "$as_me:8192: \$? = $ac_status" >&5
8193   (exit $ac_status); }; }; then
8194   cf_cv_posix_c_source=no
8195 else
8196   echo "$as_me: failed program was:" >&5
8197 cat conftest.$ac_ext >&5
8198 cf_want_posix_source=no
8199          case .$cf_POSIX_C_SOURCE in #(vi
8200          .[12]??*) #(vi
8201                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8202                 ;;
8203          .2) #(vi
8204                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8205                 cf_want_posix_source=yes
8206                 ;;
8207          .*)
8208                 cf_want_posix_source=yes
8209                 ;;
8210          esac
8211          if test "$cf_want_posix_source" = yes ; then
8212                 cat >conftest.$ac_ext <<_ACEOF
8213 #line 8213 "configure"
8214 #include "confdefs.h"
8215 #include <sys/types.h>
8216 int
8217 main ()
8218 {
8219
8220 #ifdef _POSIX_SOURCE
8221 make an error
8222 #endif
8223   ;
8224   return 0;
8225 }
8226 _ACEOF
8227 rm -f conftest.$ac_objext
8228 if { (eval echo "$as_me:8228: \"$ac_compile\"") >&5
8229   (eval $ac_compile) 2>&5
8230   ac_status=$?
8231   echo "$as_me:8231: \$? = $ac_status" >&5
8232   (exit $ac_status); } &&
8233          { ac_try='test -s conftest.$ac_objext'
8234   { (eval echo "$as_me:8234: \"$ac_try\"") >&5
8235   (eval $ac_try) 2>&5
8236   ac_status=$?
8237   echo "$as_me:8237: \$? = $ac_status" >&5
8238   (exit $ac_status); }; }; then
8239   :
8240 else
8241   echo "$as_me: failed program was:" >&5
8242 cat conftest.$ac_ext >&5
8243 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8244 fi
8245 rm -f conftest.$ac_objext conftest.$ac_ext
8246          fi
8247
8248 echo "${as_me:-configure}:8248: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8249
8250          CFLAGS="$cf_trim_CFLAGS"
8251          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8252
8253 echo "${as_me:-configure}:8253: testing if the second compile does not leave our definition intact error ..." 1>&5
8254
8255          cat >conftest.$ac_ext <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8258 #include <sys/types.h>
8259 int
8260 main ()
8261 {
8262
8263 #ifndef _POSIX_C_SOURCE
8264 make an error
8265 #endif
8266   ;
8267   return 0;
8268 }
8269 _ACEOF
8270 rm -f conftest.$ac_objext
8271 if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
8272   (eval $ac_compile) 2>&5
8273   ac_status=$?
8274   echo "$as_me:8274: \$? = $ac_status" >&5
8275   (exit $ac_status); } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   :
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 cat conftest.$ac_ext >&5
8286 cf_cv_posix_c_source=no
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289          CFLAGS="$cf_save_CFLAGS"
8290          CPPFLAGS="$cf_save_CPPFLAGS"
8291
8292 fi
8293 rm -f conftest.$ac_objext conftest.$ac_ext
8294
8295 fi
8296 echo "$as_me:8296: result: $cf_cv_posix_c_source" >&5
8297 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8298
8299 if test "$cf_cv_posix_c_source" != no ; then
8300         CFLAGS="$cf_trim_CFLAGS"
8301         CPPFLAGS="$cf_trim_CPPFLAGS"
8302
8303 cf_fix_cppflags=no
8304 cf_new_cflags=
8305 cf_new_cppflags=
8306 cf_new_extra_cppflags=
8307
8308 for cf_add_cflags in $cf_cv_posix_c_source
8309 do
8310 case $cf_fix_cppflags in
8311 no)
8312         case $cf_add_cflags in #(vi
8313         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8314                 case $cf_add_cflags in
8315                 -D*)
8316                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8317
8318                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8319                                 && test -z "${cf_tst_cflags}" \
8320                                 && cf_fix_cppflags=yes
8321
8322                         if test $cf_fix_cppflags = yes ; then
8323                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8324                                 continue
8325                         elif test "${cf_tst_cflags}" = "\"'" ; then
8326                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8327                                 continue
8328                         fi
8329                         ;;
8330                 esac
8331                 case "$CPPFLAGS" in
8332                 *$cf_add_cflags) #(vi
8333                         ;;
8334                 *) #(vi
8335                         case $cf_add_cflags in #(vi
8336                         -D*)
8337                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8338
8339 CPPFLAGS=`echo "$CPPFLAGS" | \
8340         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8341                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8342
8343                                 ;;
8344                         esac
8345                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8346                         ;;
8347                 esac
8348                 ;;
8349         *)
8350                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8351                 ;;
8352         esac
8353         ;;
8354 yes)
8355         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8356
8357         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8358
8359         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8360                 && test -z "${cf_tst_cflags}" \
8361                 && cf_fix_cppflags=no
8362         ;;
8363 esac
8364 done
8365
8366 if test -n "$cf_new_cflags" ; then
8367
8368         CFLAGS="$CFLAGS $cf_new_cflags"
8369 fi
8370
8371 if test -n "$cf_new_cppflags" ; then
8372
8373         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8374 fi
8375
8376 if test -n "$cf_new_extra_cppflags" ; then
8377
8378         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8379 fi
8380
8381 fi
8382
8383         ;;
8384 esac
8385
8386 if test -n "$cf_xopen_source" ; then
8387
8388 cf_fix_cppflags=no
8389 cf_new_cflags=
8390 cf_new_cppflags=
8391 cf_new_extra_cppflags=
8392
8393 for cf_add_cflags in $cf_xopen_source
8394 do
8395 case $cf_fix_cppflags in
8396 no)
8397         case $cf_add_cflags in #(vi
8398         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8399                 case $cf_add_cflags in
8400                 -D*)
8401                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8402
8403                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8404                                 && test -z "${cf_tst_cflags}" \
8405                                 && cf_fix_cppflags=yes
8406
8407                         if test $cf_fix_cppflags = yes ; then
8408                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8409                                 continue
8410                         elif test "${cf_tst_cflags}" = "\"'" ; then
8411                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8412                                 continue
8413                         fi
8414                         ;;
8415                 esac
8416                 case "$CPPFLAGS" in
8417                 *$cf_add_cflags) #(vi
8418                         ;;
8419                 *) #(vi
8420                         case $cf_add_cflags in #(vi
8421                         -D*)
8422                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8423
8424 CPPFLAGS=`echo "$CPPFLAGS" | \
8425         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8426                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8427
8428                                 ;;
8429                         esac
8430                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8431                         ;;
8432                 esac
8433                 ;;
8434         *)
8435                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8436                 ;;
8437         esac
8438         ;;
8439 yes)
8440         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8441
8442         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8443
8444         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8445                 && test -z "${cf_tst_cflags}" \
8446                 && cf_fix_cppflags=no
8447         ;;
8448 esac
8449 done
8450
8451 if test -n "$cf_new_cflags" ; then
8452
8453         CFLAGS="$CFLAGS $cf_new_cflags"
8454 fi
8455
8456 if test -n "$cf_new_cppflags" ; then
8457
8458         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8459 fi
8460
8461 if test -n "$cf_new_extra_cppflags" ; then
8462
8463         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8464 fi
8465
8466 fi
8467
8468 # Check whether --enable-largefile or --disable-largefile was given.
8469 if test "${enable_largefile+set}" = set; then
8470   enableval="$enable_largefile"
8471
8472 fi;
8473 if test "$enable_largefile" != no; then
8474
8475   echo "$as_me:8475: checking for special C compiler options needed for large files" >&5
8476 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8477 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8478   echo $ECHO_N "(cached) $ECHO_C" >&6
8479 else
8480   ac_cv_sys_largefile_CC=no
8481      if test "$GCC" != yes; then
8482        ac_save_CC=$CC
8483        while :; do
8484          # IRIX 6.2 and later do not support large files by default,
8485          # so use the C compiler's -n32 option if that helps.
8486          cat >conftest.$ac_ext <<_ACEOF
8487 #line 8487 "configure"
8488 #include "confdefs.h"
8489 #include <sys/types.h>
8490  /* Check that off_t can represent 2**63 - 1 correctly.
8491     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8492     since some C++ compilers masquerading as C compilers
8493     incorrectly reject 9223372036854775807.  */
8494 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8495   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8496                        && LARGE_OFF_T % 2147483647 == 1)
8497                       ? 1 : -1];
8498 int
8499 main ()
8500 {
8501
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   break
8519 else
8520   echo "$as_me: failed program was:" >&5
8521 cat conftest.$ac_ext >&5
8522 fi
8523 rm -f conftest.$ac_objext
8524          CC="$CC -n32"
8525          rm -f conftest.$ac_objext
8526 if { (eval echo "$as_me:8526: \"$ac_compile\"") >&5
8527   (eval $ac_compile) 2>&5
8528   ac_status=$?
8529   echo "$as_me:8529: \$? = $ac_status" >&5
8530   (exit $ac_status); } &&
8531          { ac_try='test -s conftest.$ac_objext'
8532   { (eval echo "$as_me:8532: \"$ac_try\"") >&5
8533   (eval $ac_try) 2>&5
8534   ac_status=$?
8535   echo "$as_me:8535: \$? = $ac_status" >&5
8536   (exit $ac_status); }; }; then
8537   ac_cv_sys_largefile_CC=' -n32'; break
8538 else
8539   echo "$as_me: failed program was:" >&5
8540 cat conftest.$ac_ext >&5
8541 fi
8542 rm -f conftest.$ac_objext
8543          break
8544        done
8545        CC=$ac_save_CC
8546        rm -f conftest.$ac_ext
8547     fi
8548 fi
8549 echo "$as_me:8549: result: $ac_cv_sys_largefile_CC" >&5
8550 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8551   if test "$ac_cv_sys_largefile_CC" != no; then
8552     CC=$CC$ac_cv_sys_largefile_CC
8553   fi
8554
8555   echo "$as_me:8555: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8556 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8557 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8558   echo $ECHO_N "(cached) $ECHO_C" >&6
8559 else
8560   while :; do
8561   ac_cv_sys_file_offset_bits=no
8562   cat >conftest.$ac_ext <<_ACEOF
8563 #line 8563 "configure"
8564 #include "confdefs.h"
8565 #include <sys/types.h>
8566  /* Check that off_t can represent 2**63 - 1 correctly.
8567     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8568     since some C++ compilers masquerading as C compilers
8569     incorrectly reject 9223372036854775807.  */
8570 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8571   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8572                        && LARGE_OFF_T % 2147483647 == 1)
8573                       ? 1 : -1];
8574 int
8575 main ()
8576 {
8577
8578   ;
8579   return 0;
8580 }
8581 _ACEOF
8582 rm -f conftest.$ac_objext
8583 if { (eval echo "$as_me:8583: \"$ac_compile\"") >&5
8584   (eval $ac_compile) 2>&5
8585   ac_status=$?
8586   echo "$as_me:8586: \$? = $ac_status" >&5
8587   (exit $ac_status); } &&
8588          { ac_try='test -s conftest.$ac_objext'
8589   { (eval echo "$as_me:8589: \"$ac_try\"") >&5
8590   (eval $ac_try) 2>&5
8591   ac_status=$?
8592   echo "$as_me:8592: \$? = $ac_status" >&5
8593   (exit $ac_status); }; }; then
8594   break
8595 else
8596   echo "$as_me: failed program was:" >&5
8597 cat conftest.$ac_ext >&5
8598 fi
8599 rm -f conftest.$ac_objext conftest.$ac_ext
8600   cat >conftest.$ac_ext <<_ACEOF
8601 #line 8601 "configure"
8602 #include "confdefs.h"
8603 #define _FILE_OFFSET_BITS 64
8604 #include <sys/types.h>
8605  /* Check that off_t can represent 2**63 - 1 correctly.
8606     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8607     since some C++ compilers masquerading as C compilers
8608     incorrectly reject 9223372036854775807.  */
8609 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8610   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8611                        && LARGE_OFF_T % 2147483647 == 1)
8612                       ? 1 : -1];
8613 int
8614 main ()
8615 {
8616
8617   ;
8618   return 0;
8619 }
8620 _ACEOF
8621 rm -f conftest.$ac_objext
8622 if { (eval echo "$as_me:8622: \"$ac_compile\"") >&5
8623   (eval $ac_compile) 2>&5
8624   ac_status=$?
8625   echo "$as_me:8625: \$? = $ac_status" >&5
8626   (exit $ac_status); } &&
8627          { ac_try='test -s conftest.$ac_objext'
8628   { (eval echo "$as_me:8628: \"$ac_try\"") >&5
8629   (eval $ac_try) 2>&5
8630   ac_status=$?
8631   echo "$as_me:8631: \$? = $ac_status" >&5
8632   (exit $ac_status); }; }; then
8633   ac_cv_sys_file_offset_bits=64; break
8634 else
8635   echo "$as_me: failed program was:" >&5
8636 cat conftest.$ac_ext >&5
8637 fi
8638 rm -f conftest.$ac_objext conftest.$ac_ext
8639   break
8640 done
8641 fi
8642 echo "$as_me:8642: result: $ac_cv_sys_file_offset_bits" >&5
8643 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8644 if test "$ac_cv_sys_file_offset_bits" != no; then
8645
8646 cat >>confdefs.h <<EOF
8647 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8648 EOF
8649
8650 fi
8651 rm -rf conftest*
8652   echo "$as_me:8652: checking for _LARGE_FILES value needed for large files" >&5
8653 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8654 if test "${ac_cv_sys_large_files+set}" = set; then
8655   echo $ECHO_N "(cached) $ECHO_C" >&6
8656 else
8657   while :; do
8658   ac_cv_sys_large_files=no
8659   cat >conftest.$ac_ext <<_ACEOF
8660 #line 8660 "configure"
8661 #include "confdefs.h"
8662 #include <sys/types.h>
8663  /* Check that off_t can represent 2**63 - 1 correctly.
8664     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8665     since some C++ compilers masquerading as C compilers
8666     incorrectly reject 9223372036854775807.  */
8667 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8668   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8669                        && LARGE_OFF_T % 2147483647 == 1)
8670                       ? 1 : -1];
8671 int
8672 main ()
8673 {
8674
8675   ;
8676   return 0;
8677 }
8678 _ACEOF
8679 rm -f conftest.$ac_objext
8680 if { (eval echo "$as_me:8680: \"$ac_compile\"") >&5
8681   (eval $ac_compile) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); } &&
8685          { ac_try='test -s conftest.$ac_objext'
8686   { (eval echo "$as_me:8686: \"$ac_try\"") >&5
8687   (eval $ac_try) 2>&5
8688   ac_status=$?
8689   echo "$as_me:8689: \$? = $ac_status" >&5
8690   (exit $ac_status); }; }; then
8691   break
8692 else
8693   echo "$as_me: failed program was:" >&5
8694 cat conftest.$ac_ext >&5
8695 fi
8696 rm -f conftest.$ac_objext conftest.$ac_ext
8697   cat >conftest.$ac_ext <<_ACEOF
8698 #line 8698 "configure"
8699 #include "confdefs.h"
8700 #define _LARGE_FILES 1
8701 #include <sys/types.h>
8702  /* Check that off_t can represent 2**63 - 1 correctly.
8703     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8704     since some C++ compilers masquerading as C compilers
8705     incorrectly reject 9223372036854775807.  */
8706 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8707   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8708                        && LARGE_OFF_T % 2147483647 == 1)
8709                       ? 1 : -1];
8710 int
8711 main ()
8712 {
8713
8714   ;
8715   return 0;
8716 }
8717 _ACEOF
8718 rm -f conftest.$ac_objext
8719 if { (eval echo "$as_me:8719: \"$ac_compile\"") >&5
8720   (eval $ac_compile) 2>&5
8721   ac_status=$?
8722   echo "$as_me:8722: \$? = $ac_status" >&5
8723   (exit $ac_status); } &&
8724          { ac_try='test -s conftest.$ac_objext'
8725   { (eval echo "$as_me:8725: \"$ac_try\"") >&5
8726   (eval $ac_try) 2>&5
8727   ac_status=$?
8728   echo "$as_me:8728: \$? = $ac_status" >&5
8729   (exit $ac_status); }; }; then
8730   ac_cv_sys_large_files=1; break
8731 else
8732   echo "$as_me: failed program was:" >&5
8733 cat conftest.$ac_ext >&5
8734 fi
8735 rm -f conftest.$ac_objext conftest.$ac_ext
8736   break
8737 done
8738 fi
8739 echo "$as_me:8739: result: $ac_cv_sys_large_files" >&5
8740 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8741 if test "$ac_cv_sys_large_files" != no; then
8742
8743 cat >>confdefs.h <<EOF
8744 #define _LARGE_FILES $ac_cv_sys_large_files
8745 EOF
8746
8747 fi
8748 rm -rf conftest*
8749 fi
8750
8751     if test "$enable_largefile" != no ; then
8752         echo "$as_me:8752: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8753 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8754 if test "${ac_cv_sys_largefile_source+set}" = set; then
8755   echo $ECHO_N "(cached) $ECHO_C" >&6
8756 else
8757   while :; do
8758   ac_cv_sys_largefile_source=no
8759   cat >conftest.$ac_ext <<_ACEOF
8760 #line 8760 "configure"
8761 #include "confdefs.h"
8762 #include <stdio.h>
8763 int
8764 main ()
8765 {
8766 return !fseeko;
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 rm -f conftest.$ac_objext
8772 if { (eval echo "$as_me:8772: \"$ac_compile\"") >&5
8773   (eval $ac_compile) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); } &&
8777          { ac_try='test -s conftest.$ac_objext'
8778   { (eval echo "$as_me:8778: \"$ac_try\"") >&5
8779   (eval $ac_try) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); }; }; then
8783   break
8784 else
8785   echo "$as_me: failed program was:" >&5
8786 cat conftest.$ac_ext >&5
8787 fi
8788 rm -f conftest.$ac_objext conftest.$ac_ext
8789   cat >conftest.$ac_ext <<_ACEOF
8790 #line 8790 "configure"
8791 #include "confdefs.h"
8792 #define _LARGEFILE_SOURCE 1
8793 #include <stdio.h>
8794 int
8795 main ()
8796 {
8797 return !fseeko;
8798   ;
8799   return 0;
8800 }
8801 _ACEOF
8802 rm -f conftest.$ac_objext
8803 if { (eval echo "$as_me:8803: \"$ac_compile\"") >&5
8804   (eval $ac_compile) 2>&5
8805   ac_status=$?
8806   echo "$as_me:8806: \$? = $ac_status" >&5
8807   (exit $ac_status); } &&
8808          { ac_try='test -s conftest.$ac_objext'
8809   { (eval echo "$as_me:8809: \"$ac_try\"") >&5
8810   (eval $ac_try) 2>&5
8811   ac_status=$?
8812   echo "$as_me:8812: \$? = $ac_status" >&5
8813   (exit $ac_status); }; }; then
8814   ac_cv_sys_largefile_source=1; break
8815 else
8816   echo "$as_me: failed program was:" >&5
8817 cat conftest.$ac_ext >&5
8818 fi
8819 rm -f conftest.$ac_objext conftest.$ac_ext
8820   break
8821 done
8822 fi
8823 echo "$as_me:8823: result: $ac_cv_sys_largefile_source" >&5
8824 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8825 if test "$ac_cv_sys_largefile_source" != no; then
8826
8827 cat >>confdefs.h <<EOF
8828 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8829 EOF
8830
8831 fi
8832 rm -rf conftest*
8833
8834 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8835 # in glibc 2.1.3, but that breaks too many other things.
8836 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8837 echo "$as_me:8837: checking for fseeko" >&5
8838 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8839 if test "${ac_cv_func_fseeko+set}" = set; then
8840   echo $ECHO_N "(cached) $ECHO_C" >&6
8841 else
8842   cat >conftest.$ac_ext <<_ACEOF
8843 #line 8843 "configure"
8844 #include "confdefs.h"
8845 #include <stdio.h>
8846 int
8847 main ()
8848 {
8849 return fseeko && fseeko (stdin, 0, 0);
8850   ;
8851   return 0;
8852 }
8853 _ACEOF
8854 rm -f conftest.$ac_objext conftest$ac_exeext
8855 if { (eval echo "$as_me:8855: \"$ac_link\"") >&5
8856   (eval $ac_link) 2>&5
8857   ac_status=$?
8858   echo "$as_me:8858: \$? = $ac_status" >&5
8859   (exit $ac_status); } &&
8860          { ac_try='test -s conftest$ac_exeext'
8861   { (eval echo "$as_me:8861: \"$ac_try\"") >&5
8862   (eval $ac_try) 2>&5
8863   ac_status=$?
8864   echo "$as_me:8864: \$? = $ac_status" >&5
8865   (exit $ac_status); }; }; then
8866   ac_cv_func_fseeko=yes
8867 else
8868   echo "$as_me: failed program was:" >&5
8869 cat conftest.$ac_ext >&5
8870 ac_cv_func_fseeko=no
8871 fi
8872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8873 fi
8874 echo "$as_me:8874: result: $ac_cv_func_fseeko" >&5
8875 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8876 if test $ac_cv_func_fseeko = yes; then
8877
8878 cat >>confdefs.h <<\EOF
8879 #define HAVE_FSEEKO 1
8880 EOF
8881
8882 fi
8883
8884         # Normally we would collect these definitions in the config.h,
8885         # but (like _XOPEN_SOURCE), some environments rely on having these
8886         # defined before any of the system headers are included.  Another
8887         # case comes up with C++, e.g., on AIX the compiler compiles the
8888         # header files by themselves before looking at the body files it is
8889         # told to compile.  For ncurses, those header files do not include
8890         # the config.h
8891         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8892         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8893         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8894
8895         echo "$as_me:8895: checking whether to use struct dirent64" >&5
8896 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8897 if test "${cf_cv_struct_dirent64+set}" = set; then
8898   echo $ECHO_N "(cached) $ECHO_C" >&6
8899 else
8900
8901                 cat >conftest.$ac_ext <<_ACEOF
8902 #line 8902 "configure"
8903 #include "confdefs.h"
8904
8905 #include <sys/types.h>
8906 #include <dirent.h>
8907
8908 int
8909 main ()
8910 {
8911
8912                 /* if transitional largefile support is setup, this is true */
8913                 extern struct dirent64 * readdir(DIR *);
8914                 struct dirent64 *x = readdir((DIR *)0);
8915                 struct dirent *y = readdir((DIR *)0);
8916                 int z = x - y;
8917
8918   ;
8919   return 0;
8920 }
8921 _ACEOF
8922 rm -f conftest.$ac_objext
8923 if { (eval echo "$as_me:8923: \"$ac_compile\"") >&5
8924   (eval $ac_compile) 2>&5
8925   ac_status=$?
8926   echo "$as_me:8926: \$? = $ac_status" >&5
8927   (exit $ac_status); } &&
8928          { ac_try='test -s conftest.$ac_objext'
8929   { (eval echo "$as_me:8929: \"$ac_try\"") >&5
8930   (eval $ac_try) 2>&5
8931   ac_status=$?
8932   echo "$as_me:8932: \$? = $ac_status" >&5
8933   (exit $ac_status); }; }; then
8934   cf_cv_struct_dirent64=yes
8935 else
8936   echo "$as_me: failed program was:" >&5
8937 cat conftest.$ac_ext >&5
8938 cf_cv_struct_dirent64=no
8939 fi
8940 rm -f conftest.$ac_objext conftest.$ac_ext
8941
8942 fi
8943 echo "$as_me:8943: result: $cf_cv_struct_dirent64" >&5
8944 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8945         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8946 #define HAVE_STRUCT_DIRENT64 1
8947 EOF
8948
8949     fi
8950
8951 ### Enable compiling-in rcs id's
8952 echo "$as_me:8952: checking if RCS identifiers should be compiled-in" >&5
8953 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8954
8955 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8956 if test "${with_rcs_ids+set}" = set; then
8957   withval="$with_rcs_ids"
8958   with_rcs_ids=$withval
8959 else
8960   with_rcs_ids=no
8961 fi;
8962 echo "$as_me:8962: result: $with_rcs_ids" >&5
8963 echo "${ECHO_T}$with_rcs_ids" >&6
8964 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8965 #define USE_RCS_IDS 1
8966 EOF
8967
8968 ###############################################################################
8969
8970 ### Note that some functions (such as const) are normally disabled anyway.
8971 echo "$as_me:8971: checking if you want to build with function extensions" >&5
8972 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8973
8974 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8975 if test "${enable_ext_funcs+set}" = set; then
8976   enableval="$enable_ext_funcs"
8977   with_ext_funcs=$enableval
8978 else
8979   with_ext_funcs=yes
8980 fi;
8981 echo "$as_me:8981: result: $with_ext_funcs" >&5
8982 echo "${ECHO_T}$with_ext_funcs" >&6
8983 if test "$with_ext_funcs" = yes ; then
8984         NCURSES_EXT_FUNCS=1
8985         cat >>confdefs.h <<\EOF
8986 #define HAVE_USE_DEFAULT_COLORS 1
8987 EOF
8988
8989         cat >>confdefs.h <<\EOF
8990 #define NCURSES_EXT_FUNCS 1
8991 EOF
8992
8993 else
8994         NCURSES_EXT_FUNCS=0
8995 fi
8996
8997 ###   use option --enable-const to turn on use of const beyond that in XSI.
8998 echo "$as_me:8998: checking for extended use of const keyword" >&5
8999 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9000
9001 # Check whether --enable-const or --disable-const was given.
9002 if test "${enable_const+set}" = set; then
9003   enableval="$enable_const"
9004   with_ext_const=$enableval
9005 else
9006   with_ext_const=no
9007 fi;
9008 echo "$as_me:9008: result: $with_ext_const" >&5
9009 echo "${ECHO_T}$with_ext_const" >&6
9010 NCURSES_CONST='/*nothing*/'
9011 if test "$with_ext_const" = yes ; then
9012         NCURSES_CONST=const
9013 fi
9014
9015 ###############################################################################
9016 # These options are relatively safe to experiment with.
9017
9018 echo "$as_me:9018: checking if you want all development code" >&5
9019 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9020
9021 # Check whether --with-develop or --without-develop was given.
9022 if test "${with_develop+set}" = set; then
9023   withval="$with_develop"
9024   with_develop=$withval
9025 else
9026   with_develop=no
9027 fi;
9028 echo "$as_me:9028: result: $with_develop" >&5
9029 echo "${ECHO_T}$with_develop" >&6
9030
9031 ###############################################################################
9032 # These are just experimental, probably should not be in a package:
9033
9034 # This is still experimental (20080329), but should ultimately be moved to
9035 # the script-block --with-normal, etc.
9036
9037 echo "$as_me:9037: checking if you want to link with the pthread library" >&5
9038 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9039
9040 # Check whether --with-pthread or --without-pthread was given.
9041 if test "${with_pthread+set}" = set; then
9042   withval="$with_pthread"
9043   with_pthread=$withval
9044 else
9045   with_pthread=no
9046 fi;
9047 echo "$as_me:9047: result: $with_pthread" >&5
9048 echo "${ECHO_T}$with_pthread" >&6
9049
9050 if test "$with_pthread" != no ; then
9051     echo "$as_me:9051: checking for pthread.h" >&5
9052 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
9053 if test "${ac_cv_header_pthread_h+set}" = set; then
9054   echo $ECHO_N "(cached) $ECHO_C" >&6
9055 else
9056   cat >conftest.$ac_ext <<_ACEOF
9057 #line 9057 "configure"
9058 #include "confdefs.h"
9059 #include <pthread.h>
9060 _ACEOF
9061 if { (eval echo "$as_me:9061: \"$ac_cpp conftest.$ac_ext\"") >&5
9062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9063   ac_status=$?
9064   egrep -v '^ *\+' conftest.er1 >conftest.err
9065   rm -f conftest.er1
9066   cat conftest.err >&5
9067   echo "$as_me:9067: \$? = $ac_status" >&5
9068   (exit $ac_status); } >/dev/null; then
9069   if test -s conftest.err; then
9070     ac_cpp_err=$ac_c_preproc_warn_flag
9071   else
9072     ac_cpp_err=
9073   fi
9074 else
9075   ac_cpp_err=yes
9076 fi
9077 if test -z "$ac_cpp_err"; then
9078   ac_cv_header_pthread_h=yes
9079 else
9080   echo "$as_me: failed program was:" >&5
9081   cat conftest.$ac_ext >&5
9082   ac_cv_header_pthread_h=no
9083 fi
9084 rm -f conftest.err conftest.$ac_ext
9085 fi
9086 echo "$as_me:9086: result: $ac_cv_header_pthread_h" >&5
9087 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
9088 if test $ac_cv_header_pthread_h = yes; then
9089
9090         cat >>confdefs.h <<\EOF
9091 #define HAVE_PTHREADS_H 1
9092 EOF
9093
9094         echo "$as_me:9094: checking if we can link with the pthread library" >&5
9095 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
9096         cf_save_LIBS="$LIBS"
9097         LIBS="-lpthread $LIBS"
9098         cat >conftest.$ac_ext <<_ACEOF
9099 #line 9099 "configure"
9100 #include "confdefs.h"
9101
9102 #include <pthread.h>
9103
9104 int
9105 main ()
9106 {
9107
9108         int rc = pthread_create(0,0,0,0);
9109
9110   ;
9111   return 0;
9112 }
9113 _ACEOF
9114 rm -f conftest.$ac_objext conftest$ac_exeext
9115 if { (eval echo "$as_me:9115: \"$ac_link\"") >&5
9116   (eval $ac_link) 2>&5
9117   ac_status=$?
9118   echo "$as_me:9118: \$? = $ac_status" >&5
9119   (exit $ac_status); } &&
9120          { ac_try='test -s conftest$ac_exeext'
9121   { (eval echo "$as_me:9121: \"$ac_try\"") >&5
9122   (eval $ac_try) 2>&5
9123   ac_status=$?
9124   echo "$as_me:9124: \$? = $ac_status" >&5
9125   (exit $ac_status); }; }; then
9126   with_pthread=yes
9127 else
9128   echo "$as_me: failed program was:" >&5
9129 cat conftest.$ac_ext >&5
9130 with_pthread=no
9131 fi
9132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9133         LIBS="$cf_save_LIBS"
9134         echo "$as_me:9134: result: $with_pthread" >&5
9135 echo "${ECHO_T}$with_pthread" >&6
9136
9137         if test "$with_pthread" = yes ; then
9138             LIBS="-lpthread $LIBS"
9139             cat >>confdefs.h <<\EOF
9140 #define HAVE_LIBPTHREADS 1
9141 EOF
9142
9143         else
9144             { { echo "$as_me:9144: error: Cannot link with pthread library" >&5
9145 echo "$as_me: error: Cannot link with pthread library" >&2;}
9146    { (exit 1); exit 1; }; }
9147         fi
9148
9149 fi
9150
9151 fi
9152
9153 echo "$as_me:9153: checking if you want to use weak-symbols for pthreads" >&5
9154 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
9155
9156 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
9157 if test "${enable_weak_symbols+set}" = set; then
9158   enableval="$enable_weak_symbols"
9159   use_weak_symbols=$withval
9160 else
9161   use_weak_symbols=no
9162 fi;
9163 echo "$as_me:9163: result: $use_weak_symbols" >&5
9164 echo "${ECHO_T}$use_weak_symbols" >&6
9165 if test "$use_weak_symbols" = yes ; then
9166
9167 echo "$as_me:9167: checking if $CC supports weak symbols" >&5
9168 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
9169 if test "${cf_cv_weak_symbols+set}" = set; then
9170   echo $ECHO_N "(cached) $ECHO_C" >&6
9171 else
9172
9173 cat >conftest.$ac_ext <<_ACEOF
9174 #line 9174 "configure"
9175 #include "confdefs.h"
9176
9177 #include <stdio.h>
9178 int
9179 main ()
9180 {
9181
9182 #if defined(__GNUC__)
9183 #  if defined __USE_ISOC99
9184 #    define _cat_pragma(exp)    _Pragma(#exp)
9185 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9186 #  else
9187 #    define _weak_pragma(exp)
9188 #  endif
9189 #  define _declare(name)        __extension__ extern __typeof__(name) name
9190 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9191 #endif
9192
9193 weak_symbol(fopen);
9194
9195   ;
9196   return 0;
9197 }
9198 _ACEOF
9199 rm -f conftest.$ac_objext
9200 if { (eval echo "$as_me:9200: \"$ac_compile\"") >&5
9201   (eval $ac_compile) 2>&5
9202   ac_status=$?
9203   echo "$as_me:9203: \$? = $ac_status" >&5
9204   (exit $ac_status); } &&
9205          { ac_try='test -s conftest.$ac_objext'
9206   { (eval echo "$as_me:9206: \"$ac_try\"") >&5
9207   (eval $ac_try) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); }; }; then
9211   cf_cv_weak_symbols=yes
9212 else
9213   echo "$as_me: failed program was:" >&5
9214 cat conftest.$ac_ext >&5
9215 cf_cv_weak_symbols=no
9216 fi
9217 rm -f conftest.$ac_objext conftest.$ac_ext
9218
9219 fi
9220 echo "$as_me:9220: result: $cf_cv_weak_symbols" >&5
9221 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9222
9223 else
9224     cf_cv_weak_symbols=no
9225 fi
9226
9227 if test $cf_cv_weak_symbols = yes ; then
9228     cat >>confdefs.h <<\EOF
9229 #define USE_WEAK_SYMBOLS 1
9230 EOF
9231
9232 fi
9233
9234 PTHREAD=
9235 if test "$with_pthread" = "yes" ; then
9236     cat >>confdefs.h <<\EOF
9237 #define USE_PTHREADS 1
9238 EOF
9239
9240     enable_reentrant=yes
9241     if test $cf_cv_weak_symbols = yes ; then
9242         PTHREAD=-lpthread
9243     fi
9244 fi
9245
9246 # OpenSUSE is installing ncurses6, using reentrant option.
9247 echo "$as_me:9247: checking for _nc_TABSIZE" >&5
9248 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
9249 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
9250   echo $ECHO_N "(cached) $ECHO_C" >&6
9251 else
9252   cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255 /* System header to define __stub macros and hopefully few prototypes,
9256     which can conflict with char _nc_TABSIZE (); below.  */
9257 #include <assert.h>
9258 /* Override any gcc2 internal prototype to avoid an error.  */
9259 #ifdef __cplusplus
9260 extern "C"
9261 #endif
9262 /* We use char because int might match the return type of a gcc2
9263    builtin and then its argument prototype would still apply.  */
9264 char _nc_TABSIZE ();
9265 char (*f) ();
9266
9267 int
9268 main ()
9269 {
9270 /* The GNU C library defines this for functions which it implements
9271     to always fail with ENOSYS.  Some functions are actually named
9272     something starting with __ and the normal name is an alias.  */
9273 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
9274 choke me
9275 #else
9276 f = _nc_TABSIZE;
9277 #endif
9278
9279   ;
9280   return 0;
9281 }
9282 _ACEOF
9283 rm -f conftest.$ac_objext conftest$ac_exeext
9284 if { (eval echo "$as_me:9284: \"$ac_link\"") >&5
9285   (eval $ac_link) 2>&5
9286   ac_status=$?
9287   echo "$as_me:9287: \$? = $ac_status" >&5
9288   (exit $ac_status); } &&
9289          { ac_try='test -s conftest$ac_exeext'
9290   { (eval echo "$as_me:9290: \"$ac_try\"") >&5
9291   (eval $ac_try) 2>&5
9292   ac_status=$?
9293   echo "$as_me:9293: \$? = $ac_status" >&5
9294   (exit $ac_status); }; }; then
9295   ac_cv_func__nc_TABSIZE=yes
9296 else
9297   echo "$as_me: failed program was:" >&5
9298 cat conftest.$ac_ext >&5
9299 ac_cv_func__nc_TABSIZE=no
9300 fi
9301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9302 fi
9303 echo "$as_me:9303: result: $ac_cv_func__nc_TABSIZE" >&5
9304 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
9305 if test $ac_cv_func__nc_TABSIZE = yes; then
9306   assume_reentrant=yes
9307 else
9308   assume_reentrant=no
9309 fi
9310
9311 # Reentrant code has to be opaque; there's little advantage to making ncurses
9312 # opaque outside of that, so there is no --enable-opaque option.  We can use
9313 # this option without --with-pthreads, but this will be always set for
9314 # pthreads.
9315 echo "$as_me:9315: checking if you want experimental reentrant code" >&5
9316 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9317
9318 # Check whether --enable-reentrant or --disable-reentrant was given.
9319 if test "${enable_reentrant+set}" = set; then
9320   enableval="$enable_reentrant"
9321   with_reentrant=$enableval
9322 else
9323   with_reentrant=$assume_reentrant
9324 fi;
9325 echo "$as_me:9325: result: $with_reentrant" >&5
9326 echo "${ECHO_T}$with_reentrant" >&6
9327 if test "$with_reentrant" = yes ; then
9328         cf_cv_enable_reentrant=1
9329         if test $cf_cv_weak_symbols = yes ; then
9330
9331 # remove pthread library from $LIBS
9332 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9333
9334         elif test "$assume_reentrant" = no ; then
9335                 LIB_SUFFIX="t${LIB_SUFFIX}"
9336         fi
9337         cat >>confdefs.h <<\EOF
9338 #define USE_REENTRANT 1
9339 EOF
9340
9341 else
9342         cf_cv_enable_reentrant=0
9343 fi
9344
9345 ### Allow using a different wrap-prefix
9346 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9347         echo "$as_me:9347: checking for prefix used to wrap public variables" >&5
9348 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9349
9350 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9351 if test "${with_wrap_prefix+set}" = set; then
9352   withval="$with_wrap_prefix"
9353   NCURSES_WRAP_PREFIX=$withval
9354 else
9355   NCURSES_WRAP_PREFIX=_nc_
9356 fi;
9357         echo "$as_me:9357: result: $NCURSES_WRAP_PREFIX" >&5
9358 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9359 else
9360         NCURSES_WRAP_PREFIX=_nc_
9361 fi
9362
9363 cat >>confdefs.h <<EOF
9364 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9365 EOF
9366
9367 ###############################################################################
9368
9369 ###     use option --disable-echo to suppress full display compiling commands
9370 echo "$as_me:9370: checking if you want to display full commands during build" >&5
9371 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9372
9373 # Check whether --enable-echo or --disable-echo was given.
9374 if test "${enable_echo+set}" = set; then
9375   enableval="$enable_echo"
9376   with_echo=$enableval
9377 else
9378   with_echo=yes
9379 fi;
9380 if test "$with_echo" = yes; then
9381         ECHO_LINK=
9382 else
9383         ECHO_LINK='@ echo linking $@ ... ;'
9384 fi
9385 echo "$as_me:9385: result: $with_echo" >&5
9386 echo "${ECHO_T}$with_echo" >&6
9387
9388 ###     use option --enable-warnings to turn on all gcc warnings
9389 echo "$as_me:9389: checking if you want to see compiler warnings" >&5
9390 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9391
9392 # Check whether --enable-warnings or --disable-warnings was given.
9393 if test "${enable_warnings+set}" = set; then
9394   enableval="$enable_warnings"
9395   with_warnings=$enableval
9396 fi;
9397 echo "$as_me:9397: result: $with_warnings" >&5
9398 echo "${ECHO_T}$with_warnings" >&6
9399
9400 if test "x$with_warnings" = "xyes"; then
9401
9402         ADAFLAGS="$ADAFLAGS -gnatg"
9403
9404 INTEL_COMPILER=no
9405
9406 if test "$GCC" = yes ; then
9407         case $host_os in
9408         linux*|gnu*)
9409                 echo "$as_me:9409: checking if this is really Intel C compiler" >&5
9410 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9411                 cf_save_CFLAGS="$CFLAGS"
9412                 CFLAGS="$CFLAGS -no-gcc"
9413                 cat >conftest.$ac_ext <<_ACEOF
9414 #line 9414 "configure"
9415 #include "confdefs.h"
9416
9417 int
9418 main ()
9419 {
9420
9421 #ifdef __INTEL_COMPILER
9422 #else
9423 make an error
9424 #endif
9425
9426   ;
9427   return 0;
9428 }
9429 _ACEOF
9430 rm -f conftest.$ac_objext
9431 if { (eval echo "$as_me:9431: \"$ac_compile\"") >&5
9432   (eval $ac_compile) 2>&5
9433   ac_status=$?
9434   echo "$as_me:9434: \$? = $ac_status" >&5
9435   (exit $ac_status); } &&
9436          { ac_try='test -s conftest.$ac_objext'
9437   { (eval echo "$as_me:9437: \"$ac_try\"") >&5
9438   (eval $ac_try) 2>&5
9439   ac_status=$?
9440   echo "$as_me:9440: \$? = $ac_status" >&5
9441   (exit $ac_status); }; }; then
9442   INTEL_COMPILER=yes
9443 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9444
9445 else
9446   echo "$as_me: failed program was:" >&5
9447 cat conftest.$ac_ext >&5
9448 fi
9449 rm -f conftest.$ac_objext conftest.$ac_ext
9450                 CFLAGS="$cf_save_CFLAGS"
9451                 echo "$as_me:9451: result: $INTEL_COMPILER" >&5
9452 echo "${ECHO_T}$INTEL_COMPILER" >&6
9453                 ;;
9454         esac
9455 fi
9456
9457 cat > conftest.$ac_ext <<EOF
9458 #line 9458 "${as_me:-configure}"
9459 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9460 EOF
9461
9462 if test "$INTEL_COMPILER" = yes
9463 then
9464 # The "-wdXXX" options suppress warnings:
9465 # remark #1419: external declaration in primary source file
9466 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9467 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9468 # remark #193: zero used for undefined preprocessing identifier
9469 # remark #593: variable "curs_sb_left_arrow" was set but never used
9470 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9471 # remark #869: parameter "tw" was never referenced
9472 # remark #981: operands are evaluated in unspecified order
9473 # warning #279: controlling expression is constant
9474
9475         { echo "$as_me:9475: checking for $CC warning options..." >&5
9476 echo "$as_me: checking for $CC warning options..." >&6;}
9477         cf_save_CFLAGS="$CFLAGS"
9478         EXTRA_CFLAGS="-Wall"
9479         for cf_opt in \
9480                 wd1419 \
9481                 wd1683 \
9482                 wd1684 \
9483                 wd193 \
9484                 wd593 \
9485                 wd279 \
9486                 wd810 \
9487                 wd869 \
9488                 wd981
9489         do
9490                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9491                 if { (eval echo "$as_me:9491: \"$ac_compile\"") >&5
9492   (eval $ac_compile) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); }; then
9496                         test -n "$verbose" && echo "$as_me:9496: result: ... -$cf_opt" >&5
9497 echo "${ECHO_T}... -$cf_opt" >&6
9498                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9499                 fi
9500         done
9501         CFLAGS="$cf_save_CFLAGS"
9502
9503 elif test "$GCC" = yes
9504 then
9505         { echo "$as_me:9505: checking for $CC warning options..." >&5
9506 echo "$as_me: checking for $CC warning options..." >&6;}
9507         cf_save_CFLAGS="$CFLAGS"
9508         EXTRA_CFLAGS=
9509         cf_warn_CONST=""
9510         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9511         for cf_opt in W Wall \
9512                 Wbad-function-cast \
9513                 Wcast-align \
9514                 Wcast-qual \
9515                 Winline \
9516                 Wmissing-declarations \
9517                 Wmissing-prototypes \
9518                 Wnested-externs \
9519                 Wpointer-arith \
9520                 Wshadow \
9521                 Wstrict-prototypes \
9522                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9523         do
9524                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9525                 if { (eval echo "$as_me:9525: \"$ac_compile\"") >&5
9526   (eval $ac_compile) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); }; then
9530                         test -n "$verbose" && echo "$as_me:9530: result: ... -$cf_opt" >&5
9531 echo "${ECHO_T}... -$cf_opt" >&6
9532                         case $cf_opt in #(vi
9533                         Wcast-qual) #(vi
9534                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9535                                 ;;
9536                         Winline) #(vi
9537                                 case $GCC_VERSION in
9538                                 [34].*)
9539                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9540
9541 echo "${as_me:-configure}:9541: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9542
9543                                         continue;;
9544                                 esac
9545                                 ;;
9546                         esac
9547                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9548                 fi
9549         done
9550         CFLAGS="$cf_save_CFLAGS"
9551 fi
9552 rm -rf conftest*
9553
9554 fi
9555
9556 if test "$GCC" = yes
9557 then
9558 cat > conftest.i <<EOF
9559 #ifndef GCC_PRINTF
9560 #define GCC_PRINTF 0
9561 #endif
9562 #ifndef GCC_SCANF
9563 #define GCC_SCANF 0
9564 #endif
9565 #ifndef GCC_NORETURN
9566 #define GCC_NORETURN /* nothing */
9567 #endif
9568 #ifndef GCC_UNUSED
9569 #define GCC_UNUSED /* nothing */
9570 #endif
9571 EOF
9572 if test "$GCC" = yes
9573 then
9574         { echo "$as_me:9574: checking for $CC __attribute__ directives..." >&5
9575 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9576 cat > conftest.$ac_ext <<EOF
9577 #line 9577 "${as_me:-configure}"
9578 #include "confdefs.h"
9579 #include "conftest.h"
9580 #include "conftest.i"
9581 #if     GCC_PRINTF
9582 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9583 #else
9584 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9585 #endif
9586 #if     GCC_SCANF
9587 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9588 #else
9589 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9590 #endif
9591 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9592 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9593 extern void foo(void) GCC_NORETURN;
9594 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9595 EOF
9596         cf_printf_attribute=no
9597         cf_scanf_attribute=no
9598         for cf_attribute in scanf printf unused noreturn
9599         do
9600
9601 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9602
9603                 cf_directive="__attribute__(($cf_attribute))"
9604                 echo "checking for $CC $cf_directive" 1>&5
9605
9606                 case $cf_attribute in #(vi
9607                 printf) #(vi
9608                         cf_printf_attribute=yes
9609                         cat >conftest.h <<EOF
9610 #define GCC_$cf_ATTRIBUTE 1
9611 EOF
9612                         ;;
9613                 scanf) #(vi
9614                         cf_scanf_attribute=yes
9615                         cat >conftest.h <<EOF
9616 #define GCC_$cf_ATTRIBUTE 1
9617 EOF
9618                         ;;
9619                 *) #(vi
9620                         cat >conftest.h <<EOF
9621 #define GCC_$cf_ATTRIBUTE $cf_directive
9622 EOF
9623                         ;;
9624                 esac
9625
9626                 if { (eval echo "$as_me:9626: \"$ac_compile\"") >&5
9627   (eval $ac_compile) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit $ac_status); }; then
9631                         test -n "$verbose" && echo "$as_me:9631: result: ... $cf_attribute" >&5
9632 echo "${ECHO_T}... $cf_attribute" >&6
9633                         cat conftest.h >>confdefs.h
9634                         case $cf_attribute in #(vi
9635                         printf) #(vi
9636                                 if test "$cf_printf_attribute" = no ; then
9637                                         cat >>confdefs.h <<EOF
9638 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9639 EOF
9640                                 else
9641                                         cat >>confdefs.h <<EOF
9642 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9643 EOF
9644                                 fi
9645                                 ;;
9646                         scanf) #(vi
9647                                 if test "$cf_scanf_attribute" = no ; then
9648                                         cat >>confdefs.h <<EOF
9649 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9650 EOF
9651                                 else
9652                                         cat >>confdefs.h <<EOF
9653 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9654 EOF
9655                                 fi
9656                                 ;;
9657                         esac
9658                 fi
9659         done
9660 else
9661         fgrep define conftest.i >>confdefs.h
9662 fi
9663 rm -rf conftest*
9664 fi
9665
9666 ###     use option --enable-assertions to turn on generation of assertion code
9667 echo "$as_me:9667: checking if you want to enable runtime assertions" >&5
9668 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9669
9670 # Check whether --enable-assertions or --disable-assertions was given.
9671 if test "${enable_assertions+set}" = set; then
9672   enableval="$enable_assertions"
9673   with_assertions=$enableval
9674 else
9675   with_assertions=no
9676 fi;
9677 echo "$as_me:9677: result: $with_assertions" >&5
9678 echo "${ECHO_T}$with_assertions" >&6
9679 if test -n "$GCC"
9680 then
9681         if test "$with_assertions" = no
9682         then
9683                 cat >>confdefs.h <<\EOF
9684 #define NDEBUG 1
9685 EOF
9686
9687                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9688         else
9689
9690         ADAFLAGS="$ADAFLAGS -gnata"
9691
9692         fi
9693 fi
9694
9695 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9696 cat >>confdefs.h <<\EOF
9697 #define HAVE_NC_ALLOC_H 1
9698 EOF
9699
9700 ###     use option --enable-expanded to generate certain macros as functions
9701
9702 # Check whether --enable-expanded or --disable-expanded was given.
9703 if test "${enable_expanded+set}" = set; then
9704   enableval="$enable_expanded"
9705   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9706 #define NCURSES_EXPANDED 1
9707 EOF
9708
9709 fi;
9710
9711 ###     use option --disable-macros to suppress macros in favor of functions
9712
9713 # Check whether --enable-macros or --disable-macros was given.
9714 if test "${enable_macros+set}" = set; then
9715   enableval="$enable_macros"
9716   test "$enableval" = no && cat >>confdefs.h <<\EOF
9717 #define NCURSES_NOMACROS 1
9718 EOF
9719
9720 fi;
9721
9722 # Normally we only add trace() to the debug-library.  Allow this to be
9723 # extended to all models of the ncurses library:
9724 cf_all_traces=no
9725 case "$CFLAGS $CPPFLAGS" in
9726 *-DTRACE*)
9727         cf_all_traces=yes
9728         ;;
9729 esac
9730
9731 echo "$as_me:9731: checking whether to add trace feature to all models" >&5
9732 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9733
9734 # Check whether --with-trace or --without-trace was given.
9735 if test "${with_trace+set}" = set; then
9736   withval="$with_trace"
9737   cf_with_trace=$withval
9738 else
9739   cf_with_trace=$cf_all_traces
9740 fi;
9741 echo "$as_me:9741: result: $cf_with_trace" >&5
9742 echo "${ECHO_T}$cf_with_trace" >&6
9743
9744 if test "$cf_with_trace" = yes ; then
9745         ADA_TRACE=TRUE
9746
9747 cf_fix_cppflags=no
9748 cf_new_cflags=
9749 cf_new_cppflags=
9750 cf_new_extra_cppflags=
9751
9752 for cf_add_cflags in -DTRACE
9753 do
9754 case $cf_fix_cppflags in
9755 no)
9756         case $cf_add_cflags in #(vi
9757         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9758                 case $cf_add_cflags in
9759                 -D*)
9760                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9761
9762                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9763                                 && test -z "${cf_tst_cflags}" \
9764                                 && cf_fix_cppflags=yes
9765
9766                         if test $cf_fix_cppflags = yes ; then
9767                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9768                                 continue
9769                         elif test "${cf_tst_cflags}" = "\"'" ; then
9770                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9771                                 continue
9772                         fi
9773                         ;;
9774                 esac
9775                 case "$CPPFLAGS" in
9776                 *$cf_add_cflags) #(vi
9777                         ;;
9778                 *) #(vi
9779                         case $cf_add_cflags in #(vi
9780                         -D*)
9781                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9782
9783 CPPFLAGS=`echo "$CPPFLAGS" | \
9784         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9785                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9786
9787                                 ;;
9788                         esac
9789                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9790                         ;;
9791                 esac
9792                 ;;
9793         *)
9794                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9795                 ;;
9796         esac
9797         ;;
9798 yes)
9799         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9800
9801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9802
9803         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9804                 && test -z "${cf_tst_cflags}" \
9805                 && cf_fix_cppflags=no
9806         ;;
9807 esac
9808 done
9809
9810 if test -n "$cf_new_cflags" ; then
9811
9812         CFLAGS="$CFLAGS $cf_new_cflags"
9813 fi
9814
9815 if test -n "$cf_new_cppflags" ; then
9816
9817         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9818 fi
9819
9820 if test -n "$cf_new_extra_cppflags" ; then
9821
9822         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9823 fi
9824
9825 else
9826         ADA_TRACE=FALSE
9827 fi
9828
9829 ###     Checks for libraries.
9830 case $cf_cv_system_name in #(vi
9831 *mingw32*) #(vi
9832         ;;
9833 *)
9834 echo "$as_me:9834: checking for gettimeofday" >&5
9835 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9836 if test "${ac_cv_func_gettimeofday+set}" = set; then
9837   echo $ECHO_N "(cached) $ECHO_C" >&6
9838 else
9839   cat >conftest.$ac_ext <<_ACEOF
9840 #line 9840 "configure"
9841 #include "confdefs.h"
9842 /* System header to define __stub macros and hopefully few prototypes,
9843     which can conflict with char gettimeofday (); below.  */
9844 #include <assert.h>
9845 /* Override any gcc2 internal prototype to avoid an error.  */
9846 #ifdef __cplusplus
9847 extern "C"
9848 #endif
9849 /* We use char because int might match the return type of a gcc2
9850    builtin and then its argument prototype would still apply.  */
9851 char gettimeofday ();
9852 char (*f) ();
9853
9854 int
9855 main ()
9856 {
9857 /* The GNU C library defines this for functions which it implements
9858     to always fail with ENOSYS.  Some functions are actually named
9859     something starting with __ and the normal name is an alias.  */
9860 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9861 choke me
9862 #else
9863 f = gettimeofday;
9864 #endif
9865
9866   ;
9867   return 0;
9868 }
9869 _ACEOF
9870 rm -f conftest.$ac_objext conftest$ac_exeext
9871 if { (eval echo "$as_me:9871: \"$ac_link\"") >&5
9872   (eval $ac_link) 2>&5
9873   ac_status=$?
9874   echo "$as_me:9874: \$? = $ac_status" >&5
9875   (exit $ac_status); } &&
9876          { ac_try='test -s conftest$ac_exeext'
9877   { (eval echo "$as_me:9877: \"$ac_try\"") >&5
9878   (eval $ac_try) 2>&5
9879   ac_status=$?
9880   echo "$as_me:9880: \$? = $ac_status" >&5
9881   (exit $ac_status); }; }; then
9882   ac_cv_func_gettimeofday=yes
9883 else
9884   echo "$as_me: failed program was:" >&5
9885 cat conftest.$ac_ext >&5
9886 ac_cv_func_gettimeofday=no
9887 fi
9888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9889 fi
9890 echo "$as_me:9890: result: $ac_cv_func_gettimeofday" >&5
9891 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9892 if test $ac_cv_func_gettimeofday = yes; then
9893   cat >>confdefs.h <<\EOF
9894 #define HAVE_GETTIMEOFDAY 1
9895 EOF
9896
9897 else
9898
9899 echo "$as_me:9899: checking for gettimeofday in -lbsd" >&5
9900 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9901 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9902   echo $ECHO_N "(cached) $ECHO_C" >&6
9903 else
9904   ac_check_lib_save_LIBS=$LIBS
9905 LIBS="-lbsd  $LIBS"
9906 cat >conftest.$ac_ext <<_ACEOF
9907 #line 9907 "configure"
9908 #include "confdefs.h"
9909
9910 /* Override any gcc2 internal prototype to avoid an error.  */
9911 #ifdef __cplusplus
9912 extern "C"
9913 #endif
9914 /* We use char because int might match the return type of a gcc2
9915    builtin and then its argument prototype would still apply.  */
9916 char gettimeofday ();
9917 int
9918 main ()
9919 {
9920 gettimeofday ();
9921   ;
9922   return 0;
9923 }
9924 _ACEOF
9925 rm -f conftest.$ac_objext conftest$ac_exeext
9926 if { (eval echo "$as_me:9926: \"$ac_link\"") >&5
9927   (eval $ac_link) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } &&
9931          { ac_try='test -s conftest$ac_exeext'
9932   { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   ac_cv_lib_bsd_gettimeofday=yes
9938 else
9939   echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 ac_cv_lib_bsd_gettimeofday=no
9942 fi
9943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9944 LIBS=$ac_check_lib_save_LIBS
9945 fi
9946 echo "$as_me:9946: result: $ac_cv_lib_bsd_gettimeofday" >&5
9947 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9948 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9949   cat >>confdefs.h <<\EOF
9950 #define HAVE_GETTIMEOFDAY 1
9951 EOF
9952
9953         LIBS="$LIBS -lbsd"
9954 fi
9955
9956 fi
9957         ;;
9958 esac
9959
9960 ###     Checks for header files.
9961 echo "$as_me:9961: checking for ANSI C header files" >&5
9962 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9963 if test "${ac_cv_header_stdc+set}" = set; then
9964   echo $ECHO_N "(cached) $ECHO_C" >&6
9965 else
9966   cat >conftest.$ac_ext <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969 #include <stdlib.h>
9970 #include <stdarg.h>
9971 #include <string.h>
9972 #include <float.h>
9973
9974 _ACEOF
9975 if { (eval echo "$as_me:9975: \"$ac_cpp conftest.$ac_ext\"") >&5
9976   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9977   ac_status=$?
9978   egrep -v '^ *\+' conftest.er1 >conftest.err
9979   rm -f conftest.er1
9980   cat conftest.err >&5
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit $ac_status); } >/dev/null; then
9983   if test -s conftest.err; then
9984     ac_cpp_err=$ac_c_preproc_warn_flag
9985   else
9986     ac_cpp_err=
9987   fi
9988 else
9989   ac_cpp_err=yes
9990 fi
9991 if test -z "$ac_cpp_err"; then
9992   ac_cv_header_stdc=yes
9993 else
9994   echo "$as_me: failed program was:" >&5
9995   cat conftest.$ac_ext >&5
9996   ac_cv_header_stdc=no
9997 fi
9998 rm -f conftest.err conftest.$ac_ext
9999
10000 if test $ac_cv_header_stdc = yes; then
10001   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10002   cat >conftest.$ac_ext <<_ACEOF
10003 #line 10003 "configure"
10004 #include "confdefs.h"
10005 #include <string.h>
10006
10007 _ACEOF
10008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10009   egrep "memchr" >/dev/null 2>&1; then
10010   :
10011 else
10012   ac_cv_header_stdc=no
10013 fi
10014 rm -rf conftest*
10015
10016 fi
10017
10018 if test $ac_cv_header_stdc = yes; then
10019   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10020   cat >conftest.$ac_ext <<_ACEOF
10021 #line 10021 "configure"
10022 #include "confdefs.h"
10023 #include <stdlib.h>
10024
10025 _ACEOF
10026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10027   egrep "free" >/dev/null 2>&1; then
10028   :
10029 else
10030   ac_cv_header_stdc=no
10031 fi
10032 rm -rf conftest*
10033
10034 fi
10035
10036 if test $ac_cv_header_stdc = yes; then
10037   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10038   if test "$cross_compiling" = yes; then
10039   :
10040 else
10041   cat >conftest.$ac_ext <<_ACEOF
10042 #line 10042 "configure"
10043 #include "confdefs.h"
10044 #include <ctype.h>
10045 #if ((' ' & 0x0FF) == 0x020)
10046 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10047 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10048 #else
10049 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10050                      || ('j' <= (c) && (c) <= 'r') \
10051                      || ('s' <= (c) && (c) <= 'z'))
10052 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10053 #endif
10054
10055 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10056 int
10057 main ()
10058 {
10059   int i;
10060   for (i = 0; i < 256; i++)
10061     if (XOR (islower (i), ISLOWER (i))
10062         || toupper (i) != TOUPPER (i))
10063       $ac_main_return(2);
10064   $ac_main_return (0);
10065 }
10066 _ACEOF
10067 rm -f conftest$ac_exeext
10068 if { (eval echo "$as_me:10068: \"$ac_link\"") >&5
10069   (eval $ac_link) 2>&5
10070   ac_status=$?
10071   echo "$as_me:10071: \$? = $ac_status" >&5
10072   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10073   { (eval echo "$as_me:10073: \"$ac_try\"") >&5
10074   (eval $ac_try) 2>&5
10075   ac_status=$?
10076   echo "$as_me:10076: \$? = $ac_status" >&5
10077   (exit $ac_status); }; }; then
10078   :
10079 else
10080   echo "$as_me: program exited with status $ac_status" >&5
10081 echo "$as_me: failed program was:" >&5
10082 cat conftest.$ac_ext >&5
10083 ac_cv_header_stdc=no
10084 fi
10085 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10086 fi
10087 fi
10088 fi
10089 echo "$as_me:10089: result: $ac_cv_header_stdc" >&5
10090 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10091 if test $ac_cv_header_stdc = yes; then
10092
10093 cat >>confdefs.h <<\EOF
10094 #define STDC_HEADERS 1
10095 EOF
10096
10097 fi
10098
10099 ac_header_dirent=no
10100 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10101   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10102 echo "$as_me:10102: checking for $ac_hdr that defines DIR" >&5
10103 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10105   echo $ECHO_N "(cached) $ECHO_C" >&6
10106 else
10107   cat >conftest.$ac_ext <<_ACEOF
10108 #line 10108 "configure"
10109 #include "confdefs.h"
10110 #include <sys/types.h>
10111 #include <$ac_hdr>
10112
10113 int
10114 main ()
10115 {
10116 if ((DIR *) 0)
10117 return 0;
10118   ;
10119   return 0;
10120 }
10121 _ACEOF
10122 rm -f conftest.$ac_objext
10123 if { (eval echo "$as_me:10123: \"$ac_compile\"") >&5
10124   (eval $ac_compile) 2>&5
10125   ac_status=$?
10126   echo "$as_me:10126: \$? = $ac_status" >&5
10127   (exit $ac_status); } &&
10128          { ac_try='test -s conftest.$ac_objext'
10129   { (eval echo "$as_me:10129: \"$ac_try\"") >&5
10130   (eval $ac_try) 2>&5
10131   ac_status=$?
10132   echo "$as_me:10132: \$? = $ac_status" >&5
10133   (exit $ac_status); }; }; then
10134   eval "$as_ac_Header=yes"
10135 else
10136   echo "$as_me: failed program was:" >&5
10137 cat conftest.$ac_ext >&5
10138 eval "$as_ac_Header=no"
10139 fi
10140 rm -f conftest.$ac_objext conftest.$ac_ext
10141 fi
10142 echo "$as_me:10142: result: `eval echo '${'$as_ac_Header'}'`" >&5
10143 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10144 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10145   cat >>confdefs.h <<EOF
10146 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10147 EOF
10148
10149 ac_header_dirent=$ac_hdr; break
10150 fi
10151
10152 done
10153 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10154 if test $ac_header_dirent = dirent.h; then
10155   echo "$as_me:10155: checking for opendir in -ldir" >&5
10156 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10157 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10158   echo $ECHO_N "(cached) $ECHO_C" >&6
10159 else
10160   ac_check_lib_save_LIBS=$LIBS
10161 LIBS="-ldir  $LIBS"
10162 cat >conftest.$ac_ext <<_ACEOF
10163 #line 10163 "configure"
10164 #include "confdefs.h"
10165
10166 /* Override any gcc2 internal prototype to avoid an error.  */
10167 #ifdef __cplusplus
10168 extern "C"
10169 #endif
10170 /* We use char because int might match the return type of a gcc2
10171    builtin and then its argument prototype would still apply.  */
10172 char opendir ();
10173 int
10174 main ()
10175 {
10176 opendir ();
10177   ;
10178   return 0;
10179 }
10180 _ACEOF
10181 rm -f conftest.$ac_objext conftest$ac_exeext
10182 if { (eval echo "$as_me:10182: \"$ac_link\"") >&5
10183   (eval $ac_link) 2>&5
10184   ac_status=$?
10185   echo "$as_me:10185: \$? = $ac_status" >&5
10186   (exit $ac_status); } &&
10187          { ac_try='test -s conftest$ac_exeext'
10188   { (eval echo "$as_me:10188: \"$ac_try\"") >&5
10189   (eval $ac_try) 2>&5
10190   ac_status=$?
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit $ac_status); }; }; then
10193   ac_cv_lib_dir_opendir=yes
10194 else
10195   echo "$as_me: failed program was:" >&5
10196 cat conftest.$ac_ext >&5
10197 ac_cv_lib_dir_opendir=no
10198 fi
10199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10200 LIBS=$ac_check_lib_save_LIBS
10201 fi
10202 echo "$as_me:10202: result: $ac_cv_lib_dir_opendir" >&5
10203 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10204 if test $ac_cv_lib_dir_opendir = yes; then
10205   LIBS="$LIBS -ldir"
10206 fi
10207
10208 else
10209   echo "$as_me:10209: checking for opendir in -lx" >&5
10210 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10211 if test "${ac_cv_lib_x_opendir+set}" = set; then
10212   echo $ECHO_N "(cached) $ECHO_C" >&6
10213 else
10214   ac_check_lib_save_LIBS=$LIBS
10215 LIBS="-lx  $LIBS"
10216 cat >conftest.$ac_ext <<_ACEOF
10217 #line 10217 "configure"
10218 #include "confdefs.h"
10219
10220 /* Override any gcc2 internal prototype to avoid an error.  */
10221 #ifdef __cplusplus
10222 extern "C"
10223 #endif
10224 /* We use char because int might match the return type of a gcc2
10225    builtin and then its argument prototype would still apply.  */
10226 char opendir ();
10227 int
10228 main ()
10229 {
10230 opendir ();
10231   ;
10232   return 0;
10233 }
10234 _ACEOF
10235 rm -f conftest.$ac_objext conftest$ac_exeext
10236 if { (eval echo "$as_me:10236: \"$ac_link\"") >&5
10237   (eval $ac_link) 2>&5
10238   ac_status=$?
10239   echo "$as_me:10239: \$? = $ac_status" >&5
10240   (exit $ac_status); } &&
10241          { ac_try='test -s conftest$ac_exeext'
10242   { (eval echo "$as_me:10242: \"$ac_try\"") >&5
10243   (eval $ac_try) 2>&5
10244   ac_status=$?
10245   echo "$as_me:10245: \$? = $ac_status" >&5
10246   (exit $ac_status); }; }; then
10247   ac_cv_lib_x_opendir=yes
10248 else
10249   echo "$as_me: failed program was:" >&5
10250 cat conftest.$ac_ext >&5
10251 ac_cv_lib_x_opendir=no
10252 fi
10253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10254 LIBS=$ac_check_lib_save_LIBS
10255 fi
10256 echo "$as_me:10256: result: $ac_cv_lib_x_opendir" >&5
10257 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10258 if test $ac_cv_lib_x_opendir = yes; then
10259   LIBS="$LIBS -lx"
10260 fi
10261
10262 fi
10263
10264 echo "$as_me:10264: checking whether time.h and sys/time.h may both be included" >&5
10265 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10266 if test "${ac_cv_header_time+set}" = set; then
10267   echo $ECHO_N "(cached) $ECHO_C" >&6
10268 else
10269   cat >conftest.$ac_ext <<_ACEOF
10270 #line 10270 "configure"
10271 #include "confdefs.h"
10272 #include <sys/types.h>
10273 #include <sys/time.h>
10274 #include <time.h>
10275
10276 int
10277 main ()
10278 {
10279 if ((struct tm *) 0)
10280 return 0;
10281   ;
10282   return 0;
10283 }
10284 _ACEOF
10285 rm -f conftest.$ac_objext
10286 if { (eval echo "$as_me:10286: \"$ac_compile\"") >&5
10287   (eval $ac_compile) 2>&5
10288   ac_status=$?
10289   echo "$as_me:10289: \$? = $ac_status" >&5
10290   (exit $ac_status); } &&
10291          { ac_try='test -s conftest.$ac_objext'
10292   { (eval echo "$as_me:10292: \"$ac_try\"") >&5
10293   (eval $ac_try) 2>&5
10294   ac_status=$?
10295   echo "$as_me:10295: \$? = $ac_status" >&5
10296   (exit $ac_status); }; }; then
10297   ac_cv_header_time=yes
10298 else
10299   echo "$as_me: failed program was:" >&5
10300 cat conftest.$ac_ext >&5
10301 ac_cv_header_time=no
10302 fi
10303 rm -f conftest.$ac_objext conftest.$ac_ext
10304 fi
10305 echo "$as_me:10305: result: $ac_cv_header_time" >&5
10306 echo "${ECHO_T}$ac_cv_header_time" >&6
10307 if test $ac_cv_header_time = yes; then
10308
10309 cat >>confdefs.h <<\EOF
10310 #define TIME_WITH_SYS_TIME 1
10311 EOF
10312
10313 fi
10314
10315 ###     checks for compiler characteristics
10316 ac_ext=c
10317 ac_cpp='$CPP $CPPFLAGS'
10318 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10319 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10320 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10321 ac_main_return=return
10322
10323 echo "$as_me:10323: checking for $CC option to accept ANSI C" >&5
10324 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10325 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10326   echo $ECHO_N "(cached) $ECHO_C" >&6
10327 else
10328   ac_cv_prog_cc_stdc=no
10329 ac_save_CC=$CC
10330 cat >conftest.$ac_ext <<_ACEOF
10331 #line 10331 "configure"
10332 #include "confdefs.h"
10333 #include <stdarg.h>
10334 #include <stdio.h>
10335 #include <sys/types.h>
10336 #include <sys/stat.h>
10337 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10338 struct buf { int x; };
10339 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10340 static char *e (p, i)
10341      char **p;
10342      int i;
10343 {
10344   return p[i];
10345 }
10346 static char *f (char * (*g) (char **, int), char **p, ...)
10347 {
10348   char *s;
10349   va_list v;
10350   va_start (v,p);
10351   s = g (p, va_arg (v,int));
10352   va_end (v);
10353   return s;
10354 }
10355 int test (int i, double x);
10356 struct s1 {int (*f) (int a);};
10357 struct s2 {int (*f) (double a);};
10358 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10359 int argc;
10360 char **argv;
10361 int
10362 main ()
10363 {
10364 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10365   ;
10366   return 0;
10367 }
10368 _ACEOF
10369 # Don't try gcc -ansi; that turns off useful extensions and
10370 # breaks some systems' header files.
10371 # AIX                   -qlanglvl=ansi
10372 # Ultrix and OSF/1      -std1
10373 # HP-UX 10.20 and later -Ae
10374 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10375 # SVR4                  -Xc -D__EXTENSIONS__
10376 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10377 do
10378   CC="$ac_save_CC $ac_arg"
10379   rm -f conftest.$ac_objext
10380 if { (eval echo "$as_me:10380: \"$ac_compile\"") >&5
10381   (eval $ac_compile) 2>&5
10382   ac_status=$?
10383   echo "$as_me:10383: \$? = $ac_status" >&5
10384   (exit $ac_status); } &&
10385          { ac_try='test -s conftest.$ac_objext'
10386   { (eval echo "$as_me:10386: \"$ac_try\"") >&5
10387   (eval $ac_try) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); }; }; then
10391   ac_cv_prog_cc_stdc=$ac_arg
10392 break
10393 else
10394   echo "$as_me: failed program was:" >&5
10395 cat conftest.$ac_ext >&5
10396 fi
10397 rm -f conftest.$ac_objext
10398 done
10399 rm -f conftest.$ac_ext conftest.$ac_objext
10400 CC=$ac_save_CC
10401
10402 fi
10403
10404 case "x$ac_cv_prog_cc_stdc" in
10405   x|xno)
10406     echo "$as_me:10406: result: none needed" >&5
10407 echo "${ECHO_T}none needed" >&6 ;;
10408   *)
10409     echo "$as_me:10409: result: $ac_cv_prog_cc_stdc" >&5
10410 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10411     CC="$CC $ac_cv_prog_cc_stdc" ;;
10412 esac
10413
10414 echo "$as_me:10414: checking for an ANSI C-conforming const" >&5
10415 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10416 if test "${ac_cv_c_const+set}" = set; then
10417   echo $ECHO_N "(cached) $ECHO_C" >&6
10418 else
10419   cat >conftest.$ac_ext <<_ACEOF
10420 #line 10420 "configure"
10421 #include "confdefs.h"
10422
10423 int
10424 main ()
10425 {
10426 /* FIXME: Include the comments suggested by Paul. */
10427 #ifndef __cplusplus
10428   /* Ultrix mips cc rejects this.  */
10429   typedef int charset[2];
10430   const charset x;
10431   /* SunOS 4.1.1 cc rejects this.  */
10432   char const *const *ccp;
10433   char **p;
10434   /* NEC SVR4.0.2 mips cc rejects this.  */
10435   struct point {int x, y;};
10436   static struct point const zero = {0,0};
10437   /* AIX XL C 1.02.0.0 rejects this.
10438      It does not let you subtract one const X* pointer from another in
10439      an arm of an if-expression whose if-part is not a constant
10440      expression */
10441   const char *g = "string";
10442   ccp = &g + (g ? g-g : 0);
10443   /* HPUX 7.0 cc rejects these. */
10444   ++ccp;
10445   p = (char**) ccp;
10446   ccp = (char const *const *) p;
10447   { /* SCO 3.2v4 cc rejects this.  */
10448     char *t;
10449     char const *s = 0 ? (char *) 0 : (char const *) 0;
10450
10451     *t++ = 0;
10452   }
10453   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10454     int x[] = {25, 17};
10455     const int *foo = &x[0];
10456     ++foo;
10457   }
10458   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10459     typedef const int *iptr;
10460     iptr p = 0;
10461     ++p;
10462   }
10463   { /* AIX XL C 1.02.0.0 rejects this saying
10464        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10465     struct s { int j; const int *ap[3]; };
10466     struct s *b; b->j = 5;
10467   }
10468   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10469     const int foo = 10;
10470   }
10471 #endif
10472
10473   ;
10474   return 0;
10475 }
10476 _ACEOF
10477 rm -f conftest.$ac_objext
10478 if { (eval echo "$as_me:10478: \"$ac_compile\"") >&5
10479   (eval $ac_compile) 2>&5
10480   ac_status=$?
10481   echo "$as_me:10481: \$? = $ac_status" >&5
10482   (exit $ac_status); } &&
10483          { ac_try='test -s conftest.$ac_objext'
10484   { (eval echo "$as_me:10484: \"$ac_try\"") >&5
10485   (eval $ac_try) 2>&5
10486   ac_status=$?
10487   echo "$as_me:10487: \$? = $ac_status" >&5
10488   (exit $ac_status); }; }; then
10489   ac_cv_c_const=yes
10490 else
10491   echo "$as_me: failed program was:" >&5
10492 cat conftest.$ac_ext >&5
10493 ac_cv_c_const=no
10494 fi
10495 rm -f conftest.$ac_objext conftest.$ac_ext
10496 fi
10497 echo "$as_me:10497: result: $ac_cv_c_const" >&5
10498 echo "${ECHO_T}$ac_cv_c_const" >&6
10499 if test $ac_cv_c_const = no; then
10500
10501 cat >>confdefs.h <<\EOF
10502 #define const
10503 EOF
10504
10505 fi
10506
10507 ###     Checks for external-data
10508
10509 echo "$as_me:10509: checking if data-only library module links" >&5
10510 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10511 if test "${cf_cv_link_dataonly+set}" = set; then
10512   echo $ECHO_N "(cached) $ECHO_C" >&6
10513 else
10514
10515         rm -f conftest.a
10516         cat >conftest.$ac_ext <<EOF
10517 #line 10517 "configure"
10518 int     testdata[3] = { 123, 456, 789 };
10519 EOF
10520         if { (eval echo "$as_me:10520: \"$ac_compile\"") >&5
10521   (eval $ac_compile) 2>&5
10522   ac_status=$?
10523   echo "$as_me:10523: \$? = $ac_status" >&5
10524   (exit $ac_status); } ; then
10525                 mv conftest.o data.o && \
10526                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10527         fi
10528         rm -f conftest.$ac_ext data.o
10529         cat >conftest.$ac_ext <<EOF
10530 #line 10530 "configure"
10531 int     testfunc()
10532 {
10533 #if defined(NeXT)
10534         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10535 #else
10536         extern int testdata[3];
10537         return testdata[0] == 123
10538            &&  testdata[1] == 456
10539            &&  testdata[2] == 789;
10540 #endif
10541 }
10542 EOF
10543         if { (eval echo "$as_me:10543: \"$ac_compile\"") >&5
10544   (eval $ac_compile) 2>&5
10545   ac_status=$?
10546   echo "$as_me:10546: \$? = $ac_status" >&5
10547   (exit $ac_status); }; then
10548                 mv conftest.o func.o && \
10549                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10550         fi
10551         rm -f conftest.$ac_ext func.o
10552         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10553         cf_saveLIBS="$LIBS"
10554         LIBS="conftest.a $LIBS"
10555         if test "$cross_compiling" = yes; then
10556   cf_cv_link_dataonly=unknown
10557 else
10558   cat >conftest.$ac_ext <<_ACEOF
10559 #line 10559 "configure"
10560 #include "confdefs.h"
10561
10562         int main()
10563         {
10564                 extern int testfunc();
10565                 ${cf_cv_main_return:-return} (!testfunc());
10566         }
10567
10568 _ACEOF
10569 rm -f conftest$ac_exeext
10570 if { (eval echo "$as_me:10570: \"$ac_link\"") >&5
10571   (eval $ac_link) 2>&5
10572   ac_status=$?
10573   echo "$as_me:10573: \$? = $ac_status" >&5
10574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10575   { (eval echo "$as_me:10575: \"$ac_try\"") >&5
10576   (eval $ac_try) 2>&5
10577   ac_status=$?
10578   echo "$as_me:10578: \$? = $ac_status" >&5
10579   (exit $ac_status); }; }; then
10580   cf_cv_link_dataonly=yes
10581 else
10582   echo "$as_me: program exited with status $ac_status" >&5
10583 echo "$as_me: failed program was:" >&5
10584 cat conftest.$ac_ext >&5
10585 cf_cv_link_dataonly=no
10586 fi
10587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10588 fi
10589         LIBS="$cf_saveLIBS"
10590
10591 fi
10592
10593 echo "$as_me:10593: result: $cf_cv_link_dataonly" >&5
10594 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10595
10596 if test "$cf_cv_link_dataonly" = no ; then
10597         cat >>confdefs.h <<\EOF
10598 #define BROKEN_LINKER 1
10599 EOF
10600
10601         BROKEN_LINKER=1
10602 fi
10603
10604 ###     Checks for library functions.
10605
10606 echo "$as_me:10606: checking for working mkstemp" >&5
10607 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10608 if test "${cf_cv_func_mkstemp+set}" = set; then
10609   echo $ECHO_N "(cached) $ECHO_C" >&6
10610 else
10611
10612 rm -rf conftest*
10613 if test "$cross_compiling" = yes; then
10614   echo "$as_me:10614: checking for mkstemp" >&5
10615 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10616 if test "${ac_cv_func_mkstemp+set}" = set; then
10617   echo $ECHO_N "(cached) $ECHO_C" >&6
10618 else
10619   cat >conftest.$ac_ext <<_ACEOF
10620 #line 10620 "configure"
10621 #include "confdefs.h"
10622 /* System header to define __stub macros and hopefully few prototypes,
10623     which can conflict with char mkstemp (); below.  */
10624 #include <assert.h>
10625 /* Override any gcc2 internal prototype to avoid an error.  */
10626 #ifdef __cplusplus
10627 extern "C"
10628 #endif
10629 /* We use char because int might match the return type of a gcc2
10630    builtin and then its argument prototype would still apply.  */
10631 char mkstemp ();
10632 char (*f) ();
10633
10634 int
10635 main ()
10636 {
10637 /* The GNU C library defines this for functions which it implements
10638     to always fail with ENOSYS.  Some functions are actually named
10639     something starting with __ and the normal name is an alias.  */
10640 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10641 choke me
10642 #else
10643 f = mkstemp;
10644 #endif
10645
10646   ;
10647   return 0;
10648 }
10649 _ACEOF
10650 rm -f conftest.$ac_objext conftest$ac_exeext
10651 if { (eval echo "$as_me:10651: \"$ac_link\"") >&5
10652   (eval $ac_link) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit $ac_status); } &&
10656          { ac_try='test -s conftest$ac_exeext'
10657   { (eval echo "$as_me:10657: \"$ac_try\"") >&5
10658   (eval $ac_try) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit $ac_status); }; }; then
10662   ac_cv_func_mkstemp=yes
10663 else
10664   echo "$as_me: failed program was:" >&5
10665 cat conftest.$ac_ext >&5
10666 ac_cv_func_mkstemp=no
10667 fi
10668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10669 fi
10670 echo "$as_me:10670: result: $ac_cv_func_mkstemp" >&5
10671 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10672
10673 else
10674   cat >conftest.$ac_ext <<_ACEOF
10675 #line 10675 "configure"
10676 #include "confdefs.h"
10677
10678 #include <sys/types.h>
10679 #include <stdlib.h>
10680 #include <stdio.h>
10681 #include <string.h>
10682 #include <sys/stat.h>
10683 int main()
10684 {
10685         char *tmpl = "conftestXXXXXX";
10686         char name[2][80];
10687         int n;
10688         int result = 0;
10689         int fd;
10690         struct stat sb;
10691
10692         umask(077);
10693         for (n = 0; n < 2; ++n) {
10694                 strcpy(name[n], tmpl);
10695                 if ((fd = mkstemp(name[n])) >= 0) {
10696                         if (!strcmp(name[n], tmpl)
10697                          || stat(name[n], &sb) != 0
10698                          || (sb.st_mode & S_IFMT) != S_IFREG
10699                          || (sb.st_mode & 077) != 0) {
10700                                 result = 1;
10701                         }
10702                         close(fd);
10703                 }
10704         }
10705         if (result == 0
10706          && !strcmp(name[0], name[1]))
10707                 result = 1;
10708         ${cf_cv_main_return:-return}(result);
10709 }
10710
10711 _ACEOF
10712 rm -f conftest$ac_exeext
10713 if { (eval echo "$as_me:10713: \"$ac_link\"") >&5
10714   (eval $ac_link) 2>&5
10715   ac_status=$?
10716   echo "$as_me:10716: \$? = $ac_status" >&5
10717   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10718   { (eval echo "$as_me:10718: \"$ac_try\"") >&5
10719   (eval $ac_try) 2>&5
10720   ac_status=$?
10721   echo "$as_me:10721: \$? = $ac_status" >&5
10722   (exit $ac_status); }; }; then
10723   cf_cv_func_mkstemp=yes
10724
10725 else
10726   echo "$as_me: program exited with status $ac_status" >&5
10727 echo "$as_me: failed program was:" >&5
10728 cat conftest.$ac_ext >&5
10729 cf_cv_func_mkstemp=no
10730
10731 fi
10732 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10733 fi
10734
10735 fi
10736 echo "$as_me:10736: result: $cf_cv_func_mkstemp" >&5
10737 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10738 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10739         cat >>confdefs.h <<\EOF
10740 #define HAVE_MKSTEMP 1
10741 EOF
10742
10743 fi
10744
10745 echo "$as_me:10745: checking return type of signal handlers" >&5
10746 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10747 if test "${ac_cv_type_signal+set}" = set; then
10748   echo $ECHO_N "(cached) $ECHO_C" >&6
10749 else
10750   cat >conftest.$ac_ext <<_ACEOF
10751 #line 10751 "configure"
10752 #include "confdefs.h"
10753 #include <sys/types.h>
10754 #include <signal.h>
10755 #ifdef signal
10756 # undef signal
10757 #endif
10758 #ifdef __cplusplus
10759 extern "C" void (*signal (int, void (*)(int)))(int);
10760 #else
10761 void (*signal ()) ();
10762 #endif
10763
10764 int
10765 main ()
10766 {
10767 int i;
10768   ;
10769   return 0;
10770 }
10771 _ACEOF
10772 rm -f conftest.$ac_objext
10773 if { (eval echo "$as_me:10773: \"$ac_compile\"") >&5
10774   (eval $ac_compile) 2>&5
10775   ac_status=$?
10776   echo "$as_me:10776: \$? = $ac_status" >&5
10777   (exit $ac_status); } &&
10778          { ac_try='test -s conftest.$ac_objext'
10779   { (eval echo "$as_me:10779: \"$ac_try\"") >&5
10780   (eval $ac_try) 2>&5
10781   ac_status=$?
10782   echo "$as_me:10782: \$? = $ac_status" >&5
10783   (exit $ac_status); }; }; then
10784   ac_cv_type_signal=void
10785 else
10786   echo "$as_me: failed program was:" >&5
10787 cat conftest.$ac_ext >&5
10788 ac_cv_type_signal=int
10789 fi
10790 rm -f conftest.$ac_objext conftest.$ac_ext
10791 fi
10792 echo "$as_me:10792: result: $ac_cv_type_signal" >&5
10793 echo "${ECHO_T}$ac_cv_type_signal" >&6
10794
10795 cat >>confdefs.h <<EOF
10796 #define RETSIGTYPE $ac_cv_type_signal
10797 EOF
10798
10799 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10800         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10801         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10802 fi
10803
10804 if test "$cf_with_ada" != "no" ; then
10805
10806 cf_ada_make=gnatmake
10807 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10808 set dummy $cf_ada_make; ac_word=$2
10809 echo "$as_me:10809: checking for $ac_word" >&5
10810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10811 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10812   echo $ECHO_N "(cached) $ECHO_C" >&6
10813 else
10814   if test -n "$gnat_exists"; then
10815   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10816 else
10817   ac_save_IFS=$IFS; IFS=$ac_path_separator
10818 ac_dummy="$PATH"
10819 for ac_dir in $ac_dummy; do
10820   IFS=$ac_save_IFS
10821   test -z "$ac_dir" && ac_dir=.
10822   $as_executable_p "$ac_dir/$ac_word" || continue
10823 ac_cv_prog_gnat_exists="yes"
10824 echo "$as_me:10824: found $ac_dir/$ac_word" >&5
10825 break
10826 done
10827
10828   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10829 fi
10830 fi
10831 gnat_exists=$ac_cv_prog_gnat_exists
10832 if test -n "$gnat_exists"; then
10833   echo "$as_me:10833: result: $gnat_exists" >&5
10834 echo "${ECHO_T}$gnat_exists" >&6
10835 else
10836   echo "$as_me:10836: result: no" >&5
10837 echo "${ECHO_T}no" >&6
10838 fi
10839
10840 if test "$ac_cv_prog_gnat_exists" = no; then
10841    cf_ada_make=
10842 else
10843
10844 echo "$as_me:10844: checking for gnat version" >&5
10845 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10846 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
10847         grep '[0-9].[0-9][0-9]*' |\
10848     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10849 echo "$as_me:10849: result: $cf_gnat_version" >&5
10850 echo "${ECHO_T}$cf_gnat_version" >&6
10851
10852 case $cf_gnat_version in #(vi
10853 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
10854         cf_cv_prog_gnat_correct=yes
10855         ;;
10856 *)
10857         { echo "$as_me:10857: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
10858 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
10859         cf_cv_prog_gnat_correct=no
10860         ;;
10861 esac
10862
10863    # Extract the first word of "m4", so it can be a program name with args.
10864 set dummy m4; ac_word=$2
10865 echo "$as_me:10865: checking for $ac_word" >&5
10866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10867 if test "${ac_cv_prog_M4_exists+set}" = set; then
10868   echo $ECHO_N "(cached) $ECHO_C" >&6
10869 else
10870   if test -n "$M4_exists"; then
10871   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10872 else
10873   ac_save_IFS=$IFS; IFS=$ac_path_separator
10874 ac_dummy="$PATH"
10875 for ac_dir in $ac_dummy; do
10876   IFS=$ac_save_IFS
10877   test -z "$ac_dir" && ac_dir=.
10878   $as_executable_p "$ac_dir/$ac_word" || continue
10879 ac_cv_prog_M4_exists="yes"
10880 echo "$as_me:10880: found $ac_dir/$ac_word" >&5
10881 break
10882 done
10883
10884   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10885 fi
10886 fi
10887 M4_exists=$ac_cv_prog_M4_exists
10888 if test -n "$M4_exists"; then
10889   echo "$as_me:10889: result: $M4_exists" >&5
10890 echo "${ECHO_T}$M4_exists" >&6
10891 else
10892   echo "$as_me:10892: result: no" >&5
10893 echo "${ECHO_T}no" >&6
10894 fi
10895
10896    if test "$ac_cv_prog_M4_exists" = no; then
10897       cf_cv_prog_gnat_correct=no
10898       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10899    fi
10900    if test "$cf_cv_prog_gnat_correct" = yes; then
10901       echo "$as_me:10901: checking if GNAT works" >&5
10902 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10903
10904 rm -rf conftest* *~conftest*
10905 cat >>conftest.ads <<CF_EOF
10906 procedure conftest;
10907 CF_EOF
10908 cat >>conftest.adb <<CF_EOF
10909 with Text_IO;
10910 with GNAT.OS_Lib;
10911 procedure conftest is
10912 begin
10913    Text_IO.Put ("Hello World");
10914    Text_IO.New_Line;
10915    GNAT.OS_Lib.OS_Exit (0);
10916 end conftest;
10917 CF_EOF
10918 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10919    if ( ./conftest 1>&5 2>&1 ) ; then
10920       cf_cv_prog_gnat_correct=yes
10921    else
10922       cf_cv_prog_gnat_correct=no
10923    fi
10924 else
10925    cf_cv_prog_gnat_correct=no
10926 fi
10927 rm -rf conftest* *~conftest*
10928
10929       echo "$as_me:10929: result: $cf_cv_prog_gnat_correct" >&5
10930 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10931    fi
10932 fi
10933
10934         if test "$cf_cv_prog_gnat_correct" = yes; then
10935
10936                 # make ADAFLAGS consistent with CFLAGS
10937                 case "$CFLAGS" in
10938                 *-g*)
10939
10940         ADAFLAGS="$ADAFLAGS -g"
10941
10942                         ;;
10943                 esac
10944                 case "$CFLAGS" in
10945                 *-O*)
10946
10947         ADAFLAGS="$ADAFLAGS -O3"
10948
10949                         ;;
10950                 esac
10951
10952 echo "$as_me:10952: checking if GNAT supports generics" >&5
10953 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
10954 case $cf_gnat_version in #(vi
10955 3.[1-9]*|[4-9].*) #(vi
10956         cf_gnat_generics=yes
10957         ;;
10958 *)
10959         cf_gnat_generics=no
10960         ;;
10961 esac
10962 echo "$as_me:10962: result: $cf_gnat_generics" >&5
10963 echo "${ECHO_T}$cf_gnat_generics" >&6
10964
10965 if test "$cf_gnat_generics" = yes
10966 then
10967         cf_compile_generics=generics
10968         cf_generic_objects="\${GENOBJS}"
10969 else
10970         cf_compile_generics=
10971         cf_generic_objects=
10972 fi
10973
10974 echo "$as_me:10974: checking if GNAT supports SIGINT" >&5
10975 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
10976 if test "${cf_cv_gnat_sigint+set}" = set; then
10977   echo $ECHO_N "(cached) $ECHO_C" >&6
10978 else
10979
10980 rm -rf conftest* *~conftest*
10981 cat >>conftest.ads <<CF_EOF
10982 with Ada.Interrupts.Names;
10983
10984 package ConfTest is
10985
10986    pragma Warnings (Off);  --  the next pragma exists since 3.11p
10987    pragma Unreserve_All_Interrupts;
10988    pragma Warnings (On);
10989
10990    protected Process is
10991       procedure Stop;
10992       function Continue return Boolean;
10993       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
10994    private
10995       Done : Boolean := False;
10996    end Process;
10997
10998 end ConfTest;
10999 CF_EOF
11000 cat >>conftest.adb <<CF_EOF
11001 package body ConfTest is
11002    protected body Process is
11003       procedure Stop is
11004       begin
11005          Done := True;
11006       end Stop;
11007       function Continue return Boolean is
11008       begin
11009          return not Done;
11010       end Continue;
11011    end Process;
11012 end ConfTest;
11013 CF_EOF
11014 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11015       cf_cv_gnat_sigint=yes
11016 else
11017    cf_cv_gnat_sigint=no
11018 fi
11019 rm -rf conftest* *~conftest*
11020
11021 fi
11022 echo "$as_me:11022: result: $cf_cv_gnat_sigint" >&5
11023 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
11024
11025 if test $cf_cv_gnat_sigint = yes ; then
11026         USE_GNAT_SIGINT=""
11027 else
11028         USE_GNAT_SIGINT="#"
11029 fi
11030
11031 echo "$as_me:11031: checking if GNAT pragma Unreferenced works" >&5
11032 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
11033 if test "${cf_cv_pragma_unreferenced+set}" = set; then
11034   echo $ECHO_N "(cached) $ECHO_C" >&6
11035 else
11036
11037 rm -rf conftest* *~conftest*
11038 cat >>conftest.ads <<CF_EOF
11039 procedure conftest;
11040 CF_EOF
11041 cat >>conftest.adb <<CF_EOF
11042 with Text_IO;
11043 with GNAT.OS_Lib;
11044 procedure conftest is
11045    test : Integer;
11046    pragma Unreferenced (test);
11047 begin
11048    test := 1;
11049    Text_IO.Put ("Hello World");
11050    Text_IO.New_Line;
11051    GNAT.OS_Lib.OS_Exit (0);
11052 end conftest;
11053 CF_EOF
11054 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
11055       cf_cv_pragma_unreferenced=yes
11056 else
11057    cf_cv_pragma_unreferenced=no
11058 fi
11059 rm -rf conftest* *~conftest*
11060
11061 fi
11062 echo "$as_me:11062: result: $cf_cv_pragma_unreferenced" >&5
11063 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
11064
11065 # if the pragma is supported, use it (needed in the Trace code).
11066 if test $cf_cv_pragma_unreferenced = yes ; then
11067         PRAGMA_UNREF=TRUE
11068 else
11069         PRAGMA_UNREF=FALSE
11070 fi
11071
11072 cf_gnat_libraries=no
11073 cf_gnat_projects=no
11074
11075 echo "$as_me:11075: checking if GNAT supports project files" >&5
11076 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
11077 case $cf_gnat_version in #(vi
11078 3.[0-9]*) #(vi
11079         ;;
11080 *)
11081         case $cf_cv_system_name in #(vi
11082         cygwin*) #(vi
11083                 ;;
11084         *)
11085                 mkdir conftest.src conftest.bin conftest.lib
11086                 cd conftest.src
11087                 rm -rf conftest* *~conftest*
11088                 cat >>library.gpr <<CF_EOF
11089 project Library is
11090   Kind := External ("LIB_KIND");
11091   for Library_Name use "ConfTest";
11092   for Object_Dir use ".";
11093   for Library_ALI_Dir use External("LIBRARY_DIR");
11094   for Library_Version use External ("SONAME");
11095   for Library_Kind use Kind;
11096   for Library_Dir use External("BUILD_DIR");
11097   Source_Dir := External ("SOURCE_DIR");
11098   for Source_Dirs use (Source_Dir);
11099   package Compiler is
11100      for Default_Switches ("Ada") use
11101        ("-g",
11102         "-O2",
11103         "-gnatafno",
11104         "-gnatVa",   -- All validity checks
11105         "-gnatwa");  -- Activate all optional errors
11106   end Compiler;
11107 end Library;
11108 CF_EOF
11109                 cat >>confpackage.ads <<CF_EOF
11110 package ConfPackage is
11111    procedure conftest;
11112 end ConfPackage;
11113 CF_EOF
11114                 cat >>confpackage.adb <<CF_EOF
11115 with Text_IO;
11116 package body ConfPackage is
11117    procedure conftest is
11118    begin
11119       Text_IO.Put ("Hello World");
11120       Text_IO.New_Line;
11121    end conftest;
11122 end ConfPackage;
11123 CF_EOF
11124                 if ( $cf_ada_make $ADAFLAGS \
11125                                 -Plibrary.gpr \
11126                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
11127                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
11128                                 -XSOURCE_DIR=`pwd` \
11129                                 -XSONAME=libConfTest.so.1 \
11130                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
11131                         cf_gnat_projects=yes
11132                 fi
11133                 cd ..
11134                 if test -f conftest.lib/confpackage.ali
11135                 then
11136                         cf_gnat_libraries=yes
11137                 fi
11138                 rm -rf conftest* *~conftest*
11139                 ;;
11140         esac
11141         ;;
11142 esac
11143 echo "$as_me:11143: result: $cf_gnat_projects" >&5
11144 echo "${ECHO_T}$cf_gnat_projects" >&6
11145
11146 if test $cf_gnat_projects = yes
11147 then
11148         echo "$as_me:11148: checking if GNAT supports libraries" >&5
11149 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
11150         echo "$as_me:11150: result: $cf_gnat_libraries" >&5
11151 echo "${ECHO_T}$cf_gnat_libraries" >&6
11152 fi
11153
11154 if test "$cf_gnat_projects" = yes
11155 then
11156         USE_OLD_MAKERULES="#"
11157         USE_GNAT_PROJECTS=""
11158 else
11159         USE_OLD_MAKERULES=""
11160         USE_GNAT_PROJECTS="#"
11161 fi
11162
11163 if test "$cf_gnat_libraries" = yes
11164 then
11165         USE_GNAT_LIBRARIES=""
11166 else
11167         USE_GNAT_LIBRARIES="#"
11168 fi
11169
11170 echo "$as_me:11170: checking for ada-compiler" >&5
11171 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
11172
11173 # Check whether --with-ada-compiler or --without-ada-compiler was given.
11174 if test "${with_ada_compiler+set}" = set; then
11175   withval="$with_ada_compiler"
11176   cf_ada_compiler=$withval
11177 else
11178   cf_ada_compiler=gnatmake
11179 fi;
11180
11181 echo "$as_me:11181: result: $cf_ada_compiler" >&5
11182 echo "${ECHO_T}$cf_ada_compiler" >&6
11183
11184                 cf_ada_package=terminal_interface
11185
11186 echo "$as_me:11186: checking for ada-include" >&5
11187 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
11188
11189 # Check whether --with-ada-include or --without-ada-include was given.
11190 if test "${with_ada_include+set}" = set; then
11191   withval="$with_ada_include"
11192
11193 else
11194   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
11195 fi; if test -n "$prefix/share/ada/adainclude" ; then
11196
11197 if test "x$prefix" != xNONE; then
11198   cf_path_syntax="$prefix"
11199 else
11200   cf_path_syntax="$ac_default_prefix"
11201 fi
11202
11203 case ".$withval" in #(vi
11204 .\$\(*\)*|.\'*\'*) #(vi
11205   ;;
11206 ..|./*|.\\*) #(vi
11207   ;;
11208 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11209   ;;
11210 .\${*prefix}*) #(vi
11211   eval withval="$withval"
11212   case ".$withval" in #(vi
11213   .NONE/*)
11214     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11215     ;;
11216   esac
11217   ;; #(vi
11218 .no|.NONE/*)
11219   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11220   ;;
11221 *)
11222   { { echo "$as_me:11222: error: expected a pathname, not \"$withval\"" >&5
11223 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11224    { (exit 1); exit 1; }; }
11225   ;;
11226 esac
11227
11228 fi
11229 ADA_INCLUDE="$withval"
11230
11231 echo "$as_me:11231: result: $ADA_INCLUDE" >&5
11232 echo "${ECHO_T}$ADA_INCLUDE" >&6
11233
11234 echo "$as_me:11234: checking for ada-objects" >&5
11235 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
11236
11237 # Check whether --with-ada-objects or --without-ada-objects was given.
11238 if test "${with_ada_objects+set}" = set; then
11239   withval="$with_ada_objects"
11240
11241 else
11242   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
11243 fi; if test -n "$prefix/lib/ada/adalib" ; then
11244
11245 if test "x$prefix" != xNONE; then
11246   cf_path_syntax="$prefix"
11247 else
11248   cf_path_syntax="$ac_default_prefix"
11249 fi
11250
11251 case ".$withval" in #(vi
11252 .\$\(*\)*|.\'*\'*) #(vi
11253   ;;
11254 ..|./*|.\\*) #(vi
11255   ;;
11256 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
11257   ;;
11258 .\${*prefix}*) #(vi
11259   eval withval="$withval"
11260   case ".$withval" in #(vi
11261   .NONE/*)
11262     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11263     ;;
11264   esac
11265   ;; #(vi
11266 .no|.NONE/*)
11267   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11268   ;;
11269 *)
11270   { { echo "$as_me:11270: error: expected a pathname, not \"$withval\"" >&5
11271 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11272    { (exit 1); exit 1; }; }
11273   ;;
11274 esac
11275
11276 fi
11277 ADA_OBJECTS="$withval"
11278
11279 echo "$as_me:11279: result: $ADA_OBJECTS" >&5
11280 echo "${ECHO_T}$ADA_OBJECTS" >&6
11281
11282 echo "$as_me:11282: checking if an Ada95 shared-library should be built" >&5
11283 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
11284
11285 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
11286 if test "${with_ada_sharedlib+set}" = set; then
11287   withval="$with_ada_sharedlib"
11288   with_ada_sharedlib=$withval
11289 else
11290   with_ada_sharedlib=no
11291 fi;
11292 echo "$as_me:11292: result: $with_ada_sharedlib" >&5
11293 echo "${ECHO_T}$with_ada_sharedlib" >&6
11294
11295 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
11296 MAKE_ADA_SHAREDLIB="#"
11297
11298 if test "x$with_ada_sharedlib" != xno
11299 then
11300         MAKE_ADA_SHAREDLIB=
11301         if test "x$with_ada_sharedlib" != xyes
11302         then
11303                 ADA_SHAREDLIB="$with_ada_sharedlib"
11304         fi
11305 fi
11306
11307         else
11308                 { { echo "$as_me:11308: error: No usable Ada compiler found" >&5
11309 echo "$as_me: error: No usable Ada compiler found" >&2;}
11310    { (exit 1); exit 1; }; }
11311         fi
11312 else
11313         { { echo "$as_me:11313: error: The Ada compiler is needed for this package" >&5
11314 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
11315    { (exit 1); exit 1; }; }
11316 fi
11317
11318 ################################################################################
11319
11320 # not needed
11321 TINFO_ARGS2=
11322
11323 ### Construct the list of include-directories to be generated
11324
11325 CPPFLAGS="$CPPFLAGS -I. -I../include"
11326 if test "$srcdir" != "."; then
11327         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
11328 fi
11329 if test "$GCC" != yes; then
11330         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11331 elif test "$includedir" != "/usr/include"; then
11332         if test "$includedir" = '${prefix}/include' ; then
11333                 if test $prefix != /usr ; then
11334                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
11335                 fi
11336         else
11337                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
11338         fi
11339 fi
11340
11341 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
11342 if test "$srcdir" != "."; then
11343         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
11344 fi
11345 if test "$GCC" != yes; then
11346         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11347 elif test "$includedir" != "/usr/include"; then
11348         if test "$includedir" = '${prefix}/include' ; then
11349                 if test $prefix != /usr ; then
11350                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11351                 fi
11352         else
11353                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
11354         fi
11355 fi
11356
11357 ### Build up pieces for makefile rules
11358 echo "$as_me:11358: checking default library suffix" >&5
11359 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
11360
11361         case $DFT_LWR_MODEL in
11362         libtool) DFT_ARG_SUFFIX=''   ;;
11363         normal)  DFT_ARG_SUFFIX=''   ;;
11364         debug)   DFT_ARG_SUFFIX='_g' ;;
11365         profile) DFT_ARG_SUFFIX='_p' ;;
11366         shared)  DFT_ARG_SUFFIX=''   ;;
11367         esac
11368         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
11369 echo "$as_me:11369: result: $DFT_ARG_SUFFIX" >&5
11370 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
11371
11372 echo "$as_me:11372: checking default library-dependency suffix" >&5
11373 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
11374
11375         case $DFT_LWR_MODEL in #(vi
11376         libtool) #(vi
11377                 DFT_LIB_SUFFIX='.la'
11378                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11379                 ;;
11380         normal) #(vi
11381                 DFT_LIB_SUFFIX='.a'
11382                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11383                 ;;
11384         debug) #(vi
11385                 DFT_LIB_SUFFIX='_g.a'
11386                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11387                 ;;
11388         profile) #(vi
11389                 DFT_LIB_SUFFIX='_p.a'
11390                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11391                 ;;
11392         shared) #(vi
11393                 case $cf_cv_system_name in
11394                 aix[56]*) #(vi
11395                         DFT_LIB_SUFFIX='.a'
11396                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11397                         ;;
11398                 cygwin*) #(vi
11399                         DFT_LIB_SUFFIX='.dll'
11400                         DFT_DEP_SUFFIX='.dll.a'
11401                         ;;
11402                 darwin*) #(vi
11403                         DFT_LIB_SUFFIX='.dylib'
11404                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11405                         ;;
11406                 hpux*) #(vi
11407                         case $target in
11408                         ia64*) #(vi
11409                                 DFT_LIB_SUFFIX='.so'
11410                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11411                                 ;;
11412                         *) #(vi
11413                                 DFT_LIB_SUFFIX='.sl'
11414                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11415                                 ;;
11416                         esac
11417                         ;;
11418                 *)      DFT_LIB_SUFFIX='.so'
11419                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11420                         ;;
11421                 esac
11422         esac
11423         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
11424         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
11425 echo "$as_me:11425: result: $DFT_DEP_SUFFIX" >&5
11426 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
11427
11428 echo "$as_me:11428: checking default object directory" >&5
11429 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
11430
11431         case $DFT_LWR_MODEL in
11432         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
11433         normal)  DFT_OBJ_SUBDIR='objects' ;;
11434         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
11435         profile) DFT_OBJ_SUBDIR='obj_p' ;;
11436         shared)
11437                 case $cf_cv_system_name in #(vi
11438                 cygwin) #(vi
11439                         DFT_OBJ_SUBDIR='objects' ;;
11440                 *)
11441                         DFT_OBJ_SUBDIR='obj_s' ;;
11442                 esac
11443         esac
11444 echo "$as_me:11444: result: $DFT_OBJ_SUBDIR" >&5
11445 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
11446
11447 ### Set up low-level terminfo dependencies for makefiles.
11448
11449 if test "$DFT_LWR_MODEL" = shared ; then
11450         case $cf_cv_system_name in #(vi
11451         cygwin*)
11452                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
11453                 ;;
11454         esac
11455 fi
11456
11457 ### Construct the list of subdirectories for which we'll customize makefiles
11458 ### with the appropriate compile-rules.
11459
11460 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
11461
11462 cat >>confdefs.h <<EOF
11463 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
11464 EOF
11465
11466 ### Now that we're done running tests, add the compiler-warnings, if any
11467
11468 cf_fix_cppflags=no
11469 cf_new_cflags=
11470 cf_new_cppflags=
11471 cf_new_extra_cppflags=
11472
11473 for cf_add_cflags in $EXTRA_CFLAGS
11474 do
11475 case $cf_fix_cppflags in
11476 no)
11477         case $cf_add_cflags in #(vi
11478         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11479                 case $cf_add_cflags in
11480                 -D*)
11481                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11482
11483                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11484                                 && test -z "${cf_tst_cflags}" \
11485                                 && cf_fix_cppflags=yes
11486
11487                         if test $cf_fix_cppflags = yes ; then
11488                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11489                                 continue
11490                         elif test "${cf_tst_cflags}" = "\"'" ; then
11491                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11492                                 continue
11493                         fi
11494                         ;;
11495                 esac
11496                 case "$CPPFLAGS" in
11497                 *$cf_add_cflags) #(vi
11498                         ;;
11499                 *) #(vi
11500                         case $cf_add_cflags in #(vi
11501                         -D*)
11502                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11503
11504 CPPFLAGS=`echo "$CPPFLAGS" | \
11505         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11506                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11507
11508                                 ;;
11509                         esac
11510                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11511                         ;;
11512                 esac
11513                 ;;
11514         *)
11515                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11516                 ;;
11517         esac
11518         ;;
11519 yes)
11520         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11521
11522         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11523
11524         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11525                 && test -z "${cf_tst_cflags}" \
11526                 && cf_fix_cppflags=no
11527         ;;
11528 esac
11529 done
11530
11531 if test -n "$cf_new_cflags" ; then
11532
11533         CFLAGS="$CFLAGS $cf_new_cflags"
11534 fi
11535
11536 if test -n "$cf_new_cppflags" ; then
11537
11538         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11539 fi
11540
11541 if test -n "$cf_new_extra_cppflags" ; then
11542
11543         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11544 fi
11545
11546 ################################################################################
11547
11548 if test x"$enable_pc_files" = xyes ; then \
11549 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11550 MAKE_PC_FILES=
11551 else
11552 MAKE_PC_FILES="#"
11553 fi
11554
11555 ################################################################################
11556
11557 TEST_ARG2=
11558
11559 TEST_LIBS2=
11560
11561 NCURSES_SHLIB2="sh -c"
11562
11563 ADA_SUBDIRS="include gen src doc"
11564 if test "x$cf_with_tests" != "xno" ; then
11565         ADA_SUBDIRS="$ADA_SUBDIRS samples"
11566 fi
11567 for cf_dir in $ADA_SUBDIRS
11568 do
11569         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11570 done
11571
11572 NCURSES_TREE="#"
11573
11574 EXTERNAL_TREE=
11575
11576 # match layout used by make-tar.sh
11577 ADAHTML_DIR=../doc/ada
11578
11579 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
11580 ac_config_commands="$ac_config_commands default"
11581 cat >confcache <<\_ACEOF
11582 # This file is a shell script that caches the results of configure
11583 # tests run on this system so they can be shared between configure
11584 # scripts and configure runs, see configure's option --config-cache.
11585 # It is not useful on other systems.  If it contains results you don't
11586 # want to keep, you may remove or edit it.
11587 #
11588 # config.status only pays attention to the cache file if you give it
11589 # the --recheck option to rerun configure.
11590 #
11591 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11592 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11593 # following values.
11594
11595 _ACEOF
11596
11597 # The following way of writing the cache mishandles newlines in values,
11598 # but we know of no workaround that is simple, portable, and efficient.
11599 # So, don't put newlines in cache variables' values.
11600 # Ultrix sh set writes to stderr and can't be redirected directly,
11601 # and sets the high bit in the cache file unless we assign to the vars.
11602 {
11603   (set) 2>&1 |
11604     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11605     *ac_space=\ *)
11606       # `set' does not quote correctly, so add quotes (double-quote
11607       # substitution turns \\\\ into \\, and sed turns \\ into \).
11608       sed -n \
11609         "s/'/'\\\\''/g;
11610           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11611       ;;
11612     *)
11613       # `set' quotes correctly as required by POSIX, so do not add quotes.
11614       sed -n \
11615         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11616       ;;
11617     esac;
11618 } |
11619   sed '
11620      t clear
11621      : clear
11622      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11623      t end
11624      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11625      : end' >>confcache
11626 if cmp -s $cache_file confcache; then :; else
11627   if test -w $cache_file; then
11628     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11629     cat confcache >$cache_file
11630   else
11631     echo "not updating unwritable cache $cache_file"
11632   fi
11633 fi
11634 rm -f confcache
11635
11636 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11637 # Let make expand exec_prefix.
11638 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11639
11640 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11641 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11642 # trailing colons and then remove the whole line if VPATH becomes empty
11643 # (actually we leave an empty line to preserve line numbers).
11644 if test "x$srcdir" = x.; then
11645   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11646 s/:*\$(srcdir):*/:/;
11647 s/:*\${srcdir}:*/:/;
11648 s/:*@srcdir@:*/:/;
11649 s/^\([^=]*=[    ]*\):*/\1/;
11650 s/:*$//;
11651 s/^[^=]*=[      ]*$//;
11652 }'
11653 fi
11654
11655 DEFS=-DHAVE_CONFIG_H
11656
11657 : ${CONFIG_STATUS=./config.status}
11658 ac_clean_files_save=$ac_clean_files
11659 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11660 { echo "$as_me:11660: creating $CONFIG_STATUS" >&5
11661 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11662 cat >$CONFIG_STATUS <<_ACEOF
11663 #! $SHELL
11664 # Generated automatically by configure.
11665 # Run this file to recreate the current configuration.
11666 # Compiler output produced by configure, useful for debugging
11667 # configure, is in config.log if it exists.
11668
11669 debug=false
11670 SHELL=\${CONFIG_SHELL-$SHELL}
11671 ac_cs_invocation="\$0 \$@"
11672
11673 _ACEOF
11674
11675 cat >>$CONFIG_STATUS <<\_ACEOF
11676 # Be Bourne compatible
11677 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11678   emulate sh
11679   NULLCMD=:
11680 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11681   set -o posix
11682 fi
11683
11684 # Name of the executable.
11685 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11686
11687 if expr a : '\(a\)' >/dev/null 2>&1; then
11688   as_expr=expr
11689 else
11690   as_expr=false
11691 fi
11692
11693 rm -f conf$$ conf$$.exe conf$$.file
11694 echo >conf$$.file
11695 if ln -s conf$$.file conf$$ 2>/dev/null; then
11696   # We could just check for DJGPP; but this test a) works b) is more generic
11697   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11698   if test -f conf$$.exe; then
11699     # Don't use ln at all; we don't have any links
11700     as_ln_s='cp -p'
11701   else
11702     as_ln_s='ln -s'
11703   fi
11704 elif ln conf$$.file conf$$ 2>/dev/null; then
11705   as_ln_s=ln
11706 else
11707   as_ln_s='cp -p'
11708 fi
11709 rm -f conf$$ conf$$.exe conf$$.file
11710
11711 as_executable_p="test -f"
11712
11713 # Support unset when possible.
11714 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11715   as_unset=unset
11716 else
11717   as_unset=false
11718 fi
11719
11720 # NLS nuisances.
11721 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11722 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11723 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11724 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11725 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11726 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11727 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11728 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11729
11730 # IFS
11731 # We need space, tab and new line, in precisely that order.
11732 as_nl='
11733 '
11734 IFS="   $as_nl"
11735
11736 # CDPATH.
11737 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11738
11739 exec 6>&1
11740
11741 _ACEOF
11742
11743 # Files that config.status was made for.
11744 if test -n "$ac_config_files"; then
11745   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11746 fi
11747
11748 if test -n "$ac_config_headers"; then
11749   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11750 fi
11751
11752 if test -n "$ac_config_links"; then
11753   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11754 fi
11755
11756 if test -n "$ac_config_commands"; then
11757   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11758 fi
11759
11760 cat >>$CONFIG_STATUS <<\EOF
11761
11762 ac_cs_usage="\
11763 \`$as_me' instantiates files from templates according to the
11764 current configuration.
11765
11766 Usage: $0 [OPTIONS] [FILE]...
11767
11768   -h, --help       print this help, then exit
11769   -V, --version    print version number, then exit
11770   -d, --debug      don't remove temporary files
11771       --recheck    update $as_me by reconfiguring in the same conditions
11772   --file=FILE[:TEMPLATE]
11773                    instantiate the configuration file FILE
11774   --header=FILE[:TEMPLATE]
11775                    instantiate the configuration header FILE
11776
11777 Configuration files:
11778 $config_files
11779
11780 Configuration headers:
11781 $config_headers
11782
11783 Configuration commands:
11784 $config_commands
11785
11786 Report bugs to <dickey@invisible-island.net>."
11787 EOF
11788
11789 cat >>$CONFIG_STATUS <<EOF
11790 ac_cs_version="\\
11791 config.status
11792 configured by $0, generated by GNU Autoconf 2.52.20101002,
11793   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11794
11795 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11796 Free Software Foundation, Inc.
11797 This config.status script is free software; the Free Software Foundation
11798 gives unlimited permission to copy, distribute and modify it."
11799 srcdir=$srcdir
11800 INSTALL="$INSTALL"
11801 EOF
11802
11803 cat >>$CONFIG_STATUS <<\EOF
11804 # If no file are specified by the user, then we need to provide default
11805 # value.  By we need to know if files were specified by the user.
11806 ac_need_defaults=:
11807 while test $# != 0
11808 do
11809   case $1 in
11810   --*=*)
11811     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11812     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11813     shift
11814     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11815     shift
11816     ;;
11817   -*);;
11818   *) # This is not an option, so the user has probably given explicit
11819      # arguments.
11820      ac_need_defaults=false;;
11821   esac
11822
11823   case $1 in
11824   # Handling of the options.
11825 EOF
11826 cat >>$CONFIG_STATUS <<EOF
11827   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11828     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11829     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11830 EOF
11831 cat >>$CONFIG_STATUS <<\EOF
11832   --version | --vers* | -V )
11833     echo "$ac_cs_version"; exit 0 ;;
11834   --he | --h)
11835     # Conflict between --help and --header
11836     { { echo "$as_me:11836: error: ambiguous option: $1
11837 Try \`$0 --help' for more information." >&5
11838 echo "$as_me: error: ambiguous option: $1
11839 Try \`$0 --help' for more information." >&2;}
11840    { (exit 1); exit 1; }; };;
11841   --help | --hel | -h )
11842     echo "$ac_cs_usage"; exit 0 ;;
11843   --debug | --d* | -d )
11844     debug=: ;;
11845   --file | --fil | --fi | --f )
11846     shift
11847     CONFIG_FILES="$CONFIG_FILES $1"
11848     ac_need_defaults=false;;
11849   --header | --heade | --head | --hea )
11850     shift
11851     CONFIG_HEADERS="$CONFIG_HEADERS $1"
11852     ac_need_defaults=false;;
11853
11854   # This is an error.
11855   -*) { { echo "$as_me:11855: error: unrecognized option: $1
11856 Try \`$0 --help' for more information." >&5
11857 echo "$as_me: error: unrecognized option: $1
11858 Try \`$0 --help' for more information." >&2;}
11859    { (exit 1); exit 1; }; } ;;
11860
11861   *) ac_config_targets="$ac_config_targets $1" ;;
11862
11863   esac
11864   shift
11865 done
11866
11867 exec 5>>config.log
11868 cat >&5 << _ACEOF
11869
11870 ## ----------------------- ##
11871 ## Running config.status.  ##
11872 ## ----------------------- ##
11873
11874 This file was extended by $as_me 2.52.20101002, executed with
11875   CONFIG_FILES    = $CONFIG_FILES
11876   CONFIG_HEADERS  = $CONFIG_HEADERS
11877   CONFIG_LINKS    = $CONFIG_LINKS
11878   CONFIG_COMMANDS = $CONFIG_COMMANDS
11879   > $ac_cs_invocation
11880 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11881
11882 _ACEOF
11883 EOF
11884
11885 cat >>$CONFIG_STATUS <<EOF
11886 #
11887 # INIT-COMMANDS section.
11888 #
11889
11890 ### Special initialization commands, used to pass information from the
11891 ### configuration-run into config.status
11892
11893 AWK="$AWK"
11894 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
11895 DFT_LWR_MODEL="$DFT_LWR_MODEL"
11896 ECHO_LINK="$ECHO_LINK"
11897 LIB_NAME="$LIB_NAME"
11898 LIB_SUFFIX="$LIB_SUFFIX"
11899 LN_S="$LN_S"
11900 NCURSES_MAJOR="$NCURSES_MAJOR"
11901 NCURSES_MINOR="$NCURSES_MINOR"
11902 NCURSES_PATCH="$NCURSES_PATCH"
11903 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
11904 cf_cv_abi_version="$cf_cv_abi_version"
11905 cf_cv_rel_version="$cf_cv_rel_version"
11906 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
11907 cf_cv_shared_soname='$cf_cv_shared_soname'
11908 cf_cv_shlib_version="$cf_cv_shlib_version"
11909 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
11910 cf_cv_system_name="$cf_cv_system_name"
11911 host="$host"
11912 target="$target"
11913
11914 EOF
11915
11916 cat >>$CONFIG_STATUS <<\EOF
11917 for ac_config_target in $ac_config_targets
11918 do
11919   case "$ac_config_target" in
11920   # Handling of arguments.
11921   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11922   "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
11923   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11924   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11925   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11926   *) { { echo "$as_me:11926: error: invalid argument: $ac_config_target" >&5
11927 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11928    { (exit 1); exit 1; }; };;
11929   esac
11930 done
11931
11932 # If the user did not use the arguments to specify the items to instantiate,
11933 # then the envvar interface is used.  Set only those that are not.
11934 # We use the long form for the default assignment because of an extremely
11935 # bizarre bug on SunOS 4.1.3.
11936 if $ac_need_defaults; then
11937   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11938   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11939   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11940 fi
11941
11942 # Create a temporary directory, and hook for its removal unless debugging.
11943 $debug ||
11944 {
11945   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11946   trap '{ (exit 1); exit 1; }' 1 2 13 15
11947 }
11948
11949 # Create a (secure) tmp directory for tmp files.
11950 : ${TMPDIR=/tmp}
11951 {
11952   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11953   test -n "$tmp" && test -d "$tmp"
11954 }  ||
11955 {
11956   tmp=$TMPDIR/cs$$-$RANDOM
11957   (umask 077 && mkdir $tmp)
11958 } ||
11959 {
11960    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11961    { (exit 1); exit 1; }
11962 }
11963
11964 EOF
11965
11966 cat >>$CONFIG_STATUS <<EOF
11967
11968 #
11969 # CONFIG_FILES section.
11970 #
11971
11972 # No need to generate the scripts if there are no CONFIG_FILES.
11973 # This happens for instance when ./config.status config.h
11974 if test -n "\$CONFIG_FILES"; then
11975   # Protect against being on the right side of a sed subst in config.status.
11976   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11977    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11978 s,@SHELL@,$SHELL,;t t
11979 s,@exec_prefix@,$exec_prefix,;t t
11980 s,@prefix@,$prefix,;t t
11981 s,@program_transform_name@,$program_transform_name,;t t
11982 s,@bindir@,$bindir,;t t
11983 s,@sbindir@,$sbindir,;t t
11984 s,@libexecdir@,$libexecdir,;t t
11985 s,@datadir@,$datadir,;t t
11986 s,@sysconfdir@,$sysconfdir,;t t
11987 s,@sharedstatedir@,$sharedstatedir,;t t
11988 s,@localstatedir@,$localstatedir,;t t
11989 s,@libdir@,$libdir,;t t
11990 s,@includedir@,$includedir,;t t
11991 s,@oldincludedir@,$oldincludedir,;t t
11992 s,@infodir@,$infodir,;t t
11993 s,@mandir@,$mandir,;t t
11994 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11995 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11996 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11997 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11998 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11999 s,@build_alias@,$build_alias,;t t
12000 s,@host_alias@,$host_alias,;t t
12001 s,@target_alias@,$target_alias,;t t
12002 s,@ECHO_C@,$ECHO_C,;t t
12003 s,@ECHO_N@,$ECHO_N,;t t
12004 s,@ECHO_T@,$ECHO_T,;t t
12005 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
12006 s,@DEFS@,$DEFS,;t t
12007 s,@LIBS@,$LIBS,;t t
12008 s,@top_builddir@,$top_builddir,;t t
12009 s,@build@,$build,;t t
12010 s,@build_cpu@,$build_cpu,;t t
12011 s,@build_vendor@,$build_vendor,;t t
12012 s,@build_os@,$build_os,;t t
12013 s,@host@,$host,;t t
12014 s,@host_cpu@,$host_cpu,;t t
12015 s,@host_vendor@,$host_vendor,;t t
12016 s,@host_os@,$host_os,;t t
12017 s,@target@,$target,;t t
12018 s,@target_cpu@,$target_cpu,;t t
12019 s,@target_vendor@,$target_vendor,;t t
12020 s,@target_os@,$target_os,;t t
12021 s,@CC@,$CC,;t t
12022 s,@CFLAGS@,$CFLAGS,;t t
12023 s,@LDFLAGS@,$LDFLAGS,;t t
12024 s,@CPPFLAGS@,$CPPFLAGS,;t t
12025 s,@ac_ct_CC@,$ac_ct_CC,;t t
12026 s,@EXEEXT@,$EXEEXT,;t t
12027 s,@OBJEXT@,$OBJEXT,;t t
12028 s,@CPP@,$CPP,;t t
12029 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
12030 s,@PROG_EXT@,$PROG_EXT,;t t
12031 s,@AWK@,$AWK,;t t
12032 s,@EGREP@,$EGREP,;t t
12033 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
12034 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
12035 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
12036 s,@LN_S@,$LN_S,;t t
12037 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
12038 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
12039 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
12040 s,@SET_MAKE@,$SET_MAKE,;t t
12041 s,@CTAGS@,$CTAGS,;t t
12042 s,@ETAGS@,$ETAGS,;t t
12043 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
12044 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
12045 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
12046 s,@RANLIB@,$RANLIB,;t t
12047 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
12048 s,@LD@,$LD,;t t
12049 s,@ac_ct_LD@,$ac_ct_LD,;t t
12050 s,@AR@,$AR,;t t
12051 s,@ac_ct_AR@,$ac_ct_AR,;t t
12052 s,@ARFLAGS@,$ARFLAGS,;t t
12053 s,@DESTDIR@,$DESTDIR,;t t
12054 s,@BUILD_CC@,$BUILD_CC,;t t
12055 s,@BUILD_CPP@,$BUILD_CPP,;t t
12056 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
12057 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
12058 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
12059 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
12060 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
12061 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
12062 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
12063 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
12064 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
12065 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
12066 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
12067 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
12068 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
12069 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
12070 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
12071 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
12072 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
12073 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
12074 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
12075 s,@CC_G_OPT@,$CC_G_OPT,;t t
12076 s,@LD_MODEL@,$LD_MODEL,;t t
12077 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
12078 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
12079 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
12080 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
12081 s,@LINK_PROGS@,$LINK_PROGS,;t t
12082 s,@LINK_TESTS@,$LINK_TESTS,;t t
12083 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
12084 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
12085 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
12086 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
12087 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
12088 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
12089 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
12090 s,@PTHREAD@,$PTHREAD,;t t
12091 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
12092 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
12093 s,@ECHO_LINK@,$ECHO_LINK,;t t
12094 s,@ADAFLAGS@,$ADAFLAGS,;t t
12095 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
12096 s,@ADA_TRACE@,$ADA_TRACE,;t t
12097 s,@gnat_exists@,$gnat_exists,;t t
12098 s,@M4_exists@,$M4_exists,;t t
12099 s,@cf_ada_make@,$cf_ada_make,;t t
12100 s,@cf_compile_generics@,$cf_compile_generics,;t t
12101 s,@cf_generic_objects@,$cf_generic_objects,;t t
12102 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
12103 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
12104 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
12105 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
12106 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
12107 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
12108 s,@cf_ada_package@,$cf_ada_package,;t t
12109 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
12110 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
12111 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
12112 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
12113 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
12114 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
12115 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
12116 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
12117 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
12118 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
12119 s,@cross_compiling@,$cross_compiling,;t t
12120 s,@TEST_ARG2@,$TEST_ARG2,;t t
12121 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
12122 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
12123 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
12124 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
12125 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
12126 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
12127 CEOF
12128
12129 EOF
12130
12131   cat >>$CONFIG_STATUS <<\EOF
12132   # Split the substitutions into bite-sized pieces for seds with
12133   # small command number limits, like on Digital OSF/1 and HP-UX.
12134   ac_max_sed_lines=48
12135   ac_sed_frag=1 # Number of current file.
12136   ac_beg=1 # First line for current file.
12137   ac_end=$ac_max_sed_lines # Line after last line for current file.
12138   ac_more_lines=:
12139   ac_sed_cmds=
12140   while $ac_more_lines; do
12141     if test $ac_beg -gt 1; then
12142       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12143     else
12144       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
12145     fi
12146     if test ! -s $tmp/subs.frag; then
12147       ac_more_lines=false
12148     else
12149       # The purpose of the label and of the branching condition is to
12150       # speed up the sed processing (if there are no `@' at all, there
12151       # is no need to browse any of the substitutions).
12152       # These are the two extra sed commands mentioned above.
12153       (echo ':t
12154   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
12155       if test -z "$ac_sed_cmds"; then
12156         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
12157       else
12158         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
12159       fi
12160       ac_sed_frag=`expr $ac_sed_frag + 1`
12161       ac_beg=$ac_end
12162       ac_end=`expr $ac_end + $ac_max_sed_lines`
12163     fi
12164   done
12165   if test -z "$ac_sed_cmds"; then
12166     ac_sed_cmds=cat
12167   fi
12168 fi # test -n "$CONFIG_FILES"
12169
12170 EOF
12171 cat >>$CONFIG_STATUS <<\EOF
12172 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
12173   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12174   case $ac_file in
12175   - | *:- | *:-:* ) # input from stdin
12176         cat >$tmp/stdin
12177         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12178         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12179   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12180         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12181   * )   ac_file_in=$ac_file.in ;;
12182   esac
12183
12184   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
12185   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12186          X"$ac_file" : 'X\(//\)[^/]' \| \
12187          X"$ac_file" : 'X\(//\)$' \| \
12188          X"$ac_file" : 'X\(/\)' \| \
12189          .     : '\(.\)' 2>/dev/null ||
12190 echo X"$ac_file" |
12191     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12192           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12193           /^X\(\/\/\)$/{ s//\1/; q; }
12194           /^X\(\/\).*/{ s//\1/; q; }
12195           s/.*/./; q'`
12196   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12197     { case "$ac_dir" in
12198   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12199   *)                      as_incr_dir=.;;
12200 esac
12201 as_dummy="$ac_dir"
12202 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12203   case $as_mkdir_dir in
12204     # Skip DOS drivespec
12205     ?:) as_incr_dir=$as_mkdir_dir ;;
12206     *)
12207       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12208       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12209     ;;
12210   esac
12211 done; }
12212
12213     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
12214     # A "../" for each directory in $ac_dir_suffix.
12215     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
12216   else
12217     ac_dir_suffix= ac_dots=
12218   fi
12219
12220   case $srcdir in
12221   .)  ac_srcdir=.
12222       if test -z "$ac_dots"; then
12223          ac_top_srcdir=.
12224       else
12225          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
12226       fi ;;
12227   [\\/]* | ?:[\\/]* )
12228       ac_srcdir=$srcdir$ac_dir_suffix;
12229       ac_top_srcdir=$srcdir ;;
12230   *) # Relative path.
12231     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
12232     ac_top_srcdir=$ac_dots$srcdir ;;
12233   esac
12234
12235   case $INSTALL in
12236   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12237   *) ac_INSTALL=$ac_dots$INSTALL ;;
12238   esac
12239
12240   if test x"$ac_file" != x-; then
12241     { echo "$as_me:12241: creating $ac_file" >&5
12242 echo "$as_me: creating $ac_file" >&6;}
12243     rm -f "$ac_file"
12244   fi
12245   # Let's still pretend it is `configure' which instantiates (i.e., don't
12246   # use $as_me), people would be surprised to read:
12247   #    /* config.h.  Generated automatically by config.status.  */
12248   configure_input="Generated automatically from `echo $ac_file_in |
12249                                                  sed 's,.*/,,'` by configure."
12250
12251   # First look for the input files in the build tree, otherwise in the
12252   # src tree.
12253   ac_file_inputs=`IFS=:
12254     for f in $ac_file_in; do
12255       case $f in
12256       -) echo $tmp/stdin ;;
12257       [\\/$]*)
12258          # Absolute (can't be DOS-style, as IFS=:)
12259          test -f "$f" || { { echo "$as_me:12259: error: cannot find input file: $f" >&5
12260 echo "$as_me: error: cannot find input file: $f" >&2;}
12261    { (exit 1); exit 1; }; }
12262          echo $f;;
12263       *) # Relative
12264          if test -f "$f"; then
12265            # Build tree
12266            echo $f
12267          elif test -f "$srcdir/$f"; then
12268            # Source tree
12269            echo $srcdir/$f
12270          else
12271            # /dev/null tree
12272            { { echo "$as_me:12272: error: cannot find input file: $f" >&5
12273 echo "$as_me: error: cannot find input file: $f" >&2;}
12274    { (exit 1); exit 1; }; }
12275          fi;;
12276       esac
12277     done` || { (exit 1); exit 1; }
12278 EOF
12279 cat >>$CONFIG_STATUS <<EOF
12280   sed "$ac_vpsub
12281 $extrasub
12282 EOF
12283 cat >>$CONFIG_STATUS <<\EOF
12284 :t
12285 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12286 s,@configure_input@,$configure_input,;t t
12287 s,@srcdir@,$ac_srcdir,;t t
12288 s,@top_srcdir@,$ac_top_srcdir,;t t
12289 s,@INSTALL@,$ac_INSTALL,;t t
12290 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
12291   rm -f $tmp/stdin
12292   if test x"$ac_file" != x-; then
12293     mv $tmp/out $ac_file
12294   else
12295     cat $tmp/out
12296     rm -f $tmp/out
12297   fi
12298
12299 done
12300 EOF
12301 cat >>$CONFIG_STATUS <<\EOF
12302
12303 #
12304 # CONFIG_HEADER section.
12305 #
12306
12307 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12308 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12309 #
12310 # ac_d sets the value in "#define NAME VALUE" lines.
12311 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12312 ac_dB='[        ].*$,\1#\2'
12313 ac_dC=' '
12314 ac_dD=',;t'
12315 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12316 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12317 ac_iB='\([      ]\),\1#\2define\3'
12318 ac_iC=' '
12319 ac_iD='\4,;t'
12320 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12321 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12322 ac_uB='$,\1#\2define\3'
12323 ac_uC=' '
12324 ac_uD=',;t'
12325
12326 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
12327   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12328   case $ac_file in
12329   - | *:- | *:-:* ) # input from stdin
12330         cat >$tmp/stdin
12331         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12332         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12333   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
12334         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
12335   * )   ac_file_in=$ac_file.in ;;
12336   esac
12337
12338   test x"$ac_file" != x- && { echo "$as_me:12338: creating $ac_file" >&5
12339 echo "$as_me: creating $ac_file" >&6;}
12340
12341   # First look for the input files in the build tree, otherwise in the
12342   # src tree.
12343   ac_file_inputs=`IFS=:
12344     for f in $ac_file_in; do
12345       case $f in
12346       -) echo $tmp/stdin ;;
12347       [\\/$]*)
12348          # Absolute (can't be DOS-style, as IFS=:)
12349          test -f "$f" || { { echo "$as_me:12349: error: cannot find input file: $f" >&5
12350 echo "$as_me: error: cannot find input file: $f" >&2;}
12351    { (exit 1); exit 1; }; }
12352          echo $f;;
12353       *) # Relative
12354          if test -f "$f"; then
12355            # Build tree
12356            echo $f
12357          elif test -f "$srcdir/$f"; then
12358            # Source tree
12359            echo $srcdir/$f
12360          else
12361            # /dev/null tree
12362            { { echo "$as_me:12362: error: cannot find input file: $f" >&5
12363 echo "$as_me: error: cannot find input file: $f" >&2;}
12364    { (exit 1); exit 1; }; }
12365          fi;;
12366       esac
12367     done` || { (exit 1); exit 1; }
12368   # Remove the trailing spaces.
12369   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
12370
12371 EOF
12372
12373 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
12374 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
12375 # be either 'cat' or 'sort'.
12376 cat confdefs.h | uniq >conftest.vals
12377
12378 # Break up conftest.vals because some shells have a limit on
12379 # the size of here documents, and old seds have small limits too.
12380
12381 rm -f conftest.tail
12382 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
12383 while grep . conftest.vals >/dev/null
12384 do
12385   # Write chunks of a limited-size here document to conftest.frag.
12386   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
12387   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
12388   echo 'CEOF' >> $CONFIG_STATUS
12389   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12390   rm -f conftest.vals
12391   mv conftest.tail conftest.vals
12392 done
12393 rm -f conftest.vals
12394
12395 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
12396 # marker @DEFS@.
12397 echo '  cat >> conftest.edit <<CEOF
12398 /@DEFS@/r conftest.frag
12399 /@DEFS@/d
12400 CEOF
12401 sed -f conftest.edit $tmp/in > $tmp/out
12402 rm -f $tmp/in
12403 mv $tmp/out $tmp/in
12404 rm -f conftest.edit conftest.frag
12405 ' >> $CONFIG_STATUS
12406
12407 cat >>$CONFIG_STATUS <<\EOF
12408   # Let's still pretend it is `configure' which instantiates (i.e., don't
12409   # use $as_me), people would be surprised to read:
12410   #    /* config.h.  Generated automatically by config.status.  */
12411   if test x"$ac_file" = x-; then
12412     echo "/* Generated automatically by configure.  */" >$tmp/config.h
12413   else
12414     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
12415   fi
12416   cat $tmp/in >>$tmp/config.h
12417   rm -f $tmp/in
12418   if test x"$ac_file" != x-; then
12419     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
12420       { echo "$as_me:12420: $ac_file is unchanged" >&5
12421 echo "$as_me: $ac_file is unchanged" >&6;}
12422     else
12423       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12424          X"$ac_file" : 'X\(//\)[^/]' \| \
12425          X"$ac_file" : 'X\(//\)$' \| \
12426          X"$ac_file" : 'X\(/\)' \| \
12427          .     : '\(.\)' 2>/dev/null ||
12428 echo X"$ac_file" |
12429     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
12430           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
12431           /^X\(\/\/\)$/{ s//\1/; q; }
12432           /^X\(\/\).*/{ s//\1/; q; }
12433           s/.*/./; q'`
12434       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12435         { case "$ac_dir" in
12436   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
12437   *)                      as_incr_dir=.;;
12438 esac
12439 as_dummy="$ac_dir"
12440 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
12441   case $as_mkdir_dir in
12442     # Skip DOS drivespec
12443     ?:) as_incr_dir=$as_mkdir_dir ;;
12444     *)
12445       as_incr_dir=$as_incr_dir/$as_mkdir_dir
12446       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
12447     ;;
12448   esac
12449 done; }
12450
12451       fi
12452       rm -f $ac_file
12453       mv $tmp/config.h $ac_file
12454     fi
12455   else
12456     cat $tmp/config.h
12457     rm -f $tmp/config.h
12458   fi
12459 done
12460 EOF
12461 cat >>$CONFIG_STATUS <<\EOF
12462 #
12463 # CONFIG_COMMANDS section.
12464 #
12465 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
12466   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
12467   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
12468
12469   case $ac_dest in
12470     default )
12471 if test -z "$USE_OLD_MAKERULES" ; then
12472         $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
12473 fi
12474  ;;
12475   esac
12476 done
12477 EOF
12478
12479 cat >>$CONFIG_STATUS <<\EOF
12480
12481 { (exit 0); exit 0; }
12482 EOF
12483 chmod +x $CONFIG_STATUS
12484 ac_clean_files=$ac_clean_files_save
12485
12486 # configure is writing to config.log, and then calls config.status.
12487 # config.status does its own redirection, appending to config.log.
12488 # Unfortunately, on DOS this fails, as config.log is still kept open
12489 # by configure, so config.status won't be able to write to it; its
12490 # output is simply discarded.  So we exec the FD to /dev/null,
12491 # effectively closing config.log, so it can be properly (re)opened and
12492 # appended to by config.status.  When coming back to configure, we
12493 # need to make the FD available again.
12494 if test "$no_create" != yes; then
12495   ac_cs_success=:
12496   exec 5>/dev/null
12497   $SHELL $CONFIG_STATUS || ac_cs_success=false
12498   exec 5>>config.log
12499   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12500   # would make configure fail if this is the last instruction.
12501   $ac_cs_success || { (exit 1); exit 1; }
12502 fi
12503 ${MAKE:-make} preinstall