]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/configure
3dea7487a7ff8ad4b8c9dfe76e18ccdf5f7a5ef3
[ncurses.git] / Ada95 / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.12 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100530.
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   --enable-mixed-case     tic should assume mixed-case filenames
650   --with-install-prefix   prefixes actual install-location ($DESTDIR)
651 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
652   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
653   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
654   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
655   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
656   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
657   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
658 Options to Specify the Libraries Built/Used:
659   --enable-widec          compile with wide-char/UTF-8 code
660   --with-curses-dir=DIR   directory in which (n)curses is installed
661   --with-shlib-version=X  Specify rel or abi version for shared libs
662 Fine-Tuning Your Configuration:
663   --enable-broken_linker  compile with broken-linker support code
664   --disable-largefile     omit support for large files
665   --with-rcs-ids          compile-in RCS identifiers
666 Extensions:
667   --disable-ext-funcs     disable function-extensions
668   --enable-const          compile with extra/non-standard const
669 Development Code:
670   --without-develop       disable development options
671 Experimental Code:
672   --with-pthread          use POSIX thread library
673   --enable-weak-symbols   enable weak-symbols for pthreads
674   --enable-reentrant      compile with experimental reentrant code
675   --with-wrap-prefix=XXX  override prefix used for public variables
676 Testing/development Options:
677   --enable-echo           build: display "compiling" commands (default)
678   --enable-warnings       build: turn on GCC compiler warnings
679   --enable-assertions     test: turn on generation of assertion code
680   --enable-expanded       test: generate functions for certain macros
681   --disable-macros        test: use functions rather than macros
682   --with-trace            test: add trace() function to all models of ncurses
683 Ada95 Binding Options:
684   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
685   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
686   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
687
688 Some influential environment variables:
689   CC          C compiler command
690   CFLAGS      C compiler flags
691   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
692               nonstandard directory <lib dir>
693   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
694               headers in a nonstandard directory <include dir>
695   CPP         C preprocessor
696
697 Use these variables to override the choices made by `configure' or to help
698 it to find libraries and programs with nonstandard names/locations.
699
700 EOF
701 fi
702
703 if test "$ac_init_help" = "recursive"; then
704   # If there are subdirs, report their specific --help.
705   ac_popdir=`pwd`
706   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
707     cd $ac_subdir
708     # A "../" for each directory in /$ac_subdir.
709     ac_dots=`echo $ac_subdir |
710              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
711
712     case $srcdir in
713     .) # No --srcdir option.  We are building in place.
714       ac_sub_srcdir=$srcdir ;;
715     [\\/]* | ?:[\\/]* ) # Absolute path.
716       ac_sub_srcdir=$srcdir/$ac_subdir ;;
717     *) # Relative path.
718       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
719     esac
720
721     # Check for guested configure; otherwise get Cygnus style configure.
722     if test -f $ac_sub_srcdir/configure.gnu; then
723       echo
724       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
725     elif test -f $ac_sub_srcdir/configure; then
726       echo
727       $SHELL $ac_sub_srcdir/configure  --help=recursive
728     elif test -f $ac_sub_srcdir/configure.ac ||
729            test -f $ac_sub_srcdir/configure.in; then
730       echo
731       $ac_configure --help
732     else
733       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
734     fi
735     cd $ac_popdir
736   done
737 fi
738
739 test -n "$ac_init_help" && exit 0
740 if $ac_init_version; then
741   cat <<\EOF
742
743 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
744 Free Software Foundation, Inc.
745 This configure script is free software; the Free Software Foundation
746 gives unlimited permission to copy, distribute and modify it.
747 EOF
748   exit 0
749 fi
750 exec 5>config.log
751 cat >&5 <<EOF
752 This file contains any messages produced by compilers while
753 running configure, to aid debugging if configure makes a mistake.
754
755 It was created by $as_me, which was
756 generated by GNU Autoconf 2.52.20100530.  Invocation command line was
757
758   $ $0 $@
759
760 EOF
761 {
762 cat <<_ASUNAME
763 ## ---------- ##
764 ## Platform.  ##
765 ## ---------- ##
766
767 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
768 uname -m = `(uname -m) 2>/dev/null || echo unknown`
769 uname -r = `(uname -r) 2>/dev/null || echo unknown`
770 uname -s = `(uname -s) 2>/dev/null || echo unknown`
771 uname -v = `(uname -v) 2>/dev/null || echo unknown`
772
773 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
774 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
775
776 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
777 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
778 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
779 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
780 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
781 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
782 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
783
784 PATH = $PATH
785
786 _ASUNAME
787 } >&5
788
789 cat >&5 <<EOF
790 ## ------------ ##
791 ## Core tests.  ##
792 ## ------------ ##
793
794 EOF
795
796 # Keep a trace of the command line.
797 # Strip out --no-create and --no-recursion so they do not pile up.
798 # Also quote any args containing shell meta-characters.
799 ac_configure_args=
800 ac_sep=
801 for ac_arg
802 do
803   case $ac_arg in
804   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
805   | --no-cr | --no-c) ;;
806   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
807   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
808   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
809     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
810     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
811     ac_sep=" " ;;
812   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
813      ac_sep=" " ;;
814   esac
815   # Get rid of the leading space.
816 done
817
818 # When interrupted or exit'd, cleanup temporary files, and complete
819 # config.log.  We remove comments because anyway the quotes in there
820 # would cause problems or look ugly.
821 trap 'exit_status=$?
822   # Save into config.log some information that might help in debugging.
823   echo >&5
824   echo "## ----------------- ##" >&5
825   echo "## Cache variables.  ##" >&5
826   echo "## ----------------- ##" >&5
827   echo >&5
828   # The following way of writing the cache mishandles newlines in values,
829 {
830   (set) 2>&1 |
831     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
832     *ac_space=\ *)
833       sed -n \
834         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
835           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
836       ;;
837     *)
838       sed -n \
839         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
840       ;;
841     esac;
842 } >&5
843   sed "/^$/d" confdefs.h >conftest.log
844   if test -s conftest.log; then
845     echo >&5
846     echo "## ------------ ##" >&5
847     echo "## confdefs.h.  ##" >&5
848     echo "## ------------ ##" >&5
849     echo >&5
850     cat conftest.log >&5
851   fi
852   (echo; echo) >&5
853   test "$ac_signal" != 0 &&
854     echo "$as_me: caught signal $ac_signal" >&5
855   echo "$as_me: exit $exit_status" >&5
856   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
857     exit $exit_status
858      ' 0
859 for ac_signal in 1 2 13 15; do
860   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
861 done
862 ac_signal=0
863
864 # confdefs.h avoids OS command line length limits that DEFS can exceed.
865 rm -rf conftest* confdefs.h
866 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
867 echo >confdefs.h
868
869 # Let the site file select an alternate cache file if it wants to.
870 # Prefer explicitly selected file to automatically selected ones.
871 if test -z "$CONFIG_SITE"; then
872   if test "x$prefix" != xNONE; then
873     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
874   else
875     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
876   fi
877 fi
878 for ac_site_file in $CONFIG_SITE; do
879   if test -r "$ac_site_file"; then
880     { echo "$as_me:880: loading site script $ac_site_file" >&5
881 echo "$as_me: loading site script $ac_site_file" >&6;}
882     cat "$ac_site_file" >&5
883     . "$ac_site_file"
884   fi
885 done
886
887 if test -r "$cache_file"; then
888   # Some versions of bash will fail to source /dev/null (special
889   # files actually), so we avoid doing that.
890   if test -f "$cache_file"; then
891     { echo "$as_me:891: loading cache $cache_file" >&5
892 echo "$as_me: loading cache $cache_file" >&6;}
893     case $cache_file in
894       [\\/]* | ?:[\\/]* ) . $cache_file;;
895       *)                      . ./$cache_file;;
896     esac
897   fi
898 else
899   { echo "$as_me:899: creating cache $cache_file" >&5
900 echo "$as_me: creating cache $cache_file" >&6;}
901   >$cache_file
902 fi
903
904 # Check that the precious variables saved in the cache have kept the same
905 # value.
906 ac_cache_corrupted=false
907 for ac_var in `(set) 2>&1 |
908                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
909   eval ac_old_set=\$ac_cv_env_${ac_var}_set
910   eval ac_new_set=\$ac_env_${ac_var}_set
911   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
912   eval ac_new_val="\$ac_env_${ac_var}_value"
913   case $ac_old_set,$ac_new_set in
914     set,)
915       { echo "$as_me:915: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
916 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
917       ac_cache_corrupted=: ;;
918     ,set)
919       { echo "$as_me:919: error: \`$ac_var' was not set in the previous run" >&5
920 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
921       ac_cache_corrupted=: ;;
922     ,);;
923     *)
924       if test "x$ac_old_val" != "x$ac_new_val"; then
925         { echo "$as_me:925: error: \`$ac_var' has changed since the previous run:" >&5
926 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
927         { echo "$as_me:927:   former value:  $ac_old_val" >&5
928 echo "$as_me:   former value:  $ac_old_val" >&2;}
929         { echo "$as_me:929:   current value: $ac_new_val" >&5
930 echo "$as_me:   current value: $ac_new_val" >&2;}
931         ac_cache_corrupted=:
932       fi;;
933   esac
934   # Pass precious variables to config.status.  It doesn't matter if
935   # we pass some twice (in addition to the command line arguments).
936   if test "$ac_new_set" = set; then
937     case $ac_new_val in
938     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
940       ac_configure_args="$ac_configure_args '$ac_arg'"
941       ;;
942     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
943        ;;
944     esac
945   fi
946 done
947 if $ac_cache_corrupted; then
948   { echo "$as_me:948: error: changes in the environment can compromise the build" >&5
949 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
950   { { echo "$as_me:950: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
951 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
952    { (exit 1); exit 1; }; }
953 fi
954
955 ac_ext=c
956 ac_cpp='$CPP $CPPFLAGS'
957 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
958 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
959 ac_compiler_gnu=$ac_cv_c_compiler_gnu
960 ac_main_return=return
961
962 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
963   *c*,-n*) ECHO_N= ECHO_C='
964 ' ECHO_T='      ' ;;
965   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
966   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
967 esac
968 echo "#! $SHELL" >conftest.sh
969 echo  "exit 0"   >>conftest.sh
970 chmod +x conftest.sh
971 if { (echo "$as_me:971: PATH=\".;.\"; conftest.sh") >&5
972   (PATH=".;."; conftest.sh) 2>&5
973   ac_status=$?
974   echo "$as_me:974: \$? = $ac_status" >&5
975   (exit $ac_status); }; then
976   ac_path_separator=';'
977 else
978   ac_path_separator=:
979 fi
980 PATH_SEPARATOR="$ac_path_separator"
981 rm -f conftest.sh
982
983 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
984
985 top_builddir=`pwd`
986
987 ac_aux_dir=
988 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
989   if test -f $ac_dir/install-sh; then
990     ac_aux_dir=$ac_dir
991     ac_install_sh="$ac_aux_dir/install-sh -c"
992     break
993   elif 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/shtool; then
998     ac_aux_dir=$ac_dir
999     ac_install_sh="$ac_aux_dir/shtool install -c"
1000     break
1001   fi
1002 done
1003 if test -z "$ac_aux_dir"; then
1004   { { echo "$as_me:1004: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1005 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1006    { (exit 1); exit 1; }; }
1007 fi
1008 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1009 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1010 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1011
1012 # Make sure we can run config.sub.
1013 $ac_config_sub sun4 >/dev/null 2>&1 ||
1014   { { echo "$as_me:1014: error: cannot run $ac_config_sub" >&5
1015 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1016    { (exit 1); exit 1; }; }
1017
1018 echo "$as_me:1018: checking build system type" >&5
1019 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1020 if test "${ac_cv_build+set}" = set; then
1021   echo $ECHO_N "(cached) $ECHO_C" >&6
1022 else
1023   ac_cv_build_alias=$build_alias
1024 test -z "$ac_cv_build_alias" &&
1025   ac_cv_build_alias=`$ac_config_guess`
1026 test -z "$ac_cv_build_alias" &&
1027   { { echo "$as_me:1027: error: cannot guess build type; you must specify one" >&5
1028 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1029    { (exit 1); exit 1; }; }
1030 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1031   { { echo "$as_me:1031: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1032 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1033    { (exit 1); exit 1; }; }
1034
1035 fi
1036 echo "$as_me:1036: result: $ac_cv_build" >&5
1037 echo "${ECHO_T}$ac_cv_build" >&6
1038 build=$ac_cv_build
1039 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1040 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1041 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1042
1043 echo "$as_me:1043: checking host system type" >&5
1044 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1045 if test "${ac_cv_host+set}" = set; then
1046   echo $ECHO_N "(cached) $ECHO_C" >&6
1047 else
1048   ac_cv_host_alias=$host_alias
1049 test -z "$ac_cv_host_alias" &&
1050   ac_cv_host_alias=$ac_cv_build_alias
1051 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1052   { { echo "$as_me:1052: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1053 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1054    { (exit 1); exit 1; }; }
1055
1056 fi
1057 echo "$as_me:1057: result: $ac_cv_host" >&5
1058 echo "${ECHO_T}$ac_cv_host" >&6
1059 host=$ac_cv_host
1060 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1061 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1062 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1063
1064 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1065         echo "$as_me:1065: checking target system type" >&5
1066 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1067 if test "${ac_cv_target+set}" = set; then
1068   echo $ECHO_N "(cached) $ECHO_C" >&6
1069 else
1070   ac_cv_target_alias=$target_alias
1071 test "x$ac_cv_target_alias" = "x" &&
1072   ac_cv_target_alias=$ac_cv_host_alias
1073 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1074   { { echo "$as_me:1074: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1075 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1076    { (exit 1); exit 1; }; }
1077
1078 fi
1079 echo "$as_me:1079: result: $ac_cv_target" >&5
1080 echo "${ECHO_T}$ac_cv_target" >&6
1081 target=$ac_cv_target
1082 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1083 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1084 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1085
1086 # The aliases save the names the user supplied, while $host etc.
1087 # will get canonicalized.
1088 test -n "$target_alias" &&
1089   test "$program_prefix$program_suffix$program_transform_name" = \
1090     NONENONEs,x,x, &&
1091   program_prefix=${target_alias}-
1092         system_name="$host_os"
1093 else
1094         system_name="`(uname -s -r) 2>/dev/null`"
1095         if test -z "$system_name" ; then
1096                 system_name="`(hostname) 2>/dev/null`"
1097         fi
1098 fi
1099 test -n "$system_name" && cat >>confdefs.h <<EOF
1100 #define SYSTEM_NAME "$system_name"
1101 EOF
1102
1103 if test "${cf_cv_system_name+set}" = set; then
1104   echo $ECHO_N "(cached) $ECHO_C" >&6
1105 else
1106   cf_cv_system_name="$system_name"
1107 fi
1108
1109 test -z "$system_name" && system_name="$cf_cv_system_name"
1110 test -n "$cf_cv_system_name" && echo "$as_me:1110: result: Configuring for $cf_cv_system_name" >&5
1111 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1112
1113 if test ".$system_name" != ".$cf_cv_system_name" ; then
1114         echo "$as_me:1114: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1115 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1116         { { echo "$as_me:1116: error: \"Please remove config.cache and try again.\"" >&5
1117 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1118    { (exit 1); exit 1; }; }
1119 fi
1120
1121 # Check whether --with-system-type or --without-system-type was given.
1122 if test "${with_system_type+set}" = set; then
1123   withval="$with_system_type"
1124   { echo "$as_me:1124: WARNING: overriding system type to $withval" >&5
1125 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1126  cf_cv_system_name=$withval
1127 fi;
1128
1129 ###     Save the given $CFLAGS to allow user-override.
1130 cf_user_CFLAGS="$CFLAGS"
1131
1132 ###     Default install-location
1133
1134 echo "$as_me:1134: checking for prefix" >&5
1135 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1136 if test "x$prefix" = "xNONE" ; then
1137         case "$cf_cv_system_name" in
1138                 # non-vendor systems don't have a conflict
1139         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1140                 prefix=/usr
1141                 ;;
1142         *)      prefix=$ac_default_prefix
1143                 ;;
1144         esac
1145 fi
1146 echo "$as_me:1146: result: $prefix" >&5
1147 echo "${ECHO_T}$prefix" >&6
1148
1149 if test "x$prefix" = "xNONE" ; then
1150 echo "$as_me:1150: checking for default include-directory" >&5
1151 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1152 test -n "$verbose" && echo 1>&6
1153 for cf_symbol in \
1154         $includedir \
1155         $includedir/ncurses \
1156         $prefix/include \
1157         $prefix/include/ncurses \
1158         /usr/local/include \
1159         /usr/local/include/ncurses \
1160         /usr/include \
1161         /usr/include/ncurses
1162 do
1163         cf_dir=`eval echo $cf_symbol`
1164         if test -f $cf_dir/curses.h ; then
1165         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1166                 includedir="$cf_symbol"
1167                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1168                 break
1169         fi
1170         fi
1171         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1172 done
1173 echo "$as_me:1173: result: $includedir" >&5
1174 echo "${ECHO_T}$includedir" >&6
1175 fi
1176
1177 ###     Checks for programs.
1178 ac_ext=c
1179 ac_cpp='$CPP $CPPFLAGS'
1180 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1181 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1182 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1183 ac_main_return=return
1184 if test -n "$ac_tool_prefix"; then
1185   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1186 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1187 echo "$as_me:1187: checking for $ac_word" >&5
1188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1189 if test "${ac_cv_prog_CC+set}" = set; then
1190   echo $ECHO_N "(cached) $ECHO_C" >&6
1191 else
1192   if test -n "$CC"; then
1193   ac_cv_prog_CC="$CC" # Let the user override the test.
1194 else
1195   ac_save_IFS=$IFS; IFS=$ac_path_separator
1196 ac_dummy="$PATH"
1197 for ac_dir in $ac_dummy; do
1198   IFS=$ac_save_IFS
1199   test -z "$ac_dir" && ac_dir=.
1200   $as_executable_p "$ac_dir/$ac_word" || continue
1201 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1202 echo "$as_me:1202: found $ac_dir/$ac_word" >&5
1203 break
1204 done
1205
1206 fi
1207 fi
1208 CC=$ac_cv_prog_CC
1209 if test -n "$CC"; then
1210   echo "$as_me:1210: result: $CC" >&5
1211 echo "${ECHO_T}$CC" >&6
1212 else
1213   echo "$as_me:1213: result: no" >&5
1214 echo "${ECHO_T}no" >&6
1215 fi
1216
1217 fi
1218 if test -z "$ac_cv_prog_CC"; then
1219   ac_ct_CC=$CC
1220   # Extract the first word of "gcc", so it can be a program name with args.
1221 set dummy gcc; ac_word=$2
1222 echo "$as_me:1222: checking for $ac_word" >&5
1223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1224 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1225   echo $ECHO_N "(cached) $ECHO_C" >&6
1226 else
1227   if test -n "$ac_ct_CC"; then
1228   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1229 else
1230   ac_save_IFS=$IFS; IFS=$ac_path_separator
1231 ac_dummy="$PATH"
1232 for ac_dir in $ac_dummy; do
1233   IFS=$ac_save_IFS
1234   test -z "$ac_dir" && ac_dir=.
1235   $as_executable_p "$ac_dir/$ac_word" || continue
1236 ac_cv_prog_ac_ct_CC="gcc"
1237 echo "$as_me:1237: found $ac_dir/$ac_word" >&5
1238 break
1239 done
1240
1241 fi
1242 fi
1243 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1244 if test -n "$ac_ct_CC"; then
1245   echo "$as_me:1245: result: $ac_ct_CC" >&5
1246 echo "${ECHO_T}$ac_ct_CC" >&6
1247 else
1248   echo "$as_me:1248: result: no" >&5
1249 echo "${ECHO_T}no" >&6
1250 fi
1251
1252   CC=$ac_ct_CC
1253 else
1254   CC="$ac_cv_prog_CC"
1255 fi
1256
1257 if test -z "$CC"; then
1258   if test -n "$ac_tool_prefix"; then
1259   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1260 set dummy ${ac_tool_prefix}cc; ac_word=$2
1261 echo "$as_me:1261: checking for $ac_word" >&5
1262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1263 if test "${ac_cv_prog_CC+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   if test -n "$CC"; then
1267   ac_cv_prog_CC="$CC" # Let the user override the test.
1268 else
1269   ac_save_IFS=$IFS; IFS=$ac_path_separator
1270 ac_dummy="$PATH"
1271 for ac_dir in $ac_dummy; do
1272   IFS=$ac_save_IFS
1273   test -z "$ac_dir" && ac_dir=.
1274   $as_executable_p "$ac_dir/$ac_word" || continue
1275 ac_cv_prog_CC="${ac_tool_prefix}cc"
1276 echo "$as_me:1276: found $ac_dir/$ac_word" >&5
1277 break
1278 done
1279
1280 fi
1281 fi
1282 CC=$ac_cv_prog_CC
1283 if test -n "$CC"; then
1284   echo "$as_me:1284: result: $CC" >&5
1285 echo "${ECHO_T}$CC" >&6
1286 else
1287   echo "$as_me:1287: result: no" >&5
1288 echo "${ECHO_T}no" >&6
1289 fi
1290
1291 fi
1292 if test -z "$ac_cv_prog_CC"; then
1293   ac_ct_CC=$CC
1294   # Extract the first word of "cc", so it can be a program name with args.
1295 set dummy cc; ac_word=$2
1296 echo "$as_me:1296: checking for $ac_word" >&5
1297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1298 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1299   echo $ECHO_N "(cached) $ECHO_C" >&6
1300 else
1301   if test -n "$ac_ct_CC"; then
1302   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1303 else
1304   ac_save_IFS=$IFS; IFS=$ac_path_separator
1305 ac_dummy="$PATH"
1306 for ac_dir in $ac_dummy; do
1307   IFS=$ac_save_IFS
1308   test -z "$ac_dir" && ac_dir=.
1309   $as_executable_p "$ac_dir/$ac_word" || continue
1310 ac_cv_prog_ac_ct_CC="cc"
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1312 break
1313 done
1314
1315 fi
1316 fi
1317 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1318 if test -n "$ac_ct_CC"; then
1319   echo "$as_me:1319: result: $ac_ct_CC" >&5
1320 echo "${ECHO_T}$ac_ct_CC" >&6
1321 else
1322   echo "$as_me:1322: result: no" >&5
1323 echo "${ECHO_T}no" >&6
1324 fi
1325
1326   CC=$ac_ct_CC
1327 else
1328   CC="$ac_cv_prog_CC"
1329 fi
1330
1331 fi
1332 if test -z "$CC"; then
1333   # Extract the first word of "cc", so it can be a program name with args.
1334 set dummy cc; ac_word=$2
1335 echo "$as_me:1335: checking for $ac_word" >&5
1336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1337 if test "${ac_cv_prog_CC+set}" = set; then
1338   echo $ECHO_N "(cached) $ECHO_C" >&6
1339 else
1340   if test -n "$CC"; then
1341   ac_cv_prog_CC="$CC" # Let the user override the test.
1342 else
1343   ac_prog_rejected=no
1344   ac_save_IFS=$IFS; IFS=$ac_path_separator
1345 ac_dummy="$PATH"
1346 for ac_dir in $ac_dummy; do
1347   IFS=$ac_save_IFS
1348   test -z "$ac_dir" && ac_dir=.
1349   $as_executable_p "$ac_dir/$ac_word" || continue
1350 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1351   ac_prog_rejected=yes
1352   continue
1353 fi
1354 ac_cv_prog_CC="cc"
1355 echo "$as_me:1355: found $ac_dir/$ac_word" >&5
1356 break
1357 done
1358
1359 if test $ac_prog_rejected = yes; then
1360   # We found a bogon in the path, so make sure we never use it.
1361   set dummy $ac_cv_prog_CC
1362   shift
1363   if test $# != 0; then
1364     # We chose a different compiler from the bogus one.
1365     # However, it has the same basename, so the bogon will be chosen
1366     # first if we set CC to just the basename; use the full file name.
1367     shift
1368     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1369     shift
1370     ac_cv_prog_CC="$@"
1371   fi
1372 fi
1373 fi
1374 fi
1375 CC=$ac_cv_prog_CC
1376 if test -n "$CC"; then
1377   echo "$as_me:1377: result: $CC" >&5
1378 echo "${ECHO_T}$CC" >&6
1379 else
1380   echo "$as_me:1380: result: no" >&5
1381 echo "${ECHO_T}no" >&6
1382 fi
1383
1384 fi
1385 if test -z "$CC"; then
1386   if test -n "$ac_tool_prefix"; then
1387   for ac_prog in cl
1388   do
1389     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1390 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1391 echo "$as_me:1391: checking for $ac_word" >&5
1392 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1393 if test "${ac_cv_prog_CC+set}" = set; then
1394   echo $ECHO_N "(cached) $ECHO_C" >&6
1395 else
1396   if test -n "$CC"; then
1397   ac_cv_prog_CC="$CC" # Let the user override the test.
1398 else
1399   ac_save_IFS=$IFS; IFS=$ac_path_separator
1400 ac_dummy="$PATH"
1401 for ac_dir in $ac_dummy; do
1402   IFS=$ac_save_IFS
1403   test -z "$ac_dir" && ac_dir=.
1404   $as_executable_p "$ac_dir/$ac_word" || continue
1405 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1406 echo "$as_me:1406: found $ac_dir/$ac_word" >&5
1407 break
1408 done
1409
1410 fi
1411 fi
1412 CC=$ac_cv_prog_CC
1413 if test -n "$CC"; then
1414   echo "$as_me:1414: result: $CC" >&5
1415 echo "${ECHO_T}$CC" >&6
1416 else
1417   echo "$as_me:1417: result: no" >&5
1418 echo "${ECHO_T}no" >&6
1419 fi
1420
1421     test -n "$CC" && break
1422   done
1423 fi
1424 if test -z "$CC"; then
1425   ac_ct_CC=$CC
1426   for ac_prog in cl
1427 do
1428   # Extract the first word of "$ac_prog", so it can be a program name with args.
1429 set dummy $ac_prog; ac_word=$2
1430 echo "$as_me:1430: checking for $ac_word" >&5
1431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1432 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1433   echo $ECHO_N "(cached) $ECHO_C" >&6
1434 else
1435   if test -n "$ac_ct_CC"; then
1436   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1437 else
1438   ac_save_IFS=$IFS; IFS=$ac_path_separator
1439 ac_dummy="$PATH"
1440 for ac_dir in $ac_dummy; do
1441   IFS=$ac_save_IFS
1442   test -z "$ac_dir" && ac_dir=.
1443   $as_executable_p "$ac_dir/$ac_word" || continue
1444 ac_cv_prog_ac_ct_CC="$ac_prog"
1445 echo "$as_me:1445: found $ac_dir/$ac_word" >&5
1446 break
1447 done
1448
1449 fi
1450 fi
1451 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1452 if test -n "$ac_ct_CC"; then
1453   echo "$as_me:1453: result: $ac_ct_CC" >&5
1454 echo "${ECHO_T}$ac_ct_CC" >&6
1455 else
1456   echo "$as_me:1456: result: no" >&5
1457 echo "${ECHO_T}no" >&6
1458 fi
1459
1460   test -n "$ac_ct_CC" && break
1461 done
1462
1463   CC=$ac_ct_CC
1464 fi
1465
1466 fi
1467
1468 test -z "$CC" && { { echo "$as_me:1468: error: no acceptable cc found in \$PATH" >&5
1469 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1470    { (exit 1); exit 1; }; }
1471
1472 # Provide some information about the compiler.
1473 echo "$as_me:1473:" \
1474      "checking for C compiler version" >&5
1475 ac_compiler=`set X $ac_compile; echo $2`
1476 { (eval echo "$as_me:1476: \"$ac_compiler --version </dev/null >&5\"") >&5
1477   (eval $ac_compiler --version </dev/null >&5) 2>&5
1478   ac_status=$?
1479   echo "$as_me:1479: \$? = $ac_status" >&5
1480   (exit $ac_status); }
1481 { (eval echo "$as_me:1481: \"$ac_compiler -v </dev/null >&5\"") >&5
1482   (eval $ac_compiler -v </dev/null >&5) 2>&5
1483   ac_status=$?
1484   echo "$as_me:1484: \$? = $ac_status" >&5
1485   (exit $ac_status); }
1486 { (eval echo "$as_me:1486: \"$ac_compiler -V </dev/null >&5\"") >&5
1487   (eval $ac_compiler -V </dev/null >&5) 2>&5
1488   ac_status=$?
1489   echo "$as_me:1489: \$? = $ac_status" >&5
1490   (exit $ac_status); }
1491
1492 cat >conftest.$ac_ext <<_ACEOF
1493 #line 1493 "configure"
1494 #include "confdefs.h"
1495
1496 int
1497 main ()
1498 {
1499
1500   ;
1501   return 0;
1502 }
1503 _ACEOF
1504 ac_clean_files_save=$ac_clean_files
1505 ac_clean_files="$ac_clean_files a.out a.exe"
1506 # Try to create an executable without -o first, disregard a.out.
1507 # It will help us diagnose broken compilers, and finding out an intuition
1508 # of exeext.
1509 echo "$as_me:1509: checking for C compiler default output" >&5
1510 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1511 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1512 if { (eval echo "$as_me:1512: \"$ac_link_default\"") >&5
1513   (eval $ac_link_default) 2>&5
1514   ac_status=$?
1515   echo "$as_me:1515: \$? = $ac_status" >&5
1516   (exit $ac_status); }; then
1517   # Find the output, starting from the most likely.  This scheme is
1518 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1519 # resort.
1520 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1521                 ls a.out conftest 2>/dev/null;
1522                 ls a.* conftest.* 2>/dev/null`; do
1523   case $ac_file in
1524     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1525     a.out ) # We found the default executable, but exeext='' is most
1526             # certainly right.
1527             break;;
1528     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1529           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1530           export ac_cv_exeext
1531           break;;
1532     * ) break;;
1533   esac
1534 done
1535 else
1536   echo "$as_me: failed program was:" >&5
1537 cat conftest.$ac_ext >&5
1538 { { echo "$as_me:1538: error: C compiler cannot create executables" >&5
1539 echo "$as_me: error: C compiler cannot create executables" >&2;}
1540    { (exit 77); exit 77; }; }
1541 fi
1542
1543 ac_exeext=$ac_cv_exeext
1544 echo "$as_me:1544: result: $ac_file" >&5
1545 echo "${ECHO_T}$ac_file" >&6
1546
1547 # Check the compiler produces executables we can run.  If not, either
1548 # the compiler is broken, or we cross compile.
1549 echo "$as_me:1549: checking whether the C compiler works" >&5
1550 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1551 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1552 # If not cross compiling, check that we can run a simple program.
1553 if test "$cross_compiling" != yes; then
1554   if { ac_try='./$ac_file'
1555   { (eval echo "$as_me:1555: \"$ac_try\"") >&5
1556   (eval $ac_try) 2>&5
1557   ac_status=$?
1558   echo "$as_me:1558: \$? = $ac_status" >&5
1559   (exit $ac_status); }; }; then
1560     cross_compiling=no
1561   else
1562     if test "$cross_compiling" = maybe; then
1563         cross_compiling=yes
1564     else
1565         { { echo "$as_me:1565: error: cannot run C compiled programs.
1566 If you meant to cross compile, use \`--host'." >&5
1567 echo "$as_me: error: cannot run C compiled programs.
1568 If you meant to cross compile, use \`--host'." >&2;}
1569    { (exit 1); exit 1; }; }
1570     fi
1571   fi
1572 fi
1573 echo "$as_me:1573: result: yes" >&5
1574 echo "${ECHO_T}yes" >&6
1575
1576 rm -f a.out a.exe conftest$ac_cv_exeext
1577 ac_clean_files=$ac_clean_files_save
1578 # Check the compiler produces executables we can run.  If not, either
1579 # the compiler is broken, or we cross compile.
1580 echo "$as_me:1580: checking whether we are cross compiling" >&5
1581 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1582 echo "$as_me:1582: result: $cross_compiling" >&5
1583 echo "${ECHO_T}$cross_compiling" >&6
1584
1585 echo "$as_me:1585: checking for executable suffix" >&5
1586 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1587 if { (eval echo "$as_me:1587: \"$ac_link\"") >&5
1588   (eval $ac_link) 2>&5
1589   ac_status=$?
1590   echo "$as_me:1590: \$? = $ac_status" >&5
1591   (exit $ac_status); }; then
1592   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1593 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1594 # work properly (i.e., refer to `conftest.exe'), while it won't with
1595 # `rm'.
1596 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1597   case $ac_file in
1598     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1599     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1600           export ac_cv_exeext
1601           break;;
1602     * ) break;;
1603   esac
1604 done
1605 else
1606   { { echo "$as_me:1606: error: cannot compute EXEEXT: cannot compile and link" >&5
1607 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1608    { (exit 1); exit 1; }; }
1609 fi
1610
1611 rm -f conftest$ac_cv_exeext
1612 echo "$as_me:1612: result: $ac_cv_exeext" >&5
1613 echo "${ECHO_T}$ac_cv_exeext" >&6
1614
1615 rm -f conftest.$ac_ext
1616 EXEEXT=$ac_cv_exeext
1617 ac_exeext=$EXEEXT
1618 echo "$as_me:1618: checking for object suffix" >&5
1619 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1620 if test "${ac_cv_objext+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   cat >conftest.$ac_ext <<_ACEOF
1624 #line 1624 "configure"
1625 #include "confdefs.h"
1626
1627 int
1628 main ()
1629 {
1630
1631   ;
1632   return 0;
1633 }
1634 _ACEOF
1635 rm -f conftest.o conftest.obj
1636 if { (eval echo "$as_me:1636: \"$ac_compile\"") >&5
1637   (eval $ac_compile) 2>&5
1638   ac_status=$?
1639   echo "$as_me:1639: \$? = $ac_status" >&5
1640   (exit $ac_status); }; then
1641   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1642   case $ac_file in
1643     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1644     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1645        break;;
1646   esac
1647 done
1648 else
1649   echo "$as_me: failed program was:" >&5
1650 cat conftest.$ac_ext >&5
1651 { { echo "$as_me:1651: error: cannot compute OBJEXT: cannot compile" >&5
1652 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1653    { (exit 1); exit 1; }; }
1654 fi
1655
1656 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1657 fi
1658 echo "$as_me:1658: result: $ac_cv_objext" >&5
1659 echo "${ECHO_T}$ac_cv_objext" >&6
1660 OBJEXT=$ac_cv_objext
1661 ac_objext=$OBJEXT
1662 echo "$as_me:1662: checking whether we are using the GNU C compiler" >&5
1663 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1664 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1665   echo $ECHO_N "(cached) $ECHO_C" >&6
1666 else
1667   cat >conftest.$ac_ext <<_ACEOF
1668 #line 1668 "configure"
1669 #include "confdefs.h"
1670
1671 int
1672 main ()
1673 {
1674 #ifndef __GNUC__
1675        choke me
1676 #endif
1677
1678   ;
1679   return 0;
1680 }
1681 _ACEOF
1682 rm -f conftest.$ac_objext
1683 if { (eval echo "$as_me:1683: \"$ac_compile\"") >&5
1684   (eval $ac_compile) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); } &&
1688          { ac_try='test -s conftest.$ac_objext'
1689   { (eval echo "$as_me:1689: \"$ac_try\"") >&5
1690   (eval $ac_try) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }; }; then
1694   ac_compiler_gnu=yes
1695 else
1696   echo "$as_me: failed program was:" >&5
1697 cat conftest.$ac_ext >&5
1698 ac_compiler_gnu=no
1699 fi
1700 rm -f conftest.$ac_objext conftest.$ac_ext
1701 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1702
1703 fi
1704 echo "$as_me:1704: result: $ac_cv_c_compiler_gnu" >&5
1705 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1706 GCC=`test $ac_compiler_gnu = yes && echo yes`
1707 ac_test_CFLAGS=${CFLAGS+set}
1708 ac_save_CFLAGS=$CFLAGS
1709 CFLAGS="-g"
1710 echo "$as_me:1710: checking whether $CC accepts -g" >&5
1711 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1712 if test "${ac_cv_prog_cc_g+set}" = set; then
1713   echo $ECHO_N "(cached) $ECHO_C" >&6
1714 else
1715   cat >conftest.$ac_ext <<_ACEOF
1716 #line 1716 "configure"
1717 #include "confdefs.h"
1718
1719 int
1720 main ()
1721 {
1722
1723   ;
1724   return 0;
1725 }
1726 _ACEOF
1727 rm -f conftest.$ac_objext
1728 if { (eval echo "$as_me:1728: \"$ac_compile\"") >&5
1729   (eval $ac_compile) 2>&5
1730   ac_status=$?
1731   echo "$as_me:1731: \$? = $ac_status" >&5
1732   (exit $ac_status); } &&
1733          { ac_try='test -s conftest.$ac_objext'
1734   { (eval echo "$as_me:1734: \"$ac_try\"") >&5
1735   (eval $ac_try) 2>&5
1736   ac_status=$?
1737   echo "$as_me:1737: \$? = $ac_status" >&5
1738   (exit $ac_status); }; }; then
1739   ac_cv_prog_cc_g=yes
1740 else
1741   echo "$as_me: failed program was:" >&5
1742 cat conftest.$ac_ext >&5
1743 ac_cv_prog_cc_g=no
1744 fi
1745 rm -f conftest.$ac_objext conftest.$ac_ext
1746 fi
1747 echo "$as_me:1747: result: $ac_cv_prog_cc_g" >&5
1748 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1749 if test "$ac_test_CFLAGS" = set; then
1750   CFLAGS=$ac_save_CFLAGS
1751 elif test $ac_cv_prog_cc_g = yes; then
1752   if test "$GCC" = yes; then
1753     CFLAGS="-g -O2"
1754   else
1755     CFLAGS="-g"
1756   fi
1757 else
1758   if test "$GCC" = yes; then
1759     CFLAGS="-O2"
1760   else
1761     CFLAGS=
1762   fi
1763 fi
1764 # Some people use a C++ compiler to compile C.  Since we use `exit',
1765 # in C++ we need to declare it.  In case someone uses the same compiler
1766 # for both compiling C and C++ we need to have the C++ compiler decide
1767 # the declaration of exit, since it's the most demanding environment.
1768 cat >conftest.$ac_ext <<_ACEOF
1769 #ifndef __cplusplus
1770   choke me
1771 #endif
1772 _ACEOF
1773 rm -f conftest.$ac_objext
1774 if { (eval echo "$as_me:1774: \"$ac_compile\"") >&5
1775   (eval $ac_compile) 2>&5
1776   ac_status=$?
1777   echo "$as_me:1777: \$? = $ac_status" >&5
1778   (exit $ac_status); } &&
1779          { ac_try='test -s conftest.$ac_objext'
1780   { (eval echo "$as_me:1780: \"$ac_try\"") >&5
1781   (eval $ac_try) 2>&5
1782   ac_status=$?
1783   echo "$as_me:1783: \$? = $ac_status" >&5
1784   (exit $ac_status); }; }; then
1785   for ac_declaration in \
1786    ''\
1787    '#include <stdlib.h>' \
1788    'extern "C" void std::exit (int) throw (); using std::exit;' \
1789    'extern "C" void std::exit (int); using std::exit;' \
1790    'extern "C" void exit (int) throw ();' \
1791    'extern "C" void exit (int);' \
1792    'void exit (int);'
1793 do
1794   cat >conftest.$ac_ext <<_ACEOF
1795 #line 1795 "configure"
1796 #include "confdefs.h"
1797 #include <stdlib.h>
1798 $ac_declaration
1799 int
1800 main ()
1801 {
1802 exit (42);
1803   ;
1804   return 0;
1805 }
1806 _ACEOF
1807 rm -f conftest.$ac_objext
1808 if { (eval echo "$as_me:1808: \"$ac_compile\"") >&5
1809   (eval $ac_compile) 2>&5
1810   ac_status=$?
1811   echo "$as_me:1811: \$? = $ac_status" >&5
1812   (exit $ac_status); } &&
1813          { ac_try='test -s conftest.$ac_objext'
1814   { (eval echo "$as_me:1814: \"$ac_try\"") >&5
1815   (eval $ac_try) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); }; }; then
1819   :
1820 else
1821   echo "$as_me: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1823 continue
1824 fi
1825 rm -f conftest.$ac_objext conftest.$ac_ext
1826   cat >conftest.$ac_ext <<_ACEOF
1827 #line 1827 "configure"
1828 #include "confdefs.h"
1829 $ac_declaration
1830 int
1831 main ()
1832 {
1833 exit (42);
1834   ;
1835   return 0;
1836 }
1837 _ACEOF
1838 rm -f conftest.$ac_objext
1839 if { (eval echo "$as_me:1839: \"$ac_compile\"") >&5
1840   (eval $ac_compile) 2>&5
1841   ac_status=$?
1842   echo "$as_me:1842: \$? = $ac_status" >&5
1843   (exit $ac_status); } &&
1844          { ac_try='test -s conftest.$ac_objext'
1845   { (eval echo "$as_me:1845: \"$ac_try\"") >&5
1846   (eval $ac_try) 2>&5
1847   ac_status=$?
1848   echo "$as_me:1848: \$? = $ac_status" >&5
1849   (exit $ac_status); }; }; then
1850   break
1851 else
1852   echo "$as_me: failed program was:" >&5
1853 cat conftest.$ac_ext >&5
1854 fi
1855 rm -f conftest.$ac_objext conftest.$ac_ext
1856 done
1857 rm -f conftest*
1858 if test -n "$ac_declaration"; then
1859   echo '#ifdef __cplusplus' >>confdefs.h
1860   echo $ac_declaration      >>confdefs.h
1861   echo '#endif'             >>confdefs.h
1862 fi
1863
1864 else
1865   echo "$as_me: failed program was:" >&5
1866 cat conftest.$ac_ext >&5
1867 fi
1868 rm -f conftest.$ac_objext conftest.$ac_ext
1869 ac_ext=c
1870 ac_cpp='$CPP $CPPFLAGS'
1871 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1872 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1873 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1874 ac_main_return=return
1875
1876 GCC_VERSION=none
1877 if test "$GCC" = yes ; then
1878         echo "$as_me:1878: checking version of $CC" >&5
1879 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1880         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1881         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1882         echo "$as_me:1882: result: $GCC_VERSION" >&5
1883 echo "${ECHO_T}$GCC_VERSION" >&6
1884 fi
1885
1886 ac_ext=c
1887 ac_cpp='$CPP $CPPFLAGS'
1888 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1889 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1890 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1891 ac_main_return=return
1892 echo "$as_me:1892: checking how to run the C preprocessor" >&5
1893 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1894 # On Suns, sometimes $CPP names a directory.
1895 if test -n "$CPP" && test -d "$CPP"; then
1896   CPP=
1897 fi
1898 if test -z "$CPP"; then
1899   if test "${ac_cv_prog_CPP+set}" = set; then
1900   echo $ECHO_N "(cached) $ECHO_C" >&6
1901 else
1902       # Double quotes because CPP needs to be expanded
1903     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1904     do
1905       ac_preproc_ok=false
1906 for ac_c_preproc_warn_flag in '' yes
1907 do
1908   # Use a header file that comes with gcc, so configuring glibc
1909   # with a fresh cross-compiler works.
1910   # On the NeXT, cc -E runs the code through the compiler's parser,
1911   # not just through cpp. "Syntax error" is here to catch this case.
1912   cat >conftest.$ac_ext <<_ACEOF
1913 #line 1913 "configure"
1914 #include "confdefs.h"
1915 #include <assert.h>
1916                      Syntax error
1917 _ACEOF
1918 if { (eval echo "$as_me:1918: \"$ac_cpp conftest.$ac_ext\"") >&5
1919   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1920   ac_status=$?
1921   egrep -v '^ *\+' conftest.er1 >conftest.err
1922   rm -f conftest.er1
1923   cat conftest.err >&5
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit $ac_status); } >/dev/null; then
1926   if test -s conftest.err; then
1927     ac_cpp_err=$ac_c_preproc_warn_flag
1928   else
1929     ac_cpp_err=
1930   fi
1931 else
1932   ac_cpp_err=yes
1933 fi
1934 if test -z "$ac_cpp_err"; then
1935   :
1936 else
1937   echo "$as_me: failed program was:" >&5
1938   cat conftest.$ac_ext >&5
1939   # Broken: fails on valid input.
1940 continue
1941 fi
1942 rm -f conftest.err conftest.$ac_ext
1943
1944   # OK, works on sane cases.  Now check whether non-existent headers
1945   # can be detected and how.
1946   cat >conftest.$ac_ext <<_ACEOF
1947 #line 1947 "configure"
1948 #include "confdefs.h"
1949 #include <ac_nonexistent.h>
1950 _ACEOF
1951 if { (eval echo "$as_me:1951: \"$ac_cpp conftest.$ac_ext\"") >&5
1952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1953   ac_status=$?
1954   egrep -v '^ *\+' conftest.er1 >conftest.err
1955   rm -f conftest.er1
1956   cat conftest.err >&5
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit $ac_status); } >/dev/null; then
1959   if test -s conftest.err; then
1960     ac_cpp_err=$ac_c_preproc_warn_flag
1961   else
1962     ac_cpp_err=
1963   fi
1964 else
1965   ac_cpp_err=yes
1966 fi
1967 if test -z "$ac_cpp_err"; then
1968   # Broken: success on invalid input.
1969 continue
1970 else
1971   echo "$as_me: failed program was:" >&5
1972   cat conftest.$ac_ext >&5
1973   # Passes both tests.
1974 ac_preproc_ok=:
1975 break
1976 fi
1977 rm -f conftest.err conftest.$ac_ext
1978
1979 done
1980 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1981 rm -f conftest.err conftest.$ac_ext
1982 if $ac_preproc_ok; then
1983   break
1984 fi
1985
1986     done
1987     ac_cv_prog_CPP=$CPP
1988
1989 fi
1990   CPP=$ac_cv_prog_CPP
1991 else
1992   ac_cv_prog_CPP=$CPP
1993 fi
1994 echo "$as_me:1994: result: $CPP" >&5
1995 echo "${ECHO_T}$CPP" >&6
1996 ac_preproc_ok=false
1997 for ac_c_preproc_warn_flag in '' yes
1998 do
1999   # Use a header file that comes with gcc, so configuring glibc
2000   # with a fresh cross-compiler works.
2001   # On the NeXT, cc -E runs the code through the compiler's parser,
2002   # not just through cpp. "Syntax error" is here to catch this case.
2003   cat >conftest.$ac_ext <<_ACEOF
2004 #line 2004 "configure"
2005 #include "confdefs.h"
2006 #include <assert.h>
2007                      Syntax error
2008 _ACEOF
2009 if { (eval echo "$as_me:2009: \"$ac_cpp conftest.$ac_ext\"") >&5
2010   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2011   ac_status=$?
2012   egrep -v '^ *\+' conftest.er1 >conftest.err
2013   rm -f conftest.er1
2014   cat conftest.err >&5
2015   echo "$as_me:2015: \$? = $ac_status" >&5
2016   (exit $ac_status); } >/dev/null; then
2017   if test -s conftest.err; then
2018     ac_cpp_err=$ac_c_preproc_warn_flag
2019   else
2020     ac_cpp_err=
2021   fi
2022 else
2023   ac_cpp_err=yes
2024 fi
2025 if test -z "$ac_cpp_err"; then
2026   :
2027 else
2028   echo "$as_me: failed program was:" >&5
2029   cat conftest.$ac_ext >&5
2030   # Broken: fails on valid input.
2031 continue
2032 fi
2033 rm -f conftest.err conftest.$ac_ext
2034
2035   # OK, works on sane cases.  Now check whether non-existent headers
2036   # can be detected and how.
2037   cat >conftest.$ac_ext <<_ACEOF
2038 #line 2038 "configure"
2039 #include "confdefs.h"
2040 #include <ac_nonexistent.h>
2041 _ACEOF
2042 if { (eval echo "$as_me:2042: \"$ac_cpp conftest.$ac_ext\"") >&5
2043   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2044   ac_status=$?
2045   egrep -v '^ *\+' conftest.er1 >conftest.err
2046   rm -f conftest.er1
2047   cat conftest.err >&5
2048   echo "$as_me:2048: \$? = $ac_status" >&5
2049   (exit $ac_status); } >/dev/null; then
2050   if test -s conftest.err; then
2051     ac_cpp_err=$ac_c_preproc_warn_flag
2052   else
2053     ac_cpp_err=
2054   fi
2055 else
2056   ac_cpp_err=yes
2057 fi
2058 if test -z "$ac_cpp_err"; then
2059   # Broken: success on invalid input.
2060 continue
2061 else
2062   echo "$as_me: failed program was:" >&5
2063   cat conftest.$ac_ext >&5
2064   # Passes both tests.
2065 ac_preproc_ok=:
2066 break
2067 fi
2068 rm -f conftest.err conftest.$ac_ext
2069
2070 done
2071 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2072 rm -f conftest.err conftest.$ac_ext
2073 if $ac_preproc_ok; then
2074   :
2075 else
2076   { { echo "$as_me:2076: error: C preprocessor \"$CPP\" fails sanity check" >&5
2077 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2078    { (exit 1); exit 1; }; }
2079 fi
2080
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 if test $ac_cv_c_compiler_gnu = yes; then
2089     echo "$as_me:2089: checking whether $CC needs -traditional" >&5
2090 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2091 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2092   echo $ECHO_N "(cached) $ECHO_C" >&6
2093 else
2094     ac_pattern="Autoconf.*'x'"
2095   cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <sgtty.h>
2099 int Autoconf = TIOCGETP;
2100 _ACEOF
2101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2102   egrep "$ac_pattern" >/dev/null 2>&1; then
2103   ac_cv_prog_gcc_traditional=yes
2104 else
2105   ac_cv_prog_gcc_traditional=no
2106 fi
2107 rm -f conftest*
2108
2109   if test $ac_cv_prog_gcc_traditional = no; then
2110     cat >conftest.$ac_ext <<_ACEOF
2111 #line 2111 "configure"
2112 #include "confdefs.h"
2113 #include <termio.h>
2114 int Autoconf = TCGETA;
2115 _ACEOF
2116 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2117   egrep "$ac_pattern" >/dev/null 2>&1; then
2118   ac_cv_prog_gcc_traditional=yes
2119 fi
2120 rm -f conftest*
2121
2122   fi
2123 fi
2124 echo "$as_me:2124: result: $ac_cv_prog_gcc_traditional" >&5
2125 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2126   if test $ac_cv_prog_gcc_traditional = yes; then
2127     CC="$CC -traditional"
2128   fi
2129 fi
2130
2131 echo "$as_me:2131: checking whether $CC understands -c and -o together" >&5
2132 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2133 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2134   echo $ECHO_N "(cached) $ECHO_C" >&6
2135 else
2136
2137 cat > conftest.$ac_ext <<CF_EOF
2138 #include <stdio.h>
2139 int main()
2140 {
2141         ${cf_cv_main_return:-return}(0);
2142 }
2143 CF_EOF
2144 # We do the test twice because some compilers refuse to overwrite an
2145 # existing .o file with -o, though they will create one.
2146 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2147 if { (eval echo "$as_me:2147: \"$ac_try\"") >&5
2148   (eval $ac_try) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } &&
2152   test -f conftest2.$ac_objext && { (eval echo "$as_me:2152: \"$ac_try\"") >&5
2153   (eval $ac_try) 2>&5
2154   ac_status=$?
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); };
2157 then
2158   eval cf_cv_prog_CC_c_o=yes
2159 else
2160   eval cf_cv_prog_CC_c_o=no
2161 fi
2162 rm -f conftest*
2163
2164 fi
2165 if test $cf_cv_prog_CC_c_o = yes; then
2166   echo "$as_me:2166: result: yes" >&5
2167 echo "${ECHO_T}yes" >&6
2168 else
2169   echo "$as_me:2169: result: no" >&5
2170 echo "${ECHO_T}no" >&6
2171 fi
2172
2173 echo "$as_me:2173: checking for POSIXized ISC" >&5
2174 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2175 if test -d /etc/conf/kconfig.d &&
2176    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2177 then
2178   echo "$as_me:2178: result: yes" >&5
2179 echo "${ECHO_T}yes" >&6
2180   ISC=yes # If later tests want to check for ISC.
2181
2182 cat >>confdefs.h <<\EOF
2183 #define _POSIX_SOURCE 1
2184 EOF
2185
2186   if test "$GCC" = yes; then
2187     CC="$CC -posix"
2188   else
2189     CC="$CC -Xp"
2190   fi
2191 else
2192   echo "$as_me:2192: result: no" >&5
2193 echo "${ECHO_T}no" >&6
2194   ISC=
2195 fi
2196
2197 echo "$as_me:2197: checking for ${CC-cc} option to accept ANSI C" >&5
2198 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2199 if test "${cf_cv_ansi_cc+set}" = set; then
2200   echo $ECHO_N "(cached) $ECHO_C" >&6
2201 else
2202
2203 cf_cv_ansi_cc=no
2204 cf_save_CFLAGS="$CFLAGS"
2205 cf_save_CPPFLAGS="$CPPFLAGS"
2206 # Don't try gcc -ansi; that turns off useful extensions and
2207 # breaks some systems' header files.
2208 # AIX                   -qlanglvl=ansi
2209 # Ultrix and OSF/1      -std1
2210 # HP-UX                 -Aa -D_HPUX_SOURCE
2211 # SVR4                  -Xc
2212 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2213 for cf_arg in "-DCC_HAS_PROTOS" \
2214         "" \
2215         -qlanglvl=ansi \
2216         -std1 \
2217         -Ae \
2218         "-Aa -D_HPUX_SOURCE" \
2219         -Xc
2220 do
2221
2222 cf_fix_cppflags=no
2223 cf_new_cflags=
2224 cf_new_cppflags=
2225 cf_new_extra_cppflags=
2226
2227 for cf_add_cflags in $cf_arg
2228 do
2229 case $cf_fix_cppflags in
2230 no)
2231         case $cf_add_cflags in #(vi
2232         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2233                 case $cf_add_cflags in
2234                 -D*)
2235                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2236
2237                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2238                                 && test -z "${cf_tst_cflags}" \
2239                                 && cf_fix_cppflags=yes
2240
2241                         if test $cf_fix_cppflags = yes ; then
2242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2243                                 continue
2244                         elif test "${cf_tst_cflags}" = "\"'" ; then
2245                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2246                                 continue
2247                         fi
2248                         ;;
2249                 esac
2250                 case "$CPPFLAGS" in
2251                 *$cf_add_cflags) #(vi
2252                         ;;
2253                 *) #(vi
2254                         case $cf_add_cflags in #(vi
2255                         -D*)
2256                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2257
2258 CPPFLAGS=`echo "$CPPFLAGS" | \
2259         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2260                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2261
2262                                 ;;
2263                         esac
2264                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2265                         ;;
2266                 esac
2267                 ;;
2268         *)
2269                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2270                 ;;
2271         esac
2272         ;;
2273 yes)
2274         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2275
2276         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2277
2278         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2279                 && test -z "${cf_tst_cflags}" \
2280                 && cf_fix_cppflags=no
2281         ;;
2282 esac
2283 done
2284
2285 if test -n "$cf_new_cflags" ; then
2286
2287         CFLAGS="$CFLAGS $cf_new_cflags"
2288 fi
2289
2290 if test -n "$cf_new_cppflags" ; then
2291
2292         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2293 fi
2294
2295 if test -n "$cf_new_extra_cppflags" ; then
2296
2297         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2298 fi
2299
2300         cat >conftest.$ac_ext <<_ACEOF
2301 #line 2301 "configure"
2302 #include "confdefs.h"
2303
2304 #ifndef CC_HAS_PROTOS
2305 #if !defined(__STDC__) || (__STDC__ != 1)
2306 choke me
2307 #endif
2308 #endif
2309
2310 int
2311 main ()
2312 {
2313
2314         int test (int i, double x);
2315         struct s1 {int (*f) (int a);};
2316         struct s2 {int (*f) (double a);};
2317   ;
2318   return 0;
2319 }
2320 _ACEOF
2321 rm -f conftest.$ac_objext
2322 if { (eval echo "$as_me:2322: \"$ac_compile\"") >&5
2323   (eval $ac_compile) 2>&5
2324   ac_status=$?
2325   echo "$as_me:2325: \$? = $ac_status" >&5
2326   (exit $ac_status); } &&
2327          { ac_try='test -s conftest.$ac_objext'
2328   { (eval echo "$as_me:2328: \"$ac_try\"") >&5
2329   (eval $ac_try) 2>&5
2330   ac_status=$?
2331   echo "$as_me:2331: \$? = $ac_status" >&5
2332   (exit $ac_status); }; }; then
2333   cf_cv_ansi_cc="$cf_arg"; break
2334 else
2335   echo "$as_me: failed program was:" >&5
2336 cat conftest.$ac_ext >&5
2337 fi
2338 rm -f conftest.$ac_objext conftest.$ac_ext
2339 done
2340 CFLAGS="$cf_save_CFLAGS"
2341 CPPFLAGS="$cf_save_CPPFLAGS"
2342
2343 fi
2344 echo "$as_me:2344: result: $cf_cv_ansi_cc" >&5
2345 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2346
2347 if test "$cf_cv_ansi_cc" != "no"; then
2348 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2349
2350 cf_fix_cppflags=no
2351 cf_new_cflags=
2352 cf_new_cppflags=
2353 cf_new_extra_cppflags=
2354
2355 for cf_add_cflags in $cf_cv_ansi_cc
2356 do
2357 case $cf_fix_cppflags in
2358 no)
2359         case $cf_add_cflags in #(vi
2360         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2361                 case $cf_add_cflags in
2362                 -D*)
2363                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2364
2365                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2366                                 && test -z "${cf_tst_cflags}" \
2367                                 && cf_fix_cppflags=yes
2368
2369                         if test $cf_fix_cppflags = yes ; then
2370                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2371                                 continue
2372                         elif test "${cf_tst_cflags}" = "\"'" ; then
2373                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2374                                 continue
2375                         fi
2376                         ;;
2377                 esac
2378                 case "$CPPFLAGS" in
2379                 *$cf_add_cflags) #(vi
2380                         ;;
2381                 *) #(vi
2382                         case $cf_add_cflags in #(vi
2383                         -D*)
2384                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2385
2386 CPPFLAGS=`echo "$CPPFLAGS" | \
2387         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2388                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2389
2390                                 ;;
2391                         esac
2392                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2393                         ;;
2394                 esac
2395                 ;;
2396         *)
2397                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2398                 ;;
2399         esac
2400         ;;
2401 yes)
2402         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2403
2404         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2405
2406         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2407                 && test -z "${cf_tst_cflags}" \
2408                 && cf_fix_cppflags=no
2409         ;;
2410 esac
2411 done
2412
2413 if test -n "$cf_new_cflags" ; then
2414
2415         CFLAGS="$CFLAGS $cf_new_cflags"
2416 fi
2417
2418 if test -n "$cf_new_cppflags" ; then
2419
2420         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2421 fi
2422
2423 if test -n "$cf_new_extra_cppflags" ; then
2424
2425         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2426 fi
2427
2428 else
2429         cat >>confdefs.h <<\EOF
2430 #define CC_HAS_PROTOS 1
2431 EOF
2432
2433 fi
2434 fi
2435
2436 if test "$cf_cv_ansi_cc" = "no"; then
2437         { { echo "$as_me:2437: error: Your compiler does not appear to recognize prototypes.
2438 You have the following choices:
2439         a. adjust your compiler options
2440         b. get an up-to-date compiler
2441         c. use a wrapper such as unproto" >&5
2442 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2443 You have the following choices:
2444         a. adjust your compiler options
2445         b. get an up-to-date compiler
2446         c. use a wrapper such as unproto" >&2;}
2447    { (exit 1); exit 1; }; }
2448 fi
2449
2450 case $cf_cv_system_name in
2451 os2*)
2452     CFLAGS="$CFLAGS -Zmt"
2453     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2454     CXXFLAGS="$CXXFLAGS -Zmt"
2455     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2456     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2457     ac_cv_exeext=.exe
2458     ;;
2459 esac
2460
2461 PROG_EXT="$EXEEXT"
2462
2463 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2464 #define PROG_EXT "$PROG_EXT"
2465 EOF
2466
2467 test "$program_prefix" != NONE &&
2468   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2469 # Use a double $ so make ignores it.
2470 test "$program_suffix" != NONE &&
2471   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2472 # Double any \ or $.  echo might interpret backslashes.
2473 # By default was `s,x,x', remove it if useless.
2474 cat <<\_ACEOF >conftest.sed
2475 s/[\\$]/&&/g;s/;s,x,x,$//
2476 _ACEOF
2477 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2478 rm conftest.sed
2479
2480 for ac_prog in mawk gawk nawk awk
2481 do
2482   # Extract the first word of "$ac_prog", so it can be a program name with args.
2483 set dummy $ac_prog; ac_word=$2
2484 echo "$as_me:2484: checking for $ac_word" >&5
2485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2486 if test "${ac_cv_prog_AWK+set}" = set; then
2487   echo $ECHO_N "(cached) $ECHO_C" >&6
2488 else
2489   if test -n "$AWK"; then
2490   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2491 else
2492   ac_save_IFS=$IFS; IFS=$ac_path_separator
2493 ac_dummy="$PATH"
2494 for ac_dir in $ac_dummy; do
2495   IFS=$ac_save_IFS
2496   test -z "$ac_dir" && ac_dir=.
2497   $as_executable_p "$ac_dir/$ac_word" || continue
2498 ac_cv_prog_AWK="$ac_prog"
2499 echo "$as_me:2499: found $ac_dir/$ac_word" >&5
2500 break
2501 done
2502
2503 fi
2504 fi
2505 AWK=$ac_cv_prog_AWK
2506 if test -n "$AWK"; then
2507   echo "$as_me:2507: result: $AWK" >&5
2508 echo "${ECHO_T}$AWK" >&6
2509 else
2510   echo "$as_me:2510: result: no" >&5
2511 echo "${ECHO_T}no" >&6
2512 fi
2513
2514   test -n "$AWK" && break
2515 done
2516
2517 test -z "$AWK" && { { echo "$as_me:2517: error: No awk program found" >&5
2518 echo "$as_me: error: No awk program found" >&2;}
2519    { (exit 1); exit 1; }; }
2520
2521 echo "$as_me:2521: checking for egrep" >&5
2522 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2523 if test "${ac_cv_prog_egrep+set}" = set; then
2524   echo $ECHO_N "(cached) $ECHO_C" >&6
2525 else
2526   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2527     then ac_cv_prog_egrep='grep -E'
2528     else ac_cv_prog_egrep='egrep'
2529     fi
2530 fi
2531 echo "$as_me:2531: result: $ac_cv_prog_egrep" >&5
2532 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2533  EGREP=$ac_cv_prog_egrep
2534
2535 test -z "$EGREP" && { { echo "$as_me:2535: error: No egrep program found" >&5
2536 echo "$as_me: error: No egrep program found" >&2;}
2537    { (exit 1); exit 1; }; }
2538
2539 # Find a good install program.  We prefer a C program (faster),
2540 # so one script is as good as another.  But avoid the broken or
2541 # incompatible versions:
2542 # SysV /etc/install, /usr/sbin/install
2543 # SunOS /usr/etc/install
2544 # IRIX /sbin/install
2545 # AIX /bin/install
2546 # AmigaOS /C/install, which installs bootblocks on floppy discs
2547 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2548 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2549 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2550 # ./install, which can be erroneously created by make from ./install.sh.
2551 echo "$as_me:2551: checking for a BSD compatible install" >&5
2552 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2553 if test -z "$INSTALL"; then
2554 if test "${ac_cv_path_install+set}" = set; then
2555   echo $ECHO_N "(cached) $ECHO_C" >&6
2556 else
2557     ac_save_IFS=$IFS; IFS=$ac_path_separator
2558   for ac_dir in $PATH; do
2559     IFS=$ac_save_IFS
2560     # Account for people who put trailing slashes in PATH elements.
2561     case $ac_dir/ in
2562     / | ./ | .// | /cC/* \
2563     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2564     | /usr/ucb/* ) ;;
2565     *)
2566       # OSF1 and SCO ODT 3.0 have their own names for install.
2567       # Don't use installbsd from OSF since it installs stuff as root
2568       # by default.
2569       for ac_prog in ginstall scoinst install; do
2570         if $as_executable_p "$ac_dir/$ac_prog"; then
2571           if test $ac_prog = install &&
2572             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2573             # AIX install.  It has an incompatible calling convention.
2574             :
2575           elif test $ac_prog = install &&
2576             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2577             # program-specific install script used by HP pwplus--don't use.
2578             :
2579           else
2580             ac_cv_path_install="$ac_dir/$ac_prog -c"
2581             break 2
2582           fi
2583         fi
2584       done
2585       ;;
2586     esac
2587   done
2588
2589 fi
2590   if test "${ac_cv_path_install+set}" = set; then
2591     INSTALL=$ac_cv_path_install
2592   else
2593     # As a last resort, use the slow shell script.  We don't cache a
2594     # path for INSTALL within a source directory, because that will
2595     # break other packages using the cache if that directory is
2596     # removed, or if the path is relative.
2597     INSTALL=$ac_install_sh
2598   fi
2599 fi
2600 echo "$as_me:2600: result: $INSTALL" >&5
2601 echo "${ECHO_T}$INSTALL" >&6
2602
2603 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2604 # It thinks the first close brace ends the variable substitution.
2605 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2606
2607 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2608
2609 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2610
2611 echo "$as_me:2611: checking whether ln -s works" >&5
2612 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2613 LN_S=$as_ln_s
2614 if test "$LN_S" = "ln -s"; then
2615   echo "$as_me:2615: result: yes" >&5
2616 echo "${ECHO_T}yes" >&6
2617 else
2618   echo "$as_me:2618: result: no, using $LN_S" >&5
2619 echo "${ECHO_T}no, using $LN_S" >&6
2620 fi
2621
2622 echo "$as_me:2622: checking for long file names" >&5
2623 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2624 if test "${ac_cv_sys_long_file_names+set}" = set; then
2625   echo $ECHO_N "(cached) $ECHO_C" >&6
2626 else
2627   ac_cv_sys_long_file_names=yes
2628 # Test for long file names in all the places we know might matter:
2629 #      .                the current directory, where building will happen
2630 #      $prefix/lib      where we will be installing things
2631 #      $exec_prefix/lib likewise
2632 # eval it to expand exec_prefix.
2633 #      $TMPDIR          if set, where it might want to write temporary files
2634 # if $TMPDIR is not set:
2635 #      /tmp             where it might want to write temporary files
2636 #      /var/tmp         likewise
2637 #      /usr/tmp         likewise
2638 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2639   ac_tmpdirs=$TMPDIR
2640 else
2641   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2642 fi
2643 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2644   test -d $ac_dir || continue
2645   test -w $ac_dir || continue # It is less confusing to not echo anything here.
2646   ac_xdir=$ac_dir/cf$$
2647   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2648   ac_tf1=$ac_xdir/conftest9012345
2649   ac_tf2=$ac_xdir/conftest9012346
2650   (echo 1 >$ac_tf1) 2>/dev/null
2651   (echo 2 >$ac_tf2) 2>/dev/null
2652   ac_val=`cat $ac_tf1 2>/dev/null`
2653   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2654     ac_cv_sys_long_file_names=no
2655     rm -rf $ac_xdir 2>/dev/null
2656     break
2657   fi
2658   rm -rf $ac_xdir 2>/dev/null
2659 done
2660 fi
2661 echo "$as_me:2661: result: $ac_cv_sys_long_file_names" >&5
2662 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2663 if test $ac_cv_sys_long_file_names = yes; then
2664
2665 cat >>confdefs.h <<\EOF
2666 #define HAVE_LONG_FILE_NAMES 1
2667 EOF
2668
2669 fi
2670
2671 # if we find pkg-config, check if we should install the ".pc" files.
2672
2673 echo "$as_me:2673: checking if you want to use pkg-config" >&5
2674 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2675
2676 # Check whether --with-pkg-config or --without-pkg-config was given.
2677 if test "${with_pkg_config+set}" = set; then
2678   withval="$with_pkg_config"
2679   cf_pkg_config=$withval
2680 else
2681   cf_pkg_config=yes
2682 fi;
2683 echo "$as_me:2683: result: $cf_pkg_config" >&5
2684 echo "${ECHO_T}$cf_pkg_config" >&6
2685
2686 case $cf_pkg_config in #(vi
2687 no) #(vi
2688         PKG_CONFIG=none
2689         ;;
2690 yes) #(vi
2691         # Extract the first word of "pkg-config", so it can be a program name with args.
2692 set dummy pkg-config; ac_word=$2
2693 echo "$as_me:2693: checking for $ac_word" >&5
2694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2696   echo $ECHO_N "(cached) $ECHO_C" >&6
2697 else
2698   case $PKG_CONFIG in
2699   [\\/]* | ?:[\\/]*)
2700   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2701   ;;
2702   *)
2703   ac_save_IFS=$IFS; IFS=$ac_path_separator
2704 ac_dummy="$PATH"
2705 for ac_dir in $ac_dummy; do
2706   IFS=$ac_save_IFS
2707   test -z "$ac_dir" && ac_dir=.
2708   if $as_executable_p "$ac_dir/$ac_word"; then
2709    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2710    echo "$as_me:2710: found $ac_dir/$ac_word" >&5
2711    break
2712 fi
2713 done
2714
2715   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
2716   ;;
2717 esac
2718 fi
2719 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2720
2721 if test -n "$PKG_CONFIG"; then
2722   echo "$as_me:2722: result: $PKG_CONFIG" >&5
2723 echo "${ECHO_T}$PKG_CONFIG" >&6
2724 else
2725   echo "$as_me:2725: result: no" >&5
2726 echo "${ECHO_T}no" >&6
2727 fi
2728
2729         ;;
2730 *)
2731         PKG_CONFIG=$withval
2732         ;;
2733 esac
2734
2735 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2736 if test "$PKG_CONFIG" != none ; then
2737
2738 if test "x$prefix" != xNONE; then
2739   cf_path_syntax="$prefix"
2740 else
2741   cf_path_syntax="$ac_default_prefix"
2742 fi
2743
2744 case ".$PKG_CONFIG" in #(vi
2745 .\$\(*\)*|.\'*\'*) #(vi
2746   ;;
2747 ..|./*|.\\*) #(vi
2748   ;;
2749 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2750   ;;
2751 .\${*prefix}*) #(vi
2752   eval PKG_CONFIG="$PKG_CONFIG"
2753   case ".$PKG_CONFIG" in #(vi
2754   .NONE/*)
2755     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2756     ;;
2757   esac
2758   ;; #(vi
2759 .no|.NONE/*)
2760   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2761   ;;
2762 *)
2763   { { echo "$as_me:2763: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2764 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2765    { (exit 1); exit 1; }; }
2766   ;;
2767 esac
2768
2769 fi
2770
2771 if test "$PKG_CONFIG" != no ; then
2772         echo "$as_me:2772: checking if we should install .pc files for $PKG_CONFIG" >&5
2773 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
2774
2775         # Leave this as something that can be overridden in the environment.
2776         if test -z "$PKG_CONFIG_LIBDIR" ; then
2777                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
2778         fi
2779         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
2780         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
2781
2782 # Check whether --enable-pc-files or --disable-pc-files was given.
2783 if test "${enable_pc_files+set}" = set; then
2784   enableval="$enable_pc_files"
2785   enable_pc_files=$enableval
2786 else
2787   enable_pc_files=no
2788 fi;
2789                 echo "$as_me:2789: result: $enable_pc_files" >&5
2790 echo "${ECHO_T}$enable_pc_files" >&6
2791         else
2792                 echo "$as_me:2792: result: no" >&5
2793 echo "${ECHO_T}no" >&6
2794                 { echo "$as_me:2794: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
2795 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
2796                 enable_pc_files=no
2797         fi
2798 fi
2799
2800 echo "$as_me:2800: checking if we should assume mixed-case filenames" >&5
2801 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2802
2803 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2804 if test "${enable_mixed_case+set}" = set; then
2805   enableval="$enable_mixed_case"
2806   enable_mixedcase=$enableval
2807 else
2808   enable_mixedcase=auto
2809 fi;
2810 echo "$as_me:2810: result: $enable_mixedcase" >&5
2811 echo "${ECHO_T}$enable_mixedcase" >&6
2812 if test "$enable_mixedcase" = "auto" ; then
2813
2814 echo "$as_me:2814: checking if filesystem supports mixed-case filenames" >&5
2815 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2816 if test "${cf_cv_mixedcase+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819
2820 if test "$cross_compiling" = yes ; then
2821         case $target_alias in #(vi
2822         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2823                 cf_cv_mixedcase=no
2824                 ;;
2825         *)
2826                 cf_cv_mixedcase=yes
2827                 ;;
2828         esac
2829 else
2830         rm -f conftest CONFTEST
2831         echo test >conftest
2832         if test -f CONFTEST ; then
2833                 cf_cv_mixedcase=no
2834         else
2835                 cf_cv_mixedcase=yes
2836         fi
2837         rm -f conftest CONFTEST
2838 fi
2839
2840 fi
2841 echo "$as_me:2841: result: $cf_cv_mixedcase" >&5
2842 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2843 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2844 #define MIXEDCASE_FILENAMES 1
2845 EOF
2846
2847 else
2848     cf_cv_mixedcase=$enable_mixedcase
2849     if test "$enable_mixedcase" = "yes" ; then
2850         cat >>confdefs.h <<\EOF
2851 #define MIXEDCASE_FILENAMES 1
2852 EOF
2853
2854     fi
2855 fi
2856
2857 # do this after mixed-case option (tags/TAGS is not as important as tic).
2858 echo "$as_me:2858: checking whether ${MAKE-make} sets \${MAKE}" >&5
2859 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2860 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2861 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2862   echo $ECHO_N "(cached) $ECHO_C" >&6
2863 else
2864   cat >conftest.make <<\EOF
2865 all:
2866         @echo 'ac_maketemp="${MAKE}"'
2867 EOF
2868 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2869 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2870 if test -n "$ac_maketemp"; then
2871   eval ac_cv_prog_make_${ac_make}_set=yes
2872 else
2873   eval ac_cv_prog_make_${ac_make}_set=no
2874 fi
2875 rm -f conftest.make
2876 fi
2877 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2878   echo "$as_me:2878: result: yes" >&5
2879 echo "${ECHO_T}yes" >&6
2880   SET_MAKE=
2881 else
2882   echo "$as_me:2882: result: no" >&5
2883 echo "${ECHO_T}no" >&6
2884   SET_MAKE="MAKE=${MAKE-make}"
2885 fi
2886
2887 for ac_prog in exctags ctags
2888 do
2889   # Extract the first word of "$ac_prog", so it can be a program name with args.
2890 set dummy $ac_prog; ac_word=$2
2891 echo "$as_me:2891: checking for $ac_word" >&5
2892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2893 if test "${ac_cv_prog_CTAGS+set}" = set; then
2894   echo $ECHO_N "(cached) $ECHO_C" >&6
2895 else
2896   if test -n "$CTAGS"; then
2897   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2898 else
2899   ac_save_IFS=$IFS; IFS=$ac_path_separator
2900 ac_dummy="$PATH"
2901 for ac_dir in $ac_dummy; do
2902   IFS=$ac_save_IFS
2903   test -z "$ac_dir" && ac_dir=.
2904   $as_executable_p "$ac_dir/$ac_word" || continue
2905 ac_cv_prog_CTAGS="$ac_prog"
2906 echo "$as_me:2906: found $ac_dir/$ac_word" >&5
2907 break
2908 done
2909
2910 fi
2911 fi
2912 CTAGS=$ac_cv_prog_CTAGS
2913 if test -n "$CTAGS"; then
2914   echo "$as_me:2914: result: $CTAGS" >&5
2915 echo "${ECHO_T}$CTAGS" >&6
2916 else
2917   echo "$as_me:2917: result: no" >&5
2918 echo "${ECHO_T}no" >&6
2919 fi
2920
2921   test -n "$CTAGS" && break
2922 done
2923
2924 for ac_prog in exetags etags
2925 do
2926   # Extract the first word of "$ac_prog", so it can be a program name with args.
2927 set dummy $ac_prog; ac_word=$2
2928 echo "$as_me:2928: checking for $ac_word" >&5
2929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2930 if test "${ac_cv_prog_ETAGS+set}" = set; then
2931   echo $ECHO_N "(cached) $ECHO_C" >&6
2932 else
2933   if test -n "$ETAGS"; then
2934   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2935 else
2936   ac_save_IFS=$IFS; IFS=$ac_path_separator
2937 ac_dummy="$PATH"
2938 for ac_dir in $ac_dummy; do
2939   IFS=$ac_save_IFS
2940   test -z "$ac_dir" && ac_dir=.
2941   $as_executable_p "$ac_dir/$ac_word" || continue
2942 ac_cv_prog_ETAGS="$ac_prog"
2943 echo "$as_me:2943: found $ac_dir/$ac_word" >&5
2944 break
2945 done
2946
2947 fi
2948 fi
2949 ETAGS=$ac_cv_prog_ETAGS
2950 if test -n "$ETAGS"; then
2951   echo "$as_me:2951: result: $ETAGS" >&5
2952 echo "${ECHO_T}$ETAGS" >&6
2953 else
2954   echo "$as_me:2954: result: no" >&5
2955 echo "${ECHO_T}no" >&6
2956 fi
2957
2958   test -n "$ETAGS" && break
2959 done
2960
2961 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
2962 set dummy ${CTAGS-ctags}; ac_word=$2
2963 echo "$as_me:2963: checking for $ac_word" >&5
2964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2965 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2966   echo $ECHO_N "(cached) $ECHO_C" >&6
2967 else
2968   if test -n "$MAKE_LOWER_TAGS"; then
2969   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2970 else
2971   ac_save_IFS=$IFS; IFS=$ac_path_separator
2972 ac_dummy="$PATH"
2973 for ac_dir in $ac_dummy; do
2974   IFS=$ac_save_IFS
2975   test -z "$ac_dir" && ac_dir=.
2976   $as_executable_p "$ac_dir/$ac_word" || continue
2977 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2978 echo "$as_me:2978: found $ac_dir/$ac_word" >&5
2979 break
2980 done
2981
2982   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2983 fi
2984 fi
2985 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2986 if test -n "$MAKE_LOWER_TAGS"; then
2987   echo "$as_me:2987: result: $MAKE_LOWER_TAGS" >&5
2988 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2989 else
2990   echo "$as_me:2990: result: no" >&5
2991 echo "${ECHO_T}no" >&6
2992 fi
2993
2994 if test "$cf_cv_mixedcase" = yes ; then
2995         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
2996 set dummy ${ETAGS-etags}; ac_word=$2
2997 echo "$as_me:2997: checking for $ac_word" >&5
2998 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2999 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3000   echo $ECHO_N "(cached) $ECHO_C" >&6
3001 else
3002   if test -n "$MAKE_UPPER_TAGS"; then
3003   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3004 else
3005   ac_save_IFS=$IFS; IFS=$ac_path_separator
3006 ac_dummy="$PATH"
3007 for ac_dir in $ac_dummy; do
3008   IFS=$ac_save_IFS
3009   test -z "$ac_dir" && ac_dir=.
3010   $as_executable_p "$ac_dir/$ac_word" || continue
3011 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3012 echo "$as_me:3012: found $ac_dir/$ac_word" >&5
3013 break
3014 done
3015
3016   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3017 fi
3018 fi
3019 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3020 if test -n "$MAKE_UPPER_TAGS"; then
3021   echo "$as_me:3021: result: $MAKE_UPPER_TAGS" >&5
3022 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3023 else
3024   echo "$as_me:3024: result: no" >&5
3025 echo "${ECHO_T}no" >&6
3026 fi
3027
3028 else
3029         MAKE_UPPER_TAGS=no
3030 fi
3031
3032 if test "$MAKE_UPPER_TAGS" = yes ; then
3033         MAKE_UPPER_TAGS=
3034 else
3035         MAKE_UPPER_TAGS="#"
3036 fi
3037
3038 if test "$MAKE_LOWER_TAGS" = yes ; then
3039         MAKE_LOWER_TAGS=
3040 else
3041         MAKE_LOWER_TAGS="#"
3042 fi
3043
3044 echo "$as_me:3044: checking for makeflags variable" >&5
3045 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3046 if test "${cf_cv_makeflags+set}" = set; then
3047   echo $ECHO_N "(cached) $ECHO_C" >&6
3048 else
3049
3050         cf_cv_makeflags=''
3051         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3052         do
3053                 cat >cf_makeflags.tmp <<CF_EOF
3054 SHELL = /bin/sh
3055 all :
3056         @ echo '.$cf_option'
3057 CF_EOF
3058                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3059                 case "$cf_result" in
3060                 .*k)
3061                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3062                         case "$cf_result" in
3063                         .*CC=*) cf_cv_makeflags=
3064                                 ;;
3065                         *)      cf_cv_makeflags=$cf_option
3066                                 ;;
3067                         esac
3068                         break
3069                         ;;
3070                 .-)     ;;
3071                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3072                         ;;
3073                 esac
3074         done
3075         rm -f cf_makeflags.tmp
3076
3077 fi
3078 echo "$as_me:3078: result: $cf_cv_makeflags" >&5
3079 echo "${ECHO_T}$cf_cv_makeflags" >&6
3080
3081 if test -n "$ac_tool_prefix"; then
3082   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3083 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3084 echo "$as_me:3084: checking for $ac_word" >&5
3085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3086 if test "${ac_cv_prog_RANLIB+set}" = set; then
3087   echo $ECHO_N "(cached) $ECHO_C" >&6
3088 else
3089   if test -n "$RANLIB"; then
3090   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3091 else
3092   ac_save_IFS=$IFS; IFS=$ac_path_separator
3093 ac_dummy="$PATH"
3094 for ac_dir in $ac_dummy; do
3095   IFS=$ac_save_IFS
3096   test -z "$ac_dir" && ac_dir=.
3097   $as_executable_p "$ac_dir/$ac_word" || continue
3098 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3099 echo "$as_me:3099: found $ac_dir/$ac_word" >&5
3100 break
3101 done
3102
3103 fi
3104 fi
3105 RANLIB=$ac_cv_prog_RANLIB
3106 if test -n "$RANLIB"; then
3107   echo "$as_me:3107: result: $RANLIB" >&5
3108 echo "${ECHO_T}$RANLIB" >&6
3109 else
3110   echo "$as_me:3110: result: no" >&5
3111 echo "${ECHO_T}no" >&6
3112 fi
3113
3114 fi
3115 if test -z "$ac_cv_prog_RANLIB"; then
3116   ac_ct_RANLIB=$RANLIB
3117   # Extract the first word of "ranlib", so it can be a program name with args.
3118 set dummy ranlib; ac_word=$2
3119 echo "$as_me:3119: checking for $ac_word" >&5
3120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3121 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3122   echo $ECHO_N "(cached) $ECHO_C" >&6
3123 else
3124   if test -n "$ac_ct_RANLIB"; then
3125   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3126 else
3127   ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 ac_dummy="$PATH"
3129 for ac_dir in $ac_dummy; do
3130   IFS=$ac_save_IFS
3131   test -z "$ac_dir" && ac_dir=.
3132   $as_executable_p "$ac_dir/$ac_word" || continue
3133 ac_cv_prog_ac_ct_RANLIB="ranlib"
3134 echo "$as_me:3134: found $ac_dir/$ac_word" >&5
3135 break
3136 done
3137
3138   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3139 fi
3140 fi
3141 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3142 if test -n "$ac_ct_RANLIB"; then
3143   echo "$as_me:3143: result: $ac_ct_RANLIB" >&5
3144 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3145 else
3146   echo "$as_me:3146: result: no" >&5
3147 echo "${ECHO_T}no" >&6
3148 fi
3149
3150   RANLIB=$ac_ct_RANLIB
3151 else
3152   RANLIB="$ac_cv_prog_RANLIB"
3153 fi
3154
3155 if test -n "$ac_tool_prefix"; then
3156   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3157 set dummy ${ac_tool_prefix}ld; ac_word=$2
3158 echo "$as_me:3158: checking for $ac_word" >&5
3159 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3160 if test "${ac_cv_prog_LD+set}" = set; then
3161   echo $ECHO_N "(cached) $ECHO_C" >&6
3162 else
3163   if test -n "$LD"; then
3164   ac_cv_prog_LD="$LD" # Let the user override the test.
3165 else
3166   ac_save_IFS=$IFS; IFS=$ac_path_separator
3167 ac_dummy="$PATH"
3168 for ac_dir in $ac_dummy; do
3169   IFS=$ac_save_IFS
3170   test -z "$ac_dir" && ac_dir=.
3171   $as_executable_p "$ac_dir/$ac_word" || continue
3172 ac_cv_prog_LD="${ac_tool_prefix}ld"
3173 echo "$as_me:3173: found $ac_dir/$ac_word" >&5
3174 break
3175 done
3176
3177 fi
3178 fi
3179 LD=$ac_cv_prog_LD
3180 if test -n "$LD"; then
3181   echo "$as_me:3181: result: $LD" >&5
3182 echo "${ECHO_T}$LD" >&6
3183 else
3184   echo "$as_me:3184: result: no" >&5
3185 echo "${ECHO_T}no" >&6
3186 fi
3187
3188 fi
3189 if test -z "$ac_cv_prog_LD"; then
3190   ac_ct_LD=$LD
3191   # Extract the first word of "ld", so it can be a program name with args.
3192 set dummy ld; ac_word=$2
3193 echo "$as_me:3193: checking for $ac_word" >&5
3194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3195 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3196   echo $ECHO_N "(cached) $ECHO_C" >&6
3197 else
3198   if test -n "$ac_ct_LD"; then
3199   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3200 else
3201   ac_save_IFS=$IFS; IFS=$ac_path_separator
3202 ac_dummy="$PATH"
3203 for ac_dir in $ac_dummy; do
3204   IFS=$ac_save_IFS
3205   test -z "$ac_dir" && ac_dir=.
3206   $as_executable_p "$ac_dir/$ac_word" || continue
3207 ac_cv_prog_ac_ct_LD="ld"
3208 echo "$as_me:3208: found $ac_dir/$ac_word" >&5
3209 break
3210 done
3211
3212   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3213 fi
3214 fi
3215 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3216 if test -n "$ac_ct_LD"; then
3217   echo "$as_me:3217: result: $ac_ct_LD" >&5
3218 echo "${ECHO_T}$ac_ct_LD" >&6
3219 else
3220   echo "$as_me:3220: result: no" >&5
3221 echo "${ECHO_T}no" >&6
3222 fi
3223
3224   LD=$ac_ct_LD
3225 else
3226   LD="$ac_cv_prog_LD"
3227 fi
3228
3229 if test -n "$ac_tool_prefix"; then
3230   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3231 set dummy ${ac_tool_prefix}ar; ac_word=$2
3232 echo "$as_me:3232: checking for $ac_word" >&5
3233 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3234 if test "${ac_cv_prog_AR+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237   if test -n "$AR"; then
3238   ac_cv_prog_AR="$AR" # Let the user override the test.
3239 else
3240   ac_save_IFS=$IFS; IFS=$ac_path_separator
3241 ac_dummy="$PATH"
3242 for ac_dir in $ac_dummy; do
3243   IFS=$ac_save_IFS
3244   test -z "$ac_dir" && ac_dir=.
3245   $as_executable_p "$ac_dir/$ac_word" || continue
3246 ac_cv_prog_AR="${ac_tool_prefix}ar"
3247 echo "$as_me:3247: found $ac_dir/$ac_word" >&5
3248 break
3249 done
3250
3251 fi
3252 fi
3253 AR=$ac_cv_prog_AR
3254 if test -n "$AR"; then
3255   echo "$as_me:3255: result: $AR" >&5
3256 echo "${ECHO_T}$AR" >&6
3257 else
3258   echo "$as_me:3258: result: no" >&5
3259 echo "${ECHO_T}no" >&6
3260 fi
3261
3262 fi
3263 if test -z "$ac_cv_prog_AR"; then
3264   ac_ct_AR=$AR
3265   # Extract the first word of "ar", so it can be a program name with args.
3266 set dummy ar; ac_word=$2
3267 echo "$as_me:3267: checking for $ac_word" >&5
3268 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3269 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3270   echo $ECHO_N "(cached) $ECHO_C" >&6
3271 else
3272   if test -n "$ac_ct_AR"; then
3273   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3274 else
3275   ac_save_IFS=$IFS; IFS=$ac_path_separator
3276 ac_dummy="$PATH"
3277 for ac_dir in $ac_dummy; do
3278   IFS=$ac_save_IFS
3279   test -z "$ac_dir" && ac_dir=.
3280   $as_executable_p "$ac_dir/$ac_word" || continue
3281 ac_cv_prog_ac_ct_AR="ar"
3282 echo "$as_me:3282: found $ac_dir/$ac_word" >&5
3283 break
3284 done
3285
3286   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3287 fi
3288 fi
3289 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3290 if test -n "$ac_ct_AR"; then
3291   echo "$as_me:3291: result: $ac_ct_AR" >&5
3292 echo "${ECHO_T}$ac_ct_AR" >&6
3293 else
3294   echo "$as_me:3294: result: no" >&5
3295 echo "${ECHO_T}no" >&6
3296 fi
3297
3298   AR=$ac_ct_AR
3299 else
3300   AR="$ac_cv_prog_AR"
3301 fi
3302
3303 if test -n "$ac_tool_prefix"; then
3304   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3305 set dummy ${ac_tool_prefix}ar; ac_word=$2
3306 echo "$as_me:3306: checking for $ac_word" >&5
3307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3308 if test "${ac_cv_prog_AR+set}" = set; then
3309   echo $ECHO_N "(cached) $ECHO_C" >&6
3310 else
3311   if test -n "$AR"; then
3312   ac_cv_prog_AR="$AR" # Let the user override the test.
3313 else
3314   ac_save_IFS=$IFS; IFS=$ac_path_separator
3315 ac_dummy="$PATH"
3316 for ac_dir in $ac_dummy; do
3317   IFS=$ac_save_IFS
3318   test -z "$ac_dir" && ac_dir=.
3319   $as_executable_p "$ac_dir/$ac_word" || continue
3320 ac_cv_prog_AR="${ac_tool_prefix}ar"
3321 echo "$as_me:3321: found $ac_dir/$ac_word" >&5
3322 break
3323 done
3324
3325 fi
3326 fi
3327 AR=$ac_cv_prog_AR
3328 if test -n "$AR"; then
3329   echo "$as_me:3329: result: $AR" >&5
3330 echo "${ECHO_T}$AR" >&6
3331 else
3332   echo "$as_me:3332: result: no" >&5
3333 echo "${ECHO_T}no" >&6
3334 fi
3335
3336 fi
3337 if test -z "$ac_cv_prog_AR"; then
3338   ac_ct_AR=$AR
3339   # Extract the first word of "ar", so it can be a program name with args.
3340 set dummy ar; ac_word=$2
3341 echo "$as_me:3341: checking for $ac_word" >&5
3342 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3343 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3344   echo $ECHO_N "(cached) $ECHO_C" >&6
3345 else
3346   if test -n "$ac_ct_AR"; then
3347   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3348 else
3349   ac_save_IFS=$IFS; IFS=$ac_path_separator
3350 ac_dummy="$PATH"
3351 for ac_dir in $ac_dummy; do
3352   IFS=$ac_save_IFS
3353   test -z "$ac_dir" && ac_dir=.
3354   $as_executable_p "$ac_dir/$ac_word" || continue
3355 ac_cv_prog_ac_ct_AR="ar"
3356 echo "$as_me:3356: found $ac_dir/$ac_word" >&5
3357 break
3358 done
3359
3360   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3361 fi
3362 fi
3363 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3364 if test -n "$ac_ct_AR"; then
3365   echo "$as_me:3365: result: $ac_ct_AR" >&5
3366 echo "${ECHO_T}$ac_ct_AR" >&6
3367 else
3368   echo "$as_me:3368: result: no" >&5
3369 echo "${ECHO_T}no" >&6
3370 fi
3371
3372   AR=$ac_ct_AR
3373 else
3374   AR="$ac_cv_prog_AR"
3375 fi
3376
3377 echo "$as_me:3377: checking for options to update archives" >&5
3378 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3379 if test "${cf_cv_ar_flags+set}" = set; then
3380   echo $ECHO_N "(cached) $ECHO_C" >&6
3381 else
3382
3383         cf_cv_ar_flags=unknown
3384         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
3385         do
3386
3387                 # check if $ARFLAGS already contains this choice
3388                 if test "x$ARFLAGS" != "x" ; then
3389                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3390                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3391                                 cf_cv_ar_flags=
3392                                 break
3393                         fi
3394                 fi
3395
3396                 rm -f conftest.$ac_cv_objext
3397                 rm -f conftest.a
3398
3399                 cat >conftest.$ac_ext <<EOF
3400 #line 3400 "configure"
3401 int     testdata[3] = { 123, 456, 789 };
3402 EOF
3403                 if { (eval echo "$as_me:3403: \"$ac_compile\"") >&5
3404   (eval $ac_compile) 2>&5
3405   ac_status=$?
3406   echo "$as_me:3406: \$? = $ac_status" >&5
3407   (exit $ac_status); } ; then
3408                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3409                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3410                         if test -f conftest.a ; then
3411                                 cf_cv_ar_flags=$cf_ar_flags
3412                                 break
3413                         fi
3414                 else
3415                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
3416
3417 echo "${as_me-configure}:3417: testing cannot compile test-program ..." 1>&5
3418
3419                         break
3420                 fi
3421         done
3422         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3423
3424 fi
3425 echo "$as_me:3425: result: $cf_cv_ar_flags" >&5
3426 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3427
3428 if test -n "$ARFLAGS" ; then
3429         if test -n "$cf_cv_ar_flags" ; then
3430                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3431         fi
3432 else
3433         ARFLAGS=$cf_cv_ar_flags
3434 fi
3435
3436 echo "$as_me:3436: checking if you have specified an install-prefix" >&5
3437 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3438
3439 # Check whether --with-install-prefix or --without-install-prefix was given.
3440 if test "${with_install_prefix+set}" = set; then
3441   withval="$with_install_prefix"
3442   case "$withval" in #(vi
3443         yes|no) #(vi
3444                 ;;
3445         *)      DESTDIR="$withval"
3446                 ;;
3447         esac
3448 fi;
3449 echo "$as_me:3449: result: $DESTDIR" >&5
3450 echo "${ECHO_T}$DESTDIR" >&6
3451
3452 ###############################################################################
3453
3454 # If we're cross-compiling, allow the user to override the tools and their
3455 # options.  The configure script is oriented toward identifying the host
3456 # compiler, etc., but we need a build compiler to generate parts of the source.
3457
3458 if test "$cross_compiling" = yes ; then
3459
3460         # defaults that we might want to override
3461         : ${BUILD_CFLAGS:=''}
3462         : ${BUILD_CPPFLAGS:=''}
3463         : ${BUILD_LDFLAGS:=''}
3464         : ${BUILD_LIBS:=''}
3465         : ${BUILD_EXEEXT:='$x'}
3466         : ${BUILD_OBJEXT:='o'}
3467
3468 # Check whether --with-build-cc or --without-build-cc was given.
3469 if test "${with_build_cc+set}" = set; then
3470   withval="$with_build_cc"
3471   BUILD_CC="$withval"
3472 else
3473   for ac_prog in gcc cc cl
3474 do
3475   # Extract the first word of "$ac_prog", so it can be a program name with args.
3476 set dummy $ac_prog; ac_word=$2
3477 echo "$as_me:3477: checking for $ac_word" >&5
3478 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3479 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3480   echo $ECHO_N "(cached) $ECHO_C" >&6
3481 else
3482   if test -n "$BUILD_CC"; then
3483   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3484 else
3485   ac_save_IFS=$IFS; IFS=$ac_path_separator
3486 ac_dummy="$PATH"
3487 for ac_dir in $ac_dummy; do
3488   IFS=$ac_save_IFS
3489   test -z "$ac_dir" && ac_dir=.
3490   $as_executable_p "$ac_dir/$ac_word" || continue
3491 ac_cv_prog_BUILD_CC="$ac_prog"
3492 echo "$as_me:3492: found $ac_dir/$ac_word" >&5
3493 break
3494 done
3495
3496 fi
3497 fi
3498 BUILD_CC=$ac_cv_prog_BUILD_CC
3499 if test -n "$BUILD_CC"; then
3500   echo "$as_me:3500: result: $BUILD_CC" >&5
3501 echo "${ECHO_T}$BUILD_CC" >&6
3502 else
3503   echo "$as_me:3503: result: no" >&5
3504 echo "${ECHO_T}no" >&6
3505 fi
3506
3507   test -n "$BUILD_CC" && break
3508 done
3509
3510 fi;
3511         echo "$as_me:3511: checking for native build C compiler" >&5
3512 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3513         echo "$as_me:3513: result: $BUILD_CC" >&5
3514 echo "${ECHO_T}$BUILD_CC" >&6
3515
3516         echo "$as_me:3516: checking for native build C preprocessor" >&5
3517 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3518
3519 # Check whether --with-build-cpp or --without-build-cpp was given.
3520 if test "${with_build_cpp+set}" = set; then
3521   withval="$with_build_cpp"
3522   BUILD_CPP="$withval"
3523 else
3524   BUILD_CPP='${BUILD_CC} -E'
3525 fi;
3526         echo "$as_me:3526: result: $BUILD_CPP" >&5
3527 echo "${ECHO_T}$BUILD_CPP" >&6
3528
3529         echo "$as_me:3529: checking for native build C flags" >&5
3530 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3531
3532 # Check whether --with-build-cflags or --without-build-cflags was given.
3533 if test "${with_build_cflags+set}" = set; then
3534   withval="$with_build_cflags"
3535   BUILD_CFLAGS="$withval"
3536 fi;
3537         echo "$as_me:3537: result: $BUILD_CFLAGS" >&5
3538 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3539
3540         echo "$as_me:3540: checking for native build C preprocessor-flags" >&5
3541 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3542
3543 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3544 if test "${with_build_cppflags+set}" = set; then
3545   withval="$with_build_cppflags"
3546   BUILD_CPPFLAGS="$withval"
3547 fi;
3548         echo "$as_me:3548: result: $BUILD_CPPFLAGS" >&5
3549 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3550
3551         echo "$as_me:3551: checking for native build linker-flags" >&5
3552 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3553
3554 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3555 if test "${with_build_ldflags+set}" = set; then
3556   withval="$with_build_ldflags"
3557   BUILD_LDFLAGS="$withval"
3558 fi;
3559         echo "$as_me:3559: result: $BUILD_LDFLAGS" >&5
3560 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3561
3562         echo "$as_me:3562: checking for native build linker-libraries" >&5
3563 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3564
3565 # Check whether --with-build-libs or --without-build-libs was given.
3566 if test "${with_build_libs+set}" = set; then
3567   withval="$with_build_libs"
3568   BUILD_LIBS="$withval"
3569 fi;
3570         echo "$as_me:3570: result: $BUILD_LIBS" >&5
3571 echo "${ECHO_T}$BUILD_LIBS" >&6
3572
3573         # this assumes we're on Unix.
3574         BUILD_EXEEXT=
3575         BUILD_OBJEXT=o
3576
3577         : ${BUILD_CC:='${CC}'}
3578
3579         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3580                 { { echo "$as_me:3580: error: Cross-build requires two compilers.
3581 Use --with-build-cc to specify the native compiler." >&5
3582 echo "$as_me: error: Cross-build requires two compilers.
3583 Use --with-build-cc to specify the native compiler." >&2;}
3584    { (exit 1); exit 1; }; }
3585         fi
3586
3587 else
3588         : ${BUILD_CC:='${CC}'}
3589         : ${BUILD_CPP:='${CPP}'}
3590         : ${BUILD_CFLAGS:='${CFLAGS}'}
3591         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3592         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3593         : ${BUILD_LIBS:='${LIBS}'}
3594         : ${BUILD_EXEEXT:='$x'}
3595         : ${BUILD_OBJEXT:='o'}
3596 fi
3597
3598 ###############################################################################
3599
3600 ### Options to allow the user to specify the set of libraries which are used.
3601 ### Use "--without-normal --with-shared" to allow the default model to be
3602 ### shared, for example.
3603 cf_list_models=""
3604 echo "$as_me:3604: checking for specified models" >&5
3605 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3606 test -z "$cf_list_models" && cf_list_models=normal
3607 echo "$as_me:3607: result: $cf_list_models" >&5
3608 echo "${ECHO_T}$cf_list_models" >&6
3609
3610 ### Use the first model as the default, and save its suffix for use in building
3611 ### up test-applications.
3612 echo "$as_me:3612: checking for default model" >&5
3613 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3614 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3615 echo "$as_me:3615: result: $DFT_LWR_MODEL" >&5
3616 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3617
3618 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3619
3620 # Check whether --with-curses-dir or --without-curses-dir was given.
3621 if test "${with_curses_dir+set}" = set; then
3622   withval="$with_curses_dir"
3623
3624 if test "x$prefix" != xNONE; then
3625   cf_path_syntax="$prefix"
3626 else
3627   cf_path_syntax="$ac_default_prefix"
3628 fi
3629
3630 case ".$withval" in #(vi
3631 .\$\(*\)*|.\'*\'*) #(vi
3632   ;;
3633 ..|./*|.\\*) #(vi
3634   ;;
3635 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3636   ;;
3637 .\${*prefix}*) #(vi
3638   eval withval="$withval"
3639   case ".$withval" in #(vi
3640   .NONE/*)
3641     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3642     ;;
3643   esac
3644   ;; #(vi
3645 .no|.NONE/*)
3646   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3647   ;;
3648 *)
3649   { { echo "$as_me:3649: error: expected a pathname, not \"$withval\"" >&5
3650 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3651    { (exit 1); exit 1; }; }
3652   ;;
3653 esac
3654
3655          cf_cv_curses_dir=$withval
3656 else
3657   cf_cv_curses_dir=no
3658 fi;
3659
3660 echo "$as_me:3660: checking if you want wide-character code" >&5
3661 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
3662
3663 # Check whether --enable-widec or --disable-widec was given.
3664 if test "${enable_widec+set}" = set; then
3665   enableval="$enable_widec"
3666   with_widec=$enableval
3667 else
3668   with_widec=no
3669 fi;
3670 echo "$as_me:3670: result: $with_widec" >&5
3671 echo "${ECHO_T}$with_widec" >&6
3672 if test "$with_widec" = yes ; then
3673
3674 echo "$as_me:3674: checking for multibyte character support" >&5
3675 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
3676 if test "${cf_cv_utf8_lib+set}" = set; then
3677   echo $ECHO_N "(cached) $ECHO_C" >&6
3678 else
3679
3680         cf_save_LIBS="$LIBS"
3681         cat >conftest.$ac_ext <<_ACEOF
3682 #line 3682 "configure"
3683 #include "confdefs.h"
3684
3685 #include <stdlib.h>
3686 int
3687 main ()
3688 {
3689 putwc(0,0);
3690   ;
3691   return 0;
3692 }
3693 _ACEOF
3694 rm -f conftest.$ac_objext conftest$ac_exeext
3695 if { (eval echo "$as_me:3695: \"$ac_link\"") >&5
3696   (eval $ac_link) 2>&5
3697   ac_status=$?
3698   echo "$as_me:3698: \$? = $ac_status" >&5
3699   (exit $ac_status); } &&
3700          { ac_try='test -s conftest$ac_exeext'
3701   { (eval echo "$as_me:3701: \"$ac_try\"") >&5
3702   (eval $ac_try) 2>&5
3703   ac_status=$?
3704   echo "$as_me:3704: \$? = $ac_status" >&5
3705   (exit $ac_status); }; }; then
3706   cf_cv_utf8_lib=yes
3707 else
3708   echo "$as_me: failed program was:" >&5
3709 cat conftest.$ac_ext >&5
3710
3711 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
3712 # will be set on completion of the AC_TRY_LINK below.
3713 cf_cv_header_path_utf8=
3714 cf_cv_library_path_utf8=
3715
3716 echo "${as_me-configure}:3716: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
3717
3718 cf_save_LIBS="$LIBS"
3719
3720 cat >conftest.$ac_ext <<_ACEOF
3721 #line 3721 "configure"
3722 #include "confdefs.h"
3723
3724 #include <libutf8.h>
3725 int
3726 main ()
3727 {
3728 putwc(0,0);
3729   ;
3730   return 0;
3731 }
3732 _ACEOF
3733 rm -f conftest.$ac_objext conftest$ac_exeext
3734 if { (eval echo "$as_me:3734: \"$ac_link\"") >&5
3735   (eval $ac_link) 2>&5
3736   ac_status=$?
3737   echo "$as_me:3737: \$? = $ac_status" >&5
3738   (exit $ac_status); } &&
3739          { ac_try='test -s conftest$ac_exeext'
3740   { (eval echo "$as_me:3740: \"$ac_try\"") >&5
3741   (eval $ac_try) 2>&5
3742   ac_status=$?
3743   echo "$as_me:3743: \$? = $ac_status" >&5
3744   (exit $ac_status); }; }; then
3745
3746         cf_cv_find_linkage_utf8=yes
3747         cf_cv_header_path_utf8=/usr/include
3748         cf_cv_library_path_utf8=/usr/lib
3749
3750 else
3751   echo "$as_me: failed program was:" >&5
3752 cat conftest.$ac_ext >&5
3753
3754 LIBS="-lutf8  $cf_save_LIBS"
3755
3756 cat >conftest.$ac_ext <<_ACEOF
3757 #line 3757 "configure"
3758 #include "confdefs.h"
3759
3760 #include <libutf8.h>
3761 int
3762 main ()
3763 {
3764 putwc(0,0);
3765   ;
3766   return 0;
3767 }
3768 _ACEOF
3769 rm -f conftest.$ac_objext conftest$ac_exeext
3770 if { (eval echo "$as_me:3770: \"$ac_link\"") >&5
3771   (eval $ac_link) 2>&5
3772   ac_status=$?
3773   echo "$as_me:3773: \$? = $ac_status" >&5
3774   (exit $ac_status); } &&
3775          { ac_try='test -s conftest$ac_exeext'
3776   { (eval echo "$as_me:3776: \"$ac_try\"") >&5
3777   (eval $ac_try) 2>&5
3778   ac_status=$?
3779   echo "$as_me:3779: \$? = $ac_status" >&5
3780   (exit $ac_status); }; }; then
3781
3782         cf_cv_find_linkage_utf8=yes
3783         cf_cv_header_path_utf8=/usr/include
3784         cf_cv_library_path_utf8=/usr/lib
3785         cf_cv_library_file_utf8="-lutf8"
3786
3787 else
3788   echo "$as_me: failed program was:" >&5
3789 cat conftest.$ac_ext >&5
3790
3791         cf_cv_find_linkage_utf8=no
3792         LIBS="$cf_save_LIBS"
3793
3794     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
3795
3796 echo "${as_me-configure}:3796: testing find linkage for utf8 library ..." 1>&5
3797
3798 echo "${as_me-configure}:3798: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
3799
3800     cf_save_CPPFLAGS="$CPPFLAGS"
3801     cf_test_CPPFLAGS="$CPPFLAGS"
3802
3803 cf_search=
3804
3805 # collect the current set of include-directories from compiler flags
3806 cf_header_path_list=""
3807 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3808         for cf_header_path in $CPPFLAGS $CFLAGS
3809         do
3810                 case $cf_header_path in #(vi
3811                 -I*)
3812                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3813
3814 test "$cf_header_path" != "NONE" && \
3815 test -d "$cf_header_path" && \
3816  {
3817         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
3818         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
3819         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
3820         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
3821         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
3822         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
3823 }
3824
3825                         cf_header_path_list="$cf_header_path_list $cf_search"
3826                         ;;
3827                 esac
3828         done
3829 fi
3830
3831 # add the variations for the package we are looking for
3832
3833 cf_search=
3834
3835 test "/usr" != "$prefix" && \
3836 test -d "/usr" && \
3837 (test $prefix = NONE || test -d $prefix) && {
3838         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
3839         test -d /usr/include &&          cf_search="$cf_search /usr/include"
3840         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
3841         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
3842         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
3843         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
3844 }
3845
3846 test "$prefix" != "NONE" && \
3847 test -d "$prefix" && \
3848  {
3849         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
3850         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
3851         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
3852         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
3853         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
3854         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
3855 }
3856
3857 test "/usr/local" != "$prefix" && \
3858 test -d "/usr/local" && \
3859 (test $prefix = NONE || test -d $prefix) && {
3860         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
3861         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
3862         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
3863         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
3864         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
3865         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
3866 }
3867
3868 test "/opt" != "$prefix" && \
3869 test -d "/opt" && \
3870 (test $prefix = NONE || test -d $prefix) && {
3871         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
3872         test -d /opt/include &&          cf_search="$cf_search /opt/include"
3873         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
3874         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
3875         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
3876         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
3877 }
3878
3879 test "$HOME" != "$prefix" && \
3880 test -d "$HOME" && \
3881 (test $prefix = NONE || test -d $prefix) && {
3882         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
3883         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
3884         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
3885         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
3886         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
3887         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
3888 }
3889
3890 test "$includedir" != NONE && \
3891 test "$includedir" != "/usr/include" && \
3892 test -d "$includedir" && {
3893         test -d $includedir &&    cf_search="$cf_search $includedir"
3894         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
3895 }
3896
3897 test "$oldincludedir" != NONE && \
3898 test "$oldincludedir" != "/usr/include" && \
3899 test -d "$oldincludedir" && {
3900         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
3901         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
3902 }
3903
3904 cf_search="$cf_search $cf_header_path_list"
3905
3906     for cf_cv_header_path_utf8 in $cf_search
3907     do
3908       if test -d $cf_cv_header_path_utf8 ; then
3909         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
3910
3911 echo "${as_me-configure}:3911: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
3912
3913         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
3914         cat >conftest.$ac_ext <<_ACEOF
3915 #line 3915 "configure"
3916 #include "confdefs.h"
3917
3918 #include <libutf8.h>
3919 int
3920 main ()
3921 {
3922 putwc(0,0);
3923   ;
3924   return 0;
3925 }
3926 _ACEOF
3927 rm -f conftest.$ac_objext
3928 if { (eval echo "$as_me:3928: \"$ac_compile\"") >&5
3929   (eval $ac_compile) 2>&5
3930   ac_status=$?
3931   echo "$as_me:3931: \$? = $ac_status" >&5
3932   (exit $ac_status); } &&
3933          { ac_try='test -s conftest.$ac_objext'
3934   { (eval echo "$as_me:3934: \"$ac_try\"") >&5
3935   (eval $ac_try) 2>&5
3936   ac_status=$?
3937   echo "$as_me:3937: \$? = $ac_status" >&5
3938   (exit $ac_status); }; }; then
3939
3940             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
3941
3942 echo "${as_me-configure}:3942: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
3943
3944             cf_cv_find_linkage_utf8=maybe
3945             cf_test_CPPFLAGS="$CPPFLAGS"
3946             break
3947 else
3948   echo "$as_me: failed program was:" >&5
3949 cat conftest.$ac_ext >&5
3950
3951             CPPFLAGS="$cf_save_CPPFLAGS"
3952
3953 fi
3954 rm -f conftest.$ac_objext conftest.$ac_ext
3955       fi
3956     done
3957
3958     if test "$cf_cv_find_linkage_utf8" = maybe ; then
3959
3960 echo "${as_me-configure}:3960: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
3961
3962       cf_save_LIBS="$LIBS"
3963       cf_save_LDFLAGS="$LDFLAGS"
3964
3965       if test "$cf_cv_find_linkage_utf8" != yes ; then
3966
3967 cf_search=
3968 cf_library_path_list=""
3969 if test -n "${LDFLAGS}${LIBS}" ; then
3970         for cf_library_path in $LDFLAGS $LIBS
3971         do
3972                 case $cf_library_path in #(vi
3973                 -L*)
3974                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
3975
3976 test "$cf_library_path" != "NONE" && \
3977 test -d "$cf_library_path" && \
3978  {
3979         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
3980         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
3981         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
3982         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
3983         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
3984         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
3985 }
3986
3987                         cf_library_path_list="$cf_library_path_list $cf_search"
3988                         ;;
3989                 esac
3990         done
3991 fi
3992
3993 cf_search=
3994
3995 test "/usr" != "$prefix" && \
3996 test -d "/usr" && \
3997 (test $prefix = NONE || test -d $prefix) && {
3998         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
3999         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
4000         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
4001         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
4002         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
4003         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
4004 }
4005
4006 test "$prefix" != "NONE" && \
4007 test -d "$prefix" && \
4008  {
4009         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
4010         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
4011         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
4012         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
4013         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
4014         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
4015 }
4016
4017 test "/usr/local" != "$prefix" && \
4018 test -d "/usr/local" && \
4019 (test $prefix = NONE || test -d $prefix) && {
4020         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
4021         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
4022         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
4023         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
4024         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
4025         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
4026 }
4027
4028 test "/opt" != "$prefix" && \
4029 test -d "/opt" && \
4030 (test $prefix = NONE || test -d $prefix) && {
4031         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
4032         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
4033         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
4034         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
4035         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
4036         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
4037 }
4038
4039 test "$HOME" != "$prefix" && \
4040 test -d "$HOME" && \
4041 (test $prefix = NONE || test -d $prefix) && {
4042         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
4043         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
4044         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
4045         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
4046         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
4047         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
4048 }
4049
4050 cf_search="$cf_library_path_list $cf_search"
4051
4052         for cf_cv_library_path_utf8 in $cf_search
4053         do
4054           if test -d $cf_cv_library_path_utf8 ; then
4055             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
4056
4057 echo "${as_me-configure}:4057: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4058
4059             CPPFLAGS="$cf_test_CPPFLAGS"
4060             LIBS="-lutf8  $cf_save_LIBS"
4061             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4062             cat >conftest.$ac_ext <<_ACEOF
4063 #line 4063 "configure"
4064 #include "confdefs.h"
4065
4066 #include <libutf8.h>
4067 int
4068 main ()
4069 {
4070 putwc(0,0);
4071   ;
4072   return 0;
4073 }
4074 _ACEOF
4075 rm -f conftest.$ac_objext conftest$ac_exeext
4076 if { (eval echo "$as_me:4076: \"$ac_link\"") >&5
4077   (eval $ac_link) 2>&5
4078   ac_status=$?
4079   echo "$as_me:4079: \$? = $ac_status" >&5
4080   (exit $ac_status); } &&
4081          { ac_try='test -s conftest$ac_exeext'
4082   { (eval echo "$as_me:4082: \"$ac_try\"") >&5
4083   (eval $ac_try) 2>&5
4084   ac_status=$?
4085   echo "$as_me:4085: \$? = $ac_status" >&5
4086   (exit $ac_status); }; }; then
4087
4088                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4089
4090 echo "${as_me-configure}:4090: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4091
4092                 cf_cv_find_linkage_utf8=yes
4093                 cf_cv_library_file_utf8="-lutf8"
4094                 break
4095 else
4096   echo "$as_me: failed program was:" >&5
4097 cat conftest.$ac_ext >&5
4098
4099                 CPPFLAGS="$cf_save_CPPFLAGS"
4100                 LIBS="$cf_save_LIBS"
4101                 LDFLAGS="$cf_save_LDFLAGS"
4102
4103 fi
4104 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4105           fi
4106         done
4107         CPPFLAGS="$cf_save_CPPFLAGS"
4108         LDFLAGS="$cf_save_LDFLAGS"
4109       fi
4110
4111     else
4112       cf_cv_find_linkage_utf8=no
4113     fi
4114
4115 fi
4116 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4117
4118 fi
4119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4120
4121 LIBS="$cf_save_LIBS"
4122
4123 if test "$cf_cv_find_linkage_utf8" = yes ; then
4124 cf_cv_utf8_lib=add-on
4125 else
4126 cf_cv_utf8_lib=no
4127 fi
4128
4129 fi
4130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4131 fi
4132 echo "$as_me:4132: result: $cf_cv_utf8_lib" >&5
4133 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
4134
4135 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4136 # ncurses/ncursesw:
4137 if test "$cf_cv_utf8_lib" = "add-on" ; then
4138         cat >>confdefs.h <<\EOF
4139 #define HAVE_LIBUTF8_H 1
4140 EOF
4141
4142 if test -n "$cf_cv_header_path_utf8" ; then
4143   for cf_add_incdir in $cf_cv_header_path_utf8
4144   do
4145         while test $cf_add_incdir != /usr/include
4146         do
4147           if test -d $cf_add_incdir
4148           then
4149                 cf_have_incdir=no
4150                 if test -n "$CFLAGS$CPPFLAGS" ; then
4151                   # a loop is needed to ensure we can add subdirs of existing dirs
4152                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4153                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4154                           cf_have_incdir=yes; break
4155                         fi
4156                   done
4157                 fi
4158
4159                 if test "$cf_have_incdir" = no ; then
4160                   if test "$cf_add_incdir" = /usr/local/include ; then
4161                         if test "$GCC" = yes
4162                         then
4163                           cf_save_CPPFLAGS=$CPPFLAGS
4164                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4165                           cat >conftest.$ac_ext <<_ACEOF
4166 #line 4166 "configure"
4167 #include "confdefs.h"
4168 #include <stdio.h>
4169 int
4170 main ()
4171 {
4172 printf("Hello")
4173   ;
4174   return 0;
4175 }
4176 _ACEOF
4177 rm -f conftest.$ac_objext
4178 if { (eval echo "$as_me:4178: \"$ac_compile\"") >&5
4179   (eval $ac_compile) 2>&5
4180   ac_status=$?
4181   echo "$as_me:4181: \$? = $ac_status" >&5
4182   (exit $ac_status); } &&
4183          { ac_try='test -s conftest.$ac_objext'
4184   { (eval echo "$as_me:4184: \"$ac_try\"") >&5
4185   (eval $ac_try) 2>&5
4186   ac_status=$?
4187   echo "$as_me:4187: \$? = $ac_status" >&5
4188   (exit $ac_status); }; }; then
4189   :
4190 else
4191   echo "$as_me: failed program was:" >&5
4192 cat conftest.$ac_ext >&5
4193 cf_have_incdir=yes
4194 fi
4195 rm -f conftest.$ac_objext conftest.$ac_ext
4196                           CPPFLAGS=$cf_save_CPPFLAGS
4197                         fi
4198                   fi
4199                 fi
4200
4201                 if test "$cf_have_incdir" = no ; then
4202                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4203
4204 echo "${as_me-configure}:4204: testing adding $cf_add_incdir to include-path ..." 1>&5
4205
4206                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4207
4208                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4209                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4210                   cf_add_incdir="$cf_top_incdir"
4211                 else
4212                   break
4213                 fi
4214           fi
4215         done
4216   done
4217 fi
4218
4219 if test -n "$cf_cv_library_path_utf8" ; then
4220   for cf_add_libdir in $cf_cv_library_path_utf8
4221   do
4222     if test $cf_add_libdir = /usr/lib ; then
4223       :
4224     elif test -d $cf_add_libdir
4225     then
4226       cf_have_libdir=no
4227       if test -n "$LDFLAGS$LIBS" ; then
4228         # a loop is needed to ensure we can add subdirs of existing dirs
4229         for cf_test_libdir in $LDFLAGS $LIBS ; do
4230           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4231             cf_have_libdir=yes; break
4232           fi
4233         done
4234       fi
4235       if test "$cf_have_libdir" = no ; then
4236         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4237
4238 echo "${as_me-configure}:4238: testing adding $cf_add_libdir to library-path ..." 1>&5
4239
4240         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4241       fi
4242     fi
4243   done
4244 fi
4245
4246         LIBS="$cf_cv_library_file_utf8 $LIBS"
4247 fi
4248
4249 cf_ncuconfig_root=ncursesw
4250
4251 echo "Looking for ${cf_ncuconfig_root}-config"
4252 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4253 do
4254   # Extract the first word of "$ac_prog", so it can be a program name with args.
4255 set dummy $ac_prog; ac_word=$2
4256 echo "$as_me:4256: checking for $ac_word" >&5
4257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4258 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
4259   echo $ECHO_N "(cached) $ECHO_C" >&6
4260 else
4261   case $NCURSES_CONFIG in
4262   [\\/]* | ?:[\\/]*)
4263   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4264   ;;
4265   *)
4266   ac_save_IFS=$IFS; IFS=$ac_path_separator
4267 ac_dummy="$PATH"
4268 for ac_dir in $ac_dummy; do
4269   IFS=$ac_save_IFS
4270   test -z "$ac_dir" && ac_dir=.
4271   if $as_executable_p "$ac_dir/$ac_word"; then
4272    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4273    echo "$as_me:4273: found $ac_dir/$ac_word" >&5
4274    break
4275 fi
4276 done
4277
4278   ;;
4279 esac
4280 fi
4281 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
4282
4283 if test -n "$NCURSES_CONFIG"; then
4284   echo "$as_me:4284: result: $NCURSES_CONFIG" >&5
4285 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4286 else
4287   echo "$as_me:4287: result: no" >&5
4288 echo "${ECHO_T}no" >&6
4289 fi
4290
4291   test -n "$NCURSES_CONFIG" && break
4292 done
4293 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4294
4295 if test "$NCURSES_CONFIG" != none ; then
4296
4297 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4298 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4299
4300 # even with config script, some packages use no-override for curses.h
4301
4302 echo "$as_me:4302: checking if we have identified curses headers" >&5
4303 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4304 if test "${cf_cv_ncurses_header+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307
4308 cf_cv_ncurses_header=none
4309 for cf_header in  \
4310     ncursesw/curses.h \
4311         ncursesw/ncurses.h \
4312         curses.h \
4313         ncurses.h
4314 do
4315 cat >conftest.$ac_ext <<_ACEOF
4316 #line 4316 "configure"
4317 #include "confdefs.h"
4318 #include <${cf_header}>
4319 int
4320 main ()
4321 {
4322 initscr(); tgoto("?", 0,0)
4323   ;
4324   return 0;
4325 }
4326 _ACEOF
4327 rm -f conftest.$ac_objext
4328 if { (eval echo "$as_me:4328: \"$ac_compile\"") >&5
4329   (eval $ac_compile) 2>&5
4330   ac_status=$?
4331   echo "$as_me:4331: \$? = $ac_status" >&5
4332   (exit $ac_status); } &&
4333          { ac_try='test -s conftest.$ac_objext'
4334   { (eval echo "$as_me:4334: \"$ac_try\"") >&5
4335   (eval $ac_try) 2>&5
4336   ac_status=$?
4337   echo "$as_me:4337: \$? = $ac_status" >&5
4338   (exit $ac_status); }; }; then
4339   cf_cv_ncurses_header=$cf_header; break
4340 else
4341   echo "$as_me: failed program was:" >&5
4342 cat conftest.$ac_ext >&5
4343 fi
4344 rm -f conftest.$ac_objext conftest.$ac_ext
4345 done
4346
4347 fi
4348 echo "$as_me:4348: result: $cf_cv_ncurses_header" >&5
4349 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4350
4351 if test "$cf_cv_ncurses_header" = none ; then
4352         { { echo "$as_me:4352: error: No curses header-files found" >&5
4353 echo "$as_me: error: No curses header-files found" >&2;}
4354    { (exit 1); exit 1; }; }
4355 fi
4356
4357 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4358
4359 for ac_header in $cf_cv_ncurses_header
4360 do
4361 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4362 echo "$as_me:4362: checking for $ac_header" >&5
4363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4364 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4365   echo $ECHO_N "(cached) $ECHO_C" >&6
4366 else
4367   cat >conftest.$ac_ext <<_ACEOF
4368 #line 4368 "configure"
4369 #include "confdefs.h"
4370 #include <$ac_header>
4371 _ACEOF
4372 if { (eval echo "$as_me:4372: \"$ac_cpp conftest.$ac_ext\"") >&5
4373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4374   ac_status=$?
4375   egrep -v '^ *\+' conftest.er1 >conftest.err
4376   rm -f conftest.er1
4377   cat conftest.err >&5
4378   echo "$as_me:4378: \$? = $ac_status" >&5
4379   (exit $ac_status); } >/dev/null; then
4380   if test -s conftest.err; then
4381     ac_cpp_err=$ac_c_preproc_warn_flag
4382   else
4383     ac_cpp_err=
4384   fi
4385 else
4386   ac_cpp_err=yes
4387 fi
4388 if test -z "$ac_cpp_err"; then
4389   eval "$as_ac_Header=yes"
4390 else
4391   echo "$as_me: failed program was:" >&5
4392   cat conftest.$ac_ext >&5
4393   eval "$as_ac_Header=no"
4394 fi
4395 rm -f conftest.err conftest.$ac_ext
4396 fi
4397 echo "$as_me:4397: result: `eval echo '${'$as_ac_Header'}'`" >&5
4398 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4399 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4400   cat >>confdefs.h <<EOF
4401 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4402 EOF
4403
4404 fi
4405 done
4406
4407 cat >>confdefs.h <<\EOF
4408 #define NCURSES 1
4409 EOF
4410
4411 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4412
4413 cat >>confdefs.h <<EOF
4414 #define $cf_nculib_ROOT 1
4415 EOF
4416
4417 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4418
4419 else
4420
4421 cf_ncuhdr_root=ncursesw
4422
4423 test -n "$cf_cv_curses_dir" && \
4424 test "$cf_cv_curses_dir" != "no" && { \
4425
4426 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4427   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
4428   do
4429         while test $cf_add_incdir != /usr/include
4430         do
4431           if test -d $cf_add_incdir
4432           then
4433                 cf_have_incdir=no
4434                 if test -n "$CFLAGS$CPPFLAGS" ; then
4435                   # a loop is needed to ensure we can add subdirs of existing dirs
4436                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4437                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4438                           cf_have_incdir=yes; break
4439                         fi
4440                   done
4441                 fi
4442
4443                 if test "$cf_have_incdir" = no ; then
4444                   if test "$cf_add_incdir" = /usr/local/include ; then
4445                         if test "$GCC" = yes
4446                         then
4447                           cf_save_CPPFLAGS=$CPPFLAGS
4448                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4449                           cat >conftest.$ac_ext <<_ACEOF
4450 #line 4450 "configure"
4451 #include "confdefs.h"
4452 #include <stdio.h>
4453 int
4454 main ()
4455 {
4456 printf("Hello")
4457   ;
4458   return 0;
4459 }
4460 _ACEOF
4461 rm -f conftest.$ac_objext
4462 if { (eval echo "$as_me:4462: \"$ac_compile\"") >&5
4463   (eval $ac_compile) 2>&5
4464   ac_status=$?
4465   echo "$as_me:4465: \$? = $ac_status" >&5
4466   (exit $ac_status); } &&
4467          { ac_try='test -s conftest.$ac_objext'
4468   { (eval echo "$as_me:4468: \"$ac_try\"") >&5
4469   (eval $ac_try) 2>&5
4470   ac_status=$?
4471   echo "$as_me:4471: \$? = $ac_status" >&5
4472   (exit $ac_status); }; }; then
4473   :
4474 else
4475   echo "$as_me: failed program was:" >&5
4476 cat conftest.$ac_ext >&5
4477 cf_have_incdir=yes
4478 fi
4479 rm -f conftest.$ac_objext conftest.$ac_ext
4480                           CPPFLAGS=$cf_save_CPPFLAGS
4481                         fi
4482                   fi
4483                 fi
4484
4485                 if test "$cf_have_incdir" = no ; then
4486                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4487
4488 echo "${as_me-configure}:4488: testing adding $cf_add_incdir to include-path ..." 1>&5
4489
4490                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4491
4492                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4493                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4494                   cf_add_incdir="$cf_top_incdir"
4495                 else
4496                   break
4497                 fi
4498           fi
4499         done
4500   done
4501 fi
4502
4503 }
4504
4505 echo "$as_me:4505: checking for $cf_ncuhdr_root header in include-path" >&5
4506 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4507 if test "${cf_cv_ncurses_h+set}" = set; then
4508   echo $ECHO_N "(cached) $ECHO_C" >&6
4509 else
4510
4511         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4512         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4513         for cf_header in $cf_header_list
4514         do
4515
4516         cat >conftest.$ac_ext <<_ACEOF
4517 #line 4517 "configure"
4518 #include "confdefs.h"
4519
4520 #define _XOPEN_SOURCE_EXTENDED
4521 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
4522 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
4523
4524 #include <$cf_header>
4525 int
4526 main ()
4527 {
4528
4529 #ifdef NCURSES_VERSION
4530
4531 #ifndef WACS_BSSB
4532         make an error
4533 #endif
4534
4535 printf("%s\n", NCURSES_VERSION);
4536 #else
4537 #ifdef __NCURSES_H
4538 printf("old\n");
4539 #else
4540         make an error
4541 #endif
4542 #endif
4543
4544   ;
4545   return 0;
4546 }
4547 _ACEOF
4548 rm -f conftest.$ac_objext
4549 if { (eval echo "$as_me:4549: \"$ac_compile\"") >&5
4550   (eval $ac_compile) 2>&5
4551   ac_status=$?
4552   echo "$as_me:4552: \$? = $ac_status" >&5
4553   (exit $ac_status); } &&
4554          { ac_try='test -s conftest.$ac_objext'
4555   { (eval echo "$as_me:4555: \"$ac_try\"") >&5
4556   (eval $ac_try) 2>&5
4557   ac_status=$?
4558   echo "$as_me:4558: \$? = $ac_status" >&5
4559   (exit $ac_status); }; }; then
4560   cf_cv_ncurses_h=$cf_header
4561
4562 else
4563   echo "$as_me: failed program was:" >&5
4564 cat conftest.$ac_ext >&5
4565 cf_cv_ncurses_h=no
4566 fi
4567 rm -f conftest.$ac_objext conftest.$ac_ext
4568
4569                 test "$cf_cv_ncurses_h" != no && break
4570         done
4571
4572 fi
4573 echo "$as_me:4573: result: $cf_cv_ncurses_h" >&5
4574 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4575
4576 if test "$cf_cv_ncurses_h" != no ; then
4577         cf_cv_ncurses_header=$cf_cv_ncurses_h
4578 else
4579
4580 echo "$as_me:4580: checking for $cf_ncuhdr_root include-path" >&5
4581 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4582 if test "${cf_cv_ncurses_h2+set}" = set; then
4583   echo $ECHO_N "(cached) $ECHO_C" >&6
4584 else
4585
4586         test -n "$verbose" && echo
4587
4588 cf_search=
4589
4590 # collect the current set of include-directories from compiler flags
4591 cf_header_path_list=""
4592 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4593         for cf_header_path in $CPPFLAGS $CFLAGS
4594         do
4595                 case $cf_header_path in #(vi
4596                 -I*)
4597                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4598
4599 test "$cf_header_path" != "NONE" && \
4600 test -d "$cf_header_path" && \
4601  {
4602         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
4603         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
4604         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4605         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4606         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4607         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"
4608 }
4609
4610                         cf_header_path_list="$cf_header_path_list $cf_search"
4611                         ;;
4612                 esac
4613         done
4614 fi
4615
4616 # add the variations for the package we are looking for
4617
4618 cf_search=
4619
4620 test "/usr" != "$prefix" && \
4621 test -d "/usr" && \
4622 (test $prefix = NONE || test -d $prefix) && {
4623         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
4624         test -d /usr/include &&          cf_search="$cf_search /usr/include"
4625         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4626         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4627         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4628         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4629 }
4630
4631 test "$prefix" != "NONE" && \
4632 test -d "$prefix" && \
4633  {
4634         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
4635         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
4636         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4637         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4638         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4639         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4640 }
4641
4642 test "/usr/local" != "$prefix" && \
4643 test -d "/usr/local" && \
4644 (test $prefix = NONE || test -d $prefix) && {
4645         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
4646         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
4647         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4648         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4649         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4650         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4651 }
4652
4653 test "/opt" != "$prefix" && \
4654 test -d "/opt" && \
4655 (test $prefix = NONE || test -d $prefix) && {
4656         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
4657         test -d /opt/include &&          cf_search="$cf_search /opt/include"
4658         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4659         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4660         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4661         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4662 }
4663
4664 test "$HOME" != "$prefix" && \
4665 test -d "$HOME" && \
4666 (test $prefix = NONE || test -d $prefix) && {
4667         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
4668         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
4669         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4670         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4671         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4672         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4673 }
4674
4675 test "$includedir" != NONE && \
4676 test "$includedir" != "/usr/include" && \
4677 test -d "$includedir" && {
4678         test -d $includedir &&    cf_search="$cf_search $includedir"
4679         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4680 }
4681
4682 test "$oldincludedir" != NONE && \
4683 test "$oldincludedir" != "/usr/include" && \
4684 test -d "$oldincludedir" && {
4685         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
4686         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4687 }
4688
4689 cf_search="$cf_search $cf_header_path_list"
4690
4691         test -n "$verbose" && echo search path $cf_search
4692         cf_save2_CPPFLAGS="$CPPFLAGS"
4693         for cf_incdir in $cf_search
4694         do
4695
4696 if test -n "$cf_incdir" ; then
4697   for cf_add_incdir in $cf_incdir
4698   do
4699         while test $cf_add_incdir != /usr/include
4700         do
4701           if test -d $cf_add_incdir
4702           then
4703                 cf_have_incdir=no
4704                 if test -n "$CFLAGS$CPPFLAGS" ; then
4705                   # a loop is needed to ensure we can add subdirs of existing dirs
4706                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4707                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4708                           cf_have_incdir=yes; break
4709                         fi
4710                   done
4711                 fi
4712
4713                 if test "$cf_have_incdir" = no ; then
4714                   if test "$cf_add_incdir" = /usr/local/include ; then
4715                         if test "$GCC" = yes
4716                         then
4717                           cf_save_CPPFLAGS=$CPPFLAGS
4718                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4719                           cat >conftest.$ac_ext <<_ACEOF
4720 #line 4720 "configure"
4721 #include "confdefs.h"
4722 #include <stdio.h>
4723 int
4724 main ()
4725 {
4726 printf("Hello")
4727   ;
4728   return 0;
4729 }
4730 _ACEOF
4731 rm -f conftest.$ac_objext
4732 if { (eval echo "$as_me:4732: \"$ac_compile\"") >&5
4733   (eval $ac_compile) 2>&5
4734   ac_status=$?
4735   echo "$as_me:4735: \$? = $ac_status" >&5
4736   (exit $ac_status); } &&
4737          { ac_try='test -s conftest.$ac_objext'
4738   { (eval echo "$as_me:4738: \"$ac_try\"") >&5
4739   (eval $ac_try) 2>&5
4740   ac_status=$?
4741   echo "$as_me:4741: \$? = $ac_status" >&5
4742   (exit $ac_status); }; }; then
4743   :
4744 else
4745   echo "$as_me: failed program was:" >&5
4746 cat conftest.$ac_ext >&5
4747 cf_have_incdir=yes
4748 fi
4749 rm -f conftest.$ac_objext conftest.$ac_ext
4750                           CPPFLAGS=$cf_save_CPPFLAGS
4751                         fi
4752                   fi
4753                 fi
4754
4755                 if test "$cf_have_incdir" = no ; then
4756                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4757
4758 echo "${as_me-configure}:4758: testing adding $cf_add_incdir to include-path ..." 1>&5
4759
4760                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4761
4762                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4763                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4764                   cf_add_incdir="$cf_top_incdir"
4765                 else
4766                   break
4767                 fi
4768           fi
4769         done
4770   done
4771 fi
4772
4773                 for cf_header in \
4774                         ncurses.h \
4775                         curses.h
4776                 do
4777
4778         cat >conftest.$ac_ext <<_ACEOF
4779 #line 4779 "configure"
4780 #include "confdefs.h"
4781
4782 #include <$cf_header>
4783 int
4784 main ()
4785 {
4786
4787 #ifdef NCURSES_VERSION
4788
4789 printf("%s\n", NCURSES_VERSION);
4790 #else
4791 #ifdef __NCURSES_H
4792 printf("old\n");
4793 #else
4794         make an error
4795 #endif
4796 #endif
4797
4798   ;
4799   return 0;
4800 }
4801 _ACEOF
4802 rm -f conftest.$ac_objext
4803 if { (eval echo "$as_me:4803: \"$ac_compile\"") >&5
4804   (eval $ac_compile) 2>&5
4805   ac_status=$?
4806   echo "$as_me:4806: \$? = $ac_status" >&5
4807   (exit $ac_status); } &&
4808          { ac_try='test -s conftest.$ac_objext'
4809   { (eval echo "$as_me:4809: \"$ac_try\"") >&5
4810   (eval $ac_try) 2>&5
4811   ac_status=$?
4812   echo "$as_me:4812: \$? = $ac_status" >&5
4813   (exit $ac_status); }; }; then
4814   cf_cv_ncurses_h2=$cf_header
4815
4816 else
4817   echo "$as_me: failed program was:" >&5
4818 cat conftest.$ac_ext >&5
4819 cf_cv_ncurses_h2=no
4820 fi
4821 rm -f conftest.$ac_objext conftest.$ac_ext
4822
4823                         if test "$cf_cv_ncurses_h2" != no ; then
4824                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4825                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
4826                                 break
4827                         fi
4828                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
4829                 done
4830                 CPPFLAGS="$cf_save2_CPPFLAGS"
4831                 test "$cf_cv_ncurses_h2" != no && break
4832         done
4833         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4833: error: not found" >&5
4834 echo "$as_me: error: not found" >&2;}
4835    { (exit 1); exit 1; }; }
4836
4837 fi
4838 echo "$as_me:4838: result: $cf_cv_ncurses_h2" >&5
4839 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4840
4841         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4842         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4843         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4844                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4845         fi
4846
4847 if test -n "$cf_1st_incdir" ; then
4848   for cf_add_incdir in $cf_1st_incdir
4849   do
4850         while test $cf_add_incdir != /usr/include
4851         do
4852           if test -d $cf_add_incdir
4853           then
4854                 cf_have_incdir=no
4855                 if test -n "$CFLAGS$CPPFLAGS" ; then
4856                   # a loop is needed to ensure we can add subdirs of existing dirs
4857                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4858                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4859                           cf_have_incdir=yes; break
4860                         fi
4861                   done
4862                 fi
4863
4864                 if test "$cf_have_incdir" = no ; then
4865                   if test "$cf_add_incdir" = /usr/local/include ; then
4866                         if test "$GCC" = yes
4867                         then
4868                           cf_save_CPPFLAGS=$CPPFLAGS
4869                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4870                           cat >conftest.$ac_ext <<_ACEOF
4871 #line 4871 "configure"
4872 #include "confdefs.h"
4873 #include <stdio.h>
4874 int
4875 main ()
4876 {
4877 printf("Hello")
4878   ;
4879   return 0;
4880 }
4881 _ACEOF
4882 rm -f conftest.$ac_objext
4883 if { (eval echo "$as_me:4883: \"$ac_compile\"") >&5
4884   (eval $ac_compile) 2>&5
4885   ac_status=$?
4886   echo "$as_me:4886: \$? = $ac_status" >&5
4887   (exit $ac_status); } &&
4888          { ac_try='test -s conftest.$ac_objext'
4889   { (eval echo "$as_me:4889: \"$ac_try\"") >&5
4890   (eval $ac_try) 2>&5
4891   ac_status=$?
4892   echo "$as_me:4892: \$? = $ac_status" >&5
4893   (exit $ac_status); }; }; then
4894   :
4895 else
4896   echo "$as_me: failed program was:" >&5
4897 cat conftest.$ac_ext >&5
4898 cf_have_incdir=yes
4899 fi
4900 rm -f conftest.$ac_objext conftest.$ac_ext
4901                           CPPFLAGS=$cf_save_CPPFLAGS
4902                         fi
4903                   fi
4904                 fi
4905
4906                 if test "$cf_have_incdir" = no ; then
4907                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4908
4909 echo "${as_me-configure}:4909: testing adding $cf_add_incdir to include-path ..." 1>&5
4910
4911                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4912
4913                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4914                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4915                   cf_add_incdir="$cf_top_incdir"
4916                 else
4917                   break
4918                 fi
4919           fi
4920         done
4921   done
4922 fi
4923
4924 fi
4925
4926 # Set definitions to allow ifdef'ing for ncurses.h
4927
4928 case $cf_cv_ncurses_header in # (vi
4929 *ncurses.h)
4930         cat >>confdefs.h <<\EOF
4931 #define HAVE_NCURSES_H 1
4932 EOF
4933
4934         ;;
4935 esac
4936
4937 case $cf_cv_ncurses_header in # (vi
4938 ncurses/curses.h|ncurses/ncurses.h)
4939         cat >>confdefs.h <<\EOF
4940 #define HAVE_NCURSES_NCURSES_H 1
4941 EOF
4942
4943         ;;
4944 ncursesw/curses.h|ncursesw/ncurses.h)
4945         cat >>confdefs.h <<\EOF
4946 #define HAVE_NCURSESW_NCURSES_H 1
4947 EOF
4948
4949         ;;
4950 esac
4951
4952 echo "$as_me:4952: checking for terminfo header" >&5
4953 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4954 if test "${cf_cv_term_header+set}" = set; then
4955   echo $ECHO_N "(cached) $ECHO_C" >&6
4956 else
4957
4958 case ${cf_cv_ncurses_header} in #(vi
4959 */ncurses.h|*/ncursesw.h) #(vi
4960         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4961         ;;
4962 *)
4963         cf_term_header=term.h
4964         ;;
4965 esac
4966
4967 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4968 do
4969 cat >conftest.$ac_ext <<_ACEOF
4970 #line 4970 "configure"
4971 #include "confdefs.h"
4972 #include <stdio.h>
4973 #include <${cf_cv_ncurses_header-curses.h}>
4974 #include <$cf_test>
4975
4976 int
4977 main ()
4978 {
4979 int x = auto_left_margin
4980   ;
4981   return 0;
4982 }
4983 _ACEOF
4984 rm -f conftest.$ac_objext
4985 if { (eval echo "$as_me:4985: \"$ac_compile\"") >&5
4986   (eval $ac_compile) 2>&5
4987   ac_status=$?
4988   echo "$as_me:4988: \$? = $ac_status" >&5
4989   (exit $ac_status); } &&
4990          { ac_try='test -s conftest.$ac_objext'
4991   { (eval echo "$as_me:4991: \"$ac_try\"") >&5
4992   (eval $ac_try) 2>&5
4993   ac_status=$?
4994   echo "$as_me:4994: \$? = $ac_status" >&5
4995   (exit $ac_status); }; }; then
4996
4997         cf_cv_term_header="$cf_test"
4998 else
4999   echo "$as_me: failed program was:" >&5
5000 cat conftest.$ac_ext >&5
5001
5002         cf_cv_term_header=unknown
5003
5004 fi
5005 rm -f conftest.$ac_objext conftest.$ac_ext
5006         test "$cf_cv_term_header" != unknown && break
5007 done
5008
5009 fi
5010 echo "$as_me:5010: result: $cf_cv_term_header" >&5
5011 echo "${ECHO_T}$cf_cv_term_header" >&6
5012
5013 # Set definitions to allow ifdef'ing to accommodate subdirectories
5014
5015 case $cf_cv_term_header in # (vi
5016 *term.h)
5017         cat >>confdefs.h <<\EOF
5018 #define HAVE_TERM_H 1
5019 EOF
5020
5021         ;;
5022 esac
5023
5024 case $cf_cv_term_header in # (vi
5025 ncurses/term.h) #(vi
5026         cat >>confdefs.h <<\EOF
5027 #define HAVE_NCURSES_TERM_H 1
5028 EOF
5029
5030         ;;
5031 ncursesw/term.h)
5032         cat >>confdefs.h <<\EOF
5033 #define HAVE_NCURSESW_TERM_H 1
5034 EOF
5035
5036         ;;
5037 esac
5038
5039 # some applications need this, but should check for NCURSES_VERSION
5040 cat >>confdefs.h <<\EOF
5041 #define NCURSES 1
5042 EOF
5043
5044 echo "$as_me:5044: checking for ncurses version" >&5
5045 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5046 if test "${cf_cv_ncurses_version+set}" = set; then
5047   echo $ECHO_N "(cached) $ECHO_C" >&6
5048 else
5049
5050         cf_cv_ncurses_version=no
5051         cf_tempfile=out$$
5052         rm -f $cf_tempfile
5053         if test "$cross_compiling" = yes; then
5054
5055         # This will not work if the preprocessor splits the line after the
5056         # Autoconf token.  The 'unproto' program does that.
5057         cat > conftest.$ac_ext <<EOF
5058 #include <${cf_cv_ncurses_header-curses.h}>
5059 #undef Autoconf
5060 #ifdef NCURSES_VERSION
5061 Autoconf NCURSES_VERSION
5062 #else
5063 #ifdef __NCURSES_H
5064 Autoconf "old"
5065 #endif
5066 ;
5067 #endif
5068 EOF
5069         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5070         { (eval echo "$as_me:5070: \"$cf_try\"") >&5
5071   (eval $cf_try) 2>&5
5072   ac_status=$?
5073   echo "$as_me:5073: \$? = $ac_status" >&5
5074   (exit $ac_status); }
5075         if test -f conftest.out ; then
5076                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5077                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5078                 rm -f conftest.out
5079         fi
5080
5081 else
5082   cat >conftest.$ac_ext <<_ACEOF
5083 #line 5083 "configure"
5084 #include "confdefs.h"
5085
5086 #include <${cf_cv_ncurses_header-curses.h}>
5087 #include <stdio.h>
5088 int main()
5089 {
5090         FILE *fp = fopen("$cf_tempfile", "w");
5091 #ifdef NCURSES_VERSION
5092 # ifdef NCURSES_VERSION_PATCH
5093         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5094 # else
5095         fprintf(fp, "%s\n", NCURSES_VERSION);
5096 # endif
5097 #else
5098 # ifdef __NCURSES_H
5099         fprintf(fp, "old\n");
5100 # else
5101         make an error
5102 # endif
5103 #endif
5104         ${cf_cv_main_return-return}(0);
5105 }
5106 _ACEOF
5107 rm -f conftest$ac_exeext
5108 if { (eval echo "$as_me:5108: \"$ac_link\"") >&5
5109   (eval $ac_link) 2>&5
5110   ac_status=$?
5111   echo "$as_me:5111: \$? = $ac_status" >&5
5112   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5113   { (eval echo "$as_me:5113: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:5116: \$? = $ac_status" >&5
5117   (exit $ac_status); }; }; then
5118
5119         cf_cv_ncurses_version=`cat $cf_tempfile`
5120 else
5121   echo "$as_me: program exited with status $ac_status" >&5
5122 echo "$as_me: failed program was:" >&5
5123 cat conftest.$ac_ext >&5
5124 fi
5125 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5126 fi
5127         rm -f $cf_tempfile
5128
5129 fi
5130 echo "$as_me:5130: result: $cf_cv_ncurses_version" >&5
5131 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5132 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5133 #define NCURSES 1
5134 EOF
5135
5136 cf_nculib_root=ncursesw
5137         # This works, except for the special case where we find gpm, but
5138         # ncurses is in a nonstandard location via $LIBS, and we really want
5139         # to link gpm.
5140 cf_ncurses_LIBS=""
5141 cf_ncurses_SAVE="$LIBS"
5142 echo "$as_me:5142: checking for Gpm_Open in -lgpm" >&5
5143 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5144 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5145   echo $ECHO_N "(cached) $ECHO_C" >&6
5146 else
5147   ac_check_lib_save_LIBS=$LIBS
5148 LIBS="-lgpm  $LIBS"
5149 cat >conftest.$ac_ext <<_ACEOF
5150 #line 5150 "configure"
5151 #include "confdefs.h"
5152
5153 /* Override any gcc2 internal prototype to avoid an error.  */
5154 #ifdef __cplusplus
5155 extern "C"
5156 #endif
5157 /* We use char because int might match the return type of a gcc2
5158    builtin and then its argument prototype would still apply.  */
5159 char Gpm_Open ();
5160 int
5161 main ()
5162 {
5163 Gpm_Open ();
5164   ;
5165   return 0;
5166 }
5167 _ACEOF
5168 rm -f conftest.$ac_objext conftest$ac_exeext
5169 if { (eval echo "$as_me:5169: \"$ac_link\"") >&5
5170   (eval $ac_link) 2>&5
5171   ac_status=$?
5172   echo "$as_me:5172: \$? = $ac_status" >&5
5173   (exit $ac_status); } &&
5174          { ac_try='test -s conftest$ac_exeext'
5175   { (eval echo "$as_me:5175: \"$ac_try\"") >&5
5176   (eval $ac_try) 2>&5
5177   ac_status=$?
5178   echo "$as_me:5178: \$? = $ac_status" >&5
5179   (exit $ac_status); }; }; then
5180   ac_cv_lib_gpm_Gpm_Open=yes
5181 else
5182   echo "$as_me: failed program was:" >&5
5183 cat conftest.$ac_ext >&5
5184 ac_cv_lib_gpm_Gpm_Open=no
5185 fi
5186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5187 LIBS=$ac_check_lib_save_LIBS
5188 fi
5189 echo "$as_me:5189: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5190 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5191 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5192   echo "$as_me:5192: checking for initscr in -lgpm" >&5
5193 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5194 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5195   echo $ECHO_N "(cached) $ECHO_C" >&6
5196 else
5197   ac_check_lib_save_LIBS=$LIBS
5198 LIBS="-lgpm  $LIBS"
5199 cat >conftest.$ac_ext <<_ACEOF
5200 #line 5200 "configure"
5201 #include "confdefs.h"
5202
5203 /* Override any gcc2 internal prototype to avoid an error.  */
5204 #ifdef __cplusplus
5205 extern "C"
5206 #endif
5207 /* We use char because int might match the return type of a gcc2
5208    builtin and then its argument prototype would still apply.  */
5209 char initscr ();
5210 int
5211 main ()
5212 {
5213 initscr ();
5214   ;
5215   return 0;
5216 }
5217 _ACEOF
5218 rm -f conftest.$ac_objext conftest$ac_exeext
5219 if { (eval echo "$as_me:5219: \"$ac_link\"") >&5
5220   (eval $ac_link) 2>&5
5221   ac_status=$?
5222   echo "$as_me:5222: \$? = $ac_status" >&5
5223   (exit $ac_status); } &&
5224          { ac_try='test -s conftest$ac_exeext'
5225   { (eval echo "$as_me:5225: \"$ac_try\"") >&5
5226   (eval $ac_try) 2>&5
5227   ac_status=$?
5228   echo "$as_me:5228: \$? = $ac_status" >&5
5229   (exit $ac_status); }; }; then
5230   ac_cv_lib_gpm_initscr=yes
5231 else
5232   echo "$as_me: failed program was:" >&5
5233 cat conftest.$ac_ext >&5
5234 ac_cv_lib_gpm_initscr=no
5235 fi
5236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5237 LIBS=$ac_check_lib_save_LIBS
5238 fi
5239 echo "$as_me:5239: result: $ac_cv_lib_gpm_initscr" >&5
5240 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5241 if test $ac_cv_lib_gpm_initscr = yes; then
5242   LIBS="$cf_ncurses_SAVE"
5243 else
5244   cf_ncurses_LIBS="-lgpm"
5245 fi
5246
5247 fi
5248
5249 case $host_os in #(vi
5250 freebsd*)
5251         # This is only necessary if you are linking against an obsolete
5252         # version of ncurses (but it should do no harm, since it's static).
5253         if test "$cf_nculib_root" = ncurses ; then
5254                 echo "$as_me:5254: checking for tgoto in -lmytinfo" >&5
5255 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5256 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   ac_check_lib_save_LIBS=$LIBS
5260 LIBS="-lmytinfo  $LIBS"
5261 cat >conftest.$ac_ext <<_ACEOF
5262 #line 5262 "configure"
5263 #include "confdefs.h"
5264
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 #ifdef __cplusplus
5267 extern "C"
5268 #endif
5269 /* We use char because int might match the return type of a gcc2
5270    builtin and then its argument prototype would still apply.  */
5271 char tgoto ();
5272 int
5273 main ()
5274 {
5275 tgoto ();
5276   ;
5277   return 0;
5278 }
5279 _ACEOF
5280 rm -f conftest.$ac_objext conftest$ac_exeext
5281 if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
5282   (eval $ac_link) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); } &&
5286          { ac_try='test -s conftest$ac_exeext'
5287   { (eval echo "$as_me:5287: \"$ac_try\"") >&5
5288   (eval $ac_try) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); }; }; then
5292   ac_cv_lib_mytinfo_tgoto=yes
5293 else
5294   echo "$as_me: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 ac_cv_lib_mytinfo_tgoto=no
5297 fi
5298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5299 LIBS=$ac_check_lib_save_LIBS
5300 fi
5301 echo "$as_me:5301: result: $ac_cv_lib_mytinfo_tgoto" >&5
5302 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5303 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5304   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5305 fi
5306
5307         fi
5308         ;;
5309 esac
5310
5311 LIBS="$cf_ncurses_LIBS $LIBS"
5312
5313 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5314 then
5315
5316 if test -n "$cf_cv_curses_dir/lib" ; then
5317   for cf_add_libdir in $cf_cv_curses_dir/lib
5318   do
5319     if test $cf_add_libdir = /usr/lib ; then
5320       :
5321     elif test -d $cf_add_libdir
5322     then
5323       cf_have_libdir=no
5324       if test -n "$LDFLAGS$LIBS" ; then
5325         # a loop is needed to ensure we can add subdirs of existing dirs
5326         for cf_test_libdir in $LDFLAGS $LIBS ; do
5327           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5328             cf_have_libdir=yes; break
5329           fi
5330         done
5331       fi
5332       if test "$cf_have_libdir" = no ; then
5333         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5334
5335 echo "${as_me-configure}:5335: testing adding $cf_add_libdir to library-path ..." 1>&5
5336
5337         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5338       fi
5339     fi
5340   done
5341 fi
5342
5343         LIBS="-l$cf_nculib_root $LIBS"
5344 else
5345
5346         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5347         cf_libdir=""
5348         echo "$as_me:5348: checking for initscr" >&5
5349 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5350 if test "${ac_cv_func_initscr+set}" = set; then
5351   echo $ECHO_N "(cached) $ECHO_C" >&6
5352 else
5353   cat >conftest.$ac_ext <<_ACEOF
5354 #line 5354 "configure"
5355 #include "confdefs.h"
5356 /* System header to define __stub macros and hopefully few prototypes,
5357     which can conflict with char initscr (); below.  */
5358 #include <assert.h>
5359 /* Override any gcc2 internal prototype to avoid an error.  */
5360 #ifdef __cplusplus
5361 extern "C"
5362 #endif
5363 /* We use char because int might match the return type of a gcc2
5364    builtin and then its argument prototype would still apply.  */
5365 char initscr ();
5366 char (*f) ();
5367
5368 int
5369 main ()
5370 {
5371 /* The GNU C library defines this for functions which it implements
5372     to always fail with ENOSYS.  Some functions are actually named
5373     something starting with __ and the normal name is an alias.  */
5374 #if defined (__stub_initscr) || defined (__stub___initscr)
5375 choke me
5376 #else
5377 f = initscr;
5378 #endif
5379
5380   ;
5381   return 0;
5382 }
5383 _ACEOF
5384 rm -f conftest.$ac_objext conftest$ac_exeext
5385 if { (eval echo "$as_me:5385: \"$ac_link\"") >&5
5386   (eval $ac_link) 2>&5
5387   ac_status=$?
5388   echo "$as_me:5388: \$? = $ac_status" >&5
5389   (exit $ac_status); } &&
5390          { ac_try='test -s conftest$ac_exeext'
5391   { (eval echo "$as_me:5391: \"$ac_try\"") >&5
5392   (eval $ac_try) 2>&5
5393   ac_status=$?
5394   echo "$as_me:5394: \$? = $ac_status" >&5
5395   (exit $ac_status); }; }; then
5396   ac_cv_func_initscr=yes
5397 else
5398   echo "$as_me: failed program was:" >&5
5399 cat conftest.$ac_ext >&5
5400 ac_cv_func_initscr=no
5401 fi
5402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5403 fi
5404 echo "$as_me:5404: result: $ac_cv_func_initscr" >&5
5405 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5406 if test $ac_cv_func_initscr = yes; then
5407   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5408 else
5409
5410                 cf_save_LIBS="$LIBS"
5411                 echo "$as_me:5411: checking for initscr in -l$cf_nculib_root" >&5
5412 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5413                 LIBS="-l$cf_nculib_root $LIBS"
5414                 cat >conftest.$ac_ext <<_ACEOF
5415 #line 5415 "configure"
5416 #include "confdefs.h"
5417 #include <${cf_cv_ncurses_header-curses.h}>
5418 int
5419 main ()
5420 {
5421 initscr()
5422   ;
5423   return 0;
5424 }
5425 _ACEOF
5426 rm -f conftest.$ac_objext conftest$ac_exeext
5427 if { (eval echo "$as_me:5427: \"$ac_link\"") >&5
5428   (eval $ac_link) 2>&5
5429   ac_status=$?
5430   echo "$as_me:5430: \$? = $ac_status" >&5
5431   (exit $ac_status); } &&
5432          { ac_try='test -s conftest$ac_exeext'
5433   { (eval echo "$as_me:5433: \"$ac_try\"") >&5
5434   (eval $ac_try) 2>&5
5435   ac_status=$?
5436   echo "$as_me:5436: \$? = $ac_status" >&5
5437   (exit $ac_status); }; }; then
5438   echo "$as_me:5438: result: yes" >&5
5439 echo "${ECHO_T}yes" >&6
5440                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5441
5442 else
5443   echo "$as_me: failed program was:" >&5
5444 cat conftest.$ac_ext >&5
5445 echo "$as_me:5445: result: no" >&5
5446 echo "${ECHO_T}no" >&6
5447
5448 cf_search=
5449 cf_library_path_list=""
5450 if test -n "${LDFLAGS}${LIBS}" ; then
5451         for cf_library_path in $LDFLAGS $LIBS
5452         do
5453                 case $cf_library_path in #(vi
5454                 -L*)
5455                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5456
5457 test "$cf_library_path" != "NONE" && \
5458 test -d "$cf_library_path" && \
5459  {
5460         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
5461         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
5462         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5463         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5464         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5465         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"
5466 }
5467
5468                         cf_library_path_list="$cf_library_path_list $cf_search"
5469                         ;;
5470                 esac
5471         done
5472 fi
5473
5474 cf_search=
5475
5476 test "/usr" != "$prefix" && \
5477 test -d "/usr" && \
5478 (test $prefix = NONE || test -d $prefix) && {
5479         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
5480         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
5481         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
5482         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5483         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
5484         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5485 }
5486
5487 test "$prefix" != "NONE" && \
5488 test -d "$prefix" && \
5489  {
5490         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
5491         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
5492         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5493         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5494         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5495         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5496 }
5497
5498 test "/usr/local" != "$prefix" && \
5499 test -d "/usr/local" && \
5500 (test $prefix = NONE || test -d $prefix) && {
5501         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
5502         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
5503         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5504         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5505         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5506         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5507 }
5508
5509 test "/opt" != "$prefix" && \
5510 test -d "/opt" && \
5511 (test $prefix = NONE || test -d $prefix) && {
5512         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
5513         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
5514         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
5515         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5516         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
5517         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5518 }
5519
5520 test "$HOME" != "$prefix" && \
5521 test -d "$HOME" && \
5522 (test $prefix = NONE || test -d $prefix) && {
5523         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
5524         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
5525         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5526         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5527         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5528         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5529 }
5530
5531 cf_search="$cf_library_path_list $cf_search"
5532
5533                         for cf_libdir in $cf_search
5534                         do
5535                                 echo "$as_me:5535: checking for -l$cf_nculib_root in $cf_libdir" >&5
5536 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5537                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5538                                 cat >conftest.$ac_ext <<_ACEOF
5539 #line 5539 "configure"
5540 #include "confdefs.h"
5541 #include <${cf_cv_ncurses_header-curses.h}>
5542 int
5543 main ()
5544 {
5545 initscr()
5546   ;
5547   return 0;
5548 }
5549 _ACEOF
5550 rm -f conftest.$ac_objext conftest$ac_exeext
5551 if { (eval echo "$as_me:5551: \"$ac_link\"") >&5
5552   (eval $ac_link) 2>&5
5553   ac_status=$?
5554   echo "$as_me:5554: \$? = $ac_status" >&5
5555   (exit $ac_status); } &&
5556          { ac_try='test -s conftest$ac_exeext'
5557   { (eval echo "$as_me:5557: \"$ac_try\"") >&5
5558   (eval $ac_try) 2>&5
5559   ac_status=$?
5560   echo "$as_me:5560: \$? = $ac_status" >&5
5561   (exit $ac_status); }; }; then
5562   echo "$as_me:5562: result: yes" >&5
5563 echo "${ECHO_T}yes" >&6
5564                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5565                                          break
5566 else
5567   echo "$as_me: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
5569 echo "$as_me:5569: result: no" >&5
5570 echo "${ECHO_T}no" >&6
5571                                          LIBS="$cf_save_LIBS"
5572 fi
5573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5574                         done
5575
5576 fi
5577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5578
5579 fi
5580
5581 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5582
5583 if test $cf_found_library = no ; then
5584         { { echo "$as_me:5584: error: Cannot link $cf_nculib_root library" >&5
5585 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5586    { (exit 1); exit 1; }; }
5587 fi
5588
5589 fi
5590
5591 if test -n "$cf_ncurses_LIBS" ; then
5592         echo "$as_me:5592: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5593 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5594         cf_ncurses_SAVE="$LIBS"
5595         for p in $cf_ncurses_LIBS ; do
5596                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5597                 if test "$q" != "$LIBS" ; then
5598                         LIBS="$q"
5599                 fi
5600         done
5601         cat >conftest.$ac_ext <<_ACEOF
5602 #line 5602 "configure"
5603 #include "confdefs.h"
5604 #include <${cf_cv_ncurses_header-curses.h}>
5605 int
5606 main ()
5607 {
5608 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5609   ;
5610   return 0;
5611 }
5612 _ACEOF
5613 rm -f conftest.$ac_objext conftest$ac_exeext
5614 if { (eval echo "$as_me:5614: \"$ac_link\"") >&5
5615   (eval $ac_link) 2>&5
5616   ac_status=$?
5617   echo "$as_me:5617: \$? = $ac_status" >&5
5618   (exit $ac_status); } &&
5619          { ac_try='test -s conftest$ac_exeext'
5620   { (eval echo "$as_me:5620: \"$ac_try\"") >&5
5621   (eval $ac_try) 2>&5
5622   ac_status=$?
5623   echo "$as_me:5623: \$? = $ac_status" >&5
5624   (exit $ac_status); }; }; then
5625   echo "$as_me:5625: result: yes" >&5
5626 echo "${ECHO_T}yes" >&6
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                  LIBS="$cf_ncurses_SAVE"
5633 fi
5634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5635 fi
5636
5637 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5638
5639 cat >>confdefs.h <<EOF
5640 #define $cf_nculib_ROOT 1
5641 EOF
5642
5643 fi
5644
5645 else
5646
5647 cf_ncuconfig_root=ncurses
5648
5649 echo "Looking for ${cf_ncuconfig_root}-config"
5650 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5651 do
5652   # Extract the first word of "$ac_prog", so it can be a program name with args.
5653 set dummy $ac_prog; ac_word=$2
5654 echo "$as_me:5654: checking for $ac_word" >&5
5655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5656 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5657   echo $ECHO_N "(cached) $ECHO_C" >&6
5658 else
5659   case $NCURSES_CONFIG in
5660   [\\/]* | ?:[\\/]*)
5661   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5662   ;;
5663   *)
5664   ac_save_IFS=$IFS; IFS=$ac_path_separator
5665 ac_dummy="$PATH"
5666 for ac_dir in $ac_dummy; do
5667   IFS=$ac_save_IFS
5668   test -z "$ac_dir" && ac_dir=.
5669   if $as_executable_p "$ac_dir/$ac_word"; then
5670    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5671    echo "$as_me:5671: found $ac_dir/$ac_word" >&5
5672    break
5673 fi
5674 done
5675
5676   ;;
5677 esac
5678 fi
5679 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5680
5681 if test -n "$NCURSES_CONFIG"; then
5682   echo "$as_me:5682: result: $NCURSES_CONFIG" >&5
5683 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5684 else
5685   echo "$as_me:5685: result: no" >&5
5686 echo "${ECHO_T}no" >&6
5687 fi
5688
5689   test -n "$NCURSES_CONFIG" && break
5690 done
5691 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5692
5693 if test "$NCURSES_CONFIG" != none ; then
5694
5695 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5696 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5697
5698 # even with config script, some packages use no-override for curses.h
5699
5700 echo "$as_me:5700: checking if we have identified curses headers" >&5
5701 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5702 if test "${cf_cv_ncurses_header+set}" = set; then
5703   echo $ECHO_N "(cached) $ECHO_C" >&6
5704 else
5705
5706 cf_cv_ncurses_header=none
5707 for cf_header in  \
5708     ncurses/curses.h \
5709         ncurses/ncurses.h \
5710         curses.h \
5711         ncurses.h
5712 do
5713 cat >conftest.$ac_ext <<_ACEOF
5714 #line 5714 "configure"
5715 #include "confdefs.h"
5716 #include <${cf_header}>
5717 int
5718 main ()
5719 {
5720 initscr(); tgoto("?", 0,0)
5721   ;
5722   return 0;
5723 }
5724 _ACEOF
5725 rm -f conftest.$ac_objext
5726 if { (eval echo "$as_me:5726: \"$ac_compile\"") >&5
5727   (eval $ac_compile) 2>&5
5728   ac_status=$?
5729   echo "$as_me:5729: \$? = $ac_status" >&5
5730   (exit $ac_status); } &&
5731          { ac_try='test -s conftest.$ac_objext'
5732   { (eval echo "$as_me:5732: \"$ac_try\"") >&5
5733   (eval $ac_try) 2>&5
5734   ac_status=$?
5735   echo "$as_me:5735: \$? = $ac_status" >&5
5736   (exit $ac_status); }; }; then
5737   cf_cv_ncurses_header=$cf_header; break
5738 else
5739   echo "$as_me: failed program was:" >&5
5740 cat conftest.$ac_ext >&5
5741 fi
5742 rm -f conftest.$ac_objext conftest.$ac_ext
5743 done
5744
5745 fi
5746 echo "$as_me:5746: result: $cf_cv_ncurses_header" >&5
5747 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5748
5749 if test "$cf_cv_ncurses_header" = none ; then
5750         { { echo "$as_me:5750: error: No curses header-files found" >&5
5751 echo "$as_me: error: No curses header-files found" >&2;}
5752    { (exit 1); exit 1; }; }
5753 fi
5754
5755 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5756
5757 for ac_header in $cf_cv_ncurses_header
5758 do
5759 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5760 echo "$as_me:5760: checking for $ac_header" >&5
5761 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5762 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5763   echo $ECHO_N "(cached) $ECHO_C" >&6
5764 else
5765   cat >conftest.$ac_ext <<_ACEOF
5766 #line 5766 "configure"
5767 #include "confdefs.h"
5768 #include <$ac_header>
5769 _ACEOF
5770 if { (eval echo "$as_me:5770: \"$ac_cpp conftest.$ac_ext\"") >&5
5771   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5772   ac_status=$?
5773   egrep -v '^ *\+' conftest.er1 >conftest.err
5774   rm -f conftest.er1
5775   cat conftest.err >&5
5776   echo "$as_me:5776: \$? = $ac_status" >&5
5777   (exit $ac_status); } >/dev/null; then
5778   if test -s conftest.err; then
5779     ac_cpp_err=$ac_c_preproc_warn_flag
5780   else
5781     ac_cpp_err=
5782   fi
5783 else
5784   ac_cpp_err=yes
5785 fi
5786 if test -z "$ac_cpp_err"; then
5787   eval "$as_ac_Header=yes"
5788 else
5789   echo "$as_me: failed program was:" >&5
5790   cat conftest.$ac_ext >&5
5791   eval "$as_ac_Header=no"
5792 fi
5793 rm -f conftest.err conftest.$ac_ext
5794 fi
5795 echo "$as_me:5795: result: `eval echo '${'$as_ac_Header'}'`" >&5
5796 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5797 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5798   cat >>confdefs.h <<EOF
5799 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5800 EOF
5801
5802 fi
5803 done
5804
5805 cat >>confdefs.h <<\EOF
5806 #define NCURSES 1
5807 EOF
5808
5809 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5810
5811 cat >>confdefs.h <<EOF
5812 #define $cf_nculib_ROOT 1
5813 EOF
5814
5815 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5816
5817 else
5818
5819 cf_ncuhdr_root=ncurses
5820
5821 test -n "$cf_cv_curses_dir" && \
5822 test "$cf_cv_curses_dir" != "no" && { \
5823
5824 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5825   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
5826   do
5827         while test $cf_add_incdir != /usr/include
5828         do
5829           if test -d $cf_add_incdir
5830           then
5831                 cf_have_incdir=no
5832                 if test -n "$CFLAGS$CPPFLAGS" ; then
5833                   # a loop is needed to ensure we can add subdirs of existing dirs
5834                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5835                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5836                           cf_have_incdir=yes; break
5837                         fi
5838                   done
5839                 fi
5840
5841                 if test "$cf_have_incdir" = no ; then
5842                   if test "$cf_add_incdir" = /usr/local/include ; then
5843                         if test "$GCC" = yes
5844                         then
5845                           cf_save_CPPFLAGS=$CPPFLAGS
5846                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5847                           cat >conftest.$ac_ext <<_ACEOF
5848 #line 5848 "configure"
5849 #include "confdefs.h"
5850 #include <stdio.h>
5851 int
5852 main ()
5853 {
5854 printf("Hello")
5855   ;
5856   return 0;
5857 }
5858 _ACEOF
5859 rm -f conftest.$ac_objext
5860 if { (eval echo "$as_me:5860: \"$ac_compile\"") >&5
5861   (eval $ac_compile) 2>&5
5862   ac_status=$?
5863   echo "$as_me:5863: \$? = $ac_status" >&5
5864   (exit $ac_status); } &&
5865          { ac_try='test -s conftest.$ac_objext'
5866   { (eval echo "$as_me:5866: \"$ac_try\"") >&5
5867   (eval $ac_try) 2>&5
5868   ac_status=$?
5869   echo "$as_me:5869: \$? = $ac_status" >&5
5870   (exit $ac_status); }; }; then
5871   :
5872 else
5873   echo "$as_me: failed program was:" >&5
5874 cat conftest.$ac_ext >&5
5875 cf_have_incdir=yes
5876 fi
5877 rm -f conftest.$ac_objext conftest.$ac_ext
5878                           CPPFLAGS=$cf_save_CPPFLAGS
5879                         fi
5880                   fi
5881                 fi
5882
5883                 if test "$cf_have_incdir" = no ; then
5884                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5885
5886 echo "${as_me-configure}:5886: testing adding $cf_add_incdir to include-path ..." 1>&5
5887
5888                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5889
5890                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5891                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5892                   cf_add_incdir="$cf_top_incdir"
5893                 else
5894                   break
5895                 fi
5896           fi
5897         done
5898   done
5899 fi
5900
5901 }
5902
5903 echo "$as_me:5903: checking for $cf_ncuhdr_root header in include-path" >&5
5904 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5905 if test "${cf_cv_ncurses_h+set}" = set; then
5906   echo $ECHO_N "(cached) $ECHO_C" >&6
5907 else
5908
5909         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5910         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5911         for cf_header in $cf_header_list
5912         do
5913
5914         cat >conftest.$ac_ext <<_ACEOF
5915 #line 5915 "configure"
5916 #include "confdefs.h"
5917
5918 #include <$cf_header>
5919 int
5920 main ()
5921 {
5922
5923 #ifdef NCURSES_VERSION
5924
5925 printf("%s\n", NCURSES_VERSION);
5926 #else
5927 #ifdef __NCURSES_H
5928 printf("old\n");
5929 #else
5930         make an error
5931 #endif
5932 #endif
5933
5934   ;
5935   return 0;
5936 }
5937 _ACEOF
5938 rm -f conftest.$ac_objext
5939 if { (eval echo "$as_me:5939: \"$ac_compile\"") >&5
5940   (eval $ac_compile) 2>&5
5941   ac_status=$?
5942   echo "$as_me:5942: \$? = $ac_status" >&5
5943   (exit $ac_status); } &&
5944          { ac_try='test -s conftest.$ac_objext'
5945   { (eval echo "$as_me:5945: \"$ac_try\"") >&5
5946   (eval $ac_try) 2>&5
5947   ac_status=$?
5948   echo "$as_me:5948: \$? = $ac_status" >&5
5949   (exit $ac_status); }; }; then
5950   cf_cv_ncurses_h=$cf_header
5951
5952 else
5953   echo "$as_me: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5955 cf_cv_ncurses_h=no
5956 fi
5957 rm -f conftest.$ac_objext conftest.$ac_ext
5958
5959                 test "$cf_cv_ncurses_h" != no && break
5960         done
5961
5962 fi
5963 echo "$as_me:5963: result: $cf_cv_ncurses_h" >&5
5964 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5965
5966 if test "$cf_cv_ncurses_h" != no ; then
5967         cf_cv_ncurses_header=$cf_cv_ncurses_h
5968 else
5969
5970 echo "$as_me:5970: checking for $cf_ncuhdr_root include-path" >&5
5971 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5972 if test "${cf_cv_ncurses_h2+set}" = set; then
5973   echo $ECHO_N "(cached) $ECHO_C" >&6
5974 else
5975
5976         test -n "$verbose" && echo
5977
5978 cf_search=
5979
5980 # collect the current set of include-directories from compiler flags
5981 cf_header_path_list=""
5982 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5983         for cf_header_path in $CPPFLAGS $CFLAGS
5984         do
5985                 case $cf_header_path in #(vi
5986                 -I*)
5987                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5988
5989 test "$cf_header_path" != "NONE" && \
5990 test -d "$cf_header_path" && \
5991  {
5992         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
5993         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
5994         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5995         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5996         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5997         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"
5998 }
5999
6000                         cf_header_path_list="$cf_header_path_list $cf_search"
6001                         ;;
6002                 esac
6003         done
6004 fi
6005
6006 # add the variations for the package we are looking for
6007
6008 cf_search=
6009
6010 test "/usr" != "$prefix" && \
6011 test -d "/usr" && \
6012 (test $prefix = NONE || test -d $prefix) && {
6013         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6014         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6015         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6016         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6017         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6018         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6019 }
6020
6021 test "$prefix" != "NONE" && \
6022 test -d "$prefix" && \
6023  {
6024         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6025         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6026         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6027         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6028         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6029         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6030 }
6031
6032 test "/usr/local" != "$prefix" && \
6033 test -d "/usr/local" && \
6034 (test $prefix = NONE || test -d $prefix) && {
6035         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6036         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6037         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6038         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6039         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6040         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6041 }
6042
6043 test "/opt" != "$prefix" && \
6044 test -d "/opt" && \
6045 (test $prefix = NONE || test -d $prefix) && {
6046         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6047         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6048         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6049         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6050         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6051         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6052 }
6053
6054 test "$HOME" != "$prefix" && \
6055 test -d "$HOME" && \
6056 (test $prefix = NONE || test -d $prefix) && {
6057         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6058         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6059         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6060         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6061         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6062         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6063 }
6064
6065 test "$includedir" != NONE && \
6066 test "$includedir" != "/usr/include" && \
6067 test -d "$includedir" && {
6068         test -d $includedir &&    cf_search="$cf_search $includedir"
6069         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6070 }
6071
6072 test "$oldincludedir" != NONE && \
6073 test "$oldincludedir" != "/usr/include" && \
6074 test -d "$oldincludedir" && {
6075         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6076         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6077 }
6078
6079 cf_search="$cf_search $cf_header_path_list"
6080
6081         test -n "$verbose" && echo search path $cf_search
6082         cf_save2_CPPFLAGS="$CPPFLAGS"
6083         for cf_incdir in $cf_search
6084         do
6085
6086 if test -n "$cf_incdir" ; then
6087   for cf_add_incdir in $cf_incdir
6088   do
6089         while test $cf_add_incdir != /usr/include
6090         do
6091           if test -d $cf_add_incdir
6092           then
6093                 cf_have_incdir=no
6094                 if test -n "$CFLAGS$CPPFLAGS" ; then
6095                   # a loop is needed to ensure we can add subdirs of existing dirs
6096                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6097                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6098                           cf_have_incdir=yes; break
6099                         fi
6100                   done
6101                 fi
6102
6103                 if test "$cf_have_incdir" = no ; then
6104                   if test "$cf_add_incdir" = /usr/local/include ; then
6105                         if test "$GCC" = yes
6106                         then
6107                           cf_save_CPPFLAGS=$CPPFLAGS
6108                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6109                           cat >conftest.$ac_ext <<_ACEOF
6110 #line 6110 "configure"
6111 #include "confdefs.h"
6112 #include <stdio.h>
6113 int
6114 main ()
6115 {
6116 printf("Hello")
6117   ;
6118   return 0;
6119 }
6120 _ACEOF
6121 rm -f conftest.$ac_objext
6122 if { (eval echo "$as_me:6122: \"$ac_compile\"") >&5
6123   (eval $ac_compile) 2>&5
6124   ac_status=$?
6125   echo "$as_me:6125: \$? = $ac_status" >&5
6126   (exit $ac_status); } &&
6127          { ac_try='test -s conftest.$ac_objext'
6128   { (eval echo "$as_me:6128: \"$ac_try\"") >&5
6129   (eval $ac_try) 2>&5
6130   ac_status=$?
6131   echo "$as_me:6131: \$? = $ac_status" >&5
6132   (exit $ac_status); }; }; then
6133   :
6134 else
6135   echo "$as_me: failed program was:" >&5
6136 cat conftest.$ac_ext >&5
6137 cf_have_incdir=yes
6138 fi
6139 rm -f conftest.$ac_objext conftest.$ac_ext
6140                           CPPFLAGS=$cf_save_CPPFLAGS
6141                         fi
6142                   fi
6143                 fi
6144
6145                 if test "$cf_have_incdir" = no ; then
6146                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6147
6148 echo "${as_me-configure}:6148: testing adding $cf_add_incdir to include-path ..." 1>&5
6149
6150                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6151
6152                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6153                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6154                   cf_add_incdir="$cf_top_incdir"
6155                 else
6156                   break
6157                 fi
6158           fi
6159         done
6160   done
6161 fi
6162
6163                 for cf_header in \
6164                         ncurses.h \
6165                         curses.h
6166                 do
6167
6168         cat >conftest.$ac_ext <<_ACEOF
6169 #line 6169 "configure"
6170 #include "confdefs.h"
6171
6172 #include <$cf_header>
6173 int
6174 main ()
6175 {
6176
6177 #ifdef NCURSES_VERSION
6178
6179 printf("%s\n", NCURSES_VERSION);
6180 #else
6181 #ifdef __NCURSES_H
6182 printf("old\n");
6183 #else
6184         make an error
6185 #endif
6186 #endif
6187
6188   ;
6189   return 0;
6190 }
6191 _ACEOF
6192 rm -f conftest.$ac_objext
6193 if { (eval echo "$as_me:6193: \"$ac_compile\"") >&5
6194   (eval $ac_compile) 2>&5
6195   ac_status=$?
6196   echo "$as_me:6196: \$? = $ac_status" >&5
6197   (exit $ac_status); } &&
6198          { ac_try='test -s conftest.$ac_objext'
6199   { (eval echo "$as_me:6199: \"$ac_try\"") >&5
6200   (eval $ac_try) 2>&5
6201   ac_status=$?
6202   echo "$as_me:6202: \$? = $ac_status" >&5
6203   (exit $ac_status); }; }; then
6204   cf_cv_ncurses_h2=$cf_header
6205
6206 else
6207   echo "$as_me: failed program was:" >&5
6208 cat conftest.$ac_ext >&5
6209 cf_cv_ncurses_h2=no
6210 fi
6211 rm -f conftest.$ac_objext conftest.$ac_ext
6212
6213                         if test "$cf_cv_ncurses_h2" != no ; then
6214                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6215                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6216                                 break
6217                         fi
6218                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6219                 done
6220                 CPPFLAGS="$cf_save2_CPPFLAGS"
6221                 test "$cf_cv_ncurses_h2" != no && break
6222         done
6223         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6223: error: not found" >&5
6224 echo "$as_me: error: not found" >&2;}
6225    { (exit 1); exit 1; }; }
6226
6227 fi
6228 echo "$as_me:6228: result: $cf_cv_ncurses_h2" >&5
6229 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6230
6231         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6232         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6233         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6234                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6235         fi
6236
6237 if test -n "$cf_1st_incdir" ; then
6238   for cf_add_incdir in $cf_1st_incdir
6239   do
6240         while test $cf_add_incdir != /usr/include
6241         do
6242           if test -d $cf_add_incdir
6243           then
6244                 cf_have_incdir=no
6245                 if test -n "$CFLAGS$CPPFLAGS" ; then
6246                   # a loop is needed to ensure we can add subdirs of existing dirs
6247                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6248                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6249                           cf_have_incdir=yes; break
6250                         fi
6251                   done
6252                 fi
6253
6254                 if test "$cf_have_incdir" = no ; then
6255                   if test "$cf_add_incdir" = /usr/local/include ; then
6256                         if test "$GCC" = yes
6257                         then
6258                           cf_save_CPPFLAGS=$CPPFLAGS
6259                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6260                           cat >conftest.$ac_ext <<_ACEOF
6261 #line 6261 "configure"
6262 #include "confdefs.h"
6263 #include <stdio.h>
6264 int
6265 main ()
6266 {
6267 printf("Hello")
6268   ;
6269   return 0;
6270 }
6271 _ACEOF
6272 rm -f conftest.$ac_objext
6273 if { (eval echo "$as_me:6273: \"$ac_compile\"") >&5
6274   (eval $ac_compile) 2>&5
6275   ac_status=$?
6276   echo "$as_me:6276: \$? = $ac_status" >&5
6277   (exit $ac_status); } &&
6278          { ac_try='test -s conftest.$ac_objext'
6279   { (eval echo "$as_me:6279: \"$ac_try\"") >&5
6280   (eval $ac_try) 2>&5
6281   ac_status=$?
6282   echo "$as_me:6282: \$? = $ac_status" >&5
6283   (exit $ac_status); }; }; then
6284   :
6285 else
6286   echo "$as_me: failed program was:" >&5
6287 cat conftest.$ac_ext >&5
6288 cf_have_incdir=yes
6289 fi
6290 rm -f conftest.$ac_objext conftest.$ac_ext
6291                           CPPFLAGS=$cf_save_CPPFLAGS
6292                         fi
6293                   fi
6294                 fi
6295
6296                 if test "$cf_have_incdir" = no ; then
6297                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6298
6299 echo "${as_me-configure}:6299: testing adding $cf_add_incdir to include-path ..." 1>&5
6300
6301                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6302
6303                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6304                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6305                   cf_add_incdir="$cf_top_incdir"
6306                 else
6307                   break
6308                 fi
6309           fi
6310         done
6311   done
6312 fi
6313
6314 fi
6315
6316 # Set definitions to allow ifdef'ing for ncurses.h
6317
6318 case $cf_cv_ncurses_header in # (vi
6319 *ncurses.h)
6320         cat >>confdefs.h <<\EOF
6321 #define HAVE_NCURSES_H 1
6322 EOF
6323
6324         ;;
6325 esac
6326
6327 case $cf_cv_ncurses_header in # (vi
6328 ncurses/curses.h|ncurses/ncurses.h)
6329         cat >>confdefs.h <<\EOF
6330 #define HAVE_NCURSES_NCURSES_H 1
6331 EOF
6332
6333         ;;
6334 ncursesw/curses.h|ncursesw/ncurses.h)
6335         cat >>confdefs.h <<\EOF
6336 #define HAVE_NCURSESW_NCURSES_H 1
6337 EOF
6338
6339         ;;
6340 esac
6341
6342 echo "$as_me:6342: checking for terminfo header" >&5
6343 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6344 if test "${cf_cv_term_header+set}" = set; then
6345   echo $ECHO_N "(cached) $ECHO_C" >&6
6346 else
6347
6348 case ${cf_cv_ncurses_header} in #(vi
6349 */ncurses.h|*/ncursesw.h) #(vi
6350         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6351         ;;
6352 *)
6353         cf_term_header=term.h
6354         ;;
6355 esac
6356
6357 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6358 do
6359 cat >conftest.$ac_ext <<_ACEOF
6360 #line 6360 "configure"
6361 #include "confdefs.h"
6362 #include <stdio.h>
6363 #include <${cf_cv_ncurses_header-curses.h}>
6364 #include <$cf_test>
6365
6366 int
6367 main ()
6368 {
6369 int x = auto_left_margin
6370   ;
6371   return 0;
6372 }
6373 _ACEOF
6374 rm -f conftest.$ac_objext
6375 if { (eval echo "$as_me:6375: \"$ac_compile\"") >&5
6376   (eval $ac_compile) 2>&5
6377   ac_status=$?
6378   echo "$as_me:6378: \$? = $ac_status" >&5
6379   (exit $ac_status); } &&
6380          { ac_try='test -s conftest.$ac_objext'
6381   { (eval echo "$as_me:6381: \"$ac_try\"") >&5
6382   (eval $ac_try) 2>&5
6383   ac_status=$?
6384   echo "$as_me:6384: \$? = $ac_status" >&5
6385   (exit $ac_status); }; }; then
6386
6387         cf_cv_term_header="$cf_test"
6388 else
6389   echo "$as_me: failed program was:" >&5
6390 cat conftest.$ac_ext >&5
6391
6392         cf_cv_term_header=unknown
6393
6394 fi
6395 rm -f conftest.$ac_objext conftest.$ac_ext
6396         test "$cf_cv_term_header" != unknown && break
6397 done
6398
6399 fi
6400 echo "$as_me:6400: result: $cf_cv_term_header" >&5
6401 echo "${ECHO_T}$cf_cv_term_header" >&6
6402
6403 # Set definitions to allow ifdef'ing to accommodate subdirectories
6404
6405 case $cf_cv_term_header in # (vi
6406 *term.h)
6407         cat >>confdefs.h <<\EOF
6408 #define HAVE_TERM_H 1
6409 EOF
6410
6411         ;;
6412 esac
6413
6414 case $cf_cv_term_header in # (vi
6415 ncurses/term.h) #(vi
6416         cat >>confdefs.h <<\EOF
6417 #define HAVE_NCURSES_TERM_H 1
6418 EOF
6419
6420         ;;
6421 ncursesw/term.h)
6422         cat >>confdefs.h <<\EOF
6423 #define HAVE_NCURSESW_TERM_H 1
6424 EOF
6425
6426         ;;
6427 esac
6428
6429 # some applications need this, but should check for NCURSES_VERSION
6430 cat >>confdefs.h <<\EOF
6431 #define NCURSES 1
6432 EOF
6433
6434 echo "$as_me:6434: checking for ncurses version" >&5
6435 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6436 if test "${cf_cv_ncurses_version+set}" = set; then
6437   echo $ECHO_N "(cached) $ECHO_C" >&6
6438 else
6439
6440         cf_cv_ncurses_version=no
6441         cf_tempfile=out$$
6442         rm -f $cf_tempfile
6443         if test "$cross_compiling" = yes; then
6444
6445         # This will not work if the preprocessor splits the line after the
6446         # Autoconf token.  The 'unproto' program does that.
6447         cat > conftest.$ac_ext <<EOF
6448 #include <${cf_cv_ncurses_header-curses.h}>
6449 #undef Autoconf
6450 #ifdef NCURSES_VERSION
6451 Autoconf NCURSES_VERSION
6452 #else
6453 #ifdef __NCURSES_H
6454 Autoconf "old"
6455 #endif
6456 ;
6457 #endif
6458 EOF
6459         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6460         { (eval echo "$as_me:6460: \"$cf_try\"") >&5
6461   (eval $cf_try) 2>&5
6462   ac_status=$?
6463   echo "$as_me:6463: \$? = $ac_status" >&5
6464   (exit $ac_status); }
6465         if test -f conftest.out ; then
6466                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6467                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6468                 rm -f conftest.out
6469         fi
6470
6471 else
6472   cat >conftest.$ac_ext <<_ACEOF
6473 #line 6473 "configure"
6474 #include "confdefs.h"
6475
6476 #include <${cf_cv_ncurses_header-curses.h}>
6477 #include <stdio.h>
6478 int main()
6479 {
6480         FILE *fp = fopen("$cf_tempfile", "w");
6481 #ifdef NCURSES_VERSION
6482 # ifdef NCURSES_VERSION_PATCH
6483         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6484 # else
6485         fprintf(fp, "%s\n", NCURSES_VERSION);
6486 # endif
6487 #else
6488 # ifdef __NCURSES_H
6489         fprintf(fp, "old\n");
6490 # else
6491         make an error
6492 # endif
6493 #endif
6494         ${cf_cv_main_return-return}(0);
6495 }
6496 _ACEOF
6497 rm -f conftest$ac_exeext
6498 if { (eval echo "$as_me:6498: \"$ac_link\"") >&5
6499   (eval $ac_link) 2>&5
6500   ac_status=$?
6501   echo "$as_me:6501: \$? = $ac_status" >&5
6502   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6503   { (eval echo "$as_me:6503: \"$ac_try\"") >&5
6504   (eval $ac_try) 2>&5
6505   ac_status=$?
6506   echo "$as_me:6506: \$? = $ac_status" >&5
6507   (exit $ac_status); }; }; then
6508
6509         cf_cv_ncurses_version=`cat $cf_tempfile`
6510 else
6511   echo "$as_me: program exited with status $ac_status" >&5
6512 echo "$as_me: failed program was:" >&5
6513 cat conftest.$ac_ext >&5
6514 fi
6515 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6516 fi
6517         rm -f $cf_tempfile
6518
6519 fi
6520 echo "$as_me:6520: result: $cf_cv_ncurses_version" >&5
6521 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6522 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6523 #define NCURSES 1
6524 EOF
6525
6526 cf_nculib_root=ncurses
6527         # This works, except for the special case where we find gpm, but
6528         # ncurses is in a nonstandard location via $LIBS, and we really want
6529         # to link gpm.
6530 cf_ncurses_LIBS=""
6531 cf_ncurses_SAVE="$LIBS"
6532 echo "$as_me:6532: checking for Gpm_Open in -lgpm" >&5
6533 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6534 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6535   echo $ECHO_N "(cached) $ECHO_C" >&6
6536 else
6537   ac_check_lib_save_LIBS=$LIBS
6538 LIBS="-lgpm  $LIBS"
6539 cat >conftest.$ac_ext <<_ACEOF
6540 #line 6540 "configure"
6541 #include "confdefs.h"
6542
6543 /* Override any gcc2 internal prototype to avoid an error.  */
6544 #ifdef __cplusplus
6545 extern "C"
6546 #endif
6547 /* We use char because int might match the return type of a gcc2
6548    builtin and then its argument prototype would still apply.  */
6549 char Gpm_Open ();
6550 int
6551 main ()
6552 {
6553 Gpm_Open ();
6554   ;
6555   return 0;
6556 }
6557 _ACEOF
6558 rm -f conftest.$ac_objext conftest$ac_exeext
6559 if { (eval echo "$as_me:6559: \"$ac_link\"") >&5
6560   (eval $ac_link) 2>&5
6561   ac_status=$?
6562   echo "$as_me:6562: \$? = $ac_status" >&5
6563   (exit $ac_status); } &&
6564          { ac_try='test -s conftest$ac_exeext'
6565   { (eval echo "$as_me:6565: \"$ac_try\"") >&5
6566   (eval $ac_try) 2>&5
6567   ac_status=$?
6568   echo "$as_me:6568: \$? = $ac_status" >&5
6569   (exit $ac_status); }; }; then
6570   ac_cv_lib_gpm_Gpm_Open=yes
6571 else
6572   echo "$as_me: failed program was:" >&5
6573 cat conftest.$ac_ext >&5
6574 ac_cv_lib_gpm_Gpm_Open=no
6575 fi
6576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6577 LIBS=$ac_check_lib_save_LIBS
6578 fi
6579 echo "$as_me:6579: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6580 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6581 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6582   echo "$as_me:6582: checking for initscr in -lgpm" >&5
6583 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6584 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6585   echo $ECHO_N "(cached) $ECHO_C" >&6
6586 else
6587   ac_check_lib_save_LIBS=$LIBS
6588 LIBS="-lgpm  $LIBS"
6589 cat >conftest.$ac_ext <<_ACEOF
6590 #line 6590 "configure"
6591 #include "confdefs.h"
6592
6593 /* Override any gcc2 internal prototype to avoid an error.  */
6594 #ifdef __cplusplus
6595 extern "C"
6596 #endif
6597 /* We use char because int might match the return type of a gcc2
6598    builtin and then its argument prototype would still apply.  */
6599 char initscr ();
6600 int
6601 main ()
6602 {
6603 initscr ();
6604   ;
6605   return 0;
6606 }
6607 _ACEOF
6608 rm -f conftest.$ac_objext conftest$ac_exeext
6609 if { (eval echo "$as_me:6609: \"$ac_link\"") >&5
6610   (eval $ac_link) 2>&5
6611   ac_status=$?
6612   echo "$as_me:6612: \$? = $ac_status" >&5
6613   (exit $ac_status); } &&
6614          { ac_try='test -s conftest$ac_exeext'
6615   { (eval echo "$as_me:6615: \"$ac_try\"") >&5
6616   (eval $ac_try) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit $ac_status); }; }; then
6620   ac_cv_lib_gpm_initscr=yes
6621 else
6622   echo "$as_me: failed program was:" >&5
6623 cat conftest.$ac_ext >&5
6624 ac_cv_lib_gpm_initscr=no
6625 fi
6626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6627 LIBS=$ac_check_lib_save_LIBS
6628 fi
6629 echo "$as_me:6629: result: $ac_cv_lib_gpm_initscr" >&5
6630 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6631 if test $ac_cv_lib_gpm_initscr = yes; then
6632   LIBS="$cf_ncurses_SAVE"
6633 else
6634   cf_ncurses_LIBS="-lgpm"
6635 fi
6636
6637 fi
6638
6639 case $host_os in #(vi
6640 freebsd*)
6641         # This is only necessary if you are linking against an obsolete
6642         # version of ncurses (but it should do no harm, since it's static).
6643         if test "$cf_nculib_root" = ncurses ; then
6644                 echo "$as_me:6644: checking for tgoto in -lmytinfo" >&5
6645 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6646 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6647   echo $ECHO_N "(cached) $ECHO_C" >&6
6648 else
6649   ac_check_lib_save_LIBS=$LIBS
6650 LIBS="-lmytinfo  $LIBS"
6651 cat >conftest.$ac_ext <<_ACEOF
6652 #line 6652 "configure"
6653 #include "confdefs.h"
6654
6655 /* Override any gcc2 internal prototype to avoid an error.  */
6656 #ifdef __cplusplus
6657 extern "C"
6658 #endif
6659 /* We use char because int might match the return type of a gcc2
6660    builtin and then its argument prototype would still apply.  */
6661 char tgoto ();
6662 int
6663 main ()
6664 {
6665 tgoto ();
6666   ;
6667   return 0;
6668 }
6669 _ACEOF
6670 rm -f conftest.$ac_objext conftest$ac_exeext
6671 if { (eval echo "$as_me:6671: \"$ac_link\"") >&5
6672   (eval $ac_link) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit $ac_status); } &&
6676          { ac_try='test -s conftest$ac_exeext'
6677   { (eval echo "$as_me:6677: \"$ac_try\"") >&5
6678   (eval $ac_try) 2>&5
6679   ac_status=$?
6680   echo "$as_me:6680: \$? = $ac_status" >&5
6681   (exit $ac_status); }; }; then
6682   ac_cv_lib_mytinfo_tgoto=yes
6683 else
6684   echo "$as_me: failed program was:" >&5
6685 cat conftest.$ac_ext >&5
6686 ac_cv_lib_mytinfo_tgoto=no
6687 fi
6688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6689 LIBS=$ac_check_lib_save_LIBS
6690 fi
6691 echo "$as_me:6691: result: $ac_cv_lib_mytinfo_tgoto" >&5
6692 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6693 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6694   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6695 fi
6696
6697         fi
6698         ;;
6699 esac
6700
6701 LIBS="$cf_ncurses_LIBS $LIBS"
6702
6703 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6704 then
6705
6706 if test -n "$cf_cv_curses_dir/lib" ; then
6707   for cf_add_libdir in $cf_cv_curses_dir/lib
6708   do
6709     if test $cf_add_libdir = /usr/lib ; then
6710       :
6711     elif test -d $cf_add_libdir
6712     then
6713       cf_have_libdir=no
6714       if test -n "$LDFLAGS$LIBS" ; then
6715         # a loop is needed to ensure we can add subdirs of existing dirs
6716         for cf_test_libdir in $LDFLAGS $LIBS ; do
6717           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6718             cf_have_libdir=yes; break
6719           fi
6720         done
6721       fi
6722       if test "$cf_have_libdir" = no ; then
6723         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6724
6725 echo "${as_me-configure}:6725: testing adding $cf_add_libdir to library-path ..." 1>&5
6726
6727         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6728       fi
6729     fi
6730   done
6731 fi
6732
6733         LIBS="-l$cf_nculib_root $LIBS"
6734 else
6735
6736         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6737         cf_libdir=""
6738         echo "$as_me:6738: checking for initscr" >&5
6739 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6740 if test "${ac_cv_func_initscr+set}" = set; then
6741   echo $ECHO_N "(cached) $ECHO_C" >&6
6742 else
6743   cat >conftest.$ac_ext <<_ACEOF
6744 #line 6744 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747     which can conflict with char initscr (); below.  */
6748 #include <assert.h>
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 #ifdef __cplusplus
6751 extern "C"
6752 #endif
6753 /* We use char because int might match the return type of a gcc2
6754    builtin and then its argument prototype would still apply.  */
6755 char initscr ();
6756 char (*f) ();
6757
6758 int
6759 main ()
6760 {
6761 /* The GNU C library defines this for functions which it implements
6762     to always fail with ENOSYS.  Some functions are actually named
6763     something starting with __ and the normal name is an alias.  */
6764 #if defined (__stub_initscr) || defined (__stub___initscr)
6765 choke me
6766 #else
6767 f = initscr;
6768 #endif
6769
6770   ;
6771   return 0;
6772 }
6773 _ACEOF
6774 rm -f conftest.$ac_objext conftest$ac_exeext
6775 if { (eval echo "$as_me:6775: \"$ac_link\"") >&5
6776   (eval $ac_link) 2>&5
6777   ac_status=$?
6778   echo "$as_me:6778: \$? = $ac_status" >&5
6779   (exit $ac_status); } &&
6780          { ac_try='test -s conftest$ac_exeext'
6781   { (eval echo "$as_me:6781: \"$ac_try\"") >&5
6782   (eval $ac_try) 2>&5
6783   ac_status=$?
6784   echo "$as_me:6784: \$? = $ac_status" >&5
6785   (exit $ac_status); }; }; then
6786   ac_cv_func_initscr=yes
6787 else
6788   echo "$as_me: failed program was:" >&5
6789 cat conftest.$ac_ext >&5
6790 ac_cv_func_initscr=no
6791 fi
6792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6793 fi
6794 echo "$as_me:6794: result: $ac_cv_func_initscr" >&5
6795 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6796 if test $ac_cv_func_initscr = yes; then
6797   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6798 else
6799
6800                 cf_save_LIBS="$LIBS"
6801                 echo "$as_me:6801: checking for initscr in -l$cf_nculib_root" >&5
6802 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6803                 LIBS="-l$cf_nculib_root $LIBS"
6804                 cat >conftest.$ac_ext <<_ACEOF
6805 #line 6805 "configure"
6806 #include "confdefs.h"
6807 #include <${cf_cv_ncurses_header-curses.h}>
6808 int
6809 main ()
6810 {
6811 initscr()
6812   ;
6813   return 0;
6814 }
6815 _ACEOF
6816 rm -f conftest.$ac_objext conftest$ac_exeext
6817 if { (eval echo "$as_me:6817: \"$ac_link\"") >&5
6818   (eval $ac_link) 2>&5
6819   ac_status=$?
6820   echo "$as_me:6820: \$? = $ac_status" >&5
6821   (exit $ac_status); } &&
6822          { ac_try='test -s conftest$ac_exeext'
6823   { (eval echo "$as_me:6823: \"$ac_try\"") >&5
6824   (eval $ac_try) 2>&5
6825   ac_status=$?
6826   echo "$as_me:6826: \$? = $ac_status" >&5
6827   (exit $ac_status); }; }; then
6828   echo "$as_me:6828: result: yes" >&5
6829 echo "${ECHO_T}yes" >&6
6830                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6831
6832 else
6833   echo "$as_me: failed program was:" >&5
6834 cat conftest.$ac_ext >&5
6835 echo "$as_me:6835: result: no" >&5
6836 echo "${ECHO_T}no" >&6
6837
6838 cf_search=
6839 cf_library_path_list=""
6840 if test -n "${LDFLAGS}${LIBS}" ; then
6841         for cf_library_path in $LDFLAGS $LIBS
6842         do
6843                 case $cf_library_path in #(vi
6844                 -L*)
6845                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6846
6847 test "$cf_library_path" != "NONE" && \
6848 test -d "$cf_library_path" && \
6849  {
6850         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6851         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6852         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6853         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6854         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6855         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"
6856 }
6857
6858                         cf_library_path_list="$cf_library_path_list $cf_search"
6859                         ;;
6860                 esac
6861         done
6862 fi
6863
6864 cf_search=
6865
6866 test "/usr" != "$prefix" && \
6867 test -d "/usr" && \
6868 (test $prefix = NONE || test -d $prefix) && {
6869         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6870         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6871         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6872         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6873         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6874         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6875 }
6876
6877 test "$prefix" != "NONE" && \
6878 test -d "$prefix" && \
6879  {
6880         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6881         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6882         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6883         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6884         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6885         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6886 }
6887
6888 test "/usr/local" != "$prefix" && \
6889 test -d "/usr/local" && \
6890 (test $prefix = NONE || test -d $prefix) && {
6891         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6892         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6893         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6894         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6895         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6896         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6897 }
6898
6899 test "/opt" != "$prefix" && \
6900 test -d "/opt" && \
6901 (test $prefix = NONE || test -d $prefix) && {
6902         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6903         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6904         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6905         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6906         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
6907         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6908 }
6909
6910 test "$HOME" != "$prefix" && \
6911 test -d "$HOME" && \
6912 (test $prefix = NONE || test -d $prefix) && {
6913         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6914         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6915         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6916         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6917         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6918         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6919 }
6920
6921 cf_search="$cf_library_path_list $cf_search"
6922
6923                         for cf_libdir in $cf_search
6924                         do
6925                                 echo "$as_me:6925: checking for -l$cf_nculib_root in $cf_libdir" >&5
6926 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6927                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6928                                 cat >conftest.$ac_ext <<_ACEOF
6929 #line 6929 "configure"
6930 #include "confdefs.h"
6931 #include <${cf_cv_ncurses_header-curses.h}>
6932 int
6933 main ()
6934 {
6935 initscr()
6936   ;
6937   return 0;
6938 }
6939 _ACEOF
6940 rm -f conftest.$ac_objext conftest$ac_exeext
6941 if { (eval echo "$as_me:6941: \"$ac_link\"") >&5
6942   (eval $ac_link) 2>&5
6943   ac_status=$?
6944   echo "$as_me:6944: \$? = $ac_status" >&5
6945   (exit $ac_status); } &&
6946          { ac_try='test -s conftest$ac_exeext'
6947   { (eval echo "$as_me:6947: \"$ac_try\"") >&5
6948   (eval $ac_try) 2>&5
6949   ac_status=$?
6950   echo "$as_me:6950: \$? = $ac_status" >&5
6951   (exit $ac_status); }; }; then
6952   echo "$as_me:6952: result: yes" >&5
6953 echo "${ECHO_T}yes" >&6
6954                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6955                                          break
6956 else
6957   echo "$as_me: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6959 echo "$as_me:6959: result: no" >&5
6960 echo "${ECHO_T}no" >&6
6961                                          LIBS="$cf_save_LIBS"
6962 fi
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964                         done
6965
6966 fi
6967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6968
6969 fi
6970
6971 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6972
6973 if test $cf_found_library = no ; then
6974         { { echo "$as_me:6974: error: Cannot link $cf_nculib_root library" >&5
6975 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6976    { (exit 1); exit 1; }; }
6977 fi
6978
6979 fi
6980
6981 if test -n "$cf_ncurses_LIBS" ; then
6982         echo "$as_me:6982: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6983 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6984         cf_ncurses_SAVE="$LIBS"
6985         for p in $cf_ncurses_LIBS ; do
6986                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6987                 if test "$q" != "$LIBS" ; then
6988                         LIBS="$q"
6989                 fi
6990         done
6991         cat >conftest.$ac_ext <<_ACEOF
6992 #line 6992 "configure"
6993 #include "confdefs.h"
6994 #include <${cf_cv_ncurses_header-curses.h}>
6995 int
6996 main ()
6997 {
6998 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6999   ;
7000   return 0;
7001 }
7002 _ACEOF
7003 rm -f conftest.$ac_objext conftest$ac_exeext
7004 if { (eval echo "$as_me:7004: \"$ac_link\"") >&5
7005   (eval $ac_link) 2>&5
7006   ac_status=$?
7007   echo "$as_me:7007: \$? = $ac_status" >&5
7008   (exit $ac_status); } &&
7009          { ac_try='test -s conftest$ac_exeext'
7010   { (eval echo "$as_me:7010: \"$ac_try\"") >&5
7011   (eval $ac_try) 2>&5
7012   ac_status=$?
7013   echo "$as_me:7013: \$? = $ac_status" >&5
7014   (exit $ac_status); }; }; then
7015   echo "$as_me:7015: result: yes" >&5
7016 echo "${ECHO_T}yes" >&6
7017 else
7018   echo "$as_me: failed program was:" >&5
7019 cat conftest.$ac_ext >&5
7020 echo "$as_me:7020: result: no" >&5
7021 echo "${ECHO_T}no" >&6
7022                  LIBS="$cf_ncurses_SAVE"
7023 fi
7024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7025 fi
7026
7027 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7028
7029 cat >>confdefs.h <<EOF
7030 #define $cf_nculib_ROOT 1
7031 EOF
7032
7033 fi
7034
7035 fi
7036
7037 if test "$NCURSES_CONFIG" != none ; then
7038
7039 cf_version=`$NCURSES_CONFIG --version`
7040
7041 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
7042 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9]\+\.//' -e 's/\..*//'`
7043 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9]\+\.[0-9]\+\.//'`
7044
7045 # ABI version is not available from headers
7046 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version`
7047
7048 else
7049
7050 for cf_name in MAJOR MINOR PATCH
7051 do
7052 cat >conftest.$ac_ext <<CF_EOF
7053 #include <${cf_cv_ncurses_header-curses.h}>
7054 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
7055 CF_EOF
7056         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
7057         { (eval echo "$as_me:7057: \"$cf_try\"") >&5
7058   (eval $cf_try) 2>&5
7059   ac_status=$?
7060   echo "$as_me:7060: \$? = $ac_status" >&5
7061   (exit $ac_status); }
7062         if test -f conftest.out ; then
7063                 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[   ]\+//"`
7064                 eval NCURSES_$cf_name=$cf_result
7065                 cat conftest.$ac_ext
7066                 cat conftest.out
7067         fi
7068 done
7069
7070 cf_cv_abi_version=${NCURSES_MAJOR}
7071
7072 fi
7073
7074 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
7075
7076 cf_cv_timestamp=`date`
7077
7078 echo "$as_me:7078: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
7079 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
7080
7081         case $cf_cv_system_name in #(vi
7082         OS/2*|os2*) #(vi
7083         LIB_PREFIX=''
7084         ;;
7085         *)      LIB_PREFIX='lib'
7086         ;;
7087         esac
7088 cf_prefix=$LIB_PREFIX
7089
7090 LIB_PREFIX=$cf_prefix
7091
7092 LIB_SUFFIX=
7093
7094 ###############################################################################
7095
7096 if test X"$CC_G_OPT" = X"" ; then
7097         CC_G_OPT='-g'
7098         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
7099 fi
7100
7101 echo "$as_me:7101: checking for default loader flags" >&5
7102 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
7103 case $DFT_LWR_MODEL in
7104 normal)  LD_MODEL=''   ;;
7105 debug)   LD_MODEL=$CC_G_OPT ;;
7106 profile) LD_MODEL='-pg';;
7107 shared)  LD_MODEL=''   ;;
7108 esac
7109 echo "$as_me:7109: result: $LD_MODEL" >&5
7110 echo "${ECHO_T}$LD_MODEL" >&6
7111
7112 LD_RPATH_OPT=
7113 echo "$as_me:7113: checking for an rpath option" >&5
7114 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
7115 case $cf_cv_system_name in #(vi
7116 irix*) #(vi
7117         if test "$GCC" = yes; then
7118                 LD_RPATH_OPT="-Wl,-rpath,"
7119         else
7120                 LD_RPATH_OPT="-rpath "
7121         fi
7122         ;;
7123 linux*|gnu*|k*bsd*-gnu) #(vi
7124         LD_RPATH_OPT="-Wl,-rpath,"
7125         ;;
7126 openbsd[2-9].*) #(vi
7127         LD_RPATH_OPT="-Wl,-rpath,"
7128         ;;
7129 freebsd*) #(vi
7130         LD_RPATH_OPT="-rpath "
7131         ;;
7132 netbsd*) #(vi
7133         LD_RPATH_OPT="-Wl,-rpath,"
7134         ;;
7135 osf*|mls+*) #(vi
7136         LD_RPATH_OPT="-rpath "
7137         ;;
7138 solaris2*) #(vi
7139         LD_RPATH_OPT="-R"
7140         ;;
7141 *)
7142         ;;
7143 esac
7144 echo "$as_me:7144: result: $LD_RPATH_OPT" >&5
7145 echo "${ECHO_T}$LD_RPATH_OPT" >&6
7146
7147 case "x$LD_RPATH_OPT" in #(vi
7148 x-R*)
7149         echo "$as_me:7149: checking if we need a space after rpath option" >&5
7150 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
7151         cf_save_LIBS="$LIBS"
7152         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
7153         cat >conftest.$ac_ext <<_ACEOF
7154 #line 7154 "configure"
7155 #include "confdefs.h"
7156
7157 int
7158 main ()
7159 {
7160
7161   ;
7162   return 0;
7163 }
7164 _ACEOF
7165 rm -f conftest.$ac_objext conftest$ac_exeext
7166 if { (eval echo "$as_me:7166: \"$ac_link\"") >&5
7167   (eval $ac_link) 2>&5
7168   ac_status=$?
7169   echo "$as_me:7169: \$? = $ac_status" >&5
7170   (exit $ac_status); } &&
7171          { ac_try='test -s conftest$ac_exeext'
7172   { (eval echo "$as_me:7172: \"$ac_try\"") >&5
7173   (eval $ac_try) 2>&5
7174   ac_status=$?
7175   echo "$as_me:7175: \$? = $ac_status" >&5
7176   (exit $ac_status); }; }; then
7177   cf_rpath_space=no
7178 else
7179   echo "$as_me: failed program was:" >&5
7180 cat conftest.$ac_ext >&5
7181 cf_rpath_space=yes
7182 fi
7183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7184         LIBS="$cf_save_LIBS"
7185         echo "$as_me:7185: result: $cf_rpath_space" >&5
7186 echo "${ECHO_T}$cf_rpath_space" >&6
7187         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
7188         ;;
7189 esac
7190
7191         LOCAL_LDFLAGS=
7192         LOCAL_LDFLAGS2=
7193         LD_SHARED_OPTS=
7194         INSTALL_LIB="-m 644"
7195
7196         cf_cv_do_symlinks=no
7197         cf_ld_rpath_opt=
7198         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
7199
7200         echo "$as_me:7200: checking if release/abi version should be used for shared libs" >&5
7201 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
7202
7203 # Check whether --with-shlib-version or --without-shlib-version was given.
7204 if test "${with_shlib_version+set}" = set; then
7205   withval="$with_shlib_version"
7206   test -z "$withval" && withval=auto
7207         case $withval in #(vi
7208         yes) #(vi
7209                 cf_cv_shlib_version=auto
7210                 ;;
7211         rel|abi|auto|no) #(vi
7212                 cf_cv_shlib_version=$withval
7213                 ;;
7214         *)
7215                 { { echo "$as_me:7215: error: option value must be one of: rel, abi, auto or no" >&5
7216 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
7217    { (exit 1); exit 1; }; }
7218                 ;;
7219         esac
7220
7221 else
7222   cf_cv_shlib_version=auto
7223 fi;
7224         echo "$as_me:7224: result: $cf_cv_shlib_version" >&5
7225 echo "${ECHO_T}$cf_cv_shlib_version" >&6
7226
7227         cf_cv_rm_so_locs=no
7228
7229         # Some less-capable ports of gcc support only -fpic
7230         CC_SHARED_OPTS=
7231         if test "$GCC" = yes
7232         then
7233                 echo "$as_me:7233: checking which $CC option to use" >&5
7234 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
7235                 cf_save_CFLAGS="$CFLAGS"
7236                 for CC_SHARED_OPTS in -fPIC -fpic ''
7237                 do
7238                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
7239                         cat >conftest.$ac_ext <<_ACEOF
7240 #line 7240 "configure"
7241 #include "confdefs.h"
7242 #include <stdio.h>
7243 int
7244 main ()
7245 {
7246 int x = 1
7247   ;
7248   return 0;
7249 }
7250 _ACEOF
7251 rm -f conftest.$ac_objext
7252 if { (eval echo "$as_me:7252: \"$ac_compile\"") >&5
7253   (eval $ac_compile) 2>&5
7254   ac_status=$?
7255   echo "$as_me:7255: \$? = $ac_status" >&5
7256   (exit $ac_status); } &&
7257          { ac_try='test -s conftest.$ac_objext'
7258   { (eval echo "$as_me:7258: \"$ac_try\"") >&5
7259   (eval $ac_try) 2>&5
7260   ac_status=$?
7261   echo "$as_me:7261: \$? = $ac_status" >&5
7262   (exit $ac_status); }; }; then
7263   break
7264 else
7265   echo "$as_me: failed program was:" >&5
7266 cat conftest.$ac_ext >&5
7267 fi
7268 rm -f conftest.$ac_objext conftest.$ac_ext
7269                 done
7270                 echo "$as_me:7270: result: $CC_SHARED_OPTS" >&5
7271 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
7272                 CFLAGS="$cf_save_CFLAGS"
7273         fi
7274
7275         cf_cv_shlib_version_infix=no
7276
7277         case $cf_cv_system_name in #(vi
7278         aix[56]*) #(vi
7279                 if test "$GCC" = yes; then
7280                         CC_SHARED_OPTS=
7281                         MK_SHARED_LIB='$(CC) -shared'
7282                 fi
7283                 ;;
7284         beos*) #(vi
7285                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
7286                 ;;
7287         cygwin*) #(vi
7288                 CC_SHARED_OPTS=
7289                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7290                 cf_cv_shlib_version=cygdll
7291                 cf_cv_shlib_version_infix=cygdll
7292                 cat >mk_shared_lib.sh <<-CF_EOF
7293                 #!/bin/sh
7294                 SHARED_LIB=\$1
7295                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
7296                 shift
7297                 cat <<-EOF
7298                 Linking shared library
7299                 ** SHARED_LIB \$SHARED_LIB
7300                 ** IMPORT_LIB \$IMPORT_LIB
7301 EOF
7302                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
7303 CF_EOF
7304                 chmod +x mk_shared_lib.sh
7305                 ;;
7306         darwin*) #(vi
7307                 EXTRA_CFLAGS="-no-cpp-precomp"
7308                 CC_SHARED_OPTS="-dynamic"
7309                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
7310                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
7311                 cf_cv_shlib_version_infix=yes
7312                 echo "$as_me:7312: checking if ld -search_paths_first works" >&5
7313 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7314 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7315   echo $ECHO_N "(cached) $ECHO_C" >&6
7316 else
7317
7318                         cf_save_LDFLAGS=$LDFLAGS
7319                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7320                         cat >conftest.$ac_ext <<_ACEOF
7321 #line 7321 "configure"
7322 #include "confdefs.h"
7323
7324 int
7325 main ()
7326 {
7327 int i;
7328   ;
7329   return 0;
7330 }
7331 _ACEOF
7332 rm -f conftest.$ac_objext conftest$ac_exeext
7333 if { (eval echo "$as_me:7333: \"$ac_link\"") >&5
7334   (eval $ac_link) 2>&5
7335   ac_status=$?
7336   echo "$as_me:7336: \$? = $ac_status" >&5
7337   (exit $ac_status); } &&
7338          { ac_try='test -s conftest$ac_exeext'
7339   { (eval echo "$as_me:7339: \"$ac_try\"") >&5
7340   (eval $ac_try) 2>&5
7341   ac_status=$?
7342   echo "$as_me:7342: \$? = $ac_status" >&5
7343   (exit $ac_status); }; }; then
7344   cf_cv_ldflags_search_paths_first=yes
7345 else
7346   echo "$as_me: failed program was:" >&5
7347 cat conftest.$ac_ext >&5
7348 cf_cv_ldflags_search_paths_first=no
7349 fi
7350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7351                                 LDFLAGS=$cf_save_LDFLAGS
7352 fi
7353 echo "$as_me:7353: result: $cf_cv_ldflags_search_paths_first" >&5
7354 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7355                 if test $cf_cv_ldflags_search_paths_first = yes; then
7356                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7357                 fi
7358                 ;;
7359         hpux*) #(vi
7360                 # (tested with gcc 2.7.2 -- I don't have c89)
7361                 if test "$GCC" = yes; then
7362                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7363                 else
7364                         CC_SHARED_OPTS='+Z'
7365                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7366                 fi
7367                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
7368                 # HP-UX shared libraries must be executable, and should be
7369                 # readonly to exploit a quirk in the memory manager.
7370                 INSTALL_LIB="-m 555"
7371                 ;;
7372         irix*) #(vi
7373                 if test "$cf_cv_enable_rpath" = yes ; then
7374                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7375                 fi
7376                 # tested with IRIX 5.2 and 'cc'.
7377                 if test "$GCC" != yes; then
7378                         CC_SHARED_OPTS='-KPIC'
7379                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
7380                 else
7381                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
7382                 fi
7383                 cf_cv_rm_so_locs=yes
7384                 ;;
7385         linux*|gnu*|k*bsd*-gnu) #(vi
7386                 if test "$DFT_LWR_MODEL" = "shared" ; then
7387                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7388                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7389                 fi
7390                 if test "$cf_cv_enable_rpath" = yes ; then
7391                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7392                 fi
7393
7394         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7395         if test "$cf_cv_shlib_version" = rel; then
7396                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7397         else
7398                 cf_cv_shared_soname='`basename $@`'
7399         fi
7400
7401                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7402                 ;;
7403         openbsd[2-9].*) #(vi
7404                 if test "$DFT_LWR_MODEL" = "shared" ; then
7405                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7406                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7407                 fi
7408                 if test "$cf_cv_enable_rpath" = yes ; then
7409                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7410                 fi
7411                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7412
7413         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7414         if test "$cf_cv_shlib_version" = rel; then
7415                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7416         else
7417                 cf_cv_shared_soname='`basename $@`'
7418         fi
7419
7420                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7421                 ;;
7422         nto-qnx*|openbsd*|freebsd[12].*) #(vi
7423                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7424                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
7425                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7426                 ;;
7427         freebsd*) #(vi
7428                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7429                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7430                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7431                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
7432                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7433                 fi
7434
7435         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7436         if test "$cf_cv_shlib_version" = rel; then
7437                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7438         else
7439                 cf_cv_shared_soname='`basename $@`'
7440         fi
7441
7442                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
7443                 ;;
7444         netbsd*) #(vi
7445                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7446                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7447                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7448                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7449                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
7450                         if test "$cf_cv_shlib_version" = auto; then
7451                         if test -f /usr/libexec/ld.elf_so; then
7452                                 cf_cv_shlib_version=abi
7453                         else
7454                                 cf_cv_shlib_version=rel
7455                         fi
7456                         fi
7457
7458         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7459         if test "$cf_cv_shlib_version" = rel; then
7460                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7461         else
7462                 cf_cv_shared_soname='`basename $@`'
7463         fi
7464
7465                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7466                 else
7467                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
7468                 fi
7469                 ;;
7470         osf*|mls+*) #(vi
7471                 # tested with OSF/1 V3.2 and 'cc'
7472                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7473                 # link with shared libs).
7474                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7475                 case $host_os in #(vi
7476                 osf4*)
7477                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7478                         ;;
7479                 esac
7480                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7481                 if test "$DFT_LWR_MODEL" = "shared" ; then
7482                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7483                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7484                 fi
7485                 cf_cv_rm_so_locs=yes
7486                 ;;
7487         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
7488                 # tested with osr5.0.5
7489                 if test "$GCC" != yes; then
7490                         CC_SHARED_OPTS='-belf -KPIC'
7491                 fi
7492                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7493                 if test "$cf_cv_enable_rpath" = yes ; then
7494                         # only way is to set LD_RUN_PATH but no switch for it
7495                         RUN_PATH=$libdir
7496                 fi
7497                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7498                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7499                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7500                 ;;
7501         sunos4*) #(vi
7502                 # tested with SunOS 4.1.1 and gcc 2.7.0
7503                 if test "$GCC" != yes; then
7504                         CC_SHARED_OPTS='-KPIC'
7505                 fi
7506                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
7507                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7508                 ;;
7509         solaris2*) #(vi
7510                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7511                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7512                 if test "$DFT_LWR_MODEL" = "shared" ; then
7513                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7514                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7515                 fi
7516                 if test "$cf_cv_enable_rpath" = yes ; then
7517                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7518                 fi
7519
7520         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7521         if test "$cf_cv_shlib_version" = rel; then
7522                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7523         else
7524                 cf_cv_shared_soname='`basename $@`'
7525         fi
7526
7527                 if test "$GCC" != yes; then
7528                         cf_save_CFLAGS="$CFLAGS"
7529                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7530                         do
7531                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7532                                 cat >conftest.$ac_ext <<_ACEOF
7533 #line 7533 "configure"
7534 #include "confdefs.h"
7535 #include <stdio.h>
7536 int
7537 main ()
7538 {
7539 printf("Hello\n");
7540   ;
7541   return 0;
7542 }
7543 _ACEOF
7544 rm -f conftest.$ac_objext
7545 if { (eval echo "$as_me:7545: \"$ac_compile\"") >&5
7546   (eval $ac_compile) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit $ac_status); } &&
7550          { ac_try='test -s conftest.$ac_objext'
7551   { (eval echo "$as_me:7551: \"$ac_try\"") >&5
7552   (eval $ac_try) 2>&5
7553   ac_status=$?
7554   echo "$as_me:7554: \$? = $ac_status" >&5
7555   (exit $ac_status); }; }; then
7556   break
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 cat conftest.$ac_ext >&5
7560 fi
7561 rm -f conftest.$ac_objext conftest.$ac_ext
7562                         done
7563                         CFLAGS="$cf_save_CFLAGS"
7564                         CC_SHARED_OPTS=$cf_shared_opts
7565                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
7566                 else
7567                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7568                 fi
7569                 ;;
7570         sysv5uw7*|unix_sv*) #(vi
7571                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7572                 if test "$GCC" != yes; then
7573                         CC_SHARED_OPTS='-KPIC'
7574                 fi
7575                 MK_SHARED_LIB='${LD} -d y -G -o $@'
7576                 ;;
7577         *)
7578                 CC_SHARED_OPTS='unknown'
7579                 MK_SHARED_LIB='echo unknown'
7580                 ;;
7581         esac
7582
7583         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7584         case "$cf_cv_shlib_version" in #(vi
7585         rel|abi)
7586                 case "$MK_SHARED_LIB" in #(vi
7587                 *'-o $@') #(vi
7588                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7589                         ;;
7590                 *)
7591                         { echo "$as_me:7591: WARNING: ignored --with-shlib-version" >&5
7592 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7593                         ;;
7594                 esac
7595                 ;;
7596         esac
7597
7598         if test -n "$cf_ld_rpath_opt" ; then
7599                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
7600         fi
7601
7602 ###############################################################################
7603
7604         case $cf_cv_system_name in
7605         os2*)   PATH_SEPARATOR=';'  ;;
7606         *)      PATH_SEPARATOR=':'  ;;
7607         esac
7608
7609 ###   use option --enable-broken-linker to force on use of broken-linker support
7610 echo "$as_me:7610: checking if you want broken-linker support code" >&5
7611 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7612
7613 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7614 if test "${enable_broken_linker+set}" = set; then
7615   enableval="$enable_broken_linker"
7616   with_broken_linker=$enableval
7617 else
7618   with_broken_linker=${BROKEN_LINKER-no}
7619 fi;
7620 echo "$as_me:7620: result: $with_broken_linker" >&5
7621 echo "${ECHO_T}$with_broken_linker" >&6
7622
7623 BROKEN_LINKER=0
7624 if test "$with_broken_linker" = yes ; then
7625         cat >>confdefs.h <<\EOF
7626 #define BROKEN_LINKER 1
7627 EOF
7628
7629         BROKEN_LINKER=1
7630 elif test "$DFT_LWR_MODEL" = shared ; then
7631         case $cf_cv_system_name in #(vi
7632         cygwin*)
7633                 cat >>confdefs.h <<\EOF
7634 #define BROKEN_LINKER 1
7635 EOF
7636
7637                 BROKEN_LINKER=1
7638                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7639
7640 echo "${as_me-configure}:7640: testing cygwin linker is broken anyway ..." 1>&5
7641
7642                 ;;
7643         esac
7644 fi
7645
7646 # Check to define _XOPEN_SOURCE "automatically"
7647
7648 cf_XOPEN_SOURCE=500
7649 cf_POSIX_C_SOURCE=199506L
7650 cf_xopen_source=
7651
7652 case $host_os in #(vi
7653 aix[456]*) #(vi
7654         cf_xopen_source="-D_ALL_SOURCE"
7655         ;;
7656 darwin[0-8].*) #(vi
7657         cf_xopen_source="-D_APPLE_C_SOURCE"
7658         ;;
7659 darwin*) #(vi
7660         cf_xopen_source="-D_DARWIN_C_SOURCE"
7661         ;;
7662 freebsd*|dragonfly*) #(vi
7663         # 5.x headers associate
7664         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7665         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7666         cf_POSIX_C_SOURCE=200112L
7667         cf_XOPEN_SOURCE=600
7668         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7669         ;;
7670 hpux11*) #(vi
7671         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7672         ;;
7673 hpux*) #(vi
7674         cf_xopen_source="-D_HPUX_SOURCE"
7675         ;;
7676 irix[56].*) #(vi
7677         cf_xopen_source="-D_SGI_SOURCE"
7678         ;;
7679 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7680
7681 echo "$as_me:7681: checking if we must define _GNU_SOURCE" >&5
7682 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7683 if test "${cf_cv_gnu_source+set}" = set; then
7684   echo $ECHO_N "(cached) $ECHO_C" >&6
7685 else
7686
7687 cat >conftest.$ac_ext <<_ACEOF
7688 #line 7688 "configure"
7689 #include "confdefs.h"
7690 #include <sys/types.h>
7691 int
7692 main ()
7693 {
7694
7695 #ifndef _XOPEN_SOURCE
7696 make an error
7697 #endif
7698   ;
7699   return 0;
7700 }
7701 _ACEOF
7702 rm -f conftest.$ac_objext
7703 if { (eval echo "$as_me:7703: \"$ac_compile\"") >&5
7704   (eval $ac_compile) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit $ac_status); } &&
7708          { ac_try='test -s conftest.$ac_objext'
7709   { (eval echo "$as_me:7709: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:7712: \$? = $ac_status" >&5
7713   (exit $ac_status); }; }; then
7714   cf_cv_gnu_source=no
7715 else
7716   echo "$as_me: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7718 cf_save="$CPPFLAGS"
7719          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7720          cat >conftest.$ac_ext <<_ACEOF
7721 #line 7721 "configure"
7722 #include "confdefs.h"
7723 #include <sys/types.h>
7724 int
7725 main ()
7726 {
7727
7728 #ifdef _XOPEN_SOURCE
7729 make an error
7730 #endif
7731   ;
7732   return 0;
7733 }
7734 _ACEOF
7735 rm -f conftest.$ac_objext
7736 if { (eval echo "$as_me:7736: \"$ac_compile\"") >&5
7737   (eval $ac_compile) 2>&5
7738   ac_status=$?
7739   echo "$as_me:7739: \$? = $ac_status" >&5
7740   (exit $ac_status); } &&
7741          { ac_try='test -s conftest.$ac_objext'
7742   { (eval echo "$as_me:7742: \"$ac_try\"") >&5
7743   (eval $ac_try) 2>&5
7744   ac_status=$?
7745   echo "$as_me:7745: \$? = $ac_status" >&5
7746   (exit $ac_status); }; }; then
7747   cf_cv_gnu_source=no
7748 else
7749   echo "$as_me: failed program was:" >&5
7750 cat conftest.$ac_ext >&5
7751 cf_cv_gnu_source=yes
7752 fi
7753 rm -f conftest.$ac_objext conftest.$ac_ext
7754         CPPFLAGS="$cf_save"
7755
7756 fi
7757 rm -f conftest.$ac_objext conftest.$ac_ext
7758
7759 fi
7760 echo "$as_me:7760: result: $cf_cv_gnu_source" >&5
7761 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7762 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7763
7764         ;;
7765 mirbsd*) #(vi
7766         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7767         ;;
7768 netbsd*) #(vi
7769         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7770         ;;
7771 openbsd*) #(vi
7772         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7773         ;;
7774 osf[45]*) #(vi
7775         cf_xopen_source="-D_OSF_SOURCE"
7776         ;;
7777 nto-qnx*) #(vi
7778         cf_xopen_source="-D_QNX_SOURCE"
7779         ;;
7780 sco*) #(vi
7781         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7782         ;;
7783 solaris2.1[0-9]) #(vi
7784         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7785         ;;
7786 solaris2.[1-9]) #(vi
7787         cf_xopen_source="-D__EXTENSIONS__"
7788         ;;
7789 *)
7790         echo "$as_me:7790: checking if we should define _XOPEN_SOURCE" >&5
7791 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7792 if test "${cf_cv_xopen_source+set}" = set; then
7793   echo $ECHO_N "(cached) $ECHO_C" >&6
7794 else
7795
7796         cat >conftest.$ac_ext <<_ACEOF
7797 #line 7797 "configure"
7798 #include "confdefs.h"
7799 #include <sys/types.h>
7800 int
7801 main ()
7802 {
7803
7804 #ifndef _XOPEN_SOURCE
7805 make an error
7806 #endif
7807   ;
7808   return 0;
7809 }
7810 _ACEOF
7811 rm -f conftest.$ac_objext
7812 if { (eval echo "$as_me:7812: \"$ac_compile\"") >&5
7813   (eval $ac_compile) 2>&5
7814   ac_status=$?
7815   echo "$as_me:7815: \$? = $ac_status" >&5
7816   (exit $ac_status); } &&
7817          { ac_try='test -s conftest.$ac_objext'
7818   { (eval echo "$as_me:7818: \"$ac_try\"") >&5
7819   (eval $ac_try) 2>&5
7820   ac_status=$?
7821   echo "$as_me:7821: \$? = $ac_status" >&5
7822   (exit $ac_status); }; }; then
7823   cf_cv_xopen_source=no
7824 else
7825   echo "$as_me: failed program was:" >&5
7826 cat conftest.$ac_ext >&5
7827 cf_save="$CPPFLAGS"
7828          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7829          cat >conftest.$ac_ext <<_ACEOF
7830 #line 7830 "configure"
7831 #include "confdefs.h"
7832 #include <sys/types.h>
7833 int
7834 main ()
7835 {
7836
7837 #ifdef _XOPEN_SOURCE
7838 make an error
7839 #endif
7840   ;
7841   return 0;
7842 }
7843 _ACEOF
7844 rm -f conftest.$ac_objext
7845 if { (eval echo "$as_me:7845: \"$ac_compile\"") >&5
7846   (eval $ac_compile) 2>&5
7847   ac_status=$?
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit $ac_status); } &&
7850          { ac_try='test -s conftest.$ac_objext'
7851   { (eval echo "$as_me:7851: \"$ac_try\"") >&5
7852   (eval $ac_try) 2>&5
7853   ac_status=$?
7854   echo "$as_me:7854: \$? = $ac_status" >&5
7855   (exit $ac_status); }; }; then
7856   cf_cv_xopen_source=no
7857 else
7858   echo "$as_me: failed program was:" >&5
7859 cat conftest.$ac_ext >&5
7860 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7861 fi
7862 rm -f conftest.$ac_objext conftest.$ac_ext
7863         CPPFLAGS="$cf_save"
7864
7865 fi
7866 rm -f conftest.$ac_objext conftest.$ac_ext
7867
7868 fi
7869 echo "$as_me:7869: result: $cf_cv_xopen_source" >&5
7870 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7871         if test "$cf_cv_xopen_source" != no ; then
7872
7873 CFLAGS=`echo "$CFLAGS" | \
7874         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7875                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7876
7877 CPPFLAGS=`echo "$CPPFLAGS" | \
7878         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7879                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7880
7881                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7882
7883 cf_fix_cppflags=no
7884 cf_new_cflags=
7885 cf_new_cppflags=
7886 cf_new_extra_cppflags=
7887
7888 for cf_add_cflags in $cf_temp_xopen_source
7889 do
7890 case $cf_fix_cppflags in
7891 no)
7892         case $cf_add_cflags in #(vi
7893         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7894                 case $cf_add_cflags in
7895                 -D*)
7896                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7897
7898                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7899                                 && test -z "${cf_tst_cflags}" \
7900                                 && cf_fix_cppflags=yes
7901
7902                         if test $cf_fix_cppflags = yes ; then
7903                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7904                                 continue
7905                         elif test "${cf_tst_cflags}" = "\"'" ; then
7906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7907                                 continue
7908                         fi
7909                         ;;
7910                 esac
7911                 case "$CPPFLAGS" in
7912                 *$cf_add_cflags) #(vi
7913                         ;;
7914                 *) #(vi
7915                         case $cf_add_cflags in #(vi
7916                         -D*)
7917                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7918
7919 CPPFLAGS=`echo "$CPPFLAGS" | \
7920         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7921                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7922
7923                                 ;;
7924                         esac
7925                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7926                         ;;
7927                 esac
7928                 ;;
7929         *)
7930                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7931                 ;;
7932         esac
7933         ;;
7934 yes)
7935         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7936
7937         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7938
7939         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7940                 && test -z "${cf_tst_cflags}" \
7941                 && cf_fix_cppflags=no
7942         ;;
7943 esac
7944 done
7945
7946 if test -n "$cf_new_cflags" ; then
7947
7948         CFLAGS="$CFLAGS $cf_new_cflags"
7949 fi
7950
7951 if test -n "$cf_new_cppflags" ; then
7952
7953         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7954 fi
7955
7956 if test -n "$cf_new_extra_cppflags" ; then
7957
7958         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7959 fi
7960
7961         fi
7962
7963 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7964
7965 cf_save_CFLAGS="$CFLAGS"
7966 cf_save_CPPFLAGS="$CPPFLAGS"
7967
7968 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7969         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7970                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7971
7972 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7973         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7974                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7975
7976 echo "$as_me:7976: checking if we should define _POSIX_C_SOURCE" >&5
7977 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7978 if test "${cf_cv_posix_c_source+set}" = set; then
7979   echo $ECHO_N "(cached) $ECHO_C" >&6
7980 else
7981
7982 echo "${as_me-configure}:7982: testing if the symbol is already defined go no further ..." 1>&5
7983
7984         cat >conftest.$ac_ext <<_ACEOF
7985 #line 7985 "configure"
7986 #include "confdefs.h"
7987 #include <sys/types.h>
7988 int
7989 main ()
7990 {
7991
7992 #ifndef _POSIX_C_SOURCE
7993 make an error
7994 #endif
7995   ;
7996   return 0;
7997 }
7998 _ACEOF
7999 rm -f conftest.$ac_objext
8000 if { (eval echo "$as_me:8000: \"$ac_compile\"") >&5
8001   (eval $ac_compile) 2>&5
8002   ac_status=$?
8003   echo "$as_me:8003: \$? = $ac_status" >&5
8004   (exit $ac_status); } &&
8005          { ac_try='test -s conftest.$ac_objext'
8006   { (eval echo "$as_me:8006: \"$ac_try\"") >&5
8007   (eval $ac_try) 2>&5
8008   ac_status=$?
8009   echo "$as_me:8009: \$? = $ac_status" >&5
8010   (exit $ac_status); }; }; then
8011   cf_cv_posix_c_source=no
8012 else
8013   echo "$as_me: failed program was:" >&5
8014 cat conftest.$ac_ext >&5
8015 cf_want_posix_source=no
8016          case .$cf_POSIX_C_SOURCE in #(vi
8017          .[12]??*) #(vi
8018                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8019                 ;;
8020          .2) #(vi
8021                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8022                 cf_want_posix_source=yes
8023                 ;;
8024          .*)
8025                 cf_want_posix_source=yes
8026                 ;;
8027          esac
8028          if test "$cf_want_posix_source" = yes ; then
8029                 cat >conftest.$ac_ext <<_ACEOF
8030 #line 8030 "configure"
8031 #include "confdefs.h"
8032 #include <sys/types.h>
8033 int
8034 main ()
8035 {
8036
8037 #ifdef _POSIX_SOURCE
8038 make an error
8039 #endif
8040   ;
8041   return 0;
8042 }
8043 _ACEOF
8044 rm -f conftest.$ac_objext
8045 if { (eval echo "$as_me:8045: \"$ac_compile\"") >&5
8046   (eval $ac_compile) 2>&5
8047   ac_status=$?
8048   echo "$as_me:8048: \$? = $ac_status" >&5
8049   (exit $ac_status); } &&
8050          { ac_try='test -s conftest.$ac_objext'
8051   { (eval echo "$as_me:8051: \"$ac_try\"") >&5
8052   (eval $ac_try) 2>&5
8053   ac_status=$?
8054   echo "$as_me:8054: \$? = $ac_status" >&5
8055   (exit $ac_status); }; }; then
8056   :
8057 else
8058   echo "$as_me: failed program was:" >&5
8059 cat conftest.$ac_ext >&5
8060 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8061 fi
8062 rm -f conftest.$ac_objext conftest.$ac_ext
8063          fi
8064
8065 echo "${as_me-configure}:8065: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8066
8067          CFLAGS="$cf_trim_CFLAGS"
8068          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8069
8070 echo "${as_me-configure}:8070: testing if the second compile does not leave our definition intact error ..." 1>&5
8071
8072          cat >conftest.$ac_ext <<_ACEOF
8073 #line 8073 "configure"
8074 #include "confdefs.h"
8075 #include <sys/types.h>
8076 int
8077 main ()
8078 {
8079
8080 #ifndef _POSIX_C_SOURCE
8081 make an error
8082 #endif
8083   ;
8084   return 0;
8085 }
8086 _ACEOF
8087 rm -f conftest.$ac_objext
8088 if { (eval echo "$as_me:8088: \"$ac_compile\"") >&5
8089   (eval $ac_compile) 2>&5
8090   ac_status=$?
8091   echo "$as_me:8091: \$? = $ac_status" >&5
8092   (exit $ac_status); } &&
8093          { ac_try='test -s conftest.$ac_objext'
8094   { (eval echo "$as_me:8094: \"$ac_try\"") >&5
8095   (eval $ac_try) 2>&5
8096   ac_status=$?
8097   echo "$as_me:8097: \$? = $ac_status" >&5
8098   (exit $ac_status); }; }; then
8099   :
8100 else
8101   echo "$as_me: failed program was:" >&5
8102 cat conftest.$ac_ext >&5
8103 cf_cv_posix_c_source=no
8104 fi
8105 rm -f conftest.$ac_objext conftest.$ac_ext
8106          CFLAGS="$cf_save_CFLAGS"
8107          CPPFLAGS="$cf_save_CPPFLAGS"
8108
8109 fi
8110 rm -f conftest.$ac_objext conftest.$ac_ext
8111
8112 fi
8113 echo "$as_me:8113: result: $cf_cv_posix_c_source" >&5
8114 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8115
8116 if test "$cf_cv_posix_c_source" != no ; then
8117         CFLAGS="$cf_trim_CFLAGS"
8118         CPPFLAGS="$cf_trim_CPPFLAGS"
8119
8120 cf_fix_cppflags=no
8121 cf_new_cflags=
8122 cf_new_cppflags=
8123 cf_new_extra_cppflags=
8124
8125 for cf_add_cflags in $cf_cv_posix_c_source
8126 do
8127 case $cf_fix_cppflags in
8128 no)
8129         case $cf_add_cflags in #(vi
8130         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8131                 case $cf_add_cflags in
8132                 -D*)
8133                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8134
8135                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8136                                 && test -z "${cf_tst_cflags}" \
8137                                 && cf_fix_cppflags=yes
8138
8139                         if test $cf_fix_cppflags = yes ; then
8140                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8141                                 continue
8142                         elif test "${cf_tst_cflags}" = "\"'" ; then
8143                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8144                                 continue
8145                         fi
8146                         ;;
8147                 esac
8148                 case "$CPPFLAGS" in
8149                 *$cf_add_cflags) #(vi
8150                         ;;
8151                 *) #(vi
8152                         case $cf_add_cflags in #(vi
8153                         -D*)
8154                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8155
8156 CPPFLAGS=`echo "$CPPFLAGS" | \
8157         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8158                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8159
8160                                 ;;
8161                         esac
8162                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8163                         ;;
8164                 esac
8165                 ;;
8166         *)
8167                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8168                 ;;
8169         esac
8170         ;;
8171 yes)
8172         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8173
8174         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8175
8176         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8177                 && test -z "${cf_tst_cflags}" \
8178                 && cf_fix_cppflags=no
8179         ;;
8180 esac
8181 done
8182
8183 if test -n "$cf_new_cflags" ; then
8184
8185         CFLAGS="$CFLAGS $cf_new_cflags"
8186 fi
8187
8188 if test -n "$cf_new_cppflags" ; then
8189
8190         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8191 fi
8192
8193 if test -n "$cf_new_extra_cppflags" ; then
8194
8195         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8196 fi
8197
8198 fi
8199
8200         ;;
8201 esac
8202
8203 if test -n "$cf_xopen_source" ; then
8204
8205 cf_fix_cppflags=no
8206 cf_new_cflags=
8207 cf_new_cppflags=
8208 cf_new_extra_cppflags=
8209
8210 for cf_add_cflags in $cf_xopen_source
8211 do
8212 case $cf_fix_cppflags in
8213 no)
8214         case $cf_add_cflags in #(vi
8215         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8216                 case $cf_add_cflags in
8217                 -D*)
8218                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8219
8220                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8221                                 && test -z "${cf_tst_cflags}" \
8222                                 && cf_fix_cppflags=yes
8223
8224                         if test $cf_fix_cppflags = yes ; then
8225                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8226                                 continue
8227                         elif test "${cf_tst_cflags}" = "\"'" ; then
8228                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8229                                 continue
8230                         fi
8231                         ;;
8232                 esac
8233                 case "$CPPFLAGS" in
8234                 *$cf_add_cflags) #(vi
8235                         ;;
8236                 *) #(vi
8237                         case $cf_add_cflags in #(vi
8238                         -D*)
8239                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8240
8241 CPPFLAGS=`echo "$CPPFLAGS" | \
8242         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8243                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8244
8245                                 ;;
8246                         esac
8247                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8248                         ;;
8249                 esac
8250                 ;;
8251         *)
8252                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8253                 ;;
8254         esac
8255         ;;
8256 yes)
8257         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8258
8259         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8260
8261         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8262                 && test -z "${cf_tst_cflags}" \
8263                 && cf_fix_cppflags=no
8264         ;;
8265 esac
8266 done
8267
8268 if test -n "$cf_new_cflags" ; then
8269
8270         CFLAGS="$CFLAGS $cf_new_cflags"
8271 fi
8272
8273 if test -n "$cf_new_cppflags" ; then
8274
8275         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8276 fi
8277
8278 if test -n "$cf_new_extra_cppflags" ; then
8279
8280         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8281 fi
8282
8283 fi
8284
8285 # Check whether --enable-largefile or --disable-largefile was given.
8286 if test "${enable_largefile+set}" = set; then
8287   enableval="$enable_largefile"
8288
8289 fi;
8290 if test "$enable_largefile" != no; then
8291
8292   echo "$as_me:8292: checking for special C compiler options needed for large files" >&5
8293 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8294 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8295   echo $ECHO_N "(cached) $ECHO_C" >&6
8296 else
8297   ac_cv_sys_largefile_CC=no
8298      if test "$GCC" != yes; then
8299        ac_save_CC=$CC
8300        while :; do
8301          # IRIX 6.2 and later do not support large files by default,
8302          # so use the C compiler's -n32 option if that helps.
8303          cat >conftest.$ac_ext <<_ACEOF
8304 #line 8304 "configure"
8305 #include "confdefs.h"
8306 #include <sys/types.h>
8307  /* Check that off_t can represent 2**63 - 1 correctly.
8308     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8309     since some C++ compilers masquerading as C compilers
8310     incorrectly reject 9223372036854775807.  */
8311 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8312   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8313                        && LARGE_OFF_T % 2147483647 == 1)
8314                       ? 1 : -1];
8315 int
8316 main ()
8317 {
8318
8319   ;
8320   return 0;
8321 }
8322 _ACEOF
8323          rm -f conftest.$ac_objext
8324 if { (eval echo "$as_me:8324: \"$ac_compile\"") >&5
8325   (eval $ac_compile) 2>&5
8326   ac_status=$?
8327   echo "$as_me:8327: \$? = $ac_status" >&5
8328   (exit $ac_status); } &&
8329          { ac_try='test -s conftest.$ac_objext'
8330   { (eval echo "$as_me:8330: \"$ac_try\"") >&5
8331   (eval $ac_try) 2>&5
8332   ac_status=$?
8333   echo "$as_me:8333: \$? = $ac_status" >&5
8334   (exit $ac_status); }; }; then
8335   break
8336 else
8337   echo "$as_me: failed program was:" >&5
8338 cat conftest.$ac_ext >&5
8339 fi
8340 rm -f conftest.$ac_objext
8341          CC="$CC -n32"
8342          rm -f conftest.$ac_objext
8343 if { (eval echo "$as_me:8343: \"$ac_compile\"") >&5
8344   (eval $ac_compile) 2>&5
8345   ac_status=$?
8346   echo "$as_me:8346: \$? = $ac_status" >&5
8347   (exit $ac_status); } &&
8348          { ac_try='test -s conftest.$ac_objext'
8349   { (eval echo "$as_me:8349: \"$ac_try\"") >&5
8350   (eval $ac_try) 2>&5
8351   ac_status=$?
8352   echo "$as_me:8352: \$? = $ac_status" >&5
8353   (exit $ac_status); }; }; then
8354   ac_cv_sys_largefile_CC=' -n32'; break
8355 else
8356   echo "$as_me: failed program was:" >&5
8357 cat conftest.$ac_ext >&5
8358 fi
8359 rm -f conftest.$ac_objext
8360          break
8361        done
8362        CC=$ac_save_CC
8363        rm -f conftest.$ac_ext
8364     fi
8365 fi
8366 echo "$as_me:8366: result: $ac_cv_sys_largefile_CC" >&5
8367 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8368   if test "$ac_cv_sys_largefile_CC" != no; then
8369     CC=$CC$ac_cv_sys_largefile_CC
8370   fi
8371
8372   echo "$as_me:8372: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8373 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8374 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8375   echo $ECHO_N "(cached) $ECHO_C" >&6
8376 else
8377   while :; do
8378   ac_cv_sys_file_offset_bits=no
8379   cat >conftest.$ac_ext <<_ACEOF
8380 #line 8380 "configure"
8381 #include "confdefs.h"
8382 #include <sys/types.h>
8383  /* Check that off_t can represent 2**63 - 1 correctly.
8384     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8385     since some C++ compilers masquerading as C compilers
8386     incorrectly reject 9223372036854775807.  */
8387 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8388   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8389                        && LARGE_OFF_T % 2147483647 == 1)
8390                       ? 1 : -1];
8391 int
8392 main ()
8393 {
8394
8395   ;
8396   return 0;
8397 }
8398 _ACEOF
8399 rm -f conftest.$ac_objext
8400 if { (eval echo "$as_me:8400: \"$ac_compile\"") >&5
8401   (eval $ac_compile) 2>&5
8402   ac_status=$?
8403   echo "$as_me:8403: \$? = $ac_status" >&5
8404   (exit $ac_status); } &&
8405          { ac_try='test -s conftest.$ac_objext'
8406   { (eval echo "$as_me:8406: \"$ac_try\"") >&5
8407   (eval $ac_try) 2>&5
8408   ac_status=$?
8409   echo "$as_me:8409: \$? = $ac_status" >&5
8410   (exit $ac_status); }; }; then
8411   break
8412 else
8413   echo "$as_me: failed program was:" >&5
8414 cat conftest.$ac_ext >&5
8415 fi
8416 rm -f conftest.$ac_objext conftest.$ac_ext
8417   cat >conftest.$ac_ext <<_ACEOF
8418 #line 8418 "configure"
8419 #include "confdefs.h"
8420 #define _FILE_OFFSET_BITS 64
8421 #include <sys/types.h>
8422  /* Check that off_t can represent 2**63 - 1 correctly.
8423     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8424     since some C++ compilers masquerading as C compilers
8425     incorrectly reject 9223372036854775807.  */
8426 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8427   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8428                        && LARGE_OFF_T % 2147483647 == 1)
8429                       ? 1 : -1];
8430 int
8431 main ()
8432 {
8433
8434   ;
8435   return 0;
8436 }
8437 _ACEOF
8438 rm -f conftest.$ac_objext
8439 if { (eval echo "$as_me:8439: \"$ac_compile\"") >&5
8440   (eval $ac_compile) 2>&5
8441   ac_status=$?
8442   echo "$as_me:8442: \$? = $ac_status" >&5
8443   (exit $ac_status); } &&
8444          { ac_try='test -s conftest.$ac_objext'
8445   { (eval echo "$as_me:8445: \"$ac_try\"") >&5
8446   (eval $ac_try) 2>&5
8447   ac_status=$?
8448   echo "$as_me:8448: \$? = $ac_status" >&5
8449   (exit $ac_status); }; }; then
8450   ac_cv_sys_file_offset_bits=64; break
8451 else
8452   echo "$as_me: failed program was:" >&5
8453 cat conftest.$ac_ext >&5
8454 fi
8455 rm -f conftest.$ac_objext conftest.$ac_ext
8456   break
8457 done
8458 fi
8459 echo "$as_me:8459: result: $ac_cv_sys_file_offset_bits" >&5
8460 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8461 if test "$ac_cv_sys_file_offset_bits" != no; then
8462
8463 cat >>confdefs.h <<EOF
8464 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8465 EOF
8466
8467 fi
8468 rm -f conftest*
8469   echo "$as_me:8469: checking for _LARGE_FILES value needed for large files" >&5
8470 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8471 if test "${ac_cv_sys_large_files+set}" = set; then
8472   echo $ECHO_N "(cached) $ECHO_C" >&6
8473 else
8474   while :; do
8475   ac_cv_sys_large_files=no
8476   cat >conftest.$ac_ext <<_ACEOF
8477 #line 8477 "configure"
8478 #include "confdefs.h"
8479 #include <sys/types.h>
8480  /* Check that off_t can represent 2**63 - 1 correctly.
8481     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8482     since some C++ compilers masquerading as C compilers
8483     incorrectly reject 9223372036854775807.  */
8484 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8485   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8486                        && LARGE_OFF_T % 2147483647 == 1)
8487                       ? 1 : -1];
8488 int
8489 main ()
8490 {
8491
8492   ;
8493   return 0;
8494 }
8495 _ACEOF
8496 rm -f conftest.$ac_objext
8497 if { (eval echo "$as_me:8497: \"$ac_compile\"") >&5
8498   (eval $ac_compile) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); } &&
8502          { ac_try='test -s conftest.$ac_objext'
8503   { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8504   (eval $ac_try) 2>&5
8505   ac_status=$?
8506   echo "$as_me:8506: \$? = $ac_status" >&5
8507   (exit $ac_status); }; }; then
8508   break
8509 else
8510   echo "$as_me: failed program was:" >&5
8511 cat conftest.$ac_ext >&5
8512 fi
8513 rm -f conftest.$ac_objext conftest.$ac_ext
8514   cat >conftest.$ac_ext <<_ACEOF
8515 #line 8515 "configure"
8516 #include "confdefs.h"
8517 #define _LARGE_FILES 1
8518 #include <sys/types.h>
8519  /* Check that off_t can represent 2**63 - 1 correctly.
8520     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8521     since some C++ compilers masquerading as C compilers
8522     incorrectly reject 9223372036854775807.  */
8523 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8524   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8525                        && LARGE_OFF_T % 2147483647 == 1)
8526                       ? 1 : -1];
8527 int
8528 main ()
8529 {
8530
8531   ;
8532   return 0;
8533 }
8534 _ACEOF
8535 rm -f conftest.$ac_objext
8536 if { (eval echo "$as_me:8536: \"$ac_compile\"") >&5
8537   (eval $ac_compile) 2>&5
8538   ac_status=$?
8539   echo "$as_me:8539: \$? = $ac_status" >&5
8540   (exit $ac_status); } &&
8541          { ac_try='test -s conftest.$ac_objext'
8542   { (eval echo "$as_me:8542: \"$ac_try\"") >&5
8543   (eval $ac_try) 2>&5
8544   ac_status=$?
8545   echo "$as_me:8545: \$? = $ac_status" >&5
8546   (exit $ac_status); }; }; then
8547   ac_cv_sys_large_files=1; break
8548 else
8549   echo "$as_me: failed program was:" >&5
8550 cat conftest.$ac_ext >&5
8551 fi
8552 rm -f conftest.$ac_objext conftest.$ac_ext
8553   break
8554 done
8555 fi
8556 echo "$as_me:8556: result: $ac_cv_sys_large_files" >&5
8557 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8558 if test "$ac_cv_sys_large_files" != no; then
8559
8560 cat >>confdefs.h <<EOF
8561 #define _LARGE_FILES $ac_cv_sys_large_files
8562 EOF
8563
8564 fi
8565 rm -f conftest*
8566 fi
8567
8568     if test "$enable_largefile" != no ; then
8569         echo "$as_me:8569: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8570 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8571 if test "${ac_cv_sys_largefile_source+set}" = set; then
8572   echo $ECHO_N "(cached) $ECHO_C" >&6
8573 else
8574   while :; do
8575   ac_cv_sys_largefile_source=no
8576   cat >conftest.$ac_ext <<_ACEOF
8577 #line 8577 "configure"
8578 #include "confdefs.h"
8579 #include <stdio.h>
8580 int
8581 main ()
8582 {
8583 return !fseeko;
8584   ;
8585   return 0;
8586 }
8587 _ACEOF
8588 rm -f conftest.$ac_objext
8589 if { (eval echo "$as_me:8589: \"$ac_compile\"") >&5
8590   (eval $ac_compile) 2>&5
8591   ac_status=$?
8592   echo "$as_me:8592: \$? = $ac_status" >&5
8593   (exit $ac_status); } &&
8594          { ac_try='test -s conftest.$ac_objext'
8595   { (eval echo "$as_me:8595: \"$ac_try\"") >&5
8596   (eval $ac_try) 2>&5
8597   ac_status=$?
8598   echo "$as_me:8598: \$? = $ac_status" >&5
8599   (exit $ac_status); }; }; then
8600   break
8601 else
8602   echo "$as_me: failed program was:" >&5
8603 cat conftest.$ac_ext >&5
8604 fi
8605 rm -f conftest.$ac_objext conftest.$ac_ext
8606   cat >conftest.$ac_ext <<_ACEOF
8607 #line 8607 "configure"
8608 #include "confdefs.h"
8609 #define _LARGEFILE_SOURCE 1
8610 #include <stdio.h>
8611 int
8612 main ()
8613 {
8614 return !fseeko;
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 rm -f conftest.$ac_objext
8620 if { (eval echo "$as_me:8620: \"$ac_compile\"") >&5
8621   (eval $ac_compile) 2>&5
8622   ac_status=$?
8623   echo "$as_me:8623: \$? = $ac_status" >&5
8624   (exit $ac_status); } &&
8625          { ac_try='test -s conftest.$ac_objext'
8626   { (eval echo "$as_me:8626: \"$ac_try\"") >&5
8627   (eval $ac_try) 2>&5
8628   ac_status=$?
8629   echo "$as_me:8629: \$? = $ac_status" >&5
8630   (exit $ac_status); }; }; then
8631   ac_cv_sys_largefile_source=1; break
8632 else
8633   echo "$as_me: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8635 fi
8636 rm -f conftest.$ac_objext conftest.$ac_ext
8637   break
8638 done
8639 fi
8640 echo "$as_me:8640: result: $ac_cv_sys_largefile_source" >&5
8641 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8642 if test "$ac_cv_sys_largefile_source" != no; then
8643
8644 cat >>confdefs.h <<EOF
8645 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8646 EOF
8647
8648 fi
8649 rm -f conftest*
8650
8651 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8652 # in glibc 2.1.3, but that breaks too many other things.
8653 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8654 echo "$as_me:8654: checking for fseeko" >&5
8655 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8656 if test "${ac_cv_func_fseeko+set}" = set; then
8657   echo $ECHO_N "(cached) $ECHO_C" >&6
8658 else
8659   cat >conftest.$ac_ext <<_ACEOF
8660 #line 8660 "configure"
8661 #include "confdefs.h"
8662 #include <stdio.h>
8663 int
8664 main ()
8665 {
8666 return fseeko && fseeko (stdin, 0, 0);
8667   ;
8668   return 0;
8669 }
8670 _ACEOF
8671 rm -f conftest.$ac_objext conftest$ac_exeext
8672 if { (eval echo "$as_me:8672: \"$ac_link\"") >&5
8673   (eval $ac_link) 2>&5
8674   ac_status=$?
8675   echo "$as_me:8675: \$? = $ac_status" >&5
8676   (exit $ac_status); } &&
8677          { ac_try='test -s conftest$ac_exeext'
8678   { (eval echo "$as_me:8678: \"$ac_try\"") >&5
8679   (eval $ac_try) 2>&5
8680   ac_status=$?
8681   echo "$as_me:8681: \$? = $ac_status" >&5
8682   (exit $ac_status); }; }; then
8683   ac_cv_func_fseeko=yes
8684 else
8685   echo "$as_me: failed program was:" >&5
8686 cat conftest.$ac_ext >&5
8687 ac_cv_func_fseeko=no
8688 fi
8689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8690 fi
8691 echo "$as_me:8691: result: $ac_cv_func_fseeko" >&5
8692 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8693 if test $ac_cv_func_fseeko = yes; then
8694
8695 cat >>confdefs.h <<\EOF
8696 #define HAVE_FSEEKO 1
8697 EOF
8698
8699 fi
8700
8701         # Normally we would collect these definitions in the config.h,
8702         # but (like _XOPEN_SOURCE), some environments rely on having these
8703         # defined before any of the system headers are included.  Another
8704         # case comes up with C++, e.g., on AIX the compiler compiles the
8705         # header files by themselves before looking at the body files it is
8706         # told to compile.  For ncurses, those header files do not include
8707         # the config.h
8708         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8709         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8710         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8711
8712         echo "$as_me:8712: checking whether to use struct dirent64" >&5
8713 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8714 if test "${cf_cv_struct_dirent64+set}" = set; then
8715   echo $ECHO_N "(cached) $ECHO_C" >&6
8716 else
8717
8718                 cat >conftest.$ac_ext <<_ACEOF
8719 #line 8719 "configure"
8720 #include "confdefs.h"
8721
8722 #include <sys/types.h>
8723 #include <dirent.h>
8724
8725 int
8726 main ()
8727 {
8728
8729                 /* if transitional largefile support is setup, this is true */
8730                 extern struct dirent64 * readdir(DIR *);
8731                 struct dirent64 *x = readdir((DIR *)0);
8732                 struct dirent *y = readdir((DIR *)0);
8733                 int z = x - y;
8734
8735   ;
8736   return 0;
8737 }
8738 _ACEOF
8739 rm -f conftest.$ac_objext
8740 if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
8741   (eval $ac_compile) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -s conftest.$ac_objext'
8746   { (eval echo "$as_me:8746: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit $ac_status); }; }; then
8751   cf_cv_struct_dirent64=yes
8752 else
8753   echo "$as_me: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 cf_cv_struct_dirent64=no
8756 fi
8757 rm -f conftest.$ac_objext conftest.$ac_ext
8758
8759 fi
8760 echo "$as_me:8760: result: $cf_cv_struct_dirent64" >&5
8761 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8762         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8763 #define HAVE_STRUCT_DIRENT64 1
8764 EOF
8765
8766     fi
8767
8768 ### Enable compiling-in rcs id's
8769 echo "$as_me:8769: checking if RCS identifiers should be compiled-in" >&5
8770 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8771
8772 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8773 if test "${with_rcs_ids+set}" = set; then
8774   withval="$with_rcs_ids"
8775   with_rcs_ids=$withval
8776 else
8777   with_rcs_ids=no
8778 fi;
8779 echo "$as_me:8779: result: $with_rcs_ids" >&5
8780 echo "${ECHO_T}$with_rcs_ids" >&6
8781 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8782 #define USE_RCS_IDS 1
8783 EOF
8784
8785 ###############################################################################
8786
8787 ### Note that some functions (such as const) are normally disabled anyway.
8788 echo "$as_me:8788: checking if you want to build with function extensions" >&5
8789 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8790
8791 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8792 if test "${enable_ext_funcs+set}" = set; then
8793   enableval="$enable_ext_funcs"
8794   with_ext_funcs=$enableval
8795 else
8796   with_ext_funcs=yes
8797 fi;
8798 echo "$as_me:8798: result: $with_ext_funcs" >&5
8799 echo "${ECHO_T}$with_ext_funcs" >&6
8800 if test "$with_ext_funcs" = yes ; then
8801         NCURSES_EXT_FUNCS=1
8802         cat >>confdefs.h <<\EOF
8803 #define HAVE_USE_DEFAULT_COLORS 1
8804 EOF
8805
8806         cat >>confdefs.h <<\EOF
8807 #define NCURSES_EXT_FUNCS 1
8808 EOF
8809
8810 else
8811         NCURSES_EXT_FUNCS=0
8812 fi
8813
8814 ###   use option --enable-const to turn on use of const beyond that in XSI.
8815 echo "$as_me:8815: checking for extended use of const keyword" >&5
8816 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8817
8818 # Check whether --enable-const or --disable-const was given.
8819 if test "${enable_const+set}" = set; then
8820   enableval="$enable_const"
8821   with_ext_const=$enableval
8822 else
8823   with_ext_const=no
8824 fi;
8825 echo "$as_me:8825: result: $with_ext_const" >&5
8826 echo "${ECHO_T}$with_ext_const" >&6
8827 NCURSES_CONST='/*nothing*/'
8828 if test "$with_ext_const" = yes ; then
8829         NCURSES_CONST=const
8830 fi
8831
8832 ###############################################################################
8833 # These options are relatively safe to experiment with.
8834
8835 echo "$as_me:8835: checking if you want all development code" >&5
8836 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8837
8838 # Check whether --with-develop or --without-develop was given.
8839 if test "${with_develop+set}" = set; then
8840   withval="$with_develop"
8841   with_develop=$withval
8842 else
8843   with_develop=no
8844 fi;
8845 echo "$as_me:8845: result: $with_develop" >&5
8846 echo "${ECHO_T}$with_develop" >&6
8847
8848 ###############################################################################
8849 # These are just experimental, probably should not be in a package:
8850
8851 # This is still experimental (20080329), but should ultimately be moved to
8852 # the script-block --with-normal, etc.
8853
8854 echo "$as_me:8854: checking if you want to link with the pthread library" >&5
8855 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
8856
8857 # Check whether --with-pthread or --without-pthread was given.
8858 if test "${with_pthread+set}" = set; then
8859   withval="$with_pthread"
8860   with_pthread=$withval
8861 else
8862   with_pthread=no
8863 fi;
8864 echo "$as_me:8864: result: $with_pthread" >&5
8865 echo "${ECHO_T}$with_pthread" >&6
8866
8867 if test "$with_pthread" != no ; then
8868     echo "$as_me:8868: checking for pthread.h" >&5
8869 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
8870 if test "${ac_cv_header_pthread_h+set}" = set; then
8871   echo $ECHO_N "(cached) $ECHO_C" >&6
8872 else
8873   cat >conftest.$ac_ext <<_ACEOF
8874 #line 8874 "configure"
8875 #include "confdefs.h"
8876 #include <pthread.h>
8877 _ACEOF
8878 if { (eval echo "$as_me:8878: \"$ac_cpp conftest.$ac_ext\"") >&5
8879   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8880   ac_status=$?
8881   egrep -v '^ *\+' conftest.er1 >conftest.err
8882   rm -f conftest.er1
8883   cat conftest.err >&5
8884   echo "$as_me:8884: \$? = $ac_status" >&5
8885   (exit $ac_status); } >/dev/null; then
8886   if test -s conftest.err; then
8887     ac_cpp_err=$ac_c_preproc_warn_flag
8888   else
8889     ac_cpp_err=
8890   fi
8891 else
8892   ac_cpp_err=yes
8893 fi
8894 if test -z "$ac_cpp_err"; then
8895   ac_cv_header_pthread_h=yes
8896 else
8897   echo "$as_me: failed program was:" >&5
8898   cat conftest.$ac_ext >&5
8899   ac_cv_header_pthread_h=no
8900 fi
8901 rm -f conftest.err conftest.$ac_ext
8902 fi
8903 echo "$as_me:8903: result: $ac_cv_header_pthread_h" >&5
8904 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
8905 if test $ac_cv_header_pthread_h = yes; then
8906
8907         cat >>confdefs.h <<\EOF
8908 #define HAVE_PTHREADS_H 1
8909 EOF
8910
8911         echo "$as_me:8911: checking if we can link with the pthread library" >&5
8912 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
8913         cf_save_LIBS="$LIBS"
8914         LIBS="-lpthread $LIBS"
8915         cat >conftest.$ac_ext <<_ACEOF
8916 #line 8916 "configure"
8917 #include "confdefs.h"
8918
8919 #include <pthread.h>
8920
8921 int
8922 main ()
8923 {
8924
8925         int rc = pthread_create(0,0,0,0);
8926
8927   ;
8928   return 0;
8929 }
8930 _ACEOF
8931 rm -f conftest.$ac_objext conftest$ac_exeext
8932 if { (eval echo "$as_me:8932: \"$ac_link\"") >&5
8933   (eval $ac_link) 2>&5
8934   ac_status=$?
8935   echo "$as_me:8935: \$? = $ac_status" >&5
8936   (exit $ac_status); } &&
8937          { ac_try='test -s conftest$ac_exeext'
8938   { (eval echo "$as_me:8938: \"$ac_try\"") >&5
8939   (eval $ac_try) 2>&5
8940   ac_status=$?
8941   echo "$as_me:8941: \$? = $ac_status" >&5
8942   (exit $ac_status); }; }; then
8943   with_pthread=yes
8944 else
8945   echo "$as_me: failed program was:" >&5
8946 cat conftest.$ac_ext >&5
8947 with_pthread=no
8948 fi
8949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8950         LIBS="$cf_save_LIBS"
8951         echo "$as_me:8951: result: $with_pthread" >&5
8952 echo "${ECHO_T}$with_pthread" >&6
8953
8954         if test "$with_pthread" = yes ; then
8955             LIBS="-lpthread $LIBS"
8956             cat >>confdefs.h <<\EOF
8957 #define HAVE_LIBPTHREADS 1
8958 EOF
8959
8960         else
8961             { { echo "$as_me:8961: error: Cannot link with pthread library" >&5
8962 echo "$as_me: error: Cannot link with pthread library" >&2;}
8963    { (exit 1); exit 1; }; }
8964         fi
8965
8966 fi
8967
8968 fi
8969
8970 echo "$as_me:8970: checking if you want to use weak-symbols for pthreads" >&5
8971 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
8972
8973 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
8974 if test "${enable_weak_symbols+set}" = set; then
8975   enableval="$enable_weak_symbols"
8976   use_weak_symbols=$withval
8977 else
8978   use_weak_symbols=no
8979 fi;
8980 echo "$as_me:8980: result: $use_weak_symbols" >&5
8981 echo "${ECHO_T}$use_weak_symbols" >&6
8982 if test "$use_weak_symbols" = yes ; then
8983
8984 echo "$as_me:8984: checking if $CC supports weak symbols" >&5
8985 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
8986 if test "${cf_cv_weak_symbols+set}" = set; then
8987   echo $ECHO_N "(cached) $ECHO_C" >&6
8988 else
8989
8990 cat >conftest.$ac_ext <<_ACEOF
8991 #line 8991 "configure"
8992 #include "confdefs.h"
8993
8994 #include <stdio.h>
8995 int
8996 main ()
8997 {
8998
8999 #if defined(__GNUC__)
9000 #  if defined __USE_ISOC99
9001 #    define _cat_pragma(exp)    _Pragma(#exp)
9002 #    define _weak_pragma(exp)   _cat_pragma(weak name)
9003 #  else
9004 #    define _weak_pragma(exp)
9005 #  endif
9006 #  define _declare(name)        __extension__ extern __typeof__(name) name
9007 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
9008 #endif
9009
9010 weak_symbol(fopen);
9011
9012   ;
9013   return 0;
9014 }
9015 _ACEOF
9016 rm -f conftest.$ac_objext
9017 if { (eval echo "$as_me:9017: \"$ac_compile\"") >&5
9018   (eval $ac_compile) 2>&5
9019   ac_status=$?
9020   echo "$as_me:9020: \$? = $ac_status" >&5
9021   (exit $ac_status); } &&
9022          { ac_try='test -s conftest.$ac_objext'
9023   { (eval echo "$as_me:9023: \"$ac_try\"") >&5
9024   (eval $ac_try) 2>&5
9025   ac_status=$?
9026   echo "$as_me:9026: \$? = $ac_status" >&5
9027   (exit $ac_status); }; }; then
9028   cf_cv_weak_symbols=yes
9029 else
9030   echo "$as_me: failed program was:" >&5
9031 cat conftest.$ac_ext >&5
9032 cf_cv_weak_symbols=no
9033 fi
9034 rm -f conftest.$ac_objext conftest.$ac_ext
9035
9036 fi
9037 echo "$as_me:9037: result: $cf_cv_weak_symbols" >&5
9038 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
9039
9040 else
9041     cf_cv_weak_symbols=no
9042 fi
9043
9044 if test $cf_cv_weak_symbols = yes ; then
9045     cat >>confdefs.h <<\EOF
9046 #define USE_WEAK_SYMBOLS 1
9047 EOF
9048
9049 fi
9050
9051 PTHREAD=
9052 if test "$with_pthread" = "yes" ; then
9053     cat >>confdefs.h <<\EOF
9054 #define USE_PTHREADS 1
9055 EOF
9056
9057     enable_reentrant=yes
9058     if test $cf_cv_weak_symbols = yes ; then
9059         PTHREAD=-lpthread
9060     fi
9061 fi
9062
9063 # Reentrant code has to be opaque; there's little advantage to making ncurses
9064 # opaque outside of that, so there is no --enable-opaque option.  We can use
9065 # this option without --with-pthreads, but this will be always set for
9066 # pthreads.
9067 echo "$as_me:9067: checking if you want experimental reentrant code" >&5
9068 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
9069
9070 # Check whether --enable-reentrant or --disable-reentrant was given.
9071 if test "${enable_reentrant+set}" = set; then
9072   enableval="$enable_reentrant"
9073   with_reentrant=$enableval
9074 else
9075   with_reentrant=no
9076 fi;
9077 echo "$as_me:9077: result: $with_reentrant" >&5
9078 echo "${ECHO_T}$with_reentrant" >&6
9079 if test "$with_reentrant" = yes ; then
9080         cf_cv_enable_reentrant=1
9081         if test $cf_cv_weak_symbols = yes ; then
9082
9083 # remove pthread library from $LIBS
9084 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
9085
9086         else
9087                 LIB_SUFFIX="t${LIB_SUFFIX}"
9088         fi
9089         cat >>confdefs.h <<\EOF
9090 #define USE_REENTRANT 1
9091 EOF
9092
9093 else
9094         cf_cv_enable_reentrant=0
9095 fi
9096
9097 ### Allow using a different wrap-prefix
9098 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
9099         echo "$as_me:9099: checking for prefix used to wrap public variables" >&5
9100 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
9101
9102 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
9103 if test "${with_wrap_prefix+set}" = set; then
9104   withval="$with_wrap_prefix"
9105   NCURSES_WRAP_PREFIX=$withval
9106 else
9107   NCURSES_WRAP_PREFIX=_nc_
9108 fi;
9109         echo "$as_me:9109: result: $NCURSES_WRAP_PREFIX" >&5
9110 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
9111 else
9112         NCURSES_WRAP_PREFIX=_nc_
9113 fi
9114
9115 cat >>confdefs.h <<EOF
9116 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
9117 EOF
9118
9119 ###############################################################################
9120
9121 ###     use option --disable-echo to suppress full display compiling commands
9122 echo "$as_me:9122: checking if you want to display full commands during build" >&5
9123 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9124
9125 # Check whether --enable-echo or --disable-echo was given.
9126 if test "${enable_echo+set}" = set; then
9127   enableval="$enable_echo"
9128   with_echo=$enableval
9129 else
9130   with_echo=yes
9131 fi;
9132 if test "$with_echo" = yes; then
9133         ECHO_LINK=
9134 else
9135         ECHO_LINK='@ echo linking $@ ... ;'
9136 fi
9137 echo "$as_me:9137: result: $with_echo" >&5
9138 echo "${ECHO_T}$with_echo" >&6
9139
9140 ###     use option --enable-warnings to turn on all gcc warnings
9141 echo "$as_me:9141: checking if you want to see compiler warnings" >&5
9142 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9143
9144 # Check whether --enable-warnings or --disable-warnings was given.
9145 if test "${enable_warnings+set}" = set; then
9146   enableval="$enable_warnings"
9147   with_warnings=$enableval
9148 fi;
9149 echo "$as_me:9149: result: $with_warnings" >&5
9150 echo "${ECHO_T}$with_warnings" >&6
9151
9152 if test "x$with_warnings" = "xyes"; then
9153         ADAFLAGS="$ADAFLAGS -gnatg"
9154
9155 INTEL_COMPILER=no
9156
9157 if test "$GCC" = yes ; then
9158         case $host_os in
9159         linux*|gnu*)
9160                 echo "$as_me:9160: checking if this is really Intel C compiler" >&5
9161 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9162                 cf_save_CFLAGS="$CFLAGS"
9163                 CFLAGS="$CFLAGS -no-gcc"
9164                 cat >conftest.$ac_ext <<_ACEOF
9165 #line 9165 "configure"
9166 #include "confdefs.h"
9167
9168 int
9169 main ()
9170 {
9171
9172 #ifdef __INTEL_COMPILER
9173 #else
9174 make an error
9175 #endif
9176
9177   ;
9178   return 0;
9179 }
9180 _ACEOF
9181 rm -f conftest.$ac_objext
9182 if { (eval echo "$as_me:9182: \"$ac_compile\"") >&5
9183   (eval $ac_compile) 2>&5
9184   ac_status=$?
9185   echo "$as_me:9185: \$? = $ac_status" >&5
9186   (exit $ac_status); } &&
9187          { ac_try='test -s conftest.$ac_objext'
9188   { (eval echo "$as_me:9188: \"$ac_try\"") >&5
9189   (eval $ac_try) 2>&5
9190   ac_status=$?
9191   echo "$as_me:9191: \$? = $ac_status" >&5
9192   (exit $ac_status); }; }; then
9193   INTEL_COMPILER=yes
9194 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9195
9196 else
9197   echo "$as_me: failed program was:" >&5
9198 cat conftest.$ac_ext >&5
9199 fi
9200 rm -f conftest.$ac_objext conftest.$ac_ext
9201                 CFLAGS="$cf_save_CFLAGS"
9202                 echo "$as_me:9202: result: $INTEL_COMPILER" >&5
9203 echo "${ECHO_T}$INTEL_COMPILER" >&6
9204                 ;;
9205         esac
9206 fi
9207
9208 cat > conftest.$ac_ext <<EOF
9209 #line 9209 "${as_me-configure}"
9210 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9211 EOF
9212
9213 if test "$INTEL_COMPILER" = yes
9214 then
9215 # The "-wdXXX" options suppress warnings:
9216 # remark #1419: external declaration in primary source file
9217 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9218 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9219 # remark #193: zero used for undefined preprocessing identifier
9220 # remark #593: variable "curs_sb_left_arrow" was set but never used
9221 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9222 # remark #869: parameter "tw" was never referenced
9223 # remark #981: operands are evaluated in unspecified order
9224 # warning #279: controlling expression is constant
9225
9226         { echo "$as_me:9226: checking for $CC warning options..." >&5
9227 echo "$as_me: checking for $CC warning options..." >&6;}
9228         cf_save_CFLAGS="$CFLAGS"
9229         EXTRA_CFLAGS="-Wall"
9230         for cf_opt in \
9231                 wd1419 \
9232                 wd1683 \
9233                 wd1684 \
9234                 wd193 \
9235                 wd593 \
9236                 wd279 \
9237                 wd810 \
9238                 wd869 \
9239                 wd981
9240         do
9241                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9242                 if { (eval echo "$as_me:9242: \"$ac_compile\"") >&5
9243   (eval $ac_compile) 2>&5
9244   ac_status=$?
9245   echo "$as_me:9245: \$? = $ac_status" >&5
9246   (exit $ac_status); }; then
9247                         test -n "$verbose" && echo "$as_me:9247: result: ... -$cf_opt" >&5
9248 echo "${ECHO_T}... -$cf_opt" >&6
9249                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9250                 fi
9251         done
9252         CFLAGS="$cf_save_CFLAGS"
9253
9254 elif test "$GCC" = yes
9255 then
9256         { echo "$as_me:9256: checking for $CC warning options..." >&5
9257 echo "$as_me: checking for $CC warning options..." >&6;}
9258         cf_save_CFLAGS="$CFLAGS"
9259         EXTRA_CFLAGS=
9260         cf_warn_CONST=""
9261         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9262         for cf_opt in W Wall \
9263                 Wbad-function-cast \
9264                 Wcast-align \
9265                 Wcast-qual \
9266                 Winline \
9267                 Wmissing-declarations \
9268                 Wmissing-prototypes \
9269                 Wnested-externs \
9270                 Wpointer-arith \
9271                 Wshadow \
9272                 Wstrict-prototypes \
9273                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
9274         do
9275                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9276                 if { (eval echo "$as_me:9276: \"$ac_compile\"") >&5
9277   (eval $ac_compile) 2>&5
9278   ac_status=$?
9279   echo "$as_me:9279: \$? = $ac_status" >&5
9280   (exit $ac_status); }; then
9281                         test -n "$verbose" && echo "$as_me:9281: result: ... -$cf_opt" >&5
9282 echo "${ECHO_T}... -$cf_opt" >&6
9283                         case $cf_opt in #(vi
9284                         Wcast-qual) #(vi
9285                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9286                                 ;;
9287                         Winline) #(vi
9288                                 case $GCC_VERSION in
9289                                 [34].*)
9290                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9291
9292 echo "${as_me-configure}:9292: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
9293
9294                                         continue;;
9295                                 esac
9296                                 ;;
9297                         esac
9298                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9299                 fi
9300         done
9301         CFLAGS="$cf_save_CFLAGS"
9302 fi
9303 rm -f conftest*
9304
9305 fi
9306
9307 if test "$GCC" = yes
9308 then
9309 cat > conftest.i <<EOF
9310 #ifndef GCC_PRINTF
9311 #define GCC_PRINTF 0
9312 #endif
9313 #ifndef GCC_SCANF
9314 #define GCC_SCANF 0
9315 #endif
9316 #ifndef GCC_NORETURN
9317 #define GCC_NORETURN /* nothing */
9318 #endif
9319 #ifndef GCC_UNUSED
9320 #define GCC_UNUSED /* nothing */
9321 #endif
9322 EOF
9323 if test "$GCC" = yes
9324 then
9325         { echo "$as_me:9325: checking for $CC __attribute__ directives..." >&5
9326 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9328 "${as_me-configure}"
9329 #include "confdefs.h"
9330 #include "conftest.h"
9331 #include "conftest.i"
9332 #if     GCC_PRINTF
9333 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9334 #else
9335 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9336 #endif
9337 #if     GCC_SCANF
9338 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9339 #else
9340 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9341 #endif
9342 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9343 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9344 extern void foo(void) GCC_NORETURN;
9345 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9346 EOF
9347         cf_printf_attribute=no
9348         cf_scanf_attribute=no
9349         for cf_attribute in scanf printf unused noreturn
9350         do
9351
9352 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9353
9354                 cf_directive="__attribute__(($cf_attribute))"
9355                 echo "checking for $CC $cf_directive" 1>&5
9356
9357                 case $cf_attribute in #(vi
9358                 printf) #(vi
9359                         cf_printf_attribute=yes
9360                         cat >conftest.h <<EOF
9361 #define GCC_$cf_ATTRIBUTE 1
9362 EOF
9363                         ;;
9364                 scanf) #(vi
9365                         cf_scanf_attribute=yes
9366                         cat >conftest.h <<EOF
9367 #define GCC_$cf_ATTRIBUTE 1
9368 EOF
9369                         ;;
9370                 *) #(vi
9371                         cat >conftest.h <<EOF
9372 #define GCC_$cf_ATTRIBUTE $cf_directive
9373 EOF
9374                         ;;
9375                 esac
9376
9377                 if { (eval echo "$as_me:9377: \"$ac_compile\"") >&5
9378   (eval $ac_compile) 2>&5
9379   ac_status=$?
9380   echo "$as_me:9380: \$? = $ac_status" >&5
9381   (exit $ac_status); }; then
9382                         test -n "$verbose" && echo "$as_me:9382: result: ... $cf_attribute" >&5
9383 echo "${ECHO_T}... $cf_attribute" >&6
9384                         cat conftest.h >>confdefs.h
9385                         case $cf_attribute in #(vi
9386                         printf) #(vi
9387                                 if test "$cf_printf_attribute" = no ; then
9388                                         cat >>confdefs.h <<EOF
9389 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
9390 EOF
9391                                 else
9392                                         cat >>confdefs.h <<EOF
9393 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9394 EOF
9395                                 fi
9396                                 ;;
9397                         scanf) #(vi
9398                                 if test "$cf_scanf_attribute" = no ; then
9399                                         cat >>confdefs.h <<EOF
9400 #define GCC_SCANFLIKE(fmt,var) /* nothing */
9401 EOF
9402                                 else
9403                                         cat >>confdefs.h <<EOF
9404 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9405 EOF
9406                                 fi
9407                                 ;;
9408                         esac
9409                 fi
9410         done
9411 else
9412         fgrep define conftest.i >>confdefs.h
9413 fi
9414 rm -rf conftest*
9415 fi
9416
9417 ###     use option --enable-assertions to turn on generation of assertion code
9418 echo "$as_me:9418: checking if you want to enable runtime assertions" >&5
9419 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9420
9421 # Check whether --enable-assertions or --disable-assertions was given.
9422 if test "${enable_assertions+set}" = set; then
9423   enableval="$enable_assertions"
9424   with_assertions=$enableval
9425 else
9426   with_assertions=no
9427 fi;
9428 echo "$as_me:9428: result: $with_assertions" >&5
9429 echo "${ECHO_T}$with_assertions" >&6
9430 if test -n "$GCC"
9431 then
9432         if test "$with_assertions" = no
9433         then
9434                 cat >>confdefs.h <<\EOF
9435 #define NDEBUG 1
9436 EOF
9437
9438                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9439         else
9440                 ADAFLAGS="$ADAFLAGS -gnata"
9441         fi
9442 fi
9443
9444 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9445 cat >>confdefs.h <<\EOF
9446 #define HAVE_NC_ALLOC_H 1
9447 EOF
9448
9449 ###     use option --enable-expanded to generate certain macros as functions
9450
9451 # Check whether --enable-expanded or --disable-expanded was given.
9452 if test "${enable_expanded+set}" = set; then
9453   enableval="$enable_expanded"
9454   test "$enableval" = yes && cat >>confdefs.h <<\EOF
9455 #define NCURSES_EXPANDED 1
9456 EOF
9457
9458 fi;
9459
9460 ###     use option --disable-macros to suppress macros in favor of functions
9461
9462 # Check whether --enable-macros or --disable-macros was given.
9463 if test "${enable_macros+set}" = set; then
9464   enableval="$enable_macros"
9465   test "$enableval" = no && cat >>confdefs.h <<\EOF
9466 #define NCURSES_NOMACROS 1
9467 EOF
9468
9469 fi;
9470
9471 # Normally we only add trace() to the debug-library.  Allow this to be
9472 # extended to all models of the ncurses library:
9473 cf_all_traces=no
9474 case "$CFLAGS $CPPFLAGS" in
9475 *-DTRACE*)
9476         cf_all_traces=yes
9477         ;;
9478 esac
9479
9480 echo "$as_me:9480: checking whether to add trace feature to all models" >&5
9481 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
9482
9483 # Check whether --with-trace or --without-trace was given.
9484 if test "${with_trace+set}" = set; then
9485   withval="$with_trace"
9486   cf_with_trace=$withval
9487 else
9488   cf_with_trace=$cf_all_traces
9489 fi;
9490 echo "$as_me:9490: result: $cf_with_trace" >&5
9491 echo "${ECHO_T}$cf_with_trace" >&6
9492
9493 if test "$cf_with_trace" = yes ; then
9494         ADA_TRACE=TRUE
9495
9496 cf_fix_cppflags=no
9497 cf_new_cflags=
9498 cf_new_cppflags=
9499 cf_new_extra_cppflags=
9500
9501 for cf_add_cflags in -DTRACE
9502 do
9503 case $cf_fix_cppflags in
9504 no)
9505         case $cf_add_cflags in #(vi
9506         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9507                 case $cf_add_cflags in
9508                 -D*)
9509                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9510
9511                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9512                                 && test -z "${cf_tst_cflags}" \
9513                                 && cf_fix_cppflags=yes
9514
9515                         if test $cf_fix_cppflags = yes ; then
9516                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9517                                 continue
9518                         elif test "${cf_tst_cflags}" = "\"'" ; then
9519                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9520                                 continue
9521                         fi
9522                         ;;
9523                 esac
9524                 case "$CPPFLAGS" in
9525                 *$cf_add_cflags) #(vi
9526                         ;;
9527                 *) #(vi
9528                         case $cf_add_cflags in #(vi
9529                         -D*)
9530                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9531
9532 CPPFLAGS=`echo "$CPPFLAGS" | \
9533         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9534                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9535
9536                                 ;;
9537                         esac
9538                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9539                         ;;
9540                 esac
9541                 ;;
9542         *)
9543                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9544                 ;;
9545         esac
9546         ;;
9547 yes)
9548         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9549
9550         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9551
9552         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9553                 && test -z "${cf_tst_cflags}" \
9554                 && cf_fix_cppflags=no
9555         ;;
9556 esac
9557 done
9558
9559 if test -n "$cf_new_cflags" ; then
9560
9561         CFLAGS="$CFLAGS $cf_new_cflags"
9562 fi
9563
9564 if test -n "$cf_new_cppflags" ; then
9565
9566         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9567 fi
9568
9569 if test -n "$cf_new_extra_cppflags" ; then
9570
9571         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9572 fi
9573
9574 else
9575         ADA_TRACE=FALSE
9576 fi
9577
9578 ###     Checks for libraries.
9579 case $cf_cv_system_name in #(vi
9580 *mingw32*) #(vi
9581         ;;
9582 *)
9583 echo "$as_me:9583: checking for gettimeofday" >&5
9584 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9585 if test "${ac_cv_func_gettimeofday+set}" = set; then
9586   echo $ECHO_N "(cached) $ECHO_C" >&6
9587 else
9588   cat >conftest.$ac_ext <<_ACEOF
9589 #line 9589 "configure"
9590 #include "confdefs.h"
9591 /* System header to define __stub macros and hopefully few prototypes,
9592     which can conflict with char gettimeofday (); below.  */
9593 #include <assert.h>
9594 /* Override any gcc2 internal prototype to avoid an error.  */
9595 #ifdef __cplusplus
9596 extern "C"
9597 #endif
9598 /* We use char because int might match the return type of a gcc2
9599    builtin and then its argument prototype would still apply.  */
9600 char gettimeofday ();
9601 char (*f) ();
9602
9603 int
9604 main ()
9605 {
9606 /* The GNU C library defines this for functions which it implements
9607     to always fail with ENOSYS.  Some functions are actually named
9608     something starting with __ and the normal name is an alias.  */
9609 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9610 choke me
9611 #else
9612 f = gettimeofday;
9613 #endif
9614
9615   ;
9616   return 0;
9617 }
9618 _ACEOF
9619 rm -f conftest.$ac_objext conftest$ac_exeext
9620 if { (eval echo "$as_me:9620: \"$ac_link\"") >&5
9621   (eval $ac_link) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit $ac_status); } &&
9625          { ac_try='test -s conftest$ac_exeext'
9626   { (eval echo "$as_me:9626: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit $ac_status); }; }; then
9631   ac_cv_func_gettimeofday=yes
9632 else
9633   echo "$as_me: failed program was:" >&5
9634 cat conftest.$ac_ext >&5
9635 ac_cv_func_gettimeofday=no
9636 fi
9637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9638 fi
9639 echo "$as_me:9639: result: $ac_cv_func_gettimeofday" >&5
9640 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9641 if test $ac_cv_func_gettimeofday = yes; then
9642   cat >>confdefs.h <<\EOF
9643 #define HAVE_GETTIMEOFDAY 1
9644 EOF
9645
9646 else
9647
9648 echo "$as_me:9648: checking for gettimeofday in -lbsd" >&5
9649 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9650 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9651   echo $ECHO_N "(cached) $ECHO_C" >&6
9652 else
9653   ac_check_lib_save_LIBS=$LIBS
9654 LIBS="-lbsd  $LIBS"
9655 cat >conftest.$ac_ext <<_ACEOF
9656 #line 9656 "configure"
9657 #include "confdefs.h"
9658
9659 /* Override any gcc2 internal prototype to avoid an error.  */
9660 #ifdef __cplusplus
9661 extern "C"
9662 #endif
9663 /* We use char because int might match the return type of a gcc2
9664    builtin and then its argument prototype would still apply.  */
9665 char gettimeofday ();
9666 int
9667 main ()
9668 {
9669 gettimeofday ();
9670   ;
9671   return 0;
9672 }
9673 _ACEOF
9674 rm -f conftest.$ac_objext conftest$ac_exeext
9675 if { (eval echo "$as_me:9675: \"$ac_link\"") >&5
9676   (eval $ac_link) 2>&5
9677   ac_status=$?
9678   echo "$as_me:9678: \$? = $ac_status" >&5
9679   (exit $ac_status); } &&
9680          { ac_try='test -s conftest$ac_exeext'
9681   { (eval echo "$as_me:9681: \"$ac_try\"") >&5
9682   (eval $ac_try) 2>&5
9683   ac_status=$?
9684   echo "$as_me:9684: \$? = $ac_status" >&5
9685   (exit $ac_status); }; }; then
9686   ac_cv_lib_bsd_gettimeofday=yes
9687 else
9688   echo "$as_me: failed program was:" >&5
9689 cat conftest.$ac_ext >&5
9690 ac_cv_lib_bsd_gettimeofday=no
9691 fi
9692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9693 LIBS=$ac_check_lib_save_LIBS
9694 fi
9695 echo "$as_me:9695: result: $ac_cv_lib_bsd_gettimeofday" >&5
9696 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9697 if test $ac_cv_lib_bsd_gettimeofday = yes; then
9698   cat >>confdefs.h <<\EOF
9699 #define HAVE_GETTIMEOFDAY 1
9700 EOF
9701
9702         LIBS="$LIBS -lbsd"
9703 fi
9704
9705 fi
9706         ;;
9707 esac
9708
9709 ###     Checks for header files.
9710 echo "$as_me:9710: checking for ANSI C header files" >&5
9711 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9712 if test "${ac_cv_header_stdc+set}" = set; then
9713   echo $ECHO_N "(cached) $ECHO_C" >&6
9714 else
9715   cat >conftest.$ac_ext <<_ACEOF
9716 #line 9716 "configure"
9717 #include "confdefs.h"
9718 #include <stdlib.h>
9719 #include <stdarg.h>
9720 #include <string.h>
9721 #include <float.h>
9722
9723 _ACEOF
9724 if { (eval echo "$as_me:9724: \"$ac_cpp conftest.$ac_ext\"") >&5
9725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9726   ac_status=$?
9727   egrep -v '^ *\+' conftest.er1 >conftest.err
9728   rm -f conftest.er1
9729   cat conftest.err >&5
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); } >/dev/null; then
9732   if test -s conftest.err; then
9733     ac_cpp_err=$ac_c_preproc_warn_flag
9734   else
9735     ac_cpp_err=
9736   fi
9737 else
9738   ac_cpp_err=yes
9739 fi
9740 if test -z "$ac_cpp_err"; then
9741   ac_cv_header_stdc=yes
9742 else
9743   echo "$as_me: failed program was:" >&5
9744   cat conftest.$ac_ext >&5
9745   ac_cv_header_stdc=no
9746 fi
9747 rm -f conftest.err conftest.$ac_ext
9748
9749 if test $ac_cv_header_stdc = yes; then
9750   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9751   cat >conftest.$ac_ext <<_ACEOF
9752 #line 9752 "configure"
9753 #include "confdefs.h"
9754 #include <string.h>
9755
9756 _ACEOF
9757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9758   egrep "memchr" >/dev/null 2>&1; then
9759   :
9760 else
9761   ac_cv_header_stdc=no
9762 fi
9763 rm -f conftest*
9764
9765 fi
9766
9767 if test $ac_cv_header_stdc = yes; then
9768   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9769   cat >conftest.$ac_ext <<_ACEOF
9770 #line 9770 "configure"
9771 #include "confdefs.h"
9772 #include <stdlib.h>
9773
9774 _ACEOF
9775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9776   egrep "free" >/dev/null 2>&1; then
9777   :
9778 else
9779   ac_cv_header_stdc=no
9780 fi
9781 rm -f conftest*
9782
9783 fi
9784
9785 if test $ac_cv_header_stdc = yes; then
9786   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9787   if test "$cross_compiling" = yes; then
9788   :
9789 else
9790   cat >conftest.$ac_ext <<_ACEOF
9791 #line 9791 "configure"
9792 #include "confdefs.h"
9793 #include <ctype.h>
9794 #if ((' ' & 0x0FF) == 0x020)
9795 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9796 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9797 #else
9798 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9799                      || ('j' <= (c) && (c) <= 'r') \
9800                      || ('s' <= (c) && (c) <= 'z'))
9801 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9802 #endif
9803
9804 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9805 int
9806 main ()
9807 {
9808   int i;
9809   for (i = 0; i < 256; i++)
9810     if (XOR (islower (i), ISLOWER (i))
9811         || toupper (i) != TOUPPER (i))
9812       $ac_main_return(2);
9813   $ac_main_return (0);
9814 }
9815 _ACEOF
9816 rm -f conftest$ac_exeext
9817 if { (eval echo "$as_me:9817: \"$ac_link\"") >&5
9818   (eval $ac_link) 2>&5
9819   ac_status=$?
9820   echo "$as_me:9820: \$? = $ac_status" >&5
9821   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9822   { (eval echo "$as_me:9822: \"$ac_try\"") >&5
9823   (eval $ac_try) 2>&5
9824   ac_status=$?
9825   echo "$as_me:9825: \$? = $ac_status" >&5
9826   (exit $ac_status); }; }; then
9827   :
9828 else
9829   echo "$as_me: program exited with status $ac_status" >&5
9830 echo "$as_me: failed program was:" >&5
9831 cat conftest.$ac_ext >&5
9832 ac_cv_header_stdc=no
9833 fi
9834 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9835 fi
9836 fi
9837 fi
9838 echo "$as_me:9838: result: $ac_cv_header_stdc" >&5
9839 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9840 if test $ac_cv_header_stdc = yes; then
9841
9842 cat >>confdefs.h <<\EOF
9843 #define STDC_HEADERS 1
9844 EOF
9845
9846 fi
9847
9848 ac_header_dirent=no
9849 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9850   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9851 echo "$as_me:9851: checking for $ac_hdr that defines DIR" >&5
9852 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9853 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9854   echo $ECHO_N "(cached) $ECHO_C" >&6
9855 else
9856   cat >conftest.$ac_ext <<_ACEOF
9857 #line 9857 "configure"
9858 #include "confdefs.h"
9859 #include <sys/types.h>
9860 #include <$ac_hdr>
9861
9862 int
9863 main ()
9864 {
9865 if ((DIR *) 0)
9866 return 0;
9867   ;
9868   return 0;
9869 }
9870 _ACEOF
9871 rm -f conftest.$ac_objext
9872 if { (eval echo "$as_me:9872: \"$ac_compile\"") >&5
9873   (eval $ac_compile) 2>&5
9874   ac_status=$?
9875   echo "$as_me:9875: \$? = $ac_status" >&5
9876   (exit $ac_status); } &&
9877          { ac_try='test -s conftest.$ac_objext'
9878   { (eval echo "$as_me:9878: \"$ac_try\"") >&5
9879   (eval $ac_try) 2>&5
9880   ac_status=$?
9881   echo "$as_me:9881: \$? = $ac_status" >&5
9882   (exit $ac_status); }; }; then
9883   eval "$as_ac_Header=yes"
9884 else
9885   echo "$as_me: failed program was:" >&5
9886 cat conftest.$ac_ext >&5
9887 eval "$as_ac_Header=no"
9888 fi
9889 rm -f conftest.$ac_objext conftest.$ac_ext
9890 fi
9891 echo "$as_me:9891: result: `eval echo '${'$as_ac_Header'}'`" >&5
9892 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9893 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9894   cat >>confdefs.h <<EOF
9895 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9896 EOF
9897
9898 ac_header_dirent=$ac_hdr; break
9899 fi
9900
9901 done
9902 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9903 if test $ac_header_dirent = dirent.h; then
9904   echo "$as_me:9904: checking for opendir in -ldir" >&5
9905 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
9906 if test "${ac_cv_lib_dir_opendir+set}" = set; then
9907   echo $ECHO_N "(cached) $ECHO_C" >&6
9908 else
9909   ac_check_lib_save_LIBS=$LIBS
9910 LIBS="-ldir  $LIBS"
9911 cat >conftest.$ac_ext <<_ACEOF
9912 #line 9912 "configure"
9913 #include "confdefs.h"
9914
9915 /* Override any gcc2 internal prototype to avoid an error.  */
9916 #ifdef __cplusplus
9917 extern "C"
9918 #endif
9919 /* We use char because int might match the return type of a gcc2
9920    builtin and then its argument prototype would still apply.  */
9921 char opendir ();
9922 int
9923 main ()
9924 {
9925 opendir ();
9926   ;
9927   return 0;
9928 }
9929 _ACEOF
9930 rm -f conftest.$ac_objext conftest$ac_exeext
9931 if { (eval echo "$as_me:9931: \"$ac_link\"") >&5
9932   (eval $ac_link) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); } &&
9936          { ac_try='test -s conftest$ac_exeext'
9937   { (eval echo "$as_me:9937: \"$ac_try\"") >&5
9938   (eval $ac_try) 2>&5
9939   ac_status=$?
9940   echo "$as_me:9940: \$? = $ac_status" >&5
9941   (exit $ac_status); }; }; then
9942   ac_cv_lib_dir_opendir=yes
9943 else
9944   echo "$as_me: failed program was:" >&5
9945 cat conftest.$ac_ext >&5
9946 ac_cv_lib_dir_opendir=no
9947 fi
9948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9949 LIBS=$ac_check_lib_save_LIBS
9950 fi
9951 echo "$as_me:9951: result: $ac_cv_lib_dir_opendir" >&5
9952 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
9953 if test $ac_cv_lib_dir_opendir = yes; then
9954   LIBS="$LIBS -ldir"
9955 fi
9956
9957 else
9958   echo "$as_me:9958: checking for opendir in -lx" >&5
9959 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
9960 if test "${ac_cv_lib_x_opendir+set}" = set; then
9961   echo $ECHO_N "(cached) $ECHO_C" >&6
9962 else
9963   ac_check_lib_save_LIBS=$LIBS
9964 LIBS="-lx  $LIBS"
9965 cat >conftest.$ac_ext <<_ACEOF
9966 #line 9966 "configure"
9967 #include "confdefs.h"
9968
9969 /* Override any gcc2 internal prototype to avoid an error.  */
9970 #ifdef __cplusplus
9971 extern "C"
9972 #endif
9973 /* We use char because int might match the return type of a gcc2
9974    builtin and then its argument prototype would still apply.  */
9975 char opendir ();
9976 int
9977 main ()
9978 {
9979 opendir ();
9980   ;
9981   return 0;
9982 }
9983 _ACEOF
9984 rm -f conftest.$ac_objext conftest$ac_exeext
9985 if { (eval echo "$as_me:9985: \"$ac_link\"") >&5
9986   (eval $ac_link) 2>&5
9987   ac_status=$?
9988   echo "$as_me:9988: \$? = $ac_status" >&5
9989   (exit $ac_status); } &&
9990          { ac_try='test -s conftest$ac_exeext'
9991   { (eval echo "$as_me:9991: \"$ac_try\"") >&5
9992   (eval $ac_try) 2>&5
9993   ac_status=$?
9994   echo "$as_me:9994: \$? = $ac_status" >&5
9995   (exit $ac_status); }; }; then
9996   ac_cv_lib_x_opendir=yes
9997 else
9998   echo "$as_me: failed program was:" >&5
9999 cat conftest.$ac_ext >&5
10000 ac_cv_lib_x_opendir=no
10001 fi
10002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10003 LIBS=$ac_check_lib_save_LIBS
10004 fi
10005 echo "$as_me:10005: result: $ac_cv_lib_x_opendir" >&5
10006 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10007 if test $ac_cv_lib_x_opendir = yes; then
10008   LIBS="$LIBS -lx"
10009 fi
10010
10011 fi
10012
10013 echo "$as_me:10013: checking whether time.h and sys/time.h may both be included" >&5
10014 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10015 if test "${ac_cv_header_time+set}" = set; then
10016   echo $ECHO_N "(cached) $ECHO_C" >&6
10017 else
10018   cat >conftest.$ac_ext <<_ACEOF
10019 #line 10019 "configure"
10020 #include "confdefs.h"
10021 #include <sys/types.h>
10022 #include <sys/time.h>
10023 #include <time.h>
10024
10025 int
10026 main ()
10027 {
10028 if ((struct tm *) 0)
10029 return 0;
10030   ;
10031   return 0;
10032 }
10033 _ACEOF
10034 rm -f conftest.$ac_objext
10035 if { (eval echo "$as_me:10035: \"$ac_compile\"") >&5
10036   (eval $ac_compile) 2>&5
10037   ac_status=$?
10038   echo "$as_me:10038: \$? = $ac_status" >&5
10039   (exit $ac_status); } &&
10040          { ac_try='test -s conftest.$ac_objext'
10041   { (eval echo "$as_me:10041: \"$ac_try\"") >&5
10042   (eval $ac_try) 2>&5
10043   ac_status=$?
10044   echo "$as_me:10044: \$? = $ac_status" >&5
10045   (exit $ac_status); }; }; then
10046   ac_cv_header_time=yes
10047 else
10048   echo "$as_me: failed program was:" >&5
10049 cat conftest.$ac_ext >&5
10050 ac_cv_header_time=no
10051 fi
10052 rm -f conftest.$ac_objext conftest.$ac_ext
10053 fi
10054 echo "$as_me:10054: result: $ac_cv_header_time" >&5
10055 echo "${ECHO_T}$ac_cv_header_time" >&6
10056 if test $ac_cv_header_time = yes; then
10057
10058 cat >>confdefs.h <<\EOF
10059 #define TIME_WITH_SYS_TIME 1
10060 EOF
10061
10062 fi
10063
10064 ###     checks for compiler characteristics
10065 ac_ext=c
10066 ac_cpp='$CPP $CPPFLAGS'
10067 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10068 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10069 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10070 ac_main_return=return
10071
10072 echo "$as_me:10072: checking for $CC option to accept ANSI C" >&5
10073 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
10074 if test "${ac_cv_prog_cc_stdc+set}" = set; then
10075   echo $ECHO_N "(cached) $ECHO_C" >&6
10076 else
10077   ac_cv_prog_cc_stdc=no
10078 ac_save_CC=$CC
10079 cat >conftest.$ac_ext <<_ACEOF
10080 #line 10080 "configure"
10081 #include "confdefs.h"
10082 #include <stdarg.h>
10083 #include <stdio.h>
10084 #include <sys/types.h>
10085 #include <sys/stat.h>
10086 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
10087 struct buf { int x; };
10088 FILE * (*rcsopen) (struct buf *, struct stat *, int);
10089 static char *e (p, i)
10090      char **p;
10091      int i;
10092 {
10093   return p[i];
10094 }
10095 static char *f (char * (*g) (char **, int), char **p, ...)
10096 {
10097   char *s;
10098   va_list v;
10099   va_start (v,p);
10100   s = g (p, va_arg (v,int));
10101   va_end (v);
10102   return s;
10103 }
10104 int test (int i, double x);
10105 struct s1 {int (*f) (int a);};
10106 struct s2 {int (*f) (double a);};
10107 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
10108 int argc;
10109 char **argv;
10110 int
10111 main ()
10112 {
10113 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
10114   ;
10115   return 0;
10116 }
10117 _ACEOF
10118 # Don't try gcc -ansi; that turns off useful extensions and
10119 # breaks some systems' header files.
10120 # AIX                   -qlanglvl=ansi
10121 # Ultrix and OSF/1      -std1
10122 # HP-UX 10.20 and later -Ae
10123 # HP-UX older versions  -Aa -D_HPUX_SOURCE
10124 # SVR4                  -Xc -D__EXTENSIONS__
10125 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10126 do
10127   CC="$ac_save_CC $ac_arg"
10128   rm -f conftest.$ac_objext
10129 if { (eval echo "$as_me:10129: \"$ac_compile\"") >&5
10130   (eval $ac_compile) 2>&5
10131   ac_status=$?
10132   echo "$as_me:10132: \$? = $ac_status" >&5
10133   (exit $ac_status); } &&
10134          { ac_try='test -s conftest.$ac_objext'
10135   { (eval echo "$as_me:10135: \"$ac_try\"") >&5
10136   (eval $ac_try) 2>&5
10137   ac_status=$?
10138   echo "$as_me:10138: \$? = $ac_status" >&5
10139   (exit $ac_status); }; }; then
10140   ac_cv_prog_cc_stdc=$ac_arg
10141 break
10142 else
10143   echo "$as_me: failed program was:" >&5
10144 cat conftest.$ac_ext >&5
10145 fi
10146 rm -f conftest.$ac_objext
10147 done
10148 rm -f conftest.$ac_ext conftest.$ac_objext
10149 CC=$ac_save_CC
10150
10151 fi
10152
10153 case "x$ac_cv_prog_cc_stdc" in
10154   x|xno)
10155     echo "$as_me:10155: result: none needed" >&5
10156 echo "${ECHO_T}none needed" >&6 ;;
10157   *)
10158     echo "$as_me:10158: result: $ac_cv_prog_cc_stdc" >&5
10159 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10160     CC="$CC $ac_cv_prog_cc_stdc" ;;
10161 esac
10162
10163 echo "$as_me:10163: checking for an ANSI C-conforming const" >&5
10164 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10165 if test "${ac_cv_c_const+set}" = set; then
10166   echo $ECHO_N "(cached) $ECHO_C" >&6
10167 else
10168   cat >conftest.$ac_ext <<_ACEOF
10169 #line 10169 "configure"
10170 #include "confdefs.h"
10171
10172 int
10173 main ()
10174 {
10175 /* FIXME: Include the comments suggested by Paul. */
10176 #ifndef __cplusplus
10177   /* Ultrix mips cc rejects this.  */
10178   typedef int charset[2];
10179   const charset x;
10180   /* SunOS 4.1.1 cc rejects this.  */
10181   char const *const *ccp;
10182   char **p;
10183   /* NEC SVR4.0.2 mips cc rejects this.  */
10184   struct point {int x, y;};
10185   static struct point const zero = {0,0};
10186   /* AIX XL C 1.02.0.0 rejects this.
10187      It does not let you subtract one const X* pointer from another in
10188      an arm of an if-expression whose if-part is not a constant
10189      expression */
10190   const char *g = "string";
10191   ccp = &g + (g ? g-g : 0);
10192   /* HPUX 7.0 cc rejects these. */
10193   ++ccp;
10194   p = (char**) ccp;
10195   ccp = (char const *const *) p;
10196   { /* SCO 3.2v4 cc rejects this.  */
10197     char *t;
10198     char const *s = 0 ? (char *) 0 : (char const *) 0;
10199
10200     *t++ = 0;
10201   }
10202   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10203     int x[] = {25, 17};
10204     const int *foo = &x[0];
10205     ++foo;
10206   }
10207   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10208     typedef const int *iptr;
10209     iptr p = 0;
10210     ++p;
10211   }
10212   { /* AIX XL C 1.02.0.0 rejects this saying
10213        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10214     struct s { int j; const int *ap[3]; };
10215     struct s *b; b->j = 5;
10216   }
10217   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10218     const int foo = 10;
10219   }
10220 #endif
10221
10222   ;
10223   return 0;
10224 }
10225 _ACEOF
10226 rm -f conftest.$ac_objext
10227 if { (eval echo "$as_me:10227: \"$ac_compile\"") >&5
10228   (eval $ac_compile) 2>&5
10229   ac_status=$?
10230   echo "$as_me:10230: \$? = $ac_status" >&5
10231   (exit $ac_status); } &&
10232          { ac_try='test -s conftest.$ac_objext'
10233   { (eval echo "$as_me:10233: \"$ac_try\"") >&5
10234   (eval $ac_try) 2>&5
10235   ac_status=$?
10236   echo "$as_me:10236: \$? = $ac_status" >&5
10237   (exit $ac_status); }; }; then
10238   ac_cv_c_const=yes
10239 else
10240   echo "$as_me: failed program was:" >&5
10241 cat conftest.$ac_ext >&5
10242 ac_cv_c_const=no
10243 fi
10244 rm -f conftest.$ac_objext conftest.$ac_ext
10245 fi
10246 echo "$as_me:10246: result: $ac_cv_c_const" >&5
10247 echo "${ECHO_T}$ac_cv_c_const" >&6
10248 if test $ac_cv_c_const = no; then
10249
10250 cat >>confdefs.h <<\EOF
10251 #define const
10252 EOF
10253
10254 fi
10255
10256 ###     Checks for external-data
10257
10258 echo "$as_me:10258: checking if data-only library module links" >&5
10259 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10260 if test "${cf_cv_link_dataonly+set}" = set; then
10261   echo $ECHO_N "(cached) $ECHO_C" >&6
10262 else
10263
10264         rm -f conftest.a
10265         cat >conftest.$ac_ext <<EOF
10266 #line 10266 "configure"
10267 int     testdata[3] = { 123, 456, 789 };
10268 EOF
10269         if { (eval echo "$as_me:10269: \"$ac_compile\"") >&5
10270   (eval $ac_compile) 2>&5
10271   ac_status=$?
10272   echo "$as_me:10272: \$? = $ac_status" >&5
10273   (exit $ac_status); } ; then
10274                 mv conftest.o data.o && \
10275                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
10276         fi
10277         rm -f conftest.$ac_ext data.o
10278         cat >conftest.$ac_ext <<EOF
10279 #line 10279 "configure"
10280 int     testfunc()
10281 {
10282 #if defined(NeXT)
10283         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
10284 #else
10285         extern int testdata[3];
10286         return testdata[0] == 123
10287            &&  testdata[1] == 456
10288            &&  testdata[2] == 789;
10289 #endif
10290 }
10291 EOF
10292         if { (eval echo "$as_me:10292: \"$ac_compile\"") >&5
10293   (eval $ac_compile) 2>&5
10294   ac_status=$?
10295   echo "$as_me:10295: \$? = $ac_status" >&5
10296   (exit $ac_status); }; then
10297                 mv conftest.o func.o && \
10298                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
10299         fi
10300         rm -f conftest.$ac_ext func.o
10301         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10302         cf_saveLIBS="$LIBS"
10303         LIBS="conftest.a $LIBS"
10304         if test "$cross_compiling" = yes; then
10305   cf_cv_link_dataonly=unknown
10306 else
10307   cat >conftest.$ac_ext <<_ACEOF
10308 #line 10308 "configure"
10309 #include "confdefs.h"
10310
10311         int main()
10312         {
10313                 extern int testfunc();
10314                 ${cf_cv_main_return:-return} (!testfunc());
10315         }
10316
10317 _ACEOF
10318 rm -f conftest$ac_exeext
10319 if { (eval echo "$as_me:10319: \"$ac_link\"") >&5
10320   (eval $ac_link) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10324   { (eval echo "$as_me:10324: \"$ac_try\"") >&5
10325   (eval $ac_try) 2>&5
10326   ac_status=$?
10327   echo "$as_me:10327: \$? = $ac_status" >&5
10328   (exit $ac_status); }; }; then
10329   cf_cv_link_dataonly=yes
10330 else
10331   echo "$as_me: program exited with status $ac_status" >&5
10332 echo "$as_me: failed program was:" >&5
10333 cat conftest.$ac_ext >&5
10334 cf_cv_link_dataonly=no
10335 fi
10336 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10337 fi
10338         LIBS="$cf_saveLIBS"
10339
10340 fi
10341
10342 echo "$as_me:10342: result: $cf_cv_link_dataonly" >&5
10343 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10344
10345 if test "$cf_cv_link_dataonly" = no ; then
10346         cat >>confdefs.h <<\EOF
10347 #define BROKEN_LINKER 1
10348 EOF
10349
10350         BROKEN_LINKER=1
10351 fi
10352
10353 ###     Checks for library functions.
10354
10355 echo "$as_me:10355: checking for working mkstemp" >&5
10356 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
10357 if test "${cf_cv_func_mkstemp+set}" = set; then
10358   echo $ECHO_N "(cached) $ECHO_C" >&6
10359 else
10360
10361 rm -f conftest*
10362 if test "$cross_compiling" = yes; then
10363   echo "$as_me:10363: checking for mkstemp" >&5
10364 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
10365 if test "${ac_cv_func_mkstemp+set}" = set; then
10366   echo $ECHO_N "(cached) $ECHO_C" >&6
10367 else
10368   cat >conftest.$ac_ext <<_ACEOF
10369 #line 10369 "configure"
10370 #include "confdefs.h"
10371 /* System header to define __stub macros and hopefully few prototypes,
10372     which can conflict with char mkstemp (); below.  */
10373 #include <assert.h>
10374 /* Override any gcc2 internal prototype to avoid an error.  */
10375 #ifdef __cplusplus
10376 extern "C"
10377 #endif
10378 /* We use char because int might match the return type of a gcc2
10379    builtin and then its argument prototype would still apply.  */
10380 char mkstemp ();
10381 char (*f) ();
10382
10383 int
10384 main ()
10385 {
10386 /* The GNU C library defines this for functions which it implements
10387     to always fail with ENOSYS.  Some functions are actually named
10388     something starting with __ and the normal name is an alias.  */
10389 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
10390 choke me
10391 #else
10392 f = mkstemp;
10393 #endif
10394
10395   ;
10396   return 0;
10397 }
10398 _ACEOF
10399 rm -f conftest.$ac_objext conftest$ac_exeext
10400 if { (eval echo "$as_me:10400: \"$ac_link\"") >&5
10401   (eval $ac_link) 2>&5
10402   ac_status=$?
10403   echo "$as_me:10403: \$? = $ac_status" >&5
10404   (exit $ac_status); } &&
10405          { ac_try='test -s conftest$ac_exeext'
10406   { (eval echo "$as_me:10406: \"$ac_try\"") >&5
10407   (eval $ac_try) 2>&5
10408   ac_status=$?
10409   echo "$as_me:10409: \$? = $ac_status" >&5
10410   (exit $ac_status); }; }; then
10411   ac_cv_func_mkstemp=yes
10412 else
10413   echo "$as_me: failed program was:" >&5
10414 cat conftest.$ac_ext >&5
10415 ac_cv_func_mkstemp=no
10416 fi
10417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10418 fi
10419 echo "$as_me:10419: result: $ac_cv_func_mkstemp" >&5
10420 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
10421
10422 else
10423   cat >conftest.$ac_ext <<_ACEOF
10424 #line 10424 "configure"
10425 #include "confdefs.h"
10426
10427 #include <sys/types.h>
10428 #include <stdlib.h>
10429 #include <stdio.h>
10430 #include <string.h>
10431 #include <sys/stat.h>
10432 int main()
10433 {
10434         char *tmpl = "conftestXXXXXX";
10435         char name[2][80];
10436         int n;
10437         int result = 0;
10438         int fd;
10439         struct stat sb;
10440
10441         umask(077);
10442         for (n = 0; n < 2; ++n) {
10443                 strcpy(name[n], tmpl);
10444                 if ((fd = mkstemp(name[n])) >= 0) {
10445                         if (!strcmp(name[n], tmpl)
10446                          || stat(name[n], &sb) != 0
10447                          || (sb.st_mode & S_IFMT) != S_IFREG
10448                          || (sb.st_mode & 077) != 0) {
10449                                 result = 1;
10450                         }
10451                         close(fd);
10452                 }
10453         }
10454         if (result == 0
10455          && !strcmp(name[0], name[1]))
10456                 result = 1;
10457         ${cf_cv_main_return:-return}(result);
10458 }
10459
10460 _ACEOF
10461 rm -f conftest$ac_exeext
10462 if { (eval echo "$as_me:10462: \"$ac_link\"") >&5
10463   (eval $ac_link) 2>&5
10464   ac_status=$?
10465   echo "$as_me:10465: \$? = $ac_status" >&5
10466   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10467   { (eval echo "$as_me:10467: \"$ac_try\"") >&5
10468   (eval $ac_try) 2>&5
10469   ac_status=$?
10470   echo "$as_me:10470: \$? = $ac_status" >&5
10471   (exit $ac_status); }; }; then
10472   cf_cv_func_mkstemp=yes
10473
10474 else
10475   echo "$as_me: program exited with status $ac_status" >&5
10476 echo "$as_me: failed program was:" >&5
10477 cat conftest.$ac_ext >&5
10478 cf_cv_func_mkstemp=no
10479
10480 fi
10481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10482 fi
10483
10484 fi
10485 echo "$as_me:10485: result: $cf_cv_func_mkstemp" >&5
10486 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
10487 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
10488         cat >>confdefs.h <<\EOF
10489 #define HAVE_MKSTEMP 1
10490 EOF
10491
10492 fi
10493
10494 echo "$as_me:10494: checking return type of signal handlers" >&5
10495 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
10496 if test "${ac_cv_type_signal+set}" = set; then
10497   echo $ECHO_N "(cached) $ECHO_C" >&6
10498 else
10499   cat >conftest.$ac_ext <<_ACEOF
10500 #line 10500 "configure"
10501 #include "confdefs.h"
10502 #include <sys/types.h>
10503 #include <signal.h>
10504 #ifdef signal
10505 # undef signal
10506 #endif
10507 #ifdef __cplusplus
10508 extern "C" void (*signal (int, void (*)(int)))(int);
10509 #else
10510 void (*signal ()) ();
10511 #endif
10512
10513 int
10514 main ()
10515 {
10516 int i;
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 rm -f conftest.$ac_objext
10522 if { (eval echo "$as_me:10522: \"$ac_compile\"") >&5
10523   (eval $ac_compile) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); } &&
10527          { ac_try='test -s conftest.$ac_objext'
10528   { (eval echo "$as_me:10528: \"$ac_try\"") >&5
10529   (eval $ac_try) 2>&5
10530   ac_status=$?
10531   echo "$as_me:10531: \$? = $ac_status" >&5
10532   (exit $ac_status); }; }; then
10533   ac_cv_type_signal=void
10534 else
10535   echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 ac_cv_type_signal=int
10538 fi
10539 rm -f conftest.$ac_objext conftest.$ac_ext
10540 fi
10541 echo "$as_me:10541: result: $ac_cv_type_signal" >&5
10542 echo "${ECHO_T}$ac_cv_type_signal" >&6
10543
10544 cat >>confdefs.h <<EOF
10545 #define RETSIGTYPE $ac_cv_type_signal
10546 EOF
10547
10548 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
10549         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10550         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
10551 fi
10552
10553 cf_ada_make=gnatmake
10554 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
10555 set dummy $cf_ada_make; ac_word=$2
10556 echo "$as_me:10556: checking for $ac_word" >&5
10557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10558 if test "${ac_cv_prog_gnat_exists+set}" = set; then
10559   echo $ECHO_N "(cached) $ECHO_C" >&6
10560 else
10561   if test -n "$gnat_exists"; then
10562   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
10563 else
10564   ac_save_IFS=$IFS; IFS=$ac_path_separator
10565 ac_dummy="$PATH"
10566 for ac_dir in $ac_dummy; do
10567   IFS=$ac_save_IFS
10568   test -z "$ac_dir" && ac_dir=.
10569   $as_executable_p "$ac_dir/$ac_word" || continue
10570 ac_cv_prog_gnat_exists="yes"
10571 echo "$as_me:10571: found $ac_dir/$ac_word" >&5
10572 break
10573 done
10574
10575   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
10576 fi
10577 fi
10578 gnat_exists=$ac_cv_prog_gnat_exists
10579 if test -n "$gnat_exists"; then
10580   echo "$as_me:10580: result: $gnat_exists" >&5
10581 echo "${ECHO_T}$gnat_exists" >&6
10582 else
10583   echo "$as_me:10583: result: no" >&5
10584 echo "${ECHO_T}no" >&6
10585 fi
10586
10587 if test "$ac_cv_prog_gnat_exists" = no; then
10588    cf_ada_make=
10589 else
10590
10591 echo "$as_me:10591: checking for gnat version" >&5
10592 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
10593 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
10594   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
10595 echo "$as_me:10595: result: $cf_gnat_version" >&5
10596 echo "${ECHO_T}$cf_gnat_version" >&6
10597
10598 case $cf_gnat_version in
10599   3.1[1-9]*|3.[2-9]*|[4-9].*)
10600     cf_cv_prog_gnat_correct=yes
10601     ;;
10602   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
10603      cf_cv_prog_gnat_correct=no
10604      ;;
10605 esac
10606 case $cf_gnat_version in
10607   3.[1-9]*|[4-9].*)
10608       cf_compile_generics=generics
10609       cf_generic_objects="\${GENOBJS}"
10610       ;;
10611   *)  cf_compile_generics=
10612       cf_generic_objects=
10613       ;;
10614 esac
10615
10616    # Extract the first word of "m4", so it can be a program name with args.
10617 set dummy m4; ac_word=$2
10618 echo "$as_me:10618: checking for $ac_word" >&5
10619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10620 if test "${ac_cv_prog_M4_exists+set}" = set; then
10621   echo $ECHO_N "(cached) $ECHO_C" >&6
10622 else
10623   if test -n "$M4_exists"; then
10624   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
10625 else
10626   ac_save_IFS=$IFS; IFS=$ac_path_separator
10627 ac_dummy="$PATH"
10628 for ac_dir in $ac_dummy; do
10629   IFS=$ac_save_IFS
10630   test -z "$ac_dir" && ac_dir=.
10631   $as_executable_p "$ac_dir/$ac_word" || continue
10632 ac_cv_prog_M4_exists="yes"
10633 echo "$as_me:10633: found $ac_dir/$ac_word" >&5
10634 break
10635 done
10636
10637   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
10638 fi
10639 fi
10640 M4_exists=$ac_cv_prog_M4_exists
10641 if test -n "$M4_exists"; then
10642   echo "$as_me:10642: result: $M4_exists" >&5
10643 echo "${ECHO_T}$M4_exists" >&6
10644 else
10645   echo "$as_me:10645: result: no" >&5
10646 echo "${ECHO_T}no" >&6
10647 fi
10648
10649    if test "$ac_cv_prog_M4_exists" = no; then
10650       cf_cv_prog_gnat_correct=no
10651       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
10652    fi
10653    if test "$cf_cv_prog_gnat_correct" = yes; then
10654       echo "$as_me:10654: checking if GNAT works" >&5
10655 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
10656
10657 rm -f conftest*
10658 cat >>conftest.ads <<CF_EOF
10659 procedure conftest;
10660 CF_EOF
10661 cat >>conftest.adb <<CF_EOF
10662 with Text_IO;
10663 with GNAT.OS_Lib;
10664 procedure conftest is
10665 begin
10666    Text_IO.Put ("Hello World");
10667    Text_IO.New_Line;
10668    GNAT.OS_Lib.OS_Exit (0);
10669 end conftest;
10670 CF_EOF
10671 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10672    if ( ./conftest 1>&5 2>&1 ) ; then
10673       cf_cv_prog_gnat_correct=yes
10674    else
10675       cf_cv_prog_gnat_correct=no
10676    fi
10677 else
10678    cf_cv_prog_gnat_correct=no
10679 fi
10680 rm -f conftest*
10681
10682       echo "$as_me:10682: result: $cf_cv_prog_gnat_correct" >&5
10683 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
10684    fi
10685 fi
10686 if test "$cf_cv_prog_gnat_correct" = yes; then
10687    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
10688
10689    echo "$as_me:10689: checking if GNAT pragma Unreferenced works" >&5
10690 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
10691
10692 rm -f conftest*
10693 cat >>conftest.ads <<CF_EOF
10694 procedure conftest;
10695 CF_EOF
10696 cat >>conftest.adb <<CF_EOF
10697 with Text_IO;
10698 with GNAT.OS_Lib;
10699 procedure conftest is
10700    test : Integer;
10701    pragma Unreferenced (test);
10702 begin
10703    test := 1;
10704    Text_IO.Put ("Hello World");
10705    Text_IO.New_Line;
10706    GNAT.OS_Lib.OS_Exit (0);
10707 end conftest;
10708 CF_EOF
10709 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
10710       cf_cv_pragma_unreferenced=yes
10711 else
10712    cf_cv_pragma_unreferenced=no
10713 fi
10714 rm -f conftest*
10715
10716    echo "$as_me:10716: result: $cf_cv_pragma_unreferenced" >&5
10717 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
10718
10719    # if the pragma is supported, use it (needed in the Trace code).
10720    if test $cf_cv_pragma_unreferenced = yes ; then
10721       PRAGMA_UNREF=TRUE
10722    else
10723       PRAGMA_UNREF=FALSE
10724    fi
10725
10726 # Check whether --with-ada-compiler or --without-ada-compiler was given.
10727 if test "${with_ada_compiler+set}" = set; then
10728   withval="$with_ada_compiler"
10729   cf_ada_compiler=$withval
10730 else
10731   cf_ada_compiler=gnatmake
10732 fi;
10733
10734    cf_ada_package=terminal_interface
10735
10736 # Check whether --with-ada-include or --without-ada-include was given.
10737 if test "${with_ada_include+set}" = set; then
10738   withval="$with_ada_include"
10739
10740 else
10741   withval="${ADA_INCLUDE-$prefix/share/ada/adainclude}"
10742 fi; if test -n "$prefix/share/ada/adainclude" ; then
10743
10744 if test "x$prefix" != xNONE; then
10745   cf_path_syntax="$prefix"
10746 else
10747   cf_path_syntax="$ac_default_prefix"
10748 fi
10749
10750 case ".$withval" in #(vi
10751 .\$\(*\)*|.\'*\'*) #(vi
10752   ;;
10753 ..|./*|.\\*) #(vi
10754   ;;
10755 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10756   ;;
10757 .\${*prefix}*) #(vi
10758   eval withval="$withval"
10759   case ".$withval" in #(vi
10760   .NONE/*)
10761     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10762     ;;
10763   esac
10764   ;; #(vi
10765 .no|.NONE/*)
10766   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10767   ;;
10768 *)
10769   { { echo "$as_me:10769: error: expected a pathname, not \"$withval\"" >&5
10770 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10771    { (exit 1); exit 1; }; }
10772   ;;
10773 esac
10774
10775 fi
10776 ADA_INCLUDE="$withval"
10777
10778 # Check whether --with-ada-objects or --without-ada-objects was given.
10779 if test "${with_ada_objects+set}" = set; then
10780   withval="$with_ada_objects"
10781
10782 else
10783   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
10784 fi; if test -n "$prefix/lib/ada/adalib" ; then
10785
10786 if test "x$prefix" != xNONE; then
10787   cf_path_syntax="$prefix"
10788 else
10789   cf_path_syntax="$ac_default_prefix"
10790 fi
10791
10792 case ".$withval" in #(vi
10793 .\$\(*\)*|.\'*\'*) #(vi
10794   ;;
10795 ..|./*|.\\*) #(vi
10796   ;;
10797 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
10798   ;;
10799 .\${*prefix}*) #(vi
10800   eval withval="$withval"
10801   case ".$withval" in #(vi
10802   .NONE/*)
10803     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10804     ;;
10805   esac
10806   ;; #(vi
10807 .no|.NONE/*)
10808   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
10809   ;;
10810 *)
10811   { { echo "$as_me:10811: error: expected a pathname, not \"$withval\"" >&5
10812 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
10813    { (exit 1); exit 1; }; }
10814   ;;
10815 esac
10816
10817 fi
10818 ADA_OBJECTS="$withval"
10819
10820 fi
10821
10822 ################################################################################
10823
10824 # not needed
10825 TINFO_ARGS2=
10826
10827 ### Construct the list of include-directories to be generated
10828
10829 CPPFLAGS="$CPPFLAGS -I. -I../include"
10830 if test "$srcdir" != "."; then
10831         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
10832 fi
10833 if test "$GCC" != yes; then
10834         CPPFLAGS="$CPPFLAGS -I\${includedir}"
10835 elif test "$includedir" != "/usr/include"; then
10836         if test "$includedir" = '${prefix}/include' ; then
10837                 if test $prefix != /usr ; then
10838                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
10839                 fi
10840         else
10841                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
10842         fi
10843 fi
10844
10845 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
10846 if test "$srcdir" != "."; then
10847         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
10848 fi
10849 if test "$GCC" != yes; then
10850         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10851 elif test "$includedir" != "/usr/include"; then
10852         if test "$includedir" = '${prefix}/include' ; then
10853                 if test $prefix != /usr ; then
10854                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10855                 fi
10856         else
10857                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
10858         fi
10859 fi
10860
10861 ### Build up pieces for makefile rules
10862 echo "$as_me:10862: checking default library suffix" >&5
10863 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
10864
10865         case $DFT_LWR_MODEL in
10866         libtool) DFT_ARG_SUFFIX=''   ;;
10867         normal)  DFT_ARG_SUFFIX=''   ;;
10868         debug)   DFT_ARG_SUFFIX='_g' ;;
10869         profile) DFT_ARG_SUFFIX='_p' ;;
10870         shared)  DFT_ARG_SUFFIX=''   ;;
10871         esac
10872         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
10873 echo "$as_me:10873: result: $DFT_ARG_SUFFIX" >&5
10874 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
10875
10876 echo "$as_me:10876: checking default library-dependency suffix" >&5
10877 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
10878
10879         case $DFT_LWR_MODEL in #(vi
10880         libtool) #(vi
10881                 DFT_LIB_SUFFIX='.la'
10882                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10883                 ;;
10884         normal) #(vi
10885                 DFT_LIB_SUFFIX='.a'
10886                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10887                 ;;
10888         debug) #(vi
10889                 DFT_LIB_SUFFIX='_g.a'
10890                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10891                 ;;
10892         profile) #(vi
10893                 DFT_LIB_SUFFIX='_p.a'
10894                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10895                 ;;
10896         shared) #(vi
10897                 case $cf_cv_system_name in
10898                 aix[56]*) #(vi
10899                         DFT_LIB_SUFFIX='.a'
10900                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10901                         ;;
10902                 cygwin*) #(vi
10903                         DFT_LIB_SUFFIX='.dll'
10904                         DFT_DEP_SUFFIX='.dll.a'
10905                         ;;
10906                 darwin*) #(vi
10907                         DFT_LIB_SUFFIX='.dylib'
10908                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10909                         ;;
10910                 hpux*) #(vi
10911                         case $target in
10912                         ia64*) #(vi
10913                                 DFT_LIB_SUFFIX='.so'
10914                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10915                                 ;;
10916                         *) #(vi
10917                                 DFT_LIB_SUFFIX='.sl'
10918                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10919                                 ;;
10920                         esac
10921                         ;;
10922                 *)      DFT_LIB_SUFFIX='.so'
10923                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
10924                         ;;
10925                 esac
10926         esac
10927         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
10928         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
10929 echo "$as_me:10929: result: $DFT_DEP_SUFFIX" >&5
10930 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
10931
10932 echo "$as_me:10932: checking default object directory" >&5
10933 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
10934
10935         case $DFT_LWR_MODEL in
10936         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
10937         normal)  DFT_OBJ_SUBDIR='objects' ;;
10938         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
10939         profile) DFT_OBJ_SUBDIR='obj_p' ;;
10940         shared)
10941                 case $cf_cv_system_name in #(vi
10942                 cygwin) #(vi
10943                         DFT_OBJ_SUBDIR='objects' ;;
10944                 *)
10945                         DFT_OBJ_SUBDIR='obj_s' ;;
10946                 esac
10947         esac
10948 echo "$as_me:10948: result: $DFT_OBJ_SUBDIR" >&5
10949 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
10950
10951 ### Set up low-level terminfo dependencies for makefiles.
10952
10953 if test "$DFT_LWR_MODEL" = shared ; then
10954         case $cf_cv_system_name in #(vi
10955         cygwin*)
10956                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
10957                 ;;
10958         esac
10959 fi
10960
10961 ### Construct the list of subdirectories for which we'll customize makefiles
10962 ### with the appropriate compile-rules.
10963
10964 SUB_MAKEFILES="gen/adacurses${DFT_ARG_SUFFIX}-config:gen/adacurses-config.in"
10965
10966 cat >>confdefs.h <<EOF
10967 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
10968 EOF
10969
10970 ### Now that we're done running tests, add the compiler-warnings, if any
10971
10972 cf_fix_cppflags=no
10973 cf_new_cflags=
10974 cf_new_cppflags=
10975 cf_new_extra_cppflags=
10976
10977 for cf_add_cflags in $EXTRA_CFLAGS
10978 do
10979 case $cf_fix_cppflags in
10980 no)
10981         case $cf_add_cflags in #(vi
10982         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10983                 case $cf_add_cflags in
10984                 -D*)
10985                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10986
10987                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10988                                 && test -z "${cf_tst_cflags}" \
10989                                 && cf_fix_cppflags=yes
10990
10991                         if test $cf_fix_cppflags = yes ; then
10992                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10993                                 continue
10994                         elif test "${cf_tst_cflags}" = "\"'" ; then
10995                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10996                                 continue
10997                         fi
10998                         ;;
10999                 esac
11000                 case "$CPPFLAGS" in
11001                 *$cf_add_cflags) #(vi
11002                         ;;
11003                 *) #(vi
11004                         case $cf_add_cflags in #(vi
11005                         -D*)
11006                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11007
11008 CPPFLAGS=`echo "$CPPFLAGS" | \
11009         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11010                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11011
11012                                 ;;
11013                         esac
11014                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11015                         ;;
11016                 esac
11017                 ;;
11018         *)
11019                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11020                 ;;
11021         esac
11022         ;;
11023 yes)
11024         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11025
11026         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11027
11028         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11029                 && test -z "${cf_tst_cflags}" \
11030                 && cf_fix_cppflags=no
11031         ;;
11032 esac
11033 done
11034
11035 if test -n "$cf_new_cflags" ; then
11036
11037         CFLAGS="$CFLAGS $cf_new_cflags"
11038 fi
11039
11040 if test -n "$cf_new_cppflags" ; then
11041
11042         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11043 fi
11044
11045 if test -n "$cf_new_extra_cppflags" ; then
11046
11047         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11048 fi
11049
11050 ################################################################################
11051
11052 if test x"$enable_pc_files" = xyes ; then \
11053 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
11054 MAKE_PC_FILES=
11055 else
11056 MAKE_PC_FILES="#"
11057 fi
11058
11059 ################################################################################
11060
11061 TEST_ARG2=
11062
11063 NCURSES_SHLIB2="sh -c"
11064
11065 for cf_path in . .. ../..
11066 do
11067         if test -f $cf_path/tar-copy.sh
11068         then
11069                 NCURSES_COPY2=`echo 'sh $(top_srcdir)/'$cf_path'/tar-copy.sh' | sed -e 's,/./,/,'`
11070                 break
11071         fi
11072 done
11073
11074 ADA_SUBDIRS="include gen src samples"
11075 for cf_dir in $ADA_SUBDIRS
11076 do
11077         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
11078 done
11079
11080 NCURSES_TREE="#"
11081
11082 EXTERNAL_TREE=
11083
11084 ac_config_files="$ac_config_files $SUB_MAKEFILES Makefile"
11085 ac_config_commands="$ac_config_commands default"
11086 cat >confcache <<\_ACEOF
11087 # This file is a shell script that caches the results of configure
11088 # tests run on this system so they can be shared between configure
11089 # scripts and configure runs, see configure's option --config-cache.
11090 # It is not useful on other systems.  If it contains results you don't
11091 # want to keep, you may remove or edit it.
11092 #
11093 # config.status only pays attention to the cache file if you give it
11094 # the --recheck option to rerun configure.
11095 #
11096 # `ac_cv_env_foo' variables (set or unset) will be overriden when
11097 # loading this file, other *unset* `ac_cv_foo' will be assigned the
11098 # following values.
11099
11100 _ACEOF
11101
11102 # The following way of writing the cache mishandles newlines in values,
11103 # but we know of no workaround that is simple, portable, and efficient.
11104 # So, don't put newlines in cache variables' values.
11105 # Ultrix sh set writes to stderr and can't be redirected directly,
11106 # and sets the high bit in the cache file unless we assign to the vars.
11107 {
11108   (set) 2>&1 |
11109     case `(ac_space=' '; set | grep ac_space) 2>&1` in
11110     *ac_space=\ *)
11111       # `set' does not quote correctly, so add quotes (double-quote
11112       # substitution turns \\\\ into \\, and sed turns \\ into \).
11113       sed -n \
11114         "s/'/'\\\\''/g;
11115           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11116       ;;
11117     *)
11118       # `set' quotes correctly as required by POSIX, so do not add quotes.
11119       sed -n \
11120         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
11121       ;;
11122     esac;
11123 } |
11124   sed '
11125      t clear
11126      : clear
11127      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
11128      t end
11129      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11130      : end' >>confcache
11131 if cmp -s $cache_file confcache; then :; else
11132   if test -w $cache_file; then
11133     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
11134     cat confcache >$cache_file
11135   else
11136     echo "not updating unwritable cache $cache_file"
11137   fi
11138 fi
11139 rm -f confcache
11140
11141 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11142 # Let make expand exec_prefix.
11143 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11144
11145 # VPATH may cause trouble with some makes, so we remove $(srcdir),
11146 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11147 # trailing colons and then remove the whole line if VPATH becomes empty
11148 # (actually we leave an empty line to preserve line numbers).
11149 if test "x$srcdir" = x.; then
11150   ac_vpsub='/^[         ]*VPATH[        ]*=/{
11151 s/:*\$(srcdir):*/:/;
11152 s/:*\${srcdir}:*/:/;
11153 s/:*@srcdir@:*/:/;
11154 s/^\([^=]*=[    ]*\):*/\1/;
11155 s/:*$//;
11156 s/^[^=]*=[      ]*$//;
11157 }'
11158 fi
11159
11160 DEFS=-DHAVE_CONFIG_H
11161
11162 : ${CONFIG_STATUS=./config.status}
11163 ac_clean_files_save=$ac_clean_files
11164 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11165 { echo "$as_me:11165: creating $CONFIG_STATUS" >&5
11166 echo "$as_me: creating $CONFIG_STATUS" >&6;}
11167 cat >$CONFIG_STATUS <<_ACEOF
11168 #! $SHELL
11169 # Generated automatically by configure.
11170 # Run this file to recreate the current configuration.
11171 # Compiler output produced by configure, useful for debugging
11172 # configure, is in config.log if it exists.
11173
11174 debug=false
11175 SHELL=\${CONFIG_SHELL-$SHELL}
11176 ac_cs_invocation="\$0 \$@"
11177
11178 _ACEOF
11179
11180 cat >>$CONFIG_STATUS <<\_ACEOF
11181 # Be Bourne compatible
11182 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
11183   emulate sh
11184   NULLCMD=:
11185 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
11186   set -o posix
11187 fi
11188
11189 # Name of the executable.
11190 as_me=`echo "$0" |sed 's,.*[\\/],,'`
11191
11192 if expr a : '\(a\)' >/dev/null 2>&1; then
11193   as_expr=expr
11194 else
11195   as_expr=false
11196 fi
11197
11198 rm -f conf$$ conf$$.exe conf$$.file
11199 echo >conf$$.file
11200 if ln -s conf$$.file conf$$ 2>/dev/null; then
11201   # We could just check for DJGPP; but this test a) works b) is more generic
11202   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
11203   if test -f conf$$.exe; then
11204     # Don't use ln at all; we don't have any links
11205     as_ln_s='cp -p'
11206   else
11207     as_ln_s='ln -s'
11208   fi
11209 elif ln conf$$.file conf$$ 2>/dev/null; then
11210   as_ln_s=ln
11211 else
11212   as_ln_s='cp -p'
11213 fi
11214 rm -f conf$$ conf$$.exe conf$$.file
11215
11216 as_executable_p="test -f"
11217
11218 # Support unset when possible.
11219 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
11220   as_unset=unset
11221 else
11222   as_unset=false
11223 fi
11224
11225 # NLS nuisances.
11226 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
11227 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
11228 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
11229 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
11230 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
11231 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
11232 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
11233 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
11234
11235 # IFS
11236 # We need space, tab and new line, in precisely that order.
11237 as_nl='
11238 '
11239 IFS="   $as_nl"
11240
11241 # CDPATH.
11242 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
11243
11244 exec 6>&1
11245
11246 _ACEOF
11247
11248 # Files that config.status was made for.
11249 if test -n "$ac_config_files"; then
11250   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
11251 fi
11252
11253 if test -n "$ac_config_headers"; then
11254   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
11255 fi
11256
11257 if test -n "$ac_config_links"; then
11258   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
11259 fi
11260
11261 if test -n "$ac_config_commands"; then
11262   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
11263 fi
11264
11265 cat >>$CONFIG_STATUS <<\EOF
11266
11267 ac_cs_usage="\
11268 \`$as_me' instantiates files from templates according to the
11269 current configuration.
11270
11271 Usage: $0 [OPTIONS] [FILE]...
11272
11273   -h, --help       print this help, then exit
11274   -V, --version    print version number, then exit
11275   -d, --debug      don't remove temporary files
11276       --recheck    update $as_me by reconfiguring in the same conditions
11277   --file=FILE[:TEMPLATE]
11278                    instantiate the configuration file FILE
11279   --header=FILE[:TEMPLATE]
11280                    instantiate the configuration header FILE
11281
11282 Configuration files:
11283 $config_files
11284
11285 Configuration headers:
11286 $config_headers
11287
11288 Configuration commands:
11289 $config_commands
11290
11291 Report bugs to <bug-autoconf@gnu.org>."
11292 EOF
11293
11294 cat >>$CONFIG_STATUS <<EOF
11295 ac_cs_version="\\
11296 config.status
11297 configured by $0, generated by GNU Autoconf 2.52.20100530,
11298   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
11299
11300 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
11301 Free Software Foundation, Inc.
11302 This config.status script is free software; the Free Software Foundation
11303 gives unlimited permission to copy, distribute and modify it."
11304 srcdir=$srcdir
11305 INSTALL="$INSTALL"
11306 EOF
11307
11308 cat >>$CONFIG_STATUS <<\EOF
11309 # If no file are specified by the user, then we need to provide default
11310 # value.  By we need to know if files were specified by the user.
11311 ac_need_defaults=:
11312 while test $# != 0
11313 do
11314   case $1 in
11315   --*=*)
11316     ac_option=`expr "x$1" : 'x\([^=]*\)='`
11317     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
11318     shift
11319     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
11320     shift
11321     ;;
11322   -*);;
11323   *) # This is not an option, so the user has probably given explicit
11324      # arguments.
11325      ac_need_defaults=false;;
11326   esac
11327
11328   case $1 in
11329   # Handling of the options.
11330 EOF
11331 cat >>$CONFIG_STATUS <<EOF
11332   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11333     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
11334     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
11335 EOF
11336 cat >>$CONFIG_STATUS <<\EOF
11337   --version | --vers* | -V )
11338     echo "$ac_cs_version"; exit 0 ;;
11339   --he | --h)
11340     # Conflict between --help and --header
11341     { { echo "$as_me:11341: error: ambiguous option: $1
11342 Try \`$0 --help' for more information." >&5
11343 echo "$as_me: error: ambiguous option: $1
11344 Try \`$0 --help' for more information." >&2;}
11345    { (exit 1); exit 1; }; };;
11346   --help | --hel | -h )
11347     echo "$ac_cs_usage"; exit 0 ;;
11348   --debug | --d* | -d )
11349     debug=: ;;
11350   --file | --fil | --fi | --f )
11351     shift
11352     CONFIG_FILES="$CONFIG_FILES $1"
11353     ac_need_defaults=false;;
11354   --header | --heade | --head | --hea )
11355     shift
11356     CONFIG_HEADERS="$CONFIG_HEADERS $1"
11357     ac_need_defaults=false;;
11358
11359   # This is an error.
11360   -*) { { echo "$as_me:11360: error: unrecognized option: $1
11361 Try \`$0 --help' for more information." >&5
11362 echo "$as_me: error: unrecognized option: $1
11363 Try \`$0 --help' for more information." >&2;}
11364    { (exit 1); exit 1; }; } ;;
11365
11366   *) ac_config_targets="$ac_config_targets $1" ;;
11367
11368   esac
11369   shift
11370 done
11371
11372 exec 5>>config.log
11373 cat >&5 << _ACEOF
11374
11375 ## ----------------------- ##
11376 ## Running config.status.  ##
11377 ## ----------------------- ##
11378
11379 This file was extended by $as_me 2.52.20100530, executed with
11380   CONFIG_FILES    = $CONFIG_FILES
11381   CONFIG_HEADERS  = $CONFIG_HEADERS
11382   CONFIG_LINKS    = $CONFIG_LINKS
11383   CONFIG_COMMANDS = $CONFIG_COMMANDS
11384   > $ac_cs_invocation
11385 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11386
11387 _ACEOF
11388 EOF
11389
11390 cat >>$CONFIG_STATUS <<EOF
11391 #
11392 # INIT-COMMANDS section.
11393 #
11394
11395 ### Special initialization commands, used to pass information from the
11396 ### configuration-run into config.status
11397
11398 AWK="$AWK"
11399 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
11400 DFT_LWR_MODEL="$DFT_LWR_MODEL"
11401 ECHO_LINK="$ECHO_LINK"
11402 LIB_NAME="$LIB_NAME"
11403 LIB_SUFFIX="$LIB_SUFFIX"
11404 NCURSES_MAJOR="$NCURSES_MAJOR"
11405 NCURSES_MINOR="$NCURSES_MINOR"
11406 NCURSES_PATCH="$NCURSES_PATCH"
11407 cf_cv_abi_version="$cf_cv_abi_version"
11408 cf_cv_rel_version="$cf_cv_rel_version"
11409 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
11410 cf_cv_shared_soname='$cf_cv_shared_soname'
11411 cf_cv_shlib_version="$cf_cv_shlib_version"
11412 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
11413 cf_cv_system_name="$cf_cv_system_name"
11414 host="$host"
11415 target="$target"
11416
11417 EOF
11418
11419 cat >>$CONFIG_STATUS <<\EOF
11420 for ac_config_target in $ac_config_targets
11421 do
11422   case "$ac_config_target" in
11423   # Handling of arguments.
11424   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
11425   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11426   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
11427   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
11428   *) { { echo "$as_me:11428: error: invalid argument: $ac_config_target" >&5
11429 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
11430    { (exit 1); exit 1; }; };;
11431   esac
11432 done
11433
11434 # If the user did not use the arguments to specify the items to instantiate,
11435 # then the envvar interface is used.  Set only those that are not.
11436 # We use the long form for the default assignment because of an extremely
11437 # bizarre bug on SunOS 4.1.3.
11438 if $ac_need_defaults; then
11439   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11440   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11441   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11442 fi
11443
11444 # Create a temporary directory, and hook for its removal unless debugging.
11445 $debug ||
11446 {
11447   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
11448   trap '{ (exit 1); exit 1; }' 1 2 13 15
11449 }
11450
11451 # Create a (secure) tmp directory for tmp files.
11452 : ${TMPDIR=/tmp}
11453 {
11454   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
11455   test -n "$tmp" && test -d "$tmp"
11456 }  ||
11457 {
11458   tmp=$TMPDIR/cs$$-$RANDOM
11459   (umask 077 && mkdir $tmp)
11460 } ||
11461 {
11462    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
11463    { (exit 1); exit 1; }
11464 }
11465
11466 EOF
11467
11468 cat >>$CONFIG_STATUS <<EOF
11469
11470 #
11471 # CONFIG_FILES section.
11472 #
11473
11474 # No need to generate the scripts if there are no CONFIG_FILES.
11475 # This happens for instance when ./config.status config.h
11476 if test -n "\$CONFIG_FILES"; then
11477   # Protect against being on the right side of a sed subst in config.status.
11478   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
11479    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
11480 s,@SHELL@,$SHELL,;t t
11481 s,@exec_prefix@,$exec_prefix,;t t
11482 s,@prefix@,$prefix,;t t
11483 s,@program_transform_name@,$program_transform_name,;t t
11484 s,@bindir@,$bindir,;t t
11485 s,@sbindir@,$sbindir,;t t
11486 s,@libexecdir@,$libexecdir,;t t
11487 s,@datadir@,$datadir,;t t
11488 s,@sysconfdir@,$sysconfdir,;t t
11489 s,@sharedstatedir@,$sharedstatedir,;t t
11490 s,@localstatedir@,$localstatedir,;t t
11491 s,@libdir@,$libdir,;t t
11492 s,@includedir@,$includedir,;t t
11493 s,@oldincludedir@,$oldincludedir,;t t
11494 s,@infodir@,$infodir,;t t
11495 s,@mandir@,$mandir,;t t
11496 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
11497 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
11498 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
11499 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
11500 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
11501 s,@build_alias@,$build_alias,;t t
11502 s,@host_alias@,$host_alias,;t t
11503 s,@target_alias@,$target_alias,;t t
11504 s,@ECHO_C@,$ECHO_C,;t t
11505 s,@ECHO_N@,$ECHO_N,;t t
11506 s,@ECHO_T@,$ECHO_T,;t t
11507 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
11508 s,@DEFS@,$DEFS,;t t
11509 s,@LIBS@,$LIBS,;t t
11510 s,@top_builddir@,$top_builddir,;t t
11511 s,@build@,$build,;t t
11512 s,@build_cpu@,$build_cpu,;t t
11513 s,@build_vendor@,$build_vendor,;t t
11514 s,@build_os@,$build_os,;t t
11515 s,@host@,$host,;t t
11516 s,@host_cpu@,$host_cpu,;t t
11517 s,@host_vendor@,$host_vendor,;t t
11518 s,@host_os@,$host_os,;t t
11519 s,@target@,$target,;t t
11520 s,@target_cpu@,$target_cpu,;t t
11521 s,@target_vendor@,$target_vendor,;t t
11522 s,@target_os@,$target_os,;t t
11523 s,@CC@,$CC,;t t
11524 s,@CFLAGS@,$CFLAGS,;t t
11525 s,@LDFLAGS@,$LDFLAGS,;t t
11526 s,@CPPFLAGS@,$CPPFLAGS,;t t
11527 s,@ac_ct_CC@,$ac_ct_CC,;t t
11528 s,@EXEEXT@,$EXEEXT,;t t
11529 s,@OBJEXT@,$OBJEXT,;t t
11530 s,@CPP@,$CPP,;t t
11531 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
11532 s,@PROG_EXT@,$PROG_EXT,;t t
11533 s,@AWK@,$AWK,;t t
11534 s,@EGREP@,$EGREP,;t t
11535 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
11536 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
11537 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
11538 s,@LN_S@,$LN_S,;t t
11539 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
11540 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
11541 s,@SET_MAKE@,$SET_MAKE,;t t
11542 s,@CTAGS@,$CTAGS,;t t
11543 s,@ETAGS@,$ETAGS,;t t
11544 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
11545 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
11546 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
11547 s,@RANLIB@,$RANLIB,;t t
11548 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
11549 s,@LD@,$LD,;t t
11550 s,@ac_ct_LD@,$ac_ct_LD,;t t
11551 s,@AR@,$AR,;t t
11552 s,@ac_ct_AR@,$ac_ct_AR,;t t
11553 s,@ARFLAGS@,$ARFLAGS,;t t
11554 s,@DESTDIR@,$DESTDIR,;t t
11555 s,@BUILD_CC@,$BUILD_CC,;t t
11556 s,@BUILD_CPP@,$BUILD_CPP,;t t
11557 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
11558 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
11559 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
11560 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
11561 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
11562 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
11563 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
11564 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
11565 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
11566 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
11567 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
11568 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
11569 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
11570 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
11571 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
11572 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
11573 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
11574 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
11575 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
11576 s,@CC_G_OPT@,$CC_G_OPT,;t t
11577 s,@LD_MODEL@,$LD_MODEL,;t t
11578 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
11579 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
11580 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
11581 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
11582 s,@LINK_PROGS@,$LINK_PROGS,;t t
11583 s,@LINK_TESTS@,$LINK_TESTS,;t t
11584 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
11585 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
11586 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
11587 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
11588 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
11589 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
11590 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
11591 s,@PTHREAD@,$PTHREAD,;t t
11592 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
11593 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
11594 s,@ECHO_LINK@,$ECHO_LINK,;t t
11595 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
11596 s,@ADA_TRACE@,$ADA_TRACE,;t t
11597 s,@gnat_exists@,$gnat_exists,;t t
11598 s,@M4_exists@,$M4_exists,;t t
11599 s,@cf_ada_make@,$cf_ada_make,;t t
11600 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
11601 s,@cf_ada_package@,$cf_ada_package,;t t
11602 s,@ADAFLAGS@,$ADAFLAGS,;t t
11603 s,@cf_compile_generics@,$cf_compile_generics,;t t
11604 s,@cf_generic_objects@,$cf_generic_objects,;t t
11605 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
11606 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
11607 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
11608 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
11609 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
11610 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
11611 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
11612 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
11613 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
11614 s,@cross_compiling@,$cross_compiling,;t t
11615 s,@TEST_ARG2@,$TEST_ARG2,;t t
11616 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
11617 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
11618 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
11619 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
11620 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
11621 CEOF
11622
11623 EOF
11624
11625   cat >>$CONFIG_STATUS <<\EOF
11626   # Split the substitutions into bite-sized pieces for seds with
11627   # small command number limits, like on Digital OSF/1 and HP-UX.
11628   ac_max_sed_lines=48
11629   ac_sed_frag=1 # Number of current file.
11630   ac_beg=1 # First line for current file.
11631   ac_end=$ac_max_sed_lines # Line after last line for current file.
11632   ac_more_lines=:
11633   ac_sed_cmds=
11634   while $ac_more_lines; do
11635     if test $ac_beg -gt 1; then
11636       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11637     else
11638       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
11639     fi
11640     if test ! -s $tmp/subs.frag; then
11641       ac_more_lines=false
11642     else
11643       # The purpose of the label and of the branching condition is to
11644       # speed up the sed processing (if there are no `@' at all, there
11645       # is no need to browse any of the substitutions).
11646       # These are the two extra sed commands mentioned above.
11647       (echo ':t
11648   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
11649       if test -z "$ac_sed_cmds"; then
11650         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
11651       else
11652         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
11653       fi
11654       ac_sed_frag=`expr $ac_sed_frag + 1`
11655       ac_beg=$ac_end
11656       ac_end=`expr $ac_end + $ac_max_sed_lines`
11657     fi
11658   done
11659   if test -z "$ac_sed_cmds"; then
11660     ac_sed_cmds=cat
11661   fi
11662 fi # test -n "$CONFIG_FILES"
11663
11664 EOF
11665 cat >>$CONFIG_STATUS <<\EOF
11666 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
11667   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11668   case $ac_file in
11669   - | *:- | *:-:* ) # input from stdin
11670         cat >$tmp/stdin
11671         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11672         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11673   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11674         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11675   * )   ac_file_in=$ac_file.in ;;
11676   esac
11677
11678   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
11679   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11680          X"$ac_file" : 'X\(//\)[^/]' \| \
11681          X"$ac_file" : 'X\(//\)$' \| \
11682          X"$ac_file" : 'X\(/\)' \| \
11683          .     : '\(.\)' 2>/dev/null ||
11684 echo X"$ac_file" |
11685     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11686           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11687           /^X\(\/\/\)$/{ s//\1/; q; }
11688           /^X\(\/\).*/{ s//\1/; q; }
11689           s/.*/./; q'`
11690   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11691     { case "$ac_dir" in
11692   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11693   *)                      as_incr_dir=.;;
11694 esac
11695 as_dummy="$ac_dir"
11696 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11697   case $as_mkdir_dir in
11698     # Skip DOS drivespec
11699     ?:) as_incr_dir=$as_mkdir_dir ;;
11700     *)
11701       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11702       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11703     ;;
11704   esac
11705 done; }
11706
11707     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
11708     # A "../" for each directory in $ac_dir_suffix.
11709     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
11710   else
11711     ac_dir_suffix= ac_dots=
11712   fi
11713
11714   case $srcdir in
11715   .)  ac_srcdir=.
11716       if test -z "$ac_dots"; then
11717          ac_top_srcdir=.
11718       else
11719          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
11720       fi ;;
11721   [\\/]* | ?:[\\/]* )
11722       ac_srcdir=$srcdir$ac_dir_suffix;
11723       ac_top_srcdir=$srcdir ;;
11724   *) # Relative path.
11725     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
11726     ac_top_srcdir=$ac_dots$srcdir ;;
11727   esac
11728
11729   case $INSTALL in
11730   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11731   *) ac_INSTALL=$ac_dots$INSTALL ;;
11732   esac
11733
11734   if test x"$ac_file" != x-; then
11735     { echo "$as_me:11735: creating $ac_file" >&5
11736 echo "$as_me: creating $ac_file" >&6;}
11737     rm -f "$ac_file"
11738   fi
11739   # Let's still pretend it is `configure' which instantiates (i.e., don't
11740   # use $as_me), people would be surprised to read:
11741   #    /* config.h.  Generated automatically by config.status.  */
11742   configure_input="Generated automatically from `echo $ac_file_in |
11743                                                  sed 's,.*/,,'` by configure."
11744
11745   # First look for the input files in the build tree, otherwise in the
11746   # src tree.
11747   ac_file_inputs=`IFS=:
11748     for f in $ac_file_in; do
11749       case $f in
11750       -) echo $tmp/stdin ;;
11751       [\\/$]*)
11752          # Absolute (can't be DOS-style, as IFS=:)
11753          test -f "$f" || { { echo "$as_me:11753: error: cannot find input file: $f" >&5
11754 echo "$as_me: error: cannot find input file: $f" >&2;}
11755    { (exit 1); exit 1; }; }
11756          echo $f;;
11757       *) # Relative
11758          if test -f "$f"; then
11759            # Build tree
11760            echo $f
11761          elif test -f "$srcdir/$f"; then
11762            # Source tree
11763            echo $srcdir/$f
11764          else
11765            # /dev/null tree
11766            { { echo "$as_me:11766: error: cannot find input file: $f" >&5
11767 echo "$as_me: error: cannot find input file: $f" >&2;}
11768    { (exit 1); exit 1; }; }
11769          fi;;
11770       esac
11771     done` || { (exit 1); exit 1; }
11772 EOF
11773 cat >>$CONFIG_STATUS <<EOF
11774   sed "$ac_vpsub
11775 $extrasub
11776 EOF
11777 cat >>$CONFIG_STATUS <<\EOF
11778 :t
11779 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11780 s,@configure_input@,$configure_input,;t t
11781 s,@srcdir@,$ac_srcdir,;t t
11782 s,@top_srcdir@,$ac_top_srcdir,;t t
11783 s,@INSTALL@,$ac_INSTALL,;t t
11784 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
11785   rm -f $tmp/stdin
11786   if test x"$ac_file" != x-; then
11787     mv $tmp/out $ac_file
11788   else
11789     cat $tmp/out
11790     rm -f $tmp/out
11791   fi
11792
11793 done
11794 EOF
11795 cat >>$CONFIG_STATUS <<\EOF
11796
11797 #
11798 # CONFIG_HEADER section.
11799 #
11800
11801 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11802 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11803 #
11804 # ac_d sets the value in "#define NAME VALUE" lines.
11805 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11806 ac_dB='[        ].*$,\1#\2'
11807 ac_dC=' '
11808 ac_dD=',;t'
11809 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11810 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11811 ac_iB='\([      ]\),\1#\2define\3'
11812 ac_iC=' '
11813 ac_iD='\4,;t'
11814 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11815 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11816 ac_uB='$,\1#\2define\3'
11817 ac_uC=' '
11818 ac_uD=',;t'
11819
11820 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
11821   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11822   case $ac_file in
11823   - | *:- | *:-:* ) # input from stdin
11824         cat >$tmp/stdin
11825         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11826         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11827   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
11828         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
11829   * )   ac_file_in=$ac_file.in ;;
11830   esac
11831
11832   test x"$ac_file" != x- && { echo "$as_me:11832: creating $ac_file" >&5
11833 echo "$as_me: creating $ac_file" >&6;}
11834
11835   # First look for the input files in the build tree, otherwise in the
11836   # src tree.
11837   ac_file_inputs=`IFS=:
11838     for f in $ac_file_in; do
11839       case $f in
11840       -) echo $tmp/stdin ;;
11841       [\\/$]*)
11842          # Absolute (can't be DOS-style, as IFS=:)
11843          test -f "$f" || { { echo "$as_me:11843: error: cannot find input file: $f" >&5
11844 echo "$as_me: error: cannot find input file: $f" >&2;}
11845    { (exit 1); exit 1; }; }
11846          echo $f;;
11847       *) # Relative
11848          if test -f "$f"; then
11849            # Build tree
11850            echo $f
11851          elif test -f "$srcdir/$f"; then
11852            # Source tree
11853            echo $srcdir/$f
11854          else
11855            # /dev/null tree
11856            { { echo "$as_me:11856: error: cannot find input file: $f" >&5
11857 echo "$as_me: error: cannot find input file: $f" >&2;}
11858    { (exit 1); exit 1; }; }
11859          fi;;
11860       esac
11861     done` || { (exit 1); exit 1; }
11862   # Remove the trailing spaces.
11863   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
11864
11865 EOF
11866
11867 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
11868 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
11869 # be either 'cat' or 'sort'.
11870 cat confdefs.h | uniq >conftest.vals
11871
11872 # Break up conftest.vals because some shells have a limit on
11873 # the size of here documents, and old seds have small limits too.
11874
11875 rm -f conftest.tail
11876 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
11877 while grep . conftest.vals >/dev/null
11878 do
11879   # Write chunks of a limited-size here document to conftest.frag.
11880   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
11881   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
11882   echo 'CEOF' >> $CONFIG_STATUS
11883   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11884   rm -f conftest.vals
11885   mv conftest.tail conftest.vals
11886 done
11887 rm -f conftest.vals
11888
11889 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
11890 # marker @DEFS@.
11891 echo '  cat >> conftest.edit <<CEOF
11892 /@DEFS@/r conftest.frag
11893 /@DEFS@/d
11894 CEOF
11895 sed -f conftest.edit $tmp/in > $tmp/out
11896 rm -f $tmp/in
11897 mv $tmp/out $tmp/in
11898 rm -f conftest.edit conftest.frag
11899 ' >> $CONFIG_STATUS
11900
11901 cat >>$CONFIG_STATUS <<\EOF
11902   # Let's still pretend it is `configure' which instantiates (i.e., don't
11903   # use $as_me), people would be surprised to read:
11904   #    /* config.h.  Generated automatically by config.status.  */
11905   if test x"$ac_file" = x-; then
11906     echo "/* Generated automatically by configure.  */" >$tmp/config.h
11907   else
11908     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
11909   fi
11910   cat $tmp/in >>$tmp/config.h
11911   rm -f $tmp/in
11912   if test x"$ac_file" != x-; then
11913     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
11914       { echo "$as_me:11914: $ac_file is unchanged" >&5
11915 echo "$as_me: $ac_file is unchanged" >&6;}
11916     else
11917       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11918          X"$ac_file" : 'X\(//\)[^/]' \| \
11919          X"$ac_file" : 'X\(//\)$' \| \
11920          X"$ac_file" : 'X\(/\)' \| \
11921          .     : '\(.\)' 2>/dev/null ||
11922 echo X"$ac_file" |
11923     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
11924           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
11925           /^X\(\/\/\)$/{ s//\1/; q; }
11926           /^X\(\/\).*/{ s//\1/; q; }
11927           s/.*/./; q'`
11928       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11929         { case "$ac_dir" in
11930   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
11931   *)                      as_incr_dir=.;;
11932 esac
11933 as_dummy="$ac_dir"
11934 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
11935   case $as_mkdir_dir in
11936     # Skip DOS drivespec
11937     ?:) as_incr_dir=$as_mkdir_dir ;;
11938     *)
11939       as_incr_dir=$as_incr_dir/$as_mkdir_dir
11940       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
11941     ;;
11942   esac
11943 done; }
11944
11945       fi
11946       rm -f $ac_file
11947       mv $tmp/config.h $ac_file
11948     fi
11949   else
11950     cat $tmp/config.h
11951     rm -f $tmp/config.h
11952   fi
11953 done
11954 EOF
11955
11956 cat >>$CONFIG_STATUS <<\EOF
11957
11958 { (exit 0); exit 0; }
11959 EOF
11960 chmod +x $CONFIG_STATUS
11961 ac_clean_files=$ac_clean_files_save
11962
11963 # configure is writing to config.log, and then calls config.status.
11964 # config.status does its own redirection, appending to config.log.
11965 # Unfortunately, on DOS this fails, as config.log is still kept open
11966 # by configure, so config.status won't be able to write to it; its
11967 # output is simply discarded.  So we exec the FD to /dev/null,
11968 # effectively closing config.log, so it can be properly (re)opened and
11969 # appended to by config.status.  When coming back to configure, we
11970 # need to make the FD available again.
11971 if test "$no_create" != yes; then
11972   ac_cs_success=:
11973   exec 5>/dev/null
11974   $SHELL $CONFIG_STATUS || ac_cs_success=false
11975   exec 5>>config.log
11976   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11977   # would make configure fail if this is the last instruction.
11978   $ac_cs_success || { (exit 1); exit 1; }
11979 fi
11980 ${MAKE-make} preinstall