]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
a1e200b42f441d87327f224ba7c54f09f1a4e319
[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 CC_G_OPT="-g"
2413 CC_SHARED_OPTS=unknown
2414 CPPFLAGS="$CPPFLAGS"
2415 DFT_DEP_SUFFIX=""
2416 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2417 DFT_UPR_MODEL="NORMAL"
2418 LD="ld"
2419 LDFLAGS_SHARED=""
2420 LDFLAGS_STATIC=""
2421 LD_MODEL=""
2422 LD_SHARED_OPTS=""
2423 LIBTOOL=""
2424 LIB_CLEAN=""
2425 LIB_COMPILE=""
2426 LIB_LINK='${CC}'
2427 LINK_TESTS=""
2428 LOCAL_LDFLAGS=""
2429 PTHREAD="-lm"
2430 TEST_ARGS=""
2431 TEST_DEPS=""
2432 TEST_LIBS=""
2433 TINFO_ARGS='$(LIBS_CURSES)'
2434 cf_cv_abi_version=""
2435 cf_cv_rel_version=""
2436
2437 cf_cv_screen=curses
2438 cf_cv_libtype=
2439
2440 # This should have been defined by AC_PROG_CC
2441 : ${CC:=cc}
2442
2443 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2444 # into CC.  This will not help with broken scripts that wrap the compiler with
2445 # options, but eliminates a more common category of user confusion.
2446 echo "$as_me:2446: checking \$CC variable" >&5
2447 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2448 case "$CC" in #(vi
2449 *[\ \   ]-[IUD]*)
2450         echo "$as_me:2450: result: broken" >&5
2451 echo "${ECHO_T}broken" >&6
2452         { echo "$as_me:2452: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2453 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2454         # humor him...
2455         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2456         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2457
2458 cf_fix_cppflags=no
2459 cf_new_cflags=
2460 cf_new_cppflags=
2461 cf_new_extra_cppflags=
2462
2463 for cf_add_cflags in $cf_flags
2464 do
2465 case $cf_fix_cppflags in
2466 no)
2467         case $cf_add_cflags in #(vi
2468         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2469                 case $cf_add_cflags in
2470                 -D*)
2471                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2472
2473                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2474                                 && test -z "${cf_tst_cflags}" \
2475                                 && cf_fix_cppflags=yes
2476
2477                         if test $cf_fix_cppflags = yes ; then
2478                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2479                                 continue
2480                         elif test "${cf_tst_cflags}" = "\"'" ; then
2481                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2482                                 continue
2483                         fi
2484                         ;;
2485                 esac
2486                 case "$CPPFLAGS" in
2487                 *$cf_add_cflags) #(vi
2488                         ;;
2489                 *) #(vi
2490                         case $cf_add_cflags in #(vi
2491                         -D*)
2492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2493
2494 CPPFLAGS=`echo "$CPPFLAGS" | \
2495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2497
2498                                 ;;
2499                         esac
2500                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2501                         ;;
2502                 esac
2503                 ;;
2504         *)
2505                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2506                 ;;
2507         esac
2508         ;;
2509 yes)
2510         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2511
2512         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2513
2514         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2515                 && test -z "${cf_tst_cflags}" \
2516                 && cf_fix_cppflags=no
2517         ;;
2518 esac
2519 done
2520
2521 if test -n "$cf_new_cflags" ; then
2522
2523         CFLAGS="$CFLAGS $cf_new_cflags"
2524 fi
2525
2526 if test -n "$cf_new_cppflags" ; then
2527
2528         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2529 fi
2530
2531 if test -n "$cf_new_extra_cppflags" ; then
2532
2533         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2534 fi
2535
2536         ;;
2537 *)
2538         echo "$as_me:2538: result: ok" >&5
2539 echo "${ECHO_T}ok" >&6
2540         ;;
2541 esac
2542
2543 echo "$as_me:2543: checking for ${CC:-cc} option to accept ANSI C" >&5
2544 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2545 if test "${cf_cv_ansi_cc+set}" = set; then
2546   echo $ECHO_N "(cached) $ECHO_C" >&6
2547 else
2548
2549 cf_cv_ansi_cc=no
2550 cf_save_CFLAGS="$CFLAGS"
2551 cf_save_CPPFLAGS="$CPPFLAGS"
2552 # Don't try gcc -ansi; that turns off useful extensions and
2553 # breaks some systems' header files.
2554 # AIX                   -qlanglvl=ansi
2555 # Ultrix and OSF/1      -std1
2556 # HP-UX                 -Aa -D_HPUX_SOURCE
2557 # SVR4                  -Xc
2558 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2559 for cf_arg in "-DCC_HAS_PROTOS" \
2560         "" \
2561         -qlanglvl=ansi \
2562         -std1 \
2563         -Ae \
2564         "-Aa -D_HPUX_SOURCE" \
2565         -Xc
2566 do
2567
2568 cf_fix_cppflags=no
2569 cf_new_cflags=
2570 cf_new_cppflags=
2571 cf_new_extra_cppflags=
2572
2573 for cf_add_cflags in $cf_arg
2574 do
2575 case $cf_fix_cppflags in
2576 no)
2577         case $cf_add_cflags in #(vi
2578         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2579                 case $cf_add_cflags in
2580                 -D*)
2581                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2582
2583                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2584                                 && test -z "${cf_tst_cflags}" \
2585                                 && cf_fix_cppflags=yes
2586
2587                         if test $cf_fix_cppflags = yes ; then
2588                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2589                                 continue
2590                         elif test "${cf_tst_cflags}" = "\"'" ; then
2591                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2592                                 continue
2593                         fi
2594                         ;;
2595                 esac
2596                 case "$CPPFLAGS" in
2597                 *$cf_add_cflags) #(vi
2598                         ;;
2599                 *) #(vi
2600                         case $cf_add_cflags in #(vi
2601                         -D*)
2602                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2603
2604 CPPFLAGS=`echo "$CPPFLAGS" | \
2605         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2606                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2607
2608                                 ;;
2609                         esac
2610                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2611                         ;;
2612                 esac
2613                 ;;
2614         *)
2615                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2616                 ;;
2617         esac
2618         ;;
2619 yes)
2620         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2621
2622         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2623
2624         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2625                 && test -z "${cf_tst_cflags}" \
2626                 && cf_fix_cppflags=no
2627         ;;
2628 esac
2629 done
2630
2631 if test -n "$cf_new_cflags" ; then
2632
2633         CFLAGS="$CFLAGS $cf_new_cflags"
2634 fi
2635
2636 if test -n "$cf_new_cppflags" ; then
2637
2638         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2639 fi
2640
2641 if test -n "$cf_new_extra_cppflags" ; then
2642
2643         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2644 fi
2645
2646         cat >conftest.$ac_ext <<_ACEOF
2647 #line 2647 "configure"
2648 #include "confdefs.h"
2649
2650 #ifndef CC_HAS_PROTOS
2651 #if !defined(__STDC__) || (__STDC__ != 1)
2652 choke me
2653 #endif
2654 #endif
2655
2656 int
2657 main ()
2658 {
2659
2660         int test (int i, double x);
2661         struct s1 {int (*f) (int a);};
2662         struct s2 {int (*f) (double a);};
2663   ;
2664   return 0;
2665 }
2666 _ACEOF
2667 rm -f conftest.$ac_objext
2668 if { (eval echo "$as_me:2668: \"$ac_compile\"") >&5
2669   (eval $ac_compile) 2>&5
2670   ac_status=$?
2671   echo "$as_me:2671: \$? = $ac_status" >&5
2672   (exit $ac_status); } &&
2673          { ac_try='test -s conftest.$ac_objext'
2674   { (eval echo "$as_me:2674: \"$ac_try\"") >&5
2675   (eval $ac_try) 2>&5
2676   ac_status=$?
2677   echo "$as_me:2677: \$? = $ac_status" >&5
2678   (exit $ac_status); }; }; then
2679   cf_cv_ansi_cc="$cf_arg"; break
2680 else
2681   echo "$as_me: failed program was:" >&5
2682 cat conftest.$ac_ext >&5
2683 fi
2684 rm -f conftest.$ac_objext conftest.$ac_ext
2685 done
2686 CFLAGS="$cf_save_CFLAGS"
2687 CPPFLAGS="$cf_save_CPPFLAGS"
2688
2689 fi
2690 echo "$as_me:2690: result: $cf_cv_ansi_cc" >&5
2691 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2692
2693 if test "$cf_cv_ansi_cc" != "no"; then
2694 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2695
2696 cf_fix_cppflags=no
2697 cf_new_cflags=
2698 cf_new_cppflags=
2699 cf_new_extra_cppflags=
2700
2701 for cf_add_cflags in $cf_cv_ansi_cc
2702 do
2703 case $cf_fix_cppflags in
2704 no)
2705         case $cf_add_cflags in #(vi
2706         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2707                 case $cf_add_cflags in
2708                 -D*)
2709                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2710
2711                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2712                                 && test -z "${cf_tst_cflags}" \
2713                                 && cf_fix_cppflags=yes
2714
2715                         if test $cf_fix_cppflags = yes ; then
2716                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2717                                 continue
2718                         elif test "${cf_tst_cflags}" = "\"'" ; then
2719                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2720                                 continue
2721                         fi
2722                         ;;
2723                 esac
2724                 case "$CPPFLAGS" in
2725                 *$cf_add_cflags) #(vi
2726                         ;;
2727                 *) #(vi
2728                         case $cf_add_cflags in #(vi
2729                         -D*)
2730                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2731
2732 CPPFLAGS=`echo "$CPPFLAGS" | \
2733         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2734                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2735
2736                                 ;;
2737                         esac
2738                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2739                         ;;
2740                 esac
2741                 ;;
2742         *)
2743                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2744                 ;;
2745         esac
2746         ;;
2747 yes)
2748         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2749
2750         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2751
2752         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2753                 && test -z "${cf_tst_cflags}" \
2754                 && cf_fix_cppflags=no
2755         ;;
2756 esac
2757 done
2758
2759 if test -n "$cf_new_cflags" ; then
2760
2761         CFLAGS="$CFLAGS $cf_new_cflags"
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2767 fi
2768
2769 if test -n "$cf_new_extra_cppflags" ; then
2770
2771         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2772 fi
2773
2774 else
2775         cat >>confdefs.h <<\EOF
2776 #define CC_HAS_PROTOS 1
2777 EOF
2778
2779 fi
2780 fi
2781
2782 if test "$cf_cv_ansi_cc" = "no"; then
2783         { { echo "$as_me:2783: error: Your compiler does not appear to recognize prototypes.
2784 You have the following choices:
2785         a. adjust your compiler options
2786         b. get an up-to-date compiler
2787         c. use a wrapper such as unproto" >&5
2788 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2789 You have the following choices:
2790         a. adjust your compiler options
2791         b. get an up-to-date compiler
2792         c. use a wrapper such as unproto" >&2;}
2793    { (exit 1); exit 1; }; }
2794 fi
2795
2796 if test "$GCC" = yes
2797 then
2798 cat > conftest.i <<EOF
2799 #ifndef GCC_PRINTF
2800 #define GCC_PRINTF 0
2801 #endif
2802 #ifndef GCC_SCANF
2803 #define GCC_SCANF 0
2804 #endif
2805 #ifndef GCC_NORETURN
2806 #define GCC_NORETURN /* nothing */
2807 #endif
2808 #ifndef GCC_UNUSED
2809 #define GCC_UNUSED /* nothing */
2810 #endif
2811 EOF
2812 if test "$GCC" = yes
2813 then
2814         { echo "$as_me:2814: checking for $CC __attribute__ directives..." >&5
2815 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2816 cat > conftest.$ac_ext <<EOF
2817 #line 2817 "${as_me:-configure}"
2818 #include "confdefs.h"
2819 #include "conftest.h"
2820 #include "conftest.i"
2821 #if     GCC_PRINTF
2822 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2823 #else
2824 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2825 #endif
2826 #if     GCC_SCANF
2827 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2828 #else
2829 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2830 #endif
2831 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2832 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2833 extern void foo(void) GCC_NORETURN;
2834 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2835 EOF
2836         cf_printf_attribute=no
2837         cf_scanf_attribute=no
2838         for cf_attribute in scanf printf unused noreturn
2839         do
2840
2841 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2842
2843                 cf_directive="__attribute__(($cf_attribute))"
2844                 echo "checking for $CC $cf_directive" 1>&5
2845
2846                 case $cf_attribute in #(vi
2847                 printf) #(vi
2848                         cf_printf_attribute=yes
2849                         cat >conftest.h <<EOF
2850 #define GCC_$cf_ATTRIBUTE 1
2851 EOF
2852                         ;;
2853                 scanf) #(vi
2854                         cf_scanf_attribute=yes
2855                         cat >conftest.h <<EOF
2856 #define GCC_$cf_ATTRIBUTE 1
2857 EOF
2858                         ;;
2859                 *) #(vi
2860                         cat >conftest.h <<EOF
2861 #define GCC_$cf_ATTRIBUTE $cf_directive
2862 EOF
2863                         ;;
2864                 esac
2865
2866                 if { (eval echo "$as_me:2866: \"$ac_compile\"") >&5
2867   (eval $ac_compile) 2>&5
2868   ac_status=$?
2869   echo "$as_me:2869: \$? = $ac_status" >&5
2870   (exit $ac_status); }; then
2871                         test -n "$verbose" && echo "$as_me:2871: result: ... $cf_attribute" >&5
2872 echo "${ECHO_T}... $cf_attribute" >&6
2873                         cat conftest.h >>confdefs.h
2874                         case $cf_attribute in #(vi
2875                         printf) #(vi
2876                                 if test "$cf_printf_attribute" = no ; then
2877                                         cat >>confdefs.h <<EOF
2878 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2879 EOF
2880                                 else
2881                                         cat >>confdefs.h <<EOF
2882 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2883 EOF
2884                                 fi
2885                                 ;;
2886                         scanf) #(vi
2887                                 if test "$cf_scanf_attribute" = no ; then
2888                                         cat >>confdefs.h <<EOF
2889 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2890 EOF
2891                                 else
2892                                         cat >>confdefs.h <<EOF
2893 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2894 EOF
2895                                 fi
2896                                 ;;
2897                         esac
2898                 fi
2899         done
2900 else
2901         fgrep define conftest.i >>confdefs.h
2902 fi
2903 rm -rf conftest*
2904 fi
2905
2906 cf_XOPEN_SOURCE=500
2907 cf_POSIX_C_SOURCE=199506L
2908 cf_xopen_source=
2909
2910 case $host_os in #(vi
2911 aix[4-7]*) #(vi
2912         cf_xopen_source="-D_ALL_SOURCE"
2913         ;;
2914 cygwin) #(vi
2915         cf_XOPEN_SOURCE=600
2916         ;;
2917 darwin[0-8].*) #(vi
2918         cf_xopen_source="-D_APPLE_C_SOURCE"
2919         ;;
2920 darwin*) #(vi
2921         cf_xopen_source="-D_DARWIN_C_SOURCE"
2922         ;;
2923 freebsd*|dragonfly*) #(vi
2924         # 5.x headers associate
2925         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2926         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2927         cf_POSIX_C_SOURCE=200112L
2928         cf_XOPEN_SOURCE=600
2929         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2930         ;;
2931 hpux11*) #(vi
2932         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2933         ;;
2934 hpux*) #(vi
2935         cf_xopen_source="-D_HPUX_SOURCE"
2936         ;;
2937 irix[56].*) #(vi
2938         cf_xopen_source="-D_SGI_SOURCE"
2939         ;;
2940 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2941
2942 echo "$as_me:2942: checking if we must define _GNU_SOURCE" >&5
2943 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2944 if test "${cf_cv_gnu_source+set}" = set; then
2945   echo $ECHO_N "(cached) $ECHO_C" >&6
2946 else
2947
2948 cat >conftest.$ac_ext <<_ACEOF
2949 #line 2949 "configure"
2950 #include "confdefs.h"
2951 #include <sys/types.h>
2952 int
2953 main ()
2954 {
2955
2956 #ifndef _XOPEN_SOURCE
2957 make an error
2958 #endif
2959   ;
2960   return 0;
2961 }
2962 _ACEOF
2963 rm -f conftest.$ac_objext
2964 if { (eval echo "$as_me:2964: \"$ac_compile\"") >&5
2965   (eval $ac_compile) 2>&5
2966   ac_status=$?
2967   echo "$as_me:2967: \$? = $ac_status" >&5
2968   (exit $ac_status); } &&
2969          { ac_try='test -s conftest.$ac_objext'
2970   { (eval echo "$as_me:2970: \"$ac_try\"") >&5
2971   (eval $ac_try) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); }; }; then
2975   cf_cv_gnu_source=no
2976 else
2977   echo "$as_me: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
2979 cf_save="$CPPFLAGS"
2980          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2981          cat >conftest.$ac_ext <<_ACEOF
2982 #line 2982 "configure"
2983 #include "confdefs.h"
2984 #include <sys/types.h>
2985 int
2986 main ()
2987 {
2988
2989 #ifdef _XOPEN_SOURCE
2990 make an error
2991 #endif
2992   ;
2993   return 0;
2994 }
2995 _ACEOF
2996 rm -f conftest.$ac_objext
2997 if { (eval echo "$as_me:2997: \"$ac_compile\"") >&5
2998   (eval $ac_compile) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); } &&
3002          { ac_try='test -s conftest.$ac_objext'
3003   { (eval echo "$as_me:3003: \"$ac_try\"") >&5
3004   (eval $ac_try) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); }; }; then
3008   cf_cv_gnu_source=no
3009 else
3010   echo "$as_me: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 cf_cv_gnu_source=yes
3013 fi
3014 rm -f conftest.$ac_objext conftest.$ac_ext
3015         CPPFLAGS="$cf_save"
3016
3017 fi
3018 rm -f conftest.$ac_objext conftest.$ac_ext
3019
3020 fi
3021 echo "$as_me:3021: result: $cf_cv_gnu_source" >&5
3022 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3023 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3024
3025         ;;
3026 mirbsd*) #(vi
3027         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
3028         ;;
3029 netbsd*) #(vi
3030         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3031         ;;
3032 openbsd*) #(vi
3033         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3034         ;;
3035 osf[45]*) #(vi
3036         cf_xopen_source="-D_OSF_SOURCE"
3037         ;;
3038 nto-qnx*) #(vi
3039         cf_xopen_source="-D_QNX_SOURCE"
3040         ;;
3041 sco*) #(vi
3042         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3043         ;;
3044 solaris2.1[0-9]) #(vi
3045         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3046         ;;
3047 solaris2.[1-9]) #(vi
3048         cf_xopen_source="-D__EXTENSIONS__"
3049         ;;
3050 *)
3051         echo "$as_me:3051: checking if we should define _XOPEN_SOURCE" >&5
3052 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3053 if test "${cf_cv_xopen_source+set}" = set; then
3054   echo $ECHO_N "(cached) $ECHO_C" >&6
3055 else
3056
3057         cat >conftest.$ac_ext <<_ACEOF
3058 #line 3058 "configure"
3059 #include "confdefs.h"
3060 #include <sys/types.h>
3061 int
3062 main ()
3063 {
3064
3065 #ifndef _XOPEN_SOURCE
3066 make an error
3067 #endif
3068   ;
3069   return 0;
3070 }
3071 _ACEOF
3072 rm -f conftest.$ac_objext
3073 if { (eval echo "$as_me:3073: \"$ac_compile\"") >&5
3074   (eval $ac_compile) 2>&5
3075   ac_status=$?
3076   echo "$as_me:3076: \$? = $ac_status" >&5
3077   (exit $ac_status); } &&
3078          { ac_try='test -s conftest.$ac_objext'
3079   { (eval echo "$as_me:3079: \"$ac_try\"") >&5
3080   (eval $ac_try) 2>&5
3081   ac_status=$?
3082   echo "$as_me:3082: \$? = $ac_status" >&5
3083   (exit $ac_status); }; }; then
3084   cf_cv_xopen_source=no
3085 else
3086   echo "$as_me: failed program was:" >&5
3087 cat conftest.$ac_ext >&5
3088 cf_save="$CPPFLAGS"
3089          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3090          cat >conftest.$ac_ext <<_ACEOF
3091 #line 3091 "configure"
3092 #include "confdefs.h"
3093 #include <sys/types.h>
3094 int
3095 main ()
3096 {
3097
3098 #ifdef _XOPEN_SOURCE
3099 make an error
3100 #endif
3101   ;
3102   return 0;
3103 }
3104 _ACEOF
3105 rm -f conftest.$ac_objext
3106 if { (eval echo "$as_me:3106: \"$ac_compile\"") >&5
3107   (eval $ac_compile) 2>&5
3108   ac_status=$?
3109   echo "$as_me:3109: \$? = $ac_status" >&5
3110   (exit $ac_status); } &&
3111          { ac_try='test -s conftest.$ac_objext'
3112   { (eval echo "$as_me:3112: \"$ac_try\"") >&5
3113   (eval $ac_try) 2>&5
3114   ac_status=$?
3115   echo "$as_me:3115: \$? = $ac_status" >&5
3116   (exit $ac_status); }; }; then
3117   cf_cv_xopen_source=no
3118 else
3119   echo "$as_me: failed program was:" >&5
3120 cat conftest.$ac_ext >&5
3121 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3122 fi
3123 rm -f conftest.$ac_objext conftest.$ac_ext
3124         CPPFLAGS="$cf_save"
3125
3126 fi
3127 rm -f conftest.$ac_objext conftest.$ac_ext
3128
3129 fi
3130 echo "$as_me:3130: result: $cf_cv_xopen_source" >&5
3131 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3132         if test "$cf_cv_xopen_source" != no ; then
3133
3134 CFLAGS=`echo "$CFLAGS" | \
3135         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3136                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3137
3138 CPPFLAGS=`echo "$CPPFLAGS" | \
3139         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3140                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3141
3142                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3143
3144 cf_fix_cppflags=no
3145 cf_new_cflags=
3146 cf_new_cppflags=
3147 cf_new_extra_cppflags=
3148
3149 for cf_add_cflags in $cf_temp_xopen_source
3150 do
3151 case $cf_fix_cppflags in
3152 no)
3153         case $cf_add_cflags in #(vi
3154         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3155                 case $cf_add_cflags in
3156                 -D*)
3157                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3158
3159                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3160                                 && test -z "${cf_tst_cflags}" \
3161                                 && cf_fix_cppflags=yes
3162
3163                         if test $cf_fix_cppflags = yes ; then
3164                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3165                                 continue
3166                         elif test "${cf_tst_cflags}" = "\"'" ; then
3167                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3168                                 continue
3169                         fi
3170                         ;;
3171                 esac
3172                 case "$CPPFLAGS" in
3173                 *$cf_add_cflags) #(vi
3174                         ;;
3175                 *) #(vi
3176                         case $cf_add_cflags in #(vi
3177                         -D*)
3178                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3179
3180 CPPFLAGS=`echo "$CPPFLAGS" | \
3181         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3182                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3183
3184                                 ;;
3185                         esac
3186                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3187                         ;;
3188                 esac
3189                 ;;
3190         *)
3191                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3192                 ;;
3193         esac
3194         ;;
3195 yes)
3196         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3197
3198         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3199
3200         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3201                 && test -z "${cf_tst_cflags}" \
3202                 && cf_fix_cppflags=no
3203         ;;
3204 esac
3205 done
3206
3207 if test -n "$cf_new_cflags" ; then
3208
3209         CFLAGS="$CFLAGS $cf_new_cflags"
3210 fi
3211
3212 if test -n "$cf_new_cppflags" ; then
3213
3214         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3215 fi
3216
3217 if test -n "$cf_new_extra_cppflags" ; then
3218
3219         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3220 fi
3221
3222         fi
3223
3224 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3225
3226 cf_save_CFLAGS="$CFLAGS"
3227 cf_save_CPPFLAGS="$CPPFLAGS"
3228
3229 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3230         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3231                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3232
3233 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3234         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3235                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3236
3237 echo "$as_me:3237: checking if we should define _POSIX_C_SOURCE" >&5
3238 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3239 if test "${cf_cv_posix_c_source+set}" = set; then
3240   echo $ECHO_N "(cached) $ECHO_C" >&6
3241 else
3242
3243 echo "${as_me:-configure}:3243: testing if the symbol is already defined go no further ..." 1>&5
3244
3245         cat >conftest.$ac_ext <<_ACEOF
3246 #line 3246 "configure"
3247 #include "confdefs.h"
3248 #include <sys/types.h>
3249 int
3250 main ()
3251 {
3252
3253 #ifndef _POSIX_C_SOURCE
3254 make an error
3255 #endif
3256   ;
3257   return 0;
3258 }
3259 _ACEOF
3260 rm -f conftest.$ac_objext
3261 if { (eval echo "$as_me:3261: \"$ac_compile\"") >&5
3262   (eval $ac_compile) 2>&5
3263   ac_status=$?
3264   echo "$as_me:3264: \$? = $ac_status" >&5
3265   (exit $ac_status); } &&
3266          { ac_try='test -s conftest.$ac_objext'
3267   { (eval echo "$as_me:3267: \"$ac_try\"") >&5
3268   (eval $ac_try) 2>&5
3269   ac_status=$?
3270   echo "$as_me:3270: \$? = $ac_status" >&5
3271   (exit $ac_status); }; }; then
3272   cf_cv_posix_c_source=no
3273 else
3274   echo "$as_me: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3276 cf_want_posix_source=no
3277          case .$cf_POSIX_C_SOURCE in #(vi
3278          .[12]??*) #(vi
3279                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3280                 ;;
3281          .2) #(vi
3282                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3283                 cf_want_posix_source=yes
3284                 ;;
3285          .*)
3286                 cf_want_posix_source=yes
3287                 ;;
3288          esac
3289          if test "$cf_want_posix_source" = yes ; then
3290                 cat >conftest.$ac_ext <<_ACEOF
3291 #line 3291 "configure"
3292 #include "confdefs.h"
3293 #include <sys/types.h>
3294 int
3295 main ()
3296 {
3297
3298 #ifdef _POSIX_SOURCE
3299 make an error
3300 #endif
3301   ;
3302   return 0;
3303 }
3304 _ACEOF
3305 rm -f conftest.$ac_objext
3306 if { (eval echo "$as_me:3306: \"$ac_compile\"") >&5
3307   (eval $ac_compile) 2>&5
3308   ac_status=$?
3309   echo "$as_me:3309: \$? = $ac_status" >&5
3310   (exit $ac_status); } &&
3311          { ac_try='test -s conftest.$ac_objext'
3312   { (eval echo "$as_me:3312: \"$ac_try\"") >&5
3313   (eval $ac_try) 2>&5
3314   ac_status=$?
3315   echo "$as_me:3315: \$? = $ac_status" >&5
3316   (exit $ac_status); }; }; then
3317   :
3318 else
3319   echo "$as_me: failed program was:" >&5
3320 cat conftest.$ac_ext >&5
3321 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3322 fi
3323 rm -f conftest.$ac_objext conftest.$ac_ext
3324          fi
3325
3326 echo "${as_me:-configure}:3326: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3327
3328          CFLAGS="$cf_trim_CFLAGS"
3329          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3330
3331 echo "${as_me:-configure}:3331: testing if the second compile does not leave our definition intact error ..." 1>&5
3332
3333          cat >conftest.$ac_ext <<_ACEOF
3334 #line 3334 "configure"
3335 #include "confdefs.h"
3336 #include <sys/types.h>
3337 int
3338 main ()
3339 {
3340
3341 #ifndef _POSIX_C_SOURCE
3342 make an error
3343 #endif
3344   ;
3345   return 0;
3346 }
3347 _ACEOF
3348 rm -f conftest.$ac_objext
3349 if { (eval echo "$as_me:3349: \"$ac_compile\"") >&5
3350   (eval $ac_compile) 2>&5
3351   ac_status=$?
3352   echo "$as_me:3352: \$? = $ac_status" >&5
3353   (exit $ac_status); } &&
3354          { ac_try='test -s conftest.$ac_objext'
3355   { (eval echo "$as_me:3355: \"$ac_try\"") >&5
3356   (eval $ac_try) 2>&5
3357   ac_status=$?
3358   echo "$as_me:3358: \$? = $ac_status" >&5
3359   (exit $ac_status); }; }; then
3360   :
3361 else
3362   echo "$as_me: failed program was:" >&5
3363 cat conftest.$ac_ext >&5
3364 cf_cv_posix_c_source=no
3365 fi
3366 rm -f conftest.$ac_objext conftest.$ac_ext
3367          CFLAGS="$cf_save_CFLAGS"
3368          CPPFLAGS="$cf_save_CPPFLAGS"
3369
3370 fi
3371 rm -f conftest.$ac_objext conftest.$ac_ext
3372
3373 fi
3374 echo "$as_me:3374: result: $cf_cv_posix_c_source" >&5
3375 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3376
3377 if test "$cf_cv_posix_c_source" != no ; then
3378         CFLAGS="$cf_trim_CFLAGS"
3379         CPPFLAGS="$cf_trim_CPPFLAGS"
3380
3381 cf_fix_cppflags=no
3382 cf_new_cflags=
3383 cf_new_cppflags=
3384 cf_new_extra_cppflags=
3385
3386 for cf_add_cflags in $cf_cv_posix_c_source
3387 do
3388 case $cf_fix_cppflags in
3389 no)
3390         case $cf_add_cflags in #(vi
3391         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3392                 case $cf_add_cflags in
3393                 -D*)
3394                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3395
3396                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3397                                 && test -z "${cf_tst_cflags}" \
3398                                 && cf_fix_cppflags=yes
3399
3400                         if test $cf_fix_cppflags = yes ; then
3401                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3402                                 continue
3403                         elif test "${cf_tst_cflags}" = "\"'" ; then
3404                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3405                                 continue
3406                         fi
3407                         ;;
3408                 esac
3409                 case "$CPPFLAGS" in
3410                 *$cf_add_cflags) #(vi
3411                         ;;
3412                 *) #(vi
3413                         case $cf_add_cflags in #(vi
3414                         -D*)
3415                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3416
3417 CPPFLAGS=`echo "$CPPFLAGS" | \
3418         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3419                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3420
3421                                 ;;
3422                         esac
3423                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3424                         ;;
3425                 esac
3426                 ;;
3427         *)
3428                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3429                 ;;
3430         esac
3431         ;;
3432 yes)
3433         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3434
3435         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3436
3437         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3438                 && test -z "${cf_tst_cflags}" \
3439                 && cf_fix_cppflags=no
3440         ;;
3441 esac
3442 done
3443
3444 if test -n "$cf_new_cflags" ; then
3445
3446         CFLAGS="$CFLAGS $cf_new_cflags"
3447 fi
3448
3449 if test -n "$cf_new_cppflags" ; then
3450
3451         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3452 fi
3453
3454 if test -n "$cf_new_extra_cppflags" ; then
3455
3456         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3457 fi
3458
3459 fi
3460
3461         ;;
3462 esac
3463
3464 if test -n "$cf_xopen_source" ; then
3465
3466 cf_fix_cppflags=no
3467 cf_new_cflags=
3468 cf_new_cppflags=
3469 cf_new_extra_cppflags=
3470
3471 for cf_add_cflags in $cf_xopen_source
3472 do
3473 case $cf_fix_cppflags in
3474 no)
3475         case $cf_add_cflags in #(vi
3476         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3477                 case $cf_add_cflags in
3478                 -D*)
3479                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3480
3481                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3482                                 && test -z "${cf_tst_cflags}" \
3483                                 && cf_fix_cppflags=yes
3484
3485                         if test $cf_fix_cppflags = yes ; then
3486                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3487                                 continue
3488                         elif test "${cf_tst_cflags}" = "\"'" ; then
3489                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3490                                 continue
3491                         fi
3492                         ;;
3493                 esac
3494                 case "$CPPFLAGS" in
3495                 *$cf_add_cflags) #(vi
3496                         ;;
3497                 *) #(vi
3498                         case $cf_add_cflags in #(vi
3499                         -D*)
3500                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3501
3502 CPPFLAGS=`echo "$CPPFLAGS" | \
3503         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3504                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3505
3506                                 ;;
3507                         esac
3508                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3509                         ;;
3510                 esac
3511                 ;;
3512         *)
3513                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3514                 ;;
3515         esac
3516         ;;
3517 yes)
3518         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3519
3520         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3521
3522         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3523                 && test -z "${cf_tst_cflags}" \
3524                 && cf_fix_cppflags=no
3525         ;;
3526 esac
3527 done
3528
3529 if test -n "$cf_new_cflags" ; then
3530
3531         CFLAGS="$CFLAGS $cf_new_cflags"
3532 fi
3533
3534 if test -n "$cf_new_cppflags" ; then
3535
3536         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3537 fi
3538
3539 if test -n "$cf_new_extra_cppflags" ; then
3540
3541         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3542 fi
3543
3544 fi
3545
3546 echo "$as_me:3546: checking for $CC option to accept ANSI C" >&5
3547 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3548 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3549   echo $ECHO_N "(cached) $ECHO_C" >&6
3550 else
3551   ac_cv_prog_cc_stdc=no
3552 ac_save_CC=$CC
3553 cat >conftest.$ac_ext <<_ACEOF
3554 #line 3554 "configure"
3555 #include "confdefs.h"
3556 #include <stdarg.h>
3557 #include <stdio.h>
3558 #include <sys/types.h>
3559 #include <sys/stat.h>
3560 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3561 struct buf { int x; };
3562 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3563 static char *e (p, i)
3564      char **p;
3565      int i;
3566 {
3567   return p[i];
3568 }
3569 static char *f (char * (*g) (char **, int), char **p, ...)
3570 {
3571   char *s;
3572   va_list v;
3573   va_start (v,p);
3574   s = g (p, va_arg (v,int));
3575   va_end (v);
3576   return s;
3577 }
3578 int test (int i, double x);
3579 struct s1 {int (*f) (int a);};
3580 struct s2 {int (*f) (double a);};
3581 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3582 int argc;
3583 char **argv;
3584 int
3585 main ()
3586 {
3587 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3588   ;
3589   return 0;
3590 }
3591 _ACEOF
3592 # Don't try gcc -ansi; that turns off useful extensions and
3593 # breaks some systems' header files.
3594 # AIX                   -qlanglvl=ansi
3595 # Ultrix and OSF/1      -std1
3596 # HP-UX 10.20 and later -Ae
3597 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3598 # SVR4                  -Xc -D__EXTENSIONS__
3599 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3600 do
3601   CC="$ac_save_CC $ac_arg"
3602   rm -f conftest.$ac_objext
3603 if { (eval echo "$as_me:3603: \"$ac_compile\"") >&5
3604   (eval $ac_compile) 2>&5
3605   ac_status=$?
3606   echo "$as_me:3606: \$? = $ac_status" >&5
3607   (exit $ac_status); } &&
3608          { ac_try='test -s conftest.$ac_objext'
3609   { (eval echo "$as_me:3609: \"$ac_try\"") >&5
3610   (eval $ac_try) 2>&5
3611   ac_status=$?
3612   echo "$as_me:3612: \$? = $ac_status" >&5
3613   (exit $ac_status); }; }; then
3614   ac_cv_prog_cc_stdc=$ac_arg
3615 break
3616 else
3617   echo "$as_me: failed program was:" >&5
3618 cat conftest.$ac_ext >&5
3619 fi
3620 rm -f conftest.$ac_objext
3621 done
3622 rm -f conftest.$ac_ext conftest.$ac_objext
3623 CC=$ac_save_CC
3624
3625 fi
3626
3627 case "x$ac_cv_prog_cc_stdc" in
3628   x|xno)
3629     echo "$as_me:3629: result: none needed" >&5
3630 echo "${ECHO_T}none needed" >&6 ;;
3631   *)
3632     echo "$as_me:3632: result: $ac_cv_prog_cc_stdc" >&5
3633 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3634     CC="$CC $ac_cv_prog_cc_stdc" ;;
3635 esac
3636
3637 echo "$as_me:3637: checking for an ANSI C-conforming const" >&5
3638 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3639 if test "${ac_cv_c_const+set}" = set; then
3640   echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642   cat >conftest.$ac_ext <<_ACEOF
3643 #line 3643 "configure"
3644 #include "confdefs.h"
3645
3646 int
3647 main ()
3648 {
3649 /* FIXME: Include the comments suggested by Paul. */
3650 #ifndef __cplusplus
3651   /* Ultrix mips cc rejects this.  */
3652   typedef int charset[2];
3653   const charset x;
3654   /* SunOS 4.1.1 cc rejects this.  */
3655   char const *const *ccp;
3656   char **p;
3657   /* NEC SVR4.0.2 mips cc rejects this.  */
3658   struct point {int x, y;};
3659   static struct point const zero = {0,0};
3660   /* AIX XL C 1.02.0.0 rejects this.
3661      It does not let you subtract one const X* pointer from another in
3662      an arm of an if-expression whose if-part is not a constant
3663      expression */
3664   const char *g = "string";
3665   ccp = &g + (g ? g-g : 0);
3666   /* HPUX 7.0 cc rejects these. */
3667   ++ccp;
3668   p = (char**) ccp;
3669   ccp = (char const *const *) p;
3670   { /* SCO 3.2v4 cc rejects this.  */
3671     char *t;
3672     char const *s = 0 ? (char *) 0 : (char const *) 0;
3673
3674     *t++ = 0;
3675   }
3676   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3677     int x[] = {25, 17};
3678     const int *foo = &x[0];
3679     ++foo;
3680   }
3681   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3682     typedef const int *iptr;
3683     iptr p = 0;
3684     ++p;
3685   }
3686   { /* AIX XL C 1.02.0.0 rejects this saying
3687        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3688     struct s { int j; const int *ap[3]; };
3689     struct s *b; b->j = 5;
3690   }
3691   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3692     const int foo = 10;
3693   }
3694 #endif
3695
3696   ;
3697   return 0;
3698 }
3699 _ACEOF
3700 rm -f conftest.$ac_objext
3701 if { (eval echo "$as_me:3701: \"$ac_compile\"") >&5
3702   (eval $ac_compile) 2>&5
3703   ac_status=$?
3704   echo "$as_me:3704: \$? = $ac_status" >&5
3705   (exit $ac_status); } &&
3706          { ac_try='test -s conftest.$ac_objext'
3707   { (eval echo "$as_me:3707: \"$ac_try\"") >&5
3708   (eval $ac_try) 2>&5
3709   ac_status=$?
3710   echo "$as_me:3710: \$? = $ac_status" >&5
3711   (exit $ac_status); }; }; then
3712   ac_cv_c_const=yes
3713 else
3714   echo "$as_me: failed program was:" >&5
3715 cat conftest.$ac_ext >&5
3716 ac_cv_c_const=no
3717 fi
3718 rm -f conftest.$ac_objext conftest.$ac_ext
3719 fi
3720 echo "$as_me:3720: result: $ac_cv_c_const" >&5
3721 echo "${ECHO_T}$ac_cv_c_const" >&6
3722 if test $ac_cv_c_const = no; then
3723
3724 cat >>confdefs.h <<\EOF
3725 #define const
3726 EOF
3727
3728 fi
3729
3730 echo "$as_me:3730: checking for signal global datatype" >&5
3731 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3732 if test "${cf_cv_sig_atomic_t+set}" = set; then
3733   echo $ECHO_N "(cached) $ECHO_C" >&6
3734 else
3735
3736         for cf_type in \
3737                 "volatile sig_atomic_t" \
3738                 "sig_atomic_t" \
3739                 "int"
3740         do
3741         cat >conftest.$ac_ext <<_ACEOF
3742 #line 3742 "configure"
3743 #include "confdefs.h"
3744
3745 #include <sys/types.h>
3746 #include <signal.h>
3747 #include <stdio.h>
3748
3749 extern $cf_type x;
3750 $cf_type x;
3751 static void handler(int sig)
3752 {
3753         x = 5;
3754 }
3755 int
3756 main ()
3757 {
3758 signal(SIGINT, handler);
3759                  x = 1
3760   ;
3761   return 0;
3762 }
3763 _ACEOF
3764 rm -f conftest.$ac_objext
3765 if { (eval echo "$as_me:3765: \"$ac_compile\"") >&5
3766   (eval $ac_compile) 2>&5
3767   ac_status=$?
3768   echo "$as_me:3768: \$? = $ac_status" >&5
3769   (exit $ac_status); } &&
3770          { ac_try='test -s conftest.$ac_objext'
3771   { (eval echo "$as_me:3771: \"$ac_try\"") >&5
3772   (eval $ac_try) 2>&5
3773   ac_status=$?
3774   echo "$as_me:3774: \$? = $ac_status" >&5
3775   (exit $ac_status); }; }; then
3776   cf_cv_sig_atomic_t=$cf_type
3777 else
3778   echo "$as_me: failed program was:" >&5
3779 cat conftest.$ac_ext >&5
3780 cf_cv_sig_atomic_t=no
3781 fi
3782 rm -f conftest.$ac_objext conftest.$ac_ext
3783                 test "$cf_cv_sig_atomic_t" != no && break
3784         done
3785
3786 fi
3787
3788 echo "$as_me:3788: result: $cf_cv_sig_atomic_t" >&5
3789 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3790 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3791 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3792 EOF
3793
3794 echo "$as_me:3794: checking if you want to see long compiling messages" >&5
3795 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3796
3797 # Check whether --enable-echo or --disable-echo was given.
3798 if test "${enable_echo+set}" = set; then
3799   enableval="$enable_echo"
3800   test "$enableval" != no && enableval=yes
3801   if test "$enableval" != "yes" ; then
3802
3803     ECHO_LT='--silent'
3804     ECHO_LD='@echo linking $@;'
3805     RULE_CC='@echo compiling $<'
3806     SHOW_CC='@echo compiling $@'
3807     ECHO_CC='@'
3808
3809   else
3810
3811     ECHO_LT=''
3812     ECHO_LD=''
3813     RULE_CC=''
3814     SHOW_CC=''
3815     ECHO_CC=''
3816
3817   fi
3818 else
3819   enableval=yes
3820
3821     ECHO_LT=''
3822     ECHO_LD=''
3823     RULE_CC=''
3824     SHOW_CC=''
3825     ECHO_CC=''
3826
3827 fi;
3828 echo "$as_me:3828: result: $enableval" >&5
3829 echo "${ECHO_T}$enableval" >&6
3830
3831 GCC_VERSION=none
3832 if test "$GCC" = yes ; then
3833         echo "$as_me:3833: checking version of $CC" >&5
3834 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3835         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3836         test -z "$GCC_VERSION" && GCC_VERSION=unknown
3837         echo "$as_me:3837: result: $GCC_VERSION" >&5
3838 echo "${ECHO_T}$GCC_VERSION" >&6
3839 fi
3840
3841 if ( test "$GCC" = yes || test "$GXX" = yes )
3842 then
3843 echo "$as_me:3843: checking if you want to turn on gcc warnings" >&5
3844 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
3845
3846 # Check whether --enable-warnings or --disable-warnings was given.
3847 if test "${enable_warnings+set}" = set; then
3848   enableval="$enable_warnings"
3849   test "$enableval" != yes && enableval=no
3850   if test "$enableval" != "no" ; then
3851     with_warnings=yes
3852   else
3853     with_warnings=no
3854   fi
3855 else
3856   enableval=no
3857   with_warnings=no
3858
3859 fi;
3860 echo "$as_me:3860: result: $with_warnings" >&5
3861 echo "${ECHO_T}$with_warnings" >&6
3862 if test "$with_warnings" = "yes"
3863 then
3864
3865 if test "$GCC" = yes
3866 then
3867 cat > conftest.i <<EOF
3868 #ifndef GCC_PRINTF
3869 #define GCC_PRINTF 0
3870 #endif
3871 #ifndef GCC_SCANF
3872 #define GCC_SCANF 0
3873 #endif
3874 #ifndef GCC_NORETURN
3875 #define GCC_NORETURN /* nothing */
3876 #endif
3877 #ifndef GCC_UNUSED
3878 #define GCC_UNUSED /* nothing */
3879 #endif
3880 EOF
3881 if test "$GCC" = yes
3882 then
3883         { echo "$as_me:3883: checking for $CC __attribute__ directives..." >&5
3884 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3885 cat > conftest.$ac_ext <<EOF
3886 #line 3886 "${as_me:-configure}"
3887 #include "confdefs.h"
3888 #include "conftest.h"
3889 #include "conftest.i"
3890 #if     GCC_PRINTF
3891 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3892 #else
3893 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3894 #endif
3895 #if     GCC_SCANF
3896 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3897 #else
3898 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
3899 #endif
3900 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3901 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3902 extern void foo(void) GCC_NORETURN;
3903 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3904 EOF
3905         cf_printf_attribute=no
3906         cf_scanf_attribute=no
3907         for cf_attribute in scanf printf unused noreturn
3908         do
3909
3910 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3911
3912                 cf_directive="__attribute__(($cf_attribute))"
3913                 echo "checking for $CC $cf_directive" 1>&5
3914
3915                 case $cf_attribute in #(vi
3916                 printf) #(vi
3917                         cf_printf_attribute=yes
3918                         cat >conftest.h <<EOF
3919 #define GCC_$cf_ATTRIBUTE 1
3920 EOF
3921                         ;;
3922                 scanf) #(vi
3923                         cf_scanf_attribute=yes
3924                         cat >conftest.h <<EOF
3925 #define GCC_$cf_ATTRIBUTE 1
3926 EOF
3927                         ;;
3928                 *) #(vi
3929                         cat >conftest.h <<EOF
3930 #define GCC_$cf_ATTRIBUTE $cf_directive
3931 EOF
3932                         ;;
3933                 esac
3934
3935                 if { (eval echo "$as_me:3935: \"$ac_compile\"") >&5
3936   (eval $ac_compile) 2>&5
3937   ac_status=$?
3938   echo "$as_me:3938: \$? = $ac_status" >&5
3939   (exit $ac_status); }; then
3940                         test -n "$verbose" && echo "$as_me:3940: result: ... $cf_attribute" >&5
3941 echo "${ECHO_T}... $cf_attribute" >&6
3942                         cat conftest.h >>confdefs.h
3943                         case $cf_attribute in #(vi
3944                         printf) #(vi
3945                                 if test "$cf_printf_attribute" = no ; then
3946                                         cat >>confdefs.h <<EOF
3947 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
3948 EOF
3949                                 else
3950                                         cat >>confdefs.h <<EOF
3951 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3952 EOF
3953                                 fi
3954                                 ;;
3955                         scanf) #(vi
3956                                 if test "$cf_scanf_attribute" = no ; then
3957                                         cat >>confdefs.h <<EOF
3958 #define GCC_SCANFLIKE(fmt,var) /* nothing */
3959 EOF
3960                                 else
3961                                         cat >>confdefs.h <<EOF
3962 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3963 EOF
3964                                 fi
3965                                 ;;
3966                         esac
3967                 fi
3968         done
3969 else
3970         fgrep define conftest.i >>confdefs.h
3971 fi
3972 rm -rf conftest*
3973 fi
3974
3975 INTEL_COMPILER=no
3976
3977 if test "$GCC" = yes ; then
3978         case $host_os in
3979         linux*|gnu*)
3980                 echo "$as_me:3980: checking if this is really Intel C compiler" >&5
3981 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
3982                 cf_save_CFLAGS="$CFLAGS"
3983                 CFLAGS="$CFLAGS -no-gcc"
3984                 cat >conftest.$ac_ext <<_ACEOF
3985 #line 3985 "configure"
3986 #include "confdefs.h"
3987
3988 int
3989 main ()
3990 {
3991
3992 #ifdef __INTEL_COMPILER
3993 #else
3994 make an error
3995 #endif
3996
3997   ;
3998   return 0;
3999 }
4000 _ACEOF
4001 rm -f conftest.$ac_objext
4002 if { (eval echo "$as_me:4002: \"$ac_compile\"") >&5
4003   (eval $ac_compile) 2>&5
4004   ac_status=$?
4005   echo "$as_me:4005: \$? = $ac_status" >&5
4006   (exit $ac_status); } &&
4007          { ac_try='test -s conftest.$ac_objext'
4008   { (eval echo "$as_me:4008: \"$ac_try\"") >&5
4009   (eval $ac_try) 2>&5
4010   ac_status=$?
4011   echo "$as_me:4011: \$? = $ac_status" >&5
4012   (exit $ac_status); }; }; then
4013   INTEL_COMPILER=yes
4014 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4015
4016 else
4017   echo "$as_me: failed program was:" >&5
4018 cat conftest.$ac_ext >&5
4019 fi
4020 rm -f conftest.$ac_objext conftest.$ac_ext
4021                 CFLAGS="$cf_save_CFLAGS"
4022                 echo "$as_me:4022: result: $INTEL_COMPILER" >&5
4023 echo "${ECHO_T}$INTEL_COMPILER" >&6
4024                 ;;
4025         esac
4026 fi
4027
4028 cat > conftest.$ac_ext <<EOF
4029 #line 4029 "${as_me:-configure}"
4030 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4031 EOF
4032
4033 if test "$INTEL_COMPILER" = yes
4034 then
4035 # The "-wdXXX" options suppress warnings:
4036 # remark #1419: external declaration in primary source file
4037 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4038 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4039 # remark #193: zero used for undefined preprocessing identifier
4040 # remark #593: variable "curs_sb_left_arrow" was set but never used
4041 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4042 # remark #869: parameter "tw" was never referenced
4043 # remark #981: operands are evaluated in unspecified order
4044 # warning #279: controlling expression is constant
4045
4046         { echo "$as_me:4046: checking for $CC warning options..." >&5
4047 echo "$as_me: checking for $CC warning options..." >&6;}
4048         cf_save_CFLAGS="$CFLAGS"
4049         EXTRA_CFLAGS="-Wall"
4050         for cf_opt in \
4051                 wd1419 \
4052                 wd1683 \
4053                 wd1684 \
4054                 wd193 \
4055                 wd593 \
4056                 wd279 \
4057                 wd810 \
4058                 wd869 \
4059                 wd981
4060         do
4061                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4062                 if { (eval echo "$as_me:4062: \"$ac_compile\"") >&5
4063   (eval $ac_compile) 2>&5
4064   ac_status=$?
4065   echo "$as_me:4065: \$? = $ac_status" >&5
4066   (exit $ac_status); }; then
4067                         test -n "$verbose" && echo "$as_me:4067: result: ... -$cf_opt" >&5
4068 echo "${ECHO_T}... -$cf_opt" >&6
4069                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4070                 fi
4071         done
4072         CFLAGS="$cf_save_CFLAGS"
4073
4074 elif test "$GCC" = yes
4075 then
4076         { echo "$as_me:4076: checking for $CC warning options..." >&5
4077 echo "$as_me: checking for $CC warning options..." >&6;}
4078         cf_save_CFLAGS="$CFLAGS"
4079         EXTRA_CFLAGS=
4080         cf_warn_CONST=""
4081         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4082         for cf_opt in W Wall \
4083                 Wbad-function-cast \
4084                 Wcast-align \
4085                 Wcast-qual \
4086                 Winline \
4087                 Wmissing-declarations \
4088                 Wmissing-prototypes \
4089                 Wnested-externs \
4090                 Wpointer-arith \
4091                 Wshadow \
4092                 Wstrict-prototypes \
4093                 Wundef $cf_warn_CONST
4094         do
4095                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4096                 if { (eval echo "$as_me:4096: \"$ac_compile\"") >&5
4097   (eval $ac_compile) 2>&5
4098   ac_status=$?
4099   echo "$as_me:4099: \$? = $ac_status" >&5
4100   (exit $ac_status); }; then
4101                         test -n "$verbose" && echo "$as_me:4101: result: ... -$cf_opt" >&5
4102 echo "${ECHO_T}... -$cf_opt" >&6
4103                         case $cf_opt in #(vi
4104                         Wcast-qual) #(vi
4105                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4106                                 ;;
4107                         Winline) #(vi
4108                                 case $GCC_VERSION in
4109                                 [34].*)
4110                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4111
4112 echo "${as_me:-configure}:4112: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4113
4114                                         continue;;
4115                                 esac
4116                                 ;;
4117                         esac
4118                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4119                 fi
4120         done
4121         CFLAGS="$cf_save_CFLAGS"
4122 fi
4123 rm -rf conftest*
4124
4125 fi
4126 fi
4127
4128 echo "$as_me:4128: checking if you want to use dmalloc for testing" >&5
4129 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4130
4131 # Check whether --with-dmalloc or --without-dmalloc was given.
4132 if test "${with_dmalloc+set}" = set; then
4133   withval="$with_dmalloc"
4134   cat >>confdefs.h <<\EOF
4135 #define USE_DMALLOC 1
4136 EOF
4137
4138         : ${with_cflags:=-g}
4139         : ${with_no_leaks:=yes}
4140          with_dmalloc=yes
4141 else
4142   with_dmalloc=
4143 fi;
4144 echo "$as_me:4144: result: ${with_dmalloc:-no}" >&5
4145 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4146
4147 case .$with_cflags in #(vi
4148 .*-g*)
4149         case .$CFLAGS in #(vi
4150         .*-g*) #(vi
4151                 ;;
4152         *)
4153
4154 cf_fix_cppflags=no
4155 cf_new_cflags=
4156 cf_new_cppflags=
4157 cf_new_extra_cppflags=
4158
4159 for cf_add_cflags in -g
4160 do
4161 case $cf_fix_cppflags in
4162 no)
4163         case $cf_add_cflags in #(vi
4164         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4165                 case $cf_add_cflags in
4166                 -D*)
4167                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4168
4169                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4170                                 && test -z "${cf_tst_cflags}" \
4171                                 && cf_fix_cppflags=yes
4172
4173                         if test $cf_fix_cppflags = yes ; then
4174                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4175                                 continue
4176                         elif test "${cf_tst_cflags}" = "\"'" ; then
4177                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4178                                 continue
4179                         fi
4180                         ;;
4181                 esac
4182                 case "$CPPFLAGS" in
4183                 *$cf_add_cflags) #(vi
4184                         ;;
4185                 *) #(vi
4186                         case $cf_add_cflags in #(vi
4187                         -D*)
4188                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4189
4190 CPPFLAGS=`echo "$CPPFLAGS" | \
4191         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4192                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4193
4194                                 ;;
4195                         esac
4196                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4197                         ;;
4198                 esac
4199                 ;;
4200         *)
4201                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4202                 ;;
4203         esac
4204         ;;
4205 yes)
4206         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4207
4208         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4209
4210         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4211                 && test -z "${cf_tst_cflags}" \
4212                 && cf_fix_cppflags=no
4213         ;;
4214 esac
4215 done
4216
4217 if test -n "$cf_new_cflags" ; then
4218
4219         CFLAGS="$CFLAGS $cf_new_cflags"
4220 fi
4221
4222 if test -n "$cf_new_cppflags" ; then
4223
4224         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4225 fi
4226
4227 if test -n "$cf_new_extra_cppflags" ; then
4228
4229         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4230 fi
4231
4232                 ;;
4233         esac
4234         ;;
4235 esac
4236
4237 if test "$with_dmalloc" = yes ; then
4238         echo "$as_me:4238: checking for dmalloc.h" >&5
4239 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4240 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4241   echo $ECHO_N "(cached) $ECHO_C" >&6
4242 else
4243   cat >conftest.$ac_ext <<_ACEOF
4244 #line 4244 "configure"
4245 #include "confdefs.h"
4246 #include <dmalloc.h>
4247 _ACEOF
4248 if { (eval echo "$as_me:4248: \"$ac_cpp conftest.$ac_ext\"") >&5
4249   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4250   ac_status=$?
4251   egrep -v '^ *\+' conftest.er1 >conftest.err
4252   rm -f conftest.er1
4253   cat conftest.err >&5
4254   echo "$as_me:4254: \$? = $ac_status" >&5
4255   (exit $ac_status); } >/dev/null; then
4256   if test -s conftest.err; then
4257     ac_cpp_err=$ac_c_preproc_warn_flag
4258   else
4259     ac_cpp_err=
4260   fi
4261 else
4262   ac_cpp_err=yes
4263 fi
4264 if test -z "$ac_cpp_err"; then
4265   ac_cv_header_dmalloc_h=yes
4266 else
4267   echo "$as_me: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   ac_cv_header_dmalloc_h=no
4270 fi
4271 rm -f conftest.err conftest.$ac_ext
4272 fi
4273 echo "$as_me:4273: result: $ac_cv_header_dmalloc_h" >&5
4274 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4275 if test $ac_cv_header_dmalloc_h = yes; then
4276
4277 echo "$as_me:4277: checking for dmalloc_debug in -ldmalloc" >&5
4278 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4279 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4280   echo $ECHO_N "(cached) $ECHO_C" >&6
4281 else
4282   ac_check_lib_save_LIBS=$LIBS
4283 LIBS="-ldmalloc  $LIBS"
4284 cat >conftest.$ac_ext <<_ACEOF
4285 #line 4285 "configure"
4286 #include "confdefs.h"
4287
4288 /* Override any gcc2 internal prototype to avoid an error.  */
4289 #ifdef __cplusplus
4290 extern "C"
4291 #endif
4292 /* We use char because int might match the return type of a gcc2
4293    builtin and then its argument prototype would still apply.  */
4294 char dmalloc_debug ();
4295 int
4296 main ()
4297 {
4298 dmalloc_debug ();
4299   ;
4300   return 0;
4301 }
4302 _ACEOF
4303 rm -f conftest.$ac_objext conftest$ac_exeext
4304 if { (eval echo "$as_me:4304: \"$ac_link\"") >&5
4305   (eval $ac_link) 2>&5
4306   ac_status=$?
4307   echo "$as_me:4307: \$? = $ac_status" >&5
4308   (exit $ac_status); } &&
4309          { ac_try='test -s conftest$ac_exeext'
4310   { (eval echo "$as_me:4310: \"$ac_try\"") >&5
4311   (eval $ac_try) 2>&5
4312   ac_status=$?
4313   echo "$as_me:4313: \$? = $ac_status" >&5
4314   (exit $ac_status); }; }; then
4315   ac_cv_lib_dmalloc_dmalloc_debug=yes
4316 else
4317   echo "$as_me: failed program was:" >&5
4318 cat conftest.$ac_ext >&5
4319 ac_cv_lib_dmalloc_dmalloc_debug=no
4320 fi
4321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4322 LIBS=$ac_check_lib_save_LIBS
4323 fi
4324 echo "$as_me:4324: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4325 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4326 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4327   cat >>confdefs.h <<EOF
4328 #define HAVE_LIBDMALLOC 1
4329 EOF
4330
4331   LIBS="-ldmalloc $LIBS"
4332
4333 fi
4334
4335 fi
4336
4337 fi
4338
4339 echo "$as_me:4339: checking if you want to use dbmalloc for testing" >&5
4340 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4341
4342 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4343 if test "${with_dbmalloc+set}" = set; then
4344   withval="$with_dbmalloc"
4345   cat >>confdefs.h <<\EOF
4346 #define USE_DBMALLOC 1
4347 EOF
4348
4349         : ${with_cflags:=-g}
4350         : ${with_no_leaks:=yes}
4351          with_dbmalloc=yes
4352 else
4353   with_dbmalloc=
4354 fi;
4355 echo "$as_me:4355: result: ${with_dbmalloc:-no}" >&5
4356 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4357
4358 case .$with_cflags in #(vi
4359 .*-g*)
4360         case .$CFLAGS in #(vi
4361         .*-g*) #(vi
4362                 ;;
4363         *)
4364
4365 cf_fix_cppflags=no
4366 cf_new_cflags=
4367 cf_new_cppflags=
4368 cf_new_extra_cppflags=
4369
4370 for cf_add_cflags in -g
4371 do
4372 case $cf_fix_cppflags in
4373 no)
4374         case $cf_add_cflags in #(vi
4375         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4376                 case $cf_add_cflags in
4377                 -D*)
4378                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4379
4380                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4381                                 && test -z "${cf_tst_cflags}" \
4382                                 && cf_fix_cppflags=yes
4383
4384                         if test $cf_fix_cppflags = yes ; then
4385                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4386                                 continue
4387                         elif test "${cf_tst_cflags}" = "\"'" ; then
4388                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4389                                 continue
4390                         fi
4391                         ;;
4392                 esac
4393                 case "$CPPFLAGS" in
4394                 *$cf_add_cflags) #(vi
4395                         ;;
4396                 *) #(vi
4397                         case $cf_add_cflags in #(vi
4398                         -D*)
4399                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4400
4401 CPPFLAGS=`echo "$CPPFLAGS" | \
4402         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4403                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4404
4405                                 ;;
4406                         esac
4407                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4408                         ;;
4409                 esac
4410                 ;;
4411         *)
4412                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4413                 ;;
4414         esac
4415         ;;
4416 yes)
4417         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4418
4419         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4420
4421         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4422                 && test -z "${cf_tst_cflags}" \
4423                 && cf_fix_cppflags=no
4424         ;;
4425 esac
4426 done
4427
4428 if test -n "$cf_new_cflags" ; then
4429
4430         CFLAGS="$CFLAGS $cf_new_cflags"
4431 fi
4432
4433 if test -n "$cf_new_cppflags" ; then
4434
4435         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4436 fi
4437
4438 if test -n "$cf_new_extra_cppflags" ; then
4439
4440         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4441 fi
4442
4443                 ;;
4444         esac
4445         ;;
4446 esac
4447
4448 if test "$with_dbmalloc" = yes ; then
4449         echo "$as_me:4449: checking for dbmalloc.h" >&5
4450 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4451 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4452   echo $ECHO_N "(cached) $ECHO_C" >&6
4453 else
4454   cat >conftest.$ac_ext <<_ACEOF
4455 #line 4455 "configure"
4456 #include "confdefs.h"
4457 #include <dbmalloc.h>
4458 _ACEOF
4459 if { (eval echo "$as_me:4459: \"$ac_cpp conftest.$ac_ext\"") >&5
4460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4461   ac_status=$?
4462   egrep -v '^ *\+' conftest.er1 >conftest.err
4463   rm -f conftest.er1
4464   cat conftest.err >&5
4465   echo "$as_me:4465: \$? = $ac_status" >&5
4466   (exit $ac_status); } >/dev/null; then
4467   if test -s conftest.err; then
4468     ac_cpp_err=$ac_c_preproc_warn_flag
4469   else
4470     ac_cpp_err=
4471   fi
4472 else
4473   ac_cpp_err=yes
4474 fi
4475 if test -z "$ac_cpp_err"; then
4476   ac_cv_header_dbmalloc_h=yes
4477 else
4478   echo "$as_me: failed program was:" >&5
4479   cat conftest.$ac_ext >&5
4480   ac_cv_header_dbmalloc_h=no
4481 fi
4482 rm -f conftest.err conftest.$ac_ext
4483 fi
4484 echo "$as_me:4484: result: $ac_cv_header_dbmalloc_h" >&5
4485 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4486 if test $ac_cv_header_dbmalloc_h = yes; then
4487
4488 echo "$as_me:4488: checking for debug_malloc in -ldbmalloc" >&5
4489 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4490 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4491   echo $ECHO_N "(cached) $ECHO_C" >&6
4492 else
4493   ac_check_lib_save_LIBS=$LIBS
4494 LIBS="-ldbmalloc  $LIBS"
4495 cat >conftest.$ac_ext <<_ACEOF
4496 #line 4496 "configure"
4497 #include "confdefs.h"
4498
4499 /* Override any gcc2 internal prototype to avoid an error.  */
4500 #ifdef __cplusplus
4501 extern "C"
4502 #endif
4503 /* We use char because int might match the return type of a gcc2
4504    builtin and then its argument prototype would still apply.  */
4505 char debug_malloc ();
4506 int
4507 main ()
4508 {
4509 debug_malloc ();
4510   ;
4511   return 0;
4512 }
4513 _ACEOF
4514 rm -f conftest.$ac_objext conftest$ac_exeext
4515 if { (eval echo "$as_me:4515: \"$ac_link\"") >&5
4516   (eval $ac_link) 2>&5
4517   ac_status=$?
4518   echo "$as_me:4518: \$? = $ac_status" >&5
4519   (exit $ac_status); } &&
4520          { ac_try='test -s conftest$ac_exeext'
4521   { (eval echo "$as_me:4521: \"$ac_try\"") >&5
4522   (eval $ac_try) 2>&5
4523   ac_status=$?
4524   echo "$as_me:4524: \$? = $ac_status" >&5
4525   (exit $ac_status); }; }; then
4526   ac_cv_lib_dbmalloc_debug_malloc=yes
4527 else
4528   echo "$as_me: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4530 ac_cv_lib_dbmalloc_debug_malloc=no
4531 fi
4532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4533 LIBS=$ac_check_lib_save_LIBS
4534 fi
4535 echo "$as_me:4535: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4536 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4537 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4538   cat >>confdefs.h <<EOF
4539 #define HAVE_LIBDBMALLOC 1
4540 EOF
4541
4542   LIBS="-ldbmalloc $LIBS"
4543
4544 fi
4545
4546 fi
4547
4548 fi
4549
4550 echo "$as_me:4550: checking if you want to use valgrind for testing" >&5
4551 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
4552
4553 # Check whether --with-valgrind or --without-valgrind was given.
4554 if test "${with_valgrind+set}" = set; then
4555   withval="$with_valgrind"
4556   cat >>confdefs.h <<\EOF
4557 #define USE_VALGRIND 1
4558 EOF
4559
4560         : ${with_cflags:=-g}
4561         : ${with_no_leaks:=yes}
4562          with_valgrind=yes
4563 else
4564   with_valgrind=
4565 fi;
4566 echo "$as_me:4566: result: ${with_valgrind:-no}" >&5
4567 echo "${ECHO_T}${with_valgrind:-no}" >&6
4568
4569 case .$with_cflags in #(vi
4570 .*-g*)
4571         case .$CFLAGS in #(vi
4572         .*-g*) #(vi
4573                 ;;
4574         *)
4575
4576 cf_fix_cppflags=no
4577 cf_new_cflags=
4578 cf_new_cppflags=
4579 cf_new_extra_cppflags=
4580
4581 for cf_add_cflags in -g
4582 do
4583 case $cf_fix_cppflags in
4584 no)
4585         case $cf_add_cflags in #(vi
4586         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4587                 case $cf_add_cflags in
4588                 -D*)
4589                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4590
4591                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4592                                 && test -z "${cf_tst_cflags}" \
4593                                 && cf_fix_cppflags=yes
4594
4595                         if test $cf_fix_cppflags = yes ; then
4596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4597                                 continue
4598                         elif test "${cf_tst_cflags}" = "\"'" ; then
4599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4600                                 continue
4601                         fi
4602                         ;;
4603                 esac
4604                 case "$CPPFLAGS" in
4605                 *$cf_add_cflags) #(vi
4606                         ;;
4607                 *) #(vi
4608                         case $cf_add_cflags in #(vi
4609                         -D*)
4610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4611
4612 CPPFLAGS=`echo "$CPPFLAGS" | \
4613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4615
4616                                 ;;
4617                         esac
4618                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4619                         ;;
4620                 esac
4621                 ;;
4622         *)
4623                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4624                 ;;
4625         esac
4626         ;;
4627 yes)
4628         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4629
4630         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4631
4632         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4633                 && test -z "${cf_tst_cflags}" \
4634                 && cf_fix_cppflags=no
4635         ;;
4636 esac
4637 done
4638
4639 if test -n "$cf_new_cflags" ; then
4640
4641         CFLAGS="$CFLAGS $cf_new_cflags"
4642 fi
4643
4644 if test -n "$cf_new_cppflags" ; then
4645
4646         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4647 fi
4648
4649 if test -n "$cf_new_extra_cppflags" ; then
4650
4651         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4652 fi
4653
4654                 ;;
4655         esac
4656         ;;
4657 esac
4658
4659 echo "$as_me:4659: checking if you want to perform memory-leak testing" >&5
4660 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
4661
4662 # Check whether --enable-leaks or --disable-leaks was given.
4663 if test "${enable_leaks+set}" = set; then
4664   enableval="$enable_leaks"
4665   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
4666 else
4667   : ${with_no_leaks:=no}
4668 fi;
4669 echo "$as_me:4669: result: $with_no_leaks" >&5
4670 echo "${ECHO_T}$with_no_leaks" >&6
4671
4672 if test "$with_no_leaks" = yes ; then
4673         cat >>confdefs.h <<\EOF
4674 #define NO_LEAKS 1
4675 EOF
4676
4677         cat >>confdefs.h <<\EOF
4678 #define YY_NO_LEAKS 1
4679 EOF
4680
4681 fi
4682
4683 echo "$as_me:4683: checking if you want to check for wide-character functions" >&5
4684 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4685
4686 # Check whether --enable-widec or --disable-widec was given.
4687 if test "${enable_widec+set}" = set; then
4688   enableval="$enable_widec"
4689   test "$enableval" != no && enableval=yes
4690   if test "$enableval" != "yes" ; then
4691     cf_enable_widec=no
4692   else
4693     cf_enable_widec=yes
4694   fi
4695 else
4696   enableval=yes
4697   cf_enable_widec=yes
4698
4699 fi;
4700 echo "$as_me:4700: result: $cf_enable_widec" >&5
4701 echo "${ECHO_T}$cf_enable_widec" >&6
4702
4703 echo "$as_me:4703: checking for specific curses-directory" >&5
4704 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4705
4706 # Check whether --with-curses-dir or --without-curses-dir was given.
4707 if test "${with_curses_dir+set}" = set; then
4708   withval="$with_curses_dir"
4709   cf_cv_curses_dir=$withval
4710 else
4711   cf_cv_curses_dir=no
4712 fi;
4713 echo "$as_me:4713: result: $cf_cv_curses_dir" >&5
4714 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4715
4716 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4717 then
4718
4719 if test "x$prefix" != xNONE; then
4720   cf_path_syntax="$prefix"
4721 else
4722   cf_path_syntax="$ac_default_prefix"
4723 fi
4724
4725 case ".$withval" in #(vi
4726 .\$\(*\)*|.\'*\'*) #(vi
4727   ;;
4728 ..|./*|.\\*) #(vi
4729   ;;
4730 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4731   ;;
4732 .\${*prefix}*) #(vi
4733   eval withval="$withval"
4734   case ".$withval" in #(vi
4735   .NONE/*)
4736     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4737     ;;
4738   esac
4739   ;; #(vi
4740 .no|.NONE/*)
4741   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4742   ;;
4743 *)
4744   { { echo "$as_me:4744: error: expected a pathname, not \"$withval\"" >&5
4745 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4746    { (exit 1); exit 1; }; }
4747   ;;
4748 esac
4749
4750         if test -d "$cf_cv_curses_dir"
4751         then
4752
4753 if test -n "$cf_cv_curses_dir/include" ; then
4754   for cf_add_incdir in $cf_cv_curses_dir/include
4755   do
4756         while test $cf_add_incdir != /usr/include
4757         do
4758           if test -d $cf_add_incdir
4759           then
4760                 cf_have_incdir=no
4761                 if test -n "$CFLAGS$CPPFLAGS" ; then
4762                   # a loop is needed to ensure we can add subdirs of existing dirs
4763                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4764                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4765                           cf_have_incdir=yes; break
4766                         fi
4767                   done
4768                 fi
4769
4770                 if test "$cf_have_incdir" = no ; then
4771                   if test "$cf_add_incdir" = /usr/local/include ; then
4772                         if test "$GCC" = yes
4773                         then
4774                           cf_save_CPPFLAGS=$CPPFLAGS
4775                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4776                           cat >conftest.$ac_ext <<_ACEOF
4777 #line 4777 "configure"
4778 #include "confdefs.h"
4779 #include <stdio.h>
4780 int
4781 main ()
4782 {
4783 printf("Hello")
4784   ;
4785   return 0;
4786 }
4787 _ACEOF
4788 rm -f conftest.$ac_objext
4789 if { (eval echo "$as_me:4789: \"$ac_compile\"") >&5
4790   (eval $ac_compile) 2>&5
4791   ac_status=$?
4792   echo "$as_me:4792: \$? = $ac_status" >&5
4793   (exit $ac_status); } &&
4794          { ac_try='test -s conftest.$ac_objext'
4795   { (eval echo "$as_me:4795: \"$ac_try\"") >&5
4796   (eval $ac_try) 2>&5
4797   ac_status=$?
4798   echo "$as_me:4798: \$? = $ac_status" >&5
4799   (exit $ac_status); }; }; then
4800   :
4801 else
4802   echo "$as_me: failed program was:" >&5
4803 cat conftest.$ac_ext >&5
4804 cf_have_incdir=yes
4805 fi
4806 rm -f conftest.$ac_objext conftest.$ac_ext
4807                           CPPFLAGS=$cf_save_CPPFLAGS
4808                         fi
4809                   fi
4810                 fi
4811
4812                 if test "$cf_have_incdir" = no ; then
4813                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4814
4815 echo "${as_me:-configure}:4815: testing adding $cf_add_incdir to include-path ..." 1>&5
4816
4817                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4818
4819                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4820                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4821                   cf_add_incdir="$cf_top_incdir"
4822                 else
4823                   break
4824                 fi
4825           fi
4826         done
4827   done
4828 fi
4829
4830 if test -n "$cf_cv_curses_dir/lib" ; then
4831   for cf_add_libdir in $cf_cv_curses_dir/lib
4832   do
4833     if test $cf_add_libdir = /usr/lib ; then
4834       :
4835     elif test -d $cf_add_libdir
4836     then
4837       cf_have_libdir=no
4838       if test -n "$LDFLAGS$LIBS" ; then
4839         # a loop is needed to ensure we can add subdirs of existing dirs
4840         for cf_test_libdir in $LDFLAGS $LIBS ; do
4841           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4842             cf_have_libdir=yes; break
4843           fi
4844         done
4845       fi
4846       if test "$cf_have_libdir" = no ; then
4847         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4848
4849 echo "${as_me:-configure}:4849: testing adding $cf_add_libdir to library-path ..." 1>&5
4850
4851         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4852       fi
4853     fi
4854   done
4855 fi
4856
4857         fi
4858 fi
4859
4860 echo "$as_me:4860: checking for specified curses library type" >&5
4861 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4862
4863 # Check whether --with-ncursesw or --without-ncursesw was given.
4864 if test "${with_ncursesw+set}" = set; then
4865   withval="$with_ncursesw"
4866   cf_cv_screen=ncursesw
4867 else
4868
4869 # Check whether --with-ncurses or --without-ncurses was given.
4870 if test "${with_ncurses+set}" = set; then
4871   withval="$with_ncurses"
4872   cf_cv_screen=ncurses
4873 else
4874
4875 # Check whether --with-pdcurses or --without-pdcurses was given.
4876 if test "${with_pdcurses+set}" = set; then
4877   withval="$with_pdcurses"
4878   cf_cv_screen=pdcurses
4879 else
4880
4881 # Check whether --with-curses-colr or --without-curses-colr was given.
4882 if test "${with_curses_colr+set}" = set; then
4883   withval="$with_curses_colr"
4884   cf_cv_screen=curses_colr
4885 else
4886
4887 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4888 if test "${with_curses_5lib+set}" = set; then
4889   withval="$with_curses_5lib"
4890   cf_cv_screen=curses_5lib
4891 fi;
4892 fi;
4893 fi;
4894 fi;
4895 fi;
4896
4897 echo "$as_me:4897: result: $cf_cv_screen" >&5
4898 echo "${ECHO_T}$cf_cv_screen" >&6
4899
4900 case $cf_cv_screen in
4901 curses|curses_*)
4902
4903 echo "$as_me:4903: checking for extra include directories" >&5
4904 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4905 if test "${cf_cv_curses_incdir+set}" = set; then
4906   echo $ECHO_N "(cached) $ECHO_C" >&6
4907 else
4908
4909 cf_cv_curses_incdir=no
4910 case $host_os in #(vi
4911 hpux10.*) #(vi
4912         if test "x$cf_cv_screen" = "xcurses_colr"
4913         then
4914                 test -d /usr/include/curses_colr && \
4915                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4916         fi
4917         ;;
4918 sunos3*|sunos4*)
4919         if test "x$cf_cv_screen" = "xcurses_5lib"
4920         then
4921                 test -d /usr/5lib && \
4922                 test -d /usr/5include && \
4923                 cf_cv_curses_incdir="-I/usr/5include"
4924         fi
4925         ;;
4926 esac
4927
4928 fi
4929 echo "$as_me:4929: result: $cf_cv_curses_incdir" >&5
4930 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4931 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4932
4933 echo "$as_me:4933: checking if we have identified curses headers" >&5
4934 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4935 if test "${cf_cv_ncurses_header+set}" = set; then
4936   echo $ECHO_N "(cached) $ECHO_C" >&6
4937 else
4938
4939 cf_cv_ncurses_header=none
4940 for cf_header in  \
4941         ncurses.h \
4942         curses.h ncurses/ncurses.h ncurses/curses.h
4943 do
4944 cat >conftest.$ac_ext <<_ACEOF
4945 #line 4945 "configure"
4946 #include "confdefs.h"
4947 #include <${cf_header}>
4948 int
4949 main ()
4950 {
4951 initscr(); tgoto("?", 0,0)
4952   ;
4953   return 0;
4954 }
4955 _ACEOF
4956 rm -f conftest.$ac_objext
4957 if { (eval echo "$as_me:4957: \"$ac_compile\"") >&5
4958   (eval $ac_compile) 2>&5
4959   ac_status=$?
4960   echo "$as_me:4960: \$? = $ac_status" >&5
4961   (exit $ac_status); } &&
4962          { ac_try='test -s conftest.$ac_objext'
4963   { (eval echo "$as_me:4963: \"$ac_try\"") >&5
4964   (eval $ac_try) 2>&5
4965   ac_status=$?
4966   echo "$as_me:4966: \$? = $ac_status" >&5
4967   (exit $ac_status); }; }; then
4968   cf_cv_ncurses_header=$cf_header; break
4969 else
4970   echo "$as_me: failed program was:" >&5
4971 cat conftest.$ac_ext >&5
4972 fi
4973 rm -f conftest.$ac_objext conftest.$ac_ext
4974 done
4975
4976 fi
4977 echo "$as_me:4977: result: $cf_cv_ncurses_header" >&5
4978 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4979
4980 if test "$cf_cv_ncurses_header" = none ; then
4981         { { echo "$as_me:4981: error: No curses header-files found" >&5
4982 echo "$as_me: error: No curses header-files found" >&2;}
4983    { (exit 1); exit 1; }; }
4984 fi
4985
4986 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4987
4988 for ac_header in $cf_cv_ncurses_header
4989 do
4990 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4991 echo "$as_me:4991: checking for $ac_header" >&5
4992 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4993 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4994   echo $ECHO_N "(cached) $ECHO_C" >&6
4995 else
4996   cat >conftest.$ac_ext <<_ACEOF
4997 #line 4997 "configure"
4998 #include "confdefs.h"
4999 #include <$ac_header>
5000 _ACEOF
5001 if { (eval echo "$as_me:5001: \"$ac_cpp conftest.$ac_ext\"") >&5
5002   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5003   ac_status=$?
5004   egrep -v '^ *\+' conftest.er1 >conftest.err
5005   rm -f conftest.er1
5006   cat conftest.err >&5
5007   echo "$as_me:5007: \$? = $ac_status" >&5
5008   (exit $ac_status); } >/dev/null; then
5009   if test -s conftest.err; then
5010     ac_cpp_err=$ac_c_preproc_warn_flag
5011   else
5012     ac_cpp_err=
5013   fi
5014 else
5015   ac_cpp_err=yes
5016 fi
5017 if test -z "$ac_cpp_err"; then
5018   eval "$as_ac_Header=yes"
5019 else
5020   echo "$as_me: failed program was:" >&5
5021   cat conftest.$ac_ext >&5
5022   eval "$as_ac_Header=no"
5023 fi
5024 rm -f conftest.err conftest.$ac_ext
5025 fi
5026 echo "$as_me:5026: result: `eval echo '${'$as_ac_Header'}'`" >&5
5027 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5028 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5029   cat >>confdefs.h <<EOF
5030 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5031 EOF
5032
5033 fi
5034 done
5035
5036 echo "$as_me:5036: checking for terminfo header" >&5
5037 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5038 if test "${cf_cv_term_header+set}" = set; then
5039   echo $ECHO_N "(cached) $ECHO_C" >&6
5040 else
5041
5042 case ${cf_cv_ncurses_header} in #(vi
5043 */ncurses.h|*/ncursesw.h) #(vi
5044         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5045         ;;
5046 *)
5047         cf_term_header=term.h
5048         ;;
5049 esac
5050
5051 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5052 do
5053 cat >conftest.$ac_ext <<_ACEOF
5054 #line 5054 "configure"
5055 #include "confdefs.h"
5056 #include <stdio.h>
5057 #include <${cf_cv_ncurses_header:-curses.h}>
5058 #include <$cf_test>
5059
5060 int
5061 main ()
5062 {
5063 int x = auto_left_margin
5064   ;
5065   return 0;
5066 }
5067 _ACEOF
5068 rm -f conftest.$ac_objext
5069 if { (eval echo "$as_me:5069: \"$ac_compile\"") >&5
5070   (eval $ac_compile) 2>&5
5071   ac_status=$?
5072   echo "$as_me:5072: \$? = $ac_status" >&5
5073   (exit $ac_status); } &&
5074          { ac_try='test -s conftest.$ac_objext'
5075   { (eval echo "$as_me:5075: \"$ac_try\"") >&5
5076   (eval $ac_try) 2>&5
5077   ac_status=$?
5078   echo "$as_me:5078: \$? = $ac_status" >&5
5079   (exit $ac_status); }; }; then
5080
5081         cf_cv_term_header="$cf_test"
5082 else
5083   echo "$as_me: failed program was:" >&5
5084 cat conftest.$ac_ext >&5
5085
5086         cf_cv_term_header=unknown
5087
5088 fi
5089 rm -f conftest.$ac_objext conftest.$ac_ext
5090         test "$cf_cv_term_header" != unknown && break
5091 done
5092
5093 fi
5094 echo "$as_me:5094: result: $cf_cv_term_header" >&5
5095 echo "${ECHO_T}$cf_cv_term_header" >&6
5096
5097 # Set definitions to allow ifdef'ing to accommodate subdirectories
5098
5099 case $cf_cv_term_header in # (vi
5100 *term.h)
5101         cat >>confdefs.h <<\EOF
5102 #define HAVE_TERM_H 1
5103 EOF
5104
5105         ;;
5106 esac
5107
5108 case $cf_cv_term_header in # (vi
5109 ncurses/term.h) #(vi
5110         cat >>confdefs.h <<\EOF
5111 #define HAVE_NCURSES_TERM_H 1
5112 EOF
5113
5114         ;;
5115 ncursesw/term.h)
5116         cat >>confdefs.h <<\EOF
5117 #define HAVE_NCURSESW_TERM_H 1
5118 EOF
5119
5120         ;;
5121 esac
5122
5123 echo "$as_me:5123: checking for ncurses version" >&5
5124 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5125 if test "${cf_cv_ncurses_version+set}" = set; then
5126   echo $ECHO_N "(cached) $ECHO_C" >&6
5127 else
5128
5129         cf_cv_ncurses_version=no
5130         cf_tempfile=out$$
5131         rm -f $cf_tempfile
5132         if test "$cross_compiling" = yes; then
5133
5134         # This will not work if the preprocessor splits the line after the
5135         # Autoconf token.  The 'unproto' program does that.
5136         cat > conftest.$ac_ext <<EOF
5137 #include <${cf_cv_ncurses_header:-curses.h}>
5138 #undef Autoconf
5139 #ifdef NCURSES_VERSION
5140 Autoconf NCURSES_VERSION
5141 #else
5142 #ifdef __NCURSES_H
5143 Autoconf "old"
5144 #endif
5145 ;
5146 #endif
5147 EOF
5148         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5149         { (eval echo "$as_me:5149: \"$cf_try\"") >&5
5150   (eval $cf_try) 2>&5
5151   ac_status=$?
5152   echo "$as_me:5152: \$? = $ac_status" >&5
5153   (exit $ac_status); }
5154         if test -f conftest.out ; then
5155                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5156                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5157                 rm -f conftest.out
5158         fi
5159
5160 else
5161   cat >conftest.$ac_ext <<_ACEOF
5162 #line 5162 "configure"
5163 #include "confdefs.h"
5164
5165 #include <${cf_cv_ncurses_header:-curses.h}>
5166 #include <stdio.h>
5167 int main()
5168 {
5169         FILE *fp = fopen("$cf_tempfile", "w");
5170 #ifdef NCURSES_VERSION
5171 # ifdef NCURSES_VERSION_PATCH
5172         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5173 # else
5174         fprintf(fp, "%s\n", NCURSES_VERSION);
5175 # endif
5176 #else
5177 # ifdef __NCURSES_H
5178         fprintf(fp, "old\n");
5179 # else
5180         make an error
5181 # endif
5182 #endif
5183         ${cf_cv_main_return:-return}(0);
5184 }
5185 _ACEOF
5186 rm -f conftest$ac_exeext
5187 if { (eval echo "$as_me:5187: \"$ac_link\"") >&5
5188   (eval $ac_link) 2>&5
5189   ac_status=$?
5190   echo "$as_me:5190: \$? = $ac_status" >&5
5191   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5192   { (eval echo "$as_me:5192: \"$ac_try\"") >&5
5193   (eval $ac_try) 2>&5
5194   ac_status=$?
5195   echo "$as_me:5195: \$? = $ac_status" >&5
5196   (exit $ac_status); }; }; then
5197
5198         cf_cv_ncurses_version=`cat $cf_tempfile`
5199 else
5200   echo "$as_me: program exited with status $ac_status" >&5
5201 echo "$as_me: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5203 fi
5204 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5205 fi
5206         rm -f $cf_tempfile
5207
5208 fi
5209 echo "$as_me:5209: result: $cf_cv_ncurses_version" >&5
5210 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5211 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5212 #define NCURSES 1
5213 EOF
5214
5215 echo "$as_me:5215: checking if we have identified curses libraries" >&5
5216 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5217 cat >conftest.$ac_ext <<_ACEOF
5218 #line 5218 "configure"
5219 #include "confdefs.h"
5220 #include <${cf_cv_ncurses_header:-curses.h}>
5221 int
5222 main ()
5223 {
5224 initscr(); tgoto("?", 0,0)
5225   ;
5226   return 0;
5227 }
5228 _ACEOF
5229 rm -f conftest.$ac_objext conftest$ac_exeext
5230 if { (eval echo "$as_me:5230: \"$ac_link\"") >&5
5231   (eval $ac_link) 2>&5
5232   ac_status=$?
5233   echo "$as_me:5233: \$? = $ac_status" >&5
5234   (exit $ac_status); } &&
5235          { ac_try='test -s conftest$ac_exeext'
5236   { (eval echo "$as_me:5236: \"$ac_try\"") >&5
5237   (eval $ac_try) 2>&5
5238   ac_status=$?
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); }; }; then
5241   cf_result=yes
5242 else
5243   echo "$as_me: failed program was:" >&5
5244 cat conftest.$ac_ext >&5
5245 cf_result=no
5246 fi
5247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5248 echo "$as_me:5248: result: $cf_result" >&5
5249 echo "${ECHO_T}$cf_result" >&6
5250
5251 if test "$cf_result" = no ; then
5252 case $host_os in #(vi
5253 freebsd*) #(vi
5254     echo "$as_me:5254: checking for tgoto in -lmytinfo" >&5
5255 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5256 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   ac_check_lib_save_LIBS=$LIBS
5260 LIBS="-lmytinfo  $LIBS"
5261 cat >conftest.$ac_ext <<_ACEOF
5262 #line 5262 "configure"
5263 #include "confdefs.h"
5264
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 #ifdef __cplusplus
5267 extern "C"
5268 #endif
5269 /* We use char because int might match the return type of a gcc2
5270    builtin and then its argument prototype would still apply.  */
5271 char tgoto ();
5272 int
5273 main ()
5274 {
5275 tgoto ();
5276   ;
5277   return 0;
5278 }
5279 _ACEOF
5280 rm -f conftest.$ac_objext conftest$ac_exeext
5281 if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
5282   (eval $ac_link) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); } &&
5286          { ac_try='test -s conftest$ac_exeext'
5287   { (eval echo "$as_me:5287: \"$ac_try\"") >&5
5288   (eval $ac_try) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); }; }; then
5292   ac_cv_lib_mytinfo_tgoto=yes
5293 else
5294   echo "$as_me: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 ac_cv_lib_mytinfo_tgoto=no
5297 fi
5298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5299 LIBS=$ac_check_lib_save_LIBS
5300 fi
5301 echo "$as_me:5301: result: $ac_cv_lib_mytinfo_tgoto" >&5
5302 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5303 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5304   LIBS="-lmytinfo $LIBS"
5305 fi
5306
5307     ;;
5308 hpux10.*) #(vi
5309         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5310         # next (1998), and xcurses "newer" (2000).  There is no header file for
5311         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5312         # term.h) for cur_colr
5313         if test "x$cf_cv_screen" = "xcurses_colr"
5314         then
5315                 echo "$as_me:5315: checking for initscr in -lcur_colr" >&5
5316 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5317 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5318   echo $ECHO_N "(cached) $ECHO_C" >&6
5319 else
5320   ac_check_lib_save_LIBS=$LIBS
5321 LIBS="-lcur_colr  $LIBS"
5322 cat >conftest.$ac_ext <<_ACEOF
5323 #line 5323 "configure"
5324 #include "confdefs.h"
5325
5326 /* Override any gcc2 internal prototype to avoid an error.  */
5327 #ifdef __cplusplus
5328 extern "C"
5329 #endif
5330 /* We use char because int might match the return type of a gcc2
5331    builtin and then its argument prototype would still apply.  */
5332 char initscr ();
5333 int
5334 main ()
5335 {
5336 initscr ();
5337   ;
5338   return 0;
5339 }
5340 _ACEOF
5341 rm -f conftest.$ac_objext conftest$ac_exeext
5342 if { (eval echo "$as_me:5342: \"$ac_link\"") >&5
5343   (eval $ac_link) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); } &&
5347          { ac_try='test -s conftest$ac_exeext'
5348   { (eval echo "$as_me:5348: \"$ac_try\"") >&5
5349   (eval $ac_try) 2>&5
5350   ac_status=$?
5351   echo "$as_me:5351: \$? = $ac_status" >&5
5352   (exit $ac_status); }; }; then
5353   ac_cv_lib_cur_colr_initscr=yes
5354 else
5355   echo "$as_me: failed program was:" >&5
5356 cat conftest.$ac_ext >&5
5357 ac_cv_lib_cur_colr_initscr=no
5358 fi
5359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5360 LIBS=$ac_check_lib_save_LIBS
5361 fi
5362 echo "$as_me:5362: result: $ac_cv_lib_cur_colr_initscr" >&5
5363 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5364 if test $ac_cv_lib_cur_colr_initscr = yes; then
5365
5366                         LIBS="-lcur_colr $LIBS"
5367                         ac_cv_func_initscr=yes
5368
5369 else
5370
5371                 echo "$as_me:5371: checking for initscr in -lHcurses" >&5
5372 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5373 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5374   echo $ECHO_N "(cached) $ECHO_C" >&6
5375 else
5376   ac_check_lib_save_LIBS=$LIBS
5377 LIBS="-lHcurses  $LIBS"
5378 cat >conftest.$ac_ext <<_ACEOF
5379 #line 5379 "configure"
5380 #include "confdefs.h"
5381
5382 /* Override any gcc2 internal prototype to avoid an error.  */
5383 #ifdef __cplusplus
5384 extern "C"
5385 #endif
5386 /* We use char because int might match the return type of a gcc2
5387    builtin and then its argument prototype would still apply.  */
5388 char initscr ();
5389 int
5390 main ()
5391 {
5392 initscr ();
5393   ;
5394   return 0;
5395 }
5396 _ACEOF
5397 rm -f conftest.$ac_objext conftest$ac_exeext
5398 if { (eval echo "$as_me:5398: \"$ac_link\"") >&5
5399   (eval $ac_link) 2>&5
5400   ac_status=$?
5401   echo "$as_me:5401: \$? = $ac_status" >&5
5402   (exit $ac_status); } &&
5403          { ac_try='test -s conftest$ac_exeext'
5404   { (eval echo "$as_me:5404: \"$ac_try\"") >&5
5405   (eval $ac_try) 2>&5
5406   ac_status=$?
5407   echo "$as_me:5407: \$? = $ac_status" >&5
5408   (exit $ac_status); }; }; then
5409   ac_cv_lib_Hcurses_initscr=yes
5410 else
5411   echo "$as_me: failed program was:" >&5
5412 cat conftest.$ac_ext >&5
5413 ac_cv_lib_Hcurses_initscr=no
5414 fi
5415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5416 LIBS=$ac_check_lib_save_LIBS
5417 fi
5418 echo "$as_me:5418: result: $ac_cv_lib_Hcurses_initscr" >&5
5419 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5420 if test $ac_cv_lib_Hcurses_initscr = yes; then
5421
5422                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5423                         LIBS="-lHcurses $LIBS"
5424                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5425                         ac_cv_func_initscr=yes
5426
5427 fi
5428
5429 fi
5430
5431         fi
5432     ;;
5433 linux*)
5434         case `arch 2>/dev/null` in
5435         x86_64)
5436                 if test -d /lib64
5437                 then
5438
5439 if test -n "/lib64" ; then
5440   for cf_add_libdir in /lib64
5441   do
5442     if test $cf_add_libdir = /usr/lib ; then
5443       :
5444     elif test -d $cf_add_libdir
5445     then
5446       cf_have_libdir=no
5447       if test -n "$LDFLAGS$LIBS" ; then
5448         # a loop is needed to ensure we can add subdirs of existing dirs
5449         for cf_test_libdir in $LDFLAGS $LIBS ; do
5450           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5451             cf_have_libdir=yes; break
5452           fi
5453         done
5454       fi
5455       if test "$cf_have_libdir" = no ; then
5456         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5457
5458 echo "${as_me:-configure}:5458: testing adding $cf_add_libdir to library-path ..." 1>&5
5459
5460         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5461       fi
5462     fi
5463   done
5464 fi
5465
5466                 else
5467
5468 if test -n "/lib" ; then
5469   for cf_add_libdir in /lib
5470   do
5471     if test $cf_add_libdir = /usr/lib ; then
5472       :
5473     elif test -d $cf_add_libdir
5474     then
5475       cf_have_libdir=no
5476       if test -n "$LDFLAGS$LIBS" ; then
5477         # a loop is needed to ensure we can add subdirs of existing dirs
5478         for cf_test_libdir in $LDFLAGS $LIBS ; do
5479           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5480             cf_have_libdir=yes; break
5481           fi
5482         done
5483       fi
5484       if test "$cf_have_libdir" = no ; then
5485         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5486
5487 echo "${as_me:-configure}:5487: testing adding $cf_add_libdir to library-path ..." 1>&5
5488
5489         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5490       fi
5491     fi
5492   done
5493 fi
5494
5495                 fi
5496                 ;;
5497         *)
5498
5499 if test -n "/lib" ; then
5500   for cf_add_libdir in /lib
5501   do
5502     if test $cf_add_libdir = /usr/lib ; then
5503       :
5504     elif test -d $cf_add_libdir
5505     then
5506       cf_have_libdir=no
5507       if test -n "$LDFLAGS$LIBS" ; then
5508         # a loop is needed to ensure we can add subdirs of existing dirs
5509         for cf_test_libdir in $LDFLAGS $LIBS ; do
5510           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5511             cf_have_libdir=yes; break
5512           fi
5513         done
5514       fi
5515       if test "$cf_have_libdir" = no ; then
5516         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5517
5518 echo "${as_me:-configure}:5518: testing adding $cf_add_libdir to library-path ..." 1>&5
5519
5520         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5521       fi
5522     fi
5523   done
5524 fi
5525
5526                 ;;
5527         esac
5528     ;;
5529 sunos3*|sunos4*)
5530         if test "x$cf_cv_screen" = "xcurses_5lib"
5531         then
5532                 if test -d /usr/5lib ; then
5533
5534 if test -n "/usr/5lib" ; then
5535   for cf_add_libdir in /usr/5lib
5536   do
5537     if test $cf_add_libdir = /usr/lib ; then
5538       :
5539     elif test -d $cf_add_libdir
5540     then
5541       cf_have_libdir=no
5542       if test -n "$LDFLAGS$LIBS" ; then
5543         # a loop is needed to ensure we can add subdirs of existing dirs
5544         for cf_test_libdir in $LDFLAGS $LIBS ; do
5545           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5546             cf_have_libdir=yes; break
5547           fi
5548         done
5549       fi
5550       if test "$cf_have_libdir" = no ; then
5551         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5552
5553 echo "${as_me:-configure}:5553: testing adding $cf_add_libdir to library-path ..." 1>&5
5554
5555         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5556       fi
5557     fi
5558   done
5559 fi
5560
5561                         LIBS="-lcurses -ltermcap $LIBS"
5562                 fi
5563     fi
5564     ac_cv_func_initscr=yes
5565     ;;
5566 esac
5567
5568 if test ".$ac_cv_func_initscr" != .yes ; then
5569     cf_save_LIBS="$LIBS"
5570     cf_term_lib=""
5571     cf_curs_lib=""
5572
5573     if test ".${cf_cv_ncurses_version:-no}" != .no
5574     then
5575         cf_check_list="ncurses curses cursesX"
5576     else
5577         cf_check_list="cursesX curses ncurses"
5578     fi
5579
5580     # Check for library containing tgoto.  Do this before curses library
5581     # because it may be needed to link the test-case for initscr.
5582     echo "$as_me:5582: checking for tgoto" >&5
5583 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5584 if test "${ac_cv_func_tgoto+set}" = set; then
5585   echo $ECHO_N "(cached) $ECHO_C" >&6
5586 else
5587   cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5590 /* System header to define __stub macros and hopefully few prototypes,
5591     which can conflict with char tgoto (); below.  */
5592 #include <assert.h>
5593 /* Override any gcc2 internal prototype to avoid an error.  */
5594 #ifdef __cplusplus
5595 extern "C"
5596 #endif
5597 /* We use char because int might match the return type of a gcc2
5598    builtin and then its argument prototype would still apply.  */
5599 char tgoto ();
5600 char (*f) ();
5601
5602 int
5603 main ()
5604 {
5605 /* The GNU C library defines this for functions which it implements
5606     to always fail with ENOSYS.  Some functions are actually named
5607     something starting with __ and the normal name is an alias.  */
5608 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5609 choke me
5610 #else
5611 f = tgoto;
5612 #endif
5613
5614   ;
5615   return 0;
5616 }
5617 _ACEOF
5618 rm -f conftest.$ac_objext conftest$ac_exeext
5619 if { (eval echo "$as_me:5619: \"$ac_link\"") >&5
5620   (eval $ac_link) 2>&5
5621   ac_status=$?
5622   echo "$as_me:5622: \$? = $ac_status" >&5
5623   (exit $ac_status); } &&
5624          { ac_try='test -s conftest$ac_exeext'
5625   { (eval echo "$as_me:5625: \"$ac_try\"") >&5
5626   (eval $ac_try) 2>&5
5627   ac_status=$?
5628   echo "$as_me:5628: \$? = $ac_status" >&5
5629   (exit $ac_status); }; }; then
5630   ac_cv_func_tgoto=yes
5631 else
5632   echo "$as_me: failed program was:" >&5
5633 cat conftest.$ac_ext >&5
5634 ac_cv_func_tgoto=no
5635 fi
5636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5637 fi
5638 echo "$as_me:5638: result: $ac_cv_func_tgoto" >&5
5639 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5640 if test $ac_cv_func_tgoto = yes; then
5641   cf_term_lib=predefined
5642 else
5643
5644         for cf_term_lib in $cf_check_list termcap termlib unknown
5645         do
5646             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5647 echo "$as_me:5647: checking for tgoto in -l$cf_term_lib" >&5
5648 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5649 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5650   echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652   ac_check_lib_save_LIBS=$LIBS
5653 LIBS="-l$cf_term_lib  $LIBS"
5654 cat >conftest.$ac_ext <<_ACEOF
5655 #line 5655 "configure"
5656 #include "confdefs.h"
5657
5658 /* Override any gcc2 internal prototype to avoid an error.  */
5659 #ifdef __cplusplus
5660 extern "C"
5661 #endif
5662 /* We use char because int might match the return type of a gcc2
5663    builtin and then its argument prototype would still apply.  */
5664 char tgoto ();
5665 int
5666 main ()
5667 {
5668 tgoto ();
5669   ;
5670   return 0;
5671 }
5672 _ACEOF
5673 rm -f conftest.$ac_objext conftest$ac_exeext
5674 if { (eval echo "$as_me:5674: \"$ac_link\"") >&5
5675   (eval $ac_link) 2>&5
5676   ac_status=$?
5677   echo "$as_me:5677: \$? = $ac_status" >&5
5678   (exit $ac_status); } &&
5679          { ac_try='test -s conftest$ac_exeext'
5680   { (eval echo "$as_me:5680: \"$ac_try\"") >&5
5681   (eval $ac_try) 2>&5
5682   ac_status=$?
5683   echo "$as_me:5683: \$? = $ac_status" >&5
5684   (exit $ac_status); }; }; then
5685   eval "$as_ac_Lib=yes"
5686 else
5687   echo "$as_me: failed program was:" >&5
5688 cat conftest.$ac_ext >&5
5689 eval "$as_ac_Lib=no"
5690 fi
5691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5692 LIBS=$ac_check_lib_save_LIBS
5693 fi
5694 echo "$as_me:5694: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5695 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5696 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5697   break
5698 fi
5699
5700         done
5701
5702 fi
5703
5704     # Check for library containing initscr
5705     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5706         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5707     do
5708         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5709 echo "$as_me:5709: checking for initscr in -l$cf_curs_lib" >&5
5710 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5711 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5712   echo $ECHO_N "(cached) $ECHO_C" >&6
5713 else
5714   ac_check_lib_save_LIBS=$LIBS
5715 LIBS="-l$cf_curs_lib  $LIBS"
5716 cat >conftest.$ac_ext <<_ACEOF
5717 #line 5717 "configure"
5718 #include "confdefs.h"
5719
5720 /* Override any gcc2 internal prototype to avoid an error.  */
5721 #ifdef __cplusplus
5722 extern "C"
5723 #endif
5724 /* We use char because int might match the return type of a gcc2
5725    builtin and then its argument prototype would still apply.  */
5726 char initscr ();
5727 int
5728 main ()
5729 {
5730 initscr ();
5731   ;
5732   return 0;
5733 }
5734 _ACEOF
5735 rm -f conftest.$ac_objext conftest$ac_exeext
5736 if { (eval echo "$as_me:5736: \"$ac_link\"") >&5
5737   (eval $ac_link) 2>&5
5738   ac_status=$?
5739   echo "$as_me:5739: \$? = $ac_status" >&5
5740   (exit $ac_status); } &&
5741          { ac_try='test -s conftest$ac_exeext'
5742   { (eval echo "$as_me:5742: \"$ac_try\"") >&5
5743   (eval $ac_try) 2>&5
5744   ac_status=$?
5745   echo "$as_me:5745: \$? = $ac_status" >&5
5746   (exit $ac_status); }; }; then
5747   eval "$as_ac_Lib=yes"
5748 else
5749   echo "$as_me: failed program was:" >&5
5750 cat conftest.$ac_ext >&5
5751 eval "$as_ac_Lib=no"
5752 fi
5753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5754 LIBS=$ac_check_lib_save_LIBS
5755 fi
5756 echo "$as_me:5756: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5757 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5758 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5759   break
5760 fi
5761
5762     done
5763     test $cf_curs_lib = unknown && { { echo "$as_me:5763: error: no curses library found" >&5
5764 echo "$as_me: error: no curses library found" >&2;}
5765    { (exit 1); exit 1; }; }
5766
5767     LIBS="-l$cf_curs_lib $cf_save_LIBS"
5768     if test "$cf_term_lib" = unknown ; then
5769         echo "$as_me:5769: checking if we can link with $cf_curs_lib library" >&5
5770 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5771         cat >conftest.$ac_ext <<_ACEOF
5772 #line 5772 "configure"
5773 #include "confdefs.h"
5774 #include <${cf_cv_ncurses_header:-curses.h}>
5775 int
5776 main ()
5777 {
5778 initscr()
5779   ;
5780   return 0;
5781 }
5782 _ACEOF
5783 rm -f conftest.$ac_objext conftest$ac_exeext
5784 if { (eval echo "$as_me:5784: \"$ac_link\"") >&5
5785   (eval $ac_link) 2>&5
5786   ac_status=$?
5787   echo "$as_me:5787: \$? = $ac_status" >&5
5788   (exit $ac_status); } &&
5789          { ac_try='test -s conftest$ac_exeext'
5790   { (eval echo "$as_me:5790: \"$ac_try\"") >&5
5791   (eval $ac_try) 2>&5
5792   ac_status=$?
5793   echo "$as_me:5793: \$? = $ac_status" >&5
5794   (exit $ac_status); }; }; then
5795   cf_result=yes
5796 else
5797   echo "$as_me: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5799 cf_result=no
5800 fi
5801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5802         echo "$as_me:5802: result: $cf_result" >&5
5803 echo "${ECHO_T}$cf_result" >&6
5804         test $cf_result = no && { { echo "$as_me:5804: error: Cannot link curses library" >&5
5805 echo "$as_me: error: Cannot link curses library" >&2;}
5806    { (exit 1); exit 1; }; }
5807     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5808         :
5809     elif test "$cf_term_lib" != predefined ; then
5810         echo "$as_me:5810: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5811 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5812         cat >conftest.$ac_ext <<_ACEOF
5813 #line 5813 "configure"
5814 #include "confdefs.h"
5815 #include <${cf_cv_ncurses_header:-curses.h}>
5816 int
5817 main ()
5818 {
5819 initscr(); tgoto((char *)0, 0, 0);
5820   ;
5821   return 0;
5822 }
5823 _ACEOF
5824 rm -f conftest.$ac_objext conftest$ac_exeext
5825 if { (eval echo "$as_me:5825: \"$ac_link\"") >&5
5826   (eval $ac_link) 2>&5
5827   ac_status=$?
5828   echo "$as_me:5828: \$? = $ac_status" >&5
5829   (exit $ac_status); } &&
5830          { ac_try='test -s conftest$ac_exeext'
5831   { (eval echo "$as_me:5831: \"$ac_try\"") >&5
5832   (eval $ac_try) 2>&5
5833   ac_status=$?
5834   echo "$as_me:5834: \$? = $ac_status" >&5
5835   (exit $ac_status); }; }; then
5836   cf_result=no
5837 else
5838   echo "$as_me: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5840
5841             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5842             cat >conftest.$ac_ext <<_ACEOF
5843 #line 5843 "configure"
5844 #include "confdefs.h"
5845 #include <${cf_cv_ncurses_header:-curses.h}>
5846 int
5847 main ()
5848 {
5849 initscr()
5850   ;
5851   return 0;
5852 }
5853 _ACEOF
5854 rm -f conftest.$ac_objext conftest$ac_exeext
5855 if { (eval echo "$as_me:5855: \"$ac_link\"") >&5
5856   (eval $ac_link) 2>&5
5857   ac_status=$?
5858   echo "$as_me:5858: \$? = $ac_status" >&5
5859   (exit $ac_status); } &&
5860          { ac_try='test -s conftest$ac_exeext'
5861   { (eval echo "$as_me:5861: \"$ac_try\"") >&5
5862   (eval $ac_try) 2>&5
5863   ac_status=$?
5864   echo "$as_me:5864: \$? = $ac_status" >&5
5865   (exit $ac_status); }; }; then
5866   cf_result=yes
5867 else
5868   echo "$as_me: failed program was:" >&5
5869 cat conftest.$ac_ext >&5
5870 cf_result=error
5871 fi
5872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5873
5874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5876         echo "$as_me:5876: result: $cf_result" >&5
5877 echo "${ECHO_T}$cf_result" >&6
5878     fi
5879 fi
5880 fi
5881
5882 echo "$as_me:5882: checking for NetBSD form.h" >&5
5883 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
5884 if test "${cf_cv_netbsd_form_h+set}" = set; then
5885   echo $ECHO_N "(cached) $ECHO_C" >&6
5886 else
5887
5888 cat >conftest.$ac_ext <<_ACEOF
5889 #line 5889 "configure"
5890 #include "confdefs.h"
5891
5892 #include <${cf_cv_ncurses_header:-curses.h}>
5893 #include <form.h>
5894
5895 int
5896 main ()
5897 {
5898
5899         FORM *form;
5900         int y = current_field(form)->cursor_ypos;
5901         int x = current_field(form)->cursor_xpos;
5902
5903   ;
5904   return 0;
5905 }
5906 _ACEOF
5907 rm -f conftest.$ac_objext
5908 if { (eval echo "$as_me:5908: \"$ac_compile\"") >&5
5909   (eval $ac_compile) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); } &&
5913          { ac_try='test -s conftest.$ac_objext'
5914   { (eval echo "$as_me:5914: \"$ac_try\"") >&5
5915   (eval $ac_try) 2>&5
5916   ac_status=$?
5917   echo "$as_me:5917: \$? = $ac_status" >&5
5918   (exit $ac_status); }; }; then
5919   cf_cv_netbsd_form_h=yes
5920
5921 else
5922   echo "$as_me: failed program was:" >&5
5923 cat conftest.$ac_ext >&5
5924 cf_cv_netbsd_form_h=no
5925 fi
5926 rm -f conftest.$ac_objext conftest.$ac_ext
5927
5928 fi
5929 echo "$as_me:5929: result: $cf_cv_netbsd_form_h" >&5
5930 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
5931
5932 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
5933 #define HAVE_NETBSD_FORM_H 1
5934 EOF
5935
5936 echo "$as_me:5936: checking for NetBSD menu.h" >&5
5937 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
5938 if test "${cf_cv_netbsd_menu_h+set}" = set; then
5939   echo $ECHO_N "(cached) $ECHO_C" >&6
5940 else
5941
5942 cat >conftest.$ac_ext <<_ACEOF
5943 #line 5943 "configure"
5944 #include "confdefs.h"
5945
5946 #include <${cf_cv_ncurses_header:-curses.h}>
5947 #include <menu.h>
5948
5949 int
5950 main ()
5951 {
5952
5953         MENU *menu;
5954         int y = menu->max_item_width;
5955
5956   ;
5957   return 0;
5958 }
5959 _ACEOF
5960 rm -f conftest.$ac_objext
5961 if { (eval echo "$as_me:5961: \"$ac_compile\"") >&5
5962   (eval $ac_compile) 2>&5
5963   ac_status=$?
5964   echo "$as_me:5964: \$? = $ac_status" >&5
5965   (exit $ac_status); } &&
5966          { ac_try='test -s conftest.$ac_objext'
5967   { (eval echo "$as_me:5967: \"$ac_try\"") >&5
5968   (eval $ac_try) 2>&5
5969   ac_status=$?
5970   echo "$as_me:5970: \$? = $ac_status" >&5
5971   (exit $ac_status); }; }; then
5972   cf_cv_netbsd_menu_h=yes
5973
5974 else
5975   echo "$as_me: failed program was:" >&5
5976 cat conftest.$ac_ext >&5
5977 cf_cv_netbsd_menu_h=no
5978 fi
5979 rm -f conftest.$ac_objext conftest.$ac_ext
5980
5981 fi
5982 echo "$as_me:5982: result: $cf_cv_netbsd_menu_h" >&5
5983 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
5984
5985 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
5986 #define HAVE_NETBSD_MENU_H 1
5987 EOF
5988
5989         ;;
5990 ncurses)
5991
5992 cf_ncuconfig_root=ncurses
5993
5994 echo "Looking for ${cf_ncuconfig_root}-config"
5995 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5996 do
5997   # Extract the first word of "$ac_prog", so it can be a program name with args.
5998 set dummy $ac_prog; ac_word=$2
5999 echo "$as_me:5999: checking for $ac_word" >&5
6000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6001 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
6002   echo $ECHO_N "(cached) $ECHO_C" >&6
6003 else
6004   case $NCURSES_CONFIG in
6005   [\\/]* | ?:[\\/]*)
6006   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
6007   ;;
6008   *)
6009   ac_save_IFS=$IFS; IFS=$ac_path_separator
6010 ac_dummy="$PATH"
6011 for ac_dir in $ac_dummy; do
6012   IFS=$ac_save_IFS
6013   test -z "$ac_dir" && ac_dir=.
6014   if $as_executable_p "$ac_dir/$ac_word"; then
6015    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
6016    echo "$as_me:6016: found $ac_dir/$ac_word" >&5
6017    break
6018 fi
6019 done
6020
6021   ;;
6022 esac
6023 fi
6024 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
6025
6026 if test -n "$NCURSES_CONFIG"; then
6027   echo "$as_me:6027: result: $NCURSES_CONFIG" >&5
6028 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6029 else
6030   echo "$as_me:6030: result: no" >&5
6031 echo "${ECHO_T}no" >&6
6032 fi
6033
6034   test -n "$NCURSES_CONFIG" && break
6035 done
6036 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
6037
6038 if test "$NCURSES_CONFIG" != none ; then
6039
6040 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6041 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6042
6043 # even with config script, some packages use no-override for curses.h
6044
6045 echo "$as_me:6045: checking if we have identified curses headers" >&5
6046 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6047 if test "${cf_cv_ncurses_header+set}" = set; then
6048   echo $ECHO_N "(cached) $ECHO_C" >&6
6049 else
6050
6051 cf_cv_ncurses_header=none
6052 for cf_header in  \
6053     ncurses/ncurses.h \
6054         ncurses/curses.h \
6055         ncurses.h \
6056         curses.h
6057 do
6058 cat >conftest.$ac_ext <<_ACEOF
6059 #line 6059 "configure"
6060 #include "confdefs.h"
6061 #include <${cf_header}>
6062 int
6063 main ()
6064 {
6065 initscr(); tgoto("?", 0,0)
6066   ;
6067   return 0;
6068 }
6069 _ACEOF
6070 rm -f conftest.$ac_objext
6071 if { (eval echo "$as_me:6071: \"$ac_compile\"") >&5
6072   (eval $ac_compile) 2>&5
6073   ac_status=$?
6074   echo "$as_me:6074: \$? = $ac_status" >&5
6075   (exit $ac_status); } &&
6076          { ac_try='test -s conftest.$ac_objext'
6077   { (eval echo "$as_me:6077: \"$ac_try\"") >&5
6078   (eval $ac_try) 2>&5
6079   ac_status=$?
6080   echo "$as_me:6080: \$? = $ac_status" >&5
6081   (exit $ac_status); }; }; then
6082   cf_cv_ncurses_header=$cf_header; break
6083 else
6084   echo "$as_me: failed program was:" >&5
6085 cat conftest.$ac_ext >&5
6086 fi
6087 rm -f conftest.$ac_objext conftest.$ac_ext
6088 done
6089
6090 fi
6091 echo "$as_me:6091: result: $cf_cv_ncurses_header" >&5
6092 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6093
6094 if test "$cf_cv_ncurses_header" = none ; then
6095         { { echo "$as_me:6095: error: No curses header-files found" >&5
6096 echo "$as_me: error: No curses header-files found" >&2;}
6097    { (exit 1); exit 1; }; }
6098 fi
6099
6100 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6101
6102 for ac_header in $cf_cv_ncurses_header
6103 do
6104 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6105 echo "$as_me:6105: checking for $ac_header" >&5
6106 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6107 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6108   echo $ECHO_N "(cached) $ECHO_C" >&6
6109 else
6110   cat >conftest.$ac_ext <<_ACEOF
6111 #line 6111 "configure"
6112 #include "confdefs.h"
6113 #include <$ac_header>
6114 _ACEOF
6115 if { (eval echo "$as_me:6115: \"$ac_cpp conftest.$ac_ext\"") >&5
6116   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6117   ac_status=$?
6118   egrep -v '^ *\+' conftest.er1 >conftest.err
6119   rm -f conftest.er1
6120   cat conftest.err >&5
6121   echo "$as_me:6121: \$? = $ac_status" >&5
6122   (exit $ac_status); } >/dev/null; then
6123   if test -s conftest.err; then
6124     ac_cpp_err=$ac_c_preproc_warn_flag
6125   else
6126     ac_cpp_err=
6127   fi
6128 else
6129   ac_cpp_err=yes
6130 fi
6131 if test -z "$ac_cpp_err"; then
6132   eval "$as_ac_Header=yes"
6133 else
6134   echo "$as_me: failed program was:" >&5
6135   cat conftest.$ac_ext >&5
6136   eval "$as_ac_Header=no"
6137 fi
6138 rm -f conftest.err conftest.$ac_ext
6139 fi
6140 echo "$as_me:6140: result: `eval echo '${'$as_ac_Header'}'`" >&5
6141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6142 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6143   cat >>confdefs.h <<EOF
6144 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6145 EOF
6146
6147 fi
6148 done
6149
6150 cat >>confdefs.h <<\EOF
6151 #define NCURSES 1
6152 EOF
6153
6154 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6155
6156 cat >>confdefs.h <<EOF
6157 #define $cf_nculib_ROOT 1
6158 EOF
6159
6160 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6161
6162 else
6163
6164 cf_ncuhdr_root=ncurses
6165
6166 test -n "$cf_cv_curses_dir" && \
6167 test "$cf_cv_curses_dir" != "no" && { \
6168
6169 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6170   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6171   do
6172         while test $cf_add_incdir != /usr/include
6173         do
6174           if test -d $cf_add_incdir
6175           then
6176                 cf_have_incdir=no
6177                 if test -n "$CFLAGS$CPPFLAGS" ; then
6178                   # a loop is needed to ensure we can add subdirs of existing dirs
6179                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6180                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6181                           cf_have_incdir=yes; break
6182                         fi
6183                   done
6184                 fi
6185
6186                 if test "$cf_have_incdir" = no ; then
6187                   if test "$cf_add_incdir" = /usr/local/include ; then
6188                         if test "$GCC" = yes
6189                         then
6190                           cf_save_CPPFLAGS=$CPPFLAGS
6191                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6192                           cat >conftest.$ac_ext <<_ACEOF
6193 #line 6193 "configure"
6194 #include "confdefs.h"
6195 #include <stdio.h>
6196 int
6197 main ()
6198 {
6199 printf("Hello")
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 rm -f conftest.$ac_objext
6205 if { (eval echo "$as_me:6205: \"$ac_compile\"") >&5
6206   (eval $ac_compile) 2>&5
6207   ac_status=$?
6208   echo "$as_me:6208: \$? = $ac_status" >&5
6209   (exit $ac_status); } &&
6210          { ac_try='test -s conftest.$ac_objext'
6211   { (eval echo "$as_me:6211: \"$ac_try\"") >&5
6212   (eval $ac_try) 2>&5
6213   ac_status=$?
6214   echo "$as_me:6214: \$? = $ac_status" >&5
6215   (exit $ac_status); }; }; then
6216   :
6217 else
6218   echo "$as_me: failed program was:" >&5
6219 cat conftest.$ac_ext >&5
6220 cf_have_incdir=yes
6221 fi
6222 rm -f conftest.$ac_objext conftest.$ac_ext
6223                           CPPFLAGS=$cf_save_CPPFLAGS
6224                         fi
6225                   fi
6226                 fi
6227
6228                 if test "$cf_have_incdir" = no ; then
6229                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6230
6231 echo "${as_me:-configure}:6231: testing adding $cf_add_incdir to include-path ..." 1>&5
6232
6233                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6234
6235                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6236                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6237                   cf_add_incdir="$cf_top_incdir"
6238                 else
6239                   break
6240                 fi
6241           fi
6242         done
6243   done
6244 fi
6245
6246 }
6247
6248 echo "$as_me:6248: checking for $cf_ncuhdr_root header in include-path" >&5
6249 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6250 if test "${cf_cv_ncurses_h+set}" = set; then
6251   echo $ECHO_N "(cached) $ECHO_C" >&6
6252 else
6253
6254         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6255         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6256         for cf_header in $cf_header_list
6257         do
6258
6259         cat >conftest.$ac_ext <<_ACEOF
6260 #line 6260 "configure"
6261 #include "confdefs.h"
6262
6263 #include <$cf_header>
6264 int
6265 main ()
6266 {
6267
6268 #ifdef NCURSES_VERSION
6269
6270 printf("%s\n", NCURSES_VERSION);
6271 #else
6272 #ifdef __NCURSES_H
6273 printf("old\n");
6274 #else
6275         make an error
6276 #endif
6277 #endif
6278
6279   ;
6280   return 0;
6281 }
6282 _ACEOF
6283 rm -f conftest.$ac_objext
6284 if { (eval echo "$as_me:6284: \"$ac_compile\"") >&5
6285   (eval $ac_compile) 2>&5
6286   ac_status=$?
6287   echo "$as_me:6287: \$? = $ac_status" >&5
6288   (exit $ac_status); } &&
6289          { ac_try='test -s conftest.$ac_objext'
6290   { (eval echo "$as_me:6290: \"$ac_try\"") >&5
6291   (eval $ac_try) 2>&5
6292   ac_status=$?
6293   echo "$as_me:6293: \$? = $ac_status" >&5
6294   (exit $ac_status); }; }; then
6295   cf_cv_ncurses_h=$cf_header
6296
6297 else
6298   echo "$as_me: failed program was:" >&5
6299 cat conftest.$ac_ext >&5
6300 cf_cv_ncurses_h=no
6301 fi
6302 rm -f conftest.$ac_objext conftest.$ac_ext
6303
6304                 test "$cf_cv_ncurses_h" != no && break
6305         done
6306
6307 fi
6308 echo "$as_me:6308: result: $cf_cv_ncurses_h" >&5
6309 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6310
6311 if test "$cf_cv_ncurses_h" != no ; then
6312         cf_cv_ncurses_header=$cf_cv_ncurses_h
6313 else
6314
6315 echo "$as_me:6315: checking for $cf_ncuhdr_root include-path" >&5
6316 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6317 if test "${cf_cv_ncurses_h2+set}" = set; then
6318   echo $ECHO_N "(cached) $ECHO_C" >&6
6319 else
6320
6321         test -n "$verbose" && echo
6322
6323 cf_search=
6324
6325 # collect the current set of include-directories from compiler flags
6326 cf_header_path_list=""
6327 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6328         for cf_header_path in $CPPFLAGS $CFLAGS
6329         do
6330                 case $cf_header_path in #(vi
6331                 -I*)
6332                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6333
6334 test "$cf_header_path" != "NONE" && \
6335 test -d "$cf_header_path" && \
6336  {
6337         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6338         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6339         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6340         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6341         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6342         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"
6343 }
6344
6345                         cf_header_path_list="$cf_header_path_list $cf_search"
6346                         ;;
6347                 esac
6348         done
6349 fi
6350
6351 # add the variations for the package we are looking for
6352
6353 cf_search=
6354
6355 test "/usr" != "$prefix" && \
6356 test -d "/usr" && \
6357 (test $prefix = NONE || test "/usr" != "$prefix") && {
6358         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6359         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6360         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6361         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6362         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6363         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6364 }
6365
6366 test "$prefix" != "NONE" && \
6367 test -d "$prefix" && \
6368  {
6369         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6370         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6371         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6372         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6373         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6374         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6375 }
6376
6377 test "/usr/local" != "$prefix" && \
6378 test -d "/usr/local" && \
6379 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6380         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6381         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6382         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6383         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6384         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6385         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6386 }
6387
6388 test "/opt" != "$prefix" && \
6389 test -d "/opt" && \
6390 (test $prefix = NONE || test "/opt" != "$prefix") && {
6391         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6392         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6393         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6394         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6395         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6396         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6397 }
6398
6399 test "$HOME" != "$prefix" && \
6400 test -d "$HOME" && \
6401 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6402         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6403         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6404         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6405         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6406         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6407         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6408 }
6409
6410 test "$includedir" != NONE && \
6411 test "$includedir" != "/usr/include" && \
6412 test -d "$includedir" && {
6413         test -d $includedir &&    cf_search="$cf_search $includedir"
6414         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6415 }
6416
6417 test "$oldincludedir" != NONE && \
6418 test "$oldincludedir" != "/usr/include" && \
6419 test -d "$oldincludedir" && {
6420         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6421         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6422 }
6423
6424 cf_search="$cf_search $cf_header_path_list"
6425
6426         test -n "$verbose" && echo search path $cf_search
6427         cf_save2_CPPFLAGS="$CPPFLAGS"
6428         for cf_incdir in $cf_search
6429         do
6430
6431 if test -n "$cf_incdir" ; then
6432   for cf_add_incdir in $cf_incdir
6433   do
6434         while test $cf_add_incdir != /usr/include
6435         do
6436           if test -d $cf_add_incdir
6437           then
6438                 cf_have_incdir=no
6439                 if test -n "$CFLAGS$CPPFLAGS" ; then
6440                   # a loop is needed to ensure we can add subdirs of existing dirs
6441                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6442                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6443                           cf_have_incdir=yes; break
6444                         fi
6445                   done
6446                 fi
6447
6448                 if test "$cf_have_incdir" = no ; then
6449                   if test "$cf_add_incdir" = /usr/local/include ; then
6450                         if test "$GCC" = yes
6451                         then
6452                           cf_save_CPPFLAGS=$CPPFLAGS
6453                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6454                           cat >conftest.$ac_ext <<_ACEOF
6455 #line 6455 "configure"
6456 #include "confdefs.h"
6457 #include <stdio.h>
6458 int
6459 main ()
6460 {
6461 printf("Hello")
6462   ;
6463   return 0;
6464 }
6465 _ACEOF
6466 rm -f conftest.$ac_objext
6467 if { (eval echo "$as_me:6467: \"$ac_compile\"") >&5
6468   (eval $ac_compile) 2>&5
6469   ac_status=$?
6470   echo "$as_me:6470: \$? = $ac_status" >&5
6471   (exit $ac_status); } &&
6472          { ac_try='test -s conftest.$ac_objext'
6473   { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474   (eval $ac_try) 2>&5
6475   ac_status=$?
6476   echo "$as_me:6476: \$? = $ac_status" >&5
6477   (exit $ac_status); }; }; then
6478   :
6479 else
6480   echo "$as_me: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 cf_have_incdir=yes
6483 fi
6484 rm -f conftest.$ac_objext conftest.$ac_ext
6485                           CPPFLAGS=$cf_save_CPPFLAGS
6486                         fi
6487                   fi
6488                 fi
6489
6490                 if test "$cf_have_incdir" = no ; then
6491                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6492
6493 echo "${as_me:-configure}:6493: testing adding $cf_add_incdir to include-path ..." 1>&5
6494
6495                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6496
6497                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6498                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6499                   cf_add_incdir="$cf_top_incdir"
6500                 else
6501                   break
6502                 fi
6503           fi
6504         done
6505   done
6506 fi
6507
6508                 for cf_header in \
6509                         ncurses.h \
6510                         curses.h
6511                 do
6512
6513         cat >conftest.$ac_ext <<_ACEOF
6514 #line 6514 "configure"
6515 #include "confdefs.h"
6516
6517 #include <$cf_header>
6518 int
6519 main ()
6520 {
6521
6522 #ifdef NCURSES_VERSION
6523
6524 printf("%s\n", NCURSES_VERSION);
6525 #else
6526 #ifdef __NCURSES_H
6527 printf("old\n");
6528 #else
6529         make an error
6530 #endif
6531 #endif
6532
6533   ;
6534   return 0;
6535 }
6536 _ACEOF
6537 rm -f conftest.$ac_objext
6538 if { (eval echo "$as_me:6538: \"$ac_compile\"") >&5
6539   (eval $ac_compile) 2>&5
6540   ac_status=$?
6541   echo "$as_me:6541: \$? = $ac_status" >&5
6542   (exit $ac_status); } &&
6543          { ac_try='test -s conftest.$ac_objext'
6544   { (eval echo "$as_me:6544: \"$ac_try\"") >&5
6545   (eval $ac_try) 2>&5
6546   ac_status=$?
6547   echo "$as_me:6547: \$? = $ac_status" >&5
6548   (exit $ac_status); }; }; then
6549   cf_cv_ncurses_h2=$cf_header
6550
6551 else
6552   echo "$as_me: failed program was:" >&5
6553 cat conftest.$ac_ext >&5
6554 cf_cv_ncurses_h2=no
6555 fi
6556 rm -f conftest.$ac_objext conftest.$ac_ext
6557
6558                         if test "$cf_cv_ncurses_h2" != no ; then
6559                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6560                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6561                                 break
6562                         fi
6563                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6564                 done
6565                 CPPFLAGS="$cf_save2_CPPFLAGS"
6566                 test "$cf_cv_ncurses_h2" != no && break
6567         done
6568         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6568: error: not found" >&5
6569 echo "$as_me: error: not found" >&2;}
6570    { (exit 1); exit 1; }; }
6571
6572 fi
6573 echo "$as_me:6573: result: $cf_cv_ncurses_h2" >&5
6574 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6575
6576         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6577         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6578         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6579                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6580         fi
6581
6582 if test -n "$cf_1st_incdir" ; then
6583   for cf_add_incdir in $cf_1st_incdir
6584   do
6585         while test $cf_add_incdir != /usr/include
6586         do
6587           if test -d $cf_add_incdir
6588           then
6589                 cf_have_incdir=no
6590                 if test -n "$CFLAGS$CPPFLAGS" ; then
6591                   # a loop is needed to ensure we can add subdirs of existing dirs
6592                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6593                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6594                           cf_have_incdir=yes; break
6595                         fi
6596                   done
6597                 fi
6598
6599                 if test "$cf_have_incdir" = no ; then
6600                   if test "$cf_add_incdir" = /usr/local/include ; then
6601                         if test "$GCC" = yes
6602                         then
6603                           cf_save_CPPFLAGS=$CPPFLAGS
6604                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6605                           cat >conftest.$ac_ext <<_ACEOF
6606 #line 6606 "configure"
6607 #include "confdefs.h"
6608 #include <stdio.h>
6609 int
6610 main ()
6611 {
6612 printf("Hello")
6613   ;
6614   return 0;
6615 }
6616 _ACEOF
6617 rm -f conftest.$ac_objext
6618 if { (eval echo "$as_me:6618: \"$ac_compile\"") >&5
6619   (eval $ac_compile) 2>&5
6620   ac_status=$?
6621   echo "$as_me:6621: \$? = $ac_status" >&5
6622   (exit $ac_status); } &&
6623          { ac_try='test -s conftest.$ac_objext'
6624   { (eval echo "$as_me:6624: \"$ac_try\"") >&5
6625   (eval $ac_try) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit $ac_status); }; }; then
6629   :
6630 else
6631   echo "$as_me: failed program was:" >&5
6632 cat conftest.$ac_ext >&5
6633 cf_have_incdir=yes
6634 fi
6635 rm -f conftest.$ac_objext conftest.$ac_ext
6636                           CPPFLAGS=$cf_save_CPPFLAGS
6637                         fi
6638                   fi
6639                 fi
6640
6641                 if test "$cf_have_incdir" = no ; then
6642                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6643
6644 echo "${as_me:-configure}:6644: testing adding $cf_add_incdir to include-path ..." 1>&5
6645
6646                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6647
6648                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6649                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6650                   cf_add_incdir="$cf_top_incdir"
6651                 else
6652                   break
6653                 fi
6654           fi
6655         done
6656   done
6657 fi
6658
6659 fi
6660
6661 # Set definitions to allow ifdef'ing for ncurses.h
6662
6663 case $cf_cv_ncurses_header in # (vi
6664 *ncurses.h)
6665         cat >>confdefs.h <<\EOF
6666 #define HAVE_NCURSES_H 1
6667 EOF
6668
6669         ;;
6670 esac
6671
6672 case $cf_cv_ncurses_header in # (vi
6673 ncurses/curses.h|ncurses/ncurses.h)
6674         cat >>confdefs.h <<\EOF
6675 #define HAVE_NCURSES_NCURSES_H 1
6676 EOF
6677
6678         ;;
6679 ncursesw/curses.h|ncursesw/ncurses.h)
6680         cat >>confdefs.h <<\EOF
6681 #define HAVE_NCURSESW_NCURSES_H 1
6682 EOF
6683
6684         ;;
6685 esac
6686
6687 echo "$as_me:6687: checking for terminfo header" >&5
6688 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6689 if test "${cf_cv_term_header+set}" = set; then
6690   echo $ECHO_N "(cached) $ECHO_C" >&6
6691 else
6692
6693 case ${cf_cv_ncurses_header} in #(vi
6694 */ncurses.h|*/ncursesw.h) #(vi
6695         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6696         ;;
6697 *)
6698         cf_term_header=term.h
6699         ;;
6700 esac
6701
6702 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6703 do
6704 cat >conftest.$ac_ext <<_ACEOF
6705 #line 6705 "configure"
6706 #include "confdefs.h"
6707 #include <stdio.h>
6708 #include <${cf_cv_ncurses_header:-curses.h}>
6709 #include <$cf_test>
6710
6711 int
6712 main ()
6713 {
6714 int x = auto_left_margin
6715   ;
6716   return 0;
6717 }
6718 _ACEOF
6719 rm -f conftest.$ac_objext
6720 if { (eval echo "$as_me:6720: \"$ac_compile\"") >&5
6721   (eval $ac_compile) 2>&5
6722   ac_status=$?
6723   echo "$as_me:6723: \$? = $ac_status" >&5
6724   (exit $ac_status); } &&
6725          { ac_try='test -s conftest.$ac_objext'
6726   { (eval echo "$as_me:6726: \"$ac_try\"") >&5
6727   (eval $ac_try) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); }; }; then
6731
6732         cf_cv_term_header="$cf_test"
6733 else
6734   echo "$as_me: failed program was:" >&5
6735 cat conftest.$ac_ext >&5
6736
6737         cf_cv_term_header=unknown
6738
6739 fi
6740 rm -f conftest.$ac_objext conftest.$ac_ext
6741         test "$cf_cv_term_header" != unknown && break
6742 done
6743
6744 fi
6745 echo "$as_me:6745: result: $cf_cv_term_header" >&5
6746 echo "${ECHO_T}$cf_cv_term_header" >&6
6747
6748 # Set definitions to allow ifdef'ing to accommodate subdirectories
6749
6750 case $cf_cv_term_header in # (vi
6751 *term.h)
6752         cat >>confdefs.h <<\EOF
6753 #define HAVE_TERM_H 1
6754 EOF
6755
6756         ;;
6757 esac
6758
6759 case $cf_cv_term_header in # (vi
6760 ncurses/term.h) #(vi
6761         cat >>confdefs.h <<\EOF
6762 #define HAVE_NCURSES_TERM_H 1
6763 EOF
6764
6765         ;;
6766 ncursesw/term.h)
6767         cat >>confdefs.h <<\EOF
6768 #define HAVE_NCURSESW_TERM_H 1
6769 EOF
6770
6771         ;;
6772 esac
6773
6774 # some applications need this, but should check for NCURSES_VERSION
6775 cat >>confdefs.h <<\EOF
6776 #define NCURSES 1
6777 EOF
6778
6779 echo "$as_me:6779: checking for ncurses version" >&5
6780 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6781 if test "${cf_cv_ncurses_version+set}" = set; then
6782   echo $ECHO_N "(cached) $ECHO_C" >&6
6783 else
6784
6785         cf_cv_ncurses_version=no
6786         cf_tempfile=out$$
6787         rm -f $cf_tempfile
6788         if test "$cross_compiling" = yes; then
6789
6790         # This will not work if the preprocessor splits the line after the
6791         # Autoconf token.  The 'unproto' program does that.
6792         cat > conftest.$ac_ext <<EOF
6793 #include <${cf_cv_ncurses_header:-curses.h}>
6794 #undef Autoconf
6795 #ifdef NCURSES_VERSION
6796 Autoconf NCURSES_VERSION
6797 #else
6798 #ifdef __NCURSES_H
6799 Autoconf "old"
6800 #endif
6801 ;
6802 #endif
6803 EOF
6804         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6805         { (eval echo "$as_me:6805: \"$cf_try\"") >&5
6806   (eval $cf_try) 2>&5
6807   ac_status=$?
6808   echo "$as_me:6808: \$? = $ac_status" >&5
6809   (exit $ac_status); }
6810         if test -f conftest.out ; then
6811                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6812                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6813                 rm -f conftest.out
6814         fi
6815
6816 else
6817   cat >conftest.$ac_ext <<_ACEOF
6818 #line 6818 "configure"
6819 #include "confdefs.h"
6820
6821 #include <${cf_cv_ncurses_header:-curses.h}>
6822 #include <stdio.h>
6823 int main()
6824 {
6825         FILE *fp = fopen("$cf_tempfile", "w");
6826 #ifdef NCURSES_VERSION
6827 # ifdef NCURSES_VERSION_PATCH
6828         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6829 # else
6830         fprintf(fp, "%s\n", NCURSES_VERSION);
6831 # endif
6832 #else
6833 # ifdef __NCURSES_H
6834         fprintf(fp, "old\n");
6835 # else
6836         make an error
6837 # endif
6838 #endif
6839         ${cf_cv_main_return:-return}(0);
6840 }
6841 _ACEOF
6842 rm -f conftest$ac_exeext
6843 if { (eval echo "$as_me:6843: \"$ac_link\"") >&5
6844   (eval $ac_link) 2>&5
6845   ac_status=$?
6846   echo "$as_me:6846: \$? = $ac_status" >&5
6847   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6848   { (eval echo "$as_me:6848: \"$ac_try\"") >&5
6849   (eval $ac_try) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); }; }; then
6853
6854         cf_cv_ncurses_version=`cat $cf_tempfile`
6855 else
6856   echo "$as_me: program exited with status $ac_status" >&5
6857 echo "$as_me: failed program was:" >&5
6858 cat conftest.$ac_ext >&5
6859 fi
6860 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6861 fi
6862         rm -f $cf_tempfile
6863
6864 fi
6865 echo "$as_me:6865: result: $cf_cv_ncurses_version" >&5
6866 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6867 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6868 #define NCURSES 1
6869 EOF
6870
6871 cf_nculib_root=ncurses
6872         # This works, except for the special case where we find gpm, but
6873         # ncurses is in a nonstandard location via $LIBS, and we really want
6874         # to link gpm.
6875 cf_ncurses_LIBS=""
6876 cf_ncurses_SAVE="$LIBS"
6877 echo "$as_me:6877: checking for Gpm_Open in -lgpm" >&5
6878 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6879 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6880   echo $ECHO_N "(cached) $ECHO_C" >&6
6881 else
6882   ac_check_lib_save_LIBS=$LIBS
6883 LIBS="-lgpm  $LIBS"
6884 cat >conftest.$ac_ext <<_ACEOF
6885 #line 6885 "configure"
6886 #include "confdefs.h"
6887
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 #ifdef __cplusplus
6890 extern "C"
6891 #endif
6892 /* We use char because int might match the return type of a gcc2
6893    builtin and then its argument prototype would still apply.  */
6894 char Gpm_Open ();
6895 int
6896 main ()
6897 {
6898 Gpm_Open ();
6899   ;
6900   return 0;
6901 }
6902 _ACEOF
6903 rm -f conftest.$ac_objext conftest$ac_exeext
6904 if { (eval echo "$as_me:6904: \"$ac_link\"") >&5
6905   (eval $ac_link) 2>&5
6906   ac_status=$?
6907   echo "$as_me:6907: \$? = $ac_status" >&5
6908   (exit $ac_status); } &&
6909          { ac_try='test -s conftest$ac_exeext'
6910   { (eval echo "$as_me:6910: \"$ac_try\"") >&5
6911   (eval $ac_try) 2>&5
6912   ac_status=$?
6913   echo "$as_me:6913: \$? = $ac_status" >&5
6914   (exit $ac_status); }; }; then
6915   ac_cv_lib_gpm_Gpm_Open=yes
6916 else
6917   echo "$as_me: failed program was:" >&5
6918 cat conftest.$ac_ext >&5
6919 ac_cv_lib_gpm_Gpm_Open=no
6920 fi
6921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6922 LIBS=$ac_check_lib_save_LIBS
6923 fi
6924 echo "$as_me:6924: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6925 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6926 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6927   echo "$as_me:6927: checking for initscr in -lgpm" >&5
6928 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6929 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6930   echo $ECHO_N "(cached) $ECHO_C" >&6
6931 else
6932   ac_check_lib_save_LIBS=$LIBS
6933 LIBS="-lgpm  $LIBS"
6934 cat >conftest.$ac_ext <<_ACEOF
6935 #line 6935 "configure"
6936 #include "confdefs.h"
6937
6938 /* Override any gcc2 internal prototype to avoid an error.  */
6939 #ifdef __cplusplus
6940 extern "C"
6941 #endif
6942 /* We use char because int might match the return type of a gcc2
6943    builtin and then its argument prototype would still apply.  */
6944 char initscr ();
6945 int
6946 main ()
6947 {
6948 initscr ();
6949   ;
6950   return 0;
6951 }
6952 _ACEOF
6953 rm -f conftest.$ac_objext conftest$ac_exeext
6954 if { (eval echo "$as_me:6954: \"$ac_link\"") >&5
6955   (eval $ac_link) 2>&5
6956   ac_status=$?
6957   echo "$as_me:6957: \$? = $ac_status" >&5
6958   (exit $ac_status); } &&
6959          { ac_try='test -s conftest$ac_exeext'
6960   { (eval echo "$as_me:6960: \"$ac_try\"") >&5
6961   (eval $ac_try) 2>&5
6962   ac_status=$?
6963   echo "$as_me:6963: \$? = $ac_status" >&5
6964   (exit $ac_status); }; }; then
6965   ac_cv_lib_gpm_initscr=yes
6966 else
6967   echo "$as_me: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6969 ac_cv_lib_gpm_initscr=no
6970 fi
6971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6972 LIBS=$ac_check_lib_save_LIBS
6973 fi
6974 echo "$as_me:6974: result: $ac_cv_lib_gpm_initscr" >&5
6975 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6976 if test $ac_cv_lib_gpm_initscr = yes; then
6977   LIBS="$cf_ncurses_SAVE"
6978 else
6979   cf_ncurses_LIBS="-lgpm"
6980 fi
6981
6982 fi
6983
6984 case $host_os in #(vi
6985 freebsd*)
6986         # This is only necessary if you are linking against an obsolete
6987         # version of ncurses (but it should do no harm, since it's static).
6988         if test "$cf_nculib_root" = ncurses ; then
6989                 echo "$as_me:6989: checking for tgoto in -lmytinfo" >&5
6990 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6991 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6992   echo $ECHO_N "(cached) $ECHO_C" >&6
6993 else
6994   ac_check_lib_save_LIBS=$LIBS
6995 LIBS="-lmytinfo  $LIBS"
6996 cat >conftest.$ac_ext <<_ACEOF
6997 #line 6997 "configure"
6998 #include "confdefs.h"
6999
7000 /* Override any gcc2 internal prototype to avoid an error.  */
7001 #ifdef __cplusplus
7002 extern "C"
7003 #endif
7004 /* We use char because int might match the return type of a gcc2
7005    builtin and then its argument prototype would still apply.  */
7006 char tgoto ();
7007 int
7008 main ()
7009 {
7010 tgoto ();
7011   ;
7012   return 0;
7013 }
7014 _ACEOF
7015 rm -f conftest.$ac_objext conftest$ac_exeext
7016 if { (eval echo "$as_me:7016: \"$ac_link\"") >&5
7017   (eval $ac_link) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); } &&
7021          { ac_try='test -s conftest$ac_exeext'
7022   { (eval echo "$as_me:7022: \"$ac_try\"") >&5
7023   (eval $ac_try) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); }; }; then
7027   ac_cv_lib_mytinfo_tgoto=yes
7028 else
7029   echo "$as_me: failed program was:" >&5
7030 cat conftest.$ac_ext >&5
7031 ac_cv_lib_mytinfo_tgoto=no
7032 fi
7033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7034 LIBS=$ac_check_lib_save_LIBS
7035 fi
7036 echo "$as_me:7036: result: $ac_cv_lib_mytinfo_tgoto" >&5
7037 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7038 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7039   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7040 fi
7041
7042         fi
7043         ;;
7044 esac
7045
7046 LIBS="$cf_ncurses_LIBS $LIBS"
7047
7048 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7049 then
7050         LIBS="-l$cf_nculib_root $LIBS"
7051 else
7052
7053         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7054         cf_libdir=""
7055         echo "$as_me:7055: checking for initscr" >&5
7056 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7057 if test "${ac_cv_func_initscr+set}" = set; then
7058   echo $ECHO_N "(cached) $ECHO_C" >&6
7059 else
7060   cat >conftest.$ac_ext <<_ACEOF
7061 #line 7061 "configure"
7062 #include "confdefs.h"
7063 /* System header to define __stub macros and hopefully few prototypes,
7064     which can conflict with char initscr (); below.  */
7065 #include <assert.h>
7066 /* Override any gcc2 internal prototype to avoid an error.  */
7067 #ifdef __cplusplus
7068 extern "C"
7069 #endif
7070 /* We use char because int might match the return type of a gcc2
7071    builtin and then its argument prototype would still apply.  */
7072 char initscr ();
7073 char (*f) ();
7074
7075 int
7076 main ()
7077 {
7078 /* The GNU C library defines this for functions which it implements
7079     to always fail with ENOSYS.  Some functions are actually named
7080     something starting with __ and the normal name is an alias.  */
7081 #if defined (__stub_initscr) || defined (__stub___initscr)
7082 choke me
7083 #else
7084 f = initscr;
7085 #endif
7086
7087   ;
7088   return 0;
7089 }
7090 _ACEOF
7091 rm -f conftest.$ac_objext conftest$ac_exeext
7092 if { (eval echo "$as_me:7092: \"$ac_link\"") >&5
7093   (eval $ac_link) 2>&5
7094   ac_status=$?
7095   echo "$as_me:7095: \$? = $ac_status" >&5
7096   (exit $ac_status); } &&
7097          { ac_try='test -s conftest$ac_exeext'
7098   { (eval echo "$as_me:7098: \"$ac_try\"") >&5
7099   (eval $ac_try) 2>&5
7100   ac_status=$?
7101   echo "$as_me:7101: \$? = $ac_status" >&5
7102   (exit $ac_status); }; }; then
7103   ac_cv_func_initscr=yes
7104 else
7105   echo "$as_me: failed program was:" >&5
7106 cat conftest.$ac_ext >&5
7107 ac_cv_func_initscr=no
7108 fi
7109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7110 fi
7111 echo "$as_me:7111: result: $ac_cv_func_initscr" >&5
7112 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7113 if test $ac_cv_func_initscr = yes; then
7114   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7115 else
7116
7117                 cf_save_LIBS="$LIBS"
7118                 echo "$as_me:7118: checking for initscr in -l$cf_nculib_root" >&5
7119 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7120                 LIBS="-l$cf_nculib_root $LIBS"
7121                 cat >conftest.$ac_ext <<_ACEOF
7122 #line 7122 "configure"
7123 #include "confdefs.h"
7124 #include <${cf_cv_ncurses_header:-curses.h}>
7125 int
7126 main ()
7127 {
7128 initscr()
7129   ;
7130   return 0;
7131 }
7132 _ACEOF
7133 rm -f conftest.$ac_objext conftest$ac_exeext
7134 if { (eval echo "$as_me:7134: \"$ac_link\"") >&5
7135   (eval $ac_link) 2>&5
7136   ac_status=$?
7137   echo "$as_me:7137: \$? = $ac_status" >&5
7138   (exit $ac_status); } &&
7139          { ac_try='test -s conftest$ac_exeext'
7140   { (eval echo "$as_me:7140: \"$ac_try\"") >&5
7141   (eval $ac_try) 2>&5
7142   ac_status=$?
7143   echo "$as_me:7143: \$? = $ac_status" >&5
7144   (exit $ac_status); }; }; then
7145   echo "$as_me:7145: result: yes" >&5
7146 echo "${ECHO_T}yes" >&6
7147                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7148
7149 else
7150   echo "$as_me: failed program was:" >&5
7151 cat conftest.$ac_ext >&5
7152 echo "$as_me:7152: result: no" >&5
7153 echo "${ECHO_T}no" >&6
7154
7155 cf_search=
7156 cf_library_path_list=""
7157 if test -n "${LDFLAGS}${LIBS}" ; then
7158         for cf_library_path in $LDFLAGS $LIBS
7159         do
7160                 case $cf_library_path in #(vi
7161                 -L*)
7162                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7163
7164 test "$cf_library_path" != "NONE" && \
7165 test -d "$cf_library_path" && \
7166  {
7167         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7168         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7169         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7170         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7171         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7172         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"
7173 }
7174
7175                         cf_library_path_list="$cf_library_path_list $cf_search"
7176                         ;;
7177                 esac
7178         done
7179 fi
7180
7181 cf_search=
7182
7183 test "/usr" != "$prefix" && \
7184 test -d "/usr" && \
7185 (test $prefix = NONE || test "/usr" != "$prefix") && {
7186         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7187         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7188         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7189         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7190         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7191         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7192 }
7193
7194 test "$prefix" != "NONE" && \
7195 test -d "$prefix" && \
7196  {
7197         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7198         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7199         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7200         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7201         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7202         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7203 }
7204
7205 test "/usr/local" != "$prefix" && \
7206 test -d "/usr/local" && \
7207 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7208         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7209         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7210         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7211         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7212         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7213         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7214 }
7215
7216 test "/opt" != "$prefix" && \
7217 test -d "/opt" && \
7218 (test $prefix = NONE || test "/opt" != "$prefix") && {
7219         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7220         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7221         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7222         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7223         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7224         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7225 }
7226
7227 test "$HOME" != "$prefix" && \
7228 test -d "$HOME" && \
7229 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7230         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7231         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7232         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7233         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7234         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7235         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7236 }
7237
7238 cf_search="$cf_library_path_list $cf_search"
7239
7240                         for cf_libdir in $cf_search
7241                         do
7242                                 echo "$as_me:7242: checking for -l$cf_nculib_root in $cf_libdir" >&5
7243 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7244                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7245                                 cat >conftest.$ac_ext <<_ACEOF
7246 #line 7246 "configure"
7247 #include "confdefs.h"
7248 #include <${cf_cv_ncurses_header:-curses.h}>
7249 int
7250 main ()
7251 {
7252 initscr()
7253   ;
7254   return 0;
7255 }
7256 _ACEOF
7257 rm -f conftest.$ac_objext conftest$ac_exeext
7258 if { (eval echo "$as_me:7258: \"$ac_link\"") >&5
7259   (eval $ac_link) 2>&5
7260   ac_status=$?
7261   echo "$as_me:7261: \$? = $ac_status" >&5
7262   (exit $ac_status); } &&
7263          { ac_try='test -s conftest$ac_exeext'
7264   { (eval echo "$as_me:7264: \"$ac_try\"") >&5
7265   (eval $ac_try) 2>&5
7266   ac_status=$?
7267   echo "$as_me:7267: \$? = $ac_status" >&5
7268   (exit $ac_status); }; }; then
7269   echo "$as_me:7269: result: yes" >&5
7270 echo "${ECHO_T}yes" >&6
7271                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7272                                          break
7273 else
7274   echo "$as_me: failed program was:" >&5
7275 cat conftest.$ac_ext >&5
7276 echo "$as_me:7276: result: no" >&5
7277 echo "${ECHO_T}no" >&6
7278                                          LIBS="$cf_save_LIBS"
7279 fi
7280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7281                         done
7282
7283 fi
7284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7285
7286 fi
7287
7288 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7289
7290 if test $cf_found_library = no ; then
7291         { { echo "$as_me:7291: error: Cannot link $cf_nculib_root library" >&5
7292 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7293    { (exit 1); exit 1; }; }
7294 fi
7295
7296 fi
7297
7298 if test -n "$cf_ncurses_LIBS" ; then
7299         echo "$as_me:7299: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7300 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7301         cf_ncurses_SAVE="$LIBS"
7302         for p in $cf_ncurses_LIBS ; do
7303                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7304                 if test "$q" != "$LIBS" ; then
7305                         LIBS="$q"
7306                 fi
7307         done
7308         cat >conftest.$ac_ext <<_ACEOF
7309 #line 7309 "configure"
7310 #include "confdefs.h"
7311 #include <${cf_cv_ncurses_header:-curses.h}>
7312 int
7313 main ()
7314 {
7315 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7316   ;
7317   return 0;
7318 }
7319 _ACEOF
7320 rm -f conftest.$ac_objext conftest$ac_exeext
7321 if { (eval echo "$as_me:7321: \"$ac_link\"") >&5
7322   (eval $ac_link) 2>&5
7323   ac_status=$?
7324   echo "$as_me:7324: \$? = $ac_status" >&5
7325   (exit $ac_status); } &&
7326          { ac_try='test -s conftest$ac_exeext'
7327   { (eval echo "$as_me:7327: \"$ac_try\"") >&5
7328   (eval $ac_try) 2>&5
7329   ac_status=$?
7330   echo "$as_me:7330: \$? = $ac_status" >&5
7331   (exit $ac_status); }; }; then
7332   echo "$as_me:7332: result: yes" >&5
7333 echo "${ECHO_T}yes" >&6
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 cat conftest.$ac_ext >&5
7337 echo "$as_me:7337: result: no" >&5
7338 echo "${ECHO_T}no" >&6
7339                  LIBS="$cf_ncurses_SAVE"
7340 fi
7341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7342 fi
7343
7344 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7345
7346 cat >>confdefs.h <<EOF
7347 #define $cf_nculib_ROOT 1
7348 EOF
7349
7350 fi
7351
7352         ;;
7353 ncursesw)
7354         cf_cv_libtype=w
7355
7356 echo "$as_me:7356: checking for multibyte character support" >&5
7357 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7358 if test "${cf_cv_utf8_lib+set}" = set; then
7359   echo $ECHO_N "(cached) $ECHO_C" >&6
7360 else
7361
7362         cf_save_LIBS="$LIBS"
7363         cat >conftest.$ac_ext <<_ACEOF
7364 #line 7364 "configure"
7365 #include "confdefs.h"
7366
7367 #include <stdlib.h>
7368 int
7369 main ()
7370 {
7371 putwc(0,0);
7372   ;
7373   return 0;
7374 }
7375 _ACEOF
7376 rm -f conftest.$ac_objext conftest$ac_exeext
7377 if { (eval echo "$as_me:7377: \"$ac_link\"") >&5
7378   (eval $ac_link) 2>&5
7379   ac_status=$?
7380   echo "$as_me:7380: \$? = $ac_status" >&5
7381   (exit $ac_status); } &&
7382          { ac_try='test -s conftest$ac_exeext'
7383   { (eval echo "$as_me:7383: \"$ac_try\"") >&5
7384   (eval $ac_try) 2>&5
7385   ac_status=$?
7386   echo "$as_me:7386: \$? = $ac_status" >&5
7387   (exit $ac_status); }; }; then
7388   cf_cv_utf8_lib=yes
7389 else
7390   echo "$as_me: failed program was:" >&5
7391 cat conftest.$ac_ext >&5
7392
7393 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7394 # will be set on completion of the AC_TRY_LINK below.
7395 cf_cv_header_path_utf8=
7396 cf_cv_library_path_utf8=
7397
7398 echo "${as_me:-configure}:7398: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7399
7400 cf_save_LIBS="$LIBS"
7401
7402 cat >conftest.$ac_ext <<_ACEOF
7403 #line 7403 "configure"
7404 #include "confdefs.h"
7405
7406 #include <libutf8.h>
7407 int
7408 main ()
7409 {
7410 putwc(0,0);
7411   ;
7412   return 0;
7413 }
7414 _ACEOF
7415 rm -f conftest.$ac_objext conftest$ac_exeext
7416 if { (eval echo "$as_me:7416: \"$ac_link\"") >&5
7417   (eval $ac_link) 2>&5
7418   ac_status=$?
7419   echo "$as_me:7419: \$? = $ac_status" >&5
7420   (exit $ac_status); } &&
7421          { ac_try='test -s conftest$ac_exeext'
7422   { (eval echo "$as_me:7422: \"$ac_try\"") >&5
7423   (eval $ac_try) 2>&5
7424   ac_status=$?
7425   echo "$as_me:7425: \$? = $ac_status" >&5
7426   (exit $ac_status); }; }; then
7427
7428         cf_cv_find_linkage_utf8=yes
7429         cf_cv_header_path_utf8=/usr/include
7430         cf_cv_library_path_utf8=/usr/lib
7431
7432 else
7433   echo "$as_me: failed program was:" >&5
7434 cat conftest.$ac_ext >&5
7435
7436 LIBS="-lutf8  $cf_save_LIBS"
7437
7438 cat >conftest.$ac_ext <<_ACEOF
7439 #line 7439 "configure"
7440 #include "confdefs.h"
7441
7442 #include <libutf8.h>
7443 int
7444 main ()
7445 {
7446 putwc(0,0);
7447   ;
7448   return 0;
7449 }
7450 _ACEOF
7451 rm -f conftest.$ac_objext conftest$ac_exeext
7452 if { (eval echo "$as_me:7452: \"$ac_link\"") >&5
7453   (eval $ac_link) 2>&5
7454   ac_status=$?
7455   echo "$as_me:7455: \$? = $ac_status" >&5
7456   (exit $ac_status); } &&
7457          { ac_try='test -s conftest$ac_exeext'
7458   { (eval echo "$as_me:7458: \"$ac_try\"") >&5
7459   (eval $ac_try) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit $ac_status); }; }; then
7463
7464         cf_cv_find_linkage_utf8=yes
7465         cf_cv_header_path_utf8=/usr/include
7466         cf_cv_library_path_utf8=/usr/lib
7467         cf_cv_library_file_utf8="-lutf8"
7468
7469 else
7470   echo "$as_me: failed program was:" >&5
7471 cat conftest.$ac_ext >&5
7472
7473         cf_cv_find_linkage_utf8=no
7474         LIBS="$cf_save_LIBS"
7475
7476     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7477
7478 echo "${as_me:-configure}:7478: testing find linkage for utf8 library ..." 1>&5
7479
7480 echo "${as_me:-configure}:7480: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7481
7482     cf_save_CPPFLAGS="$CPPFLAGS"
7483     cf_test_CPPFLAGS="$CPPFLAGS"
7484
7485 cf_search=
7486
7487 # collect the current set of include-directories from compiler flags
7488 cf_header_path_list=""
7489 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7490         for cf_header_path in $CPPFLAGS $CFLAGS
7491         do
7492                 case $cf_header_path in #(vi
7493                 -I*)
7494                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7495
7496 test "$cf_header_path" != "NONE" && \
7497 test -d "$cf_header_path" && \
7498  {
7499         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7500         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7501         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7502         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7503         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7504         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7505 }
7506
7507                         cf_header_path_list="$cf_header_path_list $cf_search"
7508                         ;;
7509                 esac
7510         done
7511 fi
7512
7513 # add the variations for the package we are looking for
7514
7515 cf_search=
7516
7517 test "/usr" != "$prefix" && \
7518 test -d "/usr" && \
7519 (test $prefix = NONE || test "/usr" != "$prefix") && {
7520         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7521         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7522         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7523         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7524         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7525         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7526 }
7527
7528 test "$prefix" != "NONE" && \
7529 test -d "$prefix" && \
7530  {
7531         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7532         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7533         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7534         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7535         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7536         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7537 }
7538
7539 test "/usr/local" != "$prefix" && \
7540 test -d "/usr/local" && \
7541 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7542         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7543         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7544         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7545         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7546         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7547         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7548 }
7549
7550 test "/opt" != "$prefix" && \
7551 test -d "/opt" && \
7552 (test $prefix = NONE || test "/opt" != "$prefix") && {
7553         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7554         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7555         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7556         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7557         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7558         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7559 }
7560
7561 test "$HOME" != "$prefix" && \
7562 test -d "$HOME" && \
7563 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7564         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7565         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7566         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7567         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7568         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7569         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7570 }
7571
7572 test "$includedir" != NONE && \
7573 test "$includedir" != "/usr/include" && \
7574 test -d "$includedir" && {
7575         test -d $includedir &&    cf_search="$cf_search $includedir"
7576         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7577 }
7578
7579 test "$oldincludedir" != NONE && \
7580 test "$oldincludedir" != "/usr/include" && \
7581 test -d "$oldincludedir" && {
7582         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7583         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7584 }
7585
7586 cf_search="$cf_search $cf_header_path_list"
7587
7588     for cf_cv_header_path_utf8 in $cf_search
7589     do
7590       if test -d $cf_cv_header_path_utf8 ; then
7591         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7592
7593 echo "${as_me:-configure}:7593: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7594
7595         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7596         cat >conftest.$ac_ext <<_ACEOF
7597 #line 7597 "configure"
7598 #include "confdefs.h"
7599
7600 #include <libutf8.h>
7601 int
7602 main ()
7603 {
7604 putwc(0,0);
7605   ;
7606   return 0;
7607 }
7608 _ACEOF
7609 rm -f conftest.$ac_objext
7610 if { (eval echo "$as_me:7610: \"$ac_compile\"") >&5
7611   (eval $ac_compile) 2>&5
7612   ac_status=$?
7613   echo "$as_me:7613: \$? = $ac_status" >&5
7614   (exit $ac_status); } &&
7615          { ac_try='test -s conftest.$ac_objext'
7616   { (eval echo "$as_me:7616: \"$ac_try\"") >&5
7617   (eval $ac_try) 2>&5
7618   ac_status=$?
7619   echo "$as_me:7619: \$? = $ac_status" >&5
7620   (exit $ac_status); }; }; then
7621
7622             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7623
7624 echo "${as_me:-configure}:7624: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7625
7626             cf_cv_find_linkage_utf8=maybe
7627             cf_test_CPPFLAGS="$CPPFLAGS"
7628             break
7629 else
7630   echo "$as_me: failed program was:" >&5
7631 cat conftest.$ac_ext >&5
7632
7633             CPPFLAGS="$cf_save_CPPFLAGS"
7634
7635 fi
7636 rm -f conftest.$ac_objext conftest.$ac_ext
7637       fi
7638     done
7639
7640     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7641
7642 echo "${as_me:-configure}:7642: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7643
7644       cf_save_LIBS="$LIBS"
7645       cf_save_LDFLAGS="$LDFLAGS"
7646
7647       if test "$cf_cv_find_linkage_utf8" != yes ; then
7648
7649 cf_search=
7650 cf_library_path_list=""
7651 if test -n "${LDFLAGS}${LIBS}" ; then
7652         for cf_library_path in $LDFLAGS $LIBS
7653         do
7654                 case $cf_library_path in #(vi
7655                 -L*)
7656                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7657
7658 test "$cf_library_path" != "NONE" && \
7659 test -d "$cf_library_path" && \
7660  {
7661         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7662         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7663         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7664         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7665         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7666         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7667 }
7668
7669                         cf_library_path_list="$cf_library_path_list $cf_search"
7670                         ;;
7671                 esac
7672         done
7673 fi
7674
7675 cf_search=
7676
7677 test "/usr" != "$prefix" && \
7678 test -d "/usr" && \
7679 (test $prefix = NONE || test "/usr" != "$prefix") && {
7680         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7681         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7682         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7683         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7684         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7685         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7686 }
7687
7688 test "$prefix" != "NONE" && \
7689 test -d "$prefix" && \
7690  {
7691         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7692         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7693         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7694         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7695         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7696         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7697 }
7698
7699 test "/usr/local" != "$prefix" && \
7700 test -d "/usr/local" && \
7701 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7702         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7703         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7704         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7705         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7706         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7707         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7708 }
7709
7710 test "/opt" != "$prefix" && \
7711 test -d "/opt" && \
7712 (test $prefix = NONE || test "/opt" != "$prefix") && {
7713         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7714         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7715         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7716         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7717         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7718         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7719 }
7720
7721 test "$HOME" != "$prefix" && \
7722 test -d "$HOME" && \
7723 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7724         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7725         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7726         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7727         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7728         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7729         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7730 }
7731
7732 cf_search="$cf_library_path_list $cf_search"
7733
7734         for cf_cv_library_path_utf8 in $cf_search
7735         do
7736           if test -d $cf_cv_library_path_utf8 ; then
7737             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7738
7739 echo "${as_me:-configure}:7739: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7740
7741             CPPFLAGS="$cf_test_CPPFLAGS"
7742             LIBS="-lutf8  $cf_save_LIBS"
7743             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7744             cat >conftest.$ac_ext <<_ACEOF
7745 #line 7745 "configure"
7746 #include "confdefs.h"
7747
7748 #include <libutf8.h>
7749 int
7750 main ()
7751 {
7752 putwc(0,0);
7753   ;
7754   return 0;
7755 }
7756 _ACEOF
7757 rm -f conftest.$ac_objext conftest$ac_exeext
7758 if { (eval echo "$as_me:7758: \"$ac_link\"") >&5
7759   (eval $ac_link) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); } &&
7763          { ac_try='test -s conftest$ac_exeext'
7764   { (eval echo "$as_me:7764: \"$ac_try\"") >&5
7765   (eval $ac_try) 2>&5
7766   ac_status=$?
7767   echo "$as_me:7767: \$? = $ac_status" >&5
7768   (exit $ac_status); }; }; then
7769
7770                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7771
7772 echo "${as_me:-configure}:7772: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7773
7774                 cf_cv_find_linkage_utf8=yes
7775                 cf_cv_library_file_utf8="-lutf8"
7776                 break
7777 else
7778   echo "$as_me: failed program was:" >&5
7779 cat conftest.$ac_ext >&5
7780
7781                 CPPFLAGS="$cf_save_CPPFLAGS"
7782                 LIBS="$cf_save_LIBS"
7783                 LDFLAGS="$cf_save_LDFLAGS"
7784
7785 fi
7786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7787           fi
7788         done
7789         CPPFLAGS="$cf_save_CPPFLAGS"
7790         LDFLAGS="$cf_save_LDFLAGS"
7791       fi
7792
7793     else
7794       cf_cv_find_linkage_utf8=no
7795     fi
7796
7797 fi
7798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7799
7800 fi
7801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7802
7803 LIBS="$cf_save_LIBS"
7804
7805 if test "$cf_cv_find_linkage_utf8" = yes ; then
7806 cf_cv_utf8_lib=add-on
7807 else
7808 cf_cv_utf8_lib=no
7809 fi
7810
7811 fi
7812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7813 fi
7814 echo "$as_me:7814: result: $cf_cv_utf8_lib" >&5
7815 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7816
7817 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7818 # ncurses/ncursesw:
7819 if test "$cf_cv_utf8_lib" = "add-on" ; then
7820         cat >>confdefs.h <<\EOF
7821 #define HAVE_LIBUTF8_H 1
7822 EOF
7823
7824 if test -n "$cf_cv_header_path_utf8" ; then
7825   for cf_add_incdir in $cf_cv_header_path_utf8
7826   do
7827         while test $cf_add_incdir != /usr/include
7828         do
7829           if test -d $cf_add_incdir
7830           then
7831                 cf_have_incdir=no
7832                 if test -n "$CFLAGS$CPPFLAGS" ; then
7833                   # a loop is needed to ensure we can add subdirs of existing dirs
7834                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7835                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7836                           cf_have_incdir=yes; break
7837                         fi
7838                   done
7839                 fi
7840
7841                 if test "$cf_have_incdir" = no ; then
7842                   if test "$cf_add_incdir" = /usr/local/include ; then
7843                         if test "$GCC" = yes
7844                         then
7845                           cf_save_CPPFLAGS=$CPPFLAGS
7846                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7847                           cat >conftest.$ac_ext <<_ACEOF
7848 #line 7848 "configure"
7849 #include "confdefs.h"
7850 #include <stdio.h>
7851 int
7852 main ()
7853 {
7854 printf("Hello")
7855   ;
7856   return 0;
7857 }
7858 _ACEOF
7859 rm -f conftest.$ac_objext
7860 if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
7861   (eval $ac_compile) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); } &&
7865          { ac_try='test -s conftest.$ac_objext'
7866   { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7867   (eval $ac_try) 2>&5
7868   ac_status=$?
7869   echo "$as_me:7869: \$? = $ac_status" >&5
7870   (exit $ac_status); }; }; then
7871   :
7872 else
7873   echo "$as_me: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 cf_have_incdir=yes
7876 fi
7877 rm -f conftest.$ac_objext conftest.$ac_ext
7878                           CPPFLAGS=$cf_save_CPPFLAGS
7879                         fi
7880                   fi
7881                 fi
7882
7883                 if test "$cf_have_incdir" = no ; then
7884                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7885
7886 echo "${as_me:-configure}:7886: testing adding $cf_add_incdir to include-path ..." 1>&5
7887
7888                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7889
7890                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7891                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7892                   cf_add_incdir="$cf_top_incdir"
7893                 else
7894                   break
7895                 fi
7896           fi
7897         done
7898   done
7899 fi
7900
7901 if test -n "$cf_cv_library_path_utf8" ; then
7902   for cf_add_libdir in $cf_cv_library_path_utf8
7903   do
7904     if test $cf_add_libdir = /usr/lib ; then
7905       :
7906     elif test -d $cf_add_libdir
7907     then
7908       cf_have_libdir=no
7909       if test -n "$LDFLAGS$LIBS" ; then
7910         # a loop is needed to ensure we can add subdirs of existing dirs
7911         for cf_test_libdir in $LDFLAGS $LIBS ; do
7912           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7913             cf_have_libdir=yes; break
7914           fi
7915         done
7916       fi
7917       if test "$cf_have_libdir" = no ; then
7918         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7919
7920 echo "${as_me:-configure}:7920: testing adding $cf_add_libdir to library-path ..." 1>&5
7921
7922         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7923       fi
7924     fi
7925   done
7926 fi
7927
7928         LIBS="$cf_cv_library_file_utf8 $LIBS"
7929 fi
7930
7931 cf_ncuconfig_root=ncursesw
7932
7933 echo "Looking for ${cf_ncuconfig_root}-config"
7934 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7935 do
7936   # Extract the first word of "$ac_prog", so it can be a program name with args.
7937 set dummy $ac_prog; ac_word=$2
7938 echo "$as_me:7938: checking for $ac_word" >&5
7939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7940 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
7941   echo $ECHO_N "(cached) $ECHO_C" >&6
7942 else
7943   case $NCURSES_CONFIG in
7944   [\\/]* | ?:[\\/]*)
7945   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
7946   ;;
7947   *)
7948   ac_save_IFS=$IFS; IFS=$ac_path_separator
7949 ac_dummy="$PATH"
7950 for ac_dir in $ac_dummy; do
7951   IFS=$ac_save_IFS
7952   test -z "$ac_dir" && ac_dir=.
7953   if $as_executable_p "$ac_dir/$ac_word"; then
7954    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
7955    echo "$as_me:7955: found $ac_dir/$ac_word" >&5
7956    break
7957 fi
7958 done
7959
7960   ;;
7961 esac
7962 fi
7963 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
7964
7965 if test -n "$NCURSES_CONFIG"; then
7966   echo "$as_me:7966: result: $NCURSES_CONFIG" >&5
7967 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7968 else
7969   echo "$as_me:7969: result: no" >&5
7970 echo "${ECHO_T}no" >&6
7971 fi
7972
7973   test -n "$NCURSES_CONFIG" && break
7974 done
7975 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
7976
7977 if test "$NCURSES_CONFIG" != none ; then
7978
7979 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7980 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
7981
7982 # even with config script, some packages use no-override for curses.h
7983
7984 echo "$as_me:7984: checking if we have identified curses headers" >&5
7985 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7986 if test "${cf_cv_ncurses_header+set}" = set; then
7987   echo $ECHO_N "(cached) $ECHO_C" >&6
7988 else
7989
7990 cf_cv_ncurses_header=none
7991 for cf_header in  \
7992     ncursesw/ncurses.h \
7993         ncursesw/curses.h \
7994         ncurses.h \
7995         curses.h
7996 do
7997 cat >conftest.$ac_ext <<_ACEOF
7998 #line 7998 "configure"
7999 #include "confdefs.h"
8000 #include <${cf_header}>
8001 int
8002 main ()
8003 {
8004 initscr(); tgoto("?", 0,0)
8005   ;
8006   return 0;
8007 }
8008 _ACEOF
8009 rm -f conftest.$ac_objext
8010 if { (eval echo "$as_me:8010: \"$ac_compile\"") >&5
8011   (eval $ac_compile) 2>&5
8012   ac_status=$?
8013   echo "$as_me:8013: \$? = $ac_status" >&5
8014   (exit $ac_status); } &&
8015          { ac_try='test -s conftest.$ac_objext'
8016   { (eval echo "$as_me:8016: \"$ac_try\"") >&5
8017   (eval $ac_try) 2>&5
8018   ac_status=$?
8019   echo "$as_me:8019: \$? = $ac_status" >&5
8020   (exit $ac_status); }; }; then
8021   cf_cv_ncurses_header=$cf_header; break
8022 else
8023   echo "$as_me: failed program was:" >&5
8024 cat conftest.$ac_ext >&5
8025 fi
8026 rm -f conftest.$ac_objext conftest.$ac_ext
8027 done
8028
8029 fi
8030 echo "$as_me:8030: result: $cf_cv_ncurses_header" >&5
8031 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8032
8033 if test "$cf_cv_ncurses_header" = none ; then
8034         { { echo "$as_me:8034: error: No curses header-files found" >&5
8035 echo "$as_me: error: No curses header-files found" >&2;}
8036    { (exit 1); exit 1; }; }
8037 fi
8038
8039 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8040
8041 for ac_header in $cf_cv_ncurses_header
8042 do
8043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8044 echo "$as_me:8044: checking for $ac_header" >&5
8045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8047   echo $ECHO_N "(cached) $ECHO_C" >&6
8048 else
8049   cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <$ac_header>
8053 _ACEOF
8054 if { (eval echo "$as_me:8054: \"$ac_cpp conftest.$ac_ext\"") >&5
8055   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8056   ac_status=$?
8057   egrep -v '^ *\+' conftest.er1 >conftest.err
8058   rm -f conftest.er1
8059   cat conftest.err >&5
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit $ac_status); } >/dev/null; then
8062   if test -s conftest.err; then
8063     ac_cpp_err=$ac_c_preproc_warn_flag
8064   else
8065     ac_cpp_err=
8066   fi
8067 else
8068   ac_cpp_err=yes
8069 fi
8070 if test -z "$ac_cpp_err"; then
8071   eval "$as_ac_Header=yes"
8072 else
8073   echo "$as_me: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   eval "$as_ac_Header=no"
8076 fi
8077 rm -f conftest.err conftest.$ac_ext
8078 fi
8079 echo "$as_me:8079: result: `eval echo '${'$as_ac_Header'}'`" >&5
8080 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8081 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8082   cat >>confdefs.h <<EOF
8083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8084 EOF
8085
8086 fi
8087 done
8088
8089 cat >>confdefs.h <<\EOF
8090 #define NCURSES 1
8091 EOF
8092
8093 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8094
8095 cat >>confdefs.h <<EOF
8096 #define $cf_nculib_ROOT 1
8097 EOF
8098
8099 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8100
8101 else
8102
8103 cf_ncuhdr_root=ncursesw
8104
8105 test -n "$cf_cv_curses_dir" && \
8106 test "$cf_cv_curses_dir" != "no" && { \
8107
8108 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8109   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8110   do
8111         while test $cf_add_incdir != /usr/include
8112         do
8113           if test -d $cf_add_incdir
8114           then
8115                 cf_have_incdir=no
8116                 if test -n "$CFLAGS$CPPFLAGS" ; then
8117                   # a loop is needed to ensure we can add subdirs of existing dirs
8118                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8119                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8120                           cf_have_incdir=yes; break
8121                         fi
8122                   done
8123                 fi
8124
8125                 if test "$cf_have_incdir" = no ; then
8126                   if test "$cf_add_incdir" = /usr/local/include ; then
8127                         if test "$GCC" = yes
8128                         then
8129                           cf_save_CPPFLAGS=$CPPFLAGS
8130                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8131                           cat >conftest.$ac_ext <<_ACEOF
8132 #line 8132 "configure"
8133 #include "confdefs.h"
8134 #include <stdio.h>
8135 int
8136 main ()
8137 {
8138 printf("Hello")
8139   ;
8140   return 0;
8141 }
8142 _ACEOF
8143 rm -f conftest.$ac_objext
8144 if { (eval echo "$as_me:8144: \"$ac_compile\"") >&5
8145   (eval $ac_compile) 2>&5
8146   ac_status=$?
8147   echo "$as_me:8147: \$? = $ac_status" >&5
8148   (exit $ac_status); } &&
8149          { ac_try='test -s conftest.$ac_objext'
8150   { (eval echo "$as_me:8150: \"$ac_try\"") >&5
8151   (eval $ac_try) 2>&5
8152   ac_status=$?
8153   echo "$as_me:8153: \$? = $ac_status" >&5
8154   (exit $ac_status); }; }; then
8155   :
8156 else
8157   echo "$as_me: failed program was:" >&5
8158 cat conftest.$ac_ext >&5
8159 cf_have_incdir=yes
8160 fi
8161 rm -f conftest.$ac_objext conftest.$ac_ext
8162                           CPPFLAGS=$cf_save_CPPFLAGS
8163                         fi
8164                   fi
8165                 fi
8166
8167                 if test "$cf_have_incdir" = no ; then
8168                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8169
8170 echo "${as_me:-configure}:8170: testing adding $cf_add_incdir to include-path ..." 1>&5
8171
8172                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8173
8174                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8175                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8176                   cf_add_incdir="$cf_top_incdir"
8177                 else
8178                   break
8179                 fi
8180           fi
8181         done
8182   done
8183 fi
8184
8185 }
8186
8187 echo "$as_me:8187: checking for $cf_ncuhdr_root header in include-path" >&5
8188 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8189 if test "${cf_cv_ncurses_h+set}" = set; then
8190   echo $ECHO_N "(cached) $ECHO_C" >&6
8191 else
8192
8193         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8194         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8195         for cf_header in $cf_header_list
8196         do
8197
8198         cat >conftest.$ac_ext <<_ACEOF
8199 #line 8199 "configure"
8200 #include "confdefs.h"
8201
8202 #define _XOPEN_SOURCE_EXTENDED
8203 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
8204 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
8205
8206 #include <$cf_header>
8207 int
8208 main ()
8209 {
8210
8211 #ifdef NCURSES_VERSION
8212
8213 #ifndef WACS_BSSB
8214         make an error
8215 #endif
8216
8217 printf("%s\n", NCURSES_VERSION);
8218 #else
8219 #ifdef __NCURSES_H
8220 printf("old\n");
8221 #else
8222         make an error
8223 #endif
8224 #endif
8225
8226   ;
8227   return 0;
8228 }
8229 _ACEOF
8230 rm -f conftest.$ac_objext
8231 if { (eval echo "$as_me:8231: \"$ac_compile\"") >&5
8232   (eval $ac_compile) 2>&5
8233   ac_status=$?
8234   echo "$as_me:8234: \$? = $ac_status" >&5
8235   (exit $ac_status); } &&
8236          { ac_try='test -s conftest.$ac_objext'
8237   { (eval echo "$as_me:8237: \"$ac_try\"") >&5
8238   (eval $ac_try) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit $ac_status); }; }; then
8242   cf_cv_ncurses_h=$cf_header
8243
8244 else
8245   echo "$as_me: failed program was:" >&5
8246 cat conftest.$ac_ext >&5
8247 cf_cv_ncurses_h=no
8248 fi
8249 rm -f conftest.$ac_objext conftest.$ac_ext
8250
8251                 test "$cf_cv_ncurses_h" != no && break
8252         done
8253
8254 fi
8255 echo "$as_me:8255: result: $cf_cv_ncurses_h" >&5
8256 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8257
8258 if test "$cf_cv_ncurses_h" != no ; then
8259         cf_cv_ncurses_header=$cf_cv_ncurses_h
8260 else
8261
8262 echo "$as_me:8262: checking for $cf_ncuhdr_root include-path" >&5
8263 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8264 if test "${cf_cv_ncurses_h2+set}" = set; then
8265   echo $ECHO_N "(cached) $ECHO_C" >&6
8266 else
8267
8268         test -n "$verbose" && echo
8269
8270 cf_search=
8271
8272 # collect the current set of include-directories from compiler flags
8273 cf_header_path_list=""
8274 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8275         for cf_header_path in $CPPFLAGS $CFLAGS
8276         do
8277                 case $cf_header_path in #(vi
8278                 -I*)
8279                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8280
8281 test "$cf_header_path" != "NONE" && \
8282 test -d "$cf_header_path" && \
8283  {
8284         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8285         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8286         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8287         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8288         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8289         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"
8290 }
8291
8292                         cf_header_path_list="$cf_header_path_list $cf_search"
8293                         ;;
8294                 esac
8295         done
8296 fi
8297
8298 # add the variations for the package we are looking for
8299
8300 cf_search=
8301
8302 test "/usr" != "$prefix" && \
8303 test -d "/usr" && \
8304 (test $prefix = NONE || test "/usr" != "$prefix") && {
8305         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8306         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8307         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8308         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8309         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8310         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8311 }
8312
8313 test "$prefix" != "NONE" && \
8314 test -d "$prefix" && \
8315  {
8316         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8317         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8318         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8319         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8320         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8321         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8322 }
8323
8324 test "/usr/local" != "$prefix" && \
8325 test -d "/usr/local" && \
8326 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8327         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8328         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8329         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8330         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8331         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8332         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8333 }
8334
8335 test "/opt" != "$prefix" && \
8336 test -d "/opt" && \
8337 (test $prefix = NONE || test "/opt" != "$prefix") && {
8338         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8339         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8340         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8341         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8342         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8343         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8344 }
8345
8346 test "$HOME" != "$prefix" && \
8347 test -d "$HOME" && \
8348 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8349         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8350         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8351         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8352         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8353         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8354         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8355 }
8356
8357 test "$includedir" != NONE && \
8358 test "$includedir" != "/usr/include" && \
8359 test -d "$includedir" && {
8360         test -d $includedir &&    cf_search="$cf_search $includedir"
8361         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8362 }
8363
8364 test "$oldincludedir" != NONE && \
8365 test "$oldincludedir" != "/usr/include" && \
8366 test -d "$oldincludedir" && {
8367         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8368         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8369 }
8370
8371 cf_search="$cf_search $cf_header_path_list"
8372
8373         test -n "$verbose" && echo search path $cf_search
8374         cf_save2_CPPFLAGS="$CPPFLAGS"
8375         for cf_incdir in $cf_search
8376         do
8377
8378 if test -n "$cf_incdir" ; then
8379   for cf_add_incdir in $cf_incdir
8380   do
8381         while test $cf_add_incdir != /usr/include
8382         do
8383           if test -d $cf_add_incdir
8384           then
8385                 cf_have_incdir=no
8386                 if test -n "$CFLAGS$CPPFLAGS" ; then
8387                   # a loop is needed to ensure we can add subdirs of existing dirs
8388                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8389                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8390                           cf_have_incdir=yes; break
8391                         fi
8392                   done
8393                 fi
8394
8395                 if test "$cf_have_incdir" = no ; then
8396                   if test "$cf_add_incdir" = /usr/local/include ; then
8397                         if test "$GCC" = yes
8398                         then
8399                           cf_save_CPPFLAGS=$CPPFLAGS
8400                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8401                           cat >conftest.$ac_ext <<_ACEOF
8402 #line 8402 "configure"
8403 #include "confdefs.h"
8404 #include <stdio.h>
8405 int
8406 main ()
8407 {
8408 printf("Hello")
8409   ;
8410   return 0;
8411 }
8412 _ACEOF
8413 rm -f conftest.$ac_objext
8414 if { (eval echo "$as_me:8414: \"$ac_compile\"") >&5
8415   (eval $ac_compile) 2>&5
8416   ac_status=$?
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); } &&
8419          { ac_try='test -s conftest.$ac_objext'
8420   { (eval echo "$as_me:8420: \"$ac_try\"") >&5
8421   (eval $ac_try) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); }; }; then
8425   :
8426 else
8427   echo "$as_me: failed program was:" >&5
8428 cat conftest.$ac_ext >&5
8429 cf_have_incdir=yes
8430 fi
8431 rm -f conftest.$ac_objext conftest.$ac_ext
8432                           CPPFLAGS=$cf_save_CPPFLAGS
8433                         fi
8434                   fi
8435                 fi
8436
8437                 if test "$cf_have_incdir" = no ; then
8438                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8439
8440 echo "${as_me:-configure}:8440: testing adding $cf_add_incdir to include-path ..." 1>&5
8441
8442                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8443
8444                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8445                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8446                   cf_add_incdir="$cf_top_incdir"
8447                 else
8448                   break
8449                 fi
8450           fi
8451         done
8452   done
8453 fi
8454
8455                 for cf_header in \
8456                         ncurses.h \
8457                         curses.h
8458                 do
8459
8460         cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8463
8464 #include <$cf_header>
8465 int
8466 main ()
8467 {
8468
8469 #ifdef NCURSES_VERSION
8470
8471 printf("%s\n", NCURSES_VERSION);
8472 #else
8473 #ifdef __NCURSES_H
8474 printf("old\n");
8475 #else
8476         make an error
8477 #endif
8478 #endif
8479
8480   ;
8481   return 0;
8482 }
8483 _ACEOF
8484 rm -f conftest.$ac_objext
8485 if { (eval echo "$as_me:8485: \"$ac_compile\"") >&5
8486   (eval $ac_compile) 2>&5
8487   ac_status=$?
8488   echo "$as_me:8488: \$? = $ac_status" >&5
8489   (exit $ac_status); } &&
8490          { ac_try='test -s conftest.$ac_objext'
8491   { (eval echo "$as_me:8491: \"$ac_try\"") >&5
8492   (eval $ac_try) 2>&5
8493   ac_status=$?
8494   echo "$as_me:8494: \$? = $ac_status" >&5
8495   (exit $ac_status); }; }; then
8496   cf_cv_ncurses_h2=$cf_header
8497
8498 else
8499   echo "$as_me: failed program was:" >&5
8500 cat conftest.$ac_ext >&5
8501 cf_cv_ncurses_h2=no
8502 fi
8503 rm -f conftest.$ac_objext conftest.$ac_ext
8504
8505                         if test "$cf_cv_ncurses_h2" != no ; then
8506                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8507                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
8508                                 break
8509                         fi
8510                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
8511                 done
8512                 CPPFLAGS="$cf_save2_CPPFLAGS"
8513                 test "$cf_cv_ncurses_h2" != no && break
8514         done
8515         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8515: error: not found" >&5
8516 echo "$as_me: error: not found" >&2;}
8517    { (exit 1); exit 1; }; }
8518
8519 fi
8520 echo "$as_me:8520: result: $cf_cv_ncurses_h2" >&5
8521 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8522
8523         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8524         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8525         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8526                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8527         fi
8528
8529 if test -n "$cf_1st_incdir" ; then
8530   for cf_add_incdir in $cf_1st_incdir
8531   do
8532         while test $cf_add_incdir != /usr/include
8533         do
8534           if test -d $cf_add_incdir
8535           then
8536                 cf_have_incdir=no
8537                 if test -n "$CFLAGS$CPPFLAGS" ; then
8538                   # a loop is needed to ensure we can add subdirs of existing dirs
8539                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8540                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8541                           cf_have_incdir=yes; break
8542                         fi
8543                   done
8544                 fi
8545
8546                 if test "$cf_have_incdir" = no ; then
8547                   if test "$cf_add_incdir" = /usr/local/include ; then
8548                         if test "$GCC" = yes
8549                         then
8550                           cf_save_CPPFLAGS=$CPPFLAGS
8551                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8552                           cat >conftest.$ac_ext <<_ACEOF
8553 #line 8553 "configure"
8554 #include "confdefs.h"
8555 #include <stdio.h>
8556 int
8557 main ()
8558 {
8559 printf("Hello")
8560   ;
8561   return 0;
8562 }
8563 _ACEOF
8564 rm -f conftest.$ac_objext
8565 if { (eval echo "$as_me:8565: \"$ac_compile\"") >&5
8566   (eval $ac_compile) 2>&5
8567   ac_status=$?
8568   echo "$as_me:8568: \$? = $ac_status" >&5
8569   (exit $ac_status); } &&
8570          { ac_try='test -s conftest.$ac_objext'
8571   { (eval echo "$as_me:8571: \"$ac_try\"") >&5
8572   (eval $ac_try) 2>&5
8573   ac_status=$?
8574   echo "$as_me:8574: \$? = $ac_status" >&5
8575   (exit $ac_status); }; }; then
8576   :
8577 else
8578   echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8580 cf_have_incdir=yes
8581 fi
8582 rm -f conftest.$ac_objext conftest.$ac_ext
8583                           CPPFLAGS=$cf_save_CPPFLAGS
8584                         fi
8585                   fi
8586                 fi
8587
8588                 if test "$cf_have_incdir" = no ; then
8589                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8590
8591 echo "${as_me:-configure}:8591: testing adding $cf_add_incdir to include-path ..." 1>&5
8592
8593                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8594
8595                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8596                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8597                   cf_add_incdir="$cf_top_incdir"
8598                 else
8599                   break
8600                 fi
8601           fi
8602         done
8603   done
8604 fi
8605
8606 fi
8607
8608 # Set definitions to allow ifdef'ing for ncurses.h
8609
8610 case $cf_cv_ncurses_header in # (vi
8611 *ncurses.h)
8612         cat >>confdefs.h <<\EOF
8613 #define HAVE_NCURSES_H 1
8614 EOF
8615
8616         ;;
8617 esac
8618
8619 case $cf_cv_ncurses_header in # (vi
8620 ncurses/curses.h|ncurses/ncurses.h)
8621         cat >>confdefs.h <<\EOF
8622 #define HAVE_NCURSES_NCURSES_H 1
8623 EOF
8624
8625         ;;
8626 ncursesw/curses.h|ncursesw/ncurses.h)
8627         cat >>confdefs.h <<\EOF
8628 #define HAVE_NCURSESW_NCURSES_H 1
8629 EOF
8630
8631         ;;
8632 esac
8633
8634 echo "$as_me:8634: checking for terminfo header" >&5
8635 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8636 if test "${cf_cv_term_header+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639
8640 case ${cf_cv_ncurses_header} in #(vi
8641 */ncurses.h|*/ncursesw.h) #(vi
8642         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8643         ;;
8644 *)
8645         cf_term_header=term.h
8646         ;;
8647 esac
8648
8649 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8650 do
8651 cat >conftest.$ac_ext <<_ACEOF
8652 #line 8652 "configure"
8653 #include "confdefs.h"
8654 #include <stdio.h>
8655 #include <${cf_cv_ncurses_header:-curses.h}>
8656 #include <$cf_test>
8657
8658 int
8659 main ()
8660 {
8661 int x = auto_left_margin
8662   ;
8663   return 0;
8664 }
8665 _ACEOF
8666 rm -f conftest.$ac_objext
8667 if { (eval echo "$as_me:8667: \"$ac_compile\"") >&5
8668   (eval $ac_compile) 2>&5
8669   ac_status=$?
8670   echo "$as_me:8670: \$? = $ac_status" >&5
8671   (exit $ac_status); } &&
8672          { ac_try='test -s conftest.$ac_objext'
8673   { (eval echo "$as_me:8673: \"$ac_try\"") >&5
8674   (eval $ac_try) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit $ac_status); }; }; then
8678
8679         cf_cv_term_header="$cf_test"
8680 else
8681   echo "$as_me: failed program was:" >&5
8682 cat conftest.$ac_ext >&5
8683
8684         cf_cv_term_header=unknown
8685
8686 fi
8687 rm -f conftest.$ac_objext conftest.$ac_ext
8688         test "$cf_cv_term_header" != unknown && break
8689 done
8690
8691 fi
8692 echo "$as_me:8692: result: $cf_cv_term_header" >&5
8693 echo "${ECHO_T}$cf_cv_term_header" >&6
8694
8695 # Set definitions to allow ifdef'ing to accommodate subdirectories
8696
8697 case $cf_cv_term_header in # (vi
8698 *term.h)
8699         cat >>confdefs.h <<\EOF
8700 #define HAVE_TERM_H 1
8701 EOF
8702
8703         ;;
8704 esac
8705
8706 case $cf_cv_term_header in # (vi
8707 ncurses/term.h) #(vi
8708         cat >>confdefs.h <<\EOF
8709 #define HAVE_NCURSES_TERM_H 1
8710 EOF
8711
8712         ;;
8713 ncursesw/term.h)
8714         cat >>confdefs.h <<\EOF
8715 #define HAVE_NCURSESW_TERM_H 1
8716 EOF
8717
8718         ;;
8719 esac
8720
8721 # some applications need this, but should check for NCURSES_VERSION
8722 cat >>confdefs.h <<\EOF
8723 #define NCURSES 1
8724 EOF
8725
8726 echo "$as_me:8726: checking for ncurses version" >&5
8727 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8728 if test "${cf_cv_ncurses_version+set}" = set; then
8729   echo $ECHO_N "(cached) $ECHO_C" >&6
8730 else
8731
8732         cf_cv_ncurses_version=no
8733         cf_tempfile=out$$
8734         rm -f $cf_tempfile
8735         if test "$cross_compiling" = yes; then
8736
8737         # This will not work if the preprocessor splits the line after the
8738         # Autoconf token.  The 'unproto' program does that.
8739         cat > conftest.$ac_ext <<EOF
8740 #include <${cf_cv_ncurses_header:-curses.h}>
8741 #undef Autoconf
8742 #ifdef NCURSES_VERSION
8743 Autoconf NCURSES_VERSION
8744 #else
8745 #ifdef __NCURSES_H
8746 Autoconf "old"
8747 #endif
8748 ;
8749 #endif
8750 EOF
8751         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8752         { (eval echo "$as_me:8752: \"$cf_try\"") >&5
8753   (eval $cf_try) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit $ac_status); }
8757         if test -f conftest.out ; then
8758                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8759                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8760                 rm -f conftest.out
8761         fi
8762
8763 else
8764   cat >conftest.$ac_ext <<_ACEOF
8765 #line 8765 "configure"
8766 #include "confdefs.h"
8767
8768 #include <${cf_cv_ncurses_header:-curses.h}>
8769 #include <stdio.h>
8770 int main()
8771 {
8772         FILE *fp = fopen("$cf_tempfile", "w");
8773 #ifdef NCURSES_VERSION
8774 # ifdef NCURSES_VERSION_PATCH
8775         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8776 # else
8777         fprintf(fp, "%s\n", NCURSES_VERSION);
8778 # endif
8779 #else
8780 # ifdef __NCURSES_H
8781         fprintf(fp, "old\n");
8782 # else
8783         make an error
8784 # endif
8785 #endif
8786         ${cf_cv_main_return:-return}(0);
8787 }
8788 _ACEOF
8789 rm -f conftest$ac_exeext
8790 if { (eval echo "$as_me:8790: \"$ac_link\"") >&5
8791   (eval $ac_link) 2>&5
8792   ac_status=$?
8793   echo "$as_me:8793: \$? = $ac_status" >&5
8794   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8795   { (eval echo "$as_me:8795: \"$ac_try\"") >&5
8796   (eval $ac_try) 2>&5
8797   ac_status=$?
8798   echo "$as_me:8798: \$? = $ac_status" >&5
8799   (exit $ac_status); }; }; then
8800
8801         cf_cv_ncurses_version=`cat $cf_tempfile`
8802 else
8803   echo "$as_me: program exited with status $ac_status" >&5
8804 echo "$as_me: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8806 fi
8807 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8808 fi
8809         rm -f $cf_tempfile
8810
8811 fi
8812 echo "$as_me:8812: result: $cf_cv_ncurses_version" >&5
8813 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8814 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
8815 #define NCURSES 1
8816 EOF
8817
8818 cf_nculib_root=ncursesw
8819         # This works, except for the special case where we find gpm, but
8820         # ncurses is in a nonstandard location via $LIBS, and we really want
8821         # to link gpm.
8822 cf_ncurses_LIBS=""
8823 cf_ncurses_SAVE="$LIBS"
8824 echo "$as_me:8824: checking for Gpm_Open in -lgpm" >&5
8825 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8826 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8827   echo $ECHO_N "(cached) $ECHO_C" >&6
8828 else
8829   ac_check_lib_save_LIBS=$LIBS
8830 LIBS="-lgpm  $LIBS"
8831 cat >conftest.$ac_ext <<_ACEOF
8832 #line 8832 "configure"
8833 #include "confdefs.h"
8834
8835 /* Override any gcc2 internal prototype to avoid an error.  */
8836 #ifdef __cplusplus
8837 extern "C"
8838 #endif
8839 /* We use char because int might match the return type of a gcc2
8840    builtin and then its argument prototype would still apply.  */
8841 char Gpm_Open ();
8842 int
8843 main ()
8844 {
8845 Gpm_Open ();
8846   ;
8847   return 0;
8848 }
8849 _ACEOF
8850 rm -f conftest.$ac_objext conftest$ac_exeext
8851 if { (eval echo "$as_me:8851: \"$ac_link\"") >&5
8852   (eval $ac_link) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); } &&
8856          { ac_try='test -s conftest$ac_exeext'
8857   { (eval echo "$as_me:8857: \"$ac_try\"") >&5
8858   (eval $ac_try) 2>&5
8859   ac_status=$?
8860   echo "$as_me:8860: \$? = $ac_status" >&5
8861   (exit $ac_status); }; }; then
8862   ac_cv_lib_gpm_Gpm_Open=yes
8863 else
8864   echo "$as_me: failed program was:" >&5
8865 cat conftest.$ac_ext >&5
8866 ac_cv_lib_gpm_Gpm_Open=no
8867 fi
8868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8869 LIBS=$ac_check_lib_save_LIBS
8870 fi
8871 echo "$as_me:8871: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8872 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8873 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8874   echo "$as_me:8874: checking for initscr in -lgpm" >&5
8875 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8876 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8877   echo $ECHO_N "(cached) $ECHO_C" >&6
8878 else
8879   ac_check_lib_save_LIBS=$LIBS
8880 LIBS="-lgpm  $LIBS"
8881 cat >conftest.$ac_ext <<_ACEOF
8882 #line 8882 "configure"
8883 #include "confdefs.h"
8884
8885 /* Override any gcc2 internal prototype to avoid an error.  */
8886 #ifdef __cplusplus
8887 extern "C"
8888 #endif
8889 /* We use char because int might match the return type of a gcc2
8890    builtin and then its argument prototype would still apply.  */
8891 char initscr ();
8892 int
8893 main ()
8894 {
8895 initscr ();
8896   ;
8897   return 0;
8898 }
8899 _ACEOF
8900 rm -f conftest.$ac_objext conftest$ac_exeext
8901 if { (eval echo "$as_me:8901: \"$ac_link\"") >&5
8902   (eval $ac_link) 2>&5
8903   ac_status=$?
8904   echo "$as_me:8904: \$? = $ac_status" >&5
8905   (exit $ac_status); } &&
8906          { ac_try='test -s conftest$ac_exeext'
8907   { (eval echo "$as_me:8907: \"$ac_try\"") >&5
8908   (eval $ac_try) 2>&5
8909   ac_status=$?
8910   echo "$as_me:8910: \$? = $ac_status" >&5
8911   (exit $ac_status); }; }; then
8912   ac_cv_lib_gpm_initscr=yes
8913 else
8914   echo "$as_me: failed program was:" >&5
8915 cat conftest.$ac_ext >&5
8916 ac_cv_lib_gpm_initscr=no
8917 fi
8918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8919 LIBS=$ac_check_lib_save_LIBS
8920 fi
8921 echo "$as_me:8921: result: $ac_cv_lib_gpm_initscr" >&5
8922 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8923 if test $ac_cv_lib_gpm_initscr = yes; then
8924   LIBS="$cf_ncurses_SAVE"
8925 else
8926   cf_ncurses_LIBS="-lgpm"
8927 fi
8928
8929 fi
8930
8931 case $host_os in #(vi
8932 freebsd*)
8933         # This is only necessary if you are linking against an obsolete
8934         # version of ncurses (but it should do no harm, since it's static).
8935         if test "$cf_nculib_root" = ncurses ; then
8936                 echo "$as_me:8936: checking for tgoto in -lmytinfo" >&5
8937 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8938 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8939   echo $ECHO_N "(cached) $ECHO_C" >&6
8940 else
8941   ac_check_lib_save_LIBS=$LIBS
8942 LIBS="-lmytinfo  $LIBS"
8943 cat >conftest.$ac_ext <<_ACEOF
8944 #line 8944 "configure"
8945 #include "confdefs.h"
8946
8947 /* Override any gcc2 internal prototype to avoid an error.  */
8948 #ifdef __cplusplus
8949 extern "C"
8950 #endif
8951 /* We use char because int might match the return type of a gcc2
8952    builtin and then its argument prototype would still apply.  */
8953 char tgoto ();
8954 int
8955 main ()
8956 {
8957 tgoto ();
8958   ;
8959   return 0;
8960 }
8961 _ACEOF
8962 rm -f conftest.$ac_objext conftest$ac_exeext
8963 if { (eval echo "$as_me:8963: \"$ac_link\"") >&5
8964   (eval $ac_link) 2>&5
8965   ac_status=$?
8966   echo "$as_me:8966: \$? = $ac_status" >&5
8967   (exit $ac_status); } &&
8968          { ac_try='test -s conftest$ac_exeext'
8969   { (eval echo "$as_me:8969: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); }; }; then
8974   ac_cv_lib_mytinfo_tgoto=yes
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 cat conftest.$ac_ext >&5
8978 ac_cv_lib_mytinfo_tgoto=no
8979 fi
8980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8981 LIBS=$ac_check_lib_save_LIBS
8982 fi
8983 echo "$as_me:8983: result: $ac_cv_lib_mytinfo_tgoto" >&5
8984 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8985 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8986   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8987 fi
8988
8989         fi
8990         ;;
8991 esac
8992
8993 LIBS="$cf_ncurses_LIBS $LIBS"
8994
8995 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8996 then
8997         LIBS="-l$cf_nculib_root $LIBS"
8998 else
8999
9000         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9001         cf_libdir=""
9002         echo "$as_me:9002: checking for initscr" >&5
9003 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9004 if test "${ac_cv_func_initscr+set}" = set; then
9005   echo $ECHO_N "(cached) $ECHO_C" >&6
9006 else
9007   cat >conftest.$ac_ext <<_ACEOF
9008 #line 9008 "configure"
9009 #include "confdefs.h"
9010 /* System header to define __stub macros and hopefully few prototypes,
9011     which can conflict with char initscr (); below.  */
9012 #include <assert.h>
9013 /* Override any gcc2 internal prototype to avoid an error.  */
9014 #ifdef __cplusplus
9015 extern "C"
9016 #endif
9017 /* We use char because int might match the return type of a gcc2
9018    builtin and then its argument prototype would still apply.  */
9019 char initscr ();
9020 char (*f) ();
9021
9022 int
9023 main ()
9024 {
9025 /* The GNU C library defines this for functions which it implements
9026     to always fail with ENOSYS.  Some functions are actually named
9027     something starting with __ and the normal name is an alias.  */
9028 #if defined (__stub_initscr) || defined (__stub___initscr)
9029 choke me
9030 #else
9031 f = initscr;
9032 #endif
9033
9034   ;
9035   return 0;
9036 }
9037 _ACEOF
9038 rm -f conftest.$ac_objext conftest$ac_exeext
9039 if { (eval echo "$as_me:9039: \"$ac_link\"") >&5
9040   (eval $ac_link) 2>&5
9041   ac_status=$?
9042   echo "$as_me:9042: \$? = $ac_status" >&5
9043   (exit $ac_status); } &&
9044          { ac_try='test -s conftest$ac_exeext'
9045   { (eval echo "$as_me:9045: \"$ac_try\"") >&5
9046   (eval $ac_try) 2>&5
9047   ac_status=$?
9048   echo "$as_me:9048: \$? = $ac_status" >&5
9049   (exit $ac_status); }; }; then
9050   ac_cv_func_initscr=yes
9051 else
9052   echo "$as_me: failed program was:" >&5
9053 cat conftest.$ac_ext >&5
9054 ac_cv_func_initscr=no
9055 fi
9056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9057 fi
9058 echo "$as_me:9058: result: $ac_cv_func_initscr" >&5
9059 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9060 if test $ac_cv_func_initscr = yes; then
9061   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9062 else
9063
9064                 cf_save_LIBS="$LIBS"
9065                 echo "$as_me:9065: checking for initscr in -l$cf_nculib_root" >&5
9066 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9067                 LIBS="-l$cf_nculib_root $LIBS"
9068                 cat >conftest.$ac_ext <<_ACEOF
9069 #line 9069 "configure"
9070 #include "confdefs.h"
9071 #include <${cf_cv_ncurses_header:-curses.h}>
9072 int
9073 main ()
9074 {
9075 initscr()
9076   ;
9077   return 0;
9078 }
9079 _ACEOF
9080 rm -f conftest.$ac_objext conftest$ac_exeext
9081 if { (eval echo "$as_me:9081: \"$ac_link\"") >&5
9082   (eval $ac_link) 2>&5
9083   ac_status=$?
9084   echo "$as_me:9084: \$? = $ac_status" >&5
9085   (exit $ac_status); } &&
9086          { ac_try='test -s conftest$ac_exeext'
9087   { (eval echo "$as_me:9087: \"$ac_try\"") >&5
9088   (eval $ac_try) 2>&5
9089   ac_status=$?
9090   echo "$as_me:9090: \$? = $ac_status" >&5
9091   (exit $ac_status); }; }; then
9092   echo "$as_me:9092: result: yes" >&5
9093 echo "${ECHO_T}yes" >&6
9094                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9095
9096 else
9097   echo "$as_me: failed program was:" >&5
9098 cat conftest.$ac_ext >&5
9099 echo "$as_me:9099: result: no" >&5
9100 echo "${ECHO_T}no" >&6
9101
9102 cf_search=
9103 cf_library_path_list=""
9104 if test -n "${LDFLAGS}${LIBS}" ; then
9105         for cf_library_path in $LDFLAGS $LIBS
9106         do
9107                 case $cf_library_path in #(vi
9108                 -L*)
9109                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9110
9111 test "$cf_library_path" != "NONE" && \
9112 test -d "$cf_library_path" && \
9113  {
9114         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9115         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9116         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9117         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9118         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9119         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"
9120 }
9121
9122                         cf_library_path_list="$cf_library_path_list $cf_search"
9123                         ;;
9124                 esac
9125         done
9126 fi
9127
9128 cf_search=
9129
9130 test "/usr" != "$prefix" && \
9131 test -d "/usr" && \
9132 (test $prefix = NONE || test "/usr" != "$prefix") && {
9133         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9134         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9135         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
9136         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9137         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
9138         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9139 }
9140
9141 test "$prefix" != "NONE" && \
9142 test -d "$prefix" && \
9143  {
9144         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9145         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9146         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9147         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9148         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9149         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9150 }
9151
9152 test "/usr/local" != "$prefix" && \
9153 test -d "/usr/local" && \
9154 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9155         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9156         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9157         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9158         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9159         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9160         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9161 }
9162
9163 test "/opt" != "$prefix" && \
9164 test -d "/opt" && \
9165 (test $prefix = NONE || test "/opt" != "$prefix") && {
9166         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9167         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9168         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
9169         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9170         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
9171         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9172 }
9173
9174 test "$HOME" != "$prefix" && \
9175 test -d "$HOME" && \
9176 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9177         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9178         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9179         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9180         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9181         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9182         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9183 }
9184
9185 cf_search="$cf_library_path_list $cf_search"
9186
9187                         for cf_libdir in $cf_search
9188                         do
9189                                 echo "$as_me:9189: checking for -l$cf_nculib_root in $cf_libdir" >&5
9190 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9191                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9192                                 cat >conftest.$ac_ext <<_ACEOF
9193 #line 9193 "configure"
9194 #include "confdefs.h"
9195 #include <${cf_cv_ncurses_header:-curses.h}>
9196 int
9197 main ()
9198 {
9199 initscr()
9200   ;
9201   return 0;
9202 }
9203 _ACEOF
9204 rm -f conftest.$ac_objext conftest$ac_exeext
9205 if { (eval echo "$as_me:9205: \"$ac_link\"") >&5
9206   (eval $ac_link) 2>&5
9207   ac_status=$?
9208   echo "$as_me:9208: \$? = $ac_status" >&5
9209   (exit $ac_status); } &&
9210          { ac_try='test -s conftest$ac_exeext'
9211   { (eval echo "$as_me:9211: \"$ac_try\"") >&5
9212   (eval $ac_try) 2>&5
9213   ac_status=$?
9214   echo "$as_me:9214: \$? = $ac_status" >&5
9215   (exit $ac_status); }; }; then
9216   echo "$as_me:9216: result: yes" >&5
9217 echo "${ECHO_T}yes" >&6
9218                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9219                                          break
9220 else
9221   echo "$as_me: failed program was:" >&5
9222 cat conftest.$ac_ext >&5
9223 echo "$as_me:9223: result: no" >&5
9224 echo "${ECHO_T}no" >&6
9225                                          LIBS="$cf_save_LIBS"
9226 fi
9227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9228                         done
9229
9230 fi
9231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9232
9233 fi
9234
9235 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9236
9237 if test $cf_found_library = no ; then
9238         { { echo "$as_me:9238: error: Cannot link $cf_nculib_root library" >&5
9239 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9240    { (exit 1); exit 1; }; }
9241 fi
9242
9243 fi
9244
9245 if test -n "$cf_ncurses_LIBS" ; then
9246         echo "$as_me:9246: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9247 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9248         cf_ncurses_SAVE="$LIBS"
9249         for p in $cf_ncurses_LIBS ; do
9250                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9251                 if test "$q" != "$LIBS" ; then
9252                         LIBS="$q"
9253                 fi
9254         done
9255         cat >conftest.$ac_ext <<_ACEOF
9256 #line 9256 "configure"
9257 #include "confdefs.h"
9258 #include <${cf_cv_ncurses_header:-curses.h}>
9259 int
9260 main ()
9261 {
9262 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9263   ;
9264   return 0;
9265 }
9266 _ACEOF
9267 rm -f conftest.$ac_objext conftest$ac_exeext
9268 if { (eval echo "$as_me:9268: \"$ac_link\"") >&5
9269   (eval $ac_link) 2>&5
9270   ac_status=$?
9271   echo "$as_me:9271: \$? = $ac_status" >&5
9272   (exit $ac_status); } &&
9273          { ac_try='test -s conftest$ac_exeext'
9274   { (eval echo "$as_me:9274: \"$ac_try\"") >&5
9275   (eval $ac_try) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); }; }; then
9279   echo "$as_me:9279: result: yes" >&5
9280 echo "${ECHO_T}yes" >&6
9281 else
9282   echo "$as_me: failed program was:" >&5
9283 cat conftest.$ac_ext >&5
9284 echo "$as_me:9284: result: no" >&5
9285 echo "${ECHO_T}no" >&6
9286                  LIBS="$cf_ncurses_SAVE"
9287 fi
9288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9289 fi
9290
9291 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9292
9293 cat >>confdefs.h <<EOF
9294 #define $cf_nculib_ROOT 1
9295 EOF
9296
9297 fi
9298
9299         ;;
9300 pdcurses) #(vi
9301
9302 echo "$as_me:9302: checking if you want to use pkg-config" >&5
9303 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9304
9305 # Check whether --with-pkg-config or --without-pkg-config was given.
9306 if test "${with_pkg_config+set}" = set; then
9307   withval="$with_pkg_config"
9308   cf_pkg_config=$withval
9309 else
9310   cf_pkg_config=yes
9311 fi;
9312 echo "$as_me:9312: result: $cf_pkg_config" >&5
9313 echo "${ECHO_T}$cf_pkg_config" >&6
9314
9315 case $cf_pkg_config in #(vi
9316 no) #(vi
9317         PKG_CONFIG=none
9318         ;;
9319 yes) #(vi
9320
9321 if test -n "$ac_tool_prefix"; then
9322   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9323 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9324 echo "$as_me:9324: checking for $ac_word" >&5
9325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9326 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9327   echo $ECHO_N "(cached) $ECHO_C" >&6
9328 else
9329   case $PKG_CONFIG in
9330   [\\/]* | ?:[\\/]*)
9331   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9332   ;;
9333   *)
9334   ac_save_IFS=$IFS; IFS=$ac_path_separator
9335 ac_dummy="$PATH"
9336 for ac_dir in $ac_dummy; do
9337   IFS=$ac_save_IFS
9338   test -z "$ac_dir" && ac_dir=.
9339   if $as_executable_p "$ac_dir/$ac_word"; then
9340    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9341    echo "$as_me:9341: found $ac_dir/$ac_word" >&5
9342    break
9343 fi
9344 done
9345
9346   ;;
9347 esac
9348 fi
9349 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9350
9351 if test -n "$PKG_CONFIG"; then
9352   echo "$as_me:9352: result: $PKG_CONFIG" >&5
9353 echo "${ECHO_T}$PKG_CONFIG" >&6
9354 else
9355   echo "$as_me:9355: result: no" >&5
9356 echo "${ECHO_T}no" >&6
9357 fi
9358
9359 fi
9360 if test -z "$ac_cv_path_PKG_CONFIG"; then
9361   ac_pt_PKG_CONFIG=$PKG_CONFIG
9362   # Extract the first word of "pkg-config", so it can be a program name with args.
9363 set dummy pkg-config; ac_word=$2
9364 echo "$as_me:9364: checking for $ac_word" >&5
9365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9366 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9367   echo $ECHO_N "(cached) $ECHO_C" >&6
9368 else
9369   case $ac_pt_PKG_CONFIG in
9370   [\\/]* | ?:[\\/]*)
9371   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9372   ;;
9373   *)
9374   ac_save_IFS=$IFS; IFS=$ac_path_separator
9375 ac_dummy="$PATH"
9376 for ac_dir in $ac_dummy; do
9377   IFS=$ac_save_IFS
9378   test -z "$ac_dir" && ac_dir=.
9379   if $as_executable_p "$ac_dir/$ac_word"; then
9380    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9381    echo "$as_me:9381: found $ac_dir/$ac_word" >&5
9382    break
9383 fi
9384 done
9385
9386   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9387   ;;
9388 esac
9389 fi
9390 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9391
9392 if test -n "$ac_pt_PKG_CONFIG"; then
9393   echo "$as_me:9393: result: $ac_pt_PKG_CONFIG" >&5
9394 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9395 else
9396   echo "$as_me:9396: result: no" >&5
9397 echo "${ECHO_T}no" >&6
9398 fi
9399
9400   PKG_CONFIG=$ac_pt_PKG_CONFIG
9401 else
9402   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9403 fi
9404
9405         ;;
9406 *)
9407         PKG_CONFIG=$withval
9408         ;;
9409 esac
9410
9411 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9412 if test "$PKG_CONFIG" != none ; then
9413
9414 if test "x$prefix" != xNONE; then
9415   cf_path_syntax="$prefix"
9416 else
9417   cf_path_syntax="$ac_default_prefix"
9418 fi
9419
9420 case ".$PKG_CONFIG" in #(vi
9421 .\$\(*\)*|.\'*\'*) #(vi
9422   ;;
9423 ..|./*|.\\*) #(vi
9424   ;;
9425 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9426   ;;
9427 .\${*prefix}*) #(vi
9428   eval PKG_CONFIG="$PKG_CONFIG"
9429   case ".$PKG_CONFIG" in #(vi
9430   .NONE/*)
9431     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9432     ;;
9433   esac
9434   ;; #(vi
9435 .no|.NONE/*)
9436   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9437   ;;
9438 *)
9439   { { echo "$as_me:9439: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9440 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9441    { (exit 1); exit 1; }; }
9442   ;;
9443 esac
9444
9445 fi
9446
9447 echo "$as_me:9447: checking for X" >&5
9448 echo $ECHO_N "checking for X... $ECHO_C" >&6
9449
9450 # Check whether --with-x or --without-x was given.
9451 if test "${with_x+set}" = set; then
9452   withval="$with_x"
9453
9454 fi;
9455 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9456 if test "x$with_x" = xno; then
9457   # The user explicitly disabled X.
9458   have_x=disabled
9459 else
9460   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9461     # Both variables are already set.
9462     have_x=yes
9463   else
9464     if test "${ac_cv_have_x+set}" = set; then
9465   echo $ECHO_N "(cached) $ECHO_C" >&6
9466 else
9467   # One or both of the vars are not set, and there is no cached value.
9468 ac_x_includes=no ac_x_libraries=no
9469 rm -fr conftest.dir
9470 if mkdir conftest.dir; then
9471   cd conftest.dir
9472   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9473   cat >Imakefile <<'EOF'
9474 acfindx:
9475         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9476 EOF
9477   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9478     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9479     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9480     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9481     for ac_extension in a so sl dylib dll; do
9482       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9483          test -f $ac_im_libdir/libX11.$ac_extension; then
9484         ac_im_usrlibdir=$ac_im_libdir; break
9485       fi
9486     done
9487     # Screen out bogus values from the imake configuration.  They are
9488     # bogus both because they are the default anyway, and because
9489     # using them would break gcc on systems where it needs fixed includes.
9490     case $ac_im_incroot in
9491         /usr/include) ;;
9492         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9493     esac
9494     case $ac_im_usrlibdir in
9495         /usr/lib | /lib) ;;
9496         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9497     esac
9498   fi
9499   cd ..
9500   rm -fr conftest.dir
9501 fi
9502
9503 # Standard set of common directories for X headers.
9504 # Check X11 before X11Rn because it is often a symlink to the current release.
9505 ac_x_header_dirs='
9506 /usr/X11/include
9507 /usr/X11R6/include
9508 /usr/X11R5/include
9509 /usr/X11R4/include
9510
9511 /usr/include/X11
9512 /usr/include/X11R6
9513 /usr/include/X11R5
9514 /usr/include/X11R4
9515
9516 /usr/local/X11/include
9517 /usr/local/X11R6/include
9518 /usr/local/X11R5/include
9519 /usr/local/X11R4/include
9520
9521 /usr/local/include/X11
9522 /usr/local/include/X11R6
9523 /usr/local/include/X11R5
9524 /usr/local/include/X11R4
9525
9526 /usr/X386/include
9527 /usr/x386/include
9528 /usr/XFree86/include/X11
9529
9530 /usr/include
9531 /usr/local/include
9532 /usr/unsupported/include
9533 /usr/athena/include
9534 /usr/local/x11r5/include
9535 /usr/lpp/Xamples/include
9536
9537 /usr/openwin/include
9538 /usr/openwin/share/include'
9539
9540 if test "$ac_x_includes" = no; then
9541   # Guess where to find include files, by looking for Intrinsic.h.
9542   # First, try using that file with no special directory specified.
9543   cat >conftest.$ac_ext <<_ACEOF
9544 #line 9544 "configure"
9545 #include "confdefs.h"
9546 #include <X11/Intrinsic.h>
9547 _ACEOF
9548 if { (eval echo "$as_me:9548: \"$ac_cpp conftest.$ac_ext\"") >&5
9549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9550   ac_status=$?
9551   egrep -v '^ *\+' conftest.er1 >conftest.err
9552   rm -f conftest.er1
9553   cat conftest.err >&5
9554   echo "$as_me:9554: \$? = $ac_status" >&5
9555   (exit $ac_status); } >/dev/null; then
9556   if test -s conftest.err; then
9557     ac_cpp_err=$ac_c_preproc_warn_flag
9558   else
9559     ac_cpp_err=
9560   fi
9561 else
9562   ac_cpp_err=yes
9563 fi
9564 if test -z "$ac_cpp_err"; then
9565   # We can compile using X headers with no special include directory.
9566 ac_x_includes=
9567 else
9568   echo "$as_me: failed program was:" >&5
9569   cat conftest.$ac_ext >&5
9570   for ac_dir in $ac_x_header_dirs; do
9571   if test -r "$ac_dir/X11/Intrinsic.h"; then
9572     ac_x_includes=$ac_dir
9573     break
9574   fi
9575 done
9576 fi
9577 rm -f conftest.err conftest.$ac_ext
9578 fi # $ac_x_includes = no
9579
9580 if test "$ac_x_libraries" = no; then
9581   # Check for the libraries.
9582   # See if we find them without any special options.
9583   # Don't add to $LIBS permanently.
9584   ac_save_LIBS=$LIBS
9585   LIBS="-lXt $LIBS"
9586   cat >conftest.$ac_ext <<_ACEOF
9587 #line 9587 "configure"
9588 #include "confdefs.h"
9589 #include <X11/Intrinsic.h>
9590 int
9591 main ()
9592 {
9593 XtMalloc (0)
9594   ;
9595   return 0;
9596 }
9597 _ACEOF
9598 rm -f conftest.$ac_objext conftest$ac_exeext
9599 if { (eval echo "$as_me:9599: \"$ac_link\"") >&5
9600   (eval $ac_link) 2>&5
9601   ac_status=$?
9602   echo "$as_me:9602: \$? = $ac_status" >&5
9603   (exit $ac_status); } &&
9604          { ac_try='test -s conftest$ac_exeext'
9605   { (eval echo "$as_me:9605: \"$ac_try\"") >&5
9606   (eval $ac_try) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); }; }; then
9610   LIBS=$ac_save_LIBS
9611 # We can link X programs with no special library path.
9612 ac_x_libraries=
9613 else
9614   echo "$as_me: failed program was:" >&5
9615 cat conftest.$ac_ext >&5
9616 LIBS=$ac_save_LIBS
9617 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9618 do
9619   # Don't even attempt the hair of trying to link an X program!
9620   for ac_extension in a so sl dylib dll; do
9621     if test -r $ac_dir/libXt.$ac_extension; then
9622       ac_x_libraries=$ac_dir
9623       break 2
9624     fi
9625   done
9626 done
9627 fi
9628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9629 fi # $ac_x_libraries = no
9630
9631 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9632   # Didn't find X anywhere.  Cache the known absence of X.
9633   ac_cv_have_x="have_x=no"
9634 else
9635   # Record where we found X for the cache.
9636   ac_cv_have_x="have_x=yes \
9637                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9638 fi
9639 fi
9640
9641   fi
9642   eval "$ac_cv_have_x"
9643 fi # $with_x != no
9644
9645 if test "$have_x" != yes; then
9646   echo "$as_me:9646: result: $have_x" >&5
9647 echo "${ECHO_T}$have_x" >&6
9648   no_x=yes
9649 else
9650   # If each of the values was on the command line, it overrides each guess.
9651   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9652   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9653   # Update the cache value to reflect the command line values.
9654   ac_cv_have_x="have_x=yes \
9655                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9656   echo "$as_me:9656: result: libraries $x_libraries, headers $x_includes" >&5
9657 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9658 fi
9659
9660 if test "$no_x" = yes; then
9661   # Not all programs may use this symbol, but it does not hurt to define it.
9662
9663 cat >>confdefs.h <<\EOF
9664 #define X_DISPLAY_MISSING 1
9665 EOF
9666
9667   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9668 else
9669   if test -n "$x_includes"; then
9670     X_CFLAGS="$X_CFLAGS -I$x_includes"
9671   fi
9672
9673   # It would also be nice to do this for all -L options, not just this one.
9674   if test -n "$x_libraries"; then
9675     X_LIBS="$X_LIBS -L$x_libraries"
9676     # For Solaris; some versions of Sun CC require a space after -R and
9677     # others require no space.  Words are not sufficient . . . .
9678     case `(uname -sr) 2>/dev/null` in
9679     "SunOS 5"*)
9680       echo "$as_me:9680: checking whether -R must be followed by a space" >&5
9681 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9682       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9683       cat >conftest.$ac_ext <<_ACEOF
9684 #line 9684 "configure"
9685 #include "confdefs.h"
9686
9687 int
9688 main ()
9689 {
9690
9691   ;
9692   return 0;
9693 }
9694 _ACEOF
9695 rm -f conftest.$ac_objext conftest$ac_exeext
9696 if { (eval echo "$as_me:9696: \"$ac_link\"") >&5
9697   (eval $ac_link) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -s conftest$ac_exeext'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); }; }; then
9707   ac_R_nospace=yes
9708 else
9709   echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 ac_R_nospace=no
9712 fi
9713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9714       if test $ac_R_nospace = yes; then
9715         echo "$as_me:9715: result: no" >&5
9716 echo "${ECHO_T}no" >&6
9717         X_LIBS="$X_LIBS -R$x_libraries"
9718       else
9719         LIBS="$ac_xsave_LIBS -R $x_libraries"
9720         cat >conftest.$ac_ext <<_ACEOF
9721 #line 9721 "configure"
9722 #include "confdefs.h"
9723
9724 int
9725 main ()
9726 {
9727
9728   ;
9729   return 0;
9730 }
9731 _ACEOF
9732 rm -f conftest.$ac_objext conftest$ac_exeext
9733 if { (eval echo "$as_me:9733: \"$ac_link\"") >&5
9734   (eval $ac_link) 2>&5
9735   ac_status=$?
9736   echo "$as_me:9736: \$? = $ac_status" >&5
9737   (exit $ac_status); } &&
9738          { ac_try='test -s conftest$ac_exeext'
9739   { (eval echo "$as_me:9739: \"$ac_try\"") >&5
9740   (eval $ac_try) 2>&5
9741   ac_status=$?
9742   echo "$as_me:9742: \$? = $ac_status" >&5
9743   (exit $ac_status); }; }; then
9744   ac_R_space=yes
9745 else
9746   echo "$as_me: failed program was:" >&5
9747 cat conftest.$ac_ext >&5
9748 ac_R_space=no
9749 fi
9750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9751         if test $ac_R_space = yes; then
9752           echo "$as_me:9752: result: yes" >&5
9753 echo "${ECHO_T}yes" >&6
9754           X_LIBS="$X_LIBS -R $x_libraries"
9755         else
9756           echo "$as_me:9756: result: neither works" >&5
9757 echo "${ECHO_T}neither works" >&6
9758         fi
9759       fi
9760       LIBS=$ac_xsave_LIBS
9761     esac
9762   fi
9763
9764   # Check for system-dependent libraries X programs must link with.
9765   # Do this before checking for the system-independent R6 libraries
9766   # (-lICE), since we may need -lsocket or whatever for X linking.
9767
9768   if test "$ISC" = yes; then
9769     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9770   else
9771     # Martyn Johnson says this is needed for Ultrix, if the X
9772     # libraries were built with DECnet support.  And Karl Berry says
9773     # the Alpha needs dnet_stub (dnet does not exist).
9774     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9775     cat >conftest.$ac_ext <<_ACEOF
9776 #line 9776 "configure"
9777 #include "confdefs.h"
9778
9779 /* Override any gcc2 internal prototype to avoid an error.  */
9780 #ifdef __cplusplus
9781 extern "C"
9782 #endif
9783 /* We use char because int might match the return type of a gcc2
9784    builtin and then its argument prototype would still apply.  */
9785 char XOpenDisplay ();
9786 int
9787 main ()
9788 {
9789 XOpenDisplay ();
9790   ;
9791   return 0;
9792 }
9793 _ACEOF
9794 rm -f conftest.$ac_objext conftest$ac_exeext
9795 if { (eval echo "$as_me:9795: \"$ac_link\"") >&5
9796   (eval $ac_link) 2>&5
9797   ac_status=$?
9798   echo "$as_me:9798: \$? = $ac_status" >&5
9799   (exit $ac_status); } &&
9800          { ac_try='test -s conftest$ac_exeext'
9801   { (eval echo "$as_me:9801: \"$ac_try\"") >&5
9802   (eval $ac_try) 2>&5
9803   ac_status=$?
9804   echo "$as_me:9804: \$? = $ac_status" >&5
9805   (exit $ac_status); }; }; then
9806   :
9807 else
9808   echo "$as_me: failed program was:" >&5
9809 cat conftest.$ac_ext >&5
9810 echo "$as_me:9810: checking for dnet_ntoa in -ldnet" >&5
9811 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9812 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9813   echo $ECHO_N "(cached) $ECHO_C" >&6
9814 else
9815   ac_check_lib_save_LIBS=$LIBS
9816 LIBS="-ldnet  $LIBS"
9817 cat >conftest.$ac_ext <<_ACEOF
9818 #line 9818 "configure"
9819 #include "confdefs.h"
9820
9821 /* Override any gcc2 internal prototype to avoid an error.  */
9822 #ifdef __cplusplus
9823 extern "C"
9824 #endif
9825 /* We use char because int might match the return type of a gcc2
9826    builtin and then its argument prototype would still apply.  */
9827 char dnet_ntoa ();
9828 int
9829 main ()
9830 {
9831 dnet_ntoa ();
9832   ;
9833   return 0;
9834 }
9835 _ACEOF
9836 rm -f conftest.$ac_objext conftest$ac_exeext
9837 if { (eval echo "$as_me:9837: \"$ac_link\"") >&5
9838   (eval $ac_link) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); } &&
9842          { ac_try='test -s conftest$ac_exeext'
9843   { (eval echo "$as_me:9843: \"$ac_try\"") >&5
9844   (eval $ac_try) 2>&5
9845   ac_status=$?
9846   echo "$as_me:9846: \$? = $ac_status" >&5
9847   (exit $ac_status); }; }; then
9848   ac_cv_lib_dnet_dnet_ntoa=yes
9849 else
9850   echo "$as_me: failed program was:" >&5
9851 cat conftest.$ac_ext >&5
9852 ac_cv_lib_dnet_dnet_ntoa=no
9853 fi
9854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9855 LIBS=$ac_check_lib_save_LIBS
9856 fi
9857 echo "$as_me:9857: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9858 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9859 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9860   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9861 fi
9862
9863     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9864       echo "$as_me:9864: checking for dnet_ntoa in -ldnet_stub" >&5
9865 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9866 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9867   echo $ECHO_N "(cached) $ECHO_C" >&6
9868 else
9869   ac_check_lib_save_LIBS=$LIBS
9870 LIBS="-ldnet_stub  $LIBS"
9871 cat >conftest.$ac_ext <<_ACEOF
9872 #line 9872 "configure"
9873 #include "confdefs.h"
9874
9875 /* Override any gcc2 internal prototype to avoid an error.  */
9876 #ifdef __cplusplus
9877 extern "C"
9878 #endif
9879 /* We use char because int might match the return type of a gcc2
9880    builtin and then its argument prototype would still apply.  */
9881 char dnet_ntoa ();
9882 int
9883 main ()
9884 {
9885 dnet_ntoa ();
9886   ;
9887   return 0;
9888 }
9889 _ACEOF
9890 rm -f conftest.$ac_objext conftest$ac_exeext
9891 if { (eval echo "$as_me:9891: \"$ac_link\"") >&5
9892   (eval $ac_link) 2>&5
9893   ac_status=$?
9894   echo "$as_me:9894: \$? = $ac_status" >&5
9895   (exit $ac_status); } &&
9896          { ac_try='test -s conftest$ac_exeext'
9897   { (eval echo "$as_me:9897: \"$ac_try\"") >&5
9898   (eval $ac_try) 2>&5
9899   ac_status=$?
9900   echo "$as_me:9900: \$? = $ac_status" >&5
9901   (exit $ac_status); }; }; then
9902   ac_cv_lib_dnet_stub_dnet_ntoa=yes
9903 else
9904   echo "$as_me: failed program was:" >&5
9905 cat conftest.$ac_ext >&5
9906 ac_cv_lib_dnet_stub_dnet_ntoa=no
9907 fi
9908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9909 LIBS=$ac_check_lib_save_LIBS
9910 fi
9911 echo "$as_me:9911: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9912 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9913 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9914   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9915 fi
9916
9917     fi
9918 fi
9919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9920     LIBS="$ac_xsave_LIBS"
9921
9922     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9923     # to get the SysV transport functions.
9924     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9925     # needs -lnsl.
9926     # The nsl library prevents programs from opening the X display
9927     # on Irix 5.2, according to T.E. Dickey.
9928     # The functions gethostbyname, getservbyname, and inet_addr are
9929     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9930     echo "$as_me:9930: checking for gethostbyname" >&5
9931 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9932 if test "${ac_cv_func_gethostbyname+set}" = set; then
9933   echo $ECHO_N "(cached) $ECHO_C" >&6
9934 else
9935   cat >conftest.$ac_ext <<_ACEOF
9936 #line 9936 "configure"
9937 #include "confdefs.h"
9938 /* System header to define __stub macros and hopefully few prototypes,
9939     which can conflict with char gethostbyname (); below.  */
9940 #include <assert.h>
9941 /* Override any gcc2 internal prototype to avoid an error.  */
9942 #ifdef __cplusplus
9943 extern "C"
9944 #endif
9945 /* We use char because int might match the return type of a gcc2
9946    builtin and then its argument prototype would still apply.  */
9947 char gethostbyname ();
9948 char (*f) ();
9949
9950 int
9951 main ()
9952 {
9953 /* The GNU C library defines this for functions which it implements
9954     to always fail with ENOSYS.  Some functions are actually named
9955     something starting with __ and the normal name is an alias.  */
9956 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9957 choke me
9958 #else
9959 f = gethostbyname;
9960 #endif
9961
9962   ;
9963   return 0;
9964 }
9965 _ACEOF
9966 rm -f conftest.$ac_objext conftest$ac_exeext
9967 if { (eval echo "$as_me:9967: \"$ac_link\"") >&5
9968   (eval $ac_link) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); } &&
9972          { ac_try='test -s conftest$ac_exeext'
9973   { (eval echo "$as_me:9973: \"$ac_try\"") >&5
9974   (eval $ac_try) 2>&5
9975   ac_status=$?
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit $ac_status); }; }; then
9978   ac_cv_func_gethostbyname=yes
9979 else
9980   echo "$as_me: failed program was:" >&5
9981 cat conftest.$ac_ext >&5
9982 ac_cv_func_gethostbyname=no
9983 fi
9984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9985 fi
9986 echo "$as_me:9986: result: $ac_cv_func_gethostbyname" >&5
9987 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9988
9989     if test $ac_cv_func_gethostbyname = no; then
9990       echo "$as_me:9990: checking for gethostbyname in -lnsl" >&5
9991 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9992 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9993   echo $ECHO_N "(cached) $ECHO_C" >&6
9994 else
9995   ac_check_lib_save_LIBS=$LIBS
9996 LIBS="-lnsl  $LIBS"
9997 cat >conftest.$ac_ext <<_ACEOF
9998 #line 9998 "configure"
9999 #include "confdefs.h"
10000
10001 /* Override any gcc2 internal prototype to avoid an error.  */
10002 #ifdef __cplusplus
10003 extern "C"
10004 #endif
10005 /* We use char because int might match the return type of a gcc2
10006    builtin and then its argument prototype would still apply.  */
10007 char gethostbyname ();
10008 int
10009 main ()
10010 {
10011 gethostbyname ();
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext conftest$ac_exeext
10017 if { (eval echo "$as_me:10017: \"$ac_link\"") >&5
10018   (eval $ac_link) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest$ac_exeext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028   ac_cv_lib_nsl_gethostbyname=yes
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 ac_cv_lib_nsl_gethostbyname=no
10033 fi
10034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10035 LIBS=$ac_check_lib_save_LIBS
10036 fi
10037 echo "$as_me:10037: result: $ac_cv_lib_nsl_gethostbyname" >&5
10038 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10039 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10040   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10041 fi
10042
10043       if test $ac_cv_lib_nsl_gethostbyname = no; then
10044         echo "$as_me:10044: checking for gethostbyname in -lbsd" >&5
10045 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10046 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10047   echo $ECHO_N "(cached) $ECHO_C" >&6
10048 else
10049   ac_check_lib_save_LIBS=$LIBS
10050 LIBS="-lbsd  $LIBS"
10051 cat >conftest.$ac_ext <<_ACEOF
10052 #line 10052 "configure"
10053 #include "confdefs.h"
10054
10055 /* Override any gcc2 internal prototype to avoid an error.  */
10056 #ifdef __cplusplus
10057 extern "C"
10058 #endif
10059 /* We use char because int might match the return type of a gcc2
10060    builtin and then its argument prototype would still apply.  */
10061 char gethostbyname ();
10062 int
10063 main ()
10064 {
10065 gethostbyname ();
10066   ;
10067   return 0;
10068 }
10069 _ACEOF
10070 rm -f conftest.$ac_objext conftest$ac_exeext
10071 if { (eval echo "$as_me:10071: \"$ac_link\"") >&5
10072   (eval $ac_link) 2>&5
10073   ac_status=$?
10074   echo "$as_me:10074: \$? = $ac_status" >&5
10075   (exit $ac_status); } &&
10076          { ac_try='test -s conftest$ac_exeext'
10077   { (eval echo "$as_me:10077: \"$ac_try\"") >&5
10078   (eval $ac_try) 2>&5
10079   ac_status=$?
10080   echo "$as_me:10080: \$? = $ac_status" >&5
10081   (exit $ac_status); }; }; then
10082   ac_cv_lib_bsd_gethostbyname=yes
10083 else
10084   echo "$as_me: failed program was:" >&5
10085 cat conftest.$ac_ext >&5
10086 ac_cv_lib_bsd_gethostbyname=no
10087 fi
10088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10089 LIBS=$ac_check_lib_save_LIBS
10090 fi
10091 echo "$as_me:10091: result: $ac_cv_lib_bsd_gethostbyname" >&5
10092 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10093 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10094   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10095 fi
10096
10097       fi
10098     fi
10099
10100     # lieder@skyler.mavd.honeywell.com says without -lsocket,
10101     # socket/setsockopt and other routines are undefined under SCO ODT
10102     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
10103     # on later versions), says Simon Leinen: it contains gethostby*
10104     # variants that don't use the nameserver (or something).  -lsocket
10105     # must be given before -lnsl if both are needed.  We assume that
10106     # if connect needs -lnsl, so does gethostbyname.
10107     echo "$as_me:10107: checking for connect" >&5
10108 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10109 if test "${ac_cv_func_connect+set}" = set; then
10110   echo $ECHO_N "(cached) $ECHO_C" >&6
10111 else
10112   cat >conftest.$ac_ext <<_ACEOF
10113 #line 10113 "configure"
10114 #include "confdefs.h"
10115 /* System header to define __stub macros and hopefully few prototypes,
10116     which can conflict with char connect (); below.  */
10117 #include <assert.h>
10118 /* Override any gcc2 internal prototype to avoid an error.  */
10119 #ifdef __cplusplus
10120 extern "C"
10121 #endif
10122 /* We use char because int might match the return type of a gcc2
10123    builtin and then its argument prototype would still apply.  */
10124 char connect ();
10125 char (*f) ();
10126
10127 int
10128 main ()
10129 {
10130 /* The GNU C library defines this for functions which it implements
10131     to always fail with ENOSYS.  Some functions are actually named
10132     something starting with __ and the normal name is an alias.  */
10133 #if defined (__stub_connect) || defined (__stub___connect)
10134 choke me
10135 #else
10136 f = connect;
10137 #endif
10138
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 rm -f conftest.$ac_objext conftest$ac_exeext
10144 if { (eval echo "$as_me:10144: \"$ac_link\"") >&5
10145   (eval $ac_link) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -s conftest$ac_exeext'
10150   { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151   (eval $ac_try) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); }; }; then
10155   ac_cv_func_connect=yes
10156 else
10157   echo "$as_me: failed program was:" >&5
10158 cat conftest.$ac_ext >&5
10159 ac_cv_func_connect=no
10160 fi
10161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10162 fi
10163 echo "$as_me:10163: result: $ac_cv_func_connect" >&5
10164 echo "${ECHO_T}$ac_cv_func_connect" >&6
10165
10166     if test $ac_cv_func_connect = no; then
10167       echo "$as_me:10167: checking for connect in -lsocket" >&5
10168 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10169 if test "${ac_cv_lib_socket_connect+set}" = set; then
10170   echo $ECHO_N "(cached) $ECHO_C" >&6
10171 else
10172   ac_check_lib_save_LIBS=$LIBS
10173 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10174 cat >conftest.$ac_ext <<_ACEOF
10175 #line 10175 "configure"
10176 #include "confdefs.h"
10177
10178 /* Override any gcc2 internal prototype to avoid an error.  */
10179 #ifdef __cplusplus
10180 extern "C"
10181 #endif
10182 /* We use char because int might match the return type of a gcc2
10183    builtin and then its argument prototype would still apply.  */
10184 char connect ();
10185 int
10186 main ()
10187 {
10188 connect ();
10189   ;
10190   return 0;
10191 }
10192 _ACEOF
10193 rm -f conftest.$ac_objext conftest$ac_exeext
10194 if { (eval echo "$as_me:10194: \"$ac_link\"") >&5
10195   (eval $ac_link) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit $ac_status); } &&
10199          { ac_try='test -s conftest$ac_exeext'
10200   { (eval echo "$as_me:10200: \"$ac_try\"") >&5
10201   (eval $ac_try) 2>&5
10202   ac_status=$?
10203   echo "$as_me:10203: \$? = $ac_status" >&5
10204   (exit $ac_status); }; }; then
10205   ac_cv_lib_socket_connect=yes
10206 else
10207   echo "$as_me: failed program was:" >&5
10208 cat conftest.$ac_ext >&5
10209 ac_cv_lib_socket_connect=no
10210 fi
10211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10212 LIBS=$ac_check_lib_save_LIBS
10213 fi
10214 echo "$as_me:10214: result: $ac_cv_lib_socket_connect" >&5
10215 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10216 if test $ac_cv_lib_socket_connect = yes; then
10217   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10218 fi
10219
10220     fi
10221
10222     # Guillermo Gomez says -lposix is necessary on A/UX.
10223     echo "$as_me:10223: checking for remove" >&5
10224 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10225 if test "${ac_cv_func_remove+set}" = set; then
10226   echo $ECHO_N "(cached) $ECHO_C" >&6
10227 else
10228   cat >conftest.$ac_ext <<_ACEOF
10229 #line 10229 "configure"
10230 #include "confdefs.h"
10231 /* System header to define __stub macros and hopefully few prototypes,
10232     which can conflict with char remove (); below.  */
10233 #include <assert.h>
10234 /* Override any gcc2 internal prototype to avoid an error.  */
10235 #ifdef __cplusplus
10236 extern "C"
10237 #endif
10238 /* We use char because int might match the return type of a gcc2
10239    builtin and then its argument prototype would still apply.  */
10240 char remove ();
10241 char (*f) ();
10242
10243 int
10244 main ()
10245 {
10246 /* The GNU C library defines this for functions which it implements
10247     to always fail with ENOSYS.  Some functions are actually named
10248     something starting with __ and the normal name is an alias.  */
10249 #if defined (__stub_remove) || defined (__stub___remove)
10250 choke me
10251 #else
10252 f = remove;
10253 #endif
10254
10255   ;
10256   return 0;
10257 }
10258 _ACEOF
10259 rm -f conftest.$ac_objext conftest$ac_exeext
10260 if { (eval echo "$as_me:10260: \"$ac_link\"") >&5
10261   (eval $ac_link) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); } &&
10265          { ac_try='test -s conftest$ac_exeext'
10266   { (eval echo "$as_me:10266: \"$ac_try\"") >&5
10267   (eval $ac_try) 2>&5
10268   ac_status=$?
10269   echo "$as_me:10269: \$? = $ac_status" >&5
10270   (exit $ac_status); }; }; then
10271   ac_cv_func_remove=yes
10272 else
10273   echo "$as_me: failed program was:" >&5
10274 cat conftest.$ac_ext >&5
10275 ac_cv_func_remove=no
10276 fi
10277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10278 fi
10279 echo "$as_me:10279: result: $ac_cv_func_remove" >&5
10280 echo "${ECHO_T}$ac_cv_func_remove" >&6
10281
10282     if test $ac_cv_func_remove = no; then
10283       echo "$as_me:10283: checking for remove in -lposix" >&5
10284 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10285 if test "${ac_cv_lib_posix_remove+set}" = set; then
10286   echo $ECHO_N "(cached) $ECHO_C" >&6
10287 else
10288   ac_check_lib_save_LIBS=$LIBS
10289 LIBS="-lposix  $LIBS"
10290 cat >conftest.$ac_ext <<_ACEOF
10291 #line 10291 "configure"
10292 #include "confdefs.h"
10293
10294 /* Override any gcc2 internal prototype to avoid an error.  */
10295 #ifdef __cplusplus
10296 extern "C"
10297 #endif
10298 /* We use char because int might match the return type of a gcc2
10299    builtin and then its argument prototype would still apply.  */
10300 char remove ();
10301 int
10302 main ()
10303 {
10304 remove ();
10305   ;
10306   return 0;
10307 }
10308 _ACEOF
10309 rm -f conftest.$ac_objext conftest$ac_exeext
10310 if { (eval echo "$as_me:10310: \"$ac_link\"") >&5
10311   (eval $ac_link) 2>&5
10312   ac_status=$?
10313   echo "$as_me:10313: \$? = $ac_status" >&5
10314   (exit $ac_status); } &&
10315          { ac_try='test -s conftest$ac_exeext'
10316   { (eval echo "$as_me:10316: \"$ac_try\"") >&5
10317   (eval $ac_try) 2>&5
10318   ac_status=$?
10319   echo "$as_me:10319: \$? = $ac_status" >&5
10320   (exit $ac_status); }; }; then
10321   ac_cv_lib_posix_remove=yes
10322 else
10323   echo "$as_me: failed program was:" >&5
10324 cat conftest.$ac_ext >&5
10325 ac_cv_lib_posix_remove=no
10326 fi
10327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10328 LIBS=$ac_check_lib_save_LIBS
10329 fi
10330 echo "$as_me:10330: result: $ac_cv_lib_posix_remove" >&5
10331 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10332 if test $ac_cv_lib_posix_remove = yes; then
10333   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10334 fi
10335
10336     fi
10337
10338     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10339     echo "$as_me:10339: checking for shmat" >&5
10340 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10341 if test "${ac_cv_func_shmat+set}" = set; then
10342   echo $ECHO_N "(cached) $ECHO_C" >&6
10343 else
10344   cat >conftest.$ac_ext <<_ACEOF
10345 #line 10345 "configure"
10346 #include "confdefs.h"
10347 /* System header to define __stub macros and hopefully few prototypes,
10348     which can conflict with char shmat (); below.  */
10349 #include <assert.h>
10350 /* Override any gcc2 internal prototype to avoid an error.  */
10351 #ifdef __cplusplus
10352 extern "C"
10353 #endif
10354 /* We use char because int might match the return type of a gcc2
10355    builtin and then its argument prototype would still apply.  */
10356 char shmat ();
10357 char (*f) ();
10358
10359 int
10360 main ()
10361 {
10362 /* The GNU C library defines this for functions which it implements
10363     to always fail with ENOSYS.  Some functions are actually named
10364     something starting with __ and the normal name is an alias.  */
10365 #if defined (__stub_shmat) || defined (__stub___shmat)
10366 choke me
10367 #else
10368 f = shmat;
10369 #endif
10370
10371   ;
10372   return 0;
10373 }
10374 _ACEOF
10375 rm -f conftest.$ac_objext conftest$ac_exeext
10376 if { (eval echo "$as_me:10376: \"$ac_link\"") >&5
10377   (eval $ac_link) 2>&5
10378   ac_status=$?
10379   echo "$as_me:10379: \$? = $ac_status" >&5
10380   (exit $ac_status); } &&
10381          { ac_try='test -s conftest$ac_exeext'
10382   { (eval echo "$as_me:10382: \"$ac_try\"") >&5
10383   (eval $ac_try) 2>&5
10384   ac_status=$?
10385   echo "$as_me:10385: \$? = $ac_status" >&5
10386   (exit $ac_status); }; }; then
10387   ac_cv_func_shmat=yes
10388 else
10389   echo "$as_me: failed program was:" >&5
10390 cat conftest.$ac_ext >&5
10391 ac_cv_func_shmat=no
10392 fi
10393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10394 fi
10395 echo "$as_me:10395: result: $ac_cv_func_shmat" >&5
10396 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10397
10398     if test $ac_cv_func_shmat = no; then
10399       echo "$as_me:10399: checking for shmat in -lipc" >&5
10400 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10401 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10402   echo $ECHO_N "(cached) $ECHO_C" >&6
10403 else
10404   ac_check_lib_save_LIBS=$LIBS
10405 LIBS="-lipc  $LIBS"
10406 cat >conftest.$ac_ext <<_ACEOF
10407 #line 10407 "configure"
10408 #include "confdefs.h"
10409
10410 /* Override any gcc2 internal prototype to avoid an error.  */
10411 #ifdef __cplusplus
10412 extern "C"
10413 #endif
10414 /* We use char because int might match the return type of a gcc2
10415    builtin and then its argument prototype would still apply.  */
10416 char shmat ();
10417 int
10418 main ()
10419 {
10420 shmat ();
10421   ;
10422   return 0;
10423 }
10424 _ACEOF
10425 rm -f conftest.$ac_objext conftest$ac_exeext
10426 if { (eval echo "$as_me:10426: \"$ac_link\"") >&5
10427   (eval $ac_link) 2>&5
10428   ac_status=$?
10429   echo "$as_me:10429: \$? = $ac_status" >&5
10430   (exit $ac_status); } &&
10431          { ac_try='test -s conftest$ac_exeext'
10432   { (eval echo "$as_me:10432: \"$ac_try\"") >&5
10433   (eval $ac_try) 2>&5
10434   ac_status=$?
10435   echo "$as_me:10435: \$? = $ac_status" >&5
10436   (exit $ac_status); }; }; then
10437   ac_cv_lib_ipc_shmat=yes
10438 else
10439   echo "$as_me: failed program was:" >&5
10440 cat conftest.$ac_ext >&5
10441 ac_cv_lib_ipc_shmat=no
10442 fi
10443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10444 LIBS=$ac_check_lib_save_LIBS
10445 fi
10446 echo "$as_me:10446: result: $ac_cv_lib_ipc_shmat" >&5
10447 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10448 if test $ac_cv_lib_ipc_shmat = yes; then
10449   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10450 fi
10451
10452     fi
10453   fi
10454
10455   # Check for libraries that X11R6 Xt/Xaw programs need.
10456   ac_save_LDFLAGS=$LDFLAGS
10457   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10458   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10459   # check for ICE first), but we must link in the order -lSM -lICE or
10460   # we get undefined symbols.  So assume we have SM if we have ICE.
10461   # These have to be linked with before -lX11, unlike the other
10462   # libraries we check for below, so use a different variable.
10463   # John Interrante, Karl Berry
10464   echo "$as_me:10464: checking for IceConnectionNumber in -lICE" >&5
10465 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10466 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10467   echo $ECHO_N "(cached) $ECHO_C" >&6
10468 else
10469   ac_check_lib_save_LIBS=$LIBS
10470 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10471 cat >conftest.$ac_ext <<_ACEOF
10472 #line 10472 "configure"
10473 #include "confdefs.h"
10474
10475 /* Override any gcc2 internal prototype to avoid an error.  */
10476 #ifdef __cplusplus
10477 extern "C"
10478 #endif
10479 /* We use char because int might match the return type of a gcc2
10480    builtin and then its argument prototype would still apply.  */
10481 char IceConnectionNumber ();
10482 int
10483 main ()
10484 {
10485 IceConnectionNumber ();
10486   ;
10487   return 0;
10488 }
10489 _ACEOF
10490 rm -f conftest.$ac_objext conftest$ac_exeext
10491 if { (eval echo "$as_me:10491: \"$ac_link\"") >&5
10492   (eval $ac_link) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit $ac_status); } &&
10496          { ac_try='test -s conftest$ac_exeext'
10497   { (eval echo "$as_me:10497: \"$ac_try\"") >&5
10498   (eval $ac_try) 2>&5
10499   ac_status=$?
10500   echo "$as_me:10500: \$? = $ac_status" >&5
10501   (exit $ac_status); }; }; then
10502   ac_cv_lib_ICE_IceConnectionNumber=yes
10503 else
10504   echo "$as_me: failed program was:" >&5
10505 cat conftest.$ac_ext >&5
10506 ac_cv_lib_ICE_IceConnectionNumber=no
10507 fi
10508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10509 LIBS=$ac_check_lib_save_LIBS
10510 fi
10511 echo "$as_me:10511: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10512 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10513 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10514   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10515 fi
10516
10517   LDFLAGS=$ac_save_LDFLAGS
10518
10519 fi
10520
10521 cf_x_athena=${cf_x_athena:-Xaw}
10522
10523 echo "$as_me:10523: checking if you want to link with Xaw 3d library" >&5
10524 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10525 withval=
10526
10527 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10528 if test "${with_Xaw3d+set}" = set; then
10529   withval="$with_Xaw3d"
10530
10531 fi;
10532 if test "$withval" = yes ; then
10533         cf_x_athena=Xaw3d
10534         echo "$as_me:10534: result: yes" >&5
10535 echo "${ECHO_T}yes" >&6
10536 else
10537         echo "$as_me:10537: result: no" >&5
10538 echo "${ECHO_T}no" >&6
10539 fi
10540
10541 echo "$as_me:10541: checking if you want to link with neXT Athena library" >&5
10542 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10543 withval=
10544
10545 # Check whether --with-neXtaw or --without-neXtaw was given.
10546 if test "${with_neXtaw+set}" = set; then
10547   withval="$with_neXtaw"
10548
10549 fi;
10550 if test "$withval" = yes ; then
10551         cf_x_athena=neXtaw
10552         echo "$as_me:10552: result: yes" >&5
10553 echo "${ECHO_T}yes" >&6
10554 else
10555         echo "$as_me:10555: result: no" >&5
10556 echo "${ECHO_T}no" >&6
10557 fi
10558
10559 echo "$as_me:10559: checking if you want to link with Athena-Plus library" >&5
10560 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10561 withval=
10562
10563 # Check whether --with-XawPlus or --without-XawPlus was given.
10564 if test "${with_XawPlus+set}" = set; then
10565   withval="$with_XawPlus"
10566
10567 fi;
10568 if test "$withval" = yes ; then
10569         cf_x_athena=XawPlus
10570         echo "$as_me:10570: result: yes" >&5
10571 echo "${ECHO_T}yes" >&6
10572 else
10573         echo "$as_me:10573: result: no" >&5
10574 echo "${ECHO_T}no" >&6
10575 fi
10576
10577 cf_x_athena_lib=""
10578
10579 if test "$PKG_CONFIG" != none ; then
10580         cf_athena_list=
10581         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10582         for cf_athena_pkg in \
10583                 $cf_athena_list \
10584                 ${cf_x_athena} \
10585                 ${cf_x_athena}-devel \
10586                 lib${cf_x_athena} \
10587                 lib${cf_x_athena}-devel
10588         do
10589
10590 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10591         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
10592
10593 echo "${as_me:-configure}:10593: testing found package $cf_athena_pkg ..." 1>&5
10594
10595         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10596         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10597         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10598
10599 echo "${as_me:-configure}:10599: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10600
10601         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10602
10603 echo "${as_me:-configure}:10603: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10604
10605 cf_fix_cppflags=no
10606 cf_new_cflags=
10607 cf_new_cppflags=
10608 cf_new_extra_cppflags=
10609
10610 for cf_add_cflags in $cf_pkgconfig_incs
10611 do
10612 case $cf_fix_cppflags in
10613 no)
10614         case $cf_add_cflags in #(vi
10615         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10616                 case $cf_add_cflags in
10617                 -D*)
10618                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10619
10620                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10621                                 && test -z "${cf_tst_cflags}" \
10622                                 && cf_fix_cppflags=yes
10623
10624                         if test $cf_fix_cppflags = yes ; then
10625                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10626                                 continue
10627                         elif test "${cf_tst_cflags}" = "\"'" ; then
10628                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10629                                 continue
10630                         fi
10631                         ;;
10632                 esac
10633                 case "$CPPFLAGS" in
10634                 *$cf_add_cflags) #(vi
10635                         ;;
10636                 *) #(vi
10637                         case $cf_add_cflags in #(vi
10638                         -D*)
10639                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10640
10641 CPPFLAGS=`echo "$CPPFLAGS" | \
10642         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10643                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10644
10645                                 ;;
10646                         esac
10647                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10648                         ;;
10649                 esac
10650                 ;;
10651         *)
10652                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10653                 ;;
10654         esac
10655         ;;
10656 yes)
10657         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10658
10659         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10660
10661         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10662                 && test -z "${cf_tst_cflags}" \
10663                 && cf_fix_cppflags=no
10664         ;;
10665 esac
10666 done
10667
10668 if test -n "$cf_new_cflags" ; then
10669
10670         CFLAGS="$CFLAGS $cf_new_cflags"
10671 fi
10672
10673 if test -n "$cf_new_cppflags" ; then
10674
10675         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10676 fi
10677
10678 if test -n "$cf_new_extra_cppflags" ; then
10679
10680         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10681 fi
10682
10683         LIBS="$cf_pkgconfig_libs $LIBS"
10684
10685                         cf_x_athena_lib="$cf_pkgconfig_libs"
10686
10687 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10688
10689                         cat >>confdefs.h <<EOF
10690 #define $cf_x_athena_LIBS 1
10691 EOF
10692
10693 echo "$as_me:10693: checking for usable $cf_x_athena/Xmu package" >&5
10694 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10695 if test "${cf_cv_xaw_compat+set}" = set; then
10696   echo $ECHO_N "(cached) $ECHO_C" >&6
10697 else
10698
10699 cat >conftest.$ac_ext <<_ACEOF
10700 #line 10700 "configure"
10701 #include "confdefs.h"
10702
10703 #include <X11/Xmu/CharSet.h>
10704
10705 int
10706 main ()
10707 {
10708
10709 int check = XmuCompareISOLatin1("big", "small")
10710
10711   ;
10712   return 0;
10713 }
10714 _ACEOF
10715 rm -f conftest.$ac_objext conftest$ac_exeext
10716 if { (eval echo "$as_me:10716: \"$ac_link\"") >&5
10717   (eval $ac_link) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit $ac_status); } &&
10721          { ac_try='test -s conftest$ac_exeext'
10722   { (eval echo "$as_me:10722: \"$ac_try\"") >&5
10723   (eval $ac_try) 2>&5
10724   ac_status=$?
10725   echo "$as_me:10725: \$? = $ac_status" >&5
10726   (exit $ac_status); }; }; then
10727   cf_cv_xaw_compat=yes
10728 else
10729   echo "$as_me: failed program was:" >&5
10730 cat conftest.$ac_ext >&5
10731 cf_cv_xaw_compat=no
10732 fi
10733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10734 fi
10735 echo "$as_me:10735: result: $cf_cv_xaw_compat" >&5
10736 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10737
10738                         if test "$cf_cv_xaw_compat" = no
10739                         then
10740                                 # workaround for broken ".pc" files...
10741                                 case "$cf_x_athena_lib" in #(vi
10742                                 *-lXmu*) #(vi
10743                                         ;;
10744                                 *)
10745                                         test -n "$verbose" && echo "    work around broken package" 1>&6
10746
10747 echo "${as_me:-configure}:10747: testing work around broken package ..." 1>&5
10748
10749 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10750         test -n "$verbose" && echo "    found package xmu" 1>&6
10751
10752 echo "${as_me:-configure}:10752: testing found package xmu ..." 1>&5
10753
10754         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10755         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10756         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10757
10758 echo "${as_me:-configure}:10758: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10759
10760         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10761
10762 echo "${as_me:-configure}:10762: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10763
10764 cf_fix_cppflags=no
10765 cf_new_cflags=
10766 cf_new_cppflags=
10767 cf_new_extra_cppflags=
10768
10769 for cf_add_cflags in $cf_pkgconfig_incs
10770 do
10771 case $cf_fix_cppflags in
10772 no)
10773         case $cf_add_cflags in #(vi
10774         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10775                 case $cf_add_cflags in
10776                 -D*)
10777                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10778
10779                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10780                                 && test -z "${cf_tst_cflags}" \
10781                                 && cf_fix_cppflags=yes
10782
10783                         if test $cf_fix_cppflags = yes ; then
10784                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10785                                 continue
10786                         elif test "${cf_tst_cflags}" = "\"'" ; then
10787                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10788                                 continue
10789                         fi
10790                         ;;
10791                 esac
10792                 case "$CPPFLAGS" in
10793                 *$cf_add_cflags) #(vi
10794                         ;;
10795                 *) #(vi
10796                         case $cf_add_cflags in #(vi
10797                         -D*)
10798                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10799
10800 CPPFLAGS=`echo "$CPPFLAGS" | \
10801         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10802                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10803
10804                                 ;;
10805                         esac
10806                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10807                         ;;
10808                 esac
10809                 ;;
10810         *)
10811                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10812                 ;;
10813         esac
10814         ;;
10815 yes)
10816         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10817
10818         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10819
10820         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10821                 && test -z "${cf_tst_cflags}" \
10822                 && cf_fix_cppflags=no
10823         ;;
10824 esac
10825 done
10826
10827 if test -n "$cf_new_cflags" ; then
10828
10829         CFLAGS="$CFLAGS $cf_new_cflags"
10830 fi
10831
10832 if test -n "$cf_new_cppflags" ; then
10833
10834         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10835 fi
10836
10837 if test -n "$cf_new_extra_cppflags" ; then
10838
10839         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10840 fi
10841
10842         LIBS="$cf_pkgconfig_libs $LIBS"
10843         :
10844 else
10845
10846 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10847
10848 echo "${as_me:-configure}:10848: testing ...before $LIBS ..." 1>&5
10849
10850 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
10851 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10852
10853 echo "${as_me:-configure}:10853: testing ...after  $LIBS ..." 1>&5
10854
10855 fi
10856
10857                                         ;;
10858                                 esac
10859                         fi
10860
10861                         break
10862 else
10863         :
10864 fi
10865
10866         done
10867 fi
10868
10869 if test -z "$cf_x_athena_lib" ; then
10870
10871 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10872         test -n "$verbose" && echo "    found package Xext" 1>&6
10873
10874 echo "${as_me:-configure}:10874: testing found package Xext ..." 1>&5
10875
10876         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10877         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
10878         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10879
10880 echo "${as_me:-configure}:10880: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10881
10882         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10883
10884 echo "${as_me:-configure}:10884: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10885
10886 cf_fix_cppflags=no
10887 cf_new_cflags=
10888 cf_new_cppflags=
10889 cf_new_extra_cppflags=
10890
10891 for cf_add_cflags in $cf_pkgconfig_incs
10892 do
10893 case $cf_fix_cppflags in
10894 no)
10895         case $cf_add_cflags in #(vi
10896         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10897                 case $cf_add_cflags in
10898                 -D*)
10899                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10900
10901                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10902                                 && test -z "${cf_tst_cflags}" \
10903                                 && cf_fix_cppflags=yes
10904
10905                         if test $cf_fix_cppflags = yes ; then
10906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10907                                 continue
10908                         elif test "${cf_tst_cflags}" = "\"'" ; then
10909                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10910                                 continue
10911                         fi
10912                         ;;
10913                 esac
10914                 case "$CPPFLAGS" in
10915                 *$cf_add_cflags) #(vi
10916                         ;;
10917                 *) #(vi
10918                         case $cf_add_cflags in #(vi
10919                         -D*)
10920                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10921
10922 CPPFLAGS=`echo "$CPPFLAGS" | \
10923         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10924                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10925
10926                                 ;;
10927                         esac
10928                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10929                         ;;
10930                 esac
10931                 ;;
10932         *)
10933                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10934                 ;;
10935         esac
10936         ;;
10937 yes)
10938         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10939
10940         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10941
10942         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10943                 && test -z "${cf_tst_cflags}" \
10944                 && cf_fix_cppflags=no
10945         ;;
10946 esac
10947 done
10948
10949 if test -n "$cf_new_cflags" ; then
10950
10951         CFLAGS="$CFLAGS $cf_new_cflags"
10952 fi
10953
10954 if test -n "$cf_new_cppflags" ; then
10955
10956         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10957 fi
10958
10959 if test -n "$cf_new_extra_cppflags" ; then
10960
10961         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10962 fi
10963
10964         LIBS="$cf_pkgconfig_libs $LIBS"
10965         :
10966 else
10967
10968         echo "$as_me:10968: checking for XextCreateExtension in -lXext" >&5
10969 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10970 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10971   echo $ECHO_N "(cached) $ECHO_C" >&6
10972 else
10973   ac_check_lib_save_LIBS=$LIBS
10974 LIBS="-lXext  $LIBS"
10975 cat >conftest.$ac_ext <<_ACEOF
10976 #line 10976 "configure"
10977 #include "confdefs.h"
10978
10979 /* Override any gcc2 internal prototype to avoid an error.  */
10980 #ifdef __cplusplus
10981 extern "C"
10982 #endif
10983 /* We use char because int might match the return type of a gcc2
10984    builtin and then its argument prototype would still apply.  */
10985 char XextCreateExtension ();
10986 int
10987 main ()
10988 {
10989 XextCreateExtension ();
10990   ;
10991   return 0;
10992 }
10993 _ACEOF
10994 rm -f conftest.$ac_objext conftest$ac_exeext
10995 if { (eval echo "$as_me:10995: \"$ac_link\"") >&5
10996   (eval $ac_link) 2>&5
10997   ac_status=$?
10998   echo "$as_me:10998: \$? = $ac_status" >&5
10999   (exit $ac_status); } &&
11000          { ac_try='test -s conftest$ac_exeext'
11001   { (eval echo "$as_me:11001: \"$ac_try\"") >&5
11002   (eval $ac_try) 2>&5
11003   ac_status=$?
11004   echo "$as_me:11004: \$? = $ac_status" >&5
11005   (exit $ac_status); }; }; then
11006   ac_cv_lib_Xext_XextCreateExtension=yes
11007 else
11008   echo "$as_me: failed program was:" >&5
11009 cat conftest.$ac_ext >&5
11010 ac_cv_lib_Xext_XextCreateExtension=no
11011 fi
11012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11013 LIBS=$ac_check_lib_save_LIBS
11014 fi
11015 echo "$as_me:11015: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11016 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11017 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11018   LIBS="-lXext $LIBS"
11019 fi
11020
11021 fi
11022
11023 cf_have_X_LIBS=no
11024
11025 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11026         test -n "$verbose" && echo "    found package xt" 1>&6
11027
11028 echo "${as_me:-configure}:11028: testing found package xt ..." 1>&5
11029
11030         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11031         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11032         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11033
11034 echo "${as_me:-configure}:11034: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11035
11036         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
11037
11038 echo "${as_me:-configure}:11038: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11039
11040 cf_fix_cppflags=no
11041 cf_new_cflags=
11042 cf_new_cppflags=
11043 cf_new_extra_cppflags=
11044
11045 for cf_add_cflags in $cf_pkgconfig_incs
11046 do
11047 case $cf_fix_cppflags in
11048 no)
11049         case $cf_add_cflags in #(vi
11050         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11051                 case $cf_add_cflags in
11052                 -D*)
11053                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11054
11055                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11056                                 && test -z "${cf_tst_cflags}" \
11057                                 && cf_fix_cppflags=yes
11058
11059                         if test $cf_fix_cppflags = yes ; then
11060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11061                                 continue
11062                         elif test "${cf_tst_cflags}" = "\"'" ; then
11063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11064                                 continue
11065                         fi
11066                         ;;
11067                 esac
11068                 case "$CPPFLAGS" in
11069                 *$cf_add_cflags) #(vi
11070                         ;;
11071                 *) #(vi
11072                         case $cf_add_cflags in #(vi
11073                         -D*)
11074                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11075
11076 CPPFLAGS=`echo "$CPPFLAGS" | \
11077         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11078                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11079
11080                                 ;;
11081                         esac
11082                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11083                         ;;
11084                 esac
11085                 ;;
11086         *)
11087                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11088                 ;;
11089         esac
11090         ;;
11091 yes)
11092         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11093
11094         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11095
11096         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11097                 && test -z "${cf_tst_cflags}" \
11098                 && cf_fix_cppflags=no
11099         ;;
11100 esac
11101 done
11102
11103 if test -n "$cf_new_cflags" ; then
11104
11105         CFLAGS="$CFLAGS $cf_new_cflags"
11106 fi
11107
11108 if test -n "$cf_new_cppflags" ; then
11109
11110         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11111 fi
11112
11113 if test -n "$cf_new_extra_cppflags" ; then
11114
11115         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11116 fi
11117
11118         LIBS="$cf_pkgconfig_libs $LIBS"
11119
11120         case "x$LIBS" in #(vi
11121         *-lX11*) #(vi
11122                 ;;
11123         *)
11124 # we have an "xt" package, but it may omit Xt's dependency on X11
11125 echo "$as_me:11125: checking for usable X dependency" >&5
11126 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11127 if test "${cf_cv_xt_x11_compat+set}" = set; then
11128   echo $ECHO_N "(cached) $ECHO_C" >&6
11129 else
11130
11131 cat >conftest.$ac_ext <<_ACEOF
11132 #line 11132 "configure"
11133 #include "confdefs.h"
11134
11135 #include <X11/Xlib.h>
11136
11137 int
11138 main ()
11139 {
11140
11141         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11142         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11143         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11144         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11145
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 rm -f conftest.$ac_objext conftest$ac_exeext
11151 if { (eval echo "$as_me:11151: \"$ac_link\"") >&5
11152   (eval $ac_link) 2>&5
11153   ac_status=$?
11154   echo "$as_me:11154: \$? = $ac_status" >&5
11155   (exit $ac_status); } &&
11156          { ac_try='test -s conftest$ac_exeext'
11157   { (eval echo "$as_me:11157: \"$ac_try\"") >&5
11158   (eval $ac_try) 2>&5
11159   ac_status=$?
11160   echo "$as_me:11160: \$? = $ac_status" >&5
11161   (exit $ac_status); }; }; then
11162   cf_cv_xt_x11_compat=yes
11163 else
11164   echo "$as_me: failed program was:" >&5
11165 cat conftest.$ac_ext >&5
11166 cf_cv_xt_x11_compat=no
11167 fi
11168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11169 fi
11170 echo "$as_me:11170: result: $cf_cv_xt_x11_compat" >&5
11171 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11172                 if test "$cf_cv_xt_x11_compat" = no
11173                 then
11174                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11175
11176 echo "${as_me:-configure}:11176: testing work around broken X11 dependency ..." 1>&5
11177
11178                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11179
11180 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11181         test -n "$verbose" && echo "    found package x11" 1>&6
11182
11183 echo "${as_me:-configure}:11183: testing found package x11 ..." 1>&5
11184
11185         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11186         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11187         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11188
11189 echo "${as_me:-configure}:11189: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11190
11191         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11192
11193 echo "${as_me:-configure}:11193: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11194
11195 cf_fix_cppflags=no
11196 cf_new_cflags=
11197 cf_new_cppflags=
11198 cf_new_extra_cppflags=
11199
11200 for cf_add_cflags in $cf_pkgconfig_incs
11201 do
11202 case $cf_fix_cppflags in
11203 no)
11204         case $cf_add_cflags in #(vi
11205         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11206                 case $cf_add_cflags in
11207                 -D*)
11208                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11209
11210                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11211                                 && test -z "${cf_tst_cflags}" \
11212                                 && cf_fix_cppflags=yes
11213
11214                         if test $cf_fix_cppflags = yes ; then
11215                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11216                                 continue
11217                         elif test "${cf_tst_cflags}" = "\"'" ; then
11218                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11219                                 continue
11220                         fi
11221                         ;;
11222                 esac
11223                 case "$CPPFLAGS" in
11224                 *$cf_add_cflags) #(vi
11225                         ;;
11226                 *) #(vi
11227                         case $cf_add_cflags in #(vi
11228                         -D*)
11229                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11230
11231 CPPFLAGS=`echo "$CPPFLAGS" | \
11232         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11233                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11234
11235                                 ;;
11236                         esac
11237                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11238                         ;;
11239                 esac
11240                 ;;
11241         *)
11242                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11243                 ;;
11244         esac
11245         ;;
11246 yes)
11247         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11248
11249         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11250
11251         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11252                 && test -z "${cf_tst_cflags}" \
11253                 && cf_fix_cppflags=no
11254         ;;
11255 esac
11256 done
11257
11258 if test -n "$cf_new_cflags" ; then
11259
11260         CFLAGS="$CFLAGS $cf_new_cflags"
11261 fi
11262
11263 if test -n "$cf_new_cppflags" ; then
11264
11265         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11266 fi
11267
11268 if test -n "$cf_new_extra_cppflags" ; then
11269
11270         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11271 fi
11272
11273         LIBS="$cf_pkgconfig_libs $LIBS"
11274         :
11275 else
11276
11277 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11278
11279 echo "${as_me:-configure}:11279: testing ...before $LIBS ..." 1>&5
11280
11281 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
11282 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11283
11284 echo "${as_me:-configure}:11284: testing ...after  $LIBS ..." 1>&5
11285
11286 fi
11287
11288                 fi
11289                 ;;
11290         esac
11291
11292 echo "$as_me:11292: checking for usable X Toolkit package" >&5
11293 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11294 if test "${cf_cv_xt_ice_compat+set}" = set; then
11295   echo $ECHO_N "(cached) $ECHO_C" >&6
11296 else
11297
11298 cat >conftest.$ac_ext <<_ACEOF
11299 #line 11299 "configure"
11300 #include "confdefs.h"
11301
11302 #include <X11/Shell.h>
11303
11304 int
11305 main ()
11306 {
11307 int num = IceConnectionNumber(0)
11308
11309   ;
11310   return 0;
11311 }
11312 _ACEOF
11313 rm -f conftest.$ac_objext conftest$ac_exeext
11314 if { (eval echo "$as_me:11314: \"$ac_link\"") >&5
11315   (eval $ac_link) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit $ac_status); } &&
11319          { ac_try='test -s conftest$ac_exeext'
11320   { (eval echo "$as_me:11320: \"$ac_try\"") >&5
11321   (eval $ac_try) 2>&5
11322   ac_status=$?
11323   echo "$as_me:11323: \$? = $ac_status" >&5
11324   (exit $ac_status); }; }; then
11325   cf_cv_xt_ice_compat=yes
11326 else
11327   echo "$as_me: failed program was:" >&5
11328 cat conftest.$ac_ext >&5
11329 cf_cv_xt_ice_compat=no
11330 fi
11331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11332 fi
11333 echo "$as_me:11333: result: $cf_cv_xt_ice_compat" >&5
11334 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11335
11336         if test "$cf_cv_xt_ice_compat" = no
11337         then
11338                 # workaround for broken ".pc" files used for X Toolkit.
11339                 case "x$X_PRE_LIBS" in #(vi
11340                 *-lICE*)
11341                         case "x$LIBS" in #(vi
11342                         *-lICE*) #(vi
11343                                 ;;
11344                         *)
11345                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11346
11347 echo "${as_me:-configure}:11347: testing work around broken ICE dependency ..." 1>&5
11348
11349 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11350         test -n "$verbose" && echo "    found package ice" 1>&6
11351
11352 echo "${as_me:-configure}:11352: testing found package ice ..." 1>&5
11353
11354         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11355         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11356         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11357
11358 echo "${as_me:-configure}:11358: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11359
11360         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11361
11362 echo "${as_me:-configure}:11362: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11363
11364 cf_fix_cppflags=no
11365 cf_new_cflags=
11366 cf_new_cppflags=
11367 cf_new_extra_cppflags=
11368
11369 for cf_add_cflags in $cf_pkgconfig_incs
11370 do
11371 case $cf_fix_cppflags in
11372 no)
11373         case $cf_add_cflags in #(vi
11374         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11375                 case $cf_add_cflags in
11376                 -D*)
11377                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11378
11379                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11380                                 && test -z "${cf_tst_cflags}" \
11381                                 && cf_fix_cppflags=yes
11382
11383                         if test $cf_fix_cppflags = yes ; then
11384                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11385                                 continue
11386                         elif test "${cf_tst_cflags}" = "\"'" ; then
11387                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11388                                 continue
11389                         fi
11390                         ;;
11391                 esac
11392                 case "$CPPFLAGS" in
11393                 *$cf_add_cflags) #(vi
11394                         ;;
11395                 *) #(vi
11396                         case $cf_add_cflags in #(vi
11397                         -D*)
11398                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11399
11400 CPPFLAGS=`echo "$CPPFLAGS" | \
11401         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11402                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11403
11404                                 ;;
11405                         esac
11406                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11407                         ;;
11408                 esac
11409                 ;;
11410         *)
11411                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11412                 ;;
11413         esac
11414         ;;
11415 yes)
11416         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11417
11418         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11419
11420         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11421                 && test -z "${cf_tst_cflags}" \
11422                 && cf_fix_cppflags=no
11423         ;;
11424 esac
11425 done
11426
11427 if test -n "$cf_new_cflags" ; then
11428
11429         CFLAGS="$CFLAGS $cf_new_cflags"
11430 fi
11431
11432 if test -n "$cf_new_cppflags" ; then
11433
11434         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11435 fi
11436
11437 if test -n "$cf_new_extra_cppflags" ; then
11438
11439         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11440 fi
11441
11442         LIBS="$cf_pkgconfig_libs $LIBS"
11443
11444 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11445         test -n "$verbose" && echo "    found package sm" 1>&6
11446
11447 echo "${as_me:-configure}:11447: testing found package sm ..." 1>&5
11448
11449         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11450         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11451         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11452
11453 echo "${as_me:-configure}:11453: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11454
11455         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11456
11457 echo "${as_me:-configure}:11457: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11458
11459 cf_fix_cppflags=no
11460 cf_new_cflags=
11461 cf_new_cppflags=
11462 cf_new_extra_cppflags=
11463
11464 for cf_add_cflags in $cf_pkgconfig_incs
11465 do
11466 case $cf_fix_cppflags in
11467 no)
11468         case $cf_add_cflags in #(vi
11469         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11470                 case $cf_add_cflags in
11471                 -D*)
11472                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11473
11474                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11475                                 && test -z "${cf_tst_cflags}" \
11476                                 && cf_fix_cppflags=yes
11477
11478                         if test $cf_fix_cppflags = yes ; then
11479                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11480                                 continue
11481                         elif test "${cf_tst_cflags}" = "\"'" ; then
11482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11483                                 continue
11484                         fi
11485                         ;;
11486                 esac
11487                 case "$CPPFLAGS" in
11488                 *$cf_add_cflags) #(vi
11489                         ;;
11490                 *) #(vi
11491                         case $cf_add_cflags in #(vi
11492                         -D*)
11493                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11494
11495 CPPFLAGS=`echo "$CPPFLAGS" | \
11496         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11497                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11498
11499                                 ;;
11500                         esac
11501                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11502                         ;;
11503                 esac
11504                 ;;
11505         *)
11506                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11507                 ;;
11508         esac
11509         ;;
11510 yes)
11511         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11512
11513         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11514
11515         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11516                 && test -z "${cf_tst_cflags}" \
11517                 && cf_fix_cppflags=no
11518         ;;
11519 esac
11520 done
11521
11522 if test -n "$cf_new_cflags" ; then
11523
11524         CFLAGS="$CFLAGS $cf_new_cflags"
11525 fi
11526
11527 if test -n "$cf_new_cppflags" ; then
11528
11529         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11530 fi
11531
11532 if test -n "$cf_new_extra_cppflags" ; then
11533
11534         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11535 fi
11536
11537         LIBS="$cf_pkgconfig_libs $LIBS"
11538         :
11539 else
11540         :
11541 fi
11542
11543 else
11544
11545 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11546
11547 echo "${as_me:-configure}:11547: testing ...before $LIBS ..." 1>&5
11548
11549 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
11550 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11551
11552 echo "${as_me:-configure}:11552: testing ...after  $LIBS ..." 1>&5
11553
11554 fi
11555
11556                                 ;;
11557                         esac
11558                         ;;
11559                 esac
11560         fi
11561
11562         cf_have_X_LIBS=yes
11563
11564 else
11565
11566         LDFLAGS="$X_LIBS $LDFLAGS"
11567
11568 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
11569
11570 echo "${as_me:-configure}:11570: testing checking additions to CFLAGS ..." 1>&5
11571
11572 cf_check_cflags="$CFLAGS"
11573 cf_check_cppflags="$CPPFLAGS"
11574
11575 cf_fix_cppflags=no
11576 cf_new_cflags=
11577 cf_new_cppflags=
11578 cf_new_extra_cppflags=
11579
11580 for cf_add_cflags in $X_CFLAGS
11581 do
11582 case $cf_fix_cppflags in
11583 no)
11584         case $cf_add_cflags in #(vi
11585         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11586                 case $cf_add_cflags in
11587                 -D*)
11588                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11589
11590                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11591                                 && test -z "${cf_tst_cflags}" \
11592                                 && cf_fix_cppflags=yes
11593
11594                         if test $cf_fix_cppflags = yes ; then
11595                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11596                                 continue
11597                         elif test "${cf_tst_cflags}" = "\"'" ; then
11598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11599                                 continue
11600                         fi
11601                         ;;
11602                 esac
11603                 case "$CPPFLAGS" in
11604                 *$cf_add_cflags) #(vi
11605                         ;;
11606                 *) #(vi
11607                         case $cf_add_cflags in #(vi
11608                         -D*)
11609                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11610
11611 CPPFLAGS=`echo "$CPPFLAGS" | \
11612         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11613                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11614
11615                                 ;;
11616                         esac
11617                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11618                         ;;
11619                 esac
11620                 ;;
11621         *)
11622                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11623                 ;;
11624         esac
11625         ;;
11626 yes)
11627         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11628
11629         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11630
11631         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11632                 && test -z "${cf_tst_cflags}" \
11633                 && cf_fix_cppflags=no
11634         ;;
11635 esac
11636 done
11637
11638 if test -n "$cf_new_cflags" ; then
11639         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11640
11641 echo "${as_me:-configure}:11641: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11642
11643         CFLAGS="$CFLAGS $cf_new_cflags"
11644 fi
11645
11646 if test -n "$cf_new_cppflags" ; then
11647         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11648
11649 echo "${as_me:-configure}:11649: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11650
11651         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11652 fi
11653
11654 if test -n "$cf_new_extra_cppflags" ; then
11655         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11656
11657 echo "${as_me:-configure}:11657: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11658
11659         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11660 fi
11661
11662 if test "$cf_check_cflags" != "$CFLAGS" ; then
11663 cat >conftest.$ac_ext <<_ACEOF
11664 #line 11664 "configure"
11665 #include "confdefs.h"
11666 #include <stdio.h>
11667 int
11668 main ()
11669 {
11670 printf("Hello world");
11671   ;
11672   return 0;
11673 }
11674 _ACEOF
11675 rm -f conftest.$ac_objext conftest$ac_exeext
11676 if { (eval echo "$as_me:11676: \"$ac_link\"") >&5
11677   (eval $ac_link) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit $ac_status); } &&
11681          { ac_try='test -s conftest$ac_exeext'
11682   { (eval echo "$as_me:11682: \"$ac_try\"") >&5
11683   (eval $ac_try) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit $ac_status); }; }; then
11687   :
11688 else
11689   echo "$as_me: failed program was:" >&5
11690 cat conftest.$ac_ext >&5
11691 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11692
11693 echo "${as_me:-configure}:11693: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11694
11695          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11696                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
11697
11698 echo "${as_me:-configure}:11698: testing but keeping change to \$CPPFLAGS ..." 1>&5
11699
11700          fi
11701          CFLAGS="$cf_check_flags"
11702 fi
11703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11704 fi
11705
11706         echo "$as_me:11706: checking for XOpenDisplay" >&5
11707 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11708 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11709   echo $ECHO_N "(cached) $ECHO_C" >&6
11710 else
11711   cat >conftest.$ac_ext <<_ACEOF
11712 #line 11712 "configure"
11713 #include "confdefs.h"
11714 /* System header to define __stub macros and hopefully few prototypes,
11715     which can conflict with char XOpenDisplay (); below.  */
11716 #include <assert.h>
11717 /* Override any gcc2 internal prototype to avoid an error.  */
11718 #ifdef __cplusplus
11719 extern "C"
11720 #endif
11721 /* We use char because int might match the return type of a gcc2
11722    builtin and then its argument prototype would still apply.  */
11723 char XOpenDisplay ();
11724 char (*f) ();
11725
11726 int
11727 main ()
11728 {
11729 /* The GNU C library defines this for functions which it implements
11730     to always fail with ENOSYS.  Some functions are actually named
11731     something starting with __ and the normal name is an alias.  */
11732 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11733 choke me
11734 #else
11735 f = XOpenDisplay;
11736 #endif
11737
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 rm -f conftest.$ac_objext conftest$ac_exeext
11743 if { (eval echo "$as_me:11743: \"$ac_link\"") >&5
11744   (eval $ac_link) 2>&5
11745   ac_status=$?
11746   echo "$as_me:11746: \$? = $ac_status" >&5
11747   (exit $ac_status); } &&
11748          { ac_try='test -s conftest$ac_exeext'
11749   { (eval echo "$as_me:11749: \"$ac_try\"") >&5
11750   (eval $ac_try) 2>&5
11751   ac_status=$?
11752   echo "$as_me:11752: \$? = $ac_status" >&5
11753   (exit $ac_status); }; }; then
11754   ac_cv_func_XOpenDisplay=yes
11755 else
11756   echo "$as_me: failed program was:" >&5
11757 cat conftest.$ac_ext >&5
11758 ac_cv_func_XOpenDisplay=no
11759 fi
11760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11761 fi
11762 echo "$as_me:11762: result: $ac_cv_func_XOpenDisplay" >&5
11763 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11764 if test $ac_cv_func_XOpenDisplay = yes; then
11765   :
11766 else
11767
11768         echo "$as_me:11768: checking for XOpenDisplay in -lX11" >&5
11769 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11770 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11771   echo $ECHO_N "(cached) $ECHO_C" >&6
11772 else
11773   ac_check_lib_save_LIBS=$LIBS
11774 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11775 cat >conftest.$ac_ext <<_ACEOF
11776 #line 11776 "configure"
11777 #include "confdefs.h"
11778
11779 /* Override any gcc2 internal prototype to avoid an error.  */
11780 #ifdef __cplusplus
11781 extern "C"
11782 #endif
11783 /* We use char because int might match the return type of a gcc2
11784    builtin and then its argument prototype would still apply.  */
11785 char XOpenDisplay ();
11786 int
11787 main ()
11788 {
11789 XOpenDisplay ();
11790   ;
11791   return 0;
11792 }
11793 _ACEOF
11794 rm -f conftest.$ac_objext conftest$ac_exeext
11795 if { (eval echo "$as_me:11795: \"$ac_link\"") >&5
11796   (eval $ac_link) 2>&5
11797   ac_status=$?
11798   echo "$as_me:11798: \$? = $ac_status" >&5
11799   (exit $ac_status); } &&
11800          { ac_try='test -s conftest$ac_exeext'
11801   { (eval echo "$as_me:11801: \"$ac_try\"") >&5
11802   (eval $ac_try) 2>&5
11803   ac_status=$?
11804   echo "$as_me:11804: \$? = $ac_status" >&5
11805   (exit $ac_status); }; }; then
11806   ac_cv_lib_X11_XOpenDisplay=yes
11807 else
11808   echo "$as_me: failed program was:" >&5
11809 cat conftest.$ac_ext >&5
11810 ac_cv_lib_X11_XOpenDisplay=no
11811 fi
11812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11813 LIBS=$ac_check_lib_save_LIBS
11814 fi
11815 echo "$as_me:11815: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11816 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11817 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
11818   LIBS="-lX11 $LIBS"
11819 fi
11820
11821 fi
11822
11823         echo "$as_me:11823: checking for XtAppInitialize" >&5
11824 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11825 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11826   echo $ECHO_N "(cached) $ECHO_C" >&6
11827 else
11828   cat >conftest.$ac_ext <<_ACEOF
11829 #line 11829 "configure"
11830 #include "confdefs.h"
11831 /* System header to define __stub macros and hopefully few prototypes,
11832     which can conflict with char XtAppInitialize (); below.  */
11833 #include <assert.h>
11834 /* Override any gcc2 internal prototype to avoid an error.  */
11835 #ifdef __cplusplus
11836 extern "C"
11837 #endif
11838 /* We use char because int might match the return type of a gcc2
11839    builtin and then its argument prototype would still apply.  */
11840 char XtAppInitialize ();
11841 char (*f) ();
11842
11843 int
11844 main ()
11845 {
11846 /* The GNU C library defines this for functions which it implements
11847     to always fail with ENOSYS.  Some functions are actually named
11848     something starting with __ and the normal name is an alias.  */
11849 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11850 choke me
11851 #else
11852 f = XtAppInitialize;
11853 #endif
11854
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext conftest$ac_exeext
11860 if { (eval echo "$as_me:11860: \"$ac_link\"") >&5
11861   (eval $ac_link) 2>&5
11862   ac_status=$?
11863   echo "$as_me:11863: \$? = $ac_status" >&5
11864   (exit $ac_status); } &&
11865          { ac_try='test -s conftest$ac_exeext'
11866   { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867   (eval $ac_try) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); }; }; then
11871   ac_cv_func_XtAppInitialize=yes
11872 else
11873   echo "$as_me: failed program was:" >&5
11874 cat conftest.$ac_ext >&5
11875 ac_cv_func_XtAppInitialize=no
11876 fi
11877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11878 fi
11879 echo "$as_me:11879: result: $ac_cv_func_XtAppInitialize" >&5
11880 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11881 if test $ac_cv_func_XtAppInitialize = yes; then
11882   :
11883 else
11884
11885         echo "$as_me:11885: checking for XtAppInitialize in -lXt" >&5
11886 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11887 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11888   echo $ECHO_N "(cached) $ECHO_C" >&6
11889 else
11890   ac_check_lib_save_LIBS=$LIBS
11891 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11892 cat >conftest.$ac_ext <<_ACEOF
11893 #line 11893 "configure"
11894 #include "confdefs.h"
11895
11896 /* Override any gcc2 internal prototype to avoid an error.  */
11897 #ifdef __cplusplus
11898 extern "C"
11899 #endif
11900 /* We use char because int might match the return type of a gcc2
11901    builtin and then its argument prototype would still apply.  */
11902 char XtAppInitialize ();
11903 int
11904 main ()
11905 {
11906 XtAppInitialize ();
11907   ;
11908   return 0;
11909 }
11910 _ACEOF
11911 rm -f conftest.$ac_objext conftest$ac_exeext
11912 if { (eval echo "$as_me:11912: \"$ac_link\"") >&5
11913   (eval $ac_link) 2>&5
11914   ac_status=$?
11915   echo "$as_me:11915: \$? = $ac_status" >&5
11916   (exit $ac_status); } &&
11917          { ac_try='test -s conftest$ac_exeext'
11918   { (eval echo "$as_me:11918: \"$ac_try\"") >&5
11919   (eval $ac_try) 2>&5
11920   ac_status=$?
11921   echo "$as_me:11921: \$? = $ac_status" >&5
11922   (exit $ac_status); }; }; then
11923   ac_cv_lib_Xt_XtAppInitialize=yes
11924 else
11925   echo "$as_me: failed program was:" >&5
11926 cat conftest.$ac_ext >&5
11927 ac_cv_lib_Xt_XtAppInitialize=no
11928 fi
11929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11930 LIBS=$ac_check_lib_save_LIBS
11931 fi
11932 echo "$as_me:11932: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11933 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11934 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
11935   cat >>confdefs.h <<\EOF
11936 #define HAVE_LIBXT 1
11937 EOF
11938
11939                  cf_have_X_LIBS=Xt
11940                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11941 fi
11942
11943 fi
11944
11945 fi
11946
11947 if test $cf_have_X_LIBS = no ; then
11948         { echo "$as_me:11948: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11949 test program.  You will have to check and add the proper libraries by hand
11950 to makefile." >&5
11951 echo "$as_me: 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." >&2;}
11954 fi
11955
11956 cf_x_athena_root=$cf_x_athena
11957 cf_x_athena_inc=""
11958
11959 for cf_path in default \
11960         /usr/contrib/X11R6 \
11961         /usr/contrib/X11R5 \
11962         /usr/lib/X11R5 \
11963         /usr/local
11964 do
11965         if test -z "$cf_x_athena_inc" ; then
11966                 cf_save="$CPPFLAGS"
11967                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
11968                 if test $cf_path != default ; then
11969                         CPPFLAGS="$cf_save -I$cf_path/include"
11970                         echo "$as_me:11970: checking for $cf_test in $cf_path" >&5
11971 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
11972                 else
11973                         echo "$as_me:11973: checking for $cf_test" >&5
11974 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
11975                 fi
11976                 cat >conftest.$ac_ext <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11979
11980 #include <X11/Intrinsic.h>
11981 #include <$cf_test>
11982 int
11983 main ()
11984 {
11985
11986   ;
11987   return 0;
11988 }
11989 _ACEOF
11990 rm -f conftest.$ac_objext
11991 if { (eval echo "$as_me:11991: \"$ac_compile\"") >&5
11992   (eval $ac_compile) 2>&5
11993   ac_status=$?
11994   echo "$as_me:11994: \$? = $ac_status" >&5
11995   (exit $ac_status); } &&
11996          { ac_try='test -s conftest.$ac_objext'
11997   { (eval echo "$as_me:11997: \"$ac_try\"") >&5
11998   (eval $ac_try) 2>&5
11999   ac_status=$?
12000   echo "$as_me:12000: \$? = $ac_status" >&5
12001   (exit $ac_status); }; }; then
12002   cf_result=yes
12003 else
12004   echo "$as_me: failed program was:" >&5
12005 cat conftest.$ac_ext >&5
12006 cf_result=no
12007 fi
12008 rm -f conftest.$ac_objext conftest.$ac_ext
12009                 echo "$as_me:12009: result: $cf_result" >&5
12010 echo "${ECHO_T}$cf_result" >&6
12011                 if test "$cf_result" = yes ; then
12012                         cf_x_athena_inc=$cf_path
12013                         break
12014                 else
12015                         CPPFLAGS="$cf_save"
12016                 fi
12017         fi
12018 done
12019
12020 if test -z "$cf_x_athena_inc" ; then
12021         { echo "$as_me:12021: WARNING: Unable to successfully find Athena header files with test program" >&5
12022 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12023 elif test "$cf_x_athena_inc" != default ; then
12024         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12025 fi
12026
12027 cf_x_athena_root=$cf_x_athena
12028 cf_x_athena_lib=""
12029
12030 for cf_path in default \
12031         /usr/contrib/X11R6 \
12032         /usr/contrib/X11R5 \
12033         /usr/lib/X11R5 \
12034         /usr/local
12035 do
12036         for cf_lib in \
12037                 "-l$cf_x_athena_root -lXmu" \
12038                 "-l$cf_x_athena_root -lXpm -lXmu" \
12039                 "-l${cf_x_athena_root}_s -lXmu_s"
12040         do
12041                 if test -z "$cf_x_athena_lib" ; then
12042                         cf_save="$LIBS"
12043                         cf_test=XawSimpleMenuAddGlobalActions
12044                         if test $cf_path != default ; then
12045                                 LIBS="-L$cf_path/lib $cf_lib $LIBS"
12046                                 echo "$as_me:12046: checking for $cf_lib in $cf_path" >&5
12047 echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
12048                         else
12049                                 LIBS="$cf_lib $LIBS"
12050                                 echo "$as_me:12050: checking for $cf_test in $cf_lib" >&5
12051 echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
12052                         fi
12053                         cat >conftest.$ac_ext <<_ACEOF
12054 #line 12054 "configure"
12055 #include "confdefs.h"
12056
12057 #include <X11/Intrinsic.h>
12058 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12059
12060 int
12061 main ()
12062 {
12063
12064 $cf_test((XtAppContext) 0)
12065   ;
12066   return 0;
12067 }
12068 _ACEOF
12069 rm -f conftest.$ac_objext conftest$ac_exeext
12070 if { (eval echo "$as_me:12070: \"$ac_link\"") >&5
12071   (eval $ac_link) 2>&5
12072   ac_status=$?
12073   echo "$as_me:12073: \$? = $ac_status" >&5
12074   (exit $ac_status); } &&
12075          { ac_try='test -s conftest$ac_exeext'
12076   { (eval echo "$as_me:12076: \"$ac_try\"") >&5
12077   (eval $ac_try) 2>&5
12078   ac_status=$?
12079   echo "$as_me:12079: \$? = $ac_status" >&5
12080   (exit $ac_status); }; }; then
12081   cf_result=yes
12082 else
12083   echo "$as_me: failed program was:" >&5
12084 cat conftest.$ac_ext >&5
12085 cf_result=no
12086 fi
12087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12088                         echo "$as_me:12088: result: $cf_result" >&5
12089 echo "${ECHO_T}$cf_result" >&6
12090                         if test "$cf_result" = yes ; then
12091                                 cf_x_athena_lib="$cf_lib"
12092                                 break
12093                         fi
12094                         LIBS="$cf_save"
12095                 fi
12096         done
12097 done
12098
12099 if test -z "$cf_x_athena_lib" ; then
12100         { { echo "$as_me:12100: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12101 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12102    { (exit 1); exit 1; }; }
12103 fi
12104
12105 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12106
12107 cat >>confdefs.h <<EOF
12108 #define $cf_x_athena_LIBS 1
12109 EOF
12110
12111 fi
12112
12113 for ac_prog in xcurses-config
12114 do
12115   # Extract the first word of "$ac_prog", so it can be a program name with args.
12116 set dummy $ac_prog; ac_word=$2
12117 echo "$as_me:12117: checking for $ac_word" >&5
12118 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12119 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
12120   echo $ECHO_N "(cached) $ECHO_C" >&6
12121 else
12122   case $XCURSES_CONFIG in
12123   [\\/]* | ?:[\\/]*)
12124   ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
12125   ;;
12126   *)
12127   ac_save_IFS=$IFS; IFS=$ac_path_separator
12128 ac_dummy="$PATH"
12129 for ac_dir in $ac_dummy; do
12130   IFS=$ac_save_IFS
12131   test -z "$ac_dir" && ac_dir=.
12132   if $as_executable_p "$ac_dir/$ac_word"; then
12133    ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
12134    echo "$as_me:12134: found $ac_dir/$ac_word" >&5
12135    break
12136 fi
12137 done
12138
12139   ;;
12140 esac
12141 fi
12142 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
12143
12144 if test -n "$XCURSES_CONFIG"; then
12145   echo "$as_me:12145: result: $XCURSES_CONFIG" >&5
12146 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12147 else
12148   echo "$as_me:12148: result: no" >&5
12149 echo "${ECHO_T}no" >&6
12150 fi
12151
12152   test -n "$XCURSES_CONFIG" && break
12153 done
12154 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
12155
12156 if test "$XCURSES_CONFIG" != none ; then
12157
12158 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12159 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12160
12161 cf_cv_lib_XCurses=yes
12162
12163 else
12164
12165 LDFLAGS="$LDFLAGS $X_LIBS"
12166
12167 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12168
12169 echo "${as_me:-configure}:12169: testing checking additions to CFLAGS ..." 1>&5
12170
12171 cf_check_cflags="$CFLAGS"
12172 cf_check_cppflags="$CPPFLAGS"
12173
12174 cf_fix_cppflags=no
12175 cf_new_cflags=
12176 cf_new_cppflags=
12177 cf_new_extra_cppflags=
12178
12179 for cf_add_cflags in $X_CFLAGS
12180 do
12181 case $cf_fix_cppflags in
12182 no)
12183         case $cf_add_cflags in #(vi
12184         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12185                 case $cf_add_cflags in
12186                 -D*)
12187                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12188
12189                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12190                                 && test -z "${cf_tst_cflags}" \
12191                                 && cf_fix_cppflags=yes
12192
12193                         if test $cf_fix_cppflags = yes ; then
12194                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12195                                 continue
12196                         elif test "${cf_tst_cflags}" = "\"'" ; then
12197                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12198                                 continue
12199                         fi
12200                         ;;
12201                 esac
12202                 case "$CPPFLAGS" in
12203                 *$cf_add_cflags) #(vi
12204                         ;;
12205                 *) #(vi
12206                         case $cf_add_cflags in #(vi
12207                         -D*)
12208                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12209
12210 CPPFLAGS=`echo "$CPPFLAGS" | \
12211         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12212                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12213
12214                                 ;;
12215                         esac
12216                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12217                         ;;
12218                 esac
12219                 ;;
12220         *)
12221                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12222                 ;;
12223         esac
12224         ;;
12225 yes)
12226         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12227
12228         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12229
12230         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12231                 && test -z "${cf_tst_cflags}" \
12232                 && cf_fix_cppflags=no
12233         ;;
12234 esac
12235 done
12236
12237 if test -n "$cf_new_cflags" ; then
12238         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12239
12240 echo "${as_me:-configure}:12240: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12241
12242         CFLAGS="$CFLAGS $cf_new_cflags"
12243 fi
12244
12245 if test -n "$cf_new_cppflags" ; then
12246         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12247
12248 echo "${as_me:-configure}:12248: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12249
12250         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12251 fi
12252
12253 if test -n "$cf_new_extra_cppflags" ; then
12254         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12255
12256 echo "${as_me:-configure}:12256: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12257
12258         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12259 fi
12260
12261 if test "$cf_check_cflags" != "$CFLAGS" ; then
12262 cat >conftest.$ac_ext <<_ACEOF
12263 #line 12263 "configure"
12264 #include "confdefs.h"
12265 #include <stdio.h>
12266 int
12267 main ()
12268 {
12269 printf("Hello world");
12270   ;
12271   return 0;
12272 }
12273 _ACEOF
12274 rm -f conftest.$ac_objext conftest$ac_exeext
12275 if { (eval echo "$as_me:12275: \"$ac_link\"") >&5
12276   (eval $ac_link) 2>&5
12277   ac_status=$?
12278   echo "$as_me:12278: \$? = $ac_status" >&5
12279   (exit $ac_status); } &&
12280          { ac_try='test -s conftest$ac_exeext'
12281   { (eval echo "$as_me:12281: \"$ac_try\"") >&5
12282   (eval $ac_try) 2>&5
12283   ac_status=$?
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit $ac_status); }; }; then
12286   :
12287 else
12288   echo "$as_me: failed program was:" >&5
12289 cat conftest.$ac_ext >&5
12290 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12291
12292 echo "${as_me:-configure}:12292: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12293
12294          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12295                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12296
12297 echo "${as_me:-configure}:12297: testing but keeping change to \$CPPFLAGS ..." 1>&5
12298
12299          fi
12300          CFLAGS="$cf_check_flags"
12301 fi
12302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12303 fi
12304
12305 echo "$as_me:12305: checking for XOpenDisplay in -lX11" >&5
12306 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12307 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12308   echo $ECHO_N "(cached) $ECHO_C" >&6
12309 else
12310   ac_check_lib_save_LIBS=$LIBS
12311 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12312 cat >conftest.$ac_ext <<_ACEOF
12313 #line 12313 "configure"
12314 #include "confdefs.h"
12315
12316 /* Override any gcc2 internal prototype to avoid an error.  */
12317 #ifdef __cplusplus
12318 extern "C"
12319 #endif
12320 /* We use char because int might match the return type of a gcc2
12321    builtin and then its argument prototype would still apply.  */
12322 char XOpenDisplay ();
12323 int
12324 main ()
12325 {
12326 XOpenDisplay ();
12327   ;
12328   return 0;
12329 }
12330 _ACEOF
12331 rm -f conftest.$ac_objext conftest$ac_exeext
12332 if { (eval echo "$as_me:12332: \"$ac_link\"") >&5
12333   (eval $ac_link) 2>&5
12334   ac_status=$?
12335   echo "$as_me:12335: \$? = $ac_status" >&5
12336   (exit $ac_status); } &&
12337          { ac_try='test -s conftest$ac_exeext'
12338   { (eval echo "$as_me:12338: \"$ac_try\"") >&5
12339   (eval $ac_try) 2>&5
12340   ac_status=$?
12341   echo "$as_me:12341: \$? = $ac_status" >&5
12342   (exit $ac_status); }; }; then
12343   ac_cv_lib_X11_XOpenDisplay=yes
12344 else
12345   echo "$as_me: failed program was:" >&5
12346 cat conftest.$ac_ext >&5
12347 ac_cv_lib_X11_XOpenDisplay=no
12348 fi
12349 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12350 LIBS=$ac_check_lib_save_LIBS
12351 fi
12352 echo "$as_me:12352: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12353 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12354 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12355   LIBS="-lX11 $LIBS"
12356 fi
12357
12358 echo "$as_me:12358: checking for XCurses library" >&5
12359 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12360 if test "${cf_cv_lib_XCurses+set}" = set; then
12361   echo $ECHO_N "(cached) $ECHO_C" >&6
12362 else
12363
12364 LIBS="-lXCurses $LIBS"
12365 cat >conftest.$ac_ext <<_ACEOF
12366 #line 12366 "configure"
12367 #include "confdefs.h"
12368
12369 #include <xcurses.h>
12370 char *XCursesProgramName = "test";
12371
12372 int
12373 main ()
12374 {
12375 XCursesExit();
12376   ;
12377   return 0;
12378 }
12379 _ACEOF
12380 rm -f conftest.$ac_objext conftest$ac_exeext
12381 if { (eval echo "$as_me:12381: \"$ac_link\"") >&5
12382   (eval $ac_link) 2>&5
12383   ac_status=$?
12384   echo "$as_me:12384: \$? = $ac_status" >&5
12385   (exit $ac_status); } &&
12386          { ac_try='test -s conftest$ac_exeext'
12387   { (eval echo "$as_me:12387: \"$ac_try\"") >&5
12388   (eval $ac_try) 2>&5
12389   ac_status=$?
12390   echo "$as_me:12390: \$? = $ac_status" >&5
12391   (exit $ac_status); }; }; then
12392   cf_cv_lib_XCurses=yes
12393 else
12394   echo "$as_me: failed program was:" >&5
12395 cat conftest.$ac_ext >&5
12396 cf_cv_lib_XCurses=no
12397 fi
12398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12399
12400 fi
12401 echo "$as_me:12401: result: $cf_cv_lib_XCurses" >&5
12402 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12403
12404 fi
12405
12406 if test $cf_cv_lib_XCurses = yes ; then
12407         cat >>confdefs.h <<\EOF
12408 #define UNIX 1
12409 EOF
12410
12411         cat >>confdefs.h <<\EOF
12412 #define XCURSES 1
12413 EOF
12414
12415         echo "$as_me:12415: checking for xcurses.h" >&5
12416 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12417 if test "${ac_cv_header_xcurses_h+set}" = set; then
12418   echo $ECHO_N "(cached) $ECHO_C" >&6
12419 else
12420   cat >conftest.$ac_ext <<_ACEOF
12421 #line 12421 "configure"
12422 #include "confdefs.h"
12423 #include <xcurses.h>
12424 _ACEOF
12425 if { (eval echo "$as_me:12425: \"$ac_cpp conftest.$ac_ext\"") >&5
12426   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12427   ac_status=$?
12428   egrep -v '^ *\+' conftest.er1 >conftest.err
12429   rm -f conftest.er1
12430   cat conftest.err >&5
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit $ac_status); } >/dev/null; then
12433   if test -s conftest.err; then
12434     ac_cpp_err=$ac_c_preproc_warn_flag
12435   else
12436     ac_cpp_err=
12437   fi
12438 else
12439   ac_cpp_err=yes
12440 fi
12441 if test -z "$ac_cpp_err"; then
12442   ac_cv_header_xcurses_h=yes
12443 else
12444   echo "$as_me: failed program was:" >&5
12445   cat conftest.$ac_ext >&5
12446   ac_cv_header_xcurses_h=no
12447 fi
12448 rm -f conftest.err conftest.$ac_ext
12449 fi
12450 echo "$as_me:12450: result: $ac_cv_header_xcurses_h" >&5
12451 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12452 if test $ac_cv_header_xcurses_h = yes; then
12453   cat >>confdefs.h <<\EOF
12454 #define HAVE_XCURSES 1
12455 EOF
12456
12457 fi
12458
12459 else
12460         { { echo "$as_me:12460: error: Cannot link with XCurses" >&5
12461 echo "$as_me: error: Cannot link with XCurses" >&2;}
12462    { (exit 1); exit 1; }; }
12463 fi
12464
12465         ;;
12466 esac
12467
12468 case $cf_cv_screen in #(vi
12469 pdcurses) #(vi
12470         ;;
12471 *)
12472         # look for curses-related libraries
12473
12474 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
12475 echo "$as_me:12475: checking for new_panel in -lpanel$cf_cv_libtype" >&5
12476 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
12477 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12478   echo $ECHO_N "(cached) $ECHO_C" >&6
12479 else
12480   ac_check_lib_save_LIBS=$LIBS
12481 LIBS="-lpanel$cf_cv_libtype  $LIBS"
12482 cat >conftest.$ac_ext <<_ACEOF
12483 #line 12483 "configure"
12484 #include "confdefs.h"
12485
12486 /* Override any gcc2 internal prototype to avoid an error.  */
12487 #ifdef __cplusplus
12488 extern "C"
12489 #endif
12490 /* We use char because int might match the return type of a gcc2
12491    builtin and then its argument prototype would still apply.  */
12492 char new_panel ();
12493 int
12494 main ()
12495 {
12496 new_panel ();
12497   ;
12498   return 0;
12499 }
12500 _ACEOF
12501 rm -f conftest.$ac_objext conftest$ac_exeext
12502 if { (eval echo "$as_me:12502: \"$ac_link\"") >&5
12503   (eval $ac_link) 2>&5
12504   ac_status=$?
12505   echo "$as_me:12505: \$? = $ac_status" >&5
12506   (exit $ac_status); } &&
12507          { ac_try='test -s conftest$ac_exeext'
12508   { (eval echo "$as_me:12508: \"$ac_try\"") >&5
12509   (eval $ac_try) 2>&5
12510   ac_status=$?
12511   echo "$as_me:12511: \$? = $ac_status" >&5
12512   (exit $ac_status); }; }; then
12513   eval "$as_ac_Lib=yes"
12514 else
12515   echo "$as_me: failed program was:" >&5
12516 cat conftest.$ac_ext >&5
12517 eval "$as_ac_Lib=no"
12518 fi
12519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12520 LIBS=$ac_check_lib_save_LIBS
12521 fi
12522 echo "$as_me:12522: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12523 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12524 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12525   cat >>confdefs.h <<EOF
12526 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
12527 EOF
12528
12529   LIBS="-lpanel$cf_cv_libtype $LIBS"
12530
12531 fi
12532
12533 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
12534 echo "$as_me:12534: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
12535 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
12536 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12537   echo $ECHO_N "(cached) $ECHO_C" >&6
12538 else
12539   ac_check_lib_save_LIBS=$LIBS
12540 LIBS="-lmenu$cf_cv_libtype  $LIBS"
12541 cat >conftest.$ac_ext <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544
12545 /* Override any gcc2 internal prototype to avoid an error.  */
12546 #ifdef __cplusplus
12547 extern "C"
12548 #endif
12549 /* We use char because int might match the return type of a gcc2
12550    builtin and then its argument prototype would still apply.  */
12551 char menu_driver ();
12552 int
12553 main ()
12554 {
12555 menu_driver ();
12556   ;
12557   return 0;
12558 }
12559 _ACEOF
12560 rm -f conftest.$ac_objext conftest$ac_exeext
12561 if { (eval echo "$as_me:12561: \"$ac_link\"") >&5
12562   (eval $ac_link) 2>&5
12563   ac_status=$?
12564   echo "$as_me:12564: \$? = $ac_status" >&5
12565   (exit $ac_status); } &&
12566          { ac_try='test -s conftest$ac_exeext'
12567   { (eval echo "$as_me:12567: \"$ac_try\"") >&5
12568   (eval $ac_try) 2>&5
12569   ac_status=$?
12570   echo "$as_me:12570: \$? = $ac_status" >&5
12571   (exit $ac_status); }; }; then
12572   eval "$as_ac_Lib=yes"
12573 else
12574   echo "$as_me: failed program was:" >&5
12575 cat conftest.$ac_ext >&5
12576 eval "$as_ac_Lib=no"
12577 fi
12578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12579 LIBS=$ac_check_lib_save_LIBS
12580 fi
12581 echo "$as_me:12581: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12582 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12583 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12584   cat >>confdefs.h <<EOF
12585 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
12586 EOF
12587
12588   LIBS="-lmenu$cf_cv_libtype $LIBS"
12589
12590 fi
12591
12592 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
12593 echo "$as_me:12593: checking for form_driver in -lform$cf_cv_libtype" >&5
12594 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
12595 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12596   echo $ECHO_N "(cached) $ECHO_C" >&6
12597 else
12598   ac_check_lib_save_LIBS=$LIBS
12599 LIBS="-lform$cf_cv_libtype  $LIBS"
12600 cat >conftest.$ac_ext <<_ACEOF
12601 #line 12601 "configure"
12602 #include "confdefs.h"
12603
12604 /* Override any gcc2 internal prototype to avoid an error.  */
12605 #ifdef __cplusplus
12606 extern "C"
12607 #endif
12608 /* We use char because int might match the return type of a gcc2
12609    builtin and then its argument prototype would still apply.  */
12610 char form_driver ();
12611 int
12612 main ()
12613 {
12614 form_driver ();
12615   ;
12616   return 0;
12617 }
12618 _ACEOF
12619 rm -f conftest.$ac_objext conftest$ac_exeext
12620 if { (eval echo "$as_me:12620: \"$ac_link\"") >&5
12621   (eval $ac_link) 2>&5
12622   ac_status=$?
12623   echo "$as_me:12623: \$? = $ac_status" >&5
12624   (exit $ac_status); } &&
12625          { ac_try='test -s conftest$ac_exeext'
12626   { (eval echo "$as_me:12626: \"$ac_try\"") >&5
12627   (eval $ac_try) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit $ac_status); }; }; then
12631   eval "$as_ac_Lib=yes"
12632 else
12633   echo "$as_me: failed program was:" >&5
12634 cat conftest.$ac_ext >&5
12635 eval "$as_ac_Lib=no"
12636 fi
12637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12638 LIBS=$ac_check_lib_save_LIBS
12639 fi
12640 echo "$as_me:12640: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12641 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12642 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12643   cat >>confdefs.h <<EOF
12644 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
12645 EOF
12646
12647   LIBS="-lform$cf_cv_libtype $LIBS"
12648
12649 fi
12650
12651         # look for curses-related headers
12652
12653 for ac_header in \
12654                 nc_alloc.h \
12655                 nomacros.h \
12656                 form.h \
12657                 menu.h \
12658                 panel.h \
12659                 term_entry.h \
12660
12661 do
12662 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12663 echo "$as_me:12663: checking for $ac_header" >&5
12664 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12665 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12666   echo $ECHO_N "(cached) $ECHO_C" >&6
12667 else
12668   cat >conftest.$ac_ext <<_ACEOF
12669 #line 12669 "configure"
12670 #include "confdefs.h"
12671 #include <$ac_header>
12672 _ACEOF
12673 if { (eval echo "$as_me:12673: \"$ac_cpp conftest.$ac_ext\"") >&5
12674   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12675   ac_status=$?
12676   egrep -v '^ *\+' conftest.er1 >conftest.err
12677   rm -f conftest.er1
12678   cat conftest.err >&5
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit $ac_status); } >/dev/null; then
12681   if test -s conftest.err; then
12682     ac_cpp_err=$ac_c_preproc_warn_flag
12683   else
12684     ac_cpp_err=
12685   fi
12686 else
12687   ac_cpp_err=yes
12688 fi
12689 if test -z "$ac_cpp_err"; then
12690   eval "$as_ac_Header=yes"
12691 else
12692   echo "$as_me: failed program was:" >&5
12693   cat conftest.$ac_ext >&5
12694   eval "$as_ac_Header=no"
12695 fi
12696 rm -f conftest.err conftest.$ac_ext
12697 fi
12698 echo "$as_me:12698: result: `eval echo '${'$as_ac_Header'}'`" >&5
12699 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12700 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12701   cat >>confdefs.h <<EOF
12702 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12703 EOF
12704
12705 fi
12706 done
12707
12708         ;;
12709 esac
12710
12711 echo "$as_me:12711: checking return type of signal handlers" >&5
12712 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12713 if test "${ac_cv_type_signal+set}" = set; then
12714   echo $ECHO_N "(cached) $ECHO_C" >&6
12715 else
12716   cat >conftest.$ac_ext <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12719 #include <sys/types.h>
12720 #include <signal.h>
12721 #ifdef signal
12722 # undef signal
12723 #endif
12724 #ifdef __cplusplus
12725 extern "C" void (*signal (int, void (*)(int)))(int);
12726 #else
12727 void (*signal ()) ();
12728 #endif
12729
12730 int
12731 main ()
12732 {
12733 int i;
12734   ;
12735   return 0;
12736 }
12737 _ACEOF
12738 rm -f conftest.$ac_objext
12739 if { (eval echo "$as_me:12739: \"$ac_compile\"") >&5
12740   (eval $ac_compile) 2>&5
12741   ac_status=$?
12742   echo "$as_me:12742: \$? = $ac_status" >&5
12743   (exit $ac_status); } &&
12744          { ac_try='test -s conftest.$ac_objext'
12745   { (eval echo "$as_me:12745: \"$ac_try\"") >&5
12746   (eval $ac_try) 2>&5
12747   ac_status=$?
12748   echo "$as_me:12748: \$? = $ac_status" >&5
12749   (exit $ac_status); }; }; then
12750   ac_cv_type_signal=void
12751 else
12752   echo "$as_me: failed program was:" >&5
12753 cat conftest.$ac_ext >&5
12754 ac_cv_type_signal=int
12755 fi
12756 rm -f conftest.$ac_objext conftest.$ac_ext
12757 fi
12758 echo "$as_me:12758: result: $ac_cv_type_signal" >&5
12759 echo "${ECHO_T}$ac_cv_type_signal" >&6
12760
12761 cat >>confdefs.h <<EOF
12762 #define RETSIGTYPE $ac_cv_type_signal
12763 EOF
12764
12765 echo "$as_me:12765: checking for ANSI C header files" >&5
12766 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12767 if test "${ac_cv_header_stdc+set}" = set; then
12768   echo $ECHO_N "(cached) $ECHO_C" >&6
12769 else
12770   cat >conftest.$ac_ext <<_ACEOF
12771 #line 12771 "configure"
12772 #include "confdefs.h"
12773 #include <stdlib.h>
12774 #include <stdarg.h>
12775 #include <string.h>
12776 #include <float.h>
12777
12778 _ACEOF
12779 if { (eval echo "$as_me:12779: \"$ac_cpp conftest.$ac_ext\"") >&5
12780   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12781   ac_status=$?
12782   egrep -v '^ *\+' conftest.er1 >conftest.err
12783   rm -f conftest.er1
12784   cat conftest.err >&5
12785   echo "$as_me:12785: \$? = $ac_status" >&5
12786   (exit $ac_status); } >/dev/null; then
12787   if test -s conftest.err; then
12788     ac_cpp_err=$ac_c_preproc_warn_flag
12789   else
12790     ac_cpp_err=
12791   fi
12792 else
12793   ac_cpp_err=yes
12794 fi
12795 if test -z "$ac_cpp_err"; then
12796   ac_cv_header_stdc=yes
12797 else
12798   echo "$as_me: failed program was:" >&5
12799   cat conftest.$ac_ext >&5
12800   ac_cv_header_stdc=no
12801 fi
12802 rm -f conftest.err conftest.$ac_ext
12803
12804 if test $ac_cv_header_stdc = yes; then
12805   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12806   cat >conftest.$ac_ext <<_ACEOF
12807 #line 12807 "configure"
12808 #include "confdefs.h"
12809 #include <string.h>
12810
12811 _ACEOF
12812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12813   egrep "memchr" >/dev/null 2>&1; then
12814   :
12815 else
12816   ac_cv_header_stdc=no
12817 fi
12818 rm -rf conftest*
12819
12820 fi
12821
12822 if test $ac_cv_header_stdc = yes; then
12823   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12824   cat >conftest.$ac_ext <<_ACEOF
12825 #line 12825 "configure"
12826 #include "confdefs.h"
12827 #include <stdlib.h>
12828
12829 _ACEOF
12830 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12831   egrep "free" >/dev/null 2>&1; then
12832   :
12833 else
12834   ac_cv_header_stdc=no
12835 fi
12836 rm -rf conftest*
12837
12838 fi
12839
12840 if test $ac_cv_header_stdc = yes; then
12841   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12842   if test "$cross_compiling" = yes; then
12843   :
12844 else
12845   cat >conftest.$ac_ext <<_ACEOF
12846 #line 12846 "configure"
12847 #include "confdefs.h"
12848 #include <ctype.h>
12849 #if ((' ' & 0x0FF) == 0x020)
12850 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12851 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12852 #else
12853 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12854                      || ('j' <= (c) && (c) <= 'r') \
12855                      || ('s' <= (c) && (c) <= 'z'))
12856 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12857 #endif
12858
12859 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12860 int
12861 main ()
12862 {
12863   int i;
12864   for (i = 0; i < 256; i++)
12865     if (XOR (islower (i), ISLOWER (i))
12866         || toupper (i) != TOUPPER (i))
12867       $ac_main_return(2);
12868   $ac_main_return (0);
12869 }
12870 _ACEOF
12871 rm -f conftest$ac_exeext
12872 if { (eval echo "$as_me:12872: \"$ac_link\"") >&5
12873   (eval $ac_link) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12877   { (eval echo "$as_me:12877: \"$ac_try\"") >&5
12878   (eval $ac_try) 2>&5
12879   ac_status=$?
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit $ac_status); }; }; then
12882   :
12883 else
12884   echo "$as_me: program exited with status $ac_status" >&5
12885 echo "$as_me: failed program was:" >&5
12886 cat conftest.$ac_ext >&5
12887 ac_cv_header_stdc=no
12888 fi
12889 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12890 fi
12891 fi
12892 fi
12893 echo "$as_me:12893: result: $ac_cv_header_stdc" >&5
12894 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12895 if test $ac_cv_header_stdc = yes; then
12896
12897 cat >>confdefs.h <<\EOF
12898 #define STDC_HEADERS 1
12899 EOF
12900
12901 fi
12902
12903 echo "$as_me:12903: checking whether time.h and sys/time.h may both be included" >&5
12904 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12905 if test "${ac_cv_header_time+set}" = set; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   cat >conftest.$ac_ext <<_ACEOF
12909 #line 12909 "configure"
12910 #include "confdefs.h"
12911 #include <sys/types.h>
12912 #include <sys/time.h>
12913 #include <time.h>
12914
12915 int
12916 main ()
12917 {
12918 if ((struct tm *) 0)
12919 return 0;
12920   ;
12921   return 0;
12922 }
12923 _ACEOF
12924 rm -f conftest.$ac_objext
12925 if { (eval echo "$as_me:12925: \"$ac_compile\"") >&5
12926   (eval $ac_compile) 2>&5
12927   ac_status=$?
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit $ac_status); } &&
12930          { ac_try='test -s conftest.$ac_objext'
12931   { (eval echo "$as_me:12931: \"$ac_try\"") >&5
12932   (eval $ac_try) 2>&5
12933   ac_status=$?
12934   echo "$as_me:12934: \$? = $ac_status" >&5
12935   (exit $ac_status); }; }; then
12936   ac_cv_header_time=yes
12937 else
12938   echo "$as_me: failed program was:" >&5
12939 cat conftest.$ac_ext >&5
12940 ac_cv_header_time=no
12941 fi
12942 rm -f conftest.$ac_objext conftest.$ac_ext
12943 fi
12944 echo "$as_me:12944: result: $ac_cv_header_time" >&5
12945 echo "${ECHO_T}$ac_cv_header_time" >&6
12946 if test $ac_cv_header_time = yes; then
12947
12948 cat >>confdefs.h <<\EOF
12949 #define TIME_WITH_SYS_TIME 1
12950 EOF
12951
12952 fi
12953
12954 for ac_header in \
12955 getopt.h \
12956 locale.h \
12957 math.h \
12958 stdarg.h \
12959 sys/ioctl.h \
12960 sys/select.h \
12961 sys/time.h \
12962 termios.h \
12963 unistd.h \
12964
12965 do
12966 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12967 echo "$as_me:12967: checking for $ac_header" >&5
12968 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12970   echo $ECHO_N "(cached) $ECHO_C" >&6
12971 else
12972   cat >conftest.$ac_ext <<_ACEOF
12973 #line 12973 "configure"
12974 #include "confdefs.h"
12975 #include <$ac_header>
12976 _ACEOF
12977 if { (eval echo "$as_me:12977: \"$ac_cpp conftest.$ac_ext\"") >&5
12978   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12979   ac_status=$?
12980   egrep -v '^ *\+' conftest.er1 >conftest.err
12981   rm -f conftest.er1
12982   cat conftest.err >&5
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); } >/dev/null; then
12985   if test -s conftest.err; then
12986     ac_cpp_err=$ac_c_preproc_warn_flag
12987   else
12988     ac_cpp_err=
12989   fi
12990 else
12991   ac_cpp_err=yes
12992 fi
12993 if test -z "$ac_cpp_err"; then
12994   eval "$as_ac_Header=yes"
12995 else
12996   echo "$as_me: failed program was:" >&5
12997   cat conftest.$ac_ext >&5
12998   eval "$as_ac_Header=no"
12999 fi
13000 rm -f conftest.err conftest.$ac_ext
13001 fi
13002 echo "$as_me:13002: result: `eval echo '${'$as_ac_Header'}'`" >&5
13003 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13004 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13005   cat >>confdefs.h <<EOF
13006 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13007 EOF
13008
13009 fi
13010 done
13011
13012 for ac_header in unistd.h getopt.h
13013 do
13014 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13015 echo "$as_me:13015: checking for $ac_header" >&5
13016 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13017 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13018   echo $ECHO_N "(cached) $ECHO_C" >&6
13019 else
13020   cat >conftest.$ac_ext <<_ACEOF
13021 #line 13021 "configure"
13022 #include "confdefs.h"
13023 #include <$ac_header>
13024 _ACEOF
13025 if { (eval echo "$as_me:13025: \"$ac_cpp conftest.$ac_ext\"") >&5
13026   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13027   ac_status=$?
13028   egrep -v '^ *\+' conftest.er1 >conftest.err
13029   rm -f conftest.er1
13030   cat conftest.err >&5
13031   echo "$as_me:13031: \$? = $ac_status" >&5
13032   (exit $ac_status); } >/dev/null; then
13033   if test -s conftest.err; then
13034     ac_cpp_err=$ac_c_preproc_warn_flag
13035   else
13036     ac_cpp_err=
13037   fi
13038 else
13039   ac_cpp_err=yes
13040 fi
13041 if test -z "$ac_cpp_err"; then
13042   eval "$as_ac_Header=yes"
13043 else
13044   echo "$as_me: failed program was:" >&5
13045   cat conftest.$ac_ext >&5
13046   eval "$as_ac_Header=no"
13047 fi
13048 rm -f conftest.err conftest.$ac_ext
13049 fi
13050 echo "$as_me:13050: result: `eval echo '${'$as_ac_Header'}'`" >&5
13051 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13052 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13053   cat >>confdefs.h <<EOF
13054 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13055 EOF
13056
13057 fi
13058 done
13059
13060 echo "$as_me:13060: checking for header declaring getopt variables" >&5
13061 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13062 if test "${cf_cv_getopt_header+set}" = set; then
13063   echo $ECHO_N "(cached) $ECHO_C" >&6
13064 else
13065
13066 cf_cv_getopt_header=none
13067 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13068 do
13069 cat >conftest.$ac_ext <<_ACEOF
13070 #line 13070 "configure"
13071 #include "confdefs.h"
13072
13073 #include <$cf_header>
13074 int
13075 main ()
13076 {
13077 int x = optind; char *y = optarg
13078   ;
13079   return 0;
13080 }
13081 _ACEOF
13082 rm -f conftest.$ac_objext
13083 if { (eval echo "$as_me:13083: \"$ac_compile\"") >&5
13084   (eval $ac_compile) 2>&5
13085   ac_status=$?
13086   echo "$as_me:13086: \$? = $ac_status" >&5
13087   (exit $ac_status); } &&
13088          { ac_try='test -s conftest.$ac_objext'
13089   { (eval echo "$as_me:13089: \"$ac_try\"") >&5
13090   (eval $ac_try) 2>&5
13091   ac_status=$?
13092   echo "$as_me:13092: \$? = $ac_status" >&5
13093   (exit $ac_status); }; }; then
13094   cf_cv_getopt_header=$cf_header
13095  break
13096 else
13097   echo "$as_me: failed program was:" >&5
13098 cat conftest.$ac_ext >&5
13099 fi
13100 rm -f conftest.$ac_objext conftest.$ac_ext
13101 done
13102
13103 fi
13104 echo "$as_me:13104: result: $cf_cv_getopt_header" >&5
13105 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13106 if test $cf_cv_getopt_header != none ; then
13107         cat >>confdefs.h <<\EOF
13108 #define HAVE_GETOPT_HEADER 1
13109 EOF
13110
13111 fi
13112
13113 for ac_func in \
13114 gettimeofday \
13115 strdup \
13116
13117 do
13118 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13119 echo "$as_me:13119: checking for $ac_func" >&5
13120 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13121 if eval "test \"\${$as_ac_var+set}\" = set"; then
13122   echo $ECHO_N "(cached) $ECHO_C" >&6
13123 else
13124   cat >conftest.$ac_ext <<_ACEOF
13125 #line 13125 "configure"
13126 #include "confdefs.h"
13127 /* System header to define __stub macros and hopefully few prototypes,
13128     which can conflict with char $ac_func (); below.  */
13129 #include <assert.h>
13130 /* Override any gcc2 internal prototype to avoid an error.  */
13131 #ifdef __cplusplus
13132 extern "C"
13133 #endif
13134 /* We use char because int might match the return type of a gcc2
13135    builtin and then its argument prototype would still apply.  */
13136 char $ac_func ();
13137 char (*f) ();
13138
13139 int
13140 main ()
13141 {
13142 /* The GNU C library defines this for functions which it implements
13143     to always fail with ENOSYS.  Some functions are actually named
13144     something starting with __ and the normal name is an alias.  */
13145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13146 choke me
13147 #else
13148 f = $ac_func;
13149 #endif
13150
13151   ;
13152   return 0;
13153 }
13154 _ACEOF
13155 rm -f conftest.$ac_objext conftest$ac_exeext
13156 if { (eval echo "$as_me:13156: \"$ac_link\"") >&5
13157   (eval $ac_link) 2>&5
13158   ac_status=$?
13159   echo "$as_me:13159: \$? = $ac_status" >&5
13160   (exit $ac_status); } &&
13161          { ac_try='test -s conftest$ac_exeext'
13162   { (eval echo "$as_me:13162: \"$ac_try\"") >&5
13163   (eval $ac_try) 2>&5
13164   ac_status=$?
13165   echo "$as_me:13165: \$? = $ac_status" >&5
13166   (exit $ac_status); }; }; then
13167   eval "$as_ac_var=yes"
13168 else
13169   echo "$as_me: failed program was:" >&5
13170 cat conftest.$ac_ext >&5
13171 eval "$as_ac_var=no"
13172 fi
13173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13174 fi
13175 echo "$as_me:13175: result: `eval echo '${'$as_ac_var'}'`" >&5
13176 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13177 if test `eval echo '${'$as_ac_var'}'` = yes; then
13178   cat >>confdefs.h <<EOF
13179 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13180 EOF
13181
13182 fi
13183 done
13184
13185 if test "$cf_enable_widec" = yes; then
13186
13187 for ac_func in \
13188 mblen \
13189 mbrlen \
13190 mbrtowc \
13191 mbsrtowcs \
13192 mbstowcs \
13193 mbtowc \
13194 wcsrtombs \
13195 wcstombs \
13196
13197 do
13198 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13199 echo "$as_me:13199: checking for $ac_func" >&5
13200 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13201 if eval "test \"\${$as_ac_var+set}\" = set"; then
13202   echo $ECHO_N "(cached) $ECHO_C" >&6
13203 else
13204   cat >conftest.$ac_ext <<_ACEOF
13205 #line 13205 "configure"
13206 #include "confdefs.h"
13207 /* System header to define __stub macros and hopefully few prototypes,
13208     which can conflict with char $ac_func (); below.  */
13209 #include <assert.h>
13210 /* Override any gcc2 internal prototype to avoid an error.  */
13211 #ifdef __cplusplus
13212 extern "C"
13213 #endif
13214 /* We use char because int might match the return type of a gcc2
13215    builtin and then its argument prototype would still apply.  */
13216 char $ac_func ();
13217 char (*f) ();
13218
13219 int
13220 main ()
13221 {
13222 /* The GNU C library defines this for functions which it implements
13223     to always fail with ENOSYS.  Some functions are actually named
13224     something starting with __ and the normal name is an alias.  */
13225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13226 choke me
13227 #else
13228 f = $ac_func;
13229 #endif
13230
13231   ;
13232   return 0;
13233 }
13234 _ACEOF
13235 rm -f conftest.$ac_objext conftest$ac_exeext
13236 if { (eval echo "$as_me:13236: \"$ac_link\"") >&5
13237   (eval $ac_link) 2>&5
13238   ac_status=$?
13239   echo "$as_me:13239: \$? = $ac_status" >&5
13240   (exit $ac_status); } &&
13241          { ac_try='test -s conftest$ac_exeext'
13242   { (eval echo "$as_me:13242: \"$ac_try\"") >&5
13243   (eval $ac_try) 2>&5
13244   ac_status=$?
13245   echo "$as_me:13245: \$? = $ac_status" >&5
13246   (exit $ac_status); }; }; then
13247   eval "$as_ac_var=yes"
13248 else
13249   echo "$as_me: failed program was:" >&5
13250 cat conftest.$ac_ext >&5
13251 eval "$as_ac_var=no"
13252 fi
13253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13254 fi
13255 echo "$as_me:13255: result: `eval echo '${'$as_ac_var'}'`" >&5
13256 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13257 if test `eval echo '${'$as_ac_var'}'` = yes; then
13258   cat >>confdefs.h <<EOF
13259 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13260 EOF
13261
13262 fi
13263 done
13264
13265 fi
13266
13267 echo "$as_me:13267: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13268 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13269 if test "${cf_cv_need_xopen_extension+set}" = set; then
13270   echo $ECHO_N "(cached) $ECHO_C" >&6
13271 else
13272
13273 cat >conftest.$ac_ext <<_ACEOF
13274 #line 13274 "configure"
13275 #include "confdefs.h"
13276
13277 #include <stdlib.h>
13278 #include <${cf_cv_ncurses_header:-curses.h}>
13279 int
13280 main ()
13281 {
13282
13283 #if defined(NCURSES_VERSION_PATCH)
13284 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13285         make an error
13286 #endif
13287 #endif
13288         long x = winnstr(stdscr, "", 0);
13289         int x1, y1;
13290         getbegyx(stdscr, y1, x1)
13291   ;
13292   return 0;
13293 }
13294 _ACEOF
13295 rm -f conftest.$ac_objext conftest$ac_exeext
13296 if { (eval echo "$as_me:13296: \"$ac_link\"") >&5
13297   (eval $ac_link) 2>&5
13298   ac_status=$?
13299   echo "$as_me:13299: \$? = $ac_status" >&5
13300   (exit $ac_status); } &&
13301          { ac_try='test -s conftest$ac_exeext'
13302   { (eval echo "$as_me:13302: \"$ac_try\"") >&5
13303   (eval $ac_try) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); }; }; then
13307   cf_cv_need_xopen_extension=no
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 cat conftest.$ac_ext >&5
13311 cat >conftest.$ac_ext <<_ACEOF
13312 #line 13312 "configure"
13313 #include "confdefs.h"
13314
13315 #define _XOPEN_SOURCE_EXTENDED
13316 #include <stdlib.h>
13317 #include <${cf_cv_ncurses_header:-curses.h}>
13318 int
13319 main ()
13320 {
13321
13322 #ifdef NCURSES_VERSION
13323         cchar_t check;
13324         int check2 = curs_set((int)sizeof(check));
13325 #endif
13326         long x = winnstr(stdscr, "", 0);
13327         int x1, y1;
13328         getbegyx(stdscr, y1, x1)
13329   ;
13330   return 0;
13331 }
13332 _ACEOF
13333 rm -f conftest.$ac_objext conftest$ac_exeext
13334 if { (eval echo "$as_me:13334: \"$ac_link\"") >&5
13335   (eval $ac_link) 2>&5
13336   ac_status=$?
13337   echo "$as_me:13337: \$? = $ac_status" >&5
13338   (exit $ac_status); } &&
13339          { ac_try='test -s conftest$ac_exeext'
13340   { (eval echo "$as_me:13340: \"$ac_try\"") >&5
13341   (eval $ac_try) 2>&5
13342   ac_status=$?
13343   echo "$as_me:13343: \$? = $ac_status" >&5
13344   (exit $ac_status); }; }; then
13345   cf_cv_need_xopen_extension=yes
13346 else
13347   echo "$as_me: failed program was:" >&5
13348 cat conftest.$ac_ext >&5
13349 cf_cv_need_xopen_extension=unknown
13350 fi
13351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13352 fi
13353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13354 fi
13355 echo "$as_me:13355: result: $cf_cv_need_xopen_extension" >&5
13356 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13357 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13358
13359 echo "$as_me:13359: checking for term.h" >&5
13360 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13361 if test "${cf_cv_term_header+set}" = set; then
13362   echo $ECHO_N "(cached) $ECHO_C" >&6
13363 else
13364
13365 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13366 # for <term.h> if we do not find the variant.
13367
13368 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13369
13370 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13371 */*)
13372         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13373         cf_header_list="$cf_header_item $cf_header_list"
13374         ;;
13375 esac
13376
13377 for cf_header in $cf_header_list
13378 do
13379         cat >conftest.$ac_ext <<_ACEOF
13380 #line 13380 "configure"
13381 #include "confdefs.h"
13382
13383 #include <${cf_cv_ncurses_header:-curses.h}>
13384 #include <${cf_header}>
13385 int
13386 main ()
13387 {
13388 WINDOW *x
13389   ;
13390   return 0;
13391 }
13392 _ACEOF
13393 rm -f conftest.$ac_objext
13394 if { (eval echo "$as_me:13394: \"$ac_compile\"") >&5
13395   (eval $ac_compile) 2>&5
13396   ac_status=$?
13397   echo "$as_me:13397: \$? = $ac_status" >&5
13398   (exit $ac_status); } &&
13399          { ac_try='test -s conftest.$ac_objext'
13400   { (eval echo "$as_me:13400: \"$ac_try\"") >&5
13401   (eval $ac_try) 2>&5
13402   ac_status=$?
13403   echo "$as_me:13403: \$? = $ac_status" >&5
13404   (exit $ac_status); }; }; then
13405   cf_cv_term_header=$cf_header
13406          break
13407 else
13408   echo "$as_me: failed program was:" >&5
13409 cat conftest.$ac_ext >&5
13410 cf_cv_term_header=no
13411 fi
13412 rm -f conftest.$ac_objext conftest.$ac_ext
13413 done
13414
13415 case $cf_cv_term_header in #(vi
13416 no)
13417         # If curses is ncurses, some packagers still mess it up by trying to make
13418         # us use GNU termcap.  This handles the most common case.
13419         for cf_header in ncurses/term.h ncursesw/term.h
13420         do
13421                 cat >conftest.$ac_ext <<_ACEOF
13422 #line 13422 "configure"
13423 #include "confdefs.h"
13424
13425 #include <${cf_cv_ncurses_header:-curses.h}>
13426 #ifdef NCURSES_VERSION
13427 #include <${cf_header}>
13428 #else
13429 make an error
13430 #endif
13431 int
13432 main ()
13433 {
13434 WINDOW *x
13435   ;
13436   return 0;
13437 }
13438 _ACEOF
13439 rm -f conftest.$ac_objext
13440 if { (eval echo "$as_me:13440: \"$ac_compile\"") >&5
13441   (eval $ac_compile) 2>&5
13442   ac_status=$?
13443   echo "$as_me:13443: \$? = $ac_status" >&5
13444   (exit $ac_status); } &&
13445          { ac_try='test -s conftest.$ac_objext'
13446   { (eval echo "$as_me:13446: \"$ac_try\"") >&5
13447   (eval $ac_try) 2>&5
13448   ac_status=$?
13449   echo "$as_me:13449: \$? = $ac_status" >&5
13450   (exit $ac_status); }; }; then
13451   cf_cv_term_header=$cf_header
13452                          break
13453 else
13454   echo "$as_me: failed program was:" >&5
13455 cat conftest.$ac_ext >&5
13456 cf_cv_term_header=no
13457 fi
13458 rm -f conftest.$ac_objext conftest.$ac_ext
13459         done
13460         ;;
13461 esac
13462
13463 fi
13464 echo "$as_me:13464: result: $cf_cv_term_header" >&5
13465 echo "${ECHO_T}$cf_cv_term_header" >&6
13466
13467 case $cf_cv_term_header in #(vi
13468 term.h) #(vi
13469         cat >>confdefs.h <<\EOF
13470 #define HAVE_TERM_H 1
13471 EOF
13472
13473         ;;
13474 ncurses/term.h) #(vi
13475         cat >>confdefs.h <<\EOF
13476 #define HAVE_NCURSES_TERM_H 1
13477 EOF
13478
13479         ;;
13480 ncursesw/term.h)
13481         cat >>confdefs.h <<\EOF
13482 #define HAVE_NCURSESW_TERM_H 1
13483 EOF
13484
13485         ;;
13486 esac
13487
13488 echo "$as_me:13488: checking for unctrl.h" >&5
13489 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13490 if test "${cf_cv_unctrl_header+set}" = set; then
13491   echo $ECHO_N "(cached) $ECHO_C" >&6
13492 else
13493
13494 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13495 # for <unctrl.h> if we do not find the variant.
13496
13497 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13498
13499 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13500 */*)
13501         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13502         cf_header_list="$cf_header_item $cf_header_list"
13503         ;;
13504 esac
13505
13506 for cf_header in $cf_header_list
13507 do
13508         cat >conftest.$ac_ext <<_ACEOF
13509 #line 13509 "configure"
13510 #include "confdefs.h"
13511
13512 #include <${cf_cv_ncurses_header:-curses.h}>
13513 #include <${cf_header}>
13514 int
13515 main ()
13516 {
13517 WINDOW *x
13518   ;
13519   return 0;
13520 }
13521 _ACEOF
13522 rm -f conftest.$ac_objext
13523 if { (eval echo "$as_me:13523: \"$ac_compile\"") >&5
13524   (eval $ac_compile) 2>&5
13525   ac_status=$?
13526   echo "$as_me:13526: \$? = $ac_status" >&5
13527   (exit $ac_status); } &&
13528          { ac_try='test -s conftest.$ac_objext'
13529   { (eval echo "$as_me:13529: \"$ac_try\"") >&5
13530   (eval $ac_try) 2>&5
13531   ac_status=$?
13532   echo "$as_me:13532: \$? = $ac_status" >&5
13533   (exit $ac_status); }; }; then
13534   cf_cv_unctrl_header=$cf_header
13535          break
13536 else
13537   echo "$as_me: failed program was:" >&5
13538 cat conftest.$ac_ext >&5
13539 cf_cv_unctrl_header=no
13540 fi
13541 rm -f conftest.$ac_objext conftest.$ac_ext
13542 done
13543
13544 case $cf_cv_unctrl_header in #(vi
13545 no)
13546         { echo "$as_me:13546: WARNING: unctrl.h header not found" >&5
13547 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13548         ;;
13549 esac
13550
13551 fi
13552 echo "$as_me:13552: result: $cf_cv_unctrl_header" >&5
13553 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13554
13555 case $cf_cv_unctrl_header in #(vi
13556 unctrl.h) #(vi
13557         cat >>confdefs.h <<\EOF
13558 #define HAVE_UNCTRL_H 1
13559 EOF
13560
13561         ;;
13562 ncurses/unctrl.h) #(vi
13563         cat >>confdefs.h <<\EOF
13564 #define HAVE_NCURSES_UNCTRL_H 1
13565 EOF
13566
13567         ;;
13568 ncursesw/unctrl.h)
13569         cat >>confdefs.h <<\EOF
13570 #define HAVE_NCURSESW_UNCTRL_H 1
13571 EOF
13572
13573         ;;
13574 esac
13575
13576 for cf_func in \
13577 assume_default_colors \
13578 chgat \
13579 color_set \
13580 filter \
13581 getbegx \
13582 getcurx \
13583 getmaxx \
13584 getnstr \
13585 getparx \
13586 getwin \
13587 mvvline \
13588 mvwvline \
13589 napms \
13590 putwin \
13591 resize_term \
13592 resizeterm \
13593 ripoffline \
13594 scr_dump \
13595 setupterm \
13596 slk_color \
13597 slk_init \
13598 termattrs \
13599 tgetent \
13600 tigetnum \
13601 tigetstr \
13602 typeahead \
13603 use_default_colors \
13604 use_screen \
13605 use_window \
13606 vsscanf \
13607 vw_printw \
13608 wchgat \
13609 winsstr \
13610 wresize \
13611 wsyncdown \
13612
13613 do
13614
13615 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13616
13617         echo "$as_me:13617: checking for ${cf_func}" >&5
13618 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13619
13620 echo "${as_me:-configure}:13620: testing ${cf_func} ..." 1>&5
13621
13622         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13623   echo $ECHO_N "(cached) $ECHO_C" >&6
13624 else
13625
13626                 eval cf_result='$ac_cv_func_'$cf_func
13627                 if test ".$cf_result" != ".no"; then
13628                         cat >conftest.$ac_ext <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13631
13632 #ifdef HAVE_XCURSES
13633 #include <xcurses.h>
13634 char * XCursesProgramName = "test";
13635 #else
13636 #include <${cf_cv_ncurses_header:-curses.h}>
13637 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13638 #include <ncursesw/term.h>
13639 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13640 #include <ncurses/term.h>
13641 #elif defined(HAVE_TERM_H)
13642 #include <term.h>
13643 #endif
13644 #endif
13645
13646 int
13647 main ()
13648 {
13649
13650 #ifndef ${cf_func}
13651 long foo = (long)(&${cf_func});
13652 if (foo + 1234 > 5678)
13653         ${cf_cv_main_return:-return}(foo);
13654 #endif
13655
13656   ;
13657   return 0;
13658 }
13659 _ACEOF
13660 rm -f conftest.$ac_objext conftest$ac_exeext
13661 if { (eval echo "$as_me:13661: \"$ac_link\"") >&5
13662   (eval $ac_link) 2>&5
13663   ac_status=$?
13664   echo "$as_me:13664: \$? = $ac_status" >&5
13665   (exit $ac_status); } &&
13666          { ac_try='test -s conftest$ac_exeext'
13667   { (eval echo "$as_me:13667: \"$ac_try\"") >&5
13668   (eval $ac_try) 2>&5
13669   ac_status=$?
13670   echo "$as_me:13670: \$? = $ac_status" >&5
13671   (exit $ac_status); }; }; then
13672   cf_result=yes
13673 else
13674   echo "$as_me: failed program was:" >&5
13675 cat conftest.$ac_ext >&5
13676 cf_result=no
13677 fi
13678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13679                 fi
13680                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13681
13682 fi
13683
13684         # use the computed/retrieved cache-value:
13685         eval 'cf_result=$cf_cv_func_'$cf_func
13686         echo "$as_me:13686: result: $cf_result" >&5
13687 echo "${ECHO_T}$cf_result" >&6
13688         if test $cf_result != no; then
13689                 cat >>confdefs.h <<EOF
13690 #define HAVE_${cf_tr_func} 1
13691 EOF
13692
13693         fi
13694 done
13695
13696 for cf_func in tputs
13697 do
13698
13699 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13700
13701         echo "$as_me:13701: checking for ${cf_func}" >&5
13702 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13703
13704 echo "${as_me:-configure}:13704: testing ${cf_func} ..." 1>&5
13705
13706         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13707   echo $ECHO_N "(cached) $ECHO_C" >&6
13708 else
13709
13710                 eval cf_result='$ac_cv_func_'$cf_func
13711                 if test ".$cf_result" != ".no"; then
13712                         cat >conftest.$ac_ext <<_ACEOF
13713 #line 13713 "configure"
13714 #include "confdefs.h"
13715
13716 #ifdef HAVE_XCURSES
13717 #include <xcurses.h>
13718 char * XCursesProgramName = "test";
13719 #else
13720 #include <${cf_cv_ncurses_header:-curses.h}>
13721 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13722 #include <ncursesw/term.h>
13723 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13724 #include <ncurses/term.h>
13725 #elif defined(HAVE_TERM_H)
13726 #include <term.h>
13727 #endif
13728 #endif
13729
13730 int
13731 main ()
13732 {
13733
13734 #ifndef ${cf_func}
13735 long foo = (long)(&${cf_func});
13736 if (foo + 1234 > 5678)
13737         ${cf_cv_main_return:-return}(foo);
13738 #endif
13739
13740   ;
13741   return 0;
13742 }
13743 _ACEOF
13744 rm -f conftest.$ac_objext conftest$ac_exeext
13745 if { (eval echo "$as_me:13745: \"$ac_link\"") >&5
13746   (eval $ac_link) 2>&5
13747   ac_status=$?
13748   echo "$as_me:13748: \$? = $ac_status" >&5
13749   (exit $ac_status); } &&
13750          { ac_try='test -s conftest$ac_exeext'
13751   { (eval echo "$as_me:13751: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit $ac_status); }; }; then
13756   cf_result=yes
13757 else
13758   echo "$as_me: failed program was:" >&5
13759 cat conftest.$ac_ext >&5
13760 cf_result=no
13761 fi
13762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13763                 fi
13764                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13765
13766 fi
13767
13768         # use the computed/retrieved cache-value:
13769         eval 'cf_result=$cf_cv_func_'$cf_func
13770         echo "$as_me:13770: result: $cf_result" >&5
13771 echo "${ECHO_T}$cf_result" >&6
13772         if test $cf_result != no; then
13773                 cat >>confdefs.h <<EOF
13774 #define HAVE_${cf_tr_func} 1
13775 EOF
13776
13777         fi
13778 done
13779
13780 if test x$cf_cv_func_tputs = xyes
13781 then
13782         cf_done=no
13783         for cf_arg in int char
13784         do
13785                 for cf_ret in int void
13786                 do
13787                         if test $cf_ret = void
13788                         then
13789                                 cf_return="/* nothing */"
13790                         else
13791                                 cf_return="return value"
13792                         fi
13793                         cat >conftest.$ac_ext <<_ACEOF
13794 #line 13794 "configure"
13795 #include "confdefs.h"
13796
13797 #include <${cf_cv_ncurses_header:-curses.h}>
13798 #include <$cf_cv_term_header>
13799
13800 static $cf_ret outc($cf_arg value) { $cf_return; }
13801
13802 int
13803 main ()
13804 {
13805
13806         tputs("hello", 0, outc);
13807         ${cf_cv_main_return:-return}(0);
13808
13809   ;
13810   return 0;
13811 }
13812 _ACEOF
13813 rm -f conftest.$ac_objext
13814 if { (eval echo "$as_me:13814: \"$ac_compile\"") >&5
13815   (eval $ac_compile) 2>&5
13816   ac_status=$?
13817   echo "$as_me:13817: \$? = $ac_status" >&5
13818   (exit $ac_status); } &&
13819          { ac_try='test -s conftest.$ac_objext'
13820   { (eval echo "$as_me:13820: \"$ac_try\"") >&5
13821   (eval $ac_try) 2>&5
13822   ac_status=$?
13823   echo "$as_me:13823: \$? = $ac_status" >&5
13824   (exit $ac_status); }; }; then
13825
13826                 test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
13827
13828 echo "${as_me:-configure}:13828: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
13829
13830                 cat >>confdefs.h <<EOF
13831 #define TPUTS_ARG               $cf_arg
13832 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
13833 #define TPUTS_RETURN(value)     $cf_return
13834 EOF
13835                 cf_done=yes
13836                 break
13837
13838 else
13839   echo "$as_me: failed program was:" >&5
13840 cat conftest.$ac_ext >&5
13841 fi
13842 rm -f conftest.$ac_objext conftest.$ac_ext
13843                 done
13844                 test $cf_done = yes && break
13845         done
13846 fi
13847
13848 echo "$as_me:13848: checking for ncurses extended functions" >&5
13849 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
13850 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
13851   echo $ECHO_N "(cached) $ECHO_C" >&6
13852 else
13853
13854 cat >conftest.$ac_ext <<_ACEOF
13855 #line 13855 "configure"
13856 #include "confdefs.h"
13857
13858 #include <${cf_cv_ncurses_header:-curses.h}>
13859 int
13860 main ()
13861 {
13862
13863 int x = NCURSES_EXT_FUNCS
13864
13865   ;
13866   return 0;
13867 }
13868 _ACEOF
13869 rm -f conftest.$ac_objext
13870 if { (eval echo "$as_me:13870: \"$ac_compile\"") >&5
13871   (eval $ac_compile) 2>&5
13872   ac_status=$?
13873   echo "$as_me:13873: \$? = $ac_status" >&5
13874   (exit $ac_status); } &&
13875          { ac_try='test -s conftest.$ac_objext'
13876   { (eval echo "$as_me:13876: \"$ac_try\"") >&5
13877   (eval $ac_try) 2>&5
13878   ac_status=$?
13879   echo "$as_me:13879: \$? = $ac_status" >&5
13880   (exit $ac_status); }; }; then
13881   cf_cv_ncurses_ext_funcs=defined
13882 else
13883   echo "$as_me: failed program was:" >&5
13884 cat conftest.$ac_ext >&5
13885
13886 cat >conftest.$ac_ext <<_ACEOF
13887 #line 13887 "configure"
13888 #include "confdefs.h"
13889
13890 #include <${cf_cv_ncurses_header:-curses.h}>
13891 int
13892 main ()
13893 {
13894
13895         (void) assume_default_colors (0, 0);
13896         (void) curses_version ();
13897         (void) define_key (0, 0);
13898         (void) is_term_resized (0, 0);
13899         (void) key_defined (0);
13900         (void) keybound (0, 0);
13901         (void) keyok (0, 0);
13902         (void) resize_term (0, 0);
13903         (void) resizeterm (0, 0);
13904         (void) use_default_colors ();
13905         (void) use_extended_names (0);
13906         (void) wresize (0, 0, 0);
13907   ;
13908   return 0;
13909 }
13910 _ACEOF
13911 rm -f conftest.$ac_objext conftest$ac_exeext
13912 if { (eval echo "$as_me:13912: \"$ac_link\"") >&5
13913   (eval $ac_link) 2>&5
13914   ac_status=$?
13915   echo "$as_me:13915: \$? = $ac_status" >&5
13916   (exit $ac_status); } &&
13917          { ac_try='test -s conftest$ac_exeext'
13918   { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919   (eval $ac_try) 2>&5
13920   ac_status=$?
13921   echo "$as_me:13921: \$? = $ac_status" >&5
13922   (exit $ac_status); }; }; then
13923   cf_cv_ncurses_ext_funcs=yes
13924 else
13925   echo "$as_me: failed program was:" >&5
13926 cat conftest.$ac_ext >&5
13927 cf_cv_ncurses_ext_funcs=no
13928 fi
13929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13930
13931 fi
13932 rm -f conftest.$ac_objext conftest.$ac_ext
13933
13934 fi
13935 echo "$as_me:13935: result: $cf_cv_ncurses_ext_funcs" >&5
13936 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
13937 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
13938 #define NCURSES_EXT_FUNCS 1
13939 EOF
13940
13941 if test "$cf_enable_widec" = yes
13942 then
13943         echo "$as_me:13943: checking for wide-character functions" >&5
13944 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
13945 if test "${cf_cv_widechar_funcs+set}" = set; then
13946   echo $ECHO_N "(cached) $ECHO_C" >&6
13947 else
13948
13949         cat >conftest.$ac_ext <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13952
13953 #include <${cf_cv_ncurses_header:-curses.h}>
13954 int
13955 main ()
13956 {
13957
13958                 static wchar_t src_wchar[2];
13959                 static cchar_t dst_cchar;
13960                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
13961
13962   ;
13963   return 0;
13964 }
13965 _ACEOF
13966 rm -f conftest.$ac_objext conftest$ac_exeext
13967 if { (eval echo "$as_me:13967: \"$ac_link\"") >&5
13968   (eval $ac_link) 2>&5
13969   ac_status=$?
13970   echo "$as_me:13970: \$? = $ac_status" >&5
13971   (exit $ac_status); } &&
13972          { ac_try='test -s conftest$ac_exeext'
13973   { (eval echo "$as_me:13973: \"$ac_try\"") >&5
13974   (eval $ac_try) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit $ac_status); }; }; then
13978   cf_cv_widechar_funcs=yes
13979 else
13980   echo "$as_me: failed program was:" >&5
13981 cat conftest.$ac_ext >&5
13982 cf_cv_widechar_funcs=no
13983 fi
13984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13985
13986 fi
13987 echo "$as_me:13987: result: $cf_cv_widechar_funcs" >&5
13988 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
13989         if test "$cf_cv_widechar_funcs" != no ; then
13990                 cat >>confdefs.h <<\EOF
13991 #define USE_WIDEC_SUPPORT 1
13992 EOF
13993
13994         else
13995                 cat >>confdefs.h <<\EOF
13996 #define USE_WIDEC_SUPPORT 0
13997 EOF
13998
13999         fi
14000 else
14001         cat >>confdefs.h <<\EOF
14002 #define USE_WIDEC_SUPPORT 0
14003 EOF
14004
14005 fi
14006
14007 echo "$as_me:14007: checking if sys/time.h works with sys/select.h" >&5
14008 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14009 if test "${cf_cv_sys_time_select+set}" = set; then
14010   echo $ECHO_N "(cached) $ECHO_C" >&6
14011 else
14012
14013 cat >conftest.$ac_ext <<_ACEOF
14014 #line 14014 "configure"
14015 #include "confdefs.h"
14016
14017 #include <sys/types.h>
14018 #ifdef HAVE_SYS_TIME_H
14019 #include <sys/time.h>
14020 #endif
14021 #ifdef HAVE_SYS_SELECT_H
14022 #include <sys/select.h>
14023 #endif
14024
14025 int
14026 main ()
14027 {
14028
14029   ;
14030   return 0;
14031 }
14032 _ACEOF
14033 rm -f conftest.$ac_objext
14034 if { (eval echo "$as_me:14034: \"$ac_compile\"") >&5
14035   (eval $ac_compile) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit $ac_status); } &&
14039          { ac_try='test -s conftest.$ac_objext'
14040   { (eval echo "$as_me:14040: \"$ac_try\"") >&5
14041   (eval $ac_try) 2>&5
14042   ac_status=$?
14043   echo "$as_me:14043: \$? = $ac_status" >&5
14044   (exit $ac_status); }; }; then
14045   cf_cv_sys_time_select=yes
14046 else
14047   echo "$as_me: failed program was:" >&5
14048 cat conftest.$ac_ext >&5
14049 cf_cv_sys_time_select=no
14050 fi
14051 rm -f conftest.$ac_objext conftest.$ac_ext
14052
14053 fi
14054
14055 echo "$as_me:14055: result: $cf_cv_sys_time_select" >&5
14056 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14057 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14058 #define HAVE_SYS_TIME_SELECT 1
14059 EOF
14060
14061 echo "$as_me:14061: checking for function curses_version" >&5
14062 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14063 if test "${cf_cv_func_curses_version+set}" = set; then
14064   echo $ECHO_N "(cached) $ECHO_C" >&6
14065 else
14066
14067 if test "$cross_compiling" = yes; then
14068   cf_cv_func_curses_version=unknown
14069 else
14070   cat >conftest.$ac_ext <<_ACEOF
14071 #line 14071 "configure"
14072 #include "confdefs.h"
14073
14074 #include <${cf_cv_ncurses_header:-curses.h}>
14075 int main()
14076 {
14077         char temp[1024];
14078         sprintf(temp, "%s\n", curses_version());
14079         ${cf_cv_main_return:-return}(0);
14080 }
14081
14082 _ACEOF
14083 rm -f conftest$ac_exeext
14084 if { (eval echo "$as_me:14084: \"$ac_link\"") >&5
14085   (eval $ac_link) 2>&5
14086   ac_status=$?
14087   echo "$as_me:14087: \$? = $ac_status" >&5
14088   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14089   { (eval echo "$as_me:14089: \"$ac_try\"") >&5
14090   (eval $ac_try) 2>&5
14091   ac_status=$?
14092   echo "$as_me:14092: \$? = $ac_status" >&5
14093   (exit $ac_status); }; }; then
14094   cf_cv_func_curses_version=yes
14095
14096 else
14097   echo "$as_me: program exited with status $ac_status" >&5
14098 echo "$as_me: failed program was:" >&5
14099 cat conftest.$ac_ext >&5
14100 cf_cv_func_curses_version=no
14101
14102 fi
14103 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14104 fi
14105 rm -f core
14106 fi
14107 echo "$as_me:14107: result: $cf_cv_func_curses_version" >&5
14108 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14109 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14110 #define HAVE_CURSES_VERSION 1
14111 EOF
14112
14113 echo "$as_me:14113: checking for ncurses wrap-prefix" >&5
14114 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14115
14116 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14117 if test "${with_ncurses_wrap_prefix+set}" = set; then
14118   withval="$with_ncurses_wrap_prefix"
14119   NCURSES_WRAP_PREFIX=$withval
14120 else
14121   NCURSES_WRAP_PREFIX=_nc_
14122 fi;
14123 echo "$as_me:14123: result: $NCURSES_WRAP_PREFIX" >&5
14124 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14125
14126 echo "$as_me:14126: checking for alternate character set array" >&5
14127 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14128 if test "${cf_cv_curses_acs_map+set}" = set; then
14129   echo $ECHO_N "(cached) $ECHO_C" >&6
14130 else
14131
14132 cf_cv_curses_acs_map=unknown
14133 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14134 do
14135 cat >conftest.$ac_ext <<_ACEOF
14136 #line 14136 "configure"
14137 #include "confdefs.h"
14138
14139 #include <${cf_cv_ncurses_header:-curses.h}>
14140
14141 int
14142 main ()
14143 {
14144
14145 $name['k'] = ACS_PLUS
14146
14147   ;
14148   return 0;
14149 }
14150 _ACEOF
14151 rm -f conftest.$ac_objext conftest$ac_exeext
14152 if { (eval echo "$as_me:14152: \"$ac_link\"") >&5
14153   (eval $ac_link) 2>&5
14154   ac_status=$?
14155   echo "$as_me:14155: \$? = $ac_status" >&5
14156   (exit $ac_status); } &&
14157          { ac_try='test -s conftest$ac_exeext'
14158   { (eval echo "$as_me:14158: \"$ac_try\"") >&5
14159   (eval $ac_try) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit $ac_status); }; }; then
14163   cf_cv_curses_acs_map=$name; break
14164 else
14165   echo "$as_me: failed program was:" >&5
14166 cat conftest.$ac_ext >&5
14167 fi
14168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14169 done
14170
14171 fi
14172 echo "$as_me:14172: result: $cf_cv_curses_acs_map" >&5
14173 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14174
14175 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14176 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14177 EOF
14178
14179 if test "$cf_enable_widec" = yes; then
14180
14181 echo "$as_me:14181: checking for wide alternate character set array" >&5
14182 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14183 if test "${cf_cv_curses_wacs_map+set}" = set; then
14184   echo $ECHO_N "(cached) $ECHO_C" >&6
14185 else
14186
14187         cf_cv_curses_wacs_map=unknown
14188         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14189         do
14190         cat >conftest.$ac_ext <<_ACEOF
14191 #line 14191 "configure"
14192 #include "confdefs.h"
14193
14194 #ifndef _XOPEN_SOURCE_EXTENDED
14195 #define _XOPEN_SOURCE_EXTENDED
14196 #endif
14197 #include <${cf_cv_ncurses_header:-curses.h}>
14198 int
14199 main ()
14200 {
14201 void *foo = &($name['k'])
14202   ;
14203   return 0;
14204 }
14205 _ACEOF
14206 rm -f conftest.$ac_objext conftest$ac_exeext
14207 if { (eval echo "$as_me:14207: \"$ac_link\"") >&5
14208   (eval $ac_link) 2>&5
14209   ac_status=$?
14210   echo "$as_me:14210: \$? = $ac_status" >&5
14211   (exit $ac_status); } &&
14212          { ac_try='test -s conftest$ac_exeext'
14213   { (eval echo "$as_me:14213: \"$ac_try\"") >&5
14214   (eval $ac_try) 2>&5
14215   ac_status=$?
14216   echo "$as_me:14216: \$? = $ac_status" >&5
14217   (exit $ac_status); }; }; then
14218   cf_cv_curses_wacs_map=$name
14219          break
14220 else
14221   echo "$as_me: failed program was:" >&5
14222 cat conftest.$ac_ext >&5
14223 fi
14224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14225         done
14226 fi
14227 echo "$as_me:14227: result: $cf_cv_curses_wacs_map" >&5
14228 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14229
14230 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14231 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14232 EOF
14233
14234 echo "$as_me:14234: checking for wide alternate character constants" >&5
14235 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14236 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14237   echo $ECHO_N "(cached) $ECHO_C" >&6
14238 else
14239
14240 cf_cv_curses_wacs_symbols=no
14241 if test "$cf_cv_curses_wacs_map" != unknown
14242 then
14243         cat >conftest.$ac_ext <<_ACEOF
14244 #line 14244 "configure"
14245 #include "confdefs.h"
14246
14247 #ifndef _XOPEN_SOURCE_EXTENDED
14248 #define _XOPEN_SOURCE_EXTENDED
14249 #endif
14250 #include <${cf_cv_ncurses_header:-curses.h}>
14251 int
14252 main ()
14253 {
14254 cchar_t *foo = WACS_PLUS;
14255          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14256   ;
14257   return 0;
14258 }
14259 _ACEOF
14260 rm -f conftest.$ac_objext conftest$ac_exeext
14261 if { (eval echo "$as_me:14261: \"$ac_link\"") >&5
14262   (eval $ac_link) 2>&5
14263   ac_status=$?
14264   echo "$as_me:14264: \$? = $ac_status" >&5
14265   (exit $ac_status); } &&
14266          { ac_try='test -s conftest$ac_exeext'
14267   { (eval echo "$as_me:14267: \"$ac_try\"") >&5
14268   (eval $ac_try) 2>&5
14269   ac_status=$?
14270   echo "$as_me:14270: \$? = $ac_status" >&5
14271   (exit $ac_status); }; }; then
14272   cf_cv_curses_wacs_symbols=yes
14273 else
14274   echo "$as_me: failed program was:" >&5
14275 cat conftest.$ac_ext >&5
14276 fi
14277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14278 else
14279         cat >conftest.$ac_ext <<_ACEOF
14280 #line 14280 "configure"
14281 #include "confdefs.h"
14282
14283 #ifndef _XOPEN_SOURCE_EXTENDED
14284 #define _XOPEN_SOURCE_EXTENDED
14285 #endif
14286 #include <${cf_cv_ncurses_header:-curses.h}>
14287 int
14288 main ()
14289 {
14290 cchar_t *foo = WACS_PLUS
14291   ;
14292   return 0;
14293 }
14294 _ACEOF
14295 rm -f conftest.$ac_objext conftest$ac_exeext
14296 if { (eval echo "$as_me:14296: \"$ac_link\"") >&5
14297   (eval $ac_link) 2>&5
14298   ac_status=$?
14299   echo "$as_me:14299: \$? = $ac_status" >&5
14300   (exit $ac_status); } &&
14301          { ac_try='test -s conftest$ac_exeext'
14302   { (eval echo "$as_me:14302: \"$ac_try\"") >&5
14303   (eval $ac_try) 2>&5
14304   ac_status=$?
14305   echo "$as_me:14305: \$? = $ac_status" >&5
14306   (exit $ac_status); }; }; then
14307   cf_cv_curses_wacs_symbols=yes
14308 else
14309   echo "$as_me: failed program was:" >&5
14310 cat conftest.$ac_ext >&5
14311 fi
14312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14313 fi
14314
14315 fi
14316 echo "$as_me:14316: result: $cf_cv_curses_wacs_symbols" >&5
14317 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14318
14319 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
14320 #define CURSES_WACS_SYMBOLS 1
14321 EOF
14322
14323 fi
14324
14325 echo "$as_me:14325: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14326 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14327 cat >conftest.$ac_ext <<_ACEOF
14328 #line 14328 "configure"
14329 #include "confdefs.h"
14330
14331 #ifndef _XOPEN_SOURCE_EXTENDED
14332 #define _XOPEN_SOURCE_EXTENDED
14333 #endif
14334 #include <${cf_cv_ncurses_header:-curses.h}>
14335 int
14336 main ()
14337 {
14338
14339 attr_t foo
14340
14341   ;
14342   return 0;
14343 }
14344 _ACEOF
14345 rm -f conftest.$ac_objext
14346 if { (eval echo "$as_me:14346: \"$ac_compile\"") >&5
14347   (eval $ac_compile) 2>&5
14348   ac_status=$?
14349   echo "$as_me:14349: \$? = $ac_status" >&5
14350   (exit $ac_status); } &&
14351          { ac_try='test -s conftest.$ac_objext'
14352   { (eval echo "$as_me:14352: \"$ac_try\"") >&5
14353   (eval $ac_try) 2>&5
14354   ac_status=$?
14355   echo "$as_me:14355: \$? = $ac_status" >&5
14356   (exit $ac_status); }; }; then
14357   cf_result=yes
14358 else
14359   echo "$as_me: failed program was:" >&5
14360 cat conftest.$ac_ext >&5
14361 cf_result=no
14362 fi
14363 rm -f conftest.$ac_objext conftest.$ac_ext
14364 echo "$as_me:14364: result: $cf_result" >&5
14365 echo "${ECHO_T}$cf_result" >&6
14366 if test $cf_result = yes ; then
14367
14368 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14369
14370         cat >>confdefs.h <<EOF
14371 #define $cf_result 1
14372 EOF
14373
14374 else
14375         cat >>confdefs.h <<EOF
14376 #define attr_t long
14377 EOF
14378
14379 fi
14380
14381 if test "$cf_enable_widec" = yes; then
14382
14383 # This is needed on Tru64 5.0 to declare mbstate_t
14384 echo "$as_me:14384: checking if we must include wchar.h to declare mbstate_t" >&5
14385 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14386 if test "${cf_cv_mbstate_t+set}" = set; then
14387   echo $ECHO_N "(cached) $ECHO_C" >&6
14388 else
14389
14390 cat >conftest.$ac_ext <<_ACEOF
14391 #line 14391 "configure"
14392 #include "confdefs.h"
14393
14394 #include <stdlib.h>
14395 #include <stdarg.h>
14396 #include <stdio.h>
14397 #ifdef HAVE_LIBUTF8_H
14398 #include <libutf8.h>
14399 #endif
14400 int
14401 main ()
14402 {
14403 mbstate_t state
14404   ;
14405   return 0;
14406 }
14407 _ACEOF
14408 rm -f conftest.$ac_objext
14409 if { (eval echo "$as_me:14409: \"$ac_compile\"") >&5
14410   (eval $ac_compile) 2>&5
14411   ac_status=$?
14412   echo "$as_me:14412: \$? = $ac_status" >&5
14413   (exit $ac_status); } &&
14414          { ac_try='test -s conftest.$ac_objext'
14415   { (eval echo "$as_me:14415: \"$ac_try\"") >&5
14416   (eval $ac_try) 2>&5
14417   ac_status=$?
14418   echo "$as_me:14418: \$? = $ac_status" >&5
14419   (exit $ac_status); }; }; then
14420   cf_cv_mbstate_t=no
14421 else
14422   echo "$as_me: failed program was:" >&5
14423 cat conftest.$ac_ext >&5
14424 cat >conftest.$ac_ext <<_ACEOF
14425 #line 14425 "configure"
14426 #include "confdefs.h"
14427
14428 #include <stdlib.h>
14429 #include <stdarg.h>
14430 #include <stdio.h>
14431 #include <wchar.h>
14432 #ifdef HAVE_LIBUTF8_H
14433 #include <libutf8.h>
14434 #endif
14435 int
14436 main ()
14437 {
14438 mbstate_t value
14439   ;
14440   return 0;
14441 }
14442 _ACEOF
14443 rm -f conftest.$ac_objext
14444 if { (eval echo "$as_me:14444: \"$ac_compile\"") >&5
14445   (eval $ac_compile) 2>&5
14446   ac_status=$?
14447   echo "$as_me:14447: \$? = $ac_status" >&5
14448   (exit $ac_status); } &&
14449          { ac_try='test -s conftest.$ac_objext'
14450   { (eval echo "$as_me:14450: \"$ac_try\"") >&5
14451   (eval $ac_try) 2>&5
14452   ac_status=$?
14453   echo "$as_me:14453: \$? = $ac_status" >&5
14454   (exit $ac_status); }; }; then
14455   cf_cv_mbstate_t=yes
14456 else
14457   echo "$as_me: failed program was:" >&5
14458 cat conftest.$ac_ext >&5
14459 cf_cv_mbstate_t=unknown
14460 fi
14461 rm -f conftest.$ac_objext conftest.$ac_ext
14462 fi
14463 rm -f conftest.$ac_objext conftest.$ac_ext
14464 fi
14465 echo "$as_me:14465: result: $cf_cv_mbstate_t" >&5
14466 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14467
14468 if test "$cf_cv_mbstate_t" = yes ; then
14469         cat >>confdefs.h <<\EOF
14470 #define NEED_WCHAR_H 1
14471 EOF
14472
14473         NEED_WCHAR_H=1
14474 fi
14475
14476 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
14477 if test "$cf_cv_mbstate_t" = unknown ; then
14478         NCURSES_MBSTATE_T=1
14479 fi
14480
14481 # if we find mbstate_t in either place, use substitution to provide a fallback.
14482 if test "$cf_cv_mbstate_t" != unknown ; then
14483         NCURSES_OK_MBSTATE_T=1
14484 fi
14485
14486 # This is needed on Tru64 5.0 to declare wchar_t
14487 echo "$as_me:14487: checking if we must include wchar.h to declare wchar_t" >&5
14488 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
14489 if test "${cf_cv_wchar_t+set}" = set; then
14490   echo $ECHO_N "(cached) $ECHO_C" >&6
14491 else
14492
14493 cat >conftest.$ac_ext <<_ACEOF
14494 #line 14494 "configure"
14495 #include "confdefs.h"
14496
14497 #include <stdlib.h>
14498 #include <stdarg.h>
14499 #include <stdio.h>
14500 #ifdef HAVE_LIBUTF8_H
14501 #include <libutf8.h>
14502 #endif
14503 int
14504 main ()
14505 {
14506 wchar_t state
14507   ;
14508   return 0;
14509 }
14510 _ACEOF
14511 rm -f conftest.$ac_objext
14512 if { (eval echo "$as_me:14512: \"$ac_compile\"") >&5
14513   (eval $ac_compile) 2>&5
14514   ac_status=$?
14515   echo "$as_me:14515: \$? = $ac_status" >&5
14516   (exit $ac_status); } &&
14517          { ac_try='test -s conftest.$ac_objext'
14518   { (eval echo "$as_me:14518: \"$ac_try\"") >&5
14519   (eval $ac_try) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit $ac_status); }; }; then
14523   cf_cv_wchar_t=no
14524 else
14525   echo "$as_me: failed program was:" >&5
14526 cat conftest.$ac_ext >&5
14527 cat >conftest.$ac_ext <<_ACEOF
14528 #line 14528 "configure"
14529 #include "confdefs.h"
14530
14531 #include <stdlib.h>
14532 #include <stdarg.h>
14533 #include <stdio.h>
14534 #include <wchar.h>
14535 #ifdef HAVE_LIBUTF8_H
14536 #include <libutf8.h>
14537 #endif
14538 int
14539 main ()
14540 {
14541 wchar_t value
14542   ;
14543   return 0;
14544 }
14545 _ACEOF
14546 rm -f conftest.$ac_objext
14547 if { (eval echo "$as_me:14547: \"$ac_compile\"") >&5
14548   (eval $ac_compile) 2>&5
14549   ac_status=$?
14550   echo "$as_me:14550: \$? = $ac_status" >&5
14551   (exit $ac_status); } &&
14552          { ac_try='test -s conftest.$ac_objext'
14553   { (eval echo "$as_me:14553: \"$ac_try\"") >&5
14554   (eval $ac_try) 2>&5
14555   ac_status=$?
14556   echo "$as_me:14556: \$? = $ac_status" >&5
14557   (exit $ac_status); }; }; then
14558   cf_cv_wchar_t=yes
14559 else
14560   echo "$as_me: failed program was:" >&5
14561 cat conftest.$ac_ext >&5
14562 cf_cv_wchar_t=unknown
14563 fi
14564 rm -f conftest.$ac_objext conftest.$ac_ext
14565 fi
14566 rm -f conftest.$ac_objext conftest.$ac_ext
14567 fi
14568 echo "$as_me:14568: result: $cf_cv_wchar_t" >&5
14569 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14570
14571 if test "$cf_cv_wchar_t" = yes ; then
14572         cat >>confdefs.h <<\EOF
14573 #define NEED_WCHAR_H 1
14574 EOF
14575
14576         NEED_WCHAR_H=1
14577 fi
14578
14579 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14580 if test "$cf_cv_wchar_t" = unknown ; then
14581         NCURSES_WCHAR_T=1
14582 fi
14583
14584 # if we find wchar_t in either place, use substitution to provide a fallback.
14585 if test "$cf_cv_wchar_t" != unknown ; then
14586         NCURSES_OK_WCHAR_T=1
14587 fi
14588
14589 # This is needed on Tru64 5.0 to declare wint_t
14590 echo "$as_me:14590: checking if we must include wchar.h to declare wint_t" >&5
14591 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14592 if test "${cf_cv_wint_t+set}" = set; then
14593   echo $ECHO_N "(cached) $ECHO_C" >&6
14594 else
14595
14596 cat >conftest.$ac_ext <<_ACEOF
14597 #line 14597 "configure"
14598 #include "confdefs.h"
14599
14600 #include <stdlib.h>
14601 #include <stdarg.h>
14602 #include <stdio.h>
14603 #ifdef HAVE_LIBUTF8_H
14604 #include <libutf8.h>
14605 #endif
14606 int
14607 main ()
14608 {
14609 wint_t state
14610   ;
14611   return 0;
14612 }
14613 _ACEOF
14614 rm -f conftest.$ac_objext
14615 if { (eval echo "$as_me:14615: \"$ac_compile\"") >&5
14616   (eval $ac_compile) 2>&5
14617   ac_status=$?
14618   echo "$as_me:14618: \$? = $ac_status" >&5
14619   (exit $ac_status); } &&
14620          { ac_try='test -s conftest.$ac_objext'
14621   { (eval echo "$as_me:14621: \"$ac_try\"") >&5
14622   (eval $ac_try) 2>&5
14623   ac_status=$?
14624   echo "$as_me:14624: \$? = $ac_status" >&5
14625   (exit $ac_status); }; }; then
14626   cf_cv_wint_t=no
14627 else
14628   echo "$as_me: failed program was:" >&5
14629 cat conftest.$ac_ext >&5
14630 cat >conftest.$ac_ext <<_ACEOF
14631 #line 14631 "configure"
14632 #include "confdefs.h"
14633
14634 #include <stdlib.h>
14635 #include <stdarg.h>
14636 #include <stdio.h>
14637 #include <wchar.h>
14638 #ifdef HAVE_LIBUTF8_H
14639 #include <libutf8.h>
14640 #endif
14641 int
14642 main ()
14643 {
14644 wint_t value
14645   ;
14646   return 0;
14647 }
14648 _ACEOF
14649 rm -f conftest.$ac_objext
14650 if { (eval echo "$as_me:14650: \"$ac_compile\"") >&5
14651   (eval $ac_compile) 2>&5
14652   ac_status=$?
14653   echo "$as_me:14653: \$? = $ac_status" >&5
14654   (exit $ac_status); } &&
14655          { ac_try='test -s conftest.$ac_objext'
14656   { (eval echo "$as_me:14656: \"$ac_try\"") >&5
14657   (eval $ac_try) 2>&5
14658   ac_status=$?
14659   echo "$as_me:14659: \$? = $ac_status" >&5
14660   (exit $ac_status); }; }; then
14661   cf_cv_wint_t=yes
14662 else
14663   echo "$as_me: failed program was:" >&5
14664 cat conftest.$ac_ext >&5
14665 cf_cv_wint_t=unknown
14666 fi
14667 rm -f conftest.$ac_objext conftest.$ac_ext
14668 fi
14669 rm -f conftest.$ac_objext conftest.$ac_ext
14670 fi
14671 echo "$as_me:14671: result: $cf_cv_wint_t" >&5
14672 echo "${ECHO_T}$cf_cv_wint_t" >&6
14673
14674 if test "$cf_cv_wint_t" = yes ; then
14675         cat >>confdefs.h <<\EOF
14676 #define NEED_WCHAR_H 1
14677 EOF
14678
14679         NEED_WCHAR_H=1
14680 fi
14681
14682 # if we do not find wint_t in either place, use substitution to provide a fallback.
14683 if test "$cf_cv_wint_t" = unknown ; then
14684         NCURSES_WINT_T=1
14685 fi
14686
14687 # if we find wint_t in either place, use substitution to provide a fallback.
14688 if test "$cf_cv_wint_t" != unknown ; then
14689         NCURSES_OK_WINT_T=1
14690 fi
14691
14692         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
14693
14694 echo "$as_me:14694: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14695 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14696 cat >conftest.$ac_ext <<_ACEOF
14697 #line 14697 "configure"
14698 #include "confdefs.h"
14699
14700 #ifndef _XOPEN_SOURCE_EXTENDED
14701 #define _XOPEN_SOURCE_EXTENDED
14702 #endif
14703 #include <${cf_cv_ncurses_header:-curses.h}>
14704 int
14705 main ()
14706 {
14707
14708 mbstate_t foo
14709
14710   ;
14711   return 0;
14712 }
14713 _ACEOF
14714 rm -f conftest.$ac_objext
14715 if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
14716   (eval $ac_compile) 2>&5
14717   ac_status=$?
14718   echo "$as_me:14718: \$? = $ac_status" >&5
14719   (exit $ac_status); } &&
14720          { ac_try='test -s conftest.$ac_objext'
14721   { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14722   (eval $ac_try) 2>&5
14723   ac_status=$?
14724   echo "$as_me:14724: \$? = $ac_status" >&5
14725   (exit $ac_status); }; }; then
14726   cf_result=yes
14727 else
14728   echo "$as_me: failed program was:" >&5
14729 cat conftest.$ac_ext >&5
14730 cf_result=no
14731 fi
14732 rm -f conftest.$ac_objext conftest.$ac_ext
14733 echo "$as_me:14733: result: $cf_result" >&5
14734 echo "${ECHO_T}$cf_result" >&6
14735 if test $cf_result = yes ; then
14736
14737 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14738
14739         cat >>confdefs.h <<EOF
14740 #define $cf_result 1
14741 EOF
14742
14743 else
14744         cat >>confdefs.h <<EOF
14745 #define mbstate_t long
14746 EOF
14747
14748 fi
14749
14750         fi
14751
14752         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
14753
14754 echo "$as_me:14754: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14755 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14756 cat >conftest.$ac_ext <<_ACEOF
14757 #line 14757 "configure"
14758 #include "confdefs.h"
14759
14760 #ifndef _XOPEN_SOURCE_EXTENDED
14761 #define _XOPEN_SOURCE_EXTENDED
14762 #endif
14763 #include <${cf_cv_ncurses_header:-curses.h}>
14764 int
14765 main ()
14766 {
14767
14768 wchar_t foo
14769
14770   ;
14771   return 0;
14772 }
14773 _ACEOF
14774 rm -f conftest.$ac_objext
14775 if { (eval echo "$as_me:14775: \"$ac_compile\"") >&5
14776   (eval $ac_compile) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); } &&
14780          { ac_try='test -s conftest.$ac_objext'
14781   { (eval echo "$as_me:14781: \"$ac_try\"") >&5
14782   (eval $ac_try) 2>&5
14783   ac_status=$?
14784   echo "$as_me:14784: \$? = $ac_status" >&5
14785   (exit $ac_status); }; }; then
14786   cf_result=yes
14787 else
14788   echo "$as_me: failed program was:" >&5
14789 cat conftest.$ac_ext >&5
14790 cf_result=no
14791 fi
14792 rm -f conftest.$ac_objext conftest.$ac_ext
14793 echo "$as_me:14793: result: $cf_result" >&5
14794 echo "${ECHO_T}$cf_result" >&6
14795 if test $cf_result = yes ; then
14796
14797 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14798
14799         cat >>confdefs.h <<EOF
14800 #define $cf_result 1
14801 EOF
14802
14803 else
14804         cat >>confdefs.h <<EOF
14805 #define wchar_t long
14806 EOF
14807
14808 fi
14809
14810         fi
14811
14812         if test "$NCURSES_OK_WINT_T" = 0 ; then
14813
14814 echo "$as_me:14814: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14815 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14816 cat >conftest.$ac_ext <<_ACEOF
14817 #line 14817 "configure"
14818 #include "confdefs.h"
14819
14820 #ifndef _XOPEN_SOURCE_EXTENDED
14821 #define _XOPEN_SOURCE_EXTENDED
14822 #endif
14823 #include <${cf_cv_ncurses_header:-curses.h}>
14824 int
14825 main ()
14826 {
14827
14828 wint_t foo
14829
14830   ;
14831   return 0;
14832 }
14833 _ACEOF
14834 rm -f conftest.$ac_objext
14835 if { (eval echo "$as_me:14835: \"$ac_compile\"") >&5
14836   (eval $ac_compile) 2>&5
14837   ac_status=$?
14838   echo "$as_me:14838: \$? = $ac_status" >&5
14839   (exit $ac_status); } &&
14840          { ac_try='test -s conftest.$ac_objext'
14841   { (eval echo "$as_me:14841: \"$ac_try\"") >&5
14842   (eval $ac_try) 2>&5
14843   ac_status=$?
14844   echo "$as_me:14844: \$? = $ac_status" >&5
14845   (exit $ac_status); }; }; then
14846   cf_result=yes
14847 else
14848   echo "$as_me: failed program was:" >&5
14849 cat conftest.$ac_ext >&5
14850 cf_result=no
14851 fi
14852 rm -f conftest.$ac_objext conftest.$ac_ext
14853 echo "$as_me:14853: result: $cf_result" >&5
14854 echo "${ECHO_T}$cf_result" >&6
14855 if test $cf_result = yes ; then
14856
14857 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14858
14859         cat >>confdefs.h <<EOF
14860 #define $cf_result 1
14861 EOF
14862
14863 else
14864         cat >>confdefs.h <<EOF
14865 #define wint_t long
14866 EOF
14867
14868 fi
14869
14870         fi
14871 fi
14872
14873 echo "$as_me:14873: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
14874 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14875
14876 cat >conftest.$ac_ext <<_ACEOF
14877 #line 14877 "configure"
14878 #include "confdefs.h"
14879
14880 #ifdef HAVE_XCURSES
14881 #include <xcurses.h>
14882 char * XCursesProgramName = "test";
14883 #else
14884 #include <${cf_cv_ncurses_header:-curses.h}>
14885 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14886 #include <ncursesw/term.h>
14887 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14888 #include <ncurses/term.h>
14889 #elif defined(HAVE_TERM_H)
14890 #include <term.h>
14891 #endif
14892 #endif
14893
14894 int
14895 main ()
14896 {
14897
14898 void *foo = &(boolnames)
14899
14900   ;
14901   return 0;
14902 }
14903 _ACEOF
14904 rm -f conftest.$ac_objext
14905 if { (eval echo "$as_me:14905: \"$ac_compile\"") >&5
14906   (eval $ac_compile) 2>&5
14907   ac_status=$?
14908   echo "$as_me:14908: \$? = $ac_status" >&5
14909   (exit $ac_status); } &&
14910          { ac_try='test -s conftest.$ac_objext'
14911   { (eval echo "$as_me:14911: \"$ac_try\"") >&5
14912   (eval $ac_try) 2>&5
14913   ac_status=$?
14914   echo "$as_me:14914: \$? = $ac_status" >&5
14915   (exit $ac_status); }; }; then
14916   cf_result=yes
14917 else
14918   echo "$as_me: failed program was:" >&5
14919 cat conftest.$ac_ext >&5
14920 cf_result=no
14921 fi
14922 rm -f conftest.$ac_objext conftest.$ac_ext
14923 echo "$as_me:14923: result: $cf_result" >&5
14924 echo "${ECHO_T}$cf_result" >&6
14925
14926 if test $cf_result = yes ; then
14927
14928 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14929
14930         cat >>confdefs.h <<EOF
14931 #define $cf_result 1
14932 EOF
14933
14934 else
14935         echo "$as_me:14935: checking for data boolnames in library" >&5
14936 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
14937         # BSD linkers insist on making weak linkage, but resolve at runtime.
14938         if test "$cross_compiling" = yes; then
14939
14940         # cross-compiling
14941         cat >conftest.$ac_ext <<_ACEOF
14942 #line 14942 "configure"
14943 #include "confdefs.h"
14944
14945 #ifdef HAVE_XCURSES
14946 #include <xcurses.h>
14947 char * XCursesProgramName = "test";
14948 #else
14949 #include <${cf_cv_ncurses_header:-curses.h}>
14950 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14951 #include <ncursesw/term.h>
14952 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14953 #include <ncurses/term.h>
14954 #elif defined(HAVE_TERM_H)
14955 #include <term.h>
14956 #endif
14957 #endif
14958
14959 extern char boolnames;
14960 int
14961 main ()
14962 {
14963
14964         do {
14965                 void *foo = &(boolnames);
14966                 ${cf_cv_main_return:-return}(foo == 0);
14967         } while (0)
14968
14969   ;
14970   return 0;
14971 }
14972 _ACEOF
14973 rm -f conftest.$ac_objext conftest$ac_exeext
14974 if { (eval echo "$as_me:14974: \"$ac_link\"") >&5
14975   (eval $ac_link) 2>&5
14976   ac_status=$?
14977   echo "$as_me:14977: \$? = $ac_status" >&5
14978   (exit $ac_status); } &&
14979          { ac_try='test -s conftest$ac_exeext'
14980   { (eval echo "$as_me:14980: \"$ac_try\"") >&5
14981   (eval $ac_try) 2>&5
14982   ac_status=$?
14983   echo "$as_me:14983: \$? = $ac_status" >&5
14984   (exit $ac_status); }; }; then
14985   cf_result=yes
14986 else
14987   echo "$as_me: failed program was:" >&5
14988 cat conftest.$ac_ext >&5
14989 cf_result=no
14990 fi
14991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14992
14993 else
14994   cat >conftest.$ac_ext <<_ACEOF
14995 #line 14995 "configure"
14996 #include "confdefs.h"
14997
14998 #ifdef HAVE_XCURSES
14999 #include <xcurses.h>
15000 char * XCursesProgramName = "test";
15001 #else
15002 #include <${cf_cv_ncurses_header:-curses.h}>
15003 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15004 #include <ncursesw/term.h>
15005 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15006 #include <ncurses/term.h>
15007 #elif defined(HAVE_TERM_H)
15008 #include <term.h>
15009 #endif
15010 #endif
15011
15012 extern char boolnames;
15013 int main(void)
15014 {
15015         void *foo = &(boolnames);
15016         ${cf_cv_main_return:-return}(foo == 0);
15017 }
15018 _ACEOF
15019 rm -f conftest$ac_exeext
15020 if { (eval echo "$as_me:15020: \"$ac_link\"") >&5
15021   (eval $ac_link) 2>&5
15022   ac_status=$?
15023   echo "$as_me:15023: \$? = $ac_status" >&5
15024   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15025   { (eval echo "$as_me:15025: \"$ac_try\"") >&5
15026   (eval $ac_try) 2>&5
15027   ac_status=$?
15028   echo "$as_me:15028: \$? = $ac_status" >&5
15029   (exit $ac_status); }; }; then
15030   cf_result=yes
15031 else
15032   echo "$as_me: program exited with status $ac_status" >&5
15033 echo "$as_me: failed program was:" >&5
15034 cat conftest.$ac_ext >&5
15035 cf_result=no
15036 fi
15037 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15038 fi
15039         echo "$as_me:15039: result: $cf_result" >&5
15040 echo "${ECHO_T}$cf_result" >&6
15041         if test $cf_result = yes ; then
15042
15043 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15044
15045                 cat >>confdefs.h <<EOF
15046 #define $cf_result 1
15047 EOF
15048
15049         fi
15050 fi
15051
15052 echo "$as_me:15052: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15053 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15054
15055 cat >conftest.$ac_ext <<_ACEOF
15056 #line 15056 "configure"
15057 #include "confdefs.h"
15058
15059 #ifdef HAVE_XCURSES
15060 #include <xcurses.h>
15061 char * XCursesProgramName = "test";
15062 #else
15063 #include <${cf_cv_ncurses_header:-curses.h}>
15064 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15065 #include <ncursesw/term.h>
15066 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15067 #include <ncurses/term.h>
15068 #elif defined(HAVE_TERM_H)
15069 #include <term.h>
15070 #endif
15071 #endif
15072
15073 int
15074 main ()
15075 {
15076
15077 void *foo = &(boolfnames)
15078
15079   ;
15080   return 0;
15081 }
15082 _ACEOF
15083 rm -f conftest.$ac_objext
15084 if { (eval echo "$as_me:15084: \"$ac_compile\"") >&5
15085   (eval $ac_compile) 2>&5
15086   ac_status=$?
15087   echo "$as_me:15087: \$? = $ac_status" >&5
15088   (exit $ac_status); } &&
15089          { ac_try='test -s conftest.$ac_objext'
15090   { (eval echo "$as_me:15090: \"$ac_try\"") >&5
15091   (eval $ac_try) 2>&5
15092   ac_status=$?
15093   echo "$as_me:15093: \$? = $ac_status" >&5
15094   (exit $ac_status); }; }; then
15095   cf_result=yes
15096 else
15097   echo "$as_me: failed program was:" >&5
15098 cat conftest.$ac_ext >&5
15099 cf_result=no
15100 fi
15101 rm -f conftest.$ac_objext conftest.$ac_ext
15102 echo "$as_me:15102: result: $cf_result" >&5
15103 echo "${ECHO_T}$cf_result" >&6
15104
15105 if test $cf_result = yes ; then
15106
15107 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15108
15109         cat >>confdefs.h <<EOF
15110 #define $cf_result 1
15111 EOF
15112
15113 else
15114         echo "$as_me:15114: checking for data boolfnames in library" >&5
15115 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15116         # BSD linkers insist on making weak linkage, but resolve at runtime.
15117         if test "$cross_compiling" = yes; then
15118
15119         # cross-compiling
15120         cat >conftest.$ac_ext <<_ACEOF
15121 #line 15121 "configure"
15122 #include "confdefs.h"
15123
15124 #ifdef HAVE_XCURSES
15125 #include <xcurses.h>
15126 char * XCursesProgramName = "test";
15127 #else
15128 #include <${cf_cv_ncurses_header:-curses.h}>
15129 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15130 #include <ncursesw/term.h>
15131 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15132 #include <ncurses/term.h>
15133 #elif defined(HAVE_TERM_H)
15134 #include <term.h>
15135 #endif
15136 #endif
15137
15138 extern char boolfnames;
15139 int
15140 main ()
15141 {
15142
15143         do {
15144                 void *foo = &(boolfnames);
15145                 ${cf_cv_main_return:-return}(foo == 0);
15146         } while (0)
15147
15148   ;
15149   return 0;
15150 }
15151 _ACEOF
15152 rm -f conftest.$ac_objext conftest$ac_exeext
15153 if { (eval echo "$as_me:15153: \"$ac_link\"") >&5
15154   (eval $ac_link) 2>&5
15155   ac_status=$?
15156   echo "$as_me:15156: \$? = $ac_status" >&5
15157   (exit $ac_status); } &&
15158          { ac_try='test -s conftest$ac_exeext'
15159   { (eval echo "$as_me:15159: \"$ac_try\"") >&5
15160   (eval $ac_try) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit $ac_status); }; }; then
15164   cf_result=yes
15165 else
15166   echo "$as_me: failed program was:" >&5
15167 cat conftest.$ac_ext >&5
15168 cf_result=no
15169 fi
15170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15171
15172 else
15173   cat >conftest.$ac_ext <<_ACEOF
15174 #line 15174 "configure"
15175 #include "confdefs.h"
15176
15177 #ifdef HAVE_XCURSES
15178 #include <xcurses.h>
15179 char * XCursesProgramName = "test";
15180 #else
15181 #include <${cf_cv_ncurses_header:-curses.h}>
15182 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15183 #include <ncursesw/term.h>
15184 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15185 #include <ncurses/term.h>
15186 #elif defined(HAVE_TERM_H)
15187 #include <term.h>
15188 #endif
15189 #endif
15190
15191 extern char boolfnames;
15192 int main(void)
15193 {
15194         void *foo = &(boolfnames);
15195         ${cf_cv_main_return:-return}(foo == 0);
15196 }
15197 _ACEOF
15198 rm -f conftest$ac_exeext
15199 if { (eval echo "$as_me:15199: \"$ac_link\"") >&5
15200   (eval $ac_link) 2>&5
15201   ac_status=$?
15202   echo "$as_me:15202: \$? = $ac_status" >&5
15203   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15204   { (eval echo "$as_me:15204: \"$ac_try\"") >&5
15205   (eval $ac_try) 2>&5
15206   ac_status=$?
15207   echo "$as_me:15207: \$? = $ac_status" >&5
15208   (exit $ac_status); }; }; then
15209   cf_result=yes
15210 else
15211   echo "$as_me: program exited with status $ac_status" >&5
15212 echo "$as_me: failed program was:" >&5
15213 cat conftest.$ac_ext >&5
15214 cf_result=no
15215 fi
15216 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15217 fi
15218         echo "$as_me:15218: result: $cf_result" >&5
15219 echo "${ECHO_T}$cf_result" >&6
15220         if test $cf_result = yes ; then
15221
15222 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15223
15224                 cat >>confdefs.h <<EOF
15225 #define $cf_result 1
15226 EOF
15227
15228         fi
15229 fi
15230
15231 TEST_ARGS="$LIBS"
15232 LIBS=
15233
15234 ac_config_files="$ac_config_files Makefile"
15235 ac_config_commands="$ac_config_commands default"
15236 cat >confcache <<\_ACEOF
15237 # This file is a shell script that caches the results of configure
15238 # tests run on this system so they can be shared between configure
15239 # scripts and configure runs, see configure's option --config-cache.
15240 # It is not useful on other systems.  If it contains results you don't
15241 # want to keep, you may remove or edit it.
15242 #
15243 # config.status only pays attention to the cache file if you give it
15244 # the --recheck option to rerun configure.
15245 #
15246 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15247 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15248 # following values.
15249
15250 _ACEOF
15251
15252 # The following way of writing the cache mishandles newlines in values,
15253 # but we know of no workaround that is simple, portable, and efficient.
15254 # So, don't put newlines in cache variables' values.
15255 # Ultrix sh set writes to stderr and can't be redirected directly,
15256 # and sets the high bit in the cache file unless we assign to the vars.
15257 {
15258   (set) 2>&1 |
15259     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15260     *ac_space=\ *)
15261       # `set' does not quote correctly, so add quotes (double-quote
15262       # substitution turns \\\\ into \\, and sed turns \\ into \).
15263       sed -n \
15264         "s/'/'\\\\''/g;
15265           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15266       ;;
15267     *)
15268       # `set' quotes correctly as required by POSIX, so do not add quotes.
15269       sed -n \
15270         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15271       ;;
15272     esac;
15273 } |
15274   sed '
15275      t clear
15276      : clear
15277      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15278      t end
15279      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15280      : end' >>confcache
15281 if cmp -s $cache_file confcache; then :; else
15282   if test -w $cache_file; then
15283     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15284     cat confcache >$cache_file
15285   else
15286     echo "not updating unwritable cache $cache_file"
15287   fi
15288 fi
15289 rm -f confcache
15290
15291 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15292 # Let make expand exec_prefix.
15293 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15294
15295 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15296 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15297 # trailing colons and then remove the whole line if VPATH becomes empty
15298 # (actually we leave an empty line to preserve line numbers).
15299 if test "x$srcdir" = x.; then
15300   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15301 s/:*\$(srcdir):*/:/;
15302 s/:*\${srcdir}:*/:/;
15303 s/:*@srcdir@:*/:/;
15304 s/^\([^=]*=[    ]*\):*/\1/;
15305 s/:*$//;
15306 s/^[^=]*=[      ]*$//;
15307 }'
15308 fi
15309
15310 DEFS=-DHAVE_CONFIG_H
15311
15312 : ${CONFIG_STATUS=./config.status}
15313 ac_clean_files_save=$ac_clean_files
15314 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15315 { echo "$as_me:15315: creating $CONFIG_STATUS" >&5
15316 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15317 cat >$CONFIG_STATUS <<_ACEOF
15318 #! $SHELL
15319 # Generated automatically by configure.
15320 # Run this file to recreate the current configuration.
15321 # Compiler output produced by configure, useful for debugging
15322 # configure, is in config.log if it exists.
15323
15324 debug=false
15325 SHELL=\${CONFIG_SHELL-$SHELL}
15326 ac_cs_invocation="\$0 \$@"
15327
15328 _ACEOF
15329
15330 cat >>$CONFIG_STATUS <<\_ACEOF
15331 # Be Bourne compatible
15332 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15333   emulate sh
15334   NULLCMD=:
15335 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15336   set -o posix
15337 fi
15338
15339 # Name of the executable.
15340 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15341
15342 if expr a : '\(a\)' >/dev/null 2>&1; then
15343   as_expr=expr
15344 else
15345   as_expr=false
15346 fi
15347
15348 rm -f conf$$ conf$$.exe conf$$.file
15349 echo >conf$$.file
15350 if ln -s conf$$.file conf$$ 2>/dev/null; then
15351   # We could just check for DJGPP; but this test a) works b) is more generic
15352   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15353   if test -f conf$$.exe; then
15354     # Don't use ln at all; we don't have any links
15355     as_ln_s='cp -p'
15356   else
15357     as_ln_s='ln -s'
15358   fi
15359 elif ln conf$$.file conf$$ 2>/dev/null; then
15360   as_ln_s=ln
15361 else
15362   as_ln_s='cp -p'
15363 fi
15364 rm -f conf$$ conf$$.exe conf$$.file
15365
15366 as_executable_p="test -f"
15367
15368 # Support unset when possible.
15369 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15370   as_unset=unset
15371 else
15372   as_unset=false
15373 fi
15374
15375 # NLS nuisances.
15376 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15377 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15378 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15379 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15380 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15381 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15382 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15383 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15384
15385 # IFS
15386 # We need space, tab and new line, in precisely that order.
15387 as_nl='
15388 '
15389 IFS="   $as_nl"
15390
15391 # CDPATH.
15392 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15393
15394 exec 6>&1
15395
15396 _ACEOF
15397
15398 # Files that config.status was made for.
15399 if test -n "$ac_config_files"; then
15400   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15401 fi
15402
15403 if test -n "$ac_config_headers"; then
15404   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15405 fi
15406
15407 if test -n "$ac_config_links"; then
15408   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15409 fi
15410
15411 if test -n "$ac_config_commands"; then
15412   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15413 fi
15414
15415 cat >>$CONFIG_STATUS <<\EOF
15416
15417 ac_cs_usage="\
15418 \`$as_me' instantiates files from templates according to the
15419 current configuration.
15420
15421 Usage: $0 [OPTIONS] [FILE]...
15422
15423   -h, --help       print this help, then exit
15424   -V, --version    print version number, then exit
15425   -d, --debug      don't remove temporary files
15426       --recheck    update $as_me by reconfiguring in the same conditions
15427   --file=FILE[:TEMPLATE]
15428                    instantiate the configuration file FILE
15429   --header=FILE[:TEMPLATE]
15430                    instantiate the configuration header FILE
15431
15432 Configuration files:
15433 $config_files
15434
15435 Configuration headers:
15436 $config_headers
15437
15438 Configuration commands:
15439 $config_commands
15440
15441 Report bugs to <dickey@invisible-island.net>."
15442 EOF
15443
15444 cat >>$CONFIG_STATUS <<EOF
15445 ac_cs_version="\\
15446 config.status
15447 configured by $0, generated by GNU Autoconf 2.52.20101002,
15448   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15449
15450 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15451 Free Software Foundation, Inc.
15452 This config.status script is free software; the Free Software Foundation
15453 gives unlimited permission to copy, distribute and modify it."
15454 srcdir=$srcdir
15455 INSTALL="$INSTALL"
15456 EOF
15457
15458 cat >>$CONFIG_STATUS <<\EOF
15459 # If no file are specified by the user, then we need to provide default
15460 # value.  By we need to know if files were specified by the user.
15461 ac_need_defaults=:
15462 while test $# != 0
15463 do
15464   case $1 in
15465   --*=*)
15466     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15467     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15468     shift
15469     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15470     shift
15471     ;;
15472   -*);;
15473   *) # This is not an option, so the user has probably given explicit
15474      # arguments.
15475      ac_need_defaults=false;;
15476   esac
15477
15478   case $1 in
15479   # Handling of the options.
15480 EOF
15481 cat >>$CONFIG_STATUS <<EOF
15482   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15483     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15484     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15485 EOF
15486 cat >>$CONFIG_STATUS <<\EOF
15487   --version | --vers* | -V )
15488     echo "$ac_cs_version"; exit 0 ;;
15489   --he | --h)
15490     # Conflict between --help and --header
15491     { { echo "$as_me:15491: error: ambiguous option: $1
15492 Try \`$0 --help' for more information." >&5
15493 echo "$as_me: error: ambiguous option: $1
15494 Try \`$0 --help' for more information." >&2;}
15495    { (exit 1); exit 1; }; };;
15496   --help | --hel | -h )
15497     echo "$ac_cs_usage"; exit 0 ;;
15498   --debug | --d* | -d )
15499     debug=: ;;
15500   --file | --fil | --fi | --f )
15501     shift
15502     CONFIG_FILES="$CONFIG_FILES $1"
15503     ac_need_defaults=false;;
15504   --header | --heade | --head | --hea )
15505     shift
15506     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15507     ac_need_defaults=false;;
15508
15509   # This is an error.
15510   -*) { { echo "$as_me:15510: error: unrecognized option: $1
15511 Try \`$0 --help' for more information." >&5
15512 echo "$as_me: error: unrecognized option: $1
15513 Try \`$0 --help' for more information." >&2;}
15514    { (exit 1); exit 1; }; } ;;
15515
15516   *) ac_config_targets="$ac_config_targets $1" ;;
15517
15518   esac
15519   shift
15520 done
15521
15522 exec 5>>config.log
15523 cat >&5 << _ACEOF
15524
15525 ## ----------------------- ##
15526 ## Running config.status.  ##
15527 ## ----------------------- ##
15528
15529 This file was extended by $as_me 2.52.20101002, executed with
15530   CONFIG_FILES    = $CONFIG_FILES
15531   CONFIG_HEADERS  = $CONFIG_HEADERS
15532   CONFIG_LINKS    = $CONFIG_LINKS
15533   CONFIG_COMMANDS = $CONFIG_COMMANDS
15534   > $ac_cs_invocation
15535 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15536
15537 _ACEOF
15538 EOF
15539
15540 cat >>$CONFIG_STATUS <<EOF
15541 #
15542 # INIT-COMMANDS section.
15543 #
15544
15545 AWK="$AWK"
15546 ECHO_LD="$ECHO_LD"
15547
15548 EOF
15549
15550 cat >>$CONFIG_STATUS <<\EOF
15551 for ac_config_target in $ac_config_targets
15552 do
15553   case "$ac_config_target" in
15554   # Handling of arguments.
15555   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15556   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15557   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
15558   *) { { echo "$as_me:15558: error: invalid argument: $ac_config_target" >&5
15559 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15560    { (exit 1); exit 1; }; };;
15561   esac
15562 done
15563
15564 # If the user did not use the arguments to specify the items to instantiate,
15565 # then the envvar interface is used.  Set only those that are not.
15566 # We use the long form for the default assignment because of an extremely
15567 # bizarre bug on SunOS 4.1.3.
15568 if $ac_need_defaults; then
15569   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15570   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15571   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15572 fi
15573
15574 # Create a temporary directory, and hook for its removal unless debugging.
15575 $debug ||
15576 {
15577   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15578   trap '{ (exit 1); exit 1; }' 1 2 13 15
15579 }
15580
15581 # Create a (secure) tmp directory for tmp files.
15582 : ${TMPDIR=/tmp}
15583 {
15584   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15585   test -n "$tmp" && test -d "$tmp"
15586 }  ||
15587 {
15588   tmp=$TMPDIR/cs$$-$RANDOM
15589   (umask 077 && mkdir $tmp)
15590 } ||
15591 {
15592    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15593    { (exit 1); exit 1; }
15594 }
15595
15596 EOF
15597
15598 cat >>$CONFIG_STATUS <<EOF
15599
15600 #
15601 # CONFIG_FILES section.
15602 #
15603
15604 # No need to generate the scripts if there are no CONFIG_FILES.
15605 # This happens for instance when ./config.status config.h
15606 if test -n "\$CONFIG_FILES"; then
15607   # Protect against being on the right side of a sed subst in config.status.
15608   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15609    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15610 s,@SHELL@,$SHELL,;t t
15611 s,@exec_prefix@,$exec_prefix,;t t
15612 s,@prefix@,$prefix,;t t
15613 s,@program_transform_name@,$program_transform_name,;t t
15614 s,@bindir@,$bindir,;t t
15615 s,@sbindir@,$sbindir,;t t
15616 s,@libexecdir@,$libexecdir,;t t
15617 s,@datadir@,$datadir,;t t
15618 s,@sysconfdir@,$sysconfdir,;t t
15619 s,@sharedstatedir@,$sharedstatedir,;t t
15620 s,@localstatedir@,$localstatedir,;t t
15621 s,@libdir@,$libdir,;t t
15622 s,@includedir@,$includedir,;t t
15623 s,@oldincludedir@,$oldincludedir,;t t
15624 s,@infodir@,$infodir,;t t
15625 s,@mandir@,$mandir,;t t
15626 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15627 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15628 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15629 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15630 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15631 s,@build_alias@,$build_alias,;t t
15632 s,@host_alias@,$host_alias,;t t
15633 s,@target_alias@,$target_alias,;t t
15634 s,@ECHO_C@,$ECHO_C,;t t
15635 s,@ECHO_N@,$ECHO_N,;t t
15636 s,@ECHO_T@,$ECHO_T,;t t
15637 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15638 s,@DEFS@,$DEFS,;t t
15639 s,@LIBS@,$LIBS,;t t
15640 s,@build@,$build,;t t
15641 s,@build_cpu@,$build_cpu,;t t
15642 s,@build_vendor@,$build_vendor,;t t
15643 s,@build_os@,$build_os,;t t
15644 s,@host@,$host,;t t
15645 s,@host_cpu@,$host_cpu,;t t
15646 s,@host_vendor@,$host_vendor,;t t
15647 s,@host_os@,$host_os,;t t
15648 s,@SET_MAKE@,$SET_MAKE,;t t
15649 s,@CC@,$CC,;t t
15650 s,@CFLAGS@,$CFLAGS,;t t
15651 s,@LDFLAGS@,$LDFLAGS,;t t
15652 s,@CPPFLAGS@,$CPPFLAGS,;t t
15653 s,@ac_ct_CC@,$ac_ct_CC,;t t
15654 s,@EXEEXT@,$EXEEXT,;t t
15655 s,@OBJEXT@,$OBJEXT,;t t
15656 s,@CPP@,$CPP,;t t
15657 s,@AWK@,$AWK,;t t
15658 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15659 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15660 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15661 s,@LINT@,$LINT,;t t
15662 s,@LINT_OPTS@,$LINT_OPTS,;t t
15663 s,@CTAGS@,$CTAGS,;t t
15664 s,@ETAGS@,$ETAGS,;t t
15665 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15666 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15667 s,@MATH_LIB@,$MATH_LIB,;t t
15668 s,@CC_G_OPT@,$CC_G_OPT,;t t
15669 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15670 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15671 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15672 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15673 s,@LD@,$LD,;t t
15674 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
15675 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
15676 s,@LD_MODEL@,$LD_MODEL,;t t
15677 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15678 s,@LIBTOOL@,$LIBTOOL,;t t
15679 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15680 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15681 s,@LIB_LINK@,$LIB_LINK,;t t
15682 s,@LINK_TESTS@,$LINK_TESTS,;t t
15683 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15684 s,@PTHREAD@,$PTHREAD,;t t
15685 s,@TEST_ARGS@,$TEST_ARGS,;t t
15686 s,@TEST_DEPS@,$TEST_DEPS,;t t
15687 s,@TEST_LIBS@,$TEST_LIBS,;t t
15688 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
15689 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15690 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15691 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15692 s,@ECHO_LT@,$ECHO_LT,;t t
15693 s,@ECHO_LD@,$ECHO_LD,;t t
15694 s,@RULE_CC@,$RULE_CC,;t t
15695 s,@SHOW_CC@,$SHOW_CC,;t t
15696 s,@ECHO_CC@,$ECHO_CC,;t t
15697 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15698 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15699 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15700 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15701 s,@X_CFLAGS@,$X_CFLAGS,;t t
15702 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
15703 s,@X_LIBS@,$X_LIBS,;t t
15704 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
15705 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
15706 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15707 CEOF
15708
15709 EOF
15710
15711   cat >>$CONFIG_STATUS <<\EOF
15712   # Split the substitutions into bite-sized pieces for seds with
15713   # small command number limits, like on Digital OSF/1 and HP-UX.
15714   ac_max_sed_lines=48
15715   ac_sed_frag=1 # Number of current file.
15716   ac_beg=1 # First line for current file.
15717   ac_end=$ac_max_sed_lines # Line after last line for current file.
15718   ac_more_lines=:
15719   ac_sed_cmds=
15720   while $ac_more_lines; do
15721     if test $ac_beg -gt 1; then
15722       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15723     else
15724       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15725     fi
15726     if test ! -s $tmp/subs.frag; then
15727       ac_more_lines=false
15728     else
15729       # The purpose of the label and of the branching condition is to
15730       # speed up the sed processing (if there are no `@' at all, there
15731       # is no need to browse any of the substitutions).
15732       # These are the two extra sed commands mentioned above.
15733       (echo ':t
15734   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15735       if test -z "$ac_sed_cmds"; then
15736         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15737       else
15738         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15739       fi
15740       ac_sed_frag=`expr $ac_sed_frag + 1`
15741       ac_beg=$ac_end
15742       ac_end=`expr $ac_end + $ac_max_sed_lines`
15743     fi
15744   done
15745   if test -z "$ac_sed_cmds"; then
15746     ac_sed_cmds=cat
15747   fi
15748 fi # test -n "$CONFIG_FILES"
15749
15750 EOF
15751 cat >>$CONFIG_STATUS <<\EOF
15752 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15753   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15754   case $ac_file in
15755   - | *:- | *:-:* ) # input from stdin
15756         cat >$tmp/stdin
15757         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15758         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15759   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15760         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15761   * )   ac_file_in=$ac_file.in ;;
15762   esac
15763
15764   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15765   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15766          X"$ac_file" : 'X\(//\)[^/]' \| \
15767          X"$ac_file" : 'X\(//\)$' \| \
15768          X"$ac_file" : 'X\(/\)' \| \
15769          .     : '\(.\)' 2>/dev/null ||
15770 echo X"$ac_file" |
15771     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15772           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15773           /^X\(\/\/\)$/{ s//\1/; q; }
15774           /^X\(\/\).*/{ s//\1/; q; }
15775           s/.*/./; q'`
15776   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15777     { case "$ac_dir" in
15778   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15779   *)                      as_incr_dir=.;;
15780 esac
15781 as_dummy="$ac_dir"
15782 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15783   case $as_mkdir_dir in
15784     # Skip DOS drivespec
15785     ?:) as_incr_dir=$as_mkdir_dir ;;
15786     *)
15787       as_incr_dir=$as_incr_dir/$as_mkdir_dir
15788       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15789     ;;
15790   esac
15791 done; }
15792
15793     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15794     # A "../" for each directory in $ac_dir_suffix.
15795     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15796   else
15797     ac_dir_suffix= ac_dots=
15798   fi
15799
15800   case $srcdir in
15801   .)  ac_srcdir=.
15802       if test -z "$ac_dots"; then
15803          ac_top_srcdir=.
15804       else
15805          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15806       fi ;;
15807   [\\/]* | ?:[\\/]* )
15808       ac_srcdir=$srcdir$ac_dir_suffix;
15809       ac_top_srcdir=$srcdir ;;
15810   *) # Relative path.
15811     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15812     ac_top_srcdir=$ac_dots$srcdir ;;
15813   esac
15814
15815   case $INSTALL in
15816   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15817   *) ac_INSTALL=$ac_dots$INSTALL ;;
15818   esac
15819
15820   if test x"$ac_file" != x-; then
15821     { echo "$as_me:15821: creating $ac_file" >&5
15822 echo "$as_me: creating $ac_file" >&6;}
15823     rm -f "$ac_file"
15824   fi
15825   # Let's still pretend it is `configure' which instantiates (i.e., don't
15826   # use $as_me), people would be surprised to read:
15827   #    /* config.h.  Generated automatically by config.status.  */
15828   configure_input="Generated automatically from `echo $ac_file_in |
15829                                                  sed 's,.*/,,'` by configure."
15830
15831   # First look for the input files in the build tree, otherwise in the
15832   # src tree.
15833   ac_file_inputs=`IFS=:
15834     for f in $ac_file_in; do
15835       case $f in
15836       -) echo $tmp/stdin ;;
15837       [\\/$]*)
15838          # Absolute (can't be DOS-style, as IFS=:)
15839          test -f "$f" || { { echo "$as_me:15839: error: cannot find input file: $f" >&5
15840 echo "$as_me: error: cannot find input file: $f" >&2;}
15841    { (exit 1); exit 1; }; }
15842          echo $f;;
15843       *) # Relative
15844          if test -f "$f"; then
15845            # Build tree
15846            echo $f
15847          elif test -f "$srcdir/$f"; then
15848            # Source tree
15849            echo $srcdir/$f
15850          else
15851            # /dev/null tree
15852            { { echo "$as_me:15852: error: cannot find input file: $f" >&5
15853 echo "$as_me: error: cannot find input file: $f" >&2;}
15854    { (exit 1); exit 1; }; }
15855          fi;;
15856       esac
15857     done` || { (exit 1); exit 1; }
15858 EOF
15859 cat >>$CONFIG_STATUS <<EOF
15860   sed "$ac_vpsub
15861 $extrasub
15862 EOF
15863 cat >>$CONFIG_STATUS <<\EOF
15864 :t
15865 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15866 s,@configure_input@,$configure_input,;t t
15867 s,@srcdir@,$ac_srcdir,;t t
15868 s,@top_srcdir@,$ac_top_srcdir,;t t
15869 s,@INSTALL@,$ac_INSTALL,;t t
15870 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15871   rm -f $tmp/stdin
15872   if test x"$ac_file" != x-; then
15873     mv $tmp/out $ac_file
15874   else
15875     cat $tmp/out
15876     rm -f $tmp/out
15877   fi
15878
15879 done
15880 EOF
15881 cat >>$CONFIG_STATUS <<\EOF
15882
15883 #
15884 # CONFIG_HEADER section.
15885 #
15886
15887 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15888 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15889 #
15890 # ac_d sets the value in "#define NAME VALUE" lines.
15891 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15892 ac_dB='[        ].*$,\1#\2'
15893 ac_dC=' '
15894 ac_dD=',;t'
15895 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15896 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15897 ac_iB='\([      ]\),\1#\2define\3'
15898 ac_iC=' '
15899 ac_iD='\4,;t'
15900 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15901 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15902 ac_uB='$,\1#\2define\3'
15903 ac_uC=' '
15904 ac_uD=',;t'
15905
15906 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15907   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15908   case $ac_file in
15909   - | *:- | *:-:* ) # input from stdin
15910         cat >$tmp/stdin
15911         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15912         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15913   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15914         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15915   * )   ac_file_in=$ac_file.in ;;
15916   esac
15917
15918   test x"$ac_file" != x- && { echo "$as_me:15918: creating $ac_file" >&5
15919 echo "$as_me: creating $ac_file" >&6;}
15920
15921   # First look for the input files in the build tree, otherwise in the
15922   # src tree.
15923   ac_file_inputs=`IFS=:
15924     for f in $ac_file_in; do
15925       case $f in
15926       -) echo $tmp/stdin ;;
15927       [\\/$]*)
15928          # Absolute (can't be DOS-style, as IFS=:)
15929          test -f "$f" || { { echo "$as_me:15929: error: cannot find input file: $f" >&5
15930 echo "$as_me: error: cannot find input file: $f" >&2;}
15931    { (exit 1); exit 1; }; }
15932          echo $f;;
15933       *) # Relative
15934          if test -f "$f"; then
15935            # Build tree
15936            echo $f
15937          elif test -f "$srcdir/$f"; then
15938            # Source tree
15939            echo $srcdir/$f
15940          else
15941            # /dev/null tree
15942            { { echo "$as_me:15942: error: cannot find input file: $f" >&5
15943 echo "$as_me: error: cannot find input file: $f" >&2;}
15944    { (exit 1); exit 1; }; }
15945          fi;;
15946       esac
15947     done` || { (exit 1); exit 1; }
15948   # Remove the trailing spaces.
15949   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
15950
15951 EOF
15952
15953 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
15954 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
15955 # be either 'cat' or 'sort'.
15956 cat confdefs.h | uniq >conftest.vals
15957
15958 # Break up conftest.vals because some shells have a limit on
15959 # the size of here documents, and old seds have small limits too.
15960
15961 rm -f conftest.tail
15962 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
15963 while grep . conftest.vals >/dev/null
15964 do
15965   # Write chunks of a limited-size here document to conftest.frag.
15966   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15967   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15968   echo 'CEOF' >> $CONFIG_STATUS
15969   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15970   rm -f conftest.vals
15971   mv conftest.tail conftest.vals
15972 done
15973 rm -f conftest.vals
15974
15975 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15976 # marker @DEFS@.
15977 echo '  cat >> conftest.edit <<CEOF
15978 /@DEFS@/r conftest.frag
15979 /@DEFS@/d
15980 CEOF
15981 sed -f conftest.edit $tmp/in > $tmp/out
15982 rm -f $tmp/in
15983 mv $tmp/out $tmp/in
15984 rm -f conftest.edit conftest.frag
15985 ' >> $CONFIG_STATUS
15986
15987 cat >>$CONFIG_STATUS <<\EOF
15988   # Let's still pretend it is `configure' which instantiates (i.e., don't
15989   # use $as_me), people would be surprised to read:
15990   #    /* config.h.  Generated automatically by config.status.  */
15991   if test x"$ac_file" = x-; then
15992     echo "/* Generated automatically by configure.  */" >$tmp/config.h
15993   else
15994     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
15995   fi
15996   cat $tmp/in >>$tmp/config.h
15997   rm -f $tmp/in
15998   if test x"$ac_file" != x-; then
15999     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16000       { echo "$as_me:16000: $ac_file is unchanged" >&5
16001 echo "$as_me: $ac_file is unchanged" >&6;}
16002     else
16003       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16004          X"$ac_file" : 'X\(//\)[^/]' \| \
16005          X"$ac_file" : 'X\(//\)$' \| \
16006          X"$ac_file" : 'X\(/\)' \| \
16007          .     : '\(.\)' 2>/dev/null ||
16008 echo X"$ac_file" |
16009     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16010           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16011           /^X\(\/\/\)$/{ s//\1/; q; }
16012           /^X\(\/\).*/{ s//\1/; q; }
16013           s/.*/./; q'`
16014       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16015         { case "$ac_dir" in
16016   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16017   *)                      as_incr_dir=.;;
16018 esac
16019 as_dummy="$ac_dir"
16020 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16021   case $as_mkdir_dir in
16022     # Skip DOS drivespec
16023     ?:) as_incr_dir=$as_mkdir_dir ;;
16024     *)
16025       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16026       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16027     ;;
16028   esac
16029 done; }
16030
16031       fi
16032       rm -f $ac_file
16033       mv $tmp/config.h $ac_file
16034     fi
16035   else
16036     cat $tmp/config.h
16037     rm -f $tmp/config.h
16038   fi
16039 done
16040 EOF
16041 cat >>$CONFIG_STATUS <<\EOF
16042 #
16043 # CONFIG_COMMANDS section.
16044 #
16045 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16046   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16047   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16048
16049   case $ac_dest in
16050     default )
16051
16052 for cf_dir in .
16053 do
16054         if test ! -d $srcdir/$cf_dir; then
16055                 continue
16056         elif test -f $srcdir/$cf_dir/programs; then
16057                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16058         fi
16059 done
16060
16061         cat >>Makefile <<TEST_EOF
16062
16063 # These rules are generated so we do not rely on suffix rules, which do not
16064 # work consistently for different make-programs (the '\$(MODEL)/' confuses
16065 # some, and the '\$x' confuses others).
16066 TEST_EOF
16067
16068 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
16069 for N in $LIST
16070 do
16071         cat >>Makefile <<TEST_EOF
16072
16073 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
16074         \$(srcdir)/test.priv.h \\
16075         ncurses_cfg.h
16076         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
16077 TEST_EOF
16078 done
16079
16080 if test -f ../config.guess && test -f ../config.sub
16081 then
16082         cat >>Makefile <<TEST_EOF
16083
16084 # if we used CF_INHERIT for getting these files, we can remove them
16085 distclean::
16086         rm -f config.guess config.sub
16087 TEST_EOF
16088 fi
16089  ;;
16090   esac
16091 done
16092 EOF
16093
16094 cat >>$CONFIG_STATUS <<\EOF
16095
16096 { (exit 0); exit 0; }
16097 EOF
16098 chmod +x $CONFIG_STATUS
16099 ac_clean_files=$ac_clean_files_save
16100
16101 # configure is writing to config.log, and then calls config.status.
16102 # config.status does its own redirection, appending to config.log.
16103 # Unfortunately, on DOS this fails, as config.log is still kept open
16104 # by configure, so config.status won't be able to write to it; its
16105 # output is simply discarded.  So we exec the FD to /dev/null,
16106 # effectively closing config.log, so it can be properly (re)opened and
16107 # appended to by config.status.  When coming back to configure, we
16108 # need to make the FD available again.
16109 if test "$no_create" != yes; then
16110   ac_cs_success=:
16111   exec 5>/dev/null
16112   $SHELL $CONFIG_STATUS || ac_cs_success=false
16113   exec 5>>config.log
16114   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16115   # would make configure fail if this is the last instruction.
16116   $ac_cs_success || { (exit 1); exit 1; }
16117 fi
16118