]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.9 - patch 20110409
[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 echo "$as_me:2440: checking for ${CC:-cc} option to accept ANSI C" >&5
2441 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2442 if test "${cf_cv_ansi_cc+set}" = set; then
2443   echo $ECHO_N "(cached) $ECHO_C" >&6
2444 else
2445
2446 cf_cv_ansi_cc=no
2447 cf_save_CFLAGS="$CFLAGS"
2448 cf_save_CPPFLAGS="$CPPFLAGS"
2449 # Don't try gcc -ansi; that turns off useful extensions and
2450 # breaks some systems' header files.
2451 # AIX                   -qlanglvl=ansi
2452 # Ultrix and OSF/1      -std1
2453 # HP-UX                 -Aa -D_HPUX_SOURCE
2454 # SVR4                  -Xc
2455 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2456 for cf_arg in "-DCC_HAS_PROTOS" \
2457         "" \
2458         -qlanglvl=ansi \
2459         -std1 \
2460         -Ae \
2461         "-Aa -D_HPUX_SOURCE" \
2462         -Xc
2463 do
2464
2465 cf_fix_cppflags=no
2466 cf_new_cflags=
2467 cf_new_cppflags=
2468 cf_new_extra_cppflags=
2469
2470 for cf_add_cflags in $cf_arg
2471 do
2472 case $cf_fix_cppflags in
2473 no)
2474         case $cf_add_cflags in #(vi
2475         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2476                 case $cf_add_cflags in
2477                 -D*)
2478                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2479
2480                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2481                                 && test -z "${cf_tst_cflags}" \
2482                                 && cf_fix_cppflags=yes
2483
2484                         if test $cf_fix_cppflags = yes ; then
2485                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2486                                 continue
2487                         elif test "${cf_tst_cflags}" = "\"'" ; then
2488                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2489                                 continue
2490                         fi
2491                         ;;
2492                 esac
2493                 case "$CPPFLAGS" in
2494                 *$cf_add_cflags) #(vi
2495                         ;;
2496                 *) #(vi
2497                         case $cf_add_cflags in #(vi
2498                         -D*)
2499                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2500
2501 CPPFLAGS=`echo "$CPPFLAGS" | \
2502         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2503                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2504
2505                                 ;;
2506                         esac
2507                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2508                         ;;
2509                 esac
2510                 ;;
2511         *)
2512                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2513                 ;;
2514         esac
2515         ;;
2516 yes)
2517         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2518
2519         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2520
2521         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2522                 && test -z "${cf_tst_cflags}" \
2523                 && cf_fix_cppflags=no
2524         ;;
2525 esac
2526 done
2527
2528 if test -n "$cf_new_cflags" ; then
2529
2530         CFLAGS="$CFLAGS $cf_new_cflags"
2531 fi
2532
2533 if test -n "$cf_new_cppflags" ; then
2534
2535         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2536 fi
2537
2538 if test -n "$cf_new_extra_cppflags" ; then
2539
2540         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2541 fi
2542
2543         cat >conftest.$ac_ext <<_ACEOF
2544 #line 2544 "configure"
2545 #include "confdefs.h"
2546
2547 #ifndef CC_HAS_PROTOS
2548 #if !defined(__STDC__) || (__STDC__ != 1)
2549 choke me
2550 #endif
2551 #endif
2552
2553 int
2554 main ()
2555 {
2556
2557         int test (int i, double x);
2558         struct s1 {int (*f) (int a);};
2559         struct s2 {int (*f) (double a);};
2560   ;
2561   return 0;
2562 }
2563 _ACEOF
2564 rm -f conftest.$ac_objext
2565 if { (eval echo "$as_me:2565: \"$ac_compile\"") >&5
2566   (eval $ac_compile) 2>&5
2567   ac_status=$?
2568   echo "$as_me:2568: \$? = $ac_status" >&5
2569   (exit $ac_status); } &&
2570          { ac_try='test -s conftest.$ac_objext'
2571   { (eval echo "$as_me:2571: \"$ac_try\"") >&5
2572   (eval $ac_try) 2>&5
2573   ac_status=$?
2574   echo "$as_me:2574: \$? = $ac_status" >&5
2575   (exit $ac_status); }; }; then
2576   cf_cv_ansi_cc="$cf_arg"; break
2577 else
2578   echo "$as_me: failed program was:" >&5
2579 cat conftest.$ac_ext >&5
2580 fi
2581 rm -f conftest.$ac_objext conftest.$ac_ext
2582 done
2583 CFLAGS="$cf_save_CFLAGS"
2584 CPPFLAGS="$cf_save_CPPFLAGS"
2585
2586 fi
2587 echo "$as_me:2587: result: $cf_cv_ansi_cc" >&5
2588 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2589
2590 if test "$cf_cv_ansi_cc" != "no"; then
2591 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2592
2593 cf_fix_cppflags=no
2594 cf_new_cflags=
2595 cf_new_cppflags=
2596 cf_new_extra_cppflags=
2597
2598 for cf_add_cflags in $cf_cv_ansi_cc
2599 do
2600 case $cf_fix_cppflags in
2601 no)
2602         case $cf_add_cflags in #(vi
2603         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2604                 case $cf_add_cflags in
2605                 -D*)
2606                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2607
2608                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2609                                 && test -z "${cf_tst_cflags}" \
2610                                 && cf_fix_cppflags=yes
2611
2612                         if test $cf_fix_cppflags = yes ; then
2613                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2614                                 continue
2615                         elif test "${cf_tst_cflags}" = "\"'" ; then
2616                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2617                                 continue
2618                         fi
2619                         ;;
2620                 esac
2621                 case "$CPPFLAGS" in
2622                 *$cf_add_cflags) #(vi
2623                         ;;
2624                 *) #(vi
2625                         case $cf_add_cflags in #(vi
2626                         -D*)
2627                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2628
2629 CPPFLAGS=`echo "$CPPFLAGS" | \
2630         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2631                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2632
2633                                 ;;
2634                         esac
2635                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2636                         ;;
2637                 esac
2638                 ;;
2639         *)
2640                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2641                 ;;
2642         esac
2643         ;;
2644 yes)
2645         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2646
2647         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2648
2649         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2650                 && test -z "${cf_tst_cflags}" \
2651                 && cf_fix_cppflags=no
2652         ;;
2653 esac
2654 done
2655
2656 if test -n "$cf_new_cflags" ; then
2657
2658         CFLAGS="$CFLAGS $cf_new_cflags"
2659 fi
2660
2661 if test -n "$cf_new_cppflags" ; then
2662
2663         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2664 fi
2665
2666 if test -n "$cf_new_extra_cppflags" ; then
2667
2668         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2669 fi
2670
2671 else
2672         cat >>confdefs.h <<\EOF
2673 #define CC_HAS_PROTOS 1
2674 EOF
2675
2676 fi
2677 fi
2678
2679 if test "$cf_cv_ansi_cc" = "no"; then
2680         { { echo "$as_me:2680: error: Your compiler does not appear to recognize prototypes.
2681 You have the following choices:
2682         a. adjust your compiler options
2683         b. get an up-to-date compiler
2684         c. use a wrapper such as unproto" >&5
2685 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2686 You have the following choices:
2687         a. adjust your compiler options
2688         b. get an up-to-date compiler
2689         c. use a wrapper such as unproto" >&2;}
2690    { (exit 1); exit 1; }; }
2691 fi
2692
2693 if test "$GCC" = yes
2694 then
2695 cat > conftest.i <<EOF
2696 #ifndef GCC_PRINTF
2697 #define GCC_PRINTF 0
2698 #endif
2699 #ifndef GCC_SCANF
2700 #define GCC_SCANF 0
2701 #endif
2702 #ifndef GCC_NORETURN
2703 #define GCC_NORETURN /* nothing */
2704 #endif
2705 #ifndef GCC_UNUSED
2706 #define GCC_UNUSED /* nothing */
2707 #endif
2708 EOF
2709 if test "$GCC" = yes
2710 then
2711         { echo "$as_me:2711: checking for $CC __attribute__ directives..." >&5
2712 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2713 cat > conftest.$ac_ext <<EOF
2714 #line 2714 "${as_me:-configure}"
2715 #include "confdefs.h"
2716 #include "conftest.h"
2717 #include "conftest.i"
2718 #if     GCC_PRINTF
2719 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2720 #else
2721 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2722 #endif
2723 #if     GCC_SCANF
2724 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2725 #else
2726 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2727 #endif
2728 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2729 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2730 extern void foo(void) GCC_NORETURN;
2731 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2732 EOF
2733         cf_printf_attribute=no
2734         cf_scanf_attribute=no
2735         for cf_attribute in scanf printf unused noreturn
2736         do
2737
2738 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2739
2740                 cf_directive="__attribute__(($cf_attribute))"
2741                 echo "checking for $CC $cf_directive" 1>&5
2742
2743                 case $cf_attribute in #(vi
2744                 printf) #(vi
2745                         cf_printf_attribute=yes
2746                         cat >conftest.h <<EOF
2747 #define GCC_$cf_ATTRIBUTE 1
2748 EOF
2749                         ;;
2750                 scanf) #(vi
2751                         cf_scanf_attribute=yes
2752                         cat >conftest.h <<EOF
2753 #define GCC_$cf_ATTRIBUTE 1
2754 EOF
2755                         ;;
2756                 *) #(vi
2757                         cat >conftest.h <<EOF
2758 #define GCC_$cf_ATTRIBUTE $cf_directive
2759 EOF
2760                         ;;
2761                 esac
2762
2763                 if { (eval echo "$as_me:2763: \"$ac_compile\"") >&5
2764   (eval $ac_compile) 2>&5
2765   ac_status=$?
2766   echo "$as_me:2766: \$? = $ac_status" >&5
2767   (exit $ac_status); }; then
2768                         test -n "$verbose" && echo "$as_me:2768: result: ... $cf_attribute" >&5
2769 echo "${ECHO_T}... $cf_attribute" >&6
2770                         cat conftest.h >>confdefs.h
2771                         case $cf_attribute in #(vi
2772                         printf) #(vi
2773                                 if test "$cf_printf_attribute" = no ; then
2774                                         cat >>confdefs.h <<EOF
2775 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2776 EOF
2777                                 else
2778                                         cat >>confdefs.h <<EOF
2779 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2780 EOF
2781                                 fi
2782                                 ;;
2783                         scanf) #(vi
2784                                 if test "$cf_scanf_attribute" = no ; then
2785                                         cat >>confdefs.h <<EOF
2786 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2787 EOF
2788                                 else
2789                                         cat >>confdefs.h <<EOF
2790 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2791 EOF
2792                                 fi
2793                                 ;;
2794                         esac
2795                 fi
2796         done
2797 else
2798         fgrep define conftest.i >>confdefs.h
2799 fi
2800 rm -rf conftest*
2801 fi
2802
2803 cf_XOPEN_SOURCE=500
2804 cf_POSIX_C_SOURCE=199506L
2805 cf_xopen_source=
2806
2807 case $host_os in #(vi
2808 aix[456]*) #(vi
2809         cf_xopen_source="-D_ALL_SOURCE"
2810         ;;
2811 cygwin) #(vi
2812         cf_XOPEN_SOURCE=600
2813         ;;
2814 darwin[0-8].*) #(vi
2815         cf_xopen_source="-D_APPLE_C_SOURCE"
2816         ;;
2817 darwin*) #(vi
2818         cf_xopen_source="-D_DARWIN_C_SOURCE"
2819         ;;
2820 freebsd*|dragonfly*) #(vi
2821         # 5.x headers associate
2822         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2823         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2824         cf_POSIX_C_SOURCE=200112L
2825         cf_XOPEN_SOURCE=600
2826         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2827         ;;
2828 hpux11*) #(vi
2829         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2830         ;;
2831 hpux*) #(vi
2832         cf_xopen_source="-D_HPUX_SOURCE"
2833         ;;
2834 irix[56].*) #(vi
2835         cf_xopen_source="-D_SGI_SOURCE"
2836         ;;
2837 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2838
2839 echo "$as_me:2839: checking if we must define _GNU_SOURCE" >&5
2840 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2841 if test "${cf_cv_gnu_source+set}" = set; then
2842   echo $ECHO_N "(cached) $ECHO_C" >&6
2843 else
2844
2845 cat >conftest.$ac_ext <<_ACEOF
2846 #line 2846 "configure"
2847 #include "confdefs.h"
2848 #include <sys/types.h>
2849 int
2850 main ()
2851 {
2852
2853 #ifndef _XOPEN_SOURCE
2854 make an error
2855 #endif
2856   ;
2857   return 0;
2858 }
2859 _ACEOF
2860 rm -f conftest.$ac_objext
2861 if { (eval echo "$as_me:2861: \"$ac_compile\"") >&5
2862   (eval $ac_compile) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); } &&
2866          { ac_try='test -s conftest.$ac_objext'
2867   { (eval echo "$as_me:2867: \"$ac_try\"") >&5
2868   (eval $ac_try) 2>&5
2869   ac_status=$?
2870   echo "$as_me:2870: \$? = $ac_status" >&5
2871   (exit $ac_status); }; }; then
2872   cf_cv_gnu_source=no
2873 else
2874   echo "$as_me: failed program was:" >&5
2875 cat conftest.$ac_ext >&5
2876 cf_save="$CPPFLAGS"
2877          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2878          cat >conftest.$ac_ext <<_ACEOF
2879 #line 2879 "configure"
2880 #include "confdefs.h"
2881 #include <sys/types.h>
2882 int
2883 main ()
2884 {
2885
2886 #ifdef _XOPEN_SOURCE
2887 make an error
2888 #endif
2889   ;
2890   return 0;
2891 }
2892 _ACEOF
2893 rm -f conftest.$ac_objext
2894 if { (eval echo "$as_me:2894: \"$ac_compile\"") >&5
2895   (eval $ac_compile) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); } &&
2899          { ac_try='test -s conftest.$ac_objext'
2900   { (eval echo "$as_me:2900: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); }; }; then
2905   cf_cv_gnu_source=no
2906 else
2907   echo "$as_me: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 cf_cv_gnu_source=yes
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912         CPPFLAGS="$cf_save"
2913
2914 fi
2915 rm -f conftest.$ac_objext conftest.$ac_ext
2916
2917 fi
2918 echo "$as_me:2918: result: $cf_cv_gnu_source" >&5
2919 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2920 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2921
2922         ;;
2923 mirbsd*) #(vi
2924         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2925         ;;
2926 netbsd*) #(vi
2927         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2928         ;;
2929 openbsd*) #(vi
2930         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2931         ;;
2932 osf[45]*) #(vi
2933         cf_xopen_source="-D_OSF_SOURCE"
2934         ;;
2935 nto-qnx*) #(vi
2936         cf_xopen_source="-D_QNX_SOURCE"
2937         ;;
2938 sco*) #(vi
2939         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2940         ;;
2941 solaris2.1[0-9]) #(vi
2942         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2943         ;;
2944 solaris2.[1-9]) #(vi
2945         cf_xopen_source="-D__EXTENSIONS__"
2946         ;;
2947 *)
2948         echo "$as_me:2948: checking if we should define _XOPEN_SOURCE" >&5
2949 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2950 if test "${cf_cv_xopen_source+set}" = set; then
2951   echo $ECHO_N "(cached) $ECHO_C" >&6
2952 else
2953
2954         cat >conftest.$ac_ext <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <sys/types.h>
2958 int
2959 main ()
2960 {
2961
2962 #ifndef _XOPEN_SOURCE
2963 make an error
2964 #endif
2965   ;
2966   return 0;
2967 }
2968 _ACEOF
2969 rm -f conftest.$ac_objext
2970 if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5
2971   (eval $ac_compile) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); } &&
2975          { ac_try='test -s conftest.$ac_objext'
2976   { (eval echo "$as_me:2976: \"$ac_try\"") >&5
2977   (eval $ac_try) 2>&5
2978   ac_status=$?
2979   echo "$as_me:2979: \$? = $ac_status" >&5
2980   (exit $ac_status); }; }; then
2981   cf_cv_xopen_source=no
2982 else
2983   echo "$as_me: failed program was:" >&5
2984 cat conftest.$ac_ext >&5
2985 cf_save="$CPPFLAGS"
2986          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2987          cat >conftest.$ac_ext <<_ACEOF
2988 #line 2988 "configure"
2989 #include "confdefs.h"
2990 #include <sys/types.h>
2991 int
2992 main ()
2993 {
2994
2995 #ifdef _XOPEN_SOURCE
2996 make an error
2997 #endif
2998   ;
2999   return 0;
3000 }
3001 _ACEOF
3002 rm -f conftest.$ac_objext
3003 if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5
3004   (eval $ac_compile) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); } &&
3008          { ac_try='test -s conftest.$ac_objext'
3009   { (eval echo "$as_me:3009: \"$ac_try\"") >&5
3010   (eval $ac_try) 2>&5
3011   ac_status=$?
3012   echo "$as_me:3012: \$? = $ac_status" >&5
3013   (exit $ac_status); }; }; then
3014   cf_cv_xopen_source=no
3015 else
3016   echo "$as_me: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3019 fi
3020 rm -f conftest.$ac_objext conftest.$ac_ext
3021         CPPFLAGS="$cf_save"
3022
3023 fi
3024 rm -f conftest.$ac_objext conftest.$ac_ext
3025
3026 fi
3027 echo "$as_me:3027: result: $cf_cv_xopen_source" >&5
3028 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3029         if test "$cf_cv_xopen_source" != no ; then
3030
3031 CFLAGS=`echo "$CFLAGS" | \
3032         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3033                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3034
3035 CPPFLAGS=`echo "$CPPFLAGS" | \
3036         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3037                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3038
3039                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3040
3041 cf_fix_cppflags=no
3042 cf_new_cflags=
3043 cf_new_cppflags=
3044 cf_new_extra_cppflags=
3045
3046 for cf_add_cflags in $cf_temp_xopen_source
3047 do
3048 case $cf_fix_cppflags in
3049 no)
3050         case $cf_add_cflags in #(vi
3051         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3052                 case $cf_add_cflags in
3053                 -D*)
3054                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3055
3056                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3057                                 && test -z "${cf_tst_cflags}" \
3058                                 && cf_fix_cppflags=yes
3059
3060                         if test $cf_fix_cppflags = yes ; then
3061                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3062                                 continue
3063                         elif test "${cf_tst_cflags}" = "\"'" ; then
3064                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3065                                 continue
3066                         fi
3067                         ;;
3068                 esac
3069                 case "$CPPFLAGS" in
3070                 *$cf_add_cflags) #(vi
3071                         ;;
3072                 *) #(vi
3073                         case $cf_add_cflags in #(vi
3074                         -D*)
3075                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3076
3077 CPPFLAGS=`echo "$CPPFLAGS" | \
3078         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3079                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3080
3081                                 ;;
3082                         esac
3083                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3084                         ;;
3085                 esac
3086                 ;;
3087         *)
3088                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3089                 ;;
3090         esac
3091         ;;
3092 yes)
3093         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3094
3095         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3096
3097         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3098                 && test -z "${cf_tst_cflags}" \
3099                 && cf_fix_cppflags=no
3100         ;;
3101 esac
3102 done
3103
3104 if test -n "$cf_new_cflags" ; then
3105
3106         CFLAGS="$CFLAGS $cf_new_cflags"
3107 fi
3108
3109 if test -n "$cf_new_cppflags" ; then
3110
3111         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3112 fi
3113
3114 if test -n "$cf_new_extra_cppflags" ; then
3115
3116         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3117 fi
3118
3119         fi
3120
3121 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3122
3123 cf_save_CFLAGS="$CFLAGS"
3124 cf_save_CPPFLAGS="$CPPFLAGS"
3125
3126 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3127         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3128                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3129
3130 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3131         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3132                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3133
3134 echo "$as_me:3134: checking if we should define _POSIX_C_SOURCE" >&5
3135 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3136 if test "${cf_cv_posix_c_source+set}" = set; then
3137   echo $ECHO_N "(cached) $ECHO_C" >&6
3138 else
3139
3140 echo "${as_me:-configure}:3140: testing if the symbol is already defined go no further ..." 1>&5
3141
3142         cat >conftest.$ac_ext <<_ACEOF
3143 #line 3143 "configure"
3144 #include "confdefs.h"
3145 #include <sys/types.h>
3146 int
3147 main ()
3148 {
3149
3150 #ifndef _POSIX_C_SOURCE
3151 make an error
3152 #endif
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -f conftest.$ac_objext
3158 if { (eval echo "$as_me:3158: \"$ac_compile\"") >&5
3159   (eval $ac_compile) 2>&5
3160   ac_status=$?
3161   echo "$as_me:3161: \$? = $ac_status" >&5
3162   (exit $ac_status); } &&
3163          { ac_try='test -s conftest.$ac_objext'
3164   { (eval echo "$as_me:3164: \"$ac_try\"") >&5
3165   (eval $ac_try) 2>&5
3166   ac_status=$?
3167   echo "$as_me:3167: \$? = $ac_status" >&5
3168   (exit $ac_status); }; }; then
3169   cf_cv_posix_c_source=no
3170 else
3171   echo "$as_me: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3173 cf_want_posix_source=no
3174          case .$cf_POSIX_C_SOURCE in #(vi
3175          .[12]??*) #(vi
3176                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3177                 ;;
3178          .2) #(vi
3179                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3180                 cf_want_posix_source=yes
3181                 ;;
3182          .*)
3183                 cf_want_posix_source=yes
3184                 ;;
3185          esac
3186          if test "$cf_want_posix_source" = yes ; then
3187                 cat >conftest.$ac_ext <<_ACEOF
3188 #line 3188 "configure"
3189 #include "confdefs.h"
3190 #include <sys/types.h>
3191 int
3192 main ()
3193 {
3194
3195 #ifdef _POSIX_SOURCE
3196 make an error
3197 #endif
3198   ;
3199   return 0;
3200 }
3201 _ACEOF
3202 rm -f conftest.$ac_objext
3203 if { (eval echo "$as_me:3203: \"$ac_compile\"") >&5
3204   (eval $ac_compile) 2>&5
3205   ac_status=$?
3206   echo "$as_me:3206: \$? = $ac_status" >&5
3207   (exit $ac_status); } &&
3208          { ac_try='test -s conftest.$ac_objext'
3209   { (eval echo "$as_me:3209: \"$ac_try\"") >&5
3210   (eval $ac_try) 2>&5
3211   ac_status=$?
3212   echo "$as_me:3212: \$? = $ac_status" >&5
3213   (exit $ac_status); }; }; then
3214   :
3215 else
3216   echo "$as_me: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
3218 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3219 fi
3220 rm -f conftest.$ac_objext conftest.$ac_ext
3221          fi
3222
3223 echo "${as_me:-configure}:3223: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3224
3225          CFLAGS="$cf_trim_CFLAGS"
3226          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3227
3228 echo "${as_me:-configure}:3228: testing if the second compile does not leave our definition intact error ..." 1>&5
3229
3230          cat >conftest.$ac_ext <<_ACEOF
3231 #line 3231 "configure"
3232 #include "confdefs.h"
3233 #include <sys/types.h>
3234 int
3235 main ()
3236 {
3237
3238 #ifndef _POSIX_C_SOURCE
3239 make an error
3240 #endif
3241   ;
3242   return 0;
3243 }
3244 _ACEOF
3245 rm -f conftest.$ac_objext
3246 if { (eval echo "$as_me:3246: \"$ac_compile\"") >&5
3247   (eval $ac_compile) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit $ac_status); } &&
3251          { ac_try='test -s conftest.$ac_objext'
3252   { (eval echo "$as_me:3252: \"$ac_try\"") >&5
3253   (eval $ac_try) 2>&5
3254   ac_status=$?
3255   echo "$as_me:3255: \$? = $ac_status" >&5
3256   (exit $ac_status); }; }; then
3257   :
3258 else
3259   echo "$as_me: failed program was:" >&5
3260 cat conftest.$ac_ext >&5
3261 cf_cv_posix_c_source=no
3262 fi
3263 rm -f conftest.$ac_objext conftest.$ac_ext
3264          CFLAGS="$cf_save_CFLAGS"
3265          CPPFLAGS="$cf_save_CPPFLAGS"
3266
3267 fi
3268 rm -f conftest.$ac_objext conftest.$ac_ext
3269
3270 fi
3271 echo "$as_me:3271: result: $cf_cv_posix_c_source" >&5
3272 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3273
3274 if test "$cf_cv_posix_c_source" != no ; then
3275         CFLAGS="$cf_trim_CFLAGS"
3276         CPPFLAGS="$cf_trim_CPPFLAGS"
3277
3278 cf_fix_cppflags=no
3279 cf_new_cflags=
3280 cf_new_cppflags=
3281 cf_new_extra_cppflags=
3282
3283 for cf_add_cflags in $cf_cv_posix_c_source
3284 do
3285 case $cf_fix_cppflags in
3286 no)
3287         case $cf_add_cflags in #(vi
3288         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3289                 case $cf_add_cflags in
3290                 -D*)
3291                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3292
3293                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3294                                 && test -z "${cf_tst_cflags}" \
3295                                 && cf_fix_cppflags=yes
3296
3297                         if test $cf_fix_cppflags = yes ; then
3298                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3299                                 continue
3300                         elif test "${cf_tst_cflags}" = "\"'" ; then
3301                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3302                                 continue
3303                         fi
3304                         ;;
3305                 esac
3306                 case "$CPPFLAGS" in
3307                 *$cf_add_cflags) #(vi
3308                         ;;
3309                 *) #(vi
3310                         case $cf_add_cflags in #(vi
3311                         -D*)
3312                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3313
3314 CPPFLAGS=`echo "$CPPFLAGS" | \
3315         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3316                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3317
3318                                 ;;
3319                         esac
3320                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3321                         ;;
3322                 esac
3323                 ;;
3324         *)
3325                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3326                 ;;
3327         esac
3328         ;;
3329 yes)
3330         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3331
3332         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3333
3334         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3335                 && test -z "${cf_tst_cflags}" \
3336                 && cf_fix_cppflags=no
3337         ;;
3338 esac
3339 done
3340
3341 if test -n "$cf_new_cflags" ; then
3342
3343         CFLAGS="$CFLAGS $cf_new_cflags"
3344 fi
3345
3346 if test -n "$cf_new_cppflags" ; then
3347
3348         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3349 fi
3350
3351 if test -n "$cf_new_extra_cppflags" ; then
3352
3353         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3354 fi
3355
3356 fi
3357
3358         ;;
3359 esac
3360
3361 if test -n "$cf_xopen_source" ; then
3362
3363 cf_fix_cppflags=no
3364 cf_new_cflags=
3365 cf_new_cppflags=
3366 cf_new_extra_cppflags=
3367
3368 for cf_add_cflags in $cf_xopen_source
3369 do
3370 case $cf_fix_cppflags in
3371 no)
3372         case $cf_add_cflags in #(vi
3373         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3374                 case $cf_add_cflags in
3375                 -D*)
3376                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3377
3378                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3379                                 && test -z "${cf_tst_cflags}" \
3380                                 && cf_fix_cppflags=yes
3381
3382                         if test $cf_fix_cppflags = yes ; then
3383                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3384                                 continue
3385                         elif test "${cf_tst_cflags}" = "\"'" ; then
3386                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3387                                 continue
3388                         fi
3389                         ;;
3390                 esac
3391                 case "$CPPFLAGS" in
3392                 *$cf_add_cflags) #(vi
3393                         ;;
3394                 *) #(vi
3395                         case $cf_add_cflags in #(vi
3396                         -D*)
3397                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3398
3399 CPPFLAGS=`echo "$CPPFLAGS" | \
3400         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3401                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3402
3403                                 ;;
3404                         esac
3405                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3406                         ;;
3407                 esac
3408                 ;;
3409         *)
3410                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3411                 ;;
3412         esac
3413         ;;
3414 yes)
3415         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3416
3417         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3418
3419         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3420                 && test -z "${cf_tst_cflags}" \
3421                 && cf_fix_cppflags=no
3422         ;;
3423 esac
3424 done
3425
3426 if test -n "$cf_new_cflags" ; then
3427
3428         CFLAGS="$CFLAGS $cf_new_cflags"
3429 fi
3430
3431 if test -n "$cf_new_cppflags" ; then
3432
3433         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3434 fi
3435
3436 if test -n "$cf_new_extra_cppflags" ; then
3437
3438         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3439 fi
3440
3441 fi
3442
3443 echo "$as_me:3443: checking for $CC option to accept ANSI C" >&5
3444 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3445 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3446   echo $ECHO_N "(cached) $ECHO_C" >&6
3447 else
3448   ac_cv_prog_cc_stdc=no
3449 ac_save_CC=$CC
3450 cat >conftest.$ac_ext <<_ACEOF
3451 #line 3451 "configure"
3452 #include "confdefs.h"
3453 #include <stdarg.h>
3454 #include <stdio.h>
3455 #include <sys/types.h>
3456 #include <sys/stat.h>
3457 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3458 struct buf { int x; };
3459 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3460 static char *e (p, i)
3461      char **p;
3462      int i;
3463 {
3464   return p[i];
3465 }
3466 static char *f (char * (*g) (char **, int), char **p, ...)
3467 {
3468   char *s;
3469   va_list v;
3470   va_start (v,p);
3471   s = g (p, va_arg (v,int));
3472   va_end (v);
3473   return s;
3474 }
3475 int test (int i, double x);
3476 struct s1 {int (*f) (int a);};
3477 struct s2 {int (*f) (double a);};
3478 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3479 int argc;
3480 char **argv;
3481 int
3482 main ()
3483 {
3484 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3485   ;
3486   return 0;
3487 }
3488 _ACEOF
3489 # Don't try gcc -ansi; that turns off useful extensions and
3490 # breaks some systems' header files.
3491 # AIX                   -qlanglvl=ansi
3492 # Ultrix and OSF/1      -std1
3493 # HP-UX 10.20 and later -Ae
3494 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3495 # SVR4                  -Xc -D__EXTENSIONS__
3496 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3497 do
3498   CC="$ac_save_CC $ac_arg"
3499   rm -f conftest.$ac_objext
3500 if { (eval echo "$as_me:3500: \"$ac_compile\"") >&5
3501   (eval $ac_compile) 2>&5
3502   ac_status=$?
3503   echo "$as_me:3503: \$? = $ac_status" >&5
3504   (exit $ac_status); } &&
3505          { ac_try='test -s conftest.$ac_objext'
3506   { (eval echo "$as_me:3506: \"$ac_try\"") >&5
3507   (eval $ac_try) 2>&5
3508   ac_status=$?
3509   echo "$as_me:3509: \$? = $ac_status" >&5
3510   (exit $ac_status); }; }; then
3511   ac_cv_prog_cc_stdc=$ac_arg
3512 break
3513 else
3514   echo "$as_me: failed program was:" >&5
3515 cat conftest.$ac_ext >&5
3516 fi
3517 rm -f conftest.$ac_objext
3518 done
3519 rm -f conftest.$ac_ext conftest.$ac_objext
3520 CC=$ac_save_CC
3521
3522 fi
3523
3524 case "x$ac_cv_prog_cc_stdc" in
3525   x|xno)
3526     echo "$as_me:3526: result: none needed" >&5
3527 echo "${ECHO_T}none needed" >&6 ;;
3528   *)
3529     echo "$as_me:3529: result: $ac_cv_prog_cc_stdc" >&5
3530 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3531     CC="$CC $ac_cv_prog_cc_stdc" ;;
3532 esac
3533
3534 echo "$as_me:3534: checking for an ANSI C-conforming const" >&5
3535 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3536 if test "${ac_cv_c_const+set}" = set; then
3537   echo $ECHO_N "(cached) $ECHO_C" >&6
3538 else
3539   cat >conftest.$ac_ext <<_ACEOF
3540 #line 3540 "configure"
3541 #include "confdefs.h"
3542
3543 int
3544 main ()
3545 {
3546 /* FIXME: Include the comments suggested by Paul. */
3547 #ifndef __cplusplus
3548   /* Ultrix mips cc rejects this.  */
3549   typedef int charset[2];
3550   const charset x;
3551   /* SunOS 4.1.1 cc rejects this.  */
3552   char const *const *ccp;
3553   char **p;
3554   /* NEC SVR4.0.2 mips cc rejects this.  */
3555   struct point {int x, y;};
3556   static struct point const zero = {0,0};
3557   /* AIX XL C 1.02.0.0 rejects this.
3558      It does not let you subtract one const X* pointer from another in
3559      an arm of an if-expression whose if-part is not a constant
3560      expression */
3561   const char *g = "string";
3562   ccp = &g + (g ? g-g : 0);
3563   /* HPUX 7.0 cc rejects these. */
3564   ++ccp;
3565   p = (char**) ccp;
3566   ccp = (char const *const *) p;
3567   { /* SCO 3.2v4 cc rejects this.  */
3568     char *t;
3569     char const *s = 0 ? (char *) 0 : (char const *) 0;
3570
3571     *t++ = 0;
3572   }
3573   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3574     int x[] = {25, 17};
3575     const int *foo = &x[0];
3576     ++foo;
3577   }
3578   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3579     typedef const int *iptr;
3580     iptr p = 0;
3581     ++p;
3582   }
3583   { /* AIX XL C 1.02.0.0 rejects this saying
3584        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3585     struct s { int j; const int *ap[3]; };
3586     struct s *b; b->j = 5;
3587   }
3588   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3589     const int foo = 10;
3590   }
3591 #endif
3592
3593   ;
3594   return 0;
3595 }
3596 _ACEOF
3597 rm -f conftest.$ac_objext
3598 if { (eval echo "$as_me:3598: \"$ac_compile\"") >&5
3599   (eval $ac_compile) 2>&5
3600   ac_status=$?
3601   echo "$as_me:3601: \$? = $ac_status" >&5
3602   (exit $ac_status); } &&
3603          { ac_try='test -s conftest.$ac_objext'
3604   { (eval echo "$as_me:3604: \"$ac_try\"") >&5
3605   (eval $ac_try) 2>&5
3606   ac_status=$?
3607   echo "$as_me:3607: \$? = $ac_status" >&5
3608   (exit $ac_status); }; }; then
3609   ac_cv_c_const=yes
3610 else
3611   echo "$as_me: failed program was:" >&5
3612 cat conftest.$ac_ext >&5
3613 ac_cv_c_const=no
3614 fi
3615 rm -f conftest.$ac_objext conftest.$ac_ext
3616 fi
3617 echo "$as_me:3617: result: $ac_cv_c_const" >&5
3618 echo "${ECHO_T}$ac_cv_c_const" >&6
3619 if test $ac_cv_c_const = no; then
3620
3621 cat >>confdefs.h <<\EOF
3622 #define const
3623 EOF
3624
3625 fi
3626
3627 echo "$as_me:3627: checking for signal global datatype" >&5
3628 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3629 if test "${cf_cv_sig_atomic_t+set}" = set; then
3630   echo $ECHO_N "(cached) $ECHO_C" >&6
3631 else
3632
3633         for cf_type in \
3634                 "volatile sig_atomic_t" \
3635                 "sig_atomic_t" \
3636                 "int"
3637         do
3638         cat >conftest.$ac_ext <<_ACEOF
3639 #line 3639 "configure"
3640 #include "confdefs.h"
3641
3642 #include <sys/types.h>
3643 #include <signal.h>
3644 #include <stdio.h>
3645
3646 extern $cf_type x;
3647 $cf_type x;
3648 static void handler(int sig)
3649 {
3650         x = 5;
3651 }
3652 int
3653 main ()
3654 {
3655 signal(SIGINT, handler);
3656                  x = 1
3657   ;
3658   return 0;
3659 }
3660 _ACEOF
3661 rm -f conftest.$ac_objext
3662 if { (eval echo "$as_me:3662: \"$ac_compile\"") >&5
3663   (eval $ac_compile) 2>&5
3664   ac_status=$?
3665   echo "$as_me:3665: \$? = $ac_status" >&5
3666   (exit $ac_status); } &&
3667          { ac_try='test -s conftest.$ac_objext'
3668   { (eval echo "$as_me:3668: \"$ac_try\"") >&5
3669   (eval $ac_try) 2>&5
3670   ac_status=$?
3671   echo "$as_me:3671: \$? = $ac_status" >&5
3672   (exit $ac_status); }; }; then
3673   cf_cv_sig_atomic_t=$cf_type
3674 else
3675   echo "$as_me: failed program was:" >&5
3676 cat conftest.$ac_ext >&5
3677 cf_cv_sig_atomic_t=no
3678 fi
3679 rm -f conftest.$ac_objext conftest.$ac_ext
3680                 test "$cf_cv_sig_atomic_t" != no && break
3681         done
3682
3683 fi
3684
3685 echo "$as_me:3685: result: $cf_cv_sig_atomic_t" >&5
3686 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3687 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3688 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3689 EOF
3690
3691 echo "$as_me:3691: checking if you want to see long compiling messages" >&5
3692 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3693
3694 # Check whether --enable-echo or --disable-echo was given.
3695 if test "${enable_echo+set}" = set; then
3696   enableval="$enable_echo"
3697   test "$enableval" != no && enableval=yes
3698   if test "$enableval" != "yes" ; then
3699
3700     ECHO_LT='--silent'
3701     ECHO_LD='@echo linking $@;'
3702     RULE_CC='@echo compiling $<'
3703     SHOW_CC='@echo compiling $@'
3704     ECHO_CC='@'
3705
3706   else
3707
3708     ECHO_LT=''
3709     ECHO_LD=''
3710     RULE_CC=''
3711     SHOW_CC=''
3712     ECHO_CC=''
3713
3714   fi
3715 else
3716   enableval=yes
3717
3718     ECHO_LT=''
3719     ECHO_LD=''
3720     RULE_CC=''
3721     SHOW_CC=''
3722     ECHO_CC=''
3723
3724 fi;
3725 echo "$as_me:3725: result: $enableval" >&5
3726 echo "${ECHO_T}$enableval" >&6
3727
3728 GCC_VERSION=none
3729 if test "$GCC" = yes ; then
3730         echo "$as_me:3730: checking version of $CC" >&5
3731 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3732         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3733         test -z "$GCC_VERSION" && GCC_VERSION=unknown
3734         echo "$as_me:3734: result: $GCC_VERSION" >&5
3735 echo "${ECHO_T}$GCC_VERSION" >&6
3736 fi
3737
3738 if ( test "$GCC" = yes || test "$GXX" = yes )
3739 then
3740 echo "$as_me:3740: checking if you want to turn on gcc warnings" >&5
3741 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
3742
3743 # Check whether --enable-warnings or --disable-warnings was given.
3744 if test "${enable_warnings+set}" = set; then
3745   enableval="$enable_warnings"
3746   test "$enableval" != yes && enableval=no
3747   if test "$enableval" != "no" ; then
3748     with_warnings=yes
3749   else
3750     with_warnings=no
3751   fi
3752 else
3753   enableval=no
3754   with_warnings=no
3755
3756 fi;
3757 echo "$as_me:3757: result: $with_warnings" >&5
3758 echo "${ECHO_T}$with_warnings" >&6
3759 if test "$with_warnings" = "yes"
3760 then
3761
3762 if test "$GCC" = yes
3763 then
3764 cat > conftest.i <<EOF
3765 #ifndef GCC_PRINTF
3766 #define GCC_PRINTF 0
3767 #endif
3768 #ifndef GCC_SCANF
3769 #define GCC_SCANF 0
3770 #endif
3771 #ifndef GCC_NORETURN
3772 #define GCC_NORETURN /* nothing */
3773 #endif
3774 #ifndef GCC_UNUSED
3775 #define GCC_UNUSED /* nothing */
3776 #endif
3777 EOF
3778 if test "$GCC" = yes
3779 then
3780         { echo "$as_me:3780: checking for $CC __attribute__ directives..." >&5
3781 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3782 cat > conftest.$ac_ext <<EOF
3783 #line 3783 "${as_me:-configure}"
3784 #include "confdefs.h"
3785 #include "conftest.h"
3786 #include "conftest.i"
3787 #if     GCC_PRINTF
3788 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3789 #else
3790 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3791 #endif
3792 #if     GCC_SCANF
3793 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3794 #else
3795 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
3796 #endif
3797 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3798 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3799 extern void foo(void) GCC_NORETURN;
3800 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3801 EOF
3802         cf_printf_attribute=no
3803         cf_scanf_attribute=no
3804         for cf_attribute in scanf printf unused noreturn
3805         do
3806
3807 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3808
3809                 cf_directive="__attribute__(($cf_attribute))"
3810                 echo "checking for $CC $cf_directive" 1>&5
3811
3812                 case $cf_attribute in #(vi
3813                 printf) #(vi
3814                         cf_printf_attribute=yes
3815                         cat >conftest.h <<EOF
3816 #define GCC_$cf_ATTRIBUTE 1
3817 EOF
3818                         ;;
3819                 scanf) #(vi
3820                         cf_scanf_attribute=yes
3821                         cat >conftest.h <<EOF
3822 #define GCC_$cf_ATTRIBUTE 1
3823 EOF
3824                         ;;
3825                 *) #(vi
3826                         cat >conftest.h <<EOF
3827 #define GCC_$cf_ATTRIBUTE $cf_directive
3828 EOF
3829                         ;;
3830                 esac
3831
3832                 if { (eval echo "$as_me:3832: \"$ac_compile\"") >&5
3833   (eval $ac_compile) 2>&5
3834   ac_status=$?
3835   echo "$as_me:3835: \$? = $ac_status" >&5
3836   (exit $ac_status); }; then
3837                         test -n "$verbose" && echo "$as_me:3837: result: ... $cf_attribute" >&5
3838 echo "${ECHO_T}... $cf_attribute" >&6
3839                         cat conftest.h >>confdefs.h
3840                         case $cf_attribute in #(vi
3841                         printf) #(vi
3842                                 if test "$cf_printf_attribute" = no ; then
3843                                         cat >>confdefs.h <<EOF
3844 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
3845 EOF
3846                                 else
3847                                         cat >>confdefs.h <<EOF
3848 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3849 EOF
3850                                 fi
3851                                 ;;
3852                         scanf) #(vi
3853                                 if test "$cf_scanf_attribute" = no ; then
3854                                         cat >>confdefs.h <<EOF
3855 #define GCC_SCANFLIKE(fmt,var) /* nothing */
3856 EOF
3857                                 else
3858                                         cat >>confdefs.h <<EOF
3859 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3860 EOF
3861                                 fi
3862                                 ;;
3863                         esac
3864                 fi
3865         done
3866 else
3867         fgrep define conftest.i >>confdefs.h
3868 fi
3869 rm -rf conftest*
3870 fi
3871
3872 INTEL_COMPILER=no
3873
3874 if test "$GCC" = yes ; then
3875         case $host_os in
3876         linux*|gnu*)
3877                 echo "$as_me:3877: checking if this is really Intel C compiler" >&5
3878 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
3879                 cf_save_CFLAGS="$CFLAGS"
3880                 CFLAGS="$CFLAGS -no-gcc"
3881                 cat >conftest.$ac_ext <<_ACEOF
3882 #line 3882 "configure"
3883 #include "confdefs.h"
3884
3885 int
3886 main ()
3887 {
3888
3889 #ifdef __INTEL_COMPILER
3890 #else
3891 make an error
3892 #endif
3893
3894   ;
3895   return 0;
3896 }
3897 _ACEOF
3898 rm -f conftest.$ac_objext
3899 if { (eval echo "$as_me:3899: \"$ac_compile\"") >&5
3900   (eval $ac_compile) 2>&5
3901   ac_status=$?
3902   echo "$as_me:3902: \$? = $ac_status" >&5
3903   (exit $ac_status); } &&
3904          { ac_try='test -s conftest.$ac_objext'
3905   { (eval echo "$as_me:3905: \"$ac_try\"") >&5
3906   (eval $ac_try) 2>&5
3907   ac_status=$?
3908   echo "$as_me:3908: \$? = $ac_status" >&5
3909   (exit $ac_status); }; }; then
3910   INTEL_COMPILER=yes
3911 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
3912
3913 else
3914   echo "$as_me: failed program was:" >&5
3915 cat conftest.$ac_ext >&5
3916 fi
3917 rm -f conftest.$ac_objext conftest.$ac_ext
3918                 CFLAGS="$cf_save_CFLAGS"
3919                 echo "$as_me:3919: result: $INTEL_COMPILER" >&5
3920 echo "${ECHO_T}$INTEL_COMPILER" >&6
3921                 ;;
3922         esac
3923 fi
3924
3925 cat > conftest.$ac_ext <<EOF
3926 #line 3926 "${as_me:-configure}"
3927 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
3928 EOF
3929
3930 if test "$INTEL_COMPILER" = yes
3931 then
3932 # The "-wdXXX" options suppress warnings:
3933 # remark #1419: external declaration in primary source file
3934 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
3935 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
3936 # remark #193: zero used for undefined preprocessing identifier
3937 # remark #593: variable "curs_sb_left_arrow" was set but never used
3938 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
3939 # remark #869: parameter "tw" was never referenced
3940 # remark #981: operands are evaluated in unspecified order
3941 # warning #279: controlling expression is constant
3942
3943         { echo "$as_me:3943: checking for $CC warning options..." >&5
3944 echo "$as_me: checking for $CC warning options..." >&6;}
3945         cf_save_CFLAGS="$CFLAGS"
3946         EXTRA_CFLAGS="-Wall"
3947         for cf_opt in \
3948                 wd1419 \
3949                 wd1683 \
3950                 wd1684 \
3951                 wd193 \
3952                 wd593 \
3953                 wd279 \
3954                 wd810 \
3955                 wd869 \
3956                 wd981
3957         do
3958                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
3959                 if { (eval echo "$as_me:3959: \"$ac_compile\"") >&5
3960   (eval $ac_compile) 2>&5
3961   ac_status=$?
3962   echo "$as_me:3962: \$? = $ac_status" >&5
3963   (exit $ac_status); }; then
3964                         test -n "$verbose" && echo "$as_me:3964: result: ... -$cf_opt" >&5
3965 echo "${ECHO_T}... -$cf_opt" >&6
3966                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
3967                 fi
3968         done
3969         CFLAGS="$cf_save_CFLAGS"
3970
3971 elif test "$GCC" = yes
3972 then
3973         { echo "$as_me:3973: checking for $CC warning options..." >&5
3974 echo "$as_me: checking for $CC warning options..." >&6;}
3975         cf_save_CFLAGS="$CFLAGS"
3976         EXTRA_CFLAGS=
3977         cf_warn_CONST=""
3978         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
3979         for cf_opt in W Wall \
3980                 Wbad-function-cast \
3981                 Wcast-align \
3982                 Wcast-qual \
3983                 Winline \
3984                 Wmissing-declarations \
3985                 Wmissing-prototypes \
3986                 Wnested-externs \
3987                 Wpointer-arith \
3988                 Wshadow \
3989                 Wstrict-prototypes \
3990                 Wundef $cf_warn_CONST
3991         do
3992                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
3993                 if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
3994   (eval $ac_compile) 2>&5
3995   ac_status=$?
3996   echo "$as_me:3996: \$? = $ac_status" >&5
3997   (exit $ac_status); }; then
3998                         test -n "$verbose" && echo "$as_me:3998: result: ... -$cf_opt" >&5
3999 echo "${ECHO_T}... -$cf_opt" >&6
4000                         case $cf_opt in #(vi
4001                         Wcast-qual) #(vi
4002                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4003                                 ;;
4004                         Winline) #(vi
4005                                 case $GCC_VERSION in
4006                                 [34].*)
4007                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4008
4009 echo "${as_me:-configure}:4009: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4010
4011                                         continue;;
4012                                 esac
4013                                 ;;
4014                         esac
4015                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4016                 fi
4017         done
4018         CFLAGS="$cf_save_CFLAGS"
4019 fi
4020 rm -rf conftest*
4021
4022 fi
4023 fi
4024
4025 echo "$as_me:4025: checking if you want to use dmalloc for testing" >&5
4026 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4027
4028 # Check whether --with-dmalloc or --without-dmalloc was given.
4029 if test "${with_dmalloc+set}" = set; then
4030   withval="$with_dmalloc"
4031   cat >>confdefs.h <<\EOF
4032 #define USE_DMALLOC 1
4033 EOF
4034
4035         : ${with_cflags:=-g}
4036         : ${with_no_leaks:=yes}
4037          with_dmalloc=yes
4038 else
4039   with_dmalloc=
4040 fi;
4041 echo "$as_me:4041: result: ${with_dmalloc:-no}" >&5
4042 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4043
4044 case .$with_cflags in #(vi
4045 .*-g*)
4046         case .$CFLAGS in #(vi
4047         .*-g*) #(vi
4048                 ;;
4049         *)
4050
4051 cf_fix_cppflags=no
4052 cf_new_cflags=
4053 cf_new_cppflags=
4054 cf_new_extra_cppflags=
4055
4056 for cf_add_cflags in -g
4057 do
4058 case $cf_fix_cppflags in
4059 no)
4060         case $cf_add_cflags in #(vi
4061         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4062                 case $cf_add_cflags in
4063                 -D*)
4064                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4065
4066                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4067                                 && test -z "${cf_tst_cflags}" \
4068                                 && cf_fix_cppflags=yes
4069
4070                         if test $cf_fix_cppflags = yes ; then
4071                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4072                                 continue
4073                         elif test "${cf_tst_cflags}" = "\"'" ; then
4074                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4075                                 continue
4076                         fi
4077                         ;;
4078                 esac
4079                 case "$CPPFLAGS" in
4080                 *$cf_add_cflags) #(vi
4081                         ;;
4082                 *) #(vi
4083                         case $cf_add_cflags in #(vi
4084                         -D*)
4085                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4086
4087 CPPFLAGS=`echo "$CPPFLAGS" | \
4088         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4089                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4090
4091                                 ;;
4092                         esac
4093                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4094                         ;;
4095                 esac
4096                 ;;
4097         *)
4098                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4099                 ;;
4100         esac
4101         ;;
4102 yes)
4103         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4104
4105         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4106
4107         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4108                 && test -z "${cf_tst_cflags}" \
4109                 && cf_fix_cppflags=no
4110         ;;
4111 esac
4112 done
4113
4114 if test -n "$cf_new_cflags" ; then
4115
4116         CFLAGS="$CFLAGS $cf_new_cflags"
4117 fi
4118
4119 if test -n "$cf_new_cppflags" ; then
4120
4121         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4122 fi
4123
4124 if test -n "$cf_new_extra_cppflags" ; then
4125
4126         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4127 fi
4128
4129                 ;;
4130         esac
4131         ;;
4132 esac
4133
4134 if test "$with_dmalloc" = yes ; then
4135         echo "$as_me:4135: checking for dmalloc.h" >&5
4136 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4137 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4138   echo $ECHO_N "(cached) $ECHO_C" >&6
4139 else
4140   cat >conftest.$ac_ext <<_ACEOF
4141 #line 4141 "configure"
4142 #include "confdefs.h"
4143 #include <dmalloc.h>
4144 _ACEOF
4145 if { (eval echo "$as_me:4145: \"$ac_cpp conftest.$ac_ext\"") >&5
4146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4147   ac_status=$?
4148   egrep -v '^ *\+' conftest.er1 >conftest.err
4149   rm -f conftest.er1
4150   cat conftest.err >&5
4151   echo "$as_me:4151: \$? = $ac_status" >&5
4152   (exit $ac_status); } >/dev/null; then
4153   if test -s conftest.err; then
4154     ac_cpp_err=$ac_c_preproc_warn_flag
4155   else
4156     ac_cpp_err=
4157   fi
4158 else
4159   ac_cpp_err=yes
4160 fi
4161 if test -z "$ac_cpp_err"; then
4162   ac_cv_header_dmalloc_h=yes
4163 else
4164   echo "$as_me: failed program was:" >&5
4165   cat conftest.$ac_ext >&5
4166   ac_cv_header_dmalloc_h=no
4167 fi
4168 rm -f conftest.err conftest.$ac_ext
4169 fi
4170 echo "$as_me:4170: result: $ac_cv_header_dmalloc_h" >&5
4171 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4172 if test $ac_cv_header_dmalloc_h = yes; then
4173
4174 echo "$as_me:4174: checking for dmalloc_debug in -ldmalloc" >&5
4175 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4176 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4177   echo $ECHO_N "(cached) $ECHO_C" >&6
4178 else
4179   ac_check_lib_save_LIBS=$LIBS
4180 LIBS="-ldmalloc  $LIBS"
4181 cat >conftest.$ac_ext <<_ACEOF
4182 #line 4182 "configure"
4183 #include "confdefs.h"
4184
4185 /* Override any gcc2 internal prototype to avoid an error.  */
4186 #ifdef __cplusplus
4187 extern "C"
4188 #endif
4189 /* We use char because int might match the return type of a gcc2
4190    builtin and then its argument prototype would still apply.  */
4191 char dmalloc_debug ();
4192 int
4193 main ()
4194 {
4195 dmalloc_debug ();
4196   ;
4197   return 0;
4198 }
4199 _ACEOF
4200 rm -f conftest.$ac_objext conftest$ac_exeext
4201 if { (eval echo "$as_me:4201: \"$ac_link\"") >&5
4202   (eval $ac_link) 2>&5
4203   ac_status=$?
4204   echo "$as_me:4204: \$? = $ac_status" >&5
4205   (exit $ac_status); } &&
4206          { ac_try='test -s conftest$ac_exeext'
4207   { (eval echo "$as_me:4207: \"$ac_try\"") >&5
4208   (eval $ac_try) 2>&5
4209   ac_status=$?
4210   echo "$as_me:4210: \$? = $ac_status" >&5
4211   (exit $ac_status); }; }; then
4212   ac_cv_lib_dmalloc_dmalloc_debug=yes
4213 else
4214   echo "$as_me: failed program was:" >&5
4215 cat conftest.$ac_ext >&5
4216 ac_cv_lib_dmalloc_dmalloc_debug=no
4217 fi
4218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4219 LIBS=$ac_check_lib_save_LIBS
4220 fi
4221 echo "$as_me:4221: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4222 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4223 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4224   cat >>confdefs.h <<EOF
4225 #define HAVE_LIBDMALLOC 1
4226 EOF
4227
4228   LIBS="-ldmalloc $LIBS"
4229
4230 fi
4231
4232 fi
4233
4234 fi
4235
4236 echo "$as_me:4236: checking if you want to use dbmalloc for testing" >&5
4237 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4238
4239 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4240 if test "${with_dbmalloc+set}" = set; then
4241   withval="$with_dbmalloc"
4242   cat >>confdefs.h <<\EOF
4243 #define USE_DBMALLOC 1
4244 EOF
4245
4246         : ${with_cflags:=-g}
4247         : ${with_no_leaks:=yes}
4248          with_dbmalloc=yes
4249 else
4250   with_dbmalloc=
4251 fi;
4252 echo "$as_me:4252: result: ${with_dbmalloc:-no}" >&5
4253 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4254
4255 case .$with_cflags in #(vi
4256 .*-g*)
4257         case .$CFLAGS in #(vi
4258         .*-g*) #(vi
4259                 ;;
4260         *)
4261
4262 cf_fix_cppflags=no
4263 cf_new_cflags=
4264 cf_new_cppflags=
4265 cf_new_extra_cppflags=
4266
4267 for cf_add_cflags in -g
4268 do
4269 case $cf_fix_cppflags in
4270 no)
4271         case $cf_add_cflags in #(vi
4272         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4273                 case $cf_add_cflags in
4274                 -D*)
4275                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4276
4277                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4278                                 && test -z "${cf_tst_cflags}" \
4279                                 && cf_fix_cppflags=yes
4280
4281                         if test $cf_fix_cppflags = yes ; then
4282                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4283                                 continue
4284                         elif test "${cf_tst_cflags}" = "\"'" ; then
4285                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4286                                 continue
4287                         fi
4288                         ;;
4289                 esac
4290                 case "$CPPFLAGS" in
4291                 *$cf_add_cflags) #(vi
4292                         ;;
4293                 *) #(vi
4294                         case $cf_add_cflags in #(vi
4295                         -D*)
4296                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4297
4298 CPPFLAGS=`echo "$CPPFLAGS" | \
4299         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4300                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4301
4302                                 ;;
4303                         esac
4304                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4305                         ;;
4306                 esac
4307                 ;;
4308         *)
4309                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4310                 ;;
4311         esac
4312         ;;
4313 yes)
4314         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4315
4316         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4317
4318         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4319                 && test -z "${cf_tst_cflags}" \
4320                 && cf_fix_cppflags=no
4321         ;;
4322 esac
4323 done
4324
4325 if test -n "$cf_new_cflags" ; then
4326
4327         CFLAGS="$CFLAGS $cf_new_cflags"
4328 fi
4329
4330 if test -n "$cf_new_cppflags" ; then
4331
4332         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4333 fi
4334
4335 if test -n "$cf_new_extra_cppflags" ; then
4336
4337         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4338 fi
4339
4340                 ;;
4341         esac
4342         ;;
4343 esac
4344
4345 if test "$with_dbmalloc" = yes ; then
4346         echo "$as_me:4346: checking for dbmalloc.h" >&5
4347 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4348 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4349   echo $ECHO_N "(cached) $ECHO_C" >&6
4350 else
4351   cat >conftest.$ac_ext <<_ACEOF
4352 #line 4352 "configure"
4353 #include "confdefs.h"
4354 #include <dbmalloc.h>
4355 _ACEOF
4356 if { (eval echo "$as_me:4356: \"$ac_cpp conftest.$ac_ext\"") >&5
4357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4358   ac_status=$?
4359   egrep -v '^ *\+' conftest.er1 >conftest.err
4360   rm -f conftest.er1
4361   cat conftest.err >&5
4362   echo "$as_me:4362: \$? = $ac_status" >&5
4363   (exit $ac_status); } >/dev/null; then
4364   if test -s conftest.err; then
4365     ac_cpp_err=$ac_c_preproc_warn_flag
4366   else
4367     ac_cpp_err=
4368   fi
4369 else
4370   ac_cpp_err=yes
4371 fi
4372 if test -z "$ac_cpp_err"; then
4373   ac_cv_header_dbmalloc_h=yes
4374 else
4375   echo "$as_me: failed program was:" >&5
4376   cat conftest.$ac_ext >&5
4377   ac_cv_header_dbmalloc_h=no
4378 fi
4379 rm -f conftest.err conftest.$ac_ext
4380 fi
4381 echo "$as_me:4381: result: $ac_cv_header_dbmalloc_h" >&5
4382 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4383 if test $ac_cv_header_dbmalloc_h = yes; then
4384
4385 echo "$as_me:4385: checking for debug_malloc in -ldbmalloc" >&5
4386 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4387 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4388   echo $ECHO_N "(cached) $ECHO_C" >&6
4389 else
4390   ac_check_lib_save_LIBS=$LIBS
4391 LIBS="-ldbmalloc  $LIBS"
4392 cat >conftest.$ac_ext <<_ACEOF
4393 #line 4393 "configure"
4394 #include "confdefs.h"
4395
4396 /* Override any gcc2 internal prototype to avoid an error.  */
4397 #ifdef __cplusplus
4398 extern "C"
4399 #endif
4400 /* We use char because int might match the return type of a gcc2
4401    builtin and then its argument prototype would still apply.  */
4402 char debug_malloc ();
4403 int
4404 main ()
4405 {
4406 debug_malloc ();
4407   ;
4408   return 0;
4409 }
4410 _ACEOF
4411 rm -f conftest.$ac_objext conftest$ac_exeext
4412 if { (eval echo "$as_me:4412: \"$ac_link\"") >&5
4413   (eval $ac_link) 2>&5
4414   ac_status=$?
4415   echo "$as_me:4415: \$? = $ac_status" >&5
4416   (exit $ac_status); } &&
4417          { ac_try='test -s conftest$ac_exeext'
4418   { (eval echo "$as_me:4418: \"$ac_try\"") >&5
4419   (eval $ac_try) 2>&5
4420   ac_status=$?
4421   echo "$as_me:4421: \$? = $ac_status" >&5
4422   (exit $ac_status); }; }; then
4423   ac_cv_lib_dbmalloc_debug_malloc=yes
4424 else
4425   echo "$as_me: failed program was:" >&5
4426 cat conftest.$ac_ext >&5
4427 ac_cv_lib_dbmalloc_debug_malloc=no
4428 fi
4429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4430 LIBS=$ac_check_lib_save_LIBS
4431 fi
4432 echo "$as_me:4432: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4433 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4434 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4435   cat >>confdefs.h <<EOF
4436 #define HAVE_LIBDBMALLOC 1
4437 EOF
4438
4439   LIBS="-ldbmalloc $LIBS"
4440
4441 fi
4442
4443 fi
4444
4445 fi
4446
4447 echo "$as_me:4447: checking if you want to use valgrind for testing" >&5
4448 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
4449
4450 # Check whether --with-valgrind or --without-valgrind was given.
4451 if test "${with_valgrind+set}" = set; then
4452   withval="$with_valgrind"
4453   cat >>confdefs.h <<\EOF
4454 #define USE_VALGRIND 1
4455 EOF
4456
4457         : ${with_cflags:=-g}
4458         : ${with_no_leaks:=yes}
4459          with_valgrind=yes
4460 else
4461   with_valgrind=
4462 fi;
4463 echo "$as_me:4463: result: ${with_valgrind:-no}" >&5
4464 echo "${ECHO_T}${with_valgrind:-no}" >&6
4465
4466 case .$with_cflags in #(vi
4467 .*-g*)
4468         case .$CFLAGS in #(vi
4469         .*-g*) #(vi
4470                 ;;
4471         *)
4472
4473 cf_fix_cppflags=no
4474 cf_new_cflags=
4475 cf_new_cppflags=
4476 cf_new_extra_cppflags=
4477
4478 for cf_add_cflags in -g
4479 do
4480 case $cf_fix_cppflags in
4481 no)
4482         case $cf_add_cflags in #(vi
4483         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4484                 case $cf_add_cflags in
4485                 -D*)
4486                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4487
4488                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4489                                 && test -z "${cf_tst_cflags}" \
4490                                 && cf_fix_cppflags=yes
4491
4492                         if test $cf_fix_cppflags = yes ; then
4493                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4494                                 continue
4495                         elif test "${cf_tst_cflags}" = "\"'" ; then
4496                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4497                                 continue
4498                         fi
4499                         ;;
4500                 esac
4501                 case "$CPPFLAGS" in
4502                 *$cf_add_cflags) #(vi
4503                         ;;
4504                 *) #(vi
4505                         case $cf_add_cflags in #(vi
4506                         -D*)
4507                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4508
4509 CPPFLAGS=`echo "$CPPFLAGS" | \
4510         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4511                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4512
4513                                 ;;
4514                         esac
4515                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4516                         ;;
4517                 esac
4518                 ;;
4519         *)
4520                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4521                 ;;
4522         esac
4523         ;;
4524 yes)
4525         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4526
4527         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4528
4529         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4530                 && test -z "${cf_tst_cflags}" \
4531                 && cf_fix_cppflags=no
4532         ;;
4533 esac
4534 done
4535
4536 if test -n "$cf_new_cflags" ; then
4537
4538         CFLAGS="$CFLAGS $cf_new_cflags"
4539 fi
4540
4541 if test -n "$cf_new_cppflags" ; then
4542
4543         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4544 fi
4545
4546 if test -n "$cf_new_extra_cppflags" ; then
4547
4548         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4549 fi
4550
4551                 ;;
4552         esac
4553         ;;
4554 esac
4555
4556 echo "$as_me:4556: checking if you want to perform memory-leak testing" >&5
4557 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
4558
4559 # Check whether --enable-leaks or --disable-leaks was given.
4560 if test "${enable_leaks+set}" = set; then
4561   enableval="$enable_leaks"
4562   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
4563 else
4564   : ${with_no_leaks:=no}
4565 fi;
4566 echo "$as_me:4566: result: $with_no_leaks" >&5
4567 echo "${ECHO_T}$with_no_leaks" >&6
4568
4569 if test "$with_no_leaks" = yes ; then
4570         cat >>confdefs.h <<\EOF
4571 #define NO_LEAKS 1
4572 EOF
4573
4574         cat >>confdefs.h <<\EOF
4575 #define YY_NO_LEAKS 1
4576 EOF
4577
4578 fi
4579
4580 echo "$as_me:4580: checking if you want to check for wide-character functions" >&5
4581 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4582
4583 # Check whether --enable-widec or --disable-widec was given.
4584 if test "${enable_widec+set}" = set; then
4585   enableval="$enable_widec"
4586   test "$enableval" != no && enableval=yes
4587   if test "$enableval" != "yes" ; then
4588     cf_enable_widec=no
4589   else
4590     cf_enable_widec=yes
4591   fi
4592 else
4593   enableval=yes
4594   cf_enable_widec=yes
4595
4596 fi;
4597 echo "$as_me:4597: result: $cf_enable_widec" >&5
4598 echo "${ECHO_T}$cf_enable_widec" >&6
4599
4600 echo "$as_me:4600: checking for specific curses-directory" >&5
4601 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4602
4603 # Check whether --with-curses-dir or --without-curses-dir was given.
4604 if test "${with_curses_dir+set}" = set; then
4605   withval="$with_curses_dir"
4606   cf_cv_curses_dir=$withval
4607 else
4608   cf_cv_curses_dir=no
4609 fi;
4610 echo "$as_me:4610: result: $cf_cv_curses_dir" >&5
4611 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4612
4613 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4614 then
4615
4616 if test "x$prefix" != xNONE; then
4617   cf_path_syntax="$prefix"
4618 else
4619   cf_path_syntax="$ac_default_prefix"
4620 fi
4621
4622 case ".$withval" in #(vi
4623 .\$\(*\)*|.\'*\'*) #(vi
4624   ;;
4625 ..|./*|.\\*) #(vi
4626   ;;
4627 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4628   ;;
4629 .\${*prefix}*) #(vi
4630   eval withval="$withval"
4631   case ".$withval" in #(vi
4632   .NONE/*)
4633     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4634     ;;
4635   esac
4636   ;; #(vi
4637 .no|.NONE/*)
4638   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4639   ;;
4640 *)
4641   { { echo "$as_me:4641: error: expected a pathname, not \"$withval\"" >&5
4642 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4643    { (exit 1); exit 1; }; }
4644   ;;
4645 esac
4646
4647         if test -d "$cf_cv_curses_dir"
4648         then
4649
4650 if test -n "$cf_cv_curses_dir/include" ; then
4651   for cf_add_incdir in $cf_cv_curses_dir/include
4652   do
4653         while test $cf_add_incdir != /usr/include
4654         do
4655           if test -d $cf_add_incdir
4656           then
4657                 cf_have_incdir=no
4658                 if test -n "$CFLAGS$CPPFLAGS" ; then
4659                   # a loop is needed to ensure we can add subdirs of existing dirs
4660                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4661                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4662                           cf_have_incdir=yes; break
4663                         fi
4664                   done
4665                 fi
4666
4667                 if test "$cf_have_incdir" = no ; then
4668                   if test "$cf_add_incdir" = /usr/local/include ; then
4669                         if test "$GCC" = yes
4670                         then
4671                           cf_save_CPPFLAGS=$CPPFLAGS
4672                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4673                           cat >conftest.$ac_ext <<_ACEOF
4674 #line 4674 "configure"
4675 #include "confdefs.h"
4676 #include <stdio.h>
4677 int
4678 main ()
4679 {
4680 printf("Hello")
4681   ;
4682   return 0;
4683 }
4684 _ACEOF
4685 rm -f conftest.$ac_objext
4686 if { (eval echo "$as_me:4686: \"$ac_compile\"") >&5
4687   (eval $ac_compile) 2>&5
4688   ac_status=$?
4689   echo "$as_me:4689: \$? = $ac_status" >&5
4690   (exit $ac_status); } &&
4691          { ac_try='test -s conftest.$ac_objext'
4692   { (eval echo "$as_me:4692: \"$ac_try\"") >&5
4693   (eval $ac_try) 2>&5
4694   ac_status=$?
4695   echo "$as_me:4695: \$? = $ac_status" >&5
4696   (exit $ac_status); }; }; then
4697   :
4698 else
4699   echo "$as_me: failed program was:" >&5
4700 cat conftest.$ac_ext >&5
4701 cf_have_incdir=yes
4702 fi
4703 rm -f conftest.$ac_objext conftest.$ac_ext
4704                           CPPFLAGS=$cf_save_CPPFLAGS
4705                         fi
4706                   fi
4707                 fi
4708
4709                 if test "$cf_have_incdir" = no ; then
4710                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4711
4712 echo "${as_me:-configure}:4712: testing adding $cf_add_incdir to include-path ..." 1>&5
4713
4714                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4715
4716                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4717                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4718                   cf_add_incdir="$cf_top_incdir"
4719                 else
4720                   break
4721                 fi
4722           fi
4723         done
4724   done
4725 fi
4726
4727 if test -n "$cf_cv_curses_dir/lib" ; then
4728   for cf_add_libdir in $cf_cv_curses_dir/lib
4729   do
4730     if test $cf_add_libdir = /usr/lib ; then
4731       :
4732     elif test -d $cf_add_libdir
4733     then
4734       cf_have_libdir=no
4735       if test -n "$LDFLAGS$LIBS" ; then
4736         # a loop is needed to ensure we can add subdirs of existing dirs
4737         for cf_test_libdir in $LDFLAGS $LIBS ; do
4738           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4739             cf_have_libdir=yes; break
4740           fi
4741         done
4742       fi
4743       if test "$cf_have_libdir" = no ; then
4744         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4745
4746 echo "${as_me:-configure}:4746: testing adding $cf_add_libdir to library-path ..." 1>&5
4747
4748         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4749       fi
4750     fi
4751   done
4752 fi
4753
4754         fi
4755 fi
4756
4757 echo "$as_me:4757: checking for specified curses library type" >&5
4758 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4759
4760 # Check whether --with-ncursesw or --without-ncursesw was given.
4761 if test "${with_ncursesw+set}" = set; then
4762   withval="$with_ncursesw"
4763   cf_cv_screen=ncursesw
4764 else
4765
4766 # Check whether --with-ncurses or --without-ncurses was given.
4767 if test "${with_ncurses+set}" = set; then
4768   withval="$with_ncurses"
4769   cf_cv_screen=ncurses
4770 else
4771
4772 # Check whether --with-pdcurses or --without-pdcurses was given.
4773 if test "${with_pdcurses+set}" = set; then
4774   withval="$with_pdcurses"
4775   cf_cv_screen=pdcurses
4776 else
4777
4778 # Check whether --with-curses-colr or --without-curses-colr was given.
4779 if test "${with_curses_colr+set}" = set; then
4780   withval="$with_curses_colr"
4781   cf_cv_screen=curses_colr
4782 else
4783
4784 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4785 if test "${with_curses_5lib+set}" = set; then
4786   withval="$with_curses_5lib"
4787   cf_cv_screen=curses_5lib
4788 fi;
4789 fi;
4790 fi;
4791 fi;
4792 fi;
4793
4794 echo "$as_me:4794: result: $cf_cv_screen" >&5
4795 echo "${ECHO_T}$cf_cv_screen" >&6
4796
4797 case $cf_cv_screen in
4798 curses|curses_*)
4799
4800 echo "$as_me:4800: checking for extra include directories" >&5
4801 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4802 if test "${cf_cv_curses_incdir+set}" = set; then
4803   echo $ECHO_N "(cached) $ECHO_C" >&6
4804 else
4805
4806 cf_cv_curses_incdir=no
4807 case $host_os in #(vi
4808 hpux10.*) #(vi
4809         if test "x$cf_cv_screen" = "xcurses_colr"
4810         then
4811                 test -d /usr/include/curses_colr && \
4812                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4813         fi
4814         ;;
4815 sunos3*|sunos4*)
4816         if test "x$cf_cv_screen" = "xcurses_5lib"
4817         then
4818                 test -d /usr/5lib && \
4819                 test -d /usr/5include && \
4820                 cf_cv_curses_incdir="-I/usr/5include"
4821         fi
4822         ;;
4823 esac
4824
4825 fi
4826 echo "$as_me:4826: result: $cf_cv_curses_incdir" >&5
4827 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4828 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4829
4830 echo "$as_me:4830: checking if we have identified curses headers" >&5
4831 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4832 if test "${cf_cv_ncurses_header+set}" = set; then
4833   echo $ECHO_N "(cached) $ECHO_C" >&6
4834 else
4835
4836 cf_cv_ncurses_header=none
4837 for cf_header in  \
4838         curses.h \
4839         ncurses.h ncurses/curses.h ncurses/ncurses.h
4840 do
4841 cat >conftest.$ac_ext <<_ACEOF
4842 #line 4842 "configure"
4843 #include "confdefs.h"
4844 #include <${cf_header}>
4845 int
4846 main ()
4847 {
4848 initscr(); tgoto("?", 0,0)
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 rm -f conftest.$ac_objext
4854 if { (eval echo "$as_me:4854: \"$ac_compile\"") >&5
4855   (eval $ac_compile) 2>&5
4856   ac_status=$?
4857   echo "$as_me:4857: \$? = $ac_status" >&5
4858   (exit $ac_status); } &&
4859          { ac_try='test -s conftest.$ac_objext'
4860   { (eval echo "$as_me:4860: \"$ac_try\"") >&5
4861   (eval $ac_try) 2>&5
4862   ac_status=$?
4863   echo "$as_me:4863: \$? = $ac_status" >&5
4864   (exit $ac_status); }; }; then
4865   cf_cv_ncurses_header=$cf_header; break
4866 else
4867   echo "$as_me: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4869 fi
4870 rm -f conftest.$ac_objext conftest.$ac_ext
4871 done
4872
4873 fi
4874 echo "$as_me:4874: result: $cf_cv_ncurses_header" >&5
4875 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4876
4877 if test "$cf_cv_ncurses_header" = none ; then
4878         { { echo "$as_me:4878: error: No curses header-files found" >&5
4879 echo "$as_me: error: No curses header-files found" >&2;}
4880    { (exit 1); exit 1; }; }
4881 fi
4882
4883 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4884
4885 for ac_header in $cf_cv_ncurses_header
4886 do
4887 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4888 echo "$as_me:4888: checking for $ac_header" >&5
4889 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4890 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4891   echo $ECHO_N "(cached) $ECHO_C" >&6
4892 else
4893   cat >conftest.$ac_ext <<_ACEOF
4894 #line 4894 "configure"
4895 #include "confdefs.h"
4896 #include <$ac_header>
4897 _ACEOF
4898 if { (eval echo "$as_me:4898: \"$ac_cpp conftest.$ac_ext\"") >&5
4899   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4900   ac_status=$?
4901   egrep -v '^ *\+' conftest.er1 >conftest.err
4902   rm -f conftest.er1
4903   cat conftest.err >&5
4904   echo "$as_me:4904: \$? = $ac_status" >&5
4905   (exit $ac_status); } >/dev/null; then
4906   if test -s conftest.err; then
4907     ac_cpp_err=$ac_c_preproc_warn_flag
4908   else
4909     ac_cpp_err=
4910   fi
4911 else
4912   ac_cpp_err=yes
4913 fi
4914 if test -z "$ac_cpp_err"; then
4915   eval "$as_ac_Header=yes"
4916 else
4917   echo "$as_me: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   eval "$as_ac_Header=no"
4920 fi
4921 rm -f conftest.err conftest.$ac_ext
4922 fi
4923 echo "$as_me:4923: result: `eval echo '${'$as_ac_Header'}'`" >&5
4924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4925 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4926   cat >>confdefs.h <<EOF
4927 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4928 EOF
4929
4930 fi
4931 done
4932
4933 echo "$as_me:4933: checking for terminfo header" >&5
4934 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4935 if test "${cf_cv_term_header+set}" = set; then
4936   echo $ECHO_N "(cached) $ECHO_C" >&6
4937 else
4938
4939 case ${cf_cv_ncurses_header} in #(vi
4940 */ncurses.h|*/ncursesw.h) #(vi
4941         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4942         ;;
4943 *)
4944         cf_term_header=term.h
4945         ;;
4946 esac
4947
4948 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4949 do
4950 cat >conftest.$ac_ext <<_ACEOF
4951 #line 4951 "configure"
4952 #include "confdefs.h"
4953 #include <stdio.h>
4954 #include <${cf_cv_ncurses_header:-curses.h}>
4955 #include <$cf_test>
4956
4957 int
4958 main ()
4959 {
4960 int x = auto_left_margin
4961   ;
4962   return 0;
4963 }
4964 _ACEOF
4965 rm -f conftest.$ac_objext
4966 if { (eval echo "$as_me:4966: \"$ac_compile\"") >&5
4967   (eval $ac_compile) 2>&5
4968   ac_status=$?
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); } &&
4971          { ac_try='test -s conftest.$ac_objext'
4972   { (eval echo "$as_me:4972: \"$ac_try\"") >&5
4973   (eval $ac_try) 2>&5
4974   ac_status=$?
4975   echo "$as_me:4975: \$? = $ac_status" >&5
4976   (exit $ac_status); }; }; then
4977
4978         cf_cv_term_header="$cf_test"
4979 else
4980   echo "$as_me: failed program was:" >&5
4981 cat conftest.$ac_ext >&5
4982
4983         cf_cv_term_header=unknown
4984
4985 fi
4986 rm -f conftest.$ac_objext conftest.$ac_ext
4987         test "$cf_cv_term_header" != unknown && break
4988 done
4989
4990 fi
4991 echo "$as_me:4991: result: $cf_cv_term_header" >&5
4992 echo "${ECHO_T}$cf_cv_term_header" >&6
4993
4994 # Set definitions to allow ifdef'ing to accommodate subdirectories
4995
4996 case $cf_cv_term_header in # (vi
4997 *term.h)
4998         cat >>confdefs.h <<\EOF
4999 #define HAVE_TERM_H 1
5000 EOF
5001
5002         ;;
5003 esac
5004
5005 case $cf_cv_term_header in # (vi
5006 ncurses/term.h) #(vi
5007         cat >>confdefs.h <<\EOF
5008 #define HAVE_NCURSES_TERM_H 1
5009 EOF
5010
5011         ;;
5012 ncursesw/term.h)
5013         cat >>confdefs.h <<\EOF
5014 #define HAVE_NCURSESW_TERM_H 1
5015 EOF
5016
5017         ;;
5018 esac
5019
5020 echo "$as_me:5020: checking for ncurses version" >&5
5021 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5022 if test "${cf_cv_ncurses_version+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025
5026         cf_cv_ncurses_version=no
5027         cf_tempfile=out$$
5028         rm -f $cf_tempfile
5029         if test "$cross_compiling" = yes; then
5030
5031         # This will not work if the preprocessor splits the line after the
5032         # Autoconf token.  The 'unproto' program does that.
5033         cat > conftest.$ac_ext <<EOF
5034 #include <${cf_cv_ncurses_header:-curses.h}>
5035 #undef Autoconf
5036 #ifdef NCURSES_VERSION
5037 Autoconf NCURSES_VERSION
5038 #else
5039 #ifdef __NCURSES_H
5040 Autoconf "old"
5041 #endif
5042 ;
5043 #endif
5044 EOF
5045         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5046         { (eval echo "$as_me:5046: \"$cf_try\"") >&5
5047   (eval $cf_try) 2>&5
5048   ac_status=$?
5049   echo "$as_me:5049: \$? = $ac_status" >&5
5050   (exit $ac_status); }
5051         if test -f conftest.out ; then
5052                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5053                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5054                 rm -f conftest.out
5055         fi
5056
5057 else
5058   cat >conftest.$ac_ext <<_ACEOF
5059 #line 5059 "configure"
5060 #include "confdefs.h"
5061
5062 #include <${cf_cv_ncurses_header:-curses.h}>
5063 #include <stdio.h>
5064 int main()
5065 {
5066         FILE *fp = fopen("$cf_tempfile", "w");
5067 #ifdef NCURSES_VERSION
5068 # ifdef NCURSES_VERSION_PATCH
5069         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5070 # else
5071         fprintf(fp, "%s\n", NCURSES_VERSION);
5072 # endif
5073 #else
5074 # ifdef __NCURSES_H
5075         fprintf(fp, "old\n");
5076 # else
5077         make an error
5078 # endif
5079 #endif
5080         ${cf_cv_main_return:-return}(0);
5081 }
5082 _ACEOF
5083 rm -f conftest$ac_exeext
5084 if { (eval echo "$as_me:5084: \"$ac_link\"") >&5
5085   (eval $ac_link) 2>&5
5086   ac_status=$?
5087   echo "$as_me:5087: \$? = $ac_status" >&5
5088   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5089   { (eval echo "$as_me:5089: \"$ac_try\"") >&5
5090   (eval $ac_try) 2>&5
5091   ac_status=$?
5092   echo "$as_me:5092: \$? = $ac_status" >&5
5093   (exit $ac_status); }; }; then
5094
5095         cf_cv_ncurses_version=`cat $cf_tempfile`
5096 else
5097   echo "$as_me: program exited with status $ac_status" >&5
5098 echo "$as_me: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
5100 fi
5101 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5102 fi
5103         rm -f $cf_tempfile
5104
5105 fi
5106 echo "$as_me:5106: result: $cf_cv_ncurses_version" >&5
5107 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5108 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5109 #define NCURSES 1
5110 EOF
5111
5112 echo "$as_me:5112: checking if we have identified curses libraries" >&5
5113 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5114 cat >conftest.$ac_ext <<_ACEOF
5115 #line 5115 "configure"
5116 #include "confdefs.h"
5117 #include <${cf_cv_ncurses_header:-curses.h}>
5118 int
5119 main ()
5120 {
5121 initscr(); tgoto("?", 0,0)
5122   ;
5123   return 0;
5124 }
5125 _ACEOF
5126 rm -f conftest.$ac_objext conftest$ac_exeext
5127 if { (eval echo "$as_me:5127: \"$ac_link\"") >&5
5128   (eval $ac_link) 2>&5
5129   ac_status=$?
5130   echo "$as_me:5130: \$? = $ac_status" >&5
5131   (exit $ac_status); } &&
5132          { ac_try='test -s conftest$ac_exeext'
5133   { (eval echo "$as_me:5133: \"$ac_try\"") >&5
5134   (eval $ac_try) 2>&5
5135   ac_status=$?
5136   echo "$as_me:5136: \$? = $ac_status" >&5
5137   (exit $ac_status); }; }; then
5138   cf_result=yes
5139 else
5140   echo "$as_me: failed program was:" >&5
5141 cat conftest.$ac_ext >&5
5142 cf_result=no
5143 fi
5144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5145 echo "$as_me:5145: result: $cf_result" >&5
5146 echo "${ECHO_T}$cf_result" >&6
5147
5148 if test "$cf_result" = no ; then
5149 case $host_os in #(vi
5150 freebsd*) #(vi
5151     echo "$as_me:5151: checking for tgoto in -lmytinfo" >&5
5152 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5153 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5154   echo $ECHO_N "(cached) $ECHO_C" >&6
5155 else
5156   ac_check_lib_save_LIBS=$LIBS
5157 LIBS="-lmytinfo  $LIBS"
5158 cat >conftest.$ac_ext <<_ACEOF
5159 #line 5159 "configure"
5160 #include "confdefs.h"
5161
5162 /* Override any gcc2 internal prototype to avoid an error.  */
5163 #ifdef __cplusplus
5164 extern "C"
5165 #endif
5166 /* We use char because int might match the return type of a gcc2
5167    builtin and then its argument prototype would still apply.  */
5168 char tgoto ();
5169 int
5170 main ()
5171 {
5172 tgoto ();
5173   ;
5174   return 0;
5175 }
5176 _ACEOF
5177 rm -f conftest.$ac_objext conftest$ac_exeext
5178 if { (eval echo "$as_me:5178: \"$ac_link\"") >&5
5179   (eval $ac_link) 2>&5
5180   ac_status=$?
5181   echo "$as_me:5181: \$? = $ac_status" >&5
5182   (exit $ac_status); } &&
5183          { ac_try='test -s conftest$ac_exeext'
5184   { (eval echo "$as_me:5184: \"$ac_try\"") >&5
5185   (eval $ac_try) 2>&5
5186   ac_status=$?
5187   echo "$as_me:5187: \$? = $ac_status" >&5
5188   (exit $ac_status); }; }; then
5189   ac_cv_lib_mytinfo_tgoto=yes
5190 else
5191   echo "$as_me: failed program was:" >&5
5192 cat conftest.$ac_ext >&5
5193 ac_cv_lib_mytinfo_tgoto=no
5194 fi
5195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5196 LIBS=$ac_check_lib_save_LIBS
5197 fi
5198 echo "$as_me:5198: result: $ac_cv_lib_mytinfo_tgoto" >&5
5199 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5200 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5201   LIBS="-lmytinfo $LIBS"
5202 fi
5203
5204     ;;
5205 hpux10.*) #(vi
5206         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5207         # next (1998), and xcurses "newer" (2000).  There is no header file for
5208         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5209         # term.h) for cur_colr
5210         if test "x$cf_cv_screen" = "xcurses_colr"
5211         then
5212                 echo "$as_me:5212: checking for initscr in -lcur_colr" >&5
5213 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5214 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5215   echo $ECHO_N "(cached) $ECHO_C" >&6
5216 else
5217   ac_check_lib_save_LIBS=$LIBS
5218 LIBS="-lcur_colr  $LIBS"
5219 cat >conftest.$ac_ext <<_ACEOF
5220 #line 5220 "configure"
5221 #include "confdefs.h"
5222
5223 /* Override any gcc2 internal prototype to avoid an error.  */
5224 #ifdef __cplusplus
5225 extern "C"
5226 #endif
5227 /* We use char because int might match the return type of a gcc2
5228    builtin and then its argument prototype would still apply.  */
5229 char initscr ();
5230 int
5231 main ()
5232 {
5233 initscr ();
5234   ;
5235   return 0;
5236 }
5237 _ACEOF
5238 rm -f conftest.$ac_objext conftest$ac_exeext
5239 if { (eval echo "$as_me:5239: \"$ac_link\"") >&5
5240   (eval $ac_link) 2>&5
5241   ac_status=$?
5242   echo "$as_me:5242: \$? = $ac_status" >&5
5243   (exit $ac_status); } &&
5244          { ac_try='test -s conftest$ac_exeext'
5245   { (eval echo "$as_me:5245: \"$ac_try\"") >&5
5246   (eval $ac_try) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); }; }; then
5250   ac_cv_lib_cur_colr_initscr=yes
5251 else
5252   echo "$as_me: failed program was:" >&5
5253 cat conftest.$ac_ext >&5
5254 ac_cv_lib_cur_colr_initscr=no
5255 fi
5256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5257 LIBS=$ac_check_lib_save_LIBS
5258 fi
5259 echo "$as_me:5259: result: $ac_cv_lib_cur_colr_initscr" >&5
5260 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5261 if test $ac_cv_lib_cur_colr_initscr = yes; then
5262
5263                         LIBS="-lcur_colr $LIBS"
5264                         ac_cv_func_initscr=yes
5265
5266 else
5267
5268                 echo "$as_me:5268: checking for initscr in -lHcurses" >&5
5269 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5270 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5271   echo $ECHO_N "(cached) $ECHO_C" >&6
5272 else
5273   ac_check_lib_save_LIBS=$LIBS
5274 LIBS="-lHcurses  $LIBS"
5275 cat >conftest.$ac_ext <<_ACEOF
5276 #line 5276 "configure"
5277 #include "confdefs.h"
5278
5279 /* Override any gcc2 internal prototype to avoid an error.  */
5280 #ifdef __cplusplus
5281 extern "C"
5282 #endif
5283 /* We use char because int might match the return type of a gcc2
5284    builtin and then its argument prototype would still apply.  */
5285 char initscr ();
5286 int
5287 main ()
5288 {
5289 initscr ();
5290   ;
5291   return 0;
5292 }
5293 _ACEOF
5294 rm -f conftest.$ac_objext conftest$ac_exeext
5295 if { (eval echo "$as_me:5295: \"$ac_link\"") >&5
5296   (eval $ac_link) 2>&5
5297   ac_status=$?
5298   echo "$as_me:5298: \$? = $ac_status" >&5
5299   (exit $ac_status); } &&
5300          { ac_try='test -s conftest$ac_exeext'
5301   { (eval echo "$as_me:5301: \"$ac_try\"") >&5
5302   (eval $ac_try) 2>&5
5303   ac_status=$?
5304   echo "$as_me:5304: \$? = $ac_status" >&5
5305   (exit $ac_status); }; }; then
5306   ac_cv_lib_Hcurses_initscr=yes
5307 else
5308   echo "$as_me: failed program was:" >&5
5309 cat conftest.$ac_ext >&5
5310 ac_cv_lib_Hcurses_initscr=no
5311 fi
5312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5313 LIBS=$ac_check_lib_save_LIBS
5314 fi
5315 echo "$as_me:5315: result: $ac_cv_lib_Hcurses_initscr" >&5
5316 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5317 if test $ac_cv_lib_Hcurses_initscr = yes; then
5318
5319                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5320                         LIBS="-lHcurses $LIBS"
5321                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5322                         ac_cv_func_initscr=yes
5323
5324 fi
5325
5326 fi
5327
5328         fi
5329     ;;
5330 linux*)
5331         case `arch 2>/dev/null` in
5332         x86_64)
5333                 if test -d /lib64
5334                 then
5335
5336 if test -n "/lib64" ; then
5337   for cf_add_libdir in /lib64
5338   do
5339     if test $cf_add_libdir = /usr/lib ; then
5340       :
5341     elif test -d $cf_add_libdir
5342     then
5343       cf_have_libdir=no
5344       if test -n "$LDFLAGS$LIBS" ; then
5345         # a loop is needed to ensure we can add subdirs of existing dirs
5346         for cf_test_libdir in $LDFLAGS $LIBS ; do
5347           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5348             cf_have_libdir=yes; break
5349           fi
5350         done
5351       fi
5352       if test "$cf_have_libdir" = no ; then
5353         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5354
5355 echo "${as_me:-configure}:5355: testing adding $cf_add_libdir to library-path ..." 1>&5
5356
5357         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5358       fi
5359     fi
5360   done
5361 fi
5362
5363                 else
5364
5365 if test -n "/lib" ; then
5366   for cf_add_libdir in /lib
5367   do
5368     if test $cf_add_libdir = /usr/lib ; then
5369       :
5370     elif test -d $cf_add_libdir
5371     then
5372       cf_have_libdir=no
5373       if test -n "$LDFLAGS$LIBS" ; then
5374         # a loop is needed to ensure we can add subdirs of existing dirs
5375         for cf_test_libdir in $LDFLAGS $LIBS ; do
5376           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5377             cf_have_libdir=yes; break
5378           fi
5379         done
5380       fi
5381       if test "$cf_have_libdir" = no ; then
5382         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5383
5384 echo "${as_me:-configure}:5384: testing adding $cf_add_libdir to library-path ..." 1>&5
5385
5386         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5387       fi
5388     fi
5389   done
5390 fi
5391
5392                 fi
5393                 ;;
5394         *)
5395
5396 if test -n "/lib" ; then
5397   for cf_add_libdir in /lib
5398   do
5399     if test $cf_add_libdir = /usr/lib ; then
5400       :
5401     elif test -d $cf_add_libdir
5402     then
5403       cf_have_libdir=no
5404       if test -n "$LDFLAGS$LIBS" ; then
5405         # a loop is needed to ensure we can add subdirs of existing dirs
5406         for cf_test_libdir in $LDFLAGS $LIBS ; do
5407           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5408             cf_have_libdir=yes; break
5409           fi
5410         done
5411       fi
5412       if test "$cf_have_libdir" = no ; then
5413         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5414
5415 echo "${as_me:-configure}:5415: testing adding $cf_add_libdir to library-path ..." 1>&5
5416
5417         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5418       fi
5419     fi
5420   done
5421 fi
5422
5423                 ;;
5424         esac
5425     ;;
5426 sunos3*|sunos4*)
5427         if test "x$cf_cv_screen" = "xcurses_5lib"
5428         then
5429                 if test -d /usr/5lib ; then
5430
5431 if test -n "/usr/5lib" ; then
5432   for cf_add_libdir in /usr/5lib
5433   do
5434     if test $cf_add_libdir = /usr/lib ; then
5435       :
5436     elif test -d $cf_add_libdir
5437     then
5438       cf_have_libdir=no
5439       if test -n "$LDFLAGS$LIBS" ; then
5440         # a loop is needed to ensure we can add subdirs of existing dirs
5441         for cf_test_libdir in $LDFLAGS $LIBS ; do
5442           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5443             cf_have_libdir=yes; break
5444           fi
5445         done
5446       fi
5447       if test "$cf_have_libdir" = no ; then
5448         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5449
5450 echo "${as_me:-configure}:5450: testing adding $cf_add_libdir to library-path ..." 1>&5
5451
5452         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5453       fi
5454     fi
5455   done
5456 fi
5457
5458                         LIBS="-lcurses -ltermcap $LIBS"
5459                 fi
5460     fi
5461     ac_cv_func_initscr=yes
5462     ;;
5463 esac
5464
5465 if test ".$ac_cv_func_initscr" != .yes ; then
5466     cf_save_LIBS="$LIBS"
5467     cf_term_lib=""
5468     cf_curs_lib=""
5469
5470     if test ".${cf_cv_ncurses_version:-no}" != .no
5471     then
5472         cf_check_list="ncurses curses cursesX"
5473     else
5474         cf_check_list="cursesX curses ncurses"
5475     fi
5476
5477     # Check for library containing tgoto.  Do this before curses library
5478     # because it may be needed to link the test-case for initscr.
5479     echo "$as_me:5479: checking for tgoto" >&5
5480 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5481 if test "${ac_cv_func_tgoto+set}" = set; then
5482   echo $ECHO_N "(cached) $ECHO_C" >&6
5483 else
5484   cat >conftest.$ac_ext <<_ACEOF
5485 #line 5485 "configure"
5486 #include "confdefs.h"
5487 /* System header to define __stub macros and hopefully few prototypes,
5488     which can conflict with char tgoto (); below.  */
5489 #include <assert.h>
5490 /* Override any gcc2 internal prototype to avoid an error.  */
5491 #ifdef __cplusplus
5492 extern "C"
5493 #endif
5494 /* We use char because int might match the return type of a gcc2
5495    builtin and then its argument prototype would still apply.  */
5496 char tgoto ();
5497 char (*f) ();
5498
5499 int
5500 main ()
5501 {
5502 /* The GNU C library defines this for functions which it implements
5503     to always fail with ENOSYS.  Some functions are actually named
5504     something starting with __ and the normal name is an alias.  */
5505 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5506 choke me
5507 #else
5508 f = tgoto;
5509 #endif
5510
5511   ;
5512   return 0;
5513 }
5514 _ACEOF
5515 rm -f conftest.$ac_objext conftest$ac_exeext
5516 if { (eval echo "$as_me:5516: \"$ac_link\"") >&5
5517   (eval $ac_link) 2>&5
5518   ac_status=$?
5519   echo "$as_me:5519: \$? = $ac_status" >&5
5520   (exit $ac_status); } &&
5521          { ac_try='test -s conftest$ac_exeext'
5522   { (eval echo "$as_me:5522: \"$ac_try\"") >&5
5523   (eval $ac_try) 2>&5
5524   ac_status=$?
5525   echo "$as_me:5525: \$? = $ac_status" >&5
5526   (exit $ac_status); }; }; then
5527   ac_cv_func_tgoto=yes
5528 else
5529   echo "$as_me: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
5531 ac_cv_func_tgoto=no
5532 fi
5533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5534 fi
5535 echo "$as_me:5535: result: $ac_cv_func_tgoto" >&5
5536 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5537 if test $ac_cv_func_tgoto = yes; then
5538   cf_term_lib=predefined
5539 else
5540
5541         for cf_term_lib in $cf_check_list termcap termlib unknown
5542         do
5543             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5544 echo "$as_me:5544: checking for tgoto in -l$cf_term_lib" >&5
5545 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5546 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5547   echo $ECHO_N "(cached) $ECHO_C" >&6
5548 else
5549   ac_check_lib_save_LIBS=$LIBS
5550 LIBS="-l$cf_term_lib  $LIBS"
5551 cat >conftest.$ac_ext <<_ACEOF
5552 #line 5552 "configure"
5553 #include "confdefs.h"
5554
5555 /* Override any gcc2 internal prototype to avoid an error.  */
5556 #ifdef __cplusplus
5557 extern "C"
5558 #endif
5559 /* We use char because int might match the return type of a gcc2
5560    builtin and then its argument prototype would still apply.  */
5561 char tgoto ();
5562 int
5563 main ()
5564 {
5565 tgoto ();
5566   ;
5567   return 0;
5568 }
5569 _ACEOF
5570 rm -f conftest.$ac_objext conftest$ac_exeext
5571 if { (eval echo "$as_me:5571: \"$ac_link\"") >&5
5572   (eval $ac_link) 2>&5
5573   ac_status=$?
5574   echo "$as_me:5574: \$? = $ac_status" >&5
5575   (exit $ac_status); } &&
5576          { ac_try='test -s conftest$ac_exeext'
5577   { (eval echo "$as_me:5577: \"$ac_try\"") >&5
5578   (eval $ac_try) 2>&5
5579   ac_status=$?
5580   echo "$as_me:5580: \$? = $ac_status" >&5
5581   (exit $ac_status); }; }; then
5582   eval "$as_ac_Lib=yes"
5583 else
5584   echo "$as_me: failed program was:" >&5
5585 cat conftest.$ac_ext >&5
5586 eval "$as_ac_Lib=no"
5587 fi
5588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5589 LIBS=$ac_check_lib_save_LIBS
5590 fi
5591 echo "$as_me:5591: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5592 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5593 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5594   break
5595 fi
5596
5597         done
5598
5599 fi
5600
5601     # Check for library containing initscr
5602     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5603         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5604     do
5605         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5606 echo "$as_me:5606: checking for initscr in -l$cf_curs_lib" >&5
5607 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5608 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5609   echo $ECHO_N "(cached) $ECHO_C" >&6
5610 else
5611   ac_check_lib_save_LIBS=$LIBS
5612 LIBS="-l$cf_curs_lib  $LIBS"
5613 cat >conftest.$ac_ext <<_ACEOF
5614 #line 5614 "configure"
5615 #include "confdefs.h"
5616
5617 /* Override any gcc2 internal prototype to avoid an error.  */
5618 #ifdef __cplusplus
5619 extern "C"
5620 #endif
5621 /* We use char because int might match the return type of a gcc2
5622    builtin and then its argument prototype would still apply.  */
5623 char initscr ();
5624 int
5625 main ()
5626 {
5627 initscr ();
5628   ;
5629   return 0;
5630 }
5631 _ACEOF
5632 rm -f conftest.$ac_objext conftest$ac_exeext
5633 if { (eval echo "$as_me:5633: \"$ac_link\"") >&5
5634   (eval $ac_link) 2>&5
5635   ac_status=$?
5636   echo "$as_me:5636: \$? = $ac_status" >&5
5637   (exit $ac_status); } &&
5638          { ac_try='test -s conftest$ac_exeext'
5639   { (eval echo "$as_me:5639: \"$ac_try\"") >&5
5640   (eval $ac_try) 2>&5
5641   ac_status=$?
5642   echo "$as_me:5642: \$? = $ac_status" >&5
5643   (exit $ac_status); }; }; then
5644   eval "$as_ac_Lib=yes"
5645 else
5646   echo "$as_me: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 eval "$as_ac_Lib=no"
5649 fi
5650 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5651 LIBS=$ac_check_lib_save_LIBS
5652 fi
5653 echo "$as_me:5653: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5654 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5655 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5656   break
5657 fi
5658
5659     done
5660     test $cf_curs_lib = unknown && { { echo "$as_me:5660: error: no curses library found" >&5
5661 echo "$as_me: error: no curses library found" >&2;}
5662    { (exit 1); exit 1; }; }
5663
5664     LIBS="-l$cf_curs_lib $cf_save_LIBS"
5665     if test "$cf_term_lib" = unknown ; then
5666         echo "$as_me:5666: checking if we can link with $cf_curs_lib library" >&5
5667 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5668         cat >conftest.$ac_ext <<_ACEOF
5669 #line 5669 "configure"
5670 #include "confdefs.h"
5671 #include <${cf_cv_ncurses_header:-curses.h}>
5672 int
5673 main ()
5674 {
5675 initscr()
5676   ;
5677   return 0;
5678 }
5679 _ACEOF
5680 rm -f conftest.$ac_objext conftest$ac_exeext
5681 if { (eval echo "$as_me:5681: \"$ac_link\"") >&5
5682   (eval $ac_link) 2>&5
5683   ac_status=$?
5684   echo "$as_me:5684: \$? = $ac_status" >&5
5685   (exit $ac_status); } &&
5686          { ac_try='test -s conftest$ac_exeext'
5687   { (eval echo "$as_me:5687: \"$ac_try\"") >&5
5688   (eval $ac_try) 2>&5
5689   ac_status=$?
5690   echo "$as_me:5690: \$? = $ac_status" >&5
5691   (exit $ac_status); }; }; then
5692   cf_result=yes
5693 else
5694   echo "$as_me: failed program was:" >&5
5695 cat conftest.$ac_ext >&5
5696 cf_result=no
5697 fi
5698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5699         echo "$as_me:5699: result: $cf_result" >&5
5700 echo "${ECHO_T}$cf_result" >&6
5701         test $cf_result = no && { { echo "$as_me:5701: error: Cannot link curses library" >&5
5702 echo "$as_me: error: Cannot link curses library" >&2;}
5703    { (exit 1); exit 1; }; }
5704     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5705         :
5706     elif test "$cf_term_lib" != predefined ; then
5707         echo "$as_me:5707: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5708 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5709         cat >conftest.$ac_ext <<_ACEOF
5710 #line 5710 "configure"
5711 #include "confdefs.h"
5712 #include <${cf_cv_ncurses_header:-curses.h}>
5713 int
5714 main ()
5715 {
5716 initscr(); tgoto((char *)0, 0, 0);
5717   ;
5718   return 0;
5719 }
5720 _ACEOF
5721 rm -f conftest.$ac_objext conftest$ac_exeext
5722 if { (eval echo "$as_me:5722: \"$ac_link\"") >&5
5723   (eval $ac_link) 2>&5
5724   ac_status=$?
5725   echo "$as_me:5725: \$? = $ac_status" >&5
5726   (exit $ac_status); } &&
5727          { ac_try='test -s conftest$ac_exeext'
5728   { (eval echo "$as_me:5728: \"$ac_try\"") >&5
5729   (eval $ac_try) 2>&5
5730   ac_status=$?
5731   echo "$as_me:5731: \$? = $ac_status" >&5
5732   (exit $ac_status); }; }; then
5733   cf_result=no
5734 else
5735   echo "$as_me: failed program was:" >&5
5736 cat conftest.$ac_ext >&5
5737
5738             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5739             cat >conftest.$ac_ext <<_ACEOF
5740 #line 5740 "configure"
5741 #include "confdefs.h"
5742 #include <${cf_cv_ncurses_header:-curses.h}>
5743 int
5744 main ()
5745 {
5746 initscr()
5747   ;
5748   return 0;
5749 }
5750 _ACEOF
5751 rm -f conftest.$ac_objext conftest$ac_exeext
5752 if { (eval echo "$as_me:5752: \"$ac_link\"") >&5
5753   (eval $ac_link) 2>&5
5754   ac_status=$?
5755   echo "$as_me:5755: \$? = $ac_status" >&5
5756   (exit $ac_status); } &&
5757          { ac_try='test -s conftest$ac_exeext'
5758   { (eval echo "$as_me:5758: \"$ac_try\"") >&5
5759   (eval $ac_try) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); }; }; then
5763   cf_result=yes
5764 else
5765   echo "$as_me: failed program was:" >&5
5766 cat conftest.$ac_ext >&5
5767 cf_result=error
5768 fi
5769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5770
5771 fi
5772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5773         echo "$as_me:5773: result: $cf_result" >&5
5774 echo "${ECHO_T}$cf_result" >&6
5775     fi
5776 fi
5777 fi
5778
5779 echo "$as_me:5779: checking for NetBSD form.h" >&5
5780 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
5781 if test "${cf_cv_netbsd_form_h+set}" = set; then
5782   echo $ECHO_N "(cached) $ECHO_C" >&6
5783 else
5784
5785 cat >conftest.$ac_ext <<_ACEOF
5786 #line 5786 "configure"
5787 #include "confdefs.h"
5788
5789 #include <${cf_cv_ncurses_header:-curses.h}>
5790 #include <form.h>
5791
5792 int
5793 main ()
5794 {
5795
5796         FORM *form;
5797         int y = current_field(form)->cursor_ypos;
5798         int x = current_field(form)->cursor_xpos;
5799
5800   ;
5801   return 0;
5802 }
5803 _ACEOF
5804 rm -f conftest.$ac_objext
5805 if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5
5806   (eval $ac_compile) 2>&5
5807   ac_status=$?
5808   echo "$as_me:5808: \$? = $ac_status" >&5
5809   (exit $ac_status); } &&
5810          { ac_try='test -s conftest.$ac_objext'
5811   { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5812   (eval $ac_try) 2>&5
5813   ac_status=$?
5814   echo "$as_me:5814: \$? = $ac_status" >&5
5815   (exit $ac_status); }; }; then
5816   cf_cv_netbsd_form_h=yes
5817
5818 else
5819   echo "$as_me: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5821 cf_cv_netbsd_form_h=no
5822 fi
5823 rm -f conftest.$ac_objext conftest.$ac_ext
5824
5825 fi
5826 echo "$as_me:5826: result: $cf_cv_netbsd_form_h" >&5
5827 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
5828
5829 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
5830 #define HAVE_NETBSD_FORM_H 1
5831 EOF
5832
5833 echo "$as_me:5833: checking for NetBSD menu.h" >&5
5834 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
5835 if test "${cf_cv_netbsd_menu_h+set}" = set; then
5836   echo $ECHO_N "(cached) $ECHO_C" >&6
5837 else
5838
5839 cat >conftest.$ac_ext <<_ACEOF
5840 #line 5840 "configure"
5841 #include "confdefs.h"
5842
5843 #include <${cf_cv_ncurses_header:-curses.h}>
5844 #include <menu.h>
5845
5846 int
5847 main ()
5848 {
5849
5850         MENU *menu;
5851         int y = menu->max_item_width;
5852
5853   ;
5854   return 0;
5855 }
5856 _ACEOF
5857 rm -f conftest.$ac_objext
5858 if { (eval echo "$as_me:5858: \"$ac_compile\"") >&5
5859   (eval $ac_compile) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); } &&
5863          { ac_try='test -s conftest.$ac_objext'
5864   { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5865   (eval $ac_try) 2>&5
5866   ac_status=$?
5867   echo "$as_me:5867: \$? = $ac_status" >&5
5868   (exit $ac_status); }; }; then
5869   cf_cv_netbsd_menu_h=yes
5870
5871 else
5872   echo "$as_me: failed program was:" >&5
5873 cat conftest.$ac_ext >&5
5874 cf_cv_netbsd_menu_h=no
5875 fi
5876 rm -f conftest.$ac_objext conftest.$ac_ext
5877
5878 fi
5879 echo "$as_me:5879: result: $cf_cv_netbsd_menu_h" >&5
5880 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
5881
5882 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
5883 #define HAVE_NETBSD_MENU_H 1
5884 EOF
5885
5886         ;;
5887 ncurses)
5888
5889 cf_ncuconfig_root=ncurses
5890
5891 echo "Looking for ${cf_ncuconfig_root}-config"
5892 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5893 do
5894   # Extract the first word of "$ac_prog", so it can be a program name with args.
5895 set dummy $ac_prog; ac_word=$2
5896 echo "$as_me:5896: checking for $ac_word" >&5
5897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5898 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5899   echo $ECHO_N "(cached) $ECHO_C" >&6
5900 else
5901   case $NCURSES_CONFIG in
5902   [\\/]* | ?:[\\/]*)
5903   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5904   ;;
5905   *)
5906   ac_save_IFS=$IFS; IFS=$ac_path_separator
5907 ac_dummy="$PATH"
5908 for ac_dir in $ac_dummy; do
5909   IFS=$ac_save_IFS
5910   test -z "$ac_dir" && ac_dir=.
5911   if $as_executable_p "$ac_dir/$ac_word"; then
5912    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5913    echo "$as_me:5913: found $ac_dir/$ac_word" >&5
5914    break
5915 fi
5916 done
5917
5918   ;;
5919 esac
5920 fi
5921 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5922
5923 if test -n "$NCURSES_CONFIG"; then
5924   echo "$as_me:5924: result: $NCURSES_CONFIG" >&5
5925 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5926 else
5927   echo "$as_me:5927: result: no" >&5
5928 echo "${ECHO_T}no" >&6
5929 fi
5930
5931   test -n "$NCURSES_CONFIG" && break
5932 done
5933 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5934
5935 if test "$NCURSES_CONFIG" != none ; then
5936
5937 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5938 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5939
5940 # even with config script, some packages use no-override for curses.h
5941
5942 echo "$as_me:5942: checking if we have identified curses headers" >&5
5943 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5944 if test "${cf_cv_ncurses_header+set}" = set; then
5945   echo $ECHO_N "(cached) $ECHO_C" >&6
5946 else
5947
5948 cf_cv_ncurses_header=none
5949 for cf_header in  \
5950     ncurses/curses.h \
5951         ncurses/ncurses.h \
5952         curses.h \
5953         ncurses.h
5954 do
5955 cat >conftest.$ac_ext <<_ACEOF
5956 #line 5956 "configure"
5957 #include "confdefs.h"
5958 #include <${cf_header}>
5959 int
5960 main ()
5961 {
5962 initscr(); tgoto("?", 0,0)
5963   ;
5964   return 0;
5965 }
5966 _ACEOF
5967 rm -f conftest.$ac_objext
5968 if { (eval echo "$as_me:5968: \"$ac_compile\"") >&5
5969   (eval $ac_compile) 2>&5
5970   ac_status=$?
5971   echo "$as_me:5971: \$? = $ac_status" >&5
5972   (exit $ac_status); } &&
5973          { ac_try='test -s conftest.$ac_objext'
5974   { (eval echo "$as_me:5974: \"$ac_try\"") >&5
5975   (eval $ac_try) 2>&5
5976   ac_status=$?
5977   echo "$as_me:5977: \$? = $ac_status" >&5
5978   (exit $ac_status); }; }; then
5979   cf_cv_ncurses_header=$cf_header; break
5980 else
5981   echo "$as_me: failed program was:" >&5
5982 cat conftest.$ac_ext >&5
5983 fi
5984 rm -f conftest.$ac_objext conftest.$ac_ext
5985 done
5986
5987 fi
5988 echo "$as_me:5988: result: $cf_cv_ncurses_header" >&5
5989 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5990
5991 if test "$cf_cv_ncurses_header" = none ; then
5992         { { echo "$as_me:5992: error: No curses header-files found" >&5
5993 echo "$as_me: error: No curses header-files found" >&2;}
5994    { (exit 1); exit 1; }; }
5995 fi
5996
5997 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5998
5999 for ac_header in $cf_cv_ncurses_header
6000 do
6001 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6002 echo "$as_me:6002: checking for $ac_header" >&5
6003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6004 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6005   echo $ECHO_N "(cached) $ECHO_C" >&6
6006 else
6007   cat >conftest.$ac_ext <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010 #include <$ac_header>
6011 _ACEOF
6012 if { (eval echo "$as_me:6012: \"$ac_cpp conftest.$ac_ext\"") >&5
6013   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6014   ac_status=$?
6015   egrep -v '^ *\+' conftest.er1 >conftest.err
6016   rm -f conftest.er1
6017   cat conftest.err >&5
6018   echo "$as_me:6018: \$? = $ac_status" >&5
6019   (exit $ac_status); } >/dev/null; then
6020   if test -s conftest.err; then
6021     ac_cpp_err=$ac_c_preproc_warn_flag
6022   else
6023     ac_cpp_err=
6024   fi
6025 else
6026   ac_cpp_err=yes
6027 fi
6028 if test -z "$ac_cpp_err"; then
6029   eval "$as_ac_Header=yes"
6030 else
6031   echo "$as_me: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   eval "$as_ac_Header=no"
6034 fi
6035 rm -f conftest.err conftest.$ac_ext
6036 fi
6037 echo "$as_me:6037: result: `eval echo '${'$as_ac_Header'}'`" >&5
6038 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6039 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6040   cat >>confdefs.h <<EOF
6041 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6042 EOF
6043
6044 fi
6045 done
6046
6047 cat >>confdefs.h <<\EOF
6048 #define NCURSES 1
6049 EOF
6050
6051 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6052
6053 cat >>confdefs.h <<EOF
6054 #define $cf_nculib_ROOT 1
6055 EOF
6056
6057 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6058
6059 else
6060
6061 cf_ncuhdr_root=ncurses
6062
6063 test -n "$cf_cv_curses_dir" && \
6064 test "$cf_cv_curses_dir" != "no" && { \
6065
6066 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6067   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6068   do
6069         while test $cf_add_incdir != /usr/include
6070         do
6071           if test -d $cf_add_incdir
6072           then
6073                 cf_have_incdir=no
6074                 if test -n "$CFLAGS$CPPFLAGS" ; then
6075                   # a loop is needed to ensure we can add subdirs of existing dirs
6076                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6077                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6078                           cf_have_incdir=yes; break
6079                         fi
6080                   done
6081                 fi
6082
6083                 if test "$cf_have_incdir" = no ; then
6084                   if test "$cf_add_incdir" = /usr/local/include ; then
6085                         if test "$GCC" = yes
6086                         then
6087                           cf_save_CPPFLAGS=$CPPFLAGS
6088                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6089                           cat >conftest.$ac_ext <<_ACEOF
6090 #line 6090 "configure"
6091 #include "confdefs.h"
6092 #include <stdio.h>
6093 int
6094 main ()
6095 {
6096 printf("Hello")
6097   ;
6098   return 0;
6099 }
6100 _ACEOF
6101 rm -f conftest.$ac_objext
6102 if { (eval echo "$as_me:6102: \"$ac_compile\"") >&5
6103   (eval $ac_compile) 2>&5
6104   ac_status=$?
6105   echo "$as_me:6105: \$? = $ac_status" >&5
6106   (exit $ac_status); } &&
6107          { ac_try='test -s conftest.$ac_objext'
6108   { (eval echo "$as_me:6108: \"$ac_try\"") >&5
6109   (eval $ac_try) 2>&5
6110   ac_status=$?
6111   echo "$as_me:6111: \$? = $ac_status" >&5
6112   (exit $ac_status); }; }; then
6113   :
6114 else
6115   echo "$as_me: failed program was:" >&5
6116 cat conftest.$ac_ext >&5
6117 cf_have_incdir=yes
6118 fi
6119 rm -f conftest.$ac_objext conftest.$ac_ext
6120                           CPPFLAGS=$cf_save_CPPFLAGS
6121                         fi
6122                   fi
6123                 fi
6124
6125                 if test "$cf_have_incdir" = no ; then
6126                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6127
6128 echo "${as_me:-configure}:6128: testing adding $cf_add_incdir to include-path ..." 1>&5
6129
6130                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6131
6132                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6133                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6134                   cf_add_incdir="$cf_top_incdir"
6135                 else
6136                   break
6137                 fi
6138           fi
6139         done
6140   done
6141 fi
6142
6143 }
6144
6145 echo "$as_me:6145: checking for $cf_ncuhdr_root header in include-path" >&5
6146 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6147 if test "${cf_cv_ncurses_h+set}" = set; then
6148   echo $ECHO_N "(cached) $ECHO_C" >&6
6149 else
6150
6151         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6152         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6153         for cf_header in $cf_header_list
6154         do
6155
6156         cat >conftest.$ac_ext <<_ACEOF
6157 #line 6157 "configure"
6158 #include "confdefs.h"
6159
6160 #include <$cf_header>
6161 int
6162 main ()
6163 {
6164
6165 #ifdef NCURSES_VERSION
6166
6167 printf("%s\n", NCURSES_VERSION);
6168 #else
6169 #ifdef __NCURSES_H
6170 printf("old\n");
6171 #else
6172         make an error
6173 #endif
6174 #endif
6175
6176   ;
6177   return 0;
6178 }
6179 _ACEOF
6180 rm -f conftest.$ac_objext
6181 if { (eval echo "$as_me:6181: \"$ac_compile\"") >&5
6182   (eval $ac_compile) 2>&5
6183   ac_status=$?
6184   echo "$as_me:6184: \$? = $ac_status" >&5
6185   (exit $ac_status); } &&
6186          { ac_try='test -s conftest.$ac_objext'
6187   { (eval echo "$as_me:6187: \"$ac_try\"") >&5
6188   (eval $ac_try) 2>&5
6189   ac_status=$?
6190   echo "$as_me:6190: \$? = $ac_status" >&5
6191   (exit $ac_status); }; }; then
6192   cf_cv_ncurses_h=$cf_header
6193
6194 else
6195   echo "$as_me: failed program was:" >&5
6196 cat conftest.$ac_ext >&5
6197 cf_cv_ncurses_h=no
6198 fi
6199 rm -f conftest.$ac_objext conftest.$ac_ext
6200
6201                 test "$cf_cv_ncurses_h" != no && break
6202         done
6203
6204 fi
6205 echo "$as_me:6205: result: $cf_cv_ncurses_h" >&5
6206 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6207
6208 if test "$cf_cv_ncurses_h" != no ; then
6209         cf_cv_ncurses_header=$cf_cv_ncurses_h
6210 else
6211
6212 echo "$as_me:6212: checking for $cf_ncuhdr_root include-path" >&5
6213 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6214 if test "${cf_cv_ncurses_h2+set}" = set; then
6215   echo $ECHO_N "(cached) $ECHO_C" >&6
6216 else
6217
6218         test -n "$verbose" && echo
6219
6220 cf_search=
6221
6222 # collect the current set of include-directories from compiler flags
6223 cf_header_path_list=""
6224 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6225         for cf_header_path in $CPPFLAGS $CFLAGS
6226         do
6227                 case $cf_header_path in #(vi
6228                 -I*)
6229                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6230
6231 test "$cf_header_path" != "NONE" && \
6232 test -d "$cf_header_path" && \
6233  {
6234         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6235         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6236         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6237         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6238         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6239         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"
6240 }
6241
6242                         cf_header_path_list="$cf_header_path_list $cf_search"
6243                         ;;
6244                 esac
6245         done
6246 fi
6247
6248 # add the variations for the package we are looking for
6249
6250 cf_search=
6251
6252 test "/usr" != "$prefix" && \
6253 test -d "/usr" && \
6254 (test $prefix = NONE || test "/usr" != "$prefix") && {
6255         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6256         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6257         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6258         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6259         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6260         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6261 }
6262
6263 test "$prefix" != "NONE" && \
6264 test -d "$prefix" && \
6265  {
6266         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6267         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6268         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6269         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6270         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6271         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6272 }
6273
6274 test "/usr/local" != "$prefix" && \
6275 test -d "/usr/local" && \
6276 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6277         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6278         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6279         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6280         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6281         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6282         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6283 }
6284
6285 test "/opt" != "$prefix" && \
6286 test -d "/opt" && \
6287 (test $prefix = NONE || test "/opt" != "$prefix") && {
6288         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6289         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6290         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6291         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6292         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6293         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6294 }
6295
6296 test "$HOME" != "$prefix" && \
6297 test -d "$HOME" && \
6298 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6299         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6300         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6301         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6302         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6303         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6304         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6305 }
6306
6307 test "$includedir" != NONE && \
6308 test "$includedir" != "/usr/include" && \
6309 test -d "$includedir" && {
6310         test -d $includedir &&    cf_search="$cf_search $includedir"
6311         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6312 }
6313
6314 test "$oldincludedir" != NONE && \
6315 test "$oldincludedir" != "/usr/include" && \
6316 test -d "$oldincludedir" && {
6317         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6318         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6319 }
6320
6321 cf_search="$cf_search $cf_header_path_list"
6322
6323         test -n "$verbose" && echo search path $cf_search
6324         cf_save2_CPPFLAGS="$CPPFLAGS"
6325         for cf_incdir in $cf_search
6326         do
6327
6328 if test -n "$cf_incdir" ; then
6329   for cf_add_incdir in $cf_incdir
6330   do
6331         while test $cf_add_incdir != /usr/include
6332         do
6333           if test -d $cf_add_incdir
6334           then
6335                 cf_have_incdir=no
6336                 if test -n "$CFLAGS$CPPFLAGS" ; then
6337                   # a loop is needed to ensure we can add subdirs of existing dirs
6338                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6339                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6340                           cf_have_incdir=yes; break
6341                         fi
6342                   done
6343                 fi
6344
6345                 if test "$cf_have_incdir" = no ; then
6346                   if test "$cf_add_incdir" = /usr/local/include ; then
6347                         if test "$GCC" = yes
6348                         then
6349                           cf_save_CPPFLAGS=$CPPFLAGS
6350                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6351                           cat >conftest.$ac_ext <<_ACEOF
6352 #line 6352 "configure"
6353 #include "confdefs.h"
6354 #include <stdio.h>
6355 int
6356 main ()
6357 {
6358 printf("Hello")
6359   ;
6360   return 0;
6361 }
6362 _ACEOF
6363 rm -f conftest.$ac_objext
6364 if { (eval echo "$as_me:6364: \"$ac_compile\"") >&5
6365   (eval $ac_compile) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); } &&
6369          { ac_try='test -s conftest.$ac_objext'
6370   { (eval echo "$as_me:6370: \"$ac_try\"") >&5
6371   (eval $ac_try) 2>&5
6372   ac_status=$?
6373   echo "$as_me:6373: \$? = $ac_status" >&5
6374   (exit $ac_status); }; }; then
6375   :
6376 else
6377   echo "$as_me: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379 cf_have_incdir=yes
6380 fi
6381 rm -f conftest.$ac_objext conftest.$ac_ext
6382                           CPPFLAGS=$cf_save_CPPFLAGS
6383                         fi
6384                   fi
6385                 fi
6386
6387                 if test "$cf_have_incdir" = no ; then
6388                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6389
6390 echo "${as_me:-configure}:6390: testing adding $cf_add_incdir to include-path ..." 1>&5
6391
6392                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6393
6394                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6395                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6396                   cf_add_incdir="$cf_top_incdir"
6397                 else
6398                   break
6399                 fi
6400           fi
6401         done
6402   done
6403 fi
6404
6405                 for cf_header in \
6406                         ncurses.h \
6407                         curses.h
6408                 do
6409
6410         cat >conftest.$ac_ext <<_ACEOF
6411 #line 6411 "configure"
6412 #include "confdefs.h"
6413
6414 #include <$cf_header>
6415 int
6416 main ()
6417 {
6418
6419 #ifdef NCURSES_VERSION
6420
6421 printf("%s\n", NCURSES_VERSION);
6422 #else
6423 #ifdef __NCURSES_H
6424 printf("old\n");
6425 #else
6426         make an error
6427 #endif
6428 #endif
6429
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -f conftest.$ac_objext
6435 if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5
6436   (eval $ac_compile) 2>&5
6437   ac_status=$?
6438   echo "$as_me:6438: \$? = $ac_status" >&5
6439   (exit $ac_status); } &&
6440          { ac_try='test -s conftest.$ac_objext'
6441   { (eval echo "$as_me:6441: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:6444: \$? = $ac_status" >&5
6445   (exit $ac_status); }; }; then
6446   cf_cv_ncurses_h2=$cf_header
6447
6448 else
6449   echo "$as_me: failed program was:" >&5
6450 cat conftest.$ac_ext >&5
6451 cf_cv_ncurses_h2=no
6452 fi
6453 rm -f conftest.$ac_objext conftest.$ac_ext
6454
6455                         if test "$cf_cv_ncurses_h2" != no ; then
6456                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6457                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6458                                 break
6459                         fi
6460                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6461                 done
6462                 CPPFLAGS="$cf_save2_CPPFLAGS"
6463                 test "$cf_cv_ncurses_h2" != no && break
6464         done
6465         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6465: error: not found" >&5
6466 echo "$as_me: error: not found" >&2;}
6467    { (exit 1); exit 1; }; }
6468
6469 fi
6470 echo "$as_me:6470: result: $cf_cv_ncurses_h2" >&5
6471 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6472
6473         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6474         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6475         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6476                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6477         fi
6478
6479 if test -n "$cf_1st_incdir" ; then
6480   for cf_add_incdir in $cf_1st_incdir
6481   do
6482         while test $cf_add_incdir != /usr/include
6483         do
6484           if test -d $cf_add_incdir
6485           then
6486                 cf_have_incdir=no
6487                 if test -n "$CFLAGS$CPPFLAGS" ; then
6488                   # a loop is needed to ensure we can add subdirs of existing dirs
6489                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6490                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6491                           cf_have_incdir=yes; break
6492                         fi
6493                   done
6494                 fi
6495
6496                 if test "$cf_have_incdir" = no ; then
6497                   if test "$cf_add_incdir" = /usr/local/include ; then
6498                         if test "$GCC" = yes
6499                         then
6500                           cf_save_CPPFLAGS=$CPPFLAGS
6501                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6502                           cat >conftest.$ac_ext <<_ACEOF
6503 #line 6503 "configure"
6504 #include "confdefs.h"
6505 #include <stdio.h>
6506 int
6507 main ()
6508 {
6509 printf("Hello")
6510   ;
6511   return 0;
6512 }
6513 _ACEOF
6514 rm -f conftest.$ac_objext
6515 if { (eval echo "$as_me:6515: \"$ac_compile\"") >&5
6516   (eval $ac_compile) 2>&5
6517   ac_status=$?
6518   echo "$as_me:6518: \$? = $ac_status" >&5
6519   (exit $ac_status); } &&
6520          { ac_try='test -s conftest.$ac_objext'
6521   { (eval echo "$as_me:6521: \"$ac_try\"") >&5
6522   (eval $ac_try) 2>&5
6523   ac_status=$?
6524   echo "$as_me:6524: \$? = $ac_status" >&5
6525   (exit $ac_status); }; }; then
6526   :
6527 else
6528   echo "$as_me: failed program was:" >&5
6529 cat conftest.$ac_ext >&5
6530 cf_have_incdir=yes
6531 fi
6532 rm -f conftest.$ac_objext conftest.$ac_ext
6533                           CPPFLAGS=$cf_save_CPPFLAGS
6534                         fi
6535                   fi
6536                 fi
6537
6538                 if test "$cf_have_incdir" = no ; then
6539                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6540
6541 echo "${as_me:-configure}:6541: testing adding $cf_add_incdir to include-path ..." 1>&5
6542
6543                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6544
6545                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6546                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6547                   cf_add_incdir="$cf_top_incdir"
6548                 else
6549                   break
6550                 fi
6551           fi
6552         done
6553   done
6554 fi
6555
6556 fi
6557
6558 # Set definitions to allow ifdef'ing for ncurses.h
6559
6560 case $cf_cv_ncurses_header in # (vi
6561 *ncurses.h)
6562         cat >>confdefs.h <<\EOF
6563 #define HAVE_NCURSES_H 1
6564 EOF
6565
6566         ;;
6567 esac
6568
6569 case $cf_cv_ncurses_header in # (vi
6570 ncurses/curses.h|ncurses/ncurses.h)
6571         cat >>confdefs.h <<\EOF
6572 #define HAVE_NCURSES_NCURSES_H 1
6573 EOF
6574
6575         ;;
6576 ncursesw/curses.h|ncursesw/ncurses.h)
6577         cat >>confdefs.h <<\EOF
6578 #define HAVE_NCURSESW_NCURSES_H 1
6579 EOF
6580
6581         ;;
6582 esac
6583
6584 echo "$as_me:6584: checking for terminfo header" >&5
6585 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6586 if test "${cf_cv_term_header+set}" = set; then
6587   echo $ECHO_N "(cached) $ECHO_C" >&6
6588 else
6589
6590 case ${cf_cv_ncurses_header} in #(vi
6591 */ncurses.h|*/ncursesw.h) #(vi
6592         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6593         ;;
6594 *)
6595         cf_term_header=term.h
6596         ;;
6597 esac
6598
6599 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6600 do
6601 cat >conftest.$ac_ext <<_ACEOF
6602 #line 6602 "configure"
6603 #include "confdefs.h"
6604 #include <stdio.h>
6605 #include <${cf_cv_ncurses_header:-curses.h}>
6606 #include <$cf_test>
6607
6608 int
6609 main ()
6610 {
6611 int x = auto_left_margin
6612   ;
6613   return 0;
6614 }
6615 _ACEOF
6616 rm -f conftest.$ac_objext
6617 if { (eval echo "$as_me:6617: \"$ac_compile\"") >&5
6618   (eval $ac_compile) 2>&5
6619   ac_status=$?
6620   echo "$as_me:6620: \$? = $ac_status" >&5
6621   (exit $ac_status); } &&
6622          { ac_try='test -s conftest.$ac_objext'
6623   { (eval echo "$as_me:6623: \"$ac_try\"") >&5
6624   (eval $ac_try) 2>&5
6625   ac_status=$?
6626   echo "$as_me:6626: \$? = $ac_status" >&5
6627   (exit $ac_status); }; }; then
6628
6629         cf_cv_term_header="$cf_test"
6630 else
6631   echo "$as_me: failed program was:" >&5
6632 cat conftest.$ac_ext >&5
6633
6634         cf_cv_term_header=unknown
6635
6636 fi
6637 rm -f conftest.$ac_objext conftest.$ac_ext
6638         test "$cf_cv_term_header" != unknown && break
6639 done
6640
6641 fi
6642 echo "$as_me:6642: result: $cf_cv_term_header" >&5
6643 echo "${ECHO_T}$cf_cv_term_header" >&6
6644
6645 # Set definitions to allow ifdef'ing to accommodate subdirectories
6646
6647 case $cf_cv_term_header in # (vi
6648 *term.h)
6649         cat >>confdefs.h <<\EOF
6650 #define HAVE_TERM_H 1
6651 EOF
6652
6653         ;;
6654 esac
6655
6656 case $cf_cv_term_header in # (vi
6657 ncurses/term.h) #(vi
6658         cat >>confdefs.h <<\EOF
6659 #define HAVE_NCURSES_TERM_H 1
6660 EOF
6661
6662         ;;
6663 ncursesw/term.h)
6664         cat >>confdefs.h <<\EOF
6665 #define HAVE_NCURSESW_TERM_H 1
6666 EOF
6667
6668         ;;
6669 esac
6670
6671 # some applications need this, but should check for NCURSES_VERSION
6672 cat >>confdefs.h <<\EOF
6673 #define NCURSES 1
6674 EOF
6675
6676 echo "$as_me:6676: checking for ncurses version" >&5
6677 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6678 if test "${cf_cv_ncurses_version+set}" = set; then
6679   echo $ECHO_N "(cached) $ECHO_C" >&6
6680 else
6681
6682         cf_cv_ncurses_version=no
6683         cf_tempfile=out$$
6684         rm -f $cf_tempfile
6685         if test "$cross_compiling" = yes; then
6686
6687         # This will not work if the preprocessor splits the line after the
6688         # Autoconf token.  The 'unproto' program does that.
6689         cat > conftest.$ac_ext <<EOF
6690 #include <${cf_cv_ncurses_header:-curses.h}>
6691 #undef Autoconf
6692 #ifdef NCURSES_VERSION
6693 Autoconf NCURSES_VERSION
6694 #else
6695 #ifdef __NCURSES_H
6696 Autoconf "old"
6697 #endif
6698 ;
6699 #endif
6700 EOF
6701         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6702         { (eval echo "$as_me:6702: \"$cf_try\"") >&5
6703   (eval $cf_try) 2>&5
6704   ac_status=$?
6705   echo "$as_me:6705: \$? = $ac_status" >&5
6706   (exit $ac_status); }
6707         if test -f conftest.out ; then
6708                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6709                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6710                 rm -f conftest.out
6711         fi
6712
6713 else
6714   cat >conftest.$ac_ext <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6717
6718 #include <${cf_cv_ncurses_header:-curses.h}>
6719 #include <stdio.h>
6720 int main()
6721 {
6722         FILE *fp = fopen("$cf_tempfile", "w");
6723 #ifdef NCURSES_VERSION
6724 # ifdef NCURSES_VERSION_PATCH
6725         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6726 # else
6727         fprintf(fp, "%s\n", NCURSES_VERSION);
6728 # endif
6729 #else
6730 # ifdef __NCURSES_H
6731         fprintf(fp, "old\n");
6732 # else
6733         make an error
6734 # endif
6735 #endif
6736         ${cf_cv_main_return:-return}(0);
6737 }
6738 _ACEOF
6739 rm -f conftest$ac_exeext
6740 if { (eval echo "$as_me:6740: \"$ac_link\"") >&5
6741   (eval $ac_link) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6745   { (eval echo "$as_me:6745: \"$ac_try\"") >&5
6746   (eval $ac_try) 2>&5
6747   ac_status=$?
6748   echo "$as_me:6748: \$? = $ac_status" >&5
6749   (exit $ac_status); }; }; then
6750
6751         cf_cv_ncurses_version=`cat $cf_tempfile`
6752 else
6753   echo "$as_me: program exited with status $ac_status" >&5
6754 echo "$as_me: failed program was:" >&5
6755 cat conftest.$ac_ext >&5
6756 fi
6757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6758 fi
6759         rm -f $cf_tempfile
6760
6761 fi
6762 echo "$as_me:6762: result: $cf_cv_ncurses_version" >&5
6763 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6764 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6765 #define NCURSES 1
6766 EOF
6767
6768 cf_nculib_root=ncurses
6769         # This works, except for the special case where we find gpm, but
6770         # ncurses is in a nonstandard location via $LIBS, and we really want
6771         # to link gpm.
6772 cf_ncurses_LIBS=""
6773 cf_ncurses_SAVE="$LIBS"
6774 echo "$as_me:6774: checking for Gpm_Open in -lgpm" >&5
6775 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6776 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6777   echo $ECHO_N "(cached) $ECHO_C" >&6
6778 else
6779   ac_check_lib_save_LIBS=$LIBS
6780 LIBS="-lgpm  $LIBS"
6781 cat >conftest.$ac_ext <<_ACEOF
6782 #line 6782 "configure"
6783 #include "confdefs.h"
6784
6785 /* Override any gcc2 internal prototype to avoid an error.  */
6786 #ifdef __cplusplus
6787 extern "C"
6788 #endif
6789 /* We use char because int might match the return type of a gcc2
6790    builtin and then its argument prototype would still apply.  */
6791 char Gpm_Open ();
6792 int
6793 main ()
6794 {
6795 Gpm_Open ();
6796   ;
6797   return 0;
6798 }
6799 _ACEOF
6800 rm -f conftest.$ac_objext conftest$ac_exeext
6801 if { (eval echo "$as_me:6801: \"$ac_link\"") >&5
6802   (eval $ac_link) 2>&5
6803   ac_status=$?
6804   echo "$as_me:6804: \$? = $ac_status" >&5
6805   (exit $ac_status); } &&
6806          { ac_try='test -s conftest$ac_exeext'
6807   { (eval echo "$as_me:6807: \"$ac_try\"") >&5
6808   (eval $ac_try) 2>&5
6809   ac_status=$?
6810   echo "$as_me:6810: \$? = $ac_status" >&5
6811   (exit $ac_status); }; }; then
6812   ac_cv_lib_gpm_Gpm_Open=yes
6813 else
6814   echo "$as_me: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6816 ac_cv_lib_gpm_Gpm_Open=no
6817 fi
6818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6819 LIBS=$ac_check_lib_save_LIBS
6820 fi
6821 echo "$as_me:6821: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6822 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6823 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6824   echo "$as_me:6824: checking for initscr in -lgpm" >&5
6825 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6826 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6827   echo $ECHO_N "(cached) $ECHO_C" >&6
6828 else
6829   ac_check_lib_save_LIBS=$LIBS
6830 LIBS="-lgpm  $LIBS"
6831 cat >conftest.$ac_ext <<_ACEOF
6832 #line 6832 "configure"
6833 #include "confdefs.h"
6834
6835 /* Override any gcc2 internal prototype to avoid an error.  */
6836 #ifdef __cplusplus
6837 extern "C"
6838 #endif
6839 /* We use char because int might match the return type of a gcc2
6840    builtin and then its argument prototype would still apply.  */
6841 char initscr ();
6842 int
6843 main ()
6844 {
6845 initscr ();
6846   ;
6847   return 0;
6848 }
6849 _ACEOF
6850 rm -f conftest.$ac_objext conftest$ac_exeext
6851 if { (eval echo "$as_me:6851: \"$ac_link\"") >&5
6852   (eval $ac_link) 2>&5
6853   ac_status=$?
6854   echo "$as_me:6854: \$? = $ac_status" >&5
6855   (exit $ac_status); } &&
6856          { ac_try='test -s conftest$ac_exeext'
6857   { (eval echo "$as_me:6857: \"$ac_try\"") >&5
6858   (eval $ac_try) 2>&5
6859   ac_status=$?
6860   echo "$as_me:6860: \$? = $ac_status" >&5
6861   (exit $ac_status); }; }; then
6862   ac_cv_lib_gpm_initscr=yes
6863 else
6864   echo "$as_me: failed program was:" >&5
6865 cat conftest.$ac_ext >&5
6866 ac_cv_lib_gpm_initscr=no
6867 fi
6868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6869 LIBS=$ac_check_lib_save_LIBS
6870 fi
6871 echo "$as_me:6871: result: $ac_cv_lib_gpm_initscr" >&5
6872 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6873 if test $ac_cv_lib_gpm_initscr = yes; then
6874   LIBS="$cf_ncurses_SAVE"
6875 else
6876   cf_ncurses_LIBS="-lgpm"
6877 fi
6878
6879 fi
6880
6881 case $host_os in #(vi
6882 freebsd*)
6883         # This is only necessary if you are linking against an obsolete
6884         # version of ncurses (but it should do no harm, since it's static).
6885         if test "$cf_nculib_root" = ncurses ; then
6886                 echo "$as_me:6886: checking for tgoto in -lmytinfo" >&5
6887 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6888 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6889   echo $ECHO_N "(cached) $ECHO_C" >&6
6890 else
6891   ac_check_lib_save_LIBS=$LIBS
6892 LIBS="-lmytinfo  $LIBS"
6893 cat >conftest.$ac_ext <<_ACEOF
6894 #line 6894 "configure"
6895 #include "confdefs.h"
6896
6897 /* Override any gcc2 internal prototype to avoid an error.  */
6898 #ifdef __cplusplus
6899 extern "C"
6900 #endif
6901 /* We use char because int might match the return type of a gcc2
6902    builtin and then its argument prototype would still apply.  */
6903 char tgoto ();
6904 int
6905 main ()
6906 {
6907 tgoto ();
6908   ;
6909   return 0;
6910 }
6911 _ACEOF
6912 rm -f conftest.$ac_objext conftest$ac_exeext
6913 if { (eval echo "$as_me:6913: \"$ac_link\"") >&5
6914   (eval $ac_link) 2>&5
6915   ac_status=$?
6916   echo "$as_me:6916: \$? = $ac_status" >&5
6917   (exit $ac_status); } &&
6918          { ac_try='test -s conftest$ac_exeext'
6919   { (eval echo "$as_me:6919: \"$ac_try\"") >&5
6920   (eval $ac_try) 2>&5
6921   ac_status=$?
6922   echo "$as_me:6922: \$? = $ac_status" >&5
6923   (exit $ac_status); }; }; then
6924   ac_cv_lib_mytinfo_tgoto=yes
6925 else
6926   echo "$as_me: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6928 ac_cv_lib_mytinfo_tgoto=no
6929 fi
6930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6931 LIBS=$ac_check_lib_save_LIBS
6932 fi
6933 echo "$as_me:6933: result: $ac_cv_lib_mytinfo_tgoto" >&5
6934 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6935 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6936   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6937 fi
6938
6939         fi
6940         ;;
6941 esac
6942
6943 LIBS="$cf_ncurses_LIBS $LIBS"
6944
6945 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6946 then
6947         LIBS="-l$cf_nculib_root $LIBS"
6948 else
6949
6950         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6951         cf_libdir=""
6952         echo "$as_me:6952: checking for initscr" >&5
6953 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6954 if test "${ac_cv_func_initscr+set}" = set; then
6955   echo $ECHO_N "(cached) $ECHO_C" >&6
6956 else
6957   cat >conftest.$ac_ext <<_ACEOF
6958 #line 6958 "configure"
6959 #include "confdefs.h"
6960 /* System header to define __stub macros and hopefully few prototypes,
6961     which can conflict with char initscr (); below.  */
6962 #include <assert.h>
6963 /* Override any gcc2 internal prototype to avoid an error.  */
6964 #ifdef __cplusplus
6965 extern "C"
6966 #endif
6967 /* We use char because int might match the return type of a gcc2
6968    builtin and then its argument prototype would still apply.  */
6969 char initscr ();
6970 char (*f) ();
6971
6972 int
6973 main ()
6974 {
6975 /* The GNU C library defines this for functions which it implements
6976     to always fail with ENOSYS.  Some functions are actually named
6977     something starting with __ and the normal name is an alias.  */
6978 #if defined (__stub_initscr) || defined (__stub___initscr)
6979 choke me
6980 #else
6981 f = initscr;
6982 #endif
6983
6984   ;
6985   return 0;
6986 }
6987 _ACEOF
6988 rm -f conftest.$ac_objext conftest$ac_exeext
6989 if { (eval echo "$as_me:6989: \"$ac_link\"") >&5
6990   (eval $ac_link) 2>&5
6991   ac_status=$?
6992   echo "$as_me:6992: \$? = $ac_status" >&5
6993   (exit $ac_status); } &&
6994          { ac_try='test -s conftest$ac_exeext'
6995   { (eval echo "$as_me:6995: \"$ac_try\"") >&5
6996   (eval $ac_try) 2>&5
6997   ac_status=$?
6998   echo "$as_me:6998: \$? = $ac_status" >&5
6999   (exit $ac_status); }; }; then
7000   ac_cv_func_initscr=yes
7001 else
7002   echo "$as_me: failed program was:" >&5
7003 cat conftest.$ac_ext >&5
7004 ac_cv_func_initscr=no
7005 fi
7006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7007 fi
7008 echo "$as_me:7008: result: $ac_cv_func_initscr" >&5
7009 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7010 if test $ac_cv_func_initscr = yes; then
7011   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7012 else
7013
7014                 cf_save_LIBS="$LIBS"
7015                 echo "$as_me:7015: checking for initscr in -l$cf_nculib_root" >&5
7016 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7017                 LIBS="-l$cf_nculib_root $LIBS"
7018                 cat >conftest.$ac_ext <<_ACEOF
7019 #line 7019 "configure"
7020 #include "confdefs.h"
7021 #include <${cf_cv_ncurses_header:-curses.h}>
7022 int
7023 main ()
7024 {
7025 initscr()
7026   ;
7027   return 0;
7028 }
7029 _ACEOF
7030 rm -f conftest.$ac_objext conftest$ac_exeext
7031 if { (eval echo "$as_me:7031: \"$ac_link\"") >&5
7032   (eval $ac_link) 2>&5
7033   ac_status=$?
7034   echo "$as_me:7034: \$? = $ac_status" >&5
7035   (exit $ac_status); } &&
7036          { ac_try='test -s conftest$ac_exeext'
7037   { (eval echo "$as_me:7037: \"$ac_try\"") >&5
7038   (eval $ac_try) 2>&5
7039   ac_status=$?
7040   echo "$as_me:7040: \$? = $ac_status" >&5
7041   (exit $ac_status); }; }; then
7042   echo "$as_me:7042: result: yes" >&5
7043 echo "${ECHO_T}yes" >&6
7044                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7045
7046 else
7047   echo "$as_me: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 echo "$as_me:7049: result: no" >&5
7050 echo "${ECHO_T}no" >&6
7051
7052 cf_search=
7053 cf_library_path_list=""
7054 if test -n "${LDFLAGS}${LIBS}" ; then
7055         for cf_library_path in $LDFLAGS $LIBS
7056         do
7057                 case $cf_library_path in #(vi
7058                 -L*)
7059                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7060
7061 test "$cf_library_path" != "NONE" && \
7062 test -d "$cf_library_path" && \
7063  {
7064         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7065         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7066         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7067         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7068         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7069         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"
7070 }
7071
7072                         cf_library_path_list="$cf_library_path_list $cf_search"
7073                         ;;
7074                 esac
7075         done
7076 fi
7077
7078 cf_search=
7079
7080 test "/usr" != "$prefix" && \
7081 test -d "/usr" && \
7082 (test $prefix = NONE || test "/usr" != "$prefix") && {
7083         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7084         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7085         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7086         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7087         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7088         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7089 }
7090
7091 test "$prefix" != "NONE" && \
7092 test -d "$prefix" && \
7093  {
7094         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7095         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7096         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7097         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7098         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7099         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7100 }
7101
7102 test "/usr/local" != "$prefix" && \
7103 test -d "/usr/local" && \
7104 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7105         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7106         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7107         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7108         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7109         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7110         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7111 }
7112
7113 test "/opt" != "$prefix" && \
7114 test -d "/opt" && \
7115 (test $prefix = NONE || test "/opt" != "$prefix") && {
7116         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7117         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7118         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7119         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7120         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7121         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7122 }
7123
7124 test "$HOME" != "$prefix" && \
7125 test -d "$HOME" && \
7126 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7127         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7128         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7129         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7130         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7131         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7132         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7133 }
7134
7135 cf_search="$cf_library_path_list $cf_search"
7136
7137                         for cf_libdir in $cf_search
7138                         do
7139                                 echo "$as_me:7139: checking for -l$cf_nculib_root in $cf_libdir" >&5
7140 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7141                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7142                                 cat >conftest.$ac_ext <<_ACEOF
7143 #line 7143 "configure"
7144 #include "confdefs.h"
7145 #include <${cf_cv_ncurses_header:-curses.h}>
7146 int
7147 main ()
7148 {
7149 initscr()
7150   ;
7151   return 0;
7152 }
7153 _ACEOF
7154 rm -f conftest.$ac_objext conftest$ac_exeext
7155 if { (eval echo "$as_me:7155: \"$ac_link\"") >&5
7156   (eval $ac_link) 2>&5
7157   ac_status=$?
7158   echo "$as_me:7158: \$? = $ac_status" >&5
7159   (exit $ac_status); } &&
7160          { ac_try='test -s conftest$ac_exeext'
7161   { (eval echo "$as_me:7161: \"$ac_try\"") >&5
7162   (eval $ac_try) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); }; }; then
7166   echo "$as_me:7166: result: yes" >&5
7167 echo "${ECHO_T}yes" >&6
7168                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7169                                          break
7170 else
7171   echo "$as_me: failed program was:" >&5
7172 cat conftest.$ac_ext >&5
7173 echo "$as_me:7173: result: no" >&5
7174 echo "${ECHO_T}no" >&6
7175                                          LIBS="$cf_save_LIBS"
7176 fi
7177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7178                         done
7179
7180 fi
7181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7182
7183 fi
7184
7185 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7186
7187 if test $cf_found_library = no ; then
7188         { { echo "$as_me:7188: error: Cannot link $cf_nculib_root library" >&5
7189 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7190    { (exit 1); exit 1; }; }
7191 fi
7192
7193 fi
7194
7195 if test -n "$cf_ncurses_LIBS" ; then
7196         echo "$as_me:7196: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7197 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7198         cf_ncurses_SAVE="$LIBS"
7199         for p in $cf_ncurses_LIBS ; do
7200                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7201                 if test "$q" != "$LIBS" ; then
7202                         LIBS="$q"
7203                 fi
7204         done
7205         cat >conftest.$ac_ext <<_ACEOF
7206 #line 7206 "configure"
7207 #include "confdefs.h"
7208 #include <${cf_cv_ncurses_header:-curses.h}>
7209 int
7210 main ()
7211 {
7212 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7213   ;
7214   return 0;
7215 }
7216 _ACEOF
7217 rm -f conftest.$ac_objext conftest$ac_exeext
7218 if { (eval echo "$as_me:7218: \"$ac_link\"") >&5
7219   (eval $ac_link) 2>&5
7220   ac_status=$?
7221   echo "$as_me:7221: \$? = $ac_status" >&5
7222   (exit $ac_status); } &&
7223          { ac_try='test -s conftest$ac_exeext'
7224   { (eval echo "$as_me:7224: \"$ac_try\"") >&5
7225   (eval $ac_try) 2>&5
7226   ac_status=$?
7227   echo "$as_me:7227: \$? = $ac_status" >&5
7228   (exit $ac_status); }; }; then
7229   echo "$as_me:7229: result: yes" >&5
7230 echo "${ECHO_T}yes" >&6
7231 else
7232   echo "$as_me: failed program was:" >&5
7233 cat conftest.$ac_ext >&5
7234 echo "$as_me:7234: result: no" >&5
7235 echo "${ECHO_T}no" >&6
7236                  LIBS="$cf_ncurses_SAVE"
7237 fi
7238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7239 fi
7240
7241 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7242
7243 cat >>confdefs.h <<EOF
7244 #define $cf_nculib_ROOT 1
7245 EOF
7246
7247 fi
7248
7249         ;;
7250 ncursesw)
7251         cf_cv_libtype=w
7252
7253 echo "$as_me:7253: checking for multibyte character support" >&5
7254 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7255 if test "${cf_cv_utf8_lib+set}" = set; then
7256   echo $ECHO_N "(cached) $ECHO_C" >&6
7257 else
7258
7259         cf_save_LIBS="$LIBS"
7260         cat >conftest.$ac_ext <<_ACEOF
7261 #line 7261 "configure"
7262 #include "confdefs.h"
7263
7264 #include <stdlib.h>
7265 int
7266 main ()
7267 {
7268 putwc(0,0);
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 rm -f conftest.$ac_objext conftest$ac_exeext
7274 if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
7275   (eval $ac_link) 2>&5
7276   ac_status=$?
7277   echo "$as_me:7277: \$? = $ac_status" >&5
7278   (exit $ac_status); } &&
7279          { ac_try='test -s conftest$ac_exeext'
7280   { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281   (eval $ac_try) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit $ac_status); }; }; then
7285   cf_cv_utf8_lib=yes
7286 else
7287   echo "$as_me: failed program was:" >&5
7288 cat conftest.$ac_ext >&5
7289
7290 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7291 # will be set on completion of the AC_TRY_LINK below.
7292 cf_cv_header_path_utf8=
7293 cf_cv_library_path_utf8=
7294
7295 echo "${as_me:-configure}:7295: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7296
7297 cf_save_LIBS="$LIBS"
7298
7299 cat >conftest.$ac_ext <<_ACEOF
7300 #line 7300 "configure"
7301 #include "confdefs.h"
7302
7303 #include <libutf8.h>
7304 int
7305 main ()
7306 {
7307 putwc(0,0);
7308   ;
7309   return 0;
7310 }
7311 _ACEOF
7312 rm -f conftest.$ac_objext conftest$ac_exeext
7313 if { (eval echo "$as_me:7313: \"$ac_link\"") >&5
7314   (eval $ac_link) 2>&5
7315   ac_status=$?
7316   echo "$as_me:7316: \$? = $ac_status" >&5
7317   (exit $ac_status); } &&
7318          { ac_try='test -s conftest$ac_exeext'
7319   { (eval echo "$as_me:7319: \"$ac_try\"") >&5
7320   (eval $ac_try) 2>&5
7321   ac_status=$?
7322   echo "$as_me:7322: \$? = $ac_status" >&5
7323   (exit $ac_status); }; }; then
7324
7325         cf_cv_find_linkage_utf8=yes
7326         cf_cv_header_path_utf8=/usr/include
7327         cf_cv_library_path_utf8=/usr/lib
7328
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332
7333 LIBS="-lutf8  $cf_save_LIBS"
7334
7335 cat >conftest.$ac_ext <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338
7339 #include <libutf8.h>
7340 int
7341 main ()
7342 {
7343 putwc(0,0);
7344   ;
7345   return 0;
7346 }
7347 _ACEOF
7348 rm -f conftest.$ac_objext conftest$ac_exeext
7349 if { (eval echo "$as_me:7349: \"$ac_link\"") >&5
7350   (eval $ac_link) 2>&5
7351   ac_status=$?
7352   echo "$as_me:7352: \$? = $ac_status" >&5
7353   (exit $ac_status); } &&
7354          { ac_try='test -s conftest$ac_exeext'
7355   { (eval echo "$as_me:7355: \"$ac_try\"") >&5
7356   (eval $ac_try) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); }; }; then
7360
7361         cf_cv_find_linkage_utf8=yes
7362         cf_cv_header_path_utf8=/usr/include
7363         cf_cv_library_path_utf8=/usr/lib
7364         cf_cv_library_file_utf8="-lutf8"
7365
7366 else
7367   echo "$as_me: failed program was:" >&5
7368 cat conftest.$ac_ext >&5
7369
7370         cf_cv_find_linkage_utf8=no
7371         LIBS="$cf_save_LIBS"
7372
7373     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7374
7375 echo "${as_me:-configure}:7375: testing find linkage for utf8 library ..." 1>&5
7376
7377 echo "${as_me:-configure}:7377: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7378
7379     cf_save_CPPFLAGS="$CPPFLAGS"
7380     cf_test_CPPFLAGS="$CPPFLAGS"
7381
7382 cf_search=
7383
7384 # collect the current set of include-directories from compiler flags
7385 cf_header_path_list=""
7386 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7387         for cf_header_path in $CPPFLAGS $CFLAGS
7388         do
7389                 case $cf_header_path in #(vi
7390                 -I*)
7391                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7392
7393 test "$cf_header_path" != "NONE" && \
7394 test -d "$cf_header_path" && \
7395  {
7396         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7397         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7398         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7399         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7400         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7401         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7402 }
7403
7404                         cf_header_path_list="$cf_header_path_list $cf_search"
7405                         ;;
7406                 esac
7407         done
7408 fi
7409
7410 # add the variations for the package we are looking for
7411
7412 cf_search=
7413
7414 test "/usr" != "$prefix" && \
7415 test -d "/usr" && \
7416 (test $prefix = NONE || test "/usr" != "$prefix") && {
7417         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7418         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7419         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7420         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7421         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7422         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7423 }
7424
7425 test "$prefix" != "NONE" && \
7426 test -d "$prefix" && \
7427  {
7428         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7429         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7430         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7431         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7432         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7433         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7434 }
7435
7436 test "/usr/local" != "$prefix" && \
7437 test -d "/usr/local" && \
7438 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7439         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7440         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7441         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7442         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7443         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7444         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7445 }
7446
7447 test "/opt" != "$prefix" && \
7448 test -d "/opt" && \
7449 (test $prefix = NONE || test "/opt" != "$prefix") && {
7450         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7451         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7452         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7453         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7454         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7455         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7456 }
7457
7458 test "$HOME" != "$prefix" && \
7459 test -d "$HOME" && \
7460 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7461         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7462         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7463         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7464         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7465         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7466         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7467 }
7468
7469 test "$includedir" != NONE && \
7470 test "$includedir" != "/usr/include" && \
7471 test -d "$includedir" && {
7472         test -d $includedir &&    cf_search="$cf_search $includedir"
7473         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7474 }
7475
7476 test "$oldincludedir" != NONE && \
7477 test "$oldincludedir" != "/usr/include" && \
7478 test -d "$oldincludedir" && {
7479         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7480         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7481 }
7482
7483 cf_search="$cf_search $cf_header_path_list"
7484
7485     for cf_cv_header_path_utf8 in $cf_search
7486     do
7487       if test -d $cf_cv_header_path_utf8 ; then
7488         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7489
7490 echo "${as_me:-configure}:7490: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7491
7492         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7493         cat >conftest.$ac_ext <<_ACEOF
7494 #line 7494 "configure"
7495 #include "confdefs.h"
7496
7497 #include <libutf8.h>
7498 int
7499 main ()
7500 {
7501 putwc(0,0);
7502   ;
7503   return 0;
7504 }
7505 _ACEOF
7506 rm -f conftest.$ac_objext
7507 if { (eval echo "$as_me:7507: \"$ac_compile\"") >&5
7508   (eval $ac_compile) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); } &&
7512          { ac_try='test -s conftest.$ac_objext'
7513   { (eval echo "$as_me:7513: \"$ac_try\"") >&5
7514   (eval $ac_try) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); }; }; then
7518
7519             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7520
7521 echo "${as_me:-configure}:7521: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7522
7523             cf_cv_find_linkage_utf8=maybe
7524             cf_test_CPPFLAGS="$CPPFLAGS"
7525             break
7526 else
7527   echo "$as_me: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7529
7530             CPPFLAGS="$cf_save_CPPFLAGS"
7531
7532 fi
7533 rm -f conftest.$ac_objext conftest.$ac_ext
7534       fi
7535     done
7536
7537     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7538
7539 echo "${as_me:-configure}:7539: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7540
7541       cf_save_LIBS="$LIBS"
7542       cf_save_LDFLAGS="$LDFLAGS"
7543
7544       if test "$cf_cv_find_linkage_utf8" != yes ; then
7545
7546 cf_search=
7547 cf_library_path_list=""
7548 if test -n "${LDFLAGS}${LIBS}" ; then
7549         for cf_library_path in $LDFLAGS $LIBS
7550         do
7551                 case $cf_library_path in #(vi
7552                 -L*)
7553                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7554
7555 test "$cf_library_path" != "NONE" && \
7556 test -d "$cf_library_path" && \
7557  {
7558         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7559         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7560         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7561         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7562         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7563         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7564 }
7565
7566                         cf_library_path_list="$cf_library_path_list $cf_search"
7567                         ;;
7568                 esac
7569         done
7570 fi
7571
7572 cf_search=
7573
7574 test "/usr" != "$prefix" && \
7575 test -d "/usr" && \
7576 (test $prefix = NONE || test "/usr" != "$prefix") && {
7577         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7578         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7579         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7580         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7581         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7582         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7583 }
7584
7585 test "$prefix" != "NONE" && \
7586 test -d "$prefix" && \
7587  {
7588         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7589         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7590         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7591         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7592         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7593         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7594 }
7595
7596 test "/usr/local" != "$prefix" && \
7597 test -d "/usr/local" && \
7598 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7599         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7600         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7601         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7602         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7603         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7604         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7605 }
7606
7607 test "/opt" != "$prefix" && \
7608 test -d "/opt" && \
7609 (test $prefix = NONE || test "/opt" != "$prefix") && {
7610         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7611         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7612         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7613         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7614         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7615         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7616 }
7617
7618 test "$HOME" != "$prefix" && \
7619 test -d "$HOME" && \
7620 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7621         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7622         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7623         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7624         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7625         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7626         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7627 }
7628
7629 cf_search="$cf_library_path_list $cf_search"
7630
7631         for cf_cv_library_path_utf8 in $cf_search
7632         do
7633           if test -d $cf_cv_library_path_utf8 ; then
7634             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7635
7636 echo "${as_me:-configure}:7636: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7637
7638             CPPFLAGS="$cf_test_CPPFLAGS"
7639             LIBS="-lutf8  $cf_save_LIBS"
7640             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7641             cat >conftest.$ac_ext <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644
7645 #include <libutf8.h>
7646 int
7647 main ()
7648 {
7649 putwc(0,0);
7650   ;
7651   return 0;
7652 }
7653 _ACEOF
7654 rm -f conftest.$ac_objext conftest$ac_exeext
7655 if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
7656   (eval $ac_link) 2>&5
7657   ac_status=$?
7658   echo "$as_me:7658: \$? = $ac_status" >&5
7659   (exit $ac_status); } &&
7660          { ac_try='test -s conftest$ac_exeext'
7661   { (eval echo "$as_me:7661: \"$ac_try\"") >&5
7662   (eval $ac_try) 2>&5
7663   ac_status=$?
7664   echo "$as_me:7664: \$? = $ac_status" >&5
7665   (exit $ac_status); }; }; then
7666
7667                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7668
7669 echo "${as_me:-configure}:7669: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7670
7671                 cf_cv_find_linkage_utf8=yes
7672                 cf_cv_library_file_utf8="-lutf8"
7673                 break
7674 else
7675   echo "$as_me: failed program was:" >&5
7676 cat conftest.$ac_ext >&5
7677
7678                 CPPFLAGS="$cf_save_CPPFLAGS"
7679                 LIBS="$cf_save_LIBS"
7680                 LDFLAGS="$cf_save_LDFLAGS"
7681
7682 fi
7683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684           fi
7685         done
7686         CPPFLAGS="$cf_save_CPPFLAGS"
7687         LDFLAGS="$cf_save_LDFLAGS"
7688       fi
7689
7690     else
7691       cf_cv_find_linkage_utf8=no
7692     fi
7693
7694 fi
7695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7696
7697 fi
7698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7699
7700 LIBS="$cf_save_LIBS"
7701
7702 if test "$cf_cv_find_linkage_utf8" = yes ; then
7703 cf_cv_utf8_lib=add-on
7704 else
7705 cf_cv_utf8_lib=no
7706 fi
7707
7708 fi
7709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7710 fi
7711 echo "$as_me:7711: result: $cf_cv_utf8_lib" >&5
7712 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7713
7714 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7715 # ncurses/ncursesw:
7716 if test "$cf_cv_utf8_lib" = "add-on" ; then
7717         cat >>confdefs.h <<\EOF
7718 #define HAVE_LIBUTF8_H 1
7719 EOF
7720
7721 if test -n "$cf_cv_header_path_utf8" ; then
7722   for cf_add_incdir in $cf_cv_header_path_utf8
7723   do
7724         while test $cf_add_incdir != /usr/include
7725         do
7726           if test -d $cf_add_incdir
7727           then
7728                 cf_have_incdir=no
7729                 if test -n "$CFLAGS$CPPFLAGS" ; then
7730                   # a loop is needed to ensure we can add subdirs of existing dirs
7731                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7732                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7733                           cf_have_incdir=yes; break
7734                         fi
7735                   done
7736                 fi
7737
7738                 if test "$cf_have_incdir" = no ; then
7739                   if test "$cf_add_incdir" = /usr/local/include ; then
7740                         if test "$GCC" = yes
7741                         then
7742                           cf_save_CPPFLAGS=$CPPFLAGS
7743                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7744                           cat >conftest.$ac_ext <<_ACEOF
7745 #line 7745 "configure"
7746 #include "confdefs.h"
7747 #include <stdio.h>
7748 int
7749 main ()
7750 {
7751 printf("Hello")
7752   ;
7753   return 0;
7754 }
7755 _ACEOF
7756 rm -f conftest.$ac_objext
7757 if { (eval echo "$as_me:7757: \"$ac_compile\"") >&5
7758   (eval $ac_compile) 2>&5
7759   ac_status=$?
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); } &&
7762          { ac_try='test -s conftest.$ac_objext'
7763   { (eval echo "$as_me:7763: \"$ac_try\"") >&5
7764   (eval $ac_try) 2>&5
7765   ac_status=$?
7766   echo "$as_me:7766: \$? = $ac_status" >&5
7767   (exit $ac_status); }; }; then
7768   :
7769 else
7770   echo "$as_me: failed program was:" >&5
7771 cat conftest.$ac_ext >&5
7772 cf_have_incdir=yes
7773 fi
7774 rm -f conftest.$ac_objext conftest.$ac_ext
7775                           CPPFLAGS=$cf_save_CPPFLAGS
7776                         fi
7777                   fi
7778                 fi
7779
7780                 if test "$cf_have_incdir" = no ; then
7781                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7782
7783 echo "${as_me:-configure}:7783: testing adding $cf_add_incdir to include-path ..." 1>&5
7784
7785                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7786
7787                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7788                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7789                   cf_add_incdir="$cf_top_incdir"
7790                 else
7791                   break
7792                 fi
7793           fi
7794         done
7795   done
7796 fi
7797
7798 if test -n "$cf_cv_library_path_utf8" ; then
7799   for cf_add_libdir in $cf_cv_library_path_utf8
7800   do
7801     if test $cf_add_libdir = /usr/lib ; then
7802       :
7803     elif test -d $cf_add_libdir
7804     then
7805       cf_have_libdir=no
7806       if test -n "$LDFLAGS$LIBS" ; then
7807         # a loop is needed to ensure we can add subdirs of existing dirs
7808         for cf_test_libdir in $LDFLAGS $LIBS ; do
7809           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7810             cf_have_libdir=yes; break
7811           fi
7812         done
7813       fi
7814       if test "$cf_have_libdir" = no ; then
7815         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7816
7817 echo "${as_me:-configure}:7817: testing adding $cf_add_libdir to library-path ..." 1>&5
7818
7819         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7820       fi
7821     fi
7822   done
7823 fi
7824
7825         LIBS="$cf_cv_library_file_utf8 $LIBS"
7826 fi
7827
7828 cf_ncuconfig_root=ncursesw
7829
7830 echo "Looking for ${cf_ncuconfig_root}-config"
7831 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7832 do
7833   # Extract the first word of "$ac_prog", so it can be a program name with args.
7834 set dummy $ac_prog; ac_word=$2
7835 echo "$as_me:7835: checking for $ac_word" >&5
7836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7837 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
7838   echo $ECHO_N "(cached) $ECHO_C" >&6
7839 else
7840   case $NCURSES_CONFIG in
7841   [\\/]* | ?:[\\/]*)
7842   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
7843   ;;
7844   *)
7845   ac_save_IFS=$IFS; IFS=$ac_path_separator
7846 ac_dummy="$PATH"
7847 for ac_dir in $ac_dummy; do
7848   IFS=$ac_save_IFS
7849   test -z "$ac_dir" && ac_dir=.
7850   if $as_executable_p "$ac_dir/$ac_word"; then
7851    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
7852    echo "$as_me:7852: found $ac_dir/$ac_word" >&5
7853    break
7854 fi
7855 done
7856
7857   ;;
7858 esac
7859 fi
7860 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
7861
7862 if test -n "$NCURSES_CONFIG"; then
7863   echo "$as_me:7863: result: $NCURSES_CONFIG" >&5
7864 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7865 else
7866   echo "$as_me:7866: result: no" >&5
7867 echo "${ECHO_T}no" >&6
7868 fi
7869
7870   test -n "$NCURSES_CONFIG" && break
7871 done
7872 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
7873
7874 if test "$NCURSES_CONFIG" != none ; then
7875
7876 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7877 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
7878
7879 # even with config script, some packages use no-override for curses.h
7880
7881 echo "$as_me:7881: checking if we have identified curses headers" >&5
7882 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7883 if test "${cf_cv_ncurses_header+set}" = set; then
7884   echo $ECHO_N "(cached) $ECHO_C" >&6
7885 else
7886
7887 cf_cv_ncurses_header=none
7888 for cf_header in  \
7889     ncursesw/curses.h \
7890         ncursesw/ncurses.h \
7891         curses.h \
7892         ncurses.h
7893 do
7894 cat >conftest.$ac_ext <<_ACEOF
7895 #line 7895 "configure"
7896 #include "confdefs.h"
7897 #include <${cf_header}>
7898 int
7899 main ()
7900 {
7901 initscr(); tgoto("?", 0,0)
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 rm -f conftest.$ac_objext
7907 if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
7908   (eval $ac_compile) 2>&5
7909   ac_status=$?
7910   echo "$as_me:7910: \$? = $ac_status" >&5
7911   (exit $ac_status); } &&
7912          { ac_try='test -s conftest.$ac_objext'
7913   { (eval echo "$as_me:7913: \"$ac_try\"") >&5
7914   (eval $ac_try) 2>&5
7915   ac_status=$?
7916   echo "$as_me:7916: \$? = $ac_status" >&5
7917   (exit $ac_status); }; }; then
7918   cf_cv_ncurses_header=$cf_header; break
7919 else
7920   echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922 fi
7923 rm -f conftest.$ac_objext conftest.$ac_ext
7924 done
7925
7926 fi
7927 echo "$as_me:7927: result: $cf_cv_ncurses_header" >&5
7928 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7929
7930 if test "$cf_cv_ncurses_header" = none ; then
7931         { { echo "$as_me:7931: error: No curses header-files found" >&5
7932 echo "$as_me: error: No curses header-files found" >&2;}
7933    { (exit 1); exit 1; }; }
7934 fi
7935
7936 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7937
7938 for ac_header in $cf_cv_ncurses_header
7939 do
7940 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7941 echo "$as_me:7941: checking for $ac_header" >&5
7942 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7943 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7944   echo $ECHO_N "(cached) $ECHO_C" >&6
7945 else
7946   cat >conftest.$ac_ext <<_ACEOF
7947 #line 7947 "configure"
7948 #include "confdefs.h"
7949 #include <$ac_header>
7950 _ACEOF
7951 if { (eval echo "$as_me:7951: \"$ac_cpp conftest.$ac_ext\"") >&5
7952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7953   ac_status=$?
7954   egrep -v '^ *\+' conftest.er1 >conftest.err
7955   rm -f conftest.er1
7956   cat conftest.err >&5
7957   echo "$as_me:7957: \$? = $ac_status" >&5
7958   (exit $ac_status); } >/dev/null; then
7959   if test -s conftest.err; then
7960     ac_cpp_err=$ac_c_preproc_warn_flag
7961   else
7962     ac_cpp_err=
7963   fi
7964 else
7965   ac_cpp_err=yes
7966 fi
7967 if test -z "$ac_cpp_err"; then
7968   eval "$as_ac_Header=yes"
7969 else
7970   echo "$as_me: failed program was:" >&5
7971   cat conftest.$ac_ext >&5
7972   eval "$as_ac_Header=no"
7973 fi
7974 rm -f conftest.err conftest.$ac_ext
7975 fi
7976 echo "$as_me:7976: result: `eval echo '${'$as_ac_Header'}'`" >&5
7977 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7978 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7979   cat >>confdefs.h <<EOF
7980 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7981 EOF
7982
7983 fi
7984 done
7985
7986 cat >>confdefs.h <<\EOF
7987 #define NCURSES 1
7988 EOF
7989
7990 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7991
7992 cat >>confdefs.h <<EOF
7993 #define $cf_nculib_ROOT 1
7994 EOF
7995
7996 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7997
7998 else
7999
8000 cf_ncuhdr_root=ncursesw
8001
8002 test -n "$cf_cv_curses_dir" && \
8003 test "$cf_cv_curses_dir" != "no" && { \
8004
8005 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8006   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8007   do
8008         while test $cf_add_incdir != /usr/include
8009         do
8010           if test -d $cf_add_incdir
8011           then
8012                 cf_have_incdir=no
8013                 if test -n "$CFLAGS$CPPFLAGS" ; then
8014                   # a loop is needed to ensure we can add subdirs of existing dirs
8015                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8016                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8017                           cf_have_incdir=yes; break
8018                         fi
8019                   done
8020                 fi
8021
8022                 if test "$cf_have_incdir" = no ; then
8023                   if test "$cf_add_incdir" = /usr/local/include ; then
8024                         if test "$GCC" = yes
8025                         then
8026                           cf_save_CPPFLAGS=$CPPFLAGS
8027                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8028                           cat >conftest.$ac_ext <<_ACEOF
8029 #line 8029 "configure"
8030 #include "confdefs.h"
8031 #include <stdio.h>
8032 int
8033 main ()
8034 {
8035 printf("Hello")
8036   ;
8037   return 0;
8038 }
8039 _ACEOF
8040 rm -f conftest.$ac_objext
8041 if { (eval echo "$as_me:8041: \"$ac_compile\"") >&5
8042   (eval $ac_compile) 2>&5
8043   ac_status=$?
8044   echo "$as_me:8044: \$? = $ac_status" >&5
8045   (exit $ac_status); } &&
8046          { ac_try='test -s conftest.$ac_objext'
8047   { (eval echo "$as_me:8047: \"$ac_try\"") >&5
8048   (eval $ac_try) 2>&5
8049   ac_status=$?
8050   echo "$as_me:8050: \$? = $ac_status" >&5
8051   (exit $ac_status); }; }; then
8052   :
8053 else
8054   echo "$as_me: failed program was:" >&5
8055 cat conftest.$ac_ext >&5
8056 cf_have_incdir=yes
8057 fi
8058 rm -f conftest.$ac_objext conftest.$ac_ext
8059                           CPPFLAGS=$cf_save_CPPFLAGS
8060                         fi
8061                   fi
8062                 fi
8063
8064                 if test "$cf_have_incdir" = no ; then
8065                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8066
8067 echo "${as_me:-configure}:8067: testing adding $cf_add_incdir to include-path ..." 1>&5
8068
8069                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8070
8071                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8072                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8073                   cf_add_incdir="$cf_top_incdir"
8074                 else
8075                   break
8076                 fi
8077           fi
8078         done
8079   done
8080 fi
8081
8082 }
8083
8084 echo "$as_me:8084: checking for $cf_ncuhdr_root header in include-path" >&5
8085 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8086 if test "${cf_cv_ncurses_h+set}" = set; then
8087   echo $ECHO_N "(cached) $ECHO_C" >&6
8088 else
8089
8090         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8091         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8092         for cf_header in $cf_header_list
8093         do
8094
8095         cat >conftest.$ac_ext <<_ACEOF
8096 #line 8096 "configure"
8097 #include "confdefs.h"
8098
8099 #define _XOPEN_SOURCE_EXTENDED
8100 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
8101 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
8102
8103 #include <$cf_header>
8104 int
8105 main ()
8106 {
8107
8108 #ifdef NCURSES_VERSION
8109
8110 #ifndef WACS_BSSB
8111         make an error
8112 #endif
8113
8114 printf("%s\n", NCURSES_VERSION);
8115 #else
8116 #ifdef __NCURSES_H
8117 printf("old\n");
8118 #else
8119         make an error
8120 #endif
8121 #endif
8122
8123   ;
8124   return 0;
8125 }
8126 _ACEOF
8127 rm -f conftest.$ac_objext
8128 if { (eval echo "$as_me:8128: \"$ac_compile\"") >&5
8129   (eval $ac_compile) 2>&5
8130   ac_status=$?
8131   echo "$as_me:8131: \$? = $ac_status" >&5
8132   (exit $ac_status); } &&
8133          { ac_try='test -s conftest.$ac_objext'
8134   { (eval echo "$as_me:8134: \"$ac_try\"") >&5
8135   (eval $ac_try) 2>&5
8136   ac_status=$?
8137   echo "$as_me:8137: \$? = $ac_status" >&5
8138   (exit $ac_status); }; }; then
8139   cf_cv_ncurses_h=$cf_header
8140
8141 else
8142   echo "$as_me: failed program was:" >&5
8143 cat conftest.$ac_ext >&5
8144 cf_cv_ncurses_h=no
8145 fi
8146 rm -f conftest.$ac_objext conftest.$ac_ext
8147
8148                 test "$cf_cv_ncurses_h" != no && break
8149         done
8150
8151 fi
8152 echo "$as_me:8152: result: $cf_cv_ncurses_h" >&5
8153 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8154
8155 if test "$cf_cv_ncurses_h" != no ; then
8156         cf_cv_ncurses_header=$cf_cv_ncurses_h
8157 else
8158
8159 echo "$as_me:8159: checking for $cf_ncuhdr_root include-path" >&5
8160 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8161 if test "${cf_cv_ncurses_h2+set}" = set; then
8162   echo $ECHO_N "(cached) $ECHO_C" >&6
8163 else
8164
8165         test -n "$verbose" && echo
8166
8167 cf_search=
8168
8169 # collect the current set of include-directories from compiler flags
8170 cf_header_path_list=""
8171 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8172         for cf_header_path in $CPPFLAGS $CFLAGS
8173         do
8174                 case $cf_header_path in #(vi
8175                 -I*)
8176                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8177
8178 test "$cf_header_path" != "NONE" && \
8179 test -d "$cf_header_path" && \
8180  {
8181         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8182         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8183         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8184         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8185         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8186         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"
8187 }
8188
8189                         cf_header_path_list="$cf_header_path_list $cf_search"
8190                         ;;
8191                 esac
8192         done
8193 fi
8194
8195 # add the variations for the package we are looking for
8196
8197 cf_search=
8198
8199 test "/usr" != "$prefix" && \
8200 test -d "/usr" && \
8201 (test $prefix = NONE || test "/usr" != "$prefix") && {
8202         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8203         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8204         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8205         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8206         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8207         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8208 }
8209
8210 test "$prefix" != "NONE" && \
8211 test -d "$prefix" && \
8212  {
8213         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8214         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8215         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8216         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8217         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8218         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8219 }
8220
8221 test "/usr/local" != "$prefix" && \
8222 test -d "/usr/local" && \
8223 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8224         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8225         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8226         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8227         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8228         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8229         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8230 }
8231
8232 test "/opt" != "$prefix" && \
8233 test -d "/opt" && \
8234 (test $prefix = NONE || test "/opt" != "$prefix") && {
8235         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8236         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8237         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8238         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8239         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8240         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8241 }
8242
8243 test "$HOME" != "$prefix" && \
8244 test -d "$HOME" && \
8245 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8246         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8247         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8248         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8249         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8250         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8251         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8252 }
8253
8254 test "$includedir" != NONE && \
8255 test "$includedir" != "/usr/include" && \
8256 test -d "$includedir" && {
8257         test -d $includedir &&    cf_search="$cf_search $includedir"
8258         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8259 }
8260
8261 test "$oldincludedir" != NONE && \
8262 test "$oldincludedir" != "/usr/include" && \
8263 test -d "$oldincludedir" && {
8264         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8265         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8266 }
8267
8268 cf_search="$cf_search $cf_header_path_list"
8269
8270         test -n "$verbose" && echo search path $cf_search
8271         cf_save2_CPPFLAGS="$CPPFLAGS"
8272         for cf_incdir in $cf_search
8273         do
8274
8275 if test -n "$cf_incdir" ; then
8276   for cf_add_incdir in $cf_incdir
8277   do
8278         while test $cf_add_incdir != /usr/include
8279         do
8280           if test -d $cf_add_incdir
8281           then
8282                 cf_have_incdir=no
8283                 if test -n "$CFLAGS$CPPFLAGS" ; then
8284                   # a loop is needed to ensure we can add subdirs of existing dirs
8285                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8286                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8287                           cf_have_incdir=yes; break
8288                         fi
8289                   done
8290                 fi
8291
8292                 if test "$cf_have_incdir" = no ; then
8293                   if test "$cf_add_incdir" = /usr/local/include ; then
8294                         if test "$GCC" = yes
8295                         then
8296                           cf_save_CPPFLAGS=$CPPFLAGS
8297                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8298                           cat >conftest.$ac_ext <<_ACEOF
8299 #line 8299 "configure"
8300 #include "confdefs.h"
8301 #include <stdio.h>
8302 int
8303 main ()
8304 {
8305 printf("Hello")
8306   ;
8307   return 0;
8308 }
8309 _ACEOF
8310 rm -f conftest.$ac_objext
8311 if { (eval echo "$as_me:8311: \"$ac_compile\"") >&5
8312   (eval $ac_compile) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); } &&
8316          { ac_try='test -s conftest.$ac_objext'
8317   { (eval echo "$as_me:8317: \"$ac_try\"") >&5
8318   (eval $ac_try) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); }; }; then
8322   :
8323 else
8324   echo "$as_me: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 cf_have_incdir=yes
8327 fi
8328 rm -f conftest.$ac_objext conftest.$ac_ext
8329                           CPPFLAGS=$cf_save_CPPFLAGS
8330                         fi
8331                   fi
8332                 fi
8333
8334                 if test "$cf_have_incdir" = no ; then
8335                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8336
8337 echo "${as_me:-configure}:8337: testing adding $cf_add_incdir to include-path ..." 1>&5
8338
8339                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8340
8341                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8342                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8343                   cf_add_incdir="$cf_top_incdir"
8344                 else
8345                   break
8346                 fi
8347           fi
8348         done
8349   done
8350 fi
8351
8352                 for cf_header in \
8353                         ncurses.h \
8354                         curses.h
8355                 do
8356
8357         cat >conftest.$ac_ext <<_ACEOF
8358 #line 8358 "configure"
8359 #include "confdefs.h"
8360
8361 #include <$cf_header>
8362 int
8363 main ()
8364 {
8365
8366 #ifdef NCURSES_VERSION
8367
8368 printf("%s\n", NCURSES_VERSION);
8369 #else
8370 #ifdef __NCURSES_H
8371 printf("old\n");
8372 #else
8373         make an error
8374 #endif
8375 #endif
8376
8377   ;
8378   return 0;
8379 }
8380 _ACEOF
8381 rm -f conftest.$ac_objext
8382 if { (eval echo "$as_me:8382: \"$ac_compile\"") >&5
8383   (eval $ac_compile) 2>&5
8384   ac_status=$?
8385   echo "$as_me:8385: \$? = $ac_status" >&5
8386   (exit $ac_status); } &&
8387          { ac_try='test -s conftest.$ac_objext'
8388   { (eval echo "$as_me:8388: \"$ac_try\"") >&5
8389   (eval $ac_try) 2>&5
8390   ac_status=$?
8391   echo "$as_me:8391: \$? = $ac_status" >&5
8392   (exit $ac_status); }; }; then
8393   cf_cv_ncurses_h2=$cf_header
8394
8395 else
8396   echo "$as_me: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 cf_cv_ncurses_h2=no
8399 fi
8400 rm -f conftest.$ac_objext conftest.$ac_ext
8401
8402                         if test "$cf_cv_ncurses_h2" != no ; then
8403                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8404                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
8405                                 break
8406                         fi
8407                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
8408                 done
8409                 CPPFLAGS="$cf_save2_CPPFLAGS"
8410                 test "$cf_cv_ncurses_h2" != no && break
8411         done
8412         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8412: error: not found" >&5
8413 echo "$as_me: error: not found" >&2;}
8414    { (exit 1); exit 1; }; }
8415
8416 fi
8417 echo "$as_me:8417: result: $cf_cv_ncurses_h2" >&5
8418 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8419
8420         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8421         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8422         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8423                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8424         fi
8425
8426 if test -n "$cf_1st_incdir" ; then
8427   for cf_add_incdir in $cf_1st_incdir
8428   do
8429         while test $cf_add_incdir != /usr/include
8430         do
8431           if test -d $cf_add_incdir
8432           then
8433                 cf_have_incdir=no
8434                 if test -n "$CFLAGS$CPPFLAGS" ; then
8435                   # a loop is needed to ensure we can add subdirs of existing dirs
8436                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8437                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8438                           cf_have_incdir=yes; break
8439                         fi
8440                   done
8441                 fi
8442
8443                 if test "$cf_have_incdir" = no ; then
8444                   if test "$cf_add_incdir" = /usr/local/include ; then
8445                         if test "$GCC" = yes
8446                         then
8447                           cf_save_CPPFLAGS=$CPPFLAGS
8448                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8449                           cat >conftest.$ac_ext <<_ACEOF
8450 #line 8450 "configure"
8451 #include "confdefs.h"
8452 #include <stdio.h>
8453 int
8454 main ()
8455 {
8456 printf("Hello")
8457   ;
8458   return 0;
8459 }
8460 _ACEOF
8461 rm -f conftest.$ac_objext
8462 if { (eval echo "$as_me:8462: \"$ac_compile\"") >&5
8463   (eval $ac_compile) 2>&5
8464   ac_status=$?
8465   echo "$as_me:8465: \$? = $ac_status" >&5
8466   (exit $ac_status); } &&
8467          { ac_try='test -s conftest.$ac_objext'
8468   { (eval echo "$as_me:8468: \"$ac_try\"") >&5
8469   (eval $ac_try) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit $ac_status); }; }; then
8473   :
8474 else
8475   echo "$as_me: failed program was:" >&5
8476 cat conftest.$ac_ext >&5
8477 cf_have_incdir=yes
8478 fi
8479 rm -f conftest.$ac_objext conftest.$ac_ext
8480                           CPPFLAGS=$cf_save_CPPFLAGS
8481                         fi
8482                   fi
8483                 fi
8484
8485                 if test "$cf_have_incdir" = no ; then
8486                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8487
8488 echo "${as_me:-configure}:8488: testing adding $cf_add_incdir to include-path ..." 1>&5
8489
8490                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8491
8492                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8493                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8494                   cf_add_incdir="$cf_top_incdir"
8495                 else
8496                   break
8497                 fi
8498           fi
8499         done
8500   done
8501 fi
8502
8503 fi
8504
8505 # Set definitions to allow ifdef'ing for ncurses.h
8506
8507 case $cf_cv_ncurses_header in # (vi
8508 *ncurses.h)
8509         cat >>confdefs.h <<\EOF
8510 #define HAVE_NCURSES_H 1
8511 EOF
8512
8513         ;;
8514 esac
8515
8516 case $cf_cv_ncurses_header in # (vi
8517 ncurses/curses.h|ncurses/ncurses.h)
8518         cat >>confdefs.h <<\EOF
8519 #define HAVE_NCURSES_NCURSES_H 1
8520 EOF
8521
8522         ;;
8523 ncursesw/curses.h|ncursesw/ncurses.h)
8524         cat >>confdefs.h <<\EOF
8525 #define HAVE_NCURSESW_NCURSES_H 1
8526 EOF
8527
8528         ;;
8529 esac
8530
8531 echo "$as_me:8531: checking for terminfo header" >&5
8532 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8533 if test "${cf_cv_term_header+set}" = set; then
8534   echo $ECHO_N "(cached) $ECHO_C" >&6
8535 else
8536
8537 case ${cf_cv_ncurses_header} in #(vi
8538 */ncurses.h|*/ncursesw.h) #(vi
8539         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8540         ;;
8541 *)
8542         cf_term_header=term.h
8543         ;;
8544 esac
8545
8546 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8547 do
8548 cat >conftest.$ac_ext <<_ACEOF
8549 #line 8549 "configure"
8550 #include "confdefs.h"
8551 #include <stdio.h>
8552 #include <${cf_cv_ncurses_header:-curses.h}>
8553 #include <$cf_test>
8554
8555 int
8556 main ()
8557 {
8558 int x = auto_left_margin
8559   ;
8560   return 0;
8561 }
8562 _ACEOF
8563 rm -f conftest.$ac_objext
8564 if { (eval echo "$as_me:8564: \"$ac_compile\"") >&5
8565   (eval $ac_compile) 2>&5
8566   ac_status=$?
8567   echo "$as_me:8567: \$? = $ac_status" >&5
8568   (exit $ac_status); } &&
8569          { ac_try='test -s conftest.$ac_objext'
8570   { (eval echo "$as_me:8570: \"$ac_try\"") >&5
8571   (eval $ac_try) 2>&5
8572   ac_status=$?
8573   echo "$as_me:8573: \$? = $ac_status" >&5
8574   (exit $ac_status); }; }; then
8575
8576         cf_cv_term_header="$cf_test"
8577 else
8578   echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8580
8581         cf_cv_term_header=unknown
8582
8583 fi
8584 rm -f conftest.$ac_objext conftest.$ac_ext
8585         test "$cf_cv_term_header" != unknown && break
8586 done
8587
8588 fi
8589 echo "$as_me:8589: result: $cf_cv_term_header" >&5
8590 echo "${ECHO_T}$cf_cv_term_header" >&6
8591
8592 # Set definitions to allow ifdef'ing to accommodate subdirectories
8593
8594 case $cf_cv_term_header in # (vi
8595 *term.h)
8596         cat >>confdefs.h <<\EOF
8597 #define HAVE_TERM_H 1
8598 EOF
8599
8600         ;;
8601 esac
8602
8603 case $cf_cv_term_header in # (vi
8604 ncurses/term.h) #(vi
8605         cat >>confdefs.h <<\EOF
8606 #define HAVE_NCURSES_TERM_H 1
8607 EOF
8608
8609         ;;
8610 ncursesw/term.h)
8611         cat >>confdefs.h <<\EOF
8612 #define HAVE_NCURSESW_TERM_H 1
8613 EOF
8614
8615         ;;
8616 esac
8617
8618 # some applications need this, but should check for NCURSES_VERSION
8619 cat >>confdefs.h <<\EOF
8620 #define NCURSES 1
8621 EOF
8622
8623 echo "$as_me:8623: checking for ncurses version" >&5
8624 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8625 if test "${cf_cv_ncurses_version+set}" = set; then
8626   echo $ECHO_N "(cached) $ECHO_C" >&6
8627 else
8628
8629         cf_cv_ncurses_version=no
8630         cf_tempfile=out$$
8631         rm -f $cf_tempfile
8632         if test "$cross_compiling" = yes; then
8633
8634         # This will not work if the preprocessor splits the line after the
8635         # Autoconf token.  The 'unproto' program does that.
8636         cat > conftest.$ac_ext <<EOF
8637 #include <${cf_cv_ncurses_header:-curses.h}>
8638 #undef Autoconf
8639 #ifdef NCURSES_VERSION
8640 Autoconf NCURSES_VERSION
8641 #else
8642 #ifdef __NCURSES_H
8643 Autoconf "old"
8644 #endif
8645 ;
8646 #endif
8647 EOF
8648         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8649         { (eval echo "$as_me:8649: \"$cf_try\"") >&5
8650   (eval $cf_try) 2>&5
8651   ac_status=$?
8652   echo "$as_me:8652: \$? = $ac_status" >&5
8653   (exit $ac_status); }
8654         if test -f conftest.out ; then
8655                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8656                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8657                 rm -f conftest.out
8658         fi
8659
8660 else
8661   cat >conftest.$ac_ext <<_ACEOF
8662 #line 8662 "configure"
8663 #include "confdefs.h"
8664
8665 #include <${cf_cv_ncurses_header:-curses.h}>
8666 #include <stdio.h>
8667 int main()
8668 {
8669         FILE *fp = fopen("$cf_tempfile", "w");
8670 #ifdef NCURSES_VERSION
8671 # ifdef NCURSES_VERSION_PATCH
8672         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8673 # else
8674         fprintf(fp, "%s\n", NCURSES_VERSION);
8675 # endif
8676 #else
8677 # ifdef __NCURSES_H
8678         fprintf(fp, "old\n");
8679 # else
8680         make an error
8681 # endif
8682 #endif
8683         ${cf_cv_main_return:-return}(0);
8684 }
8685 _ACEOF
8686 rm -f conftest$ac_exeext
8687 if { (eval echo "$as_me:8687: \"$ac_link\"") >&5
8688   (eval $ac_link) 2>&5
8689   ac_status=$?
8690   echo "$as_me:8690: \$? = $ac_status" >&5
8691   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8692   { (eval echo "$as_me:8692: \"$ac_try\"") >&5
8693   (eval $ac_try) 2>&5
8694   ac_status=$?
8695   echo "$as_me:8695: \$? = $ac_status" >&5
8696   (exit $ac_status); }; }; then
8697
8698         cf_cv_ncurses_version=`cat $cf_tempfile`
8699 else
8700   echo "$as_me: program exited with status $ac_status" >&5
8701 echo "$as_me: failed program was:" >&5
8702 cat conftest.$ac_ext >&5
8703 fi
8704 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8705 fi
8706         rm -f $cf_tempfile
8707
8708 fi
8709 echo "$as_me:8709: result: $cf_cv_ncurses_version" >&5
8710 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8711 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
8712 #define NCURSES 1
8713 EOF
8714
8715 cf_nculib_root=ncursesw
8716         # This works, except for the special case where we find gpm, but
8717         # ncurses is in a nonstandard location via $LIBS, and we really want
8718         # to link gpm.
8719 cf_ncurses_LIBS=""
8720 cf_ncurses_SAVE="$LIBS"
8721 echo "$as_me:8721: checking for Gpm_Open in -lgpm" >&5
8722 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8723 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8724   echo $ECHO_N "(cached) $ECHO_C" >&6
8725 else
8726   ac_check_lib_save_LIBS=$LIBS
8727 LIBS="-lgpm  $LIBS"
8728 cat >conftest.$ac_ext <<_ACEOF
8729 #line 8729 "configure"
8730 #include "confdefs.h"
8731
8732 /* Override any gcc2 internal prototype to avoid an error.  */
8733 #ifdef __cplusplus
8734 extern "C"
8735 #endif
8736 /* We use char because int might match the return type of a gcc2
8737    builtin and then its argument prototype would still apply.  */
8738 char Gpm_Open ();
8739 int
8740 main ()
8741 {
8742 Gpm_Open ();
8743   ;
8744   return 0;
8745 }
8746 _ACEOF
8747 rm -f conftest.$ac_objext conftest$ac_exeext
8748 if { (eval echo "$as_me:8748: \"$ac_link\"") >&5
8749   (eval $ac_link) 2>&5
8750   ac_status=$?
8751   echo "$as_me:8751: \$? = $ac_status" >&5
8752   (exit $ac_status); } &&
8753          { ac_try='test -s conftest$ac_exeext'
8754   { (eval echo "$as_me:8754: \"$ac_try\"") >&5
8755   (eval $ac_try) 2>&5
8756   ac_status=$?
8757   echo "$as_me:8757: \$? = $ac_status" >&5
8758   (exit $ac_status); }; }; then
8759   ac_cv_lib_gpm_Gpm_Open=yes
8760 else
8761   echo "$as_me: failed program was:" >&5
8762 cat conftest.$ac_ext >&5
8763 ac_cv_lib_gpm_Gpm_Open=no
8764 fi
8765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8766 LIBS=$ac_check_lib_save_LIBS
8767 fi
8768 echo "$as_me:8768: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8769 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8770 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8771   echo "$as_me:8771: checking for initscr in -lgpm" >&5
8772 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8773 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8774   echo $ECHO_N "(cached) $ECHO_C" >&6
8775 else
8776   ac_check_lib_save_LIBS=$LIBS
8777 LIBS="-lgpm  $LIBS"
8778 cat >conftest.$ac_ext <<_ACEOF
8779 #line 8779 "configure"
8780 #include "confdefs.h"
8781
8782 /* Override any gcc2 internal prototype to avoid an error.  */
8783 #ifdef __cplusplus
8784 extern "C"
8785 #endif
8786 /* We use char because int might match the return type of a gcc2
8787    builtin and then its argument prototype would still apply.  */
8788 char initscr ();
8789 int
8790 main ()
8791 {
8792 initscr ();
8793   ;
8794   return 0;
8795 }
8796 _ACEOF
8797 rm -f conftest.$ac_objext conftest$ac_exeext
8798 if { (eval echo "$as_me:8798: \"$ac_link\"") >&5
8799   (eval $ac_link) 2>&5
8800   ac_status=$?
8801   echo "$as_me:8801: \$? = $ac_status" >&5
8802   (exit $ac_status); } &&
8803          { ac_try='test -s conftest$ac_exeext'
8804   { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8805   (eval $ac_try) 2>&5
8806   ac_status=$?
8807   echo "$as_me:8807: \$? = $ac_status" >&5
8808   (exit $ac_status); }; }; then
8809   ac_cv_lib_gpm_initscr=yes
8810 else
8811   echo "$as_me: failed program was:" >&5
8812 cat conftest.$ac_ext >&5
8813 ac_cv_lib_gpm_initscr=no
8814 fi
8815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8816 LIBS=$ac_check_lib_save_LIBS
8817 fi
8818 echo "$as_me:8818: result: $ac_cv_lib_gpm_initscr" >&5
8819 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8820 if test $ac_cv_lib_gpm_initscr = yes; then
8821   LIBS="$cf_ncurses_SAVE"
8822 else
8823   cf_ncurses_LIBS="-lgpm"
8824 fi
8825
8826 fi
8827
8828 case $host_os in #(vi
8829 freebsd*)
8830         # This is only necessary if you are linking against an obsolete
8831         # version of ncurses (but it should do no harm, since it's static).
8832         if test "$cf_nculib_root" = ncurses ; then
8833                 echo "$as_me:8833: checking for tgoto in -lmytinfo" >&5
8834 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8835 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8836   echo $ECHO_N "(cached) $ECHO_C" >&6
8837 else
8838   ac_check_lib_save_LIBS=$LIBS
8839 LIBS="-lmytinfo  $LIBS"
8840 cat >conftest.$ac_ext <<_ACEOF
8841 #line 8841 "configure"
8842 #include "confdefs.h"
8843
8844 /* Override any gcc2 internal prototype to avoid an error.  */
8845 #ifdef __cplusplus
8846 extern "C"
8847 #endif
8848 /* We use char because int might match the return type of a gcc2
8849    builtin and then its argument prototype would still apply.  */
8850 char tgoto ();
8851 int
8852 main ()
8853 {
8854 tgoto ();
8855   ;
8856   return 0;
8857 }
8858 _ACEOF
8859 rm -f conftest.$ac_objext conftest$ac_exeext
8860 if { (eval echo "$as_me:8860: \"$ac_link\"") >&5
8861   (eval $ac_link) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); } &&
8865          { ac_try='test -s conftest$ac_exeext'
8866   { (eval echo "$as_me:8866: \"$ac_try\"") >&5
8867   (eval $ac_try) 2>&5
8868   ac_status=$?
8869   echo "$as_me:8869: \$? = $ac_status" >&5
8870   (exit $ac_status); }; }; then
8871   ac_cv_lib_mytinfo_tgoto=yes
8872 else
8873   echo "$as_me: failed program was:" >&5
8874 cat conftest.$ac_ext >&5
8875 ac_cv_lib_mytinfo_tgoto=no
8876 fi
8877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8878 LIBS=$ac_check_lib_save_LIBS
8879 fi
8880 echo "$as_me:8880: result: $ac_cv_lib_mytinfo_tgoto" >&5
8881 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8882 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8883   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8884 fi
8885
8886         fi
8887         ;;
8888 esac
8889
8890 LIBS="$cf_ncurses_LIBS $LIBS"
8891
8892 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8893 then
8894         LIBS="-l$cf_nculib_root $LIBS"
8895 else
8896
8897         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8898         cf_libdir=""
8899         echo "$as_me:8899: checking for initscr" >&5
8900 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8901 if test "${ac_cv_func_initscr+set}" = set; then
8902   echo $ECHO_N "(cached) $ECHO_C" >&6
8903 else
8904   cat >conftest.$ac_ext <<_ACEOF
8905 #line 8905 "configure"
8906 #include "confdefs.h"
8907 /* System header to define __stub macros and hopefully few prototypes,
8908     which can conflict with char initscr (); below.  */
8909 #include <assert.h>
8910 /* Override any gcc2 internal prototype to avoid an error.  */
8911 #ifdef __cplusplus
8912 extern "C"
8913 #endif
8914 /* We use char because int might match the return type of a gcc2
8915    builtin and then its argument prototype would still apply.  */
8916 char initscr ();
8917 char (*f) ();
8918
8919 int
8920 main ()
8921 {
8922 /* The GNU C library defines this for functions which it implements
8923     to always fail with ENOSYS.  Some functions are actually named
8924     something starting with __ and the normal name is an alias.  */
8925 #if defined (__stub_initscr) || defined (__stub___initscr)
8926 choke me
8927 #else
8928 f = initscr;
8929 #endif
8930
8931   ;
8932   return 0;
8933 }
8934 _ACEOF
8935 rm -f conftest.$ac_objext conftest$ac_exeext
8936 if { (eval echo "$as_me:8936: \"$ac_link\"") >&5
8937   (eval $ac_link) 2>&5
8938   ac_status=$?
8939   echo "$as_me:8939: \$? = $ac_status" >&5
8940   (exit $ac_status); } &&
8941          { ac_try='test -s conftest$ac_exeext'
8942   { (eval echo "$as_me:8942: \"$ac_try\"") >&5
8943   (eval $ac_try) 2>&5
8944   ac_status=$?
8945   echo "$as_me:8945: \$? = $ac_status" >&5
8946   (exit $ac_status); }; }; then
8947   ac_cv_func_initscr=yes
8948 else
8949   echo "$as_me: failed program was:" >&5
8950 cat conftest.$ac_ext >&5
8951 ac_cv_func_initscr=no
8952 fi
8953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8954 fi
8955 echo "$as_me:8955: result: $ac_cv_func_initscr" >&5
8956 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8957 if test $ac_cv_func_initscr = yes; then
8958   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8959 else
8960
8961                 cf_save_LIBS="$LIBS"
8962                 echo "$as_me:8962: checking for initscr in -l$cf_nculib_root" >&5
8963 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8964                 LIBS="-l$cf_nculib_root $LIBS"
8965                 cat >conftest.$ac_ext <<_ACEOF
8966 #line 8966 "configure"
8967 #include "confdefs.h"
8968 #include <${cf_cv_ncurses_header:-curses.h}>
8969 int
8970 main ()
8971 {
8972 initscr()
8973   ;
8974   return 0;
8975 }
8976 _ACEOF
8977 rm -f conftest.$ac_objext conftest$ac_exeext
8978 if { (eval echo "$as_me:8978: \"$ac_link\"") >&5
8979   (eval $ac_link) 2>&5
8980   ac_status=$?
8981   echo "$as_me:8981: \$? = $ac_status" >&5
8982   (exit $ac_status); } &&
8983          { ac_try='test -s conftest$ac_exeext'
8984   { (eval echo "$as_me:8984: \"$ac_try\"") >&5
8985   (eval $ac_try) 2>&5
8986   ac_status=$?
8987   echo "$as_me:8987: \$? = $ac_status" >&5
8988   (exit $ac_status); }; }; then
8989   echo "$as_me:8989: result: yes" >&5
8990 echo "${ECHO_T}yes" >&6
8991                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8992
8993 else
8994   echo "$as_me: failed program was:" >&5
8995 cat conftest.$ac_ext >&5
8996 echo "$as_me:8996: result: no" >&5
8997 echo "${ECHO_T}no" >&6
8998
8999 cf_search=
9000 cf_library_path_list=""
9001 if test -n "${LDFLAGS}${LIBS}" ; then
9002         for cf_library_path in $LDFLAGS $LIBS
9003         do
9004                 case $cf_library_path in #(vi
9005                 -L*)
9006                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9007
9008 test "$cf_library_path" != "NONE" && \
9009 test -d "$cf_library_path" && \
9010  {
9011         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9012         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9013         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9014         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9015         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9016         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"
9017 }
9018
9019                         cf_library_path_list="$cf_library_path_list $cf_search"
9020                         ;;
9021                 esac
9022         done
9023 fi
9024
9025 cf_search=
9026
9027 test "/usr" != "$prefix" && \
9028 test -d "/usr" && \
9029 (test $prefix = NONE || test "/usr" != "$prefix") && {
9030         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9031         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9032         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
9033         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9034         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
9035         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9036 }
9037
9038 test "$prefix" != "NONE" && \
9039 test -d "$prefix" && \
9040  {
9041         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9042         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9043         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9044         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9045         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9046         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9047 }
9048
9049 test "/usr/local" != "$prefix" && \
9050 test -d "/usr/local" && \
9051 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9052         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9053         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9054         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9055         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9056         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9057         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9058 }
9059
9060 test "/opt" != "$prefix" && \
9061 test -d "/opt" && \
9062 (test $prefix = NONE || test "/opt" != "$prefix") && {
9063         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9064         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9065         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
9066         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9067         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
9068         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9069 }
9070
9071 test "$HOME" != "$prefix" && \
9072 test -d "$HOME" && \
9073 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9074         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9075         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9076         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9077         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9078         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9079         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9080 }
9081
9082 cf_search="$cf_library_path_list $cf_search"
9083
9084                         for cf_libdir in $cf_search
9085                         do
9086                                 echo "$as_me:9086: checking for -l$cf_nculib_root in $cf_libdir" >&5
9087 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9088                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9089                                 cat >conftest.$ac_ext <<_ACEOF
9090 #line 9090 "configure"
9091 #include "confdefs.h"
9092 #include <${cf_cv_ncurses_header:-curses.h}>
9093 int
9094 main ()
9095 {
9096 initscr()
9097   ;
9098   return 0;
9099 }
9100 _ACEOF
9101 rm -f conftest.$ac_objext conftest$ac_exeext
9102 if { (eval echo "$as_me:9102: \"$ac_link\"") >&5
9103   (eval $ac_link) 2>&5
9104   ac_status=$?
9105   echo "$as_me:9105: \$? = $ac_status" >&5
9106   (exit $ac_status); } &&
9107          { ac_try='test -s conftest$ac_exeext'
9108   { (eval echo "$as_me:9108: \"$ac_try\"") >&5
9109   (eval $ac_try) 2>&5
9110   ac_status=$?
9111   echo "$as_me:9111: \$? = $ac_status" >&5
9112   (exit $ac_status); }; }; then
9113   echo "$as_me:9113: result: yes" >&5
9114 echo "${ECHO_T}yes" >&6
9115                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9116                                          break
9117 else
9118   echo "$as_me: failed program was:" >&5
9119 cat conftest.$ac_ext >&5
9120 echo "$as_me:9120: result: no" >&5
9121 echo "${ECHO_T}no" >&6
9122                                          LIBS="$cf_save_LIBS"
9123 fi
9124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9125                         done
9126
9127 fi
9128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9129
9130 fi
9131
9132 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9133
9134 if test $cf_found_library = no ; then
9135         { { echo "$as_me:9135: error: Cannot link $cf_nculib_root library" >&5
9136 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9137    { (exit 1); exit 1; }; }
9138 fi
9139
9140 fi
9141
9142 if test -n "$cf_ncurses_LIBS" ; then
9143         echo "$as_me:9143: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9144 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9145         cf_ncurses_SAVE="$LIBS"
9146         for p in $cf_ncurses_LIBS ; do
9147                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9148                 if test "$q" != "$LIBS" ; then
9149                         LIBS="$q"
9150                 fi
9151         done
9152         cat >conftest.$ac_ext <<_ACEOF
9153 #line 9153 "configure"
9154 #include "confdefs.h"
9155 #include <${cf_cv_ncurses_header:-curses.h}>
9156 int
9157 main ()
9158 {
9159 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9160   ;
9161   return 0;
9162 }
9163 _ACEOF
9164 rm -f conftest.$ac_objext conftest$ac_exeext
9165 if { (eval echo "$as_me:9165: \"$ac_link\"") >&5
9166   (eval $ac_link) 2>&5
9167   ac_status=$?
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit $ac_status); } &&
9170          { ac_try='test -s conftest$ac_exeext'
9171   { (eval echo "$as_me:9171: \"$ac_try\"") >&5
9172   (eval $ac_try) 2>&5
9173   ac_status=$?
9174   echo "$as_me:9174: \$? = $ac_status" >&5
9175   (exit $ac_status); }; }; then
9176   echo "$as_me:9176: result: yes" >&5
9177 echo "${ECHO_T}yes" >&6
9178 else
9179   echo "$as_me: failed program was:" >&5
9180 cat conftest.$ac_ext >&5
9181 echo "$as_me:9181: result: no" >&5
9182 echo "${ECHO_T}no" >&6
9183                  LIBS="$cf_ncurses_SAVE"
9184 fi
9185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9186 fi
9187
9188 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9189
9190 cat >>confdefs.h <<EOF
9191 #define $cf_nculib_ROOT 1
9192 EOF
9193
9194 fi
9195
9196         ;;
9197 pdcurses) #(vi
9198
9199 echo "$as_me:9199: checking if you want to use pkg-config" >&5
9200 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9201
9202 # Check whether --with-pkg-config or --without-pkg-config was given.
9203 if test "${with_pkg_config+set}" = set; then
9204   withval="$with_pkg_config"
9205   cf_pkg_config=$withval
9206 else
9207   cf_pkg_config=yes
9208 fi;
9209 echo "$as_me:9209: result: $cf_pkg_config" >&5
9210 echo "${ECHO_T}$cf_pkg_config" >&6
9211
9212 case $cf_pkg_config in #(vi
9213 no) #(vi
9214         PKG_CONFIG=none
9215         ;;
9216 yes) #(vi
9217         if test -n "$ac_tool_prefix"; then
9218   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9219 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9220 echo "$as_me:9220: checking for $ac_word" >&5
9221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9222 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9223   echo $ECHO_N "(cached) $ECHO_C" >&6
9224 else
9225   case $PKG_CONFIG in
9226   [\\/]* | ?:[\\/]*)
9227   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9228   ;;
9229   *)
9230   ac_save_IFS=$IFS; IFS=$ac_path_separator
9231 ac_dummy="$PATH"
9232 for ac_dir in $ac_dummy; do
9233   IFS=$ac_save_IFS
9234   test -z "$ac_dir" && ac_dir=.
9235   if $as_executable_p "$ac_dir/$ac_word"; then
9236    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9237    echo "$as_me:9237: found $ac_dir/$ac_word" >&5
9238    break
9239 fi
9240 done
9241
9242   ;;
9243 esac
9244 fi
9245 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9246
9247 if test -n "$PKG_CONFIG"; then
9248   echo "$as_me:9248: result: $PKG_CONFIG" >&5
9249 echo "${ECHO_T}$PKG_CONFIG" >&6
9250 else
9251   echo "$as_me:9251: result: no" >&5
9252 echo "${ECHO_T}no" >&6
9253 fi
9254
9255 fi
9256 if test -z "$ac_cv_path_PKG_CONFIG"; then
9257   ac_pt_PKG_CONFIG=$PKG_CONFIG
9258   # Extract the first word of "pkg-config", so it can be a program name with args.
9259 set dummy pkg-config; ac_word=$2
9260 echo "$as_me:9260: checking for $ac_word" >&5
9261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9262 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9263   echo $ECHO_N "(cached) $ECHO_C" >&6
9264 else
9265   case $ac_pt_PKG_CONFIG in
9266   [\\/]* | ?:[\\/]*)
9267   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9268   ;;
9269   *)
9270   ac_save_IFS=$IFS; IFS=$ac_path_separator
9271 ac_dummy="$PATH"
9272 for ac_dir in $ac_dummy; do
9273   IFS=$ac_save_IFS
9274   test -z "$ac_dir" && ac_dir=.
9275   if $as_executable_p "$ac_dir/$ac_word"; then
9276    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9277    echo "$as_me:9277: found $ac_dir/$ac_word" >&5
9278    break
9279 fi
9280 done
9281
9282   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9283   ;;
9284 esac
9285 fi
9286 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9287
9288 if test -n "$ac_pt_PKG_CONFIG"; then
9289   echo "$as_me:9289: result: $ac_pt_PKG_CONFIG" >&5
9290 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9291 else
9292   echo "$as_me:9292: result: no" >&5
9293 echo "${ECHO_T}no" >&6
9294 fi
9295
9296   PKG_CONFIG=$ac_pt_PKG_CONFIG
9297 else
9298   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9299 fi
9300
9301         ;;
9302 *)
9303         PKG_CONFIG=$withval
9304         ;;
9305 esac
9306
9307 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9308 if test "$PKG_CONFIG" != none ; then
9309
9310 if test "x$prefix" != xNONE; then
9311   cf_path_syntax="$prefix"
9312 else
9313   cf_path_syntax="$ac_default_prefix"
9314 fi
9315
9316 case ".$PKG_CONFIG" in #(vi
9317 .\$\(*\)*|.\'*\'*) #(vi
9318   ;;
9319 ..|./*|.\\*) #(vi
9320   ;;
9321 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9322   ;;
9323 .\${*prefix}*) #(vi
9324   eval PKG_CONFIG="$PKG_CONFIG"
9325   case ".$PKG_CONFIG" in #(vi
9326   .NONE/*)
9327     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9328     ;;
9329   esac
9330   ;; #(vi
9331 .no|.NONE/*)
9332   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9333   ;;
9334 *)
9335   { { echo "$as_me:9335: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9336 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9337    { (exit 1); exit 1; }; }
9338   ;;
9339 esac
9340
9341 fi
9342
9343 echo "$as_me:9343: checking for X" >&5
9344 echo $ECHO_N "checking for X... $ECHO_C" >&6
9345
9346 # Check whether --with-x or --without-x was given.
9347 if test "${with_x+set}" = set; then
9348   withval="$with_x"
9349
9350 fi;
9351 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9352 if test "x$with_x" = xno; then
9353   # The user explicitly disabled X.
9354   have_x=disabled
9355 else
9356   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9357     # Both variables are already set.
9358     have_x=yes
9359   else
9360     if test "${ac_cv_have_x+set}" = set; then
9361   echo $ECHO_N "(cached) $ECHO_C" >&6
9362 else
9363   # One or both of the vars are not set, and there is no cached value.
9364 ac_x_includes=no ac_x_libraries=no
9365 rm -fr conftest.dir
9366 if mkdir conftest.dir; then
9367   cd conftest.dir
9368   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9369   cat >Imakefile <<'EOF'
9370 acfindx:
9371         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9372 EOF
9373   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9374     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9375     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9376     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9377     for ac_extension in a so sl dylib dll; do
9378       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9379          test -f $ac_im_libdir/libX11.$ac_extension; then
9380         ac_im_usrlibdir=$ac_im_libdir; break
9381       fi
9382     done
9383     # Screen out bogus values from the imake configuration.  They are
9384     # bogus both because they are the default anyway, and because
9385     # using them would break gcc on systems where it needs fixed includes.
9386     case $ac_im_incroot in
9387         /usr/include) ;;
9388         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9389     esac
9390     case $ac_im_usrlibdir in
9391         /usr/lib | /lib) ;;
9392         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9393     esac
9394   fi
9395   cd ..
9396   rm -fr conftest.dir
9397 fi
9398
9399 # Standard set of common directories for X headers.
9400 # Check X11 before X11Rn because it is often a symlink to the current release.
9401 ac_x_header_dirs='
9402 /usr/X11/include
9403 /usr/X11R6/include
9404 /usr/X11R5/include
9405 /usr/X11R4/include
9406
9407 /usr/include/X11
9408 /usr/include/X11R6
9409 /usr/include/X11R5
9410 /usr/include/X11R4
9411
9412 /usr/local/X11/include
9413 /usr/local/X11R6/include
9414 /usr/local/X11R5/include
9415 /usr/local/X11R4/include
9416
9417 /usr/local/include/X11
9418 /usr/local/include/X11R6
9419 /usr/local/include/X11R5
9420 /usr/local/include/X11R4
9421
9422 /usr/X386/include
9423 /usr/x386/include
9424 /usr/XFree86/include/X11
9425
9426 /usr/include
9427 /usr/local/include
9428 /usr/unsupported/include
9429 /usr/athena/include
9430 /usr/local/x11r5/include
9431 /usr/lpp/Xamples/include
9432
9433 /usr/openwin/include
9434 /usr/openwin/share/include'
9435
9436 if test "$ac_x_includes" = no; then
9437   # Guess where to find include files, by looking for Intrinsic.h.
9438   # First, try using that file with no special directory specified.
9439   cat >conftest.$ac_ext <<_ACEOF
9440 #line 9440 "configure"
9441 #include "confdefs.h"
9442 #include <X11/Intrinsic.h>
9443 _ACEOF
9444 if { (eval echo "$as_me:9444: \"$ac_cpp conftest.$ac_ext\"") >&5
9445   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9446   ac_status=$?
9447   egrep -v '^ *\+' conftest.er1 >conftest.err
9448   rm -f conftest.er1
9449   cat conftest.err >&5
9450   echo "$as_me:9450: \$? = $ac_status" >&5
9451   (exit $ac_status); } >/dev/null; then
9452   if test -s conftest.err; then
9453     ac_cpp_err=$ac_c_preproc_warn_flag
9454   else
9455     ac_cpp_err=
9456   fi
9457 else
9458   ac_cpp_err=yes
9459 fi
9460 if test -z "$ac_cpp_err"; then
9461   # We can compile using X headers with no special include directory.
9462 ac_x_includes=
9463 else
9464   echo "$as_me: failed program was:" >&5
9465   cat conftest.$ac_ext >&5
9466   for ac_dir in $ac_x_header_dirs; do
9467   if test -r "$ac_dir/X11/Intrinsic.h"; then
9468     ac_x_includes=$ac_dir
9469     break
9470   fi
9471 done
9472 fi
9473 rm -f conftest.err conftest.$ac_ext
9474 fi # $ac_x_includes = no
9475
9476 if test "$ac_x_libraries" = no; then
9477   # Check for the libraries.
9478   # See if we find them without any special options.
9479   # Don't add to $LIBS permanently.
9480   ac_save_LIBS=$LIBS
9481   LIBS="-lXt $LIBS"
9482   cat >conftest.$ac_ext <<_ACEOF
9483 #line 9483 "configure"
9484 #include "confdefs.h"
9485 #include <X11/Intrinsic.h>
9486 int
9487 main ()
9488 {
9489 XtMalloc (0)
9490   ;
9491   return 0;
9492 }
9493 _ACEOF
9494 rm -f conftest.$ac_objext conftest$ac_exeext
9495 if { (eval echo "$as_me:9495: \"$ac_link\"") >&5
9496   (eval $ac_link) 2>&5
9497   ac_status=$?
9498   echo "$as_me:9498: \$? = $ac_status" >&5
9499   (exit $ac_status); } &&
9500          { ac_try='test -s conftest$ac_exeext'
9501   { (eval echo "$as_me:9501: \"$ac_try\"") >&5
9502   (eval $ac_try) 2>&5
9503   ac_status=$?
9504   echo "$as_me:9504: \$? = $ac_status" >&5
9505   (exit $ac_status); }; }; then
9506   LIBS=$ac_save_LIBS
9507 # We can link X programs with no special library path.
9508 ac_x_libraries=
9509 else
9510   echo "$as_me: failed program was:" >&5
9511 cat conftest.$ac_ext >&5
9512 LIBS=$ac_save_LIBS
9513 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9514 do
9515   # Don't even attempt the hair of trying to link an X program!
9516   for ac_extension in a so sl dylib dll; do
9517     if test -r $ac_dir/libXt.$ac_extension; then
9518       ac_x_libraries=$ac_dir
9519       break 2
9520     fi
9521   done
9522 done
9523 fi
9524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9525 fi # $ac_x_libraries = no
9526
9527 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9528   # Didn't find X anywhere.  Cache the known absence of X.
9529   ac_cv_have_x="have_x=no"
9530 else
9531   # Record where we found X for the cache.
9532   ac_cv_have_x="have_x=yes \
9533                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9534 fi
9535 fi
9536
9537   fi
9538   eval "$ac_cv_have_x"
9539 fi # $with_x != no
9540
9541 if test "$have_x" != yes; then
9542   echo "$as_me:9542: result: $have_x" >&5
9543 echo "${ECHO_T}$have_x" >&6
9544   no_x=yes
9545 else
9546   # If each of the values was on the command line, it overrides each guess.
9547   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9548   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9549   # Update the cache value to reflect the command line values.
9550   ac_cv_have_x="have_x=yes \
9551                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9552   echo "$as_me:9552: result: libraries $x_libraries, headers $x_includes" >&5
9553 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9554 fi
9555
9556 if test "$no_x" = yes; then
9557   # Not all programs may use this symbol, but it does not hurt to define it.
9558
9559 cat >>confdefs.h <<\EOF
9560 #define X_DISPLAY_MISSING 1
9561 EOF
9562
9563   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9564 else
9565   if test -n "$x_includes"; then
9566     X_CFLAGS="$X_CFLAGS -I$x_includes"
9567   fi
9568
9569   # It would also be nice to do this for all -L options, not just this one.
9570   if test -n "$x_libraries"; then
9571     X_LIBS="$X_LIBS -L$x_libraries"
9572     # For Solaris; some versions of Sun CC require a space after -R and
9573     # others require no space.  Words are not sufficient . . . .
9574     case `(uname -sr) 2>/dev/null` in
9575     "SunOS 5"*)
9576       echo "$as_me:9576: checking whether -R must be followed by a space" >&5
9577 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9578       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9579       cat >conftest.$ac_ext <<_ACEOF
9580 #line 9580 "configure"
9581 #include "confdefs.h"
9582
9583 int
9584 main ()
9585 {
9586
9587   ;
9588   return 0;
9589 }
9590 _ACEOF
9591 rm -f conftest.$ac_objext conftest$ac_exeext
9592 if { (eval echo "$as_me:9592: \"$ac_link\"") >&5
9593   (eval $ac_link) 2>&5
9594   ac_status=$?
9595   echo "$as_me:9595: \$? = $ac_status" >&5
9596   (exit $ac_status); } &&
9597          { ac_try='test -s conftest$ac_exeext'
9598   { (eval echo "$as_me:9598: \"$ac_try\"") >&5
9599   (eval $ac_try) 2>&5
9600   ac_status=$?
9601   echo "$as_me:9601: \$? = $ac_status" >&5
9602   (exit $ac_status); }; }; then
9603   ac_R_nospace=yes
9604 else
9605   echo "$as_me: failed program was:" >&5
9606 cat conftest.$ac_ext >&5
9607 ac_R_nospace=no
9608 fi
9609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9610       if test $ac_R_nospace = yes; then
9611         echo "$as_me:9611: result: no" >&5
9612 echo "${ECHO_T}no" >&6
9613         X_LIBS="$X_LIBS -R$x_libraries"
9614       else
9615         LIBS="$ac_xsave_LIBS -R $x_libraries"
9616         cat >conftest.$ac_ext <<_ACEOF
9617 #line 9617 "configure"
9618 #include "confdefs.h"
9619
9620 int
9621 main ()
9622 {
9623
9624   ;
9625   return 0;
9626 }
9627 _ACEOF
9628 rm -f conftest.$ac_objext conftest$ac_exeext
9629 if { (eval echo "$as_me:9629: \"$ac_link\"") >&5
9630   (eval $ac_link) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit $ac_status); } &&
9634          { ac_try='test -s conftest$ac_exeext'
9635   { (eval echo "$as_me:9635: \"$ac_try\"") >&5
9636   (eval $ac_try) 2>&5
9637   ac_status=$?
9638   echo "$as_me:9638: \$? = $ac_status" >&5
9639   (exit $ac_status); }; }; then
9640   ac_R_space=yes
9641 else
9642   echo "$as_me: failed program was:" >&5
9643 cat conftest.$ac_ext >&5
9644 ac_R_space=no
9645 fi
9646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9647         if test $ac_R_space = yes; then
9648           echo "$as_me:9648: result: yes" >&5
9649 echo "${ECHO_T}yes" >&6
9650           X_LIBS="$X_LIBS -R $x_libraries"
9651         else
9652           echo "$as_me:9652: result: neither works" >&5
9653 echo "${ECHO_T}neither works" >&6
9654         fi
9655       fi
9656       LIBS=$ac_xsave_LIBS
9657     esac
9658   fi
9659
9660   # Check for system-dependent libraries X programs must link with.
9661   # Do this before checking for the system-independent R6 libraries
9662   # (-lICE), since we may need -lsocket or whatever for X linking.
9663
9664   if test "$ISC" = yes; then
9665     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9666   else
9667     # Martyn Johnson says this is needed for Ultrix, if the X
9668     # libraries were built with DECnet support.  And Karl Berry says
9669     # the Alpha needs dnet_stub (dnet does not exist).
9670     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9671     cat >conftest.$ac_ext <<_ACEOF
9672 #line 9672 "configure"
9673 #include "confdefs.h"
9674
9675 /* Override any gcc2 internal prototype to avoid an error.  */
9676 #ifdef __cplusplus
9677 extern "C"
9678 #endif
9679 /* We use char because int might match the return type of a gcc2
9680    builtin and then its argument prototype would still apply.  */
9681 char XOpenDisplay ();
9682 int
9683 main ()
9684 {
9685 XOpenDisplay ();
9686   ;
9687   return 0;
9688 }
9689 _ACEOF
9690 rm -f conftest.$ac_objext conftest$ac_exeext
9691 if { (eval echo "$as_me:9691: \"$ac_link\"") >&5
9692   (eval $ac_link) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit $ac_status); } &&
9696          { ac_try='test -s conftest$ac_exeext'
9697   { (eval echo "$as_me:9697: \"$ac_try\"") >&5
9698   (eval $ac_try) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); }; }; then
9702   :
9703 else
9704   echo "$as_me: failed program was:" >&5
9705 cat conftest.$ac_ext >&5
9706 echo "$as_me:9706: checking for dnet_ntoa in -ldnet" >&5
9707 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9708 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9709   echo $ECHO_N "(cached) $ECHO_C" >&6
9710 else
9711   ac_check_lib_save_LIBS=$LIBS
9712 LIBS="-ldnet  $LIBS"
9713 cat >conftest.$ac_ext <<_ACEOF
9714 #line 9714 "configure"
9715 #include "confdefs.h"
9716
9717 /* Override any gcc2 internal prototype to avoid an error.  */
9718 #ifdef __cplusplus
9719 extern "C"
9720 #endif
9721 /* We use char because int might match the return type of a gcc2
9722    builtin and then its argument prototype would still apply.  */
9723 char dnet_ntoa ();
9724 int
9725 main ()
9726 {
9727 dnet_ntoa ();
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_cv_lib_dnet_dnet_ntoa=yes
9745 else
9746   echo "$as_me: failed program was:" >&5
9747 cat conftest.$ac_ext >&5
9748 ac_cv_lib_dnet_dnet_ntoa=no
9749 fi
9750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9751 LIBS=$ac_check_lib_save_LIBS
9752 fi
9753 echo "$as_me:9753: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9754 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9755 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9756   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9757 fi
9758
9759     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9760       echo "$as_me:9760: checking for dnet_ntoa in -ldnet_stub" >&5
9761 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9762 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9763   echo $ECHO_N "(cached) $ECHO_C" >&6
9764 else
9765   ac_check_lib_save_LIBS=$LIBS
9766 LIBS="-ldnet_stub  $LIBS"
9767 cat >conftest.$ac_ext <<_ACEOF
9768 #line 9768 "configure"
9769 #include "confdefs.h"
9770
9771 /* Override any gcc2 internal prototype to avoid an error.  */
9772 #ifdef __cplusplus
9773 extern "C"
9774 #endif
9775 /* We use char because int might match the return type of a gcc2
9776    builtin and then its argument prototype would still apply.  */
9777 char dnet_ntoa ();
9778 int
9779 main ()
9780 {
9781 dnet_ntoa ();
9782   ;
9783   return 0;
9784 }
9785 _ACEOF
9786 rm -f conftest.$ac_objext conftest$ac_exeext
9787 if { (eval echo "$as_me:9787: \"$ac_link\"") >&5
9788   (eval $ac_link) 2>&5
9789   ac_status=$?
9790   echo "$as_me:9790: \$? = $ac_status" >&5
9791   (exit $ac_status); } &&
9792          { ac_try='test -s conftest$ac_exeext'
9793   { (eval echo "$as_me:9793: \"$ac_try\"") >&5
9794   (eval $ac_try) 2>&5
9795   ac_status=$?
9796   echo "$as_me:9796: \$? = $ac_status" >&5
9797   (exit $ac_status); }; }; then
9798   ac_cv_lib_dnet_stub_dnet_ntoa=yes
9799 else
9800   echo "$as_me: failed program was:" >&5
9801 cat conftest.$ac_ext >&5
9802 ac_cv_lib_dnet_stub_dnet_ntoa=no
9803 fi
9804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9805 LIBS=$ac_check_lib_save_LIBS
9806 fi
9807 echo "$as_me:9807: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9808 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9809 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9810   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9811 fi
9812
9813     fi
9814 fi
9815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9816     LIBS="$ac_xsave_LIBS"
9817
9818     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9819     # to get the SysV transport functions.
9820     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9821     # needs -lnsl.
9822     # The nsl library prevents programs from opening the X display
9823     # on Irix 5.2, according to T.E. Dickey.
9824     # The functions gethostbyname, getservbyname, and inet_addr are
9825     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9826     echo "$as_me:9826: checking for gethostbyname" >&5
9827 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9828 if test "${ac_cv_func_gethostbyname+set}" = set; then
9829   echo $ECHO_N "(cached) $ECHO_C" >&6
9830 else
9831   cat >conftest.$ac_ext <<_ACEOF
9832 #line 9832 "configure"
9833 #include "confdefs.h"
9834 /* System header to define __stub macros and hopefully few prototypes,
9835     which can conflict with char gethostbyname (); below.  */
9836 #include <assert.h>
9837 /* Override any gcc2 internal prototype to avoid an error.  */
9838 #ifdef __cplusplus
9839 extern "C"
9840 #endif
9841 /* We use char because int might match the return type of a gcc2
9842    builtin and then its argument prototype would still apply.  */
9843 char gethostbyname ();
9844 char (*f) ();
9845
9846 int
9847 main ()
9848 {
9849 /* The GNU C library defines this for functions which it implements
9850     to always fail with ENOSYS.  Some functions are actually named
9851     something starting with __ and the normal name is an alias.  */
9852 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9853 choke me
9854 #else
9855 f = gethostbyname;
9856 #endif
9857
9858   ;
9859   return 0;
9860 }
9861 _ACEOF
9862 rm -f conftest.$ac_objext conftest$ac_exeext
9863 if { (eval echo "$as_me:9863: \"$ac_link\"") >&5
9864   (eval $ac_link) 2>&5
9865   ac_status=$?
9866   echo "$as_me:9866: \$? = $ac_status" >&5
9867   (exit $ac_status); } &&
9868          { ac_try='test -s conftest$ac_exeext'
9869   { (eval echo "$as_me:9869: \"$ac_try\"") >&5
9870   (eval $ac_try) 2>&5
9871   ac_status=$?
9872   echo "$as_me:9872: \$? = $ac_status" >&5
9873   (exit $ac_status); }; }; then
9874   ac_cv_func_gethostbyname=yes
9875 else
9876   echo "$as_me: failed program was:" >&5
9877 cat conftest.$ac_ext >&5
9878 ac_cv_func_gethostbyname=no
9879 fi
9880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9881 fi
9882 echo "$as_me:9882: result: $ac_cv_func_gethostbyname" >&5
9883 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9884
9885     if test $ac_cv_func_gethostbyname = no; then
9886       echo "$as_me:9886: checking for gethostbyname in -lnsl" >&5
9887 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9888 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9889   echo $ECHO_N "(cached) $ECHO_C" >&6
9890 else
9891   ac_check_lib_save_LIBS=$LIBS
9892 LIBS="-lnsl  $LIBS"
9893 cat >conftest.$ac_ext <<_ACEOF
9894 #line 9894 "configure"
9895 #include "confdefs.h"
9896
9897 /* Override any gcc2 internal prototype to avoid an error.  */
9898 #ifdef __cplusplus
9899 extern "C"
9900 #endif
9901 /* We use char because int might match the return type of a gcc2
9902    builtin and then its argument prototype would still apply.  */
9903 char gethostbyname ();
9904 int
9905 main ()
9906 {
9907 gethostbyname ();
9908   ;
9909   return 0;
9910 }
9911 _ACEOF
9912 rm -f conftest.$ac_objext conftest$ac_exeext
9913 if { (eval echo "$as_me:9913: \"$ac_link\"") >&5
9914   (eval $ac_link) 2>&5
9915   ac_status=$?
9916   echo "$as_me:9916: \$? = $ac_status" >&5
9917   (exit $ac_status); } &&
9918          { ac_try='test -s conftest$ac_exeext'
9919   { (eval echo "$as_me:9919: \"$ac_try\"") >&5
9920   (eval $ac_try) 2>&5
9921   ac_status=$?
9922   echo "$as_me:9922: \$? = $ac_status" >&5
9923   (exit $ac_status); }; }; then
9924   ac_cv_lib_nsl_gethostbyname=yes
9925 else
9926   echo "$as_me: failed program was:" >&5
9927 cat conftest.$ac_ext >&5
9928 ac_cv_lib_nsl_gethostbyname=no
9929 fi
9930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9931 LIBS=$ac_check_lib_save_LIBS
9932 fi
9933 echo "$as_me:9933: result: $ac_cv_lib_nsl_gethostbyname" >&5
9934 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9935 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9936   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9937 fi
9938
9939       if test $ac_cv_lib_nsl_gethostbyname = no; then
9940         echo "$as_me:9940: checking for gethostbyname in -lbsd" >&5
9941 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9942 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9943   echo $ECHO_N "(cached) $ECHO_C" >&6
9944 else
9945   ac_check_lib_save_LIBS=$LIBS
9946 LIBS="-lbsd  $LIBS"
9947 cat >conftest.$ac_ext <<_ACEOF
9948 #line 9948 "configure"
9949 #include "confdefs.h"
9950
9951 /* Override any gcc2 internal prototype to avoid an error.  */
9952 #ifdef __cplusplus
9953 extern "C"
9954 #endif
9955 /* We use char because int might match the return type of a gcc2
9956    builtin and then its argument prototype would still apply.  */
9957 char gethostbyname ();
9958 int
9959 main ()
9960 {
9961 gethostbyname ();
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_lib_bsd_gethostbyname=yes
9979 else
9980   echo "$as_me: failed program was:" >&5
9981 cat conftest.$ac_ext >&5
9982 ac_cv_lib_bsd_gethostbyname=no
9983 fi
9984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9985 LIBS=$ac_check_lib_save_LIBS
9986 fi
9987 echo "$as_me:9987: result: $ac_cv_lib_bsd_gethostbyname" >&5
9988 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9989 if test $ac_cv_lib_bsd_gethostbyname = yes; then
9990   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9991 fi
9992
9993       fi
9994     fi
9995
9996     # lieder@skyler.mavd.honeywell.com says without -lsocket,
9997     # socket/setsockopt and other routines are undefined under SCO ODT
9998     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
9999     # on later versions), says Simon Leinen: it contains gethostby*
10000     # variants that don't use the nameserver (or something).  -lsocket
10001     # must be given before -lnsl if both are needed.  We assume that
10002     # if connect needs -lnsl, so does gethostbyname.
10003     echo "$as_me:10003: checking for connect" >&5
10004 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10005 if test "${ac_cv_func_connect+set}" = set; then
10006   echo $ECHO_N "(cached) $ECHO_C" >&6
10007 else
10008   cat >conftest.$ac_ext <<_ACEOF
10009 #line 10009 "configure"
10010 #include "confdefs.h"
10011 /* System header to define __stub macros and hopefully few prototypes,
10012     which can conflict with char connect (); below.  */
10013 #include <assert.h>
10014 /* Override any gcc2 internal prototype to avoid an error.  */
10015 #ifdef __cplusplus
10016 extern "C"
10017 #endif
10018 /* We use char because int might match the return type of a gcc2
10019    builtin and then its argument prototype would still apply.  */
10020 char connect ();
10021 char (*f) ();
10022
10023 int
10024 main ()
10025 {
10026 /* The GNU C library defines this for functions which it implements
10027     to always fail with ENOSYS.  Some functions are actually named
10028     something starting with __ and the normal name is an alias.  */
10029 #if defined (__stub_connect) || defined (__stub___connect)
10030 choke me
10031 #else
10032 f = connect;
10033 #endif
10034
10035   ;
10036   return 0;
10037 }
10038 _ACEOF
10039 rm -f conftest.$ac_objext conftest$ac_exeext
10040 if { (eval echo "$as_me:10040: \"$ac_link\"") >&5
10041   (eval $ac_link) 2>&5
10042   ac_status=$?
10043   echo "$as_me:10043: \$? = $ac_status" >&5
10044   (exit $ac_status); } &&
10045          { ac_try='test -s conftest$ac_exeext'
10046   { (eval echo "$as_me:10046: \"$ac_try\"") >&5
10047   (eval $ac_try) 2>&5
10048   ac_status=$?
10049   echo "$as_me:10049: \$? = $ac_status" >&5
10050   (exit $ac_status); }; }; then
10051   ac_cv_func_connect=yes
10052 else
10053   echo "$as_me: failed program was:" >&5
10054 cat conftest.$ac_ext >&5
10055 ac_cv_func_connect=no
10056 fi
10057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10058 fi
10059 echo "$as_me:10059: result: $ac_cv_func_connect" >&5
10060 echo "${ECHO_T}$ac_cv_func_connect" >&6
10061
10062     if test $ac_cv_func_connect = no; then
10063       echo "$as_me:10063: checking for connect in -lsocket" >&5
10064 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10065 if test "${ac_cv_lib_socket_connect+set}" = set; then
10066   echo $ECHO_N "(cached) $ECHO_C" >&6
10067 else
10068   ac_check_lib_save_LIBS=$LIBS
10069 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10070 cat >conftest.$ac_ext <<_ACEOF
10071 #line 10071 "configure"
10072 #include "confdefs.h"
10073
10074 /* Override any gcc2 internal prototype to avoid an error.  */
10075 #ifdef __cplusplus
10076 extern "C"
10077 #endif
10078 /* We use char because int might match the return type of a gcc2
10079    builtin and then its argument prototype would still apply.  */
10080 char connect ();
10081 int
10082 main ()
10083 {
10084 connect ();
10085   ;
10086   return 0;
10087 }
10088 _ACEOF
10089 rm -f conftest.$ac_objext conftest$ac_exeext
10090 if { (eval echo "$as_me:10090: \"$ac_link\"") >&5
10091   (eval $ac_link) 2>&5
10092   ac_status=$?
10093   echo "$as_me:10093: \$? = $ac_status" >&5
10094   (exit $ac_status); } &&
10095          { ac_try='test -s conftest$ac_exeext'
10096   { (eval echo "$as_me:10096: \"$ac_try\"") >&5
10097   (eval $ac_try) 2>&5
10098   ac_status=$?
10099   echo "$as_me:10099: \$? = $ac_status" >&5
10100   (exit $ac_status); }; }; then
10101   ac_cv_lib_socket_connect=yes
10102 else
10103   echo "$as_me: failed program was:" >&5
10104 cat conftest.$ac_ext >&5
10105 ac_cv_lib_socket_connect=no
10106 fi
10107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10108 LIBS=$ac_check_lib_save_LIBS
10109 fi
10110 echo "$as_me:10110: result: $ac_cv_lib_socket_connect" >&5
10111 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10112 if test $ac_cv_lib_socket_connect = yes; then
10113   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10114 fi
10115
10116     fi
10117
10118     # Guillermo Gomez says -lposix is necessary on A/UX.
10119     echo "$as_me:10119: checking for remove" >&5
10120 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10121 if test "${ac_cv_func_remove+set}" = set; then
10122   echo $ECHO_N "(cached) $ECHO_C" >&6
10123 else
10124   cat >conftest.$ac_ext <<_ACEOF
10125 #line 10125 "configure"
10126 #include "confdefs.h"
10127 /* System header to define __stub macros and hopefully few prototypes,
10128     which can conflict with char remove (); below.  */
10129 #include <assert.h>
10130 /* Override any gcc2 internal prototype to avoid an error.  */
10131 #ifdef __cplusplus
10132 extern "C"
10133 #endif
10134 /* We use char because int might match the return type of a gcc2
10135    builtin and then its argument prototype would still apply.  */
10136 char remove ();
10137 char (*f) ();
10138
10139 int
10140 main ()
10141 {
10142 /* The GNU C library defines this for functions which it implements
10143     to always fail with ENOSYS.  Some functions are actually named
10144     something starting with __ and the normal name is an alias.  */
10145 #if defined (__stub_remove) || defined (__stub___remove)
10146 choke me
10147 #else
10148 f = remove;
10149 #endif
10150
10151   ;
10152   return 0;
10153 }
10154 _ACEOF
10155 rm -f conftest.$ac_objext conftest$ac_exeext
10156 if { (eval echo "$as_me:10156: \"$ac_link\"") >&5
10157   (eval $ac_link) 2>&5
10158   ac_status=$?
10159   echo "$as_me:10159: \$? = $ac_status" >&5
10160   (exit $ac_status); } &&
10161          { ac_try='test -s conftest$ac_exeext'
10162   { (eval echo "$as_me:10162: \"$ac_try\"") >&5
10163   (eval $ac_try) 2>&5
10164   ac_status=$?
10165   echo "$as_me:10165: \$? = $ac_status" >&5
10166   (exit $ac_status); }; }; then
10167   ac_cv_func_remove=yes
10168 else
10169   echo "$as_me: failed program was:" >&5
10170 cat conftest.$ac_ext >&5
10171 ac_cv_func_remove=no
10172 fi
10173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10174 fi
10175 echo "$as_me:10175: result: $ac_cv_func_remove" >&5
10176 echo "${ECHO_T}$ac_cv_func_remove" >&6
10177
10178     if test $ac_cv_func_remove = no; then
10179       echo "$as_me:10179: checking for remove in -lposix" >&5
10180 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10181 if test "${ac_cv_lib_posix_remove+set}" = set; then
10182   echo $ECHO_N "(cached) $ECHO_C" >&6
10183 else
10184   ac_check_lib_save_LIBS=$LIBS
10185 LIBS="-lposix  $LIBS"
10186 cat >conftest.$ac_ext <<_ACEOF
10187 #line 10187 "configure"
10188 #include "confdefs.h"
10189
10190 /* Override any gcc2 internal prototype to avoid an error.  */
10191 #ifdef __cplusplus
10192 extern "C"
10193 #endif
10194 /* We use char because int might match the return type of a gcc2
10195    builtin and then its argument prototype would still apply.  */
10196 char remove ();
10197 int
10198 main ()
10199 {
10200 remove ();
10201   ;
10202   return 0;
10203 }
10204 _ACEOF
10205 rm -f conftest.$ac_objext conftest$ac_exeext
10206 if { (eval echo "$as_me:10206: \"$ac_link\"") >&5
10207   (eval $ac_link) 2>&5
10208   ac_status=$?
10209   echo "$as_me:10209: \$? = $ac_status" >&5
10210   (exit $ac_status); } &&
10211          { ac_try='test -s conftest$ac_exeext'
10212   { (eval echo "$as_me:10212: \"$ac_try\"") >&5
10213   (eval $ac_try) 2>&5
10214   ac_status=$?
10215   echo "$as_me:10215: \$? = $ac_status" >&5
10216   (exit $ac_status); }; }; then
10217   ac_cv_lib_posix_remove=yes
10218 else
10219   echo "$as_me: failed program was:" >&5
10220 cat conftest.$ac_ext >&5
10221 ac_cv_lib_posix_remove=no
10222 fi
10223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10224 LIBS=$ac_check_lib_save_LIBS
10225 fi
10226 echo "$as_me:10226: result: $ac_cv_lib_posix_remove" >&5
10227 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10228 if test $ac_cv_lib_posix_remove = yes; then
10229   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10230 fi
10231
10232     fi
10233
10234     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10235     echo "$as_me:10235: checking for shmat" >&5
10236 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10237 if test "${ac_cv_func_shmat+set}" = set; then
10238   echo $ECHO_N "(cached) $ECHO_C" >&6
10239 else
10240   cat >conftest.$ac_ext <<_ACEOF
10241 #line 10241 "configure"
10242 #include "confdefs.h"
10243 /* System header to define __stub macros and hopefully few prototypes,
10244     which can conflict with char shmat (); below.  */
10245 #include <assert.h>
10246 /* Override any gcc2 internal prototype to avoid an error.  */
10247 #ifdef __cplusplus
10248 extern "C"
10249 #endif
10250 /* We use char because int might match the return type of a gcc2
10251    builtin and then its argument prototype would still apply.  */
10252 char shmat ();
10253 char (*f) ();
10254
10255 int
10256 main ()
10257 {
10258 /* The GNU C library defines this for functions which it implements
10259     to always fail with ENOSYS.  Some functions are actually named
10260     something starting with __ and the normal name is an alias.  */
10261 #if defined (__stub_shmat) || defined (__stub___shmat)
10262 choke me
10263 #else
10264 f = shmat;
10265 #endif
10266
10267   ;
10268   return 0;
10269 }
10270 _ACEOF
10271 rm -f conftest.$ac_objext conftest$ac_exeext
10272 if { (eval echo "$as_me:10272: \"$ac_link\"") >&5
10273   (eval $ac_link) 2>&5
10274   ac_status=$?
10275   echo "$as_me:10275: \$? = $ac_status" >&5
10276   (exit $ac_status); } &&
10277          { ac_try='test -s conftest$ac_exeext'
10278   { (eval echo "$as_me:10278: \"$ac_try\"") >&5
10279   (eval $ac_try) 2>&5
10280   ac_status=$?
10281   echo "$as_me:10281: \$? = $ac_status" >&5
10282   (exit $ac_status); }; }; then
10283   ac_cv_func_shmat=yes
10284 else
10285   echo "$as_me: failed program was:" >&5
10286 cat conftest.$ac_ext >&5
10287 ac_cv_func_shmat=no
10288 fi
10289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10290 fi
10291 echo "$as_me:10291: result: $ac_cv_func_shmat" >&5
10292 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10293
10294     if test $ac_cv_func_shmat = no; then
10295       echo "$as_me:10295: checking for shmat in -lipc" >&5
10296 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10297 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10298   echo $ECHO_N "(cached) $ECHO_C" >&6
10299 else
10300   ac_check_lib_save_LIBS=$LIBS
10301 LIBS="-lipc  $LIBS"
10302 cat >conftest.$ac_ext <<_ACEOF
10303 #line 10303 "configure"
10304 #include "confdefs.h"
10305
10306 /* Override any gcc2 internal prototype to avoid an error.  */
10307 #ifdef __cplusplus
10308 extern "C"
10309 #endif
10310 /* We use char because int might match the return type of a gcc2
10311    builtin and then its argument prototype would still apply.  */
10312 char shmat ();
10313 int
10314 main ()
10315 {
10316 shmat ();
10317   ;
10318   return 0;
10319 }
10320 _ACEOF
10321 rm -f conftest.$ac_objext conftest$ac_exeext
10322 if { (eval echo "$as_me:10322: \"$ac_link\"") >&5
10323   (eval $ac_link) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit $ac_status); } &&
10327          { ac_try='test -s conftest$ac_exeext'
10328   { (eval echo "$as_me:10328: \"$ac_try\"") >&5
10329   (eval $ac_try) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit $ac_status); }; }; then
10333   ac_cv_lib_ipc_shmat=yes
10334 else
10335   echo "$as_me: failed program was:" >&5
10336 cat conftest.$ac_ext >&5
10337 ac_cv_lib_ipc_shmat=no
10338 fi
10339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10340 LIBS=$ac_check_lib_save_LIBS
10341 fi
10342 echo "$as_me:10342: result: $ac_cv_lib_ipc_shmat" >&5
10343 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10344 if test $ac_cv_lib_ipc_shmat = yes; then
10345   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10346 fi
10347
10348     fi
10349   fi
10350
10351   # Check for libraries that X11R6 Xt/Xaw programs need.
10352   ac_save_LDFLAGS=$LDFLAGS
10353   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10354   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10355   # check for ICE first), but we must link in the order -lSM -lICE or
10356   # we get undefined symbols.  So assume we have SM if we have ICE.
10357   # These have to be linked with before -lX11, unlike the other
10358   # libraries we check for below, so use a different variable.
10359   # John Interrante, Karl Berry
10360   echo "$as_me:10360: checking for IceConnectionNumber in -lICE" >&5
10361 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10362 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10363   echo $ECHO_N "(cached) $ECHO_C" >&6
10364 else
10365   ac_check_lib_save_LIBS=$LIBS
10366 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10367 cat >conftest.$ac_ext <<_ACEOF
10368 #line 10368 "configure"
10369 #include "confdefs.h"
10370
10371 /* Override any gcc2 internal prototype to avoid an error.  */
10372 #ifdef __cplusplus
10373 extern "C"
10374 #endif
10375 /* We use char because int might match the return type of a gcc2
10376    builtin and then its argument prototype would still apply.  */
10377 char IceConnectionNumber ();
10378 int
10379 main ()
10380 {
10381 IceConnectionNumber ();
10382   ;
10383   return 0;
10384 }
10385 _ACEOF
10386 rm -f conftest.$ac_objext conftest$ac_exeext
10387 if { (eval echo "$as_me:10387: \"$ac_link\"") >&5
10388   (eval $ac_link) 2>&5
10389   ac_status=$?
10390   echo "$as_me:10390: \$? = $ac_status" >&5
10391   (exit $ac_status); } &&
10392          { ac_try='test -s conftest$ac_exeext'
10393   { (eval echo "$as_me:10393: \"$ac_try\"") >&5
10394   (eval $ac_try) 2>&5
10395   ac_status=$?
10396   echo "$as_me:10396: \$? = $ac_status" >&5
10397   (exit $ac_status); }; }; then
10398   ac_cv_lib_ICE_IceConnectionNumber=yes
10399 else
10400   echo "$as_me: failed program was:" >&5
10401 cat conftest.$ac_ext >&5
10402 ac_cv_lib_ICE_IceConnectionNumber=no
10403 fi
10404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10405 LIBS=$ac_check_lib_save_LIBS
10406 fi
10407 echo "$as_me:10407: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10408 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10409 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10410   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10411 fi
10412
10413   LDFLAGS=$ac_save_LDFLAGS
10414
10415 fi
10416
10417 cf_x_athena=${cf_x_athena:-Xaw}
10418
10419 echo "$as_me:10419: checking if you want to link with Xaw 3d library" >&5
10420 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10421 withval=
10422
10423 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10424 if test "${with_Xaw3d+set}" = set; then
10425   withval="$with_Xaw3d"
10426
10427 fi;
10428 if test "$withval" = yes ; then
10429         cf_x_athena=Xaw3d
10430         echo "$as_me:10430: result: yes" >&5
10431 echo "${ECHO_T}yes" >&6
10432 else
10433         echo "$as_me:10433: result: no" >&5
10434 echo "${ECHO_T}no" >&6
10435 fi
10436
10437 echo "$as_me:10437: checking if you want to link with neXT Athena library" >&5
10438 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10439 withval=
10440
10441 # Check whether --with-neXtaw or --without-neXtaw was given.
10442 if test "${with_neXtaw+set}" = set; then
10443   withval="$with_neXtaw"
10444
10445 fi;
10446 if test "$withval" = yes ; then
10447         cf_x_athena=neXtaw
10448         echo "$as_me:10448: result: yes" >&5
10449 echo "${ECHO_T}yes" >&6
10450 else
10451         echo "$as_me:10451: result: no" >&5
10452 echo "${ECHO_T}no" >&6
10453 fi
10454
10455 echo "$as_me:10455: checking if you want to link with Athena-Plus library" >&5
10456 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10457 withval=
10458
10459 # Check whether --with-XawPlus or --without-XawPlus was given.
10460 if test "${with_XawPlus+set}" = set; then
10461   withval="$with_XawPlus"
10462
10463 fi;
10464 if test "$withval" = yes ; then
10465         cf_x_athena=XawPlus
10466         echo "$as_me:10466: result: yes" >&5
10467 echo "${ECHO_T}yes" >&6
10468 else
10469         echo "$as_me:10469: result: no" >&5
10470 echo "${ECHO_T}no" >&6
10471 fi
10472
10473 cf_x_athena_lib=""
10474
10475 if test "$PKG_CONFIG" != none ; then
10476         cf_athena_list=
10477         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10478         for cf_athena_pkg in \
10479                 $cf_athena_list \
10480                 ${cf_x_athena} \
10481                 ${cf_x_athena}-devel \
10482                 lib${cf_x_athena} \
10483                 lib${cf_x_athena}-devel
10484         do
10485
10486 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10487         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
10488
10489 echo "${as_me:-configure}:10489: testing found package $cf_athena_pkg ..." 1>&5
10490
10491         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10492         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10493         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10494
10495 echo "${as_me:-configure}:10495: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10496
10497         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10498
10499 echo "${as_me:-configure}:10499: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10500
10501 cf_fix_cppflags=no
10502 cf_new_cflags=
10503 cf_new_cppflags=
10504 cf_new_extra_cppflags=
10505
10506 for cf_add_cflags in $cf_pkgconfig_incs
10507 do
10508 case $cf_fix_cppflags in
10509 no)
10510         case $cf_add_cflags in #(vi
10511         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10512                 case $cf_add_cflags in
10513                 -D*)
10514                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10515
10516                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10517                                 && test -z "${cf_tst_cflags}" \
10518                                 && cf_fix_cppflags=yes
10519
10520                         if test $cf_fix_cppflags = yes ; then
10521                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10522                                 continue
10523                         elif test "${cf_tst_cflags}" = "\"'" ; then
10524                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10525                                 continue
10526                         fi
10527                         ;;
10528                 esac
10529                 case "$CPPFLAGS" in
10530                 *$cf_add_cflags) #(vi
10531                         ;;
10532                 *) #(vi
10533                         case $cf_add_cflags in #(vi
10534                         -D*)
10535                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10536
10537 CPPFLAGS=`echo "$CPPFLAGS" | \
10538         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10539                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10540
10541                                 ;;
10542                         esac
10543                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10544                         ;;
10545                 esac
10546                 ;;
10547         *)
10548                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10549                 ;;
10550         esac
10551         ;;
10552 yes)
10553         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10554
10555         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10556
10557         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10558                 && test -z "${cf_tst_cflags}" \
10559                 && cf_fix_cppflags=no
10560         ;;
10561 esac
10562 done
10563
10564 if test -n "$cf_new_cflags" ; then
10565
10566         CFLAGS="$CFLAGS $cf_new_cflags"
10567 fi
10568
10569 if test -n "$cf_new_cppflags" ; then
10570
10571         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10572 fi
10573
10574 if test -n "$cf_new_extra_cppflags" ; then
10575
10576         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10577 fi
10578
10579         LIBS="$cf_pkgconfig_libs $LIBS"
10580
10581                         cf_x_athena_lib="$cf_pkgconfig_libs"
10582
10583 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10584
10585                         cat >>confdefs.h <<EOF
10586 #define $cf_x_athena_LIBS 1
10587 EOF
10588
10589 echo "$as_me:10589: checking for usable $cf_x_athena/Xmu package" >&5
10590 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10591 if test "${cf_cv_xaw_compat+set}" = set; then
10592   echo $ECHO_N "(cached) $ECHO_C" >&6
10593 else
10594
10595 cat >conftest.$ac_ext <<_ACEOF
10596 #line 10596 "configure"
10597 #include "confdefs.h"
10598
10599 #include <X11/Xmu/CharSet.h>
10600
10601 int
10602 main ()
10603 {
10604
10605 int check = XmuCompareISOLatin1("big", "small")
10606
10607   ;
10608   return 0;
10609 }
10610 _ACEOF
10611 rm -f conftest.$ac_objext conftest$ac_exeext
10612 if { (eval echo "$as_me:10612: \"$ac_link\"") >&5
10613   (eval $ac_link) 2>&5
10614   ac_status=$?
10615   echo "$as_me:10615: \$? = $ac_status" >&5
10616   (exit $ac_status); } &&
10617          { ac_try='test -s conftest$ac_exeext'
10618   { (eval echo "$as_me:10618: \"$ac_try\"") >&5
10619   (eval $ac_try) 2>&5
10620   ac_status=$?
10621   echo "$as_me:10621: \$? = $ac_status" >&5
10622   (exit $ac_status); }; }; then
10623   cf_cv_xaw_compat=yes
10624 else
10625   echo "$as_me: failed program was:" >&5
10626 cat conftest.$ac_ext >&5
10627 cf_cv_xaw_compat=no
10628 fi
10629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10630 fi
10631 echo "$as_me:10631: result: $cf_cv_xaw_compat" >&5
10632 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10633
10634                         if test "$cf_cv_xaw_compat" = no
10635                         then
10636                                 # workaround for broken ".pc" files...
10637                                 case "$cf_x_athena_lib" in #(vi
10638                                 *-lXmu*) #(vi
10639                                         ;;
10640                                 *)
10641                                         test -n "$verbose" && echo "    work around broken package" 1>&6
10642
10643 echo "${as_me:-configure}:10643: testing work around broken package ..." 1>&5
10644
10645 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10646         test -n "$verbose" && echo "    found package xmu" 1>&6
10647
10648 echo "${as_me:-configure}:10648: testing found package xmu ..." 1>&5
10649
10650         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10651         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10652         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10653
10654 echo "${as_me:-configure}:10654: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10655
10656         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10657
10658 echo "${as_me:-configure}:10658: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10659
10660 cf_fix_cppflags=no
10661 cf_new_cflags=
10662 cf_new_cppflags=
10663 cf_new_extra_cppflags=
10664
10665 for cf_add_cflags in $cf_pkgconfig_incs
10666 do
10667 case $cf_fix_cppflags in
10668 no)
10669         case $cf_add_cflags in #(vi
10670         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10671                 case $cf_add_cflags in
10672                 -D*)
10673                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10674
10675                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10676                                 && test -z "${cf_tst_cflags}" \
10677                                 && cf_fix_cppflags=yes
10678
10679                         if test $cf_fix_cppflags = yes ; then
10680                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10681                                 continue
10682                         elif test "${cf_tst_cflags}" = "\"'" ; then
10683                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10684                                 continue
10685                         fi
10686                         ;;
10687                 esac
10688                 case "$CPPFLAGS" in
10689                 *$cf_add_cflags) #(vi
10690                         ;;
10691                 *) #(vi
10692                         case $cf_add_cflags in #(vi
10693                         -D*)
10694                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10695
10696 CPPFLAGS=`echo "$CPPFLAGS" | \
10697         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10698                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10699
10700                                 ;;
10701                         esac
10702                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10703                         ;;
10704                 esac
10705                 ;;
10706         *)
10707                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10708                 ;;
10709         esac
10710         ;;
10711 yes)
10712         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10713
10714         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10715
10716         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10717                 && test -z "${cf_tst_cflags}" \
10718                 && cf_fix_cppflags=no
10719         ;;
10720 esac
10721 done
10722
10723 if test -n "$cf_new_cflags" ; then
10724
10725         CFLAGS="$CFLAGS $cf_new_cflags"
10726 fi
10727
10728 if test -n "$cf_new_cppflags" ; then
10729
10730         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10731 fi
10732
10733 if test -n "$cf_new_extra_cppflags" ; then
10734
10735         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10736 fi
10737
10738         LIBS="$cf_pkgconfig_libs $LIBS"
10739         :
10740 else
10741
10742 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10743
10744 echo "${as_me:-configure}:10744: testing ...before $LIBS ..." 1>&5
10745
10746 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
10747 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10748
10749 echo "${as_me:-configure}:10749: testing ...after  $LIBS ..." 1>&5
10750
10751 fi
10752
10753                                         ;;
10754                                 esac
10755                         fi
10756
10757                         break
10758 else
10759         :
10760 fi
10761
10762         done
10763 fi
10764
10765 if test -z "$cf_x_athena_lib" ; then
10766
10767 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10768         test -n "$verbose" && echo "    found package Xext" 1>&6
10769
10770 echo "${as_me:-configure}:10770: testing found package Xext ..." 1>&5
10771
10772         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10773         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
10774         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10775
10776 echo "${as_me:-configure}:10776: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10777
10778         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10779
10780 echo "${as_me:-configure}:10780: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10781
10782 cf_fix_cppflags=no
10783 cf_new_cflags=
10784 cf_new_cppflags=
10785 cf_new_extra_cppflags=
10786
10787 for cf_add_cflags in $cf_pkgconfig_incs
10788 do
10789 case $cf_fix_cppflags in
10790 no)
10791         case $cf_add_cflags in #(vi
10792         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10793                 case $cf_add_cflags in
10794                 -D*)
10795                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10796
10797                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10798                                 && test -z "${cf_tst_cflags}" \
10799                                 && cf_fix_cppflags=yes
10800
10801                         if test $cf_fix_cppflags = yes ; then
10802                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10803                                 continue
10804                         elif test "${cf_tst_cflags}" = "\"'" ; then
10805                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10806                                 continue
10807                         fi
10808                         ;;
10809                 esac
10810                 case "$CPPFLAGS" in
10811                 *$cf_add_cflags) #(vi
10812                         ;;
10813                 *) #(vi
10814                         case $cf_add_cflags in #(vi
10815                         -D*)
10816                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10817
10818 CPPFLAGS=`echo "$CPPFLAGS" | \
10819         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10820                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10821
10822                                 ;;
10823                         esac
10824                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10825                         ;;
10826                 esac
10827                 ;;
10828         *)
10829                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10830                 ;;
10831         esac
10832         ;;
10833 yes)
10834         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10835
10836         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10837
10838         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10839                 && test -z "${cf_tst_cflags}" \
10840                 && cf_fix_cppflags=no
10841         ;;
10842 esac
10843 done
10844
10845 if test -n "$cf_new_cflags" ; then
10846
10847         CFLAGS="$CFLAGS $cf_new_cflags"
10848 fi
10849
10850 if test -n "$cf_new_cppflags" ; then
10851
10852         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10853 fi
10854
10855 if test -n "$cf_new_extra_cppflags" ; then
10856
10857         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10858 fi
10859
10860         LIBS="$cf_pkgconfig_libs $LIBS"
10861         :
10862 else
10863
10864         echo "$as_me:10864: checking for XextCreateExtension in -lXext" >&5
10865 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10866 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10867   echo $ECHO_N "(cached) $ECHO_C" >&6
10868 else
10869   ac_check_lib_save_LIBS=$LIBS
10870 LIBS="-lXext  $LIBS"
10871 cat >conftest.$ac_ext <<_ACEOF
10872 #line 10872 "configure"
10873 #include "confdefs.h"
10874
10875 /* Override any gcc2 internal prototype to avoid an error.  */
10876 #ifdef __cplusplus
10877 extern "C"
10878 #endif
10879 /* We use char because int might match the return type of a gcc2
10880    builtin and then its argument prototype would still apply.  */
10881 char XextCreateExtension ();
10882 int
10883 main ()
10884 {
10885 XextCreateExtension ();
10886   ;
10887   return 0;
10888 }
10889 _ACEOF
10890 rm -f conftest.$ac_objext conftest$ac_exeext
10891 if { (eval echo "$as_me:10891: \"$ac_link\"") >&5
10892   (eval $ac_link) 2>&5
10893   ac_status=$?
10894   echo "$as_me:10894: \$? = $ac_status" >&5
10895   (exit $ac_status); } &&
10896          { ac_try='test -s conftest$ac_exeext'
10897   { (eval echo "$as_me:10897: \"$ac_try\"") >&5
10898   (eval $ac_try) 2>&5
10899   ac_status=$?
10900   echo "$as_me:10900: \$? = $ac_status" >&5
10901   (exit $ac_status); }; }; then
10902   ac_cv_lib_Xext_XextCreateExtension=yes
10903 else
10904   echo "$as_me: failed program was:" >&5
10905 cat conftest.$ac_ext >&5
10906 ac_cv_lib_Xext_XextCreateExtension=no
10907 fi
10908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10909 LIBS=$ac_check_lib_save_LIBS
10910 fi
10911 echo "$as_me:10911: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10912 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10913 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10914   LIBS="-lXext $LIBS"
10915 fi
10916
10917 fi
10918
10919 cf_have_X_LIBS=no
10920
10921 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
10922         test -n "$verbose" && echo "    found package xt" 1>&6
10923
10924 echo "${as_me:-configure}:10924: testing found package xt ..." 1>&5
10925
10926         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
10927         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
10928         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10929
10930 echo "${as_me:-configure}:10930: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10931
10932         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
10933
10934 echo "${as_me:-configure}:10934: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10935
10936 cf_fix_cppflags=no
10937 cf_new_cflags=
10938 cf_new_cppflags=
10939 cf_new_extra_cppflags=
10940
10941 for cf_add_cflags in $cf_pkgconfig_incs
10942 do
10943 case $cf_fix_cppflags in
10944 no)
10945         case $cf_add_cflags in #(vi
10946         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10947                 case $cf_add_cflags in
10948                 -D*)
10949                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10950
10951                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10952                                 && test -z "${cf_tst_cflags}" \
10953                                 && cf_fix_cppflags=yes
10954
10955                         if test $cf_fix_cppflags = yes ; then
10956                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10957                                 continue
10958                         elif test "${cf_tst_cflags}" = "\"'" ; then
10959                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10960                                 continue
10961                         fi
10962                         ;;
10963                 esac
10964                 case "$CPPFLAGS" in
10965                 *$cf_add_cflags) #(vi
10966                         ;;
10967                 *) #(vi
10968                         case $cf_add_cflags in #(vi
10969                         -D*)
10970                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10971
10972 CPPFLAGS=`echo "$CPPFLAGS" | \
10973         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10974                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10975
10976                                 ;;
10977                         esac
10978                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10979                         ;;
10980                 esac
10981                 ;;
10982         *)
10983                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10984                 ;;
10985         esac
10986         ;;
10987 yes)
10988         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10989
10990         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10991
10992         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10993                 && test -z "${cf_tst_cflags}" \
10994                 && cf_fix_cppflags=no
10995         ;;
10996 esac
10997 done
10998
10999 if test -n "$cf_new_cflags" ; then
11000
11001         CFLAGS="$CFLAGS $cf_new_cflags"
11002 fi
11003
11004 if test -n "$cf_new_cppflags" ; then
11005
11006         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11007 fi
11008
11009 if test -n "$cf_new_extra_cppflags" ; then
11010
11011         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11012 fi
11013
11014         LIBS="$cf_pkgconfig_libs $LIBS"
11015
11016         case "x$LIBS" in #(vi
11017         *-lX11*) #(vi
11018                 ;;
11019         *)
11020 # we have an "xt" package, but it may omit Xt's dependency on X11
11021 echo "$as_me:11021: checking for usable X dependency" >&5
11022 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11023 if test "${cf_cv_xt_x11_compat+set}" = set; then
11024   echo $ECHO_N "(cached) $ECHO_C" >&6
11025 else
11026
11027 cat >conftest.$ac_ext <<_ACEOF
11028 #line 11028 "configure"
11029 #include "confdefs.h"
11030
11031 #include <X11/Xlib.h>
11032
11033 int
11034 main ()
11035 {
11036
11037         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11038         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11039         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11040         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11041
11042   ;
11043   return 0;
11044 }
11045 _ACEOF
11046 rm -f conftest.$ac_objext conftest$ac_exeext
11047 if { (eval echo "$as_me:11047: \"$ac_link\"") >&5
11048   (eval $ac_link) 2>&5
11049   ac_status=$?
11050   echo "$as_me:11050: \$? = $ac_status" >&5
11051   (exit $ac_status); } &&
11052          { ac_try='test -s conftest$ac_exeext'
11053   { (eval echo "$as_me:11053: \"$ac_try\"") >&5
11054   (eval $ac_try) 2>&5
11055   ac_status=$?
11056   echo "$as_me:11056: \$? = $ac_status" >&5
11057   (exit $ac_status); }; }; then
11058   cf_cv_xt_x11_compat=yes
11059 else
11060   echo "$as_me: failed program was:" >&5
11061 cat conftest.$ac_ext >&5
11062 cf_cv_xt_x11_compat=no
11063 fi
11064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11065 fi
11066 echo "$as_me:11066: result: $cf_cv_xt_x11_compat" >&5
11067 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11068                 if test "$cf_cv_xt_x11_compat" = no
11069                 then
11070                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11071
11072 echo "${as_me:-configure}:11072: testing work around broken X11 dependency ..." 1>&5
11073
11074                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11075
11076 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11077         test -n "$verbose" && echo "    found package x11" 1>&6
11078
11079 echo "${as_me:-configure}:11079: testing found package x11 ..." 1>&5
11080
11081         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11082         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11083         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11084
11085 echo "${as_me:-configure}:11085: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11086
11087         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11088
11089 echo "${as_me:-configure}:11089: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11090
11091 cf_fix_cppflags=no
11092 cf_new_cflags=
11093 cf_new_cppflags=
11094 cf_new_extra_cppflags=
11095
11096 for cf_add_cflags in $cf_pkgconfig_incs
11097 do
11098 case $cf_fix_cppflags in
11099 no)
11100         case $cf_add_cflags in #(vi
11101         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11102                 case $cf_add_cflags in
11103                 -D*)
11104                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11105
11106                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11107                                 && test -z "${cf_tst_cflags}" \
11108                                 && cf_fix_cppflags=yes
11109
11110                         if test $cf_fix_cppflags = yes ; then
11111                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11112                                 continue
11113                         elif test "${cf_tst_cflags}" = "\"'" ; then
11114                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11115                                 continue
11116                         fi
11117                         ;;
11118                 esac
11119                 case "$CPPFLAGS" in
11120                 *$cf_add_cflags) #(vi
11121                         ;;
11122                 *) #(vi
11123                         case $cf_add_cflags in #(vi
11124                         -D*)
11125                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11126
11127 CPPFLAGS=`echo "$CPPFLAGS" | \
11128         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11129                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11130
11131                                 ;;
11132                         esac
11133                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11134                         ;;
11135                 esac
11136                 ;;
11137         *)
11138                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11139                 ;;
11140         esac
11141         ;;
11142 yes)
11143         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11144
11145         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11146
11147         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11148                 && test -z "${cf_tst_cflags}" \
11149                 && cf_fix_cppflags=no
11150         ;;
11151 esac
11152 done
11153
11154 if test -n "$cf_new_cflags" ; then
11155
11156         CFLAGS="$CFLAGS $cf_new_cflags"
11157 fi
11158
11159 if test -n "$cf_new_cppflags" ; then
11160
11161         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11162 fi
11163
11164 if test -n "$cf_new_extra_cppflags" ; then
11165
11166         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11167 fi
11168
11169         LIBS="$cf_pkgconfig_libs $LIBS"
11170         :
11171 else
11172
11173 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11174
11175 echo "${as_me:-configure}:11175: testing ...before $LIBS ..." 1>&5
11176
11177 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
11178 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11179
11180 echo "${as_me:-configure}:11180: testing ...after  $LIBS ..." 1>&5
11181
11182 fi
11183
11184                 fi
11185                 ;;
11186         esac
11187
11188 echo "$as_me:11188: checking for usable X Toolkit package" >&5
11189 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11190 if test "${cf_cv_xt_ice_compat+set}" = set; then
11191   echo $ECHO_N "(cached) $ECHO_C" >&6
11192 else
11193
11194 cat >conftest.$ac_ext <<_ACEOF
11195 #line 11195 "configure"
11196 #include "confdefs.h"
11197
11198 #include <X11/Shell.h>
11199
11200 int
11201 main ()
11202 {
11203 int num = IceConnectionNumber(0)
11204
11205   ;
11206   return 0;
11207 }
11208 _ACEOF
11209 rm -f conftest.$ac_objext conftest$ac_exeext
11210 if { (eval echo "$as_me:11210: \"$ac_link\"") >&5
11211   (eval $ac_link) 2>&5
11212   ac_status=$?
11213   echo "$as_me:11213: \$? = $ac_status" >&5
11214   (exit $ac_status); } &&
11215          { ac_try='test -s conftest$ac_exeext'
11216   { (eval echo "$as_me:11216: \"$ac_try\"") >&5
11217   (eval $ac_try) 2>&5
11218   ac_status=$?
11219   echo "$as_me:11219: \$? = $ac_status" >&5
11220   (exit $ac_status); }; }; then
11221   cf_cv_xt_ice_compat=yes
11222 else
11223   echo "$as_me: failed program was:" >&5
11224 cat conftest.$ac_ext >&5
11225 cf_cv_xt_ice_compat=no
11226 fi
11227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11228 fi
11229 echo "$as_me:11229: result: $cf_cv_xt_ice_compat" >&5
11230 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11231
11232         if test "$cf_cv_xt_ice_compat" = no
11233         then
11234                 # workaround for broken ".pc" files used for X Toolkit.
11235                 case "x$X_PRE_LIBS" in #(vi
11236                 *-lICE*)
11237                         case "x$LIBS" in #(vi
11238                         *-lICE*) #(vi
11239                                 ;;
11240                         *)
11241                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11242
11243 echo "${as_me:-configure}:11243: testing work around broken ICE dependency ..." 1>&5
11244
11245 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11246         test -n "$verbose" && echo "    found package ice" 1>&6
11247
11248 echo "${as_me:-configure}:11248: testing found package ice ..." 1>&5
11249
11250         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11251         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11252         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11253
11254 echo "${as_me:-configure}:11254: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11255
11256         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11257
11258 echo "${as_me:-configure}:11258: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11259
11260 cf_fix_cppflags=no
11261 cf_new_cflags=
11262 cf_new_cppflags=
11263 cf_new_extra_cppflags=
11264
11265 for cf_add_cflags in $cf_pkgconfig_incs
11266 do
11267 case $cf_fix_cppflags in
11268 no)
11269         case $cf_add_cflags in #(vi
11270         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11271                 case $cf_add_cflags in
11272                 -D*)
11273                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11274
11275                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11276                                 && test -z "${cf_tst_cflags}" \
11277                                 && cf_fix_cppflags=yes
11278
11279                         if test $cf_fix_cppflags = yes ; then
11280                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11281                                 continue
11282                         elif test "${cf_tst_cflags}" = "\"'" ; then
11283                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11284                                 continue
11285                         fi
11286                         ;;
11287                 esac
11288                 case "$CPPFLAGS" in
11289                 *$cf_add_cflags) #(vi
11290                         ;;
11291                 *) #(vi
11292                         case $cf_add_cflags in #(vi
11293                         -D*)
11294                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11295
11296 CPPFLAGS=`echo "$CPPFLAGS" | \
11297         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11298                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11299
11300                                 ;;
11301                         esac
11302                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11303                         ;;
11304                 esac
11305                 ;;
11306         *)
11307                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11308                 ;;
11309         esac
11310         ;;
11311 yes)
11312         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11313
11314         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11315
11316         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11317                 && test -z "${cf_tst_cflags}" \
11318                 && cf_fix_cppflags=no
11319         ;;
11320 esac
11321 done
11322
11323 if test -n "$cf_new_cflags" ; then
11324
11325         CFLAGS="$CFLAGS $cf_new_cflags"
11326 fi
11327
11328 if test -n "$cf_new_cppflags" ; then
11329
11330         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11331 fi
11332
11333 if test -n "$cf_new_extra_cppflags" ; then
11334
11335         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11336 fi
11337
11338         LIBS="$cf_pkgconfig_libs $LIBS"
11339
11340 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11341         test -n "$verbose" && echo "    found package sm" 1>&6
11342
11343 echo "${as_me:-configure}:11343: testing found package sm ..." 1>&5
11344
11345         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11346         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11347         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11348
11349 echo "${as_me:-configure}:11349: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11350
11351         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11352
11353 echo "${as_me:-configure}:11353: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11354
11355 cf_fix_cppflags=no
11356 cf_new_cflags=
11357 cf_new_cppflags=
11358 cf_new_extra_cppflags=
11359
11360 for cf_add_cflags in $cf_pkgconfig_incs
11361 do
11362 case $cf_fix_cppflags in
11363 no)
11364         case $cf_add_cflags in #(vi
11365         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11366                 case $cf_add_cflags in
11367                 -D*)
11368                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11369
11370                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11371                                 && test -z "${cf_tst_cflags}" \
11372                                 && cf_fix_cppflags=yes
11373
11374                         if test $cf_fix_cppflags = yes ; then
11375                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11376                                 continue
11377                         elif test "${cf_tst_cflags}" = "\"'" ; then
11378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11379                                 continue
11380                         fi
11381                         ;;
11382                 esac
11383                 case "$CPPFLAGS" in
11384                 *$cf_add_cflags) #(vi
11385                         ;;
11386                 *) #(vi
11387                         case $cf_add_cflags in #(vi
11388                         -D*)
11389                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11390
11391 CPPFLAGS=`echo "$CPPFLAGS" | \
11392         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11393                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11394
11395                                 ;;
11396                         esac
11397                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11398                         ;;
11399                 esac
11400                 ;;
11401         *)
11402                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11403                 ;;
11404         esac
11405         ;;
11406 yes)
11407         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11408
11409         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11410
11411         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11412                 && test -z "${cf_tst_cflags}" \
11413                 && cf_fix_cppflags=no
11414         ;;
11415 esac
11416 done
11417
11418 if test -n "$cf_new_cflags" ; then
11419
11420         CFLAGS="$CFLAGS $cf_new_cflags"
11421 fi
11422
11423 if test -n "$cf_new_cppflags" ; then
11424
11425         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11426 fi
11427
11428 if test -n "$cf_new_extra_cppflags" ; then
11429
11430         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11431 fi
11432
11433         LIBS="$cf_pkgconfig_libs $LIBS"
11434         :
11435 else
11436         :
11437 fi
11438
11439 else
11440
11441 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11442
11443 echo "${as_me:-configure}:11443: testing ...before $LIBS ..." 1>&5
11444
11445 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
11446 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11447
11448 echo "${as_me:-configure}:11448: testing ...after  $LIBS ..." 1>&5
11449
11450 fi
11451
11452                                 ;;
11453                         esac
11454                         ;;
11455                 esac
11456         fi
11457
11458         cf_have_X_LIBS=yes
11459
11460 else
11461
11462         LDFLAGS="$X_LIBS $LDFLAGS"
11463
11464 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
11465
11466 echo "${as_me:-configure}:11466: testing checking additions to CFLAGS ..." 1>&5
11467
11468 cf_check_cflags="$CFLAGS"
11469 cf_check_cppflags="$CPPFLAGS"
11470
11471 cf_fix_cppflags=no
11472 cf_new_cflags=
11473 cf_new_cppflags=
11474 cf_new_extra_cppflags=
11475
11476 for cf_add_cflags in $X_CFLAGS
11477 do
11478 case $cf_fix_cppflags in
11479 no)
11480         case $cf_add_cflags in #(vi
11481         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11482                 case $cf_add_cflags in
11483                 -D*)
11484                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11485
11486                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11487                                 && test -z "${cf_tst_cflags}" \
11488                                 && cf_fix_cppflags=yes
11489
11490                         if test $cf_fix_cppflags = yes ; then
11491                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11492                                 continue
11493                         elif test "${cf_tst_cflags}" = "\"'" ; then
11494                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11495                                 continue
11496                         fi
11497                         ;;
11498                 esac
11499                 case "$CPPFLAGS" in
11500                 *$cf_add_cflags) #(vi
11501                         ;;
11502                 *) #(vi
11503                         case $cf_add_cflags in #(vi
11504                         -D*)
11505                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11506
11507 CPPFLAGS=`echo "$CPPFLAGS" | \
11508         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11509                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11510
11511                                 ;;
11512                         esac
11513                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11514                         ;;
11515                 esac
11516                 ;;
11517         *)
11518                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11519                 ;;
11520         esac
11521         ;;
11522 yes)
11523         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11524
11525         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11526
11527         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11528                 && test -z "${cf_tst_cflags}" \
11529                 && cf_fix_cppflags=no
11530         ;;
11531 esac
11532 done
11533
11534 if test -n "$cf_new_cflags" ; then
11535         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11536
11537 echo "${as_me:-configure}:11537: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11538
11539         CFLAGS="$CFLAGS $cf_new_cflags"
11540 fi
11541
11542 if test -n "$cf_new_cppflags" ; then
11543         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11544
11545 echo "${as_me:-configure}:11545: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11546
11547         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11548 fi
11549
11550 if test -n "$cf_new_extra_cppflags" ; then
11551         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11552
11553 echo "${as_me:-configure}:11553: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11554
11555         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11556 fi
11557
11558 if test "$cf_check_cflags" != "$CFLAGS" ; then
11559 cat >conftest.$ac_ext <<_ACEOF
11560 #line 11560 "configure"
11561 #include "confdefs.h"
11562 #include <stdio.h>
11563 int
11564 main ()
11565 {
11566 printf("Hello world");
11567   ;
11568   return 0;
11569 }
11570 _ACEOF
11571 rm -f conftest.$ac_objext conftest$ac_exeext
11572 if { (eval echo "$as_me:11572: \"$ac_link\"") >&5
11573   (eval $ac_link) 2>&5
11574   ac_status=$?
11575   echo "$as_me:11575: \$? = $ac_status" >&5
11576   (exit $ac_status); } &&
11577          { ac_try='test -s conftest$ac_exeext'
11578   { (eval echo "$as_me:11578: \"$ac_try\"") >&5
11579   (eval $ac_try) 2>&5
11580   ac_status=$?
11581   echo "$as_me:11581: \$? = $ac_status" >&5
11582   (exit $ac_status); }; }; then
11583   :
11584 else
11585   echo "$as_me: failed program was:" >&5
11586 cat conftest.$ac_ext >&5
11587 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11588
11589 echo "${as_me:-configure}:11589: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11590
11591          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11592                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
11593
11594 echo "${as_me:-configure}:11594: testing but keeping change to \$CPPFLAGS ..." 1>&5
11595
11596          fi
11597          CFLAGS="$cf_check_flags"
11598 fi
11599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11600 fi
11601
11602         echo "$as_me:11602: checking for XOpenDisplay" >&5
11603 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11604 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11605   echo $ECHO_N "(cached) $ECHO_C" >&6
11606 else
11607   cat >conftest.$ac_ext <<_ACEOF
11608 #line 11608 "configure"
11609 #include "confdefs.h"
11610 /* System header to define __stub macros and hopefully few prototypes,
11611     which can conflict with char XOpenDisplay (); below.  */
11612 #include <assert.h>
11613 /* Override any gcc2 internal prototype to avoid an error.  */
11614 #ifdef __cplusplus
11615 extern "C"
11616 #endif
11617 /* We use char because int might match the return type of a gcc2
11618    builtin and then its argument prototype would still apply.  */
11619 char XOpenDisplay ();
11620 char (*f) ();
11621
11622 int
11623 main ()
11624 {
11625 /* The GNU C library defines this for functions which it implements
11626     to always fail with ENOSYS.  Some functions are actually named
11627     something starting with __ and the normal name is an alias.  */
11628 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11629 choke me
11630 #else
11631 f = XOpenDisplay;
11632 #endif
11633
11634   ;
11635   return 0;
11636 }
11637 _ACEOF
11638 rm -f conftest.$ac_objext conftest$ac_exeext
11639 if { (eval echo "$as_me:11639: \"$ac_link\"") >&5
11640   (eval $ac_link) 2>&5
11641   ac_status=$?
11642   echo "$as_me:11642: \$? = $ac_status" >&5
11643   (exit $ac_status); } &&
11644          { ac_try='test -s conftest$ac_exeext'
11645   { (eval echo "$as_me:11645: \"$ac_try\"") >&5
11646   (eval $ac_try) 2>&5
11647   ac_status=$?
11648   echo "$as_me:11648: \$? = $ac_status" >&5
11649   (exit $ac_status); }; }; then
11650   ac_cv_func_XOpenDisplay=yes
11651 else
11652   echo "$as_me: failed program was:" >&5
11653 cat conftest.$ac_ext >&5
11654 ac_cv_func_XOpenDisplay=no
11655 fi
11656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11657 fi
11658 echo "$as_me:11658: result: $ac_cv_func_XOpenDisplay" >&5
11659 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11660 if test $ac_cv_func_XOpenDisplay = yes; then
11661   :
11662 else
11663
11664         echo "$as_me:11664: checking for XOpenDisplay in -lX11" >&5
11665 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11666 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11667   echo $ECHO_N "(cached) $ECHO_C" >&6
11668 else
11669   ac_check_lib_save_LIBS=$LIBS
11670 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11671 cat >conftest.$ac_ext <<_ACEOF
11672 #line 11672 "configure"
11673 #include "confdefs.h"
11674
11675 /* Override any gcc2 internal prototype to avoid an error.  */
11676 #ifdef __cplusplus
11677 extern "C"
11678 #endif
11679 /* We use char because int might match the return type of a gcc2
11680    builtin and then its argument prototype would still apply.  */
11681 char XOpenDisplay ();
11682 int
11683 main ()
11684 {
11685 XOpenDisplay ();
11686   ;
11687   return 0;
11688 }
11689 _ACEOF
11690 rm -f conftest.$ac_objext conftest$ac_exeext
11691 if { (eval echo "$as_me:11691: \"$ac_link\"") >&5
11692   (eval $ac_link) 2>&5
11693   ac_status=$?
11694   echo "$as_me:11694: \$? = $ac_status" >&5
11695   (exit $ac_status); } &&
11696          { ac_try='test -s conftest$ac_exeext'
11697   { (eval echo "$as_me:11697: \"$ac_try\"") >&5
11698   (eval $ac_try) 2>&5
11699   ac_status=$?
11700   echo "$as_me:11700: \$? = $ac_status" >&5
11701   (exit $ac_status); }; }; then
11702   ac_cv_lib_X11_XOpenDisplay=yes
11703 else
11704   echo "$as_me: failed program was:" >&5
11705 cat conftest.$ac_ext >&5
11706 ac_cv_lib_X11_XOpenDisplay=no
11707 fi
11708 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11709 LIBS=$ac_check_lib_save_LIBS
11710 fi
11711 echo "$as_me:11711: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11712 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11713 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
11714   LIBS="-lX11 $LIBS"
11715 fi
11716
11717 fi
11718
11719         echo "$as_me:11719: checking for XtAppInitialize" >&5
11720 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11721 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11722   echo $ECHO_N "(cached) $ECHO_C" >&6
11723 else
11724   cat >conftest.$ac_ext <<_ACEOF
11725 #line 11725 "configure"
11726 #include "confdefs.h"
11727 /* System header to define __stub macros and hopefully few prototypes,
11728     which can conflict with char XtAppInitialize (); below.  */
11729 #include <assert.h>
11730 /* Override any gcc2 internal prototype to avoid an error.  */
11731 #ifdef __cplusplus
11732 extern "C"
11733 #endif
11734 /* We use char because int might match the return type of a gcc2
11735    builtin and then its argument prototype would still apply.  */
11736 char XtAppInitialize ();
11737 char (*f) ();
11738
11739 int
11740 main ()
11741 {
11742 /* The GNU C library defines this for functions which it implements
11743     to always fail with ENOSYS.  Some functions are actually named
11744     something starting with __ and the normal name is an alias.  */
11745 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11746 choke me
11747 #else
11748 f = XtAppInitialize;
11749 #endif
11750
11751   ;
11752   return 0;
11753 }
11754 _ACEOF
11755 rm -f conftest.$ac_objext conftest$ac_exeext
11756 if { (eval echo "$as_me:11756: \"$ac_link\"") >&5
11757   (eval $ac_link) 2>&5
11758   ac_status=$?
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit $ac_status); } &&
11761          { ac_try='test -s conftest$ac_exeext'
11762   { (eval echo "$as_me:11762: \"$ac_try\"") >&5
11763   (eval $ac_try) 2>&5
11764   ac_status=$?
11765   echo "$as_me:11765: \$? = $ac_status" >&5
11766   (exit $ac_status); }; }; then
11767   ac_cv_func_XtAppInitialize=yes
11768 else
11769   echo "$as_me: failed program was:" >&5
11770 cat conftest.$ac_ext >&5
11771 ac_cv_func_XtAppInitialize=no
11772 fi
11773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11774 fi
11775 echo "$as_me:11775: result: $ac_cv_func_XtAppInitialize" >&5
11776 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11777 if test $ac_cv_func_XtAppInitialize = yes; then
11778   :
11779 else
11780
11781         echo "$as_me:11781: checking for XtAppInitialize in -lXt" >&5
11782 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11783 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11784   echo $ECHO_N "(cached) $ECHO_C" >&6
11785 else
11786   ac_check_lib_save_LIBS=$LIBS
11787 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11788 cat >conftest.$ac_ext <<_ACEOF
11789 #line 11789 "configure"
11790 #include "confdefs.h"
11791
11792 /* Override any gcc2 internal prototype to avoid an error.  */
11793 #ifdef __cplusplus
11794 extern "C"
11795 #endif
11796 /* We use char because int might match the return type of a gcc2
11797    builtin and then its argument prototype would still apply.  */
11798 char XtAppInitialize ();
11799 int
11800 main ()
11801 {
11802 XtAppInitialize ();
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f conftest.$ac_objext conftest$ac_exeext
11808 if { (eval echo "$as_me:11808: \"$ac_link\"") >&5
11809   (eval $ac_link) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit $ac_status); } &&
11813          { ac_try='test -s conftest$ac_exeext'
11814   { (eval echo "$as_me:11814: \"$ac_try\"") >&5
11815   (eval $ac_try) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit $ac_status); }; }; then
11819   ac_cv_lib_Xt_XtAppInitialize=yes
11820 else
11821   echo "$as_me: failed program was:" >&5
11822 cat conftest.$ac_ext >&5
11823 ac_cv_lib_Xt_XtAppInitialize=no
11824 fi
11825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11826 LIBS=$ac_check_lib_save_LIBS
11827 fi
11828 echo "$as_me:11828: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11829 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11830 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
11831   cat >>confdefs.h <<\EOF
11832 #define HAVE_LIBXT 1
11833 EOF
11834
11835                  cf_have_X_LIBS=Xt
11836                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11837 fi
11838
11839 fi
11840
11841 fi
11842
11843 if test $cf_have_X_LIBS = no ; then
11844         { echo "$as_me:11844: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11845 test program.  You will have to check and add the proper libraries by hand
11846 to makefile." >&5
11847 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11848 test program.  You will have to check and add the proper libraries by hand
11849 to makefile." >&2;}
11850 fi
11851
11852 cf_x_athena_root=$cf_x_athena
11853 cf_x_athena_inc=""
11854
11855 for cf_path in default \
11856         /usr/contrib/X11R6 \
11857         /usr/contrib/X11R5 \
11858         /usr/lib/X11R5 \
11859         /usr/local
11860 do
11861         if test -z "$cf_x_athena_inc" ; then
11862                 cf_save="$CPPFLAGS"
11863                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
11864                 if test $cf_path != default ; then
11865                         CPPFLAGS="$cf_save -I$cf_path/include"
11866                         echo "$as_me:11866: checking for $cf_test in $cf_path" >&5
11867 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
11868                 else
11869                         echo "$as_me:11869: checking for $cf_test" >&5
11870 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
11871                 fi
11872                 cat >conftest.$ac_ext <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11875
11876 #include <X11/Intrinsic.h>
11877 #include <$cf_test>
11878 int
11879 main ()
11880 {
11881
11882   ;
11883   return 0;
11884 }
11885 _ACEOF
11886 rm -f conftest.$ac_objext
11887 if { (eval echo "$as_me:11887: \"$ac_compile\"") >&5
11888   (eval $ac_compile) 2>&5
11889   ac_status=$?
11890   echo "$as_me:11890: \$? = $ac_status" >&5
11891   (exit $ac_status); } &&
11892          { ac_try='test -s conftest.$ac_objext'
11893   { (eval echo "$as_me:11893: \"$ac_try\"") >&5
11894   (eval $ac_try) 2>&5
11895   ac_status=$?
11896   echo "$as_me:11896: \$? = $ac_status" >&5
11897   (exit $ac_status); }; }; then
11898   cf_result=yes
11899 else
11900   echo "$as_me: failed program was:" >&5
11901 cat conftest.$ac_ext >&5
11902 cf_result=no
11903 fi
11904 rm -f conftest.$ac_objext conftest.$ac_ext
11905                 echo "$as_me:11905: result: $cf_result" >&5
11906 echo "${ECHO_T}$cf_result" >&6
11907                 if test "$cf_result" = yes ; then
11908                         cf_x_athena_inc=$cf_path
11909                         break
11910                 else
11911                         CPPFLAGS="$cf_save"
11912                 fi
11913         fi
11914 done
11915
11916 if test -z "$cf_x_athena_inc" ; then
11917         { echo "$as_me:11917: WARNING: Unable to successfully find Athena header files with test program" >&5
11918 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
11919 elif test "$cf_x_athena_inc" != default ; then
11920         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
11921 fi
11922
11923 cf_x_athena_root=$cf_x_athena
11924 cf_x_athena_lib=""
11925
11926 for cf_path in default \
11927         /usr/contrib/X11R6 \
11928         /usr/contrib/X11R5 \
11929         /usr/lib/X11R5 \
11930         /usr/local
11931 do
11932         for cf_lib in \
11933                 "-l$cf_x_athena_root -lXmu" \
11934                 "-l$cf_x_athena_root -lXpm -lXmu" \
11935                 "-l${cf_x_athena_root}_s -lXmu_s"
11936         do
11937                 if test -z "$cf_x_athena_lib" ; then
11938                         cf_save="$LIBS"
11939                         cf_test=XawSimpleMenuAddGlobalActions
11940                         if test $cf_path != default ; then
11941                                 LIBS="-L$cf_path/lib $cf_lib $LIBS"
11942                                 echo "$as_me:11942: checking for $cf_lib in $cf_path" >&5
11943 echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
11944                         else
11945                                 LIBS="$cf_lib $LIBS"
11946                                 echo "$as_me:11946: checking for $cf_test in $cf_lib" >&5
11947 echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
11948                         fi
11949                         cat >conftest.$ac_ext <<_ACEOF
11950 #line 11950 "configure"
11951 #include "confdefs.h"
11952
11953 #include <X11/Intrinsic.h>
11954 #include <X11/$cf_x_athena_root/SimpleMenu.h>
11955
11956 int
11957 main ()
11958 {
11959
11960 $cf_test((XtAppContext) 0)
11961   ;
11962   return 0;
11963 }
11964 _ACEOF
11965 rm -f conftest.$ac_objext conftest$ac_exeext
11966 if { (eval echo "$as_me:11966: \"$ac_link\"") >&5
11967   (eval $ac_link) 2>&5
11968   ac_status=$?
11969   echo "$as_me:11969: \$? = $ac_status" >&5
11970   (exit $ac_status); } &&
11971          { ac_try='test -s conftest$ac_exeext'
11972   { (eval echo "$as_me:11972: \"$ac_try\"") >&5
11973   (eval $ac_try) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); }; }; then
11977   cf_result=yes
11978 else
11979   echo "$as_me: failed program was:" >&5
11980 cat conftest.$ac_ext >&5
11981 cf_result=no
11982 fi
11983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11984                         echo "$as_me:11984: result: $cf_result" >&5
11985 echo "${ECHO_T}$cf_result" >&6
11986                         if test "$cf_result" = yes ; then
11987                                 cf_x_athena_lib="$cf_lib"
11988                                 break
11989                         fi
11990                         LIBS="$cf_save"
11991                 fi
11992         done
11993 done
11994
11995 if test -z "$cf_x_athena_lib" ; then
11996         { { echo "$as_me:11996: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
11997 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
11998    { (exit 1); exit 1; }; }
11999 fi
12000
12001 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12002
12003 cat >>confdefs.h <<EOF
12004 #define $cf_x_athena_LIBS 1
12005 EOF
12006
12007 fi
12008
12009 for ac_prog in xcurses-config
12010 do
12011   # Extract the first word of "$ac_prog", so it can be a program name with args.
12012 set dummy $ac_prog; ac_word=$2
12013 echo "$as_me:12013: checking for $ac_word" >&5
12014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12015 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
12016   echo $ECHO_N "(cached) $ECHO_C" >&6
12017 else
12018   case $XCURSES_CONFIG in
12019   [\\/]* | ?:[\\/]*)
12020   ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
12021   ;;
12022   *)
12023   ac_save_IFS=$IFS; IFS=$ac_path_separator
12024 ac_dummy="$PATH"
12025 for ac_dir in $ac_dummy; do
12026   IFS=$ac_save_IFS
12027   test -z "$ac_dir" && ac_dir=.
12028   if $as_executable_p "$ac_dir/$ac_word"; then
12029    ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
12030    echo "$as_me:12030: found $ac_dir/$ac_word" >&5
12031    break
12032 fi
12033 done
12034
12035   ;;
12036 esac
12037 fi
12038 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
12039
12040 if test -n "$XCURSES_CONFIG"; then
12041   echo "$as_me:12041: result: $XCURSES_CONFIG" >&5
12042 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12043 else
12044   echo "$as_me:12044: result: no" >&5
12045 echo "${ECHO_T}no" >&6
12046 fi
12047
12048   test -n "$XCURSES_CONFIG" && break
12049 done
12050 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
12051
12052 if test "$XCURSES_CONFIG" != none ; then
12053
12054 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12055 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12056
12057 cf_cv_lib_XCurses=yes
12058
12059 else
12060
12061 LDFLAGS="$LDFLAGS $X_LIBS"
12062
12063 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12064
12065 echo "${as_me:-configure}:12065: testing checking additions to CFLAGS ..." 1>&5
12066
12067 cf_check_cflags="$CFLAGS"
12068 cf_check_cppflags="$CPPFLAGS"
12069
12070 cf_fix_cppflags=no
12071 cf_new_cflags=
12072 cf_new_cppflags=
12073 cf_new_extra_cppflags=
12074
12075 for cf_add_cflags in $X_CFLAGS
12076 do
12077 case $cf_fix_cppflags in
12078 no)
12079         case $cf_add_cflags in #(vi
12080         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12081                 case $cf_add_cflags in
12082                 -D*)
12083                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12084
12085                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12086                                 && test -z "${cf_tst_cflags}" \
12087                                 && cf_fix_cppflags=yes
12088
12089                         if test $cf_fix_cppflags = yes ; then
12090                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12091                                 continue
12092                         elif test "${cf_tst_cflags}" = "\"'" ; then
12093                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12094                                 continue
12095                         fi
12096                         ;;
12097                 esac
12098                 case "$CPPFLAGS" in
12099                 *$cf_add_cflags) #(vi
12100                         ;;
12101                 *) #(vi
12102                         case $cf_add_cflags in #(vi
12103                         -D*)
12104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12105
12106 CPPFLAGS=`echo "$CPPFLAGS" | \
12107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12109
12110                                 ;;
12111                         esac
12112                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12113                         ;;
12114                 esac
12115                 ;;
12116         *)
12117                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12118                 ;;
12119         esac
12120         ;;
12121 yes)
12122         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12123
12124         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12125
12126         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12127                 && test -z "${cf_tst_cflags}" \
12128                 && cf_fix_cppflags=no
12129         ;;
12130 esac
12131 done
12132
12133 if test -n "$cf_new_cflags" ; then
12134         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12135
12136 echo "${as_me:-configure}:12136: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12137
12138         CFLAGS="$CFLAGS $cf_new_cflags"
12139 fi
12140
12141 if test -n "$cf_new_cppflags" ; then
12142         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12143
12144 echo "${as_me:-configure}:12144: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12145
12146         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12147 fi
12148
12149 if test -n "$cf_new_extra_cppflags" ; then
12150         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12151
12152 echo "${as_me:-configure}:12152: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12153
12154         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12155 fi
12156
12157 if test "$cf_check_cflags" != "$CFLAGS" ; then
12158 cat >conftest.$ac_ext <<_ACEOF
12159 #line 12159 "configure"
12160 #include "confdefs.h"
12161 #include <stdio.h>
12162 int
12163 main ()
12164 {
12165 printf("Hello world");
12166   ;
12167   return 0;
12168 }
12169 _ACEOF
12170 rm -f conftest.$ac_objext conftest$ac_exeext
12171 if { (eval echo "$as_me:12171: \"$ac_link\"") >&5
12172   (eval $ac_link) 2>&5
12173   ac_status=$?
12174   echo "$as_me:12174: \$? = $ac_status" >&5
12175   (exit $ac_status); } &&
12176          { ac_try='test -s conftest$ac_exeext'
12177   { (eval echo "$as_me:12177: \"$ac_try\"") >&5
12178   (eval $ac_try) 2>&5
12179   ac_status=$?
12180   echo "$as_me:12180: \$? = $ac_status" >&5
12181   (exit $ac_status); }; }; then
12182   :
12183 else
12184   echo "$as_me: failed program was:" >&5
12185 cat conftest.$ac_ext >&5
12186 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12187
12188 echo "${as_me:-configure}:12188: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12189
12190          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12191                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12192
12193 echo "${as_me:-configure}:12193: testing but keeping change to \$CPPFLAGS ..." 1>&5
12194
12195          fi
12196          CFLAGS="$cf_check_flags"
12197 fi
12198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12199 fi
12200
12201 echo "$as_me:12201: checking for XOpenDisplay in -lX11" >&5
12202 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12203 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12204   echo $ECHO_N "(cached) $ECHO_C" >&6
12205 else
12206   ac_check_lib_save_LIBS=$LIBS
12207 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12208 cat >conftest.$ac_ext <<_ACEOF
12209 #line 12209 "configure"
12210 #include "confdefs.h"
12211
12212 /* Override any gcc2 internal prototype to avoid an error.  */
12213 #ifdef __cplusplus
12214 extern "C"
12215 #endif
12216 /* We use char because int might match the return type of a gcc2
12217    builtin and then its argument prototype would still apply.  */
12218 char XOpenDisplay ();
12219 int
12220 main ()
12221 {
12222 XOpenDisplay ();
12223   ;
12224   return 0;
12225 }
12226 _ACEOF
12227 rm -f conftest.$ac_objext conftest$ac_exeext
12228 if { (eval echo "$as_me:12228: \"$ac_link\"") >&5
12229   (eval $ac_link) 2>&5
12230   ac_status=$?
12231   echo "$as_me:12231: \$? = $ac_status" >&5
12232   (exit $ac_status); } &&
12233          { ac_try='test -s conftest$ac_exeext'
12234   { (eval echo "$as_me:12234: \"$ac_try\"") >&5
12235   (eval $ac_try) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit $ac_status); }; }; then
12239   ac_cv_lib_X11_XOpenDisplay=yes
12240 else
12241   echo "$as_me: failed program was:" >&5
12242 cat conftest.$ac_ext >&5
12243 ac_cv_lib_X11_XOpenDisplay=no
12244 fi
12245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12246 LIBS=$ac_check_lib_save_LIBS
12247 fi
12248 echo "$as_me:12248: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12249 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12250 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12251   LIBS="-lX11 $LIBS"
12252 fi
12253
12254 echo "$as_me:12254: checking for XCurses library" >&5
12255 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12256 if test "${cf_cv_lib_XCurses+set}" = set; then
12257   echo $ECHO_N "(cached) $ECHO_C" >&6
12258 else
12259
12260 LIBS="-lXCurses $LIBS"
12261 cat >conftest.$ac_ext <<_ACEOF
12262 #line 12262 "configure"
12263 #include "confdefs.h"
12264
12265 #include <xcurses.h>
12266 char *XCursesProgramName = "test";
12267
12268 int
12269 main ()
12270 {
12271 XCursesExit();
12272   ;
12273   return 0;
12274 }
12275 _ACEOF
12276 rm -f conftest.$ac_objext conftest$ac_exeext
12277 if { (eval echo "$as_me:12277: \"$ac_link\"") >&5
12278   (eval $ac_link) 2>&5
12279   ac_status=$?
12280   echo "$as_me:12280: \$? = $ac_status" >&5
12281   (exit $ac_status); } &&
12282          { ac_try='test -s conftest$ac_exeext'
12283   { (eval echo "$as_me:12283: \"$ac_try\"") >&5
12284   (eval $ac_try) 2>&5
12285   ac_status=$?
12286   echo "$as_me:12286: \$? = $ac_status" >&5
12287   (exit $ac_status); }; }; then
12288   cf_cv_lib_XCurses=yes
12289 else
12290   echo "$as_me: failed program was:" >&5
12291 cat conftest.$ac_ext >&5
12292 cf_cv_lib_XCurses=no
12293 fi
12294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12295
12296 fi
12297 echo "$as_me:12297: result: $cf_cv_lib_XCurses" >&5
12298 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12299
12300 fi
12301
12302 if test $cf_cv_lib_XCurses = yes ; then
12303         cat >>confdefs.h <<\EOF
12304 #define UNIX 1
12305 EOF
12306
12307         cat >>confdefs.h <<\EOF
12308 #define XCURSES 1
12309 EOF
12310
12311         echo "$as_me:12311: checking for xcurses.h" >&5
12312 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12313 if test "${ac_cv_header_xcurses_h+set}" = set; then
12314   echo $ECHO_N "(cached) $ECHO_C" >&6
12315 else
12316   cat >conftest.$ac_ext <<_ACEOF
12317 #line 12317 "configure"
12318 #include "confdefs.h"
12319 #include <xcurses.h>
12320 _ACEOF
12321 if { (eval echo "$as_me:12321: \"$ac_cpp conftest.$ac_ext\"") >&5
12322   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12323   ac_status=$?
12324   egrep -v '^ *\+' conftest.er1 >conftest.err
12325   rm -f conftest.er1
12326   cat conftest.err >&5
12327   echo "$as_me:12327: \$? = $ac_status" >&5
12328   (exit $ac_status); } >/dev/null; then
12329   if test -s conftest.err; then
12330     ac_cpp_err=$ac_c_preproc_warn_flag
12331   else
12332     ac_cpp_err=
12333   fi
12334 else
12335   ac_cpp_err=yes
12336 fi
12337 if test -z "$ac_cpp_err"; then
12338   ac_cv_header_xcurses_h=yes
12339 else
12340   echo "$as_me: failed program was:" >&5
12341   cat conftest.$ac_ext >&5
12342   ac_cv_header_xcurses_h=no
12343 fi
12344 rm -f conftest.err conftest.$ac_ext
12345 fi
12346 echo "$as_me:12346: result: $ac_cv_header_xcurses_h" >&5
12347 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12348 if test $ac_cv_header_xcurses_h = yes; then
12349   cat >>confdefs.h <<\EOF
12350 #define HAVE_XCURSES 1
12351 EOF
12352
12353 fi
12354
12355 else
12356         { { echo "$as_me:12356: error: Cannot link with XCurses" >&5
12357 echo "$as_me: error: Cannot link with XCurses" >&2;}
12358    { (exit 1); exit 1; }; }
12359 fi
12360
12361         ;;
12362 esac
12363
12364 case $cf_cv_screen in #(vi
12365 pdcurses) #(vi
12366         ;;
12367 *)
12368         # look for curses-related libraries
12369
12370 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
12371 echo "$as_me:12371: checking for new_panel in -lpanel$cf_cv_libtype" >&5
12372 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
12373 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12374   echo $ECHO_N "(cached) $ECHO_C" >&6
12375 else
12376   ac_check_lib_save_LIBS=$LIBS
12377 LIBS="-lpanel$cf_cv_libtype  $LIBS"
12378 cat >conftest.$ac_ext <<_ACEOF
12379 #line 12379 "configure"
12380 #include "confdefs.h"
12381
12382 /* Override any gcc2 internal prototype to avoid an error.  */
12383 #ifdef __cplusplus
12384 extern "C"
12385 #endif
12386 /* We use char because int might match the return type of a gcc2
12387    builtin and then its argument prototype would still apply.  */
12388 char new_panel ();
12389 int
12390 main ()
12391 {
12392 new_panel ();
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 rm -f conftest.$ac_objext conftest$ac_exeext
12398 if { (eval echo "$as_me:12398: \"$ac_link\"") >&5
12399   (eval $ac_link) 2>&5
12400   ac_status=$?
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); } &&
12403          { ac_try='test -s conftest$ac_exeext'
12404   { (eval echo "$as_me:12404: \"$ac_try\"") >&5
12405   (eval $ac_try) 2>&5
12406   ac_status=$?
12407   echo "$as_me:12407: \$? = $ac_status" >&5
12408   (exit $ac_status); }; }; then
12409   eval "$as_ac_Lib=yes"
12410 else
12411   echo "$as_me: failed program was:" >&5
12412 cat conftest.$ac_ext >&5
12413 eval "$as_ac_Lib=no"
12414 fi
12415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12416 LIBS=$ac_check_lib_save_LIBS
12417 fi
12418 echo "$as_me:12418: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12419 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12420 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12421   cat >>confdefs.h <<EOF
12422 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
12423 EOF
12424
12425   LIBS="-lpanel$cf_cv_libtype $LIBS"
12426
12427 fi
12428
12429 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
12430 echo "$as_me:12430: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
12431 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
12432 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12433   echo $ECHO_N "(cached) $ECHO_C" >&6
12434 else
12435   ac_check_lib_save_LIBS=$LIBS
12436 LIBS="-lmenu$cf_cv_libtype  $LIBS"
12437 cat >conftest.$ac_ext <<_ACEOF
12438 #line 12438 "configure"
12439 #include "confdefs.h"
12440
12441 /* Override any gcc2 internal prototype to avoid an error.  */
12442 #ifdef __cplusplus
12443 extern "C"
12444 #endif
12445 /* We use char because int might match the return type of a gcc2
12446    builtin and then its argument prototype would still apply.  */
12447 char menu_driver ();
12448 int
12449 main ()
12450 {
12451 menu_driver ();
12452   ;
12453   return 0;
12454 }
12455 _ACEOF
12456 rm -f conftest.$ac_objext conftest$ac_exeext
12457 if { (eval echo "$as_me:12457: \"$ac_link\"") >&5
12458   (eval $ac_link) 2>&5
12459   ac_status=$?
12460   echo "$as_me:12460: \$? = $ac_status" >&5
12461   (exit $ac_status); } &&
12462          { ac_try='test -s conftest$ac_exeext'
12463   { (eval echo "$as_me:12463: \"$ac_try\"") >&5
12464   (eval $ac_try) 2>&5
12465   ac_status=$?
12466   echo "$as_me:12466: \$? = $ac_status" >&5
12467   (exit $ac_status); }; }; then
12468   eval "$as_ac_Lib=yes"
12469 else
12470   echo "$as_me: failed program was:" >&5
12471 cat conftest.$ac_ext >&5
12472 eval "$as_ac_Lib=no"
12473 fi
12474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12475 LIBS=$ac_check_lib_save_LIBS
12476 fi
12477 echo "$as_me:12477: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12478 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12479 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12480   cat >>confdefs.h <<EOF
12481 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
12482 EOF
12483
12484   LIBS="-lmenu$cf_cv_libtype $LIBS"
12485
12486 fi
12487
12488 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
12489 echo "$as_me:12489: checking for form_driver in -lform$cf_cv_libtype" >&5
12490 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
12491 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12492   echo $ECHO_N "(cached) $ECHO_C" >&6
12493 else
12494   ac_check_lib_save_LIBS=$LIBS
12495 LIBS="-lform$cf_cv_libtype  $LIBS"
12496 cat >conftest.$ac_ext <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12499
12500 /* Override any gcc2 internal prototype to avoid an error.  */
12501 #ifdef __cplusplus
12502 extern "C"
12503 #endif
12504 /* We use char because int might match the return type of a gcc2
12505    builtin and then its argument prototype would still apply.  */
12506 char form_driver ();
12507 int
12508 main ()
12509 {
12510 form_driver ();
12511   ;
12512   return 0;
12513 }
12514 _ACEOF
12515 rm -f conftest.$ac_objext conftest$ac_exeext
12516 if { (eval echo "$as_me:12516: \"$ac_link\"") >&5
12517   (eval $ac_link) 2>&5
12518   ac_status=$?
12519   echo "$as_me:12519: \$? = $ac_status" >&5
12520   (exit $ac_status); } &&
12521          { ac_try='test -s conftest$ac_exeext'
12522   { (eval echo "$as_me:12522: \"$ac_try\"") >&5
12523   (eval $ac_try) 2>&5
12524   ac_status=$?
12525   echo "$as_me:12525: \$? = $ac_status" >&5
12526   (exit $ac_status); }; }; then
12527   eval "$as_ac_Lib=yes"
12528 else
12529   echo "$as_me: failed program was:" >&5
12530 cat conftest.$ac_ext >&5
12531 eval "$as_ac_Lib=no"
12532 fi
12533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12534 LIBS=$ac_check_lib_save_LIBS
12535 fi
12536 echo "$as_me:12536: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12537 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12538 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12539   cat >>confdefs.h <<EOF
12540 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
12541 EOF
12542
12543   LIBS="-lform$cf_cv_libtype $LIBS"
12544
12545 fi
12546
12547         # look for curses-related headers
12548
12549 for ac_header in \
12550                 nc_alloc.h \
12551                 nomacros.h \
12552                 form.h \
12553                 menu.h \
12554                 panel.h \
12555                 term_entry.h \
12556
12557 do
12558 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12559 echo "$as_me:12559: checking for $ac_header" >&5
12560 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12561 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12562   echo $ECHO_N "(cached) $ECHO_C" >&6
12563 else
12564   cat >conftest.$ac_ext <<_ACEOF
12565 #line 12565 "configure"
12566 #include "confdefs.h"
12567 #include <$ac_header>
12568 _ACEOF
12569 if { (eval echo "$as_me:12569: \"$ac_cpp conftest.$ac_ext\"") >&5
12570   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12571   ac_status=$?
12572   egrep -v '^ *\+' conftest.er1 >conftest.err
12573   rm -f conftest.er1
12574   cat conftest.err >&5
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); } >/dev/null; then
12577   if test -s conftest.err; then
12578     ac_cpp_err=$ac_c_preproc_warn_flag
12579   else
12580     ac_cpp_err=
12581   fi
12582 else
12583   ac_cpp_err=yes
12584 fi
12585 if test -z "$ac_cpp_err"; then
12586   eval "$as_ac_Header=yes"
12587 else
12588   echo "$as_me: failed program was:" >&5
12589   cat conftest.$ac_ext >&5
12590   eval "$as_ac_Header=no"
12591 fi
12592 rm -f conftest.err conftest.$ac_ext
12593 fi
12594 echo "$as_me:12594: result: `eval echo '${'$as_ac_Header'}'`" >&5
12595 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12596 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12597   cat >>confdefs.h <<EOF
12598 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12599 EOF
12600
12601 fi
12602 done
12603
12604         ;;
12605 esac
12606
12607 echo "$as_me:12607: checking return type of signal handlers" >&5
12608 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12609 if test "${ac_cv_type_signal+set}" = set; then
12610   echo $ECHO_N "(cached) $ECHO_C" >&6
12611 else
12612   cat >conftest.$ac_ext <<_ACEOF
12613 #line 12613 "configure"
12614 #include "confdefs.h"
12615 #include <sys/types.h>
12616 #include <signal.h>
12617 #ifdef signal
12618 # undef signal
12619 #endif
12620 #ifdef __cplusplus
12621 extern "C" void (*signal (int, void (*)(int)))(int);
12622 #else
12623 void (*signal ()) ();
12624 #endif
12625
12626 int
12627 main ()
12628 {
12629 int i;
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f conftest.$ac_objext
12635 if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
12636   (eval $ac_compile) 2>&5
12637   ac_status=$?
12638   echo "$as_me:12638: \$? = $ac_status" >&5
12639   (exit $ac_status); } &&
12640          { ac_try='test -s conftest.$ac_objext'
12641   { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:12644: \$? = $ac_status" >&5
12645   (exit $ac_status); }; }; then
12646   ac_cv_type_signal=void
12647 else
12648   echo "$as_me: failed program was:" >&5
12649 cat conftest.$ac_ext >&5
12650 ac_cv_type_signal=int
12651 fi
12652 rm -f conftest.$ac_objext conftest.$ac_ext
12653 fi
12654 echo "$as_me:12654: result: $ac_cv_type_signal" >&5
12655 echo "${ECHO_T}$ac_cv_type_signal" >&6
12656
12657 cat >>confdefs.h <<EOF
12658 #define RETSIGTYPE $ac_cv_type_signal
12659 EOF
12660
12661 echo "$as_me:12661: checking for ANSI C header files" >&5
12662 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12663 if test "${ac_cv_header_stdc+set}" = set; then
12664   echo $ECHO_N "(cached) $ECHO_C" >&6
12665 else
12666   cat >conftest.$ac_ext <<_ACEOF
12667 #line 12667 "configure"
12668 #include "confdefs.h"
12669 #include <stdlib.h>
12670 #include <stdarg.h>
12671 #include <string.h>
12672 #include <float.h>
12673
12674 _ACEOF
12675 if { (eval echo "$as_me:12675: \"$ac_cpp conftest.$ac_ext\"") >&5
12676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12677   ac_status=$?
12678   egrep -v '^ *\+' conftest.er1 >conftest.err
12679   rm -f conftest.er1
12680   cat conftest.err >&5
12681   echo "$as_me:12681: \$? = $ac_status" >&5
12682   (exit $ac_status); } >/dev/null; then
12683   if test -s conftest.err; then
12684     ac_cpp_err=$ac_c_preproc_warn_flag
12685   else
12686     ac_cpp_err=
12687   fi
12688 else
12689   ac_cpp_err=yes
12690 fi
12691 if test -z "$ac_cpp_err"; then
12692   ac_cv_header_stdc=yes
12693 else
12694   echo "$as_me: failed program was:" >&5
12695   cat conftest.$ac_ext >&5
12696   ac_cv_header_stdc=no
12697 fi
12698 rm -f conftest.err conftest.$ac_ext
12699
12700 if test $ac_cv_header_stdc = yes; then
12701   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12702   cat >conftest.$ac_ext <<_ACEOF
12703 #line 12703 "configure"
12704 #include "confdefs.h"
12705 #include <string.h>
12706
12707 _ACEOF
12708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12709   egrep "memchr" >/dev/null 2>&1; then
12710   :
12711 else
12712   ac_cv_header_stdc=no
12713 fi
12714 rm -rf conftest*
12715
12716 fi
12717
12718 if test $ac_cv_header_stdc = yes; then
12719   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12720   cat >conftest.$ac_ext <<_ACEOF
12721 #line 12721 "configure"
12722 #include "confdefs.h"
12723 #include <stdlib.h>
12724
12725 _ACEOF
12726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12727   egrep "free" >/dev/null 2>&1; then
12728   :
12729 else
12730   ac_cv_header_stdc=no
12731 fi
12732 rm -rf conftest*
12733
12734 fi
12735
12736 if test $ac_cv_header_stdc = yes; then
12737   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12738   if test "$cross_compiling" = yes; then
12739   :
12740 else
12741   cat >conftest.$ac_ext <<_ACEOF
12742 #line 12742 "configure"
12743 #include "confdefs.h"
12744 #include <ctype.h>
12745 #if ((' ' & 0x0FF) == 0x020)
12746 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12747 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12748 #else
12749 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12750                      || ('j' <= (c) && (c) <= 'r') \
12751                      || ('s' <= (c) && (c) <= 'z'))
12752 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12753 #endif
12754
12755 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12756 int
12757 main ()
12758 {
12759   int i;
12760   for (i = 0; i < 256; i++)
12761     if (XOR (islower (i), ISLOWER (i))
12762         || toupper (i) != TOUPPER (i))
12763       $ac_main_return(2);
12764   $ac_main_return (0);
12765 }
12766 _ACEOF
12767 rm -f conftest$ac_exeext
12768 if { (eval echo "$as_me:12768: \"$ac_link\"") >&5
12769   (eval $ac_link) 2>&5
12770   ac_status=$?
12771   echo "$as_me:12771: \$? = $ac_status" >&5
12772   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12773   { (eval echo "$as_me:12773: \"$ac_try\"") >&5
12774   (eval $ac_try) 2>&5
12775   ac_status=$?
12776   echo "$as_me:12776: \$? = $ac_status" >&5
12777   (exit $ac_status); }; }; then
12778   :
12779 else
12780   echo "$as_me: program exited with status $ac_status" >&5
12781 echo "$as_me: failed program was:" >&5
12782 cat conftest.$ac_ext >&5
12783 ac_cv_header_stdc=no
12784 fi
12785 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12786 fi
12787 fi
12788 fi
12789 echo "$as_me:12789: result: $ac_cv_header_stdc" >&5
12790 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12791 if test $ac_cv_header_stdc = yes; then
12792
12793 cat >>confdefs.h <<\EOF
12794 #define STDC_HEADERS 1
12795 EOF
12796
12797 fi
12798
12799 echo "$as_me:12799: checking whether time.h and sys/time.h may both be included" >&5
12800 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12801 if test "${ac_cv_header_time+set}" = set; then
12802   echo $ECHO_N "(cached) $ECHO_C" >&6
12803 else
12804   cat >conftest.$ac_ext <<_ACEOF
12805 #line 12805 "configure"
12806 #include "confdefs.h"
12807 #include <sys/types.h>
12808 #include <sys/time.h>
12809 #include <time.h>
12810
12811 int
12812 main ()
12813 {
12814 if ((struct tm *) 0)
12815 return 0;
12816   ;
12817   return 0;
12818 }
12819 _ACEOF
12820 rm -f conftest.$ac_objext
12821 if { (eval echo "$as_me:12821: \"$ac_compile\"") >&5
12822   (eval $ac_compile) 2>&5
12823   ac_status=$?
12824   echo "$as_me:12824: \$? = $ac_status" >&5
12825   (exit $ac_status); } &&
12826          { ac_try='test -s conftest.$ac_objext'
12827   { (eval echo "$as_me:12827: \"$ac_try\"") >&5
12828   (eval $ac_try) 2>&5
12829   ac_status=$?
12830   echo "$as_me:12830: \$? = $ac_status" >&5
12831   (exit $ac_status); }; }; then
12832   ac_cv_header_time=yes
12833 else
12834   echo "$as_me: failed program was:" >&5
12835 cat conftest.$ac_ext >&5
12836 ac_cv_header_time=no
12837 fi
12838 rm -f conftest.$ac_objext conftest.$ac_ext
12839 fi
12840 echo "$as_me:12840: result: $ac_cv_header_time" >&5
12841 echo "${ECHO_T}$ac_cv_header_time" >&6
12842 if test $ac_cv_header_time = yes; then
12843
12844 cat >>confdefs.h <<\EOF
12845 #define TIME_WITH_SYS_TIME 1
12846 EOF
12847
12848 fi
12849
12850 for ac_header in \
12851 getopt.h \
12852 locale.h \
12853 math.h \
12854 stdarg.h \
12855 sys/ioctl.h \
12856 sys/select.h \
12857 sys/time.h \
12858 termios.h \
12859 unistd.h \
12860
12861 do
12862 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12863 echo "$as_me:12863: checking for $ac_header" >&5
12864 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12865 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12866   echo $ECHO_N "(cached) $ECHO_C" >&6
12867 else
12868   cat >conftest.$ac_ext <<_ACEOF
12869 #line 12869 "configure"
12870 #include "confdefs.h"
12871 #include <$ac_header>
12872 _ACEOF
12873 if { (eval echo "$as_me:12873: \"$ac_cpp conftest.$ac_ext\"") >&5
12874   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12875   ac_status=$?
12876   egrep -v '^ *\+' conftest.er1 >conftest.err
12877   rm -f conftest.er1
12878   cat conftest.err >&5
12879   echo "$as_me:12879: \$? = $ac_status" >&5
12880   (exit $ac_status); } >/dev/null; then
12881   if test -s conftest.err; then
12882     ac_cpp_err=$ac_c_preproc_warn_flag
12883   else
12884     ac_cpp_err=
12885   fi
12886 else
12887   ac_cpp_err=yes
12888 fi
12889 if test -z "$ac_cpp_err"; then
12890   eval "$as_ac_Header=yes"
12891 else
12892   echo "$as_me: failed program was:" >&5
12893   cat conftest.$ac_ext >&5
12894   eval "$as_ac_Header=no"
12895 fi
12896 rm -f conftest.err conftest.$ac_ext
12897 fi
12898 echo "$as_me:12898: result: `eval echo '${'$as_ac_Header'}'`" >&5
12899 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12901   cat >>confdefs.h <<EOF
12902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12903 EOF
12904
12905 fi
12906 done
12907
12908 for ac_func in \
12909 gettimeofday \
12910 strdup \
12911
12912 do
12913 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12914 echo "$as_me:12914: checking for $ac_func" >&5
12915 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12916 if eval "test \"\${$as_ac_var+set}\" = set"; then
12917   echo $ECHO_N "(cached) $ECHO_C" >&6
12918 else
12919   cat >conftest.$ac_ext <<_ACEOF
12920 #line 12920 "configure"
12921 #include "confdefs.h"
12922 /* System header to define __stub macros and hopefully few prototypes,
12923     which can conflict with char $ac_func (); below.  */
12924 #include <assert.h>
12925 /* Override any gcc2 internal prototype to avoid an error.  */
12926 #ifdef __cplusplus
12927 extern "C"
12928 #endif
12929 /* We use char because int might match the return type of a gcc2
12930    builtin and then its argument prototype would still apply.  */
12931 char $ac_func ();
12932 char (*f) ();
12933
12934 int
12935 main ()
12936 {
12937 /* The GNU C library defines this for functions which it implements
12938     to always fail with ENOSYS.  Some functions are actually named
12939     something starting with __ and the normal name is an alias.  */
12940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12941 choke me
12942 #else
12943 f = $ac_func;
12944 #endif
12945
12946   ;
12947   return 0;
12948 }
12949 _ACEOF
12950 rm -f conftest.$ac_objext conftest$ac_exeext
12951 if { (eval echo "$as_me:12951: \"$ac_link\"") >&5
12952   (eval $ac_link) 2>&5
12953   ac_status=$?
12954   echo "$as_me:12954: \$? = $ac_status" >&5
12955   (exit $ac_status); } &&
12956          { ac_try='test -s conftest$ac_exeext'
12957   { (eval echo "$as_me:12957: \"$ac_try\"") >&5
12958   (eval $ac_try) 2>&5
12959   ac_status=$?
12960   echo "$as_me:12960: \$? = $ac_status" >&5
12961   (exit $ac_status); }; }; then
12962   eval "$as_ac_var=yes"
12963 else
12964   echo "$as_me: failed program was:" >&5
12965 cat conftest.$ac_ext >&5
12966 eval "$as_ac_var=no"
12967 fi
12968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12969 fi
12970 echo "$as_me:12970: result: `eval echo '${'$as_ac_var'}'`" >&5
12971 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12972 if test `eval echo '${'$as_ac_var'}'` = yes; then
12973   cat >>confdefs.h <<EOF
12974 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12975 EOF
12976
12977 fi
12978 done
12979
12980 if test "$cf_enable_widec" = yes; then
12981
12982 for ac_func in \
12983 mblen \
12984 mbrlen \
12985 mbrtowc \
12986 mbsrtowcs \
12987 mbstowcs \
12988 mbtowc \
12989 wcsrtombs \
12990 wcstombs \
12991
12992 do
12993 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12994 echo "$as_me:12994: checking for $ac_func" >&5
12995 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12996 if eval "test \"\${$as_ac_var+set}\" = set"; then
12997   echo $ECHO_N "(cached) $ECHO_C" >&6
12998 else
12999   cat >conftest.$ac_ext <<_ACEOF
13000 #line 13000 "configure"
13001 #include "confdefs.h"
13002 /* System header to define __stub macros and hopefully few prototypes,
13003     which can conflict with char $ac_func (); below.  */
13004 #include <assert.h>
13005 /* Override any gcc2 internal prototype to avoid an error.  */
13006 #ifdef __cplusplus
13007 extern "C"
13008 #endif
13009 /* We use char because int might match the return type of a gcc2
13010    builtin and then its argument prototype would still apply.  */
13011 char $ac_func ();
13012 char (*f) ();
13013
13014 int
13015 main ()
13016 {
13017 /* The GNU C library defines this for functions which it implements
13018     to always fail with ENOSYS.  Some functions are actually named
13019     something starting with __ and the normal name is an alias.  */
13020 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13021 choke me
13022 #else
13023 f = $ac_func;
13024 #endif
13025
13026   ;
13027   return 0;
13028 }
13029 _ACEOF
13030 rm -f conftest.$ac_objext conftest$ac_exeext
13031 if { (eval echo "$as_me:13031: \"$ac_link\"") >&5
13032   (eval $ac_link) 2>&5
13033   ac_status=$?
13034   echo "$as_me:13034: \$? = $ac_status" >&5
13035   (exit $ac_status); } &&
13036          { ac_try='test -s conftest$ac_exeext'
13037   { (eval echo "$as_me:13037: \"$ac_try\"") >&5
13038   (eval $ac_try) 2>&5
13039   ac_status=$?
13040   echo "$as_me:13040: \$? = $ac_status" >&5
13041   (exit $ac_status); }; }; then
13042   eval "$as_ac_var=yes"
13043 else
13044   echo "$as_me: failed program was:" >&5
13045 cat conftest.$ac_ext >&5
13046 eval "$as_ac_var=no"
13047 fi
13048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13049 fi
13050 echo "$as_me:13050: result: `eval echo '${'$as_ac_var'}'`" >&5
13051 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13052 if test `eval echo '${'$as_ac_var'}'` = yes; then
13053   cat >>confdefs.h <<EOF
13054 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13055 EOF
13056
13057 fi
13058 done
13059
13060 fi
13061
13062 echo "$as_me:13062: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13063 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13064 if test "${cf_cv_need_xopen_extension+set}" = set; then
13065   echo $ECHO_N "(cached) $ECHO_C" >&6
13066 else
13067
13068 cat >conftest.$ac_ext <<_ACEOF
13069 #line 13069 "configure"
13070 #include "confdefs.h"
13071
13072 #include <stdlib.h>
13073 #include <${cf_cv_ncurses_header:-curses.h}>
13074 int
13075 main ()
13076 {
13077
13078 #if defined(NCURSES_VERSION_PATCH)
13079 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13080         make an error
13081 #endif
13082 #endif
13083         long x = winnstr(stdscr, "", 0);
13084         int x1, y1;
13085         getbegyx(stdscr, y1, x1)
13086   ;
13087   return 0;
13088 }
13089 _ACEOF
13090 rm -f conftest.$ac_objext conftest$ac_exeext
13091 if { (eval echo "$as_me:13091: \"$ac_link\"") >&5
13092   (eval $ac_link) 2>&5
13093   ac_status=$?
13094   echo "$as_me:13094: \$? = $ac_status" >&5
13095   (exit $ac_status); } &&
13096          { ac_try='test -s conftest$ac_exeext'
13097   { (eval echo "$as_me:13097: \"$ac_try\"") >&5
13098   (eval $ac_try) 2>&5
13099   ac_status=$?
13100   echo "$as_me:13100: \$? = $ac_status" >&5
13101   (exit $ac_status); }; }; then
13102   cf_cv_need_xopen_extension=no
13103 else
13104   echo "$as_me: failed program was:" >&5
13105 cat conftest.$ac_ext >&5
13106 cat >conftest.$ac_ext <<_ACEOF
13107 #line 13107 "configure"
13108 #include "confdefs.h"
13109
13110 #define _XOPEN_SOURCE_EXTENDED
13111 #include <stdlib.h>
13112 #include <${cf_cv_ncurses_header:-curses.h}>
13113 int
13114 main ()
13115 {
13116
13117 #ifdef NCURSES_VERSION
13118         cchar_t check;
13119         int check2 = curs_set((int)sizeof(check));
13120 #endif
13121         long x = winnstr(stdscr, "", 0);
13122         int x1, y1;
13123         getbegyx(stdscr, y1, x1)
13124   ;
13125   return 0;
13126 }
13127 _ACEOF
13128 rm -f conftest.$ac_objext conftest$ac_exeext
13129 if { (eval echo "$as_me:13129: \"$ac_link\"") >&5
13130   (eval $ac_link) 2>&5
13131   ac_status=$?
13132   echo "$as_me:13132: \$? = $ac_status" >&5
13133   (exit $ac_status); } &&
13134          { ac_try='test -s conftest$ac_exeext'
13135   { (eval echo "$as_me:13135: \"$ac_try\"") >&5
13136   (eval $ac_try) 2>&5
13137   ac_status=$?
13138   echo "$as_me:13138: \$? = $ac_status" >&5
13139   (exit $ac_status); }; }; then
13140   cf_cv_need_xopen_extension=yes
13141 else
13142   echo "$as_me: failed program was:" >&5
13143 cat conftest.$ac_ext >&5
13144 cf_cv_need_xopen_extension=unknown
13145 fi
13146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13147 fi
13148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13149 fi
13150 echo "$as_me:13150: result: $cf_cv_need_xopen_extension" >&5
13151 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13152 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13153
13154 echo "$as_me:13154: checking for term.h" >&5
13155 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13156 if test "${cf_cv_term_header+set}" = set; then
13157   echo $ECHO_N "(cached) $ECHO_C" >&6
13158 else
13159
13160 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13161 # for <term.h> if we do not find the variant.
13162
13163 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13164
13165 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13166 */*)
13167         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13168         cf_header_list="$cf_header_item $cf_header_list"
13169         ;;
13170 esac
13171
13172 for cf_header in $cf_header_list
13173 do
13174         cat >conftest.$ac_ext <<_ACEOF
13175 #line 13175 "configure"
13176 #include "confdefs.h"
13177
13178 #include <${cf_cv_ncurses_header:-curses.h}>
13179 #include <${cf_header}>
13180 int
13181 main ()
13182 {
13183 WINDOW *x
13184   ;
13185   return 0;
13186 }
13187 _ACEOF
13188 rm -f conftest.$ac_objext
13189 if { (eval echo "$as_me:13189: \"$ac_compile\"") >&5
13190   (eval $ac_compile) 2>&5
13191   ac_status=$?
13192   echo "$as_me:13192: \$? = $ac_status" >&5
13193   (exit $ac_status); } &&
13194          { ac_try='test -s conftest.$ac_objext'
13195   { (eval echo "$as_me:13195: \"$ac_try\"") >&5
13196   (eval $ac_try) 2>&5
13197   ac_status=$?
13198   echo "$as_me:13198: \$? = $ac_status" >&5
13199   (exit $ac_status); }; }; then
13200   cf_cv_term_header=$cf_header
13201          break
13202 else
13203   echo "$as_me: failed program was:" >&5
13204 cat conftest.$ac_ext >&5
13205 cf_cv_term_header=no
13206 fi
13207 rm -f conftest.$ac_objext conftest.$ac_ext
13208 done
13209
13210 case $cf_cv_term_header in #(vi
13211 no)
13212         # If curses is ncurses, some packagers still mess it up by trying to make
13213         # us use GNU termcap.  This handles the most common case.
13214         for cf_header in ncurses/term.h ncursesw/term.h
13215         do
13216                 cat >conftest.$ac_ext <<_ACEOF
13217 #line 13217 "configure"
13218 #include "confdefs.h"
13219
13220 #include <${cf_cv_ncurses_header:-curses.h}>
13221 #ifdef NCURSES_VERSION
13222 #include <${cf_header}>
13223 #else
13224 make an error
13225 #endif
13226 int
13227 main ()
13228 {
13229 WINDOW *x
13230   ;
13231   return 0;
13232 }
13233 _ACEOF
13234 rm -f conftest.$ac_objext
13235 if { (eval echo "$as_me:13235: \"$ac_compile\"") >&5
13236   (eval $ac_compile) 2>&5
13237   ac_status=$?
13238   echo "$as_me:13238: \$? = $ac_status" >&5
13239   (exit $ac_status); } &&
13240          { ac_try='test -s conftest.$ac_objext'
13241   { (eval echo "$as_me:13241: \"$ac_try\"") >&5
13242   (eval $ac_try) 2>&5
13243   ac_status=$?
13244   echo "$as_me:13244: \$? = $ac_status" >&5
13245   (exit $ac_status); }; }; then
13246   cf_cv_term_header=$cf_header
13247                          break
13248 else
13249   echo "$as_me: failed program was:" >&5
13250 cat conftest.$ac_ext >&5
13251 cf_cv_term_header=no
13252 fi
13253 rm -f conftest.$ac_objext conftest.$ac_ext
13254         done
13255         ;;
13256 esac
13257
13258 fi
13259 echo "$as_me:13259: result: $cf_cv_term_header" >&5
13260 echo "${ECHO_T}$cf_cv_term_header" >&6
13261
13262 case $cf_cv_term_header in #(vi
13263 term.h) #(vi
13264         cat >>confdefs.h <<\EOF
13265 #define HAVE_TERM_H 1
13266 EOF
13267
13268         ;;
13269 ncurses/term.h) #(vi
13270         cat >>confdefs.h <<\EOF
13271 #define HAVE_NCURSES_TERM_H 1
13272 EOF
13273
13274         ;;
13275 ncursesw/term.h)
13276         cat >>confdefs.h <<\EOF
13277 #define HAVE_NCURSESW_TERM_H 1
13278 EOF
13279
13280         ;;
13281 esac
13282
13283 echo "$as_me:13283: checking for unctrl.h" >&5
13284 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13285 if test "${cf_cv_unctrl_header+set}" = set; then
13286   echo $ECHO_N "(cached) $ECHO_C" >&6
13287 else
13288
13289 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13290 # for <unctrl.h> if we do not find the variant.
13291
13292 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13293
13294 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13295 */*)
13296         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13297         cf_header_list="$cf_header_item $cf_header_list"
13298         ;;
13299 esac
13300
13301 for cf_header in $cf_header_list
13302 do
13303         cat >conftest.$ac_ext <<_ACEOF
13304 #line 13304 "configure"
13305 #include "confdefs.h"
13306
13307 #include <${cf_cv_ncurses_header:-curses.h}>
13308 #include <${cf_header}>
13309 int
13310 main ()
13311 {
13312 WINDOW *x
13313   ;
13314   return 0;
13315 }
13316 _ACEOF
13317 rm -f conftest.$ac_objext
13318 if { (eval echo "$as_me:13318: \"$ac_compile\"") >&5
13319   (eval $ac_compile) 2>&5
13320   ac_status=$?
13321   echo "$as_me:13321: \$? = $ac_status" >&5
13322   (exit $ac_status); } &&
13323          { ac_try='test -s conftest.$ac_objext'
13324   { (eval echo "$as_me:13324: \"$ac_try\"") >&5
13325   (eval $ac_try) 2>&5
13326   ac_status=$?
13327   echo "$as_me:13327: \$? = $ac_status" >&5
13328   (exit $ac_status); }; }; then
13329   cf_cv_unctrl_header=$cf_header
13330          break
13331 else
13332   echo "$as_me: failed program was:" >&5
13333 cat conftest.$ac_ext >&5
13334 cf_cv_unctrl_header=no
13335 fi
13336 rm -f conftest.$ac_objext conftest.$ac_ext
13337 done
13338
13339 case $cf_cv_unctrl_header in #(vi
13340 no)
13341         { echo "$as_me:13341: WARNING: unctrl.h header not found" >&5
13342 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13343         ;;
13344 esac
13345
13346 fi
13347 echo "$as_me:13347: result: $cf_cv_unctrl_header" >&5
13348 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13349
13350 case $cf_cv_unctrl_header in #(vi
13351 unctrl.h) #(vi
13352         cat >>confdefs.h <<\EOF
13353 #define HAVE_UNCTRL_H 1
13354 EOF
13355
13356         ;;
13357 ncurses/unctrl.h) #(vi
13358         cat >>confdefs.h <<\EOF
13359 #define HAVE_NCURSES_UNCTRL_H 1
13360 EOF
13361
13362         ;;
13363 ncursesw/unctrl.h)
13364         cat >>confdefs.h <<\EOF
13365 #define HAVE_NCURSESW_UNCTRL_H 1
13366 EOF
13367
13368         ;;
13369 esac
13370
13371 for cf_func in \
13372 chgat \
13373 color_set \
13374 filter \
13375 getbegx \
13376 getcurx \
13377 getmaxx \
13378 getnstr \
13379 getparx \
13380 getwin \
13381 mvvline \
13382 mvwvline \
13383 napms \
13384 putwin \
13385 resize_term \
13386 resizeterm \
13387 ripoffline \
13388 scr_dump \
13389 setupterm \
13390 slk_color \
13391 slk_init \
13392 termattrs \
13393 tgetent \
13394 tigetnum \
13395 tigetstr \
13396 typeahead \
13397 use_default_colors \
13398 vw_printw \
13399 vsscanf \
13400 wchgat \
13401 winsstr \
13402 wresize \
13403 wsyncdown \
13404
13405 do
13406
13407 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13408
13409         echo "$as_me:13409: checking for ${cf_func}" >&5
13410 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13411
13412 echo "${as_me:-configure}:13412: testing ${cf_func} ..." 1>&5
13413
13414         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13415   echo $ECHO_N "(cached) $ECHO_C" >&6
13416 else
13417
13418                 eval cf_result='$ac_cv_func_'$cf_func
13419                 if test ".$cf_result" != ".no"; then
13420                         cat >conftest.$ac_ext <<_ACEOF
13421 #line 13421 "configure"
13422 #include "confdefs.h"
13423
13424 #ifdef HAVE_XCURSES
13425 #include <xcurses.h>
13426 char * XCursesProgramName = "test";
13427 #else
13428 #include <${cf_cv_ncurses_header:-curses.h}>
13429 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13430 #include <ncursesw/term.h>
13431 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13432 #include <ncurses/term.h>
13433 #elif defined(HAVE_TERM_H)
13434 #include <term.h>
13435 #endif
13436 #endif
13437
13438 int
13439 main ()
13440 {
13441
13442 #ifndef ${cf_func}
13443 long foo = (long)(&${cf_func});
13444 ${cf_cv_main_return:-return}(foo == 0);
13445 #endif
13446
13447   ;
13448   return 0;
13449 }
13450 _ACEOF
13451 rm -f conftest.$ac_objext conftest$ac_exeext
13452 if { (eval echo "$as_me:13452: \"$ac_link\"") >&5
13453   (eval $ac_link) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); } &&
13457          { ac_try='test -s conftest$ac_exeext'
13458   { (eval echo "$as_me:13458: \"$ac_try\"") >&5
13459   (eval $ac_try) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit $ac_status); }; }; then
13463   cf_result=yes
13464 else
13465   echo "$as_me: failed program was:" >&5
13466 cat conftest.$ac_ext >&5
13467 cf_result=no
13468 fi
13469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13470                 fi
13471                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13472
13473 fi
13474
13475         # use the computed/retrieved cache-value:
13476         eval 'cf_result=$cf_cv_func_'$cf_func
13477         echo "$as_me:13477: result: $cf_result" >&5
13478 echo "${ECHO_T}$cf_result" >&6
13479         if test $cf_result != no; then
13480                 cat >>confdefs.h <<EOF
13481 #define HAVE_${cf_tr_func} 1
13482 EOF
13483
13484         fi
13485 done
13486
13487 echo "$as_me:13487: checking for ncurses extended functions" >&5
13488 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
13489 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
13490   echo $ECHO_N "(cached) $ECHO_C" >&6
13491 else
13492
13493 cat >conftest.$ac_ext <<_ACEOF
13494 #line 13494 "configure"
13495 #include "confdefs.h"
13496
13497 #include <${cf_cv_ncurses_header:-curses.h}>
13498 int
13499 main ()
13500 {
13501
13502 int x = NCURSES_EXT_FUNCS
13503
13504   ;
13505   return 0;
13506 }
13507 _ACEOF
13508 rm -f conftest.$ac_objext
13509 if { (eval echo "$as_me:13509: \"$ac_compile\"") >&5
13510   (eval $ac_compile) 2>&5
13511   ac_status=$?
13512   echo "$as_me:13512: \$? = $ac_status" >&5
13513   (exit $ac_status); } &&
13514          { ac_try='test -s conftest.$ac_objext'
13515   { (eval echo "$as_me:13515: \"$ac_try\"") >&5
13516   (eval $ac_try) 2>&5
13517   ac_status=$?
13518   echo "$as_me:13518: \$? = $ac_status" >&5
13519   (exit $ac_status); }; }; then
13520   cf_cv_ncurses_ext_funcs=defined
13521 else
13522   echo "$as_me: failed program was:" >&5
13523 cat conftest.$ac_ext >&5
13524
13525 cat >conftest.$ac_ext <<_ACEOF
13526 #line 13526 "configure"
13527 #include "confdefs.h"
13528
13529 #include <${cf_cv_ncurses_header:-curses.h}>
13530 int
13531 main ()
13532 {
13533
13534         (void) assume_default_colors (0, 0);
13535         (void) curses_version ();
13536         (void) define_key (0, 0);
13537         (void) is_term_resized (0, 0);
13538         (void) key_defined (0);
13539         (void) keybound (0, 0);
13540         (void) keyok (0, 0);
13541         (void) resize_term (0, 0);
13542         (void) resizeterm (0, 0);
13543         (void) use_default_colors ();
13544         (void) use_extended_names (0);
13545         (void) wresize (0, 0, 0);
13546   ;
13547   return 0;
13548 }
13549 _ACEOF
13550 rm -f conftest.$ac_objext conftest$ac_exeext
13551 if { (eval echo "$as_me:13551: \"$ac_link\"") >&5
13552   (eval $ac_link) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit $ac_status); } &&
13556          { ac_try='test -s conftest$ac_exeext'
13557   { (eval echo "$as_me:13557: \"$ac_try\"") >&5
13558   (eval $ac_try) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit $ac_status); }; }; then
13562   cf_cv_ncurses_ext_funcs=yes
13563 else
13564   echo "$as_me: failed program was:" >&5
13565 cat conftest.$ac_ext >&5
13566 cf_cv_ncurses_ext_funcs=no
13567 fi
13568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13569
13570 fi
13571 rm -f conftest.$ac_objext conftest.$ac_ext
13572
13573 fi
13574 echo "$as_me:13574: result: $cf_cv_ncurses_ext_funcs" >&5
13575 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
13576 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
13577 #define NCURSES_EXT_FUNCS 1
13578 EOF
13579
13580 if test "$cf_enable_widec" = yes
13581 then
13582         echo "$as_me:13582: checking for wide-character functions" >&5
13583 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
13584 if test "${cf_cv_widechar_funcs+set}" = set; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 else
13587
13588         cat >conftest.$ac_ext <<_ACEOF
13589 #line 13589 "configure"
13590 #include "confdefs.h"
13591
13592 #include <${cf_cv_ncurses_header:-curses.h}>
13593 int
13594 main ()
13595 {
13596
13597                 static wchar_t src_wchar[2];
13598                 static cchar_t dst_cchar;
13599                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
13600
13601   ;
13602   return 0;
13603 }
13604 _ACEOF
13605 rm -f conftest.$ac_objext conftest$ac_exeext
13606 if { (eval echo "$as_me:13606: \"$ac_link\"") >&5
13607   (eval $ac_link) 2>&5
13608   ac_status=$?
13609   echo "$as_me:13609: \$? = $ac_status" >&5
13610   (exit $ac_status); } &&
13611          { ac_try='test -s conftest$ac_exeext'
13612   { (eval echo "$as_me:13612: \"$ac_try\"") >&5
13613   (eval $ac_try) 2>&5
13614   ac_status=$?
13615   echo "$as_me:13615: \$? = $ac_status" >&5
13616   (exit $ac_status); }; }; then
13617   cf_cv_widechar_funcs=yes
13618 else
13619   echo "$as_me: failed program was:" >&5
13620 cat conftest.$ac_ext >&5
13621 cf_cv_widechar_funcs=no
13622 fi
13623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13624
13625 fi
13626 echo "$as_me:13626: result: $cf_cv_widechar_funcs" >&5
13627 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
13628         if test "$cf_cv_widechar_funcs" != no ; then
13629                 cat >>confdefs.h <<\EOF
13630 #define USE_WIDEC_SUPPORT 1
13631 EOF
13632
13633         else
13634                 cat >>confdefs.h <<\EOF
13635 #define USE_WIDEC_SUPPORT 0
13636 EOF
13637
13638         fi
13639 else
13640         cat >>confdefs.h <<\EOF
13641 #define USE_WIDEC_SUPPORT 0
13642 EOF
13643
13644 fi
13645
13646 echo "$as_me:13646: checking if sys/time.h works with sys/select.h" >&5
13647 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13648 if test "${cf_cv_sys_time_select+set}" = set; then
13649   echo $ECHO_N "(cached) $ECHO_C" >&6
13650 else
13651
13652 cat >conftest.$ac_ext <<_ACEOF
13653 #line 13653 "configure"
13654 #include "confdefs.h"
13655
13656 #include <sys/types.h>
13657 #ifdef HAVE_SYS_TIME_H
13658 #include <sys/time.h>
13659 #endif
13660 #ifdef HAVE_SYS_SELECT_H
13661 #include <sys/select.h>
13662 #endif
13663
13664 int
13665 main ()
13666 {
13667
13668   ;
13669   return 0;
13670 }
13671 _ACEOF
13672 rm -f conftest.$ac_objext
13673 if { (eval echo "$as_me:13673: \"$ac_compile\"") >&5
13674   (eval $ac_compile) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit $ac_status); } &&
13678          { ac_try='test -s conftest.$ac_objext'
13679   { (eval echo "$as_me:13679: \"$ac_try\"") >&5
13680   (eval $ac_try) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit $ac_status); }; }; then
13684   cf_cv_sys_time_select=yes
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 cat conftest.$ac_ext >&5
13688 cf_cv_sys_time_select=no
13689 fi
13690 rm -f conftest.$ac_objext conftest.$ac_ext
13691
13692 fi
13693
13694 echo "$as_me:13694: result: $cf_cv_sys_time_select" >&5
13695 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13696 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13697 #define HAVE_SYS_TIME_SELECT 1
13698 EOF
13699
13700 echo "$as_me:13700: checking for function curses_version" >&5
13701 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
13702 if test "${cf_cv_func_curses_version+set}" = set; then
13703   echo $ECHO_N "(cached) $ECHO_C" >&6
13704 else
13705
13706 if test "$cross_compiling" = yes; then
13707   cf_cv_func_curses_version=unknown
13708 else
13709   cat >conftest.$ac_ext <<_ACEOF
13710 #line 13710 "configure"
13711 #include "confdefs.h"
13712
13713 #include <${cf_cv_ncurses_header:-curses.h}>
13714 int main()
13715 {
13716         char temp[1024];
13717         sprintf(temp, "%s\n", curses_version());
13718         ${cf_cv_main_return:-return}(0);
13719 }
13720
13721 _ACEOF
13722 rm -f conftest$ac_exeext
13723 if { (eval echo "$as_me:13723: \"$ac_link\"") >&5
13724   (eval $ac_link) 2>&5
13725   ac_status=$?
13726   echo "$as_me:13726: \$? = $ac_status" >&5
13727   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13728   { (eval echo "$as_me:13728: \"$ac_try\"") >&5
13729   (eval $ac_try) 2>&5
13730   ac_status=$?
13731   echo "$as_me:13731: \$? = $ac_status" >&5
13732   (exit $ac_status); }; }; then
13733   cf_cv_func_curses_version=yes
13734
13735 else
13736   echo "$as_me: program exited with status $ac_status" >&5
13737 echo "$as_me: failed program was:" >&5
13738 cat conftest.$ac_ext >&5
13739 cf_cv_func_curses_version=no
13740
13741 fi
13742 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13743 fi
13744 rm -f core
13745 fi
13746 echo "$as_me:13746: result: $cf_cv_func_curses_version" >&5
13747 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
13748 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
13749 #define HAVE_CURSES_VERSION 1
13750 EOF
13751
13752 echo "$as_me:13752: checking for ncurses wrap-prefix" >&5
13753 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
13754
13755 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
13756 if test "${with_ncurses_wrap_prefix+set}" = set; then
13757   withval="$with_ncurses_wrap_prefix"
13758   NCURSES_WRAP_PREFIX=$withval
13759 else
13760   NCURSES_WRAP_PREFIX=_nc_
13761 fi;
13762 echo "$as_me:13762: result: $NCURSES_WRAP_PREFIX" >&5
13763 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13764
13765 echo "$as_me:13765: checking for alternate character set array" >&5
13766 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
13767 if test "${cf_cv_curses_acs_map+set}" = set; then
13768   echo $ECHO_N "(cached) $ECHO_C" >&6
13769 else
13770
13771 cf_cv_curses_acs_map=unknown
13772 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
13773 do
13774 cat >conftest.$ac_ext <<_ACEOF
13775 #line 13775 "configure"
13776 #include "confdefs.h"
13777
13778 #include <${cf_cv_ncurses_header:-curses.h}>
13779
13780 int
13781 main ()
13782 {
13783
13784 $name['k'] = ACS_PLUS
13785
13786   ;
13787   return 0;
13788 }
13789 _ACEOF
13790 rm -f conftest.$ac_objext conftest$ac_exeext
13791 if { (eval echo "$as_me:13791: \"$ac_link\"") >&5
13792   (eval $ac_link) 2>&5
13793   ac_status=$?
13794   echo "$as_me:13794: \$? = $ac_status" >&5
13795   (exit $ac_status); } &&
13796          { ac_try='test -s conftest$ac_exeext'
13797   { (eval echo "$as_me:13797: \"$ac_try\"") >&5
13798   (eval $ac_try) 2>&5
13799   ac_status=$?
13800   echo "$as_me:13800: \$? = $ac_status" >&5
13801   (exit $ac_status); }; }; then
13802   cf_cv_curses_acs_map=$name; break
13803 else
13804   echo "$as_me: failed program was:" >&5
13805 cat conftest.$ac_ext >&5
13806 fi
13807 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13808 done
13809
13810 fi
13811 echo "$as_me:13811: result: $cf_cv_curses_acs_map" >&5
13812 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
13813
13814 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
13815 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
13816 EOF
13817
13818 if test "$cf_enable_widec" = yes; then
13819
13820 echo "$as_me:13820: checking for wide alternate character set array" >&5
13821 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
13822 if test "${cf_cv_curses_wacs_map+set}" = set; then
13823   echo $ECHO_N "(cached) $ECHO_C" >&6
13824 else
13825
13826         cf_cv_curses_wacs_map=unknown
13827         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
13828         do
13829         cat >conftest.$ac_ext <<_ACEOF
13830 #line 13830 "configure"
13831 #include "confdefs.h"
13832
13833 #ifndef _XOPEN_SOURCE_EXTENDED
13834 #define _XOPEN_SOURCE_EXTENDED
13835 #endif
13836 #include <${cf_cv_ncurses_header:-curses.h}>
13837 int
13838 main ()
13839 {
13840 void *foo = &($name['k'])
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 rm -f conftest.$ac_objext conftest$ac_exeext
13846 if { (eval echo "$as_me:13846: \"$ac_link\"") >&5
13847   (eval $ac_link) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); } &&
13851          { ac_try='test -s conftest$ac_exeext'
13852   { (eval echo "$as_me:13852: \"$ac_try\"") >&5
13853   (eval $ac_try) 2>&5
13854   ac_status=$?
13855   echo "$as_me:13855: \$? = $ac_status" >&5
13856   (exit $ac_status); }; }; then
13857   cf_cv_curses_wacs_map=$name
13858          break
13859 else
13860   echo "$as_me: failed program was:" >&5
13861 cat conftest.$ac_ext >&5
13862 fi
13863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13864         done
13865 fi
13866 echo "$as_me:13866: result: $cf_cv_curses_wacs_map" >&5
13867 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
13868
13869 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
13870 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
13871 EOF
13872
13873 echo "$as_me:13873: checking for wide alternate character constants" >&5
13874 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
13875 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
13876   echo $ECHO_N "(cached) $ECHO_C" >&6
13877 else
13878
13879 cf_cv_curses_wacs_symbols=no
13880 if test "$cf_cv_curses_wacs_map" != unknown
13881 then
13882         cat >conftest.$ac_ext <<_ACEOF
13883 #line 13883 "configure"
13884 #include "confdefs.h"
13885
13886 #ifndef _XOPEN_SOURCE_EXTENDED
13887 #define _XOPEN_SOURCE_EXTENDED
13888 #endif
13889 #include <${cf_cv_ncurses_header:-curses.h}>
13890 int
13891 main ()
13892 {
13893 cchar_t *foo = WACS_PLUS;
13894          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
13895   ;
13896   return 0;
13897 }
13898 _ACEOF
13899 rm -f conftest.$ac_objext conftest$ac_exeext
13900 if { (eval echo "$as_me:13900: \"$ac_link\"") >&5
13901   (eval $ac_link) 2>&5
13902   ac_status=$?
13903   echo "$as_me:13903: \$? = $ac_status" >&5
13904   (exit $ac_status); } &&
13905          { ac_try='test -s conftest$ac_exeext'
13906   { (eval echo "$as_me:13906: \"$ac_try\"") >&5
13907   (eval $ac_try) 2>&5
13908   ac_status=$?
13909   echo "$as_me:13909: \$? = $ac_status" >&5
13910   (exit $ac_status); }; }; then
13911   cf_cv_curses_wacs_symbols=yes
13912 else
13913   echo "$as_me: failed program was:" >&5
13914 cat conftest.$ac_ext >&5
13915 fi
13916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13917 else
13918         cat >conftest.$ac_ext <<_ACEOF
13919 #line 13919 "configure"
13920 #include "confdefs.h"
13921
13922 #ifndef _XOPEN_SOURCE_EXTENDED
13923 #define _XOPEN_SOURCE_EXTENDED
13924 #endif
13925 #include <${cf_cv_ncurses_header:-curses.h}>
13926 int
13927 main ()
13928 {
13929 cchar_t *foo = WACS_PLUS
13930   ;
13931   return 0;
13932 }
13933 _ACEOF
13934 rm -f conftest.$ac_objext conftest$ac_exeext
13935 if { (eval echo "$as_me:13935: \"$ac_link\"") >&5
13936   (eval $ac_link) 2>&5
13937   ac_status=$?
13938   echo "$as_me:13938: \$? = $ac_status" >&5
13939   (exit $ac_status); } &&
13940          { ac_try='test -s conftest$ac_exeext'
13941   { (eval echo "$as_me:13941: \"$ac_try\"") >&5
13942   (eval $ac_try) 2>&5
13943   ac_status=$?
13944   echo "$as_me:13944: \$? = $ac_status" >&5
13945   (exit $ac_status); }; }; then
13946   cf_cv_curses_wacs_symbols=yes
13947 else
13948   echo "$as_me: failed program was:" >&5
13949 cat conftest.$ac_ext >&5
13950 fi
13951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13952 fi
13953
13954 fi
13955 echo "$as_me:13955: result: $cf_cv_curses_wacs_symbols" >&5
13956 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
13957
13958 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
13959 #define CURSES_WACS_SYMBOLS 1
13960 EOF
13961
13962 fi
13963
13964 echo "$as_me:13964: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
13965 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
13966 cat >conftest.$ac_ext <<_ACEOF
13967 #line 13967 "configure"
13968 #include "confdefs.h"
13969
13970 #ifndef _XOPEN_SOURCE_EXTENDED
13971 #define _XOPEN_SOURCE_EXTENDED
13972 #endif
13973 #include <${cf_cv_ncurses_header:-curses.h}>
13974 int
13975 main ()
13976 {
13977
13978 attr_t foo
13979
13980   ;
13981   return 0;
13982 }
13983 _ACEOF
13984 rm -f conftest.$ac_objext
13985 if { (eval echo "$as_me:13985: \"$ac_compile\"") >&5
13986   (eval $ac_compile) 2>&5
13987   ac_status=$?
13988   echo "$as_me:13988: \$? = $ac_status" >&5
13989   (exit $ac_status); } &&
13990          { ac_try='test -s conftest.$ac_objext'
13991   { (eval echo "$as_me:13991: \"$ac_try\"") >&5
13992   (eval $ac_try) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit $ac_status); }; }; then
13996   cf_result=yes
13997 else
13998   echo "$as_me: failed program was:" >&5
13999 cat conftest.$ac_ext >&5
14000 cf_result=no
14001 fi
14002 rm -f conftest.$ac_objext conftest.$ac_ext
14003 echo "$as_me:14003: result: $cf_result" >&5
14004 echo "${ECHO_T}$cf_result" >&6
14005 if test $cf_result = yes ; then
14006
14007 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14008
14009         cat >>confdefs.h <<EOF
14010 #define $cf_result 1
14011 EOF
14012
14013 else
14014         cat >>confdefs.h <<EOF
14015 #define attr_t long
14016 EOF
14017
14018 fi
14019
14020 if test "$cf_enable_widec" = yes; then
14021
14022 # This is needed on Tru64 5.0 to declare mbstate_t
14023 echo "$as_me:14023: checking if we must include wchar.h to declare mbstate_t" >&5
14024 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14025 if test "${cf_cv_mbstate_t+set}" = set; then
14026   echo $ECHO_N "(cached) $ECHO_C" >&6
14027 else
14028
14029 cat >conftest.$ac_ext <<_ACEOF
14030 #line 14030 "configure"
14031 #include "confdefs.h"
14032
14033 #include <stdlib.h>
14034 #include <stdarg.h>
14035 #include <stdio.h>
14036 #ifdef HAVE_LIBUTF8_H
14037 #include <libutf8.h>
14038 #endif
14039 int
14040 main ()
14041 {
14042 mbstate_t state
14043   ;
14044   return 0;
14045 }
14046 _ACEOF
14047 rm -f conftest.$ac_objext
14048 if { (eval echo "$as_me:14048: \"$ac_compile\"") >&5
14049   (eval $ac_compile) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit $ac_status); } &&
14053          { ac_try='test -s conftest.$ac_objext'
14054   { (eval echo "$as_me:14054: \"$ac_try\"") >&5
14055   (eval $ac_try) 2>&5
14056   ac_status=$?
14057   echo "$as_me:14057: \$? = $ac_status" >&5
14058   (exit $ac_status); }; }; then
14059   cf_cv_mbstate_t=no
14060 else
14061   echo "$as_me: failed program was:" >&5
14062 cat conftest.$ac_ext >&5
14063 cat >conftest.$ac_ext <<_ACEOF
14064 #line 14064 "configure"
14065 #include "confdefs.h"
14066
14067 #include <stdlib.h>
14068 #include <stdarg.h>
14069 #include <stdio.h>
14070 #include <wchar.h>
14071 #ifdef HAVE_LIBUTF8_H
14072 #include <libutf8.h>
14073 #endif
14074 int
14075 main ()
14076 {
14077 mbstate_t value
14078   ;
14079   return 0;
14080 }
14081 _ACEOF
14082 rm -f conftest.$ac_objext
14083 if { (eval echo "$as_me:14083: \"$ac_compile\"") >&5
14084   (eval $ac_compile) 2>&5
14085   ac_status=$?
14086   echo "$as_me:14086: \$? = $ac_status" >&5
14087   (exit $ac_status); } &&
14088          { ac_try='test -s conftest.$ac_objext'
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_mbstate_t=yes
14095 else
14096   echo "$as_me: failed program was:" >&5
14097 cat conftest.$ac_ext >&5
14098 cf_cv_mbstate_t=unknown
14099 fi
14100 rm -f conftest.$ac_objext conftest.$ac_ext
14101 fi
14102 rm -f conftest.$ac_objext conftest.$ac_ext
14103 fi
14104 echo "$as_me:14104: result: $cf_cv_mbstate_t" >&5
14105 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14106
14107 if test "$cf_cv_mbstate_t" = yes ; then
14108         cat >>confdefs.h <<\EOF
14109 #define NEED_WCHAR_H 1
14110 EOF
14111
14112         NEED_WCHAR_H=1
14113 fi
14114
14115 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
14116 if test "$cf_cv_mbstate_t" = unknown ; then
14117         NCURSES_MBSTATE_T=1
14118 fi
14119
14120 # if we find mbstate_t in either place, use substitution to provide a fallback.
14121 if test "$cf_cv_mbstate_t" != unknown ; then
14122         NCURSES_OK_MBSTATE_T=1
14123 fi
14124
14125 # This is needed on Tru64 5.0 to declare wchar_t
14126 echo "$as_me:14126: checking if we must include wchar.h to declare wchar_t" >&5
14127 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
14128 if test "${cf_cv_wchar_t+set}" = set; then
14129   echo $ECHO_N "(cached) $ECHO_C" >&6
14130 else
14131
14132 cat >conftest.$ac_ext <<_ACEOF
14133 #line 14133 "configure"
14134 #include "confdefs.h"
14135
14136 #include <stdlib.h>
14137 #include <stdarg.h>
14138 #include <stdio.h>
14139 #ifdef HAVE_LIBUTF8_H
14140 #include <libutf8.h>
14141 #endif
14142 int
14143 main ()
14144 {
14145 wchar_t state
14146   ;
14147   return 0;
14148 }
14149 _ACEOF
14150 rm -f conftest.$ac_objext
14151 if { (eval echo "$as_me:14151: \"$ac_compile\"") >&5
14152   (eval $ac_compile) 2>&5
14153   ac_status=$?
14154   echo "$as_me:14154: \$? = $ac_status" >&5
14155   (exit $ac_status); } &&
14156          { ac_try='test -s conftest.$ac_objext'
14157   { (eval echo "$as_me:14157: \"$ac_try\"") >&5
14158   (eval $ac_try) 2>&5
14159   ac_status=$?
14160   echo "$as_me:14160: \$? = $ac_status" >&5
14161   (exit $ac_status); }; }; then
14162   cf_cv_wchar_t=no
14163 else
14164   echo "$as_me: failed program was:" >&5
14165 cat conftest.$ac_ext >&5
14166 cat >conftest.$ac_ext <<_ACEOF
14167 #line 14167 "configure"
14168 #include "confdefs.h"
14169
14170 #include <stdlib.h>
14171 #include <stdarg.h>
14172 #include <stdio.h>
14173 #include <wchar.h>
14174 #ifdef HAVE_LIBUTF8_H
14175 #include <libutf8.h>
14176 #endif
14177 int
14178 main ()
14179 {
14180 wchar_t value
14181   ;
14182   return 0;
14183 }
14184 _ACEOF
14185 rm -f conftest.$ac_objext
14186 if { (eval echo "$as_me:14186: \"$ac_compile\"") >&5
14187   (eval $ac_compile) 2>&5
14188   ac_status=$?
14189   echo "$as_me:14189: \$? = $ac_status" >&5
14190   (exit $ac_status); } &&
14191          { ac_try='test -s conftest.$ac_objext'
14192   { (eval echo "$as_me:14192: \"$ac_try\"") >&5
14193   (eval $ac_try) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); }; }; then
14197   cf_cv_wchar_t=yes
14198 else
14199   echo "$as_me: failed program was:" >&5
14200 cat conftest.$ac_ext >&5
14201 cf_cv_wchar_t=unknown
14202 fi
14203 rm -f conftest.$ac_objext conftest.$ac_ext
14204 fi
14205 rm -f conftest.$ac_objext conftest.$ac_ext
14206 fi
14207 echo "$as_me:14207: result: $cf_cv_wchar_t" >&5
14208 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14209
14210 if test "$cf_cv_wchar_t" = yes ; then
14211         cat >>confdefs.h <<\EOF
14212 #define NEED_WCHAR_H 1
14213 EOF
14214
14215         NEED_WCHAR_H=1
14216 fi
14217
14218 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14219 if test "$cf_cv_wchar_t" = unknown ; then
14220         NCURSES_WCHAR_T=1
14221 fi
14222
14223 # if we find wchar_t in either place, use substitution to provide a fallback.
14224 if test "$cf_cv_wchar_t" != unknown ; then
14225         NCURSES_OK_WCHAR_T=1
14226 fi
14227
14228 # This is needed on Tru64 5.0 to declare wint_t
14229 echo "$as_me:14229: checking if we must include wchar.h to declare wint_t" >&5
14230 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14231 if test "${cf_cv_wint_t+set}" = set; then
14232   echo $ECHO_N "(cached) $ECHO_C" >&6
14233 else
14234
14235 cat >conftest.$ac_ext <<_ACEOF
14236 #line 14236 "configure"
14237 #include "confdefs.h"
14238
14239 #include <stdlib.h>
14240 #include <stdarg.h>
14241 #include <stdio.h>
14242 #ifdef HAVE_LIBUTF8_H
14243 #include <libutf8.h>
14244 #endif
14245 int
14246 main ()
14247 {
14248 wint_t state
14249   ;
14250   return 0;
14251 }
14252 _ACEOF
14253 rm -f conftest.$ac_objext
14254 if { (eval echo "$as_me:14254: \"$ac_compile\"") >&5
14255   (eval $ac_compile) 2>&5
14256   ac_status=$?
14257   echo "$as_me:14257: \$? = $ac_status" >&5
14258   (exit $ac_status); } &&
14259          { ac_try='test -s conftest.$ac_objext'
14260   { (eval echo "$as_me:14260: \"$ac_try\"") >&5
14261   (eval $ac_try) 2>&5
14262   ac_status=$?
14263   echo "$as_me:14263: \$? = $ac_status" >&5
14264   (exit $ac_status); }; }; then
14265   cf_cv_wint_t=no
14266 else
14267   echo "$as_me: failed program was:" >&5
14268 cat conftest.$ac_ext >&5
14269 cat >conftest.$ac_ext <<_ACEOF
14270 #line 14270 "configure"
14271 #include "confdefs.h"
14272
14273 #include <stdlib.h>
14274 #include <stdarg.h>
14275 #include <stdio.h>
14276 #include <wchar.h>
14277 #ifdef HAVE_LIBUTF8_H
14278 #include <libutf8.h>
14279 #endif
14280 int
14281 main ()
14282 {
14283 wint_t value
14284   ;
14285   return 0;
14286 }
14287 _ACEOF
14288 rm -f conftest.$ac_objext
14289 if { (eval echo "$as_me:14289: \"$ac_compile\"") >&5
14290   (eval $ac_compile) 2>&5
14291   ac_status=$?
14292   echo "$as_me:14292: \$? = $ac_status" >&5
14293   (exit $ac_status); } &&
14294          { ac_try='test -s conftest.$ac_objext'
14295   { (eval echo "$as_me:14295: \"$ac_try\"") >&5
14296   (eval $ac_try) 2>&5
14297   ac_status=$?
14298   echo "$as_me:14298: \$? = $ac_status" >&5
14299   (exit $ac_status); }; }; then
14300   cf_cv_wint_t=yes
14301 else
14302   echo "$as_me: failed program was:" >&5
14303 cat conftest.$ac_ext >&5
14304 cf_cv_wint_t=unknown
14305 fi
14306 rm -f conftest.$ac_objext conftest.$ac_ext
14307 fi
14308 rm -f conftest.$ac_objext conftest.$ac_ext
14309 fi
14310 echo "$as_me:14310: result: $cf_cv_wint_t" >&5
14311 echo "${ECHO_T}$cf_cv_wint_t" >&6
14312
14313 if test "$cf_cv_wint_t" = yes ; then
14314         cat >>confdefs.h <<\EOF
14315 #define NEED_WCHAR_H 1
14316 EOF
14317
14318         NEED_WCHAR_H=1
14319 fi
14320
14321 # if we do not find wint_t in either place, use substitution to provide a fallback.
14322 if test "$cf_cv_wint_t" = unknown ; then
14323         NCURSES_WINT_T=1
14324 fi
14325
14326 # if we find wint_t in either place, use substitution to provide a fallback.
14327 if test "$cf_cv_wint_t" != unknown ; then
14328         NCURSES_OK_WINT_T=1
14329 fi
14330
14331         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
14332
14333 echo "$as_me:14333: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14334 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14335 cat >conftest.$ac_ext <<_ACEOF
14336 #line 14336 "configure"
14337 #include "confdefs.h"
14338
14339 #ifndef _XOPEN_SOURCE_EXTENDED
14340 #define _XOPEN_SOURCE_EXTENDED
14341 #endif
14342 #include <${cf_cv_ncurses_header:-curses.h}>
14343 int
14344 main ()
14345 {
14346
14347 mbstate_t foo
14348
14349   ;
14350   return 0;
14351 }
14352 _ACEOF
14353 rm -f conftest.$ac_objext
14354 if { (eval echo "$as_me:14354: \"$ac_compile\"") >&5
14355   (eval $ac_compile) 2>&5
14356   ac_status=$?
14357   echo "$as_me:14357: \$? = $ac_status" >&5
14358   (exit $ac_status); } &&
14359          { ac_try='test -s conftest.$ac_objext'
14360   { (eval echo "$as_me:14360: \"$ac_try\"") >&5
14361   (eval $ac_try) 2>&5
14362   ac_status=$?
14363   echo "$as_me:14363: \$? = $ac_status" >&5
14364   (exit $ac_status); }; }; then
14365   cf_result=yes
14366 else
14367   echo "$as_me: failed program was:" >&5
14368 cat conftest.$ac_ext >&5
14369 cf_result=no
14370 fi
14371 rm -f conftest.$ac_objext conftest.$ac_ext
14372 echo "$as_me:14372: result: $cf_result" >&5
14373 echo "${ECHO_T}$cf_result" >&6
14374 if test $cf_result = yes ; then
14375
14376 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14377
14378         cat >>confdefs.h <<EOF
14379 #define $cf_result 1
14380 EOF
14381
14382 else
14383         cat >>confdefs.h <<EOF
14384 #define mbstate_t long
14385 EOF
14386
14387 fi
14388
14389         fi
14390
14391         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
14392
14393 echo "$as_me:14393: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14394 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14395 cat >conftest.$ac_ext <<_ACEOF
14396 #line 14396 "configure"
14397 #include "confdefs.h"
14398
14399 #ifndef _XOPEN_SOURCE_EXTENDED
14400 #define _XOPEN_SOURCE_EXTENDED
14401 #endif
14402 #include <${cf_cv_ncurses_header:-curses.h}>
14403 int
14404 main ()
14405 {
14406
14407 wchar_t foo
14408
14409   ;
14410   return 0;
14411 }
14412 _ACEOF
14413 rm -f conftest.$ac_objext
14414 if { (eval echo "$as_me:14414: \"$ac_compile\"") >&5
14415   (eval $ac_compile) 2>&5
14416   ac_status=$?
14417   echo "$as_me:14417: \$? = $ac_status" >&5
14418   (exit $ac_status); } &&
14419          { ac_try='test -s conftest.$ac_objext'
14420   { (eval echo "$as_me:14420: \"$ac_try\"") >&5
14421   (eval $ac_try) 2>&5
14422   ac_status=$?
14423   echo "$as_me:14423: \$? = $ac_status" >&5
14424   (exit $ac_status); }; }; then
14425   cf_result=yes
14426 else
14427   echo "$as_me: failed program was:" >&5
14428 cat conftest.$ac_ext >&5
14429 cf_result=no
14430 fi
14431 rm -f conftest.$ac_objext conftest.$ac_ext
14432 echo "$as_me:14432: result: $cf_result" >&5
14433 echo "${ECHO_T}$cf_result" >&6
14434 if test $cf_result = yes ; then
14435
14436 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14437
14438         cat >>confdefs.h <<EOF
14439 #define $cf_result 1
14440 EOF
14441
14442 else
14443         cat >>confdefs.h <<EOF
14444 #define wchar_t long
14445 EOF
14446
14447 fi
14448
14449         fi
14450
14451         if test "$NCURSES_OK_WINT_T" = 0 ; then
14452
14453 echo "$as_me:14453: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14454 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14455 cat >conftest.$ac_ext <<_ACEOF
14456 #line 14456 "configure"
14457 #include "confdefs.h"
14458
14459 #ifndef _XOPEN_SOURCE_EXTENDED
14460 #define _XOPEN_SOURCE_EXTENDED
14461 #endif
14462 #include <${cf_cv_ncurses_header:-curses.h}>
14463 int
14464 main ()
14465 {
14466
14467 wint_t foo
14468
14469   ;
14470   return 0;
14471 }
14472 _ACEOF
14473 rm -f conftest.$ac_objext
14474 if { (eval echo "$as_me:14474: \"$ac_compile\"") >&5
14475   (eval $ac_compile) 2>&5
14476   ac_status=$?
14477   echo "$as_me:14477: \$? = $ac_status" >&5
14478   (exit $ac_status); } &&
14479          { ac_try='test -s conftest.$ac_objext'
14480   { (eval echo "$as_me:14480: \"$ac_try\"") >&5
14481   (eval $ac_try) 2>&5
14482   ac_status=$?
14483   echo "$as_me:14483: \$? = $ac_status" >&5
14484   (exit $ac_status); }; }; then
14485   cf_result=yes
14486 else
14487   echo "$as_me: failed program was:" >&5
14488 cat conftest.$ac_ext >&5
14489 cf_result=no
14490 fi
14491 rm -f conftest.$ac_objext conftest.$ac_ext
14492 echo "$as_me:14492: result: $cf_result" >&5
14493 echo "${ECHO_T}$cf_result" >&6
14494 if test $cf_result = yes ; then
14495
14496 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14497
14498         cat >>confdefs.h <<EOF
14499 #define $cf_result 1
14500 EOF
14501
14502 else
14503         cat >>confdefs.h <<EOF
14504 #define wint_t long
14505 EOF
14506
14507 fi
14508
14509         fi
14510 fi
14511
14512 echo "$as_me:14512: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
14513 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14514
14515 cat >conftest.$ac_ext <<_ACEOF
14516 #line 14516 "configure"
14517 #include "confdefs.h"
14518
14519 #ifdef HAVE_XCURSES
14520 #include <xcurses.h>
14521 char * XCursesProgramName = "test";
14522 #else
14523 #include <${cf_cv_ncurses_header:-curses.h}>
14524 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14525 #include <ncursesw/term.h>
14526 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14527 #include <ncurses/term.h>
14528 #elif defined(HAVE_TERM_H)
14529 #include <term.h>
14530 #endif
14531 #endif
14532
14533 int
14534 main ()
14535 {
14536
14537 void *foo = &(boolnames)
14538
14539   ;
14540   return 0;
14541 }
14542 _ACEOF
14543 rm -f conftest.$ac_objext
14544 if { (eval echo "$as_me:14544: \"$ac_compile\"") >&5
14545   (eval $ac_compile) 2>&5
14546   ac_status=$?
14547   echo "$as_me:14547: \$? = $ac_status" >&5
14548   (exit $ac_status); } &&
14549          { ac_try='test -s conftest.$ac_objext'
14550   { (eval echo "$as_me:14550: \"$ac_try\"") >&5
14551   (eval $ac_try) 2>&5
14552   ac_status=$?
14553   echo "$as_me:14553: \$? = $ac_status" >&5
14554   (exit $ac_status); }; }; then
14555   cf_result=yes
14556 else
14557   echo "$as_me: failed program was:" >&5
14558 cat conftest.$ac_ext >&5
14559 cf_result=no
14560 fi
14561 rm -f conftest.$ac_objext conftest.$ac_ext
14562 echo "$as_me:14562: result: $cf_result" >&5
14563 echo "${ECHO_T}$cf_result" >&6
14564
14565 if test $cf_result = yes ; then
14566
14567 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14568
14569         cat >>confdefs.h <<EOF
14570 #define $cf_result 1
14571 EOF
14572
14573 else
14574         echo "$as_me:14574: checking for data boolnames in library" >&5
14575 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
14576         # BSD linkers insist on making weak linkage, but resolve at runtime.
14577         if test "$cross_compiling" = yes; then
14578
14579         # cross-compiling
14580         cat >conftest.$ac_ext <<_ACEOF
14581 #line 14581 "configure"
14582 #include "confdefs.h"
14583
14584 #ifdef HAVE_XCURSES
14585 #include <xcurses.h>
14586 char * XCursesProgramName = "test";
14587 #else
14588 #include <${cf_cv_ncurses_header:-curses.h}>
14589 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14590 #include <ncursesw/term.h>
14591 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14592 #include <ncurses/term.h>
14593 #elif defined(HAVE_TERM_H)
14594 #include <term.h>
14595 #endif
14596 #endif
14597
14598 extern char boolnames;
14599 int
14600 main ()
14601 {
14602
14603         do {
14604                 void *foo = &(boolnames);
14605                 ${cf_cv_main_return:-return}(foo == 0);
14606         } while (0)
14607
14608   ;
14609   return 0;
14610 }
14611 _ACEOF
14612 rm -f conftest.$ac_objext conftest$ac_exeext
14613 if { (eval echo "$as_me:14613: \"$ac_link\"") >&5
14614   (eval $ac_link) 2>&5
14615   ac_status=$?
14616   echo "$as_me:14616: \$? = $ac_status" >&5
14617   (exit $ac_status); } &&
14618          { ac_try='test -s conftest$ac_exeext'
14619   { (eval echo "$as_me:14619: \"$ac_try\"") >&5
14620   (eval $ac_try) 2>&5
14621   ac_status=$?
14622   echo "$as_me:14622: \$? = $ac_status" >&5
14623   (exit $ac_status); }; }; then
14624   cf_result=yes
14625 else
14626   echo "$as_me: failed program was:" >&5
14627 cat conftest.$ac_ext >&5
14628 cf_result=no
14629 fi
14630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14631
14632 else
14633   cat >conftest.$ac_ext <<_ACEOF
14634 #line 14634 "configure"
14635 #include "confdefs.h"
14636
14637 #ifdef HAVE_XCURSES
14638 #include <xcurses.h>
14639 char * XCursesProgramName = "test";
14640 #else
14641 #include <${cf_cv_ncurses_header:-curses.h}>
14642 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14643 #include <ncursesw/term.h>
14644 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14645 #include <ncurses/term.h>
14646 #elif defined(HAVE_TERM_H)
14647 #include <term.h>
14648 #endif
14649 #endif
14650
14651 extern char boolnames;
14652 int main(void)
14653 {
14654         void *foo = &(boolnames);
14655         ${cf_cv_main_return:-return}(foo == 0);
14656 }
14657 _ACEOF
14658 rm -f conftest$ac_exeext
14659 if { (eval echo "$as_me:14659: \"$ac_link\"") >&5
14660   (eval $ac_link) 2>&5
14661   ac_status=$?
14662   echo "$as_me:14662: \$? = $ac_status" >&5
14663   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14664   { (eval echo "$as_me:14664: \"$ac_try\"") >&5
14665   (eval $ac_try) 2>&5
14666   ac_status=$?
14667   echo "$as_me:14667: \$? = $ac_status" >&5
14668   (exit $ac_status); }; }; then
14669   cf_result=yes
14670 else
14671   echo "$as_me: program exited with status $ac_status" >&5
14672 echo "$as_me: failed program was:" >&5
14673 cat conftest.$ac_ext >&5
14674 cf_result=no
14675 fi
14676 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14677 fi
14678         echo "$as_me:14678: result: $cf_result" >&5
14679 echo "${ECHO_T}$cf_result" >&6
14680         if test $cf_result = yes ; then
14681
14682 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14683
14684                 cat >>confdefs.h <<EOF
14685 #define $cf_result 1
14686 EOF
14687
14688         fi
14689 fi
14690
14691 echo "$as_me:14691: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
14692 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14693
14694 cat >conftest.$ac_ext <<_ACEOF
14695 #line 14695 "configure"
14696 #include "confdefs.h"
14697
14698 #ifdef HAVE_XCURSES
14699 #include <xcurses.h>
14700 char * XCursesProgramName = "test";
14701 #else
14702 #include <${cf_cv_ncurses_header:-curses.h}>
14703 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14704 #include <ncursesw/term.h>
14705 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14706 #include <ncurses/term.h>
14707 #elif defined(HAVE_TERM_H)
14708 #include <term.h>
14709 #endif
14710 #endif
14711
14712 int
14713 main ()
14714 {
14715
14716 void *foo = &(boolfnames)
14717
14718   ;
14719   return 0;
14720 }
14721 _ACEOF
14722 rm -f conftest.$ac_objext
14723 if { (eval echo "$as_me:14723: \"$ac_compile\"") >&5
14724   (eval $ac_compile) 2>&5
14725   ac_status=$?
14726   echo "$as_me:14726: \$? = $ac_status" >&5
14727   (exit $ac_status); } &&
14728          { ac_try='test -s conftest.$ac_objext'
14729   { (eval echo "$as_me:14729: \"$ac_try\"") >&5
14730   (eval $ac_try) 2>&5
14731   ac_status=$?
14732   echo "$as_me:14732: \$? = $ac_status" >&5
14733   (exit $ac_status); }; }; then
14734   cf_result=yes
14735 else
14736   echo "$as_me: failed program was:" >&5
14737 cat conftest.$ac_ext >&5
14738 cf_result=no
14739 fi
14740 rm -f conftest.$ac_objext conftest.$ac_ext
14741 echo "$as_me:14741: result: $cf_result" >&5
14742 echo "${ECHO_T}$cf_result" >&6
14743
14744 if test $cf_result = yes ; then
14745
14746 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14747
14748         cat >>confdefs.h <<EOF
14749 #define $cf_result 1
14750 EOF
14751
14752 else
14753         echo "$as_me:14753: checking for data boolfnames in library" >&5
14754 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
14755         # BSD linkers insist on making weak linkage, but resolve at runtime.
14756         if test "$cross_compiling" = yes; then
14757
14758         # cross-compiling
14759         cat >conftest.$ac_ext <<_ACEOF
14760 #line 14760 "configure"
14761 #include "confdefs.h"
14762
14763 #ifdef HAVE_XCURSES
14764 #include <xcurses.h>
14765 char * XCursesProgramName = "test";
14766 #else
14767 #include <${cf_cv_ncurses_header:-curses.h}>
14768 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14769 #include <ncursesw/term.h>
14770 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14771 #include <ncurses/term.h>
14772 #elif defined(HAVE_TERM_H)
14773 #include <term.h>
14774 #endif
14775 #endif
14776
14777 extern char boolfnames;
14778 int
14779 main ()
14780 {
14781
14782         do {
14783                 void *foo = &(boolfnames);
14784                 ${cf_cv_main_return:-return}(foo == 0);
14785         } while (0)
14786
14787   ;
14788   return 0;
14789 }
14790 _ACEOF
14791 rm -f conftest.$ac_objext conftest$ac_exeext
14792 if { (eval echo "$as_me:14792: \"$ac_link\"") >&5
14793   (eval $ac_link) 2>&5
14794   ac_status=$?
14795   echo "$as_me:14795: \$? = $ac_status" >&5
14796   (exit $ac_status); } &&
14797          { ac_try='test -s conftest$ac_exeext'
14798   { (eval echo "$as_me:14798: \"$ac_try\"") >&5
14799   (eval $ac_try) 2>&5
14800   ac_status=$?
14801   echo "$as_me:14801: \$? = $ac_status" >&5
14802   (exit $ac_status); }; }; then
14803   cf_result=yes
14804 else
14805   echo "$as_me: failed program was:" >&5
14806 cat conftest.$ac_ext >&5
14807 cf_result=no
14808 fi
14809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14810
14811 else
14812   cat >conftest.$ac_ext <<_ACEOF
14813 #line 14813 "configure"
14814 #include "confdefs.h"
14815
14816 #ifdef HAVE_XCURSES
14817 #include <xcurses.h>
14818 char * XCursesProgramName = "test";
14819 #else
14820 #include <${cf_cv_ncurses_header:-curses.h}>
14821 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14822 #include <ncursesw/term.h>
14823 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14824 #include <ncurses/term.h>
14825 #elif defined(HAVE_TERM_H)
14826 #include <term.h>
14827 #endif
14828 #endif
14829
14830 extern char boolfnames;
14831 int main(void)
14832 {
14833         void *foo = &(boolfnames);
14834         ${cf_cv_main_return:-return}(foo == 0);
14835 }
14836 _ACEOF
14837 rm -f conftest$ac_exeext
14838 if { (eval echo "$as_me:14838: \"$ac_link\"") >&5
14839   (eval $ac_link) 2>&5
14840   ac_status=$?
14841   echo "$as_me:14841: \$? = $ac_status" >&5
14842   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14843   { (eval echo "$as_me:14843: \"$ac_try\"") >&5
14844   (eval $ac_try) 2>&5
14845   ac_status=$?
14846   echo "$as_me:14846: \$? = $ac_status" >&5
14847   (exit $ac_status); }; }; then
14848   cf_result=yes
14849 else
14850   echo "$as_me: program exited with status $ac_status" >&5
14851 echo "$as_me: failed program was:" >&5
14852 cat conftest.$ac_ext >&5
14853 cf_result=no
14854 fi
14855 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14856 fi
14857         echo "$as_me:14857: result: $cf_result" >&5
14858 echo "${ECHO_T}$cf_result" >&6
14859         if test $cf_result = yes ; then
14860
14861 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14862
14863                 cat >>confdefs.h <<EOF
14864 #define $cf_result 1
14865 EOF
14866
14867         fi
14868 fi
14869
14870 TEST_ARGS="$LIBS"
14871 LIBS=
14872
14873 ac_config_files="$ac_config_files Makefile"
14874 ac_config_commands="$ac_config_commands default"
14875 cat >confcache <<\_ACEOF
14876 # This file is a shell script that caches the results of configure
14877 # tests run on this system so they can be shared between configure
14878 # scripts and configure runs, see configure's option --config-cache.
14879 # It is not useful on other systems.  If it contains results you don't
14880 # want to keep, you may remove or edit it.
14881 #
14882 # config.status only pays attention to the cache file if you give it
14883 # the --recheck option to rerun configure.
14884 #
14885 # `ac_cv_env_foo' variables (set or unset) will be overriden when
14886 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14887 # following values.
14888
14889 _ACEOF
14890
14891 # The following way of writing the cache mishandles newlines in values,
14892 # but we know of no workaround that is simple, portable, and efficient.
14893 # So, don't put newlines in cache variables' values.
14894 # Ultrix sh set writes to stderr and can't be redirected directly,
14895 # and sets the high bit in the cache file unless we assign to the vars.
14896 {
14897   (set) 2>&1 |
14898     case `(ac_space=' '; set | grep ac_space) 2>&1` in
14899     *ac_space=\ *)
14900       # `set' does not quote correctly, so add quotes (double-quote
14901       # substitution turns \\\\ into \\, and sed turns \\ into \).
14902       sed -n \
14903         "s/'/'\\\\''/g;
14904           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14905       ;;
14906     *)
14907       # `set' quotes correctly as required by POSIX, so do not add quotes.
14908       sed -n \
14909         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14910       ;;
14911     esac;
14912 } |
14913   sed '
14914      t clear
14915      : clear
14916      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14917      t end
14918      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14919      : end' >>confcache
14920 if cmp -s $cache_file confcache; then :; else
14921   if test -w $cache_file; then
14922     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14923     cat confcache >$cache_file
14924   else
14925     echo "not updating unwritable cache $cache_file"
14926   fi
14927 fi
14928 rm -f confcache
14929
14930 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14931 # Let make expand exec_prefix.
14932 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14933
14934 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14935 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14936 # trailing colons and then remove the whole line if VPATH becomes empty
14937 # (actually we leave an empty line to preserve line numbers).
14938 if test "x$srcdir" = x.; then
14939   ac_vpsub='/^[         ]*VPATH[        ]*=/{
14940 s/:*\$(srcdir):*/:/;
14941 s/:*\${srcdir}:*/:/;
14942 s/:*@srcdir@:*/:/;
14943 s/^\([^=]*=[    ]*\):*/\1/;
14944 s/:*$//;
14945 s/^[^=]*=[      ]*$//;
14946 }'
14947 fi
14948
14949 DEFS=-DHAVE_CONFIG_H
14950
14951 : ${CONFIG_STATUS=./config.status}
14952 ac_clean_files_save=$ac_clean_files
14953 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14954 { echo "$as_me:14954: creating $CONFIG_STATUS" >&5
14955 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14956 cat >$CONFIG_STATUS <<_ACEOF
14957 #! $SHELL
14958 # Generated automatically by configure.
14959 # Run this file to recreate the current configuration.
14960 # Compiler output produced by configure, useful for debugging
14961 # configure, is in config.log if it exists.
14962
14963 debug=false
14964 SHELL=\${CONFIG_SHELL-$SHELL}
14965 ac_cs_invocation="\$0 \$@"
14966
14967 _ACEOF
14968
14969 cat >>$CONFIG_STATUS <<\_ACEOF
14970 # Be Bourne compatible
14971 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14972   emulate sh
14973   NULLCMD=:
14974 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14975   set -o posix
14976 fi
14977
14978 # Name of the executable.
14979 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14980
14981 if expr a : '\(a\)' >/dev/null 2>&1; then
14982   as_expr=expr
14983 else
14984   as_expr=false
14985 fi
14986
14987 rm -f conf$$ conf$$.exe conf$$.file
14988 echo >conf$$.file
14989 if ln -s conf$$.file conf$$ 2>/dev/null; then
14990   # We could just check for DJGPP; but this test a) works b) is more generic
14991   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14992   if test -f conf$$.exe; then
14993     # Don't use ln at all; we don't have any links
14994     as_ln_s='cp -p'
14995   else
14996     as_ln_s='ln -s'
14997   fi
14998 elif ln conf$$.file conf$$ 2>/dev/null; then
14999   as_ln_s=ln
15000 else
15001   as_ln_s='cp -p'
15002 fi
15003 rm -f conf$$ conf$$.exe conf$$.file
15004
15005 as_executable_p="test -f"
15006
15007 # Support unset when possible.
15008 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15009   as_unset=unset
15010 else
15011   as_unset=false
15012 fi
15013
15014 # NLS nuisances.
15015 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15016 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15017 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15018 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15019 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15020 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15021 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15022 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15023
15024 # IFS
15025 # We need space, tab and new line, in precisely that order.
15026 as_nl='
15027 '
15028 IFS="   $as_nl"
15029
15030 # CDPATH.
15031 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15032
15033 exec 6>&1
15034
15035 _ACEOF
15036
15037 # Files that config.status was made for.
15038 if test -n "$ac_config_files"; then
15039   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15040 fi
15041
15042 if test -n "$ac_config_headers"; then
15043   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15044 fi
15045
15046 if test -n "$ac_config_links"; then
15047   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15048 fi
15049
15050 if test -n "$ac_config_commands"; then
15051   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15052 fi
15053
15054 cat >>$CONFIG_STATUS <<\EOF
15055
15056 ac_cs_usage="\
15057 \`$as_me' instantiates files from templates according to the
15058 current configuration.
15059
15060 Usage: $0 [OPTIONS] [FILE]...
15061
15062   -h, --help       print this help, then exit
15063   -V, --version    print version number, then exit
15064   -d, --debug      don't remove temporary files
15065       --recheck    update $as_me by reconfiguring in the same conditions
15066   --file=FILE[:TEMPLATE]
15067                    instantiate the configuration file FILE
15068   --header=FILE[:TEMPLATE]
15069                    instantiate the configuration header FILE
15070
15071 Configuration files:
15072 $config_files
15073
15074 Configuration headers:
15075 $config_headers
15076
15077 Configuration commands:
15078 $config_commands
15079
15080 Report bugs to <dickey@invisible-island.net>."
15081 EOF
15082
15083 cat >>$CONFIG_STATUS <<EOF
15084 ac_cs_version="\\
15085 config.status
15086 configured by $0, generated by GNU Autoconf 2.52.20101002,
15087   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15088
15089 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15090 Free Software Foundation, Inc.
15091 This config.status script is free software; the Free Software Foundation
15092 gives unlimited permission to copy, distribute and modify it."
15093 srcdir=$srcdir
15094 INSTALL="$INSTALL"
15095 EOF
15096
15097 cat >>$CONFIG_STATUS <<\EOF
15098 # If no file are specified by the user, then we need to provide default
15099 # value.  By we need to know if files were specified by the user.
15100 ac_need_defaults=:
15101 while test $# != 0
15102 do
15103   case $1 in
15104   --*=*)
15105     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15106     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15107     shift
15108     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15109     shift
15110     ;;
15111   -*);;
15112   *) # This is not an option, so the user has probably given explicit
15113      # arguments.
15114      ac_need_defaults=false;;
15115   esac
15116
15117   case $1 in
15118   # Handling of the options.
15119 EOF
15120 cat >>$CONFIG_STATUS <<EOF
15121   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15122     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15123     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15124 EOF
15125 cat >>$CONFIG_STATUS <<\EOF
15126   --version | --vers* | -V )
15127     echo "$ac_cs_version"; exit 0 ;;
15128   --he | --h)
15129     # Conflict between --help and --header
15130     { { echo "$as_me:15130: error: ambiguous option: $1
15131 Try \`$0 --help' for more information." >&5
15132 echo "$as_me: error: ambiguous option: $1
15133 Try \`$0 --help' for more information." >&2;}
15134    { (exit 1); exit 1; }; };;
15135   --help | --hel | -h )
15136     echo "$ac_cs_usage"; exit 0 ;;
15137   --debug | --d* | -d )
15138     debug=: ;;
15139   --file | --fil | --fi | --f )
15140     shift
15141     CONFIG_FILES="$CONFIG_FILES $1"
15142     ac_need_defaults=false;;
15143   --header | --heade | --head | --hea )
15144     shift
15145     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15146     ac_need_defaults=false;;
15147
15148   # This is an error.
15149   -*) { { echo "$as_me:15149: error: unrecognized option: $1
15150 Try \`$0 --help' for more information." >&5
15151 echo "$as_me: error: unrecognized option: $1
15152 Try \`$0 --help' for more information." >&2;}
15153    { (exit 1); exit 1; }; } ;;
15154
15155   *) ac_config_targets="$ac_config_targets $1" ;;
15156
15157   esac
15158   shift
15159 done
15160
15161 exec 5>>config.log
15162 cat >&5 << _ACEOF
15163
15164 ## ----------------------- ##
15165 ## Running config.status.  ##
15166 ## ----------------------- ##
15167
15168 This file was extended by $as_me 2.52.20101002, executed with
15169   CONFIG_FILES    = $CONFIG_FILES
15170   CONFIG_HEADERS  = $CONFIG_HEADERS
15171   CONFIG_LINKS    = $CONFIG_LINKS
15172   CONFIG_COMMANDS = $CONFIG_COMMANDS
15173   > $ac_cs_invocation
15174 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15175
15176 _ACEOF
15177 EOF
15178
15179 cat >>$CONFIG_STATUS <<EOF
15180 #
15181 # INIT-COMMANDS section.
15182 #
15183
15184 AWK="$AWK"
15185 ECHO_LD="$ECHO_LD"
15186
15187 EOF
15188
15189 cat >>$CONFIG_STATUS <<\EOF
15190 for ac_config_target in $ac_config_targets
15191 do
15192   case "$ac_config_target" in
15193   # Handling of arguments.
15194   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15195   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15196   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
15197   *) { { echo "$as_me:15197: error: invalid argument: $ac_config_target" >&5
15198 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15199    { (exit 1); exit 1; }; };;
15200   esac
15201 done
15202
15203 # If the user did not use the arguments to specify the items to instantiate,
15204 # then the envvar interface is used.  Set only those that are not.
15205 # We use the long form for the default assignment because of an extremely
15206 # bizarre bug on SunOS 4.1.3.
15207 if $ac_need_defaults; then
15208   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15209   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15210   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15211 fi
15212
15213 # Create a temporary directory, and hook for its removal unless debugging.
15214 $debug ||
15215 {
15216   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15217   trap '{ (exit 1); exit 1; }' 1 2 13 15
15218 }
15219
15220 # Create a (secure) tmp directory for tmp files.
15221 : ${TMPDIR=/tmp}
15222 {
15223   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15224   test -n "$tmp" && test -d "$tmp"
15225 }  ||
15226 {
15227   tmp=$TMPDIR/cs$$-$RANDOM
15228   (umask 077 && mkdir $tmp)
15229 } ||
15230 {
15231    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15232    { (exit 1); exit 1; }
15233 }
15234
15235 EOF
15236
15237 cat >>$CONFIG_STATUS <<EOF
15238
15239 #
15240 # CONFIG_FILES section.
15241 #
15242
15243 # No need to generate the scripts if there are no CONFIG_FILES.
15244 # This happens for instance when ./config.status config.h
15245 if test -n "\$CONFIG_FILES"; then
15246   # Protect against being on the right side of a sed subst in config.status.
15247   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15248    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15249 s,@SHELL@,$SHELL,;t t
15250 s,@exec_prefix@,$exec_prefix,;t t
15251 s,@prefix@,$prefix,;t t
15252 s,@program_transform_name@,$program_transform_name,;t t
15253 s,@bindir@,$bindir,;t t
15254 s,@sbindir@,$sbindir,;t t
15255 s,@libexecdir@,$libexecdir,;t t
15256 s,@datadir@,$datadir,;t t
15257 s,@sysconfdir@,$sysconfdir,;t t
15258 s,@sharedstatedir@,$sharedstatedir,;t t
15259 s,@localstatedir@,$localstatedir,;t t
15260 s,@libdir@,$libdir,;t t
15261 s,@includedir@,$includedir,;t t
15262 s,@oldincludedir@,$oldincludedir,;t t
15263 s,@infodir@,$infodir,;t t
15264 s,@mandir@,$mandir,;t t
15265 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15266 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15267 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15268 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15269 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15270 s,@build_alias@,$build_alias,;t t
15271 s,@host_alias@,$host_alias,;t t
15272 s,@target_alias@,$target_alias,;t t
15273 s,@ECHO_C@,$ECHO_C,;t t
15274 s,@ECHO_N@,$ECHO_N,;t t
15275 s,@ECHO_T@,$ECHO_T,;t t
15276 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15277 s,@DEFS@,$DEFS,;t t
15278 s,@LIBS@,$LIBS,;t t
15279 s,@build@,$build,;t t
15280 s,@build_cpu@,$build_cpu,;t t
15281 s,@build_vendor@,$build_vendor,;t t
15282 s,@build_os@,$build_os,;t t
15283 s,@host@,$host,;t t
15284 s,@host_cpu@,$host_cpu,;t t
15285 s,@host_vendor@,$host_vendor,;t t
15286 s,@host_os@,$host_os,;t t
15287 s,@SET_MAKE@,$SET_MAKE,;t t
15288 s,@CC@,$CC,;t t
15289 s,@CFLAGS@,$CFLAGS,;t t
15290 s,@LDFLAGS@,$LDFLAGS,;t t
15291 s,@CPPFLAGS@,$CPPFLAGS,;t t
15292 s,@ac_ct_CC@,$ac_ct_CC,;t t
15293 s,@EXEEXT@,$EXEEXT,;t t
15294 s,@OBJEXT@,$OBJEXT,;t t
15295 s,@CPP@,$CPP,;t t
15296 s,@AWK@,$AWK,;t t
15297 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15298 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15299 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15300 s,@LINT@,$LINT,;t t
15301 s,@LINT_OPTS@,$LINT_OPTS,;t t
15302 s,@CTAGS@,$CTAGS,;t t
15303 s,@ETAGS@,$ETAGS,;t t
15304 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15305 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15306 s,@MATH_LIB@,$MATH_LIB,;t t
15307 s,@CC_G_OPT@,$CC_G_OPT,;t t
15308 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15309 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15310 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15311 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15312 s,@LD@,$LD,;t t
15313 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
15314 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
15315 s,@LD_MODEL@,$LD_MODEL,;t t
15316 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15317 s,@LIBTOOL@,$LIBTOOL,;t t
15318 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15319 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15320 s,@LIB_LINK@,$LIB_LINK,;t t
15321 s,@LINK_TESTS@,$LINK_TESTS,;t t
15322 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15323 s,@PTHREAD@,$PTHREAD,;t t
15324 s,@TEST_ARGS@,$TEST_ARGS,;t t
15325 s,@TEST_DEPS@,$TEST_DEPS,;t t
15326 s,@TEST_LIBS@,$TEST_LIBS,;t t
15327 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
15328 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15329 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15330 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15331 s,@ECHO_LT@,$ECHO_LT,;t t
15332 s,@ECHO_LD@,$ECHO_LD,;t t
15333 s,@RULE_CC@,$RULE_CC,;t t
15334 s,@SHOW_CC@,$SHOW_CC,;t t
15335 s,@ECHO_CC@,$ECHO_CC,;t t
15336 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15337 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15338 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15339 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15340 s,@X_CFLAGS@,$X_CFLAGS,;t t
15341 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
15342 s,@X_LIBS@,$X_LIBS,;t t
15343 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
15344 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
15345 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15346 CEOF
15347
15348 EOF
15349
15350   cat >>$CONFIG_STATUS <<\EOF
15351   # Split the substitutions into bite-sized pieces for seds with
15352   # small command number limits, like on Digital OSF/1 and HP-UX.
15353   ac_max_sed_lines=48
15354   ac_sed_frag=1 # Number of current file.
15355   ac_beg=1 # First line for current file.
15356   ac_end=$ac_max_sed_lines # Line after last line for current file.
15357   ac_more_lines=:
15358   ac_sed_cmds=
15359   while $ac_more_lines; do
15360     if test $ac_beg -gt 1; then
15361       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15362     else
15363       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15364     fi
15365     if test ! -s $tmp/subs.frag; then
15366       ac_more_lines=false
15367     else
15368       # The purpose of the label and of the branching condition is to
15369       # speed up the sed processing (if there are no `@' at all, there
15370       # is no need to browse any of the substitutions).
15371       # These are the two extra sed commands mentioned above.
15372       (echo ':t
15373   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15374       if test -z "$ac_sed_cmds"; then
15375         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15376       else
15377         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15378       fi
15379       ac_sed_frag=`expr $ac_sed_frag + 1`
15380       ac_beg=$ac_end
15381       ac_end=`expr $ac_end + $ac_max_sed_lines`
15382     fi
15383   done
15384   if test -z "$ac_sed_cmds"; then
15385     ac_sed_cmds=cat
15386   fi
15387 fi # test -n "$CONFIG_FILES"
15388
15389 EOF
15390 cat >>$CONFIG_STATUS <<\EOF
15391 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15392   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15393   case $ac_file in
15394   - | *:- | *:-:* ) # input from stdin
15395         cat >$tmp/stdin
15396         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15397         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15398   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15399         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15400   * )   ac_file_in=$ac_file.in ;;
15401   esac
15402
15403   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15404   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15405          X"$ac_file" : 'X\(//\)[^/]' \| \
15406          X"$ac_file" : 'X\(//\)$' \| \
15407          X"$ac_file" : 'X\(/\)' \| \
15408          .     : '\(.\)' 2>/dev/null ||
15409 echo X"$ac_file" |
15410     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15411           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15412           /^X\(\/\/\)$/{ s//\1/; q; }
15413           /^X\(\/\).*/{ s//\1/; q; }
15414           s/.*/./; q'`
15415   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15416     { case "$ac_dir" in
15417   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15418   *)                      as_incr_dir=.;;
15419 esac
15420 as_dummy="$ac_dir"
15421 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15422   case $as_mkdir_dir in
15423     # Skip DOS drivespec
15424     ?:) as_incr_dir=$as_mkdir_dir ;;
15425     *)
15426       as_incr_dir=$as_incr_dir/$as_mkdir_dir
15427       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15428     ;;
15429   esac
15430 done; }
15431
15432     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15433     # A "../" for each directory in $ac_dir_suffix.
15434     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15435   else
15436     ac_dir_suffix= ac_dots=
15437   fi
15438
15439   case $srcdir in
15440   .)  ac_srcdir=.
15441       if test -z "$ac_dots"; then
15442          ac_top_srcdir=.
15443       else
15444          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15445       fi ;;
15446   [\\/]* | ?:[\\/]* )
15447       ac_srcdir=$srcdir$ac_dir_suffix;
15448       ac_top_srcdir=$srcdir ;;
15449   *) # Relative path.
15450     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15451     ac_top_srcdir=$ac_dots$srcdir ;;
15452   esac
15453
15454   case $INSTALL in
15455   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15456   *) ac_INSTALL=$ac_dots$INSTALL ;;
15457   esac
15458
15459   if test x"$ac_file" != x-; then
15460     { echo "$as_me:15460: creating $ac_file" >&5
15461 echo "$as_me: creating $ac_file" >&6;}
15462     rm -f "$ac_file"
15463   fi
15464   # Let's still pretend it is `configure' which instantiates (i.e., don't
15465   # use $as_me), people would be surprised to read:
15466   #    /* config.h.  Generated automatically by config.status.  */
15467   configure_input="Generated automatically from `echo $ac_file_in |
15468                                                  sed 's,.*/,,'` by configure."
15469
15470   # First look for the input files in the build tree, otherwise in the
15471   # src tree.
15472   ac_file_inputs=`IFS=:
15473     for f in $ac_file_in; do
15474       case $f in
15475       -) echo $tmp/stdin ;;
15476       [\\/$]*)
15477          # Absolute (can't be DOS-style, as IFS=:)
15478          test -f "$f" || { { echo "$as_me:15478: error: cannot find input file: $f" >&5
15479 echo "$as_me: error: cannot find input file: $f" >&2;}
15480    { (exit 1); exit 1; }; }
15481          echo $f;;
15482       *) # Relative
15483          if test -f "$f"; then
15484            # Build tree
15485            echo $f
15486          elif test -f "$srcdir/$f"; then
15487            # Source tree
15488            echo $srcdir/$f
15489          else
15490            # /dev/null tree
15491            { { echo "$as_me:15491: error: cannot find input file: $f" >&5
15492 echo "$as_me: error: cannot find input file: $f" >&2;}
15493    { (exit 1); exit 1; }; }
15494          fi;;
15495       esac
15496     done` || { (exit 1); exit 1; }
15497 EOF
15498 cat >>$CONFIG_STATUS <<EOF
15499   sed "$ac_vpsub
15500 $extrasub
15501 EOF
15502 cat >>$CONFIG_STATUS <<\EOF
15503 :t
15504 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15505 s,@configure_input@,$configure_input,;t t
15506 s,@srcdir@,$ac_srcdir,;t t
15507 s,@top_srcdir@,$ac_top_srcdir,;t t
15508 s,@INSTALL@,$ac_INSTALL,;t t
15509 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15510   rm -f $tmp/stdin
15511   if test x"$ac_file" != x-; then
15512     mv $tmp/out $ac_file
15513   else
15514     cat $tmp/out
15515     rm -f $tmp/out
15516   fi
15517
15518 done
15519 EOF
15520 cat >>$CONFIG_STATUS <<\EOF
15521
15522 #
15523 # CONFIG_HEADER section.
15524 #
15525
15526 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15527 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15528 #
15529 # ac_d sets the value in "#define NAME VALUE" lines.
15530 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15531 ac_dB='[        ].*$,\1#\2'
15532 ac_dC=' '
15533 ac_dD=',;t'
15534 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15535 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15536 ac_iB='\([      ]\),\1#\2define\3'
15537 ac_iC=' '
15538 ac_iD='\4,;t'
15539 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15540 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15541 ac_uB='$,\1#\2define\3'
15542 ac_uC=' '
15543 ac_uD=',;t'
15544
15545 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15546   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15547   case $ac_file in
15548   - | *:- | *:-:* ) # input from stdin
15549         cat >$tmp/stdin
15550         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15551         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15552   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15553         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15554   * )   ac_file_in=$ac_file.in ;;
15555   esac
15556
15557   test x"$ac_file" != x- && { echo "$as_me:15557: creating $ac_file" >&5
15558 echo "$as_me: creating $ac_file" >&6;}
15559
15560   # First look for the input files in the build tree, otherwise in the
15561   # src tree.
15562   ac_file_inputs=`IFS=:
15563     for f in $ac_file_in; do
15564       case $f in
15565       -) echo $tmp/stdin ;;
15566       [\\/$]*)
15567          # Absolute (can't be DOS-style, as IFS=:)
15568          test -f "$f" || { { echo "$as_me:15568: error: cannot find input file: $f" >&5
15569 echo "$as_me: error: cannot find input file: $f" >&2;}
15570    { (exit 1); exit 1; }; }
15571          echo $f;;
15572       *) # Relative
15573          if test -f "$f"; then
15574            # Build tree
15575            echo $f
15576          elif test -f "$srcdir/$f"; then
15577            # Source tree
15578            echo $srcdir/$f
15579          else
15580            # /dev/null tree
15581            { { echo "$as_me:15581: error: cannot find input file: $f" >&5
15582 echo "$as_me: error: cannot find input file: $f" >&2;}
15583    { (exit 1); exit 1; }; }
15584          fi;;
15585       esac
15586     done` || { (exit 1); exit 1; }
15587   # Remove the trailing spaces.
15588   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
15589
15590 EOF
15591
15592 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
15593 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
15594 # be either 'cat' or 'sort'.
15595 cat confdefs.h | uniq >conftest.vals
15596
15597 # Break up conftest.vals because some shells have a limit on
15598 # the size of here documents, and old seds have small limits too.
15599
15600 rm -f conftest.tail
15601 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
15602 while grep . conftest.vals >/dev/null
15603 do
15604   # Write chunks of a limited-size here document to conftest.frag.
15605   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15606   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15607   echo 'CEOF' >> $CONFIG_STATUS
15608   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15609   rm -f conftest.vals
15610   mv conftest.tail conftest.vals
15611 done
15612 rm -f conftest.vals
15613
15614 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15615 # marker @DEFS@.
15616 echo '  cat >> conftest.edit <<CEOF
15617 /@DEFS@/r conftest.frag
15618 /@DEFS@/d
15619 CEOF
15620 sed -f conftest.edit $tmp/in > $tmp/out
15621 rm -f $tmp/in
15622 mv $tmp/out $tmp/in
15623 rm -f conftest.edit conftest.frag
15624 ' >> $CONFIG_STATUS
15625
15626 cat >>$CONFIG_STATUS <<\EOF
15627   # Let's still pretend it is `configure' which instantiates (i.e., don't
15628   # use $as_me), people would be surprised to read:
15629   #    /* config.h.  Generated automatically by config.status.  */
15630   if test x"$ac_file" = x-; then
15631     echo "/* Generated automatically by configure.  */" >$tmp/config.h
15632   else
15633     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
15634   fi
15635   cat $tmp/in >>$tmp/config.h
15636   rm -f $tmp/in
15637   if test x"$ac_file" != x-; then
15638     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
15639       { echo "$as_me:15639: $ac_file is unchanged" >&5
15640 echo "$as_me: $ac_file is unchanged" >&6;}
15641     else
15642       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15643          X"$ac_file" : 'X\(//\)[^/]' \| \
15644          X"$ac_file" : 'X\(//\)$' \| \
15645          X"$ac_file" : 'X\(/\)' \| \
15646          .     : '\(.\)' 2>/dev/null ||
15647 echo X"$ac_file" |
15648     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15649           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15650           /^X\(\/\/\)$/{ s//\1/; q; }
15651           /^X\(\/\).*/{ s//\1/; q; }
15652           s/.*/./; q'`
15653       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15654         { case "$ac_dir" in
15655   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15656   *)                      as_incr_dir=.;;
15657 esac
15658 as_dummy="$ac_dir"
15659 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15660   case $as_mkdir_dir in
15661     # Skip DOS drivespec
15662     ?:) as_incr_dir=$as_mkdir_dir ;;
15663     *)
15664       as_incr_dir=$as_incr_dir/$as_mkdir_dir
15665       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15666     ;;
15667   esac
15668 done; }
15669
15670       fi
15671       rm -f $ac_file
15672       mv $tmp/config.h $ac_file
15673     fi
15674   else
15675     cat $tmp/config.h
15676     rm -f $tmp/config.h
15677   fi
15678 done
15679 EOF
15680 cat >>$CONFIG_STATUS <<\EOF
15681 #
15682 # CONFIG_COMMANDS section.
15683 #
15684 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15685   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15686   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15687
15688   case $ac_dest in
15689     default )
15690
15691 for cf_dir in .
15692 do
15693         if test ! -d $srcdir/$cf_dir; then
15694                 continue
15695         elif test -f $srcdir/$cf_dir/programs; then
15696                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
15697         fi
15698 done
15699
15700         cat >>Makefile <<TEST_EOF
15701
15702 # These rules are generated so we do not rely on suffix rules, which do not
15703 # work consistently for different make-programs (the '\$(MODEL)/' confuses
15704 # some, and the '\$x' confuses others).
15705 TEST_EOF
15706
15707 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
15708 for N in $LIST
15709 do
15710         cat >>Makefile <<TEST_EOF
15711
15712 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
15713         \$(srcdir)/test.priv.h \\
15714         ncurses_cfg.h
15715         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
15716 TEST_EOF
15717 done
15718
15719 if test -f ../config.guess && test -f ../config.sub
15720 then
15721         cat >>Makefile <<TEST_EOF
15722
15723 # if we used CF_INHERIT for getting these files, we can remove them
15724 distclean::
15725         rm -f config.guess config.sub
15726 TEST_EOF
15727 fi
15728  ;;
15729   esac
15730 done
15731 EOF
15732
15733 cat >>$CONFIG_STATUS <<\EOF
15734
15735 { (exit 0); exit 0; }
15736 EOF
15737 chmod +x $CONFIG_STATUS
15738 ac_clean_files=$ac_clean_files_save
15739
15740 # configure is writing to config.log, and then calls config.status.
15741 # config.status does its own redirection, appending to config.log.
15742 # Unfortunately, on DOS this fails, as config.log is still kept open
15743 # by configure, so config.status won't be able to write to it; its
15744 # output is simply discarded.  So we exec the FD to /dev/null,
15745 # effectively closing config.log, so it can be properly (re)opened and
15746 # appended to by config.status.  When coming back to configure, we
15747 # need to make the FD available again.
15748 if test "$no_create" != yes; then
15749   ac_cs_success=:
15750   exec 5>/dev/null
15751   $SHELL $CONFIG_STATUS || ac_cs_success=false
15752   exec 5>>config.log
15753   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15754   # would make configure fail if this is the last instruction.
15755   $ac_cs_success || { (exit 1); exit 1; }
15756 fi
15757