]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.9 - patch 20110925
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101002.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="ncurses.c"
108
109 # Initialize some variables set by options.
110 ac_init_help=
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
114 cache_file=/dev/null
115 exec_prefix=NONE
116 no_create=
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 verbose=
126 x_includes=NONE
127 x_libraries=NONE
128
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datadir='${prefix}/share'
138 sysconfdir='${prefix}/etc'
139 sharedstatedir='${prefix}/com'
140 localstatedir='${prefix}/var'
141 libdir='${exec_prefix}/lib'
142 includedir='${prefix}/include'
143 oldincludedir='/usr/include'
144 infodir='${prefix}/info'
145 mandir='${prefix}/man'
146
147 # Identity of this package.
148 PACKAGE_NAME=
149 PACKAGE_TARNAME=
150 PACKAGE_VERSION=
151 PACKAGE_STRING=
152 PACKAGE_BUGREPORT=
153
154 ac_prev=
155 for ac_option
156 do
157   # If the previous option needs an argument, assign it.
158   if test -n "$ac_prev"; then
159     eval "$ac_prev=\$ac_option"
160     ac_prev=
161     continue
162   fi
163
164   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
165
166   # Accept the important Cygnus configure options, so we can diagnose typos.
167
168   case $ac_option in
169
170   -bindir | --bindir | --bindi | --bind | --bin | --bi)
171     ac_prev=bindir ;;
172   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173     bindir=$ac_optarg ;;
174
175   -build | --build | --buil | --bui | --bu)
176     ac_prev=build_alias ;;
177   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178     build_alias=$ac_optarg ;;
179
180   -cache-file | --cache-file | --cache-fil | --cache-fi \
181   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182     ac_prev=cache_file ;;
183   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185     cache_file=$ac_optarg ;;
186
187   --config-cache | -C)
188     cache_file=config.cache ;;
189
190   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
191     ac_prev=datadir ;;
192   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
193   | --da=*)
194     datadir=$ac_optarg ;;
195
196   -disable-* | --disable-*)
197     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
198     # Reject names that are not valid shell variable names.
199     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
200       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
201    { (exit 1); exit 1; }; }
202     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
203     eval "enable_$ac_feature=no" ;;
204
205   -enable-* | --enable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     case $ac_option in
213       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
214       *) ac_optarg=yes ;;
215     esac
216     eval "enable_$ac_feature='$ac_optarg'" ;;
217
218   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
219   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
220   | --exec | --exe | --ex)
221     ac_prev=exec_prefix ;;
222   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
223   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
224   | --exec=* | --exe=* | --ex=*)
225     exec_prefix=$ac_optarg ;;
226
227   -gas | --gas | --ga | --g)
228     # Obsolete; use --with-gas.
229     with_gas=yes ;;
230
231   -help | --help | --hel | --he | -h)
232     ac_init_help=long ;;
233   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
234     ac_init_help=recursive ;;
235   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
236     ac_init_help=short ;;
237
238   -host | --host | --hos | --ho)
239     ac_prev=host_alias ;;
240   -host=* | --host=* | --hos=* | --ho=*)
241     host_alias=$ac_optarg ;;
242
243   -includedir | --includedir | --includedi | --included | --include \
244   | --includ | --inclu | --incl | --inc)
245     ac_prev=includedir ;;
246   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247   | --includ=* | --inclu=* | --incl=* | --inc=*)
248     includedir=$ac_optarg ;;
249
250   -infodir | --infodir | --infodi | --infod | --info | --inf)
251     ac_prev=infodir ;;
252   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253     infodir=$ac_optarg ;;
254
255   -libdir | --libdir | --libdi | --libd)
256     ac_prev=libdir ;;
257   -libdir=* | --libdir=* | --libdi=* | --libd=*)
258     libdir=$ac_optarg ;;
259
260   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261   | --libexe | --libex | --libe)
262     ac_prev=libexecdir ;;
263   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264   | --libexe=* | --libex=* | --libe=*)
265     libexecdir=$ac_optarg ;;
266
267   -localstatedir | --localstatedir | --localstatedi | --localstated \
268   | --localstate | --localstat | --localsta | --localst \
269   | --locals | --local | --loca | --loc | --lo)
270     ac_prev=localstatedir ;;
271   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274     localstatedir=$ac_optarg ;;
275
276   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277     ac_prev=mandir ;;
278   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279     mandir=$ac_optarg ;;
280
281   -nfp | --nfp | --nf)
282     # Obsolete; use --without-fp.
283     with_fp=no ;;
284
285   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286   | --no-cr | --no-c)
287     no_create=yes ;;
288
289   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291     no_recursion=yes ;;
292
293   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295   | --oldin | --oldi | --old | --ol | --o)
296     ac_prev=oldincludedir ;;
297   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300     oldincludedir=$ac_optarg ;;
301
302   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303     ac_prev=prefix ;;
304   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305     prefix=$ac_optarg ;;
306
307   -program-prefix | --program-prefix | --program-prefi | --program-pref \
308   | --program-pre | --program-pr | --program-p)
309     ac_prev=program_prefix ;;
310   -program-prefix=* | --program-prefix=* | --program-prefi=* \
311   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312     program_prefix=$ac_optarg ;;
313
314   -program-suffix | --program-suffix | --program-suffi | --program-suff \
315   | --program-suf | --program-su | --program-s)
316     ac_prev=program_suffix ;;
317   -program-suffix=* | --program-suffix=* | --program-suffi=* \
318   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319     program_suffix=$ac_optarg ;;
320
321   -program-transform-name | --program-transform-name \
322   | --program-transform-nam | --program-transform-na \
323   | --program-transform-n | --program-transform- \
324   | --program-transform | --program-transfor \
325   | --program-transfo | --program-transf \
326   | --program-trans | --program-tran \
327   | --progr-tra | --program-tr | --program-t)
328     ac_prev=program_transform_name ;;
329   -program-transform-name=* | --program-transform-name=* \
330   | --program-transform-nam=* | --program-transform-na=* \
331   | --program-transform-n=* | --program-transform-=* \
332   | --program-transform=* | --program-transfor=* \
333   | --program-transfo=* | --program-transf=* \
334   | --program-trans=* | --program-tran=* \
335   | --progr-tra=* | --program-tr=* | --program-t=*)
336     program_transform_name=$ac_optarg ;;
337
338   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339   | -silent | --silent | --silen | --sile | --sil)
340     silent=yes ;;
341
342   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343     ac_prev=sbindir ;;
344   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345   | --sbi=* | --sb=*)
346     sbindir=$ac_optarg ;;
347
348   -sharedstatedir | --sharedstatedir | --sharedstatedi \
349   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350   | --sharedst | --shareds | --shared | --share | --shar \
351   | --sha | --sh)
352     ac_prev=sharedstatedir ;;
353   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356   | --sha=* | --sh=*)
357     sharedstatedir=$ac_optarg ;;
358
359   -site | --site | --sit)
360     ac_prev=site ;;
361   -site=* | --site=* | --sit=*)
362     site=$ac_optarg ;;
363
364   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365     ac_prev=srcdir ;;
366   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367     srcdir=$ac_optarg ;;
368
369   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370   | --syscon | --sysco | --sysc | --sys | --sy)
371     ac_prev=sysconfdir ;;
372   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374     sysconfdir=$ac_optarg ;;
375
376   -target | --target | --targe | --targ | --tar | --ta | --t)
377     ac_prev=target_alias ;;
378   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379     target_alias=$ac_optarg ;;
380
381   -v | -verbose | --verbose | --verbos | --verbo | --verb)
382     verbose=yes ;;
383
384   -version | --version | --versio | --versi | --vers | -V)
385     ac_init_version=: ;;
386
387   -with-* | --with-*)
388     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
389     # Reject names that are not valid shell variable names.
390     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
391       { echo "$as_me: error: invalid package name: $ac_package" >&2
392    { (exit 1); exit 1; }; }
393     ac_package=`echo $ac_package| sed 's/-/_/g'`
394     case $ac_option in
395       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
396       *) ac_optarg=yes ;;
397     esac
398     eval "with_$ac_package='$ac_optarg'" ;;
399
400   -without-* | --without-*)
401     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid package name: $ac_package" >&2
405    { (exit 1); exit 1; }; }
406     ac_package=`echo $ac_package | sed 's/-/_/g'`
407     eval "with_$ac_package=no" ;;
408
409   --x)
410     # Obsolete; use --with-x.
411     with_x=yes ;;
412
413   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414   | --x-incl | --x-inc | --x-in | --x-i)
415     ac_prev=x_includes ;;
416   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418     x_includes=$ac_optarg ;;
419
420   -x-libraries | --x-libraries | --x-librarie | --x-librari \
421   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422     ac_prev=x_libraries ;;
423   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425     x_libraries=$ac_optarg ;;
426
427   -*) { echo "$as_me: error: unrecognized option: $ac_option
428 Try \`$0 --help' for more information." >&2
429    { (exit 1); exit 1; }; }
430     ;;
431
432   *=*)
433     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
437    { (exit 1); exit 1; }; }
438     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
439     eval "$ac_envvar='$ac_optarg'"
440     export $ac_envvar ;;
441
442   *)
443     # FIXME: should be removed in autoconf 3.0.
444     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
445     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
446       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
447     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
448     ;;
449
450   esac
451 done
452
453 if test -n "$ac_prev"; then
454   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
455   { echo "$as_me: error: missing argument to $ac_option" >&2
456    { (exit 1); exit 1; }; }
457 fi
458
459 # Be sure to have absolute paths.
460 for ac_var in exec_prefix prefix
461 do
462   eval ac_val=$`echo $ac_var`
463   case $ac_val in
464     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
465     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
466    { (exit 1); exit 1; }; };;
467   esac
468 done
469
470 # Be sure to have absolute paths.
471 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
472               localstatedir libdir includedir oldincludedir infodir mandir
473 do
474   eval ac_val=$`echo $ac_var`
475   case $ac_val in
476     [\\/$]* | ?:[\\/]* ) ;;
477     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
478    { (exit 1); exit 1; }; };;
479   esac
480 done
481
482 # There might be people who depend on the old broken behavior: `$host'
483 # used to hold the argument of --host etc.
484 build=$build_alias
485 host=$host_alias
486 target=$target_alias
487
488 # FIXME: should be removed in autoconf 3.0.
489 if test "x$host_alias" != x; then
490   if test "x$build_alias" = x; then
491     cross_compiling=maybe
492     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
493     If a cross compiler is detected then cross compile mode will be used." >&2
494   elif test "x$build_alias" != "x$host_alias"; then
495     cross_compiling=yes
496   fi
497 fi
498
499 ac_tool_prefix=
500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
501
502 test "$silent" = yes && exec 6>/dev/null
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506   ac_srcdir_defaulted=yes
507   # Try the directory containing this script, then its parent.
508   ac_prog=$0
509   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
510   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511   srcdir=$ac_confdir
512   if test ! -r $srcdir/$ac_unique_file; then
513     srcdir=..
514   fi
515 else
516   ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519   if test "$ac_srcdir_defaulted" = yes; then
520     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
521    { (exit 1); exit 1; }; }
522   else
523     { echo "$as_me: error: cannot find sources in $srcdir" >&2
524    { (exit 1); exit 1; }; }
525   fi
526 fi
527 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
528 ac_env_build_alias_set=${build_alias+set}
529 ac_env_build_alias_value=$build_alias
530 ac_cv_env_build_alias_set=${build_alias+set}
531 ac_cv_env_build_alias_value=$build_alias
532 ac_env_host_alias_set=${host_alias+set}
533 ac_env_host_alias_value=$host_alias
534 ac_cv_env_host_alias_set=${host_alias+set}
535 ac_cv_env_host_alias_value=$host_alias
536 ac_env_target_alias_set=${target_alias+set}
537 ac_env_target_alias_value=$target_alias
538 ac_cv_env_target_alias_set=${target_alias+set}
539 ac_cv_env_target_alias_value=$target_alias
540 ac_env_CC_set=${CC+set}
541 ac_env_CC_value=$CC
542 ac_cv_env_CC_set=${CC+set}
543 ac_cv_env_CC_value=$CC
544 ac_env_CFLAGS_set=${CFLAGS+set}
545 ac_env_CFLAGS_value=$CFLAGS
546 ac_cv_env_CFLAGS_set=${CFLAGS+set}
547 ac_cv_env_CFLAGS_value=$CFLAGS
548 ac_env_LDFLAGS_set=${LDFLAGS+set}
549 ac_env_LDFLAGS_value=$LDFLAGS
550 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
551 ac_cv_env_LDFLAGS_value=$LDFLAGS
552 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
553 ac_env_CPPFLAGS_value=$CPPFLAGS
554 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
555 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
556 ac_env_CPP_set=${CPP+set}
557 ac_env_CPP_value=$CPP
558 ac_cv_env_CPP_set=${CPP+set}
559 ac_cv_env_CPP_value=$CPP
560
561 #
562 # Report the --help message.
563 #
564 if test "$ac_init_help" = "long"; then
565   # Omit some internal or obsolete options to make the list less imposing.
566   # This message is too long to be a string in the A/UX 3.1 sh.
567   cat <<EOF
568 \`configure' configures this package to adapt to many kinds of systems.
569
570 Usage: $0 [OPTION]... [VAR=VALUE]...
571
572 To assign environment variables (e.g., CC, CFLAGS...), specify them as
573 VAR=VALUE.  See below for descriptions of some of the useful variables.
574
575 Defaults for the options are specified in brackets.
576
577 Configuration:
578   -h, --help              display this help and exit
579       --help=short        display options specific to this package
580       --help=recursive    display the short help of all the included packages
581   -V, --version           display version information and exit
582   -q, --quiet, --silent   do not print \`checking...' messages
583       --cache-file=FILE   cache test results in FILE [disabled]
584   -C, --config-cache      alias for \`--cache-file=config.cache'
585   -n, --no-create         do not create output files
586       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
587
588 EOF
589
590   cat <<EOF
591 Installation directories:
592   --prefix=PREFIX         install architecture-independent files in PREFIX
593                           [$ac_default_prefix]
594   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
595                           [PREFIX]
596
597 By default, \`make install' will install all the files in
598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
600 for instance \`--prefix=\$HOME'.
601
602 For better control, use the options below.
603
604 Fine tuning of the installation directories:
605   --bindir=DIR            user executables [EPREFIX/bin]
606   --sbindir=DIR           system admin executables [EPREFIX/sbin]
607   --libexecdir=DIR        program executables [EPREFIX/libexec]
608   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
609   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
610   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
611   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
612   --libdir=DIR            object code libraries [EPREFIX/lib]
613   --includedir=DIR        C header files [PREFIX/include]
614   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
615   --infodir=DIR           info documentation [PREFIX/info]
616   --mandir=DIR            man documentation [PREFIX/man]
617 EOF
618
619   cat <<\EOF
620
621 Program names:
622   --program-prefix=PREFIX            prepend PREFIX to installed program names
623   --program-suffix=SUFFIX            append SUFFIX to installed program names
624   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
625
626 X features:
627   --x-includes=DIR    X include files are in DIR
628   --x-libraries=DIR   X library files are in DIR
629
630 System types:
631   --build=BUILD           configure for building on BUILD [guessed]
632   --host=HOST       build programs to run on HOST [BUILD]
633 EOF
634 fi
635
636 if test -n "$ac_init_help"; then
637
638   cat <<\EOF
639
640 Optional Features:
641   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
642   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
643
644 Optional Packages:
645   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
646   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
647
648   --disable-echo          display "compiling" commands
649   --enable-warnings       test: turn on gcc compiler warnings
650   --with-dmalloc          test: use Gray Watson's dmalloc library
651   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
652   --with-valgrind         test: use valgrind
653   --disable-leaks         test: free permanent memory, analyze leaks
654 --disable-widec           disable checks for wide-character functions
655   --with-curses-dir=DIR   directory in which (n)curses is installed
656   --with-ncursesw         use wide ncurses-libraries (installed)
657   --with-ncurses          use ncurses-libraries (installed)
658   --with-pdcurses         compile/link with pdcurses X11 library
659   --with-curses-colr      compile/link with HPUX 10.x color-curses
660   --with-curses-5lib      compile/link with SunOS 5lib curses
661   --with-Xaw3d            link with Xaw 3d library
662   --with-neXtaw           link with neXT Athena library
663   --with-XawPlus          link with Athena-Plus library
664   --with-pkg-config{=path} enable/disable use of pkg-config
665   --with-x                use the X Window System
666   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
667
668 Some influential environment variables:
669   CC          C compiler command
670   CFLAGS      C compiler flags
671   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
672               nonstandard directory <lib dir>
673   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
674               headers in a nonstandard directory <include dir>
675   CPP         C preprocessor
676
677 Use these variables to override the choices made by `configure' or to help
678 it to find libraries and programs with nonstandard names/locations.
679
680 EOF
681 fi
682
683 if test "$ac_init_help" = "recursive"; then
684   # If there are subdirs, report their specific --help.
685   ac_popdir=`pwd`
686   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
687     cd $ac_subdir
688     # A "../" for each directory in /$ac_subdir.
689     ac_dots=`echo $ac_subdir |
690              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
691
692     case $srcdir in
693     .) # No --srcdir option.  We are building in place.
694       ac_sub_srcdir=$srcdir ;;
695     [\\/]* | ?:[\\/]* ) # Absolute path.
696       ac_sub_srcdir=$srcdir/$ac_subdir ;;
697     *) # Relative path.
698       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
699     esac
700
701     # Check for guested configure; otherwise get Cygnus style configure.
702     if test -f $ac_sub_srcdir/configure.gnu; then
703       echo
704       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
705     elif test -f $ac_sub_srcdir/configure; then
706       echo
707       $SHELL $ac_sub_srcdir/configure  --help=recursive
708     elif test -f $ac_sub_srcdir/configure.ac ||
709            test -f $ac_sub_srcdir/configure.in; then
710       echo
711       $ac_configure --help
712     else
713       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
714     fi
715     cd $ac_popdir
716   done
717 fi
718
719 test -n "$ac_init_help" && exit 0
720 if $ac_init_version; then
721   cat <<\EOF
722
723 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
724 Free Software Foundation, Inc.
725 This configure script is free software; the Free Software Foundation
726 gives unlimited permission to copy, distribute and modify it.
727 EOF
728   exit 0
729 fi
730 exec 5>config.log
731 cat >&5 <<EOF
732 This file contains any messages produced by compilers while
733 running configure, to aid debugging if configure makes a mistake.
734
735 It was created by $as_me, which was
736 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
737
738   $ $0 $@
739
740 EOF
741 {
742 cat <<_ASUNAME
743 ## ---------- ##
744 ## Platform.  ##
745 ## ---------- ##
746
747 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
748 uname -m = `(uname -m) 2>/dev/null || echo unknown`
749 uname -r = `(uname -r) 2>/dev/null || echo unknown`
750 uname -s = `(uname -s) 2>/dev/null || echo unknown`
751 uname -v = `(uname -v) 2>/dev/null || echo unknown`
752
753 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
754 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
755
756 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
757 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
758 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
759 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
760 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
761 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
762 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
763
764 PATH = $PATH
765
766 _ASUNAME
767 } >&5
768
769 cat >&5 <<EOF
770 ## ------------ ##
771 ## Core tests.  ##
772 ## ------------ ##
773
774 EOF
775
776 # Keep a trace of the command line.
777 # Strip out --no-create and --no-recursion so they do not pile up.
778 # Also quote any args containing shell meta-characters.
779 ac_configure_args=
780 ac_sep=
781 for ac_arg
782 do
783   case $ac_arg in
784   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
785   | --no-cr | --no-c) ;;
786   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
787   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
788   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
789     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
790     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
791     ac_sep=" " ;;
792   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
793      ac_sep=" " ;;
794   esac
795   # Get rid of the leading space.
796 done
797
798 # When interrupted or exit'd, cleanup temporary files, and complete
799 # config.log.  We remove comments because anyway the quotes in there
800 # would cause problems or look ugly.
801 trap 'exit_status=$?
802   # Save into config.log some information that might help in debugging.
803   echo >&5
804   echo "## ----------------- ##" >&5
805   echo "## Cache variables.  ##" >&5
806   echo "## ----------------- ##" >&5
807   echo >&5
808   # The following way of writing the cache mishandles newlines in values,
809 {
810   (set) 2>&1 |
811     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
812     *ac_space=\ *)
813       sed -n \
814         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
815           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
816       ;;
817     *)
818       sed -n \
819         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
820       ;;
821     esac;
822 } >&5
823   sed "/^$/d" confdefs.h >conftest.log
824   if test -s conftest.log; then
825     echo >&5
826     echo "## ------------ ##" >&5
827     echo "## confdefs.h.  ##" >&5
828     echo "## ------------ ##" >&5
829     echo >&5
830     cat conftest.log >&5
831   fi
832   (echo; echo) >&5
833   test "$ac_signal" != 0 &&
834     echo "$as_me: caught signal $ac_signal" >&5
835   echo "$as_me: exit $exit_status" >&5
836   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
837     exit $exit_status
838      ' 0
839 for ac_signal in 1 2 13 15; do
840   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
841 done
842 ac_signal=0
843
844 # confdefs.h avoids OS command line length limits that DEFS can exceed.
845 rm -rf conftest* confdefs.h
846 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
847 echo >confdefs.h
848
849 # Let the site file select an alternate cache file if it wants to.
850 # Prefer explicitly selected file to automatically selected ones.
851 if test -z "$CONFIG_SITE"; then
852   if test "x$prefix" != xNONE; then
853     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
854   else
855     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
856   fi
857 fi
858 for ac_site_file in $CONFIG_SITE; do
859   if test -r "$ac_site_file"; then
860     { echo "$as_me:860: loading site script $ac_site_file" >&5
861 echo "$as_me: loading site script $ac_site_file" >&6;}
862     cat "$ac_site_file" >&5
863     . "$ac_site_file"
864   fi
865 done
866
867 if test -r "$cache_file"; then
868   # Some versions of bash will fail to source /dev/null (special
869   # files actually), so we avoid doing that.
870   if test -f "$cache_file"; then
871     { echo "$as_me:871: loading cache $cache_file" >&5
872 echo "$as_me: loading cache $cache_file" >&6;}
873     case $cache_file in
874       [\\/]* | ?:[\\/]* ) . $cache_file;;
875       *)                      . ./$cache_file;;
876     esac
877   fi
878 else
879   { echo "$as_me:879: creating cache $cache_file" >&5
880 echo "$as_me: creating cache $cache_file" >&6;}
881   >$cache_file
882 fi
883
884 # Check that the precious variables saved in the cache have kept the same
885 # value.
886 ac_cache_corrupted=false
887 for ac_var in `(set) 2>&1 |
888                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
889   eval ac_old_set=\$ac_cv_env_${ac_var}_set
890   eval ac_new_set=\$ac_env_${ac_var}_set
891   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
892   eval ac_new_val="\$ac_env_${ac_var}_value"
893   case $ac_old_set,$ac_new_set in
894     set,)
895       { echo "$as_me:895: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
896 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
897       ac_cache_corrupted=: ;;
898     ,set)
899       { echo "$as_me:899: error: \`$ac_var' was not set in the previous run" >&5
900 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
901       ac_cache_corrupted=: ;;
902     ,);;
903     *)
904       if test "x$ac_old_val" != "x$ac_new_val"; then
905         { echo "$as_me:905: error: \`$ac_var' has changed since the previous run:" >&5
906 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
907         { echo "$as_me:907:   former value:  $ac_old_val" >&5
908 echo "$as_me:   former value:  $ac_old_val" >&2;}
909         { echo "$as_me:909:   current value: $ac_new_val" >&5
910 echo "$as_me:   current value: $ac_new_val" >&2;}
911         ac_cache_corrupted=:
912       fi;;
913   esac
914   # Pass precious variables to config.status.  It doesn't matter if
915   # we pass some twice (in addition to the command line arguments).
916   if test "$ac_new_set" = set; then
917     case $ac_new_val in
918     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
919       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
920       ac_configure_args="$ac_configure_args '$ac_arg'"
921       ;;
922     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
923        ;;
924     esac
925   fi
926 done
927 if $ac_cache_corrupted; then
928   { echo "$as_me:928: error: changes in the environment can compromise the build" >&5
929 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
930   { { echo "$as_me:930: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
931 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
932    { (exit 1); exit 1; }; }
933 fi
934
935 ac_ext=c
936 ac_cpp='$CPP $CPPFLAGS'
937 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
938 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
939 ac_compiler_gnu=$ac_cv_c_compiler_gnu
940 ac_main_return=return
941
942 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
943   *c*,-n*) ECHO_N= ECHO_C='
944 ' ECHO_T='      ' ;;
945   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
946   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
947 esac
948 echo "#! $SHELL" >conftest.sh
949 echo  "exit 0"   >>conftest.sh
950 chmod +x conftest.sh
951 if { (echo "$as_me:951: PATH=\".;.\"; conftest.sh") >&5
952   (PATH=".;."; conftest.sh) 2>&5
953   ac_status=$?
954   echo "$as_me:954: \$? = $ac_status" >&5
955   (exit $ac_status); }; then
956   ac_path_separator=';'
957 else
958   ac_path_separator=:
959 fi
960 PATH_SEPARATOR="$ac_path_separator"
961 rm -f conftest.sh
962
963 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
964
965 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
966
967 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
968
969 ac_aux_dir=
970 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
971   if test -f $ac_dir/install-sh; then
972     ac_aux_dir=$ac_dir
973     ac_install_sh="$ac_aux_dir/install-sh -c"
974     break
975   elif test -f $ac_dir/install.sh; then
976     ac_aux_dir=$ac_dir
977     ac_install_sh="$ac_aux_dir/install.sh -c"
978     break
979   elif test -f $ac_dir/shtool; then
980     ac_aux_dir=$ac_dir
981     ac_install_sh="$ac_aux_dir/shtool install -c"
982     break
983   fi
984 done
985 if test -z "$ac_aux_dir"; then
986   { { echo "$as_me:986: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
987 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
988    { (exit 1); exit 1; }; }
989 fi
990 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
991 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
992 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
993
994 # Make sure we can run config.sub.
995 $ac_config_sub sun4 >/dev/null 2>&1 ||
996   { { echo "$as_me:996: error: cannot run $ac_config_sub" >&5
997 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
998    { (exit 1); exit 1; }; }
999
1000 echo "$as_me:1000: checking build system type" >&5
1001 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1002 if test "${ac_cv_build+set}" = set; then
1003   echo $ECHO_N "(cached) $ECHO_C" >&6
1004 else
1005   ac_cv_build_alias=$build_alias
1006 test -z "$ac_cv_build_alias" &&
1007   ac_cv_build_alias=`$ac_config_guess`
1008 test -z "$ac_cv_build_alias" &&
1009   { { echo "$as_me:1009: error: cannot guess build type; you must specify one" >&5
1010 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1011    { (exit 1); exit 1; }; }
1012 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1013   { { echo "$as_me:1013: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1014 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1015    { (exit 1); exit 1; }; }
1016
1017 fi
1018 echo "$as_me:1018: result: $ac_cv_build" >&5
1019 echo "${ECHO_T}$ac_cv_build" >&6
1020 build=$ac_cv_build
1021 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1022 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1023 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1024
1025 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1026         echo "$as_me:1026: checking host system type" >&5
1027 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1028 if test "${ac_cv_host+set}" = set; then
1029   echo $ECHO_N "(cached) $ECHO_C" >&6
1030 else
1031   ac_cv_host_alias=$host_alias
1032 test -z "$ac_cv_host_alias" &&
1033   ac_cv_host_alias=$ac_cv_build_alias
1034 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1035   { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1036 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1037    { (exit 1); exit 1; }; }
1038
1039 fi
1040 echo "$as_me:1040: result: $ac_cv_host" >&5
1041 echo "${ECHO_T}$ac_cv_host" >&6
1042 host=$ac_cv_host
1043 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047         system_name="$host_os"
1048 else
1049         system_name="`(uname -s -r) 2>/dev/null`"
1050         if test -z "$system_name" ; then
1051                 system_name="`(hostname) 2>/dev/null`"
1052         fi
1053 fi
1054 test -n "$system_name" && cat >>confdefs.h <<EOF
1055 #define SYSTEM_NAME "$system_name"
1056 EOF
1057
1058 if test "${cf_cv_system_name+set}" = set; then
1059   echo $ECHO_N "(cached) $ECHO_C" >&6
1060 else
1061   cf_cv_system_name="$system_name"
1062 fi
1063
1064 test -z "$system_name" && system_name="$cf_cv_system_name"
1065 test -n "$cf_cv_system_name" && echo "$as_me:1065: result: Configuring for $cf_cv_system_name" >&5
1066 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1067
1068 if test ".$system_name" != ".$cf_cv_system_name" ; then
1069         echo "$as_me:1069: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1070 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1071         { { echo "$as_me:1071: error: \"Please remove config.cache and try again.\"" >&5
1072 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1073    { (exit 1); exit 1; }; }
1074 fi
1075
1076 test "$program_prefix" != NONE &&
1077   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1078 # Use a double $ so make ignores it.
1079 test "$program_suffix" != NONE &&
1080   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1081 # Double any \ or $.  echo might interpret backslashes.
1082 # By default was `s,x,x', remove it if useless.
1083 cat <<\_ACEOF >conftest.sed
1084 s/[\\$]/&&/g;s/;s,x,x,$//
1085 _ACEOF
1086 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1087 rm conftest.sed
1088
1089 echo "$as_me:1089: checking whether ${MAKE-make} sets \${MAKE}" >&5
1090 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1091 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1092 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1093   echo $ECHO_N "(cached) $ECHO_C" >&6
1094 else
1095   cat >conftest.make <<\EOF
1096 all:
1097         @echo 'ac_maketemp="${MAKE}"'
1098 EOF
1099 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1100 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1101 if test -n "$ac_maketemp"; then
1102   eval ac_cv_prog_make_${ac_make}_set=yes
1103 else
1104   eval ac_cv_prog_make_${ac_make}_set=no
1105 fi
1106 rm -f conftest.make
1107 fi
1108 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1109   echo "$as_me:1109: result: yes" >&5
1110 echo "${ECHO_T}yes" >&6
1111   SET_MAKE=
1112 else
1113   echo "$as_me:1113: result: no" >&5
1114 echo "${ECHO_T}no" >&6
1115   SET_MAKE="MAKE=${MAKE-make}"
1116 fi
1117
1118 ac_ext=c
1119 ac_cpp='$CPP $CPPFLAGS'
1120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1123 ac_main_return=return
1124 if test -n "$ac_tool_prefix"; then
1125   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1126 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1127 echo "$as_me:1127: checking for $ac_word" >&5
1128 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1129 if test "${ac_cv_prog_CC+set}" = set; then
1130   echo $ECHO_N "(cached) $ECHO_C" >&6
1131 else
1132   if test -n "$CC"; then
1133   ac_cv_prog_CC="$CC" # Let the user override the test.
1134 else
1135   ac_save_IFS=$IFS; IFS=$ac_path_separator
1136 ac_dummy="$PATH"
1137 for ac_dir in $ac_dummy; do
1138   IFS=$ac_save_IFS
1139   test -z "$ac_dir" && ac_dir=.
1140   $as_executable_p "$ac_dir/$ac_word" || continue
1141 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1142 echo "$as_me:1142: found $ac_dir/$ac_word" >&5
1143 break
1144 done
1145
1146 fi
1147 fi
1148 CC=$ac_cv_prog_CC
1149 if test -n "$CC"; then
1150   echo "$as_me:1150: result: $CC" >&5
1151 echo "${ECHO_T}$CC" >&6
1152 else
1153   echo "$as_me:1153: result: no" >&5
1154 echo "${ECHO_T}no" >&6
1155 fi
1156
1157 fi
1158 if test -z "$ac_cv_prog_CC"; then
1159   ac_ct_CC=$CC
1160   # Extract the first word of "gcc", so it can be a program name with args.
1161 set dummy gcc; ac_word=$2
1162 echo "$as_me:1162: checking for $ac_word" >&5
1163 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1164 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1165   echo $ECHO_N "(cached) $ECHO_C" >&6
1166 else
1167   if test -n "$ac_ct_CC"; then
1168   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1169 else
1170   ac_save_IFS=$IFS; IFS=$ac_path_separator
1171 ac_dummy="$PATH"
1172 for ac_dir in $ac_dummy; do
1173   IFS=$ac_save_IFS
1174   test -z "$ac_dir" && ac_dir=.
1175   $as_executable_p "$ac_dir/$ac_word" || continue
1176 ac_cv_prog_ac_ct_CC="gcc"
1177 echo "$as_me:1177: found $ac_dir/$ac_word" >&5
1178 break
1179 done
1180
1181 fi
1182 fi
1183 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1184 if test -n "$ac_ct_CC"; then
1185   echo "$as_me:1185: result: $ac_ct_CC" >&5
1186 echo "${ECHO_T}$ac_ct_CC" >&6
1187 else
1188   echo "$as_me:1188: result: no" >&5
1189 echo "${ECHO_T}no" >&6
1190 fi
1191
1192   CC=$ac_ct_CC
1193 else
1194   CC="$ac_cv_prog_CC"
1195 fi
1196
1197 if test -z "$CC"; then
1198   if test -n "$ac_tool_prefix"; then
1199   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1200 set dummy ${ac_tool_prefix}cc; ac_word=$2
1201 echo "$as_me:1201: checking for $ac_word" >&5
1202 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1203 if test "${ac_cv_prog_CC+set}" = set; then
1204   echo $ECHO_N "(cached) $ECHO_C" >&6
1205 else
1206   if test -n "$CC"; then
1207   ac_cv_prog_CC="$CC" # Let the user override the test.
1208 else
1209   ac_save_IFS=$IFS; IFS=$ac_path_separator
1210 ac_dummy="$PATH"
1211 for ac_dir in $ac_dummy; do
1212   IFS=$ac_save_IFS
1213   test -z "$ac_dir" && ac_dir=.
1214   $as_executable_p "$ac_dir/$ac_word" || continue
1215 ac_cv_prog_CC="${ac_tool_prefix}cc"
1216 echo "$as_me:1216: found $ac_dir/$ac_word" >&5
1217 break
1218 done
1219
1220 fi
1221 fi
1222 CC=$ac_cv_prog_CC
1223 if test -n "$CC"; then
1224   echo "$as_me:1224: result: $CC" >&5
1225 echo "${ECHO_T}$CC" >&6
1226 else
1227   echo "$as_me:1227: result: no" >&5
1228 echo "${ECHO_T}no" >&6
1229 fi
1230
1231 fi
1232 if test -z "$ac_cv_prog_CC"; then
1233   ac_ct_CC=$CC
1234   # Extract the first word of "cc", so it can be a program name with args.
1235 set dummy cc; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   if test -n "$ac_ct_CC"; then
1242   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1243 else
1244   ac_save_IFS=$IFS; IFS=$ac_path_separator
1245 ac_dummy="$PATH"
1246 for ac_dir in $ac_dummy; do
1247   IFS=$ac_save_IFS
1248   test -z "$ac_dir" && ac_dir=.
1249   $as_executable_p "$ac_dir/$ac_word" || continue
1250 ac_cv_prog_ac_ct_CC="cc"
1251 echo "$as_me:1251: found $ac_dir/$ac_word" >&5
1252 break
1253 done
1254
1255 fi
1256 fi
1257 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1258 if test -n "$ac_ct_CC"; then
1259   echo "$as_me:1259: result: $ac_ct_CC" >&5
1260 echo "${ECHO_T}$ac_ct_CC" >&6
1261 else
1262   echo "$as_me:1262: result: no" >&5
1263 echo "${ECHO_T}no" >&6
1264 fi
1265
1266   CC=$ac_ct_CC
1267 else
1268   CC="$ac_cv_prog_CC"
1269 fi
1270
1271 fi
1272 if test -z "$CC"; then
1273   # Extract the first word of "cc", so it can be a program name with args.
1274 set dummy cc; ac_word=$2
1275 echo "$as_me:1275: checking for $ac_word" >&5
1276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1277 if test "${ac_cv_prog_CC+set}" = set; then
1278   echo $ECHO_N "(cached) $ECHO_C" >&6
1279 else
1280   if test -n "$CC"; then
1281   ac_cv_prog_CC="$CC" # Let the user override the test.
1282 else
1283   ac_prog_rejected=no
1284   ac_save_IFS=$IFS; IFS=$ac_path_separator
1285 ac_dummy="$PATH"
1286 for ac_dir in $ac_dummy; do
1287   IFS=$ac_save_IFS
1288   test -z "$ac_dir" && ac_dir=.
1289   $as_executable_p "$ac_dir/$ac_word" || continue
1290 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1291   ac_prog_rejected=yes
1292   continue
1293 fi
1294 ac_cv_prog_CC="cc"
1295 echo "$as_me:1295: found $ac_dir/$ac_word" >&5
1296 break
1297 done
1298
1299 if test $ac_prog_rejected = yes; then
1300   # We found a bogon in the path, so make sure we never use it.
1301   set dummy $ac_cv_prog_CC
1302   shift
1303   if test $# != 0; then
1304     # We chose a different compiler from the bogus one.
1305     # However, it has the same basename, so the bogon will be chosen
1306     # first if we set CC to just the basename; use the full file name.
1307     shift
1308     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1309     shift
1310     ac_cv_prog_CC="$@"
1311   fi
1312 fi
1313 fi
1314 fi
1315 CC=$ac_cv_prog_CC
1316 if test -n "$CC"; then
1317   echo "$as_me:1317: result: $CC" >&5
1318 echo "${ECHO_T}$CC" >&6
1319 else
1320   echo "$as_me:1320: result: no" >&5
1321 echo "${ECHO_T}no" >&6
1322 fi
1323
1324 fi
1325 if test -z "$CC"; then
1326   if test -n "$ac_tool_prefix"; then
1327   for ac_prog in cl
1328   do
1329     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1330 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1331 echo "$as_me:1331: checking for $ac_word" >&5
1332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1333 if test "${ac_cv_prog_CC+set}" = set; then
1334   echo $ECHO_N "(cached) $ECHO_C" >&6
1335 else
1336   if test -n "$CC"; then
1337   ac_cv_prog_CC="$CC" # Let the user override the test.
1338 else
1339   ac_save_IFS=$IFS; IFS=$ac_path_separator
1340 ac_dummy="$PATH"
1341 for ac_dir in $ac_dummy; do
1342   IFS=$ac_save_IFS
1343   test -z "$ac_dir" && ac_dir=.
1344   $as_executable_p "$ac_dir/$ac_word" || continue
1345 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1346 echo "$as_me:1346: found $ac_dir/$ac_word" >&5
1347 break
1348 done
1349
1350 fi
1351 fi
1352 CC=$ac_cv_prog_CC
1353 if test -n "$CC"; then
1354   echo "$as_me:1354: result: $CC" >&5
1355 echo "${ECHO_T}$CC" >&6
1356 else
1357   echo "$as_me:1357: result: no" >&5
1358 echo "${ECHO_T}no" >&6
1359 fi
1360
1361     test -n "$CC" && break
1362   done
1363 fi
1364 if test -z "$CC"; then
1365   ac_ct_CC=$CC
1366   for ac_prog in cl
1367 do
1368   # Extract the first word of "$ac_prog", so it can be a program name with args.
1369 set dummy $ac_prog; ac_word=$2
1370 echo "$as_me:1370: checking for $ac_word" >&5
1371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1372 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1373   echo $ECHO_N "(cached) $ECHO_C" >&6
1374 else
1375   if test -n "$ac_ct_CC"; then
1376   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1377 else
1378   ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 ac_dummy="$PATH"
1380 for ac_dir in $ac_dummy; do
1381   IFS=$ac_save_IFS
1382   test -z "$ac_dir" && ac_dir=.
1383   $as_executable_p "$ac_dir/$ac_word" || continue
1384 ac_cv_prog_ac_ct_CC="$ac_prog"
1385 echo "$as_me:1385: found $ac_dir/$ac_word" >&5
1386 break
1387 done
1388
1389 fi
1390 fi
1391 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1392 if test -n "$ac_ct_CC"; then
1393   echo "$as_me:1393: result: $ac_ct_CC" >&5
1394 echo "${ECHO_T}$ac_ct_CC" >&6
1395 else
1396   echo "$as_me:1396: result: no" >&5
1397 echo "${ECHO_T}no" >&6
1398 fi
1399
1400   test -n "$ac_ct_CC" && break
1401 done
1402
1403   CC=$ac_ct_CC
1404 fi
1405
1406 fi
1407
1408 test -z "$CC" && { { echo "$as_me:1408: error: no acceptable cc found in \$PATH" >&5
1409 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1410    { (exit 1); exit 1; }; }
1411
1412 # Provide some information about the compiler.
1413 echo "$as_me:1413:" \
1414      "checking for C compiler version" >&5
1415 ac_compiler=`set X $ac_compile; echo $2`
1416 { (eval echo "$as_me:1416: \"$ac_compiler --version </dev/null >&5\"") >&5
1417   (eval $ac_compiler --version </dev/null >&5) 2>&5
1418   ac_status=$?
1419   echo "$as_me:1419: \$? = $ac_status" >&5
1420   (exit $ac_status); }
1421 { (eval echo "$as_me:1421: \"$ac_compiler -v </dev/null >&5\"") >&5
1422   (eval $ac_compiler -v </dev/null >&5) 2>&5
1423   ac_status=$?
1424   echo "$as_me:1424: \$? = $ac_status" >&5
1425   (exit $ac_status); }
1426 { (eval echo "$as_me:1426: \"$ac_compiler -V </dev/null >&5\"") >&5
1427   (eval $ac_compiler -V </dev/null >&5) 2>&5
1428   ac_status=$?
1429   echo "$as_me:1429: \$? = $ac_status" >&5
1430   (exit $ac_status); }
1431
1432 cat >conftest.$ac_ext <<_ACEOF
1433 #line 1433 "configure"
1434 #include "confdefs.h"
1435
1436 int
1437 main ()
1438 {
1439
1440   ;
1441   return 0;
1442 }
1443 _ACEOF
1444 ac_clean_files_save=$ac_clean_files
1445 ac_clean_files="$ac_clean_files a.out a.exe"
1446 # Try to create an executable without -o first, disregard a.out.
1447 # It will help us diagnose broken compilers, and finding out an intuition
1448 # of exeext.
1449 echo "$as_me:1449: checking for C compiler default output" >&5
1450 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1451 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1452 if { (eval echo "$as_me:1452: \"$ac_link_default\"") >&5
1453   (eval $ac_link_default) 2>&5
1454   ac_status=$?
1455   echo "$as_me:1455: \$? = $ac_status" >&5
1456   (exit $ac_status); }; then
1457   # Find the output, starting from the most likely.  This scheme is
1458 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1459 # resort.
1460 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1461                 ls a.out conftest 2>/dev/null;
1462                 ls a.* conftest.* 2>/dev/null`; do
1463   case $ac_file in
1464     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1465     a.out ) # We found the default executable, but exeext='' is most
1466             # certainly right.
1467             break;;
1468     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1469           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1470           export ac_cv_exeext
1471           break;;
1472     * ) break;;
1473   esac
1474 done
1475 else
1476   echo "$as_me: failed program was:" >&5
1477 cat conftest.$ac_ext >&5
1478 { { echo "$as_me:1478: error: C compiler cannot create executables" >&5
1479 echo "$as_me: error: C compiler cannot create executables" >&2;}
1480    { (exit 77); exit 77; }; }
1481 fi
1482
1483 ac_exeext=$ac_cv_exeext
1484 echo "$as_me:1484: result: $ac_file" >&5
1485 echo "${ECHO_T}$ac_file" >&6
1486
1487 # Check the compiler produces executables we can run.  If not, either
1488 # the compiler is broken, or we cross compile.
1489 echo "$as_me:1489: checking whether the C compiler works" >&5
1490 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1491 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1492 # If not cross compiling, check that we can run a simple program.
1493 if test "$cross_compiling" != yes; then
1494   if { ac_try='./$ac_file'
1495   { (eval echo "$as_me:1495: \"$ac_try\"") >&5
1496   (eval $ac_try) 2>&5
1497   ac_status=$?
1498   echo "$as_me:1498: \$? = $ac_status" >&5
1499   (exit $ac_status); }; }; then
1500     cross_compiling=no
1501   else
1502     if test "$cross_compiling" = maybe; then
1503         cross_compiling=yes
1504     else
1505         { { echo "$as_me:1505: error: cannot run C compiled programs.
1506 If you meant to cross compile, use \`--host'." >&5
1507 echo "$as_me: error: cannot run C compiled programs.
1508 If you meant to cross compile, use \`--host'." >&2;}
1509    { (exit 1); exit 1; }; }
1510     fi
1511   fi
1512 fi
1513 echo "$as_me:1513: result: yes" >&5
1514 echo "${ECHO_T}yes" >&6
1515
1516 rm -f a.out a.exe conftest$ac_cv_exeext
1517 ac_clean_files=$ac_clean_files_save
1518 # Check the compiler produces executables we can run.  If not, either
1519 # the compiler is broken, or we cross compile.
1520 echo "$as_me:1520: checking whether we are cross compiling" >&5
1521 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1522 echo "$as_me:1522: result: $cross_compiling" >&5
1523 echo "${ECHO_T}$cross_compiling" >&6
1524
1525 echo "$as_me:1525: checking for executable suffix" >&5
1526 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1527 if { (eval echo "$as_me:1527: \"$ac_link\"") >&5
1528   (eval $ac_link) 2>&5
1529   ac_status=$?
1530   echo "$as_me:1530: \$? = $ac_status" >&5
1531   (exit $ac_status); }; then
1532   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1533 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1534 # work properly (i.e., refer to `conftest.exe'), while it won't with
1535 # `rm'.
1536 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1537   case $ac_file in
1538     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1539     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1540           export ac_cv_exeext
1541           break;;
1542     * ) break;;
1543   esac
1544 done
1545 else
1546   { { echo "$as_me:1546: error: cannot compute EXEEXT: cannot compile and link" >&5
1547 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1548    { (exit 1); exit 1; }; }
1549 fi
1550
1551 rm -f conftest$ac_cv_exeext
1552 echo "$as_me:1552: result: $ac_cv_exeext" >&5
1553 echo "${ECHO_T}$ac_cv_exeext" >&6
1554
1555 rm -f conftest.$ac_ext
1556 EXEEXT=$ac_cv_exeext
1557 ac_exeext=$EXEEXT
1558 echo "$as_me:1558: checking for object suffix" >&5
1559 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1560 if test "${ac_cv_objext+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   cat >conftest.$ac_ext <<_ACEOF
1564 #line 1564 "configure"
1565 #include "confdefs.h"
1566
1567 int
1568 main ()
1569 {
1570
1571   ;
1572   return 0;
1573 }
1574 _ACEOF
1575 rm -f conftest.o conftest.obj
1576 if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5
1577   (eval $ac_compile) 2>&5
1578   ac_status=$?
1579   echo "$as_me:1579: \$? = $ac_status" >&5
1580   (exit $ac_status); }; then
1581   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1582   case $ac_file in
1583     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1584     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1585        break;;
1586   esac
1587 done
1588 else
1589   echo "$as_me: failed program was:" >&5
1590 cat conftest.$ac_ext >&5
1591 { { echo "$as_me:1591: error: cannot compute OBJEXT: cannot compile" >&5
1592 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1593    { (exit 1); exit 1; }; }
1594 fi
1595
1596 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1597 fi
1598 echo "$as_me:1598: result: $ac_cv_objext" >&5
1599 echo "${ECHO_T}$ac_cv_objext" >&6
1600 OBJEXT=$ac_cv_objext
1601 ac_objext=$OBJEXT
1602 echo "$as_me:1602: checking whether we are using the GNU C compiler" >&5
1603 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1604 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1605   echo $ECHO_N "(cached) $ECHO_C" >&6
1606 else
1607   cat >conftest.$ac_ext <<_ACEOF
1608 #line 1608 "configure"
1609 #include "confdefs.h"
1610
1611 int
1612 main ()
1613 {
1614 #ifndef __GNUC__
1615        choke me
1616 #endif
1617
1618   ;
1619   return 0;
1620 }
1621 _ACEOF
1622 rm -f conftest.$ac_objext
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624   (eval $ac_compile) 2>&5
1625   ac_status=$?
1626   echo "$as_me:1626: \$? = $ac_status" >&5
1627   (exit $ac_status); } &&
1628          { ac_try='test -s conftest.$ac_objext'
1629   { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1630   (eval $ac_try) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }; }; then
1634   ac_compiler_gnu=yes
1635 else
1636   echo "$as_me: failed program was:" >&5
1637 cat conftest.$ac_ext >&5
1638 ac_compiler_gnu=no
1639 fi
1640 rm -f conftest.$ac_objext conftest.$ac_ext
1641 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1642
1643 fi
1644 echo "$as_me:1644: result: $ac_cv_c_compiler_gnu" >&5
1645 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1646 GCC=`test $ac_compiler_gnu = yes && echo yes`
1647 ac_test_CFLAGS=${CFLAGS+set}
1648 ac_save_CFLAGS=$CFLAGS
1649 CFLAGS="-g"
1650 echo "$as_me:1650: checking whether $CC accepts -g" >&5
1651 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1652 if test "${ac_cv_prog_cc_g+set}" = set; then
1653   echo $ECHO_N "(cached) $ECHO_C" >&6
1654 else
1655   cat >conftest.$ac_ext <<_ACEOF
1656 #line 1656 "configure"
1657 #include "confdefs.h"
1658
1659 int
1660 main ()
1661 {
1662
1663   ;
1664   return 0;
1665 }
1666 _ACEOF
1667 rm -f conftest.$ac_objext
1668 if { (eval echo "$as_me:1668: \"$ac_compile\"") >&5
1669   (eval $ac_compile) 2>&5
1670   ac_status=$?
1671   echo "$as_me:1671: \$? = $ac_status" >&5
1672   (exit $ac_status); } &&
1673          { ac_try='test -s conftest.$ac_objext'
1674   { (eval echo "$as_me:1674: \"$ac_try\"") >&5
1675   (eval $ac_try) 2>&5
1676   ac_status=$?
1677   echo "$as_me:1677: \$? = $ac_status" >&5
1678   (exit $ac_status); }; }; then
1679   ac_cv_prog_cc_g=yes
1680 else
1681   echo "$as_me: failed program was:" >&5
1682 cat conftest.$ac_ext >&5
1683 ac_cv_prog_cc_g=no
1684 fi
1685 rm -f conftest.$ac_objext conftest.$ac_ext
1686 fi
1687 echo "$as_me:1687: result: $ac_cv_prog_cc_g" >&5
1688 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1689 if test "$ac_test_CFLAGS" = set; then
1690   CFLAGS=$ac_save_CFLAGS
1691 elif test $ac_cv_prog_cc_g = yes; then
1692   if test "$GCC" = yes; then
1693     CFLAGS="-g -O2"
1694   else
1695     CFLAGS="-g"
1696   fi
1697 else
1698   if test "$GCC" = yes; then
1699     CFLAGS="-O2"
1700   else
1701     CFLAGS=
1702   fi
1703 fi
1704 # Some people use a C++ compiler to compile C.  Since we use `exit',
1705 # in C++ we need to declare it.  In case someone uses the same compiler
1706 # for both compiling C and C++ we need to have the C++ compiler decide
1707 # the declaration of exit, since it's the most demanding environment.
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #ifndef __cplusplus
1710   choke me
1711 #endif
1712 _ACEOF
1713 rm -f conftest.$ac_objext
1714 if { (eval echo "$as_me:1714: \"$ac_compile\"") >&5
1715   (eval $ac_compile) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); } &&
1719          { ac_try='test -s conftest.$ac_objext'
1720   { (eval echo "$as_me:1720: \"$ac_try\"") >&5
1721   (eval $ac_try) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }; }; then
1725   for ac_declaration in \
1726    ''\
1727    '#include <stdlib.h>' \
1728    'extern "C" void std::exit (int) throw (); using std::exit;' \
1729    'extern "C" void std::exit (int); using std::exit;' \
1730    'extern "C" void exit (int) throw ();' \
1731    'extern "C" void exit (int);' \
1732    'void exit (int);'
1733 do
1734   cat >conftest.$ac_ext <<_ACEOF
1735 #line 1735 "configure"
1736 #include "confdefs.h"
1737 #include <stdlib.h>
1738 $ac_declaration
1739 int
1740 main ()
1741 {
1742 exit (42);
1743   ;
1744   return 0;
1745 }
1746 _ACEOF
1747 rm -f conftest.$ac_objext
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749   (eval $ac_compile) 2>&5
1750   ac_status=$?
1751   echo "$as_me:1751: \$? = $ac_status" >&5
1752   (exit $ac_status); } &&
1753          { ac_try='test -s conftest.$ac_objext'
1754   { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1755   (eval $ac_try) 2>&5
1756   ac_status=$?
1757   echo "$as_me:1757: \$? = $ac_status" >&5
1758   (exit $ac_status); }; }; then
1759   :
1760 else
1761   echo "$as_me: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1763 continue
1764 fi
1765 rm -f conftest.$ac_objext conftest.$ac_ext
1766   cat >conftest.$ac_ext <<_ACEOF
1767 #line 1767 "configure"
1768 #include "confdefs.h"
1769 $ac_declaration
1770 int
1771 main ()
1772 {
1773 exit (42);
1774   ;
1775   return 0;
1776 }
1777 _ACEOF
1778 rm -f conftest.$ac_objext
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780   (eval $ac_compile) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); } &&
1784          { ac_try='test -s conftest.$ac_objext'
1785   { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1786   (eval $ac_try) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); }; }; then
1790   break
1791 else
1792   echo "$as_me: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 fi
1795 rm -f conftest.$ac_objext conftest.$ac_ext
1796 done
1797 rm -rf conftest*
1798 if test -n "$ac_declaration"; then
1799   echo '#ifdef __cplusplus' >>confdefs.h
1800   echo $ac_declaration      >>confdefs.h
1801   echo '#endif'             >>confdefs.h
1802 fi
1803
1804 else
1805   echo "$as_me: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 fi
1808 rm -f conftest.$ac_objext conftest.$ac_ext
1809 ac_ext=c
1810 ac_cpp='$CPP $CPPFLAGS'
1811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1814 ac_main_return=return
1815
1816 ac_ext=c
1817 ac_cpp='$CPP $CPPFLAGS'
1818 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1819 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1820 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1821 ac_main_return=return
1822 echo "$as_me:1822: checking how to run the C preprocessor" >&5
1823 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1824 # On Suns, sometimes $CPP names a directory.
1825 if test -n "$CPP" && test -d "$CPP"; then
1826   CPP=
1827 fi
1828 if test -z "$CPP"; then
1829   if test "${ac_cv_prog_CPP+set}" = set; then
1830   echo $ECHO_N "(cached) $ECHO_C" >&6
1831 else
1832       # Double quotes because CPP needs to be expanded
1833     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1834     do
1835       ac_preproc_ok=false
1836 for ac_c_preproc_warn_flag in '' yes
1837 do
1838   # Use a header file that comes with gcc, so configuring glibc
1839   # with a fresh cross-compiler works.
1840   # On the NeXT, cc -E runs the code through the compiler's parser,
1841   # not just through cpp. "Syntax error" is here to catch this case.
1842   cat >conftest.$ac_ext <<_ACEOF
1843 #line 1843 "configure"
1844 #include "confdefs.h"
1845 #include <assert.h>
1846                      Syntax error
1847 _ACEOF
1848 if { (eval echo "$as_me:1848: \"$ac_cpp conftest.$ac_ext\"") >&5
1849   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1850   ac_status=$?
1851   egrep -v '^ *\+' conftest.er1 >conftest.err
1852   rm -f conftest.er1
1853   cat conftest.err >&5
1854   echo "$as_me:1854: \$? = $ac_status" >&5
1855   (exit $ac_status); } >/dev/null; then
1856   if test -s conftest.err; then
1857     ac_cpp_err=$ac_c_preproc_warn_flag
1858   else
1859     ac_cpp_err=
1860   fi
1861 else
1862   ac_cpp_err=yes
1863 fi
1864 if test -z "$ac_cpp_err"; then
1865   :
1866 else
1867   echo "$as_me: failed program was:" >&5
1868   cat conftest.$ac_ext >&5
1869   # Broken: fails on valid input.
1870 continue
1871 fi
1872 rm -f conftest.err conftest.$ac_ext
1873
1874   # OK, works on sane cases.  Now check whether non-existent headers
1875   # can be detected and how.
1876   cat >conftest.$ac_ext <<_ACEOF
1877 #line 1877 "configure"
1878 #include "confdefs.h"
1879 #include <ac_nonexistent.h>
1880 _ACEOF
1881 if { (eval echo "$as_me:1881: \"$ac_cpp conftest.$ac_ext\"") >&5
1882   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1883   ac_status=$?
1884   egrep -v '^ *\+' conftest.er1 >conftest.err
1885   rm -f conftest.er1
1886   cat conftest.err >&5
1887   echo "$as_me:1887: \$? = $ac_status" >&5
1888   (exit $ac_status); } >/dev/null; then
1889   if test -s conftest.err; then
1890     ac_cpp_err=$ac_c_preproc_warn_flag
1891   else
1892     ac_cpp_err=
1893   fi
1894 else
1895   ac_cpp_err=yes
1896 fi
1897 if test -z "$ac_cpp_err"; then
1898   # Broken: success on invalid input.
1899 continue
1900 else
1901   echo "$as_me: failed program was:" >&5
1902   cat conftest.$ac_ext >&5
1903   # Passes both tests.
1904 ac_preproc_ok=:
1905 break
1906 fi
1907 rm -f conftest.err conftest.$ac_ext
1908
1909 done
1910 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1911 rm -f conftest.err conftest.$ac_ext
1912 if $ac_preproc_ok; then
1913   break
1914 fi
1915
1916     done
1917     ac_cv_prog_CPP=$CPP
1918
1919 fi
1920   CPP=$ac_cv_prog_CPP
1921 else
1922   ac_cv_prog_CPP=$CPP
1923 fi
1924 echo "$as_me:1924: result: $CPP" >&5
1925 echo "${ECHO_T}$CPP" >&6
1926 ac_preproc_ok=false
1927 for ac_c_preproc_warn_flag in '' yes
1928 do
1929   # Use a header file that comes with gcc, so configuring glibc
1930   # with a fresh cross-compiler works.
1931   # On the NeXT, cc -E runs the code through the compiler's parser,
1932   # not just through cpp. "Syntax error" is here to catch this case.
1933   cat >conftest.$ac_ext <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1936 #include <assert.h>
1937                      Syntax error
1938 _ACEOF
1939 if { (eval echo "$as_me:1939: \"$ac_cpp conftest.$ac_ext\"") >&5
1940   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1941   ac_status=$?
1942   egrep -v '^ *\+' conftest.er1 >conftest.err
1943   rm -f conftest.er1
1944   cat conftest.err >&5
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); } >/dev/null; then
1947   if test -s conftest.err; then
1948     ac_cpp_err=$ac_c_preproc_warn_flag
1949   else
1950     ac_cpp_err=
1951   fi
1952 else
1953   ac_cpp_err=yes
1954 fi
1955 if test -z "$ac_cpp_err"; then
1956   :
1957 else
1958   echo "$as_me: failed program was:" >&5
1959   cat conftest.$ac_ext >&5
1960   # Broken: fails on valid input.
1961 continue
1962 fi
1963 rm -f conftest.err conftest.$ac_ext
1964
1965   # OK, works on sane cases.  Now check whether non-existent headers
1966   # can be detected and how.
1967   cat >conftest.$ac_ext <<_ACEOF
1968 #line 1968 "configure"
1969 #include "confdefs.h"
1970 #include <ac_nonexistent.h>
1971 _ACEOF
1972 if { (eval echo "$as_me:1972: \"$ac_cpp conftest.$ac_ext\"") >&5
1973   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1974   ac_status=$?
1975   egrep -v '^ *\+' conftest.er1 >conftest.err
1976   rm -f conftest.er1
1977   cat conftest.err >&5
1978   echo "$as_me:1978: \$? = $ac_status" >&5
1979   (exit $ac_status); } >/dev/null; then
1980   if test -s conftest.err; then
1981     ac_cpp_err=$ac_c_preproc_warn_flag
1982   else
1983     ac_cpp_err=
1984   fi
1985 else
1986   ac_cpp_err=yes
1987 fi
1988 if test -z "$ac_cpp_err"; then
1989   # Broken: success on invalid input.
1990 continue
1991 else
1992   echo "$as_me: failed program was:" >&5
1993   cat conftest.$ac_ext >&5
1994   # Passes both tests.
1995 ac_preproc_ok=:
1996 break
1997 fi
1998 rm -f conftest.err conftest.$ac_ext
1999
2000 done
2001 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2002 rm -f conftest.err conftest.$ac_ext
2003 if $ac_preproc_ok; then
2004   :
2005 else
2006   { { echo "$as_me:2006: error: C preprocessor \"$CPP\" fails sanity check" >&5
2007 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2008    { (exit 1); exit 1; }; }
2009 fi
2010
2011 ac_ext=c
2012 ac_cpp='$CPP $CPPFLAGS'
2013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2016 ac_main_return=return
2017
2018 for ac_prog in mawk gawk nawk awk
2019 do
2020   # Extract the first word of "$ac_prog", so it can be a program name with args.
2021 set dummy $ac_prog; ac_word=$2
2022 echo "$as_me:2022: checking for $ac_word" >&5
2023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2024 if test "${ac_cv_prog_AWK+set}" = set; then
2025   echo $ECHO_N "(cached) $ECHO_C" >&6
2026 else
2027   if test -n "$AWK"; then
2028   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2029 else
2030   ac_save_IFS=$IFS; IFS=$ac_path_separator
2031 ac_dummy="$PATH"
2032 for ac_dir in $ac_dummy; do
2033   IFS=$ac_save_IFS
2034   test -z "$ac_dir" && ac_dir=.
2035   $as_executable_p "$ac_dir/$ac_word" || continue
2036 ac_cv_prog_AWK="$ac_prog"
2037 echo "$as_me:2037: found $ac_dir/$ac_word" >&5
2038 break
2039 done
2040
2041 fi
2042 fi
2043 AWK=$ac_cv_prog_AWK
2044 if test -n "$AWK"; then
2045   echo "$as_me:2045: result: $AWK" >&5
2046 echo "${ECHO_T}$AWK" >&6
2047 else
2048   echo "$as_me:2048: result: no" >&5
2049 echo "${ECHO_T}no" >&6
2050 fi
2051
2052   test -n "$AWK" && break
2053 done
2054
2055 # Find a good install program.  We prefer a C program (faster),
2056 # so one script is as good as another.  But avoid the broken or
2057 # incompatible versions:
2058 # SysV /etc/install, /usr/sbin/install
2059 # SunOS /usr/etc/install
2060 # IRIX /sbin/install
2061 # AIX /bin/install
2062 # AmigaOS /C/install, which installs bootblocks on floppy discs
2063 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2064 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2065 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2066 # ./install, which can be erroneously created by make from ./install.sh.
2067 echo "$as_me:2067: checking for a BSD compatible install" >&5
2068 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2069 if test -z "$INSTALL"; then
2070 if test "${ac_cv_path_install+set}" = set; then
2071   echo $ECHO_N "(cached) $ECHO_C" >&6
2072 else
2073     ac_save_IFS=$IFS; IFS=$ac_path_separator
2074   for ac_dir in $PATH; do
2075     IFS=$ac_save_IFS
2076     # Account for people who put trailing slashes in PATH elements.
2077     case $ac_dir/ in
2078     / | ./ | .// | /cC/* \
2079     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2080     | /usr/ucb/* ) ;;
2081     *)
2082       # OSF1 and SCO ODT 3.0 have their own names for install.
2083       # Don't use installbsd from OSF since it installs stuff as root
2084       # by default.
2085       for ac_prog in ginstall scoinst install; do
2086         if $as_executable_p "$ac_dir/$ac_prog"; then
2087           if test $ac_prog = install &&
2088             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2089             # AIX install.  It has an incompatible calling convention.
2090             :
2091           elif test $ac_prog = install &&
2092             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2093             # program-specific install script used by HP pwplus--don't use.
2094             :
2095           else
2096             ac_cv_path_install="$ac_dir/$ac_prog -c"
2097             break 2
2098           fi
2099         fi
2100       done
2101       ;;
2102     esac
2103   done
2104
2105 fi
2106   if test "${ac_cv_path_install+set}" = set; then
2107     INSTALL=$ac_cv_path_install
2108   else
2109     # As a last resort, use the slow shell script.  We don't cache a
2110     # path for INSTALL within a source directory, because that will
2111     # break other packages using the cache if that directory is
2112     # removed, or if the path is relative.
2113     INSTALL=$ac_install_sh
2114   fi
2115 fi
2116 echo "$as_me:2116: result: $INSTALL" >&5
2117 echo "${ECHO_T}$INSTALL" >&6
2118
2119 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2120 # It thinks the first close brace ends the variable substitution.
2121 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2122
2123 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2124
2125 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2126
2127 case $INSTALL in
2128 /*)
2129   ;;
2130 *)
2131   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2132   test -z "$cf_dir" && cf_dir=.
2133   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2134   ;;
2135 esac
2136
2137 for ac_prog in tdlint lint alint splint lclint
2138 do
2139   # Extract the first word of "$ac_prog", so it can be a program name with args.
2140 set dummy $ac_prog; ac_word=$2
2141 echo "$as_me:2141: checking for $ac_word" >&5
2142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2143 if test "${ac_cv_prog_LINT+set}" = set; then
2144   echo $ECHO_N "(cached) $ECHO_C" >&6
2145 else
2146   if test -n "$LINT"; then
2147   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2148 else
2149   ac_save_IFS=$IFS; IFS=$ac_path_separator
2150 ac_dummy="$PATH"
2151 for ac_dir in $ac_dummy; do
2152   IFS=$ac_save_IFS
2153   test -z "$ac_dir" && ac_dir=.
2154   $as_executable_p "$ac_dir/$ac_word" || continue
2155 ac_cv_prog_LINT="$ac_prog"
2156 echo "$as_me:2156: found $ac_dir/$ac_word" >&5
2157 break
2158 done
2159
2160 fi
2161 fi
2162 LINT=$ac_cv_prog_LINT
2163 if test -n "$LINT"; then
2164   echo "$as_me:2164: result: $LINT" >&5
2165 echo "${ECHO_T}$LINT" >&6
2166 else
2167   echo "$as_me:2167: result: no" >&5
2168 echo "${ECHO_T}no" >&6
2169 fi
2170
2171   test -n "$LINT" && break
2172 done
2173
2174 echo "$as_me:2174: checking if filesystem supports mixed-case filenames" >&5
2175 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2176 if test "${cf_cv_mixedcase+set}" = set; then
2177   echo $ECHO_N "(cached) $ECHO_C" >&6
2178 else
2179
2180 if test "$cross_compiling" = yes ; then
2181         case $target_alias in #(vi
2182         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2183                 cf_cv_mixedcase=no
2184                 ;;
2185         *)
2186                 cf_cv_mixedcase=yes
2187                 ;;
2188         esac
2189 else
2190         rm -f conftest CONFTEST
2191         echo test >conftest
2192         if test -f CONFTEST ; then
2193                 cf_cv_mixedcase=no
2194         else
2195                 cf_cv_mixedcase=yes
2196         fi
2197         rm -f conftest CONFTEST
2198 fi
2199
2200 fi
2201 echo "$as_me:2201: result: $cf_cv_mixedcase" >&5
2202 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2203 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2204 #define MIXEDCASE_FILENAMES 1
2205 EOF
2206
2207 for ac_prog in exctags ctags
2208 do
2209   # Extract the first word of "$ac_prog", so it can be a program name with args.
2210 set dummy $ac_prog; ac_word=$2
2211 echo "$as_me:2211: checking for $ac_word" >&5
2212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2213 if test "${ac_cv_prog_CTAGS+set}" = set; then
2214   echo $ECHO_N "(cached) $ECHO_C" >&6
2215 else
2216   if test -n "$CTAGS"; then
2217   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2218 else
2219   ac_save_IFS=$IFS; IFS=$ac_path_separator
2220 ac_dummy="$PATH"
2221 for ac_dir in $ac_dummy; do
2222   IFS=$ac_save_IFS
2223   test -z "$ac_dir" && ac_dir=.
2224   $as_executable_p "$ac_dir/$ac_word" || continue
2225 ac_cv_prog_CTAGS="$ac_prog"
2226 echo "$as_me:2226: found $ac_dir/$ac_word" >&5
2227 break
2228 done
2229
2230 fi
2231 fi
2232 CTAGS=$ac_cv_prog_CTAGS
2233 if test -n "$CTAGS"; then
2234   echo "$as_me:2234: result: $CTAGS" >&5
2235 echo "${ECHO_T}$CTAGS" >&6
2236 else
2237   echo "$as_me:2237: result: no" >&5
2238 echo "${ECHO_T}no" >&6
2239 fi
2240
2241   test -n "$CTAGS" && break
2242 done
2243
2244 for ac_prog in exetags etags
2245 do
2246   # Extract the first word of "$ac_prog", so it can be a program name with args.
2247 set dummy $ac_prog; ac_word=$2
2248 echo "$as_me:2248: checking for $ac_word" >&5
2249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2250 if test "${ac_cv_prog_ETAGS+set}" = set; then
2251   echo $ECHO_N "(cached) $ECHO_C" >&6
2252 else
2253   if test -n "$ETAGS"; then
2254   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2255 else
2256   ac_save_IFS=$IFS; IFS=$ac_path_separator
2257 ac_dummy="$PATH"
2258 for ac_dir in $ac_dummy; do
2259   IFS=$ac_save_IFS
2260   test -z "$ac_dir" && ac_dir=.
2261   $as_executable_p "$ac_dir/$ac_word" || continue
2262 ac_cv_prog_ETAGS="$ac_prog"
2263 echo "$as_me:2263: found $ac_dir/$ac_word" >&5
2264 break
2265 done
2266
2267 fi
2268 fi
2269 ETAGS=$ac_cv_prog_ETAGS
2270 if test -n "$ETAGS"; then
2271   echo "$as_me:2271: result: $ETAGS" >&5
2272 echo "${ECHO_T}$ETAGS" >&6
2273 else
2274   echo "$as_me:2274: result: no" >&5
2275 echo "${ECHO_T}no" >&6
2276 fi
2277
2278   test -n "$ETAGS" && break
2279 done
2280
2281 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2282 set dummy ${CTAGS:-ctags}; ac_word=$2
2283 echo "$as_me:2283: checking for $ac_word" >&5
2284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2285 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2286   echo $ECHO_N "(cached) $ECHO_C" >&6
2287 else
2288   if test -n "$MAKE_LOWER_TAGS"; then
2289   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2290 else
2291   ac_save_IFS=$IFS; IFS=$ac_path_separator
2292 ac_dummy="$PATH"
2293 for ac_dir in $ac_dummy; do
2294   IFS=$ac_save_IFS
2295   test -z "$ac_dir" && ac_dir=.
2296   $as_executable_p "$ac_dir/$ac_word" || continue
2297 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2298 echo "$as_me:2298: found $ac_dir/$ac_word" >&5
2299 break
2300 done
2301
2302   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2303 fi
2304 fi
2305 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2306 if test -n "$MAKE_LOWER_TAGS"; then
2307   echo "$as_me:2307: result: $MAKE_LOWER_TAGS" >&5
2308 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2309 else
2310   echo "$as_me:2310: result: no" >&5
2311 echo "${ECHO_T}no" >&6
2312 fi
2313
2314 if test "$cf_cv_mixedcase" = yes ; then
2315         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2316 set dummy ${ETAGS:-etags}; ac_word=$2
2317 echo "$as_me:2317: checking for $ac_word" >&5
2318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2319 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322   if test -n "$MAKE_UPPER_TAGS"; then
2323   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2324 else
2325   ac_save_IFS=$IFS; IFS=$ac_path_separator
2326 ac_dummy="$PATH"
2327 for ac_dir in $ac_dummy; do
2328   IFS=$ac_save_IFS
2329   test -z "$ac_dir" && ac_dir=.
2330   $as_executable_p "$ac_dir/$ac_word" || continue
2331 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2332 echo "$as_me:2332: found $ac_dir/$ac_word" >&5
2333 break
2334 done
2335
2336   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2337 fi
2338 fi
2339 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2340 if test -n "$MAKE_UPPER_TAGS"; then
2341   echo "$as_me:2341: result: $MAKE_UPPER_TAGS" >&5
2342 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2343 else
2344   echo "$as_me:2344: result: no" >&5
2345 echo "${ECHO_T}no" >&6
2346 fi
2347
2348 else
2349         MAKE_UPPER_TAGS=no
2350 fi
2351
2352 if test "$MAKE_UPPER_TAGS" = yes ; then
2353         MAKE_UPPER_TAGS=
2354 else
2355         MAKE_UPPER_TAGS="#"
2356 fi
2357
2358 if test "$MAKE_LOWER_TAGS" = yes ; then
2359         MAKE_LOWER_TAGS=
2360 else
2361         MAKE_LOWER_TAGS="#"
2362 fi
2363
2364 echo "$as_me:2364: checking if -lm needed for math functions" >&5
2365 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2366 if test "${cf_cv_need_libm+set}" = set; then
2367   echo $ECHO_N "(cached) $ECHO_C" >&6
2368 else
2369
2370         cat >conftest.$ac_ext <<_ACEOF
2371 #line 2371 "configure"
2372 #include "confdefs.h"
2373
2374         #include <stdio.h>
2375         #include <math.h>
2376
2377 int
2378 main ()
2379 {
2380 double x = rand(); printf("result = %g\n", sin(x))
2381   ;
2382   return 0;
2383 }
2384 _ACEOF
2385 rm -f conftest.$ac_objext conftest$ac_exeext
2386 if { (eval echo "$as_me:2386: \"$ac_link\"") >&5
2387   (eval $ac_link) 2>&5
2388   ac_status=$?
2389   echo "$as_me:2389: \$? = $ac_status" >&5
2390   (exit $ac_status); } &&
2391          { ac_try='test -s conftest$ac_exeext'
2392   { (eval echo "$as_me:2392: \"$ac_try\"") >&5
2393   (eval $ac_try) 2>&5
2394   ac_status=$?
2395   echo "$as_me:2395: \$? = $ac_status" >&5
2396   (exit $ac_status); }; }; then
2397   cf_cv_need_libm=no
2398 else
2399   echo "$as_me: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2401 cf_cv_need_libm=yes
2402 fi
2403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2404 fi
2405 echo "$as_me:2405: result: $cf_cv_need_libm" >&5
2406 echo "${ECHO_T}$cf_cv_need_libm" >&6
2407 if test "$cf_cv_need_libm" = yes
2408 then
2409 MATH_LIB=-lm
2410 fi
2411
2412 top_builddir=`pwd`
2413
2414 CC_G_OPT="-g"
2415 CC_SHARED_OPTS=unknown
2416 CPPFLAGS="$CPPFLAGS"
2417 DFT_DEP_SUFFIX=""
2418 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2419 DFT_UPR_MODEL="NORMAL"
2420 LD="ld"
2421 LDFLAGS_SHARED=""
2422 LDFLAGS_STATIC=""
2423 LD_MODEL=""
2424 LD_SHARED_OPTS=""
2425 LIBTOOL=""
2426 LIB_CLEAN=""
2427 LIB_COMPILE=""
2428 LIB_LINK='${CC}'
2429 LINK_TESTS=""
2430 LOCAL_LDFLAGS=""
2431 PTHREAD="-lm"
2432 TEST_ARGS=""
2433 TEST_DEPS=""
2434 TEST_LIBS=""
2435 TINFO_LDFLAGS=''
2436 TINFO_LIBS='$(LIBS_CURSES)'
2437 cf_cv_abi_version=""
2438 cf_cv_rel_version=""
2439
2440 cf_cv_screen=curses
2441 cf_cv_libtype=
2442
2443 # This should have been defined by AC_PROG_CC
2444 : ${CC:=cc}
2445
2446 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2447 # into CC.  This will not help with broken scripts that wrap the compiler with
2448 # options, but eliminates a more common category of user confusion.
2449 echo "$as_me:2449: checking \$CC variable" >&5
2450 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2451 case "$CC" in #(vi
2452 *[\ \   ]-[IUD]*)
2453         echo "$as_me:2453: result: broken" >&5
2454 echo "${ECHO_T}broken" >&6
2455         { echo "$as_me:2455: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2456 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2457         # humor him...
2458         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2459         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2460
2461 cf_fix_cppflags=no
2462 cf_new_cflags=
2463 cf_new_cppflags=
2464 cf_new_extra_cppflags=
2465
2466 for cf_add_cflags in $cf_flags
2467 do
2468 case $cf_fix_cppflags in
2469 no)
2470         case $cf_add_cflags in #(vi
2471         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2472                 case $cf_add_cflags in
2473                 -D*)
2474                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2475
2476                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2477                                 && test -z "${cf_tst_cflags}" \
2478                                 && cf_fix_cppflags=yes
2479
2480                         if test $cf_fix_cppflags = yes ; then
2481                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2482                                 continue
2483                         elif test "${cf_tst_cflags}" = "\"'" ; then
2484                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2485                                 continue
2486                         fi
2487                         ;;
2488                 esac
2489                 case "$CPPFLAGS" in
2490                 *$cf_add_cflags) #(vi
2491                         ;;
2492                 *) #(vi
2493                         case $cf_add_cflags in #(vi
2494                         -D*)
2495                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2496
2497 CPPFLAGS=`echo "$CPPFLAGS" | \
2498         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2499                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2500
2501                                 ;;
2502                         esac
2503                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2504                         ;;
2505                 esac
2506                 ;;
2507         *)
2508                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2509                 ;;
2510         esac
2511         ;;
2512 yes)
2513         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2514
2515         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2516
2517         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2518                 && test -z "${cf_tst_cflags}" \
2519                 && cf_fix_cppflags=no
2520         ;;
2521 esac
2522 done
2523
2524 if test -n "$cf_new_cflags" ; then
2525
2526         CFLAGS="$CFLAGS $cf_new_cflags"
2527 fi
2528
2529 if test -n "$cf_new_cppflags" ; then
2530
2531         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2532 fi
2533
2534 if test -n "$cf_new_extra_cppflags" ; then
2535
2536         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2537 fi
2538
2539         ;;
2540 *)
2541         echo "$as_me:2541: result: ok" >&5
2542 echo "${ECHO_T}ok" >&6
2543         ;;
2544 esac
2545
2546 echo "$as_me:2546: checking for ${CC:-cc} option to accept ANSI C" >&5
2547 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2548 if test "${cf_cv_ansi_cc+set}" = set; then
2549   echo $ECHO_N "(cached) $ECHO_C" >&6
2550 else
2551
2552 cf_cv_ansi_cc=no
2553 cf_save_CFLAGS="$CFLAGS"
2554 cf_save_CPPFLAGS="$CPPFLAGS"
2555 # Don't try gcc -ansi; that turns off useful extensions and
2556 # breaks some systems' header files.
2557 # AIX                   -qlanglvl=ansi
2558 # Ultrix and OSF/1      -std1
2559 # HP-UX                 -Aa -D_HPUX_SOURCE
2560 # SVR4                  -Xc
2561 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2562 for cf_arg in "-DCC_HAS_PROTOS" \
2563         "" \
2564         -qlanglvl=ansi \
2565         -std1 \
2566         -Ae \
2567         "-Aa -D_HPUX_SOURCE" \
2568         -Xc
2569 do
2570
2571 cf_fix_cppflags=no
2572 cf_new_cflags=
2573 cf_new_cppflags=
2574 cf_new_extra_cppflags=
2575
2576 for cf_add_cflags in $cf_arg
2577 do
2578 case $cf_fix_cppflags in
2579 no)
2580         case $cf_add_cflags in #(vi
2581         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2582                 case $cf_add_cflags in
2583                 -D*)
2584                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2585
2586                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2587                                 && test -z "${cf_tst_cflags}" \
2588                                 && cf_fix_cppflags=yes
2589
2590                         if test $cf_fix_cppflags = yes ; then
2591                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2592                                 continue
2593                         elif test "${cf_tst_cflags}" = "\"'" ; then
2594                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2595                                 continue
2596                         fi
2597                         ;;
2598                 esac
2599                 case "$CPPFLAGS" in
2600                 *$cf_add_cflags) #(vi
2601                         ;;
2602                 *) #(vi
2603                         case $cf_add_cflags in #(vi
2604                         -D*)
2605                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2606
2607 CPPFLAGS=`echo "$CPPFLAGS" | \
2608         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2609                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2610
2611                                 ;;
2612                         esac
2613                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2614                         ;;
2615                 esac
2616                 ;;
2617         *)
2618                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2619                 ;;
2620         esac
2621         ;;
2622 yes)
2623         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2624
2625         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2626
2627         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2628                 && test -z "${cf_tst_cflags}" \
2629                 && cf_fix_cppflags=no
2630         ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636         CFLAGS="$CFLAGS $cf_new_cflags"
2637 fi
2638
2639 if test -n "$cf_new_cppflags" ; then
2640
2641         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2642 fi
2643
2644 if test -n "$cf_new_extra_cppflags" ; then
2645
2646         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2647 fi
2648
2649         cat >conftest.$ac_ext <<_ACEOF
2650 #line 2650 "configure"
2651 #include "confdefs.h"
2652
2653 #ifndef CC_HAS_PROTOS
2654 #if !defined(__STDC__) || (__STDC__ != 1)
2655 choke me
2656 #endif
2657 #endif
2658
2659 int
2660 main ()
2661 {
2662
2663         int test (int i, double x);
2664         struct s1 {int (*f) (int a);};
2665         struct s2 {int (*f) (double a);};
2666   ;
2667   return 0;
2668 }
2669 _ACEOF
2670 rm -f conftest.$ac_objext
2671 if { (eval echo "$as_me:2671: \"$ac_compile\"") >&5
2672   (eval $ac_compile) 2>&5
2673   ac_status=$?
2674   echo "$as_me:2674: \$? = $ac_status" >&5
2675   (exit $ac_status); } &&
2676          { ac_try='test -s conftest.$ac_objext'
2677   { (eval echo "$as_me:2677: \"$ac_try\"") >&5
2678   (eval $ac_try) 2>&5
2679   ac_status=$?
2680   echo "$as_me:2680: \$? = $ac_status" >&5
2681   (exit $ac_status); }; }; then
2682   cf_cv_ansi_cc="$cf_arg"; break
2683 else
2684   echo "$as_me: failed program was:" >&5
2685 cat conftest.$ac_ext >&5
2686 fi
2687 rm -f conftest.$ac_objext conftest.$ac_ext
2688 done
2689 CFLAGS="$cf_save_CFLAGS"
2690 CPPFLAGS="$cf_save_CPPFLAGS"
2691
2692 fi
2693 echo "$as_me:2693: result: $cf_cv_ansi_cc" >&5
2694 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2695
2696 if test "$cf_cv_ansi_cc" != "no"; then
2697 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2698
2699 cf_fix_cppflags=no
2700 cf_new_cflags=
2701 cf_new_cppflags=
2702 cf_new_extra_cppflags=
2703
2704 for cf_add_cflags in $cf_cv_ansi_cc
2705 do
2706 case $cf_fix_cppflags in
2707 no)
2708         case $cf_add_cflags in #(vi
2709         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2710                 case $cf_add_cflags in
2711                 -D*)
2712                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2713
2714                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2715                                 && test -z "${cf_tst_cflags}" \
2716                                 && cf_fix_cppflags=yes
2717
2718                         if test $cf_fix_cppflags = yes ; then
2719                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2720                                 continue
2721                         elif test "${cf_tst_cflags}" = "\"'" ; then
2722                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2723                                 continue
2724                         fi
2725                         ;;
2726                 esac
2727                 case "$CPPFLAGS" in
2728                 *$cf_add_cflags) #(vi
2729                         ;;
2730                 *) #(vi
2731                         case $cf_add_cflags in #(vi
2732                         -D*)
2733                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2734
2735 CPPFLAGS=`echo "$CPPFLAGS" | \
2736         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2737                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2738
2739                                 ;;
2740                         esac
2741                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2742                         ;;
2743                 esac
2744                 ;;
2745         *)
2746                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2747                 ;;
2748         esac
2749         ;;
2750 yes)
2751         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2752
2753         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2754
2755         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2756                 && test -z "${cf_tst_cflags}" \
2757                 && cf_fix_cppflags=no
2758         ;;
2759 esac
2760 done
2761
2762 if test -n "$cf_new_cflags" ; then
2763
2764         CFLAGS="$CFLAGS $cf_new_cflags"
2765 fi
2766
2767 if test -n "$cf_new_cppflags" ; then
2768
2769         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2770 fi
2771
2772 if test -n "$cf_new_extra_cppflags" ; then
2773
2774         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2775 fi
2776
2777 else
2778         cat >>confdefs.h <<\EOF
2779 #define CC_HAS_PROTOS 1
2780 EOF
2781
2782 fi
2783 fi
2784
2785 if test "$cf_cv_ansi_cc" = "no"; then
2786         { { echo "$as_me:2786: error: Your compiler does not appear to recognize prototypes.
2787 You have the following choices:
2788         a. adjust your compiler options
2789         b. get an up-to-date compiler
2790         c. use a wrapper such as unproto" >&5
2791 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2792 You have the following choices:
2793         a. adjust your compiler options
2794         b. get an up-to-date compiler
2795         c. use a wrapper such as unproto" >&2;}
2796    { (exit 1); exit 1; }; }
2797 fi
2798
2799 if test "$GCC" = yes
2800 then
2801 cat > conftest.i <<EOF
2802 #ifndef GCC_PRINTF
2803 #define GCC_PRINTF 0
2804 #endif
2805 #ifndef GCC_SCANF
2806 #define GCC_SCANF 0
2807 #endif
2808 #ifndef GCC_NORETURN
2809 #define GCC_NORETURN /* nothing */
2810 #endif
2811 #ifndef GCC_UNUSED
2812 #define GCC_UNUSED /* nothing */
2813 #endif
2814 EOF
2815 if test "$GCC" = yes
2816 then
2817         { echo "$as_me:2817: checking for $CC __attribute__ directives..." >&5
2818 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2819 cat > conftest.$ac_ext <<EOF
2820 #line 2820 "${as_me:-configure}"
2821 #include "confdefs.h"
2822 #include "conftest.h"
2823 #include "conftest.i"
2824 #if     GCC_PRINTF
2825 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2826 #else
2827 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2828 #endif
2829 #if     GCC_SCANF
2830 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2831 #else
2832 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2833 #endif
2834 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2835 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2836 extern void foo(void) GCC_NORETURN;
2837 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2838 EOF
2839         cf_printf_attribute=no
2840         cf_scanf_attribute=no
2841         for cf_attribute in scanf printf unused noreturn
2842         do
2843
2844 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2845
2846                 cf_directive="__attribute__(($cf_attribute))"
2847                 echo "checking for $CC $cf_directive" 1>&5
2848
2849                 case $cf_attribute in #(vi
2850                 printf) #(vi
2851                         cf_printf_attribute=yes
2852                         cat >conftest.h <<EOF
2853 #define GCC_$cf_ATTRIBUTE 1
2854 EOF
2855                         ;;
2856                 scanf) #(vi
2857                         cf_scanf_attribute=yes
2858                         cat >conftest.h <<EOF
2859 #define GCC_$cf_ATTRIBUTE 1
2860 EOF
2861                         ;;
2862                 *) #(vi
2863                         cat >conftest.h <<EOF
2864 #define GCC_$cf_ATTRIBUTE $cf_directive
2865 EOF
2866                         ;;
2867                 esac
2868
2869                 if { (eval echo "$as_me:2869: \"$ac_compile\"") >&5
2870   (eval $ac_compile) 2>&5
2871   ac_status=$?
2872   echo "$as_me:2872: \$? = $ac_status" >&5
2873   (exit $ac_status); }; then
2874                         test -n "$verbose" && echo "$as_me:2874: result: ... $cf_attribute" >&5
2875 echo "${ECHO_T}... $cf_attribute" >&6
2876                         cat conftest.h >>confdefs.h
2877                         case $cf_attribute in #(vi
2878                         printf) #(vi
2879                                 if test "$cf_printf_attribute" = no ; then
2880                                         cat >>confdefs.h <<EOF
2881 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2882 EOF
2883                                 else
2884                                         cat >>confdefs.h <<EOF
2885 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2886 EOF
2887                                 fi
2888                                 ;;
2889                         scanf) #(vi
2890                                 if test "$cf_scanf_attribute" = no ; then
2891                                         cat >>confdefs.h <<EOF
2892 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2893 EOF
2894                                 else
2895                                         cat >>confdefs.h <<EOF
2896 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2897 EOF
2898                                 fi
2899                                 ;;
2900                         esac
2901                 fi
2902         done
2903 else
2904         fgrep define conftest.i >>confdefs.h
2905 fi
2906 rm -rf conftest*
2907 fi
2908
2909 cf_XOPEN_SOURCE=500
2910 cf_POSIX_C_SOURCE=199506L
2911 cf_xopen_source=
2912
2913 case $host_os in #(vi
2914 aix[4-7]*) #(vi
2915         cf_xopen_source="-D_ALL_SOURCE"
2916         ;;
2917 cygwin) #(vi
2918         cf_XOPEN_SOURCE=600
2919         ;;
2920 darwin[0-8].*) #(vi
2921         cf_xopen_source="-D_APPLE_C_SOURCE"
2922         ;;
2923 darwin*) #(vi
2924         cf_xopen_source="-D_DARWIN_C_SOURCE"
2925         ;;
2926 freebsd*|dragonfly*) #(vi
2927         # 5.x headers associate
2928         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2929         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2930         cf_POSIX_C_SOURCE=200112L
2931         cf_XOPEN_SOURCE=600
2932         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2933         ;;
2934 hpux11*) #(vi
2935         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2936         ;;
2937 hpux*) #(vi
2938         cf_xopen_source="-D_HPUX_SOURCE"
2939         ;;
2940 irix[56].*) #(vi
2941         cf_xopen_source="-D_SGI_SOURCE"
2942         ;;
2943 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2944
2945 echo "$as_me:2945: checking if we must define _GNU_SOURCE" >&5
2946 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2947 if test "${cf_cv_gnu_source+set}" = set; then
2948   echo $ECHO_N "(cached) $ECHO_C" >&6
2949 else
2950
2951 cat >conftest.$ac_ext <<_ACEOF
2952 #line 2952 "configure"
2953 #include "confdefs.h"
2954 #include <sys/types.h>
2955 int
2956 main ()
2957 {
2958
2959 #ifndef _XOPEN_SOURCE
2960 make an error
2961 #endif
2962   ;
2963   return 0;
2964 }
2965 _ACEOF
2966 rm -f conftest.$ac_objext
2967 if { (eval echo "$as_me:2967: \"$ac_compile\"") >&5
2968   (eval $ac_compile) 2>&5
2969   ac_status=$?
2970   echo "$as_me:2970: \$? = $ac_status" >&5
2971   (exit $ac_status); } &&
2972          { ac_try='test -s conftest.$ac_objext'
2973   { (eval echo "$as_me:2973: \"$ac_try\"") >&5
2974   (eval $ac_try) 2>&5
2975   ac_status=$?
2976   echo "$as_me:2976: \$? = $ac_status" >&5
2977   (exit $ac_status); }; }; then
2978   cf_cv_gnu_source=no
2979 else
2980   echo "$as_me: failed program was:" >&5
2981 cat conftest.$ac_ext >&5
2982 cf_save="$CPPFLAGS"
2983          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2984          cat >conftest.$ac_ext <<_ACEOF
2985 #line 2985 "configure"
2986 #include "confdefs.h"
2987 #include <sys/types.h>
2988 int
2989 main ()
2990 {
2991
2992 #ifdef _XOPEN_SOURCE
2993 make an error
2994 #endif
2995   ;
2996   return 0;
2997 }
2998 _ACEOF
2999 rm -f conftest.$ac_objext
3000 if { (eval echo "$as_me:3000: \"$ac_compile\"") >&5
3001   (eval $ac_compile) 2>&5
3002   ac_status=$?
3003   echo "$as_me:3003: \$? = $ac_status" >&5
3004   (exit $ac_status); } &&
3005          { ac_try='test -s conftest.$ac_objext'
3006   { (eval echo "$as_me:3006: \"$ac_try\"") >&5
3007   (eval $ac_try) 2>&5
3008   ac_status=$?
3009   echo "$as_me:3009: \$? = $ac_status" >&5
3010   (exit $ac_status); }; }; then
3011   cf_cv_gnu_source=no
3012 else
3013   echo "$as_me: failed program was:" >&5
3014 cat conftest.$ac_ext >&5
3015 cf_cv_gnu_source=yes
3016 fi
3017 rm -f conftest.$ac_objext conftest.$ac_ext
3018         CPPFLAGS="$cf_save"
3019
3020 fi
3021 rm -f conftest.$ac_objext conftest.$ac_ext
3022
3023 fi
3024 echo "$as_me:3024: result: $cf_cv_gnu_source" >&5
3025 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3026 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3027
3028         ;;
3029 mirbsd*) #(vi
3030         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
3031         ;;
3032 netbsd*) #(vi
3033         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3034         ;;
3035 openbsd*) #(vi
3036         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3037         ;;
3038 osf[45]*) #(vi
3039         cf_xopen_source="-D_OSF_SOURCE"
3040         ;;
3041 nto-qnx*) #(vi
3042         cf_xopen_source="-D_QNX_SOURCE"
3043         ;;
3044 sco*) #(vi
3045         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3046         ;;
3047 solaris2.1[0-9]) #(vi
3048         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3049         ;;
3050 solaris2.[1-9]) #(vi
3051         cf_xopen_source="-D__EXTENSIONS__"
3052         ;;
3053 *)
3054         echo "$as_me:3054: checking if we should define _XOPEN_SOURCE" >&5
3055 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3056 if test "${cf_cv_xopen_source+set}" = set; then
3057   echo $ECHO_N "(cached) $ECHO_C" >&6
3058 else
3059
3060         cat >conftest.$ac_ext <<_ACEOF
3061 #line 3061 "configure"
3062 #include "confdefs.h"
3063 #include <sys/types.h>
3064 int
3065 main ()
3066 {
3067
3068 #ifndef _XOPEN_SOURCE
3069 make an error
3070 #endif
3071   ;
3072   return 0;
3073 }
3074 _ACEOF
3075 rm -f conftest.$ac_objext
3076 if { (eval echo "$as_me:3076: \"$ac_compile\"") >&5
3077   (eval $ac_compile) 2>&5
3078   ac_status=$?
3079   echo "$as_me:3079: \$? = $ac_status" >&5
3080   (exit $ac_status); } &&
3081          { ac_try='test -s conftest.$ac_objext'
3082   { (eval echo "$as_me:3082: \"$ac_try\"") >&5
3083   (eval $ac_try) 2>&5
3084   ac_status=$?
3085   echo "$as_me:3085: \$? = $ac_status" >&5
3086   (exit $ac_status); }; }; then
3087   cf_cv_xopen_source=no
3088 else
3089   echo "$as_me: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3091 cf_save="$CPPFLAGS"
3092          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3093          cat >conftest.$ac_ext <<_ACEOF
3094 #line 3094 "configure"
3095 #include "confdefs.h"
3096 #include <sys/types.h>
3097 int
3098 main ()
3099 {
3100
3101 #ifdef _XOPEN_SOURCE
3102 make an error
3103 #endif
3104   ;
3105   return 0;
3106 }
3107 _ACEOF
3108 rm -f conftest.$ac_objext
3109 if { (eval echo "$as_me:3109: \"$ac_compile\"") >&5
3110   (eval $ac_compile) 2>&5
3111   ac_status=$?
3112   echo "$as_me:3112: \$? = $ac_status" >&5
3113   (exit $ac_status); } &&
3114          { ac_try='test -s conftest.$ac_objext'
3115   { (eval echo "$as_me:3115: \"$ac_try\"") >&5
3116   (eval $ac_try) 2>&5
3117   ac_status=$?
3118   echo "$as_me:3118: \$? = $ac_status" >&5
3119   (exit $ac_status); }; }; then
3120   cf_cv_xopen_source=no
3121 else
3122   echo "$as_me: failed program was:" >&5
3123 cat conftest.$ac_ext >&5
3124 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3125 fi
3126 rm -f conftest.$ac_objext conftest.$ac_ext
3127         CPPFLAGS="$cf_save"
3128
3129 fi
3130 rm -f conftest.$ac_objext conftest.$ac_ext
3131
3132 fi
3133 echo "$as_me:3133: result: $cf_cv_xopen_source" >&5
3134 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3135         if test "$cf_cv_xopen_source" != no ; then
3136
3137 CFLAGS=`echo "$CFLAGS" | \
3138         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3139                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3140
3141 CPPFLAGS=`echo "$CPPFLAGS" | \
3142         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3143                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3144
3145                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3146
3147 cf_fix_cppflags=no
3148 cf_new_cflags=
3149 cf_new_cppflags=
3150 cf_new_extra_cppflags=
3151
3152 for cf_add_cflags in $cf_temp_xopen_source
3153 do
3154 case $cf_fix_cppflags in
3155 no)
3156         case $cf_add_cflags in #(vi
3157         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3158                 case $cf_add_cflags in
3159                 -D*)
3160                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3161
3162                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3163                                 && test -z "${cf_tst_cflags}" \
3164                                 && cf_fix_cppflags=yes
3165
3166                         if test $cf_fix_cppflags = yes ; then
3167                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3168                                 continue
3169                         elif test "${cf_tst_cflags}" = "\"'" ; then
3170                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3171                                 continue
3172                         fi
3173                         ;;
3174                 esac
3175                 case "$CPPFLAGS" in
3176                 *$cf_add_cflags) #(vi
3177                         ;;
3178                 *) #(vi
3179                         case $cf_add_cflags in #(vi
3180                         -D*)
3181                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3182
3183 CPPFLAGS=`echo "$CPPFLAGS" | \
3184         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3185                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3186
3187                                 ;;
3188                         esac
3189                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3190                         ;;
3191                 esac
3192                 ;;
3193         *)
3194                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3195                 ;;
3196         esac
3197         ;;
3198 yes)
3199         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3200
3201         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3202
3203         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3204                 && test -z "${cf_tst_cflags}" \
3205                 && cf_fix_cppflags=no
3206         ;;
3207 esac
3208 done
3209
3210 if test -n "$cf_new_cflags" ; then
3211
3212         CFLAGS="$CFLAGS $cf_new_cflags"
3213 fi
3214
3215 if test -n "$cf_new_cppflags" ; then
3216
3217         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3218 fi
3219
3220 if test -n "$cf_new_extra_cppflags" ; then
3221
3222         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3223 fi
3224
3225         fi
3226
3227 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3228
3229 cf_save_CFLAGS="$CFLAGS"
3230 cf_save_CPPFLAGS="$CPPFLAGS"
3231
3232 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3233         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3234                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3235
3236 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3237         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3238                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3239
3240 echo "$as_me:3240: checking if we should define _POSIX_C_SOURCE" >&5
3241 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3242 if test "${cf_cv_posix_c_source+set}" = set; then
3243   echo $ECHO_N "(cached) $ECHO_C" >&6
3244 else
3245
3246 echo "${as_me:-configure}:3246: testing if the symbol is already defined go no further ..." 1>&5
3247
3248         cat >conftest.$ac_ext <<_ACEOF
3249 #line 3249 "configure"
3250 #include "confdefs.h"
3251 #include <sys/types.h>
3252 int
3253 main ()
3254 {
3255
3256 #ifndef _POSIX_C_SOURCE
3257 make an error
3258 #endif
3259   ;
3260   return 0;
3261 }
3262 _ACEOF
3263 rm -f conftest.$ac_objext
3264 if { (eval echo "$as_me:3264: \"$ac_compile\"") >&5
3265   (eval $ac_compile) 2>&5
3266   ac_status=$?
3267   echo "$as_me:3267: \$? = $ac_status" >&5
3268   (exit $ac_status); } &&
3269          { ac_try='test -s conftest.$ac_objext'
3270   { (eval echo "$as_me:3270: \"$ac_try\"") >&5
3271   (eval $ac_try) 2>&5
3272   ac_status=$?
3273   echo "$as_me:3273: \$? = $ac_status" >&5
3274   (exit $ac_status); }; }; then
3275   cf_cv_posix_c_source=no
3276 else
3277   echo "$as_me: failed program was:" >&5
3278 cat conftest.$ac_ext >&5
3279 cf_want_posix_source=no
3280          case .$cf_POSIX_C_SOURCE in #(vi
3281          .[12]??*) #(vi
3282                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3283                 ;;
3284          .2) #(vi
3285                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3286                 cf_want_posix_source=yes
3287                 ;;
3288          .*)
3289                 cf_want_posix_source=yes
3290                 ;;
3291          esac
3292          if test "$cf_want_posix_source" = yes ; then
3293                 cat >conftest.$ac_ext <<_ACEOF
3294 #line 3294 "configure"
3295 #include "confdefs.h"
3296 #include <sys/types.h>
3297 int
3298 main ()
3299 {
3300
3301 #ifdef _POSIX_SOURCE
3302 make an error
3303 #endif
3304   ;
3305   return 0;
3306 }
3307 _ACEOF
3308 rm -f conftest.$ac_objext
3309 if { (eval echo "$as_me:3309: \"$ac_compile\"") >&5
3310   (eval $ac_compile) 2>&5
3311   ac_status=$?
3312   echo "$as_me:3312: \$? = $ac_status" >&5
3313   (exit $ac_status); } &&
3314          { ac_try='test -s conftest.$ac_objext'
3315   { (eval echo "$as_me:3315: \"$ac_try\"") >&5
3316   (eval $ac_try) 2>&5
3317   ac_status=$?
3318   echo "$as_me:3318: \$? = $ac_status" >&5
3319   (exit $ac_status); }; }; then
3320   :
3321 else
3322   echo "$as_me: failed program was:" >&5
3323 cat conftest.$ac_ext >&5
3324 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3325 fi
3326 rm -f conftest.$ac_objext conftest.$ac_ext
3327          fi
3328
3329 echo "${as_me:-configure}:3329: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3330
3331          CFLAGS="$cf_trim_CFLAGS"
3332          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3333
3334 echo "${as_me:-configure}:3334: testing if the second compile does not leave our definition intact error ..." 1>&5
3335
3336          cat >conftest.$ac_ext <<_ACEOF
3337 #line 3337 "configure"
3338 #include "confdefs.h"
3339 #include <sys/types.h>
3340 int
3341 main ()
3342 {
3343
3344 #ifndef _POSIX_C_SOURCE
3345 make an error
3346 #endif
3347   ;
3348   return 0;
3349 }
3350 _ACEOF
3351 rm -f conftest.$ac_objext
3352 if { (eval echo "$as_me:3352: \"$ac_compile\"") >&5
3353   (eval $ac_compile) 2>&5
3354   ac_status=$?
3355   echo "$as_me:3355: \$? = $ac_status" >&5
3356   (exit $ac_status); } &&
3357          { ac_try='test -s conftest.$ac_objext'
3358   { (eval echo "$as_me:3358: \"$ac_try\"") >&5
3359   (eval $ac_try) 2>&5
3360   ac_status=$?
3361   echo "$as_me:3361: \$? = $ac_status" >&5
3362   (exit $ac_status); }; }; then
3363   :
3364 else
3365   echo "$as_me: failed program was:" >&5
3366 cat conftest.$ac_ext >&5
3367 cf_cv_posix_c_source=no
3368 fi
3369 rm -f conftest.$ac_objext conftest.$ac_ext
3370          CFLAGS="$cf_save_CFLAGS"
3371          CPPFLAGS="$cf_save_CPPFLAGS"
3372
3373 fi
3374 rm -f conftest.$ac_objext conftest.$ac_ext
3375
3376 fi
3377 echo "$as_me:3377: result: $cf_cv_posix_c_source" >&5
3378 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3379
3380 if test "$cf_cv_posix_c_source" != no ; then
3381         CFLAGS="$cf_trim_CFLAGS"
3382         CPPFLAGS="$cf_trim_CPPFLAGS"
3383
3384 cf_fix_cppflags=no
3385 cf_new_cflags=
3386 cf_new_cppflags=
3387 cf_new_extra_cppflags=
3388
3389 for cf_add_cflags in $cf_cv_posix_c_source
3390 do
3391 case $cf_fix_cppflags in
3392 no)
3393         case $cf_add_cflags in #(vi
3394         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3395                 case $cf_add_cflags in
3396                 -D*)
3397                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3398
3399                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3400                                 && test -z "${cf_tst_cflags}" \
3401                                 && cf_fix_cppflags=yes
3402
3403                         if test $cf_fix_cppflags = yes ; then
3404                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3405                                 continue
3406                         elif test "${cf_tst_cflags}" = "\"'" ; then
3407                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3408                                 continue
3409                         fi
3410                         ;;
3411                 esac
3412                 case "$CPPFLAGS" in
3413                 *$cf_add_cflags) #(vi
3414                         ;;
3415                 *) #(vi
3416                         case $cf_add_cflags in #(vi
3417                         -D*)
3418                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3419
3420 CPPFLAGS=`echo "$CPPFLAGS" | \
3421         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3422                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3423
3424                                 ;;
3425                         esac
3426                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3427                         ;;
3428                 esac
3429                 ;;
3430         *)
3431                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3432                 ;;
3433         esac
3434         ;;
3435 yes)
3436         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3437
3438         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3439
3440         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3441                 && test -z "${cf_tst_cflags}" \
3442                 && cf_fix_cppflags=no
3443         ;;
3444 esac
3445 done
3446
3447 if test -n "$cf_new_cflags" ; then
3448
3449         CFLAGS="$CFLAGS $cf_new_cflags"
3450 fi
3451
3452 if test -n "$cf_new_cppflags" ; then
3453
3454         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3455 fi
3456
3457 if test -n "$cf_new_extra_cppflags" ; then
3458
3459         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3460 fi
3461
3462 fi
3463
3464         ;;
3465 esac
3466
3467 if test -n "$cf_xopen_source" ; then
3468
3469 cf_fix_cppflags=no
3470 cf_new_cflags=
3471 cf_new_cppflags=
3472 cf_new_extra_cppflags=
3473
3474 for cf_add_cflags in $cf_xopen_source
3475 do
3476 case $cf_fix_cppflags in
3477 no)
3478         case $cf_add_cflags in #(vi
3479         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3480                 case $cf_add_cflags in
3481                 -D*)
3482                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3483
3484                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3485                                 && test -z "${cf_tst_cflags}" \
3486                                 && cf_fix_cppflags=yes
3487
3488                         if test $cf_fix_cppflags = yes ; then
3489                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3490                                 continue
3491                         elif test "${cf_tst_cflags}" = "\"'" ; then
3492                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3493                                 continue
3494                         fi
3495                         ;;
3496                 esac
3497                 case "$CPPFLAGS" in
3498                 *$cf_add_cflags) #(vi
3499                         ;;
3500                 *) #(vi
3501                         case $cf_add_cflags in #(vi
3502                         -D*)
3503                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3504
3505 CPPFLAGS=`echo "$CPPFLAGS" | \
3506         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3507                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3508
3509                                 ;;
3510                         esac
3511                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3512                         ;;
3513                 esac
3514                 ;;
3515         *)
3516                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3517                 ;;
3518         esac
3519         ;;
3520 yes)
3521         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3522
3523         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3524
3525         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3526                 && test -z "${cf_tst_cflags}" \
3527                 && cf_fix_cppflags=no
3528         ;;
3529 esac
3530 done
3531
3532 if test -n "$cf_new_cflags" ; then
3533
3534         CFLAGS="$CFLAGS $cf_new_cflags"
3535 fi
3536
3537 if test -n "$cf_new_cppflags" ; then
3538
3539         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3540 fi
3541
3542 if test -n "$cf_new_extra_cppflags" ; then
3543
3544         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3545 fi
3546
3547 fi
3548
3549 echo "$as_me:3549: checking for $CC option to accept ANSI C" >&5
3550 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3551 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3552   echo $ECHO_N "(cached) $ECHO_C" >&6
3553 else
3554   ac_cv_prog_cc_stdc=no
3555 ac_save_CC=$CC
3556 cat >conftest.$ac_ext <<_ACEOF
3557 #line 3557 "configure"
3558 #include "confdefs.h"
3559 #include <stdarg.h>
3560 #include <stdio.h>
3561 #include <sys/types.h>
3562 #include <sys/stat.h>
3563 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3564 struct buf { int x; };
3565 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3566 static char *e (p, i)
3567      char **p;
3568      int i;
3569 {
3570   return p[i];
3571 }
3572 static char *f (char * (*g) (char **, int), char **p, ...)
3573 {
3574   char *s;
3575   va_list v;
3576   va_start (v,p);
3577   s = g (p, va_arg (v,int));
3578   va_end (v);
3579   return s;
3580 }
3581 int test (int i, double x);
3582 struct s1 {int (*f) (int a);};
3583 struct s2 {int (*f) (double a);};
3584 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3585 int argc;
3586 char **argv;
3587 int
3588 main ()
3589 {
3590 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3591   ;
3592   return 0;
3593 }
3594 _ACEOF
3595 # Don't try gcc -ansi; that turns off useful extensions and
3596 # breaks some systems' header files.
3597 # AIX                   -qlanglvl=ansi
3598 # Ultrix and OSF/1      -std1
3599 # HP-UX 10.20 and later -Ae
3600 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3601 # SVR4                  -Xc -D__EXTENSIONS__
3602 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3603 do
3604   CC="$ac_save_CC $ac_arg"
3605   rm -f conftest.$ac_objext
3606 if { (eval echo "$as_me:3606: \"$ac_compile\"") >&5
3607   (eval $ac_compile) 2>&5
3608   ac_status=$?
3609   echo "$as_me:3609: \$? = $ac_status" >&5
3610   (exit $ac_status); } &&
3611          { ac_try='test -s conftest.$ac_objext'
3612   { (eval echo "$as_me:3612: \"$ac_try\"") >&5
3613   (eval $ac_try) 2>&5
3614   ac_status=$?
3615   echo "$as_me:3615: \$? = $ac_status" >&5
3616   (exit $ac_status); }; }; then
3617   ac_cv_prog_cc_stdc=$ac_arg
3618 break
3619 else
3620   echo "$as_me: failed program was:" >&5
3621 cat conftest.$ac_ext >&5
3622 fi
3623 rm -f conftest.$ac_objext
3624 done
3625 rm -f conftest.$ac_ext conftest.$ac_objext
3626 CC=$ac_save_CC
3627
3628 fi
3629
3630 case "x$ac_cv_prog_cc_stdc" in
3631   x|xno)
3632     echo "$as_me:3632: result: none needed" >&5
3633 echo "${ECHO_T}none needed" >&6 ;;
3634   *)
3635     echo "$as_me:3635: result: $ac_cv_prog_cc_stdc" >&5
3636 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3637     CC="$CC $ac_cv_prog_cc_stdc" ;;
3638 esac
3639
3640 echo "$as_me:3640: checking for an ANSI C-conforming const" >&5
3641 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3642 if test "${ac_cv_c_const+set}" = set; then
3643   echo $ECHO_N "(cached) $ECHO_C" >&6
3644 else
3645   cat >conftest.$ac_ext <<_ACEOF
3646 #line 3646 "configure"
3647 #include "confdefs.h"
3648
3649 int
3650 main ()
3651 {
3652 /* FIXME: Include the comments suggested by Paul. */
3653 #ifndef __cplusplus
3654   /* Ultrix mips cc rejects this.  */
3655   typedef int charset[2];
3656   const charset x;
3657   /* SunOS 4.1.1 cc rejects this.  */
3658   char const *const *ccp;
3659   char **p;
3660   /* NEC SVR4.0.2 mips cc rejects this.  */
3661   struct point {int x, y;};
3662   static struct point const zero = {0,0};
3663   /* AIX XL C 1.02.0.0 rejects this.
3664      It does not let you subtract one const X* pointer from another in
3665      an arm of an if-expression whose if-part is not a constant
3666      expression */
3667   const char *g = "string";
3668   ccp = &g + (g ? g-g : 0);
3669   /* HPUX 7.0 cc rejects these. */
3670   ++ccp;
3671   p = (char**) ccp;
3672   ccp = (char const *const *) p;
3673   { /* SCO 3.2v4 cc rejects this.  */
3674     char *t;
3675     char const *s = 0 ? (char *) 0 : (char const *) 0;
3676
3677     *t++ = 0;
3678   }
3679   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3680     int x[] = {25, 17};
3681     const int *foo = &x[0];
3682     ++foo;
3683   }
3684   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3685     typedef const int *iptr;
3686     iptr p = 0;
3687     ++p;
3688   }
3689   { /* AIX XL C 1.02.0.0 rejects this saying
3690        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3691     struct s { int j; const int *ap[3]; };
3692     struct s *b; b->j = 5;
3693   }
3694   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3695     const int foo = 10;
3696   }
3697 #endif
3698
3699   ;
3700   return 0;
3701 }
3702 _ACEOF
3703 rm -f conftest.$ac_objext
3704 if { (eval echo "$as_me:3704: \"$ac_compile\"") >&5
3705   (eval $ac_compile) 2>&5
3706   ac_status=$?
3707   echo "$as_me:3707: \$? = $ac_status" >&5
3708   (exit $ac_status); } &&
3709          { ac_try='test -s conftest.$ac_objext'
3710   { (eval echo "$as_me:3710: \"$ac_try\"") >&5
3711   (eval $ac_try) 2>&5
3712   ac_status=$?
3713   echo "$as_me:3713: \$? = $ac_status" >&5
3714   (exit $ac_status); }; }; then
3715   ac_cv_c_const=yes
3716 else
3717   echo "$as_me: failed program was:" >&5
3718 cat conftest.$ac_ext >&5
3719 ac_cv_c_const=no
3720 fi
3721 rm -f conftest.$ac_objext conftest.$ac_ext
3722 fi
3723 echo "$as_me:3723: result: $ac_cv_c_const" >&5
3724 echo "${ECHO_T}$ac_cv_c_const" >&6
3725 if test $ac_cv_c_const = no; then
3726
3727 cat >>confdefs.h <<\EOF
3728 #define const
3729 EOF
3730
3731 fi
3732
3733 echo "$as_me:3733: checking for signal global datatype" >&5
3734 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3735 if test "${cf_cv_sig_atomic_t+set}" = set; then
3736   echo $ECHO_N "(cached) $ECHO_C" >&6
3737 else
3738
3739         for cf_type in \
3740                 "volatile sig_atomic_t" \
3741                 "sig_atomic_t" \
3742                 "int"
3743         do
3744         cat >conftest.$ac_ext <<_ACEOF
3745 #line 3745 "configure"
3746 #include "confdefs.h"
3747
3748 #include <sys/types.h>
3749 #include <signal.h>
3750 #include <stdio.h>
3751
3752 extern $cf_type x;
3753 $cf_type x;
3754 static void handler(int sig)
3755 {
3756         x = 5;
3757 }
3758 int
3759 main ()
3760 {
3761 signal(SIGINT, handler);
3762                  x = 1
3763   ;
3764   return 0;
3765 }
3766 _ACEOF
3767 rm -f conftest.$ac_objext
3768 if { (eval echo "$as_me:3768: \"$ac_compile\"") >&5
3769   (eval $ac_compile) 2>&5
3770   ac_status=$?
3771   echo "$as_me:3771: \$? = $ac_status" >&5
3772   (exit $ac_status); } &&
3773          { ac_try='test -s conftest.$ac_objext'
3774   { (eval echo "$as_me:3774: \"$ac_try\"") >&5
3775   (eval $ac_try) 2>&5
3776   ac_status=$?
3777   echo "$as_me:3777: \$? = $ac_status" >&5
3778   (exit $ac_status); }; }; then
3779   cf_cv_sig_atomic_t=$cf_type
3780 else
3781   echo "$as_me: failed program was:" >&5
3782 cat conftest.$ac_ext >&5
3783 cf_cv_sig_atomic_t=no
3784 fi
3785 rm -f conftest.$ac_objext conftest.$ac_ext
3786                 test "$cf_cv_sig_atomic_t" != no && break
3787         done
3788
3789 fi
3790
3791 echo "$as_me:3791: result: $cf_cv_sig_atomic_t" >&5
3792 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3793 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3794 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3795 EOF
3796
3797 echo "$as_me:3797: checking if you want to see long compiling messages" >&5
3798 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3799
3800 # Check whether --enable-echo or --disable-echo was given.
3801 if test "${enable_echo+set}" = set; then
3802   enableval="$enable_echo"
3803   test "$enableval" != no && enableval=yes
3804   if test "$enableval" != "yes" ; then
3805
3806     ECHO_LT='--silent'
3807     ECHO_LD='@echo linking $@;'
3808     RULE_CC='@echo compiling $<'
3809     SHOW_CC='@echo compiling $@'
3810     ECHO_CC='@'
3811
3812   else
3813
3814     ECHO_LT=''
3815     ECHO_LD=''
3816     RULE_CC=''
3817     SHOW_CC=''
3818     ECHO_CC=''
3819
3820   fi
3821 else
3822   enableval=yes
3823
3824     ECHO_LT=''
3825     ECHO_LD=''
3826     RULE_CC=''
3827     SHOW_CC=''
3828     ECHO_CC=''
3829
3830 fi;
3831 echo "$as_me:3831: result: $enableval" >&5
3832 echo "${ECHO_T}$enableval" >&6
3833
3834 GCC_VERSION=none
3835 if test "$GCC" = yes ; then
3836         echo "$as_me:3836: checking version of $CC" >&5
3837 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3838         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3839         test -z "$GCC_VERSION" && GCC_VERSION=unknown
3840         echo "$as_me:3840: result: $GCC_VERSION" >&5
3841 echo "${ECHO_T}$GCC_VERSION" >&6
3842 fi
3843
3844 if ( test "$GCC" = yes || test "$GXX" = yes )
3845 then
3846 echo "$as_me:3846: checking if you want to turn on gcc warnings" >&5
3847 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
3848
3849 # Check whether --enable-warnings or --disable-warnings was given.
3850 if test "${enable_warnings+set}" = set; then
3851   enableval="$enable_warnings"
3852   test "$enableval" != yes && enableval=no
3853   if test "$enableval" != "no" ; then
3854     with_warnings=yes
3855   else
3856     with_warnings=no
3857   fi
3858 else
3859   enableval=no
3860   with_warnings=no
3861
3862 fi;
3863 echo "$as_me:3863: result: $with_warnings" >&5
3864 echo "${ECHO_T}$with_warnings" >&6
3865 if test "$with_warnings" = "yes"
3866 then
3867
3868 if test "$GCC" = yes
3869 then
3870 cat > conftest.i <<EOF
3871 #ifndef GCC_PRINTF
3872 #define GCC_PRINTF 0
3873 #endif
3874 #ifndef GCC_SCANF
3875 #define GCC_SCANF 0
3876 #endif
3877 #ifndef GCC_NORETURN
3878 #define GCC_NORETURN /* nothing */
3879 #endif
3880 #ifndef GCC_UNUSED
3881 #define GCC_UNUSED /* nothing */
3882 #endif
3883 EOF
3884 if test "$GCC" = yes
3885 then
3886         { echo "$as_me:3886: checking for $CC __attribute__ directives..." >&5
3887 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3888 cat > conftest.$ac_ext <<EOF
3889 #line 3889 "${as_me:-configure}"
3890 #include "confdefs.h"
3891 #include "conftest.h"
3892 #include "conftest.i"
3893 #if     GCC_PRINTF
3894 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3895 #else
3896 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3897 #endif
3898 #if     GCC_SCANF
3899 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3900 #else
3901 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
3902 #endif
3903 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3904 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3905 extern void foo(void) GCC_NORETURN;
3906 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3907 EOF
3908         cf_printf_attribute=no
3909         cf_scanf_attribute=no
3910         for cf_attribute in scanf printf unused noreturn
3911         do
3912
3913 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3914
3915                 cf_directive="__attribute__(($cf_attribute))"
3916                 echo "checking for $CC $cf_directive" 1>&5
3917
3918                 case $cf_attribute in #(vi
3919                 printf) #(vi
3920                         cf_printf_attribute=yes
3921                         cat >conftest.h <<EOF
3922 #define GCC_$cf_ATTRIBUTE 1
3923 EOF
3924                         ;;
3925                 scanf) #(vi
3926                         cf_scanf_attribute=yes
3927                         cat >conftest.h <<EOF
3928 #define GCC_$cf_ATTRIBUTE 1
3929 EOF
3930                         ;;
3931                 *) #(vi
3932                         cat >conftest.h <<EOF
3933 #define GCC_$cf_ATTRIBUTE $cf_directive
3934 EOF
3935                         ;;
3936                 esac
3937
3938                 if { (eval echo "$as_me:3938: \"$ac_compile\"") >&5
3939   (eval $ac_compile) 2>&5
3940   ac_status=$?
3941   echo "$as_me:3941: \$? = $ac_status" >&5
3942   (exit $ac_status); }; then
3943                         test -n "$verbose" && echo "$as_me:3943: result: ... $cf_attribute" >&5
3944 echo "${ECHO_T}... $cf_attribute" >&6
3945                         cat conftest.h >>confdefs.h
3946                         case $cf_attribute in #(vi
3947                         printf) #(vi
3948                                 if test "$cf_printf_attribute" = no ; then
3949                                         cat >>confdefs.h <<EOF
3950 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
3951 EOF
3952                                 else
3953                                         cat >>confdefs.h <<EOF
3954 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3955 EOF
3956                                 fi
3957                                 ;;
3958                         scanf) #(vi
3959                                 if test "$cf_scanf_attribute" = no ; then
3960                                         cat >>confdefs.h <<EOF
3961 #define GCC_SCANFLIKE(fmt,var) /* nothing */
3962 EOF
3963                                 else
3964                                         cat >>confdefs.h <<EOF
3965 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3966 EOF
3967                                 fi
3968                                 ;;
3969                         esac
3970                 fi
3971         done
3972 else
3973         fgrep define conftest.i >>confdefs.h
3974 fi
3975 rm -rf conftest*
3976 fi
3977
3978 INTEL_COMPILER=no
3979
3980 if test "$GCC" = yes ; then
3981         case $host_os in
3982         linux*|gnu*)
3983                 echo "$as_me:3983: checking if this is really Intel C compiler" >&5
3984 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
3985                 cf_save_CFLAGS="$CFLAGS"
3986                 CFLAGS="$CFLAGS -no-gcc"
3987                 cat >conftest.$ac_ext <<_ACEOF
3988 #line 3988 "configure"
3989 #include "confdefs.h"
3990
3991 int
3992 main ()
3993 {
3994
3995 #ifdef __INTEL_COMPILER
3996 #else
3997 make an error
3998 #endif
3999
4000   ;
4001   return 0;
4002 }
4003 _ACEOF
4004 rm -f conftest.$ac_objext
4005 if { (eval echo "$as_me:4005: \"$ac_compile\"") >&5
4006   (eval $ac_compile) 2>&5
4007   ac_status=$?
4008   echo "$as_me:4008: \$? = $ac_status" >&5
4009   (exit $ac_status); } &&
4010          { ac_try='test -s conftest.$ac_objext'
4011   { (eval echo "$as_me:4011: \"$ac_try\"") >&5
4012   (eval $ac_try) 2>&5
4013   ac_status=$?
4014   echo "$as_me:4014: \$? = $ac_status" >&5
4015   (exit $ac_status); }; }; then
4016   INTEL_COMPILER=yes
4017 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4018
4019 else
4020   echo "$as_me: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4022 fi
4023 rm -f conftest.$ac_objext conftest.$ac_ext
4024                 CFLAGS="$cf_save_CFLAGS"
4025                 echo "$as_me:4025: result: $INTEL_COMPILER" >&5
4026 echo "${ECHO_T}$INTEL_COMPILER" >&6
4027                 ;;
4028         esac
4029 fi
4030
4031 cat > conftest.$ac_ext <<EOF
4032 #line 4032 "${as_me:-configure}"
4033 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4034 EOF
4035
4036 if test "$INTEL_COMPILER" = yes
4037 then
4038 # The "-wdXXX" options suppress warnings:
4039 # remark #1419: external declaration in primary source file
4040 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4041 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4042 # remark #193: zero used for undefined preprocessing identifier
4043 # remark #593: variable "curs_sb_left_arrow" was set but never used
4044 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4045 # remark #869: parameter "tw" was never referenced
4046 # remark #981: operands are evaluated in unspecified order
4047 # warning #279: controlling expression is constant
4048
4049         { echo "$as_me:4049: checking for $CC warning options..." >&5
4050 echo "$as_me: checking for $CC warning options..." >&6;}
4051         cf_save_CFLAGS="$CFLAGS"
4052         EXTRA_CFLAGS="-Wall"
4053         for cf_opt in \
4054                 wd1419 \
4055                 wd1683 \
4056                 wd1684 \
4057                 wd193 \
4058                 wd593 \
4059                 wd279 \
4060                 wd810 \
4061                 wd869 \
4062                 wd981
4063         do
4064                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4065                 if { (eval echo "$as_me:4065: \"$ac_compile\"") >&5
4066   (eval $ac_compile) 2>&5
4067   ac_status=$?
4068   echo "$as_me:4068: \$? = $ac_status" >&5
4069   (exit $ac_status); }; then
4070                         test -n "$verbose" && echo "$as_me:4070: result: ... -$cf_opt" >&5
4071 echo "${ECHO_T}... -$cf_opt" >&6
4072                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4073                 fi
4074         done
4075         CFLAGS="$cf_save_CFLAGS"
4076
4077 elif test "$GCC" = yes
4078 then
4079         { echo "$as_me:4079: checking for $CC warning options..." >&5
4080 echo "$as_me: checking for $CC warning options..." >&6;}
4081         cf_save_CFLAGS="$CFLAGS"
4082         EXTRA_CFLAGS=
4083         cf_warn_CONST=""
4084         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4085         for cf_opt in W Wall \
4086                 Wbad-function-cast \
4087                 Wcast-align \
4088                 Wcast-qual \
4089                 Winline \
4090                 Wmissing-declarations \
4091                 Wmissing-prototypes \
4092                 Wnested-externs \
4093                 Wpointer-arith \
4094                 Wshadow \
4095                 Wstrict-prototypes \
4096                 Wundef $cf_warn_CONST
4097         do
4098                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4099                 if { (eval echo "$as_me:4099: \"$ac_compile\"") >&5
4100   (eval $ac_compile) 2>&5
4101   ac_status=$?
4102   echo "$as_me:4102: \$? = $ac_status" >&5
4103   (exit $ac_status); }; then
4104                         test -n "$verbose" && echo "$as_me:4104: result: ... -$cf_opt" >&5
4105 echo "${ECHO_T}... -$cf_opt" >&6
4106                         case $cf_opt in #(vi
4107                         Wcast-qual) #(vi
4108                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4109                                 ;;
4110                         Winline) #(vi
4111                                 case $GCC_VERSION in
4112                                 [34].*)
4113                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4114
4115 echo "${as_me:-configure}:4115: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4116
4117                                         continue;;
4118                                 esac
4119                                 ;;
4120                         esac
4121                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4122                 fi
4123         done
4124         CFLAGS="$cf_save_CFLAGS"
4125 fi
4126 rm -rf conftest*
4127
4128 fi
4129 fi
4130
4131 echo "$as_me:4131: checking if you want to use dmalloc for testing" >&5
4132 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4133
4134 # Check whether --with-dmalloc or --without-dmalloc was given.
4135 if test "${with_dmalloc+set}" = set; then
4136   withval="$with_dmalloc"
4137   cat >>confdefs.h <<\EOF
4138 #define USE_DMALLOC 1
4139 EOF
4140
4141         : ${with_cflags:=-g}
4142         : ${with_no_leaks:=yes}
4143          with_dmalloc=yes
4144 else
4145   with_dmalloc=
4146 fi;
4147 echo "$as_me:4147: result: ${with_dmalloc:-no}" >&5
4148 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4149
4150 case .$with_cflags in #(vi
4151 .*-g*)
4152         case .$CFLAGS in #(vi
4153         .*-g*) #(vi
4154                 ;;
4155         *)
4156
4157 cf_fix_cppflags=no
4158 cf_new_cflags=
4159 cf_new_cppflags=
4160 cf_new_extra_cppflags=
4161
4162 for cf_add_cflags in -g
4163 do
4164 case $cf_fix_cppflags in
4165 no)
4166         case $cf_add_cflags in #(vi
4167         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4168                 case $cf_add_cflags in
4169                 -D*)
4170                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4171
4172                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4173                                 && test -z "${cf_tst_cflags}" \
4174                                 && cf_fix_cppflags=yes
4175
4176                         if test $cf_fix_cppflags = yes ; then
4177                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4178                                 continue
4179                         elif test "${cf_tst_cflags}" = "\"'" ; then
4180                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4181                                 continue
4182                         fi
4183                         ;;
4184                 esac
4185                 case "$CPPFLAGS" in
4186                 *$cf_add_cflags) #(vi
4187                         ;;
4188                 *) #(vi
4189                         case $cf_add_cflags in #(vi
4190                         -D*)
4191                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4192
4193 CPPFLAGS=`echo "$CPPFLAGS" | \
4194         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4195                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4196
4197                                 ;;
4198                         esac
4199                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4200                         ;;
4201                 esac
4202                 ;;
4203         *)
4204                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4205                 ;;
4206         esac
4207         ;;
4208 yes)
4209         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4210
4211         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4212
4213         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4214                 && test -z "${cf_tst_cflags}" \
4215                 && cf_fix_cppflags=no
4216         ;;
4217 esac
4218 done
4219
4220 if test -n "$cf_new_cflags" ; then
4221
4222         CFLAGS="$CFLAGS $cf_new_cflags"
4223 fi
4224
4225 if test -n "$cf_new_cppflags" ; then
4226
4227         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4228 fi
4229
4230 if test -n "$cf_new_extra_cppflags" ; then
4231
4232         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4233 fi
4234
4235                 ;;
4236         esac
4237         ;;
4238 esac
4239
4240 if test "$with_dmalloc" = yes ; then
4241         echo "$as_me:4241: checking for dmalloc.h" >&5
4242 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4243 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4244   echo $ECHO_N "(cached) $ECHO_C" >&6
4245 else
4246   cat >conftest.$ac_ext <<_ACEOF
4247 #line 4247 "configure"
4248 #include "confdefs.h"
4249 #include <dmalloc.h>
4250 _ACEOF
4251 if { (eval echo "$as_me:4251: \"$ac_cpp conftest.$ac_ext\"") >&5
4252   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4253   ac_status=$?
4254   egrep -v '^ *\+' conftest.er1 >conftest.err
4255   rm -f conftest.er1
4256   cat conftest.err >&5
4257   echo "$as_me:4257: \$? = $ac_status" >&5
4258   (exit $ac_status); } >/dev/null; then
4259   if test -s conftest.err; then
4260     ac_cpp_err=$ac_c_preproc_warn_flag
4261   else
4262     ac_cpp_err=
4263   fi
4264 else
4265   ac_cpp_err=yes
4266 fi
4267 if test -z "$ac_cpp_err"; then
4268   ac_cv_header_dmalloc_h=yes
4269 else
4270   echo "$as_me: failed program was:" >&5
4271   cat conftest.$ac_ext >&5
4272   ac_cv_header_dmalloc_h=no
4273 fi
4274 rm -f conftest.err conftest.$ac_ext
4275 fi
4276 echo "$as_me:4276: result: $ac_cv_header_dmalloc_h" >&5
4277 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4278 if test $ac_cv_header_dmalloc_h = yes; then
4279
4280 echo "$as_me:4280: checking for dmalloc_debug in -ldmalloc" >&5
4281 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4282 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4283   echo $ECHO_N "(cached) $ECHO_C" >&6
4284 else
4285   ac_check_lib_save_LIBS=$LIBS
4286 LIBS="-ldmalloc  $LIBS"
4287 cat >conftest.$ac_ext <<_ACEOF
4288 #line 4288 "configure"
4289 #include "confdefs.h"
4290
4291 /* Override any gcc2 internal prototype to avoid an error.  */
4292 #ifdef __cplusplus
4293 extern "C"
4294 #endif
4295 /* We use char because int might match the return type of a gcc2
4296    builtin and then its argument prototype would still apply.  */
4297 char dmalloc_debug ();
4298 int
4299 main ()
4300 {
4301 dmalloc_debug ();
4302   ;
4303   return 0;
4304 }
4305 _ACEOF
4306 rm -f conftest.$ac_objext conftest$ac_exeext
4307 if { (eval echo "$as_me:4307: \"$ac_link\"") >&5
4308   (eval $ac_link) 2>&5
4309   ac_status=$?
4310   echo "$as_me:4310: \$? = $ac_status" >&5
4311   (exit $ac_status); } &&
4312          { ac_try='test -s conftest$ac_exeext'
4313   { (eval echo "$as_me:4313: \"$ac_try\"") >&5
4314   (eval $ac_try) 2>&5
4315   ac_status=$?
4316   echo "$as_me:4316: \$? = $ac_status" >&5
4317   (exit $ac_status); }; }; then
4318   ac_cv_lib_dmalloc_dmalloc_debug=yes
4319 else
4320   echo "$as_me: failed program was:" >&5
4321 cat conftest.$ac_ext >&5
4322 ac_cv_lib_dmalloc_dmalloc_debug=no
4323 fi
4324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4325 LIBS=$ac_check_lib_save_LIBS
4326 fi
4327 echo "$as_me:4327: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4328 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4329 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4330   cat >>confdefs.h <<EOF
4331 #define HAVE_LIBDMALLOC 1
4332 EOF
4333
4334   LIBS="-ldmalloc $LIBS"
4335
4336 fi
4337
4338 fi
4339
4340 fi
4341
4342 echo "$as_me:4342: checking if you want to use dbmalloc for testing" >&5
4343 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4344
4345 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4346 if test "${with_dbmalloc+set}" = set; then
4347   withval="$with_dbmalloc"
4348   cat >>confdefs.h <<\EOF
4349 #define USE_DBMALLOC 1
4350 EOF
4351
4352         : ${with_cflags:=-g}
4353         : ${with_no_leaks:=yes}
4354          with_dbmalloc=yes
4355 else
4356   with_dbmalloc=
4357 fi;
4358 echo "$as_me:4358: result: ${with_dbmalloc:-no}" >&5
4359 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4360
4361 case .$with_cflags in #(vi
4362 .*-g*)
4363         case .$CFLAGS in #(vi
4364         .*-g*) #(vi
4365                 ;;
4366         *)
4367
4368 cf_fix_cppflags=no
4369 cf_new_cflags=
4370 cf_new_cppflags=
4371 cf_new_extra_cppflags=
4372
4373 for cf_add_cflags in -g
4374 do
4375 case $cf_fix_cppflags in
4376 no)
4377         case $cf_add_cflags in #(vi
4378         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4379                 case $cf_add_cflags in
4380                 -D*)
4381                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4382
4383                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4384                                 && test -z "${cf_tst_cflags}" \
4385                                 && cf_fix_cppflags=yes
4386
4387                         if test $cf_fix_cppflags = yes ; then
4388                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4389                                 continue
4390                         elif test "${cf_tst_cflags}" = "\"'" ; then
4391                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4392                                 continue
4393                         fi
4394                         ;;
4395                 esac
4396                 case "$CPPFLAGS" in
4397                 *$cf_add_cflags) #(vi
4398                         ;;
4399                 *) #(vi
4400                         case $cf_add_cflags in #(vi
4401                         -D*)
4402                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4403
4404 CPPFLAGS=`echo "$CPPFLAGS" | \
4405         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4406                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4407
4408                                 ;;
4409                         esac
4410                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4411                         ;;
4412                 esac
4413                 ;;
4414         *)
4415                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4416                 ;;
4417         esac
4418         ;;
4419 yes)
4420         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4421
4422         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4423
4424         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4425                 && test -z "${cf_tst_cflags}" \
4426                 && cf_fix_cppflags=no
4427         ;;
4428 esac
4429 done
4430
4431 if test -n "$cf_new_cflags" ; then
4432
4433         CFLAGS="$CFLAGS $cf_new_cflags"
4434 fi
4435
4436 if test -n "$cf_new_cppflags" ; then
4437
4438         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4439 fi
4440
4441 if test -n "$cf_new_extra_cppflags" ; then
4442
4443         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4444 fi
4445
4446                 ;;
4447         esac
4448         ;;
4449 esac
4450
4451 if test "$with_dbmalloc" = yes ; then
4452         echo "$as_me:4452: checking for dbmalloc.h" >&5
4453 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4454 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   cat >conftest.$ac_ext <<_ACEOF
4458 #line 4458 "configure"
4459 #include "confdefs.h"
4460 #include <dbmalloc.h>
4461 _ACEOF
4462 if { (eval echo "$as_me:4462: \"$ac_cpp conftest.$ac_ext\"") >&5
4463   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4464   ac_status=$?
4465   egrep -v '^ *\+' conftest.er1 >conftest.err
4466   rm -f conftest.er1
4467   cat conftest.err >&5
4468   echo "$as_me:4468: \$? = $ac_status" >&5
4469   (exit $ac_status); } >/dev/null; then
4470   if test -s conftest.err; then
4471     ac_cpp_err=$ac_c_preproc_warn_flag
4472   else
4473     ac_cpp_err=
4474   fi
4475 else
4476   ac_cpp_err=yes
4477 fi
4478 if test -z "$ac_cpp_err"; then
4479   ac_cv_header_dbmalloc_h=yes
4480 else
4481   echo "$as_me: failed program was:" >&5
4482   cat conftest.$ac_ext >&5
4483   ac_cv_header_dbmalloc_h=no
4484 fi
4485 rm -f conftest.err conftest.$ac_ext
4486 fi
4487 echo "$as_me:4487: result: $ac_cv_header_dbmalloc_h" >&5
4488 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4489 if test $ac_cv_header_dbmalloc_h = yes; then
4490
4491 echo "$as_me:4491: checking for debug_malloc in -ldbmalloc" >&5
4492 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4493 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4494   echo $ECHO_N "(cached) $ECHO_C" >&6
4495 else
4496   ac_check_lib_save_LIBS=$LIBS
4497 LIBS="-ldbmalloc  $LIBS"
4498 cat >conftest.$ac_ext <<_ACEOF
4499 #line 4499 "configure"
4500 #include "confdefs.h"
4501
4502 /* Override any gcc2 internal prototype to avoid an error.  */
4503 #ifdef __cplusplus
4504 extern "C"
4505 #endif
4506 /* We use char because int might match the return type of a gcc2
4507    builtin and then its argument prototype would still apply.  */
4508 char debug_malloc ();
4509 int
4510 main ()
4511 {
4512 debug_malloc ();
4513   ;
4514   return 0;
4515 }
4516 _ACEOF
4517 rm -f conftest.$ac_objext conftest$ac_exeext
4518 if { (eval echo "$as_me:4518: \"$ac_link\"") >&5
4519   (eval $ac_link) 2>&5
4520   ac_status=$?
4521   echo "$as_me:4521: \$? = $ac_status" >&5
4522   (exit $ac_status); } &&
4523          { ac_try='test -s conftest$ac_exeext'
4524   { (eval echo "$as_me:4524: \"$ac_try\"") >&5
4525   (eval $ac_try) 2>&5
4526   ac_status=$?
4527   echo "$as_me:4527: \$? = $ac_status" >&5
4528   (exit $ac_status); }; }; then
4529   ac_cv_lib_dbmalloc_debug_malloc=yes
4530 else
4531   echo "$as_me: failed program was:" >&5
4532 cat conftest.$ac_ext >&5
4533 ac_cv_lib_dbmalloc_debug_malloc=no
4534 fi
4535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4536 LIBS=$ac_check_lib_save_LIBS
4537 fi
4538 echo "$as_me:4538: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4539 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4540 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4541   cat >>confdefs.h <<EOF
4542 #define HAVE_LIBDBMALLOC 1
4543 EOF
4544
4545   LIBS="-ldbmalloc $LIBS"
4546
4547 fi
4548
4549 fi
4550
4551 fi
4552
4553 echo "$as_me:4553: checking if you want to use valgrind for testing" >&5
4554 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
4555
4556 # Check whether --with-valgrind or --without-valgrind was given.
4557 if test "${with_valgrind+set}" = set; then
4558   withval="$with_valgrind"
4559   cat >>confdefs.h <<\EOF
4560 #define USE_VALGRIND 1
4561 EOF
4562
4563         : ${with_cflags:=-g}
4564         : ${with_no_leaks:=yes}
4565          with_valgrind=yes
4566 else
4567   with_valgrind=
4568 fi;
4569 echo "$as_me:4569: result: ${with_valgrind:-no}" >&5
4570 echo "${ECHO_T}${with_valgrind:-no}" >&6
4571
4572 case .$with_cflags in #(vi
4573 .*-g*)
4574         case .$CFLAGS in #(vi
4575         .*-g*) #(vi
4576                 ;;
4577         *)
4578
4579 cf_fix_cppflags=no
4580 cf_new_cflags=
4581 cf_new_cppflags=
4582 cf_new_extra_cppflags=
4583
4584 for cf_add_cflags in -g
4585 do
4586 case $cf_fix_cppflags in
4587 no)
4588         case $cf_add_cflags in #(vi
4589         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4590                 case $cf_add_cflags in
4591                 -D*)
4592                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4593
4594                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4595                                 && test -z "${cf_tst_cflags}" \
4596                                 && cf_fix_cppflags=yes
4597
4598                         if test $cf_fix_cppflags = yes ; then
4599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4600                                 continue
4601                         elif test "${cf_tst_cflags}" = "\"'" ; then
4602                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4603                                 continue
4604                         fi
4605                         ;;
4606                 esac
4607                 case "$CPPFLAGS" in
4608                 *$cf_add_cflags) #(vi
4609                         ;;
4610                 *) #(vi
4611                         case $cf_add_cflags in #(vi
4612                         -D*)
4613                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4614
4615 CPPFLAGS=`echo "$CPPFLAGS" | \
4616         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4617                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4618
4619                                 ;;
4620                         esac
4621                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4622                         ;;
4623                 esac
4624                 ;;
4625         *)
4626                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4627                 ;;
4628         esac
4629         ;;
4630 yes)
4631         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4632
4633         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4634
4635         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4636                 && test -z "${cf_tst_cflags}" \
4637                 && cf_fix_cppflags=no
4638         ;;
4639 esac
4640 done
4641
4642 if test -n "$cf_new_cflags" ; then
4643
4644         CFLAGS="$CFLAGS $cf_new_cflags"
4645 fi
4646
4647 if test -n "$cf_new_cppflags" ; then
4648
4649         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4650 fi
4651
4652 if test -n "$cf_new_extra_cppflags" ; then
4653
4654         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4655 fi
4656
4657                 ;;
4658         esac
4659         ;;
4660 esac
4661
4662 echo "$as_me:4662: checking if you want to perform memory-leak testing" >&5
4663 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
4664
4665 # Check whether --enable-leaks or --disable-leaks was given.
4666 if test "${enable_leaks+set}" = set; then
4667   enableval="$enable_leaks"
4668   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
4669 else
4670   : ${with_no_leaks:=no}
4671 fi;
4672 echo "$as_me:4672: result: $with_no_leaks" >&5
4673 echo "${ECHO_T}$with_no_leaks" >&6
4674
4675 if test "$with_no_leaks" = yes ; then
4676         cat >>confdefs.h <<\EOF
4677 #define NO_LEAKS 1
4678 EOF
4679
4680         cat >>confdefs.h <<\EOF
4681 #define YY_NO_LEAKS 1
4682 EOF
4683
4684 fi
4685
4686 echo "$as_me:4686: checking if you want to check for wide-character functions" >&5
4687 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4688
4689 # Check whether --enable-widec or --disable-widec was given.
4690 if test "${enable_widec+set}" = set; then
4691   enableval="$enable_widec"
4692   test "$enableval" != no && enableval=yes
4693   if test "$enableval" != "yes" ; then
4694     cf_enable_widec=no
4695   else
4696     cf_enable_widec=yes
4697   fi
4698 else
4699   enableval=yes
4700   cf_enable_widec=yes
4701
4702 fi;
4703 echo "$as_me:4703: result: $cf_enable_widec" >&5
4704 echo "${ECHO_T}$cf_enable_widec" >&6
4705
4706 echo "$as_me:4706: checking for specific curses-directory" >&5
4707 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4708
4709 # Check whether --with-curses-dir or --without-curses-dir was given.
4710 if test "${with_curses_dir+set}" = set; then
4711   withval="$with_curses_dir"
4712   cf_cv_curses_dir=$withval
4713 else
4714   cf_cv_curses_dir=no
4715 fi;
4716 echo "$as_me:4716: result: $cf_cv_curses_dir" >&5
4717 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4718
4719 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4720 then
4721
4722 if test "x$prefix" != xNONE; then
4723   cf_path_syntax="$prefix"
4724 else
4725   cf_path_syntax="$ac_default_prefix"
4726 fi
4727
4728 case ".$withval" in #(vi
4729 .\$\(*\)*|.\'*\'*) #(vi
4730   ;;
4731 ..|./*|.\\*) #(vi
4732   ;;
4733 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4734   ;;
4735 .\${*prefix}*) #(vi
4736   eval withval="$withval"
4737   case ".$withval" in #(vi
4738   .NONE/*)
4739     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4740     ;;
4741   esac
4742   ;; #(vi
4743 .no|.NONE/*)
4744   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4745   ;;
4746 *)
4747   { { echo "$as_me:4747: error: expected a pathname, not \"$withval\"" >&5
4748 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4749    { (exit 1); exit 1; }; }
4750   ;;
4751 esac
4752
4753         if test -d "$cf_cv_curses_dir"
4754         then
4755
4756 if test -n "$cf_cv_curses_dir/include" ; then
4757   for cf_add_incdir in $cf_cv_curses_dir/include
4758   do
4759         while test $cf_add_incdir != /usr/include
4760         do
4761           if test -d $cf_add_incdir
4762           then
4763                 cf_have_incdir=no
4764                 if test -n "$CFLAGS$CPPFLAGS" ; then
4765                   # a loop is needed to ensure we can add subdirs of existing dirs
4766                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4767                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4768                           cf_have_incdir=yes; break
4769                         fi
4770                   done
4771                 fi
4772
4773                 if test "$cf_have_incdir" = no ; then
4774                   if test "$cf_add_incdir" = /usr/local/include ; then
4775                         if test "$GCC" = yes
4776                         then
4777                           cf_save_CPPFLAGS=$CPPFLAGS
4778                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4779                           cat >conftest.$ac_ext <<_ACEOF
4780 #line 4780 "configure"
4781 #include "confdefs.h"
4782 #include <stdio.h>
4783 int
4784 main ()
4785 {
4786 printf("Hello")
4787   ;
4788   return 0;
4789 }
4790 _ACEOF
4791 rm -f conftest.$ac_objext
4792 if { (eval echo "$as_me:4792: \"$ac_compile\"") >&5
4793   (eval $ac_compile) 2>&5
4794   ac_status=$?
4795   echo "$as_me:4795: \$? = $ac_status" >&5
4796   (exit $ac_status); } &&
4797          { ac_try='test -s conftest.$ac_objext'
4798   { (eval echo "$as_me:4798: \"$ac_try\"") >&5
4799   (eval $ac_try) 2>&5
4800   ac_status=$?
4801   echo "$as_me:4801: \$? = $ac_status" >&5
4802   (exit $ac_status); }; }; then
4803   :
4804 else
4805   echo "$as_me: failed program was:" >&5
4806 cat conftest.$ac_ext >&5
4807 cf_have_incdir=yes
4808 fi
4809 rm -f conftest.$ac_objext conftest.$ac_ext
4810                           CPPFLAGS=$cf_save_CPPFLAGS
4811                         fi
4812                   fi
4813                 fi
4814
4815                 if test "$cf_have_incdir" = no ; then
4816                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4817
4818 echo "${as_me:-configure}:4818: testing adding $cf_add_incdir to include-path ..." 1>&5
4819
4820                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4821
4822                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4823                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4824                   cf_add_incdir="$cf_top_incdir"
4825                 else
4826                   break
4827                 fi
4828           fi
4829         done
4830   done
4831 fi
4832
4833 if test -n "$cf_cv_curses_dir/lib" ; then
4834   for cf_add_libdir in $cf_cv_curses_dir/lib
4835   do
4836     if test $cf_add_libdir = /usr/lib ; then
4837       :
4838     elif test -d $cf_add_libdir
4839     then
4840       cf_have_libdir=no
4841       if test -n "$LDFLAGS$LIBS" ; then
4842         # a loop is needed to ensure we can add subdirs of existing dirs
4843         for cf_test_libdir in $LDFLAGS $LIBS ; do
4844           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4845             cf_have_libdir=yes; break
4846           fi
4847         done
4848       fi
4849       if test "$cf_have_libdir" = no ; then
4850         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4851
4852 echo "${as_me:-configure}:4852: testing adding $cf_add_libdir to library-path ..." 1>&5
4853
4854         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4855       fi
4856     fi
4857   done
4858 fi
4859
4860         fi
4861 fi
4862
4863 echo "$as_me:4863: checking for specified curses library type" >&5
4864 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4865
4866 # Check whether --with-ncursesw or --without-ncursesw was given.
4867 if test "${with_ncursesw+set}" = set; then
4868   withval="$with_ncursesw"
4869   cf_cv_screen=ncursesw
4870 else
4871
4872 # Check whether --with-ncurses or --without-ncurses was given.
4873 if test "${with_ncurses+set}" = set; then
4874   withval="$with_ncurses"
4875   cf_cv_screen=ncurses
4876 else
4877
4878 # Check whether --with-pdcurses or --without-pdcurses was given.
4879 if test "${with_pdcurses+set}" = set; then
4880   withval="$with_pdcurses"
4881   cf_cv_screen=pdcurses
4882 else
4883
4884 # Check whether --with-curses-colr or --without-curses-colr was given.
4885 if test "${with_curses_colr+set}" = set; then
4886   withval="$with_curses_colr"
4887   cf_cv_screen=curses_colr
4888 else
4889
4890 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4891 if test "${with_curses_5lib+set}" = set; then
4892   withval="$with_curses_5lib"
4893   cf_cv_screen=curses_5lib
4894 fi;
4895 fi;
4896 fi;
4897 fi;
4898 fi;
4899
4900 echo "$as_me:4900: result: $cf_cv_screen" >&5
4901 echo "${ECHO_T}$cf_cv_screen" >&6
4902
4903 case $cf_cv_screen in
4904 curses|curses_*)
4905
4906 echo "$as_me:4906: checking for extra include directories" >&5
4907 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4908 if test "${cf_cv_curses_incdir+set}" = set; then
4909   echo $ECHO_N "(cached) $ECHO_C" >&6
4910 else
4911
4912 cf_cv_curses_incdir=no
4913 case $host_os in #(vi
4914 hpux10.*) #(vi
4915         if test "x$cf_cv_screen" = "xcurses_colr"
4916         then
4917                 test -d /usr/include/curses_colr && \
4918                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4919         fi
4920         ;;
4921 sunos3*|sunos4*)
4922         if test "x$cf_cv_screen" = "xcurses_5lib"
4923         then
4924                 test -d /usr/5lib && \
4925                 test -d /usr/5include && \
4926                 cf_cv_curses_incdir="-I/usr/5include"
4927         fi
4928         ;;
4929 esac
4930
4931 fi
4932 echo "$as_me:4932: result: $cf_cv_curses_incdir" >&5
4933 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4934 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4935
4936 echo "$as_me:4936: checking if we have identified curses headers" >&5
4937 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4938 if test "${cf_cv_ncurses_header+set}" = set; then
4939   echo $ECHO_N "(cached) $ECHO_C" >&6
4940 else
4941
4942 cf_cv_ncurses_header=none
4943 for cf_header in  \
4944         ncurses.h \
4945         curses.h ncurses/ncurses.h ncurses/curses.h
4946 do
4947 cat >conftest.$ac_ext <<_ACEOF
4948 #line 4948 "configure"
4949 #include "confdefs.h"
4950 #include <${cf_header}>
4951 int
4952 main ()
4953 {
4954 initscr(); tgoto("?", 0,0)
4955   ;
4956   return 0;
4957 }
4958 _ACEOF
4959 rm -f conftest.$ac_objext
4960 if { (eval echo "$as_me:4960: \"$ac_compile\"") >&5
4961   (eval $ac_compile) 2>&5
4962   ac_status=$?
4963   echo "$as_me:4963: \$? = $ac_status" >&5
4964   (exit $ac_status); } &&
4965          { ac_try='test -s conftest.$ac_objext'
4966   { (eval echo "$as_me:4966: \"$ac_try\"") >&5
4967   (eval $ac_try) 2>&5
4968   ac_status=$?
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); }; }; then
4971   cf_cv_ncurses_header=$cf_header; break
4972 else
4973   echo "$as_me: failed program was:" >&5
4974 cat conftest.$ac_ext >&5
4975 fi
4976 rm -f conftest.$ac_objext conftest.$ac_ext
4977 done
4978
4979 fi
4980 echo "$as_me:4980: result: $cf_cv_ncurses_header" >&5
4981 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4982
4983 if test "$cf_cv_ncurses_header" = none ; then
4984         { { echo "$as_me:4984: error: No curses header-files found" >&5
4985 echo "$as_me: error: No curses header-files found" >&2;}
4986    { (exit 1); exit 1; }; }
4987 fi
4988
4989 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4990
4991 for ac_header in $cf_cv_ncurses_header
4992 do
4993 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4994 echo "$as_me:4994: checking for $ac_header" >&5
4995 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4996 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4997   echo $ECHO_N "(cached) $ECHO_C" >&6
4998 else
4999   cat >conftest.$ac_ext <<_ACEOF
5000 #line 5000 "configure"
5001 #include "confdefs.h"
5002 #include <$ac_header>
5003 _ACEOF
5004 if { (eval echo "$as_me:5004: \"$ac_cpp conftest.$ac_ext\"") >&5
5005   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5006   ac_status=$?
5007   egrep -v '^ *\+' conftest.er1 >conftest.err
5008   rm -f conftest.er1
5009   cat conftest.err >&5
5010   echo "$as_me:5010: \$? = $ac_status" >&5
5011   (exit $ac_status); } >/dev/null; then
5012   if test -s conftest.err; then
5013     ac_cpp_err=$ac_c_preproc_warn_flag
5014   else
5015     ac_cpp_err=
5016   fi
5017 else
5018   ac_cpp_err=yes
5019 fi
5020 if test -z "$ac_cpp_err"; then
5021   eval "$as_ac_Header=yes"
5022 else
5023   echo "$as_me: failed program was:" >&5
5024   cat conftest.$ac_ext >&5
5025   eval "$as_ac_Header=no"
5026 fi
5027 rm -f conftest.err conftest.$ac_ext
5028 fi
5029 echo "$as_me:5029: result: `eval echo '${'$as_ac_Header'}'`" >&5
5030 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5031 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5032   cat >>confdefs.h <<EOF
5033 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5034 EOF
5035
5036 fi
5037 done
5038
5039 echo "$as_me:5039: checking for terminfo header" >&5
5040 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5041 if test "${cf_cv_term_header+set}" = set; then
5042   echo $ECHO_N "(cached) $ECHO_C" >&6
5043 else
5044
5045 case ${cf_cv_ncurses_header} in #(vi
5046 */ncurses.h|*/ncursesw.h) #(vi
5047         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5048         ;;
5049 *)
5050         cf_term_header=term.h
5051         ;;
5052 esac
5053
5054 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5055 do
5056 cat >conftest.$ac_ext <<_ACEOF
5057 #line 5057 "configure"
5058 #include "confdefs.h"
5059 #include <stdio.h>
5060 #include <${cf_cv_ncurses_header:-curses.h}>
5061 #include <$cf_test>
5062
5063 int
5064 main ()
5065 {
5066 int x = auto_left_margin
5067   ;
5068   return 0;
5069 }
5070 _ACEOF
5071 rm -f conftest.$ac_objext
5072 if { (eval echo "$as_me:5072: \"$ac_compile\"") >&5
5073   (eval $ac_compile) 2>&5
5074   ac_status=$?
5075   echo "$as_me:5075: \$? = $ac_status" >&5
5076   (exit $ac_status); } &&
5077          { ac_try='test -s conftest.$ac_objext'
5078   { (eval echo "$as_me:5078: \"$ac_try\"") >&5
5079   (eval $ac_try) 2>&5
5080   ac_status=$?
5081   echo "$as_me:5081: \$? = $ac_status" >&5
5082   (exit $ac_status); }; }; then
5083
5084         cf_cv_term_header="$cf_test"
5085 else
5086   echo "$as_me: failed program was:" >&5
5087 cat conftest.$ac_ext >&5
5088
5089         cf_cv_term_header=unknown
5090
5091 fi
5092 rm -f conftest.$ac_objext conftest.$ac_ext
5093         test "$cf_cv_term_header" != unknown && break
5094 done
5095
5096 fi
5097 echo "$as_me:5097: result: $cf_cv_term_header" >&5
5098 echo "${ECHO_T}$cf_cv_term_header" >&6
5099
5100 # Set definitions to allow ifdef'ing to accommodate subdirectories
5101
5102 case $cf_cv_term_header in # (vi
5103 *term.h)
5104         cat >>confdefs.h <<\EOF
5105 #define HAVE_TERM_H 1
5106 EOF
5107
5108         ;;
5109 esac
5110
5111 case $cf_cv_term_header in # (vi
5112 ncurses/term.h) #(vi
5113         cat >>confdefs.h <<\EOF
5114 #define HAVE_NCURSES_TERM_H 1
5115 EOF
5116
5117         ;;
5118 ncursesw/term.h)
5119         cat >>confdefs.h <<\EOF
5120 #define HAVE_NCURSESW_TERM_H 1
5121 EOF
5122
5123         ;;
5124 esac
5125
5126 echo "$as_me:5126: checking for ncurses version" >&5
5127 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5128 if test "${cf_cv_ncurses_version+set}" = set; then
5129   echo $ECHO_N "(cached) $ECHO_C" >&6
5130 else
5131
5132         cf_cv_ncurses_version=no
5133         cf_tempfile=out$$
5134         rm -f $cf_tempfile
5135         if test "$cross_compiling" = yes; then
5136
5137         # This will not work if the preprocessor splits the line after the
5138         # Autoconf token.  The 'unproto' program does that.
5139         cat > conftest.$ac_ext <<EOF
5140 #include <${cf_cv_ncurses_header:-curses.h}>
5141 #undef Autoconf
5142 #ifdef NCURSES_VERSION
5143 Autoconf NCURSES_VERSION
5144 #else
5145 #ifdef __NCURSES_H
5146 Autoconf "old"
5147 #endif
5148 ;
5149 #endif
5150 EOF
5151         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5152         { (eval echo "$as_me:5152: \"$cf_try\"") >&5
5153   (eval $cf_try) 2>&5
5154   ac_status=$?
5155   echo "$as_me:5155: \$? = $ac_status" >&5
5156   (exit $ac_status); }
5157         if test -f conftest.out ; then
5158                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5159                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5160                 rm -f conftest.out
5161         fi
5162
5163 else
5164   cat >conftest.$ac_ext <<_ACEOF
5165 #line 5165 "configure"
5166 #include "confdefs.h"
5167
5168 #include <${cf_cv_ncurses_header:-curses.h}>
5169 #include <stdio.h>
5170 int main()
5171 {
5172         FILE *fp = fopen("$cf_tempfile", "w");
5173 #ifdef NCURSES_VERSION
5174 # ifdef NCURSES_VERSION_PATCH
5175         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5176 # else
5177         fprintf(fp, "%s\n", NCURSES_VERSION);
5178 # endif
5179 #else
5180 # ifdef __NCURSES_H
5181         fprintf(fp, "old\n");
5182 # else
5183         make an error
5184 # endif
5185 #endif
5186         ${cf_cv_main_return:-return}(0);
5187 }
5188 _ACEOF
5189 rm -f conftest$ac_exeext
5190 if { (eval echo "$as_me:5190: \"$ac_link\"") >&5
5191   (eval $ac_link) 2>&5
5192   ac_status=$?
5193   echo "$as_me:5193: \$? = $ac_status" >&5
5194   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5195   { (eval echo "$as_me:5195: \"$ac_try\"") >&5
5196   (eval $ac_try) 2>&5
5197   ac_status=$?
5198   echo "$as_me:5198: \$? = $ac_status" >&5
5199   (exit $ac_status); }; }; then
5200
5201         cf_cv_ncurses_version=`cat $cf_tempfile`
5202 else
5203   echo "$as_me: program exited with status $ac_status" >&5
5204 echo "$as_me: failed program was:" >&5
5205 cat conftest.$ac_ext >&5
5206 fi
5207 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5208 fi
5209         rm -f $cf_tempfile
5210
5211 fi
5212 echo "$as_me:5212: result: $cf_cv_ncurses_version" >&5
5213 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5214 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5215 #define NCURSES 1
5216 EOF
5217
5218 echo "$as_me:5218: checking if we have identified curses libraries" >&5
5219 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5220 cat >conftest.$ac_ext <<_ACEOF
5221 #line 5221 "configure"
5222 #include "confdefs.h"
5223 #include <${cf_cv_ncurses_header:-curses.h}>
5224 int
5225 main ()
5226 {
5227 initscr(); tgoto("?", 0,0)
5228   ;
5229   return 0;
5230 }
5231 _ACEOF
5232 rm -f conftest.$ac_objext conftest$ac_exeext
5233 if { (eval echo "$as_me:5233: \"$ac_link\"") >&5
5234   (eval $ac_link) 2>&5
5235   ac_status=$?
5236   echo "$as_me:5236: \$? = $ac_status" >&5
5237   (exit $ac_status); } &&
5238          { ac_try='test -s conftest$ac_exeext'
5239   { (eval echo "$as_me:5239: \"$ac_try\"") >&5
5240   (eval $ac_try) 2>&5
5241   ac_status=$?
5242   echo "$as_me:5242: \$? = $ac_status" >&5
5243   (exit $ac_status); }; }; then
5244   cf_result=yes
5245 else
5246   echo "$as_me: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 cf_result=no
5249 fi
5250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5251 echo "$as_me:5251: result: $cf_result" >&5
5252 echo "${ECHO_T}$cf_result" >&6
5253
5254 if test "$cf_result" = no ; then
5255 case $host_os in #(vi
5256 freebsd*) #(vi
5257     echo "$as_me:5257: checking for tgoto in -lmytinfo" >&5
5258 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5259 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5260   echo $ECHO_N "(cached) $ECHO_C" >&6
5261 else
5262   ac_check_lib_save_LIBS=$LIBS
5263 LIBS="-lmytinfo  $LIBS"
5264 cat >conftest.$ac_ext <<_ACEOF
5265 #line 5265 "configure"
5266 #include "confdefs.h"
5267
5268 /* Override any gcc2 internal prototype to avoid an error.  */
5269 #ifdef __cplusplus
5270 extern "C"
5271 #endif
5272 /* We use char because int might match the return type of a gcc2
5273    builtin and then its argument prototype would still apply.  */
5274 char tgoto ();
5275 int
5276 main ()
5277 {
5278 tgoto ();
5279   ;
5280   return 0;
5281 }
5282 _ACEOF
5283 rm -f conftest.$ac_objext conftest$ac_exeext
5284 if { (eval echo "$as_me:5284: \"$ac_link\"") >&5
5285   (eval $ac_link) 2>&5
5286   ac_status=$?
5287   echo "$as_me:5287: \$? = $ac_status" >&5
5288   (exit $ac_status); } &&
5289          { ac_try='test -s conftest$ac_exeext'
5290   { (eval echo "$as_me:5290: \"$ac_try\"") >&5
5291   (eval $ac_try) 2>&5
5292   ac_status=$?
5293   echo "$as_me:5293: \$? = $ac_status" >&5
5294   (exit $ac_status); }; }; then
5295   ac_cv_lib_mytinfo_tgoto=yes
5296 else
5297   echo "$as_me: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 ac_cv_lib_mytinfo_tgoto=no
5300 fi
5301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5302 LIBS=$ac_check_lib_save_LIBS
5303 fi
5304 echo "$as_me:5304: result: $ac_cv_lib_mytinfo_tgoto" >&5
5305 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5306 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5307   LIBS="-lmytinfo $LIBS"
5308 fi
5309
5310     ;;
5311 hpux10.*) #(vi
5312         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5313         # next (1998), and xcurses "newer" (2000).  There is no header file for
5314         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5315         # term.h) for cur_colr
5316         if test "x$cf_cv_screen" = "xcurses_colr"
5317         then
5318                 echo "$as_me:5318: checking for initscr in -lcur_colr" >&5
5319 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5320 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5321   echo $ECHO_N "(cached) $ECHO_C" >&6
5322 else
5323   ac_check_lib_save_LIBS=$LIBS
5324 LIBS="-lcur_colr  $LIBS"
5325 cat >conftest.$ac_ext <<_ACEOF
5326 #line 5326 "configure"
5327 #include "confdefs.h"
5328
5329 /* Override any gcc2 internal prototype to avoid an error.  */
5330 #ifdef __cplusplus
5331 extern "C"
5332 #endif
5333 /* We use char because int might match the return type of a gcc2
5334    builtin and then its argument prototype would still apply.  */
5335 char initscr ();
5336 int
5337 main ()
5338 {
5339 initscr ();
5340   ;
5341   return 0;
5342 }
5343 _ACEOF
5344 rm -f conftest.$ac_objext conftest$ac_exeext
5345 if { (eval echo "$as_me:5345: \"$ac_link\"") >&5
5346   (eval $ac_link) 2>&5
5347   ac_status=$?
5348   echo "$as_me:5348: \$? = $ac_status" >&5
5349   (exit $ac_status); } &&
5350          { ac_try='test -s conftest$ac_exeext'
5351   { (eval echo "$as_me:5351: \"$ac_try\"") >&5
5352   (eval $ac_try) 2>&5
5353   ac_status=$?
5354   echo "$as_me:5354: \$? = $ac_status" >&5
5355   (exit $ac_status); }; }; then
5356   ac_cv_lib_cur_colr_initscr=yes
5357 else
5358   echo "$as_me: failed program was:" >&5
5359 cat conftest.$ac_ext >&5
5360 ac_cv_lib_cur_colr_initscr=no
5361 fi
5362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5363 LIBS=$ac_check_lib_save_LIBS
5364 fi
5365 echo "$as_me:5365: result: $ac_cv_lib_cur_colr_initscr" >&5
5366 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5367 if test $ac_cv_lib_cur_colr_initscr = yes; then
5368
5369                         LIBS="-lcur_colr $LIBS"
5370                         ac_cv_func_initscr=yes
5371
5372 else
5373
5374                 echo "$as_me:5374: checking for initscr in -lHcurses" >&5
5375 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5376 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5377   echo $ECHO_N "(cached) $ECHO_C" >&6
5378 else
5379   ac_check_lib_save_LIBS=$LIBS
5380 LIBS="-lHcurses  $LIBS"
5381 cat >conftest.$ac_ext <<_ACEOF
5382 #line 5382 "configure"
5383 #include "confdefs.h"
5384
5385 /* Override any gcc2 internal prototype to avoid an error.  */
5386 #ifdef __cplusplus
5387 extern "C"
5388 #endif
5389 /* We use char because int might match the return type of a gcc2
5390    builtin and then its argument prototype would still apply.  */
5391 char initscr ();
5392 int
5393 main ()
5394 {
5395 initscr ();
5396   ;
5397   return 0;
5398 }
5399 _ACEOF
5400 rm -f conftest.$ac_objext conftest$ac_exeext
5401 if { (eval echo "$as_me:5401: \"$ac_link\"") >&5
5402   (eval $ac_link) 2>&5
5403   ac_status=$?
5404   echo "$as_me:5404: \$? = $ac_status" >&5
5405   (exit $ac_status); } &&
5406          { ac_try='test -s conftest$ac_exeext'
5407   { (eval echo "$as_me:5407: \"$ac_try\"") >&5
5408   (eval $ac_try) 2>&5
5409   ac_status=$?
5410   echo "$as_me:5410: \$? = $ac_status" >&5
5411   (exit $ac_status); }; }; then
5412   ac_cv_lib_Hcurses_initscr=yes
5413 else
5414   echo "$as_me: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
5416 ac_cv_lib_Hcurses_initscr=no
5417 fi
5418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5419 LIBS=$ac_check_lib_save_LIBS
5420 fi
5421 echo "$as_me:5421: result: $ac_cv_lib_Hcurses_initscr" >&5
5422 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5423 if test $ac_cv_lib_Hcurses_initscr = yes; then
5424
5425                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5426                         LIBS="-lHcurses $LIBS"
5427                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5428                         ac_cv_func_initscr=yes
5429
5430 fi
5431
5432 fi
5433
5434         fi
5435     ;;
5436 linux*)
5437         case `arch 2>/dev/null` in
5438         x86_64)
5439                 if test -d /lib64
5440                 then
5441
5442 if test -n "/lib64" ; then
5443   for cf_add_libdir in /lib64
5444   do
5445     if test $cf_add_libdir = /usr/lib ; then
5446       :
5447     elif test -d $cf_add_libdir
5448     then
5449       cf_have_libdir=no
5450       if test -n "$LDFLAGS$LIBS" ; then
5451         # a loop is needed to ensure we can add subdirs of existing dirs
5452         for cf_test_libdir in $LDFLAGS $LIBS ; do
5453           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5454             cf_have_libdir=yes; break
5455           fi
5456         done
5457       fi
5458       if test "$cf_have_libdir" = no ; then
5459         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5460
5461 echo "${as_me:-configure}:5461: testing adding $cf_add_libdir to library-path ..." 1>&5
5462
5463         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5464       fi
5465     fi
5466   done
5467 fi
5468
5469                 else
5470
5471 if test -n "/lib" ; then
5472   for cf_add_libdir in /lib
5473   do
5474     if test $cf_add_libdir = /usr/lib ; then
5475       :
5476     elif test -d $cf_add_libdir
5477     then
5478       cf_have_libdir=no
5479       if test -n "$LDFLAGS$LIBS" ; then
5480         # a loop is needed to ensure we can add subdirs of existing dirs
5481         for cf_test_libdir in $LDFLAGS $LIBS ; do
5482           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5483             cf_have_libdir=yes; break
5484           fi
5485         done
5486       fi
5487       if test "$cf_have_libdir" = no ; then
5488         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5489
5490 echo "${as_me:-configure}:5490: testing adding $cf_add_libdir to library-path ..." 1>&5
5491
5492         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5493       fi
5494     fi
5495   done
5496 fi
5497
5498                 fi
5499                 ;;
5500         *)
5501
5502 if test -n "/lib" ; then
5503   for cf_add_libdir in /lib
5504   do
5505     if test $cf_add_libdir = /usr/lib ; then
5506       :
5507     elif test -d $cf_add_libdir
5508     then
5509       cf_have_libdir=no
5510       if test -n "$LDFLAGS$LIBS" ; then
5511         # a loop is needed to ensure we can add subdirs of existing dirs
5512         for cf_test_libdir in $LDFLAGS $LIBS ; do
5513           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5514             cf_have_libdir=yes; break
5515           fi
5516         done
5517       fi
5518       if test "$cf_have_libdir" = no ; then
5519         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5520
5521 echo "${as_me:-configure}:5521: testing adding $cf_add_libdir to library-path ..." 1>&5
5522
5523         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5524       fi
5525     fi
5526   done
5527 fi
5528
5529                 ;;
5530         esac
5531     ;;
5532 sunos3*|sunos4*)
5533         if test "x$cf_cv_screen" = "xcurses_5lib"
5534         then
5535                 if test -d /usr/5lib ; then
5536
5537 if test -n "/usr/5lib" ; then
5538   for cf_add_libdir in /usr/5lib
5539   do
5540     if test $cf_add_libdir = /usr/lib ; then
5541       :
5542     elif test -d $cf_add_libdir
5543     then
5544       cf_have_libdir=no
5545       if test -n "$LDFLAGS$LIBS" ; then
5546         # a loop is needed to ensure we can add subdirs of existing dirs
5547         for cf_test_libdir in $LDFLAGS $LIBS ; do
5548           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5549             cf_have_libdir=yes; break
5550           fi
5551         done
5552       fi
5553       if test "$cf_have_libdir" = no ; then
5554         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5555
5556 echo "${as_me:-configure}:5556: testing adding $cf_add_libdir to library-path ..." 1>&5
5557
5558         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5559       fi
5560     fi
5561   done
5562 fi
5563
5564                         LIBS="-lcurses -ltermcap $LIBS"
5565                 fi
5566     fi
5567     ac_cv_func_initscr=yes
5568     ;;
5569 esac
5570
5571 if test ".$ac_cv_func_initscr" != .yes ; then
5572     cf_save_LIBS="$LIBS"
5573     cf_term_lib=""
5574     cf_curs_lib=""
5575
5576     if test ".${cf_cv_ncurses_version:-no}" != .no
5577     then
5578         cf_check_list="ncurses curses cursesX"
5579     else
5580         cf_check_list="cursesX curses ncurses"
5581     fi
5582
5583     # Check for library containing tgoto.  Do this before curses library
5584     # because it may be needed to link the test-case for initscr.
5585     echo "$as_me:5585: checking for tgoto" >&5
5586 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5587 if test "${ac_cv_func_tgoto+set}" = set; then
5588   echo $ECHO_N "(cached) $ECHO_C" >&6
5589 else
5590   cat >conftest.$ac_ext <<_ACEOF
5591 #line 5591 "configure"
5592 #include "confdefs.h"
5593 /* System header to define __stub macros and hopefully few prototypes,
5594     which can conflict with char tgoto (); below.  */
5595 #include <assert.h>
5596 /* Override any gcc2 internal prototype to avoid an error.  */
5597 #ifdef __cplusplus
5598 extern "C"
5599 #endif
5600 /* We use char because int might match the return type of a gcc2
5601    builtin and then its argument prototype would still apply.  */
5602 char tgoto ();
5603 char (*f) ();
5604
5605 int
5606 main ()
5607 {
5608 /* The GNU C library defines this for functions which it implements
5609     to always fail with ENOSYS.  Some functions are actually named
5610     something starting with __ and the normal name is an alias.  */
5611 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5612 choke me
5613 #else
5614 f = tgoto;
5615 #endif
5616
5617   ;
5618   return 0;
5619 }
5620 _ACEOF
5621 rm -f conftest.$ac_objext conftest$ac_exeext
5622 if { (eval echo "$as_me:5622: \"$ac_link\"") >&5
5623   (eval $ac_link) 2>&5
5624   ac_status=$?
5625   echo "$as_me:5625: \$? = $ac_status" >&5
5626   (exit $ac_status); } &&
5627          { ac_try='test -s conftest$ac_exeext'
5628   { (eval echo "$as_me:5628: \"$ac_try\"") >&5
5629   (eval $ac_try) 2>&5
5630   ac_status=$?
5631   echo "$as_me:5631: \$? = $ac_status" >&5
5632   (exit $ac_status); }; }; then
5633   ac_cv_func_tgoto=yes
5634 else
5635   echo "$as_me: failed program was:" >&5
5636 cat conftest.$ac_ext >&5
5637 ac_cv_func_tgoto=no
5638 fi
5639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5640 fi
5641 echo "$as_me:5641: result: $ac_cv_func_tgoto" >&5
5642 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5643 if test $ac_cv_func_tgoto = yes; then
5644   cf_term_lib=predefined
5645 else
5646
5647         for cf_term_lib in $cf_check_list termcap termlib unknown
5648         do
5649             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5650 echo "$as_me:5650: checking for tgoto in -l$cf_term_lib" >&5
5651 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5652 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5653   echo $ECHO_N "(cached) $ECHO_C" >&6
5654 else
5655   ac_check_lib_save_LIBS=$LIBS
5656 LIBS="-l$cf_term_lib  $LIBS"
5657 cat >conftest.$ac_ext <<_ACEOF
5658 #line 5658 "configure"
5659 #include "confdefs.h"
5660
5661 /* Override any gcc2 internal prototype to avoid an error.  */
5662 #ifdef __cplusplus
5663 extern "C"
5664 #endif
5665 /* We use char because int might match the return type of a gcc2
5666    builtin and then its argument prototype would still apply.  */
5667 char tgoto ();
5668 int
5669 main ()
5670 {
5671 tgoto ();
5672   ;
5673   return 0;
5674 }
5675 _ACEOF
5676 rm -f conftest.$ac_objext conftest$ac_exeext
5677 if { (eval echo "$as_me:5677: \"$ac_link\"") >&5
5678   (eval $ac_link) 2>&5
5679   ac_status=$?
5680   echo "$as_me:5680: \$? = $ac_status" >&5
5681   (exit $ac_status); } &&
5682          { ac_try='test -s conftest$ac_exeext'
5683   { (eval echo "$as_me:5683: \"$ac_try\"") >&5
5684   (eval $ac_try) 2>&5
5685   ac_status=$?
5686   echo "$as_me:5686: \$? = $ac_status" >&5
5687   (exit $ac_status); }; }; then
5688   eval "$as_ac_Lib=yes"
5689 else
5690   echo "$as_me: failed program was:" >&5
5691 cat conftest.$ac_ext >&5
5692 eval "$as_ac_Lib=no"
5693 fi
5694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5695 LIBS=$ac_check_lib_save_LIBS
5696 fi
5697 echo "$as_me:5697: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5698 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5699 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5700   break
5701 fi
5702
5703         done
5704
5705 fi
5706
5707     # Check for library containing initscr
5708     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5709         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5710     do
5711         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5712 echo "$as_me:5712: checking for initscr in -l$cf_curs_lib" >&5
5713 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5714 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5715   echo $ECHO_N "(cached) $ECHO_C" >&6
5716 else
5717   ac_check_lib_save_LIBS=$LIBS
5718 LIBS="-l$cf_curs_lib  $LIBS"
5719 cat >conftest.$ac_ext <<_ACEOF
5720 #line 5720 "configure"
5721 #include "confdefs.h"
5722
5723 /* Override any gcc2 internal prototype to avoid an error.  */
5724 #ifdef __cplusplus
5725 extern "C"
5726 #endif
5727 /* We use char because int might match the return type of a gcc2
5728    builtin and then its argument prototype would still apply.  */
5729 char initscr ();
5730 int
5731 main ()
5732 {
5733 initscr ();
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 rm -f conftest.$ac_objext conftest$ac_exeext
5739 if { (eval echo "$as_me:5739: \"$ac_link\"") >&5
5740   (eval $ac_link) 2>&5
5741   ac_status=$?
5742   echo "$as_me:5742: \$? = $ac_status" >&5
5743   (exit $ac_status); } &&
5744          { ac_try='test -s conftest$ac_exeext'
5745   { (eval echo "$as_me:5745: \"$ac_try\"") >&5
5746   (eval $ac_try) 2>&5
5747   ac_status=$?
5748   echo "$as_me:5748: \$? = $ac_status" >&5
5749   (exit $ac_status); }; }; then
5750   eval "$as_ac_Lib=yes"
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 eval "$as_ac_Lib=no"
5755 fi
5756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5757 LIBS=$ac_check_lib_save_LIBS
5758 fi
5759 echo "$as_me:5759: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5760 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5761 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5762   break
5763 fi
5764
5765     done
5766     test $cf_curs_lib = unknown && { { echo "$as_me:5766: error: no curses library found" >&5
5767 echo "$as_me: error: no curses library found" >&2;}
5768    { (exit 1); exit 1; }; }
5769
5770     LIBS="-l$cf_curs_lib $cf_save_LIBS"
5771     if test "$cf_term_lib" = unknown ; then
5772         echo "$as_me:5772: checking if we can link with $cf_curs_lib library" >&5
5773 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5774         cat >conftest.$ac_ext <<_ACEOF
5775 #line 5775 "configure"
5776 #include "confdefs.h"
5777 #include <${cf_cv_ncurses_header:-curses.h}>
5778 int
5779 main ()
5780 {
5781 initscr()
5782   ;
5783   return 0;
5784 }
5785 _ACEOF
5786 rm -f conftest.$ac_objext conftest$ac_exeext
5787 if { (eval echo "$as_me:5787: \"$ac_link\"") >&5
5788   (eval $ac_link) 2>&5
5789   ac_status=$?
5790   echo "$as_me:5790: \$? = $ac_status" >&5
5791   (exit $ac_status); } &&
5792          { ac_try='test -s conftest$ac_exeext'
5793   { (eval echo "$as_me:5793: \"$ac_try\"") >&5
5794   (eval $ac_try) 2>&5
5795   ac_status=$?
5796   echo "$as_me:5796: \$? = $ac_status" >&5
5797   (exit $ac_status); }; }; then
5798   cf_result=yes
5799 else
5800   echo "$as_me: failed program was:" >&5
5801 cat conftest.$ac_ext >&5
5802 cf_result=no
5803 fi
5804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5805         echo "$as_me:5805: result: $cf_result" >&5
5806 echo "${ECHO_T}$cf_result" >&6
5807         test $cf_result = no && { { echo "$as_me:5807: error: Cannot link curses library" >&5
5808 echo "$as_me: error: Cannot link curses library" >&2;}
5809    { (exit 1); exit 1; }; }
5810     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5811         :
5812     elif test "$cf_term_lib" != predefined ; then
5813         echo "$as_me:5813: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5814 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5815         cat >conftest.$ac_ext <<_ACEOF
5816 #line 5816 "configure"
5817 #include "confdefs.h"
5818 #include <${cf_cv_ncurses_header:-curses.h}>
5819 int
5820 main ()
5821 {
5822 initscr(); tgoto((char *)0, 0, 0);
5823   ;
5824   return 0;
5825 }
5826 _ACEOF
5827 rm -f conftest.$ac_objext conftest$ac_exeext
5828 if { (eval echo "$as_me:5828: \"$ac_link\"") >&5
5829   (eval $ac_link) 2>&5
5830   ac_status=$?
5831   echo "$as_me:5831: \$? = $ac_status" >&5
5832   (exit $ac_status); } &&
5833          { ac_try='test -s conftest$ac_exeext'
5834   { (eval echo "$as_me:5834: \"$ac_try\"") >&5
5835   (eval $ac_try) 2>&5
5836   ac_status=$?
5837   echo "$as_me:5837: \$? = $ac_status" >&5
5838   (exit $ac_status); }; }; then
5839   cf_result=no
5840 else
5841   echo "$as_me: failed program was:" >&5
5842 cat conftest.$ac_ext >&5
5843
5844             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5845             cat >conftest.$ac_ext <<_ACEOF
5846 #line 5846 "configure"
5847 #include "confdefs.h"
5848 #include <${cf_cv_ncurses_header:-curses.h}>
5849 int
5850 main ()
5851 {
5852 initscr()
5853   ;
5854   return 0;
5855 }
5856 _ACEOF
5857 rm -f conftest.$ac_objext conftest$ac_exeext
5858 if { (eval echo "$as_me:5858: \"$ac_link\"") >&5
5859   (eval $ac_link) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); } &&
5863          { ac_try='test -s conftest$ac_exeext'
5864   { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5865   (eval $ac_try) 2>&5
5866   ac_status=$?
5867   echo "$as_me:5867: \$? = $ac_status" >&5
5868   (exit $ac_status); }; }; then
5869   cf_result=yes
5870 else
5871   echo "$as_me: failed program was:" >&5
5872 cat conftest.$ac_ext >&5
5873 cf_result=error
5874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5876
5877 fi
5878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5879         echo "$as_me:5879: result: $cf_result" >&5
5880 echo "${ECHO_T}$cf_result" >&6
5881     fi
5882 fi
5883 fi
5884
5885 echo "$as_me:5885: checking for NetBSD form.h" >&5
5886 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
5887 if test "${cf_cv_netbsd_form_h+set}" = set; then
5888   echo $ECHO_N "(cached) $ECHO_C" >&6
5889 else
5890
5891 cat >conftest.$ac_ext <<_ACEOF
5892 #line 5892 "configure"
5893 #include "confdefs.h"
5894
5895 #include <${cf_cv_ncurses_header:-curses.h}>
5896 #include <form.h>
5897
5898 int
5899 main ()
5900 {
5901
5902         FORM *form;
5903         int y = current_field(form)->cursor_ypos;
5904         int x = current_field(form)->cursor_xpos;
5905
5906   ;
5907   return 0;
5908 }
5909 _ACEOF
5910 rm -f conftest.$ac_objext
5911 if { (eval echo "$as_me:5911: \"$ac_compile\"") >&5
5912   (eval $ac_compile) 2>&5
5913   ac_status=$?
5914   echo "$as_me:5914: \$? = $ac_status" >&5
5915   (exit $ac_status); } &&
5916          { ac_try='test -s conftest.$ac_objext'
5917   { (eval echo "$as_me:5917: \"$ac_try\"") >&5
5918   (eval $ac_try) 2>&5
5919   ac_status=$?
5920   echo "$as_me:5920: \$? = $ac_status" >&5
5921   (exit $ac_status); }; }; then
5922   cf_cv_netbsd_form_h=yes
5923
5924 else
5925   echo "$as_me: failed program was:" >&5
5926 cat conftest.$ac_ext >&5
5927 cf_cv_netbsd_form_h=no
5928 fi
5929 rm -f conftest.$ac_objext conftest.$ac_ext
5930
5931 fi
5932 echo "$as_me:5932: result: $cf_cv_netbsd_form_h" >&5
5933 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
5934
5935 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
5936 #define HAVE_NETBSD_FORM_H 1
5937 EOF
5938
5939 echo "$as_me:5939: checking for NetBSD menu.h" >&5
5940 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
5941 if test "${cf_cv_netbsd_menu_h+set}" = set; then
5942   echo $ECHO_N "(cached) $ECHO_C" >&6
5943 else
5944
5945 cat >conftest.$ac_ext <<_ACEOF
5946 #line 5946 "configure"
5947 #include "confdefs.h"
5948
5949 #include <${cf_cv_ncurses_header:-curses.h}>
5950 #include <menu.h>
5951
5952 int
5953 main ()
5954 {
5955
5956         MENU *menu;
5957         int y = menu->max_item_width;
5958
5959   ;
5960   return 0;
5961 }
5962 _ACEOF
5963 rm -f conftest.$ac_objext
5964 if { (eval echo "$as_me:5964: \"$ac_compile\"") >&5
5965   (eval $ac_compile) 2>&5
5966   ac_status=$?
5967   echo "$as_me:5967: \$? = $ac_status" >&5
5968   (exit $ac_status); } &&
5969          { ac_try='test -s conftest.$ac_objext'
5970   { (eval echo "$as_me:5970: \"$ac_try\"") >&5
5971   (eval $ac_try) 2>&5
5972   ac_status=$?
5973   echo "$as_me:5973: \$? = $ac_status" >&5
5974   (exit $ac_status); }; }; then
5975   cf_cv_netbsd_menu_h=yes
5976
5977 else
5978   echo "$as_me: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
5980 cf_cv_netbsd_menu_h=no
5981 fi
5982 rm -f conftest.$ac_objext conftest.$ac_ext
5983
5984 fi
5985 echo "$as_me:5985: result: $cf_cv_netbsd_menu_h" >&5
5986 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
5987
5988 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
5989 #define HAVE_NETBSD_MENU_H 1
5990 EOF
5991
5992         ;;
5993 ncurses)
5994
5995 cf_ncuconfig_root=ncurses
5996
5997 echo "Looking for ${cf_ncuconfig_root}-config"
5998 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5999 do
6000   # Extract the first word of "$ac_prog", so it can be a program name with args.
6001 set dummy $ac_prog; ac_word=$2
6002 echo "$as_me:6002: checking for $ac_word" >&5
6003 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6004 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
6005   echo $ECHO_N "(cached) $ECHO_C" >&6
6006 else
6007   case $NCURSES_CONFIG in
6008   [\\/]* | ?:[\\/]*)
6009   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
6010   ;;
6011   *)
6012   ac_save_IFS=$IFS; IFS=$ac_path_separator
6013 ac_dummy="$PATH"
6014 for ac_dir in $ac_dummy; do
6015   IFS=$ac_save_IFS
6016   test -z "$ac_dir" && ac_dir=.
6017   if $as_executable_p "$ac_dir/$ac_word"; then
6018    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
6019    echo "$as_me:6019: found $ac_dir/$ac_word" >&5
6020    break
6021 fi
6022 done
6023
6024   ;;
6025 esac
6026 fi
6027 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
6028
6029 if test -n "$NCURSES_CONFIG"; then
6030   echo "$as_me:6030: result: $NCURSES_CONFIG" >&5
6031 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6032 else
6033   echo "$as_me:6033: result: no" >&5
6034 echo "${ECHO_T}no" >&6
6035 fi
6036
6037   test -n "$NCURSES_CONFIG" && break
6038 done
6039 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
6040
6041 if test "$NCURSES_CONFIG" != none ; then
6042
6043 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6044 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6045
6046 # even with config script, some packages use no-override for curses.h
6047
6048 echo "$as_me:6048: checking if we have identified curses headers" >&5
6049 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6050 if test "${cf_cv_ncurses_header+set}" = set; then
6051   echo $ECHO_N "(cached) $ECHO_C" >&6
6052 else
6053
6054 cf_cv_ncurses_header=none
6055 for cf_header in  \
6056     ncurses/ncurses.h \
6057         ncurses/curses.h \
6058         ncurses.h \
6059         curses.h
6060 do
6061 cat >conftest.$ac_ext <<_ACEOF
6062 #line 6062 "configure"
6063 #include "confdefs.h"
6064 #include <${cf_header}>
6065 int
6066 main ()
6067 {
6068 initscr(); tgoto("?", 0,0)
6069   ;
6070   return 0;
6071 }
6072 _ACEOF
6073 rm -f conftest.$ac_objext
6074 if { (eval echo "$as_me:6074: \"$ac_compile\"") >&5
6075   (eval $ac_compile) 2>&5
6076   ac_status=$?
6077   echo "$as_me:6077: \$? = $ac_status" >&5
6078   (exit $ac_status); } &&
6079          { ac_try='test -s conftest.$ac_objext'
6080   { (eval echo "$as_me:6080: \"$ac_try\"") >&5
6081   (eval $ac_try) 2>&5
6082   ac_status=$?
6083   echo "$as_me:6083: \$? = $ac_status" >&5
6084   (exit $ac_status); }; }; then
6085   cf_cv_ncurses_header=$cf_header; break
6086 else
6087   echo "$as_me: failed program was:" >&5
6088 cat conftest.$ac_ext >&5
6089 fi
6090 rm -f conftest.$ac_objext conftest.$ac_ext
6091 done
6092
6093 fi
6094 echo "$as_me:6094: result: $cf_cv_ncurses_header" >&5
6095 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6096
6097 if test "$cf_cv_ncurses_header" = none ; then
6098         { { echo "$as_me:6098: error: No curses header-files found" >&5
6099 echo "$as_me: error: No curses header-files found" >&2;}
6100    { (exit 1); exit 1; }; }
6101 fi
6102
6103 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6104
6105 for ac_header in $cf_cv_ncurses_header
6106 do
6107 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6108 echo "$as_me:6108: checking for $ac_header" >&5
6109 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6110 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6111   echo $ECHO_N "(cached) $ECHO_C" >&6
6112 else
6113   cat >conftest.$ac_ext <<_ACEOF
6114 #line 6114 "configure"
6115 #include "confdefs.h"
6116 #include <$ac_header>
6117 _ACEOF
6118 if { (eval echo "$as_me:6118: \"$ac_cpp conftest.$ac_ext\"") >&5
6119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6120   ac_status=$?
6121   egrep -v '^ *\+' conftest.er1 >conftest.err
6122   rm -f conftest.er1
6123   cat conftest.err >&5
6124   echo "$as_me:6124: \$? = $ac_status" >&5
6125   (exit $ac_status); } >/dev/null; then
6126   if test -s conftest.err; then
6127     ac_cpp_err=$ac_c_preproc_warn_flag
6128   else
6129     ac_cpp_err=
6130   fi
6131 else
6132   ac_cpp_err=yes
6133 fi
6134 if test -z "$ac_cpp_err"; then
6135   eval "$as_ac_Header=yes"
6136 else
6137   echo "$as_me: failed program was:" >&5
6138   cat conftest.$ac_ext >&5
6139   eval "$as_ac_Header=no"
6140 fi
6141 rm -f conftest.err conftest.$ac_ext
6142 fi
6143 echo "$as_me:6143: result: `eval echo '${'$as_ac_Header'}'`" >&5
6144 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6145 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6146   cat >>confdefs.h <<EOF
6147 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6148 EOF
6149
6150 fi
6151 done
6152
6153 cat >>confdefs.h <<\EOF
6154 #define NCURSES 1
6155 EOF
6156
6157 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6158
6159 cat >>confdefs.h <<EOF
6160 #define $cf_nculib_ROOT 1
6161 EOF
6162
6163 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6164
6165 else
6166
6167 cf_ncuhdr_root=ncurses
6168
6169 test -n "$cf_cv_curses_dir" && \
6170 test "$cf_cv_curses_dir" != "no" && { \
6171
6172 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6173   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6174   do
6175         while test $cf_add_incdir != /usr/include
6176         do
6177           if test -d $cf_add_incdir
6178           then
6179                 cf_have_incdir=no
6180                 if test -n "$CFLAGS$CPPFLAGS" ; then
6181                   # a loop is needed to ensure we can add subdirs of existing dirs
6182                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6183                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6184                           cf_have_incdir=yes; break
6185                         fi
6186                   done
6187                 fi
6188
6189                 if test "$cf_have_incdir" = no ; then
6190                   if test "$cf_add_incdir" = /usr/local/include ; then
6191                         if test "$GCC" = yes
6192                         then
6193                           cf_save_CPPFLAGS=$CPPFLAGS
6194                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6195                           cat >conftest.$ac_ext <<_ACEOF
6196 #line 6196 "configure"
6197 #include "confdefs.h"
6198 #include <stdio.h>
6199 int
6200 main ()
6201 {
6202 printf("Hello")
6203   ;
6204   return 0;
6205 }
6206 _ACEOF
6207 rm -f conftest.$ac_objext
6208 if { (eval echo "$as_me:6208: \"$ac_compile\"") >&5
6209   (eval $ac_compile) 2>&5
6210   ac_status=$?
6211   echo "$as_me:6211: \$? = $ac_status" >&5
6212   (exit $ac_status); } &&
6213          { ac_try='test -s conftest.$ac_objext'
6214   { (eval echo "$as_me:6214: \"$ac_try\"") >&5
6215   (eval $ac_try) 2>&5
6216   ac_status=$?
6217   echo "$as_me:6217: \$? = $ac_status" >&5
6218   (exit $ac_status); }; }; then
6219   :
6220 else
6221   echo "$as_me: failed program was:" >&5
6222 cat conftest.$ac_ext >&5
6223 cf_have_incdir=yes
6224 fi
6225 rm -f conftest.$ac_objext conftest.$ac_ext
6226                           CPPFLAGS=$cf_save_CPPFLAGS
6227                         fi
6228                   fi
6229                 fi
6230
6231                 if test "$cf_have_incdir" = no ; then
6232                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6233
6234 echo "${as_me:-configure}:6234: testing adding $cf_add_incdir to include-path ..." 1>&5
6235
6236                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6237
6238                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6239                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6240                   cf_add_incdir="$cf_top_incdir"
6241                 else
6242                   break
6243                 fi
6244           fi
6245         done
6246   done
6247 fi
6248
6249 }
6250
6251 echo "$as_me:6251: checking for $cf_ncuhdr_root header in include-path" >&5
6252 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6253 if test "${cf_cv_ncurses_h+set}" = set; then
6254   echo $ECHO_N "(cached) $ECHO_C" >&6
6255 else
6256
6257         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6258         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6259         for cf_header in $cf_header_list
6260         do
6261
6262         cat >conftest.$ac_ext <<_ACEOF
6263 #line 6263 "configure"
6264 #include "confdefs.h"
6265
6266 #include <$cf_header>
6267 int
6268 main ()
6269 {
6270
6271 #ifdef NCURSES_VERSION
6272
6273 printf("%s\n", NCURSES_VERSION);
6274 #else
6275 #ifdef __NCURSES_H
6276 printf("old\n");
6277 #else
6278         make an error
6279 #endif
6280 #endif
6281
6282   ;
6283   return 0;
6284 }
6285 _ACEOF
6286 rm -f conftest.$ac_objext
6287 if { (eval echo "$as_me:6287: \"$ac_compile\"") >&5
6288   (eval $ac_compile) 2>&5
6289   ac_status=$?
6290   echo "$as_me:6290: \$? = $ac_status" >&5
6291   (exit $ac_status); } &&
6292          { ac_try='test -s conftest.$ac_objext'
6293   { (eval echo "$as_me:6293: \"$ac_try\"") >&5
6294   (eval $ac_try) 2>&5
6295   ac_status=$?
6296   echo "$as_me:6296: \$? = $ac_status" >&5
6297   (exit $ac_status); }; }; then
6298   cf_cv_ncurses_h=$cf_header
6299
6300 else
6301   echo "$as_me: failed program was:" >&5
6302 cat conftest.$ac_ext >&5
6303 cf_cv_ncurses_h=no
6304 fi
6305 rm -f conftest.$ac_objext conftest.$ac_ext
6306
6307                 test "$cf_cv_ncurses_h" != no && break
6308         done
6309
6310 fi
6311 echo "$as_me:6311: result: $cf_cv_ncurses_h" >&5
6312 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6313
6314 if test "$cf_cv_ncurses_h" != no ; then
6315         cf_cv_ncurses_header=$cf_cv_ncurses_h
6316 else
6317
6318 echo "$as_me:6318: checking for $cf_ncuhdr_root include-path" >&5
6319 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6320 if test "${cf_cv_ncurses_h2+set}" = set; then
6321   echo $ECHO_N "(cached) $ECHO_C" >&6
6322 else
6323
6324         test -n "$verbose" && echo
6325
6326 cf_search=
6327
6328 # collect the current set of include-directories from compiler flags
6329 cf_header_path_list=""
6330 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6331         for cf_header_path in $CPPFLAGS $CFLAGS
6332         do
6333                 case $cf_header_path in #(vi
6334                 -I*)
6335                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6336
6337 test "$cf_header_path" != "NONE" && \
6338 test -d "$cf_header_path" && \
6339  {
6340         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6341         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6342         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6343         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6344         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6345         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"
6346 }
6347
6348                         cf_header_path_list="$cf_header_path_list $cf_search"
6349                         ;;
6350                 esac
6351         done
6352 fi
6353
6354 # add the variations for the package we are looking for
6355
6356 cf_search=
6357
6358 test "/usr" != "$prefix" && \
6359 test -d "/usr" && \
6360 (test $prefix = NONE || test "/usr" != "$prefix") && {
6361         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6362         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6363         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6364         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6365         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6366         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6367 }
6368
6369 test "$prefix" != "NONE" && \
6370 test -d "$prefix" && \
6371  {
6372         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6373         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6374         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6375         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6376         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6377         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6378 }
6379
6380 test "/usr/local" != "$prefix" && \
6381 test -d "/usr/local" && \
6382 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6383         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6384         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6385         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6386         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6387         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6388         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6389 }
6390
6391 test "/opt" != "$prefix" && \
6392 test -d "/opt" && \
6393 (test $prefix = NONE || test "/opt" != "$prefix") && {
6394         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6395         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6396         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6397         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6398         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6399         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6400 }
6401
6402 test "$HOME" != "$prefix" && \
6403 test -d "$HOME" && \
6404 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6405         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6406         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6407         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6408         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6409         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6410         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6411 }
6412
6413 test "$includedir" != NONE && \
6414 test "$includedir" != "/usr/include" && \
6415 test -d "$includedir" && {
6416         test -d $includedir &&    cf_search="$cf_search $includedir"
6417         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6418 }
6419
6420 test "$oldincludedir" != NONE && \
6421 test "$oldincludedir" != "/usr/include" && \
6422 test -d "$oldincludedir" && {
6423         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6424         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6425 }
6426
6427 cf_search="$cf_search $cf_header_path_list"
6428
6429         test -n "$verbose" && echo search path $cf_search
6430         cf_save2_CPPFLAGS="$CPPFLAGS"
6431         for cf_incdir in $cf_search
6432         do
6433
6434 if test -n "$cf_incdir" ; then
6435   for cf_add_incdir in $cf_incdir
6436   do
6437         while test $cf_add_incdir != /usr/include
6438         do
6439           if test -d $cf_add_incdir
6440           then
6441                 cf_have_incdir=no
6442                 if test -n "$CFLAGS$CPPFLAGS" ; then
6443                   # a loop is needed to ensure we can add subdirs of existing dirs
6444                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6445                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6446                           cf_have_incdir=yes; break
6447                         fi
6448                   done
6449                 fi
6450
6451                 if test "$cf_have_incdir" = no ; then
6452                   if test "$cf_add_incdir" = /usr/local/include ; then
6453                         if test "$GCC" = yes
6454                         then
6455                           cf_save_CPPFLAGS=$CPPFLAGS
6456                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6457                           cat >conftest.$ac_ext <<_ACEOF
6458 #line 6458 "configure"
6459 #include "confdefs.h"
6460 #include <stdio.h>
6461 int
6462 main ()
6463 {
6464 printf("Hello")
6465   ;
6466   return 0;
6467 }
6468 _ACEOF
6469 rm -f conftest.$ac_objext
6470 if { (eval echo "$as_me:6470: \"$ac_compile\"") >&5
6471   (eval $ac_compile) 2>&5
6472   ac_status=$?
6473   echo "$as_me:6473: \$? = $ac_status" >&5
6474   (exit $ac_status); } &&
6475          { ac_try='test -s conftest.$ac_objext'
6476   { (eval echo "$as_me:6476: \"$ac_try\"") >&5
6477   (eval $ac_try) 2>&5
6478   ac_status=$?
6479   echo "$as_me:6479: \$? = $ac_status" >&5
6480   (exit $ac_status); }; }; then
6481   :
6482 else
6483   echo "$as_me: failed program was:" >&5
6484 cat conftest.$ac_ext >&5
6485 cf_have_incdir=yes
6486 fi
6487 rm -f conftest.$ac_objext conftest.$ac_ext
6488                           CPPFLAGS=$cf_save_CPPFLAGS
6489                         fi
6490                   fi
6491                 fi
6492
6493                 if test "$cf_have_incdir" = no ; then
6494                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6495
6496 echo "${as_me:-configure}:6496: testing adding $cf_add_incdir to include-path ..." 1>&5
6497
6498                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6499
6500                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6501                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6502                   cf_add_incdir="$cf_top_incdir"
6503                 else
6504                   break
6505                 fi
6506           fi
6507         done
6508   done
6509 fi
6510
6511                 for cf_header in \
6512                         ncurses.h \
6513                         curses.h
6514                 do
6515
6516         cat >conftest.$ac_ext <<_ACEOF
6517 #line 6517 "configure"
6518 #include "confdefs.h"
6519
6520 #include <$cf_header>
6521 int
6522 main ()
6523 {
6524
6525 #ifdef NCURSES_VERSION
6526
6527 printf("%s\n", NCURSES_VERSION);
6528 #else
6529 #ifdef __NCURSES_H
6530 printf("old\n");
6531 #else
6532         make an error
6533 #endif
6534 #endif
6535
6536   ;
6537   return 0;
6538 }
6539 _ACEOF
6540 rm -f conftest.$ac_objext
6541 if { (eval echo "$as_me:6541: \"$ac_compile\"") >&5
6542   (eval $ac_compile) 2>&5
6543   ac_status=$?
6544   echo "$as_me:6544: \$? = $ac_status" >&5
6545   (exit $ac_status); } &&
6546          { ac_try='test -s conftest.$ac_objext'
6547   { (eval echo "$as_me:6547: \"$ac_try\"") >&5
6548   (eval $ac_try) 2>&5
6549   ac_status=$?
6550   echo "$as_me:6550: \$? = $ac_status" >&5
6551   (exit $ac_status); }; }; then
6552   cf_cv_ncurses_h2=$cf_header
6553
6554 else
6555   echo "$as_me: failed program was:" >&5
6556 cat conftest.$ac_ext >&5
6557 cf_cv_ncurses_h2=no
6558 fi
6559 rm -f conftest.$ac_objext conftest.$ac_ext
6560
6561                         if test "$cf_cv_ncurses_h2" != no ; then
6562                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6563                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6564                                 break
6565                         fi
6566                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6567                 done
6568                 CPPFLAGS="$cf_save2_CPPFLAGS"
6569                 test "$cf_cv_ncurses_h2" != no && break
6570         done
6571         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6571: error: not found" >&5
6572 echo "$as_me: error: not found" >&2;}
6573    { (exit 1); exit 1; }; }
6574
6575 fi
6576 echo "$as_me:6576: result: $cf_cv_ncurses_h2" >&5
6577 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6578
6579         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6580         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6581         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6582                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6583         fi
6584
6585 if test -n "$cf_1st_incdir" ; then
6586   for cf_add_incdir in $cf_1st_incdir
6587   do
6588         while test $cf_add_incdir != /usr/include
6589         do
6590           if test -d $cf_add_incdir
6591           then
6592                 cf_have_incdir=no
6593                 if test -n "$CFLAGS$CPPFLAGS" ; then
6594                   # a loop is needed to ensure we can add subdirs of existing dirs
6595                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6596                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6597                           cf_have_incdir=yes; break
6598                         fi
6599                   done
6600                 fi
6601
6602                 if test "$cf_have_incdir" = no ; then
6603                   if test "$cf_add_incdir" = /usr/local/include ; then
6604                         if test "$GCC" = yes
6605                         then
6606                           cf_save_CPPFLAGS=$CPPFLAGS
6607                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6608                           cat >conftest.$ac_ext <<_ACEOF
6609 #line 6609 "configure"
6610 #include "confdefs.h"
6611 #include <stdio.h>
6612 int
6613 main ()
6614 {
6615 printf("Hello")
6616   ;
6617   return 0;
6618 }
6619 _ACEOF
6620 rm -f conftest.$ac_objext
6621 if { (eval echo "$as_me:6621: \"$ac_compile\"") >&5
6622   (eval $ac_compile) 2>&5
6623   ac_status=$?
6624   echo "$as_me:6624: \$? = $ac_status" >&5
6625   (exit $ac_status); } &&
6626          { ac_try='test -s conftest.$ac_objext'
6627   { (eval echo "$as_me:6627: \"$ac_try\"") >&5
6628   (eval $ac_try) 2>&5
6629   ac_status=$?
6630   echo "$as_me:6630: \$? = $ac_status" >&5
6631   (exit $ac_status); }; }; then
6632   :
6633 else
6634   echo "$as_me: failed program was:" >&5
6635 cat conftest.$ac_ext >&5
6636 cf_have_incdir=yes
6637 fi
6638 rm -f conftest.$ac_objext conftest.$ac_ext
6639                           CPPFLAGS=$cf_save_CPPFLAGS
6640                         fi
6641                   fi
6642                 fi
6643
6644                 if test "$cf_have_incdir" = no ; then
6645                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6646
6647 echo "${as_me:-configure}:6647: testing adding $cf_add_incdir to include-path ..." 1>&5
6648
6649                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6650
6651                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6652                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6653                   cf_add_incdir="$cf_top_incdir"
6654                 else
6655                   break
6656                 fi
6657           fi
6658         done
6659   done
6660 fi
6661
6662 fi
6663
6664 # Set definitions to allow ifdef'ing for ncurses.h
6665
6666 case $cf_cv_ncurses_header in # (vi
6667 *ncurses.h)
6668         cat >>confdefs.h <<\EOF
6669 #define HAVE_NCURSES_H 1
6670 EOF
6671
6672         ;;
6673 esac
6674
6675 case $cf_cv_ncurses_header in # (vi
6676 ncurses/curses.h|ncurses/ncurses.h)
6677         cat >>confdefs.h <<\EOF
6678 #define HAVE_NCURSES_NCURSES_H 1
6679 EOF
6680
6681         ;;
6682 ncursesw/curses.h|ncursesw/ncurses.h)
6683         cat >>confdefs.h <<\EOF
6684 #define HAVE_NCURSESW_NCURSES_H 1
6685 EOF
6686
6687         ;;
6688 esac
6689
6690 echo "$as_me:6690: checking for terminfo header" >&5
6691 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6692 if test "${cf_cv_term_header+set}" = set; then
6693   echo $ECHO_N "(cached) $ECHO_C" >&6
6694 else
6695
6696 case ${cf_cv_ncurses_header} in #(vi
6697 */ncurses.h|*/ncursesw.h) #(vi
6698         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6699         ;;
6700 *)
6701         cf_term_header=term.h
6702         ;;
6703 esac
6704
6705 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6706 do
6707 cat >conftest.$ac_ext <<_ACEOF
6708 #line 6708 "configure"
6709 #include "confdefs.h"
6710 #include <stdio.h>
6711 #include <${cf_cv_ncurses_header:-curses.h}>
6712 #include <$cf_test>
6713
6714 int
6715 main ()
6716 {
6717 int x = auto_left_margin
6718   ;
6719   return 0;
6720 }
6721 _ACEOF
6722 rm -f conftest.$ac_objext
6723 if { (eval echo "$as_me:6723: \"$ac_compile\"") >&5
6724   (eval $ac_compile) 2>&5
6725   ac_status=$?
6726   echo "$as_me:6726: \$? = $ac_status" >&5
6727   (exit $ac_status); } &&
6728          { ac_try='test -s conftest.$ac_objext'
6729   { (eval echo "$as_me:6729: \"$ac_try\"") >&5
6730   (eval $ac_try) 2>&5
6731   ac_status=$?
6732   echo "$as_me:6732: \$? = $ac_status" >&5
6733   (exit $ac_status); }; }; then
6734
6735         cf_cv_term_header="$cf_test"
6736 else
6737   echo "$as_me: failed program was:" >&5
6738 cat conftest.$ac_ext >&5
6739
6740         cf_cv_term_header=unknown
6741
6742 fi
6743 rm -f conftest.$ac_objext conftest.$ac_ext
6744         test "$cf_cv_term_header" != unknown && break
6745 done
6746
6747 fi
6748 echo "$as_me:6748: result: $cf_cv_term_header" >&5
6749 echo "${ECHO_T}$cf_cv_term_header" >&6
6750
6751 # Set definitions to allow ifdef'ing to accommodate subdirectories
6752
6753 case $cf_cv_term_header in # (vi
6754 *term.h)
6755         cat >>confdefs.h <<\EOF
6756 #define HAVE_TERM_H 1
6757 EOF
6758
6759         ;;
6760 esac
6761
6762 case $cf_cv_term_header in # (vi
6763 ncurses/term.h) #(vi
6764         cat >>confdefs.h <<\EOF
6765 #define HAVE_NCURSES_TERM_H 1
6766 EOF
6767
6768         ;;
6769 ncursesw/term.h)
6770         cat >>confdefs.h <<\EOF
6771 #define HAVE_NCURSESW_TERM_H 1
6772 EOF
6773
6774         ;;
6775 esac
6776
6777 # some applications need this, but should check for NCURSES_VERSION
6778 cat >>confdefs.h <<\EOF
6779 #define NCURSES 1
6780 EOF
6781
6782 echo "$as_me:6782: checking for ncurses version" >&5
6783 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6784 if test "${cf_cv_ncurses_version+set}" = set; then
6785   echo $ECHO_N "(cached) $ECHO_C" >&6
6786 else
6787
6788         cf_cv_ncurses_version=no
6789         cf_tempfile=out$$
6790         rm -f $cf_tempfile
6791         if test "$cross_compiling" = yes; then
6792
6793         # This will not work if the preprocessor splits the line after the
6794         # Autoconf token.  The 'unproto' program does that.
6795         cat > conftest.$ac_ext <<EOF
6796 #include <${cf_cv_ncurses_header:-curses.h}>
6797 #undef Autoconf
6798 #ifdef NCURSES_VERSION
6799 Autoconf NCURSES_VERSION
6800 #else
6801 #ifdef __NCURSES_H
6802 Autoconf "old"
6803 #endif
6804 ;
6805 #endif
6806 EOF
6807         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6808         { (eval echo "$as_me:6808: \"$cf_try\"") >&5
6809   (eval $cf_try) 2>&5
6810   ac_status=$?
6811   echo "$as_me:6811: \$? = $ac_status" >&5
6812   (exit $ac_status); }
6813         if test -f conftest.out ; then
6814                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6815                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6816                 rm -f conftest.out
6817         fi
6818
6819 else
6820   cat >conftest.$ac_ext <<_ACEOF
6821 #line 6821 "configure"
6822 #include "confdefs.h"
6823
6824 #include <${cf_cv_ncurses_header:-curses.h}>
6825 #include <stdio.h>
6826 int main()
6827 {
6828         FILE *fp = fopen("$cf_tempfile", "w");
6829 #ifdef NCURSES_VERSION
6830 # ifdef NCURSES_VERSION_PATCH
6831         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6832 # else
6833         fprintf(fp, "%s\n", NCURSES_VERSION);
6834 # endif
6835 #else
6836 # ifdef __NCURSES_H
6837         fprintf(fp, "old\n");
6838 # else
6839         make an error
6840 # endif
6841 #endif
6842         ${cf_cv_main_return:-return}(0);
6843 }
6844 _ACEOF
6845 rm -f conftest$ac_exeext
6846 if { (eval echo "$as_me:6846: \"$ac_link\"") >&5
6847   (eval $ac_link) 2>&5
6848   ac_status=$?
6849   echo "$as_me:6849: \$? = $ac_status" >&5
6850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6851   { (eval echo "$as_me:6851: \"$ac_try\"") >&5
6852   (eval $ac_try) 2>&5
6853   ac_status=$?
6854   echo "$as_me:6854: \$? = $ac_status" >&5
6855   (exit $ac_status); }; }; then
6856
6857         cf_cv_ncurses_version=`cat $cf_tempfile`
6858 else
6859   echo "$as_me: program exited with status $ac_status" >&5
6860 echo "$as_me: failed program was:" >&5
6861 cat conftest.$ac_ext >&5
6862 fi
6863 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6864 fi
6865         rm -f $cf_tempfile
6866
6867 fi
6868 echo "$as_me:6868: result: $cf_cv_ncurses_version" >&5
6869 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6870 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6871 #define NCURSES 1
6872 EOF
6873
6874 cf_nculib_root=ncurses
6875         # This works, except for the special case where we find gpm, but
6876         # ncurses is in a nonstandard location via $LIBS, and we really want
6877         # to link gpm.
6878 cf_ncurses_LIBS=""
6879 cf_ncurses_SAVE="$LIBS"
6880 echo "$as_me:6880: checking for Gpm_Open in -lgpm" >&5
6881 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6882 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6883   echo $ECHO_N "(cached) $ECHO_C" >&6
6884 else
6885   ac_check_lib_save_LIBS=$LIBS
6886 LIBS="-lgpm  $LIBS"
6887 cat >conftest.$ac_ext <<_ACEOF
6888 #line 6888 "configure"
6889 #include "confdefs.h"
6890
6891 /* Override any gcc2 internal prototype to avoid an error.  */
6892 #ifdef __cplusplus
6893 extern "C"
6894 #endif
6895 /* We use char because int might match the return type of a gcc2
6896    builtin and then its argument prototype would still apply.  */
6897 char Gpm_Open ();
6898 int
6899 main ()
6900 {
6901 Gpm_Open ();
6902   ;
6903   return 0;
6904 }
6905 _ACEOF
6906 rm -f conftest.$ac_objext conftest$ac_exeext
6907 if { (eval echo "$as_me:6907: \"$ac_link\"") >&5
6908   (eval $ac_link) 2>&5
6909   ac_status=$?
6910   echo "$as_me:6910: \$? = $ac_status" >&5
6911   (exit $ac_status); } &&
6912          { ac_try='test -s conftest$ac_exeext'
6913   { (eval echo "$as_me:6913: \"$ac_try\"") >&5
6914   (eval $ac_try) 2>&5
6915   ac_status=$?
6916   echo "$as_me:6916: \$? = $ac_status" >&5
6917   (exit $ac_status); }; }; then
6918   ac_cv_lib_gpm_Gpm_Open=yes
6919 else
6920   echo "$as_me: failed program was:" >&5
6921 cat conftest.$ac_ext >&5
6922 ac_cv_lib_gpm_Gpm_Open=no
6923 fi
6924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6925 LIBS=$ac_check_lib_save_LIBS
6926 fi
6927 echo "$as_me:6927: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6928 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6929 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6930   echo "$as_me:6930: checking for initscr in -lgpm" >&5
6931 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6932 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6933   echo $ECHO_N "(cached) $ECHO_C" >&6
6934 else
6935   ac_check_lib_save_LIBS=$LIBS
6936 LIBS="-lgpm  $LIBS"
6937 cat >conftest.$ac_ext <<_ACEOF
6938 #line 6938 "configure"
6939 #include "confdefs.h"
6940
6941 /* Override any gcc2 internal prototype to avoid an error.  */
6942 #ifdef __cplusplus
6943 extern "C"
6944 #endif
6945 /* We use char because int might match the return type of a gcc2
6946    builtin and then its argument prototype would still apply.  */
6947 char initscr ();
6948 int
6949 main ()
6950 {
6951 initscr ();
6952   ;
6953   return 0;
6954 }
6955 _ACEOF
6956 rm -f conftest.$ac_objext conftest$ac_exeext
6957 if { (eval echo "$as_me:6957: \"$ac_link\"") >&5
6958   (eval $ac_link) 2>&5
6959   ac_status=$?
6960   echo "$as_me:6960: \$? = $ac_status" >&5
6961   (exit $ac_status); } &&
6962          { ac_try='test -s conftest$ac_exeext'
6963   { (eval echo "$as_me:6963: \"$ac_try\"") >&5
6964   (eval $ac_try) 2>&5
6965   ac_status=$?
6966   echo "$as_me:6966: \$? = $ac_status" >&5
6967   (exit $ac_status); }; }; then
6968   ac_cv_lib_gpm_initscr=yes
6969 else
6970   echo "$as_me: failed program was:" >&5
6971 cat conftest.$ac_ext >&5
6972 ac_cv_lib_gpm_initscr=no
6973 fi
6974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6975 LIBS=$ac_check_lib_save_LIBS
6976 fi
6977 echo "$as_me:6977: result: $ac_cv_lib_gpm_initscr" >&5
6978 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6979 if test $ac_cv_lib_gpm_initscr = yes; then
6980   LIBS="$cf_ncurses_SAVE"
6981 else
6982   cf_ncurses_LIBS="-lgpm"
6983 fi
6984
6985 fi
6986
6987 case $host_os in #(vi
6988 freebsd*)
6989         # This is only necessary if you are linking against an obsolete
6990         # version of ncurses (but it should do no harm, since it's static).
6991         if test "$cf_nculib_root" = ncurses ; then
6992                 echo "$as_me:6992: checking for tgoto in -lmytinfo" >&5
6993 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6994 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6995   echo $ECHO_N "(cached) $ECHO_C" >&6
6996 else
6997   ac_check_lib_save_LIBS=$LIBS
6998 LIBS="-lmytinfo  $LIBS"
6999 cat >conftest.$ac_ext <<_ACEOF
7000 #line 7000 "configure"
7001 #include "confdefs.h"
7002
7003 /* Override any gcc2 internal prototype to avoid an error.  */
7004 #ifdef __cplusplus
7005 extern "C"
7006 #endif
7007 /* We use char because int might match the return type of a gcc2
7008    builtin and then its argument prototype would still apply.  */
7009 char tgoto ();
7010 int
7011 main ()
7012 {
7013 tgoto ();
7014   ;
7015   return 0;
7016 }
7017 _ACEOF
7018 rm -f conftest.$ac_objext conftest$ac_exeext
7019 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); } &&
7024          { ac_try='test -s conftest$ac_exeext'
7025   { (eval echo "$as_me:7025: \"$ac_try\"") >&5
7026   (eval $ac_try) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit $ac_status); }; }; then
7030   ac_cv_lib_mytinfo_tgoto=yes
7031 else
7032   echo "$as_me: failed program was:" >&5
7033 cat conftest.$ac_ext >&5
7034 ac_cv_lib_mytinfo_tgoto=no
7035 fi
7036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7037 LIBS=$ac_check_lib_save_LIBS
7038 fi
7039 echo "$as_me:7039: result: $ac_cv_lib_mytinfo_tgoto" >&5
7040 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7041 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7042   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7043 fi
7044
7045         fi
7046         ;;
7047 esac
7048
7049 LIBS="$cf_ncurses_LIBS $LIBS"
7050
7051 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7052 then
7053         LIBS="-l$cf_nculib_root $LIBS"
7054 else
7055
7056         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7057         cf_libdir=""
7058         echo "$as_me:7058: checking for initscr" >&5
7059 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7060 if test "${ac_cv_func_initscr+set}" = set; then
7061   echo $ECHO_N "(cached) $ECHO_C" >&6
7062 else
7063   cat >conftest.$ac_ext <<_ACEOF
7064 #line 7064 "configure"
7065 #include "confdefs.h"
7066 /* System header to define __stub macros and hopefully few prototypes,
7067     which can conflict with char initscr (); below.  */
7068 #include <assert.h>
7069 /* Override any gcc2 internal prototype to avoid an error.  */
7070 #ifdef __cplusplus
7071 extern "C"
7072 #endif
7073 /* We use char because int might match the return type of a gcc2
7074    builtin and then its argument prototype would still apply.  */
7075 char initscr ();
7076 char (*f) ();
7077
7078 int
7079 main ()
7080 {
7081 /* The GNU C library defines this for functions which it implements
7082     to always fail with ENOSYS.  Some functions are actually named
7083     something starting with __ and the normal name is an alias.  */
7084 #if defined (__stub_initscr) || defined (__stub___initscr)
7085 choke me
7086 #else
7087 f = initscr;
7088 #endif
7089
7090   ;
7091   return 0;
7092 }
7093 _ACEOF
7094 rm -f conftest.$ac_objext conftest$ac_exeext
7095 if { (eval echo "$as_me:7095: \"$ac_link\"") >&5
7096   (eval $ac_link) 2>&5
7097   ac_status=$?
7098   echo "$as_me:7098: \$? = $ac_status" >&5
7099   (exit $ac_status); } &&
7100          { ac_try='test -s conftest$ac_exeext'
7101   { (eval echo "$as_me:7101: \"$ac_try\"") >&5
7102   (eval $ac_try) 2>&5
7103   ac_status=$?
7104   echo "$as_me:7104: \$? = $ac_status" >&5
7105   (exit $ac_status); }; }; then
7106   ac_cv_func_initscr=yes
7107 else
7108   echo "$as_me: failed program was:" >&5
7109 cat conftest.$ac_ext >&5
7110 ac_cv_func_initscr=no
7111 fi
7112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7113 fi
7114 echo "$as_me:7114: result: $ac_cv_func_initscr" >&5
7115 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7116 if test $ac_cv_func_initscr = yes; then
7117   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7118 else
7119
7120                 cf_save_LIBS="$LIBS"
7121                 echo "$as_me:7121: checking for initscr in -l$cf_nculib_root" >&5
7122 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7123                 LIBS="-l$cf_nculib_root $LIBS"
7124                 cat >conftest.$ac_ext <<_ACEOF
7125 #line 7125 "configure"
7126 #include "confdefs.h"
7127 #include <${cf_cv_ncurses_header:-curses.h}>
7128 int
7129 main ()
7130 {
7131 initscr()
7132   ;
7133   return 0;
7134 }
7135 _ACEOF
7136 rm -f conftest.$ac_objext conftest$ac_exeext
7137 if { (eval echo "$as_me:7137: \"$ac_link\"") >&5
7138   (eval $ac_link) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); } &&
7142          { ac_try='test -s conftest$ac_exeext'
7143   { (eval echo "$as_me:7143: \"$ac_try\"") >&5
7144   (eval $ac_try) 2>&5
7145   ac_status=$?
7146   echo "$as_me:7146: \$? = $ac_status" >&5
7147   (exit $ac_status); }; }; then
7148   echo "$as_me:7148: result: yes" >&5
7149 echo "${ECHO_T}yes" >&6
7150                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7151
7152 else
7153   echo "$as_me: failed program was:" >&5
7154 cat conftest.$ac_ext >&5
7155 echo "$as_me:7155: result: no" >&5
7156 echo "${ECHO_T}no" >&6
7157
7158 cf_search=
7159 cf_library_path_list=""
7160 if test -n "${LDFLAGS}${LIBS}" ; then
7161         for cf_library_path in $LDFLAGS $LIBS
7162         do
7163                 case $cf_library_path in #(vi
7164                 -L*)
7165                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7166
7167 test "$cf_library_path" != "NONE" && \
7168 test -d "$cf_library_path" && \
7169  {
7170         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7171         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7172         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7173         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7174         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7175         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"
7176 }
7177
7178                         cf_library_path_list="$cf_library_path_list $cf_search"
7179                         ;;
7180                 esac
7181         done
7182 fi
7183
7184 cf_search=
7185
7186 test "/usr" != "$prefix" && \
7187 test -d "/usr" && \
7188 (test $prefix = NONE || test "/usr" != "$prefix") && {
7189         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7190         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7191         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7192         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7193         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7194         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7195 }
7196
7197 test "$prefix" != "NONE" && \
7198 test -d "$prefix" && \
7199  {
7200         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7201         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7202         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7203         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7204         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7205         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7206 }
7207
7208 test "/usr/local" != "$prefix" && \
7209 test -d "/usr/local" && \
7210 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7211         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7212         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7213         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7214         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7215         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7216         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7217 }
7218
7219 test "/opt" != "$prefix" && \
7220 test -d "/opt" && \
7221 (test $prefix = NONE || test "/opt" != "$prefix") && {
7222         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7223         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7224         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7225         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7226         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7227         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7228 }
7229
7230 test "$HOME" != "$prefix" && \
7231 test -d "$HOME" && \
7232 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7233         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7234         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7235         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7236         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7237         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7238         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7239 }
7240
7241 cf_search="$cf_library_path_list $cf_search"
7242
7243                         for cf_libdir in $cf_search
7244                         do
7245                                 echo "$as_me:7245: checking for -l$cf_nculib_root in $cf_libdir" >&5
7246 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7247                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7248                                 cat >conftest.$ac_ext <<_ACEOF
7249 #line 7249 "configure"
7250 #include "confdefs.h"
7251 #include <${cf_cv_ncurses_header:-curses.h}>
7252 int
7253 main ()
7254 {
7255 initscr()
7256   ;
7257   return 0;
7258 }
7259 _ACEOF
7260 rm -f conftest.$ac_objext conftest$ac_exeext
7261 if { (eval echo "$as_me:7261: \"$ac_link\"") >&5
7262   (eval $ac_link) 2>&5
7263   ac_status=$?
7264   echo "$as_me:7264: \$? = $ac_status" >&5
7265   (exit $ac_status); } &&
7266          { ac_try='test -s conftest$ac_exeext'
7267   { (eval echo "$as_me:7267: \"$ac_try\"") >&5
7268   (eval $ac_try) 2>&5
7269   ac_status=$?
7270   echo "$as_me:7270: \$? = $ac_status" >&5
7271   (exit $ac_status); }; }; then
7272   echo "$as_me:7272: result: yes" >&5
7273 echo "${ECHO_T}yes" >&6
7274                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7275                                          break
7276 else
7277   echo "$as_me: failed program was:" >&5
7278 cat conftest.$ac_ext >&5
7279 echo "$as_me:7279: result: no" >&5
7280 echo "${ECHO_T}no" >&6
7281                                          LIBS="$cf_save_LIBS"
7282 fi
7283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7284                         done
7285
7286 fi
7287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7288
7289 fi
7290
7291 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7292
7293 if test $cf_found_library = no ; then
7294         { { echo "$as_me:7294: error: Cannot link $cf_nculib_root library" >&5
7295 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7296    { (exit 1); exit 1; }; }
7297 fi
7298
7299 fi
7300
7301 if test -n "$cf_ncurses_LIBS" ; then
7302         echo "$as_me:7302: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7303 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7304         cf_ncurses_SAVE="$LIBS"
7305         for p in $cf_ncurses_LIBS ; do
7306                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7307                 if test "$q" != "$LIBS" ; then
7308                         LIBS="$q"
7309                 fi
7310         done
7311         cat >conftest.$ac_ext <<_ACEOF
7312 #line 7312 "configure"
7313 #include "confdefs.h"
7314 #include <${cf_cv_ncurses_header:-curses.h}>
7315 int
7316 main ()
7317 {
7318 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7319   ;
7320   return 0;
7321 }
7322 _ACEOF
7323 rm -f conftest.$ac_objext conftest$ac_exeext
7324 if { (eval echo "$as_me:7324: \"$ac_link\"") >&5
7325   (eval $ac_link) 2>&5
7326   ac_status=$?
7327   echo "$as_me:7327: \$? = $ac_status" >&5
7328   (exit $ac_status); } &&
7329          { ac_try='test -s conftest$ac_exeext'
7330   { (eval echo "$as_me:7330: \"$ac_try\"") >&5
7331   (eval $ac_try) 2>&5
7332   ac_status=$?
7333   echo "$as_me:7333: \$? = $ac_status" >&5
7334   (exit $ac_status); }; }; then
7335   echo "$as_me:7335: result: yes" >&5
7336 echo "${ECHO_T}yes" >&6
7337 else
7338   echo "$as_me: failed program was:" >&5
7339 cat conftest.$ac_ext >&5
7340 echo "$as_me:7340: result: no" >&5
7341 echo "${ECHO_T}no" >&6
7342                  LIBS="$cf_ncurses_SAVE"
7343 fi
7344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7345 fi
7346
7347 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7348
7349 cat >>confdefs.h <<EOF
7350 #define $cf_nculib_ROOT 1
7351 EOF
7352
7353 fi
7354
7355         ;;
7356 ncursesw)
7357         cf_cv_libtype=w
7358
7359 echo "$as_me:7359: checking for multibyte character support" >&5
7360 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7361 if test "${cf_cv_utf8_lib+set}" = set; then
7362   echo $ECHO_N "(cached) $ECHO_C" >&6
7363 else
7364
7365         cf_save_LIBS="$LIBS"
7366         cat >conftest.$ac_ext <<_ACEOF
7367 #line 7367 "configure"
7368 #include "confdefs.h"
7369
7370 #include <stdlib.h>
7371 int
7372 main ()
7373 {
7374 putwc(0,0);
7375   ;
7376   return 0;
7377 }
7378 _ACEOF
7379 rm -f conftest.$ac_objext conftest$ac_exeext
7380 if { (eval echo "$as_me:7380: \"$ac_link\"") >&5
7381   (eval $ac_link) 2>&5
7382   ac_status=$?
7383   echo "$as_me:7383: \$? = $ac_status" >&5
7384   (exit $ac_status); } &&
7385          { ac_try='test -s conftest$ac_exeext'
7386   { (eval echo "$as_me:7386: \"$ac_try\"") >&5
7387   (eval $ac_try) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit $ac_status); }; }; then
7391   cf_cv_utf8_lib=yes
7392 else
7393   echo "$as_me: failed program was:" >&5
7394 cat conftest.$ac_ext >&5
7395
7396 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7397 # will be set on completion of the AC_TRY_LINK below.
7398 cf_cv_header_path_utf8=
7399 cf_cv_library_path_utf8=
7400
7401 echo "${as_me:-configure}:7401: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7402
7403 cf_save_LIBS="$LIBS"
7404
7405 cat >conftest.$ac_ext <<_ACEOF
7406 #line 7406 "configure"
7407 #include "confdefs.h"
7408
7409 #include <libutf8.h>
7410 int
7411 main ()
7412 {
7413 putwc(0,0);
7414   ;
7415   return 0;
7416 }
7417 _ACEOF
7418 rm -f conftest.$ac_objext conftest$ac_exeext
7419 if { (eval echo "$as_me:7419: \"$ac_link\"") >&5
7420   (eval $ac_link) 2>&5
7421   ac_status=$?
7422   echo "$as_me:7422: \$? = $ac_status" >&5
7423   (exit $ac_status); } &&
7424          { ac_try='test -s conftest$ac_exeext'
7425   { (eval echo "$as_me:7425: \"$ac_try\"") >&5
7426   (eval $ac_try) 2>&5
7427   ac_status=$?
7428   echo "$as_me:7428: \$? = $ac_status" >&5
7429   (exit $ac_status); }; }; then
7430
7431         cf_cv_find_linkage_utf8=yes
7432         cf_cv_header_path_utf8=/usr/include
7433         cf_cv_library_path_utf8=/usr/lib
7434
7435 else
7436   echo "$as_me: failed program was:" >&5
7437 cat conftest.$ac_ext >&5
7438
7439 LIBS="-lutf8  $cf_save_LIBS"
7440
7441 cat >conftest.$ac_ext <<_ACEOF
7442 #line 7442 "configure"
7443 #include "confdefs.h"
7444
7445 #include <libutf8.h>
7446 int
7447 main ()
7448 {
7449 putwc(0,0);
7450   ;
7451   return 0;
7452 }
7453 _ACEOF
7454 rm -f conftest.$ac_objext conftest$ac_exeext
7455 if { (eval echo "$as_me:7455: \"$ac_link\"") >&5
7456   (eval $ac_link) 2>&5
7457   ac_status=$?
7458   echo "$as_me:7458: \$? = $ac_status" >&5
7459   (exit $ac_status); } &&
7460          { ac_try='test -s conftest$ac_exeext'
7461   { (eval echo "$as_me:7461: \"$ac_try\"") >&5
7462   (eval $ac_try) 2>&5
7463   ac_status=$?
7464   echo "$as_me:7464: \$? = $ac_status" >&5
7465   (exit $ac_status); }; }; then
7466
7467         cf_cv_find_linkage_utf8=yes
7468         cf_cv_header_path_utf8=/usr/include
7469         cf_cv_library_path_utf8=/usr/lib
7470         cf_cv_library_file_utf8="-lutf8"
7471
7472 else
7473   echo "$as_me: failed program was:" >&5
7474 cat conftest.$ac_ext >&5
7475
7476         cf_cv_find_linkage_utf8=no
7477         LIBS="$cf_save_LIBS"
7478
7479     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7480
7481 echo "${as_me:-configure}:7481: testing find linkage for utf8 library ..." 1>&5
7482
7483 echo "${as_me:-configure}:7483: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7484
7485     cf_save_CPPFLAGS="$CPPFLAGS"
7486     cf_test_CPPFLAGS="$CPPFLAGS"
7487
7488 cf_search=
7489
7490 # collect the current set of include-directories from compiler flags
7491 cf_header_path_list=""
7492 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7493         for cf_header_path in $CPPFLAGS $CFLAGS
7494         do
7495                 case $cf_header_path in #(vi
7496                 -I*)
7497                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7498
7499 test "$cf_header_path" != "NONE" && \
7500 test -d "$cf_header_path" && \
7501  {
7502         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7503         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7504         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7505         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7506         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7507         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7508 }
7509
7510                         cf_header_path_list="$cf_header_path_list $cf_search"
7511                         ;;
7512                 esac
7513         done
7514 fi
7515
7516 # add the variations for the package we are looking for
7517
7518 cf_search=
7519
7520 test "/usr" != "$prefix" && \
7521 test -d "/usr" && \
7522 (test $prefix = NONE || test "/usr" != "$prefix") && {
7523         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7524         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7525         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7526         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7527         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7528         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7529 }
7530
7531 test "$prefix" != "NONE" && \
7532 test -d "$prefix" && \
7533  {
7534         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7535         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7536         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7537         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7538         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7539         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7540 }
7541
7542 test "/usr/local" != "$prefix" && \
7543 test -d "/usr/local" && \
7544 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7545         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7546         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7547         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7548         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7549         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7550         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7551 }
7552
7553 test "/opt" != "$prefix" && \
7554 test -d "/opt" && \
7555 (test $prefix = NONE || test "/opt" != "$prefix") && {
7556         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7557         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7558         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7559         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7560         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7561         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7562 }
7563
7564 test "$HOME" != "$prefix" && \
7565 test -d "$HOME" && \
7566 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7567         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7568         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7569         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7570         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7571         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7572         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7573 }
7574
7575 test "$includedir" != NONE && \
7576 test "$includedir" != "/usr/include" && \
7577 test -d "$includedir" && {
7578         test -d $includedir &&    cf_search="$cf_search $includedir"
7579         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7580 }
7581
7582 test "$oldincludedir" != NONE && \
7583 test "$oldincludedir" != "/usr/include" && \
7584 test -d "$oldincludedir" && {
7585         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7586         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7587 }
7588
7589 cf_search="$cf_search $cf_header_path_list"
7590
7591     for cf_cv_header_path_utf8 in $cf_search
7592     do
7593       if test -d $cf_cv_header_path_utf8 ; then
7594         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7595
7596 echo "${as_me:-configure}:7596: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7597
7598         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7599         cat >conftest.$ac_ext <<_ACEOF
7600 #line 7600 "configure"
7601 #include "confdefs.h"
7602
7603 #include <libutf8.h>
7604 int
7605 main ()
7606 {
7607 putwc(0,0);
7608   ;
7609   return 0;
7610 }
7611 _ACEOF
7612 rm -f conftest.$ac_objext
7613 if { (eval echo "$as_me:7613: \"$ac_compile\"") >&5
7614   (eval $ac_compile) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); } &&
7618          { ac_try='test -s conftest.$ac_objext'
7619   { (eval echo "$as_me:7619: \"$ac_try\"") >&5
7620   (eval $ac_try) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); }; }; then
7624
7625             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7626
7627 echo "${as_me:-configure}:7627: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7628
7629             cf_cv_find_linkage_utf8=maybe
7630             cf_test_CPPFLAGS="$CPPFLAGS"
7631             break
7632 else
7633   echo "$as_me: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7635
7636             CPPFLAGS="$cf_save_CPPFLAGS"
7637
7638 fi
7639 rm -f conftest.$ac_objext conftest.$ac_ext
7640       fi
7641     done
7642
7643     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7644
7645 echo "${as_me:-configure}:7645: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7646
7647       cf_save_LIBS="$LIBS"
7648       cf_save_LDFLAGS="$LDFLAGS"
7649
7650       if test "$cf_cv_find_linkage_utf8" != yes ; then
7651
7652 cf_search=
7653 cf_library_path_list=""
7654 if test -n "${LDFLAGS}${LIBS}" ; then
7655         for cf_library_path in $LDFLAGS $LIBS
7656         do
7657                 case $cf_library_path in #(vi
7658                 -L*)
7659                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7660
7661 test "$cf_library_path" != "NONE" && \
7662 test -d "$cf_library_path" && \
7663  {
7664         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7665         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7666         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7667         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7668         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7669         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7670 }
7671
7672                         cf_library_path_list="$cf_library_path_list $cf_search"
7673                         ;;
7674                 esac
7675         done
7676 fi
7677
7678 cf_search=
7679
7680 test "/usr" != "$prefix" && \
7681 test -d "/usr" && \
7682 (test $prefix = NONE || test "/usr" != "$prefix") && {
7683         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7684         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7685         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7686         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7687         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7688         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7689 }
7690
7691 test "$prefix" != "NONE" && \
7692 test -d "$prefix" && \
7693  {
7694         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7695         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7696         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7697         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7698         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7699         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7700 }
7701
7702 test "/usr/local" != "$prefix" && \
7703 test -d "/usr/local" && \
7704 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7705         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7706         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7707         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7708         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7709         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7710         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7711 }
7712
7713 test "/opt" != "$prefix" && \
7714 test -d "/opt" && \
7715 (test $prefix = NONE || test "/opt" != "$prefix") && {
7716         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7717         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7718         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7719         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7720         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7721         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7722 }
7723
7724 test "$HOME" != "$prefix" && \
7725 test -d "$HOME" && \
7726 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7727         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7728         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7729         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7730         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7731         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7732         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7733 }
7734
7735 cf_search="$cf_library_path_list $cf_search"
7736
7737         for cf_cv_library_path_utf8 in $cf_search
7738         do
7739           if test -d $cf_cv_library_path_utf8 ; then
7740             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7741
7742 echo "${as_me:-configure}:7742: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7743
7744             CPPFLAGS="$cf_test_CPPFLAGS"
7745             LIBS="-lutf8  $cf_save_LIBS"
7746             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7747             cat >conftest.$ac_ext <<_ACEOF
7748 #line 7748 "configure"
7749 #include "confdefs.h"
7750
7751 #include <libutf8.h>
7752 int
7753 main ()
7754 {
7755 putwc(0,0);
7756   ;
7757   return 0;
7758 }
7759 _ACEOF
7760 rm -f conftest.$ac_objext conftest$ac_exeext
7761 if { (eval echo "$as_me:7761: \"$ac_link\"") >&5
7762   (eval $ac_link) 2>&5
7763   ac_status=$?
7764   echo "$as_me:7764: \$? = $ac_status" >&5
7765   (exit $ac_status); } &&
7766          { ac_try='test -s conftest$ac_exeext'
7767   { (eval echo "$as_me:7767: \"$ac_try\"") >&5
7768   (eval $ac_try) 2>&5
7769   ac_status=$?
7770   echo "$as_me:7770: \$? = $ac_status" >&5
7771   (exit $ac_status); }; }; then
7772
7773                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7774
7775 echo "${as_me:-configure}:7775: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7776
7777                 cf_cv_find_linkage_utf8=yes
7778                 cf_cv_library_file_utf8="-lutf8"
7779                 break
7780 else
7781   echo "$as_me: failed program was:" >&5
7782 cat conftest.$ac_ext >&5
7783
7784                 CPPFLAGS="$cf_save_CPPFLAGS"
7785                 LIBS="$cf_save_LIBS"
7786                 LDFLAGS="$cf_save_LDFLAGS"
7787
7788 fi
7789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7790           fi
7791         done
7792         CPPFLAGS="$cf_save_CPPFLAGS"
7793         LDFLAGS="$cf_save_LDFLAGS"
7794       fi
7795
7796     else
7797       cf_cv_find_linkage_utf8=no
7798     fi
7799
7800 fi
7801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7802
7803 fi
7804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7805
7806 LIBS="$cf_save_LIBS"
7807
7808 if test "$cf_cv_find_linkage_utf8" = yes ; then
7809 cf_cv_utf8_lib=add-on
7810 else
7811 cf_cv_utf8_lib=no
7812 fi
7813
7814 fi
7815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7816 fi
7817 echo "$as_me:7817: result: $cf_cv_utf8_lib" >&5
7818 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7819
7820 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7821 # ncurses/ncursesw:
7822 if test "$cf_cv_utf8_lib" = "add-on" ; then
7823         cat >>confdefs.h <<\EOF
7824 #define HAVE_LIBUTF8_H 1
7825 EOF
7826
7827 if test -n "$cf_cv_header_path_utf8" ; then
7828   for cf_add_incdir in $cf_cv_header_path_utf8
7829   do
7830         while test $cf_add_incdir != /usr/include
7831         do
7832           if test -d $cf_add_incdir
7833           then
7834                 cf_have_incdir=no
7835                 if test -n "$CFLAGS$CPPFLAGS" ; then
7836                   # a loop is needed to ensure we can add subdirs of existing dirs
7837                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7838                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7839                           cf_have_incdir=yes; break
7840                         fi
7841                   done
7842                 fi
7843
7844                 if test "$cf_have_incdir" = no ; then
7845                   if test "$cf_add_incdir" = /usr/local/include ; then
7846                         if test "$GCC" = yes
7847                         then
7848                           cf_save_CPPFLAGS=$CPPFLAGS
7849                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7850                           cat >conftest.$ac_ext <<_ACEOF
7851 #line 7851 "configure"
7852 #include "confdefs.h"
7853 #include <stdio.h>
7854 int
7855 main ()
7856 {
7857 printf("Hello")
7858   ;
7859   return 0;
7860 }
7861 _ACEOF
7862 rm -f conftest.$ac_objext
7863 if { (eval echo "$as_me:7863: \"$ac_compile\"") >&5
7864   (eval $ac_compile) 2>&5
7865   ac_status=$?
7866   echo "$as_me:7866: \$? = $ac_status" >&5
7867   (exit $ac_status); } &&
7868          { ac_try='test -s conftest.$ac_objext'
7869   { (eval echo "$as_me:7869: \"$ac_try\"") >&5
7870   (eval $ac_try) 2>&5
7871   ac_status=$?
7872   echo "$as_me:7872: \$? = $ac_status" >&5
7873   (exit $ac_status); }; }; then
7874   :
7875 else
7876   echo "$as_me: failed program was:" >&5
7877 cat conftest.$ac_ext >&5
7878 cf_have_incdir=yes
7879 fi
7880 rm -f conftest.$ac_objext conftest.$ac_ext
7881                           CPPFLAGS=$cf_save_CPPFLAGS
7882                         fi
7883                   fi
7884                 fi
7885
7886                 if test "$cf_have_incdir" = no ; then
7887                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7888
7889 echo "${as_me:-configure}:7889: testing adding $cf_add_incdir to include-path ..." 1>&5
7890
7891                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7892
7893                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7894                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7895                   cf_add_incdir="$cf_top_incdir"
7896                 else
7897                   break
7898                 fi
7899           fi
7900         done
7901   done
7902 fi
7903
7904 if test -n "$cf_cv_library_path_utf8" ; then
7905   for cf_add_libdir in $cf_cv_library_path_utf8
7906   do
7907     if test $cf_add_libdir = /usr/lib ; then
7908       :
7909     elif test -d $cf_add_libdir
7910     then
7911       cf_have_libdir=no
7912       if test -n "$LDFLAGS$LIBS" ; then
7913         # a loop is needed to ensure we can add subdirs of existing dirs
7914         for cf_test_libdir in $LDFLAGS $LIBS ; do
7915           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7916             cf_have_libdir=yes; break
7917           fi
7918         done
7919       fi
7920       if test "$cf_have_libdir" = no ; then
7921         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7922
7923 echo "${as_me:-configure}:7923: testing adding $cf_add_libdir to library-path ..." 1>&5
7924
7925         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7926       fi
7927     fi
7928   done
7929 fi
7930
7931         LIBS="$cf_cv_library_file_utf8 $LIBS"
7932 fi
7933
7934 cf_ncuconfig_root=ncursesw
7935
7936 echo "Looking for ${cf_ncuconfig_root}-config"
7937 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7938 do
7939   # Extract the first word of "$ac_prog", so it can be a program name with args.
7940 set dummy $ac_prog; ac_word=$2
7941 echo "$as_me:7941: checking for $ac_word" >&5
7942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7943 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
7944   echo $ECHO_N "(cached) $ECHO_C" >&6
7945 else
7946   case $NCURSES_CONFIG in
7947   [\\/]* | ?:[\\/]*)
7948   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
7949   ;;
7950   *)
7951   ac_save_IFS=$IFS; IFS=$ac_path_separator
7952 ac_dummy="$PATH"
7953 for ac_dir in $ac_dummy; do
7954   IFS=$ac_save_IFS
7955   test -z "$ac_dir" && ac_dir=.
7956   if $as_executable_p "$ac_dir/$ac_word"; then
7957    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
7958    echo "$as_me:7958: found $ac_dir/$ac_word" >&5
7959    break
7960 fi
7961 done
7962
7963   ;;
7964 esac
7965 fi
7966 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
7967
7968 if test -n "$NCURSES_CONFIG"; then
7969   echo "$as_me:7969: result: $NCURSES_CONFIG" >&5
7970 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7971 else
7972   echo "$as_me:7972: result: no" >&5
7973 echo "${ECHO_T}no" >&6
7974 fi
7975
7976   test -n "$NCURSES_CONFIG" && break
7977 done
7978 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
7979
7980 if test "$NCURSES_CONFIG" != none ; then
7981
7982 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7983 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
7984
7985 # even with config script, some packages use no-override for curses.h
7986
7987 echo "$as_me:7987: checking if we have identified curses headers" >&5
7988 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7989 if test "${cf_cv_ncurses_header+set}" = set; then
7990   echo $ECHO_N "(cached) $ECHO_C" >&6
7991 else
7992
7993 cf_cv_ncurses_header=none
7994 for cf_header in  \
7995     ncursesw/ncurses.h \
7996         ncursesw/curses.h \
7997         ncurses.h \
7998         curses.h
7999 do
8000 cat >conftest.$ac_ext <<_ACEOF
8001 #line 8001 "configure"
8002 #include "confdefs.h"
8003 #include <${cf_header}>
8004 int
8005 main ()
8006 {
8007 initscr(); tgoto("?", 0,0)
8008   ;
8009   return 0;
8010 }
8011 _ACEOF
8012 rm -f conftest.$ac_objext
8013 if { (eval echo "$as_me:8013: \"$ac_compile\"") >&5
8014   (eval $ac_compile) 2>&5
8015   ac_status=$?
8016   echo "$as_me:8016: \$? = $ac_status" >&5
8017   (exit $ac_status); } &&
8018          { ac_try='test -s conftest.$ac_objext'
8019   { (eval echo "$as_me:8019: \"$ac_try\"") >&5
8020   (eval $ac_try) 2>&5
8021   ac_status=$?
8022   echo "$as_me:8022: \$? = $ac_status" >&5
8023   (exit $ac_status); }; }; then
8024   cf_cv_ncurses_header=$cf_header; break
8025 else
8026   echo "$as_me: failed program was:" >&5
8027 cat conftest.$ac_ext >&5
8028 fi
8029 rm -f conftest.$ac_objext conftest.$ac_ext
8030 done
8031
8032 fi
8033 echo "$as_me:8033: result: $cf_cv_ncurses_header" >&5
8034 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8035
8036 if test "$cf_cv_ncurses_header" = none ; then
8037         { { echo "$as_me:8037: error: No curses header-files found" >&5
8038 echo "$as_me: error: No curses header-files found" >&2;}
8039    { (exit 1); exit 1; }; }
8040 fi
8041
8042 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8043
8044 for ac_header in $cf_cv_ncurses_header
8045 do
8046 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8047 echo "$as_me:8047: checking for $ac_header" >&5
8048 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8049 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8050   echo $ECHO_N "(cached) $ECHO_C" >&6
8051 else
8052   cat >conftest.$ac_ext <<_ACEOF
8053 #line 8053 "configure"
8054 #include "confdefs.h"
8055 #include <$ac_header>
8056 _ACEOF
8057 if { (eval echo "$as_me:8057: \"$ac_cpp conftest.$ac_ext\"") >&5
8058   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8059   ac_status=$?
8060   egrep -v '^ *\+' conftest.er1 >conftest.err
8061   rm -f conftest.er1
8062   cat conftest.err >&5
8063   echo "$as_me:8063: \$? = $ac_status" >&5
8064   (exit $ac_status); } >/dev/null; then
8065   if test -s conftest.err; then
8066     ac_cpp_err=$ac_c_preproc_warn_flag
8067   else
8068     ac_cpp_err=
8069   fi
8070 else
8071   ac_cpp_err=yes
8072 fi
8073 if test -z "$ac_cpp_err"; then
8074   eval "$as_ac_Header=yes"
8075 else
8076   echo "$as_me: failed program was:" >&5
8077   cat conftest.$ac_ext >&5
8078   eval "$as_ac_Header=no"
8079 fi
8080 rm -f conftest.err conftest.$ac_ext
8081 fi
8082 echo "$as_me:8082: result: `eval echo '${'$as_ac_Header'}'`" >&5
8083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8084 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8085   cat >>confdefs.h <<EOF
8086 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8087 EOF
8088
8089 fi
8090 done
8091
8092 cat >>confdefs.h <<\EOF
8093 #define NCURSES 1
8094 EOF
8095
8096 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8097
8098 cat >>confdefs.h <<EOF
8099 #define $cf_nculib_ROOT 1
8100 EOF
8101
8102 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8103
8104 else
8105
8106 cf_ncuhdr_root=ncursesw
8107
8108 test -n "$cf_cv_curses_dir" && \
8109 test "$cf_cv_curses_dir" != "no" && { \
8110
8111 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8112   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8113   do
8114         while test $cf_add_incdir != /usr/include
8115         do
8116           if test -d $cf_add_incdir
8117           then
8118                 cf_have_incdir=no
8119                 if test -n "$CFLAGS$CPPFLAGS" ; then
8120                   # a loop is needed to ensure we can add subdirs of existing dirs
8121                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8122                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8123                           cf_have_incdir=yes; break
8124                         fi
8125                   done
8126                 fi
8127
8128                 if test "$cf_have_incdir" = no ; then
8129                   if test "$cf_add_incdir" = /usr/local/include ; then
8130                         if test "$GCC" = yes
8131                         then
8132                           cf_save_CPPFLAGS=$CPPFLAGS
8133                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8134                           cat >conftest.$ac_ext <<_ACEOF
8135 #line 8135 "configure"
8136 #include "confdefs.h"
8137 #include <stdio.h>
8138 int
8139 main ()
8140 {
8141 printf("Hello")
8142   ;
8143   return 0;
8144 }
8145 _ACEOF
8146 rm -f conftest.$ac_objext
8147 if { (eval echo "$as_me:8147: \"$ac_compile\"") >&5
8148   (eval $ac_compile) 2>&5
8149   ac_status=$?
8150   echo "$as_me:8150: \$? = $ac_status" >&5
8151   (exit $ac_status); } &&
8152          { ac_try='test -s conftest.$ac_objext'
8153   { (eval echo "$as_me:8153: \"$ac_try\"") >&5
8154   (eval $ac_try) 2>&5
8155   ac_status=$?
8156   echo "$as_me:8156: \$? = $ac_status" >&5
8157   (exit $ac_status); }; }; then
8158   :
8159 else
8160   echo "$as_me: failed program was:" >&5
8161 cat conftest.$ac_ext >&5
8162 cf_have_incdir=yes
8163 fi
8164 rm -f conftest.$ac_objext conftest.$ac_ext
8165                           CPPFLAGS=$cf_save_CPPFLAGS
8166                         fi
8167                   fi
8168                 fi
8169
8170                 if test "$cf_have_incdir" = no ; then
8171                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8172
8173 echo "${as_me:-configure}:8173: testing adding $cf_add_incdir to include-path ..." 1>&5
8174
8175                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8176
8177                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8178                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8179                   cf_add_incdir="$cf_top_incdir"
8180                 else
8181                   break
8182                 fi
8183           fi
8184         done
8185   done
8186 fi
8187
8188 }
8189
8190 echo "$as_me:8190: checking for $cf_ncuhdr_root header in include-path" >&5
8191 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8192 if test "${cf_cv_ncurses_h+set}" = set; then
8193   echo $ECHO_N "(cached) $ECHO_C" >&6
8194 else
8195
8196         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8197         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8198         for cf_header in $cf_header_list
8199         do
8200
8201         cat >conftest.$ac_ext <<_ACEOF
8202 #line 8202 "configure"
8203 #include "confdefs.h"
8204
8205 #define _XOPEN_SOURCE_EXTENDED
8206 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
8207 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
8208
8209 #include <$cf_header>
8210 int
8211 main ()
8212 {
8213
8214 #ifdef NCURSES_VERSION
8215
8216 #ifndef WACS_BSSB
8217         make an error
8218 #endif
8219
8220 printf("%s\n", NCURSES_VERSION);
8221 #else
8222 #ifdef __NCURSES_H
8223 printf("old\n");
8224 #else
8225         make an error
8226 #endif
8227 #endif
8228
8229   ;
8230   return 0;
8231 }
8232 _ACEOF
8233 rm -f conftest.$ac_objext
8234 if { (eval echo "$as_me:8234: \"$ac_compile\"") >&5
8235   (eval $ac_compile) 2>&5
8236   ac_status=$?
8237   echo "$as_me:8237: \$? = $ac_status" >&5
8238   (exit $ac_status); } &&
8239          { ac_try='test -s conftest.$ac_objext'
8240   { (eval echo "$as_me:8240: \"$ac_try\"") >&5
8241   (eval $ac_try) 2>&5
8242   ac_status=$?
8243   echo "$as_me:8243: \$? = $ac_status" >&5
8244   (exit $ac_status); }; }; then
8245   cf_cv_ncurses_h=$cf_header
8246
8247 else
8248   echo "$as_me: failed program was:" >&5
8249 cat conftest.$ac_ext >&5
8250 cf_cv_ncurses_h=no
8251 fi
8252 rm -f conftest.$ac_objext conftest.$ac_ext
8253
8254                 test "$cf_cv_ncurses_h" != no && break
8255         done
8256
8257 fi
8258 echo "$as_me:8258: result: $cf_cv_ncurses_h" >&5
8259 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8260
8261 if test "$cf_cv_ncurses_h" != no ; then
8262         cf_cv_ncurses_header=$cf_cv_ncurses_h
8263 else
8264
8265 echo "$as_me:8265: checking for $cf_ncuhdr_root include-path" >&5
8266 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8267 if test "${cf_cv_ncurses_h2+set}" = set; then
8268   echo $ECHO_N "(cached) $ECHO_C" >&6
8269 else
8270
8271         test -n "$verbose" && echo
8272
8273 cf_search=
8274
8275 # collect the current set of include-directories from compiler flags
8276 cf_header_path_list=""
8277 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8278         for cf_header_path in $CPPFLAGS $CFLAGS
8279         do
8280                 case $cf_header_path in #(vi
8281                 -I*)
8282                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8283
8284 test "$cf_header_path" != "NONE" && \
8285 test -d "$cf_header_path" && \
8286  {
8287         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8288         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8289         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8290         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8291         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8292         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"
8293 }
8294
8295                         cf_header_path_list="$cf_header_path_list $cf_search"
8296                         ;;
8297                 esac
8298         done
8299 fi
8300
8301 # add the variations for the package we are looking for
8302
8303 cf_search=
8304
8305 test "/usr" != "$prefix" && \
8306 test -d "/usr" && \
8307 (test $prefix = NONE || test "/usr" != "$prefix") && {
8308         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8309         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8310         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8311         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8312         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8313         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8314 }
8315
8316 test "$prefix" != "NONE" && \
8317 test -d "$prefix" && \
8318  {
8319         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8320         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8321         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8322         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8323         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8324         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8325 }
8326
8327 test "/usr/local" != "$prefix" && \
8328 test -d "/usr/local" && \
8329 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8330         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8331         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8332         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8333         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8334         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8335         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8336 }
8337
8338 test "/opt" != "$prefix" && \
8339 test -d "/opt" && \
8340 (test $prefix = NONE || test "/opt" != "$prefix") && {
8341         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8342         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8343         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8344         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8345         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8346         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8347 }
8348
8349 test "$HOME" != "$prefix" && \
8350 test -d "$HOME" && \
8351 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8352         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8353         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8354         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8355         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8356         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8357         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8358 }
8359
8360 test "$includedir" != NONE && \
8361 test "$includedir" != "/usr/include" && \
8362 test -d "$includedir" && {
8363         test -d $includedir &&    cf_search="$cf_search $includedir"
8364         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8365 }
8366
8367 test "$oldincludedir" != NONE && \
8368 test "$oldincludedir" != "/usr/include" && \
8369 test -d "$oldincludedir" && {
8370         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8371         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8372 }
8373
8374 cf_search="$cf_search $cf_header_path_list"
8375
8376         test -n "$verbose" && echo search path $cf_search
8377         cf_save2_CPPFLAGS="$CPPFLAGS"
8378         for cf_incdir in $cf_search
8379         do
8380
8381 if test -n "$cf_incdir" ; then
8382   for cf_add_incdir in $cf_incdir
8383   do
8384         while test $cf_add_incdir != /usr/include
8385         do
8386           if test -d $cf_add_incdir
8387           then
8388                 cf_have_incdir=no
8389                 if test -n "$CFLAGS$CPPFLAGS" ; then
8390                   # a loop is needed to ensure we can add subdirs of existing dirs
8391                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8392                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8393                           cf_have_incdir=yes; break
8394                         fi
8395                   done
8396                 fi
8397
8398                 if test "$cf_have_incdir" = no ; then
8399                   if test "$cf_add_incdir" = /usr/local/include ; then
8400                         if test "$GCC" = yes
8401                         then
8402                           cf_save_CPPFLAGS=$CPPFLAGS
8403                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8404                           cat >conftest.$ac_ext <<_ACEOF
8405 #line 8405 "configure"
8406 #include "confdefs.h"
8407 #include <stdio.h>
8408 int
8409 main ()
8410 {
8411 printf("Hello")
8412   ;
8413   return 0;
8414 }
8415 _ACEOF
8416 rm -f conftest.$ac_objext
8417 if { (eval echo "$as_me:8417: \"$ac_compile\"") >&5
8418   (eval $ac_compile) 2>&5
8419   ac_status=$?
8420   echo "$as_me:8420: \$? = $ac_status" >&5
8421   (exit $ac_status); } &&
8422          { ac_try='test -s conftest.$ac_objext'
8423   { (eval echo "$as_me:8423: \"$ac_try\"") >&5
8424   (eval $ac_try) 2>&5
8425   ac_status=$?
8426   echo "$as_me:8426: \$? = $ac_status" >&5
8427   (exit $ac_status); }; }; then
8428   :
8429 else
8430   echo "$as_me: failed program was:" >&5
8431 cat conftest.$ac_ext >&5
8432 cf_have_incdir=yes
8433 fi
8434 rm -f conftest.$ac_objext conftest.$ac_ext
8435                           CPPFLAGS=$cf_save_CPPFLAGS
8436                         fi
8437                   fi
8438                 fi
8439
8440                 if test "$cf_have_incdir" = no ; then
8441                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8442
8443 echo "${as_me:-configure}:8443: testing adding $cf_add_incdir to include-path ..." 1>&5
8444
8445                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8446
8447                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8448                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8449                   cf_add_incdir="$cf_top_incdir"
8450                 else
8451                   break
8452                 fi
8453           fi
8454         done
8455   done
8456 fi
8457
8458                 for cf_header in \
8459                         ncurses.h \
8460                         curses.h
8461                 do
8462
8463         cat >conftest.$ac_ext <<_ACEOF
8464 #line 8464 "configure"
8465 #include "confdefs.h"
8466
8467 #include <$cf_header>
8468 int
8469 main ()
8470 {
8471
8472 #ifdef NCURSES_VERSION
8473
8474 printf("%s\n", NCURSES_VERSION);
8475 #else
8476 #ifdef __NCURSES_H
8477 printf("old\n");
8478 #else
8479         make an error
8480 #endif
8481 #endif
8482
8483   ;
8484   return 0;
8485 }
8486 _ACEOF
8487 rm -f conftest.$ac_objext
8488 if { (eval echo "$as_me:8488: \"$ac_compile\"") >&5
8489   (eval $ac_compile) 2>&5
8490   ac_status=$?
8491   echo "$as_me:8491: \$? = $ac_status" >&5
8492   (exit $ac_status); } &&
8493          { ac_try='test -s conftest.$ac_objext'
8494   { (eval echo "$as_me:8494: \"$ac_try\"") >&5
8495   (eval $ac_try) 2>&5
8496   ac_status=$?
8497   echo "$as_me:8497: \$? = $ac_status" >&5
8498   (exit $ac_status); }; }; then
8499   cf_cv_ncurses_h2=$cf_header
8500
8501 else
8502   echo "$as_me: failed program was:" >&5
8503 cat conftest.$ac_ext >&5
8504 cf_cv_ncurses_h2=no
8505 fi
8506 rm -f conftest.$ac_objext conftest.$ac_ext
8507
8508                         if test "$cf_cv_ncurses_h2" != no ; then
8509                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8510                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
8511                                 break
8512                         fi
8513                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
8514                 done
8515                 CPPFLAGS="$cf_save2_CPPFLAGS"
8516                 test "$cf_cv_ncurses_h2" != no && break
8517         done
8518         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8518: error: not found" >&5
8519 echo "$as_me: error: not found" >&2;}
8520    { (exit 1); exit 1; }; }
8521
8522 fi
8523 echo "$as_me:8523: result: $cf_cv_ncurses_h2" >&5
8524 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8525
8526         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8527         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8528         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8529                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8530         fi
8531
8532 if test -n "$cf_1st_incdir" ; then
8533   for cf_add_incdir in $cf_1st_incdir
8534   do
8535         while test $cf_add_incdir != /usr/include
8536         do
8537           if test -d $cf_add_incdir
8538           then
8539                 cf_have_incdir=no
8540                 if test -n "$CFLAGS$CPPFLAGS" ; then
8541                   # a loop is needed to ensure we can add subdirs of existing dirs
8542                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8543                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8544                           cf_have_incdir=yes; break
8545                         fi
8546                   done
8547                 fi
8548
8549                 if test "$cf_have_incdir" = no ; then
8550                   if test "$cf_add_incdir" = /usr/local/include ; then
8551                         if test "$GCC" = yes
8552                         then
8553                           cf_save_CPPFLAGS=$CPPFLAGS
8554                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8555                           cat >conftest.$ac_ext <<_ACEOF
8556 #line 8556 "configure"
8557 #include "confdefs.h"
8558 #include <stdio.h>
8559 int
8560 main ()
8561 {
8562 printf("Hello")
8563   ;
8564   return 0;
8565 }
8566 _ACEOF
8567 rm -f conftest.$ac_objext
8568 if { (eval echo "$as_me:8568: \"$ac_compile\"") >&5
8569   (eval $ac_compile) 2>&5
8570   ac_status=$?
8571   echo "$as_me:8571: \$? = $ac_status" >&5
8572   (exit $ac_status); } &&
8573          { ac_try='test -s conftest.$ac_objext'
8574   { (eval echo "$as_me:8574: \"$ac_try\"") >&5
8575   (eval $ac_try) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); }; }; then
8579   :
8580 else
8581   echo "$as_me: failed program was:" >&5
8582 cat conftest.$ac_ext >&5
8583 cf_have_incdir=yes
8584 fi
8585 rm -f conftest.$ac_objext conftest.$ac_ext
8586                           CPPFLAGS=$cf_save_CPPFLAGS
8587                         fi
8588                   fi
8589                 fi
8590
8591                 if test "$cf_have_incdir" = no ; then
8592                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8593
8594 echo "${as_me:-configure}:8594: testing adding $cf_add_incdir to include-path ..." 1>&5
8595
8596                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8597
8598                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8599                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8600                   cf_add_incdir="$cf_top_incdir"
8601                 else
8602                   break
8603                 fi
8604           fi
8605         done
8606   done
8607 fi
8608
8609 fi
8610
8611 # Set definitions to allow ifdef'ing for ncurses.h
8612
8613 case $cf_cv_ncurses_header in # (vi
8614 *ncurses.h)
8615         cat >>confdefs.h <<\EOF
8616 #define HAVE_NCURSES_H 1
8617 EOF
8618
8619         ;;
8620 esac
8621
8622 case $cf_cv_ncurses_header in # (vi
8623 ncurses/curses.h|ncurses/ncurses.h)
8624         cat >>confdefs.h <<\EOF
8625 #define HAVE_NCURSES_NCURSES_H 1
8626 EOF
8627
8628         ;;
8629 ncursesw/curses.h|ncursesw/ncurses.h)
8630         cat >>confdefs.h <<\EOF
8631 #define HAVE_NCURSESW_NCURSES_H 1
8632 EOF
8633
8634         ;;
8635 esac
8636
8637 echo "$as_me:8637: checking for terminfo header" >&5
8638 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8639 if test "${cf_cv_term_header+set}" = set; then
8640   echo $ECHO_N "(cached) $ECHO_C" >&6
8641 else
8642
8643 case ${cf_cv_ncurses_header} in #(vi
8644 */ncurses.h|*/ncursesw.h) #(vi
8645         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8646         ;;
8647 *)
8648         cf_term_header=term.h
8649         ;;
8650 esac
8651
8652 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8653 do
8654 cat >conftest.$ac_ext <<_ACEOF
8655 #line 8655 "configure"
8656 #include "confdefs.h"
8657 #include <stdio.h>
8658 #include <${cf_cv_ncurses_header:-curses.h}>
8659 #include <$cf_test>
8660
8661 int
8662 main ()
8663 {
8664 int x = auto_left_margin
8665   ;
8666   return 0;
8667 }
8668 _ACEOF
8669 rm -f conftest.$ac_objext
8670 if { (eval echo "$as_me:8670: \"$ac_compile\"") >&5
8671   (eval $ac_compile) 2>&5
8672   ac_status=$?
8673   echo "$as_me:8673: \$? = $ac_status" >&5
8674   (exit $ac_status); } &&
8675          { ac_try='test -s conftest.$ac_objext'
8676   { (eval echo "$as_me:8676: \"$ac_try\"") >&5
8677   (eval $ac_try) 2>&5
8678   ac_status=$?
8679   echo "$as_me:8679: \$? = $ac_status" >&5
8680   (exit $ac_status); }; }; then
8681
8682         cf_cv_term_header="$cf_test"
8683 else
8684   echo "$as_me: failed program was:" >&5
8685 cat conftest.$ac_ext >&5
8686
8687         cf_cv_term_header=unknown
8688
8689 fi
8690 rm -f conftest.$ac_objext conftest.$ac_ext
8691         test "$cf_cv_term_header" != unknown && break
8692 done
8693
8694 fi
8695 echo "$as_me:8695: result: $cf_cv_term_header" >&5
8696 echo "${ECHO_T}$cf_cv_term_header" >&6
8697
8698 # Set definitions to allow ifdef'ing to accommodate subdirectories
8699
8700 case $cf_cv_term_header in # (vi
8701 *term.h)
8702         cat >>confdefs.h <<\EOF
8703 #define HAVE_TERM_H 1
8704 EOF
8705
8706         ;;
8707 esac
8708
8709 case $cf_cv_term_header in # (vi
8710 ncurses/term.h) #(vi
8711         cat >>confdefs.h <<\EOF
8712 #define HAVE_NCURSES_TERM_H 1
8713 EOF
8714
8715         ;;
8716 ncursesw/term.h)
8717         cat >>confdefs.h <<\EOF
8718 #define HAVE_NCURSESW_TERM_H 1
8719 EOF
8720
8721         ;;
8722 esac
8723
8724 # some applications need this, but should check for NCURSES_VERSION
8725 cat >>confdefs.h <<\EOF
8726 #define NCURSES 1
8727 EOF
8728
8729 echo "$as_me:8729: checking for ncurses version" >&5
8730 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8731 if test "${cf_cv_ncurses_version+set}" = set; then
8732   echo $ECHO_N "(cached) $ECHO_C" >&6
8733 else
8734
8735         cf_cv_ncurses_version=no
8736         cf_tempfile=out$$
8737         rm -f $cf_tempfile
8738         if test "$cross_compiling" = yes; then
8739
8740         # This will not work if the preprocessor splits the line after the
8741         # Autoconf token.  The 'unproto' program does that.
8742         cat > conftest.$ac_ext <<EOF
8743 #include <${cf_cv_ncurses_header:-curses.h}>
8744 #undef Autoconf
8745 #ifdef NCURSES_VERSION
8746 Autoconf NCURSES_VERSION
8747 #else
8748 #ifdef __NCURSES_H
8749 Autoconf "old"
8750 #endif
8751 ;
8752 #endif
8753 EOF
8754         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8755         { (eval echo "$as_me:8755: \"$cf_try\"") >&5
8756   (eval $cf_try) 2>&5
8757   ac_status=$?
8758   echo "$as_me:8758: \$? = $ac_status" >&5
8759   (exit $ac_status); }
8760         if test -f conftest.out ; then
8761                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8762                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8763                 rm -f conftest.out
8764         fi
8765
8766 else
8767   cat >conftest.$ac_ext <<_ACEOF
8768 #line 8768 "configure"
8769 #include "confdefs.h"
8770
8771 #include <${cf_cv_ncurses_header:-curses.h}>
8772 #include <stdio.h>
8773 int main()
8774 {
8775         FILE *fp = fopen("$cf_tempfile", "w");
8776 #ifdef NCURSES_VERSION
8777 # ifdef NCURSES_VERSION_PATCH
8778         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8779 # else
8780         fprintf(fp, "%s\n", NCURSES_VERSION);
8781 # endif
8782 #else
8783 # ifdef __NCURSES_H
8784         fprintf(fp, "old\n");
8785 # else
8786         make an error
8787 # endif
8788 #endif
8789         ${cf_cv_main_return:-return}(0);
8790 }
8791 _ACEOF
8792 rm -f conftest$ac_exeext
8793 if { (eval echo "$as_me:8793: \"$ac_link\"") >&5
8794   (eval $ac_link) 2>&5
8795   ac_status=$?
8796   echo "$as_me:8796: \$? = $ac_status" >&5
8797   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8798   { (eval echo "$as_me:8798: \"$ac_try\"") >&5
8799   (eval $ac_try) 2>&5
8800   ac_status=$?
8801   echo "$as_me:8801: \$? = $ac_status" >&5
8802   (exit $ac_status); }; }; then
8803
8804         cf_cv_ncurses_version=`cat $cf_tempfile`
8805 else
8806   echo "$as_me: program exited with status $ac_status" >&5
8807 echo "$as_me: failed program was:" >&5
8808 cat conftest.$ac_ext >&5
8809 fi
8810 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8811 fi
8812         rm -f $cf_tempfile
8813
8814 fi
8815 echo "$as_me:8815: result: $cf_cv_ncurses_version" >&5
8816 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8817 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
8818 #define NCURSES 1
8819 EOF
8820
8821 cf_nculib_root=ncursesw
8822         # This works, except for the special case where we find gpm, but
8823         # ncurses is in a nonstandard location via $LIBS, and we really want
8824         # to link gpm.
8825 cf_ncurses_LIBS=""
8826 cf_ncurses_SAVE="$LIBS"
8827 echo "$as_me:8827: checking for Gpm_Open in -lgpm" >&5
8828 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8829 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8830   echo $ECHO_N "(cached) $ECHO_C" >&6
8831 else
8832   ac_check_lib_save_LIBS=$LIBS
8833 LIBS="-lgpm  $LIBS"
8834 cat >conftest.$ac_ext <<_ACEOF
8835 #line 8835 "configure"
8836 #include "confdefs.h"
8837
8838 /* Override any gcc2 internal prototype to avoid an error.  */
8839 #ifdef __cplusplus
8840 extern "C"
8841 #endif
8842 /* We use char because int might match the return type of a gcc2
8843    builtin and then its argument prototype would still apply.  */
8844 char Gpm_Open ();
8845 int
8846 main ()
8847 {
8848 Gpm_Open ();
8849   ;
8850   return 0;
8851 }
8852 _ACEOF
8853 rm -f conftest.$ac_objext conftest$ac_exeext
8854 if { (eval echo "$as_me:8854: \"$ac_link\"") >&5
8855   (eval $ac_link) 2>&5
8856   ac_status=$?
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   (exit $ac_status); } &&
8859          { ac_try='test -s conftest$ac_exeext'
8860   { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861   (eval $ac_try) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); }; }; then
8865   ac_cv_lib_gpm_Gpm_Open=yes
8866 else
8867   echo "$as_me: failed program was:" >&5
8868 cat conftest.$ac_ext >&5
8869 ac_cv_lib_gpm_Gpm_Open=no
8870 fi
8871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8872 LIBS=$ac_check_lib_save_LIBS
8873 fi
8874 echo "$as_me:8874: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8875 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8876 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8877   echo "$as_me:8877: checking for initscr in -lgpm" >&5
8878 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8879 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8880   echo $ECHO_N "(cached) $ECHO_C" >&6
8881 else
8882   ac_check_lib_save_LIBS=$LIBS
8883 LIBS="-lgpm  $LIBS"
8884 cat >conftest.$ac_ext <<_ACEOF
8885 #line 8885 "configure"
8886 #include "confdefs.h"
8887
8888 /* Override any gcc2 internal prototype to avoid an error.  */
8889 #ifdef __cplusplus
8890 extern "C"
8891 #endif
8892 /* We use char because int might match the return type of a gcc2
8893    builtin and then its argument prototype would still apply.  */
8894 char initscr ();
8895 int
8896 main ()
8897 {
8898 initscr ();
8899   ;
8900   return 0;
8901 }
8902 _ACEOF
8903 rm -f conftest.$ac_objext conftest$ac_exeext
8904 if { (eval echo "$as_me:8904: \"$ac_link\"") >&5
8905   (eval $ac_link) 2>&5
8906   ac_status=$?
8907   echo "$as_me:8907: \$? = $ac_status" >&5
8908   (exit $ac_status); } &&
8909          { ac_try='test -s conftest$ac_exeext'
8910   { (eval echo "$as_me:8910: \"$ac_try\"") >&5
8911   (eval $ac_try) 2>&5
8912   ac_status=$?
8913   echo "$as_me:8913: \$? = $ac_status" >&5
8914   (exit $ac_status); }; }; then
8915   ac_cv_lib_gpm_initscr=yes
8916 else
8917   echo "$as_me: failed program was:" >&5
8918 cat conftest.$ac_ext >&5
8919 ac_cv_lib_gpm_initscr=no
8920 fi
8921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8922 LIBS=$ac_check_lib_save_LIBS
8923 fi
8924 echo "$as_me:8924: result: $ac_cv_lib_gpm_initscr" >&5
8925 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8926 if test $ac_cv_lib_gpm_initscr = yes; then
8927   LIBS="$cf_ncurses_SAVE"
8928 else
8929   cf_ncurses_LIBS="-lgpm"
8930 fi
8931
8932 fi
8933
8934 case $host_os in #(vi
8935 freebsd*)
8936         # This is only necessary if you are linking against an obsolete
8937         # version of ncurses (but it should do no harm, since it's static).
8938         if test "$cf_nculib_root" = ncurses ; then
8939                 echo "$as_me:8939: checking for tgoto in -lmytinfo" >&5
8940 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8941 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8942   echo $ECHO_N "(cached) $ECHO_C" >&6
8943 else
8944   ac_check_lib_save_LIBS=$LIBS
8945 LIBS="-lmytinfo  $LIBS"
8946 cat >conftest.$ac_ext <<_ACEOF
8947 #line 8947 "configure"
8948 #include "confdefs.h"
8949
8950 /* Override any gcc2 internal prototype to avoid an error.  */
8951 #ifdef __cplusplus
8952 extern "C"
8953 #endif
8954 /* We use char because int might match the return type of a gcc2
8955    builtin and then its argument prototype would still apply.  */
8956 char tgoto ();
8957 int
8958 main ()
8959 {
8960 tgoto ();
8961   ;
8962   return 0;
8963 }
8964 _ACEOF
8965 rm -f conftest.$ac_objext conftest$ac_exeext
8966 if { (eval echo "$as_me:8966: \"$ac_link\"") >&5
8967   (eval $ac_link) 2>&5
8968   ac_status=$?
8969   echo "$as_me:8969: \$? = $ac_status" >&5
8970   (exit $ac_status); } &&
8971          { ac_try='test -s conftest$ac_exeext'
8972   { (eval echo "$as_me:8972: \"$ac_try\"") >&5
8973   (eval $ac_try) 2>&5
8974   ac_status=$?
8975   echo "$as_me:8975: \$? = $ac_status" >&5
8976   (exit $ac_status); }; }; then
8977   ac_cv_lib_mytinfo_tgoto=yes
8978 else
8979   echo "$as_me: failed program was:" >&5
8980 cat conftest.$ac_ext >&5
8981 ac_cv_lib_mytinfo_tgoto=no
8982 fi
8983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8984 LIBS=$ac_check_lib_save_LIBS
8985 fi
8986 echo "$as_me:8986: result: $ac_cv_lib_mytinfo_tgoto" >&5
8987 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8988 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8989   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8990 fi
8991
8992         fi
8993         ;;
8994 esac
8995
8996 LIBS="$cf_ncurses_LIBS $LIBS"
8997
8998 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8999 then
9000         LIBS="-l$cf_nculib_root $LIBS"
9001 else
9002
9003         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9004         cf_libdir=""
9005         echo "$as_me:9005: checking for initscr" >&5
9006 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9007 if test "${ac_cv_func_initscr+set}" = set; then
9008   echo $ECHO_N "(cached) $ECHO_C" >&6
9009 else
9010   cat >conftest.$ac_ext <<_ACEOF
9011 #line 9011 "configure"
9012 #include "confdefs.h"
9013 /* System header to define __stub macros and hopefully few prototypes,
9014     which can conflict with char initscr (); below.  */
9015 #include <assert.h>
9016 /* Override any gcc2 internal prototype to avoid an error.  */
9017 #ifdef __cplusplus
9018 extern "C"
9019 #endif
9020 /* We use char because int might match the return type of a gcc2
9021    builtin and then its argument prototype would still apply.  */
9022 char initscr ();
9023 char (*f) ();
9024
9025 int
9026 main ()
9027 {
9028 /* The GNU C library defines this for functions which it implements
9029     to always fail with ENOSYS.  Some functions are actually named
9030     something starting with __ and the normal name is an alias.  */
9031 #if defined (__stub_initscr) || defined (__stub___initscr)
9032 choke me
9033 #else
9034 f = initscr;
9035 #endif
9036
9037   ;
9038   return 0;
9039 }
9040 _ACEOF
9041 rm -f conftest.$ac_objext conftest$ac_exeext
9042 if { (eval echo "$as_me:9042: \"$ac_link\"") >&5
9043   (eval $ac_link) 2>&5
9044   ac_status=$?
9045   echo "$as_me:9045: \$? = $ac_status" >&5
9046   (exit $ac_status); } &&
9047          { ac_try='test -s conftest$ac_exeext'
9048   { (eval echo "$as_me:9048: \"$ac_try\"") >&5
9049   (eval $ac_try) 2>&5
9050   ac_status=$?
9051   echo "$as_me:9051: \$? = $ac_status" >&5
9052   (exit $ac_status); }; }; then
9053   ac_cv_func_initscr=yes
9054 else
9055   echo "$as_me: failed program was:" >&5
9056 cat conftest.$ac_ext >&5
9057 ac_cv_func_initscr=no
9058 fi
9059 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9060 fi
9061 echo "$as_me:9061: result: $ac_cv_func_initscr" >&5
9062 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9063 if test $ac_cv_func_initscr = yes; then
9064   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9065 else
9066
9067                 cf_save_LIBS="$LIBS"
9068                 echo "$as_me:9068: checking for initscr in -l$cf_nculib_root" >&5
9069 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9070                 LIBS="-l$cf_nculib_root $LIBS"
9071                 cat >conftest.$ac_ext <<_ACEOF
9072 #line 9072 "configure"
9073 #include "confdefs.h"
9074 #include <${cf_cv_ncurses_header:-curses.h}>
9075 int
9076 main ()
9077 {
9078 initscr()
9079   ;
9080   return 0;
9081 }
9082 _ACEOF
9083 rm -f conftest.$ac_objext conftest$ac_exeext
9084 if { (eval echo "$as_me:9084: \"$ac_link\"") >&5
9085   (eval $ac_link) 2>&5
9086   ac_status=$?
9087   echo "$as_me:9087: \$? = $ac_status" >&5
9088   (exit $ac_status); } &&
9089          { ac_try='test -s conftest$ac_exeext'
9090   { (eval echo "$as_me:9090: \"$ac_try\"") >&5
9091   (eval $ac_try) 2>&5
9092   ac_status=$?
9093   echo "$as_me:9093: \$? = $ac_status" >&5
9094   (exit $ac_status); }; }; then
9095   echo "$as_me:9095: result: yes" >&5
9096 echo "${ECHO_T}yes" >&6
9097                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9098
9099 else
9100   echo "$as_me: failed program was:" >&5
9101 cat conftest.$ac_ext >&5
9102 echo "$as_me:9102: result: no" >&5
9103 echo "${ECHO_T}no" >&6
9104
9105 cf_search=
9106 cf_library_path_list=""
9107 if test -n "${LDFLAGS}${LIBS}" ; then
9108         for cf_library_path in $LDFLAGS $LIBS
9109         do
9110                 case $cf_library_path in #(vi
9111                 -L*)
9112                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9113
9114 test "$cf_library_path" != "NONE" && \
9115 test -d "$cf_library_path" && \
9116  {
9117         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9118         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9119         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9120         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9121         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9122         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"
9123 }
9124
9125                         cf_library_path_list="$cf_library_path_list $cf_search"
9126                         ;;
9127                 esac
9128         done
9129 fi
9130
9131 cf_search=
9132
9133 test "/usr" != "$prefix" && \
9134 test -d "/usr" && \
9135 (test $prefix = NONE || test "/usr" != "$prefix") && {
9136         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9137         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9138         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
9139         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9140         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
9141         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9142 }
9143
9144 test "$prefix" != "NONE" && \
9145 test -d "$prefix" && \
9146  {
9147         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9148         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9149         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9150         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9151         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9152         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9153 }
9154
9155 test "/usr/local" != "$prefix" && \
9156 test -d "/usr/local" && \
9157 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9158         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9159         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9160         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9161         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9162         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9163         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9164 }
9165
9166 test "/opt" != "$prefix" && \
9167 test -d "/opt" && \
9168 (test $prefix = NONE || test "/opt" != "$prefix") && {
9169         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9170         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9171         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
9172         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9173         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
9174         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9175 }
9176
9177 test "$HOME" != "$prefix" && \
9178 test -d "$HOME" && \
9179 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9180         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9181         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9182         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9183         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9184         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9185         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9186 }
9187
9188 cf_search="$cf_library_path_list $cf_search"
9189
9190                         for cf_libdir in $cf_search
9191                         do
9192                                 echo "$as_me:9192: checking for -l$cf_nculib_root in $cf_libdir" >&5
9193 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9194                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9195                                 cat >conftest.$ac_ext <<_ACEOF
9196 #line 9196 "configure"
9197 #include "confdefs.h"
9198 #include <${cf_cv_ncurses_header:-curses.h}>
9199 int
9200 main ()
9201 {
9202 initscr()
9203   ;
9204   return 0;
9205 }
9206 _ACEOF
9207 rm -f conftest.$ac_objext conftest$ac_exeext
9208 if { (eval echo "$as_me:9208: \"$ac_link\"") >&5
9209   (eval $ac_link) 2>&5
9210   ac_status=$?
9211   echo "$as_me:9211: \$? = $ac_status" >&5
9212   (exit $ac_status); } &&
9213          { ac_try='test -s conftest$ac_exeext'
9214   { (eval echo "$as_me:9214: \"$ac_try\"") >&5
9215   (eval $ac_try) 2>&5
9216   ac_status=$?
9217   echo "$as_me:9217: \$? = $ac_status" >&5
9218   (exit $ac_status); }; }; then
9219   echo "$as_me:9219: result: yes" >&5
9220 echo "${ECHO_T}yes" >&6
9221                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9222                                          break
9223 else
9224   echo "$as_me: failed program was:" >&5
9225 cat conftest.$ac_ext >&5
9226 echo "$as_me:9226: result: no" >&5
9227 echo "${ECHO_T}no" >&6
9228                                          LIBS="$cf_save_LIBS"
9229 fi
9230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9231                         done
9232
9233 fi
9234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9235
9236 fi
9237
9238 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9239
9240 if test $cf_found_library = no ; then
9241         { { echo "$as_me:9241: error: Cannot link $cf_nculib_root library" >&5
9242 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9243    { (exit 1); exit 1; }; }
9244 fi
9245
9246 fi
9247
9248 if test -n "$cf_ncurses_LIBS" ; then
9249         echo "$as_me:9249: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9250 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9251         cf_ncurses_SAVE="$LIBS"
9252         for p in $cf_ncurses_LIBS ; do
9253                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9254                 if test "$q" != "$LIBS" ; then
9255                         LIBS="$q"
9256                 fi
9257         done
9258         cat >conftest.$ac_ext <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261 #include <${cf_cv_ncurses_header:-curses.h}>
9262 int
9263 main ()
9264 {
9265 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9266   ;
9267   return 0;
9268 }
9269 _ACEOF
9270 rm -f conftest.$ac_objext conftest$ac_exeext
9271 if { (eval echo "$as_me:9271: \"$ac_link\"") >&5
9272   (eval $ac_link) 2>&5
9273   ac_status=$?
9274   echo "$as_me:9274: \$? = $ac_status" >&5
9275   (exit $ac_status); } &&
9276          { ac_try='test -s conftest$ac_exeext'
9277   { (eval echo "$as_me:9277: \"$ac_try\"") >&5
9278   (eval $ac_try) 2>&5
9279   ac_status=$?
9280   echo "$as_me:9280: \$? = $ac_status" >&5
9281   (exit $ac_status); }; }; then
9282   echo "$as_me:9282: result: yes" >&5
9283 echo "${ECHO_T}yes" >&6
9284 else
9285   echo "$as_me: failed program was:" >&5
9286 cat conftest.$ac_ext >&5
9287 echo "$as_me:9287: result: no" >&5
9288 echo "${ECHO_T}no" >&6
9289                  LIBS="$cf_ncurses_SAVE"
9290 fi
9291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9292 fi
9293
9294 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9295
9296 cat >>confdefs.h <<EOF
9297 #define $cf_nculib_ROOT 1
9298 EOF
9299
9300 fi
9301
9302         ;;
9303 pdcurses) #(vi
9304
9305 echo "$as_me:9305: checking if you want to use pkg-config" >&5
9306 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9307
9308 # Check whether --with-pkg-config or --without-pkg-config was given.
9309 if test "${with_pkg_config+set}" = set; then
9310   withval="$with_pkg_config"
9311   cf_pkg_config=$withval
9312 else
9313   cf_pkg_config=yes
9314 fi;
9315 echo "$as_me:9315: result: $cf_pkg_config" >&5
9316 echo "${ECHO_T}$cf_pkg_config" >&6
9317
9318 case $cf_pkg_config in #(vi
9319 no) #(vi
9320         PKG_CONFIG=none
9321         ;;
9322 yes) #(vi
9323
9324 if test -n "$ac_tool_prefix"; then
9325   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9326 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9327 echo "$as_me:9327: checking for $ac_word" >&5
9328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9329 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9330   echo $ECHO_N "(cached) $ECHO_C" >&6
9331 else
9332   case $PKG_CONFIG in
9333   [\\/]* | ?:[\\/]*)
9334   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9335   ;;
9336   *)
9337   ac_save_IFS=$IFS; IFS=$ac_path_separator
9338 ac_dummy="$PATH"
9339 for ac_dir in $ac_dummy; do
9340   IFS=$ac_save_IFS
9341   test -z "$ac_dir" && ac_dir=.
9342   if $as_executable_p "$ac_dir/$ac_word"; then
9343    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9344    echo "$as_me:9344: found $ac_dir/$ac_word" >&5
9345    break
9346 fi
9347 done
9348
9349   ;;
9350 esac
9351 fi
9352 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9353
9354 if test -n "$PKG_CONFIG"; then
9355   echo "$as_me:9355: result: $PKG_CONFIG" >&5
9356 echo "${ECHO_T}$PKG_CONFIG" >&6
9357 else
9358   echo "$as_me:9358: result: no" >&5
9359 echo "${ECHO_T}no" >&6
9360 fi
9361
9362 fi
9363 if test -z "$ac_cv_path_PKG_CONFIG"; then
9364   ac_pt_PKG_CONFIG=$PKG_CONFIG
9365   # Extract the first word of "pkg-config", so it can be a program name with args.
9366 set dummy pkg-config; ac_word=$2
9367 echo "$as_me:9367: checking for $ac_word" >&5
9368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9369 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9370   echo $ECHO_N "(cached) $ECHO_C" >&6
9371 else
9372   case $ac_pt_PKG_CONFIG in
9373   [\\/]* | ?:[\\/]*)
9374   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9375   ;;
9376   *)
9377   ac_save_IFS=$IFS; IFS=$ac_path_separator
9378 ac_dummy="$PATH"
9379 for ac_dir in $ac_dummy; do
9380   IFS=$ac_save_IFS
9381   test -z "$ac_dir" && ac_dir=.
9382   if $as_executable_p "$ac_dir/$ac_word"; then
9383    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9384    echo "$as_me:9384: found $ac_dir/$ac_word" >&5
9385    break
9386 fi
9387 done
9388
9389   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9390   ;;
9391 esac
9392 fi
9393 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9394
9395 if test -n "$ac_pt_PKG_CONFIG"; then
9396   echo "$as_me:9396: result: $ac_pt_PKG_CONFIG" >&5
9397 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9398 else
9399   echo "$as_me:9399: result: no" >&5
9400 echo "${ECHO_T}no" >&6
9401 fi
9402
9403   PKG_CONFIG=$ac_pt_PKG_CONFIG
9404 else
9405   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9406 fi
9407
9408         ;;
9409 *)
9410         PKG_CONFIG=$withval
9411         ;;
9412 esac
9413
9414 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9415 if test "$PKG_CONFIG" != none ; then
9416
9417 if test "x$prefix" != xNONE; then
9418   cf_path_syntax="$prefix"
9419 else
9420   cf_path_syntax="$ac_default_prefix"
9421 fi
9422
9423 case ".$PKG_CONFIG" in #(vi
9424 .\$\(*\)*|.\'*\'*) #(vi
9425   ;;
9426 ..|./*|.\\*) #(vi
9427   ;;
9428 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9429   ;;
9430 .\${*prefix}*) #(vi
9431   eval PKG_CONFIG="$PKG_CONFIG"
9432   case ".$PKG_CONFIG" in #(vi
9433   .NONE/*)
9434     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9435     ;;
9436   esac
9437   ;; #(vi
9438 .no|.NONE/*)
9439   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9440   ;;
9441 *)
9442   { { echo "$as_me:9442: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9443 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9444    { (exit 1); exit 1; }; }
9445   ;;
9446 esac
9447
9448 fi
9449
9450 echo "$as_me:9450: checking for X" >&5
9451 echo $ECHO_N "checking for X... $ECHO_C" >&6
9452
9453 # Check whether --with-x or --without-x was given.
9454 if test "${with_x+set}" = set; then
9455   withval="$with_x"
9456
9457 fi;
9458 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9459 if test "x$with_x" = xno; then
9460   # The user explicitly disabled X.
9461   have_x=disabled
9462 else
9463   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9464     # Both variables are already set.
9465     have_x=yes
9466   else
9467     if test "${ac_cv_have_x+set}" = set; then
9468   echo $ECHO_N "(cached) $ECHO_C" >&6
9469 else
9470   # One or both of the vars are not set, and there is no cached value.
9471 ac_x_includes=no ac_x_libraries=no
9472 rm -fr conftest.dir
9473 if mkdir conftest.dir; then
9474   cd conftest.dir
9475   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9476   cat >Imakefile <<'EOF'
9477 acfindx:
9478         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9479 EOF
9480   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9481     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9482     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9483     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9484     for ac_extension in a so sl dylib dll; do
9485       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9486          test -f $ac_im_libdir/libX11.$ac_extension; then
9487         ac_im_usrlibdir=$ac_im_libdir; break
9488       fi
9489     done
9490     # Screen out bogus values from the imake configuration.  They are
9491     # bogus both because they are the default anyway, and because
9492     # using them would break gcc on systems where it needs fixed includes.
9493     case $ac_im_incroot in
9494         /usr/include) ;;
9495         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9496     esac
9497     case $ac_im_usrlibdir in
9498         /usr/lib | /lib) ;;
9499         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9500     esac
9501   fi
9502   cd ..
9503   rm -fr conftest.dir
9504 fi
9505
9506 # Standard set of common directories for X headers.
9507 # Check X11 before X11Rn because it is often a symlink to the current release.
9508 ac_x_header_dirs='
9509 /usr/X11/include
9510 /usr/X11R6/include
9511 /usr/X11R5/include
9512 /usr/X11R4/include
9513
9514 /usr/include/X11
9515 /usr/include/X11R6
9516 /usr/include/X11R5
9517 /usr/include/X11R4
9518
9519 /usr/local/X11/include
9520 /usr/local/X11R6/include
9521 /usr/local/X11R5/include
9522 /usr/local/X11R4/include
9523
9524 /usr/local/include/X11
9525 /usr/local/include/X11R6
9526 /usr/local/include/X11R5
9527 /usr/local/include/X11R4
9528
9529 /usr/X386/include
9530 /usr/x386/include
9531 /usr/XFree86/include/X11
9532
9533 /usr/include
9534 /usr/local/include
9535 /usr/unsupported/include
9536 /usr/athena/include
9537 /usr/local/x11r5/include
9538 /usr/lpp/Xamples/include
9539
9540 /usr/openwin/include
9541 /usr/openwin/share/include'
9542
9543 if test "$ac_x_includes" = no; then
9544   # Guess where to find include files, by looking for Intrinsic.h.
9545   # First, try using that file with no special directory specified.
9546   cat >conftest.$ac_ext <<_ACEOF
9547 #line 9547 "configure"
9548 #include "confdefs.h"
9549 #include <X11/Intrinsic.h>
9550 _ACEOF
9551 if { (eval echo "$as_me:9551: \"$ac_cpp conftest.$ac_ext\"") >&5
9552   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9553   ac_status=$?
9554   egrep -v '^ *\+' conftest.er1 >conftest.err
9555   rm -f conftest.er1
9556   cat conftest.err >&5
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); } >/dev/null; then
9559   if test -s conftest.err; then
9560     ac_cpp_err=$ac_c_preproc_warn_flag
9561   else
9562     ac_cpp_err=
9563   fi
9564 else
9565   ac_cpp_err=yes
9566 fi
9567 if test -z "$ac_cpp_err"; then
9568   # We can compile using X headers with no special include directory.
9569 ac_x_includes=
9570 else
9571   echo "$as_me: failed program was:" >&5
9572   cat conftest.$ac_ext >&5
9573   for ac_dir in $ac_x_header_dirs; do
9574   if test -r "$ac_dir/X11/Intrinsic.h"; then
9575     ac_x_includes=$ac_dir
9576     break
9577   fi
9578 done
9579 fi
9580 rm -f conftest.err conftest.$ac_ext
9581 fi # $ac_x_includes = no
9582
9583 if test "$ac_x_libraries" = no; then
9584   # Check for the libraries.
9585   # See if we find them without any special options.
9586   # Don't add to $LIBS permanently.
9587   ac_save_LIBS=$LIBS
9588   LIBS="-lXt $LIBS"
9589   cat >conftest.$ac_ext <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592 #include <X11/Intrinsic.h>
9593 int
9594 main ()
9595 {
9596 XtMalloc (0)
9597   ;
9598   return 0;
9599 }
9600 _ACEOF
9601 rm -f conftest.$ac_objext conftest$ac_exeext
9602 if { (eval echo "$as_me:9602: \"$ac_link\"") >&5
9603   (eval $ac_link) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); } &&
9607          { ac_try='test -s conftest$ac_exeext'
9608   { (eval echo "$as_me:9608: \"$ac_try\"") >&5
9609   (eval $ac_try) 2>&5
9610   ac_status=$?
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); }; }; then
9613   LIBS=$ac_save_LIBS
9614 # We can link X programs with no special library path.
9615 ac_x_libraries=
9616 else
9617   echo "$as_me: failed program was:" >&5
9618 cat conftest.$ac_ext >&5
9619 LIBS=$ac_save_LIBS
9620 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9621 do
9622   # Don't even attempt the hair of trying to link an X program!
9623   for ac_extension in a so sl dylib dll; do
9624     if test -r $ac_dir/libXt.$ac_extension; then
9625       ac_x_libraries=$ac_dir
9626       break 2
9627     fi
9628   done
9629 done
9630 fi
9631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9632 fi # $ac_x_libraries = no
9633
9634 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9635   # Didn't find X anywhere.  Cache the known absence of X.
9636   ac_cv_have_x="have_x=no"
9637 else
9638   # Record where we found X for the cache.
9639   ac_cv_have_x="have_x=yes \
9640                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9641 fi
9642 fi
9643
9644   fi
9645   eval "$ac_cv_have_x"
9646 fi # $with_x != no
9647
9648 if test "$have_x" != yes; then
9649   echo "$as_me:9649: result: $have_x" >&5
9650 echo "${ECHO_T}$have_x" >&6
9651   no_x=yes
9652 else
9653   # If each of the values was on the command line, it overrides each guess.
9654   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9655   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9656   # Update the cache value to reflect the command line values.
9657   ac_cv_have_x="have_x=yes \
9658                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9659   echo "$as_me:9659: result: libraries $x_libraries, headers $x_includes" >&5
9660 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9661 fi
9662
9663 if test "$no_x" = yes; then
9664   # Not all programs may use this symbol, but it does not hurt to define it.
9665
9666 cat >>confdefs.h <<\EOF
9667 #define X_DISPLAY_MISSING 1
9668 EOF
9669
9670   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9671 else
9672   if test -n "$x_includes"; then
9673     X_CFLAGS="$X_CFLAGS -I$x_includes"
9674   fi
9675
9676   # It would also be nice to do this for all -L options, not just this one.
9677   if test -n "$x_libraries"; then
9678     X_LIBS="$X_LIBS -L$x_libraries"
9679     # For Solaris; some versions of Sun CC require a space after -R and
9680     # others require no space.  Words are not sufficient . . . .
9681     case `(uname -sr) 2>/dev/null` in
9682     "SunOS 5"*)
9683       echo "$as_me:9683: checking whether -R must be followed by a space" >&5
9684 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9685       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9686       cat >conftest.$ac_ext <<_ACEOF
9687 #line 9687 "configure"
9688 #include "confdefs.h"
9689
9690 int
9691 main ()
9692 {
9693
9694   ;
9695   return 0;
9696 }
9697 _ACEOF
9698 rm -f conftest.$ac_objext conftest$ac_exeext
9699 if { (eval echo "$as_me:9699: \"$ac_link\"") >&5
9700   (eval $ac_link) 2>&5
9701   ac_status=$?
9702   echo "$as_me:9702: \$? = $ac_status" >&5
9703   (exit $ac_status); } &&
9704          { ac_try='test -s conftest$ac_exeext'
9705   { (eval echo "$as_me:9705: \"$ac_try\"") >&5
9706   (eval $ac_try) 2>&5
9707   ac_status=$?
9708   echo "$as_me:9708: \$? = $ac_status" >&5
9709   (exit $ac_status); }; }; then
9710   ac_R_nospace=yes
9711 else
9712   echo "$as_me: failed program was:" >&5
9713 cat conftest.$ac_ext >&5
9714 ac_R_nospace=no
9715 fi
9716 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9717       if test $ac_R_nospace = yes; then
9718         echo "$as_me:9718: result: no" >&5
9719 echo "${ECHO_T}no" >&6
9720         X_LIBS="$X_LIBS -R$x_libraries"
9721       else
9722         LIBS="$ac_xsave_LIBS -R $x_libraries"
9723         cat >conftest.$ac_ext <<_ACEOF
9724 #line 9724 "configure"
9725 #include "confdefs.h"
9726
9727 int
9728 main ()
9729 {
9730
9731   ;
9732   return 0;
9733 }
9734 _ACEOF
9735 rm -f conftest.$ac_objext conftest$ac_exeext
9736 if { (eval echo "$as_me:9736: \"$ac_link\"") >&5
9737   (eval $ac_link) 2>&5
9738   ac_status=$?
9739   echo "$as_me:9739: \$? = $ac_status" >&5
9740   (exit $ac_status); } &&
9741          { ac_try='test -s conftest$ac_exeext'
9742   { (eval echo "$as_me:9742: \"$ac_try\"") >&5
9743   (eval $ac_try) 2>&5
9744   ac_status=$?
9745   echo "$as_me:9745: \$? = $ac_status" >&5
9746   (exit $ac_status); }; }; then
9747   ac_R_space=yes
9748 else
9749   echo "$as_me: failed program was:" >&5
9750 cat conftest.$ac_ext >&5
9751 ac_R_space=no
9752 fi
9753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9754         if test $ac_R_space = yes; then
9755           echo "$as_me:9755: result: yes" >&5
9756 echo "${ECHO_T}yes" >&6
9757           X_LIBS="$X_LIBS -R $x_libraries"
9758         else
9759           echo "$as_me:9759: result: neither works" >&5
9760 echo "${ECHO_T}neither works" >&6
9761         fi
9762       fi
9763       LIBS=$ac_xsave_LIBS
9764     esac
9765   fi
9766
9767   # Check for system-dependent libraries X programs must link with.
9768   # Do this before checking for the system-independent R6 libraries
9769   # (-lICE), since we may need -lsocket or whatever for X linking.
9770
9771   if test "$ISC" = yes; then
9772     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9773   else
9774     # Martyn Johnson says this is needed for Ultrix, if the X
9775     # libraries were built with DECnet support.  And Karl Berry says
9776     # the Alpha needs dnet_stub (dnet does not exist).
9777     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9778     cat >conftest.$ac_ext <<_ACEOF
9779 #line 9779 "configure"
9780 #include "confdefs.h"
9781
9782 /* Override any gcc2 internal prototype to avoid an error.  */
9783 #ifdef __cplusplus
9784 extern "C"
9785 #endif
9786 /* We use char because int might match the return type of a gcc2
9787    builtin and then its argument prototype would still apply.  */
9788 char XOpenDisplay ();
9789 int
9790 main ()
9791 {
9792 XOpenDisplay ();
9793   ;
9794   return 0;
9795 }
9796 _ACEOF
9797 rm -f conftest.$ac_objext conftest$ac_exeext
9798 if { (eval echo "$as_me:9798: \"$ac_link\"") >&5
9799   (eval $ac_link) 2>&5
9800   ac_status=$?
9801   echo "$as_me:9801: \$? = $ac_status" >&5
9802   (exit $ac_status); } &&
9803          { ac_try='test -s conftest$ac_exeext'
9804   { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805   (eval $ac_try) 2>&5
9806   ac_status=$?
9807   echo "$as_me:9807: \$? = $ac_status" >&5
9808   (exit $ac_status); }; }; then
9809   :
9810 else
9811   echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813 echo "$as_me:9813: checking for dnet_ntoa in -ldnet" >&5
9814 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9815 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9816   echo $ECHO_N "(cached) $ECHO_C" >&6
9817 else
9818   ac_check_lib_save_LIBS=$LIBS
9819 LIBS="-ldnet  $LIBS"
9820 cat >conftest.$ac_ext <<_ACEOF
9821 #line 9821 "configure"
9822 #include "confdefs.h"
9823
9824 /* Override any gcc2 internal prototype to avoid an error.  */
9825 #ifdef __cplusplus
9826 extern "C"
9827 #endif
9828 /* We use char because int might match the return type of a gcc2
9829    builtin and then its argument prototype would still apply.  */
9830 char dnet_ntoa ();
9831 int
9832 main ()
9833 {
9834 dnet_ntoa ();
9835   ;
9836   return 0;
9837 }
9838 _ACEOF
9839 rm -f conftest.$ac_objext conftest$ac_exeext
9840 if { (eval echo "$as_me:9840: \"$ac_link\"") >&5
9841   (eval $ac_link) 2>&5
9842   ac_status=$?
9843   echo "$as_me:9843: \$? = $ac_status" >&5
9844   (exit $ac_status); } &&
9845          { ac_try='test -s conftest$ac_exeext'
9846   { (eval echo "$as_me:9846: \"$ac_try\"") >&5
9847   (eval $ac_try) 2>&5
9848   ac_status=$?
9849   echo "$as_me:9849: \$? = $ac_status" >&5
9850   (exit $ac_status); }; }; then
9851   ac_cv_lib_dnet_dnet_ntoa=yes
9852 else
9853   echo "$as_me: failed program was:" >&5
9854 cat conftest.$ac_ext >&5
9855 ac_cv_lib_dnet_dnet_ntoa=no
9856 fi
9857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9858 LIBS=$ac_check_lib_save_LIBS
9859 fi
9860 echo "$as_me:9860: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9861 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9862 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9863   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9864 fi
9865
9866     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9867       echo "$as_me:9867: checking for dnet_ntoa in -ldnet_stub" >&5
9868 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9869 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9870   echo $ECHO_N "(cached) $ECHO_C" >&6
9871 else
9872   ac_check_lib_save_LIBS=$LIBS
9873 LIBS="-ldnet_stub  $LIBS"
9874 cat >conftest.$ac_ext <<_ACEOF
9875 #line 9875 "configure"
9876 #include "confdefs.h"
9877
9878 /* Override any gcc2 internal prototype to avoid an error.  */
9879 #ifdef __cplusplus
9880 extern "C"
9881 #endif
9882 /* We use char because int might match the return type of a gcc2
9883    builtin and then its argument prototype would still apply.  */
9884 char dnet_ntoa ();
9885 int
9886 main ()
9887 {
9888 dnet_ntoa ();
9889   ;
9890   return 0;
9891 }
9892 _ACEOF
9893 rm -f conftest.$ac_objext conftest$ac_exeext
9894 if { (eval echo "$as_me:9894: \"$ac_link\"") >&5
9895   (eval $ac_link) 2>&5
9896   ac_status=$?
9897   echo "$as_me:9897: \$? = $ac_status" >&5
9898   (exit $ac_status); } &&
9899          { ac_try='test -s conftest$ac_exeext'
9900   { (eval echo "$as_me:9900: \"$ac_try\"") >&5
9901   (eval $ac_try) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); }; }; then
9905   ac_cv_lib_dnet_stub_dnet_ntoa=yes
9906 else
9907   echo "$as_me: failed program was:" >&5
9908 cat conftest.$ac_ext >&5
9909 ac_cv_lib_dnet_stub_dnet_ntoa=no
9910 fi
9911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9912 LIBS=$ac_check_lib_save_LIBS
9913 fi
9914 echo "$as_me:9914: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9915 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9916 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9917   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9918 fi
9919
9920     fi
9921 fi
9922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9923     LIBS="$ac_xsave_LIBS"
9924
9925     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9926     # to get the SysV transport functions.
9927     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9928     # needs -lnsl.
9929     # The nsl library prevents programs from opening the X display
9930     # on Irix 5.2, according to T.E. Dickey.
9931     # The functions gethostbyname, getservbyname, and inet_addr are
9932     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9933     echo "$as_me:9933: checking for gethostbyname" >&5
9934 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9935 if test "${ac_cv_func_gethostbyname+set}" = set; then
9936   echo $ECHO_N "(cached) $ECHO_C" >&6
9937 else
9938   cat >conftest.$ac_ext <<_ACEOF
9939 #line 9939 "configure"
9940 #include "confdefs.h"
9941 /* System header to define __stub macros and hopefully few prototypes,
9942     which can conflict with char gethostbyname (); below.  */
9943 #include <assert.h>
9944 /* Override any gcc2 internal prototype to avoid an error.  */
9945 #ifdef __cplusplus
9946 extern "C"
9947 #endif
9948 /* We use char because int might match the return type of a gcc2
9949    builtin and then its argument prototype would still apply.  */
9950 char gethostbyname ();
9951 char (*f) ();
9952
9953 int
9954 main ()
9955 {
9956 /* The GNU C library defines this for functions which it implements
9957     to always fail with ENOSYS.  Some functions are actually named
9958     something starting with __ and the normal name is an alias.  */
9959 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9960 choke me
9961 #else
9962 f = gethostbyname;
9963 #endif
9964
9965   ;
9966   return 0;
9967 }
9968 _ACEOF
9969 rm -f conftest.$ac_objext conftest$ac_exeext
9970 if { (eval echo "$as_me:9970: \"$ac_link\"") >&5
9971   (eval $ac_link) 2>&5
9972   ac_status=$?
9973   echo "$as_me:9973: \$? = $ac_status" >&5
9974   (exit $ac_status); } &&
9975          { ac_try='test -s conftest$ac_exeext'
9976   { (eval echo "$as_me:9976: \"$ac_try\"") >&5
9977   (eval $ac_try) 2>&5
9978   ac_status=$?
9979   echo "$as_me:9979: \$? = $ac_status" >&5
9980   (exit $ac_status); }; }; then
9981   ac_cv_func_gethostbyname=yes
9982 else
9983   echo "$as_me: failed program was:" >&5
9984 cat conftest.$ac_ext >&5
9985 ac_cv_func_gethostbyname=no
9986 fi
9987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9988 fi
9989 echo "$as_me:9989: result: $ac_cv_func_gethostbyname" >&5
9990 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9991
9992     if test $ac_cv_func_gethostbyname = no; then
9993       echo "$as_me:9993: checking for gethostbyname in -lnsl" >&5
9994 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9995 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9996   echo $ECHO_N "(cached) $ECHO_C" >&6
9997 else
9998   ac_check_lib_save_LIBS=$LIBS
9999 LIBS="-lnsl  $LIBS"
10000 cat >conftest.$ac_ext <<_ACEOF
10001 #line 10001 "configure"
10002 #include "confdefs.h"
10003
10004 /* Override any gcc2 internal prototype to avoid an error.  */
10005 #ifdef __cplusplus
10006 extern "C"
10007 #endif
10008 /* We use char because int might match the return type of a gcc2
10009    builtin and then its argument prototype would still apply.  */
10010 char gethostbyname ();
10011 int
10012 main ()
10013 {
10014 gethostbyname ();
10015   ;
10016   return 0;
10017 }
10018 _ACEOF
10019 rm -f conftest.$ac_objext conftest$ac_exeext
10020 if { (eval echo "$as_me:10020: \"$ac_link\"") >&5
10021   (eval $ac_link) 2>&5
10022   ac_status=$?
10023   echo "$as_me:10023: \$? = $ac_status" >&5
10024   (exit $ac_status); } &&
10025          { ac_try='test -s conftest$ac_exeext'
10026   { (eval echo "$as_me:10026: \"$ac_try\"") >&5
10027   (eval $ac_try) 2>&5
10028   ac_status=$?
10029   echo "$as_me:10029: \$? = $ac_status" >&5
10030   (exit $ac_status); }; }; then
10031   ac_cv_lib_nsl_gethostbyname=yes
10032 else
10033   echo "$as_me: failed program was:" >&5
10034 cat conftest.$ac_ext >&5
10035 ac_cv_lib_nsl_gethostbyname=no
10036 fi
10037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10038 LIBS=$ac_check_lib_save_LIBS
10039 fi
10040 echo "$as_me:10040: result: $ac_cv_lib_nsl_gethostbyname" >&5
10041 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10042 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10043   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10044 fi
10045
10046       if test $ac_cv_lib_nsl_gethostbyname = no; then
10047         echo "$as_me:10047: checking for gethostbyname in -lbsd" >&5
10048 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10049 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10050   echo $ECHO_N "(cached) $ECHO_C" >&6
10051 else
10052   ac_check_lib_save_LIBS=$LIBS
10053 LIBS="-lbsd  $LIBS"
10054 cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057
10058 /* Override any gcc2 internal prototype to avoid an error.  */
10059 #ifdef __cplusplus
10060 extern "C"
10061 #endif
10062 /* We use char because int might match the return type of a gcc2
10063    builtin and then its argument prototype would still apply.  */
10064 char gethostbyname ();
10065 int
10066 main ()
10067 {
10068 gethostbyname ();
10069   ;
10070   return 0;
10071 }
10072 _ACEOF
10073 rm -f conftest.$ac_objext conftest$ac_exeext
10074 if { (eval echo "$as_me:10074: \"$ac_link\"") >&5
10075   (eval $ac_link) 2>&5
10076   ac_status=$?
10077   echo "$as_me:10077: \$? = $ac_status" >&5
10078   (exit $ac_status); } &&
10079          { ac_try='test -s conftest$ac_exeext'
10080   { (eval echo "$as_me:10080: \"$ac_try\"") >&5
10081   (eval $ac_try) 2>&5
10082   ac_status=$?
10083   echo "$as_me:10083: \$? = $ac_status" >&5
10084   (exit $ac_status); }; }; then
10085   ac_cv_lib_bsd_gethostbyname=yes
10086 else
10087   echo "$as_me: failed program was:" >&5
10088 cat conftest.$ac_ext >&5
10089 ac_cv_lib_bsd_gethostbyname=no
10090 fi
10091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10092 LIBS=$ac_check_lib_save_LIBS
10093 fi
10094 echo "$as_me:10094: result: $ac_cv_lib_bsd_gethostbyname" >&5
10095 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10096 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10097   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10098 fi
10099
10100       fi
10101     fi
10102
10103     # lieder@skyler.mavd.honeywell.com says without -lsocket,
10104     # socket/setsockopt and other routines are undefined under SCO ODT
10105     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
10106     # on later versions), says Simon Leinen: it contains gethostby*
10107     # variants that don't use the nameserver (or something).  -lsocket
10108     # must be given before -lnsl if both are needed.  We assume that
10109     # if connect needs -lnsl, so does gethostbyname.
10110     echo "$as_me:10110: checking for connect" >&5
10111 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10112 if test "${ac_cv_func_connect+set}" = set; then
10113   echo $ECHO_N "(cached) $ECHO_C" >&6
10114 else
10115   cat >conftest.$ac_ext <<_ACEOF
10116 #line 10116 "configure"
10117 #include "confdefs.h"
10118 /* System header to define __stub macros and hopefully few prototypes,
10119     which can conflict with char connect (); below.  */
10120 #include <assert.h>
10121 /* Override any gcc2 internal prototype to avoid an error.  */
10122 #ifdef __cplusplus
10123 extern "C"
10124 #endif
10125 /* We use char because int might match the return type of a gcc2
10126    builtin and then its argument prototype would still apply.  */
10127 char connect ();
10128 char (*f) ();
10129
10130 int
10131 main ()
10132 {
10133 /* The GNU C library defines this for functions which it implements
10134     to always fail with ENOSYS.  Some functions are actually named
10135     something starting with __ and the normal name is an alias.  */
10136 #if defined (__stub_connect) || defined (__stub___connect)
10137 choke me
10138 #else
10139 f = connect;
10140 #endif
10141
10142   ;
10143   return 0;
10144 }
10145 _ACEOF
10146 rm -f conftest.$ac_objext conftest$ac_exeext
10147 if { (eval echo "$as_me:10147: \"$ac_link\"") >&5
10148   (eval $ac_link) 2>&5
10149   ac_status=$?
10150   echo "$as_me:10150: \$? = $ac_status" >&5
10151   (exit $ac_status); } &&
10152          { ac_try='test -s conftest$ac_exeext'
10153   { (eval echo "$as_me:10153: \"$ac_try\"") >&5
10154   (eval $ac_try) 2>&5
10155   ac_status=$?
10156   echo "$as_me:10156: \$? = $ac_status" >&5
10157   (exit $ac_status); }; }; then
10158   ac_cv_func_connect=yes
10159 else
10160   echo "$as_me: failed program was:" >&5
10161 cat conftest.$ac_ext >&5
10162 ac_cv_func_connect=no
10163 fi
10164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10165 fi
10166 echo "$as_me:10166: result: $ac_cv_func_connect" >&5
10167 echo "${ECHO_T}$ac_cv_func_connect" >&6
10168
10169     if test $ac_cv_func_connect = no; then
10170       echo "$as_me:10170: checking for connect in -lsocket" >&5
10171 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10172 if test "${ac_cv_lib_socket_connect+set}" = set; then
10173   echo $ECHO_N "(cached) $ECHO_C" >&6
10174 else
10175   ac_check_lib_save_LIBS=$LIBS
10176 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10177 cat >conftest.$ac_ext <<_ACEOF
10178 #line 10178 "configure"
10179 #include "confdefs.h"
10180
10181 /* Override any gcc2 internal prototype to avoid an error.  */
10182 #ifdef __cplusplus
10183 extern "C"
10184 #endif
10185 /* We use char because int might match the return type of a gcc2
10186    builtin and then its argument prototype would still apply.  */
10187 char connect ();
10188 int
10189 main ()
10190 {
10191 connect ();
10192   ;
10193   return 0;
10194 }
10195 _ACEOF
10196 rm -f conftest.$ac_objext conftest$ac_exeext
10197 if { (eval echo "$as_me:10197: \"$ac_link\"") >&5
10198   (eval $ac_link) 2>&5
10199   ac_status=$?
10200   echo "$as_me:10200: \$? = $ac_status" >&5
10201   (exit $ac_status); } &&
10202          { ac_try='test -s conftest$ac_exeext'
10203   { (eval echo "$as_me:10203: \"$ac_try\"") >&5
10204   (eval $ac_try) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit $ac_status); }; }; then
10208   ac_cv_lib_socket_connect=yes
10209 else
10210   echo "$as_me: failed program was:" >&5
10211 cat conftest.$ac_ext >&5
10212 ac_cv_lib_socket_connect=no
10213 fi
10214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10215 LIBS=$ac_check_lib_save_LIBS
10216 fi
10217 echo "$as_me:10217: result: $ac_cv_lib_socket_connect" >&5
10218 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10219 if test $ac_cv_lib_socket_connect = yes; then
10220   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10221 fi
10222
10223     fi
10224
10225     # Guillermo Gomez says -lposix is necessary on A/UX.
10226     echo "$as_me:10226: checking for remove" >&5
10227 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10228 if test "${ac_cv_func_remove+set}" = set; then
10229   echo $ECHO_N "(cached) $ECHO_C" >&6
10230 else
10231   cat >conftest.$ac_ext <<_ACEOF
10232 #line 10232 "configure"
10233 #include "confdefs.h"
10234 /* System header to define __stub macros and hopefully few prototypes,
10235     which can conflict with char remove (); below.  */
10236 #include <assert.h>
10237 /* Override any gcc2 internal prototype to avoid an error.  */
10238 #ifdef __cplusplus
10239 extern "C"
10240 #endif
10241 /* We use char because int might match the return type of a gcc2
10242    builtin and then its argument prototype would still apply.  */
10243 char remove ();
10244 char (*f) ();
10245
10246 int
10247 main ()
10248 {
10249 /* The GNU C library defines this for functions which it implements
10250     to always fail with ENOSYS.  Some functions are actually named
10251     something starting with __ and the normal name is an alias.  */
10252 #if defined (__stub_remove) || defined (__stub___remove)
10253 choke me
10254 #else
10255 f = remove;
10256 #endif
10257
10258   ;
10259   return 0;
10260 }
10261 _ACEOF
10262 rm -f conftest.$ac_objext conftest$ac_exeext
10263 if { (eval echo "$as_me:10263: \"$ac_link\"") >&5
10264   (eval $ac_link) 2>&5
10265   ac_status=$?
10266   echo "$as_me:10266: \$? = $ac_status" >&5
10267   (exit $ac_status); } &&
10268          { ac_try='test -s conftest$ac_exeext'
10269   { (eval echo "$as_me:10269: \"$ac_try\"") >&5
10270   (eval $ac_try) 2>&5
10271   ac_status=$?
10272   echo "$as_me:10272: \$? = $ac_status" >&5
10273   (exit $ac_status); }; }; then
10274   ac_cv_func_remove=yes
10275 else
10276   echo "$as_me: failed program was:" >&5
10277 cat conftest.$ac_ext >&5
10278 ac_cv_func_remove=no
10279 fi
10280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10281 fi
10282 echo "$as_me:10282: result: $ac_cv_func_remove" >&5
10283 echo "${ECHO_T}$ac_cv_func_remove" >&6
10284
10285     if test $ac_cv_func_remove = no; then
10286       echo "$as_me:10286: checking for remove in -lposix" >&5
10287 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10288 if test "${ac_cv_lib_posix_remove+set}" = set; then
10289   echo $ECHO_N "(cached) $ECHO_C" >&6
10290 else
10291   ac_check_lib_save_LIBS=$LIBS
10292 LIBS="-lposix  $LIBS"
10293 cat >conftest.$ac_ext <<_ACEOF
10294 #line 10294 "configure"
10295 #include "confdefs.h"
10296
10297 /* Override any gcc2 internal prototype to avoid an error.  */
10298 #ifdef __cplusplus
10299 extern "C"
10300 #endif
10301 /* We use char because int might match the return type of a gcc2
10302    builtin and then its argument prototype would still apply.  */
10303 char remove ();
10304 int
10305 main ()
10306 {
10307 remove ();
10308   ;
10309   return 0;
10310 }
10311 _ACEOF
10312 rm -f conftest.$ac_objext conftest$ac_exeext
10313 if { (eval echo "$as_me:10313: \"$ac_link\"") >&5
10314   (eval $ac_link) 2>&5
10315   ac_status=$?
10316   echo "$as_me:10316: \$? = $ac_status" >&5
10317   (exit $ac_status); } &&
10318          { ac_try='test -s conftest$ac_exeext'
10319   { (eval echo "$as_me:10319: \"$ac_try\"") >&5
10320   (eval $ac_try) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); }; }; then
10324   ac_cv_lib_posix_remove=yes
10325 else
10326   echo "$as_me: failed program was:" >&5
10327 cat conftest.$ac_ext >&5
10328 ac_cv_lib_posix_remove=no
10329 fi
10330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10331 LIBS=$ac_check_lib_save_LIBS
10332 fi
10333 echo "$as_me:10333: result: $ac_cv_lib_posix_remove" >&5
10334 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10335 if test $ac_cv_lib_posix_remove = yes; then
10336   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10337 fi
10338
10339     fi
10340
10341     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10342     echo "$as_me:10342: checking for shmat" >&5
10343 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10344 if test "${ac_cv_func_shmat+set}" = set; then
10345   echo $ECHO_N "(cached) $ECHO_C" >&6
10346 else
10347   cat >conftest.$ac_ext <<_ACEOF
10348 #line 10348 "configure"
10349 #include "confdefs.h"
10350 /* System header to define __stub macros and hopefully few prototypes,
10351     which can conflict with char shmat (); below.  */
10352 #include <assert.h>
10353 /* Override any gcc2 internal prototype to avoid an error.  */
10354 #ifdef __cplusplus
10355 extern "C"
10356 #endif
10357 /* We use char because int might match the return type of a gcc2
10358    builtin and then its argument prototype would still apply.  */
10359 char shmat ();
10360 char (*f) ();
10361
10362 int
10363 main ()
10364 {
10365 /* The GNU C library defines this for functions which it implements
10366     to always fail with ENOSYS.  Some functions are actually named
10367     something starting with __ and the normal name is an alias.  */
10368 #if defined (__stub_shmat) || defined (__stub___shmat)
10369 choke me
10370 #else
10371 f = shmat;
10372 #endif
10373
10374   ;
10375   return 0;
10376 }
10377 _ACEOF
10378 rm -f conftest.$ac_objext conftest$ac_exeext
10379 if { (eval echo "$as_me:10379: \"$ac_link\"") >&5
10380   (eval $ac_link) 2>&5
10381   ac_status=$?
10382   echo "$as_me:10382: \$? = $ac_status" >&5
10383   (exit $ac_status); } &&
10384          { ac_try='test -s conftest$ac_exeext'
10385   { (eval echo "$as_me:10385: \"$ac_try\"") >&5
10386   (eval $ac_try) 2>&5
10387   ac_status=$?
10388   echo "$as_me:10388: \$? = $ac_status" >&5
10389   (exit $ac_status); }; }; then
10390   ac_cv_func_shmat=yes
10391 else
10392   echo "$as_me: failed program was:" >&5
10393 cat conftest.$ac_ext >&5
10394 ac_cv_func_shmat=no
10395 fi
10396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10397 fi
10398 echo "$as_me:10398: result: $ac_cv_func_shmat" >&5
10399 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10400
10401     if test $ac_cv_func_shmat = no; then
10402       echo "$as_me:10402: checking for shmat in -lipc" >&5
10403 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10404 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10405   echo $ECHO_N "(cached) $ECHO_C" >&6
10406 else
10407   ac_check_lib_save_LIBS=$LIBS
10408 LIBS="-lipc  $LIBS"
10409 cat >conftest.$ac_ext <<_ACEOF
10410 #line 10410 "configure"
10411 #include "confdefs.h"
10412
10413 /* Override any gcc2 internal prototype to avoid an error.  */
10414 #ifdef __cplusplus
10415 extern "C"
10416 #endif
10417 /* We use char because int might match the return type of a gcc2
10418    builtin and then its argument prototype would still apply.  */
10419 char shmat ();
10420 int
10421 main ()
10422 {
10423 shmat ();
10424   ;
10425   return 0;
10426 }
10427 _ACEOF
10428 rm -f conftest.$ac_objext conftest$ac_exeext
10429 if { (eval echo "$as_me:10429: \"$ac_link\"") >&5
10430   (eval $ac_link) 2>&5
10431   ac_status=$?
10432   echo "$as_me:10432: \$? = $ac_status" >&5
10433   (exit $ac_status); } &&
10434          { ac_try='test -s conftest$ac_exeext'
10435   { (eval echo "$as_me:10435: \"$ac_try\"") >&5
10436   (eval $ac_try) 2>&5
10437   ac_status=$?
10438   echo "$as_me:10438: \$? = $ac_status" >&5
10439   (exit $ac_status); }; }; then
10440   ac_cv_lib_ipc_shmat=yes
10441 else
10442   echo "$as_me: failed program was:" >&5
10443 cat conftest.$ac_ext >&5
10444 ac_cv_lib_ipc_shmat=no
10445 fi
10446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10447 LIBS=$ac_check_lib_save_LIBS
10448 fi
10449 echo "$as_me:10449: result: $ac_cv_lib_ipc_shmat" >&5
10450 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10451 if test $ac_cv_lib_ipc_shmat = yes; then
10452   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10453 fi
10454
10455     fi
10456   fi
10457
10458   # Check for libraries that X11R6 Xt/Xaw programs need.
10459   ac_save_LDFLAGS=$LDFLAGS
10460   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10461   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10462   # check for ICE first), but we must link in the order -lSM -lICE or
10463   # we get undefined symbols.  So assume we have SM if we have ICE.
10464   # These have to be linked with before -lX11, unlike the other
10465   # libraries we check for below, so use a different variable.
10466   # John Interrante, Karl Berry
10467   echo "$as_me:10467: checking for IceConnectionNumber in -lICE" >&5
10468 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10469 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10470   echo $ECHO_N "(cached) $ECHO_C" >&6
10471 else
10472   ac_check_lib_save_LIBS=$LIBS
10473 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10474 cat >conftest.$ac_ext <<_ACEOF
10475 #line 10475 "configure"
10476 #include "confdefs.h"
10477
10478 /* Override any gcc2 internal prototype to avoid an error.  */
10479 #ifdef __cplusplus
10480 extern "C"
10481 #endif
10482 /* We use char because int might match the return type of a gcc2
10483    builtin and then its argument prototype would still apply.  */
10484 char IceConnectionNumber ();
10485 int
10486 main ()
10487 {
10488 IceConnectionNumber ();
10489   ;
10490   return 0;
10491 }
10492 _ACEOF
10493 rm -f conftest.$ac_objext conftest$ac_exeext
10494 if { (eval echo "$as_me:10494: \"$ac_link\"") >&5
10495   (eval $ac_link) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); } &&
10499          { ac_try='test -s conftest$ac_exeext'
10500   { (eval echo "$as_me:10500: \"$ac_try\"") >&5
10501   (eval $ac_try) 2>&5
10502   ac_status=$?
10503   echo "$as_me:10503: \$? = $ac_status" >&5
10504   (exit $ac_status); }; }; then
10505   ac_cv_lib_ICE_IceConnectionNumber=yes
10506 else
10507   echo "$as_me: failed program was:" >&5
10508 cat conftest.$ac_ext >&5
10509 ac_cv_lib_ICE_IceConnectionNumber=no
10510 fi
10511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10512 LIBS=$ac_check_lib_save_LIBS
10513 fi
10514 echo "$as_me:10514: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10515 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10516 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10517   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10518 fi
10519
10520   LDFLAGS=$ac_save_LDFLAGS
10521
10522 fi
10523
10524 cf_x_athena=${cf_x_athena:-Xaw}
10525
10526 echo "$as_me:10526: checking if you want to link with Xaw 3d library" >&5
10527 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10528 withval=
10529
10530 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10531 if test "${with_Xaw3d+set}" = set; then
10532   withval="$with_Xaw3d"
10533
10534 fi;
10535 if test "$withval" = yes ; then
10536         cf_x_athena=Xaw3d
10537         echo "$as_me:10537: result: yes" >&5
10538 echo "${ECHO_T}yes" >&6
10539 else
10540         echo "$as_me:10540: result: no" >&5
10541 echo "${ECHO_T}no" >&6
10542 fi
10543
10544 echo "$as_me:10544: checking if you want to link with neXT Athena library" >&5
10545 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10546 withval=
10547
10548 # Check whether --with-neXtaw or --without-neXtaw was given.
10549 if test "${with_neXtaw+set}" = set; then
10550   withval="$with_neXtaw"
10551
10552 fi;
10553 if test "$withval" = yes ; then
10554         cf_x_athena=neXtaw
10555         echo "$as_me:10555: result: yes" >&5
10556 echo "${ECHO_T}yes" >&6
10557 else
10558         echo "$as_me:10558: result: no" >&5
10559 echo "${ECHO_T}no" >&6
10560 fi
10561
10562 echo "$as_me:10562: checking if you want to link with Athena-Plus library" >&5
10563 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10564 withval=
10565
10566 # Check whether --with-XawPlus or --without-XawPlus was given.
10567 if test "${with_XawPlus+set}" = set; then
10568   withval="$with_XawPlus"
10569
10570 fi;
10571 if test "$withval" = yes ; then
10572         cf_x_athena=XawPlus
10573         echo "$as_me:10573: result: yes" >&5
10574 echo "${ECHO_T}yes" >&6
10575 else
10576         echo "$as_me:10576: result: no" >&5
10577 echo "${ECHO_T}no" >&6
10578 fi
10579
10580 cf_x_athena_lib=""
10581
10582 if test "$PKG_CONFIG" != none ; then
10583         cf_athena_list=
10584         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10585         for cf_athena_pkg in \
10586                 $cf_athena_list \
10587                 ${cf_x_athena} \
10588                 ${cf_x_athena}-devel \
10589                 lib${cf_x_athena} \
10590                 lib${cf_x_athena}-devel
10591         do
10592
10593 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10594         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
10595
10596 echo "${as_me:-configure}:10596: testing found package $cf_athena_pkg ..." 1>&5
10597
10598         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10599         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10600         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10601
10602 echo "${as_me:-configure}:10602: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10603
10604         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10605
10606 echo "${as_me:-configure}:10606: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10607
10608 cf_fix_cppflags=no
10609 cf_new_cflags=
10610 cf_new_cppflags=
10611 cf_new_extra_cppflags=
10612
10613 for cf_add_cflags in $cf_pkgconfig_incs
10614 do
10615 case $cf_fix_cppflags in
10616 no)
10617         case $cf_add_cflags in #(vi
10618         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10619                 case $cf_add_cflags in
10620                 -D*)
10621                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10622
10623                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10624                                 && test -z "${cf_tst_cflags}" \
10625                                 && cf_fix_cppflags=yes
10626
10627                         if test $cf_fix_cppflags = yes ; then
10628                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10629                                 continue
10630                         elif test "${cf_tst_cflags}" = "\"'" ; then
10631                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10632                                 continue
10633                         fi
10634                         ;;
10635                 esac
10636                 case "$CPPFLAGS" in
10637                 *$cf_add_cflags) #(vi
10638                         ;;
10639                 *) #(vi
10640                         case $cf_add_cflags in #(vi
10641                         -D*)
10642                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10643
10644 CPPFLAGS=`echo "$CPPFLAGS" | \
10645         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10646                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10647
10648                                 ;;
10649                         esac
10650                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10651                         ;;
10652                 esac
10653                 ;;
10654         *)
10655                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10656                 ;;
10657         esac
10658         ;;
10659 yes)
10660         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10661
10662         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10663
10664         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10665                 && test -z "${cf_tst_cflags}" \
10666                 && cf_fix_cppflags=no
10667         ;;
10668 esac
10669 done
10670
10671 if test -n "$cf_new_cflags" ; then
10672
10673         CFLAGS="$CFLAGS $cf_new_cflags"
10674 fi
10675
10676 if test -n "$cf_new_cppflags" ; then
10677
10678         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10679 fi
10680
10681 if test -n "$cf_new_extra_cppflags" ; then
10682
10683         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10684 fi
10685
10686         LIBS="$cf_pkgconfig_libs $LIBS"
10687
10688                         cf_x_athena_lib="$cf_pkgconfig_libs"
10689
10690 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10691
10692                         cat >>confdefs.h <<EOF
10693 #define $cf_x_athena_LIBS 1
10694 EOF
10695
10696 echo "$as_me:10696: checking for usable $cf_x_athena/Xmu package" >&5
10697 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10698 if test "${cf_cv_xaw_compat+set}" = set; then
10699   echo $ECHO_N "(cached) $ECHO_C" >&6
10700 else
10701
10702 cat >conftest.$ac_ext <<_ACEOF
10703 #line 10703 "configure"
10704 #include "confdefs.h"
10705
10706 #include <X11/Xmu/CharSet.h>
10707
10708 int
10709 main ()
10710 {
10711
10712 int check = XmuCompareISOLatin1("big", "small")
10713
10714   ;
10715   return 0;
10716 }
10717 _ACEOF
10718 rm -f conftest.$ac_objext conftest$ac_exeext
10719 if { (eval echo "$as_me:10719: \"$ac_link\"") >&5
10720   (eval $ac_link) 2>&5
10721   ac_status=$?
10722   echo "$as_me:10722: \$? = $ac_status" >&5
10723   (exit $ac_status); } &&
10724          { ac_try='test -s conftest$ac_exeext'
10725   { (eval echo "$as_me:10725: \"$ac_try\"") >&5
10726   (eval $ac_try) 2>&5
10727   ac_status=$?
10728   echo "$as_me:10728: \$? = $ac_status" >&5
10729   (exit $ac_status); }; }; then
10730   cf_cv_xaw_compat=yes
10731 else
10732   echo "$as_me: failed program was:" >&5
10733 cat conftest.$ac_ext >&5
10734 cf_cv_xaw_compat=no
10735 fi
10736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10737 fi
10738 echo "$as_me:10738: result: $cf_cv_xaw_compat" >&5
10739 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10740
10741                         if test "$cf_cv_xaw_compat" = no
10742                         then
10743                                 # workaround for broken ".pc" files...
10744                                 case "$cf_x_athena_lib" in #(vi
10745                                 *-lXmu*) #(vi
10746                                         ;;
10747                                 *)
10748                                         test -n "$verbose" && echo "    work around broken package" 1>&6
10749
10750 echo "${as_me:-configure}:10750: testing work around broken package ..." 1>&5
10751
10752 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10753         test -n "$verbose" && echo "    found package xmu" 1>&6
10754
10755 echo "${as_me:-configure}:10755: testing found package xmu ..." 1>&5
10756
10757         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10758         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10759         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10760
10761 echo "${as_me:-configure}:10761: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10762
10763         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10764
10765 echo "${as_me:-configure}:10765: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10766
10767 cf_fix_cppflags=no
10768 cf_new_cflags=
10769 cf_new_cppflags=
10770 cf_new_extra_cppflags=
10771
10772 for cf_add_cflags in $cf_pkgconfig_incs
10773 do
10774 case $cf_fix_cppflags in
10775 no)
10776         case $cf_add_cflags in #(vi
10777         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10778                 case $cf_add_cflags in
10779                 -D*)
10780                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10781
10782                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10783                                 && test -z "${cf_tst_cflags}" \
10784                                 && cf_fix_cppflags=yes
10785
10786                         if test $cf_fix_cppflags = yes ; then
10787                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10788                                 continue
10789                         elif test "${cf_tst_cflags}" = "\"'" ; then
10790                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10791                                 continue
10792                         fi
10793                         ;;
10794                 esac
10795                 case "$CPPFLAGS" in
10796                 *$cf_add_cflags) #(vi
10797                         ;;
10798                 *) #(vi
10799                         case $cf_add_cflags in #(vi
10800                         -D*)
10801                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10802
10803 CPPFLAGS=`echo "$CPPFLAGS" | \
10804         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10805                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10806
10807                                 ;;
10808                         esac
10809                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10810                         ;;
10811                 esac
10812                 ;;
10813         *)
10814                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10815                 ;;
10816         esac
10817         ;;
10818 yes)
10819         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10820
10821         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10822
10823         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10824                 && test -z "${cf_tst_cflags}" \
10825                 && cf_fix_cppflags=no
10826         ;;
10827 esac
10828 done
10829
10830 if test -n "$cf_new_cflags" ; then
10831
10832         CFLAGS="$CFLAGS $cf_new_cflags"
10833 fi
10834
10835 if test -n "$cf_new_cppflags" ; then
10836
10837         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10838 fi
10839
10840 if test -n "$cf_new_extra_cppflags" ; then
10841
10842         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10843 fi
10844
10845         LIBS="$cf_pkgconfig_libs $LIBS"
10846         :
10847 else
10848
10849 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10850
10851 echo "${as_me:-configure}:10851: testing ...before $LIBS ..." 1>&5
10852
10853 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
10854 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10855
10856 echo "${as_me:-configure}:10856: testing ...after  $LIBS ..." 1>&5
10857
10858 fi
10859
10860                                         ;;
10861                                 esac
10862                         fi
10863
10864                         break
10865 else
10866         :
10867 fi
10868
10869         done
10870 fi
10871
10872 if test -z "$cf_x_athena_lib" ; then
10873
10874 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10875         test -n "$verbose" && echo "    found package Xext" 1>&6
10876
10877 echo "${as_me:-configure}:10877: testing found package Xext ..." 1>&5
10878
10879         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10880         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
10881         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10882
10883 echo "${as_me:-configure}:10883: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10884
10885         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10886
10887 echo "${as_me:-configure}:10887: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10888
10889 cf_fix_cppflags=no
10890 cf_new_cflags=
10891 cf_new_cppflags=
10892 cf_new_extra_cppflags=
10893
10894 for cf_add_cflags in $cf_pkgconfig_incs
10895 do
10896 case $cf_fix_cppflags in
10897 no)
10898         case $cf_add_cflags in #(vi
10899         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10900                 case $cf_add_cflags in
10901                 -D*)
10902                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10903
10904                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10905                                 && test -z "${cf_tst_cflags}" \
10906                                 && cf_fix_cppflags=yes
10907
10908                         if test $cf_fix_cppflags = yes ; then
10909                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10910                                 continue
10911                         elif test "${cf_tst_cflags}" = "\"'" ; then
10912                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10913                                 continue
10914                         fi
10915                         ;;
10916                 esac
10917                 case "$CPPFLAGS" in
10918                 *$cf_add_cflags) #(vi
10919                         ;;
10920                 *) #(vi
10921                         case $cf_add_cflags in #(vi
10922                         -D*)
10923                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10924
10925 CPPFLAGS=`echo "$CPPFLAGS" | \
10926         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10927                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10928
10929                                 ;;
10930                         esac
10931                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10932                         ;;
10933                 esac
10934                 ;;
10935         *)
10936                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10937                 ;;
10938         esac
10939         ;;
10940 yes)
10941         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10942
10943         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10944
10945         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10946                 && test -z "${cf_tst_cflags}" \
10947                 && cf_fix_cppflags=no
10948         ;;
10949 esac
10950 done
10951
10952 if test -n "$cf_new_cflags" ; then
10953
10954         CFLAGS="$CFLAGS $cf_new_cflags"
10955 fi
10956
10957 if test -n "$cf_new_cppflags" ; then
10958
10959         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10960 fi
10961
10962 if test -n "$cf_new_extra_cppflags" ; then
10963
10964         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10965 fi
10966
10967         LIBS="$cf_pkgconfig_libs $LIBS"
10968         :
10969 else
10970
10971         echo "$as_me:10971: checking for XextCreateExtension in -lXext" >&5
10972 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10973 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10974   echo $ECHO_N "(cached) $ECHO_C" >&6
10975 else
10976   ac_check_lib_save_LIBS=$LIBS
10977 LIBS="-lXext  $LIBS"
10978 cat >conftest.$ac_ext <<_ACEOF
10979 #line 10979 "configure"
10980 #include "confdefs.h"
10981
10982 /* Override any gcc2 internal prototype to avoid an error.  */
10983 #ifdef __cplusplus
10984 extern "C"
10985 #endif
10986 /* We use char because int might match the return type of a gcc2
10987    builtin and then its argument prototype would still apply.  */
10988 char XextCreateExtension ();
10989 int
10990 main ()
10991 {
10992 XextCreateExtension ();
10993   ;
10994   return 0;
10995 }
10996 _ACEOF
10997 rm -f conftest.$ac_objext conftest$ac_exeext
10998 if { (eval echo "$as_me:10998: \"$ac_link\"") >&5
10999   (eval $ac_link) 2>&5
11000   ac_status=$?
11001   echo "$as_me:11001: \$? = $ac_status" >&5
11002   (exit $ac_status); } &&
11003          { ac_try='test -s conftest$ac_exeext'
11004   { (eval echo "$as_me:11004: \"$ac_try\"") >&5
11005   (eval $ac_try) 2>&5
11006   ac_status=$?
11007   echo "$as_me:11007: \$? = $ac_status" >&5
11008   (exit $ac_status); }; }; then
11009   ac_cv_lib_Xext_XextCreateExtension=yes
11010 else
11011   echo "$as_me: failed program was:" >&5
11012 cat conftest.$ac_ext >&5
11013 ac_cv_lib_Xext_XextCreateExtension=no
11014 fi
11015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11016 LIBS=$ac_check_lib_save_LIBS
11017 fi
11018 echo "$as_me:11018: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11019 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11020 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11021   LIBS="-lXext $LIBS"
11022 fi
11023
11024 fi
11025
11026 cf_have_X_LIBS=no
11027
11028 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11029         test -n "$verbose" && echo "    found package xt" 1>&6
11030
11031 echo "${as_me:-configure}:11031: testing found package xt ..." 1>&5
11032
11033         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11034         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11035         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11036
11037 echo "${as_me:-configure}:11037: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11038
11039         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
11040
11041 echo "${as_me:-configure}:11041: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11042
11043 cf_fix_cppflags=no
11044 cf_new_cflags=
11045 cf_new_cppflags=
11046 cf_new_extra_cppflags=
11047
11048 for cf_add_cflags in $cf_pkgconfig_incs
11049 do
11050 case $cf_fix_cppflags in
11051 no)
11052         case $cf_add_cflags in #(vi
11053         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11054                 case $cf_add_cflags in
11055                 -D*)
11056                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11057
11058                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11059                                 && test -z "${cf_tst_cflags}" \
11060                                 && cf_fix_cppflags=yes
11061
11062                         if test $cf_fix_cppflags = yes ; then
11063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11064                                 continue
11065                         elif test "${cf_tst_cflags}" = "\"'" ; then
11066                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11067                                 continue
11068                         fi
11069                         ;;
11070                 esac
11071                 case "$CPPFLAGS" in
11072                 *$cf_add_cflags) #(vi
11073                         ;;
11074                 *) #(vi
11075                         case $cf_add_cflags in #(vi
11076                         -D*)
11077                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11078
11079 CPPFLAGS=`echo "$CPPFLAGS" | \
11080         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11081                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11082
11083                                 ;;
11084                         esac
11085                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11086                         ;;
11087                 esac
11088                 ;;
11089         *)
11090                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11091                 ;;
11092         esac
11093         ;;
11094 yes)
11095         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11096
11097         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11098
11099         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11100                 && test -z "${cf_tst_cflags}" \
11101                 && cf_fix_cppflags=no
11102         ;;
11103 esac
11104 done
11105
11106 if test -n "$cf_new_cflags" ; then
11107
11108         CFLAGS="$CFLAGS $cf_new_cflags"
11109 fi
11110
11111 if test -n "$cf_new_cppflags" ; then
11112
11113         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11114 fi
11115
11116 if test -n "$cf_new_extra_cppflags" ; then
11117
11118         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11119 fi
11120
11121         LIBS="$cf_pkgconfig_libs $LIBS"
11122
11123         case "x$LIBS" in #(vi
11124         *-lX11*) #(vi
11125                 ;;
11126         *)
11127 # we have an "xt" package, but it may omit Xt's dependency on X11
11128 echo "$as_me:11128: checking for usable X dependency" >&5
11129 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11130 if test "${cf_cv_xt_x11_compat+set}" = set; then
11131   echo $ECHO_N "(cached) $ECHO_C" >&6
11132 else
11133
11134 cat >conftest.$ac_ext <<_ACEOF
11135 #line 11135 "configure"
11136 #include "confdefs.h"
11137
11138 #include <X11/Xlib.h>
11139
11140 int
11141 main ()
11142 {
11143
11144         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11145         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11146         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11147         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11148
11149   ;
11150   return 0;
11151 }
11152 _ACEOF
11153 rm -f conftest.$ac_objext conftest$ac_exeext
11154 if { (eval echo "$as_me:11154: \"$ac_link\"") >&5
11155   (eval $ac_link) 2>&5
11156   ac_status=$?
11157   echo "$as_me:11157: \$? = $ac_status" >&5
11158   (exit $ac_status); } &&
11159          { ac_try='test -s conftest$ac_exeext'
11160   { (eval echo "$as_me:11160: \"$ac_try\"") >&5
11161   (eval $ac_try) 2>&5
11162   ac_status=$?
11163   echo "$as_me:11163: \$? = $ac_status" >&5
11164   (exit $ac_status); }; }; then
11165   cf_cv_xt_x11_compat=yes
11166 else
11167   echo "$as_me: failed program was:" >&5
11168 cat conftest.$ac_ext >&5
11169 cf_cv_xt_x11_compat=no
11170 fi
11171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11172 fi
11173 echo "$as_me:11173: result: $cf_cv_xt_x11_compat" >&5
11174 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11175                 if test "$cf_cv_xt_x11_compat" = no
11176                 then
11177                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11178
11179 echo "${as_me:-configure}:11179: testing work around broken X11 dependency ..." 1>&5
11180
11181                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11182
11183 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11184         test -n "$verbose" && echo "    found package x11" 1>&6
11185
11186 echo "${as_me:-configure}:11186: testing found package x11 ..." 1>&5
11187
11188         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11189         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11190         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11191
11192 echo "${as_me:-configure}:11192: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11193
11194         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11195
11196 echo "${as_me:-configure}:11196: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11197
11198 cf_fix_cppflags=no
11199 cf_new_cflags=
11200 cf_new_cppflags=
11201 cf_new_extra_cppflags=
11202
11203 for cf_add_cflags in $cf_pkgconfig_incs
11204 do
11205 case $cf_fix_cppflags in
11206 no)
11207         case $cf_add_cflags in #(vi
11208         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11209                 case $cf_add_cflags in
11210                 -D*)
11211                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11212
11213                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11214                                 && test -z "${cf_tst_cflags}" \
11215                                 && cf_fix_cppflags=yes
11216
11217                         if test $cf_fix_cppflags = yes ; then
11218                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11219                                 continue
11220                         elif test "${cf_tst_cflags}" = "\"'" ; then
11221                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11222                                 continue
11223                         fi
11224                         ;;
11225                 esac
11226                 case "$CPPFLAGS" in
11227                 *$cf_add_cflags) #(vi
11228                         ;;
11229                 *) #(vi
11230                         case $cf_add_cflags in #(vi
11231                         -D*)
11232                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11233
11234 CPPFLAGS=`echo "$CPPFLAGS" | \
11235         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11236                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11237
11238                                 ;;
11239                         esac
11240                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11241                         ;;
11242                 esac
11243                 ;;
11244         *)
11245                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11246                 ;;
11247         esac
11248         ;;
11249 yes)
11250         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11251
11252         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11253
11254         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11255                 && test -z "${cf_tst_cflags}" \
11256                 && cf_fix_cppflags=no
11257         ;;
11258 esac
11259 done
11260
11261 if test -n "$cf_new_cflags" ; then
11262
11263         CFLAGS="$CFLAGS $cf_new_cflags"
11264 fi
11265
11266 if test -n "$cf_new_cppflags" ; then
11267
11268         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11269 fi
11270
11271 if test -n "$cf_new_extra_cppflags" ; then
11272
11273         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11274 fi
11275
11276         LIBS="$cf_pkgconfig_libs $LIBS"
11277         :
11278 else
11279
11280 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11281
11282 echo "${as_me:-configure}:11282: testing ...before $LIBS ..." 1>&5
11283
11284 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
11285 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11286
11287 echo "${as_me:-configure}:11287: testing ...after  $LIBS ..." 1>&5
11288
11289 fi
11290
11291                 fi
11292                 ;;
11293         esac
11294
11295 echo "$as_me:11295: checking for usable X Toolkit package" >&5
11296 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11297 if test "${cf_cv_xt_ice_compat+set}" = set; then
11298   echo $ECHO_N "(cached) $ECHO_C" >&6
11299 else
11300
11301 cat >conftest.$ac_ext <<_ACEOF
11302 #line 11302 "configure"
11303 #include "confdefs.h"
11304
11305 #include <X11/Shell.h>
11306
11307 int
11308 main ()
11309 {
11310 int num = IceConnectionNumber(0)
11311
11312   ;
11313   return 0;
11314 }
11315 _ACEOF
11316 rm -f conftest.$ac_objext conftest$ac_exeext
11317 if { (eval echo "$as_me:11317: \"$ac_link\"") >&5
11318   (eval $ac_link) 2>&5
11319   ac_status=$?
11320   echo "$as_me:11320: \$? = $ac_status" >&5
11321   (exit $ac_status); } &&
11322          { ac_try='test -s conftest$ac_exeext'
11323   { (eval echo "$as_me:11323: \"$ac_try\"") >&5
11324   (eval $ac_try) 2>&5
11325   ac_status=$?
11326   echo "$as_me:11326: \$? = $ac_status" >&5
11327   (exit $ac_status); }; }; then
11328   cf_cv_xt_ice_compat=yes
11329 else
11330   echo "$as_me: failed program was:" >&5
11331 cat conftest.$ac_ext >&5
11332 cf_cv_xt_ice_compat=no
11333 fi
11334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11335 fi
11336 echo "$as_me:11336: result: $cf_cv_xt_ice_compat" >&5
11337 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11338
11339         if test "$cf_cv_xt_ice_compat" = no
11340         then
11341                 # workaround for broken ".pc" files used for X Toolkit.
11342                 case "x$X_PRE_LIBS" in #(vi
11343                 *-lICE*)
11344                         case "x$LIBS" in #(vi
11345                         *-lICE*) #(vi
11346                                 ;;
11347                         *)
11348                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11349
11350 echo "${as_me:-configure}:11350: testing work around broken ICE dependency ..." 1>&5
11351
11352 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11353         test -n "$verbose" && echo "    found package ice" 1>&6
11354
11355 echo "${as_me:-configure}:11355: testing found package ice ..." 1>&5
11356
11357         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11358         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11359         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11360
11361 echo "${as_me:-configure}:11361: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11362
11363         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11364
11365 echo "${as_me:-configure}:11365: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11366
11367 cf_fix_cppflags=no
11368 cf_new_cflags=
11369 cf_new_cppflags=
11370 cf_new_extra_cppflags=
11371
11372 for cf_add_cflags in $cf_pkgconfig_incs
11373 do
11374 case $cf_fix_cppflags in
11375 no)
11376         case $cf_add_cflags in #(vi
11377         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11378                 case $cf_add_cflags in
11379                 -D*)
11380                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11381
11382                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11383                                 && test -z "${cf_tst_cflags}" \
11384                                 && cf_fix_cppflags=yes
11385
11386                         if test $cf_fix_cppflags = yes ; then
11387                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11388                                 continue
11389                         elif test "${cf_tst_cflags}" = "\"'" ; then
11390                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11391                                 continue
11392                         fi
11393                         ;;
11394                 esac
11395                 case "$CPPFLAGS" in
11396                 *$cf_add_cflags) #(vi
11397                         ;;
11398                 *) #(vi
11399                         case $cf_add_cflags in #(vi
11400                         -D*)
11401                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11402
11403 CPPFLAGS=`echo "$CPPFLAGS" | \
11404         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11405                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11406
11407                                 ;;
11408                         esac
11409                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11410                         ;;
11411                 esac
11412                 ;;
11413         *)
11414                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11415                 ;;
11416         esac
11417         ;;
11418 yes)
11419         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11420
11421         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11422
11423         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11424                 && test -z "${cf_tst_cflags}" \
11425                 && cf_fix_cppflags=no
11426         ;;
11427 esac
11428 done
11429
11430 if test -n "$cf_new_cflags" ; then
11431
11432         CFLAGS="$CFLAGS $cf_new_cflags"
11433 fi
11434
11435 if test -n "$cf_new_cppflags" ; then
11436
11437         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11438 fi
11439
11440 if test -n "$cf_new_extra_cppflags" ; then
11441
11442         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11443 fi
11444
11445         LIBS="$cf_pkgconfig_libs $LIBS"
11446
11447 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11448         test -n "$verbose" && echo "    found package sm" 1>&6
11449
11450 echo "${as_me:-configure}:11450: testing found package sm ..." 1>&5
11451
11452         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11453         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11454         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11455
11456 echo "${as_me:-configure}:11456: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11457
11458         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11459
11460 echo "${as_me:-configure}:11460: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11461
11462 cf_fix_cppflags=no
11463 cf_new_cflags=
11464 cf_new_cppflags=
11465 cf_new_extra_cppflags=
11466
11467 for cf_add_cflags in $cf_pkgconfig_incs
11468 do
11469 case $cf_fix_cppflags in
11470 no)
11471         case $cf_add_cflags in #(vi
11472         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11473                 case $cf_add_cflags in
11474                 -D*)
11475                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11476
11477                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11478                                 && test -z "${cf_tst_cflags}" \
11479                                 && cf_fix_cppflags=yes
11480
11481                         if test $cf_fix_cppflags = yes ; then
11482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11483                                 continue
11484                         elif test "${cf_tst_cflags}" = "\"'" ; then
11485                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11486                                 continue
11487                         fi
11488                         ;;
11489                 esac
11490                 case "$CPPFLAGS" in
11491                 *$cf_add_cflags) #(vi
11492                         ;;
11493                 *) #(vi
11494                         case $cf_add_cflags in #(vi
11495                         -D*)
11496                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11497
11498 CPPFLAGS=`echo "$CPPFLAGS" | \
11499         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11500                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11501
11502                                 ;;
11503                         esac
11504                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11505                         ;;
11506                 esac
11507                 ;;
11508         *)
11509                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11510                 ;;
11511         esac
11512         ;;
11513 yes)
11514         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11515
11516         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11517
11518         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11519                 && test -z "${cf_tst_cflags}" \
11520                 && cf_fix_cppflags=no
11521         ;;
11522 esac
11523 done
11524
11525 if test -n "$cf_new_cflags" ; then
11526
11527         CFLAGS="$CFLAGS $cf_new_cflags"
11528 fi
11529
11530 if test -n "$cf_new_cppflags" ; then
11531
11532         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11533 fi
11534
11535 if test -n "$cf_new_extra_cppflags" ; then
11536
11537         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11538 fi
11539
11540         LIBS="$cf_pkgconfig_libs $LIBS"
11541         :
11542 else
11543         :
11544 fi
11545
11546 else
11547
11548 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11549
11550 echo "${as_me:-configure}:11550: testing ...before $LIBS ..." 1>&5
11551
11552 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
11553 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11554
11555 echo "${as_me:-configure}:11555: testing ...after  $LIBS ..." 1>&5
11556
11557 fi
11558
11559                                 ;;
11560                         esac
11561                         ;;
11562                 esac
11563         fi
11564
11565         cf_have_X_LIBS=yes
11566
11567 else
11568
11569         LDFLAGS="$X_LIBS $LDFLAGS"
11570
11571 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
11572
11573 echo "${as_me:-configure}:11573: testing checking additions to CFLAGS ..." 1>&5
11574
11575 cf_check_cflags="$CFLAGS"
11576 cf_check_cppflags="$CPPFLAGS"
11577
11578 cf_fix_cppflags=no
11579 cf_new_cflags=
11580 cf_new_cppflags=
11581 cf_new_extra_cppflags=
11582
11583 for cf_add_cflags in $X_CFLAGS
11584 do
11585 case $cf_fix_cppflags in
11586 no)
11587         case $cf_add_cflags in #(vi
11588         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11589                 case $cf_add_cflags in
11590                 -D*)
11591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11592
11593                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11594                                 && test -z "${cf_tst_cflags}" \
11595                                 && cf_fix_cppflags=yes
11596
11597                         if test $cf_fix_cppflags = yes ; then
11598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11599                                 continue
11600                         elif test "${cf_tst_cflags}" = "\"'" ; then
11601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11602                                 continue
11603                         fi
11604                         ;;
11605                 esac
11606                 case "$CPPFLAGS" in
11607                 *$cf_add_cflags) #(vi
11608                         ;;
11609                 *) #(vi
11610                         case $cf_add_cflags in #(vi
11611                         -D*)
11612                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11613
11614 CPPFLAGS=`echo "$CPPFLAGS" | \
11615         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11616                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11617
11618                                 ;;
11619                         esac
11620                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11621                         ;;
11622                 esac
11623                 ;;
11624         *)
11625                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11626                 ;;
11627         esac
11628         ;;
11629 yes)
11630         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11631
11632         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11633
11634         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11635                 && test -z "${cf_tst_cflags}" \
11636                 && cf_fix_cppflags=no
11637         ;;
11638 esac
11639 done
11640
11641 if test -n "$cf_new_cflags" ; then
11642         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11643
11644 echo "${as_me:-configure}:11644: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11645
11646         CFLAGS="$CFLAGS $cf_new_cflags"
11647 fi
11648
11649 if test -n "$cf_new_cppflags" ; then
11650         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11651
11652 echo "${as_me:-configure}:11652: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11653
11654         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11655 fi
11656
11657 if test -n "$cf_new_extra_cppflags" ; then
11658         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11659
11660 echo "${as_me:-configure}:11660: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11661
11662         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11663 fi
11664
11665 if test "$cf_check_cflags" != "$CFLAGS" ; then
11666 cat >conftest.$ac_ext <<_ACEOF
11667 #line 11667 "configure"
11668 #include "confdefs.h"
11669 #include <stdio.h>
11670 int
11671 main ()
11672 {
11673 printf("Hello world");
11674   ;
11675   return 0;
11676 }
11677 _ACEOF
11678 rm -f conftest.$ac_objext conftest$ac_exeext
11679 if { (eval echo "$as_me:11679: \"$ac_link\"") >&5
11680   (eval $ac_link) 2>&5
11681   ac_status=$?
11682   echo "$as_me:11682: \$? = $ac_status" >&5
11683   (exit $ac_status); } &&
11684          { ac_try='test -s conftest$ac_exeext'
11685   { (eval echo "$as_me:11685: \"$ac_try\"") >&5
11686   (eval $ac_try) 2>&5
11687   ac_status=$?
11688   echo "$as_me:11688: \$? = $ac_status" >&5
11689   (exit $ac_status); }; }; then
11690   :
11691 else
11692   echo "$as_me: failed program was:" >&5
11693 cat conftest.$ac_ext >&5
11694 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11695
11696 echo "${as_me:-configure}:11696: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11697
11698          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11699                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
11700
11701 echo "${as_me:-configure}:11701: testing but keeping change to \$CPPFLAGS ..." 1>&5
11702
11703          fi
11704          CFLAGS="$cf_check_flags"
11705 fi
11706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11707 fi
11708
11709         echo "$as_me:11709: checking for XOpenDisplay" >&5
11710 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11711 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11712   echo $ECHO_N "(cached) $ECHO_C" >&6
11713 else
11714   cat >conftest.$ac_ext <<_ACEOF
11715 #line 11715 "configure"
11716 #include "confdefs.h"
11717 /* System header to define __stub macros and hopefully few prototypes,
11718     which can conflict with char XOpenDisplay (); below.  */
11719 #include <assert.h>
11720 /* Override any gcc2 internal prototype to avoid an error.  */
11721 #ifdef __cplusplus
11722 extern "C"
11723 #endif
11724 /* We use char because int might match the return type of a gcc2
11725    builtin and then its argument prototype would still apply.  */
11726 char XOpenDisplay ();
11727 char (*f) ();
11728
11729 int
11730 main ()
11731 {
11732 /* The GNU C library defines this for functions which it implements
11733     to always fail with ENOSYS.  Some functions are actually named
11734     something starting with __ and the normal name is an alias.  */
11735 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11736 choke me
11737 #else
11738 f = XOpenDisplay;
11739 #endif
11740
11741   ;
11742   return 0;
11743 }
11744 _ACEOF
11745 rm -f conftest.$ac_objext conftest$ac_exeext
11746 if { (eval echo "$as_me:11746: \"$ac_link\"") >&5
11747   (eval $ac_link) 2>&5
11748   ac_status=$?
11749   echo "$as_me:11749: \$? = $ac_status" >&5
11750   (exit $ac_status); } &&
11751          { ac_try='test -s conftest$ac_exeext'
11752   { (eval echo "$as_me:11752: \"$ac_try\"") >&5
11753   (eval $ac_try) 2>&5
11754   ac_status=$?
11755   echo "$as_me:11755: \$? = $ac_status" >&5
11756   (exit $ac_status); }; }; then
11757   ac_cv_func_XOpenDisplay=yes
11758 else
11759   echo "$as_me: failed program was:" >&5
11760 cat conftest.$ac_ext >&5
11761 ac_cv_func_XOpenDisplay=no
11762 fi
11763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11764 fi
11765 echo "$as_me:11765: result: $ac_cv_func_XOpenDisplay" >&5
11766 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11767 if test $ac_cv_func_XOpenDisplay = yes; then
11768   :
11769 else
11770
11771         echo "$as_me:11771: checking for XOpenDisplay in -lX11" >&5
11772 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11773 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11774   echo $ECHO_N "(cached) $ECHO_C" >&6
11775 else
11776   ac_check_lib_save_LIBS=$LIBS
11777 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11778 cat >conftest.$ac_ext <<_ACEOF
11779 #line 11779 "configure"
11780 #include "confdefs.h"
11781
11782 /* Override any gcc2 internal prototype to avoid an error.  */
11783 #ifdef __cplusplus
11784 extern "C"
11785 #endif
11786 /* We use char because int might match the return type of a gcc2
11787    builtin and then its argument prototype would still apply.  */
11788 char XOpenDisplay ();
11789 int
11790 main ()
11791 {
11792 XOpenDisplay ();
11793   ;
11794   return 0;
11795 }
11796 _ACEOF
11797 rm -f conftest.$ac_objext conftest$ac_exeext
11798 if { (eval echo "$as_me:11798: \"$ac_link\"") >&5
11799   (eval $ac_link) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit $ac_status); } &&
11803          { ac_try='test -s conftest$ac_exeext'
11804   { (eval echo "$as_me:11804: \"$ac_try\"") >&5
11805   (eval $ac_try) 2>&5
11806   ac_status=$?
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit $ac_status); }; }; then
11809   ac_cv_lib_X11_XOpenDisplay=yes
11810 else
11811   echo "$as_me: failed program was:" >&5
11812 cat conftest.$ac_ext >&5
11813 ac_cv_lib_X11_XOpenDisplay=no
11814 fi
11815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11816 LIBS=$ac_check_lib_save_LIBS
11817 fi
11818 echo "$as_me:11818: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11819 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11820 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
11821   LIBS="-lX11 $LIBS"
11822 fi
11823
11824 fi
11825
11826         echo "$as_me:11826: checking for XtAppInitialize" >&5
11827 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11828 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11829   echo $ECHO_N "(cached) $ECHO_C" >&6
11830 else
11831   cat >conftest.$ac_ext <<_ACEOF
11832 #line 11832 "configure"
11833 #include "confdefs.h"
11834 /* System header to define __stub macros and hopefully few prototypes,
11835     which can conflict with char XtAppInitialize (); below.  */
11836 #include <assert.h>
11837 /* Override any gcc2 internal prototype to avoid an error.  */
11838 #ifdef __cplusplus
11839 extern "C"
11840 #endif
11841 /* We use char because int might match the return type of a gcc2
11842    builtin and then its argument prototype would still apply.  */
11843 char XtAppInitialize ();
11844 char (*f) ();
11845
11846 int
11847 main ()
11848 {
11849 /* The GNU C library defines this for functions which it implements
11850     to always fail with ENOSYS.  Some functions are actually named
11851     something starting with __ and the normal name is an alias.  */
11852 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11853 choke me
11854 #else
11855 f = XtAppInitialize;
11856 #endif
11857
11858   ;
11859   return 0;
11860 }
11861 _ACEOF
11862 rm -f conftest.$ac_objext conftest$ac_exeext
11863 if { (eval echo "$as_me:11863: \"$ac_link\"") >&5
11864   (eval $ac_link) 2>&5
11865   ac_status=$?
11866   echo "$as_me:11866: \$? = $ac_status" >&5
11867   (exit $ac_status); } &&
11868          { ac_try='test -s conftest$ac_exeext'
11869   { (eval echo "$as_me:11869: \"$ac_try\"") >&5
11870   (eval $ac_try) 2>&5
11871   ac_status=$?
11872   echo "$as_me:11872: \$? = $ac_status" >&5
11873   (exit $ac_status); }; }; then
11874   ac_cv_func_XtAppInitialize=yes
11875 else
11876   echo "$as_me: failed program was:" >&5
11877 cat conftest.$ac_ext >&5
11878 ac_cv_func_XtAppInitialize=no
11879 fi
11880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11881 fi
11882 echo "$as_me:11882: result: $ac_cv_func_XtAppInitialize" >&5
11883 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11884 if test $ac_cv_func_XtAppInitialize = yes; then
11885   :
11886 else
11887
11888         echo "$as_me:11888: checking for XtAppInitialize in -lXt" >&5
11889 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11890 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11891   echo $ECHO_N "(cached) $ECHO_C" >&6
11892 else
11893   ac_check_lib_save_LIBS=$LIBS
11894 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11895 cat >conftest.$ac_ext <<_ACEOF
11896 #line 11896 "configure"
11897 #include "confdefs.h"
11898
11899 /* Override any gcc2 internal prototype to avoid an error.  */
11900 #ifdef __cplusplus
11901 extern "C"
11902 #endif
11903 /* We use char because int might match the return type of a gcc2
11904    builtin and then its argument prototype would still apply.  */
11905 char XtAppInitialize ();
11906 int
11907 main ()
11908 {
11909 XtAppInitialize ();
11910   ;
11911   return 0;
11912 }
11913 _ACEOF
11914 rm -f conftest.$ac_objext conftest$ac_exeext
11915 if { (eval echo "$as_me:11915: \"$ac_link\"") >&5
11916   (eval $ac_link) 2>&5
11917   ac_status=$?
11918   echo "$as_me:11918: \$? = $ac_status" >&5
11919   (exit $ac_status); } &&
11920          { ac_try='test -s conftest$ac_exeext'
11921   { (eval echo "$as_me:11921: \"$ac_try\"") >&5
11922   (eval $ac_try) 2>&5
11923   ac_status=$?
11924   echo "$as_me:11924: \$? = $ac_status" >&5
11925   (exit $ac_status); }; }; then
11926   ac_cv_lib_Xt_XtAppInitialize=yes
11927 else
11928   echo "$as_me: failed program was:" >&5
11929 cat conftest.$ac_ext >&5
11930 ac_cv_lib_Xt_XtAppInitialize=no
11931 fi
11932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11933 LIBS=$ac_check_lib_save_LIBS
11934 fi
11935 echo "$as_me:11935: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11936 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11937 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
11938   cat >>confdefs.h <<\EOF
11939 #define HAVE_LIBXT 1
11940 EOF
11941
11942                  cf_have_X_LIBS=Xt
11943                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11944 fi
11945
11946 fi
11947
11948 fi
11949
11950 if test $cf_have_X_LIBS = no ; then
11951         { echo "$as_me:11951: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11952 test program.  You will have to check and add the proper libraries by hand
11953 to makefile." >&5
11954 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11955 test program.  You will have to check and add the proper libraries by hand
11956 to makefile." >&2;}
11957 fi
11958
11959 cf_x_athena_root=$cf_x_athena
11960 cf_x_athena_inc=""
11961
11962 for cf_path in default \
11963         /usr/contrib/X11R6 \
11964         /usr/contrib/X11R5 \
11965         /usr/lib/X11R5 \
11966         /usr/local
11967 do
11968         if test -z "$cf_x_athena_inc" ; then
11969                 cf_save="$CPPFLAGS"
11970                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
11971                 if test $cf_path != default ; then
11972                         CPPFLAGS="$cf_save -I$cf_path/include"
11973                         echo "$as_me:11973: checking for $cf_test in $cf_path" >&5
11974 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
11975                 else
11976                         echo "$as_me:11976: checking for $cf_test" >&5
11977 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
11978                 fi
11979                 cat >conftest.$ac_ext <<_ACEOF
11980 #line 11980 "configure"
11981 #include "confdefs.h"
11982
11983 #include <X11/Intrinsic.h>
11984 #include <$cf_test>
11985 int
11986 main ()
11987 {
11988
11989   ;
11990   return 0;
11991 }
11992 _ACEOF
11993 rm -f conftest.$ac_objext
11994 if { (eval echo "$as_me:11994: \"$ac_compile\"") >&5
11995   (eval $ac_compile) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit $ac_status); } &&
11999          { ac_try='test -s conftest.$ac_objext'
12000   { (eval echo "$as_me:12000: \"$ac_try\"") >&5
12001   (eval $ac_try) 2>&5
12002   ac_status=$?
12003   echo "$as_me:12003: \$? = $ac_status" >&5
12004   (exit $ac_status); }; }; then
12005   cf_result=yes
12006 else
12007   echo "$as_me: failed program was:" >&5
12008 cat conftest.$ac_ext >&5
12009 cf_result=no
12010 fi
12011 rm -f conftest.$ac_objext conftest.$ac_ext
12012                 echo "$as_me:12012: result: $cf_result" >&5
12013 echo "${ECHO_T}$cf_result" >&6
12014                 if test "$cf_result" = yes ; then
12015                         cf_x_athena_inc=$cf_path
12016                         break
12017                 else
12018                         CPPFLAGS="$cf_save"
12019                 fi
12020         fi
12021 done
12022
12023 if test -z "$cf_x_athena_inc" ; then
12024         { echo "$as_me:12024: WARNING: Unable to successfully find Athena header files with test program" >&5
12025 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12026 elif test "$cf_x_athena_inc" != default ; then
12027         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12028 fi
12029
12030 cf_x_athena_root=$cf_x_athena
12031 cf_x_athena_lib=""
12032
12033 for cf_path in default \
12034         /usr/contrib/X11R6 \
12035         /usr/contrib/X11R5 \
12036         /usr/lib/X11R5 \
12037         /usr/local
12038 do
12039         for cf_lib in \
12040                 ${cf_x_athena_root} \
12041                 ${cf_x_athena_root}7 \
12042                 ${cf_x_athena_root}6
12043         do
12044         for cf_libs in \
12045                 "-l$cf_lib -lXmu" \
12046                 "-l$cf_lib -lXpm -lXmu" \
12047                 "-l${cf_lib}_s -lXmu_s"
12048         do
12049                 if test -z "$cf_x_athena_lib" ; then
12050                         cf_save="$LIBS"
12051                         cf_test=XawSimpleMenuAddGlobalActions
12052                         if test $cf_path != default ; then
12053                                 LIBS="-L$cf_path/lib $cf_libs $LIBS"
12054                                 echo "$as_me:12054: checking for $cf_libs in $cf_path" >&5
12055 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12056                         else
12057                                 LIBS="$cf_libs $LIBS"
12058                                 echo "$as_me:12058: checking for $cf_test in $cf_libs" >&5
12059 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12060                         fi
12061                         cat >conftest.$ac_ext <<_ACEOF
12062 #line 12062 "configure"
12063 #include "confdefs.h"
12064
12065 #include <X11/Intrinsic.h>
12066 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12067
12068 int
12069 main ()
12070 {
12071
12072 $cf_test((XtAppContext) 0)
12073   ;
12074   return 0;
12075 }
12076 _ACEOF
12077 rm -f conftest.$ac_objext conftest$ac_exeext
12078 if { (eval echo "$as_me:12078: \"$ac_link\"") >&5
12079   (eval $ac_link) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit $ac_status); } &&
12083          { ac_try='test -s conftest$ac_exeext'
12084   { (eval echo "$as_me:12084: \"$ac_try\"") >&5
12085   (eval $ac_try) 2>&5
12086   ac_status=$?
12087   echo "$as_me:12087: \$? = $ac_status" >&5
12088   (exit $ac_status); }; }; then
12089   cf_result=yes
12090 else
12091   echo "$as_me: failed program was:" >&5
12092 cat conftest.$ac_ext >&5
12093 cf_result=no
12094 fi
12095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12096                         echo "$as_me:12096: result: $cf_result" >&5
12097 echo "${ECHO_T}$cf_result" >&6
12098                         if test "$cf_result" = yes ; then
12099                                 cf_x_athena_lib="$cf_libs"
12100                                 break
12101                         fi
12102                         LIBS="$cf_save"
12103                 fi
12104         done # cf_libs
12105                 test -n "$cf_x_athena_lib" && break
12106         done # cf_lib
12107 done
12108
12109 if test -z "$cf_x_athena_lib" ; then
12110         { { echo "$as_me:12110: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12111 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12112    { (exit 1); exit 1; }; }
12113 fi
12114
12115 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12116
12117 cat >>confdefs.h <<EOF
12118 #define $cf_x_athena_LIBS 1
12119 EOF
12120
12121 fi
12122
12123 for ac_prog in xcurses-config
12124 do
12125   # Extract the first word of "$ac_prog", so it can be a program name with args.
12126 set dummy $ac_prog; ac_word=$2
12127 echo "$as_me:12127: checking for $ac_word" >&5
12128 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12129 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
12130   echo $ECHO_N "(cached) $ECHO_C" >&6
12131 else
12132   case $XCURSES_CONFIG in
12133   [\\/]* | ?:[\\/]*)
12134   ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
12135   ;;
12136   *)
12137   ac_save_IFS=$IFS; IFS=$ac_path_separator
12138 ac_dummy="$PATH"
12139 for ac_dir in $ac_dummy; do
12140   IFS=$ac_save_IFS
12141   test -z "$ac_dir" && ac_dir=.
12142   if $as_executable_p "$ac_dir/$ac_word"; then
12143    ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
12144    echo "$as_me:12144: found $ac_dir/$ac_word" >&5
12145    break
12146 fi
12147 done
12148
12149   ;;
12150 esac
12151 fi
12152 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
12153
12154 if test -n "$XCURSES_CONFIG"; then
12155   echo "$as_me:12155: result: $XCURSES_CONFIG" >&5
12156 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12157 else
12158   echo "$as_me:12158: result: no" >&5
12159 echo "${ECHO_T}no" >&6
12160 fi
12161
12162   test -n "$XCURSES_CONFIG" && break
12163 done
12164 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
12165
12166 if test "$XCURSES_CONFIG" != none ; then
12167
12168 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12169 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12170
12171 cf_cv_lib_XCurses=yes
12172
12173 else
12174
12175 LDFLAGS="$LDFLAGS $X_LIBS"
12176
12177 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12178
12179 echo "${as_me:-configure}:12179: testing checking additions to CFLAGS ..." 1>&5
12180
12181 cf_check_cflags="$CFLAGS"
12182 cf_check_cppflags="$CPPFLAGS"
12183
12184 cf_fix_cppflags=no
12185 cf_new_cflags=
12186 cf_new_cppflags=
12187 cf_new_extra_cppflags=
12188
12189 for cf_add_cflags in $X_CFLAGS
12190 do
12191 case $cf_fix_cppflags in
12192 no)
12193         case $cf_add_cflags in #(vi
12194         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12195                 case $cf_add_cflags in
12196                 -D*)
12197                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12198
12199                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12200                                 && test -z "${cf_tst_cflags}" \
12201                                 && cf_fix_cppflags=yes
12202
12203                         if test $cf_fix_cppflags = yes ; then
12204                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12205                                 continue
12206                         elif test "${cf_tst_cflags}" = "\"'" ; then
12207                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12208                                 continue
12209                         fi
12210                         ;;
12211                 esac
12212                 case "$CPPFLAGS" in
12213                 *$cf_add_cflags) #(vi
12214                         ;;
12215                 *) #(vi
12216                         case $cf_add_cflags in #(vi
12217                         -D*)
12218                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12219
12220 CPPFLAGS=`echo "$CPPFLAGS" | \
12221         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12222                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12223
12224                                 ;;
12225                         esac
12226                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12227                         ;;
12228                 esac
12229                 ;;
12230         *)
12231                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12232                 ;;
12233         esac
12234         ;;
12235 yes)
12236         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12237
12238         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12239
12240         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12241                 && test -z "${cf_tst_cflags}" \
12242                 && cf_fix_cppflags=no
12243         ;;
12244 esac
12245 done
12246
12247 if test -n "$cf_new_cflags" ; then
12248         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12249
12250 echo "${as_me:-configure}:12250: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12251
12252         CFLAGS="$CFLAGS $cf_new_cflags"
12253 fi
12254
12255 if test -n "$cf_new_cppflags" ; then
12256         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12257
12258 echo "${as_me:-configure}:12258: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12259
12260         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12261 fi
12262
12263 if test -n "$cf_new_extra_cppflags" ; then
12264         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12265
12266 echo "${as_me:-configure}:12266: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12267
12268         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12269 fi
12270
12271 if test "$cf_check_cflags" != "$CFLAGS" ; then
12272 cat >conftest.$ac_ext <<_ACEOF
12273 #line 12273 "configure"
12274 #include "confdefs.h"
12275 #include <stdio.h>
12276 int
12277 main ()
12278 {
12279 printf("Hello world");
12280   ;
12281   return 0;
12282 }
12283 _ACEOF
12284 rm -f conftest.$ac_objext conftest$ac_exeext
12285 if { (eval echo "$as_me:12285: \"$ac_link\"") >&5
12286   (eval $ac_link) 2>&5
12287   ac_status=$?
12288   echo "$as_me:12288: \$? = $ac_status" >&5
12289   (exit $ac_status); } &&
12290          { ac_try='test -s conftest$ac_exeext'
12291   { (eval echo "$as_me:12291: \"$ac_try\"") >&5
12292   (eval $ac_try) 2>&5
12293   ac_status=$?
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit $ac_status); }; }; then
12296   :
12297 else
12298   echo "$as_me: failed program was:" >&5
12299 cat conftest.$ac_ext >&5
12300 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12301
12302 echo "${as_me:-configure}:12302: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12303
12304          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12305                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12306
12307 echo "${as_me:-configure}:12307: testing but keeping change to \$CPPFLAGS ..." 1>&5
12308
12309          fi
12310          CFLAGS="$cf_check_flags"
12311 fi
12312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12313 fi
12314
12315 echo "$as_me:12315: checking for XOpenDisplay in -lX11" >&5
12316 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12317 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12318   echo $ECHO_N "(cached) $ECHO_C" >&6
12319 else
12320   ac_check_lib_save_LIBS=$LIBS
12321 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12322 cat >conftest.$ac_ext <<_ACEOF
12323 #line 12323 "configure"
12324 #include "confdefs.h"
12325
12326 /* Override any gcc2 internal prototype to avoid an error.  */
12327 #ifdef __cplusplus
12328 extern "C"
12329 #endif
12330 /* We use char because int might match the return type of a gcc2
12331    builtin and then its argument prototype would still apply.  */
12332 char XOpenDisplay ();
12333 int
12334 main ()
12335 {
12336 XOpenDisplay ();
12337   ;
12338   return 0;
12339 }
12340 _ACEOF
12341 rm -f conftest.$ac_objext conftest$ac_exeext
12342 if { (eval echo "$as_me:12342: \"$ac_link\"") >&5
12343   (eval $ac_link) 2>&5
12344   ac_status=$?
12345   echo "$as_me:12345: \$? = $ac_status" >&5
12346   (exit $ac_status); } &&
12347          { ac_try='test -s conftest$ac_exeext'
12348   { (eval echo "$as_me:12348: \"$ac_try\"") >&5
12349   (eval $ac_try) 2>&5
12350   ac_status=$?
12351   echo "$as_me:12351: \$? = $ac_status" >&5
12352   (exit $ac_status); }; }; then
12353   ac_cv_lib_X11_XOpenDisplay=yes
12354 else
12355   echo "$as_me: failed program was:" >&5
12356 cat conftest.$ac_ext >&5
12357 ac_cv_lib_X11_XOpenDisplay=no
12358 fi
12359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12360 LIBS=$ac_check_lib_save_LIBS
12361 fi
12362 echo "$as_me:12362: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12363 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12364 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12365   LIBS="-lX11 $LIBS"
12366 fi
12367
12368 echo "$as_me:12368: checking for XCurses library" >&5
12369 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12370 if test "${cf_cv_lib_XCurses+set}" = set; then
12371   echo $ECHO_N "(cached) $ECHO_C" >&6
12372 else
12373
12374 LIBS="-lXCurses $LIBS"
12375 cat >conftest.$ac_ext <<_ACEOF
12376 #line 12376 "configure"
12377 #include "confdefs.h"
12378
12379 #include <xcurses.h>
12380 char *XCursesProgramName = "test";
12381
12382 int
12383 main ()
12384 {
12385 XCursesExit();
12386   ;
12387   return 0;
12388 }
12389 _ACEOF
12390 rm -f conftest.$ac_objext conftest$ac_exeext
12391 if { (eval echo "$as_me:12391: \"$ac_link\"") >&5
12392   (eval $ac_link) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); } &&
12396          { ac_try='test -s conftest$ac_exeext'
12397   { (eval echo "$as_me:12397: \"$ac_try\"") >&5
12398   (eval $ac_try) 2>&5
12399   ac_status=$?
12400   echo "$as_me:12400: \$? = $ac_status" >&5
12401   (exit $ac_status); }; }; then
12402   cf_cv_lib_XCurses=yes
12403 else
12404   echo "$as_me: failed program was:" >&5
12405 cat conftest.$ac_ext >&5
12406 cf_cv_lib_XCurses=no
12407 fi
12408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12409
12410 fi
12411 echo "$as_me:12411: result: $cf_cv_lib_XCurses" >&5
12412 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12413
12414 fi
12415
12416 if test $cf_cv_lib_XCurses = yes ; then
12417         cat >>confdefs.h <<\EOF
12418 #define UNIX 1
12419 EOF
12420
12421         cat >>confdefs.h <<\EOF
12422 #define XCURSES 1
12423 EOF
12424
12425         echo "$as_me:12425: checking for xcurses.h" >&5
12426 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12427 if test "${ac_cv_header_xcurses_h+set}" = set; then
12428   echo $ECHO_N "(cached) $ECHO_C" >&6
12429 else
12430   cat >conftest.$ac_ext <<_ACEOF
12431 #line 12431 "configure"
12432 #include "confdefs.h"
12433 #include <xcurses.h>
12434 _ACEOF
12435 if { (eval echo "$as_me:12435: \"$ac_cpp conftest.$ac_ext\"") >&5
12436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12437   ac_status=$?
12438   egrep -v '^ *\+' conftest.er1 >conftest.err
12439   rm -f conftest.er1
12440   cat conftest.err >&5
12441   echo "$as_me:12441: \$? = $ac_status" >&5
12442   (exit $ac_status); } >/dev/null; then
12443   if test -s conftest.err; then
12444     ac_cpp_err=$ac_c_preproc_warn_flag
12445   else
12446     ac_cpp_err=
12447   fi
12448 else
12449   ac_cpp_err=yes
12450 fi
12451 if test -z "$ac_cpp_err"; then
12452   ac_cv_header_xcurses_h=yes
12453 else
12454   echo "$as_me: failed program was:" >&5
12455   cat conftest.$ac_ext >&5
12456   ac_cv_header_xcurses_h=no
12457 fi
12458 rm -f conftest.err conftest.$ac_ext
12459 fi
12460 echo "$as_me:12460: result: $ac_cv_header_xcurses_h" >&5
12461 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12462 if test $ac_cv_header_xcurses_h = yes; then
12463   cat >>confdefs.h <<\EOF
12464 #define HAVE_XCURSES 1
12465 EOF
12466
12467 fi
12468
12469 else
12470         { { echo "$as_me:12470: error: Cannot link with XCurses" >&5
12471 echo "$as_me: error: Cannot link with XCurses" >&2;}
12472    { (exit 1); exit 1; }; }
12473 fi
12474
12475         ;;
12476 esac
12477
12478 case $cf_cv_screen in #(vi
12479 pdcurses) #(vi
12480         ;;
12481 *)
12482         # look for curses-related libraries
12483
12484 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
12485 echo "$as_me:12485: checking for new_panel in -lpanel$cf_cv_libtype" >&5
12486 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
12487 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12488   echo $ECHO_N "(cached) $ECHO_C" >&6
12489 else
12490   ac_check_lib_save_LIBS=$LIBS
12491 LIBS="-lpanel$cf_cv_libtype  $LIBS"
12492 cat >conftest.$ac_ext <<_ACEOF
12493 #line 12493 "configure"
12494 #include "confdefs.h"
12495
12496 /* Override any gcc2 internal prototype to avoid an error.  */
12497 #ifdef __cplusplus
12498 extern "C"
12499 #endif
12500 /* We use char because int might match the return type of a gcc2
12501    builtin and then its argument prototype would still apply.  */
12502 char new_panel ();
12503 int
12504 main ()
12505 {
12506 new_panel ();
12507   ;
12508   return 0;
12509 }
12510 _ACEOF
12511 rm -f conftest.$ac_objext conftest$ac_exeext
12512 if { (eval echo "$as_me:12512: \"$ac_link\"") >&5
12513   (eval $ac_link) 2>&5
12514   ac_status=$?
12515   echo "$as_me:12515: \$? = $ac_status" >&5
12516   (exit $ac_status); } &&
12517          { ac_try='test -s conftest$ac_exeext'
12518   { (eval echo "$as_me:12518: \"$ac_try\"") >&5
12519   (eval $ac_try) 2>&5
12520   ac_status=$?
12521   echo "$as_me:12521: \$? = $ac_status" >&5
12522   (exit $ac_status); }; }; then
12523   eval "$as_ac_Lib=yes"
12524 else
12525   echo "$as_me: failed program was:" >&5
12526 cat conftest.$ac_ext >&5
12527 eval "$as_ac_Lib=no"
12528 fi
12529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12530 LIBS=$ac_check_lib_save_LIBS
12531 fi
12532 echo "$as_me:12532: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12533 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12534 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12535   cat >>confdefs.h <<EOF
12536 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
12537 EOF
12538
12539   LIBS="-lpanel$cf_cv_libtype $LIBS"
12540
12541 fi
12542
12543 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
12544 echo "$as_me:12544: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
12545 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
12546 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12547   echo $ECHO_N "(cached) $ECHO_C" >&6
12548 else
12549   ac_check_lib_save_LIBS=$LIBS
12550 LIBS="-lmenu$cf_cv_libtype  $LIBS"
12551 cat >conftest.$ac_ext <<_ACEOF
12552 #line 12552 "configure"
12553 #include "confdefs.h"
12554
12555 /* Override any gcc2 internal prototype to avoid an error.  */
12556 #ifdef __cplusplus
12557 extern "C"
12558 #endif
12559 /* We use char because int might match the return type of a gcc2
12560    builtin and then its argument prototype would still apply.  */
12561 char menu_driver ();
12562 int
12563 main ()
12564 {
12565 menu_driver ();
12566   ;
12567   return 0;
12568 }
12569 _ACEOF
12570 rm -f conftest.$ac_objext conftest$ac_exeext
12571 if { (eval echo "$as_me:12571: \"$ac_link\"") >&5
12572   (eval $ac_link) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); } &&
12576          { ac_try='test -s conftest$ac_exeext'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   eval "$as_ac_Lib=yes"
12583 else
12584   echo "$as_me: failed program was:" >&5
12585 cat conftest.$ac_ext >&5
12586 eval "$as_ac_Lib=no"
12587 fi
12588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12589 LIBS=$ac_check_lib_save_LIBS
12590 fi
12591 echo "$as_me:12591: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12592 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12593 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12594   cat >>confdefs.h <<EOF
12595 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
12596 EOF
12597
12598   LIBS="-lmenu$cf_cv_libtype $LIBS"
12599
12600 fi
12601
12602 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
12603 echo "$as_me:12603: checking for form_driver in -lform$cf_cv_libtype" >&5
12604 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
12605 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12606   echo $ECHO_N "(cached) $ECHO_C" >&6
12607 else
12608   ac_check_lib_save_LIBS=$LIBS
12609 LIBS="-lform$cf_cv_libtype  $LIBS"
12610 cat >conftest.$ac_ext <<_ACEOF
12611 #line 12611 "configure"
12612 #include "confdefs.h"
12613
12614 /* Override any gcc2 internal prototype to avoid an error.  */
12615 #ifdef __cplusplus
12616 extern "C"
12617 #endif
12618 /* We use char because int might match the return type of a gcc2
12619    builtin and then its argument prototype would still apply.  */
12620 char form_driver ();
12621 int
12622 main ()
12623 {
12624 form_driver ();
12625   ;
12626   return 0;
12627 }
12628 _ACEOF
12629 rm -f conftest.$ac_objext conftest$ac_exeext
12630 if { (eval echo "$as_me:12630: \"$ac_link\"") >&5
12631   (eval $ac_link) 2>&5
12632   ac_status=$?
12633   echo "$as_me:12633: \$? = $ac_status" >&5
12634   (exit $ac_status); } &&
12635          { ac_try='test -s conftest$ac_exeext'
12636   { (eval echo "$as_me:12636: \"$ac_try\"") >&5
12637   (eval $ac_try) 2>&5
12638   ac_status=$?
12639   echo "$as_me:12639: \$? = $ac_status" >&5
12640   (exit $ac_status); }; }; then
12641   eval "$as_ac_Lib=yes"
12642 else
12643   echo "$as_me: failed program was:" >&5
12644 cat conftest.$ac_ext >&5
12645 eval "$as_ac_Lib=no"
12646 fi
12647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12648 LIBS=$ac_check_lib_save_LIBS
12649 fi
12650 echo "$as_me:12650: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12651 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12652 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12653   cat >>confdefs.h <<EOF
12654 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
12655 EOF
12656
12657   LIBS="-lform$cf_cv_libtype $LIBS"
12658
12659 fi
12660
12661         # look for curses-related headers
12662
12663 for ac_header in \
12664                 nc_alloc.h \
12665                 nomacros.h \
12666                 form.h \
12667                 menu.h \
12668                 panel.h \
12669                 term_entry.h \
12670
12671 do
12672 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12673 echo "$as_me:12673: checking for $ac_header" >&5
12674 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12675 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12676   echo $ECHO_N "(cached) $ECHO_C" >&6
12677 else
12678   cat >conftest.$ac_ext <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681 #include <$ac_header>
12682 _ACEOF
12683 if { (eval echo "$as_me:12683: \"$ac_cpp conftest.$ac_ext\"") >&5
12684   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12685   ac_status=$?
12686   egrep -v '^ *\+' conftest.er1 >conftest.err
12687   rm -f conftest.er1
12688   cat conftest.err >&5
12689   echo "$as_me:12689: \$? = $ac_status" >&5
12690   (exit $ac_status); } >/dev/null; then
12691   if test -s conftest.err; then
12692     ac_cpp_err=$ac_c_preproc_warn_flag
12693   else
12694     ac_cpp_err=
12695   fi
12696 else
12697   ac_cpp_err=yes
12698 fi
12699 if test -z "$ac_cpp_err"; then
12700   eval "$as_ac_Header=yes"
12701 else
12702   echo "$as_me: failed program was:" >&5
12703   cat conftest.$ac_ext >&5
12704   eval "$as_ac_Header=no"
12705 fi
12706 rm -f conftest.err conftest.$ac_ext
12707 fi
12708 echo "$as_me:12708: result: `eval echo '${'$as_ac_Header'}'`" >&5
12709 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12710 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12711   cat >>confdefs.h <<EOF
12712 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12713 EOF
12714
12715 fi
12716 done
12717
12718         ;;
12719 esac
12720
12721 echo "$as_me:12721: checking return type of signal handlers" >&5
12722 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12723 if test "${ac_cv_type_signal+set}" = set; then
12724   echo $ECHO_N "(cached) $ECHO_C" >&6
12725 else
12726   cat >conftest.$ac_ext <<_ACEOF
12727 #line 12727 "configure"
12728 #include "confdefs.h"
12729 #include <sys/types.h>
12730 #include <signal.h>
12731 #ifdef signal
12732 # undef signal
12733 #endif
12734 #ifdef __cplusplus
12735 extern "C" void (*signal (int, void (*)(int)))(int);
12736 #else
12737 void (*signal ()) ();
12738 #endif
12739
12740 int
12741 main ()
12742 {
12743 int i;
12744   ;
12745   return 0;
12746 }
12747 _ACEOF
12748 rm -f conftest.$ac_objext
12749 if { (eval echo "$as_me:12749: \"$ac_compile\"") >&5
12750   (eval $ac_compile) 2>&5
12751   ac_status=$?
12752   echo "$as_me:12752: \$? = $ac_status" >&5
12753   (exit $ac_status); } &&
12754          { ac_try='test -s conftest.$ac_objext'
12755   { (eval echo "$as_me:12755: \"$ac_try\"") >&5
12756   (eval $ac_try) 2>&5
12757   ac_status=$?
12758   echo "$as_me:12758: \$? = $ac_status" >&5
12759   (exit $ac_status); }; }; then
12760   ac_cv_type_signal=void
12761 else
12762   echo "$as_me: failed program was:" >&5
12763 cat conftest.$ac_ext >&5
12764 ac_cv_type_signal=int
12765 fi
12766 rm -f conftest.$ac_objext conftest.$ac_ext
12767 fi
12768 echo "$as_me:12768: result: $ac_cv_type_signal" >&5
12769 echo "${ECHO_T}$ac_cv_type_signal" >&6
12770
12771 cat >>confdefs.h <<EOF
12772 #define RETSIGTYPE $ac_cv_type_signal
12773 EOF
12774
12775 echo "$as_me:12775: checking for ANSI C header files" >&5
12776 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12777 if test "${ac_cv_header_stdc+set}" = set; then
12778   echo $ECHO_N "(cached) $ECHO_C" >&6
12779 else
12780   cat >conftest.$ac_ext <<_ACEOF
12781 #line 12781 "configure"
12782 #include "confdefs.h"
12783 #include <stdlib.h>
12784 #include <stdarg.h>
12785 #include <string.h>
12786 #include <float.h>
12787
12788 _ACEOF
12789 if { (eval echo "$as_me:12789: \"$ac_cpp conftest.$ac_ext\"") >&5
12790   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12791   ac_status=$?
12792   egrep -v '^ *\+' conftest.er1 >conftest.err
12793   rm -f conftest.er1
12794   cat conftest.err >&5
12795   echo "$as_me:12795: \$? = $ac_status" >&5
12796   (exit $ac_status); } >/dev/null; then
12797   if test -s conftest.err; then
12798     ac_cpp_err=$ac_c_preproc_warn_flag
12799   else
12800     ac_cpp_err=
12801   fi
12802 else
12803   ac_cpp_err=yes
12804 fi
12805 if test -z "$ac_cpp_err"; then
12806   ac_cv_header_stdc=yes
12807 else
12808   echo "$as_me: failed program was:" >&5
12809   cat conftest.$ac_ext >&5
12810   ac_cv_header_stdc=no
12811 fi
12812 rm -f conftest.err conftest.$ac_ext
12813
12814 if test $ac_cv_header_stdc = yes; then
12815   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12816   cat >conftest.$ac_ext <<_ACEOF
12817 #line 12817 "configure"
12818 #include "confdefs.h"
12819 #include <string.h>
12820
12821 _ACEOF
12822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12823   egrep "memchr" >/dev/null 2>&1; then
12824   :
12825 else
12826   ac_cv_header_stdc=no
12827 fi
12828 rm -rf conftest*
12829
12830 fi
12831
12832 if test $ac_cv_header_stdc = yes; then
12833   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12834   cat >conftest.$ac_ext <<_ACEOF
12835 #line 12835 "configure"
12836 #include "confdefs.h"
12837 #include <stdlib.h>
12838
12839 _ACEOF
12840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12841   egrep "free" >/dev/null 2>&1; then
12842   :
12843 else
12844   ac_cv_header_stdc=no
12845 fi
12846 rm -rf conftest*
12847
12848 fi
12849
12850 if test $ac_cv_header_stdc = yes; then
12851   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12852   if test "$cross_compiling" = yes; then
12853   :
12854 else
12855   cat >conftest.$ac_ext <<_ACEOF
12856 #line 12856 "configure"
12857 #include "confdefs.h"
12858 #include <ctype.h>
12859 #if ((' ' & 0x0FF) == 0x020)
12860 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12861 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12862 #else
12863 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12864                      || ('j' <= (c) && (c) <= 'r') \
12865                      || ('s' <= (c) && (c) <= 'z'))
12866 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12867 #endif
12868
12869 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12870 int
12871 main ()
12872 {
12873   int i;
12874   for (i = 0; i < 256; i++)
12875     if (XOR (islower (i), ISLOWER (i))
12876         || toupper (i) != TOUPPER (i))
12877       $ac_main_return(2);
12878   $ac_main_return (0);
12879 }
12880 _ACEOF
12881 rm -f conftest$ac_exeext
12882 if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12887   { (eval echo "$as_me:12887: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); }; }; then
12892   :
12893 else
12894   echo "$as_me: program exited with status $ac_status" >&5
12895 echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 ac_cv_header_stdc=no
12898 fi
12899 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12900 fi
12901 fi
12902 fi
12903 echo "$as_me:12903: result: $ac_cv_header_stdc" >&5
12904 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12905 if test $ac_cv_header_stdc = yes; then
12906
12907 cat >>confdefs.h <<\EOF
12908 #define STDC_HEADERS 1
12909 EOF
12910
12911 fi
12912
12913 echo "$as_me:12913: checking whether time.h and sys/time.h may both be included" >&5
12914 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12915 if test "${ac_cv_header_time+set}" = set; then
12916   echo $ECHO_N "(cached) $ECHO_C" >&6
12917 else
12918   cat >conftest.$ac_ext <<_ACEOF
12919 #line 12919 "configure"
12920 #include "confdefs.h"
12921 #include <sys/types.h>
12922 #include <sys/time.h>
12923 #include <time.h>
12924
12925 int
12926 main ()
12927 {
12928 if ((struct tm *) 0)
12929 return 0;
12930   ;
12931   return 0;
12932 }
12933 _ACEOF
12934 rm -f conftest.$ac_objext
12935 if { (eval echo "$as_me:12935: \"$ac_compile\"") >&5
12936   (eval $ac_compile) 2>&5
12937   ac_status=$?
12938   echo "$as_me:12938: \$? = $ac_status" >&5
12939   (exit $ac_status); } &&
12940          { ac_try='test -s conftest.$ac_objext'
12941   { (eval echo "$as_me:12941: \"$ac_try\"") >&5
12942   (eval $ac_try) 2>&5
12943   ac_status=$?
12944   echo "$as_me:12944: \$? = $ac_status" >&5
12945   (exit $ac_status); }; }; then
12946   ac_cv_header_time=yes
12947 else
12948   echo "$as_me: failed program was:" >&5
12949 cat conftest.$ac_ext >&5
12950 ac_cv_header_time=no
12951 fi
12952 rm -f conftest.$ac_objext conftest.$ac_ext
12953 fi
12954 echo "$as_me:12954: result: $ac_cv_header_time" >&5
12955 echo "${ECHO_T}$ac_cv_header_time" >&6
12956 if test $ac_cv_header_time = yes; then
12957
12958 cat >>confdefs.h <<\EOF
12959 #define TIME_WITH_SYS_TIME 1
12960 EOF
12961
12962 fi
12963
12964 for ac_header in \
12965 getopt.h \
12966 locale.h \
12967 math.h \
12968 stdarg.h \
12969 sys/ioctl.h \
12970 sys/select.h \
12971 sys/time.h \
12972 termios.h \
12973 unistd.h \
12974
12975 do
12976 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12977 echo "$as_me:12977: checking for $ac_header" >&5
12978 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12979 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12980   echo $ECHO_N "(cached) $ECHO_C" >&6
12981 else
12982   cat >conftest.$ac_ext <<_ACEOF
12983 #line 12983 "configure"
12984 #include "confdefs.h"
12985 #include <$ac_header>
12986 _ACEOF
12987 if { (eval echo "$as_me:12987: \"$ac_cpp conftest.$ac_ext\"") >&5
12988   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12989   ac_status=$?
12990   egrep -v '^ *\+' conftest.er1 >conftest.err
12991   rm -f conftest.er1
12992   cat conftest.err >&5
12993   echo "$as_me:12993: \$? = $ac_status" >&5
12994   (exit $ac_status); } >/dev/null; then
12995   if test -s conftest.err; then
12996     ac_cpp_err=$ac_c_preproc_warn_flag
12997   else
12998     ac_cpp_err=
12999   fi
13000 else
13001   ac_cpp_err=yes
13002 fi
13003 if test -z "$ac_cpp_err"; then
13004   eval "$as_ac_Header=yes"
13005 else
13006   echo "$as_me: failed program was:" >&5
13007   cat conftest.$ac_ext >&5
13008   eval "$as_ac_Header=no"
13009 fi
13010 rm -f conftest.err conftest.$ac_ext
13011 fi
13012 echo "$as_me:13012: result: `eval echo '${'$as_ac_Header'}'`" >&5
13013 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13014 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13015   cat >>confdefs.h <<EOF
13016 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13017 EOF
13018
13019 fi
13020 done
13021
13022 for ac_header in unistd.h getopt.h
13023 do
13024 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13025 echo "$as_me:13025: checking for $ac_header" >&5
13026 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13027 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13028   echo $ECHO_N "(cached) $ECHO_C" >&6
13029 else
13030   cat >conftest.$ac_ext <<_ACEOF
13031 #line 13031 "configure"
13032 #include "confdefs.h"
13033 #include <$ac_header>
13034 _ACEOF
13035 if { (eval echo "$as_me:13035: \"$ac_cpp conftest.$ac_ext\"") >&5
13036   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13037   ac_status=$?
13038   egrep -v '^ *\+' conftest.er1 >conftest.err
13039   rm -f conftest.er1
13040   cat conftest.err >&5
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit $ac_status); } >/dev/null; then
13043   if test -s conftest.err; then
13044     ac_cpp_err=$ac_c_preproc_warn_flag
13045   else
13046     ac_cpp_err=
13047   fi
13048 else
13049   ac_cpp_err=yes
13050 fi
13051 if test -z "$ac_cpp_err"; then
13052   eval "$as_ac_Header=yes"
13053 else
13054   echo "$as_me: failed program was:" >&5
13055   cat conftest.$ac_ext >&5
13056   eval "$as_ac_Header=no"
13057 fi
13058 rm -f conftest.err conftest.$ac_ext
13059 fi
13060 echo "$as_me:13060: result: `eval echo '${'$as_ac_Header'}'`" >&5
13061 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13062 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13063   cat >>confdefs.h <<EOF
13064 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13065 EOF
13066
13067 fi
13068 done
13069
13070 echo "$as_me:13070: checking for header declaring getopt variables" >&5
13071 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13072 if test "${cf_cv_getopt_header+set}" = set; then
13073   echo $ECHO_N "(cached) $ECHO_C" >&6
13074 else
13075
13076 cf_cv_getopt_header=none
13077 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13078 do
13079 cat >conftest.$ac_ext <<_ACEOF
13080 #line 13080 "configure"
13081 #include "confdefs.h"
13082
13083 #include <$cf_header>
13084 int
13085 main ()
13086 {
13087 int x = optind; char *y = optarg
13088   ;
13089   return 0;
13090 }
13091 _ACEOF
13092 rm -f conftest.$ac_objext
13093 if { (eval echo "$as_me:13093: \"$ac_compile\"") >&5
13094   (eval $ac_compile) 2>&5
13095   ac_status=$?
13096   echo "$as_me:13096: \$? = $ac_status" >&5
13097   (exit $ac_status); } &&
13098          { ac_try='test -s conftest.$ac_objext'
13099   { (eval echo "$as_me:13099: \"$ac_try\"") >&5
13100   (eval $ac_try) 2>&5
13101   ac_status=$?
13102   echo "$as_me:13102: \$? = $ac_status" >&5
13103   (exit $ac_status); }; }; then
13104   cf_cv_getopt_header=$cf_header
13105  break
13106 else
13107   echo "$as_me: failed program was:" >&5
13108 cat conftest.$ac_ext >&5
13109 fi
13110 rm -f conftest.$ac_objext conftest.$ac_ext
13111 done
13112
13113 fi
13114 echo "$as_me:13114: result: $cf_cv_getopt_header" >&5
13115 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13116 if test $cf_cv_getopt_header != none ; then
13117         cat >>confdefs.h <<\EOF
13118 #define HAVE_GETOPT_HEADER 1
13119 EOF
13120
13121 fi
13122
13123 for ac_func in \
13124 gettimeofday \
13125 strdup \
13126
13127 do
13128 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13129 echo "$as_me:13129: checking for $ac_func" >&5
13130 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13131 if eval "test \"\${$as_ac_var+set}\" = set"; then
13132   echo $ECHO_N "(cached) $ECHO_C" >&6
13133 else
13134   cat >conftest.$ac_ext <<_ACEOF
13135 #line 13135 "configure"
13136 #include "confdefs.h"
13137 /* System header to define __stub macros and hopefully few prototypes,
13138     which can conflict with char $ac_func (); below.  */
13139 #include <assert.h>
13140 /* Override any gcc2 internal prototype to avoid an error.  */
13141 #ifdef __cplusplus
13142 extern "C"
13143 #endif
13144 /* We use char because int might match the return type of a gcc2
13145    builtin and then its argument prototype would still apply.  */
13146 char $ac_func ();
13147 char (*f) ();
13148
13149 int
13150 main ()
13151 {
13152 /* The GNU C library defines this for functions which it implements
13153     to always fail with ENOSYS.  Some functions are actually named
13154     something starting with __ and the normal name is an alias.  */
13155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13156 choke me
13157 #else
13158 f = $ac_func;
13159 #endif
13160
13161   ;
13162   return 0;
13163 }
13164 _ACEOF
13165 rm -f conftest.$ac_objext conftest$ac_exeext
13166 if { (eval echo "$as_me:13166: \"$ac_link\"") >&5
13167   (eval $ac_link) 2>&5
13168   ac_status=$?
13169   echo "$as_me:13169: \$? = $ac_status" >&5
13170   (exit $ac_status); } &&
13171          { ac_try='test -s conftest$ac_exeext'
13172   { (eval echo "$as_me:13172: \"$ac_try\"") >&5
13173   (eval $ac_try) 2>&5
13174   ac_status=$?
13175   echo "$as_me:13175: \$? = $ac_status" >&5
13176   (exit $ac_status); }; }; then
13177   eval "$as_ac_var=yes"
13178 else
13179   echo "$as_me: failed program was:" >&5
13180 cat conftest.$ac_ext >&5
13181 eval "$as_ac_var=no"
13182 fi
13183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13184 fi
13185 echo "$as_me:13185: result: `eval echo '${'$as_ac_var'}'`" >&5
13186 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13187 if test `eval echo '${'$as_ac_var'}'` = yes; then
13188   cat >>confdefs.h <<EOF
13189 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13190 EOF
13191
13192 fi
13193 done
13194
13195 if test "$cf_enable_widec" = yes; then
13196
13197 for ac_func in \
13198 mblen \
13199 mbrlen \
13200 mbrtowc \
13201 mbsrtowcs \
13202 mbstowcs \
13203 mbtowc \
13204 wcsrtombs \
13205 wcstombs \
13206
13207 do
13208 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13209 echo "$as_me:13209: checking for $ac_func" >&5
13210 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13211 if eval "test \"\${$as_ac_var+set}\" = set"; then
13212   echo $ECHO_N "(cached) $ECHO_C" >&6
13213 else
13214   cat >conftest.$ac_ext <<_ACEOF
13215 #line 13215 "configure"
13216 #include "confdefs.h"
13217 /* System header to define __stub macros and hopefully few prototypes,
13218     which can conflict with char $ac_func (); below.  */
13219 #include <assert.h>
13220 /* Override any gcc2 internal prototype to avoid an error.  */
13221 #ifdef __cplusplus
13222 extern "C"
13223 #endif
13224 /* We use char because int might match the return type of a gcc2
13225    builtin and then its argument prototype would still apply.  */
13226 char $ac_func ();
13227 char (*f) ();
13228
13229 int
13230 main ()
13231 {
13232 /* The GNU C library defines this for functions which it implements
13233     to always fail with ENOSYS.  Some functions are actually named
13234     something starting with __ and the normal name is an alias.  */
13235 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13236 choke me
13237 #else
13238 f = $ac_func;
13239 #endif
13240
13241   ;
13242   return 0;
13243 }
13244 _ACEOF
13245 rm -f conftest.$ac_objext conftest$ac_exeext
13246 if { (eval echo "$as_me:13246: \"$ac_link\"") >&5
13247   (eval $ac_link) 2>&5
13248   ac_status=$?
13249   echo "$as_me:13249: \$? = $ac_status" >&5
13250   (exit $ac_status); } &&
13251          { ac_try='test -s conftest$ac_exeext'
13252   { (eval echo "$as_me:13252: \"$ac_try\"") >&5
13253   (eval $ac_try) 2>&5
13254   ac_status=$?
13255   echo "$as_me:13255: \$? = $ac_status" >&5
13256   (exit $ac_status); }; }; then
13257   eval "$as_ac_var=yes"
13258 else
13259   echo "$as_me: failed program was:" >&5
13260 cat conftest.$ac_ext >&5
13261 eval "$as_ac_var=no"
13262 fi
13263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13264 fi
13265 echo "$as_me:13265: result: `eval echo '${'$as_ac_var'}'`" >&5
13266 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13267 if test `eval echo '${'$as_ac_var'}'` = yes; then
13268   cat >>confdefs.h <<EOF
13269 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13270 EOF
13271
13272 fi
13273 done
13274
13275 fi
13276
13277 echo "$as_me:13277: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13278 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13279 if test "${cf_cv_need_xopen_extension+set}" = set; then
13280   echo $ECHO_N "(cached) $ECHO_C" >&6
13281 else
13282
13283 cat >conftest.$ac_ext <<_ACEOF
13284 #line 13284 "configure"
13285 #include "confdefs.h"
13286
13287 #include <stdlib.h>
13288 #include <${cf_cv_ncurses_header:-curses.h}>
13289 int
13290 main ()
13291 {
13292
13293 #if defined(NCURSES_VERSION_PATCH)
13294 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13295         make an error
13296 #endif
13297 #endif
13298         long x = winnstr(stdscr, "", 0);
13299         int x1, y1;
13300         getbegyx(stdscr, y1, x1)
13301   ;
13302   return 0;
13303 }
13304 _ACEOF
13305 rm -f conftest.$ac_objext conftest$ac_exeext
13306 if { (eval echo "$as_me:13306: \"$ac_link\"") >&5
13307   (eval $ac_link) 2>&5
13308   ac_status=$?
13309   echo "$as_me:13309: \$? = $ac_status" >&5
13310   (exit $ac_status); } &&
13311          { ac_try='test -s conftest$ac_exeext'
13312   { (eval echo "$as_me:13312: \"$ac_try\"") >&5
13313   (eval $ac_try) 2>&5
13314   ac_status=$?
13315   echo "$as_me:13315: \$? = $ac_status" >&5
13316   (exit $ac_status); }; }; then
13317   cf_cv_need_xopen_extension=no
13318 else
13319   echo "$as_me: failed program was:" >&5
13320 cat conftest.$ac_ext >&5
13321 cat >conftest.$ac_ext <<_ACEOF
13322 #line 13322 "configure"
13323 #include "confdefs.h"
13324
13325 #define _XOPEN_SOURCE_EXTENDED
13326 #include <stdlib.h>
13327 #include <${cf_cv_ncurses_header:-curses.h}>
13328 int
13329 main ()
13330 {
13331
13332 #ifdef NCURSES_VERSION
13333         cchar_t check;
13334         int check2 = curs_set((int)sizeof(check));
13335 #endif
13336         long x = winnstr(stdscr, "", 0);
13337         int x1, y1;
13338         getbegyx(stdscr, y1, x1)
13339   ;
13340   return 0;
13341 }
13342 _ACEOF
13343 rm -f conftest.$ac_objext conftest$ac_exeext
13344 if { (eval echo "$as_me:13344: \"$ac_link\"") >&5
13345   (eval $ac_link) 2>&5
13346   ac_status=$?
13347   echo "$as_me:13347: \$? = $ac_status" >&5
13348   (exit $ac_status); } &&
13349          { ac_try='test -s conftest$ac_exeext'
13350   { (eval echo "$as_me:13350: \"$ac_try\"") >&5
13351   (eval $ac_try) 2>&5
13352   ac_status=$?
13353   echo "$as_me:13353: \$? = $ac_status" >&5
13354   (exit $ac_status); }; }; then
13355   cf_cv_need_xopen_extension=yes
13356 else
13357   echo "$as_me: failed program was:" >&5
13358 cat conftest.$ac_ext >&5
13359 cf_cv_need_xopen_extension=unknown
13360 fi
13361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13362 fi
13363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13364 fi
13365 echo "$as_me:13365: result: $cf_cv_need_xopen_extension" >&5
13366 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13367 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13368
13369 echo "$as_me:13369: checking for term.h" >&5
13370 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13371 if test "${cf_cv_term_header+set}" = set; then
13372   echo $ECHO_N "(cached) $ECHO_C" >&6
13373 else
13374
13375 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13376 # for <term.h> if we do not find the variant.
13377
13378 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13379
13380 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13381 */*)
13382         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13383         cf_header_list="$cf_header_item $cf_header_list"
13384         ;;
13385 esac
13386
13387 for cf_header in $cf_header_list
13388 do
13389         cat >conftest.$ac_ext <<_ACEOF
13390 #line 13390 "configure"
13391 #include "confdefs.h"
13392
13393 #include <${cf_cv_ncurses_header:-curses.h}>
13394 #include <${cf_header}>
13395 int
13396 main ()
13397 {
13398 WINDOW *x
13399   ;
13400   return 0;
13401 }
13402 _ACEOF
13403 rm -f conftest.$ac_objext
13404 if { (eval echo "$as_me:13404: \"$ac_compile\"") >&5
13405   (eval $ac_compile) 2>&5
13406   ac_status=$?
13407   echo "$as_me:13407: \$? = $ac_status" >&5
13408   (exit $ac_status); } &&
13409          { ac_try='test -s conftest.$ac_objext'
13410   { (eval echo "$as_me:13410: \"$ac_try\"") >&5
13411   (eval $ac_try) 2>&5
13412   ac_status=$?
13413   echo "$as_me:13413: \$? = $ac_status" >&5
13414   (exit $ac_status); }; }; then
13415   cf_cv_term_header=$cf_header
13416          break
13417 else
13418   echo "$as_me: failed program was:" >&5
13419 cat conftest.$ac_ext >&5
13420 cf_cv_term_header=no
13421 fi
13422 rm -f conftest.$ac_objext conftest.$ac_ext
13423 done
13424
13425 case $cf_cv_term_header in #(vi
13426 no)
13427         # If curses is ncurses, some packagers still mess it up by trying to make
13428         # us use GNU termcap.  This handles the most common case.
13429         for cf_header in ncurses/term.h ncursesw/term.h
13430         do
13431                 cat >conftest.$ac_ext <<_ACEOF
13432 #line 13432 "configure"
13433 #include "confdefs.h"
13434
13435 #include <${cf_cv_ncurses_header:-curses.h}>
13436 #ifdef NCURSES_VERSION
13437 #include <${cf_header}>
13438 #else
13439 make an error
13440 #endif
13441 int
13442 main ()
13443 {
13444 WINDOW *x
13445   ;
13446   return 0;
13447 }
13448 _ACEOF
13449 rm -f conftest.$ac_objext
13450 if { (eval echo "$as_me:13450: \"$ac_compile\"") >&5
13451   (eval $ac_compile) 2>&5
13452   ac_status=$?
13453   echo "$as_me:13453: \$? = $ac_status" >&5
13454   (exit $ac_status); } &&
13455          { ac_try='test -s conftest.$ac_objext'
13456   { (eval echo "$as_me:13456: \"$ac_try\"") >&5
13457   (eval $ac_try) 2>&5
13458   ac_status=$?
13459   echo "$as_me:13459: \$? = $ac_status" >&5
13460   (exit $ac_status); }; }; then
13461   cf_cv_term_header=$cf_header
13462                          break
13463 else
13464   echo "$as_me: failed program was:" >&5
13465 cat conftest.$ac_ext >&5
13466 cf_cv_term_header=no
13467 fi
13468 rm -f conftest.$ac_objext conftest.$ac_ext
13469         done
13470         ;;
13471 esac
13472
13473 fi
13474 echo "$as_me:13474: result: $cf_cv_term_header" >&5
13475 echo "${ECHO_T}$cf_cv_term_header" >&6
13476
13477 case $cf_cv_term_header in #(vi
13478 term.h) #(vi
13479         cat >>confdefs.h <<\EOF
13480 #define HAVE_TERM_H 1
13481 EOF
13482
13483         ;;
13484 ncurses/term.h) #(vi
13485         cat >>confdefs.h <<\EOF
13486 #define HAVE_NCURSES_TERM_H 1
13487 EOF
13488
13489         ;;
13490 ncursesw/term.h)
13491         cat >>confdefs.h <<\EOF
13492 #define HAVE_NCURSESW_TERM_H 1
13493 EOF
13494
13495         ;;
13496 esac
13497
13498 echo "$as_me:13498: checking for unctrl.h" >&5
13499 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13500 if test "${cf_cv_unctrl_header+set}" = set; then
13501   echo $ECHO_N "(cached) $ECHO_C" >&6
13502 else
13503
13504 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13505 # for <unctrl.h> if we do not find the variant.
13506
13507 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13508
13509 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13510 */*)
13511         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13512         cf_header_list="$cf_header_item $cf_header_list"
13513         ;;
13514 esac
13515
13516 for cf_header in $cf_header_list
13517 do
13518         cat >conftest.$ac_ext <<_ACEOF
13519 #line 13519 "configure"
13520 #include "confdefs.h"
13521
13522 #include <${cf_cv_ncurses_header:-curses.h}>
13523 #include <${cf_header}>
13524 int
13525 main ()
13526 {
13527 WINDOW *x
13528   ;
13529   return 0;
13530 }
13531 _ACEOF
13532 rm -f conftest.$ac_objext
13533 if { (eval echo "$as_me:13533: \"$ac_compile\"") >&5
13534   (eval $ac_compile) 2>&5
13535   ac_status=$?
13536   echo "$as_me:13536: \$? = $ac_status" >&5
13537   (exit $ac_status); } &&
13538          { ac_try='test -s conftest.$ac_objext'
13539   { (eval echo "$as_me:13539: \"$ac_try\"") >&5
13540   (eval $ac_try) 2>&5
13541   ac_status=$?
13542   echo "$as_me:13542: \$? = $ac_status" >&5
13543   (exit $ac_status); }; }; then
13544   cf_cv_unctrl_header=$cf_header
13545          break
13546 else
13547   echo "$as_me: failed program was:" >&5
13548 cat conftest.$ac_ext >&5
13549 cf_cv_unctrl_header=no
13550 fi
13551 rm -f conftest.$ac_objext conftest.$ac_ext
13552 done
13553
13554 case $cf_cv_unctrl_header in #(vi
13555 no)
13556         { echo "$as_me:13556: WARNING: unctrl.h header not found" >&5
13557 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13558         ;;
13559 esac
13560
13561 fi
13562 echo "$as_me:13562: result: $cf_cv_unctrl_header" >&5
13563 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13564
13565 case $cf_cv_unctrl_header in #(vi
13566 unctrl.h) #(vi
13567         cat >>confdefs.h <<\EOF
13568 #define HAVE_UNCTRL_H 1
13569 EOF
13570
13571         ;;
13572 ncurses/unctrl.h) #(vi
13573         cat >>confdefs.h <<\EOF
13574 #define HAVE_NCURSES_UNCTRL_H 1
13575 EOF
13576
13577         ;;
13578 ncursesw/unctrl.h)
13579         cat >>confdefs.h <<\EOF
13580 #define HAVE_NCURSESW_UNCTRL_H 1
13581 EOF
13582
13583         ;;
13584 esac
13585
13586 for cf_func in \
13587 assume_default_colors \
13588 chgat \
13589 color_set \
13590 filter \
13591 getbegx \
13592 getcurx \
13593 getmaxx \
13594 getnstr \
13595 getparx \
13596 getwin \
13597 mvvline \
13598 mvwvline \
13599 napms \
13600 putwin \
13601 resize_term \
13602 resizeterm \
13603 ripoffline \
13604 scr_dump \
13605 setupterm \
13606 slk_color \
13607 slk_init \
13608 termattrs \
13609 tgetent \
13610 tigetnum \
13611 tigetstr \
13612 typeahead \
13613 use_default_colors \
13614 use_screen \
13615 use_window \
13616 vsscanf \
13617 vw_printw \
13618 wchgat \
13619 winsstr \
13620 wresize \
13621 wsyncdown \
13622
13623 do
13624
13625 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13626
13627         echo "$as_me:13627: checking for ${cf_func}" >&5
13628 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13629
13630 echo "${as_me:-configure}:13630: testing ${cf_func} ..." 1>&5
13631
13632         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13633   echo $ECHO_N "(cached) $ECHO_C" >&6
13634 else
13635
13636                 eval cf_result='$ac_cv_func_'$cf_func
13637                 if test ".$cf_result" != ".no"; then
13638                         cat >conftest.$ac_ext <<_ACEOF
13639 #line 13639 "configure"
13640 #include "confdefs.h"
13641
13642 #ifdef HAVE_XCURSES
13643 #include <xcurses.h>
13644 char * XCursesProgramName = "test";
13645 #else
13646 #include <${cf_cv_ncurses_header:-curses.h}>
13647 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13648 #include <ncursesw/term.h>
13649 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13650 #include <ncurses/term.h>
13651 #elif defined(HAVE_TERM_H)
13652 #include <term.h>
13653 #endif
13654 #endif
13655
13656 int
13657 main ()
13658 {
13659
13660 #ifndef ${cf_func}
13661 long foo = (long)(&${cf_func});
13662 if (foo + 1234 > 5678)
13663         ${cf_cv_main_return:-return}(foo);
13664 #endif
13665
13666   ;
13667   return 0;
13668 }
13669 _ACEOF
13670 rm -f conftest.$ac_objext conftest$ac_exeext
13671 if { (eval echo "$as_me:13671: \"$ac_link\"") >&5
13672   (eval $ac_link) 2>&5
13673   ac_status=$?
13674   echo "$as_me:13674: \$? = $ac_status" >&5
13675   (exit $ac_status); } &&
13676          { ac_try='test -s conftest$ac_exeext'
13677   { (eval echo "$as_me:13677: \"$ac_try\"") >&5
13678   (eval $ac_try) 2>&5
13679   ac_status=$?
13680   echo "$as_me:13680: \$? = $ac_status" >&5
13681   (exit $ac_status); }; }; then
13682   cf_result=yes
13683 else
13684   echo "$as_me: failed program was:" >&5
13685 cat conftest.$ac_ext >&5
13686 cf_result=no
13687 fi
13688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13689                 fi
13690                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13691
13692 fi
13693
13694         # use the computed/retrieved cache-value:
13695         eval 'cf_result=$cf_cv_func_'$cf_func
13696         echo "$as_me:13696: result: $cf_result" >&5
13697 echo "${ECHO_T}$cf_result" >&6
13698         if test $cf_result != no; then
13699                 cat >>confdefs.h <<EOF
13700 #define HAVE_${cf_tr_func} 1
13701 EOF
13702
13703         fi
13704 done
13705
13706 for cf_func in tputs
13707 do
13708
13709 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13710
13711         echo "$as_me:13711: checking for ${cf_func}" >&5
13712 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13713
13714 echo "${as_me:-configure}:13714: testing ${cf_func} ..." 1>&5
13715
13716         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13717   echo $ECHO_N "(cached) $ECHO_C" >&6
13718 else
13719
13720                 eval cf_result='$ac_cv_func_'$cf_func
13721                 if test ".$cf_result" != ".no"; then
13722                         cat >conftest.$ac_ext <<_ACEOF
13723 #line 13723 "configure"
13724 #include "confdefs.h"
13725
13726 #ifdef HAVE_XCURSES
13727 #include <xcurses.h>
13728 char * XCursesProgramName = "test";
13729 #else
13730 #include <${cf_cv_ncurses_header:-curses.h}>
13731 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13732 #include <ncursesw/term.h>
13733 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13734 #include <ncurses/term.h>
13735 #elif defined(HAVE_TERM_H)
13736 #include <term.h>
13737 #endif
13738 #endif
13739
13740 int
13741 main ()
13742 {
13743
13744 #ifndef ${cf_func}
13745 long foo = (long)(&${cf_func});
13746 if (foo + 1234 > 5678)
13747         ${cf_cv_main_return:-return}(foo);
13748 #endif
13749
13750   ;
13751   return 0;
13752 }
13753 _ACEOF
13754 rm -f conftest.$ac_objext conftest$ac_exeext
13755 if { (eval echo "$as_me:13755: \"$ac_link\"") >&5
13756   (eval $ac_link) 2>&5
13757   ac_status=$?
13758   echo "$as_me:13758: \$? = $ac_status" >&5
13759   (exit $ac_status); } &&
13760          { ac_try='test -s conftest$ac_exeext'
13761   { (eval echo "$as_me:13761: \"$ac_try\"") >&5
13762   (eval $ac_try) 2>&5
13763   ac_status=$?
13764   echo "$as_me:13764: \$? = $ac_status" >&5
13765   (exit $ac_status); }; }; then
13766   cf_result=yes
13767 else
13768   echo "$as_me: failed program was:" >&5
13769 cat conftest.$ac_ext >&5
13770 cf_result=no
13771 fi
13772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13773                 fi
13774                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13775
13776 fi
13777
13778         # use the computed/retrieved cache-value:
13779         eval 'cf_result=$cf_cv_func_'$cf_func
13780         echo "$as_me:13780: result: $cf_result" >&5
13781 echo "${ECHO_T}$cf_result" >&6
13782         if test $cf_result != no; then
13783                 cat >>confdefs.h <<EOF
13784 #define HAVE_${cf_tr_func} 1
13785 EOF
13786
13787         fi
13788 done
13789
13790 if test x$cf_cv_func_tputs = xyes
13791 then
13792         cf_done=no
13793         for cf_arg in int char
13794         do
13795                 for cf_ret in int void
13796                 do
13797                         if test $cf_ret = void
13798                         then
13799                                 cf_return="/* nothing */"
13800                         else
13801                                 cf_return="return value"
13802                         fi
13803                         cat >conftest.$ac_ext <<_ACEOF
13804 #line 13804 "configure"
13805 #include "confdefs.h"
13806
13807 #include <${cf_cv_ncurses_header:-curses.h}>
13808 #include <$cf_cv_term_header>
13809
13810 static $cf_ret outc($cf_arg value) { $cf_return; }
13811
13812 int
13813 main ()
13814 {
13815
13816         tputs("hello", 0, outc);
13817         ${cf_cv_main_return:-return}(0);
13818
13819   ;
13820   return 0;
13821 }
13822 _ACEOF
13823 rm -f conftest.$ac_objext
13824 if { (eval echo "$as_me:13824: \"$ac_compile\"") >&5
13825   (eval $ac_compile) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); } &&
13829          { ac_try='test -s conftest.$ac_objext'
13830   { (eval echo "$as_me:13830: \"$ac_try\"") >&5
13831   (eval $ac_try) 2>&5
13832   ac_status=$?
13833   echo "$as_me:13833: \$? = $ac_status" >&5
13834   (exit $ac_status); }; }; then
13835
13836                 test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
13837
13838 echo "${as_me:-configure}:13838: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
13839
13840                 cat >>confdefs.h <<EOF
13841 #define TPUTS_ARG               $cf_arg
13842 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
13843 #define TPUTS_RETURN(value)     $cf_return
13844 EOF
13845                 cf_done=yes
13846                 break
13847
13848 else
13849   echo "$as_me: failed program was:" >&5
13850 cat conftest.$ac_ext >&5
13851 fi
13852 rm -f conftest.$ac_objext conftest.$ac_ext
13853                 done
13854                 test $cf_done = yes && break
13855         done
13856 fi
13857
13858 echo "$as_me:13858: checking for ncurses extended functions" >&5
13859 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
13860 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
13861   echo $ECHO_N "(cached) $ECHO_C" >&6
13862 else
13863
13864 cat >conftest.$ac_ext <<_ACEOF
13865 #line 13865 "configure"
13866 #include "confdefs.h"
13867
13868 #include <${cf_cv_ncurses_header:-curses.h}>
13869 int
13870 main ()
13871 {
13872
13873 int x = NCURSES_EXT_FUNCS
13874
13875   ;
13876   return 0;
13877 }
13878 _ACEOF
13879 rm -f conftest.$ac_objext
13880 if { (eval echo "$as_me:13880: \"$ac_compile\"") >&5
13881   (eval $ac_compile) 2>&5
13882   ac_status=$?
13883   echo "$as_me:13883: \$? = $ac_status" >&5
13884   (exit $ac_status); } &&
13885          { ac_try='test -s conftest.$ac_objext'
13886   { (eval echo "$as_me:13886: \"$ac_try\"") >&5
13887   (eval $ac_try) 2>&5
13888   ac_status=$?
13889   echo "$as_me:13889: \$? = $ac_status" >&5
13890   (exit $ac_status); }; }; then
13891   cf_cv_ncurses_ext_funcs=defined
13892 else
13893   echo "$as_me: failed program was:" >&5
13894 cat conftest.$ac_ext >&5
13895
13896 cat >conftest.$ac_ext <<_ACEOF
13897 #line 13897 "configure"
13898 #include "confdefs.h"
13899
13900 #include <${cf_cv_ncurses_header:-curses.h}>
13901 int
13902 main ()
13903 {
13904
13905         (void) assume_default_colors (0, 0);
13906         (void) curses_version ();
13907         (void) define_key (0, 0);
13908         (void) is_term_resized (0, 0);
13909         (void) key_defined (0);
13910         (void) keybound (0, 0);
13911         (void) keyok (0, 0);
13912         (void) resize_term (0, 0);
13913         (void) resizeterm (0, 0);
13914         (void) use_default_colors ();
13915         (void) use_extended_names (0);
13916         (void) wresize (0, 0, 0);
13917   ;
13918   return 0;
13919 }
13920 _ACEOF
13921 rm -f conftest.$ac_objext conftest$ac_exeext
13922 if { (eval echo "$as_me:13922: \"$ac_link\"") >&5
13923   (eval $ac_link) 2>&5
13924   ac_status=$?
13925   echo "$as_me:13925: \$? = $ac_status" >&5
13926   (exit $ac_status); } &&
13927          { ac_try='test -s conftest$ac_exeext'
13928   { (eval echo "$as_me:13928: \"$ac_try\"") >&5
13929   (eval $ac_try) 2>&5
13930   ac_status=$?
13931   echo "$as_me:13931: \$? = $ac_status" >&5
13932   (exit $ac_status); }; }; then
13933   cf_cv_ncurses_ext_funcs=yes
13934 else
13935   echo "$as_me: failed program was:" >&5
13936 cat conftest.$ac_ext >&5
13937 cf_cv_ncurses_ext_funcs=no
13938 fi
13939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13940
13941 fi
13942 rm -f conftest.$ac_objext conftest.$ac_ext
13943
13944 fi
13945 echo "$as_me:13945: result: $cf_cv_ncurses_ext_funcs" >&5
13946 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
13947 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
13948 #define NCURSES_EXT_FUNCS 1
13949 EOF
13950
13951 if test "$cf_enable_widec" = yes
13952 then
13953         echo "$as_me:13953: checking for wide-character functions" >&5
13954 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
13955 if test "${cf_cv_widechar_funcs+set}" = set; then
13956   echo $ECHO_N "(cached) $ECHO_C" >&6
13957 else
13958
13959         cat >conftest.$ac_ext <<_ACEOF
13960 #line 13960 "configure"
13961 #include "confdefs.h"
13962
13963 #include <${cf_cv_ncurses_header:-curses.h}>
13964 int
13965 main ()
13966 {
13967
13968                 static wchar_t src_wchar[2];
13969                 static cchar_t dst_cchar;
13970                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
13971
13972   ;
13973   return 0;
13974 }
13975 _ACEOF
13976 rm -f conftest.$ac_objext conftest$ac_exeext
13977 if { (eval echo "$as_me:13977: \"$ac_link\"") >&5
13978   (eval $ac_link) 2>&5
13979   ac_status=$?
13980   echo "$as_me:13980: \$? = $ac_status" >&5
13981   (exit $ac_status); } &&
13982          { ac_try='test -s conftest$ac_exeext'
13983   { (eval echo "$as_me:13983: \"$ac_try\"") >&5
13984   (eval $ac_try) 2>&5
13985   ac_status=$?
13986   echo "$as_me:13986: \$? = $ac_status" >&5
13987   (exit $ac_status); }; }; then
13988   cf_cv_widechar_funcs=yes
13989 else
13990   echo "$as_me: failed program was:" >&5
13991 cat conftest.$ac_ext >&5
13992 cf_cv_widechar_funcs=no
13993 fi
13994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13995
13996 fi
13997 echo "$as_me:13997: result: $cf_cv_widechar_funcs" >&5
13998 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
13999         if test "$cf_cv_widechar_funcs" != no ; then
14000                 cat >>confdefs.h <<\EOF
14001 #define USE_WIDEC_SUPPORT 1
14002 EOF
14003
14004         else
14005                 cat >>confdefs.h <<\EOF
14006 #define USE_WIDEC_SUPPORT 0
14007 EOF
14008
14009         fi
14010 else
14011         cat >>confdefs.h <<\EOF
14012 #define USE_WIDEC_SUPPORT 0
14013 EOF
14014
14015 fi
14016
14017 echo "$as_me:14017: checking if sys/time.h works with sys/select.h" >&5
14018 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14019 if test "${cf_cv_sys_time_select+set}" = set; then
14020   echo $ECHO_N "(cached) $ECHO_C" >&6
14021 else
14022
14023 cat >conftest.$ac_ext <<_ACEOF
14024 #line 14024 "configure"
14025 #include "confdefs.h"
14026
14027 #include <sys/types.h>
14028 #ifdef HAVE_SYS_TIME_H
14029 #include <sys/time.h>
14030 #endif
14031 #ifdef HAVE_SYS_SELECT_H
14032 #include <sys/select.h>
14033 #endif
14034
14035 int
14036 main ()
14037 {
14038
14039   ;
14040   return 0;
14041 }
14042 _ACEOF
14043 rm -f conftest.$ac_objext
14044 if { (eval echo "$as_me:14044: \"$ac_compile\"") >&5
14045   (eval $ac_compile) 2>&5
14046   ac_status=$?
14047   echo "$as_me:14047: \$? = $ac_status" >&5
14048   (exit $ac_status); } &&
14049          { ac_try='test -s conftest.$ac_objext'
14050   { (eval echo "$as_me:14050: \"$ac_try\"") >&5
14051   (eval $ac_try) 2>&5
14052   ac_status=$?
14053   echo "$as_me:14053: \$? = $ac_status" >&5
14054   (exit $ac_status); }; }; then
14055   cf_cv_sys_time_select=yes
14056 else
14057   echo "$as_me: failed program was:" >&5
14058 cat conftest.$ac_ext >&5
14059 cf_cv_sys_time_select=no
14060 fi
14061 rm -f conftest.$ac_objext conftest.$ac_ext
14062
14063 fi
14064
14065 echo "$as_me:14065: result: $cf_cv_sys_time_select" >&5
14066 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14067 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14068 #define HAVE_SYS_TIME_SELECT 1
14069 EOF
14070
14071 echo "$as_me:14071: checking for function curses_version" >&5
14072 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14073 if test "${cf_cv_func_curses_version+set}" = set; then
14074   echo $ECHO_N "(cached) $ECHO_C" >&6
14075 else
14076
14077 if test "$cross_compiling" = yes; then
14078   cf_cv_func_curses_version=unknown
14079 else
14080   cat >conftest.$ac_ext <<_ACEOF
14081 #line 14081 "configure"
14082 #include "confdefs.h"
14083
14084 #include <${cf_cv_ncurses_header:-curses.h}>
14085 int main()
14086 {
14087         char temp[1024];
14088         sprintf(temp, "%s\n", curses_version());
14089         ${cf_cv_main_return:-return}(0);
14090 }
14091
14092 _ACEOF
14093 rm -f conftest$ac_exeext
14094 if { (eval echo "$as_me:14094: \"$ac_link\"") >&5
14095   (eval $ac_link) 2>&5
14096   ac_status=$?
14097   echo "$as_me:14097: \$? = $ac_status" >&5
14098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14099   { (eval echo "$as_me:14099: \"$ac_try\"") >&5
14100   (eval $ac_try) 2>&5
14101   ac_status=$?
14102   echo "$as_me:14102: \$? = $ac_status" >&5
14103   (exit $ac_status); }; }; then
14104   cf_cv_func_curses_version=yes
14105
14106 else
14107   echo "$as_me: program exited with status $ac_status" >&5
14108 echo "$as_me: failed program was:" >&5
14109 cat conftest.$ac_ext >&5
14110 cf_cv_func_curses_version=no
14111
14112 fi
14113 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14114 fi
14115 rm -f core
14116 fi
14117 echo "$as_me:14117: result: $cf_cv_func_curses_version" >&5
14118 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14119 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14120 #define HAVE_CURSES_VERSION 1
14121 EOF
14122
14123 echo "$as_me:14123: checking for ncurses wrap-prefix" >&5
14124 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14125
14126 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14127 if test "${with_ncurses_wrap_prefix+set}" = set; then
14128   withval="$with_ncurses_wrap_prefix"
14129   NCURSES_WRAP_PREFIX=$withval
14130 else
14131   NCURSES_WRAP_PREFIX=_nc_
14132 fi;
14133 echo "$as_me:14133: result: $NCURSES_WRAP_PREFIX" >&5
14134 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14135
14136 echo "$as_me:14136: checking for alternate character set array" >&5
14137 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14138 if test "${cf_cv_curses_acs_map+set}" = set; then
14139   echo $ECHO_N "(cached) $ECHO_C" >&6
14140 else
14141
14142 cf_cv_curses_acs_map=unknown
14143 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14144 do
14145 cat >conftest.$ac_ext <<_ACEOF
14146 #line 14146 "configure"
14147 #include "confdefs.h"
14148
14149 #include <${cf_cv_ncurses_header:-curses.h}>
14150
14151 int
14152 main ()
14153 {
14154
14155 $name['k'] = ACS_PLUS
14156
14157   ;
14158   return 0;
14159 }
14160 _ACEOF
14161 rm -f conftest.$ac_objext conftest$ac_exeext
14162 if { (eval echo "$as_me:14162: \"$ac_link\"") >&5
14163   (eval $ac_link) 2>&5
14164   ac_status=$?
14165   echo "$as_me:14165: \$? = $ac_status" >&5
14166   (exit $ac_status); } &&
14167          { ac_try='test -s conftest$ac_exeext'
14168   { (eval echo "$as_me:14168: \"$ac_try\"") >&5
14169   (eval $ac_try) 2>&5
14170   ac_status=$?
14171   echo "$as_me:14171: \$? = $ac_status" >&5
14172   (exit $ac_status); }; }; then
14173   cf_cv_curses_acs_map=$name; break
14174 else
14175   echo "$as_me: failed program was:" >&5
14176 cat conftest.$ac_ext >&5
14177 fi
14178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14179 done
14180
14181 fi
14182 echo "$as_me:14182: result: $cf_cv_curses_acs_map" >&5
14183 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14184
14185 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14186 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14187 EOF
14188
14189 if test "$cf_enable_widec" = yes; then
14190
14191 echo "$as_me:14191: checking for wide alternate character set array" >&5
14192 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14193 if test "${cf_cv_curses_wacs_map+set}" = set; then
14194   echo $ECHO_N "(cached) $ECHO_C" >&6
14195 else
14196
14197         cf_cv_curses_wacs_map=unknown
14198         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14199         do
14200         cat >conftest.$ac_ext <<_ACEOF
14201 #line 14201 "configure"
14202 #include "confdefs.h"
14203
14204 #ifndef _XOPEN_SOURCE_EXTENDED
14205 #define _XOPEN_SOURCE_EXTENDED
14206 #endif
14207 #include <${cf_cv_ncurses_header:-curses.h}>
14208 int
14209 main ()
14210 {
14211 void *foo = &($name['k'])
14212   ;
14213   return 0;
14214 }
14215 _ACEOF
14216 rm -f conftest.$ac_objext conftest$ac_exeext
14217 if { (eval echo "$as_me:14217: \"$ac_link\"") >&5
14218   (eval $ac_link) 2>&5
14219   ac_status=$?
14220   echo "$as_me:14220: \$? = $ac_status" >&5
14221   (exit $ac_status); } &&
14222          { ac_try='test -s conftest$ac_exeext'
14223   { (eval echo "$as_me:14223: \"$ac_try\"") >&5
14224   (eval $ac_try) 2>&5
14225   ac_status=$?
14226   echo "$as_me:14226: \$? = $ac_status" >&5
14227   (exit $ac_status); }; }; then
14228   cf_cv_curses_wacs_map=$name
14229          break
14230 else
14231   echo "$as_me: failed program was:" >&5
14232 cat conftest.$ac_ext >&5
14233 fi
14234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14235         done
14236 fi
14237 echo "$as_me:14237: result: $cf_cv_curses_wacs_map" >&5
14238 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14239
14240 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14241 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14242 EOF
14243
14244 echo "$as_me:14244: checking for wide alternate character constants" >&5
14245 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14246 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14247   echo $ECHO_N "(cached) $ECHO_C" >&6
14248 else
14249
14250 cf_cv_curses_wacs_symbols=no
14251 if test "$cf_cv_curses_wacs_map" != unknown
14252 then
14253         cat >conftest.$ac_ext <<_ACEOF
14254 #line 14254 "configure"
14255 #include "confdefs.h"
14256
14257 #ifndef _XOPEN_SOURCE_EXTENDED
14258 #define _XOPEN_SOURCE_EXTENDED
14259 #endif
14260 #include <${cf_cv_ncurses_header:-curses.h}>
14261 int
14262 main ()
14263 {
14264 cchar_t *foo = WACS_PLUS;
14265          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 rm -f conftest.$ac_objext conftest$ac_exeext
14271 if { (eval echo "$as_me:14271: \"$ac_link\"") >&5
14272   (eval $ac_link) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit $ac_status); } &&
14276          { ac_try='test -s conftest$ac_exeext'
14277   { (eval echo "$as_me:14277: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:14280: \$? = $ac_status" >&5
14281   (exit $ac_status); }; }; then
14282   cf_cv_curses_wacs_symbols=yes
14283 else
14284   echo "$as_me: failed program was:" >&5
14285 cat conftest.$ac_ext >&5
14286 fi
14287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14288 else
14289         cat >conftest.$ac_ext <<_ACEOF
14290 #line 14290 "configure"
14291 #include "confdefs.h"
14292
14293 #ifndef _XOPEN_SOURCE_EXTENDED
14294 #define _XOPEN_SOURCE_EXTENDED
14295 #endif
14296 #include <${cf_cv_ncurses_header:-curses.h}>
14297 int
14298 main ()
14299 {
14300 cchar_t *foo = WACS_PLUS
14301   ;
14302   return 0;
14303 }
14304 _ACEOF
14305 rm -f conftest.$ac_objext conftest$ac_exeext
14306 if { (eval echo "$as_me:14306: \"$ac_link\"") >&5
14307   (eval $ac_link) 2>&5
14308   ac_status=$?
14309   echo "$as_me:14309: \$? = $ac_status" >&5
14310   (exit $ac_status); } &&
14311          { ac_try='test -s conftest$ac_exeext'
14312   { (eval echo "$as_me:14312: \"$ac_try\"") >&5
14313   (eval $ac_try) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); }; }; then
14317   cf_cv_curses_wacs_symbols=yes
14318 else
14319   echo "$as_me: failed program was:" >&5
14320 cat conftest.$ac_ext >&5
14321 fi
14322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14323 fi
14324
14325 fi
14326 echo "$as_me:14326: result: $cf_cv_curses_wacs_symbols" >&5
14327 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14328
14329 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
14330 #define CURSES_WACS_SYMBOLS 1
14331 EOF
14332
14333 fi
14334
14335 echo "$as_me:14335: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14336 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14337 cat >conftest.$ac_ext <<_ACEOF
14338 #line 14338 "configure"
14339 #include "confdefs.h"
14340
14341 #ifndef _XOPEN_SOURCE_EXTENDED
14342 #define _XOPEN_SOURCE_EXTENDED
14343 #endif
14344 #include <${cf_cv_ncurses_header:-curses.h}>
14345 int
14346 main ()
14347 {
14348
14349 attr_t foo
14350
14351   ;
14352   return 0;
14353 }
14354 _ACEOF
14355 rm -f conftest.$ac_objext
14356 if { (eval echo "$as_me:14356: \"$ac_compile\"") >&5
14357   (eval $ac_compile) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); } &&
14361          { ac_try='test -s conftest.$ac_objext'
14362   { (eval echo "$as_me:14362: \"$ac_try\"") >&5
14363   (eval $ac_try) 2>&5
14364   ac_status=$?
14365   echo "$as_me:14365: \$? = $ac_status" >&5
14366   (exit $ac_status); }; }; then
14367   cf_result=yes
14368 else
14369   echo "$as_me: failed program was:" >&5
14370 cat conftest.$ac_ext >&5
14371 cf_result=no
14372 fi
14373 rm -f conftest.$ac_objext conftest.$ac_ext
14374 echo "$as_me:14374: result: $cf_result" >&5
14375 echo "${ECHO_T}$cf_result" >&6
14376 if test $cf_result = yes ; then
14377
14378 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14379
14380         cat >>confdefs.h <<EOF
14381 #define $cf_result 1
14382 EOF
14383
14384 else
14385         cat >>confdefs.h <<EOF
14386 #define attr_t long
14387 EOF
14388
14389 fi
14390
14391 if test "$cf_enable_widec" = yes; then
14392
14393 # This is needed on Tru64 5.0 to declare mbstate_t
14394 echo "$as_me:14394: checking if we must include wchar.h to declare mbstate_t" >&5
14395 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14396 if test "${cf_cv_mbstate_t+set}" = set; then
14397   echo $ECHO_N "(cached) $ECHO_C" >&6
14398 else
14399
14400 cat >conftest.$ac_ext <<_ACEOF
14401 #line 14401 "configure"
14402 #include "confdefs.h"
14403
14404 #include <stdlib.h>
14405 #include <stdarg.h>
14406 #include <stdio.h>
14407 #ifdef HAVE_LIBUTF8_H
14408 #include <libutf8.h>
14409 #endif
14410 int
14411 main ()
14412 {
14413 mbstate_t state
14414   ;
14415   return 0;
14416 }
14417 _ACEOF
14418 rm -f conftest.$ac_objext
14419 if { (eval echo "$as_me:14419: \"$ac_compile\"") >&5
14420   (eval $ac_compile) 2>&5
14421   ac_status=$?
14422   echo "$as_me:14422: \$? = $ac_status" >&5
14423   (exit $ac_status); } &&
14424          { ac_try='test -s conftest.$ac_objext'
14425   { (eval echo "$as_me:14425: \"$ac_try\"") >&5
14426   (eval $ac_try) 2>&5
14427   ac_status=$?
14428   echo "$as_me:14428: \$? = $ac_status" >&5
14429   (exit $ac_status); }; }; then
14430   cf_cv_mbstate_t=no
14431 else
14432   echo "$as_me: failed program was:" >&5
14433 cat conftest.$ac_ext >&5
14434 cat >conftest.$ac_ext <<_ACEOF
14435 #line 14435 "configure"
14436 #include "confdefs.h"
14437
14438 #include <stdlib.h>
14439 #include <stdarg.h>
14440 #include <stdio.h>
14441 #include <wchar.h>
14442 #ifdef HAVE_LIBUTF8_H
14443 #include <libutf8.h>
14444 #endif
14445 int
14446 main ()
14447 {
14448 mbstate_t value
14449   ;
14450   return 0;
14451 }
14452 _ACEOF
14453 rm -f conftest.$ac_objext
14454 if { (eval echo "$as_me:14454: \"$ac_compile\"") >&5
14455   (eval $ac_compile) 2>&5
14456   ac_status=$?
14457   echo "$as_me:14457: \$? = $ac_status" >&5
14458   (exit $ac_status); } &&
14459          { ac_try='test -s conftest.$ac_objext'
14460   { (eval echo "$as_me:14460: \"$ac_try\"") >&5
14461   (eval $ac_try) 2>&5
14462   ac_status=$?
14463   echo "$as_me:14463: \$? = $ac_status" >&5
14464   (exit $ac_status); }; }; then
14465   cf_cv_mbstate_t=yes
14466 else
14467   echo "$as_me: failed program was:" >&5
14468 cat conftest.$ac_ext >&5
14469 cf_cv_mbstate_t=unknown
14470 fi
14471 rm -f conftest.$ac_objext conftest.$ac_ext
14472 fi
14473 rm -f conftest.$ac_objext conftest.$ac_ext
14474 fi
14475 echo "$as_me:14475: result: $cf_cv_mbstate_t" >&5
14476 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14477
14478 if test "$cf_cv_mbstate_t" = yes ; then
14479         cat >>confdefs.h <<\EOF
14480 #define NEED_WCHAR_H 1
14481 EOF
14482
14483         NEED_WCHAR_H=1
14484 fi
14485
14486 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
14487 if test "$cf_cv_mbstate_t" = unknown ; then
14488         NCURSES_MBSTATE_T=1
14489 fi
14490
14491 # if we find mbstate_t in either place, use substitution to provide a fallback.
14492 if test "$cf_cv_mbstate_t" != unknown ; then
14493         NCURSES_OK_MBSTATE_T=1
14494 fi
14495
14496 # This is needed on Tru64 5.0 to declare wchar_t
14497 echo "$as_me:14497: checking if we must include wchar.h to declare wchar_t" >&5
14498 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
14499 if test "${cf_cv_wchar_t+set}" = set; then
14500   echo $ECHO_N "(cached) $ECHO_C" >&6
14501 else
14502
14503 cat >conftest.$ac_ext <<_ACEOF
14504 #line 14504 "configure"
14505 #include "confdefs.h"
14506
14507 #include <stdlib.h>
14508 #include <stdarg.h>
14509 #include <stdio.h>
14510 #ifdef HAVE_LIBUTF8_H
14511 #include <libutf8.h>
14512 #endif
14513 int
14514 main ()
14515 {
14516 wchar_t state
14517   ;
14518   return 0;
14519 }
14520 _ACEOF
14521 rm -f conftest.$ac_objext
14522 if { (eval echo "$as_me:14522: \"$ac_compile\"") >&5
14523   (eval $ac_compile) 2>&5
14524   ac_status=$?
14525   echo "$as_me:14525: \$? = $ac_status" >&5
14526   (exit $ac_status); } &&
14527          { ac_try='test -s conftest.$ac_objext'
14528   { (eval echo "$as_me:14528: \"$ac_try\"") >&5
14529   (eval $ac_try) 2>&5
14530   ac_status=$?
14531   echo "$as_me:14531: \$? = $ac_status" >&5
14532   (exit $ac_status); }; }; then
14533   cf_cv_wchar_t=no
14534 else
14535   echo "$as_me: failed program was:" >&5
14536 cat conftest.$ac_ext >&5
14537 cat >conftest.$ac_ext <<_ACEOF
14538 #line 14538 "configure"
14539 #include "confdefs.h"
14540
14541 #include <stdlib.h>
14542 #include <stdarg.h>
14543 #include <stdio.h>
14544 #include <wchar.h>
14545 #ifdef HAVE_LIBUTF8_H
14546 #include <libutf8.h>
14547 #endif
14548 int
14549 main ()
14550 {
14551 wchar_t value
14552   ;
14553   return 0;
14554 }
14555 _ACEOF
14556 rm -f conftest.$ac_objext
14557 if { (eval echo "$as_me:14557: \"$ac_compile\"") >&5
14558   (eval $ac_compile) 2>&5
14559   ac_status=$?
14560   echo "$as_me:14560: \$? = $ac_status" >&5
14561   (exit $ac_status); } &&
14562          { ac_try='test -s conftest.$ac_objext'
14563   { (eval echo "$as_me:14563: \"$ac_try\"") >&5
14564   (eval $ac_try) 2>&5
14565   ac_status=$?
14566   echo "$as_me:14566: \$? = $ac_status" >&5
14567   (exit $ac_status); }; }; then
14568   cf_cv_wchar_t=yes
14569 else
14570   echo "$as_me: failed program was:" >&5
14571 cat conftest.$ac_ext >&5
14572 cf_cv_wchar_t=unknown
14573 fi
14574 rm -f conftest.$ac_objext conftest.$ac_ext
14575 fi
14576 rm -f conftest.$ac_objext conftest.$ac_ext
14577 fi
14578 echo "$as_me:14578: result: $cf_cv_wchar_t" >&5
14579 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14580
14581 if test "$cf_cv_wchar_t" = yes ; then
14582         cat >>confdefs.h <<\EOF
14583 #define NEED_WCHAR_H 1
14584 EOF
14585
14586         NEED_WCHAR_H=1
14587 fi
14588
14589 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14590 if test "$cf_cv_wchar_t" = unknown ; then
14591         NCURSES_WCHAR_T=1
14592 fi
14593
14594 # if we find wchar_t in either place, use substitution to provide a fallback.
14595 if test "$cf_cv_wchar_t" != unknown ; then
14596         NCURSES_OK_WCHAR_T=1
14597 fi
14598
14599 # This is needed on Tru64 5.0 to declare wint_t
14600 echo "$as_me:14600: checking if we must include wchar.h to declare wint_t" >&5
14601 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14602 if test "${cf_cv_wint_t+set}" = set; then
14603   echo $ECHO_N "(cached) $ECHO_C" >&6
14604 else
14605
14606 cat >conftest.$ac_ext <<_ACEOF
14607 #line 14607 "configure"
14608 #include "confdefs.h"
14609
14610 #include <stdlib.h>
14611 #include <stdarg.h>
14612 #include <stdio.h>
14613 #ifdef HAVE_LIBUTF8_H
14614 #include <libutf8.h>
14615 #endif
14616 int
14617 main ()
14618 {
14619 wint_t state
14620   ;
14621   return 0;
14622 }
14623 _ACEOF
14624 rm -f conftest.$ac_objext
14625 if { (eval echo "$as_me:14625: \"$ac_compile\"") >&5
14626   (eval $ac_compile) 2>&5
14627   ac_status=$?
14628   echo "$as_me:14628: \$? = $ac_status" >&5
14629   (exit $ac_status); } &&
14630          { ac_try='test -s conftest.$ac_objext'
14631   { (eval echo "$as_me:14631: \"$ac_try\"") >&5
14632   (eval $ac_try) 2>&5
14633   ac_status=$?
14634   echo "$as_me:14634: \$? = $ac_status" >&5
14635   (exit $ac_status); }; }; then
14636   cf_cv_wint_t=no
14637 else
14638   echo "$as_me: failed program was:" >&5
14639 cat conftest.$ac_ext >&5
14640 cat >conftest.$ac_ext <<_ACEOF
14641 #line 14641 "configure"
14642 #include "confdefs.h"
14643
14644 #include <stdlib.h>
14645 #include <stdarg.h>
14646 #include <stdio.h>
14647 #include <wchar.h>
14648 #ifdef HAVE_LIBUTF8_H
14649 #include <libutf8.h>
14650 #endif
14651 int
14652 main ()
14653 {
14654 wint_t value
14655   ;
14656   return 0;
14657 }
14658 _ACEOF
14659 rm -f conftest.$ac_objext
14660 if { (eval echo "$as_me:14660: \"$ac_compile\"") >&5
14661   (eval $ac_compile) 2>&5
14662   ac_status=$?
14663   echo "$as_me:14663: \$? = $ac_status" >&5
14664   (exit $ac_status); } &&
14665          { ac_try='test -s conftest.$ac_objext'
14666   { (eval echo "$as_me:14666: \"$ac_try\"") >&5
14667   (eval $ac_try) 2>&5
14668   ac_status=$?
14669   echo "$as_me:14669: \$? = $ac_status" >&5
14670   (exit $ac_status); }; }; then
14671   cf_cv_wint_t=yes
14672 else
14673   echo "$as_me: failed program was:" >&5
14674 cat conftest.$ac_ext >&5
14675 cf_cv_wint_t=unknown
14676 fi
14677 rm -f conftest.$ac_objext conftest.$ac_ext
14678 fi
14679 rm -f conftest.$ac_objext conftest.$ac_ext
14680 fi
14681 echo "$as_me:14681: result: $cf_cv_wint_t" >&5
14682 echo "${ECHO_T}$cf_cv_wint_t" >&6
14683
14684 if test "$cf_cv_wint_t" = yes ; then
14685         cat >>confdefs.h <<\EOF
14686 #define NEED_WCHAR_H 1
14687 EOF
14688
14689         NEED_WCHAR_H=1
14690 fi
14691
14692 # if we do not find wint_t in either place, use substitution to provide a fallback.
14693 if test "$cf_cv_wint_t" = unknown ; then
14694         NCURSES_WINT_T=1
14695 fi
14696
14697 # if we find wint_t in either place, use substitution to provide a fallback.
14698 if test "$cf_cv_wint_t" != unknown ; then
14699         NCURSES_OK_WINT_T=1
14700 fi
14701
14702         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
14703
14704 echo "$as_me:14704: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14705 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14706 cat >conftest.$ac_ext <<_ACEOF
14707 #line 14707 "configure"
14708 #include "confdefs.h"
14709
14710 #ifndef _XOPEN_SOURCE_EXTENDED
14711 #define _XOPEN_SOURCE_EXTENDED
14712 #endif
14713 #include <${cf_cv_ncurses_header:-curses.h}>
14714 int
14715 main ()
14716 {
14717
14718 mbstate_t foo
14719
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 rm -f conftest.$ac_objext
14725 if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5
14726   (eval $ac_compile) 2>&5
14727   ac_status=$?
14728   echo "$as_me:14728: \$? = $ac_status" >&5
14729   (exit $ac_status); } &&
14730          { ac_try='test -s conftest.$ac_objext'
14731   { (eval echo "$as_me:14731: \"$ac_try\"") >&5
14732   (eval $ac_try) 2>&5
14733   ac_status=$?
14734   echo "$as_me:14734: \$? = $ac_status" >&5
14735   (exit $ac_status); }; }; then
14736   cf_result=yes
14737 else
14738   echo "$as_me: failed program was:" >&5
14739 cat conftest.$ac_ext >&5
14740 cf_result=no
14741 fi
14742 rm -f conftest.$ac_objext conftest.$ac_ext
14743 echo "$as_me:14743: result: $cf_result" >&5
14744 echo "${ECHO_T}$cf_result" >&6
14745 if test $cf_result = yes ; then
14746
14747 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14748
14749         cat >>confdefs.h <<EOF
14750 #define $cf_result 1
14751 EOF
14752
14753 else
14754         cat >>confdefs.h <<EOF
14755 #define mbstate_t long
14756 EOF
14757
14758 fi
14759
14760         fi
14761
14762         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
14763
14764 echo "$as_me:14764: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14765 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14766 cat >conftest.$ac_ext <<_ACEOF
14767 #line 14767 "configure"
14768 #include "confdefs.h"
14769
14770 #ifndef _XOPEN_SOURCE_EXTENDED
14771 #define _XOPEN_SOURCE_EXTENDED
14772 #endif
14773 #include <${cf_cv_ncurses_header:-curses.h}>
14774 int
14775 main ()
14776 {
14777
14778 wchar_t foo
14779
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -f conftest.$ac_objext
14785 if { (eval echo "$as_me:14785: \"$ac_compile\"") >&5
14786   (eval $ac_compile) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); } &&
14790          { ac_try='test -s conftest.$ac_objext'
14791   { (eval echo "$as_me:14791: \"$ac_try\"") >&5
14792   (eval $ac_try) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); }; }; then
14796   cf_result=yes
14797 else
14798   echo "$as_me: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14800 cf_result=no
14801 fi
14802 rm -f conftest.$ac_objext conftest.$ac_ext
14803 echo "$as_me:14803: result: $cf_result" >&5
14804 echo "${ECHO_T}$cf_result" >&6
14805 if test $cf_result = yes ; then
14806
14807 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14808
14809         cat >>confdefs.h <<EOF
14810 #define $cf_result 1
14811 EOF
14812
14813 else
14814         cat >>confdefs.h <<EOF
14815 #define wchar_t long
14816 EOF
14817
14818 fi
14819
14820         fi
14821
14822         if test "$NCURSES_OK_WINT_T" = 0 ; then
14823
14824 echo "$as_me:14824: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14825 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14826 cat >conftest.$ac_ext <<_ACEOF
14827 #line 14827 "configure"
14828 #include "confdefs.h"
14829
14830 #ifndef _XOPEN_SOURCE_EXTENDED
14831 #define _XOPEN_SOURCE_EXTENDED
14832 #endif
14833 #include <${cf_cv_ncurses_header:-curses.h}>
14834 int
14835 main ()
14836 {
14837
14838 wint_t foo
14839
14840   ;
14841   return 0;
14842 }
14843 _ACEOF
14844 rm -f conftest.$ac_objext
14845 if { (eval echo "$as_me:14845: \"$ac_compile\"") >&5
14846   (eval $ac_compile) 2>&5
14847   ac_status=$?
14848   echo "$as_me:14848: \$? = $ac_status" >&5
14849   (exit $ac_status); } &&
14850          { ac_try='test -s conftest.$ac_objext'
14851   { (eval echo "$as_me:14851: \"$ac_try\"") >&5
14852   (eval $ac_try) 2>&5
14853   ac_status=$?
14854   echo "$as_me:14854: \$? = $ac_status" >&5
14855   (exit $ac_status); }; }; then
14856   cf_result=yes
14857 else
14858   echo "$as_me: failed program was:" >&5
14859 cat conftest.$ac_ext >&5
14860 cf_result=no
14861 fi
14862 rm -f conftest.$ac_objext conftest.$ac_ext
14863 echo "$as_me:14863: result: $cf_result" >&5
14864 echo "${ECHO_T}$cf_result" >&6
14865 if test $cf_result = yes ; then
14866
14867 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14868
14869         cat >>confdefs.h <<EOF
14870 #define $cf_result 1
14871 EOF
14872
14873 else
14874         cat >>confdefs.h <<EOF
14875 #define wint_t long
14876 EOF
14877
14878 fi
14879
14880         fi
14881 fi
14882
14883 echo "$as_me:14883: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
14884 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14885
14886 cat >conftest.$ac_ext <<_ACEOF
14887 #line 14887 "configure"
14888 #include "confdefs.h"
14889
14890 #ifdef HAVE_XCURSES
14891 #include <xcurses.h>
14892 char * XCursesProgramName = "test";
14893 #else
14894 #include <${cf_cv_ncurses_header:-curses.h}>
14895 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14896 #include <ncursesw/term.h>
14897 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14898 #include <ncurses/term.h>
14899 #elif defined(HAVE_TERM_H)
14900 #include <term.h>
14901 #endif
14902 #endif
14903
14904 int
14905 main ()
14906 {
14907
14908 void *foo = &(boolnames)
14909
14910   ;
14911   return 0;
14912 }
14913 _ACEOF
14914 rm -f conftest.$ac_objext
14915 if { (eval echo "$as_me:14915: \"$ac_compile\"") >&5
14916   (eval $ac_compile) 2>&5
14917   ac_status=$?
14918   echo "$as_me:14918: \$? = $ac_status" >&5
14919   (exit $ac_status); } &&
14920          { ac_try='test -s conftest.$ac_objext'
14921   { (eval echo "$as_me:14921: \"$ac_try\"") >&5
14922   (eval $ac_try) 2>&5
14923   ac_status=$?
14924   echo "$as_me:14924: \$? = $ac_status" >&5
14925   (exit $ac_status); }; }; then
14926   cf_result=yes
14927 else
14928   echo "$as_me: failed program was:" >&5
14929 cat conftest.$ac_ext >&5
14930 cf_result=no
14931 fi
14932 rm -f conftest.$ac_objext conftest.$ac_ext
14933 echo "$as_me:14933: result: $cf_result" >&5
14934 echo "${ECHO_T}$cf_result" >&6
14935
14936 if test $cf_result = yes ; then
14937
14938 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14939
14940         cat >>confdefs.h <<EOF
14941 #define $cf_result 1
14942 EOF
14943
14944 else
14945         echo "$as_me:14945: checking for data boolnames in library" >&5
14946 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
14947         # BSD linkers insist on making weak linkage, but resolve at runtime.
14948         if test "$cross_compiling" = yes; then
14949
14950         # cross-compiling
14951         cat >conftest.$ac_ext <<_ACEOF
14952 #line 14952 "configure"
14953 #include "confdefs.h"
14954
14955 #ifdef HAVE_XCURSES
14956 #include <xcurses.h>
14957 char * XCursesProgramName = "test";
14958 #else
14959 #include <${cf_cv_ncurses_header:-curses.h}>
14960 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14961 #include <ncursesw/term.h>
14962 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14963 #include <ncurses/term.h>
14964 #elif defined(HAVE_TERM_H)
14965 #include <term.h>
14966 #endif
14967 #endif
14968
14969 extern char boolnames;
14970 int
14971 main ()
14972 {
14973
14974         do {
14975                 void *foo = &(boolnames);
14976                 ${cf_cv_main_return:-return}(foo == 0);
14977         } while (0)
14978
14979   ;
14980   return 0;
14981 }
14982 _ACEOF
14983 rm -f conftest.$ac_objext conftest$ac_exeext
14984 if { (eval echo "$as_me:14984: \"$ac_link\"") >&5
14985   (eval $ac_link) 2>&5
14986   ac_status=$?
14987   echo "$as_me:14987: \$? = $ac_status" >&5
14988   (exit $ac_status); } &&
14989          { ac_try='test -s conftest$ac_exeext'
14990   { (eval echo "$as_me:14990: \"$ac_try\"") >&5
14991   (eval $ac_try) 2>&5
14992   ac_status=$?
14993   echo "$as_me:14993: \$? = $ac_status" >&5
14994   (exit $ac_status); }; }; then
14995   cf_result=yes
14996 else
14997   echo "$as_me: failed program was:" >&5
14998 cat conftest.$ac_ext >&5
14999 cf_result=no
15000 fi
15001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15002
15003 else
15004   cat >conftest.$ac_ext <<_ACEOF
15005 #line 15005 "configure"
15006 #include "confdefs.h"
15007
15008 #ifdef HAVE_XCURSES
15009 #include <xcurses.h>
15010 char * XCursesProgramName = "test";
15011 #else
15012 #include <${cf_cv_ncurses_header:-curses.h}>
15013 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15014 #include <ncursesw/term.h>
15015 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15016 #include <ncurses/term.h>
15017 #elif defined(HAVE_TERM_H)
15018 #include <term.h>
15019 #endif
15020 #endif
15021
15022 extern char boolnames;
15023 int main(void)
15024 {
15025         void *foo = &(boolnames);
15026         ${cf_cv_main_return:-return}(foo == 0);
15027 }
15028 _ACEOF
15029 rm -f conftest$ac_exeext
15030 if { (eval echo "$as_me:15030: \"$ac_link\"") >&5
15031   (eval $ac_link) 2>&5
15032   ac_status=$?
15033   echo "$as_me:15033: \$? = $ac_status" >&5
15034   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15035   { (eval echo "$as_me:15035: \"$ac_try\"") >&5
15036   (eval $ac_try) 2>&5
15037   ac_status=$?
15038   echo "$as_me:15038: \$? = $ac_status" >&5
15039   (exit $ac_status); }; }; then
15040   cf_result=yes
15041 else
15042   echo "$as_me: program exited with status $ac_status" >&5
15043 echo "$as_me: failed program was:" >&5
15044 cat conftest.$ac_ext >&5
15045 cf_result=no
15046 fi
15047 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15048 fi
15049         echo "$as_me:15049: result: $cf_result" >&5
15050 echo "${ECHO_T}$cf_result" >&6
15051         if test $cf_result = yes ; then
15052
15053 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15054
15055                 cat >>confdefs.h <<EOF
15056 #define $cf_result 1
15057 EOF
15058
15059         fi
15060 fi
15061
15062 echo "$as_me:15062: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15063 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15064
15065 cat >conftest.$ac_ext <<_ACEOF
15066 #line 15066 "configure"
15067 #include "confdefs.h"
15068
15069 #ifdef HAVE_XCURSES
15070 #include <xcurses.h>
15071 char * XCursesProgramName = "test";
15072 #else
15073 #include <${cf_cv_ncurses_header:-curses.h}>
15074 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15075 #include <ncursesw/term.h>
15076 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15077 #include <ncurses/term.h>
15078 #elif defined(HAVE_TERM_H)
15079 #include <term.h>
15080 #endif
15081 #endif
15082
15083 int
15084 main ()
15085 {
15086
15087 void *foo = &(boolfnames)
15088
15089   ;
15090   return 0;
15091 }
15092 _ACEOF
15093 rm -f conftest.$ac_objext
15094 if { (eval echo "$as_me:15094: \"$ac_compile\"") >&5
15095   (eval $ac_compile) 2>&5
15096   ac_status=$?
15097   echo "$as_me:15097: \$? = $ac_status" >&5
15098   (exit $ac_status); } &&
15099          { ac_try='test -s conftest.$ac_objext'
15100   { (eval echo "$as_me:15100: \"$ac_try\"") >&5
15101   (eval $ac_try) 2>&5
15102   ac_status=$?
15103   echo "$as_me:15103: \$? = $ac_status" >&5
15104   (exit $ac_status); }; }; then
15105   cf_result=yes
15106 else
15107   echo "$as_me: failed program was:" >&5
15108 cat conftest.$ac_ext >&5
15109 cf_result=no
15110 fi
15111 rm -f conftest.$ac_objext conftest.$ac_ext
15112 echo "$as_me:15112: result: $cf_result" >&5
15113 echo "${ECHO_T}$cf_result" >&6
15114
15115 if test $cf_result = yes ; then
15116
15117 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15118
15119         cat >>confdefs.h <<EOF
15120 #define $cf_result 1
15121 EOF
15122
15123 else
15124         echo "$as_me:15124: checking for data boolfnames in library" >&5
15125 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15126         # BSD linkers insist on making weak linkage, but resolve at runtime.
15127         if test "$cross_compiling" = yes; then
15128
15129         # cross-compiling
15130         cat >conftest.$ac_ext <<_ACEOF
15131 #line 15131 "configure"
15132 #include "confdefs.h"
15133
15134 #ifdef HAVE_XCURSES
15135 #include <xcurses.h>
15136 char * XCursesProgramName = "test";
15137 #else
15138 #include <${cf_cv_ncurses_header:-curses.h}>
15139 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15140 #include <ncursesw/term.h>
15141 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15142 #include <ncurses/term.h>
15143 #elif defined(HAVE_TERM_H)
15144 #include <term.h>
15145 #endif
15146 #endif
15147
15148 extern char boolfnames;
15149 int
15150 main ()
15151 {
15152
15153         do {
15154                 void *foo = &(boolfnames);
15155                 ${cf_cv_main_return:-return}(foo == 0);
15156         } while (0)
15157
15158   ;
15159   return 0;
15160 }
15161 _ACEOF
15162 rm -f conftest.$ac_objext conftest$ac_exeext
15163 if { (eval echo "$as_me:15163: \"$ac_link\"") >&5
15164   (eval $ac_link) 2>&5
15165   ac_status=$?
15166   echo "$as_me:15166: \$? = $ac_status" >&5
15167   (exit $ac_status); } &&
15168          { ac_try='test -s conftest$ac_exeext'
15169   { (eval echo "$as_me:15169: \"$ac_try\"") >&5
15170   (eval $ac_try) 2>&5
15171   ac_status=$?
15172   echo "$as_me:15172: \$? = $ac_status" >&5
15173   (exit $ac_status); }; }; then
15174   cf_result=yes
15175 else
15176   echo "$as_me: failed program was:" >&5
15177 cat conftest.$ac_ext >&5
15178 cf_result=no
15179 fi
15180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15181
15182 else
15183   cat >conftest.$ac_ext <<_ACEOF
15184 #line 15184 "configure"
15185 #include "confdefs.h"
15186
15187 #ifdef HAVE_XCURSES
15188 #include <xcurses.h>
15189 char * XCursesProgramName = "test";
15190 #else
15191 #include <${cf_cv_ncurses_header:-curses.h}>
15192 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15193 #include <ncursesw/term.h>
15194 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15195 #include <ncurses/term.h>
15196 #elif defined(HAVE_TERM_H)
15197 #include <term.h>
15198 #endif
15199 #endif
15200
15201 extern char boolfnames;
15202 int main(void)
15203 {
15204         void *foo = &(boolfnames);
15205         ${cf_cv_main_return:-return}(foo == 0);
15206 }
15207 _ACEOF
15208 rm -f conftest$ac_exeext
15209 if { (eval echo "$as_me:15209: \"$ac_link\"") >&5
15210   (eval $ac_link) 2>&5
15211   ac_status=$?
15212   echo "$as_me:15212: \$? = $ac_status" >&5
15213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15214   { (eval echo "$as_me:15214: \"$ac_try\"") >&5
15215   (eval $ac_try) 2>&5
15216   ac_status=$?
15217   echo "$as_me:15217: \$? = $ac_status" >&5
15218   (exit $ac_status); }; }; then
15219   cf_result=yes
15220 else
15221   echo "$as_me: program exited with status $ac_status" >&5
15222 echo "$as_me: failed program was:" >&5
15223 cat conftest.$ac_ext >&5
15224 cf_result=no
15225 fi
15226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15227 fi
15228         echo "$as_me:15228: result: $cf_result" >&5
15229 echo "${ECHO_T}$cf_result" >&6
15230         if test $cf_result = yes ; then
15231
15232 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15233
15234                 cat >>confdefs.h <<EOF
15235 #define $cf_result 1
15236 EOF
15237
15238         fi
15239 fi
15240
15241 TEST_ARGS="$LIBS"
15242 LIBS=
15243
15244 ac_config_files="$ac_config_files Makefile"
15245 ac_config_commands="$ac_config_commands default"
15246 cat >confcache <<\_ACEOF
15247 # This file is a shell script that caches the results of configure
15248 # tests run on this system so they can be shared between configure
15249 # scripts and configure runs, see configure's option --config-cache.
15250 # It is not useful on other systems.  If it contains results you don't
15251 # want to keep, you may remove or edit it.
15252 #
15253 # config.status only pays attention to the cache file if you give it
15254 # the --recheck option to rerun configure.
15255 #
15256 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15257 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15258 # following values.
15259
15260 _ACEOF
15261
15262 # The following way of writing the cache mishandles newlines in values,
15263 # but we know of no workaround that is simple, portable, and efficient.
15264 # So, don't put newlines in cache variables' values.
15265 # Ultrix sh set writes to stderr and can't be redirected directly,
15266 # and sets the high bit in the cache file unless we assign to the vars.
15267 {
15268   (set) 2>&1 |
15269     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15270     *ac_space=\ *)
15271       # `set' does not quote correctly, so add quotes (double-quote
15272       # substitution turns \\\\ into \\, and sed turns \\ into \).
15273       sed -n \
15274         "s/'/'\\\\''/g;
15275           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15276       ;;
15277     *)
15278       # `set' quotes correctly as required by POSIX, so do not add quotes.
15279       sed -n \
15280         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15281       ;;
15282     esac;
15283 } |
15284   sed '
15285      t clear
15286      : clear
15287      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15288      t end
15289      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15290      : end' >>confcache
15291 if cmp -s $cache_file confcache; then :; else
15292   if test -w $cache_file; then
15293     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15294     cat confcache >$cache_file
15295   else
15296     echo "not updating unwritable cache $cache_file"
15297   fi
15298 fi
15299 rm -f confcache
15300
15301 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15302 # Let make expand exec_prefix.
15303 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15304
15305 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15306 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15307 # trailing colons and then remove the whole line if VPATH becomes empty
15308 # (actually we leave an empty line to preserve line numbers).
15309 if test "x$srcdir" = x.; then
15310   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15311 s/:*\$(srcdir):*/:/;
15312 s/:*\${srcdir}:*/:/;
15313 s/:*@srcdir@:*/:/;
15314 s/^\([^=]*=[    ]*\):*/\1/;
15315 s/:*$//;
15316 s/^[^=]*=[      ]*$//;
15317 }'
15318 fi
15319
15320 DEFS=-DHAVE_CONFIG_H
15321
15322 : ${CONFIG_STATUS=./config.status}
15323 ac_clean_files_save=$ac_clean_files
15324 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15325 { echo "$as_me:15325: creating $CONFIG_STATUS" >&5
15326 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15327 cat >$CONFIG_STATUS <<_ACEOF
15328 #! $SHELL
15329 # Generated automatically by configure.
15330 # Run this file to recreate the current configuration.
15331 # Compiler output produced by configure, useful for debugging
15332 # configure, is in config.log if it exists.
15333
15334 debug=false
15335 SHELL=\${CONFIG_SHELL-$SHELL}
15336 ac_cs_invocation="\$0 \$@"
15337
15338 _ACEOF
15339
15340 cat >>$CONFIG_STATUS <<\_ACEOF
15341 # Be Bourne compatible
15342 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15343   emulate sh
15344   NULLCMD=:
15345 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15346   set -o posix
15347 fi
15348
15349 # Name of the executable.
15350 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15351
15352 if expr a : '\(a\)' >/dev/null 2>&1; then
15353   as_expr=expr
15354 else
15355   as_expr=false
15356 fi
15357
15358 rm -f conf$$ conf$$.exe conf$$.file
15359 echo >conf$$.file
15360 if ln -s conf$$.file conf$$ 2>/dev/null; then
15361   # We could just check for DJGPP; but this test a) works b) is more generic
15362   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15363   if test -f conf$$.exe; then
15364     # Don't use ln at all; we don't have any links
15365     as_ln_s='cp -p'
15366   else
15367     as_ln_s='ln -s'
15368   fi
15369 elif ln conf$$.file conf$$ 2>/dev/null; then
15370   as_ln_s=ln
15371 else
15372   as_ln_s='cp -p'
15373 fi
15374 rm -f conf$$ conf$$.exe conf$$.file
15375
15376 as_executable_p="test -f"
15377
15378 # Support unset when possible.
15379 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15380   as_unset=unset
15381 else
15382   as_unset=false
15383 fi
15384
15385 # NLS nuisances.
15386 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15387 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15388 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15389 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15390 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15391 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15392 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15393 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15394
15395 # IFS
15396 # We need space, tab and new line, in precisely that order.
15397 as_nl='
15398 '
15399 IFS="   $as_nl"
15400
15401 # CDPATH.
15402 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15403
15404 exec 6>&1
15405
15406 _ACEOF
15407
15408 # Files that config.status was made for.
15409 if test -n "$ac_config_files"; then
15410   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15411 fi
15412
15413 if test -n "$ac_config_headers"; then
15414   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15415 fi
15416
15417 if test -n "$ac_config_links"; then
15418   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15419 fi
15420
15421 if test -n "$ac_config_commands"; then
15422   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15423 fi
15424
15425 cat >>$CONFIG_STATUS <<\EOF
15426
15427 ac_cs_usage="\
15428 \`$as_me' instantiates files from templates according to the
15429 current configuration.
15430
15431 Usage: $0 [OPTIONS] [FILE]...
15432
15433   -h, --help       print this help, then exit
15434   -V, --version    print version number, then exit
15435   -d, --debug      don't remove temporary files
15436       --recheck    update $as_me by reconfiguring in the same conditions
15437   --file=FILE[:TEMPLATE]
15438                    instantiate the configuration file FILE
15439   --header=FILE[:TEMPLATE]
15440                    instantiate the configuration header FILE
15441
15442 Configuration files:
15443 $config_files
15444
15445 Configuration headers:
15446 $config_headers
15447
15448 Configuration commands:
15449 $config_commands
15450
15451 Report bugs to <dickey@invisible-island.net>."
15452 EOF
15453
15454 cat >>$CONFIG_STATUS <<EOF
15455 ac_cs_version="\\
15456 config.status
15457 configured by $0, generated by GNU Autoconf 2.52.20101002,
15458   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15459
15460 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15461 Free Software Foundation, Inc.
15462 This config.status script is free software; the Free Software Foundation
15463 gives unlimited permission to copy, distribute and modify it."
15464 srcdir=$srcdir
15465 INSTALL="$INSTALL"
15466 EOF
15467
15468 cat >>$CONFIG_STATUS <<\EOF
15469 # If no file are specified by the user, then we need to provide default
15470 # value.  By we need to know if files were specified by the user.
15471 ac_need_defaults=:
15472 while test $# != 0
15473 do
15474   case $1 in
15475   --*=*)
15476     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15477     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15478     shift
15479     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15480     shift
15481     ;;
15482   -*);;
15483   *) # This is not an option, so the user has probably given explicit
15484      # arguments.
15485      ac_need_defaults=false;;
15486   esac
15487
15488   case $1 in
15489   # Handling of the options.
15490 EOF
15491 cat >>$CONFIG_STATUS <<EOF
15492   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15493     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15494     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15495 EOF
15496 cat >>$CONFIG_STATUS <<\EOF
15497   --version | --vers* | -V )
15498     echo "$ac_cs_version"; exit 0 ;;
15499   --he | --h)
15500     # Conflict between --help and --header
15501     { { echo "$as_me:15501: error: ambiguous option: $1
15502 Try \`$0 --help' for more information." >&5
15503 echo "$as_me: error: ambiguous option: $1
15504 Try \`$0 --help' for more information." >&2;}
15505    { (exit 1); exit 1; }; };;
15506   --help | --hel | -h )
15507     echo "$ac_cs_usage"; exit 0 ;;
15508   --debug | --d* | -d )
15509     debug=: ;;
15510   --file | --fil | --fi | --f )
15511     shift
15512     CONFIG_FILES="$CONFIG_FILES $1"
15513     ac_need_defaults=false;;
15514   --header | --heade | --head | --hea )
15515     shift
15516     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15517     ac_need_defaults=false;;
15518
15519   # This is an error.
15520   -*) { { echo "$as_me:15520: error: unrecognized option: $1
15521 Try \`$0 --help' for more information." >&5
15522 echo "$as_me: error: unrecognized option: $1
15523 Try \`$0 --help' for more information." >&2;}
15524    { (exit 1); exit 1; }; } ;;
15525
15526   *) ac_config_targets="$ac_config_targets $1" ;;
15527
15528   esac
15529   shift
15530 done
15531
15532 exec 5>>config.log
15533 cat >&5 << _ACEOF
15534
15535 ## ----------------------- ##
15536 ## Running config.status.  ##
15537 ## ----------------------- ##
15538
15539 This file was extended by $as_me 2.52.20101002, executed with
15540   CONFIG_FILES    = $CONFIG_FILES
15541   CONFIG_HEADERS  = $CONFIG_HEADERS
15542   CONFIG_LINKS    = $CONFIG_LINKS
15543   CONFIG_COMMANDS = $CONFIG_COMMANDS
15544   > $ac_cs_invocation
15545 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15546
15547 _ACEOF
15548 EOF
15549
15550 cat >>$CONFIG_STATUS <<EOF
15551 #
15552 # INIT-COMMANDS section.
15553 #
15554
15555 AWK="$AWK"
15556 ECHO_LD="$ECHO_LD"
15557
15558 EOF
15559
15560 cat >>$CONFIG_STATUS <<\EOF
15561 for ac_config_target in $ac_config_targets
15562 do
15563   case "$ac_config_target" in
15564   # Handling of arguments.
15565   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15566   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15567   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
15568   *) { { echo "$as_me:15568: error: invalid argument: $ac_config_target" >&5
15569 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15570    { (exit 1); exit 1; }; };;
15571   esac
15572 done
15573
15574 # If the user did not use the arguments to specify the items to instantiate,
15575 # then the envvar interface is used.  Set only those that are not.
15576 # We use the long form for the default assignment because of an extremely
15577 # bizarre bug on SunOS 4.1.3.
15578 if $ac_need_defaults; then
15579   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15580   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15581   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15582 fi
15583
15584 # Create a temporary directory, and hook for its removal unless debugging.
15585 $debug ||
15586 {
15587   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15588   trap '{ (exit 1); exit 1; }' 1 2 13 15
15589 }
15590
15591 # Create a (secure) tmp directory for tmp files.
15592 : ${TMPDIR=/tmp}
15593 {
15594   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15595   test -n "$tmp" && test -d "$tmp"
15596 }  ||
15597 {
15598   tmp=$TMPDIR/cs$$-$RANDOM
15599   (umask 077 && mkdir $tmp)
15600 } ||
15601 {
15602    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15603    { (exit 1); exit 1; }
15604 }
15605
15606 EOF
15607
15608 cat >>$CONFIG_STATUS <<EOF
15609
15610 #
15611 # CONFIG_FILES section.
15612 #
15613
15614 # No need to generate the scripts if there are no CONFIG_FILES.
15615 # This happens for instance when ./config.status config.h
15616 if test -n "\$CONFIG_FILES"; then
15617   # Protect against being on the right side of a sed subst in config.status.
15618   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15619    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15620 s,@SHELL@,$SHELL,;t t
15621 s,@exec_prefix@,$exec_prefix,;t t
15622 s,@prefix@,$prefix,;t t
15623 s,@program_transform_name@,$program_transform_name,;t t
15624 s,@bindir@,$bindir,;t t
15625 s,@sbindir@,$sbindir,;t t
15626 s,@libexecdir@,$libexecdir,;t t
15627 s,@datadir@,$datadir,;t t
15628 s,@sysconfdir@,$sysconfdir,;t t
15629 s,@sharedstatedir@,$sharedstatedir,;t t
15630 s,@localstatedir@,$localstatedir,;t t
15631 s,@libdir@,$libdir,;t t
15632 s,@includedir@,$includedir,;t t
15633 s,@oldincludedir@,$oldincludedir,;t t
15634 s,@infodir@,$infodir,;t t
15635 s,@mandir@,$mandir,;t t
15636 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15637 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15638 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15639 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15640 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15641 s,@build_alias@,$build_alias,;t t
15642 s,@host_alias@,$host_alias,;t t
15643 s,@target_alias@,$target_alias,;t t
15644 s,@ECHO_C@,$ECHO_C,;t t
15645 s,@ECHO_N@,$ECHO_N,;t t
15646 s,@ECHO_T@,$ECHO_T,;t t
15647 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15648 s,@DEFS@,$DEFS,;t t
15649 s,@LIBS@,$LIBS,;t t
15650 s,@build@,$build,;t t
15651 s,@build_cpu@,$build_cpu,;t t
15652 s,@build_vendor@,$build_vendor,;t t
15653 s,@build_os@,$build_os,;t t
15654 s,@host@,$host,;t t
15655 s,@host_cpu@,$host_cpu,;t t
15656 s,@host_vendor@,$host_vendor,;t t
15657 s,@host_os@,$host_os,;t t
15658 s,@SET_MAKE@,$SET_MAKE,;t t
15659 s,@CC@,$CC,;t t
15660 s,@CFLAGS@,$CFLAGS,;t t
15661 s,@LDFLAGS@,$LDFLAGS,;t t
15662 s,@CPPFLAGS@,$CPPFLAGS,;t t
15663 s,@ac_ct_CC@,$ac_ct_CC,;t t
15664 s,@EXEEXT@,$EXEEXT,;t t
15665 s,@OBJEXT@,$OBJEXT,;t t
15666 s,@CPP@,$CPP,;t t
15667 s,@AWK@,$AWK,;t t
15668 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15669 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15670 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15671 s,@LINT@,$LINT,;t t
15672 s,@LINT_OPTS@,$LINT_OPTS,;t t
15673 s,@CTAGS@,$CTAGS,;t t
15674 s,@ETAGS@,$ETAGS,;t t
15675 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15676 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15677 s,@MATH_LIB@,$MATH_LIB,;t t
15678 s,@top_builddir@,$top_builddir,;t t
15679 s,@CC_G_OPT@,$CC_G_OPT,;t t
15680 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15681 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15682 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15683 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15684 s,@LD@,$LD,;t t
15685 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
15686 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
15687 s,@LD_MODEL@,$LD_MODEL,;t t
15688 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15689 s,@LIBTOOL@,$LIBTOOL,;t t
15690 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15691 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15692 s,@LIB_LINK@,$LIB_LINK,;t t
15693 s,@LINK_TESTS@,$LINK_TESTS,;t t
15694 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15695 s,@PTHREAD@,$PTHREAD,;t t
15696 s,@TEST_ARGS@,$TEST_ARGS,;t t
15697 s,@TEST_DEPS@,$TEST_DEPS,;t t
15698 s,@TEST_LIBS@,$TEST_LIBS,;t t
15699 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
15700 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
15701 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15702 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15703 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15704 s,@ECHO_LT@,$ECHO_LT,;t t
15705 s,@ECHO_LD@,$ECHO_LD,;t t
15706 s,@RULE_CC@,$RULE_CC,;t t
15707 s,@SHOW_CC@,$SHOW_CC,;t t
15708 s,@ECHO_CC@,$ECHO_CC,;t t
15709 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15710 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15711 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15712 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15713 s,@X_CFLAGS@,$X_CFLAGS,;t t
15714 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
15715 s,@X_LIBS@,$X_LIBS,;t t
15716 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
15717 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
15718 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15719 CEOF
15720
15721 EOF
15722
15723   cat >>$CONFIG_STATUS <<\EOF
15724   # Split the substitutions into bite-sized pieces for seds with
15725   # small command number limits, like on Digital OSF/1 and HP-UX.
15726   ac_max_sed_lines=48
15727   ac_sed_frag=1 # Number of current file.
15728   ac_beg=1 # First line for current file.
15729   ac_end=$ac_max_sed_lines # Line after last line for current file.
15730   ac_more_lines=:
15731   ac_sed_cmds=
15732   while $ac_more_lines; do
15733     if test $ac_beg -gt 1; then
15734       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15735     else
15736       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15737     fi
15738     if test ! -s $tmp/subs.frag; then
15739       ac_more_lines=false
15740     else
15741       # The purpose of the label and of the branching condition is to
15742       # speed up the sed processing (if there are no `@' at all, there
15743       # is no need to browse any of the substitutions).
15744       # These are the two extra sed commands mentioned above.
15745       (echo ':t
15746   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15747       if test -z "$ac_sed_cmds"; then
15748         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15749       else
15750         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15751       fi
15752       ac_sed_frag=`expr $ac_sed_frag + 1`
15753       ac_beg=$ac_end
15754       ac_end=`expr $ac_end + $ac_max_sed_lines`
15755     fi
15756   done
15757   if test -z "$ac_sed_cmds"; then
15758     ac_sed_cmds=cat
15759   fi
15760 fi # test -n "$CONFIG_FILES"
15761
15762 EOF
15763 cat >>$CONFIG_STATUS <<\EOF
15764 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15765   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15766   case $ac_file in
15767   - | *:- | *:-:* ) # input from stdin
15768         cat >$tmp/stdin
15769         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15770         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15771   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15772         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15773   * )   ac_file_in=$ac_file.in ;;
15774   esac
15775
15776   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15777   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15778          X"$ac_file" : 'X\(//\)[^/]' \| \
15779          X"$ac_file" : 'X\(//\)$' \| \
15780          X"$ac_file" : 'X\(/\)' \| \
15781          .     : '\(.\)' 2>/dev/null ||
15782 echo X"$ac_file" |
15783     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15784           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15785           /^X\(\/\/\)$/{ s//\1/; q; }
15786           /^X\(\/\).*/{ s//\1/; q; }
15787           s/.*/./; q'`
15788   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15789     { case "$ac_dir" in
15790   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15791   *)                      as_incr_dir=.;;
15792 esac
15793 as_dummy="$ac_dir"
15794 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15795   case $as_mkdir_dir in
15796     # Skip DOS drivespec
15797     ?:) as_incr_dir=$as_mkdir_dir ;;
15798     *)
15799       as_incr_dir=$as_incr_dir/$as_mkdir_dir
15800       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15801     ;;
15802   esac
15803 done; }
15804
15805     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15806     # A "../" for each directory in $ac_dir_suffix.
15807     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15808   else
15809     ac_dir_suffix= ac_dots=
15810   fi
15811
15812   case $srcdir in
15813   .)  ac_srcdir=.
15814       if test -z "$ac_dots"; then
15815          ac_top_srcdir=.
15816       else
15817          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15818       fi ;;
15819   [\\/]* | ?:[\\/]* )
15820       ac_srcdir=$srcdir$ac_dir_suffix;
15821       ac_top_srcdir=$srcdir ;;
15822   *) # Relative path.
15823     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15824     ac_top_srcdir=$ac_dots$srcdir ;;
15825   esac
15826
15827   case $INSTALL in
15828   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15829   *) ac_INSTALL=$ac_dots$INSTALL ;;
15830   esac
15831
15832   if test x"$ac_file" != x-; then
15833     { echo "$as_me:15833: creating $ac_file" >&5
15834 echo "$as_me: creating $ac_file" >&6;}
15835     rm -f "$ac_file"
15836   fi
15837   # Let's still pretend it is `configure' which instantiates (i.e., don't
15838   # use $as_me), people would be surprised to read:
15839   #    /* config.h.  Generated automatically by config.status.  */
15840   configure_input="Generated automatically from `echo $ac_file_in |
15841                                                  sed 's,.*/,,'` by configure."
15842
15843   # First look for the input files in the build tree, otherwise in the
15844   # src tree.
15845   ac_file_inputs=`IFS=:
15846     for f in $ac_file_in; do
15847       case $f in
15848       -) echo $tmp/stdin ;;
15849       [\\/$]*)
15850          # Absolute (can't be DOS-style, as IFS=:)
15851          test -f "$f" || { { echo "$as_me:15851: error: cannot find input file: $f" >&5
15852 echo "$as_me: error: cannot find input file: $f" >&2;}
15853    { (exit 1); exit 1; }; }
15854          echo $f;;
15855       *) # Relative
15856          if test -f "$f"; then
15857            # Build tree
15858            echo $f
15859          elif test -f "$srcdir/$f"; then
15860            # Source tree
15861            echo $srcdir/$f
15862          else
15863            # /dev/null tree
15864            { { echo "$as_me:15864: error: cannot find input file: $f" >&5
15865 echo "$as_me: error: cannot find input file: $f" >&2;}
15866    { (exit 1); exit 1; }; }
15867          fi;;
15868       esac
15869     done` || { (exit 1); exit 1; }
15870 EOF
15871 cat >>$CONFIG_STATUS <<EOF
15872   sed "$ac_vpsub
15873 $extrasub
15874 EOF
15875 cat >>$CONFIG_STATUS <<\EOF
15876 :t
15877 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15878 s,@configure_input@,$configure_input,;t t
15879 s,@srcdir@,$ac_srcdir,;t t
15880 s,@top_srcdir@,$ac_top_srcdir,;t t
15881 s,@INSTALL@,$ac_INSTALL,;t t
15882 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15883   rm -f $tmp/stdin
15884   if test x"$ac_file" != x-; then
15885     mv $tmp/out $ac_file
15886   else
15887     cat $tmp/out
15888     rm -f $tmp/out
15889   fi
15890
15891 done
15892 EOF
15893 cat >>$CONFIG_STATUS <<\EOF
15894
15895 #
15896 # CONFIG_HEADER section.
15897 #
15898
15899 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15900 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15901 #
15902 # ac_d sets the value in "#define NAME VALUE" lines.
15903 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15904 ac_dB='[        ].*$,\1#\2'
15905 ac_dC=' '
15906 ac_dD=',;t'
15907 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15908 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15909 ac_iB='\([      ]\),\1#\2define\3'
15910 ac_iC=' '
15911 ac_iD='\4,;t'
15912 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15913 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15914 ac_uB='$,\1#\2define\3'
15915 ac_uC=' '
15916 ac_uD=',;t'
15917
15918 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15919   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15920   case $ac_file in
15921   - | *:- | *:-:* ) # input from stdin
15922         cat >$tmp/stdin
15923         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15924         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15925   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15926         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15927   * )   ac_file_in=$ac_file.in ;;
15928   esac
15929
15930   test x"$ac_file" != x- && { echo "$as_me:15930: creating $ac_file" >&5
15931 echo "$as_me: creating $ac_file" >&6;}
15932
15933   # First look for the input files in the build tree, otherwise in the
15934   # src tree.
15935   ac_file_inputs=`IFS=:
15936     for f in $ac_file_in; do
15937       case $f in
15938       -) echo $tmp/stdin ;;
15939       [\\/$]*)
15940          # Absolute (can't be DOS-style, as IFS=:)
15941          test -f "$f" || { { echo "$as_me:15941: error: cannot find input file: $f" >&5
15942 echo "$as_me: error: cannot find input file: $f" >&2;}
15943    { (exit 1); exit 1; }; }
15944          echo $f;;
15945       *) # Relative
15946          if test -f "$f"; then
15947            # Build tree
15948            echo $f
15949          elif test -f "$srcdir/$f"; then
15950            # Source tree
15951            echo $srcdir/$f
15952          else
15953            # /dev/null tree
15954            { { echo "$as_me:15954: error: cannot find input file: $f" >&5
15955 echo "$as_me: error: cannot find input file: $f" >&2;}
15956    { (exit 1); exit 1; }; }
15957          fi;;
15958       esac
15959     done` || { (exit 1); exit 1; }
15960   # Remove the trailing spaces.
15961   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
15962
15963 EOF
15964
15965 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
15966 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
15967 # be either 'cat' or 'sort'.
15968 cat confdefs.h | uniq >conftest.vals
15969
15970 # Break up conftest.vals because some shells have a limit on
15971 # the size of here documents, and old seds have small limits too.
15972
15973 rm -f conftest.tail
15974 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
15975 while grep . conftest.vals >/dev/null
15976 do
15977   # Write chunks of a limited-size here document to conftest.frag.
15978   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15979   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15980   echo 'CEOF' >> $CONFIG_STATUS
15981   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15982   rm -f conftest.vals
15983   mv conftest.tail conftest.vals
15984 done
15985 rm -f conftest.vals
15986
15987 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15988 # marker @DEFS@.
15989 echo '  cat >> conftest.edit <<CEOF
15990 /@DEFS@/r conftest.frag
15991 /@DEFS@/d
15992 CEOF
15993 sed -f conftest.edit $tmp/in > $tmp/out
15994 rm -f $tmp/in
15995 mv $tmp/out $tmp/in
15996 rm -f conftest.edit conftest.frag
15997 ' >> $CONFIG_STATUS
15998
15999 cat >>$CONFIG_STATUS <<\EOF
16000   # Let's still pretend it is `configure' which instantiates (i.e., don't
16001   # use $as_me), people would be surprised to read:
16002   #    /* config.h.  Generated automatically by config.status.  */
16003   if test x"$ac_file" = x-; then
16004     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16005   else
16006     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16007   fi
16008   cat $tmp/in >>$tmp/config.h
16009   rm -f $tmp/in
16010   if test x"$ac_file" != x-; then
16011     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16012       { echo "$as_me:16012: $ac_file is unchanged" >&5
16013 echo "$as_me: $ac_file is unchanged" >&6;}
16014     else
16015       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16016          X"$ac_file" : 'X\(//\)[^/]' \| \
16017          X"$ac_file" : 'X\(//\)$' \| \
16018          X"$ac_file" : 'X\(/\)' \| \
16019          .     : '\(.\)' 2>/dev/null ||
16020 echo X"$ac_file" |
16021     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16022           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16023           /^X\(\/\/\)$/{ s//\1/; q; }
16024           /^X\(\/\).*/{ s//\1/; q; }
16025           s/.*/./; q'`
16026       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16027         { case "$ac_dir" in
16028   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16029   *)                      as_incr_dir=.;;
16030 esac
16031 as_dummy="$ac_dir"
16032 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16033   case $as_mkdir_dir in
16034     # Skip DOS drivespec
16035     ?:) as_incr_dir=$as_mkdir_dir ;;
16036     *)
16037       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16038       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16039     ;;
16040   esac
16041 done; }
16042
16043       fi
16044       rm -f $ac_file
16045       mv $tmp/config.h $ac_file
16046     fi
16047   else
16048     cat $tmp/config.h
16049     rm -f $tmp/config.h
16050   fi
16051 done
16052 EOF
16053 cat >>$CONFIG_STATUS <<\EOF
16054 #
16055 # CONFIG_COMMANDS section.
16056 #
16057 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16058   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16059   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16060
16061   case $ac_dest in
16062     default )
16063
16064 for cf_dir in .
16065 do
16066         if test ! -d $srcdir/$cf_dir; then
16067                 continue
16068         elif test -f $srcdir/$cf_dir/programs; then
16069                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16070         fi
16071 done
16072
16073         cat >>Makefile <<TEST_EOF
16074
16075 # These rules are generated so we do not rely on suffix rules, which do not
16076 # work consistently for different make-programs (the '\$(MODEL)/' confuses
16077 # some, and the '\$x' confuses others).
16078 TEST_EOF
16079
16080 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
16081 for N in $LIST
16082 do
16083         cat >>Makefile <<TEST_EOF
16084
16085 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
16086         \$(srcdir)/test.priv.h \\
16087         ncurses_cfg.h
16088         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
16089 TEST_EOF
16090 done
16091
16092 if test -f ../config.guess && test -f ../config.sub
16093 then
16094         cat >>Makefile <<TEST_EOF
16095
16096 # if we used CF_INHERIT for getting these files, we can remove them
16097 distclean::
16098         rm -f config.guess config.sub
16099 TEST_EOF
16100 fi
16101  ;;
16102   esac
16103 done
16104 EOF
16105
16106 cat >>$CONFIG_STATUS <<\EOF
16107
16108 { (exit 0); exit 0; }
16109 EOF
16110 chmod +x $CONFIG_STATUS
16111 ac_clean_files=$ac_clean_files_save
16112
16113 # configure is writing to config.log, and then calls config.status.
16114 # config.status does its own redirection, appending to config.log.
16115 # Unfortunately, on DOS this fails, as config.log is still kept open
16116 # by configure, so config.status won't be able to write to it; its
16117 # output is simply discarded.  So we exec the FD to /dev/null,
16118 # effectively closing config.log, so it can be properly (re)opened and
16119 # appended to by config.status.  When coming back to configure, we
16120 # need to make the FD available again.
16121 if test "$no_create" != yes; then
16122   ac_cs_success=:
16123   exec 5>/dev/null
16124   $SHELL $CONFIG_STATUS || ac_cs_success=false
16125   exec 5>>config.log
16126   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16127   # would make configure fail if this is the last instruction.
16128   $ac_cs_success || { (exit 1); exit 1; }
16129 fi
16130