]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.9 - patch 20110820
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101002.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="ncurses.c"
108
109 # Initialize some variables set by options.
110 ac_init_help=
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
114 cache_file=/dev/null
115 exec_prefix=NONE
116 no_create=
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 verbose=
126 x_includes=NONE
127 x_libraries=NONE
128
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datadir='${prefix}/share'
138 sysconfdir='${prefix}/etc'
139 sharedstatedir='${prefix}/com'
140 localstatedir='${prefix}/var'
141 libdir='${exec_prefix}/lib'
142 includedir='${prefix}/include'
143 oldincludedir='/usr/include'
144 infodir='${prefix}/info'
145 mandir='${prefix}/man'
146
147 # Identity of this package.
148 PACKAGE_NAME=
149 PACKAGE_TARNAME=
150 PACKAGE_VERSION=
151 PACKAGE_STRING=
152 PACKAGE_BUGREPORT=
153
154 ac_prev=
155 for ac_option
156 do
157   # If the previous option needs an argument, assign it.
158   if test -n "$ac_prev"; then
159     eval "$ac_prev=\$ac_option"
160     ac_prev=
161     continue
162   fi
163
164   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
165
166   # Accept the important Cygnus configure options, so we can diagnose typos.
167
168   case $ac_option in
169
170   -bindir | --bindir | --bindi | --bind | --bin | --bi)
171     ac_prev=bindir ;;
172   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173     bindir=$ac_optarg ;;
174
175   -build | --build | --buil | --bui | --bu)
176     ac_prev=build_alias ;;
177   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178     build_alias=$ac_optarg ;;
179
180   -cache-file | --cache-file | --cache-fil | --cache-fi \
181   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182     ac_prev=cache_file ;;
183   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185     cache_file=$ac_optarg ;;
186
187   --config-cache | -C)
188     cache_file=config.cache ;;
189
190   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
191     ac_prev=datadir ;;
192   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
193   | --da=*)
194     datadir=$ac_optarg ;;
195
196   -disable-* | --disable-*)
197     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
198     # Reject names that are not valid shell variable names.
199     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
200       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
201    { (exit 1); exit 1; }; }
202     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
203     eval "enable_$ac_feature=no" ;;
204
205   -enable-* | --enable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     case $ac_option in
213       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
214       *) ac_optarg=yes ;;
215     esac
216     eval "enable_$ac_feature='$ac_optarg'" ;;
217
218   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
219   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
220   | --exec | --exe | --ex)
221     ac_prev=exec_prefix ;;
222   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
223   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
224   | --exec=* | --exe=* | --ex=*)
225     exec_prefix=$ac_optarg ;;
226
227   -gas | --gas | --ga | --g)
228     # Obsolete; use --with-gas.
229     with_gas=yes ;;
230
231   -help | --help | --hel | --he | -h)
232     ac_init_help=long ;;
233   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
234     ac_init_help=recursive ;;
235   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
236     ac_init_help=short ;;
237
238   -host | --host | --hos | --ho)
239     ac_prev=host_alias ;;
240   -host=* | --host=* | --hos=* | --ho=*)
241     host_alias=$ac_optarg ;;
242
243   -includedir | --includedir | --includedi | --included | --include \
244   | --includ | --inclu | --incl | --inc)
245     ac_prev=includedir ;;
246   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247   | --includ=* | --inclu=* | --incl=* | --inc=*)
248     includedir=$ac_optarg ;;
249
250   -infodir | --infodir | --infodi | --infod | --info | --inf)
251     ac_prev=infodir ;;
252   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253     infodir=$ac_optarg ;;
254
255   -libdir | --libdir | --libdi | --libd)
256     ac_prev=libdir ;;
257   -libdir=* | --libdir=* | --libdi=* | --libd=*)
258     libdir=$ac_optarg ;;
259
260   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261   | --libexe | --libex | --libe)
262     ac_prev=libexecdir ;;
263   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264   | --libexe=* | --libex=* | --libe=*)
265     libexecdir=$ac_optarg ;;
266
267   -localstatedir | --localstatedir | --localstatedi | --localstated \
268   | --localstate | --localstat | --localsta | --localst \
269   | --locals | --local | --loca | --loc | --lo)
270     ac_prev=localstatedir ;;
271   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274     localstatedir=$ac_optarg ;;
275
276   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277     ac_prev=mandir ;;
278   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279     mandir=$ac_optarg ;;
280
281   -nfp | --nfp | --nf)
282     # Obsolete; use --without-fp.
283     with_fp=no ;;
284
285   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286   | --no-cr | --no-c)
287     no_create=yes ;;
288
289   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291     no_recursion=yes ;;
292
293   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295   | --oldin | --oldi | --old | --ol | --o)
296     ac_prev=oldincludedir ;;
297   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300     oldincludedir=$ac_optarg ;;
301
302   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303     ac_prev=prefix ;;
304   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305     prefix=$ac_optarg ;;
306
307   -program-prefix | --program-prefix | --program-prefi | --program-pref \
308   | --program-pre | --program-pr | --program-p)
309     ac_prev=program_prefix ;;
310   -program-prefix=* | --program-prefix=* | --program-prefi=* \
311   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312     program_prefix=$ac_optarg ;;
313
314   -program-suffix | --program-suffix | --program-suffi | --program-suff \
315   | --program-suf | --program-su | --program-s)
316     ac_prev=program_suffix ;;
317   -program-suffix=* | --program-suffix=* | --program-suffi=* \
318   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319     program_suffix=$ac_optarg ;;
320
321   -program-transform-name | --program-transform-name \
322   | --program-transform-nam | --program-transform-na \
323   | --program-transform-n | --program-transform- \
324   | --program-transform | --program-transfor \
325   | --program-transfo | --program-transf \
326   | --program-trans | --program-tran \
327   | --progr-tra | --program-tr | --program-t)
328     ac_prev=program_transform_name ;;
329   -program-transform-name=* | --program-transform-name=* \
330   | --program-transform-nam=* | --program-transform-na=* \
331   | --program-transform-n=* | --program-transform-=* \
332   | --program-transform=* | --program-transfor=* \
333   | --program-transfo=* | --program-transf=* \
334   | --program-trans=* | --program-tran=* \
335   | --progr-tra=* | --program-tr=* | --program-t=*)
336     program_transform_name=$ac_optarg ;;
337
338   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339   | -silent | --silent | --silen | --sile | --sil)
340     silent=yes ;;
341
342   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343     ac_prev=sbindir ;;
344   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345   | --sbi=* | --sb=*)
346     sbindir=$ac_optarg ;;
347
348   -sharedstatedir | --sharedstatedir | --sharedstatedi \
349   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350   | --sharedst | --shareds | --shared | --share | --shar \
351   | --sha | --sh)
352     ac_prev=sharedstatedir ;;
353   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356   | --sha=* | --sh=*)
357     sharedstatedir=$ac_optarg ;;
358
359   -site | --site | --sit)
360     ac_prev=site ;;
361   -site=* | --site=* | --sit=*)
362     site=$ac_optarg ;;
363
364   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365     ac_prev=srcdir ;;
366   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367     srcdir=$ac_optarg ;;
368
369   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370   | --syscon | --sysco | --sysc | --sys | --sy)
371     ac_prev=sysconfdir ;;
372   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374     sysconfdir=$ac_optarg ;;
375
376   -target | --target | --targe | --targ | --tar | --ta | --t)
377     ac_prev=target_alias ;;
378   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379     target_alias=$ac_optarg ;;
380
381   -v | -verbose | --verbose | --verbos | --verbo | --verb)
382     verbose=yes ;;
383
384   -version | --version | --versio | --versi | --vers | -V)
385     ac_init_version=: ;;
386
387   -with-* | --with-*)
388     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
389     # Reject names that are not valid shell variable names.
390     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
391       { echo "$as_me: error: invalid package name: $ac_package" >&2
392    { (exit 1); exit 1; }; }
393     ac_package=`echo $ac_package| sed 's/-/_/g'`
394     case $ac_option in
395       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
396       *) ac_optarg=yes ;;
397     esac
398     eval "with_$ac_package='$ac_optarg'" ;;
399
400   -without-* | --without-*)
401     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid package name: $ac_package" >&2
405    { (exit 1); exit 1; }; }
406     ac_package=`echo $ac_package | sed 's/-/_/g'`
407     eval "with_$ac_package=no" ;;
408
409   --x)
410     # Obsolete; use --with-x.
411     with_x=yes ;;
412
413   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414   | --x-incl | --x-inc | --x-in | --x-i)
415     ac_prev=x_includes ;;
416   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418     x_includes=$ac_optarg ;;
419
420   -x-libraries | --x-libraries | --x-librarie | --x-librari \
421   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422     ac_prev=x_libraries ;;
423   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425     x_libraries=$ac_optarg ;;
426
427   -*) { echo "$as_me: error: unrecognized option: $ac_option
428 Try \`$0 --help' for more information." >&2
429    { (exit 1); exit 1; }; }
430     ;;
431
432   *=*)
433     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
437    { (exit 1); exit 1; }; }
438     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
439     eval "$ac_envvar='$ac_optarg'"
440     export $ac_envvar ;;
441
442   *)
443     # FIXME: should be removed in autoconf 3.0.
444     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
445     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
446       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
447     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
448     ;;
449
450   esac
451 done
452
453 if test -n "$ac_prev"; then
454   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
455   { echo "$as_me: error: missing argument to $ac_option" >&2
456    { (exit 1); exit 1; }; }
457 fi
458
459 # Be sure to have absolute paths.
460 for ac_var in exec_prefix prefix
461 do
462   eval ac_val=$`echo $ac_var`
463   case $ac_val in
464     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
465     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
466    { (exit 1); exit 1; }; };;
467   esac
468 done
469
470 # Be sure to have absolute paths.
471 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
472               localstatedir libdir includedir oldincludedir infodir mandir
473 do
474   eval ac_val=$`echo $ac_var`
475   case $ac_val in
476     [\\/$]* | ?:[\\/]* ) ;;
477     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
478    { (exit 1); exit 1; }; };;
479   esac
480 done
481
482 # There might be people who depend on the old broken behavior: `$host'
483 # used to hold the argument of --host etc.
484 build=$build_alias
485 host=$host_alias
486 target=$target_alias
487
488 # FIXME: should be removed in autoconf 3.0.
489 if test "x$host_alias" != x; then
490   if test "x$build_alias" = x; then
491     cross_compiling=maybe
492     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
493     If a cross compiler is detected then cross compile mode will be used." >&2
494   elif test "x$build_alias" != "x$host_alias"; then
495     cross_compiling=yes
496   fi
497 fi
498
499 ac_tool_prefix=
500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
501
502 test "$silent" = yes && exec 6>/dev/null
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506   ac_srcdir_defaulted=yes
507   # Try the directory containing this script, then its parent.
508   ac_prog=$0
509   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
510   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511   srcdir=$ac_confdir
512   if test ! -r $srcdir/$ac_unique_file; then
513     srcdir=..
514   fi
515 else
516   ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519   if test "$ac_srcdir_defaulted" = yes; then
520     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
521    { (exit 1); exit 1; }; }
522   else
523     { echo "$as_me: error: cannot find sources in $srcdir" >&2
524    { (exit 1); exit 1; }; }
525   fi
526 fi
527 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
528 ac_env_build_alias_set=${build_alias+set}
529 ac_env_build_alias_value=$build_alias
530 ac_cv_env_build_alias_set=${build_alias+set}
531 ac_cv_env_build_alias_value=$build_alias
532 ac_env_host_alias_set=${host_alias+set}
533 ac_env_host_alias_value=$host_alias
534 ac_cv_env_host_alias_set=${host_alias+set}
535 ac_cv_env_host_alias_value=$host_alias
536 ac_env_target_alias_set=${target_alias+set}
537 ac_env_target_alias_value=$target_alias
538 ac_cv_env_target_alias_set=${target_alias+set}
539 ac_cv_env_target_alias_value=$target_alias
540 ac_env_CC_set=${CC+set}
541 ac_env_CC_value=$CC
542 ac_cv_env_CC_set=${CC+set}
543 ac_cv_env_CC_value=$CC
544 ac_env_CFLAGS_set=${CFLAGS+set}
545 ac_env_CFLAGS_value=$CFLAGS
546 ac_cv_env_CFLAGS_set=${CFLAGS+set}
547 ac_cv_env_CFLAGS_value=$CFLAGS
548 ac_env_LDFLAGS_set=${LDFLAGS+set}
549 ac_env_LDFLAGS_value=$LDFLAGS
550 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
551 ac_cv_env_LDFLAGS_value=$LDFLAGS
552 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
553 ac_env_CPPFLAGS_value=$CPPFLAGS
554 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
555 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
556 ac_env_CPP_set=${CPP+set}
557 ac_env_CPP_value=$CPP
558 ac_cv_env_CPP_set=${CPP+set}
559 ac_cv_env_CPP_value=$CPP
560
561 #
562 # Report the --help message.
563 #
564 if test "$ac_init_help" = "long"; then
565   # Omit some internal or obsolete options to make the list less imposing.
566   # This message is too long to be a string in the A/UX 3.1 sh.
567   cat <<EOF
568 \`configure' configures this package to adapt to many kinds of systems.
569
570 Usage: $0 [OPTION]... [VAR=VALUE]...
571
572 To assign environment variables (e.g., CC, CFLAGS...), specify them as
573 VAR=VALUE.  See below for descriptions of some of the useful variables.
574
575 Defaults for the options are specified in brackets.
576
577 Configuration:
578   -h, --help              display this help and exit
579       --help=short        display options specific to this package
580       --help=recursive    display the short help of all the included packages
581   -V, --version           display version information and exit
582   -q, --quiet, --silent   do not print \`checking...' messages
583       --cache-file=FILE   cache test results in FILE [disabled]
584   -C, --config-cache      alias for \`--cache-file=config.cache'
585   -n, --no-create         do not create output files
586       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
587
588 EOF
589
590   cat <<EOF
591 Installation directories:
592   --prefix=PREFIX         install architecture-independent files in PREFIX
593                           [$ac_default_prefix]
594   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
595                           [PREFIX]
596
597 By default, \`make install' will install all the files in
598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
600 for instance \`--prefix=\$HOME'.
601
602 For better control, use the options below.
603
604 Fine tuning of the installation directories:
605   --bindir=DIR            user executables [EPREFIX/bin]
606   --sbindir=DIR           system admin executables [EPREFIX/sbin]
607   --libexecdir=DIR        program executables [EPREFIX/libexec]
608   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
609   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
610   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
611   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
612   --libdir=DIR            object code libraries [EPREFIX/lib]
613   --includedir=DIR        C header files [PREFIX/include]
614   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
615   --infodir=DIR           info documentation [PREFIX/info]
616   --mandir=DIR            man documentation [PREFIX/man]
617 EOF
618
619   cat <<\EOF
620
621 Program names:
622   --program-prefix=PREFIX            prepend PREFIX to installed program names
623   --program-suffix=SUFFIX            append SUFFIX to installed program names
624   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
625
626 X features:
627   --x-includes=DIR    X include files are in DIR
628   --x-libraries=DIR   X library files are in DIR
629
630 System types:
631   --build=BUILD           configure for building on BUILD [guessed]
632   --host=HOST       build programs to run on HOST [BUILD]
633 EOF
634 fi
635
636 if test -n "$ac_init_help"; then
637
638   cat <<\EOF
639
640 Optional Features:
641   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
642   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
643
644 Optional Packages:
645   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
646   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
647
648   --disable-echo          display "compiling" commands
649   --enable-warnings       test: turn on gcc compiler warnings
650   --with-dmalloc          test: use Gray Watson's dmalloc library
651   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
652   --with-valgrind         test: use valgrind
653   --disable-leaks         test: free permanent memory, analyze leaks
654 --disable-widec           disable checks for wide-character functions
655   --with-curses-dir=DIR   directory in which (n)curses is installed
656   --with-ncursesw         use wide ncurses-libraries (installed)
657   --with-ncurses          use ncurses-libraries (installed)
658   --with-pdcurses         compile/link with pdcurses X11 library
659   --with-curses-colr      compile/link with HPUX 10.x color-curses
660   --with-curses-5lib      compile/link with SunOS 5lib curses
661   --with-Xaw3d            link with Xaw 3d library
662   --with-neXtaw           link with neXT Athena library
663   --with-XawPlus          link with Athena-Plus library
664   --with-pkg-config{=path} enable/disable use of pkg-config
665   --with-x                use the X Window System
666   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
667
668 Some influential environment variables:
669   CC          C compiler command
670   CFLAGS      C compiler flags
671   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
672               nonstandard directory <lib dir>
673   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
674               headers in a nonstandard directory <include dir>
675   CPP         C preprocessor
676
677 Use these variables to override the choices made by `configure' or to help
678 it to find libraries and programs with nonstandard names/locations.
679
680 EOF
681 fi
682
683 if test "$ac_init_help" = "recursive"; then
684   # If there are subdirs, report their specific --help.
685   ac_popdir=`pwd`
686   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
687     cd $ac_subdir
688     # A "../" for each directory in /$ac_subdir.
689     ac_dots=`echo $ac_subdir |
690              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
691
692     case $srcdir in
693     .) # No --srcdir option.  We are building in place.
694       ac_sub_srcdir=$srcdir ;;
695     [\\/]* | ?:[\\/]* ) # Absolute path.
696       ac_sub_srcdir=$srcdir/$ac_subdir ;;
697     *) # Relative path.
698       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
699     esac
700
701     # Check for guested configure; otherwise get Cygnus style configure.
702     if test -f $ac_sub_srcdir/configure.gnu; then
703       echo
704       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
705     elif test -f $ac_sub_srcdir/configure; then
706       echo
707       $SHELL $ac_sub_srcdir/configure  --help=recursive
708     elif test -f $ac_sub_srcdir/configure.ac ||
709            test -f $ac_sub_srcdir/configure.in; then
710       echo
711       $ac_configure --help
712     else
713       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
714     fi
715     cd $ac_popdir
716   done
717 fi
718
719 test -n "$ac_init_help" && exit 0
720 if $ac_init_version; then
721   cat <<\EOF
722
723 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
724 Free Software Foundation, Inc.
725 This configure script is free software; the Free Software Foundation
726 gives unlimited permission to copy, distribute and modify it.
727 EOF
728   exit 0
729 fi
730 exec 5>config.log
731 cat >&5 <<EOF
732 This file contains any messages produced by compilers while
733 running configure, to aid debugging if configure makes a mistake.
734
735 It was created by $as_me, which was
736 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
737
738   $ $0 $@
739
740 EOF
741 {
742 cat <<_ASUNAME
743 ## ---------- ##
744 ## Platform.  ##
745 ## ---------- ##
746
747 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
748 uname -m = `(uname -m) 2>/dev/null || echo unknown`
749 uname -r = `(uname -r) 2>/dev/null || echo unknown`
750 uname -s = `(uname -s) 2>/dev/null || echo unknown`
751 uname -v = `(uname -v) 2>/dev/null || echo unknown`
752
753 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
754 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
755
756 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
757 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
758 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
759 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
760 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
761 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
762 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
763
764 PATH = $PATH
765
766 _ASUNAME
767 } >&5
768
769 cat >&5 <<EOF
770 ## ------------ ##
771 ## Core tests.  ##
772 ## ------------ ##
773
774 EOF
775
776 # Keep a trace of the command line.
777 # Strip out --no-create and --no-recursion so they do not pile up.
778 # Also quote any args containing shell meta-characters.
779 ac_configure_args=
780 ac_sep=
781 for ac_arg
782 do
783   case $ac_arg in
784   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
785   | --no-cr | --no-c) ;;
786   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
787   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
788   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
789     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
790     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
791     ac_sep=" " ;;
792   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
793      ac_sep=" " ;;
794   esac
795   # Get rid of the leading space.
796 done
797
798 # When interrupted or exit'd, cleanup temporary files, and complete
799 # config.log.  We remove comments because anyway the quotes in there
800 # would cause problems or look ugly.
801 trap 'exit_status=$?
802   # Save into config.log some information that might help in debugging.
803   echo >&5
804   echo "## ----------------- ##" >&5
805   echo "## Cache variables.  ##" >&5
806   echo "## ----------------- ##" >&5
807   echo >&5
808   # The following way of writing the cache mishandles newlines in values,
809 {
810   (set) 2>&1 |
811     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
812     *ac_space=\ *)
813       sed -n \
814         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
815           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
816       ;;
817     *)
818       sed -n \
819         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
820       ;;
821     esac;
822 } >&5
823   sed "/^$/d" confdefs.h >conftest.log
824   if test -s conftest.log; then
825     echo >&5
826     echo "## ------------ ##" >&5
827     echo "## confdefs.h.  ##" >&5
828     echo "## ------------ ##" >&5
829     echo >&5
830     cat conftest.log >&5
831   fi
832   (echo; echo) >&5
833   test "$ac_signal" != 0 &&
834     echo "$as_me: caught signal $ac_signal" >&5
835   echo "$as_me: exit $exit_status" >&5
836   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
837     exit $exit_status
838      ' 0
839 for ac_signal in 1 2 13 15; do
840   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
841 done
842 ac_signal=0
843
844 # confdefs.h avoids OS command line length limits that DEFS can exceed.
845 rm -rf conftest* confdefs.h
846 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
847 echo >confdefs.h
848
849 # Let the site file select an alternate cache file if it wants to.
850 # Prefer explicitly selected file to automatically selected ones.
851 if test -z "$CONFIG_SITE"; then
852   if test "x$prefix" != xNONE; then
853     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
854   else
855     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
856   fi
857 fi
858 for ac_site_file in $CONFIG_SITE; do
859   if test -r "$ac_site_file"; then
860     { echo "$as_me:860: loading site script $ac_site_file" >&5
861 echo "$as_me: loading site script $ac_site_file" >&6;}
862     cat "$ac_site_file" >&5
863     . "$ac_site_file"
864   fi
865 done
866
867 if test -r "$cache_file"; then
868   # Some versions of bash will fail to source /dev/null (special
869   # files actually), so we avoid doing that.
870   if test -f "$cache_file"; then
871     { echo "$as_me:871: loading cache $cache_file" >&5
872 echo "$as_me: loading cache $cache_file" >&6;}
873     case $cache_file in
874       [\\/]* | ?:[\\/]* ) . $cache_file;;
875       *)                      . ./$cache_file;;
876     esac
877   fi
878 else
879   { echo "$as_me:879: creating cache $cache_file" >&5
880 echo "$as_me: creating cache $cache_file" >&6;}
881   >$cache_file
882 fi
883
884 # Check that the precious variables saved in the cache have kept the same
885 # value.
886 ac_cache_corrupted=false
887 for ac_var in `(set) 2>&1 |
888                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
889   eval ac_old_set=\$ac_cv_env_${ac_var}_set
890   eval ac_new_set=\$ac_env_${ac_var}_set
891   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
892   eval ac_new_val="\$ac_env_${ac_var}_value"
893   case $ac_old_set,$ac_new_set in
894     set,)
895       { echo "$as_me:895: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
896 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
897       ac_cache_corrupted=: ;;
898     ,set)
899       { echo "$as_me:899: error: \`$ac_var' was not set in the previous run" >&5
900 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
901       ac_cache_corrupted=: ;;
902     ,);;
903     *)
904       if test "x$ac_old_val" != "x$ac_new_val"; then
905         { echo "$as_me:905: error: \`$ac_var' has changed since the previous run:" >&5
906 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
907         { echo "$as_me:907:   former value:  $ac_old_val" >&5
908 echo "$as_me:   former value:  $ac_old_val" >&2;}
909         { echo "$as_me:909:   current value: $ac_new_val" >&5
910 echo "$as_me:   current value: $ac_new_val" >&2;}
911         ac_cache_corrupted=:
912       fi;;
913   esac
914   # Pass precious variables to config.status.  It doesn't matter if
915   # we pass some twice (in addition to the command line arguments).
916   if test "$ac_new_set" = set; then
917     case $ac_new_val in
918     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
919       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
920       ac_configure_args="$ac_configure_args '$ac_arg'"
921       ;;
922     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
923        ;;
924     esac
925   fi
926 done
927 if $ac_cache_corrupted; then
928   { echo "$as_me:928: error: changes in the environment can compromise the build" >&5
929 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
930   { { echo "$as_me:930: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
931 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
932    { (exit 1); exit 1; }; }
933 fi
934
935 ac_ext=c
936 ac_cpp='$CPP $CPPFLAGS'
937 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
938 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
939 ac_compiler_gnu=$ac_cv_c_compiler_gnu
940 ac_main_return=return
941
942 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
943   *c*,-n*) ECHO_N= ECHO_C='
944 ' ECHO_T='      ' ;;
945   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
946   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
947 esac
948 echo "#! $SHELL" >conftest.sh
949 echo  "exit 0"   >>conftest.sh
950 chmod +x conftest.sh
951 if { (echo "$as_me:951: PATH=\".;.\"; conftest.sh") >&5
952   (PATH=".;."; conftest.sh) 2>&5
953   ac_status=$?
954   echo "$as_me:954: \$? = $ac_status" >&5
955   (exit $ac_status); }; then
956   ac_path_separator=';'
957 else
958   ac_path_separator=:
959 fi
960 PATH_SEPARATOR="$ac_path_separator"
961 rm -f conftest.sh
962
963 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
964
965 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
966
967 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
968
969 ac_aux_dir=
970 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
971   if test -f $ac_dir/install-sh; then
972     ac_aux_dir=$ac_dir
973     ac_install_sh="$ac_aux_dir/install-sh -c"
974     break
975   elif test -f $ac_dir/install.sh; then
976     ac_aux_dir=$ac_dir
977     ac_install_sh="$ac_aux_dir/install.sh -c"
978     break
979   elif test -f $ac_dir/shtool; then
980     ac_aux_dir=$ac_dir
981     ac_install_sh="$ac_aux_dir/shtool install -c"
982     break
983   fi
984 done
985 if test -z "$ac_aux_dir"; then
986   { { echo "$as_me:986: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
987 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
988    { (exit 1); exit 1; }; }
989 fi
990 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
991 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
992 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
993
994 # Make sure we can run config.sub.
995 $ac_config_sub sun4 >/dev/null 2>&1 ||
996   { { echo "$as_me:996: error: cannot run $ac_config_sub" >&5
997 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
998    { (exit 1); exit 1; }; }
999
1000 echo "$as_me:1000: checking build system type" >&5
1001 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1002 if test "${ac_cv_build+set}" = set; then
1003   echo $ECHO_N "(cached) $ECHO_C" >&6
1004 else
1005   ac_cv_build_alias=$build_alias
1006 test -z "$ac_cv_build_alias" &&
1007   ac_cv_build_alias=`$ac_config_guess`
1008 test -z "$ac_cv_build_alias" &&
1009   { { echo "$as_me:1009: error: cannot guess build type; you must specify one" >&5
1010 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1011    { (exit 1); exit 1; }; }
1012 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1013   { { echo "$as_me:1013: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1014 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1015    { (exit 1); exit 1; }; }
1016
1017 fi
1018 echo "$as_me:1018: result: $ac_cv_build" >&5
1019 echo "${ECHO_T}$ac_cv_build" >&6
1020 build=$ac_cv_build
1021 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1022 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1023 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1024
1025 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1026         echo "$as_me:1026: checking host system type" >&5
1027 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1028 if test "${ac_cv_host+set}" = set; then
1029   echo $ECHO_N "(cached) $ECHO_C" >&6
1030 else
1031   ac_cv_host_alias=$host_alias
1032 test -z "$ac_cv_host_alias" &&
1033   ac_cv_host_alias=$ac_cv_build_alias
1034 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1035   { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1036 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1037    { (exit 1); exit 1; }; }
1038
1039 fi
1040 echo "$as_me:1040: result: $ac_cv_host" >&5
1041 echo "${ECHO_T}$ac_cv_host" >&6
1042 host=$ac_cv_host
1043 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047         system_name="$host_os"
1048 else
1049         system_name="`(uname -s -r) 2>/dev/null`"
1050         if test -z "$system_name" ; then
1051                 system_name="`(hostname) 2>/dev/null`"
1052         fi
1053 fi
1054 test -n "$system_name" && cat >>confdefs.h <<EOF
1055 #define SYSTEM_NAME "$system_name"
1056 EOF
1057
1058 if test "${cf_cv_system_name+set}" = set; then
1059   echo $ECHO_N "(cached) $ECHO_C" >&6
1060 else
1061   cf_cv_system_name="$system_name"
1062 fi
1063
1064 test -z "$system_name" && system_name="$cf_cv_system_name"
1065 test -n "$cf_cv_system_name" && echo "$as_me:1065: result: Configuring for $cf_cv_system_name" >&5
1066 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1067
1068 if test ".$system_name" != ".$cf_cv_system_name" ; then
1069         echo "$as_me:1069: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1070 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1071         { { echo "$as_me:1071: error: \"Please remove config.cache and try again.\"" >&5
1072 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1073    { (exit 1); exit 1; }; }
1074 fi
1075
1076 test "$program_prefix" != NONE &&
1077   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1078 # Use a double $ so make ignores it.
1079 test "$program_suffix" != NONE &&
1080   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1081 # Double any \ or $.  echo might interpret backslashes.
1082 # By default was `s,x,x', remove it if useless.
1083 cat <<\_ACEOF >conftest.sed
1084 s/[\\$]/&&/g;s/;s,x,x,$//
1085 _ACEOF
1086 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1087 rm conftest.sed
1088
1089 echo "$as_me:1089: checking whether ${MAKE-make} sets \${MAKE}" >&5
1090 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1091 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1092 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1093   echo $ECHO_N "(cached) $ECHO_C" >&6
1094 else
1095   cat >conftest.make <<\EOF
1096 all:
1097         @echo 'ac_maketemp="${MAKE}"'
1098 EOF
1099 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1100 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1101 if test -n "$ac_maketemp"; then
1102   eval ac_cv_prog_make_${ac_make}_set=yes
1103 else
1104   eval ac_cv_prog_make_${ac_make}_set=no
1105 fi
1106 rm -f conftest.make
1107 fi
1108 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1109   echo "$as_me:1109: result: yes" >&5
1110 echo "${ECHO_T}yes" >&6
1111   SET_MAKE=
1112 else
1113   echo "$as_me:1113: result: no" >&5
1114 echo "${ECHO_T}no" >&6
1115   SET_MAKE="MAKE=${MAKE-make}"
1116 fi
1117
1118 ac_ext=c
1119 ac_cpp='$CPP $CPPFLAGS'
1120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1123 ac_main_return=return
1124 if test -n "$ac_tool_prefix"; then
1125   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1126 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1127 echo "$as_me:1127: checking for $ac_word" >&5
1128 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1129 if test "${ac_cv_prog_CC+set}" = set; then
1130   echo $ECHO_N "(cached) $ECHO_C" >&6
1131 else
1132   if test -n "$CC"; then
1133   ac_cv_prog_CC="$CC" # Let the user override the test.
1134 else
1135   ac_save_IFS=$IFS; IFS=$ac_path_separator
1136 ac_dummy="$PATH"
1137 for ac_dir in $ac_dummy; do
1138   IFS=$ac_save_IFS
1139   test -z "$ac_dir" && ac_dir=.
1140   $as_executable_p "$ac_dir/$ac_word" || continue
1141 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1142 echo "$as_me:1142: found $ac_dir/$ac_word" >&5
1143 break
1144 done
1145
1146 fi
1147 fi
1148 CC=$ac_cv_prog_CC
1149 if test -n "$CC"; then
1150   echo "$as_me:1150: result: $CC" >&5
1151 echo "${ECHO_T}$CC" >&6
1152 else
1153   echo "$as_me:1153: result: no" >&5
1154 echo "${ECHO_T}no" >&6
1155 fi
1156
1157 fi
1158 if test -z "$ac_cv_prog_CC"; then
1159   ac_ct_CC=$CC
1160   # Extract the first word of "gcc", so it can be a program name with args.
1161 set dummy gcc; ac_word=$2
1162 echo "$as_me:1162: checking for $ac_word" >&5
1163 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1164 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1165   echo $ECHO_N "(cached) $ECHO_C" >&6
1166 else
1167   if test -n "$ac_ct_CC"; then
1168   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1169 else
1170   ac_save_IFS=$IFS; IFS=$ac_path_separator
1171 ac_dummy="$PATH"
1172 for ac_dir in $ac_dummy; do
1173   IFS=$ac_save_IFS
1174   test -z "$ac_dir" && ac_dir=.
1175   $as_executable_p "$ac_dir/$ac_word" || continue
1176 ac_cv_prog_ac_ct_CC="gcc"
1177 echo "$as_me:1177: found $ac_dir/$ac_word" >&5
1178 break
1179 done
1180
1181 fi
1182 fi
1183 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1184 if test -n "$ac_ct_CC"; then
1185   echo "$as_me:1185: result: $ac_ct_CC" >&5
1186 echo "${ECHO_T}$ac_ct_CC" >&6
1187 else
1188   echo "$as_me:1188: result: no" >&5
1189 echo "${ECHO_T}no" >&6
1190 fi
1191
1192   CC=$ac_ct_CC
1193 else
1194   CC="$ac_cv_prog_CC"
1195 fi
1196
1197 if test -z "$CC"; then
1198   if test -n "$ac_tool_prefix"; then
1199   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1200 set dummy ${ac_tool_prefix}cc; ac_word=$2
1201 echo "$as_me:1201: checking for $ac_word" >&5
1202 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1203 if test "${ac_cv_prog_CC+set}" = set; then
1204   echo $ECHO_N "(cached) $ECHO_C" >&6
1205 else
1206   if test -n "$CC"; then
1207   ac_cv_prog_CC="$CC" # Let the user override the test.
1208 else
1209   ac_save_IFS=$IFS; IFS=$ac_path_separator
1210 ac_dummy="$PATH"
1211 for ac_dir in $ac_dummy; do
1212   IFS=$ac_save_IFS
1213   test -z "$ac_dir" && ac_dir=.
1214   $as_executable_p "$ac_dir/$ac_word" || continue
1215 ac_cv_prog_CC="${ac_tool_prefix}cc"
1216 echo "$as_me:1216: found $ac_dir/$ac_word" >&5
1217 break
1218 done
1219
1220 fi
1221 fi
1222 CC=$ac_cv_prog_CC
1223 if test -n "$CC"; then
1224   echo "$as_me:1224: result: $CC" >&5
1225 echo "${ECHO_T}$CC" >&6
1226 else
1227   echo "$as_me:1227: result: no" >&5
1228 echo "${ECHO_T}no" >&6
1229 fi
1230
1231 fi
1232 if test -z "$ac_cv_prog_CC"; then
1233   ac_ct_CC=$CC
1234   # Extract the first word of "cc", so it can be a program name with args.
1235 set dummy cc; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   if test -n "$ac_ct_CC"; then
1242   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1243 else
1244   ac_save_IFS=$IFS; IFS=$ac_path_separator
1245 ac_dummy="$PATH"
1246 for ac_dir in $ac_dummy; do
1247   IFS=$ac_save_IFS
1248   test -z "$ac_dir" && ac_dir=.
1249   $as_executable_p "$ac_dir/$ac_word" || continue
1250 ac_cv_prog_ac_ct_CC="cc"
1251 echo "$as_me:1251: found $ac_dir/$ac_word" >&5
1252 break
1253 done
1254
1255 fi
1256 fi
1257 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1258 if test -n "$ac_ct_CC"; then
1259   echo "$as_me:1259: result: $ac_ct_CC" >&5
1260 echo "${ECHO_T}$ac_ct_CC" >&6
1261 else
1262   echo "$as_me:1262: result: no" >&5
1263 echo "${ECHO_T}no" >&6
1264 fi
1265
1266   CC=$ac_ct_CC
1267 else
1268   CC="$ac_cv_prog_CC"
1269 fi
1270
1271 fi
1272 if test -z "$CC"; then
1273   # Extract the first word of "cc", so it can be a program name with args.
1274 set dummy cc; ac_word=$2
1275 echo "$as_me:1275: checking for $ac_word" >&5
1276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1277 if test "${ac_cv_prog_CC+set}" = set; then
1278   echo $ECHO_N "(cached) $ECHO_C" >&6
1279 else
1280   if test -n "$CC"; then
1281   ac_cv_prog_CC="$CC" # Let the user override the test.
1282 else
1283   ac_prog_rejected=no
1284   ac_save_IFS=$IFS; IFS=$ac_path_separator
1285 ac_dummy="$PATH"
1286 for ac_dir in $ac_dummy; do
1287   IFS=$ac_save_IFS
1288   test -z "$ac_dir" && ac_dir=.
1289   $as_executable_p "$ac_dir/$ac_word" || continue
1290 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1291   ac_prog_rejected=yes
1292   continue
1293 fi
1294 ac_cv_prog_CC="cc"
1295 echo "$as_me:1295: found $ac_dir/$ac_word" >&5
1296 break
1297 done
1298
1299 if test $ac_prog_rejected = yes; then
1300   # We found a bogon in the path, so make sure we never use it.
1301   set dummy $ac_cv_prog_CC
1302   shift
1303   if test $# != 0; then
1304     # We chose a different compiler from the bogus one.
1305     # However, it has the same basename, so the bogon will be chosen
1306     # first if we set CC to just the basename; use the full file name.
1307     shift
1308     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1309     shift
1310     ac_cv_prog_CC="$@"
1311   fi
1312 fi
1313 fi
1314 fi
1315 CC=$ac_cv_prog_CC
1316 if test -n "$CC"; then
1317   echo "$as_me:1317: result: $CC" >&5
1318 echo "${ECHO_T}$CC" >&6
1319 else
1320   echo "$as_me:1320: result: no" >&5
1321 echo "${ECHO_T}no" >&6
1322 fi
1323
1324 fi
1325 if test -z "$CC"; then
1326   if test -n "$ac_tool_prefix"; then
1327   for ac_prog in cl
1328   do
1329     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1330 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1331 echo "$as_me:1331: checking for $ac_word" >&5
1332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1333 if test "${ac_cv_prog_CC+set}" = set; then
1334   echo $ECHO_N "(cached) $ECHO_C" >&6
1335 else
1336   if test -n "$CC"; then
1337   ac_cv_prog_CC="$CC" # Let the user override the test.
1338 else
1339   ac_save_IFS=$IFS; IFS=$ac_path_separator
1340 ac_dummy="$PATH"
1341 for ac_dir in $ac_dummy; do
1342   IFS=$ac_save_IFS
1343   test -z "$ac_dir" && ac_dir=.
1344   $as_executable_p "$ac_dir/$ac_word" || continue
1345 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1346 echo "$as_me:1346: found $ac_dir/$ac_word" >&5
1347 break
1348 done
1349
1350 fi
1351 fi
1352 CC=$ac_cv_prog_CC
1353 if test -n "$CC"; then
1354   echo "$as_me:1354: result: $CC" >&5
1355 echo "${ECHO_T}$CC" >&6
1356 else
1357   echo "$as_me:1357: result: no" >&5
1358 echo "${ECHO_T}no" >&6
1359 fi
1360
1361     test -n "$CC" && break
1362   done
1363 fi
1364 if test -z "$CC"; then
1365   ac_ct_CC=$CC
1366   for ac_prog in cl
1367 do
1368   # Extract the first word of "$ac_prog", so it can be a program name with args.
1369 set dummy $ac_prog; ac_word=$2
1370 echo "$as_me:1370: checking for $ac_word" >&5
1371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1372 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1373   echo $ECHO_N "(cached) $ECHO_C" >&6
1374 else
1375   if test -n "$ac_ct_CC"; then
1376   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1377 else
1378   ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 ac_dummy="$PATH"
1380 for ac_dir in $ac_dummy; do
1381   IFS=$ac_save_IFS
1382   test -z "$ac_dir" && ac_dir=.
1383   $as_executable_p "$ac_dir/$ac_word" || continue
1384 ac_cv_prog_ac_ct_CC="$ac_prog"
1385 echo "$as_me:1385: found $ac_dir/$ac_word" >&5
1386 break
1387 done
1388
1389 fi
1390 fi
1391 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1392 if test -n "$ac_ct_CC"; then
1393   echo "$as_me:1393: result: $ac_ct_CC" >&5
1394 echo "${ECHO_T}$ac_ct_CC" >&6
1395 else
1396   echo "$as_me:1396: result: no" >&5
1397 echo "${ECHO_T}no" >&6
1398 fi
1399
1400   test -n "$ac_ct_CC" && break
1401 done
1402
1403   CC=$ac_ct_CC
1404 fi
1405
1406 fi
1407
1408 test -z "$CC" && { { echo "$as_me:1408: error: no acceptable cc found in \$PATH" >&5
1409 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1410    { (exit 1); exit 1; }; }
1411
1412 # Provide some information about the compiler.
1413 echo "$as_me:1413:" \
1414      "checking for C compiler version" >&5
1415 ac_compiler=`set X $ac_compile; echo $2`
1416 { (eval echo "$as_me:1416: \"$ac_compiler --version </dev/null >&5\"") >&5
1417   (eval $ac_compiler --version </dev/null >&5) 2>&5
1418   ac_status=$?
1419   echo "$as_me:1419: \$? = $ac_status" >&5
1420   (exit $ac_status); }
1421 { (eval echo "$as_me:1421: \"$ac_compiler -v </dev/null >&5\"") >&5
1422   (eval $ac_compiler -v </dev/null >&5) 2>&5
1423   ac_status=$?
1424   echo "$as_me:1424: \$? = $ac_status" >&5
1425   (exit $ac_status); }
1426 { (eval echo "$as_me:1426: \"$ac_compiler -V </dev/null >&5\"") >&5
1427   (eval $ac_compiler -V </dev/null >&5) 2>&5
1428   ac_status=$?
1429   echo "$as_me:1429: \$? = $ac_status" >&5
1430   (exit $ac_status); }
1431
1432 cat >conftest.$ac_ext <<_ACEOF
1433 #line 1433 "configure"
1434 #include "confdefs.h"
1435
1436 int
1437 main ()
1438 {
1439
1440   ;
1441   return 0;
1442 }
1443 _ACEOF
1444 ac_clean_files_save=$ac_clean_files
1445 ac_clean_files="$ac_clean_files a.out a.exe"
1446 # Try to create an executable without -o first, disregard a.out.
1447 # It will help us diagnose broken compilers, and finding out an intuition
1448 # of exeext.
1449 echo "$as_me:1449: checking for C compiler default output" >&5
1450 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1451 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1452 if { (eval echo "$as_me:1452: \"$ac_link_default\"") >&5
1453   (eval $ac_link_default) 2>&5
1454   ac_status=$?
1455   echo "$as_me:1455: \$? = $ac_status" >&5
1456   (exit $ac_status); }; then
1457   # Find the output, starting from the most likely.  This scheme is
1458 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1459 # resort.
1460 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1461                 ls a.out conftest 2>/dev/null;
1462                 ls a.* conftest.* 2>/dev/null`; do
1463   case $ac_file in
1464     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1465     a.out ) # We found the default executable, but exeext='' is most
1466             # certainly right.
1467             break;;
1468     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1469           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1470           export ac_cv_exeext
1471           break;;
1472     * ) break;;
1473   esac
1474 done
1475 else
1476   echo "$as_me: failed program was:" >&5
1477 cat conftest.$ac_ext >&5
1478 { { echo "$as_me:1478: error: C compiler cannot create executables" >&5
1479 echo "$as_me: error: C compiler cannot create executables" >&2;}
1480    { (exit 77); exit 77; }; }
1481 fi
1482
1483 ac_exeext=$ac_cv_exeext
1484 echo "$as_me:1484: result: $ac_file" >&5
1485 echo "${ECHO_T}$ac_file" >&6
1486
1487 # Check the compiler produces executables we can run.  If not, either
1488 # the compiler is broken, or we cross compile.
1489 echo "$as_me:1489: checking whether the C compiler works" >&5
1490 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1491 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1492 # If not cross compiling, check that we can run a simple program.
1493 if test "$cross_compiling" != yes; then
1494   if { ac_try='./$ac_file'
1495   { (eval echo "$as_me:1495: \"$ac_try\"") >&5
1496   (eval $ac_try) 2>&5
1497   ac_status=$?
1498   echo "$as_me:1498: \$? = $ac_status" >&5
1499   (exit $ac_status); }; }; then
1500     cross_compiling=no
1501   else
1502     if test "$cross_compiling" = maybe; then
1503         cross_compiling=yes
1504     else
1505         { { echo "$as_me:1505: error: cannot run C compiled programs.
1506 If you meant to cross compile, use \`--host'." >&5
1507 echo "$as_me: error: cannot run C compiled programs.
1508 If you meant to cross compile, use \`--host'." >&2;}
1509    { (exit 1); exit 1; }; }
1510     fi
1511   fi
1512 fi
1513 echo "$as_me:1513: result: yes" >&5
1514 echo "${ECHO_T}yes" >&6
1515
1516 rm -f a.out a.exe conftest$ac_cv_exeext
1517 ac_clean_files=$ac_clean_files_save
1518 # Check the compiler produces executables we can run.  If not, either
1519 # the compiler is broken, or we cross compile.
1520 echo "$as_me:1520: checking whether we are cross compiling" >&5
1521 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1522 echo "$as_me:1522: result: $cross_compiling" >&5
1523 echo "${ECHO_T}$cross_compiling" >&6
1524
1525 echo "$as_me:1525: checking for executable suffix" >&5
1526 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1527 if { (eval echo "$as_me:1527: \"$ac_link\"") >&5
1528   (eval $ac_link) 2>&5
1529   ac_status=$?
1530   echo "$as_me:1530: \$? = $ac_status" >&5
1531   (exit $ac_status); }; then
1532   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1533 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1534 # work properly (i.e., refer to `conftest.exe'), while it won't with
1535 # `rm'.
1536 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1537   case $ac_file in
1538     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1539     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1540           export ac_cv_exeext
1541           break;;
1542     * ) break;;
1543   esac
1544 done
1545 else
1546   { { echo "$as_me:1546: error: cannot compute EXEEXT: cannot compile and link" >&5
1547 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1548    { (exit 1); exit 1; }; }
1549 fi
1550
1551 rm -f conftest$ac_cv_exeext
1552 echo "$as_me:1552: result: $ac_cv_exeext" >&5
1553 echo "${ECHO_T}$ac_cv_exeext" >&6
1554
1555 rm -f conftest.$ac_ext
1556 EXEEXT=$ac_cv_exeext
1557 ac_exeext=$EXEEXT
1558 echo "$as_me:1558: checking for object suffix" >&5
1559 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1560 if test "${ac_cv_objext+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   cat >conftest.$ac_ext <<_ACEOF
1564 #line 1564 "configure"
1565 #include "confdefs.h"
1566
1567 int
1568 main ()
1569 {
1570
1571   ;
1572   return 0;
1573 }
1574 _ACEOF
1575 rm -f conftest.o conftest.obj
1576 if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5
1577   (eval $ac_compile) 2>&5
1578   ac_status=$?
1579   echo "$as_me:1579: \$? = $ac_status" >&5
1580   (exit $ac_status); }; then
1581   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1582   case $ac_file in
1583     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1584     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1585        break;;
1586   esac
1587 done
1588 else
1589   echo "$as_me: failed program was:" >&5
1590 cat conftest.$ac_ext >&5
1591 { { echo "$as_me:1591: error: cannot compute OBJEXT: cannot compile" >&5
1592 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1593    { (exit 1); exit 1; }; }
1594 fi
1595
1596 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1597 fi
1598 echo "$as_me:1598: result: $ac_cv_objext" >&5
1599 echo "${ECHO_T}$ac_cv_objext" >&6
1600 OBJEXT=$ac_cv_objext
1601 ac_objext=$OBJEXT
1602 echo "$as_me:1602: checking whether we are using the GNU C compiler" >&5
1603 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1604 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1605   echo $ECHO_N "(cached) $ECHO_C" >&6
1606 else
1607   cat >conftest.$ac_ext <<_ACEOF
1608 #line 1608 "configure"
1609 #include "confdefs.h"
1610
1611 int
1612 main ()
1613 {
1614 #ifndef __GNUC__
1615        choke me
1616 #endif
1617
1618   ;
1619   return 0;
1620 }
1621 _ACEOF
1622 rm -f conftest.$ac_objext
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624   (eval $ac_compile) 2>&5
1625   ac_status=$?
1626   echo "$as_me:1626: \$? = $ac_status" >&5
1627   (exit $ac_status); } &&
1628          { ac_try='test -s conftest.$ac_objext'
1629   { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1630   (eval $ac_try) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }; }; then
1634   ac_compiler_gnu=yes
1635 else
1636   echo "$as_me: failed program was:" >&5
1637 cat conftest.$ac_ext >&5
1638 ac_compiler_gnu=no
1639 fi
1640 rm -f conftest.$ac_objext conftest.$ac_ext
1641 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1642
1643 fi
1644 echo "$as_me:1644: result: $ac_cv_c_compiler_gnu" >&5
1645 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1646 GCC=`test $ac_compiler_gnu = yes && echo yes`
1647 ac_test_CFLAGS=${CFLAGS+set}
1648 ac_save_CFLAGS=$CFLAGS
1649 CFLAGS="-g"
1650 echo "$as_me:1650: checking whether $CC accepts -g" >&5
1651 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1652 if test "${ac_cv_prog_cc_g+set}" = set; then
1653   echo $ECHO_N "(cached) $ECHO_C" >&6
1654 else
1655   cat >conftest.$ac_ext <<_ACEOF
1656 #line 1656 "configure"
1657 #include "confdefs.h"
1658
1659 int
1660 main ()
1661 {
1662
1663   ;
1664   return 0;
1665 }
1666 _ACEOF
1667 rm -f conftest.$ac_objext
1668 if { (eval echo "$as_me:1668: \"$ac_compile\"") >&5
1669   (eval $ac_compile) 2>&5
1670   ac_status=$?
1671   echo "$as_me:1671: \$? = $ac_status" >&5
1672   (exit $ac_status); } &&
1673          { ac_try='test -s conftest.$ac_objext'
1674   { (eval echo "$as_me:1674: \"$ac_try\"") >&5
1675   (eval $ac_try) 2>&5
1676   ac_status=$?
1677   echo "$as_me:1677: \$? = $ac_status" >&5
1678   (exit $ac_status); }; }; then
1679   ac_cv_prog_cc_g=yes
1680 else
1681   echo "$as_me: failed program was:" >&5
1682 cat conftest.$ac_ext >&5
1683 ac_cv_prog_cc_g=no
1684 fi
1685 rm -f conftest.$ac_objext conftest.$ac_ext
1686 fi
1687 echo "$as_me:1687: result: $ac_cv_prog_cc_g" >&5
1688 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1689 if test "$ac_test_CFLAGS" = set; then
1690   CFLAGS=$ac_save_CFLAGS
1691 elif test $ac_cv_prog_cc_g = yes; then
1692   if test "$GCC" = yes; then
1693     CFLAGS="-g -O2"
1694   else
1695     CFLAGS="-g"
1696   fi
1697 else
1698   if test "$GCC" = yes; then
1699     CFLAGS="-O2"
1700   else
1701     CFLAGS=
1702   fi
1703 fi
1704 # Some people use a C++ compiler to compile C.  Since we use `exit',
1705 # in C++ we need to declare it.  In case someone uses the same compiler
1706 # for both compiling C and C++ we need to have the C++ compiler decide
1707 # the declaration of exit, since it's the most demanding environment.
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #ifndef __cplusplus
1710   choke me
1711 #endif
1712 _ACEOF
1713 rm -f conftest.$ac_objext
1714 if { (eval echo "$as_me:1714: \"$ac_compile\"") >&5
1715   (eval $ac_compile) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); } &&
1719          { ac_try='test -s conftest.$ac_objext'
1720   { (eval echo "$as_me:1720: \"$ac_try\"") >&5
1721   (eval $ac_try) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }; }; then
1725   for ac_declaration in \
1726    ''\
1727    '#include <stdlib.h>' \
1728    'extern "C" void std::exit (int) throw (); using std::exit;' \
1729    'extern "C" void std::exit (int); using std::exit;' \
1730    'extern "C" void exit (int) throw ();' \
1731    'extern "C" void exit (int);' \
1732    'void exit (int);'
1733 do
1734   cat >conftest.$ac_ext <<_ACEOF
1735 #line 1735 "configure"
1736 #include "confdefs.h"
1737 #include <stdlib.h>
1738 $ac_declaration
1739 int
1740 main ()
1741 {
1742 exit (42);
1743   ;
1744   return 0;
1745 }
1746 _ACEOF
1747 rm -f conftest.$ac_objext
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749   (eval $ac_compile) 2>&5
1750   ac_status=$?
1751   echo "$as_me:1751: \$? = $ac_status" >&5
1752   (exit $ac_status); } &&
1753          { ac_try='test -s conftest.$ac_objext'
1754   { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1755   (eval $ac_try) 2>&5
1756   ac_status=$?
1757   echo "$as_me:1757: \$? = $ac_status" >&5
1758   (exit $ac_status); }; }; then
1759   :
1760 else
1761   echo "$as_me: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1763 continue
1764 fi
1765 rm -f conftest.$ac_objext conftest.$ac_ext
1766   cat >conftest.$ac_ext <<_ACEOF
1767 #line 1767 "configure"
1768 #include "confdefs.h"
1769 $ac_declaration
1770 int
1771 main ()
1772 {
1773 exit (42);
1774   ;
1775   return 0;
1776 }
1777 _ACEOF
1778 rm -f conftest.$ac_objext
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780   (eval $ac_compile) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); } &&
1784          { ac_try='test -s conftest.$ac_objext'
1785   { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1786   (eval $ac_try) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); }; }; then
1790   break
1791 else
1792   echo "$as_me: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 fi
1795 rm -f conftest.$ac_objext conftest.$ac_ext
1796 done
1797 rm -rf conftest*
1798 if test -n "$ac_declaration"; then
1799   echo '#ifdef __cplusplus' >>confdefs.h
1800   echo $ac_declaration      >>confdefs.h
1801   echo '#endif'             >>confdefs.h
1802 fi
1803
1804 else
1805   echo "$as_me: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 fi
1808 rm -f conftest.$ac_objext conftest.$ac_ext
1809 ac_ext=c
1810 ac_cpp='$CPP $CPPFLAGS'
1811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1814 ac_main_return=return
1815
1816 ac_ext=c
1817 ac_cpp='$CPP $CPPFLAGS'
1818 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1819 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1820 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1821 ac_main_return=return
1822 echo "$as_me:1822: checking how to run the C preprocessor" >&5
1823 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1824 # On Suns, sometimes $CPP names a directory.
1825 if test -n "$CPP" && test -d "$CPP"; then
1826   CPP=
1827 fi
1828 if test -z "$CPP"; then
1829   if test "${ac_cv_prog_CPP+set}" = set; then
1830   echo $ECHO_N "(cached) $ECHO_C" >&6
1831 else
1832       # Double quotes because CPP needs to be expanded
1833     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1834     do
1835       ac_preproc_ok=false
1836 for ac_c_preproc_warn_flag in '' yes
1837 do
1838   # Use a header file that comes with gcc, so configuring glibc
1839   # with a fresh cross-compiler works.
1840   # On the NeXT, cc -E runs the code through the compiler's parser,
1841   # not just through cpp. "Syntax error" is here to catch this case.
1842   cat >conftest.$ac_ext <<_ACEOF
1843 #line 1843 "configure"
1844 #include "confdefs.h"
1845 #include <assert.h>
1846                      Syntax error
1847 _ACEOF
1848 if { (eval echo "$as_me:1848: \"$ac_cpp conftest.$ac_ext\"") >&5
1849   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1850   ac_status=$?
1851   egrep -v '^ *\+' conftest.er1 >conftest.err
1852   rm -f conftest.er1
1853   cat conftest.err >&5
1854   echo "$as_me:1854: \$? = $ac_status" >&5
1855   (exit $ac_status); } >/dev/null; then
1856   if test -s conftest.err; then
1857     ac_cpp_err=$ac_c_preproc_warn_flag
1858   else
1859     ac_cpp_err=
1860   fi
1861 else
1862   ac_cpp_err=yes
1863 fi
1864 if test -z "$ac_cpp_err"; then
1865   :
1866 else
1867   echo "$as_me: failed program was:" >&5
1868   cat conftest.$ac_ext >&5
1869   # Broken: fails on valid input.
1870 continue
1871 fi
1872 rm -f conftest.err conftest.$ac_ext
1873
1874   # OK, works on sane cases.  Now check whether non-existent headers
1875   # can be detected and how.
1876   cat >conftest.$ac_ext <<_ACEOF
1877 #line 1877 "configure"
1878 #include "confdefs.h"
1879 #include <ac_nonexistent.h>
1880 _ACEOF
1881 if { (eval echo "$as_me:1881: \"$ac_cpp conftest.$ac_ext\"") >&5
1882   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1883   ac_status=$?
1884   egrep -v '^ *\+' conftest.er1 >conftest.err
1885   rm -f conftest.er1
1886   cat conftest.err >&5
1887   echo "$as_me:1887: \$? = $ac_status" >&5
1888   (exit $ac_status); } >/dev/null; then
1889   if test -s conftest.err; then
1890     ac_cpp_err=$ac_c_preproc_warn_flag
1891   else
1892     ac_cpp_err=
1893   fi
1894 else
1895   ac_cpp_err=yes
1896 fi
1897 if test -z "$ac_cpp_err"; then
1898   # Broken: success on invalid input.
1899 continue
1900 else
1901   echo "$as_me: failed program was:" >&5
1902   cat conftest.$ac_ext >&5
1903   # Passes both tests.
1904 ac_preproc_ok=:
1905 break
1906 fi
1907 rm -f conftest.err conftest.$ac_ext
1908
1909 done
1910 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1911 rm -f conftest.err conftest.$ac_ext
1912 if $ac_preproc_ok; then
1913   break
1914 fi
1915
1916     done
1917     ac_cv_prog_CPP=$CPP
1918
1919 fi
1920   CPP=$ac_cv_prog_CPP
1921 else
1922   ac_cv_prog_CPP=$CPP
1923 fi
1924 echo "$as_me:1924: result: $CPP" >&5
1925 echo "${ECHO_T}$CPP" >&6
1926 ac_preproc_ok=false
1927 for ac_c_preproc_warn_flag in '' yes
1928 do
1929   # Use a header file that comes with gcc, so configuring glibc
1930   # with a fresh cross-compiler works.
1931   # On the NeXT, cc -E runs the code through the compiler's parser,
1932   # not just through cpp. "Syntax error" is here to catch this case.
1933   cat >conftest.$ac_ext <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1936 #include <assert.h>
1937                      Syntax error
1938 _ACEOF
1939 if { (eval echo "$as_me:1939: \"$ac_cpp conftest.$ac_ext\"") >&5
1940   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1941   ac_status=$?
1942   egrep -v '^ *\+' conftest.er1 >conftest.err
1943   rm -f conftest.er1
1944   cat conftest.err >&5
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); } >/dev/null; then
1947   if test -s conftest.err; then
1948     ac_cpp_err=$ac_c_preproc_warn_flag
1949   else
1950     ac_cpp_err=
1951   fi
1952 else
1953   ac_cpp_err=yes
1954 fi
1955 if test -z "$ac_cpp_err"; then
1956   :
1957 else
1958   echo "$as_me: failed program was:" >&5
1959   cat conftest.$ac_ext >&5
1960   # Broken: fails on valid input.
1961 continue
1962 fi
1963 rm -f conftest.err conftest.$ac_ext
1964
1965   # OK, works on sane cases.  Now check whether non-existent headers
1966   # can be detected and how.
1967   cat >conftest.$ac_ext <<_ACEOF
1968 #line 1968 "configure"
1969 #include "confdefs.h"
1970 #include <ac_nonexistent.h>
1971 _ACEOF
1972 if { (eval echo "$as_me:1972: \"$ac_cpp conftest.$ac_ext\"") >&5
1973   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1974   ac_status=$?
1975   egrep -v '^ *\+' conftest.er1 >conftest.err
1976   rm -f conftest.er1
1977   cat conftest.err >&5
1978   echo "$as_me:1978: \$? = $ac_status" >&5
1979   (exit $ac_status); } >/dev/null; then
1980   if test -s conftest.err; then
1981     ac_cpp_err=$ac_c_preproc_warn_flag
1982   else
1983     ac_cpp_err=
1984   fi
1985 else
1986   ac_cpp_err=yes
1987 fi
1988 if test -z "$ac_cpp_err"; then
1989   # Broken: success on invalid input.
1990 continue
1991 else
1992   echo "$as_me: failed program was:" >&5
1993   cat conftest.$ac_ext >&5
1994   # Passes both tests.
1995 ac_preproc_ok=:
1996 break
1997 fi
1998 rm -f conftest.err conftest.$ac_ext
1999
2000 done
2001 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2002 rm -f conftest.err conftest.$ac_ext
2003 if $ac_preproc_ok; then
2004   :
2005 else
2006   { { echo "$as_me:2006: error: C preprocessor \"$CPP\" fails sanity check" >&5
2007 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2008    { (exit 1); exit 1; }; }
2009 fi
2010
2011 ac_ext=c
2012 ac_cpp='$CPP $CPPFLAGS'
2013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2016 ac_main_return=return
2017
2018 for ac_prog in mawk gawk nawk awk
2019 do
2020   # Extract the first word of "$ac_prog", so it can be a program name with args.
2021 set dummy $ac_prog; ac_word=$2
2022 echo "$as_me:2022: checking for $ac_word" >&5
2023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2024 if test "${ac_cv_prog_AWK+set}" = set; then
2025   echo $ECHO_N "(cached) $ECHO_C" >&6
2026 else
2027   if test -n "$AWK"; then
2028   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2029 else
2030   ac_save_IFS=$IFS; IFS=$ac_path_separator
2031 ac_dummy="$PATH"
2032 for ac_dir in $ac_dummy; do
2033   IFS=$ac_save_IFS
2034   test -z "$ac_dir" && ac_dir=.
2035   $as_executable_p "$ac_dir/$ac_word" || continue
2036 ac_cv_prog_AWK="$ac_prog"
2037 echo "$as_me:2037: found $ac_dir/$ac_word" >&5
2038 break
2039 done
2040
2041 fi
2042 fi
2043 AWK=$ac_cv_prog_AWK
2044 if test -n "$AWK"; then
2045   echo "$as_me:2045: result: $AWK" >&5
2046 echo "${ECHO_T}$AWK" >&6
2047 else
2048   echo "$as_me:2048: result: no" >&5
2049 echo "${ECHO_T}no" >&6
2050 fi
2051
2052   test -n "$AWK" && break
2053 done
2054
2055 # Find a good install program.  We prefer a C program (faster),
2056 # so one script is as good as another.  But avoid the broken or
2057 # incompatible versions:
2058 # SysV /etc/install, /usr/sbin/install
2059 # SunOS /usr/etc/install
2060 # IRIX /sbin/install
2061 # AIX /bin/install
2062 # AmigaOS /C/install, which installs bootblocks on floppy discs
2063 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2064 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2065 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2066 # ./install, which can be erroneously created by make from ./install.sh.
2067 echo "$as_me:2067: checking for a BSD compatible install" >&5
2068 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2069 if test -z "$INSTALL"; then
2070 if test "${ac_cv_path_install+set}" = set; then
2071   echo $ECHO_N "(cached) $ECHO_C" >&6
2072 else
2073     ac_save_IFS=$IFS; IFS=$ac_path_separator
2074   for ac_dir in $PATH; do
2075     IFS=$ac_save_IFS
2076     # Account for people who put trailing slashes in PATH elements.
2077     case $ac_dir/ in
2078     / | ./ | .// | /cC/* \
2079     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2080     | /usr/ucb/* ) ;;
2081     *)
2082       # OSF1 and SCO ODT 3.0 have their own names for install.
2083       # Don't use installbsd from OSF since it installs stuff as root
2084       # by default.
2085       for ac_prog in ginstall scoinst install; do
2086         if $as_executable_p "$ac_dir/$ac_prog"; then
2087           if test $ac_prog = install &&
2088             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2089             # AIX install.  It has an incompatible calling convention.
2090             :
2091           elif test $ac_prog = install &&
2092             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2093             # program-specific install script used by HP pwplus--don't use.
2094             :
2095           else
2096             ac_cv_path_install="$ac_dir/$ac_prog -c"
2097             break 2
2098           fi
2099         fi
2100       done
2101       ;;
2102     esac
2103   done
2104
2105 fi
2106   if test "${ac_cv_path_install+set}" = set; then
2107     INSTALL=$ac_cv_path_install
2108   else
2109     # As a last resort, use the slow shell script.  We don't cache a
2110     # path for INSTALL within a source directory, because that will
2111     # break other packages using the cache if that directory is
2112     # removed, or if the path is relative.
2113     INSTALL=$ac_install_sh
2114   fi
2115 fi
2116 echo "$as_me:2116: result: $INSTALL" >&5
2117 echo "${ECHO_T}$INSTALL" >&6
2118
2119 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2120 # It thinks the first close brace ends the variable substitution.
2121 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2122
2123 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2124
2125 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2126
2127 case $INSTALL in
2128 /*)
2129   ;;
2130 *)
2131   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2132   test -z "$cf_dir" && cf_dir=.
2133   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2134   ;;
2135 esac
2136
2137 for ac_prog in tdlint lint alint splint lclint
2138 do
2139   # Extract the first word of "$ac_prog", so it can be a program name with args.
2140 set dummy $ac_prog; ac_word=$2
2141 echo "$as_me:2141: checking for $ac_word" >&5
2142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2143 if test "${ac_cv_prog_LINT+set}" = set; then
2144   echo $ECHO_N "(cached) $ECHO_C" >&6
2145 else
2146   if test -n "$LINT"; then
2147   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2148 else
2149   ac_save_IFS=$IFS; IFS=$ac_path_separator
2150 ac_dummy="$PATH"
2151 for ac_dir in $ac_dummy; do
2152   IFS=$ac_save_IFS
2153   test -z "$ac_dir" && ac_dir=.
2154   $as_executable_p "$ac_dir/$ac_word" || continue
2155 ac_cv_prog_LINT="$ac_prog"
2156 echo "$as_me:2156: found $ac_dir/$ac_word" >&5
2157 break
2158 done
2159
2160 fi
2161 fi
2162 LINT=$ac_cv_prog_LINT
2163 if test -n "$LINT"; then
2164   echo "$as_me:2164: result: $LINT" >&5
2165 echo "${ECHO_T}$LINT" >&6
2166 else
2167   echo "$as_me:2167: result: no" >&5
2168 echo "${ECHO_T}no" >&6
2169 fi
2170
2171   test -n "$LINT" && break
2172 done
2173
2174 echo "$as_me:2174: checking if filesystem supports mixed-case filenames" >&5
2175 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2176 if test "${cf_cv_mixedcase+set}" = set; then
2177   echo $ECHO_N "(cached) $ECHO_C" >&6
2178 else
2179
2180 if test "$cross_compiling" = yes ; then
2181         case $target_alias in #(vi
2182         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2183                 cf_cv_mixedcase=no
2184                 ;;
2185         *)
2186                 cf_cv_mixedcase=yes
2187                 ;;
2188         esac
2189 else
2190         rm -f conftest CONFTEST
2191         echo test >conftest
2192         if test -f CONFTEST ; then
2193                 cf_cv_mixedcase=no
2194         else
2195                 cf_cv_mixedcase=yes
2196         fi
2197         rm -f conftest CONFTEST
2198 fi
2199
2200 fi
2201 echo "$as_me:2201: result: $cf_cv_mixedcase" >&5
2202 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2203 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2204 #define MIXEDCASE_FILENAMES 1
2205 EOF
2206
2207 for ac_prog in exctags ctags
2208 do
2209   # Extract the first word of "$ac_prog", so it can be a program name with args.
2210 set dummy $ac_prog; ac_word=$2
2211 echo "$as_me:2211: checking for $ac_word" >&5
2212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2213 if test "${ac_cv_prog_CTAGS+set}" = set; then
2214   echo $ECHO_N "(cached) $ECHO_C" >&6
2215 else
2216   if test -n "$CTAGS"; then
2217   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2218 else
2219   ac_save_IFS=$IFS; IFS=$ac_path_separator
2220 ac_dummy="$PATH"
2221 for ac_dir in $ac_dummy; do
2222   IFS=$ac_save_IFS
2223   test -z "$ac_dir" && ac_dir=.
2224   $as_executable_p "$ac_dir/$ac_word" || continue
2225 ac_cv_prog_CTAGS="$ac_prog"
2226 echo "$as_me:2226: found $ac_dir/$ac_word" >&5
2227 break
2228 done
2229
2230 fi
2231 fi
2232 CTAGS=$ac_cv_prog_CTAGS
2233 if test -n "$CTAGS"; then
2234   echo "$as_me:2234: result: $CTAGS" >&5
2235 echo "${ECHO_T}$CTAGS" >&6
2236 else
2237   echo "$as_me:2237: result: no" >&5
2238 echo "${ECHO_T}no" >&6
2239 fi
2240
2241   test -n "$CTAGS" && break
2242 done
2243
2244 for ac_prog in exetags etags
2245 do
2246   # Extract the first word of "$ac_prog", so it can be a program name with args.
2247 set dummy $ac_prog; ac_word=$2
2248 echo "$as_me:2248: checking for $ac_word" >&5
2249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2250 if test "${ac_cv_prog_ETAGS+set}" = set; then
2251   echo $ECHO_N "(cached) $ECHO_C" >&6
2252 else
2253   if test -n "$ETAGS"; then
2254   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2255 else
2256   ac_save_IFS=$IFS; IFS=$ac_path_separator
2257 ac_dummy="$PATH"
2258 for ac_dir in $ac_dummy; do
2259   IFS=$ac_save_IFS
2260   test -z "$ac_dir" && ac_dir=.
2261   $as_executable_p "$ac_dir/$ac_word" || continue
2262 ac_cv_prog_ETAGS="$ac_prog"
2263 echo "$as_me:2263: found $ac_dir/$ac_word" >&5
2264 break
2265 done
2266
2267 fi
2268 fi
2269 ETAGS=$ac_cv_prog_ETAGS
2270 if test -n "$ETAGS"; then
2271   echo "$as_me:2271: result: $ETAGS" >&5
2272 echo "${ECHO_T}$ETAGS" >&6
2273 else
2274   echo "$as_me:2274: result: no" >&5
2275 echo "${ECHO_T}no" >&6
2276 fi
2277
2278   test -n "$ETAGS" && break
2279 done
2280
2281 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2282 set dummy ${CTAGS:-ctags}; ac_word=$2
2283 echo "$as_me:2283: checking for $ac_word" >&5
2284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2285 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2286   echo $ECHO_N "(cached) $ECHO_C" >&6
2287 else
2288   if test -n "$MAKE_LOWER_TAGS"; then
2289   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2290 else
2291   ac_save_IFS=$IFS; IFS=$ac_path_separator
2292 ac_dummy="$PATH"
2293 for ac_dir in $ac_dummy; do
2294   IFS=$ac_save_IFS
2295   test -z "$ac_dir" && ac_dir=.
2296   $as_executable_p "$ac_dir/$ac_word" || continue
2297 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2298 echo "$as_me:2298: found $ac_dir/$ac_word" >&5
2299 break
2300 done
2301
2302   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2303 fi
2304 fi
2305 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2306 if test -n "$MAKE_LOWER_TAGS"; then
2307   echo "$as_me:2307: result: $MAKE_LOWER_TAGS" >&5
2308 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2309 else
2310   echo "$as_me:2310: result: no" >&5
2311 echo "${ECHO_T}no" >&6
2312 fi
2313
2314 if test "$cf_cv_mixedcase" = yes ; then
2315         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2316 set dummy ${ETAGS:-etags}; ac_word=$2
2317 echo "$as_me:2317: checking for $ac_word" >&5
2318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2319 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322   if test -n "$MAKE_UPPER_TAGS"; then
2323   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2324 else
2325   ac_save_IFS=$IFS; IFS=$ac_path_separator
2326 ac_dummy="$PATH"
2327 for ac_dir in $ac_dummy; do
2328   IFS=$ac_save_IFS
2329   test -z "$ac_dir" && ac_dir=.
2330   $as_executable_p "$ac_dir/$ac_word" || continue
2331 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2332 echo "$as_me:2332: found $ac_dir/$ac_word" >&5
2333 break
2334 done
2335
2336   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2337 fi
2338 fi
2339 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2340 if test -n "$MAKE_UPPER_TAGS"; then
2341   echo "$as_me:2341: result: $MAKE_UPPER_TAGS" >&5
2342 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2343 else
2344   echo "$as_me:2344: result: no" >&5
2345 echo "${ECHO_T}no" >&6
2346 fi
2347
2348 else
2349         MAKE_UPPER_TAGS=no
2350 fi
2351
2352 if test "$MAKE_UPPER_TAGS" = yes ; then
2353         MAKE_UPPER_TAGS=
2354 else
2355         MAKE_UPPER_TAGS="#"
2356 fi
2357
2358 if test "$MAKE_LOWER_TAGS" = yes ; then
2359         MAKE_LOWER_TAGS=
2360 else
2361         MAKE_LOWER_TAGS="#"
2362 fi
2363
2364 echo "$as_me:2364: checking if -lm needed for math functions" >&5
2365 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2366 if test "${cf_cv_need_libm+set}" = set; then
2367   echo $ECHO_N "(cached) $ECHO_C" >&6
2368 else
2369
2370         cat >conftest.$ac_ext <<_ACEOF
2371 #line 2371 "configure"
2372 #include "confdefs.h"
2373
2374         #include <stdio.h>
2375         #include <math.h>
2376
2377 int
2378 main ()
2379 {
2380 double x = rand(); printf("result = %g\n", sin(x))
2381   ;
2382   return 0;
2383 }
2384 _ACEOF
2385 rm -f conftest.$ac_objext conftest$ac_exeext
2386 if { (eval echo "$as_me:2386: \"$ac_link\"") >&5
2387   (eval $ac_link) 2>&5
2388   ac_status=$?
2389   echo "$as_me:2389: \$? = $ac_status" >&5
2390   (exit $ac_status); } &&
2391          { ac_try='test -s conftest$ac_exeext'
2392   { (eval echo "$as_me:2392: \"$ac_try\"") >&5
2393   (eval $ac_try) 2>&5
2394   ac_status=$?
2395   echo "$as_me:2395: \$? = $ac_status" >&5
2396   (exit $ac_status); }; }; then
2397   cf_cv_need_libm=no
2398 else
2399   echo "$as_me: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2401 cf_cv_need_libm=yes
2402 fi
2403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2404 fi
2405 echo "$as_me:2405: result: $cf_cv_need_libm" >&5
2406 echo "${ECHO_T}$cf_cv_need_libm" >&6
2407 if test "$cf_cv_need_libm" = yes
2408 then
2409 MATH_LIB=-lm
2410 fi
2411
2412 CC_G_OPT="-g"
2413 CC_SHARED_OPTS=unknown
2414 CPPFLAGS="$CPPFLAGS"
2415 DFT_DEP_SUFFIX=""
2416 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2417 DFT_UPR_MODEL="NORMAL"
2418 LD="ld"
2419 LDFLAGS_SHARED=""
2420 LDFLAGS_STATIC=""
2421 LD_MODEL=""
2422 LD_SHARED_OPTS=""
2423 LIBTOOL=""
2424 LIB_CLEAN=""
2425 LIB_COMPILE=""
2426 LIB_LINK='${CC}'
2427 LINK_TESTS=""
2428 LOCAL_LDFLAGS=""
2429 PTHREAD="-lm"
2430 TEST_ARGS=""
2431 TEST_DEPS=""
2432 TEST_LIBS=""
2433 TINFO_ARGS='$(LIBS_CURSES)'
2434 cf_cv_abi_version=""
2435 cf_cv_rel_version=""
2436
2437 cf_cv_screen=curses
2438 cf_cv_libtype=
2439
2440 # This should have been defined by AC_PROG_CC
2441 : ${CC:=cc}
2442
2443 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2444 # into CC.  This will not help with broken scripts that wrap the compiler with
2445 # options, but eliminates a more common category of user confusion.
2446 echo "$as_me:2446: checking \$CC variable" >&5
2447 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2448 case "$CC" in #(vi
2449 *[\ \   ]-[IUD]*)
2450         echo "$as_me:2450: result: broken" >&5
2451 echo "${ECHO_T}broken" >&6
2452         { echo "$as_me:2452: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2453 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2454         # humor him...
2455         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2456         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2457
2458 cf_fix_cppflags=no
2459 cf_new_cflags=
2460 cf_new_cppflags=
2461 cf_new_extra_cppflags=
2462
2463 for cf_add_cflags in $cf_flags
2464 do
2465 case $cf_fix_cppflags in
2466 no)
2467         case $cf_add_cflags in #(vi
2468         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2469                 case $cf_add_cflags in
2470                 -D*)
2471                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2472
2473                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2474                                 && test -z "${cf_tst_cflags}" \
2475                                 && cf_fix_cppflags=yes
2476
2477                         if test $cf_fix_cppflags = yes ; then
2478                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2479                                 continue
2480                         elif test "${cf_tst_cflags}" = "\"'" ; then
2481                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2482                                 continue
2483                         fi
2484                         ;;
2485                 esac
2486                 case "$CPPFLAGS" in
2487                 *$cf_add_cflags) #(vi
2488                         ;;
2489                 *) #(vi
2490                         case $cf_add_cflags in #(vi
2491                         -D*)
2492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2493
2494 CPPFLAGS=`echo "$CPPFLAGS" | \
2495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2497
2498                                 ;;
2499                         esac
2500                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2501                         ;;
2502                 esac
2503                 ;;
2504         *)
2505                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2506                 ;;
2507         esac
2508         ;;
2509 yes)
2510         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2511
2512         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2513
2514         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2515                 && test -z "${cf_tst_cflags}" \
2516                 && cf_fix_cppflags=no
2517         ;;
2518 esac
2519 done
2520
2521 if test -n "$cf_new_cflags" ; then
2522
2523         CFLAGS="$CFLAGS $cf_new_cflags"
2524 fi
2525
2526 if test -n "$cf_new_cppflags" ; then
2527
2528         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2529 fi
2530
2531 if test -n "$cf_new_extra_cppflags" ; then
2532
2533         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2534 fi
2535
2536         ;;
2537 *)
2538         echo "$as_me:2538: result: ok" >&5
2539 echo "${ECHO_T}ok" >&6
2540         ;;
2541 esac
2542
2543 echo "$as_me:2543: checking for ${CC:-cc} option to accept ANSI C" >&5
2544 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2545 if test "${cf_cv_ansi_cc+set}" = set; then
2546   echo $ECHO_N "(cached) $ECHO_C" >&6
2547 else
2548
2549 cf_cv_ansi_cc=no
2550 cf_save_CFLAGS="$CFLAGS"
2551 cf_save_CPPFLAGS="$CPPFLAGS"
2552 # Don't try gcc -ansi; that turns off useful extensions and
2553 # breaks some systems' header files.
2554 # AIX                   -qlanglvl=ansi
2555 # Ultrix and OSF/1      -std1
2556 # HP-UX                 -Aa -D_HPUX_SOURCE
2557 # SVR4                  -Xc
2558 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2559 for cf_arg in "-DCC_HAS_PROTOS" \
2560         "" \
2561         -qlanglvl=ansi \
2562         -std1 \
2563         -Ae \
2564         "-Aa -D_HPUX_SOURCE" \
2565         -Xc
2566 do
2567
2568 cf_fix_cppflags=no
2569 cf_new_cflags=
2570 cf_new_cppflags=
2571 cf_new_extra_cppflags=
2572
2573 for cf_add_cflags in $cf_arg
2574 do
2575 case $cf_fix_cppflags in
2576 no)
2577         case $cf_add_cflags in #(vi
2578         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2579                 case $cf_add_cflags in
2580                 -D*)
2581                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2582
2583                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2584                                 && test -z "${cf_tst_cflags}" \
2585                                 && cf_fix_cppflags=yes
2586
2587                         if test $cf_fix_cppflags = yes ; then
2588                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2589                                 continue
2590                         elif test "${cf_tst_cflags}" = "\"'" ; then
2591                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2592                                 continue
2593                         fi
2594                         ;;
2595                 esac
2596                 case "$CPPFLAGS" in
2597                 *$cf_add_cflags) #(vi
2598                         ;;
2599                 *) #(vi
2600                         case $cf_add_cflags in #(vi
2601                         -D*)
2602                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2603
2604 CPPFLAGS=`echo "$CPPFLAGS" | \
2605         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2606                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2607
2608                                 ;;
2609                         esac
2610                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2611                         ;;
2612                 esac
2613                 ;;
2614         *)
2615                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2616                 ;;
2617         esac
2618         ;;
2619 yes)
2620         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2621
2622         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2623
2624         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2625                 && test -z "${cf_tst_cflags}" \
2626                 && cf_fix_cppflags=no
2627         ;;
2628 esac
2629 done
2630
2631 if test -n "$cf_new_cflags" ; then
2632
2633         CFLAGS="$CFLAGS $cf_new_cflags"
2634 fi
2635
2636 if test -n "$cf_new_cppflags" ; then
2637
2638         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2639 fi
2640
2641 if test -n "$cf_new_extra_cppflags" ; then
2642
2643         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2644 fi
2645
2646         cat >conftest.$ac_ext <<_ACEOF
2647 #line 2647 "configure"
2648 #include "confdefs.h"
2649
2650 #ifndef CC_HAS_PROTOS
2651 #if !defined(__STDC__) || (__STDC__ != 1)
2652 choke me
2653 #endif
2654 #endif
2655
2656 int
2657 main ()
2658 {
2659
2660         int test (int i, double x);
2661         struct s1 {int (*f) (int a);};
2662         struct s2 {int (*f) (double a);};
2663   ;
2664   return 0;
2665 }
2666 _ACEOF
2667 rm -f conftest.$ac_objext
2668 if { (eval echo "$as_me:2668: \"$ac_compile\"") >&5
2669   (eval $ac_compile) 2>&5
2670   ac_status=$?
2671   echo "$as_me:2671: \$? = $ac_status" >&5
2672   (exit $ac_status); } &&
2673          { ac_try='test -s conftest.$ac_objext'
2674   { (eval echo "$as_me:2674: \"$ac_try\"") >&5
2675   (eval $ac_try) 2>&5
2676   ac_status=$?
2677   echo "$as_me:2677: \$? = $ac_status" >&5
2678   (exit $ac_status); }; }; then
2679   cf_cv_ansi_cc="$cf_arg"; break
2680 else
2681   echo "$as_me: failed program was:" >&5
2682 cat conftest.$ac_ext >&5
2683 fi
2684 rm -f conftest.$ac_objext conftest.$ac_ext
2685 done
2686 CFLAGS="$cf_save_CFLAGS"
2687 CPPFLAGS="$cf_save_CPPFLAGS"
2688
2689 fi
2690 echo "$as_me:2690: result: $cf_cv_ansi_cc" >&5
2691 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2692
2693 if test "$cf_cv_ansi_cc" != "no"; then
2694 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2695
2696 cf_fix_cppflags=no
2697 cf_new_cflags=
2698 cf_new_cppflags=
2699 cf_new_extra_cppflags=
2700
2701 for cf_add_cflags in $cf_cv_ansi_cc
2702 do
2703 case $cf_fix_cppflags in
2704 no)
2705         case $cf_add_cflags in #(vi
2706         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2707                 case $cf_add_cflags in
2708                 -D*)
2709                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2710
2711                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2712                                 && test -z "${cf_tst_cflags}" \
2713                                 && cf_fix_cppflags=yes
2714
2715                         if test $cf_fix_cppflags = yes ; then
2716                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2717                                 continue
2718                         elif test "${cf_tst_cflags}" = "\"'" ; then
2719                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2720                                 continue
2721                         fi
2722                         ;;
2723                 esac
2724                 case "$CPPFLAGS" in
2725                 *$cf_add_cflags) #(vi
2726                         ;;
2727                 *) #(vi
2728                         case $cf_add_cflags in #(vi
2729                         -D*)
2730                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2731
2732 CPPFLAGS=`echo "$CPPFLAGS" | \
2733         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2734                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2735
2736                                 ;;
2737                         esac
2738                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2739                         ;;
2740                 esac
2741                 ;;
2742         *)
2743                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2744                 ;;
2745         esac
2746         ;;
2747 yes)
2748         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2749
2750         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2751
2752         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2753                 && test -z "${cf_tst_cflags}" \
2754                 && cf_fix_cppflags=no
2755         ;;
2756 esac
2757 done
2758
2759 if test -n "$cf_new_cflags" ; then
2760
2761         CFLAGS="$CFLAGS $cf_new_cflags"
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2767 fi
2768
2769 if test -n "$cf_new_extra_cppflags" ; then
2770
2771         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2772 fi
2773
2774 else
2775         cat >>confdefs.h <<\EOF
2776 #define CC_HAS_PROTOS 1
2777 EOF
2778
2779 fi
2780 fi
2781
2782 if test "$cf_cv_ansi_cc" = "no"; then
2783         { { echo "$as_me:2783: error: Your compiler does not appear to recognize prototypes.
2784 You have the following choices:
2785         a. adjust your compiler options
2786         b. get an up-to-date compiler
2787         c. use a wrapper such as unproto" >&5
2788 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2789 You have the following choices:
2790         a. adjust your compiler options
2791         b. get an up-to-date compiler
2792         c. use a wrapper such as unproto" >&2;}
2793    { (exit 1); exit 1; }; }
2794 fi
2795
2796 if test "$GCC" = yes
2797 then
2798 cat > conftest.i <<EOF
2799 #ifndef GCC_PRINTF
2800 #define GCC_PRINTF 0
2801 #endif
2802 #ifndef GCC_SCANF
2803 #define GCC_SCANF 0
2804 #endif
2805 #ifndef GCC_NORETURN
2806 #define GCC_NORETURN /* nothing */
2807 #endif
2808 #ifndef GCC_UNUSED
2809 #define GCC_UNUSED /* nothing */
2810 #endif
2811 EOF
2812 if test "$GCC" = yes
2813 then
2814         { echo "$as_me:2814: checking for $CC __attribute__ directives..." >&5
2815 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2816 cat > conftest.$ac_ext <<EOF
2817 #line 2817 "${as_me:-configure}"
2818 #include "confdefs.h"
2819 #include "conftest.h"
2820 #include "conftest.i"
2821 #if     GCC_PRINTF
2822 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2823 #else
2824 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2825 #endif
2826 #if     GCC_SCANF
2827 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2828 #else
2829 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2830 #endif
2831 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2832 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2833 extern void foo(void) GCC_NORETURN;
2834 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2835 EOF
2836         cf_printf_attribute=no
2837         cf_scanf_attribute=no
2838         for cf_attribute in scanf printf unused noreturn
2839         do
2840
2841 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2842
2843                 cf_directive="__attribute__(($cf_attribute))"
2844                 echo "checking for $CC $cf_directive" 1>&5
2845
2846                 case $cf_attribute in #(vi
2847                 printf) #(vi
2848                         cf_printf_attribute=yes
2849                         cat >conftest.h <<EOF
2850 #define GCC_$cf_ATTRIBUTE 1
2851 EOF
2852                         ;;
2853                 scanf) #(vi
2854                         cf_scanf_attribute=yes
2855                         cat >conftest.h <<EOF
2856 #define GCC_$cf_ATTRIBUTE 1
2857 EOF
2858                         ;;
2859                 *) #(vi
2860                         cat >conftest.h <<EOF
2861 #define GCC_$cf_ATTRIBUTE $cf_directive
2862 EOF
2863                         ;;
2864                 esac
2865
2866                 if { (eval echo "$as_me:2866: \"$ac_compile\"") >&5
2867   (eval $ac_compile) 2>&5
2868   ac_status=$?
2869   echo "$as_me:2869: \$? = $ac_status" >&5
2870   (exit $ac_status); }; then
2871                         test -n "$verbose" && echo "$as_me:2871: result: ... $cf_attribute" >&5
2872 echo "${ECHO_T}... $cf_attribute" >&6
2873                         cat conftest.h >>confdefs.h
2874                         case $cf_attribute in #(vi
2875                         printf) #(vi
2876                                 if test "$cf_printf_attribute" = no ; then
2877                                         cat >>confdefs.h <<EOF
2878 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2879 EOF
2880                                 else
2881                                         cat >>confdefs.h <<EOF
2882 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2883 EOF
2884                                 fi
2885                                 ;;
2886                         scanf) #(vi
2887                                 if test "$cf_scanf_attribute" = no ; then
2888                                         cat >>confdefs.h <<EOF
2889 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2890 EOF
2891                                 else
2892                                         cat >>confdefs.h <<EOF
2893 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2894 EOF
2895                                 fi
2896                                 ;;
2897                         esac
2898                 fi
2899         done
2900 else
2901         fgrep define conftest.i >>confdefs.h
2902 fi
2903 rm -rf conftest*
2904 fi
2905
2906 cf_XOPEN_SOURCE=500
2907 cf_POSIX_C_SOURCE=199506L
2908 cf_xopen_source=
2909
2910 case $host_os in #(vi
2911 aix[4-7]*) #(vi
2912         cf_xopen_source="-D_ALL_SOURCE"
2913         ;;
2914 cygwin) #(vi
2915         cf_XOPEN_SOURCE=600
2916         ;;
2917 darwin[0-8].*) #(vi
2918         cf_xopen_source="-D_APPLE_C_SOURCE"
2919         ;;
2920 darwin*) #(vi
2921         cf_xopen_source="-D_DARWIN_C_SOURCE"
2922         ;;
2923 freebsd*|dragonfly*) #(vi
2924         # 5.x headers associate
2925         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2926         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2927         cf_POSIX_C_SOURCE=200112L
2928         cf_XOPEN_SOURCE=600
2929         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2930         ;;
2931 hpux11*) #(vi
2932         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2933         ;;
2934 hpux*) #(vi
2935         cf_xopen_source="-D_HPUX_SOURCE"
2936         ;;
2937 irix[56].*) #(vi
2938         cf_xopen_source="-D_SGI_SOURCE"
2939         ;;
2940 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2941
2942 echo "$as_me:2942: checking if we must define _GNU_SOURCE" >&5
2943 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2944 if test "${cf_cv_gnu_source+set}" = set; then
2945   echo $ECHO_N "(cached) $ECHO_C" >&6
2946 else
2947
2948 cat >conftest.$ac_ext <<_ACEOF
2949 #line 2949 "configure"
2950 #include "confdefs.h"
2951 #include <sys/types.h>
2952 int
2953 main ()
2954 {
2955
2956 #ifndef _XOPEN_SOURCE
2957 make an error
2958 #endif
2959   ;
2960   return 0;
2961 }
2962 _ACEOF
2963 rm -f conftest.$ac_objext
2964 if { (eval echo "$as_me:2964: \"$ac_compile\"") >&5
2965   (eval $ac_compile) 2>&5
2966   ac_status=$?
2967   echo "$as_me:2967: \$? = $ac_status" >&5
2968   (exit $ac_status); } &&
2969          { ac_try='test -s conftest.$ac_objext'
2970   { (eval echo "$as_me:2970: \"$ac_try\"") >&5
2971   (eval $ac_try) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); }; }; then
2975   cf_cv_gnu_source=no
2976 else
2977   echo "$as_me: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
2979 cf_save="$CPPFLAGS"
2980          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2981          cat >conftest.$ac_ext <<_ACEOF
2982 #line 2982 "configure"
2983 #include "confdefs.h"
2984 #include <sys/types.h>
2985 int
2986 main ()
2987 {
2988
2989 #ifdef _XOPEN_SOURCE
2990 make an error
2991 #endif
2992   ;
2993   return 0;
2994 }
2995 _ACEOF
2996 rm -f conftest.$ac_objext
2997 if { (eval echo "$as_me:2997: \"$ac_compile\"") >&5
2998   (eval $ac_compile) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); } &&
3002          { ac_try='test -s conftest.$ac_objext'
3003   { (eval echo "$as_me:3003: \"$ac_try\"") >&5
3004   (eval $ac_try) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); }; }; then
3008   cf_cv_gnu_source=no
3009 else
3010   echo "$as_me: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 cf_cv_gnu_source=yes
3013 fi
3014 rm -f conftest.$ac_objext conftest.$ac_ext
3015         CPPFLAGS="$cf_save"
3016
3017 fi
3018 rm -f conftest.$ac_objext conftest.$ac_ext
3019
3020 fi
3021 echo "$as_me:3021: result: $cf_cv_gnu_source" >&5
3022 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3023 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3024
3025         ;;
3026 mirbsd*) #(vi
3027         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
3028         ;;
3029 netbsd*) #(vi
3030         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3031         ;;
3032 openbsd*) #(vi
3033         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3034         ;;
3035 osf[45]*) #(vi
3036         cf_xopen_source="-D_OSF_SOURCE"
3037         ;;
3038 nto-qnx*) #(vi
3039         cf_xopen_source="-D_QNX_SOURCE"
3040         ;;
3041 sco*) #(vi
3042         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3043         ;;
3044 solaris2.1[0-9]) #(vi
3045         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3046         ;;
3047 solaris2.[1-9]) #(vi
3048         cf_xopen_source="-D__EXTENSIONS__"
3049         ;;
3050 *)
3051         echo "$as_me:3051: checking if we should define _XOPEN_SOURCE" >&5
3052 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3053 if test "${cf_cv_xopen_source+set}" = set; then
3054   echo $ECHO_N "(cached) $ECHO_C" >&6
3055 else
3056
3057         cat >conftest.$ac_ext <<_ACEOF
3058 #line 3058 "configure"
3059 #include "confdefs.h"
3060 #include <sys/types.h>
3061 int
3062 main ()
3063 {
3064
3065 #ifndef _XOPEN_SOURCE
3066 make an error
3067 #endif
3068   ;
3069   return 0;
3070 }
3071 _ACEOF
3072 rm -f conftest.$ac_objext
3073 if { (eval echo "$as_me:3073: \"$ac_compile\"") >&5
3074   (eval $ac_compile) 2>&5
3075   ac_status=$?
3076   echo "$as_me:3076: \$? = $ac_status" >&5
3077   (exit $ac_status); } &&
3078          { ac_try='test -s conftest.$ac_objext'
3079   { (eval echo "$as_me:3079: \"$ac_try\"") >&5
3080   (eval $ac_try) 2>&5
3081   ac_status=$?
3082   echo "$as_me:3082: \$? = $ac_status" >&5
3083   (exit $ac_status); }; }; then
3084   cf_cv_xopen_source=no
3085 else
3086   echo "$as_me: failed program was:" >&5
3087 cat conftest.$ac_ext >&5
3088 cf_save="$CPPFLAGS"
3089          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3090          cat >conftest.$ac_ext <<_ACEOF
3091 #line 3091 "configure"
3092 #include "confdefs.h"
3093 #include <sys/types.h>
3094 int
3095 main ()
3096 {
3097
3098 #ifdef _XOPEN_SOURCE
3099 make an error
3100 #endif
3101   ;
3102   return 0;
3103 }
3104 _ACEOF
3105 rm -f conftest.$ac_objext
3106 if { (eval echo "$as_me:3106: \"$ac_compile\"") >&5
3107   (eval $ac_compile) 2>&5
3108   ac_status=$?
3109   echo "$as_me:3109: \$? = $ac_status" >&5
3110   (exit $ac_status); } &&
3111          { ac_try='test -s conftest.$ac_objext'
3112   { (eval echo "$as_me:3112: \"$ac_try\"") >&5
3113   (eval $ac_try) 2>&5
3114   ac_status=$?
3115   echo "$as_me:3115: \$? = $ac_status" >&5
3116   (exit $ac_status); }; }; then
3117   cf_cv_xopen_source=no
3118 else
3119   echo "$as_me: failed program was:" >&5
3120 cat conftest.$ac_ext >&5
3121 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3122 fi
3123 rm -f conftest.$ac_objext conftest.$ac_ext
3124         CPPFLAGS="$cf_save"
3125
3126 fi
3127 rm -f conftest.$ac_objext conftest.$ac_ext
3128
3129 fi
3130 echo "$as_me:3130: result: $cf_cv_xopen_source" >&5
3131 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3132         if test "$cf_cv_xopen_source" != no ; then
3133
3134 CFLAGS=`echo "$CFLAGS" | \
3135         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3136                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3137
3138 CPPFLAGS=`echo "$CPPFLAGS" | \
3139         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3140                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3141
3142                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3143
3144 cf_fix_cppflags=no
3145 cf_new_cflags=
3146 cf_new_cppflags=
3147 cf_new_extra_cppflags=
3148
3149 for cf_add_cflags in $cf_temp_xopen_source
3150 do
3151 case $cf_fix_cppflags in
3152 no)
3153         case $cf_add_cflags in #(vi
3154         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3155                 case $cf_add_cflags in
3156                 -D*)
3157                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3158
3159                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3160                                 && test -z "${cf_tst_cflags}" \
3161                                 && cf_fix_cppflags=yes
3162
3163                         if test $cf_fix_cppflags = yes ; then
3164                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3165                                 continue
3166                         elif test "${cf_tst_cflags}" = "\"'" ; then
3167                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3168                                 continue
3169                         fi
3170                         ;;
3171                 esac
3172                 case "$CPPFLAGS" in
3173                 *$cf_add_cflags) #(vi
3174                         ;;
3175                 *) #(vi
3176                         case $cf_add_cflags in #(vi
3177                         -D*)
3178                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3179
3180 CPPFLAGS=`echo "$CPPFLAGS" | \
3181         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3182                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3183
3184                                 ;;
3185                         esac
3186                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3187                         ;;
3188                 esac
3189                 ;;
3190         *)
3191                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3192                 ;;
3193         esac
3194         ;;
3195 yes)
3196         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3197
3198         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3199
3200         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3201                 && test -z "${cf_tst_cflags}" \
3202                 && cf_fix_cppflags=no
3203         ;;
3204 esac
3205 done
3206
3207 if test -n "$cf_new_cflags" ; then
3208
3209         CFLAGS="$CFLAGS $cf_new_cflags"
3210 fi
3211
3212 if test -n "$cf_new_cppflags" ; then
3213
3214         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3215 fi
3216
3217 if test -n "$cf_new_extra_cppflags" ; then
3218
3219         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3220 fi
3221
3222         fi
3223
3224 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3225
3226 cf_save_CFLAGS="$CFLAGS"
3227 cf_save_CPPFLAGS="$CPPFLAGS"
3228
3229 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3230         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3231                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3232
3233 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3234         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3235                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3236
3237 echo "$as_me:3237: checking if we should define _POSIX_C_SOURCE" >&5
3238 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3239 if test "${cf_cv_posix_c_source+set}" = set; then
3240   echo $ECHO_N "(cached) $ECHO_C" >&6
3241 else
3242
3243 echo "${as_me:-configure}:3243: testing if the symbol is already defined go no further ..." 1>&5
3244
3245         cat >conftest.$ac_ext <<_ACEOF
3246 #line 3246 "configure"
3247 #include "confdefs.h"
3248 #include <sys/types.h>
3249 int
3250 main ()
3251 {
3252
3253 #ifndef _POSIX_C_SOURCE
3254 make an error
3255 #endif
3256   ;
3257   return 0;
3258 }
3259 _ACEOF
3260 rm -f conftest.$ac_objext
3261 if { (eval echo "$as_me:3261: \"$ac_compile\"") >&5
3262   (eval $ac_compile) 2>&5
3263   ac_status=$?
3264   echo "$as_me:3264: \$? = $ac_status" >&5
3265   (exit $ac_status); } &&
3266          { ac_try='test -s conftest.$ac_objext'
3267   { (eval echo "$as_me:3267: \"$ac_try\"") >&5
3268   (eval $ac_try) 2>&5
3269   ac_status=$?
3270   echo "$as_me:3270: \$? = $ac_status" >&5
3271   (exit $ac_status); }; }; then
3272   cf_cv_posix_c_source=no
3273 else
3274   echo "$as_me: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3276 cf_want_posix_source=no
3277          case .$cf_POSIX_C_SOURCE in #(vi
3278          .[12]??*) #(vi
3279                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3280                 ;;
3281          .2) #(vi
3282                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3283                 cf_want_posix_source=yes
3284                 ;;
3285          .*)
3286                 cf_want_posix_source=yes
3287                 ;;
3288          esac
3289          if test "$cf_want_posix_source" = yes ; then
3290                 cat >conftest.$ac_ext <<_ACEOF
3291 #line 3291 "configure"
3292 #include "confdefs.h"
3293 #include <sys/types.h>
3294 int
3295 main ()
3296 {
3297
3298 #ifdef _POSIX_SOURCE
3299 make an error
3300 #endif
3301   ;
3302   return 0;
3303 }
3304 _ACEOF
3305 rm -f conftest.$ac_objext
3306 if { (eval echo "$as_me:3306: \"$ac_compile\"") >&5
3307   (eval $ac_compile) 2>&5
3308   ac_status=$?
3309   echo "$as_me:3309: \$? = $ac_status" >&5
3310   (exit $ac_status); } &&
3311          { ac_try='test -s conftest.$ac_objext'
3312   { (eval echo "$as_me:3312: \"$ac_try\"") >&5
3313   (eval $ac_try) 2>&5
3314   ac_status=$?
3315   echo "$as_me:3315: \$? = $ac_status" >&5
3316   (exit $ac_status); }; }; then
3317   :
3318 else
3319   echo "$as_me: failed program was:" >&5
3320 cat conftest.$ac_ext >&5
3321 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3322 fi
3323 rm -f conftest.$ac_objext conftest.$ac_ext
3324          fi
3325
3326 echo "${as_me:-configure}:3326: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3327
3328          CFLAGS="$cf_trim_CFLAGS"
3329          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3330
3331 echo "${as_me:-configure}:3331: testing if the second compile does not leave our definition intact error ..." 1>&5
3332
3333          cat >conftest.$ac_ext <<_ACEOF
3334 #line 3334 "configure"
3335 #include "confdefs.h"
3336 #include <sys/types.h>
3337 int
3338 main ()
3339 {
3340
3341 #ifndef _POSIX_C_SOURCE
3342 make an error
3343 #endif
3344   ;
3345   return 0;
3346 }
3347 _ACEOF
3348 rm -f conftest.$ac_objext
3349 if { (eval echo "$as_me:3349: \"$ac_compile\"") >&5
3350   (eval $ac_compile) 2>&5
3351   ac_status=$?
3352   echo "$as_me:3352: \$? = $ac_status" >&5
3353   (exit $ac_status); } &&
3354          { ac_try='test -s conftest.$ac_objext'
3355   { (eval echo "$as_me:3355: \"$ac_try\"") >&5
3356   (eval $ac_try) 2>&5
3357   ac_status=$?
3358   echo "$as_me:3358: \$? = $ac_status" >&5
3359   (exit $ac_status); }; }; then
3360   :
3361 else
3362   echo "$as_me: failed program was:" >&5
3363 cat conftest.$ac_ext >&5
3364 cf_cv_posix_c_source=no
3365 fi
3366 rm -f conftest.$ac_objext conftest.$ac_ext
3367          CFLAGS="$cf_save_CFLAGS"
3368          CPPFLAGS="$cf_save_CPPFLAGS"
3369
3370 fi
3371 rm -f conftest.$ac_objext conftest.$ac_ext
3372
3373 fi
3374 echo "$as_me:3374: result: $cf_cv_posix_c_source" >&5
3375 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3376
3377 if test "$cf_cv_posix_c_source" != no ; then
3378         CFLAGS="$cf_trim_CFLAGS"
3379         CPPFLAGS="$cf_trim_CPPFLAGS"
3380
3381 cf_fix_cppflags=no
3382 cf_new_cflags=
3383 cf_new_cppflags=
3384 cf_new_extra_cppflags=
3385
3386 for cf_add_cflags in $cf_cv_posix_c_source
3387 do
3388 case $cf_fix_cppflags in
3389 no)
3390         case $cf_add_cflags in #(vi
3391         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3392                 case $cf_add_cflags in
3393                 -D*)
3394                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3395
3396                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3397                                 && test -z "${cf_tst_cflags}" \
3398                                 && cf_fix_cppflags=yes
3399
3400                         if test $cf_fix_cppflags = yes ; then
3401                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3402                                 continue
3403                         elif test "${cf_tst_cflags}" = "\"'" ; then
3404                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3405                                 continue
3406                         fi
3407                         ;;
3408                 esac
3409                 case "$CPPFLAGS" in
3410                 *$cf_add_cflags) #(vi
3411                         ;;
3412                 *) #(vi
3413                         case $cf_add_cflags in #(vi
3414                         -D*)
3415                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3416
3417 CPPFLAGS=`echo "$CPPFLAGS" | \
3418         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3419                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3420
3421                                 ;;
3422                         esac
3423                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3424                         ;;
3425                 esac
3426                 ;;
3427         *)
3428                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3429                 ;;
3430         esac
3431         ;;
3432 yes)
3433         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3434
3435         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3436
3437         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3438                 && test -z "${cf_tst_cflags}" \
3439                 && cf_fix_cppflags=no
3440         ;;
3441 esac
3442 done
3443
3444 if test -n "$cf_new_cflags" ; then
3445
3446         CFLAGS="$CFLAGS $cf_new_cflags"
3447 fi
3448
3449 if test -n "$cf_new_cppflags" ; then
3450
3451         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3452 fi
3453
3454 if test -n "$cf_new_extra_cppflags" ; then
3455
3456         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3457 fi
3458
3459 fi
3460
3461         ;;
3462 esac
3463
3464 if test -n "$cf_xopen_source" ; then
3465
3466 cf_fix_cppflags=no
3467 cf_new_cflags=
3468 cf_new_cppflags=
3469 cf_new_extra_cppflags=
3470
3471 for cf_add_cflags in $cf_xopen_source
3472 do
3473 case $cf_fix_cppflags in
3474 no)
3475         case $cf_add_cflags in #(vi
3476         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3477                 case $cf_add_cflags in
3478                 -D*)
3479                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3480
3481                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3482                                 && test -z "${cf_tst_cflags}" \
3483                                 && cf_fix_cppflags=yes
3484
3485                         if test $cf_fix_cppflags = yes ; then
3486                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3487                                 continue
3488                         elif test "${cf_tst_cflags}" = "\"'" ; then
3489                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3490                                 continue
3491                         fi
3492                         ;;
3493                 esac
3494                 case "$CPPFLAGS" in
3495                 *$cf_add_cflags) #(vi
3496                         ;;
3497                 *) #(vi
3498                         case $cf_add_cflags in #(vi
3499                         -D*)
3500                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3501
3502 CPPFLAGS=`echo "$CPPFLAGS" | \
3503         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3504                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3505
3506                                 ;;
3507                         esac
3508                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3509                         ;;
3510                 esac
3511                 ;;
3512         *)
3513                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3514                 ;;
3515         esac
3516         ;;
3517 yes)
3518         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3519
3520         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3521
3522         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3523                 && test -z "${cf_tst_cflags}" \
3524                 && cf_fix_cppflags=no
3525         ;;
3526 esac
3527 done
3528
3529 if test -n "$cf_new_cflags" ; then
3530
3531         CFLAGS="$CFLAGS $cf_new_cflags"
3532 fi
3533
3534 if test -n "$cf_new_cppflags" ; then
3535
3536         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3537 fi
3538
3539 if test -n "$cf_new_extra_cppflags" ; then
3540
3541         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3542 fi
3543
3544 fi
3545
3546 echo "$as_me:3546: checking for $CC option to accept ANSI C" >&5
3547 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3548 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3549   echo $ECHO_N "(cached) $ECHO_C" >&6
3550 else
3551   ac_cv_prog_cc_stdc=no
3552 ac_save_CC=$CC
3553 cat >conftest.$ac_ext <<_ACEOF
3554 #line 3554 "configure"
3555 #include "confdefs.h"
3556 #include <stdarg.h>
3557 #include <stdio.h>
3558 #include <sys/types.h>
3559 #include <sys/stat.h>
3560 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3561 struct buf { int x; };
3562 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3563 static char *e (p, i)
3564      char **p;
3565      int i;
3566 {
3567   return p[i];
3568 }
3569 static char *f (char * (*g) (char **, int), char **p, ...)
3570 {
3571   char *s;
3572   va_list v;
3573   va_start (v,p);
3574   s = g (p, va_arg (v,int));
3575   va_end (v);
3576   return s;
3577 }
3578 int test (int i, double x);
3579 struct s1 {int (*f) (int a);};
3580 struct s2 {int (*f) (double a);};
3581 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3582 int argc;
3583 char **argv;
3584 int
3585 main ()
3586 {
3587 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3588   ;
3589   return 0;
3590 }
3591 _ACEOF
3592 # Don't try gcc -ansi; that turns off useful extensions and
3593 # breaks some systems' header files.
3594 # AIX                   -qlanglvl=ansi
3595 # Ultrix and OSF/1      -std1
3596 # HP-UX 10.20 and later -Ae
3597 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3598 # SVR4                  -Xc -D__EXTENSIONS__
3599 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3600 do
3601   CC="$ac_save_CC $ac_arg"
3602   rm -f conftest.$ac_objext
3603 if { (eval echo "$as_me:3603: \"$ac_compile\"") >&5
3604   (eval $ac_compile) 2>&5
3605   ac_status=$?
3606   echo "$as_me:3606: \$? = $ac_status" >&5
3607   (exit $ac_status); } &&
3608          { ac_try='test -s conftest.$ac_objext'
3609   { (eval echo "$as_me:3609: \"$ac_try\"") >&5
3610   (eval $ac_try) 2>&5
3611   ac_status=$?
3612   echo "$as_me:3612: \$? = $ac_status" >&5
3613   (exit $ac_status); }; }; then
3614   ac_cv_prog_cc_stdc=$ac_arg
3615 break
3616 else
3617   echo "$as_me: failed program was:" >&5
3618 cat conftest.$ac_ext >&5
3619 fi
3620 rm -f conftest.$ac_objext
3621 done
3622 rm -f conftest.$ac_ext conftest.$ac_objext
3623 CC=$ac_save_CC
3624
3625 fi
3626
3627 case "x$ac_cv_prog_cc_stdc" in
3628   x|xno)
3629     echo "$as_me:3629: result: none needed" >&5
3630 echo "${ECHO_T}none needed" >&6 ;;
3631   *)
3632     echo "$as_me:3632: result: $ac_cv_prog_cc_stdc" >&5
3633 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3634     CC="$CC $ac_cv_prog_cc_stdc" ;;
3635 esac
3636
3637 echo "$as_me:3637: checking for an ANSI C-conforming const" >&5
3638 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3639 if test "${ac_cv_c_const+set}" = set; then
3640   echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642   cat >conftest.$ac_ext <<_ACEOF
3643 #line 3643 "configure"
3644 #include "confdefs.h"
3645
3646 int
3647 main ()
3648 {
3649 /* FIXME: Include the comments suggested by Paul. */
3650 #ifndef __cplusplus
3651   /* Ultrix mips cc rejects this.  */
3652   typedef int charset[2];
3653   const charset x;
3654   /* SunOS 4.1.1 cc rejects this.  */
3655   char const *const *ccp;
3656   char **p;
3657   /* NEC SVR4.0.2 mips cc rejects this.  */
3658   struct point {int x, y;};
3659   static struct point const zero = {0,0};
3660   /* AIX XL C 1.02.0.0 rejects this.
3661      It does not let you subtract one const X* pointer from another in
3662      an arm of an if-expression whose if-part is not a constant
3663      expression */
3664   const char *g = "string";
3665   ccp = &g + (g ? g-g : 0);
3666   /* HPUX 7.0 cc rejects these. */
3667   ++ccp;
3668   p = (char**) ccp;
3669   ccp = (char const *const *) p;
3670   { /* SCO 3.2v4 cc rejects this.  */
3671     char *t;
3672     char const *s = 0 ? (char *) 0 : (char const *) 0;
3673
3674     *t++ = 0;
3675   }
3676   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3677     int x[] = {25, 17};
3678     const int *foo = &x[0];
3679     ++foo;
3680   }
3681   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3682     typedef const int *iptr;
3683     iptr p = 0;
3684     ++p;
3685   }
3686   { /* AIX XL C 1.02.0.0 rejects this saying
3687        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3688     struct s { int j; const int *ap[3]; };
3689     struct s *b; b->j = 5;
3690   }
3691   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3692     const int foo = 10;
3693   }
3694 #endif
3695
3696   ;
3697   return 0;
3698 }
3699 _ACEOF
3700 rm -f conftest.$ac_objext
3701 if { (eval echo "$as_me:3701: \"$ac_compile\"") >&5
3702   (eval $ac_compile) 2>&5
3703   ac_status=$?
3704   echo "$as_me:3704: \$? = $ac_status" >&5
3705   (exit $ac_status); } &&
3706          { ac_try='test -s conftest.$ac_objext'
3707   { (eval echo "$as_me:3707: \"$ac_try\"") >&5
3708   (eval $ac_try) 2>&5
3709   ac_status=$?
3710   echo "$as_me:3710: \$? = $ac_status" >&5
3711   (exit $ac_status); }; }; then
3712   ac_cv_c_const=yes
3713 else
3714   echo "$as_me: failed program was:" >&5
3715 cat conftest.$ac_ext >&5
3716 ac_cv_c_const=no
3717 fi
3718 rm -f conftest.$ac_objext conftest.$ac_ext
3719 fi
3720 echo "$as_me:3720: result: $ac_cv_c_const" >&5
3721 echo "${ECHO_T}$ac_cv_c_const" >&6
3722 if test $ac_cv_c_const = no; then
3723
3724 cat >>confdefs.h <<\EOF
3725 #define const
3726 EOF
3727
3728 fi
3729
3730 echo "$as_me:3730: checking for signal global datatype" >&5
3731 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3732 if test "${cf_cv_sig_atomic_t+set}" = set; then
3733   echo $ECHO_N "(cached) $ECHO_C" >&6
3734 else
3735
3736         for cf_type in \
3737                 "volatile sig_atomic_t" \
3738                 "sig_atomic_t" \
3739                 "int"
3740         do
3741         cat >conftest.$ac_ext <<_ACEOF
3742 #line 3742 "configure"
3743 #include "confdefs.h"
3744
3745 #include <sys/types.h>
3746 #include <signal.h>
3747 #include <stdio.h>
3748
3749 extern $cf_type x;
3750 $cf_type x;
3751 static void handler(int sig)
3752 {
3753         x = 5;
3754 }
3755 int
3756 main ()
3757 {
3758 signal(SIGINT, handler);
3759                  x = 1
3760   ;
3761   return 0;
3762 }
3763 _ACEOF
3764 rm -f conftest.$ac_objext
3765 if { (eval echo "$as_me:3765: \"$ac_compile\"") >&5
3766   (eval $ac_compile) 2>&5
3767   ac_status=$?
3768   echo "$as_me:3768: \$? = $ac_status" >&5
3769   (exit $ac_status); } &&
3770          { ac_try='test -s conftest.$ac_objext'
3771   { (eval echo "$as_me:3771: \"$ac_try\"") >&5
3772   (eval $ac_try) 2>&5
3773   ac_status=$?
3774   echo "$as_me:3774: \$? = $ac_status" >&5
3775   (exit $ac_status); }; }; then
3776   cf_cv_sig_atomic_t=$cf_type
3777 else
3778   echo "$as_me: failed program was:" >&5
3779 cat conftest.$ac_ext >&5
3780 cf_cv_sig_atomic_t=no
3781 fi
3782 rm -f conftest.$ac_objext conftest.$ac_ext
3783                 test "$cf_cv_sig_atomic_t" != no && break
3784         done
3785
3786 fi
3787
3788 echo "$as_me:3788: result: $cf_cv_sig_atomic_t" >&5
3789 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3790 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3791 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3792 EOF
3793
3794 echo "$as_me:3794: checking if you want to see long compiling messages" >&5
3795 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3796
3797 # Check whether --enable-echo or --disable-echo was given.
3798 if test "${enable_echo+set}" = set; then
3799   enableval="$enable_echo"
3800   test "$enableval" != no && enableval=yes
3801   if test "$enableval" != "yes" ; then
3802
3803     ECHO_LT='--silent'
3804     ECHO_LD='@echo linking $@;'
3805     RULE_CC='@echo compiling $<'
3806     SHOW_CC='@echo compiling $@'
3807     ECHO_CC='@'
3808
3809   else
3810
3811     ECHO_LT=''
3812     ECHO_LD=''
3813     RULE_CC=''
3814     SHOW_CC=''
3815     ECHO_CC=''
3816
3817   fi
3818 else
3819   enableval=yes
3820
3821     ECHO_LT=''
3822     ECHO_LD=''
3823     RULE_CC=''
3824     SHOW_CC=''
3825     ECHO_CC=''
3826
3827 fi;
3828 echo "$as_me:3828: result: $enableval" >&5
3829 echo "${ECHO_T}$enableval" >&6
3830
3831 GCC_VERSION=none
3832 if test "$GCC" = yes ; then
3833         echo "$as_me:3833: checking version of $CC" >&5
3834 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3835         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3836         test -z "$GCC_VERSION" && GCC_VERSION=unknown
3837         echo "$as_me:3837: result: $GCC_VERSION" >&5
3838 echo "${ECHO_T}$GCC_VERSION" >&6
3839 fi
3840
3841 if ( test "$GCC" = yes || test "$GXX" = yes )
3842 then
3843 echo "$as_me:3843: checking if you want to turn on gcc warnings" >&5
3844 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
3845
3846 # Check whether --enable-warnings or --disable-warnings was given.
3847 if test "${enable_warnings+set}" = set; then
3848   enableval="$enable_warnings"
3849   test "$enableval" != yes && enableval=no
3850   if test "$enableval" != "no" ; then
3851     with_warnings=yes
3852   else
3853     with_warnings=no
3854   fi
3855 else
3856   enableval=no
3857   with_warnings=no
3858
3859 fi;
3860 echo "$as_me:3860: result: $with_warnings" >&5
3861 echo "${ECHO_T}$with_warnings" >&6
3862 if test "$with_warnings" = "yes"
3863 then
3864
3865 if test "$GCC" = yes
3866 then
3867 cat > conftest.i <<EOF
3868 #ifndef GCC_PRINTF
3869 #define GCC_PRINTF 0
3870 #endif
3871 #ifndef GCC_SCANF
3872 #define GCC_SCANF 0
3873 #endif
3874 #ifndef GCC_NORETURN
3875 #define GCC_NORETURN /* nothing */
3876 #endif
3877 #ifndef GCC_UNUSED
3878 #define GCC_UNUSED /* nothing */
3879 #endif
3880 EOF
3881 if test "$GCC" = yes
3882 then
3883         { echo "$as_me:3883: checking for $CC __attribute__ directives..." >&5
3884 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3885 cat > conftest.$ac_ext <<EOF
3886 #line 3886 "${as_me:-configure}"
3887 #include "confdefs.h"
3888 #include "conftest.h"
3889 #include "conftest.i"
3890 #if     GCC_PRINTF
3891 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3892 #else
3893 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3894 #endif
3895 #if     GCC_SCANF
3896 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3897 #else
3898 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
3899 #endif
3900 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3901 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3902 extern void foo(void) GCC_NORETURN;
3903 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3904 EOF
3905         cf_printf_attribute=no
3906         cf_scanf_attribute=no
3907         for cf_attribute in scanf printf unused noreturn
3908         do
3909
3910 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3911
3912                 cf_directive="__attribute__(($cf_attribute))"
3913                 echo "checking for $CC $cf_directive" 1>&5
3914
3915                 case $cf_attribute in #(vi
3916                 printf) #(vi
3917                         cf_printf_attribute=yes
3918                         cat >conftest.h <<EOF
3919 #define GCC_$cf_ATTRIBUTE 1
3920 EOF
3921                         ;;
3922                 scanf) #(vi
3923                         cf_scanf_attribute=yes
3924                         cat >conftest.h <<EOF
3925 #define GCC_$cf_ATTRIBUTE 1
3926 EOF
3927                         ;;
3928                 *) #(vi
3929                         cat >conftest.h <<EOF
3930 #define GCC_$cf_ATTRIBUTE $cf_directive
3931 EOF
3932                         ;;
3933                 esac
3934
3935                 if { (eval echo "$as_me:3935: \"$ac_compile\"") >&5
3936   (eval $ac_compile) 2>&5
3937   ac_status=$?
3938   echo "$as_me:3938: \$? = $ac_status" >&5
3939   (exit $ac_status); }; then
3940                         test -n "$verbose" && echo "$as_me:3940: result: ... $cf_attribute" >&5
3941 echo "${ECHO_T}... $cf_attribute" >&6
3942                         cat conftest.h >>confdefs.h
3943                         case $cf_attribute in #(vi
3944                         printf) #(vi
3945                                 if test "$cf_printf_attribute" = no ; then
3946                                         cat >>confdefs.h <<EOF
3947 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
3948 EOF
3949                                 else
3950                                         cat >>confdefs.h <<EOF
3951 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3952 EOF
3953                                 fi
3954                                 ;;
3955                         scanf) #(vi
3956                                 if test "$cf_scanf_attribute" = no ; then
3957                                         cat >>confdefs.h <<EOF
3958 #define GCC_SCANFLIKE(fmt,var) /* nothing */
3959 EOF
3960                                 else
3961                                         cat >>confdefs.h <<EOF
3962 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3963 EOF
3964                                 fi
3965                                 ;;
3966                         esac
3967                 fi
3968         done
3969 else
3970         fgrep define conftest.i >>confdefs.h
3971 fi
3972 rm -rf conftest*
3973 fi
3974
3975 INTEL_COMPILER=no
3976
3977 if test "$GCC" = yes ; then
3978         case $host_os in
3979         linux*|gnu*)
3980                 echo "$as_me:3980: checking if this is really Intel C compiler" >&5
3981 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
3982                 cf_save_CFLAGS="$CFLAGS"
3983                 CFLAGS="$CFLAGS -no-gcc"
3984                 cat >conftest.$ac_ext <<_ACEOF
3985 #line 3985 "configure"
3986 #include "confdefs.h"
3987
3988 int
3989 main ()
3990 {
3991
3992 #ifdef __INTEL_COMPILER
3993 #else
3994 make an error
3995 #endif
3996
3997   ;
3998   return 0;
3999 }
4000 _ACEOF
4001 rm -f conftest.$ac_objext
4002 if { (eval echo "$as_me:4002: \"$ac_compile\"") >&5
4003   (eval $ac_compile) 2>&5
4004   ac_status=$?
4005   echo "$as_me:4005: \$? = $ac_status" >&5
4006   (exit $ac_status); } &&
4007          { ac_try='test -s conftest.$ac_objext'
4008   { (eval echo "$as_me:4008: \"$ac_try\"") >&5
4009   (eval $ac_try) 2>&5
4010   ac_status=$?
4011   echo "$as_me:4011: \$? = $ac_status" >&5
4012   (exit $ac_status); }; }; then
4013   INTEL_COMPILER=yes
4014 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4015
4016 else
4017   echo "$as_me: failed program was:" >&5
4018 cat conftest.$ac_ext >&5
4019 fi
4020 rm -f conftest.$ac_objext conftest.$ac_ext
4021                 CFLAGS="$cf_save_CFLAGS"
4022                 echo "$as_me:4022: result: $INTEL_COMPILER" >&5
4023 echo "${ECHO_T}$INTEL_COMPILER" >&6
4024                 ;;
4025         esac
4026 fi
4027
4028 cat > conftest.$ac_ext <<EOF
4029 #line 4029 "${as_me:-configure}"
4030 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4031 EOF
4032
4033 if test "$INTEL_COMPILER" = yes
4034 then
4035 # The "-wdXXX" options suppress warnings:
4036 # remark #1419: external declaration in primary source file
4037 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4038 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4039 # remark #193: zero used for undefined preprocessing identifier
4040 # remark #593: variable "curs_sb_left_arrow" was set but never used
4041 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4042 # remark #869: parameter "tw" was never referenced
4043 # remark #981: operands are evaluated in unspecified order
4044 # warning #279: controlling expression is constant
4045
4046         { echo "$as_me:4046: checking for $CC warning options..." >&5
4047 echo "$as_me: checking for $CC warning options..." >&6;}
4048         cf_save_CFLAGS="$CFLAGS"
4049         EXTRA_CFLAGS="-Wall"
4050         for cf_opt in \
4051                 wd1419 \
4052                 wd1683 \
4053                 wd1684 \
4054                 wd193 \
4055                 wd593 \
4056                 wd279 \
4057                 wd810 \
4058                 wd869 \
4059                 wd981
4060         do
4061                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4062                 if { (eval echo "$as_me:4062: \"$ac_compile\"") >&5
4063   (eval $ac_compile) 2>&5
4064   ac_status=$?
4065   echo "$as_me:4065: \$? = $ac_status" >&5
4066   (exit $ac_status); }; then
4067                         test -n "$verbose" && echo "$as_me:4067: result: ... -$cf_opt" >&5
4068 echo "${ECHO_T}... -$cf_opt" >&6
4069                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4070                 fi
4071         done
4072         CFLAGS="$cf_save_CFLAGS"
4073
4074 elif test "$GCC" = yes
4075 then
4076         { echo "$as_me:4076: checking for $CC warning options..." >&5
4077 echo "$as_me: checking for $CC warning options..." >&6;}
4078         cf_save_CFLAGS="$CFLAGS"
4079         EXTRA_CFLAGS=
4080         cf_warn_CONST=""
4081         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4082         for cf_opt in W Wall \
4083                 Wbad-function-cast \
4084                 Wcast-align \
4085                 Wcast-qual \
4086                 Winline \
4087                 Wmissing-declarations \
4088                 Wmissing-prototypes \
4089                 Wnested-externs \
4090                 Wpointer-arith \
4091                 Wshadow \
4092                 Wstrict-prototypes \
4093                 Wundef $cf_warn_CONST
4094         do
4095                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4096                 if { (eval echo "$as_me:4096: \"$ac_compile\"") >&5
4097   (eval $ac_compile) 2>&5
4098   ac_status=$?
4099   echo "$as_me:4099: \$? = $ac_status" >&5
4100   (exit $ac_status); }; then
4101                         test -n "$verbose" && echo "$as_me:4101: result: ... -$cf_opt" >&5
4102 echo "${ECHO_T}... -$cf_opt" >&6
4103                         case $cf_opt in #(vi
4104                         Wcast-qual) #(vi
4105                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4106                                 ;;
4107                         Winline) #(vi
4108                                 case $GCC_VERSION in
4109                                 [34].*)
4110                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4111
4112 echo "${as_me:-configure}:4112: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4113
4114                                         continue;;
4115                                 esac
4116                                 ;;
4117                         esac
4118                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4119                 fi
4120         done
4121         CFLAGS="$cf_save_CFLAGS"
4122 fi
4123 rm -rf conftest*
4124
4125 fi
4126 fi
4127
4128 echo "$as_me:4128: checking if you want to use dmalloc for testing" >&5
4129 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4130
4131 # Check whether --with-dmalloc or --without-dmalloc was given.
4132 if test "${with_dmalloc+set}" = set; then
4133   withval="$with_dmalloc"
4134   cat >>confdefs.h <<\EOF
4135 #define USE_DMALLOC 1
4136 EOF
4137
4138         : ${with_cflags:=-g}
4139         : ${with_no_leaks:=yes}
4140          with_dmalloc=yes
4141 else
4142   with_dmalloc=
4143 fi;
4144 echo "$as_me:4144: result: ${with_dmalloc:-no}" >&5
4145 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4146
4147 case .$with_cflags in #(vi
4148 .*-g*)
4149         case .$CFLAGS in #(vi
4150         .*-g*) #(vi
4151                 ;;
4152         *)
4153
4154 cf_fix_cppflags=no
4155 cf_new_cflags=
4156 cf_new_cppflags=
4157 cf_new_extra_cppflags=
4158
4159 for cf_add_cflags in -g
4160 do
4161 case $cf_fix_cppflags in
4162 no)
4163         case $cf_add_cflags in #(vi
4164         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4165                 case $cf_add_cflags in
4166                 -D*)
4167                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4168
4169                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4170                                 && test -z "${cf_tst_cflags}" \
4171                                 && cf_fix_cppflags=yes
4172
4173                         if test $cf_fix_cppflags = yes ; then
4174                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4175                                 continue
4176                         elif test "${cf_tst_cflags}" = "\"'" ; then
4177                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4178                                 continue
4179                         fi
4180                         ;;
4181                 esac
4182                 case "$CPPFLAGS" in
4183                 *$cf_add_cflags) #(vi
4184                         ;;
4185                 *) #(vi
4186                         case $cf_add_cflags in #(vi
4187                         -D*)
4188                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4189
4190 CPPFLAGS=`echo "$CPPFLAGS" | \
4191         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4192                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4193
4194                                 ;;
4195                         esac
4196                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4197                         ;;
4198                 esac
4199                 ;;
4200         *)
4201                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4202                 ;;
4203         esac
4204         ;;
4205 yes)
4206         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4207
4208         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4209
4210         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4211                 && test -z "${cf_tst_cflags}" \
4212                 && cf_fix_cppflags=no
4213         ;;
4214 esac
4215 done
4216
4217 if test -n "$cf_new_cflags" ; then
4218
4219         CFLAGS="$CFLAGS $cf_new_cflags"
4220 fi
4221
4222 if test -n "$cf_new_cppflags" ; then
4223
4224         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4225 fi
4226
4227 if test -n "$cf_new_extra_cppflags" ; then
4228
4229         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4230 fi
4231
4232                 ;;
4233         esac
4234         ;;
4235 esac
4236
4237 if test "$with_dmalloc" = yes ; then
4238         echo "$as_me:4238: checking for dmalloc.h" >&5
4239 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4240 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4241   echo $ECHO_N "(cached) $ECHO_C" >&6
4242 else
4243   cat >conftest.$ac_ext <<_ACEOF
4244 #line 4244 "configure"
4245 #include "confdefs.h"
4246 #include <dmalloc.h>
4247 _ACEOF
4248 if { (eval echo "$as_me:4248: \"$ac_cpp conftest.$ac_ext\"") >&5
4249   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4250   ac_status=$?
4251   egrep -v '^ *\+' conftest.er1 >conftest.err
4252   rm -f conftest.er1
4253   cat conftest.err >&5
4254   echo "$as_me:4254: \$? = $ac_status" >&5
4255   (exit $ac_status); } >/dev/null; then
4256   if test -s conftest.err; then
4257     ac_cpp_err=$ac_c_preproc_warn_flag
4258   else
4259     ac_cpp_err=
4260   fi
4261 else
4262   ac_cpp_err=yes
4263 fi
4264 if test -z "$ac_cpp_err"; then
4265   ac_cv_header_dmalloc_h=yes
4266 else
4267   echo "$as_me: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   ac_cv_header_dmalloc_h=no
4270 fi
4271 rm -f conftest.err conftest.$ac_ext
4272 fi
4273 echo "$as_me:4273: result: $ac_cv_header_dmalloc_h" >&5
4274 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4275 if test $ac_cv_header_dmalloc_h = yes; then
4276
4277 echo "$as_me:4277: checking for dmalloc_debug in -ldmalloc" >&5
4278 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4279 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4280   echo $ECHO_N "(cached) $ECHO_C" >&6
4281 else
4282   ac_check_lib_save_LIBS=$LIBS
4283 LIBS="-ldmalloc  $LIBS"
4284 cat >conftest.$ac_ext <<_ACEOF
4285 #line 4285 "configure"
4286 #include "confdefs.h"
4287
4288 /* Override any gcc2 internal prototype to avoid an error.  */
4289 #ifdef __cplusplus
4290 extern "C"
4291 #endif
4292 /* We use char because int might match the return type of a gcc2
4293    builtin and then its argument prototype would still apply.  */
4294 char dmalloc_debug ();
4295 int
4296 main ()
4297 {
4298 dmalloc_debug ();
4299   ;
4300   return 0;
4301 }
4302 _ACEOF
4303 rm -f conftest.$ac_objext conftest$ac_exeext
4304 if { (eval echo "$as_me:4304: \"$ac_link\"") >&5
4305   (eval $ac_link) 2>&5
4306   ac_status=$?
4307   echo "$as_me:4307: \$? = $ac_status" >&5
4308   (exit $ac_status); } &&
4309          { ac_try='test -s conftest$ac_exeext'
4310   { (eval echo "$as_me:4310: \"$ac_try\"") >&5
4311   (eval $ac_try) 2>&5
4312   ac_status=$?
4313   echo "$as_me:4313: \$? = $ac_status" >&5
4314   (exit $ac_status); }; }; then
4315   ac_cv_lib_dmalloc_dmalloc_debug=yes
4316 else
4317   echo "$as_me: failed program was:" >&5
4318 cat conftest.$ac_ext >&5
4319 ac_cv_lib_dmalloc_dmalloc_debug=no
4320 fi
4321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4322 LIBS=$ac_check_lib_save_LIBS
4323 fi
4324 echo "$as_me:4324: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4325 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4326 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4327   cat >>confdefs.h <<EOF
4328 #define HAVE_LIBDMALLOC 1
4329 EOF
4330
4331   LIBS="-ldmalloc $LIBS"
4332
4333 fi
4334
4335 fi
4336
4337 fi
4338
4339 echo "$as_me:4339: checking if you want to use dbmalloc for testing" >&5
4340 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4341
4342 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4343 if test "${with_dbmalloc+set}" = set; then
4344   withval="$with_dbmalloc"
4345   cat >>confdefs.h <<\EOF
4346 #define USE_DBMALLOC 1
4347 EOF
4348
4349         : ${with_cflags:=-g}
4350         : ${with_no_leaks:=yes}
4351          with_dbmalloc=yes
4352 else
4353   with_dbmalloc=
4354 fi;
4355 echo "$as_me:4355: result: ${with_dbmalloc:-no}" >&5
4356 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4357
4358 case .$with_cflags in #(vi
4359 .*-g*)
4360         case .$CFLAGS in #(vi
4361         .*-g*) #(vi
4362                 ;;
4363         *)
4364
4365 cf_fix_cppflags=no
4366 cf_new_cflags=
4367 cf_new_cppflags=
4368 cf_new_extra_cppflags=
4369
4370 for cf_add_cflags in -g
4371 do
4372 case $cf_fix_cppflags in
4373 no)
4374         case $cf_add_cflags in #(vi
4375         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4376                 case $cf_add_cflags in
4377                 -D*)
4378                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4379
4380                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4381                                 && test -z "${cf_tst_cflags}" \
4382                                 && cf_fix_cppflags=yes
4383
4384                         if test $cf_fix_cppflags = yes ; then
4385                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4386                                 continue
4387                         elif test "${cf_tst_cflags}" = "\"'" ; then
4388                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4389                                 continue
4390                         fi
4391                         ;;
4392                 esac
4393                 case "$CPPFLAGS" in
4394                 *$cf_add_cflags) #(vi
4395                         ;;
4396                 *) #(vi
4397                         case $cf_add_cflags in #(vi
4398                         -D*)
4399                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4400
4401 CPPFLAGS=`echo "$CPPFLAGS" | \
4402         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4403                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4404
4405                                 ;;
4406                         esac
4407                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4408                         ;;
4409                 esac
4410                 ;;
4411         *)
4412                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4413                 ;;
4414         esac
4415         ;;
4416 yes)
4417         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4418
4419         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4420
4421         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4422                 && test -z "${cf_tst_cflags}" \
4423                 && cf_fix_cppflags=no
4424         ;;
4425 esac
4426 done
4427
4428 if test -n "$cf_new_cflags" ; then
4429
4430         CFLAGS="$CFLAGS $cf_new_cflags"
4431 fi
4432
4433 if test -n "$cf_new_cppflags" ; then
4434
4435         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4436 fi
4437
4438 if test -n "$cf_new_extra_cppflags" ; then
4439
4440         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4441 fi
4442
4443                 ;;
4444         esac
4445         ;;
4446 esac
4447
4448 if test "$with_dbmalloc" = yes ; then
4449         echo "$as_me:4449: checking for dbmalloc.h" >&5
4450 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4451 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4452   echo $ECHO_N "(cached) $ECHO_C" >&6
4453 else
4454   cat >conftest.$ac_ext <<_ACEOF
4455 #line 4455 "configure"
4456 #include "confdefs.h"
4457 #include <dbmalloc.h>
4458 _ACEOF
4459 if { (eval echo "$as_me:4459: \"$ac_cpp conftest.$ac_ext\"") >&5
4460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4461   ac_status=$?
4462   egrep -v '^ *\+' conftest.er1 >conftest.err
4463   rm -f conftest.er1
4464   cat conftest.err >&5
4465   echo "$as_me:4465: \$? = $ac_status" >&5
4466   (exit $ac_status); } >/dev/null; then
4467   if test -s conftest.err; then
4468     ac_cpp_err=$ac_c_preproc_warn_flag
4469   else
4470     ac_cpp_err=
4471   fi
4472 else
4473   ac_cpp_err=yes
4474 fi
4475 if test -z "$ac_cpp_err"; then
4476   ac_cv_header_dbmalloc_h=yes
4477 else
4478   echo "$as_me: failed program was:" >&5
4479   cat conftest.$ac_ext >&5
4480   ac_cv_header_dbmalloc_h=no
4481 fi
4482 rm -f conftest.err conftest.$ac_ext
4483 fi
4484 echo "$as_me:4484: result: $ac_cv_header_dbmalloc_h" >&5
4485 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4486 if test $ac_cv_header_dbmalloc_h = yes; then
4487
4488 echo "$as_me:4488: checking for debug_malloc in -ldbmalloc" >&5
4489 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4490 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4491   echo $ECHO_N "(cached) $ECHO_C" >&6
4492 else
4493   ac_check_lib_save_LIBS=$LIBS
4494 LIBS="-ldbmalloc  $LIBS"
4495 cat >conftest.$ac_ext <<_ACEOF
4496 #line 4496 "configure"
4497 #include "confdefs.h"
4498
4499 /* Override any gcc2 internal prototype to avoid an error.  */
4500 #ifdef __cplusplus
4501 extern "C"
4502 #endif
4503 /* We use char because int might match the return type of a gcc2
4504    builtin and then its argument prototype would still apply.  */
4505 char debug_malloc ();
4506 int
4507 main ()
4508 {
4509 debug_malloc ();
4510   ;
4511   return 0;
4512 }
4513 _ACEOF
4514 rm -f conftest.$ac_objext conftest$ac_exeext
4515 if { (eval echo "$as_me:4515: \"$ac_link\"") >&5
4516   (eval $ac_link) 2>&5
4517   ac_status=$?
4518   echo "$as_me:4518: \$? = $ac_status" >&5
4519   (exit $ac_status); } &&
4520          { ac_try='test -s conftest$ac_exeext'
4521   { (eval echo "$as_me:4521: \"$ac_try\"") >&5
4522   (eval $ac_try) 2>&5
4523   ac_status=$?
4524   echo "$as_me:4524: \$? = $ac_status" >&5
4525   (exit $ac_status); }; }; then
4526   ac_cv_lib_dbmalloc_debug_malloc=yes
4527 else
4528   echo "$as_me: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4530 ac_cv_lib_dbmalloc_debug_malloc=no
4531 fi
4532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4533 LIBS=$ac_check_lib_save_LIBS
4534 fi
4535 echo "$as_me:4535: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4536 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4537 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4538   cat >>confdefs.h <<EOF
4539 #define HAVE_LIBDBMALLOC 1
4540 EOF
4541
4542   LIBS="-ldbmalloc $LIBS"
4543
4544 fi
4545
4546 fi
4547
4548 fi
4549
4550 echo "$as_me:4550: checking if you want to use valgrind for testing" >&5
4551 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
4552
4553 # Check whether --with-valgrind or --without-valgrind was given.
4554 if test "${with_valgrind+set}" = set; then
4555   withval="$with_valgrind"
4556   cat >>confdefs.h <<\EOF
4557 #define USE_VALGRIND 1
4558 EOF
4559
4560         : ${with_cflags:=-g}
4561         : ${with_no_leaks:=yes}
4562          with_valgrind=yes
4563 else
4564   with_valgrind=
4565 fi;
4566 echo "$as_me:4566: result: ${with_valgrind:-no}" >&5
4567 echo "${ECHO_T}${with_valgrind:-no}" >&6
4568
4569 case .$with_cflags in #(vi
4570 .*-g*)
4571         case .$CFLAGS in #(vi
4572         .*-g*) #(vi
4573                 ;;
4574         *)
4575
4576 cf_fix_cppflags=no
4577 cf_new_cflags=
4578 cf_new_cppflags=
4579 cf_new_extra_cppflags=
4580
4581 for cf_add_cflags in -g
4582 do
4583 case $cf_fix_cppflags in
4584 no)
4585         case $cf_add_cflags in #(vi
4586         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4587                 case $cf_add_cflags in
4588                 -D*)
4589                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4590
4591                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4592                                 && test -z "${cf_tst_cflags}" \
4593                                 && cf_fix_cppflags=yes
4594
4595                         if test $cf_fix_cppflags = yes ; then
4596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4597                                 continue
4598                         elif test "${cf_tst_cflags}" = "\"'" ; then
4599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4600                                 continue
4601                         fi
4602                         ;;
4603                 esac
4604                 case "$CPPFLAGS" in
4605                 *$cf_add_cflags) #(vi
4606                         ;;
4607                 *) #(vi
4608                         case $cf_add_cflags in #(vi
4609                         -D*)
4610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4611
4612 CPPFLAGS=`echo "$CPPFLAGS" | \
4613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4615
4616                                 ;;
4617                         esac
4618                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4619                         ;;
4620                 esac
4621                 ;;
4622         *)
4623                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4624                 ;;
4625         esac
4626         ;;
4627 yes)
4628         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4629
4630         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4631
4632         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4633                 && test -z "${cf_tst_cflags}" \
4634                 && cf_fix_cppflags=no
4635         ;;
4636 esac
4637 done
4638
4639 if test -n "$cf_new_cflags" ; then
4640
4641         CFLAGS="$CFLAGS $cf_new_cflags"
4642 fi
4643
4644 if test -n "$cf_new_cppflags" ; then
4645
4646         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4647 fi
4648
4649 if test -n "$cf_new_extra_cppflags" ; then
4650
4651         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4652 fi
4653
4654                 ;;
4655         esac
4656         ;;
4657 esac
4658
4659 echo "$as_me:4659: checking if you want to perform memory-leak testing" >&5
4660 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
4661
4662 # Check whether --enable-leaks or --disable-leaks was given.
4663 if test "${enable_leaks+set}" = set; then
4664   enableval="$enable_leaks"
4665   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
4666 else
4667   : ${with_no_leaks:=no}
4668 fi;
4669 echo "$as_me:4669: result: $with_no_leaks" >&5
4670 echo "${ECHO_T}$with_no_leaks" >&6
4671
4672 if test "$with_no_leaks" = yes ; then
4673         cat >>confdefs.h <<\EOF
4674 #define NO_LEAKS 1
4675 EOF
4676
4677         cat >>confdefs.h <<\EOF
4678 #define YY_NO_LEAKS 1
4679 EOF
4680
4681 fi
4682
4683 echo "$as_me:4683: checking if you want to check for wide-character functions" >&5
4684 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4685
4686 # Check whether --enable-widec or --disable-widec was given.
4687 if test "${enable_widec+set}" = set; then
4688   enableval="$enable_widec"
4689   test "$enableval" != no && enableval=yes
4690   if test "$enableval" != "yes" ; then
4691     cf_enable_widec=no
4692   else
4693     cf_enable_widec=yes
4694   fi
4695 else
4696   enableval=yes
4697   cf_enable_widec=yes
4698
4699 fi;
4700 echo "$as_me:4700: result: $cf_enable_widec" >&5
4701 echo "${ECHO_T}$cf_enable_widec" >&6
4702
4703 echo "$as_me:4703: checking for specific curses-directory" >&5
4704 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4705
4706 # Check whether --with-curses-dir or --without-curses-dir was given.
4707 if test "${with_curses_dir+set}" = set; then
4708   withval="$with_curses_dir"
4709   cf_cv_curses_dir=$withval
4710 else
4711   cf_cv_curses_dir=no
4712 fi;
4713 echo "$as_me:4713: result: $cf_cv_curses_dir" >&5
4714 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4715
4716 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4717 then
4718
4719 if test "x$prefix" != xNONE; then
4720   cf_path_syntax="$prefix"
4721 else
4722   cf_path_syntax="$ac_default_prefix"
4723 fi
4724
4725 case ".$withval" in #(vi
4726 .\$\(*\)*|.\'*\'*) #(vi
4727   ;;
4728 ..|./*|.\\*) #(vi
4729   ;;
4730 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4731   ;;
4732 .\${*prefix}*) #(vi
4733   eval withval="$withval"
4734   case ".$withval" in #(vi
4735   .NONE/*)
4736     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4737     ;;
4738   esac
4739   ;; #(vi
4740 .no|.NONE/*)
4741   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4742   ;;
4743 *)
4744   { { echo "$as_me:4744: error: expected a pathname, not \"$withval\"" >&5
4745 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4746    { (exit 1); exit 1; }; }
4747   ;;
4748 esac
4749
4750         if test -d "$cf_cv_curses_dir"
4751         then
4752
4753 if test -n "$cf_cv_curses_dir/include" ; then
4754   for cf_add_incdir in $cf_cv_curses_dir/include
4755   do
4756         while test $cf_add_incdir != /usr/include
4757         do
4758           if test -d $cf_add_incdir
4759           then
4760                 cf_have_incdir=no
4761                 if test -n "$CFLAGS$CPPFLAGS" ; then
4762                   # a loop is needed to ensure we can add subdirs of existing dirs
4763                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4764                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4765                           cf_have_incdir=yes; break
4766                         fi
4767                   done
4768                 fi
4769
4770                 if test "$cf_have_incdir" = no ; then
4771                   if test "$cf_add_incdir" = /usr/local/include ; then
4772                         if test "$GCC" = yes
4773                         then
4774                           cf_save_CPPFLAGS=$CPPFLAGS
4775                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4776                           cat >conftest.$ac_ext <<_ACEOF
4777 #line 4777 "configure"
4778 #include "confdefs.h"
4779 #include <stdio.h>
4780 int
4781 main ()
4782 {
4783 printf("Hello")
4784   ;
4785   return 0;
4786 }
4787 _ACEOF
4788 rm -f conftest.$ac_objext
4789 if { (eval echo "$as_me:4789: \"$ac_compile\"") >&5
4790   (eval $ac_compile) 2>&5
4791   ac_status=$?
4792   echo "$as_me:4792: \$? = $ac_status" >&5
4793   (exit $ac_status); } &&
4794          { ac_try='test -s conftest.$ac_objext'
4795   { (eval echo "$as_me:4795: \"$ac_try\"") >&5
4796   (eval $ac_try) 2>&5
4797   ac_status=$?
4798   echo "$as_me:4798: \$? = $ac_status" >&5
4799   (exit $ac_status); }; }; then
4800   :
4801 else
4802   echo "$as_me: failed program was:" >&5
4803 cat conftest.$ac_ext >&5
4804 cf_have_incdir=yes
4805 fi
4806 rm -f conftest.$ac_objext conftest.$ac_ext
4807                           CPPFLAGS=$cf_save_CPPFLAGS
4808                         fi
4809                   fi
4810                 fi
4811
4812                 if test "$cf_have_incdir" = no ; then
4813                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4814
4815 echo "${as_me:-configure}:4815: testing adding $cf_add_incdir to include-path ..." 1>&5
4816
4817                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4818
4819                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4820                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4821                   cf_add_incdir="$cf_top_incdir"
4822                 else
4823                   break
4824                 fi
4825           fi
4826         done
4827   done
4828 fi
4829
4830 if test -n "$cf_cv_curses_dir/lib" ; then
4831   for cf_add_libdir in $cf_cv_curses_dir/lib
4832   do
4833     if test $cf_add_libdir = /usr/lib ; then
4834       :
4835     elif test -d $cf_add_libdir
4836     then
4837       cf_have_libdir=no
4838       if test -n "$LDFLAGS$LIBS" ; then
4839         # a loop is needed to ensure we can add subdirs of existing dirs
4840         for cf_test_libdir in $LDFLAGS $LIBS ; do
4841           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4842             cf_have_libdir=yes; break
4843           fi
4844         done
4845       fi
4846       if test "$cf_have_libdir" = no ; then
4847         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4848
4849 echo "${as_me:-configure}:4849: testing adding $cf_add_libdir to library-path ..." 1>&5
4850
4851         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4852       fi
4853     fi
4854   done
4855 fi
4856
4857         fi
4858 fi
4859
4860 echo "$as_me:4860: checking for specified curses library type" >&5
4861 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4862
4863 # Check whether --with-ncursesw or --without-ncursesw was given.
4864 if test "${with_ncursesw+set}" = set; then
4865   withval="$with_ncursesw"
4866   cf_cv_screen=ncursesw
4867 else
4868
4869 # Check whether --with-ncurses or --without-ncurses was given.
4870 if test "${with_ncurses+set}" = set; then
4871   withval="$with_ncurses"
4872   cf_cv_screen=ncurses
4873 else
4874
4875 # Check whether --with-pdcurses or --without-pdcurses was given.
4876 if test "${with_pdcurses+set}" = set; then
4877   withval="$with_pdcurses"
4878   cf_cv_screen=pdcurses
4879 else
4880
4881 # Check whether --with-curses-colr or --without-curses-colr was given.
4882 if test "${with_curses_colr+set}" = set; then
4883   withval="$with_curses_colr"
4884   cf_cv_screen=curses_colr
4885 else
4886
4887 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4888 if test "${with_curses_5lib+set}" = set; then
4889   withval="$with_curses_5lib"
4890   cf_cv_screen=curses_5lib
4891 fi;
4892 fi;
4893 fi;
4894 fi;
4895 fi;
4896
4897 echo "$as_me:4897: result: $cf_cv_screen" >&5
4898 echo "${ECHO_T}$cf_cv_screen" >&6
4899
4900 case $cf_cv_screen in
4901 curses|curses_*)
4902
4903 echo "$as_me:4903: checking for extra include directories" >&5
4904 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4905 if test "${cf_cv_curses_incdir+set}" = set; then
4906   echo $ECHO_N "(cached) $ECHO_C" >&6
4907 else
4908
4909 cf_cv_curses_incdir=no
4910 case $host_os in #(vi
4911 hpux10.*) #(vi
4912         if test "x$cf_cv_screen" = "xcurses_colr"
4913         then
4914                 test -d /usr/include/curses_colr && \
4915                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4916         fi
4917         ;;
4918 sunos3*|sunos4*)
4919         if test "x$cf_cv_screen" = "xcurses_5lib"
4920         then
4921                 test -d /usr/5lib && \
4922                 test -d /usr/5include && \
4923                 cf_cv_curses_incdir="-I/usr/5include"
4924         fi
4925         ;;
4926 esac
4927
4928 fi
4929 echo "$as_me:4929: result: $cf_cv_curses_incdir" >&5
4930 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4931 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4932
4933 echo "$as_me:4933: checking if we have identified curses headers" >&5
4934 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4935 if test "${cf_cv_ncurses_header+set}" = set; then
4936   echo $ECHO_N "(cached) $ECHO_C" >&6
4937 else
4938
4939 cf_cv_ncurses_header=none
4940 for cf_header in  \
4941         ncurses.h \
4942         curses.h ncurses/ncurses.h ncurses/curses.h
4943 do
4944 cat >conftest.$ac_ext <<_ACEOF
4945 #line 4945 "configure"
4946 #include "confdefs.h"
4947 #include <${cf_header}>
4948 int
4949 main ()
4950 {
4951 initscr(); tgoto("?", 0,0)
4952   ;
4953   return 0;
4954 }
4955 _ACEOF
4956 rm -f conftest.$ac_objext
4957 if { (eval echo "$as_me:4957: \"$ac_compile\"") >&5
4958   (eval $ac_compile) 2>&5
4959   ac_status=$?
4960   echo "$as_me:4960: \$? = $ac_status" >&5
4961   (exit $ac_status); } &&
4962          { ac_try='test -s conftest.$ac_objext'
4963   { (eval echo "$as_me:4963: \"$ac_try\"") >&5
4964   (eval $ac_try) 2>&5
4965   ac_status=$?
4966   echo "$as_me:4966: \$? = $ac_status" >&5
4967   (exit $ac_status); }; }; then
4968   cf_cv_ncurses_header=$cf_header; break
4969 else
4970   echo "$as_me: failed program was:" >&5
4971 cat conftest.$ac_ext >&5
4972 fi
4973 rm -f conftest.$ac_objext conftest.$ac_ext
4974 done
4975
4976 fi
4977 echo "$as_me:4977: result: $cf_cv_ncurses_header" >&5
4978 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4979
4980 if test "$cf_cv_ncurses_header" = none ; then
4981         { { echo "$as_me:4981: error: No curses header-files found" >&5
4982 echo "$as_me: error: No curses header-files found" >&2;}
4983    { (exit 1); exit 1; }; }
4984 fi
4985
4986 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4987
4988 for ac_header in $cf_cv_ncurses_header
4989 do
4990 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4991 echo "$as_me:4991: checking for $ac_header" >&5
4992 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4993 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4994   echo $ECHO_N "(cached) $ECHO_C" >&6
4995 else
4996   cat >conftest.$ac_ext <<_ACEOF
4997 #line 4997 "configure"
4998 #include "confdefs.h"
4999 #include <$ac_header>
5000 _ACEOF
5001 if { (eval echo "$as_me:5001: \"$ac_cpp conftest.$ac_ext\"") >&5
5002   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5003   ac_status=$?
5004   egrep -v '^ *\+' conftest.er1 >conftest.err
5005   rm -f conftest.er1
5006   cat conftest.err >&5
5007   echo "$as_me:5007: \$? = $ac_status" >&5
5008   (exit $ac_status); } >/dev/null; then
5009   if test -s conftest.err; then
5010     ac_cpp_err=$ac_c_preproc_warn_flag
5011   else
5012     ac_cpp_err=
5013   fi
5014 else
5015   ac_cpp_err=yes
5016 fi
5017 if test -z "$ac_cpp_err"; then
5018   eval "$as_ac_Header=yes"
5019 else
5020   echo "$as_me: failed program was:" >&5
5021   cat conftest.$ac_ext >&5
5022   eval "$as_ac_Header=no"
5023 fi
5024 rm -f conftest.err conftest.$ac_ext
5025 fi
5026 echo "$as_me:5026: result: `eval echo '${'$as_ac_Header'}'`" >&5
5027 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5028 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5029   cat >>confdefs.h <<EOF
5030 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5031 EOF
5032
5033 fi
5034 done
5035
5036 echo "$as_me:5036: checking for terminfo header" >&5
5037 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5038 if test "${cf_cv_term_header+set}" = set; then
5039   echo $ECHO_N "(cached) $ECHO_C" >&6
5040 else
5041
5042 case ${cf_cv_ncurses_header} in #(vi
5043 */ncurses.h|*/ncursesw.h) #(vi
5044         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5045         ;;
5046 *)
5047         cf_term_header=term.h
5048         ;;
5049 esac
5050
5051 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5052 do
5053 cat >conftest.$ac_ext <<_ACEOF
5054 #line 5054 "configure"
5055 #include "confdefs.h"
5056 #include <stdio.h>
5057 #include <${cf_cv_ncurses_header:-curses.h}>
5058 #include <$cf_test>
5059
5060 int
5061 main ()
5062 {
5063 int x = auto_left_margin
5064   ;
5065   return 0;
5066 }
5067 _ACEOF
5068 rm -f conftest.$ac_objext
5069 if { (eval echo "$as_me:5069: \"$ac_compile\"") >&5
5070   (eval $ac_compile) 2>&5
5071   ac_status=$?
5072   echo "$as_me:5072: \$? = $ac_status" >&5
5073   (exit $ac_status); } &&
5074          { ac_try='test -s conftest.$ac_objext'
5075   { (eval echo "$as_me:5075: \"$ac_try\"") >&5
5076   (eval $ac_try) 2>&5
5077   ac_status=$?
5078   echo "$as_me:5078: \$? = $ac_status" >&5
5079   (exit $ac_status); }; }; then
5080
5081         cf_cv_term_header="$cf_test"
5082 else
5083   echo "$as_me: failed program was:" >&5
5084 cat conftest.$ac_ext >&5
5085
5086         cf_cv_term_header=unknown
5087
5088 fi
5089 rm -f conftest.$ac_objext conftest.$ac_ext
5090         test "$cf_cv_term_header" != unknown && break
5091 done
5092
5093 fi
5094 echo "$as_me:5094: result: $cf_cv_term_header" >&5
5095 echo "${ECHO_T}$cf_cv_term_header" >&6
5096
5097 # Set definitions to allow ifdef'ing to accommodate subdirectories
5098
5099 case $cf_cv_term_header in # (vi
5100 *term.h)
5101         cat >>confdefs.h <<\EOF
5102 #define HAVE_TERM_H 1
5103 EOF
5104
5105         ;;
5106 esac
5107
5108 case $cf_cv_term_header in # (vi
5109 ncurses/term.h) #(vi
5110         cat >>confdefs.h <<\EOF
5111 #define HAVE_NCURSES_TERM_H 1
5112 EOF
5113
5114         ;;
5115 ncursesw/term.h)
5116         cat >>confdefs.h <<\EOF
5117 #define HAVE_NCURSESW_TERM_H 1
5118 EOF
5119
5120         ;;
5121 esac
5122
5123 echo "$as_me:5123: checking for ncurses version" >&5
5124 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5125 if test "${cf_cv_ncurses_version+set}" = set; then
5126   echo $ECHO_N "(cached) $ECHO_C" >&6
5127 else
5128
5129         cf_cv_ncurses_version=no
5130         cf_tempfile=out$$
5131         rm -f $cf_tempfile
5132         if test "$cross_compiling" = yes; then
5133
5134         # This will not work if the preprocessor splits the line after the
5135         # Autoconf token.  The 'unproto' program does that.
5136         cat > conftest.$ac_ext <<EOF
5137 #include <${cf_cv_ncurses_header:-curses.h}>
5138 #undef Autoconf
5139 #ifdef NCURSES_VERSION
5140 Autoconf NCURSES_VERSION
5141 #else
5142 #ifdef __NCURSES_H
5143 Autoconf "old"
5144 #endif
5145 ;
5146 #endif
5147 EOF
5148         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5149         { (eval echo "$as_me:5149: \"$cf_try\"") >&5
5150   (eval $cf_try) 2>&5
5151   ac_status=$?
5152   echo "$as_me:5152: \$? = $ac_status" >&5
5153   (exit $ac_status); }
5154         if test -f conftest.out ; then
5155                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5156                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5157                 rm -f conftest.out
5158         fi
5159
5160 else
5161   cat >conftest.$ac_ext <<_ACEOF
5162 #line 5162 "configure"
5163 #include "confdefs.h"
5164
5165 #include <${cf_cv_ncurses_header:-curses.h}>
5166 #include <stdio.h>
5167 int main()
5168 {
5169         FILE *fp = fopen("$cf_tempfile", "w");
5170 #ifdef NCURSES_VERSION
5171 # ifdef NCURSES_VERSION_PATCH
5172         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5173 # else
5174         fprintf(fp, "%s\n", NCURSES_VERSION);
5175 # endif
5176 #else
5177 # ifdef __NCURSES_H
5178         fprintf(fp, "old\n");
5179 # else
5180         make an error
5181 # endif
5182 #endif
5183         ${cf_cv_main_return:-return}(0);
5184 }
5185 _ACEOF
5186 rm -f conftest$ac_exeext
5187 if { (eval echo "$as_me:5187: \"$ac_link\"") >&5
5188   (eval $ac_link) 2>&5
5189   ac_status=$?
5190   echo "$as_me:5190: \$? = $ac_status" >&5
5191   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5192   { (eval echo "$as_me:5192: \"$ac_try\"") >&5
5193   (eval $ac_try) 2>&5
5194   ac_status=$?
5195   echo "$as_me:5195: \$? = $ac_status" >&5
5196   (exit $ac_status); }; }; then
5197
5198         cf_cv_ncurses_version=`cat $cf_tempfile`
5199 else
5200   echo "$as_me: program exited with status $ac_status" >&5
5201 echo "$as_me: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5203 fi
5204 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5205 fi
5206         rm -f $cf_tempfile
5207
5208 fi
5209 echo "$as_me:5209: result: $cf_cv_ncurses_version" >&5
5210 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5211 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5212 #define NCURSES 1
5213 EOF
5214
5215 echo "$as_me:5215: checking if we have identified curses libraries" >&5
5216 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5217 cat >conftest.$ac_ext <<_ACEOF
5218 #line 5218 "configure"
5219 #include "confdefs.h"
5220 #include <${cf_cv_ncurses_header:-curses.h}>
5221 int
5222 main ()
5223 {
5224 initscr(); tgoto("?", 0,0)
5225   ;
5226   return 0;
5227 }
5228 _ACEOF
5229 rm -f conftest.$ac_objext conftest$ac_exeext
5230 if { (eval echo "$as_me:5230: \"$ac_link\"") >&5
5231   (eval $ac_link) 2>&5
5232   ac_status=$?
5233   echo "$as_me:5233: \$? = $ac_status" >&5
5234   (exit $ac_status); } &&
5235          { ac_try='test -s conftest$ac_exeext'
5236   { (eval echo "$as_me:5236: \"$ac_try\"") >&5
5237   (eval $ac_try) 2>&5
5238   ac_status=$?
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); }; }; then
5241   cf_result=yes
5242 else
5243   echo "$as_me: failed program was:" >&5
5244 cat conftest.$ac_ext >&5
5245 cf_result=no
5246 fi
5247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5248 echo "$as_me:5248: result: $cf_result" >&5
5249 echo "${ECHO_T}$cf_result" >&6
5250
5251 if test "$cf_result" = no ; then
5252 case $host_os in #(vi
5253 freebsd*) #(vi
5254     echo "$as_me:5254: checking for tgoto in -lmytinfo" >&5
5255 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5256 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5257   echo $ECHO_N "(cached) $ECHO_C" >&6
5258 else
5259   ac_check_lib_save_LIBS=$LIBS
5260 LIBS="-lmytinfo  $LIBS"
5261 cat >conftest.$ac_ext <<_ACEOF
5262 #line 5262 "configure"
5263 #include "confdefs.h"
5264
5265 /* Override any gcc2 internal prototype to avoid an error.  */
5266 #ifdef __cplusplus
5267 extern "C"
5268 #endif
5269 /* We use char because int might match the return type of a gcc2
5270    builtin and then its argument prototype would still apply.  */
5271 char tgoto ();
5272 int
5273 main ()
5274 {
5275 tgoto ();
5276   ;
5277   return 0;
5278 }
5279 _ACEOF
5280 rm -f conftest.$ac_objext conftest$ac_exeext
5281 if { (eval echo "$as_me:5281: \"$ac_link\"") >&5
5282   (eval $ac_link) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); } &&
5286          { ac_try='test -s conftest$ac_exeext'
5287   { (eval echo "$as_me:5287: \"$ac_try\"") >&5
5288   (eval $ac_try) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); }; }; then
5292   ac_cv_lib_mytinfo_tgoto=yes
5293 else
5294   echo "$as_me: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 ac_cv_lib_mytinfo_tgoto=no
5297 fi
5298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5299 LIBS=$ac_check_lib_save_LIBS
5300 fi
5301 echo "$as_me:5301: result: $ac_cv_lib_mytinfo_tgoto" >&5
5302 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5303 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5304   LIBS="-lmytinfo $LIBS"
5305 fi
5306
5307     ;;
5308 hpux10.*) #(vi
5309         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5310         # next (1998), and xcurses "newer" (2000).  There is no header file for
5311         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5312         # term.h) for cur_colr
5313         if test "x$cf_cv_screen" = "xcurses_colr"
5314         then
5315                 echo "$as_me:5315: checking for initscr in -lcur_colr" >&5
5316 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5317 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5318   echo $ECHO_N "(cached) $ECHO_C" >&6
5319 else
5320   ac_check_lib_save_LIBS=$LIBS
5321 LIBS="-lcur_colr  $LIBS"
5322 cat >conftest.$ac_ext <<_ACEOF
5323 #line 5323 "configure"
5324 #include "confdefs.h"
5325
5326 /* Override any gcc2 internal prototype to avoid an error.  */
5327 #ifdef __cplusplus
5328 extern "C"
5329 #endif
5330 /* We use char because int might match the return type of a gcc2
5331    builtin and then its argument prototype would still apply.  */
5332 char initscr ();
5333 int
5334 main ()
5335 {
5336 initscr ();
5337   ;
5338   return 0;
5339 }
5340 _ACEOF
5341 rm -f conftest.$ac_objext conftest$ac_exeext
5342 if { (eval echo "$as_me:5342: \"$ac_link\"") >&5
5343   (eval $ac_link) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); } &&
5347          { ac_try='test -s conftest$ac_exeext'
5348   { (eval echo "$as_me:5348: \"$ac_try\"") >&5
5349   (eval $ac_try) 2>&5
5350   ac_status=$?
5351   echo "$as_me:5351: \$? = $ac_status" >&5
5352   (exit $ac_status); }; }; then
5353   ac_cv_lib_cur_colr_initscr=yes
5354 else
5355   echo "$as_me: failed program was:" >&5
5356 cat conftest.$ac_ext >&5
5357 ac_cv_lib_cur_colr_initscr=no
5358 fi
5359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5360 LIBS=$ac_check_lib_save_LIBS
5361 fi
5362 echo "$as_me:5362: result: $ac_cv_lib_cur_colr_initscr" >&5
5363 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5364 if test $ac_cv_lib_cur_colr_initscr = yes; then
5365
5366                         LIBS="-lcur_colr $LIBS"
5367                         ac_cv_func_initscr=yes
5368
5369 else
5370
5371                 echo "$as_me:5371: checking for initscr in -lHcurses" >&5
5372 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5373 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5374   echo $ECHO_N "(cached) $ECHO_C" >&6
5375 else
5376   ac_check_lib_save_LIBS=$LIBS
5377 LIBS="-lHcurses  $LIBS"
5378 cat >conftest.$ac_ext <<_ACEOF
5379 #line 5379 "configure"
5380 #include "confdefs.h"
5381
5382 /* Override any gcc2 internal prototype to avoid an error.  */
5383 #ifdef __cplusplus
5384 extern "C"
5385 #endif
5386 /* We use char because int might match the return type of a gcc2
5387    builtin and then its argument prototype would still apply.  */
5388 char initscr ();
5389 int
5390 main ()
5391 {
5392 initscr ();
5393   ;
5394   return 0;
5395 }
5396 _ACEOF
5397 rm -f conftest.$ac_objext conftest$ac_exeext
5398 if { (eval echo "$as_me:5398: \"$ac_link\"") >&5
5399   (eval $ac_link) 2>&5
5400   ac_status=$?
5401   echo "$as_me:5401: \$? = $ac_status" >&5
5402   (exit $ac_status); } &&
5403          { ac_try='test -s conftest$ac_exeext'
5404   { (eval echo "$as_me:5404: \"$ac_try\"") >&5
5405   (eval $ac_try) 2>&5
5406   ac_status=$?
5407   echo "$as_me:5407: \$? = $ac_status" >&5
5408   (exit $ac_status); }; }; then
5409   ac_cv_lib_Hcurses_initscr=yes
5410 else
5411   echo "$as_me: failed program was:" >&5
5412 cat conftest.$ac_ext >&5
5413 ac_cv_lib_Hcurses_initscr=no
5414 fi
5415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5416 LIBS=$ac_check_lib_save_LIBS
5417 fi
5418 echo "$as_me:5418: result: $ac_cv_lib_Hcurses_initscr" >&5
5419 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5420 if test $ac_cv_lib_Hcurses_initscr = yes; then
5421
5422                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5423                         LIBS="-lHcurses $LIBS"
5424                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5425                         ac_cv_func_initscr=yes
5426
5427 fi
5428
5429 fi
5430
5431         fi
5432     ;;
5433 linux*)
5434         case `arch 2>/dev/null` in
5435         x86_64)
5436                 if test -d /lib64
5437                 then
5438
5439 if test -n "/lib64" ; then
5440   for cf_add_libdir in /lib64
5441   do
5442     if test $cf_add_libdir = /usr/lib ; then
5443       :
5444     elif test -d $cf_add_libdir
5445     then
5446       cf_have_libdir=no
5447       if test -n "$LDFLAGS$LIBS" ; then
5448         # a loop is needed to ensure we can add subdirs of existing dirs
5449         for cf_test_libdir in $LDFLAGS $LIBS ; do
5450           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5451             cf_have_libdir=yes; break
5452           fi
5453         done
5454       fi
5455       if test "$cf_have_libdir" = no ; then
5456         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5457
5458 echo "${as_me:-configure}:5458: testing adding $cf_add_libdir to library-path ..." 1>&5
5459
5460         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5461       fi
5462     fi
5463   done
5464 fi
5465
5466                 else
5467
5468 if test -n "/lib" ; then
5469   for cf_add_libdir in /lib
5470   do
5471     if test $cf_add_libdir = /usr/lib ; then
5472       :
5473     elif test -d $cf_add_libdir
5474     then
5475       cf_have_libdir=no
5476       if test -n "$LDFLAGS$LIBS" ; then
5477         # a loop is needed to ensure we can add subdirs of existing dirs
5478         for cf_test_libdir in $LDFLAGS $LIBS ; do
5479           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5480             cf_have_libdir=yes; break
5481           fi
5482         done
5483       fi
5484       if test "$cf_have_libdir" = no ; then
5485         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5486
5487 echo "${as_me:-configure}:5487: testing adding $cf_add_libdir to library-path ..." 1>&5
5488
5489         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5490       fi
5491     fi
5492   done
5493 fi
5494
5495                 fi
5496                 ;;
5497         *)
5498
5499 if test -n "/lib" ; then
5500   for cf_add_libdir in /lib
5501   do
5502     if test $cf_add_libdir = /usr/lib ; then
5503       :
5504     elif test -d $cf_add_libdir
5505     then
5506       cf_have_libdir=no
5507       if test -n "$LDFLAGS$LIBS" ; then
5508         # a loop is needed to ensure we can add subdirs of existing dirs
5509         for cf_test_libdir in $LDFLAGS $LIBS ; do
5510           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5511             cf_have_libdir=yes; break
5512           fi
5513         done
5514       fi
5515       if test "$cf_have_libdir" = no ; then
5516         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5517
5518 echo "${as_me:-configure}:5518: testing adding $cf_add_libdir to library-path ..." 1>&5
5519
5520         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5521       fi
5522     fi
5523   done
5524 fi
5525
5526                 ;;
5527         esac
5528     ;;
5529 sunos3*|sunos4*)
5530         if test "x$cf_cv_screen" = "xcurses_5lib"
5531         then
5532                 if test -d /usr/5lib ; then
5533
5534 if test -n "/usr/5lib" ; then
5535   for cf_add_libdir in /usr/5lib
5536   do
5537     if test $cf_add_libdir = /usr/lib ; then
5538       :
5539     elif test -d $cf_add_libdir
5540     then
5541       cf_have_libdir=no
5542       if test -n "$LDFLAGS$LIBS" ; then
5543         # a loop is needed to ensure we can add subdirs of existing dirs
5544         for cf_test_libdir in $LDFLAGS $LIBS ; do
5545           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5546             cf_have_libdir=yes; break
5547           fi
5548         done
5549       fi
5550       if test "$cf_have_libdir" = no ; then
5551         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5552
5553 echo "${as_me:-configure}:5553: testing adding $cf_add_libdir to library-path ..." 1>&5
5554
5555         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5556       fi
5557     fi
5558   done
5559 fi
5560
5561                         LIBS="-lcurses -ltermcap $LIBS"
5562                 fi
5563     fi
5564     ac_cv_func_initscr=yes
5565     ;;
5566 esac
5567
5568 if test ".$ac_cv_func_initscr" != .yes ; then
5569     cf_save_LIBS="$LIBS"
5570     cf_term_lib=""
5571     cf_curs_lib=""
5572
5573     if test ".${cf_cv_ncurses_version:-no}" != .no
5574     then
5575         cf_check_list="ncurses curses cursesX"
5576     else
5577         cf_check_list="cursesX curses ncurses"
5578     fi
5579
5580     # Check for library containing tgoto.  Do this before curses library
5581     # because it may be needed to link the test-case for initscr.
5582     echo "$as_me:5582: checking for tgoto" >&5
5583 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5584 if test "${ac_cv_func_tgoto+set}" = set; then
5585   echo $ECHO_N "(cached) $ECHO_C" >&6
5586 else
5587   cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5590 /* System header to define __stub macros and hopefully few prototypes,
5591     which can conflict with char tgoto (); below.  */
5592 #include <assert.h>
5593 /* Override any gcc2 internal prototype to avoid an error.  */
5594 #ifdef __cplusplus
5595 extern "C"
5596 #endif
5597 /* We use char because int might match the return type of a gcc2
5598    builtin and then its argument prototype would still apply.  */
5599 char tgoto ();
5600 char (*f) ();
5601
5602 int
5603 main ()
5604 {
5605 /* The GNU C library defines this for functions which it implements
5606     to always fail with ENOSYS.  Some functions are actually named
5607     something starting with __ and the normal name is an alias.  */
5608 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5609 choke me
5610 #else
5611 f = tgoto;
5612 #endif
5613
5614   ;
5615   return 0;
5616 }
5617 _ACEOF
5618 rm -f conftest.$ac_objext conftest$ac_exeext
5619 if { (eval echo "$as_me:5619: \"$ac_link\"") >&5
5620   (eval $ac_link) 2>&5
5621   ac_status=$?
5622   echo "$as_me:5622: \$? = $ac_status" >&5
5623   (exit $ac_status); } &&
5624          { ac_try='test -s conftest$ac_exeext'
5625   { (eval echo "$as_me:5625: \"$ac_try\"") >&5
5626   (eval $ac_try) 2>&5
5627   ac_status=$?
5628   echo "$as_me:5628: \$? = $ac_status" >&5
5629   (exit $ac_status); }; }; then
5630   ac_cv_func_tgoto=yes
5631 else
5632   echo "$as_me: failed program was:" >&5
5633 cat conftest.$ac_ext >&5
5634 ac_cv_func_tgoto=no
5635 fi
5636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5637 fi
5638 echo "$as_me:5638: result: $ac_cv_func_tgoto" >&5
5639 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5640 if test $ac_cv_func_tgoto = yes; then
5641   cf_term_lib=predefined
5642 else
5643
5644         for cf_term_lib in $cf_check_list termcap termlib unknown
5645         do
5646             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5647 echo "$as_me:5647: checking for tgoto in -l$cf_term_lib" >&5
5648 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5649 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5650   echo $ECHO_N "(cached) $ECHO_C" >&6
5651 else
5652   ac_check_lib_save_LIBS=$LIBS
5653 LIBS="-l$cf_term_lib  $LIBS"
5654 cat >conftest.$ac_ext <<_ACEOF
5655 #line 5655 "configure"
5656 #include "confdefs.h"
5657
5658 /* Override any gcc2 internal prototype to avoid an error.  */
5659 #ifdef __cplusplus
5660 extern "C"
5661 #endif
5662 /* We use char because int might match the return type of a gcc2
5663    builtin and then its argument prototype would still apply.  */
5664 char tgoto ();
5665 int
5666 main ()
5667 {
5668 tgoto ();
5669   ;
5670   return 0;
5671 }
5672 _ACEOF
5673 rm -f conftest.$ac_objext conftest$ac_exeext
5674 if { (eval echo "$as_me:5674: \"$ac_link\"") >&5
5675   (eval $ac_link) 2>&5
5676   ac_status=$?
5677   echo "$as_me:5677: \$? = $ac_status" >&5
5678   (exit $ac_status); } &&
5679          { ac_try='test -s conftest$ac_exeext'
5680   { (eval echo "$as_me:5680: \"$ac_try\"") >&5
5681   (eval $ac_try) 2>&5
5682   ac_status=$?
5683   echo "$as_me:5683: \$? = $ac_status" >&5
5684   (exit $ac_status); }; }; then
5685   eval "$as_ac_Lib=yes"
5686 else
5687   echo "$as_me: failed program was:" >&5
5688 cat conftest.$ac_ext >&5
5689 eval "$as_ac_Lib=no"
5690 fi
5691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5692 LIBS=$ac_check_lib_save_LIBS
5693 fi
5694 echo "$as_me:5694: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5695 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5696 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5697   break
5698 fi
5699
5700         done
5701
5702 fi
5703
5704     # Check for library containing initscr
5705     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5706         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5707     do
5708         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5709 echo "$as_me:5709: checking for initscr in -l$cf_curs_lib" >&5
5710 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5711 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5712   echo $ECHO_N "(cached) $ECHO_C" >&6
5713 else
5714   ac_check_lib_save_LIBS=$LIBS
5715 LIBS="-l$cf_curs_lib  $LIBS"
5716 cat >conftest.$ac_ext <<_ACEOF
5717 #line 5717 "configure"
5718 #include "confdefs.h"
5719
5720 /* Override any gcc2 internal prototype to avoid an error.  */
5721 #ifdef __cplusplus
5722 extern "C"
5723 #endif
5724 /* We use char because int might match the return type of a gcc2
5725    builtin and then its argument prototype would still apply.  */
5726 char initscr ();
5727 int
5728 main ()
5729 {
5730 initscr ();
5731   ;
5732   return 0;
5733 }
5734 _ACEOF
5735 rm -f conftest.$ac_objext conftest$ac_exeext
5736 if { (eval echo "$as_me:5736: \"$ac_link\"") >&5
5737   (eval $ac_link) 2>&5
5738   ac_status=$?
5739   echo "$as_me:5739: \$? = $ac_status" >&5
5740   (exit $ac_status); } &&
5741          { ac_try='test -s conftest$ac_exeext'
5742   { (eval echo "$as_me:5742: \"$ac_try\"") >&5
5743   (eval $ac_try) 2>&5
5744   ac_status=$?
5745   echo "$as_me:5745: \$? = $ac_status" >&5
5746   (exit $ac_status); }; }; then
5747   eval "$as_ac_Lib=yes"
5748 else
5749   echo "$as_me: failed program was:" >&5
5750 cat conftest.$ac_ext >&5
5751 eval "$as_ac_Lib=no"
5752 fi
5753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5754 LIBS=$ac_check_lib_save_LIBS
5755 fi
5756 echo "$as_me:5756: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5757 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5758 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5759   break
5760 fi
5761
5762     done
5763     test $cf_curs_lib = unknown && { { echo "$as_me:5763: error: no curses library found" >&5
5764 echo "$as_me: error: no curses library found" >&2;}
5765    { (exit 1); exit 1; }; }
5766
5767     LIBS="-l$cf_curs_lib $cf_save_LIBS"
5768     if test "$cf_term_lib" = unknown ; then
5769         echo "$as_me:5769: checking if we can link with $cf_curs_lib library" >&5
5770 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5771         cat >conftest.$ac_ext <<_ACEOF
5772 #line 5772 "configure"
5773 #include "confdefs.h"
5774 #include <${cf_cv_ncurses_header:-curses.h}>
5775 int
5776 main ()
5777 {
5778 initscr()
5779   ;
5780   return 0;
5781 }
5782 _ACEOF
5783 rm -f conftest.$ac_objext conftest$ac_exeext
5784 if { (eval echo "$as_me:5784: \"$ac_link\"") >&5
5785   (eval $ac_link) 2>&5
5786   ac_status=$?
5787   echo "$as_me:5787: \$? = $ac_status" >&5
5788   (exit $ac_status); } &&
5789          { ac_try='test -s conftest$ac_exeext'
5790   { (eval echo "$as_me:5790: \"$ac_try\"") >&5
5791   (eval $ac_try) 2>&5
5792   ac_status=$?
5793   echo "$as_me:5793: \$? = $ac_status" >&5
5794   (exit $ac_status); }; }; then
5795   cf_result=yes
5796 else
5797   echo "$as_me: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5799 cf_result=no
5800 fi
5801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5802         echo "$as_me:5802: result: $cf_result" >&5
5803 echo "${ECHO_T}$cf_result" >&6
5804         test $cf_result = no && { { echo "$as_me:5804: error: Cannot link curses library" >&5
5805 echo "$as_me: error: Cannot link curses library" >&2;}
5806    { (exit 1); exit 1; }; }
5807     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5808         :
5809     elif test "$cf_term_lib" != predefined ; then
5810         echo "$as_me:5810: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5811 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5812         cat >conftest.$ac_ext <<_ACEOF
5813 #line 5813 "configure"
5814 #include "confdefs.h"
5815 #include <${cf_cv_ncurses_header:-curses.h}>
5816 int
5817 main ()
5818 {
5819 initscr(); tgoto((char *)0, 0, 0);
5820   ;
5821   return 0;
5822 }
5823 _ACEOF
5824 rm -f conftest.$ac_objext conftest$ac_exeext
5825 if { (eval echo "$as_me:5825: \"$ac_link\"") >&5
5826   (eval $ac_link) 2>&5
5827   ac_status=$?
5828   echo "$as_me:5828: \$? = $ac_status" >&5
5829   (exit $ac_status); } &&
5830          { ac_try='test -s conftest$ac_exeext'
5831   { (eval echo "$as_me:5831: \"$ac_try\"") >&5
5832   (eval $ac_try) 2>&5
5833   ac_status=$?
5834   echo "$as_me:5834: \$? = $ac_status" >&5
5835   (exit $ac_status); }; }; then
5836   cf_result=no
5837 else
5838   echo "$as_me: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5840
5841             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5842             cat >conftest.$ac_ext <<_ACEOF
5843 #line 5843 "configure"
5844 #include "confdefs.h"
5845 #include <${cf_cv_ncurses_header:-curses.h}>
5846 int
5847 main ()
5848 {
5849 initscr()
5850   ;
5851   return 0;
5852 }
5853 _ACEOF
5854 rm -f conftest.$ac_objext conftest$ac_exeext
5855 if { (eval echo "$as_me:5855: \"$ac_link\"") >&5
5856   (eval $ac_link) 2>&5
5857   ac_status=$?
5858   echo "$as_me:5858: \$? = $ac_status" >&5
5859   (exit $ac_status); } &&
5860          { ac_try='test -s conftest$ac_exeext'
5861   { (eval echo "$as_me:5861: \"$ac_try\"") >&5
5862   (eval $ac_try) 2>&5
5863   ac_status=$?
5864   echo "$as_me:5864: \$? = $ac_status" >&5
5865   (exit $ac_status); }; }; then
5866   cf_result=yes
5867 else
5868   echo "$as_me: failed program was:" >&5
5869 cat conftest.$ac_ext >&5
5870 cf_result=error
5871 fi
5872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5873
5874 fi
5875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5876         echo "$as_me:5876: result: $cf_result" >&5
5877 echo "${ECHO_T}$cf_result" >&6
5878     fi
5879 fi
5880 fi
5881
5882 echo "$as_me:5882: checking for NetBSD form.h" >&5
5883 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
5884 if test "${cf_cv_netbsd_form_h+set}" = set; then
5885   echo $ECHO_N "(cached) $ECHO_C" >&6
5886 else
5887
5888 cat >conftest.$ac_ext <<_ACEOF
5889 #line 5889 "configure"
5890 #include "confdefs.h"
5891
5892 #include <${cf_cv_ncurses_header:-curses.h}>
5893 #include <form.h>
5894
5895 int
5896 main ()
5897 {
5898
5899         FORM *form;
5900         int y = current_field(form)->cursor_ypos;
5901         int x = current_field(form)->cursor_xpos;
5902
5903   ;
5904   return 0;
5905 }
5906 _ACEOF
5907 rm -f conftest.$ac_objext
5908 if { (eval echo "$as_me:5908: \"$ac_compile\"") >&5
5909   (eval $ac_compile) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); } &&
5913          { ac_try='test -s conftest.$ac_objext'
5914   { (eval echo "$as_me:5914: \"$ac_try\"") >&5
5915   (eval $ac_try) 2>&5
5916   ac_status=$?
5917   echo "$as_me:5917: \$? = $ac_status" >&5
5918   (exit $ac_status); }; }; then
5919   cf_cv_netbsd_form_h=yes
5920
5921 else
5922   echo "$as_me: failed program was:" >&5
5923 cat conftest.$ac_ext >&5
5924 cf_cv_netbsd_form_h=no
5925 fi
5926 rm -f conftest.$ac_objext conftest.$ac_ext
5927
5928 fi
5929 echo "$as_me:5929: result: $cf_cv_netbsd_form_h" >&5
5930 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
5931
5932 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
5933 #define HAVE_NETBSD_FORM_H 1
5934 EOF
5935
5936 echo "$as_me:5936: checking for NetBSD menu.h" >&5
5937 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
5938 if test "${cf_cv_netbsd_menu_h+set}" = set; then
5939   echo $ECHO_N "(cached) $ECHO_C" >&6
5940 else
5941
5942 cat >conftest.$ac_ext <<_ACEOF
5943 #line 5943 "configure"
5944 #include "confdefs.h"
5945
5946 #include <${cf_cv_ncurses_header:-curses.h}>
5947 #include <menu.h>
5948
5949 int
5950 main ()
5951 {
5952
5953         MENU *menu;
5954         int y = menu->max_item_width;
5955
5956   ;
5957   return 0;
5958 }
5959 _ACEOF
5960 rm -f conftest.$ac_objext
5961 if { (eval echo "$as_me:5961: \"$ac_compile\"") >&5
5962   (eval $ac_compile) 2>&5
5963   ac_status=$?
5964   echo "$as_me:5964: \$? = $ac_status" >&5
5965   (exit $ac_status); } &&
5966          { ac_try='test -s conftest.$ac_objext'
5967   { (eval echo "$as_me:5967: \"$ac_try\"") >&5
5968   (eval $ac_try) 2>&5
5969   ac_status=$?
5970   echo "$as_me:5970: \$? = $ac_status" >&5
5971   (exit $ac_status); }; }; then
5972   cf_cv_netbsd_menu_h=yes
5973
5974 else
5975   echo "$as_me: failed program was:" >&5
5976 cat conftest.$ac_ext >&5
5977 cf_cv_netbsd_menu_h=no
5978 fi
5979 rm -f conftest.$ac_objext conftest.$ac_ext
5980
5981 fi
5982 echo "$as_me:5982: result: $cf_cv_netbsd_menu_h" >&5
5983 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
5984
5985 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
5986 #define HAVE_NETBSD_MENU_H 1
5987 EOF
5988
5989         ;;
5990 ncurses)
5991
5992 cf_ncuconfig_root=ncurses
5993
5994 echo "Looking for ${cf_ncuconfig_root}-config"
5995 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5996 do
5997   # Extract the first word of "$ac_prog", so it can be a program name with args.
5998 set dummy $ac_prog; ac_word=$2
5999 echo "$as_me:5999: checking for $ac_word" >&5
6000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6001 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
6002   echo $ECHO_N "(cached) $ECHO_C" >&6
6003 else
6004   case $NCURSES_CONFIG in
6005   [\\/]* | ?:[\\/]*)
6006   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
6007   ;;
6008   *)
6009   ac_save_IFS=$IFS; IFS=$ac_path_separator
6010 ac_dummy="$PATH"
6011 for ac_dir in $ac_dummy; do
6012   IFS=$ac_save_IFS
6013   test -z "$ac_dir" && ac_dir=.
6014   if $as_executable_p "$ac_dir/$ac_word"; then
6015    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
6016    echo "$as_me:6016: found $ac_dir/$ac_word" >&5
6017    break
6018 fi
6019 done
6020
6021   ;;
6022 esac
6023 fi
6024 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
6025
6026 if test -n "$NCURSES_CONFIG"; then
6027   echo "$as_me:6027: result: $NCURSES_CONFIG" >&5
6028 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6029 else
6030   echo "$as_me:6030: result: no" >&5
6031 echo "${ECHO_T}no" >&6
6032 fi
6033
6034   test -n "$NCURSES_CONFIG" && break
6035 done
6036 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
6037
6038 if test "$NCURSES_CONFIG" != none ; then
6039
6040 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6041 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6042
6043 # even with config script, some packages use no-override for curses.h
6044
6045 echo "$as_me:6045: checking if we have identified curses headers" >&5
6046 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6047 if test "${cf_cv_ncurses_header+set}" = set; then
6048   echo $ECHO_N "(cached) $ECHO_C" >&6
6049 else
6050
6051 cf_cv_ncurses_header=none
6052 for cf_header in  \
6053     ncurses/ncurses.h \
6054         ncurses/curses.h \
6055         ncurses.h \
6056         curses.h
6057 do
6058 cat >conftest.$ac_ext <<_ACEOF
6059 #line 6059 "configure"
6060 #include "confdefs.h"
6061 #include <${cf_header}>
6062 int
6063 main ()
6064 {
6065 initscr(); tgoto("?", 0,0)
6066   ;
6067   return 0;
6068 }
6069 _ACEOF
6070 rm -f conftest.$ac_objext
6071 if { (eval echo "$as_me:6071: \"$ac_compile\"") >&5
6072   (eval $ac_compile) 2>&5
6073   ac_status=$?
6074   echo "$as_me:6074: \$? = $ac_status" >&5
6075   (exit $ac_status); } &&
6076          { ac_try='test -s conftest.$ac_objext'
6077   { (eval echo "$as_me:6077: \"$ac_try\"") >&5
6078   (eval $ac_try) 2>&5
6079   ac_status=$?
6080   echo "$as_me:6080: \$? = $ac_status" >&5
6081   (exit $ac_status); }; }; then
6082   cf_cv_ncurses_header=$cf_header; break
6083 else
6084   echo "$as_me: failed program was:" >&5
6085 cat conftest.$ac_ext >&5
6086 fi
6087 rm -f conftest.$ac_objext conftest.$ac_ext
6088 done
6089
6090 fi
6091 echo "$as_me:6091: result: $cf_cv_ncurses_header" >&5
6092 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6093
6094 if test "$cf_cv_ncurses_header" = none ; then
6095         { { echo "$as_me:6095: error: No curses header-files found" >&5
6096 echo "$as_me: error: No curses header-files found" >&2;}
6097    { (exit 1); exit 1; }; }
6098 fi
6099
6100 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6101
6102 for ac_header in $cf_cv_ncurses_header
6103 do
6104 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6105 echo "$as_me:6105: checking for $ac_header" >&5
6106 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6107 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6108   echo $ECHO_N "(cached) $ECHO_C" >&6
6109 else
6110   cat >conftest.$ac_ext <<_ACEOF
6111 #line 6111 "configure"
6112 #include "confdefs.h"
6113 #include <$ac_header>
6114 _ACEOF
6115 if { (eval echo "$as_me:6115: \"$ac_cpp conftest.$ac_ext\"") >&5
6116   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6117   ac_status=$?
6118   egrep -v '^ *\+' conftest.er1 >conftest.err
6119   rm -f conftest.er1
6120   cat conftest.err >&5
6121   echo "$as_me:6121: \$? = $ac_status" >&5
6122   (exit $ac_status); } >/dev/null; then
6123   if test -s conftest.err; then
6124     ac_cpp_err=$ac_c_preproc_warn_flag
6125   else
6126     ac_cpp_err=
6127   fi
6128 else
6129   ac_cpp_err=yes
6130 fi
6131 if test -z "$ac_cpp_err"; then
6132   eval "$as_ac_Header=yes"
6133 else
6134   echo "$as_me: failed program was:" >&5
6135   cat conftest.$ac_ext >&5
6136   eval "$as_ac_Header=no"
6137 fi
6138 rm -f conftest.err conftest.$ac_ext
6139 fi
6140 echo "$as_me:6140: result: `eval echo '${'$as_ac_Header'}'`" >&5
6141 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6142 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6143   cat >>confdefs.h <<EOF
6144 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6145 EOF
6146
6147 fi
6148 done
6149
6150 cat >>confdefs.h <<\EOF
6151 #define NCURSES 1
6152 EOF
6153
6154 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6155
6156 cat >>confdefs.h <<EOF
6157 #define $cf_nculib_ROOT 1
6158 EOF
6159
6160 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6161
6162 else
6163
6164 cf_ncuhdr_root=ncurses
6165
6166 test -n "$cf_cv_curses_dir" && \
6167 test "$cf_cv_curses_dir" != "no" && { \
6168
6169 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6170   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6171   do
6172         while test $cf_add_incdir != /usr/include
6173         do
6174           if test -d $cf_add_incdir
6175           then
6176                 cf_have_incdir=no
6177                 if test -n "$CFLAGS$CPPFLAGS" ; then
6178                   # a loop is needed to ensure we can add subdirs of existing dirs
6179                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6180                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6181                           cf_have_incdir=yes; break
6182                         fi
6183                   done
6184                 fi
6185
6186                 if test "$cf_have_incdir" = no ; then
6187                   if test "$cf_add_incdir" = /usr/local/include ; then
6188                         if test "$GCC" = yes
6189                         then
6190                           cf_save_CPPFLAGS=$CPPFLAGS
6191                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6192                           cat >conftest.$ac_ext <<_ACEOF
6193 #line 6193 "configure"
6194 #include "confdefs.h"
6195 #include <stdio.h>
6196 int
6197 main ()
6198 {
6199 printf("Hello")
6200   ;
6201   return 0;
6202 }
6203 _ACEOF
6204 rm -f conftest.$ac_objext
6205 if { (eval echo "$as_me:6205: \"$ac_compile\"") >&5
6206   (eval $ac_compile) 2>&5
6207   ac_status=$?
6208   echo "$as_me:6208: \$? = $ac_status" >&5
6209   (exit $ac_status); } &&
6210          { ac_try='test -s conftest.$ac_objext'
6211   { (eval echo "$as_me:6211: \"$ac_try\"") >&5
6212   (eval $ac_try) 2>&5
6213   ac_status=$?
6214   echo "$as_me:6214: \$? = $ac_status" >&5
6215   (exit $ac_status); }; }; then
6216   :
6217 else
6218   echo "$as_me: failed program was:" >&5
6219 cat conftest.$ac_ext >&5
6220 cf_have_incdir=yes
6221 fi
6222 rm -f conftest.$ac_objext conftest.$ac_ext
6223                           CPPFLAGS=$cf_save_CPPFLAGS
6224                         fi
6225                   fi
6226                 fi
6227
6228                 if test "$cf_have_incdir" = no ; then
6229                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6230
6231 echo "${as_me:-configure}:6231: testing adding $cf_add_incdir to include-path ..." 1>&5
6232
6233                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6234
6235                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6236                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6237                   cf_add_incdir="$cf_top_incdir"
6238                 else
6239                   break
6240                 fi
6241           fi
6242         done
6243   done
6244 fi
6245
6246 }
6247
6248 echo "$as_me:6248: checking for $cf_ncuhdr_root header in include-path" >&5
6249 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6250 if test "${cf_cv_ncurses_h+set}" = set; then
6251   echo $ECHO_N "(cached) $ECHO_C" >&6
6252 else
6253
6254         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6255         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6256         for cf_header in $cf_header_list
6257         do
6258
6259         cat >conftest.$ac_ext <<_ACEOF
6260 #line 6260 "configure"
6261 #include "confdefs.h"
6262
6263 #include <$cf_header>
6264 int
6265 main ()
6266 {
6267
6268 #ifdef NCURSES_VERSION
6269
6270 printf("%s\n", NCURSES_VERSION);
6271 #else
6272 #ifdef __NCURSES_H
6273 printf("old\n");
6274 #else
6275         make an error
6276 #endif
6277 #endif
6278
6279   ;
6280   return 0;
6281 }
6282 _ACEOF
6283 rm -f conftest.$ac_objext
6284 if { (eval echo "$as_me:6284: \"$ac_compile\"") >&5
6285   (eval $ac_compile) 2>&5
6286   ac_status=$?
6287   echo "$as_me:6287: \$? = $ac_status" >&5
6288   (exit $ac_status); } &&
6289          { ac_try='test -s conftest.$ac_objext'
6290   { (eval echo "$as_me:6290: \"$ac_try\"") >&5
6291   (eval $ac_try) 2>&5
6292   ac_status=$?
6293   echo "$as_me:6293: \$? = $ac_status" >&5
6294   (exit $ac_status); }; }; then
6295   cf_cv_ncurses_h=$cf_header
6296
6297 else
6298   echo "$as_me: failed program was:" >&5
6299 cat conftest.$ac_ext >&5
6300 cf_cv_ncurses_h=no
6301 fi
6302 rm -f conftest.$ac_objext conftest.$ac_ext
6303
6304                 test "$cf_cv_ncurses_h" != no && break
6305         done
6306
6307 fi
6308 echo "$as_me:6308: result: $cf_cv_ncurses_h" >&5
6309 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6310
6311 if test "$cf_cv_ncurses_h" != no ; then
6312         cf_cv_ncurses_header=$cf_cv_ncurses_h
6313 else
6314
6315 echo "$as_me:6315: checking for $cf_ncuhdr_root include-path" >&5
6316 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6317 if test "${cf_cv_ncurses_h2+set}" = set; then
6318   echo $ECHO_N "(cached) $ECHO_C" >&6
6319 else
6320
6321         test -n "$verbose" && echo
6322
6323 cf_search=
6324
6325 # collect the current set of include-directories from compiler flags
6326 cf_header_path_list=""
6327 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6328         for cf_header_path in $CPPFLAGS $CFLAGS
6329         do
6330                 case $cf_header_path in #(vi
6331                 -I*)
6332                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6333
6334 test "$cf_header_path" != "NONE" && \
6335 test -d "$cf_header_path" && \
6336  {
6337         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6338         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6339         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6340         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6341         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6342         test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6343 }
6344
6345                         cf_header_path_list="$cf_header_path_list $cf_search"
6346                         ;;
6347                 esac
6348         done
6349 fi
6350
6351 # add the variations for the package we are looking for
6352
6353 cf_search=
6354
6355 test "/usr" != "$prefix" && \
6356 test -d "/usr" && \
6357 (test $prefix = NONE || test "/usr" != "$prefix") && {
6358         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6359         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6360         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6361         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6362         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6363         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6364 }
6365
6366 test "$prefix" != "NONE" && \
6367 test -d "$prefix" && \
6368  {
6369         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6370         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6371         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6372         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6373         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6374         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6375 }
6376
6377 test "/usr/local" != "$prefix" && \
6378 test -d "/usr/local" && \
6379 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6380         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6381         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6382         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6383         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6384         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6385         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6386 }
6387
6388 test "/opt" != "$prefix" && \
6389 test -d "/opt" && \
6390 (test $prefix = NONE || test "/opt" != "$prefix") && {
6391         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6392         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6393         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6394         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6395         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6396         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6397 }
6398
6399 test "$HOME" != "$prefix" && \
6400 test -d "$HOME" && \
6401 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6402         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6403         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6404         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6405         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6406         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6407         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6408 }
6409
6410 test "$includedir" != NONE && \
6411 test "$includedir" != "/usr/include" && \
6412 test -d "$includedir" && {
6413         test -d $includedir &&    cf_search="$cf_search $includedir"
6414         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6415 }
6416
6417 test "$oldincludedir" != NONE && \
6418 test "$oldincludedir" != "/usr/include" && \
6419 test -d "$oldincludedir" && {
6420         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6421         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6422 }
6423
6424 cf_search="$cf_search $cf_header_path_list"
6425
6426         test -n "$verbose" && echo search path $cf_search
6427         cf_save2_CPPFLAGS="$CPPFLAGS"
6428         for cf_incdir in $cf_search
6429         do
6430
6431 if test -n "$cf_incdir" ; then
6432   for cf_add_incdir in $cf_incdir
6433   do
6434         while test $cf_add_incdir != /usr/include
6435         do
6436           if test -d $cf_add_incdir
6437           then
6438                 cf_have_incdir=no
6439                 if test -n "$CFLAGS$CPPFLAGS" ; then
6440                   # a loop is needed to ensure we can add subdirs of existing dirs
6441                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6442                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6443                           cf_have_incdir=yes; break
6444                         fi
6445                   done
6446                 fi
6447
6448                 if test "$cf_have_incdir" = no ; then
6449                   if test "$cf_add_incdir" = /usr/local/include ; then
6450                         if test "$GCC" = yes
6451                         then
6452                           cf_save_CPPFLAGS=$CPPFLAGS
6453                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6454                           cat >conftest.$ac_ext <<_ACEOF
6455 #line 6455 "configure"
6456 #include "confdefs.h"
6457 #include <stdio.h>
6458 int
6459 main ()
6460 {
6461 printf("Hello")
6462   ;
6463   return 0;
6464 }
6465 _ACEOF
6466 rm -f conftest.$ac_objext
6467 if { (eval echo "$as_me:6467: \"$ac_compile\"") >&5
6468   (eval $ac_compile) 2>&5
6469   ac_status=$?
6470   echo "$as_me:6470: \$? = $ac_status" >&5
6471   (exit $ac_status); } &&
6472          { ac_try='test -s conftest.$ac_objext'
6473   { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474   (eval $ac_try) 2>&5
6475   ac_status=$?
6476   echo "$as_me:6476: \$? = $ac_status" >&5
6477   (exit $ac_status); }; }; then
6478   :
6479 else
6480   echo "$as_me: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 cf_have_incdir=yes
6483 fi
6484 rm -f conftest.$ac_objext conftest.$ac_ext
6485                           CPPFLAGS=$cf_save_CPPFLAGS
6486                         fi
6487                   fi
6488                 fi
6489
6490                 if test "$cf_have_incdir" = no ; then
6491                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6492
6493 echo "${as_me:-configure}:6493: testing adding $cf_add_incdir to include-path ..." 1>&5
6494
6495                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6496
6497                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6498                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6499                   cf_add_incdir="$cf_top_incdir"
6500                 else
6501                   break
6502                 fi
6503           fi
6504         done
6505   done
6506 fi
6507
6508                 for cf_header in \
6509                         ncurses.h \
6510                         curses.h
6511                 do
6512
6513         cat >conftest.$ac_ext <<_ACEOF
6514 #line 6514 "configure"
6515 #include "confdefs.h"
6516
6517 #include <$cf_header>
6518 int
6519 main ()
6520 {
6521
6522 #ifdef NCURSES_VERSION
6523
6524 printf("%s\n", NCURSES_VERSION);
6525 #else
6526 #ifdef __NCURSES_H
6527 printf("old\n");
6528 #else
6529         make an error
6530 #endif
6531 #endif
6532
6533   ;
6534   return 0;
6535 }
6536 _ACEOF
6537 rm -f conftest.$ac_objext
6538 if { (eval echo "$as_me:6538: \"$ac_compile\"") >&5
6539   (eval $ac_compile) 2>&5
6540   ac_status=$?
6541   echo "$as_me:6541: \$? = $ac_status" >&5
6542   (exit $ac_status); } &&
6543          { ac_try='test -s conftest.$ac_objext'
6544   { (eval echo "$as_me:6544: \"$ac_try\"") >&5
6545   (eval $ac_try) 2>&5
6546   ac_status=$?
6547   echo "$as_me:6547: \$? = $ac_status" >&5
6548   (exit $ac_status); }; }; then
6549   cf_cv_ncurses_h2=$cf_header
6550
6551 else
6552   echo "$as_me: failed program was:" >&5
6553 cat conftest.$ac_ext >&5
6554 cf_cv_ncurses_h2=no
6555 fi
6556 rm -f conftest.$ac_objext conftest.$ac_ext
6557
6558                         if test "$cf_cv_ncurses_h2" != no ; then
6559                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6560                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6561                                 break
6562                         fi
6563                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6564                 done
6565                 CPPFLAGS="$cf_save2_CPPFLAGS"
6566                 test "$cf_cv_ncurses_h2" != no && break
6567         done
6568         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6568: error: not found" >&5
6569 echo "$as_me: error: not found" >&2;}
6570    { (exit 1); exit 1; }; }
6571
6572 fi
6573 echo "$as_me:6573: result: $cf_cv_ncurses_h2" >&5
6574 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6575
6576         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6577         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6578         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6579                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6580         fi
6581
6582 if test -n "$cf_1st_incdir" ; then
6583   for cf_add_incdir in $cf_1st_incdir
6584   do
6585         while test $cf_add_incdir != /usr/include
6586         do
6587           if test -d $cf_add_incdir
6588           then
6589                 cf_have_incdir=no
6590                 if test -n "$CFLAGS$CPPFLAGS" ; then
6591                   # a loop is needed to ensure we can add subdirs of existing dirs
6592                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6593                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6594                           cf_have_incdir=yes; break
6595                         fi
6596                   done
6597                 fi
6598
6599                 if test "$cf_have_incdir" = no ; then
6600                   if test "$cf_add_incdir" = /usr/local/include ; then
6601                         if test "$GCC" = yes
6602                         then
6603                           cf_save_CPPFLAGS=$CPPFLAGS
6604                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6605                           cat >conftest.$ac_ext <<_ACEOF
6606 #line 6606 "configure"
6607 #include "confdefs.h"
6608 #include <stdio.h>
6609 int
6610 main ()
6611 {
6612 printf("Hello")
6613   ;
6614   return 0;
6615 }
6616 _ACEOF
6617 rm -f conftest.$ac_objext
6618 if { (eval echo "$as_me:6618: \"$ac_compile\"") >&5
6619   (eval $ac_compile) 2>&5
6620   ac_status=$?
6621   echo "$as_me:6621: \$? = $ac_status" >&5
6622   (exit $ac_status); } &&
6623          { ac_try='test -s conftest.$ac_objext'
6624   { (eval echo "$as_me:6624: \"$ac_try\"") >&5
6625   (eval $ac_try) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit $ac_status); }; }; then
6629   :
6630 else
6631   echo "$as_me: failed program was:" >&5
6632 cat conftest.$ac_ext >&5
6633 cf_have_incdir=yes
6634 fi
6635 rm -f conftest.$ac_objext conftest.$ac_ext
6636                           CPPFLAGS=$cf_save_CPPFLAGS
6637                         fi
6638                   fi
6639                 fi
6640
6641                 if test "$cf_have_incdir" = no ; then
6642                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6643
6644 echo "${as_me:-configure}:6644: testing adding $cf_add_incdir to include-path ..." 1>&5
6645
6646                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6647
6648                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6649                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6650                   cf_add_incdir="$cf_top_incdir"
6651                 else
6652                   break
6653                 fi
6654           fi
6655         done
6656   done
6657 fi
6658
6659 fi
6660
6661 # Set definitions to allow ifdef'ing for ncurses.h
6662
6663 case $cf_cv_ncurses_header in # (vi
6664 *ncurses.h)
6665         cat >>confdefs.h <<\EOF
6666 #define HAVE_NCURSES_H 1
6667 EOF
6668
6669         ;;
6670 esac
6671
6672 case $cf_cv_ncurses_header in # (vi
6673 ncurses/curses.h|ncurses/ncurses.h)
6674         cat >>confdefs.h <<\EOF
6675 #define HAVE_NCURSES_NCURSES_H 1
6676 EOF
6677
6678         ;;
6679 ncursesw/curses.h|ncursesw/ncurses.h)
6680         cat >>confdefs.h <<\EOF
6681 #define HAVE_NCURSESW_NCURSES_H 1
6682 EOF
6683
6684         ;;
6685 esac
6686
6687 echo "$as_me:6687: checking for terminfo header" >&5
6688 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6689 if test "${cf_cv_term_header+set}" = set; then
6690   echo $ECHO_N "(cached) $ECHO_C" >&6
6691 else
6692
6693 case ${cf_cv_ncurses_header} in #(vi
6694 */ncurses.h|*/ncursesw.h) #(vi
6695         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6696         ;;
6697 *)
6698         cf_term_header=term.h
6699         ;;
6700 esac
6701
6702 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6703 do
6704 cat >conftest.$ac_ext <<_ACEOF
6705 #line 6705 "configure"
6706 #include "confdefs.h"
6707 #include <stdio.h>
6708 #include <${cf_cv_ncurses_header:-curses.h}>
6709 #include <$cf_test>
6710
6711 int
6712 main ()
6713 {
6714 int x = auto_left_margin
6715   ;
6716   return 0;
6717 }
6718 _ACEOF
6719 rm -f conftest.$ac_objext
6720 if { (eval echo "$as_me:6720: \"$ac_compile\"") >&5
6721   (eval $ac_compile) 2>&5
6722   ac_status=$?
6723   echo "$as_me:6723: \$? = $ac_status" >&5
6724   (exit $ac_status); } &&
6725          { ac_try='test -s conftest.$ac_objext'
6726   { (eval echo "$as_me:6726: \"$ac_try\"") >&5
6727   (eval $ac_try) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); }; }; then
6731
6732         cf_cv_term_header="$cf_test"
6733 else
6734   echo "$as_me: failed program was:" >&5
6735 cat conftest.$ac_ext >&5
6736
6737         cf_cv_term_header=unknown
6738
6739 fi
6740 rm -f conftest.$ac_objext conftest.$ac_ext
6741         test "$cf_cv_term_header" != unknown && break
6742 done
6743
6744 fi
6745 echo "$as_me:6745: result: $cf_cv_term_header" >&5
6746 echo "${ECHO_T}$cf_cv_term_header" >&6
6747
6748 # Set definitions to allow ifdef'ing to accommodate subdirectories
6749
6750 case $cf_cv_term_header in # (vi
6751 *term.h)
6752         cat >>confdefs.h <<\EOF
6753 #define HAVE_TERM_H 1
6754 EOF
6755
6756         ;;
6757 esac
6758
6759 case $cf_cv_term_header in # (vi
6760 ncurses/term.h) #(vi
6761         cat >>confdefs.h <<\EOF
6762 #define HAVE_NCURSES_TERM_H 1
6763 EOF
6764
6765         ;;
6766 ncursesw/term.h)
6767         cat >>confdefs.h <<\EOF
6768 #define HAVE_NCURSESW_TERM_H 1
6769 EOF
6770
6771         ;;
6772 esac
6773
6774 # some applications need this, but should check for NCURSES_VERSION
6775 cat >>confdefs.h <<\EOF
6776 #define NCURSES 1
6777 EOF
6778
6779 echo "$as_me:6779: checking for ncurses version" >&5
6780 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6781 if test "${cf_cv_ncurses_version+set}" = set; then
6782   echo $ECHO_N "(cached) $ECHO_C" >&6
6783 else
6784
6785         cf_cv_ncurses_version=no
6786         cf_tempfile=out$$
6787         rm -f $cf_tempfile
6788         if test "$cross_compiling" = yes; then
6789
6790         # This will not work if the preprocessor splits the line after the
6791         # Autoconf token.  The 'unproto' program does that.
6792         cat > conftest.$ac_ext <<EOF
6793 #include <${cf_cv_ncurses_header:-curses.h}>
6794 #undef Autoconf
6795 #ifdef NCURSES_VERSION
6796 Autoconf NCURSES_VERSION
6797 #else
6798 #ifdef __NCURSES_H
6799 Autoconf "old"
6800 #endif
6801 ;
6802 #endif
6803 EOF
6804         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6805         { (eval echo "$as_me:6805: \"$cf_try\"") >&5
6806   (eval $cf_try) 2>&5
6807   ac_status=$?
6808   echo "$as_me:6808: \$? = $ac_status" >&5
6809   (exit $ac_status); }
6810         if test -f conftest.out ; then
6811                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6812                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6813                 rm -f conftest.out
6814         fi
6815
6816 else
6817   cat >conftest.$ac_ext <<_ACEOF
6818 #line 6818 "configure"
6819 #include "confdefs.h"
6820
6821 #include <${cf_cv_ncurses_header:-curses.h}>
6822 #include <stdio.h>
6823 int main()
6824 {
6825         FILE *fp = fopen("$cf_tempfile", "w");
6826 #ifdef NCURSES_VERSION
6827 # ifdef NCURSES_VERSION_PATCH
6828         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6829 # else
6830         fprintf(fp, "%s\n", NCURSES_VERSION);
6831 # endif
6832 #else
6833 # ifdef __NCURSES_H
6834         fprintf(fp, "old\n");
6835 # else
6836         make an error
6837 # endif
6838 #endif
6839         ${cf_cv_main_return:-return}(0);
6840 }
6841 _ACEOF
6842 rm -f conftest$ac_exeext
6843 if { (eval echo "$as_me:6843: \"$ac_link\"") >&5
6844   (eval $ac_link) 2>&5
6845   ac_status=$?
6846   echo "$as_me:6846: \$? = $ac_status" >&5
6847   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6848   { (eval echo "$as_me:6848: \"$ac_try\"") >&5
6849   (eval $ac_try) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); }; }; then
6853
6854         cf_cv_ncurses_version=`cat $cf_tempfile`
6855 else
6856   echo "$as_me: program exited with status $ac_status" >&5
6857 echo "$as_me: failed program was:" >&5
6858 cat conftest.$ac_ext >&5
6859 fi
6860 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6861 fi
6862         rm -f $cf_tempfile
6863
6864 fi
6865 echo "$as_me:6865: result: $cf_cv_ncurses_version" >&5
6866 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6867 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6868 #define NCURSES 1
6869 EOF
6870
6871 cf_nculib_root=ncurses
6872         # This works, except for the special case where we find gpm, but
6873         # ncurses is in a nonstandard location via $LIBS, and we really want
6874         # to link gpm.
6875 cf_ncurses_LIBS=""
6876 cf_ncurses_SAVE="$LIBS"
6877 echo "$as_me:6877: checking for Gpm_Open in -lgpm" >&5
6878 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6879 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6880   echo $ECHO_N "(cached) $ECHO_C" >&6
6881 else
6882   ac_check_lib_save_LIBS=$LIBS
6883 LIBS="-lgpm  $LIBS"
6884 cat >conftest.$ac_ext <<_ACEOF
6885 #line 6885 "configure"
6886 #include "confdefs.h"
6887
6888 /* Override any gcc2 internal prototype to avoid an error.  */
6889 #ifdef __cplusplus
6890 extern "C"
6891 #endif
6892 /* We use char because int might match the return type of a gcc2
6893    builtin and then its argument prototype would still apply.  */
6894 char Gpm_Open ();
6895 int
6896 main ()
6897 {
6898 Gpm_Open ();
6899   ;
6900   return 0;
6901 }
6902 _ACEOF
6903 rm -f conftest.$ac_objext conftest$ac_exeext
6904 if { (eval echo "$as_me:6904: \"$ac_link\"") >&5
6905   (eval $ac_link) 2>&5
6906   ac_status=$?
6907   echo "$as_me:6907: \$? = $ac_status" >&5
6908   (exit $ac_status); } &&
6909          { ac_try='test -s conftest$ac_exeext'
6910   { (eval echo "$as_me:6910: \"$ac_try\"") >&5
6911   (eval $ac_try) 2>&5
6912   ac_status=$?
6913   echo "$as_me:6913: \$? = $ac_status" >&5
6914   (exit $ac_status); }; }; then
6915   ac_cv_lib_gpm_Gpm_Open=yes
6916 else
6917   echo "$as_me: failed program was:" >&5
6918 cat conftest.$ac_ext >&5
6919 ac_cv_lib_gpm_Gpm_Open=no
6920 fi
6921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6922 LIBS=$ac_check_lib_save_LIBS
6923 fi
6924 echo "$as_me:6924: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6925 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6926 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6927   echo "$as_me:6927: checking for initscr in -lgpm" >&5
6928 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6929 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6930   echo $ECHO_N "(cached) $ECHO_C" >&6
6931 else
6932   ac_check_lib_save_LIBS=$LIBS
6933 LIBS="-lgpm  $LIBS"
6934 cat >conftest.$ac_ext <<_ACEOF
6935 #line 6935 "configure"
6936 #include "confdefs.h"
6937
6938 /* Override any gcc2 internal prototype to avoid an error.  */
6939 #ifdef __cplusplus
6940 extern "C"
6941 #endif
6942 /* We use char because int might match the return type of a gcc2
6943    builtin and then its argument prototype would still apply.  */
6944 char initscr ();
6945 int
6946 main ()
6947 {
6948 initscr ();
6949   ;
6950   return 0;
6951 }
6952 _ACEOF
6953 rm -f conftest.$ac_objext conftest$ac_exeext
6954 if { (eval echo "$as_me:6954: \"$ac_link\"") >&5
6955   (eval $ac_link) 2>&5
6956   ac_status=$?
6957   echo "$as_me:6957: \$? = $ac_status" >&5
6958   (exit $ac_status); } &&
6959          { ac_try='test -s conftest$ac_exeext'
6960   { (eval echo "$as_me:6960: \"$ac_try\"") >&5
6961   (eval $ac_try) 2>&5
6962   ac_status=$?
6963   echo "$as_me:6963: \$? = $ac_status" >&5
6964   (exit $ac_status); }; }; then
6965   ac_cv_lib_gpm_initscr=yes
6966 else
6967   echo "$as_me: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6969 ac_cv_lib_gpm_initscr=no
6970 fi
6971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6972 LIBS=$ac_check_lib_save_LIBS
6973 fi
6974 echo "$as_me:6974: result: $ac_cv_lib_gpm_initscr" >&5
6975 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6976 if test $ac_cv_lib_gpm_initscr = yes; then
6977   LIBS="$cf_ncurses_SAVE"
6978 else
6979   cf_ncurses_LIBS="-lgpm"
6980 fi
6981
6982 fi
6983
6984 case $host_os in #(vi
6985 freebsd*)
6986         # This is only necessary if you are linking against an obsolete
6987         # version of ncurses (but it should do no harm, since it's static).
6988         if test "$cf_nculib_root" = ncurses ; then
6989                 echo "$as_me:6989: checking for tgoto in -lmytinfo" >&5
6990 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6991 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6992   echo $ECHO_N "(cached) $ECHO_C" >&6
6993 else
6994   ac_check_lib_save_LIBS=$LIBS
6995 LIBS="-lmytinfo  $LIBS"
6996 cat >conftest.$ac_ext <<_ACEOF
6997 #line 6997 "configure"
6998 #include "confdefs.h"
6999
7000 /* Override any gcc2 internal prototype to avoid an error.  */
7001 #ifdef __cplusplus
7002 extern "C"
7003 #endif
7004 /* We use char because int might match the return type of a gcc2
7005    builtin and then its argument prototype would still apply.  */
7006 char tgoto ();
7007 int
7008 main ()
7009 {
7010 tgoto ();
7011   ;
7012   return 0;
7013 }
7014 _ACEOF
7015 rm -f conftest.$ac_objext conftest$ac_exeext
7016 if { (eval echo "$as_me:7016: \"$ac_link\"") >&5
7017   (eval $ac_link) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); } &&
7021          { ac_try='test -s conftest$ac_exeext'
7022   { (eval echo "$as_me:7022: \"$ac_try\"") >&5
7023   (eval $ac_try) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); }; }; then
7027   ac_cv_lib_mytinfo_tgoto=yes
7028 else
7029   echo "$as_me: failed program was:" >&5
7030 cat conftest.$ac_ext >&5
7031 ac_cv_lib_mytinfo_tgoto=no
7032 fi
7033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7034 LIBS=$ac_check_lib_save_LIBS
7035 fi
7036 echo "$as_me:7036: result: $ac_cv_lib_mytinfo_tgoto" >&5
7037 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7038 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7039   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7040 fi
7041
7042         fi
7043         ;;
7044 esac
7045
7046 LIBS="$cf_ncurses_LIBS $LIBS"
7047
7048 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7049 then
7050         LIBS="-l$cf_nculib_root $LIBS"
7051 else
7052
7053         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7054         cf_libdir=""
7055         echo "$as_me:7055: checking for initscr" >&5
7056 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7057 if test "${ac_cv_func_initscr+set}" = set; then
7058   echo $ECHO_N "(cached) $ECHO_C" >&6
7059 else
7060   cat >conftest.$ac_ext <<_ACEOF
7061 #line 7061 "configure"
7062 #include "confdefs.h"
7063 /* System header to define __stub macros and hopefully few prototypes,
7064     which can conflict with char initscr (); below.  */
7065 #include <assert.h>
7066 /* Override any gcc2 internal prototype to avoid an error.  */
7067 #ifdef __cplusplus
7068 extern "C"
7069 #endif
7070 /* We use char because int might match the return type of a gcc2
7071    builtin and then its argument prototype would still apply.  */
7072 char initscr ();
7073 char (*f) ();
7074
7075 int
7076 main ()
7077 {
7078 /* The GNU C library defines this for functions which it implements
7079     to always fail with ENOSYS.  Some functions are actually named
7080     something starting with __ and the normal name is an alias.  */
7081 #if defined (__stub_initscr) || defined (__stub___initscr)
7082 choke me
7083 #else
7084 f = initscr;
7085 #endif
7086
7087   ;
7088   return 0;
7089 }
7090 _ACEOF
7091 rm -f conftest.$ac_objext conftest$ac_exeext
7092 if { (eval echo "$as_me:7092: \"$ac_link\"") >&5
7093   (eval $ac_link) 2>&5
7094   ac_status=$?
7095   echo "$as_me:7095: \$? = $ac_status" >&5
7096   (exit $ac_status); } &&
7097          { ac_try='test -s conftest$ac_exeext'
7098   { (eval echo "$as_me:7098: \"$ac_try\"") >&5
7099   (eval $ac_try) 2>&5
7100   ac_status=$?
7101   echo "$as_me:7101: \$? = $ac_status" >&5
7102   (exit $ac_status); }; }; then
7103   ac_cv_func_initscr=yes
7104 else
7105   echo "$as_me: failed program was:" >&5
7106 cat conftest.$ac_ext >&5
7107 ac_cv_func_initscr=no
7108 fi
7109 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7110 fi
7111 echo "$as_me:7111: result: $ac_cv_func_initscr" >&5
7112 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7113 if test $ac_cv_func_initscr = yes; then
7114   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7115 else
7116
7117                 cf_save_LIBS="$LIBS"
7118                 echo "$as_me:7118: checking for initscr in -l$cf_nculib_root" >&5
7119 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7120                 LIBS="-l$cf_nculib_root $LIBS"
7121                 cat >conftest.$ac_ext <<_ACEOF
7122 #line 7122 "configure"
7123 #include "confdefs.h"
7124 #include <${cf_cv_ncurses_header:-curses.h}>
7125 int
7126 main ()
7127 {
7128 initscr()
7129   ;
7130   return 0;
7131 }
7132 _ACEOF
7133 rm -f conftest.$ac_objext conftest$ac_exeext
7134 if { (eval echo "$as_me:7134: \"$ac_link\"") >&5
7135   (eval $ac_link) 2>&5
7136   ac_status=$?
7137   echo "$as_me:7137: \$? = $ac_status" >&5
7138   (exit $ac_status); } &&
7139          { ac_try='test -s conftest$ac_exeext'
7140   { (eval echo "$as_me:7140: \"$ac_try\"") >&5
7141   (eval $ac_try) 2>&5
7142   ac_status=$?
7143   echo "$as_me:7143: \$? = $ac_status" >&5
7144   (exit $ac_status); }; }; then
7145   echo "$as_me:7145: result: yes" >&5
7146 echo "${ECHO_T}yes" >&6
7147                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7148
7149 else
7150   echo "$as_me: failed program was:" >&5
7151 cat conftest.$ac_ext >&5
7152 echo "$as_me:7152: result: no" >&5
7153 echo "${ECHO_T}no" >&6
7154
7155 cf_search=
7156 cf_library_path_list=""
7157 if test -n "${LDFLAGS}${LIBS}" ; then
7158         for cf_library_path in $LDFLAGS $LIBS
7159         do
7160                 case $cf_library_path in #(vi
7161                 -L*)
7162                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7163
7164 test "$cf_library_path" != "NONE" && \
7165 test -d "$cf_library_path" && \
7166  {
7167         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7168         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7169         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7170         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7171         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7172         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
7173 }
7174
7175                         cf_library_path_list="$cf_library_path_list $cf_search"
7176                         ;;
7177                 esac
7178         done
7179 fi
7180
7181 cf_search=
7182
7183 test "/usr" != "$prefix" && \
7184 test -d "/usr" && \
7185 (test $prefix = NONE || test "/usr" != "$prefix") && {
7186         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7187         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7188         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7189         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7190         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7191         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7192 }
7193
7194 test "$prefix" != "NONE" && \
7195 test -d "$prefix" && \
7196  {
7197         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7198         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7199         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7200         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7201         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7202         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7203 }
7204
7205 test "/usr/local" != "$prefix" && \
7206 test -d "/usr/local" && \
7207 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7208         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7209         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7210         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7211         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7212         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7213         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7214 }
7215
7216 test "/opt" != "$prefix" && \
7217 test -d "/opt" && \
7218 (test $prefix = NONE || test "/opt" != "$prefix") && {
7219         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7220         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7221         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7222         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7223         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7224         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7225 }
7226
7227 test "$HOME" != "$prefix" && \
7228 test -d "$HOME" && \
7229 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7230         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7231         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7232         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7233         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7234         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7235         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7236 }
7237
7238 cf_search="$cf_library_path_list $cf_search"
7239
7240                         for cf_libdir in $cf_search
7241                         do
7242                                 echo "$as_me:7242: checking for -l$cf_nculib_root in $cf_libdir" >&5
7243 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7244                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7245                                 cat >conftest.$ac_ext <<_ACEOF
7246 #line 7246 "configure"
7247 #include "confdefs.h"
7248 #include <${cf_cv_ncurses_header:-curses.h}>
7249 int
7250 main ()
7251 {
7252 initscr()
7253   ;
7254   return 0;
7255 }
7256 _ACEOF
7257 rm -f conftest.$ac_objext conftest$ac_exeext
7258 if { (eval echo "$as_me:7258: \"$ac_link\"") >&5
7259   (eval $ac_link) 2>&5
7260   ac_status=$?
7261   echo "$as_me:7261: \$? = $ac_status" >&5
7262   (exit $ac_status); } &&
7263          { ac_try='test -s conftest$ac_exeext'
7264   { (eval echo "$as_me:7264: \"$ac_try\"") >&5
7265   (eval $ac_try) 2>&5
7266   ac_status=$?
7267   echo "$as_me:7267: \$? = $ac_status" >&5
7268   (exit $ac_status); }; }; then
7269   echo "$as_me:7269: result: yes" >&5
7270 echo "${ECHO_T}yes" >&6
7271                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7272                                          break
7273 else
7274   echo "$as_me: failed program was:" >&5
7275 cat conftest.$ac_ext >&5
7276 echo "$as_me:7276: result: no" >&5
7277 echo "${ECHO_T}no" >&6
7278                                          LIBS="$cf_save_LIBS"
7279 fi
7280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7281                         done
7282
7283 fi
7284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7285
7286 fi
7287
7288 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7289
7290 if test $cf_found_library = no ; then
7291         { { echo "$as_me:7291: error: Cannot link $cf_nculib_root library" >&5
7292 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7293    { (exit 1); exit 1; }; }
7294 fi
7295
7296 fi
7297
7298 if test -n "$cf_ncurses_LIBS" ; then
7299         echo "$as_me:7299: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7300 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7301         cf_ncurses_SAVE="$LIBS"
7302         for p in $cf_ncurses_LIBS ; do
7303                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7304                 if test "$q" != "$LIBS" ; then
7305                         LIBS="$q"
7306                 fi
7307         done
7308         cat >conftest.$ac_ext <<_ACEOF
7309 #line 7309 "configure"
7310 #include "confdefs.h"
7311 #include <${cf_cv_ncurses_header:-curses.h}>
7312 int
7313 main ()
7314 {
7315 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7316   ;
7317   return 0;
7318 }
7319 _ACEOF
7320 rm -f conftest.$ac_objext conftest$ac_exeext
7321 if { (eval echo "$as_me:7321: \"$ac_link\"") >&5
7322   (eval $ac_link) 2>&5
7323   ac_status=$?
7324   echo "$as_me:7324: \$? = $ac_status" >&5
7325   (exit $ac_status); } &&
7326          { ac_try='test -s conftest$ac_exeext'
7327   { (eval echo "$as_me:7327: \"$ac_try\"") >&5
7328   (eval $ac_try) 2>&5
7329   ac_status=$?
7330   echo "$as_me:7330: \$? = $ac_status" >&5
7331   (exit $ac_status); }; }; then
7332   echo "$as_me:7332: result: yes" >&5
7333 echo "${ECHO_T}yes" >&6
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 cat conftest.$ac_ext >&5
7337 echo "$as_me:7337: result: no" >&5
7338 echo "${ECHO_T}no" >&6
7339                  LIBS="$cf_ncurses_SAVE"
7340 fi
7341 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7342 fi
7343
7344 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7345
7346 cat >>confdefs.h <<EOF
7347 #define $cf_nculib_ROOT 1
7348 EOF
7349
7350 fi
7351
7352         ;;
7353 ncursesw)
7354         cf_cv_libtype=w
7355
7356 echo "$as_me:7356: checking for multibyte character support" >&5
7357 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7358 if test "${cf_cv_utf8_lib+set}" = set; then
7359   echo $ECHO_N "(cached) $ECHO_C" >&6
7360 else
7361
7362         cf_save_LIBS="$LIBS"
7363         cat >conftest.$ac_ext <<_ACEOF
7364 #line 7364 "configure"
7365 #include "confdefs.h"
7366
7367 #include <stdlib.h>
7368 int
7369 main ()
7370 {
7371 putwc(0,0);
7372   ;
7373   return 0;
7374 }
7375 _ACEOF
7376 rm -f conftest.$ac_objext conftest$ac_exeext
7377 if { (eval echo "$as_me:7377: \"$ac_link\"") >&5
7378   (eval $ac_link) 2>&5
7379   ac_status=$?
7380   echo "$as_me:7380: \$? = $ac_status" >&5
7381   (exit $ac_status); } &&
7382          { ac_try='test -s conftest$ac_exeext'
7383   { (eval echo "$as_me:7383: \"$ac_try\"") >&5
7384   (eval $ac_try) 2>&5
7385   ac_status=$?
7386   echo "$as_me:7386: \$? = $ac_status" >&5
7387   (exit $ac_status); }; }; then
7388   cf_cv_utf8_lib=yes
7389 else
7390   echo "$as_me: failed program was:" >&5
7391 cat conftest.$ac_ext >&5
7392
7393 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7394 # will be set on completion of the AC_TRY_LINK below.
7395 cf_cv_header_path_utf8=
7396 cf_cv_library_path_utf8=
7397
7398 echo "${as_me:-configure}:7398: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7399
7400 cf_save_LIBS="$LIBS"
7401
7402 cat >conftest.$ac_ext <<_ACEOF
7403 #line 7403 "configure"
7404 #include "confdefs.h"
7405
7406 #include <libutf8.h>
7407 int
7408 main ()
7409 {
7410 putwc(0,0);
7411   ;
7412   return 0;
7413 }
7414 _ACEOF
7415 rm -f conftest.$ac_objext conftest$ac_exeext
7416 if { (eval echo "$as_me:7416: \"$ac_link\"") >&5
7417   (eval $ac_link) 2>&5
7418   ac_status=$?
7419   echo "$as_me:7419: \$? = $ac_status" >&5
7420   (exit $ac_status); } &&
7421          { ac_try='test -s conftest$ac_exeext'
7422   { (eval echo "$as_me:7422: \"$ac_try\"") >&5
7423   (eval $ac_try) 2>&5
7424   ac_status=$?
7425   echo "$as_me:7425: \$? = $ac_status" >&5
7426   (exit $ac_status); }; }; then
7427
7428         cf_cv_find_linkage_utf8=yes
7429         cf_cv_header_path_utf8=/usr/include
7430         cf_cv_library_path_utf8=/usr/lib
7431
7432 else
7433   echo "$as_me: failed program was:" >&5
7434 cat conftest.$ac_ext >&5
7435
7436 LIBS="-lutf8  $cf_save_LIBS"
7437
7438 cat >conftest.$ac_ext <<_ACEOF
7439 #line 7439 "configure"
7440 #include "confdefs.h"
7441
7442 #include <libutf8.h>
7443 int
7444 main ()
7445 {
7446 putwc(0,0);
7447   ;
7448   return 0;
7449 }
7450 _ACEOF
7451 rm -f conftest.$ac_objext conftest$ac_exeext
7452 if { (eval echo "$as_me:7452: \"$ac_link\"") >&5
7453   (eval $ac_link) 2>&5
7454   ac_status=$?
7455   echo "$as_me:7455: \$? = $ac_status" >&5
7456   (exit $ac_status); } &&
7457          { ac_try='test -s conftest$ac_exeext'
7458   { (eval echo "$as_me:7458: \"$ac_try\"") >&5
7459   (eval $ac_try) 2>&5
7460   ac_status=$?
7461   echo "$as_me:7461: \$? = $ac_status" >&5
7462   (exit $ac_status); }; }; then
7463
7464         cf_cv_find_linkage_utf8=yes
7465         cf_cv_header_path_utf8=/usr/include
7466         cf_cv_library_path_utf8=/usr/lib
7467         cf_cv_library_file_utf8="-lutf8"
7468
7469 else
7470   echo "$as_me: failed program was:" >&5
7471 cat conftest.$ac_ext >&5
7472
7473         cf_cv_find_linkage_utf8=no
7474         LIBS="$cf_save_LIBS"
7475
7476     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7477
7478 echo "${as_me:-configure}:7478: testing find linkage for utf8 library ..." 1>&5
7479
7480 echo "${as_me:-configure}:7480: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7481
7482     cf_save_CPPFLAGS="$CPPFLAGS"
7483     cf_test_CPPFLAGS="$CPPFLAGS"
7484
7485 cf_search=
7486
7487 # collect the current set of include-directories from compiler flags
7488 cf_header_path_list=""
7489 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7490         for cf_header_path in $CPPFLAGS $CFLAGS
7491         do
7492                 case $cf_header_path in #(vi
7493                 -I*)
7494                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7495
7496 test "$cf_header_path" != "NONE" && \
7497 test -d "$cf_header_path" && \
7498  {
7499         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7500         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7501         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7502         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7503         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7504         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7505 }
7506
7507                         cf_header_path_list="$cf_header_path_list $cf_search"
7508                         ;;
7509                 esac
7510         done
7511 fi
7512
7513 # add the variations for the package we are looking for
7514
7515 cf_search=
7516
7517 test "/usr" != "$prefix" && \
7518 test -d "/usr" && \
7519 (test $prefix = NONE || test "/usr" != "$prefix") && {
7520         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7521         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7522         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7523         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7524         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7525         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7526 }
7527
7528 test "$prefix" != "NONE" && \
7529 test -d "$prefix" && \
7530  {
7531         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7532         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7533         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7534         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7535         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7536         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7537 }
7538
7539 test "/usr/local" != "$prefix" && \
7540 test -d "/usr/local" && \
7541 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7542         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7543         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7544         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7545         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7546         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7547         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7548 }
7549
7550 test "/opt" != "$prefix" && \
7551 test -d "/opt" && \
7552 (test $prefix = NONE || test "/opt" != "$prefix") && {
7553         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7554         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7555         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7556         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7557         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7558         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7559 }
7560
7561 test "$HOME" != "$prefix" && \
7562 test -d "$HOME" && \
7563 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7564         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7565         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7566         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7567         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7568         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7569         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7570 }
7571
7572 test "$includedir" != NONE && \
7573 test "$includedir" != "/usr/include" && \
7574 test -d "$includedir" && {
7575         test -d $includedir &&    cf_search="$cf_search $includedir"
7576         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7577 }
7578
7579 test "$oldincludedir" != NONE && \
7580 test "$oldincludedir" != "/usr/include" && \
7581 test -d "$oldincludedir" && {
7582         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7583         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7584 }
7585
7586 cf_search="$cf_search $cf_header_path_list"
7587
7588     for cf_cv_header_path_utf8 in $cf_search
7589     do
7590       if test -d $cf_cv_header_path_utf8 ; then
7591         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7592
7593 echo "${as_me:-configure}:7593: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7594
7595         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7596         cat >conftest.$ac_ext <<_ACEOF
7597 #line 7597 "configure"
7598 #include "confdefs.h"
7599
7600 #include <libutf8.h>
7601 int
7602 main ()
7603 {
7604 putwc(0,0);
7605   ;
7606   return 0;
7607 }
7608 _ACEOF
7609 rm -f conftest.$ac_objext
7610 if { (eval echo "$as_me:7610: \"$ac_compile\"") >&5
7611   (eval $ac_compile) 2>&5
7612   ac_status=$?
7613   echo "$as_me:7613: \$? = $ac_status" >&5
7614   (exit $ac_status); } &&
7615          { ac_try='test -s conftest.$ac_objext'
7616   { (eval echo "$as_me:7616: \"$ac_try\"") >&5
7617   (eval $ac_try) 2>&5
7618   ac_status=$?
7619   echo "$as_me:7619: \$? = $ac_status" >&5
7620   (exit $ac_status); }; }; then
7621
7622             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7623
7624 echo "${as_me:-configure}:7624: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7625
7626             cf_cv_find_linkage_utf8=maybe
7627             cf_test_CPPFLAGS="$CPPFLAGS"
7628             break
7629 else
7630   echo "$as_me: failed program was:" >&5
7631 cat conftest.$ac_ext >&5
7632
7633             CPPFLAGS="$cf_save_CPPFLAGS"
7634
7635 fi
7636 rm -f conftest.$ac_objext conftest.$ac_ext
7637       fi
7638     done
7639
7640     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7641
7642 echo "${as_me:-configure}:7642: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7643
7644       cf_save_LIBS="$LIBS"
7645       cf_save_LDFLAGS="$LDFLAGS"
7646
7647       if test "$cf_cv_find_linkage_utf8" != yes ; then
7648
7649 cf_search=
7650 cf_library_path_list=""
7651 if test -n "${LDFLAGS}${LIBS}" ; then
7652         for cf_library_path in $LDFLAGS $LIBS
7653         do
7654                 case $cf_library_path in #(vi
7655                 -L*)
7656                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7657
7658 test "$cf_library_path" != "NONE" && \
7659 test -d "$cf_library_path" && \
7660  {
7661         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7662         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7663         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7664         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7665         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7666         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7667 }
7668
7669                         cf_library_path_list="$cf_library_path_list $cf_search"
7670                         ;;
7671                 esac
7672         done
7673 fi
7674
7675 cf_search=
7676
7677 test "/usr" != "$prefix" && \
7678 test -d "/usr" && \
7679 (test $prefix = NONE || test "/usr" != "$prefix") && {
7680         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7681         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7682         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7683         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7684         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7685         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7686 }
7687
7688 test "$prefix" != "NONE" && \
7689 test -d "$prefix" && \
7690  {
7691         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7692         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7693         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7694         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7695         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7696         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7697 }
7698
7699 test "/usr/local" != "$prefix" && \
7700 test -d "/usr/local" && \
7701 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7702         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7703         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7704         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7705         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7706         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7707         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7708 }
7709
7710 test "/opt" != "$prefix" && \
7711 test -d "/opt" && \
7712 (test $prefix = NONE || test "/opt" != "$prefix") && {
7713         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7714         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7715         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7716         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7717         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7718         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7719 }
7720
7721 test "$HOME" != "$prefix" && \
7722 test -d "$HOME" && \
7723 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7724         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7725         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7726         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7727         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7728         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7729         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7730 }
7731
7732 cf_search="$cf_library_path_list $cf_search"
7733
7734         for cf_cv_library_path_utf8 in $cf_search
7735         do
7736           if test -d $cf_cv_library_path_utf8 ; then
7737             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7738
7739 echo "${as_me:-configure}:7739: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7740
7741             CPPFLAGS="$cf_test_CPPFLAGS"
7742             LIBS="-lutf8  $cf_save_LIBS"
7743             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7744             cat >conftest.$ac_ext <<_ACEOF
7745 #line 7745 "configure"
7746 #include "confdefs.h"
7747
7748 #include <libutf8.h>
7749 int
7750 main ()
7751 {
7752 putwc(0,0);
7753   ;
7754   return 0;
7755 }
7756 _ACEOF
7757 rm -f conftest.$ac_objext conftest$ac_exeext
7758 if { (eval echo "$as_me:7758: \"$ac_link\"") >&5
7759   (eval $ac_link) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); } &&
7763          { ac_try='test -s conftest$ac_exeext'
7764   { (eval echo "$as_me:7764: \"$ac_try\"") >&5
7765   (eval $ac_try) 2>&5
7766   ac_status=$?
7767   echo "$as_me:7767: \$? = $ac_status" >&5
7768   (exit $ac_status); }; }; then
7769
7770                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7771
7772 echo "${as_me:-configure}:7772: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7773
7774                 cf_cv_find_linkage_utf8=yes
7775                 cf_cv_library_file_utf8="-lutf8"
7776                 break
7777 else
7778   echo "$as_me: failed program was:" >&5
7779 cat conftest.$ac_ext >&5
7780
7781                 CPPFLAGS="$cf_save_CPPFLAGS"
7782                 LIBS="$cf_save_LIBS"
7783                 LDFLAGS="$cf_save_LDFLAGS"
7784
7785 fi
7786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7787           fi
7788         done
7789         CPPFLAGS="$cf_save_CPPFLAGS"
7790         LDFLAGS="$cf_save_LDFLAGS"
7791       fi
7792
7793     else
7794       cf_cv_find_linkage_utf8=no
7795     fi
7796
7797 fi
7798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7799
7800 fi
7801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7802
7803 LIBS="$cf_save_LIBS"
7804
7805 if test "$cf_cv_find_linkage_utf8" = yes ; then
7806 cf_cv_utf8_lib=add-on
7807 else
7808 cf_cv_utf8_lib=no
7809 fi
7810
7811 fi
7812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7813 fi
7814 echo "$as_me:7814: result: $cf_cv_utf8_lib" >&5
7815 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7816
7817 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7818 # ncurses/ncursesw:
7819 if test "$cf_cv_utf8_lib" = "add-on" ; then
7820         cat >>confdefs.h <<\EOF
7821 #define HAVE_LIBUTF8_H 1
7822 EOF
7823
7824 if test -n "$cf_cv_header_path_utf8" ; then
7825   for cf_add_incdir in $cf_cv_header_path_utf8
7826   do
7827         while test $cf_add_incdir != /usr/include
7828         do
7829           if test -d $cf_add_incdir
7830           then
7831                 cf_have_incdir=no
7832                 if test -n "$CFLAGS$CPPFLAGS" ; then
7833                   # a loop is needed to ensure we can add subdirs of existing dirs
7834                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7835                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7836                           cf_have_incdir=yes; break
7837                         fi
7838                   done
7839                 fi
7840
7841                 if test "$cf_have_incdir" = no ; then
7842                   if test "$cf_add_incdir" = /usr/local/include ; then
7843                         if test "$GCC" = yes
7844                         then
7845                           cf_save_CPPFLAGS=$CPPFLAGS
7846                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7847                           cat >conftest.$ac_ext <<_ACEOF
7848 #line 7848 "configure"
7849 #include "confdefs.h"
7850 #include <stdio.h>
7851 int
7852 main ()
7853 {
7854 printf("Hello")
7855   ;
7856   return 0;
7857 }
7858 _ACEOF
7859 rm -f conftest.$ac_objext
7860 if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
7861   (eval $ac_compile) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); } &&
7865          { ac_try='test -s conftest.$ac_objext'
7866   { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7867   (eval $ac_try) 2>&5
7868   ac_status=$?
7869   echo "$as_me:7869: \$? = $ac_status" >&5
7870   (exit $ac_status); }; }; then
7871   :
7872 else
7873   echo "$as_me: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 cf_have_incdir=yes
7876 fi
7877 rm -f conftest.$ac_objext conftest.$ac_ext
7878                           CPPFLAGS=$cf_save_CPPFLAGS
7879                         fi
7880                   fi
7881                 fi
7882
7883                 if test "$cf_have_incdir" = no ; then
7884                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7885
7886 echo "${as_me:-configure}:7886: testing adding $cf_add_incdir to include-path ..." 1>&5
7887
7888                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7889
7890                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7891                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7892                   cf_add_incdir="$cf_top_incdir"
7893                 else
7894                   break
7895                 fi
7896           fi
7897         done
7898   done
7899 fi
7900
7901 if test -n "$cf_cv_library_path_utf8" ; then
7902   for cf_add_libdir in $cf_cv_library_path_utf8
7903   do
7904     if test $cf_add_libdir = /usr/lib ; then
7905       :
7906     elif test -d $cf_add_libdir
7907     then
7908       cf_have_libdir=no
7909       if test -n "$LDFLAGS$LIBS" ; then
7910         # a loop is needed to ensure we can add subdirs of existing dirs
7911         for cf_test_libdir in $LDFLAGS $LIBS ; do
7912           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7913             cf_have_libdir=yes; break
7914           fi
7915         done
7916       fi
7917       if test "$cf_have_libdir" = no ; then
7918         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7919
7920 echo "${as_me:-configure}:7920: testing adding $cf_add_libdir to library-path ..." 1>&5
7921
7922         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7923       fi
7924     fi
7925   done
7926 fi
7927
7928         LIBS="$cf_cv_library_file_utf8 $LIBS"
7929 fi
7930
7931 cf_ncuconfig_root=ncursesw
7932
7933 echo "Looking for ${cf_ncuconfig_root}-config"
7934 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7935 do
7936   # Extract the first word of "$ac_prog", so it can be a program name with args.
7937 set dummy $ac_prog; ac_word=$2
7938 echo "$as_me:7938: checking for $ac_word" >&5
7939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7940 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
7941   echo $ECHO_N "(cached) $ECHO_C" >&6
7942 else
7943   case $NCURSES_CONFIG in
7944   [\\/]* | ?:[\\/]*)
7945   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
7946   ;;
7947   *)
7948   ac_save_IFS=$IFS; IFS=$ac_path_separator
7949 ac_dummy="$PATH"
7950 for ac_dir in $ac_dummy; do
7951   IFS=$ac_save_IFS
7952   test -z "$ac_dir" && ac_dir=.
7953   if $as_executable_p "$ac_dir/$ac_word"; then
7954    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
7955    echo "$as_me:7955: found $ac_dir/$ac_word" >&5
7956    break
7957 fi
7958 done
7959
7960   ;;
7961 esac
7962 fi
7963 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
7964
7965 if test -n "$NCURSES_CONFIG"; then
7966   echo "$as_me:7966: result: $NCURSES_CONFIG" >&5
7967 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7968 else
7969   echo "$as_me:7969: result: no" >&5
7970 echo "${ECHO_T}no" >&6
7971 fi
7972
7973   test -n "$NCURSES_CONFIG" && break
7974 done
7975 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
7976
7977 if test "$NCURSES_CONFIG" != none ; then
7978
7979 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7980 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
7981
7982 # even with config script, some packages use no-override for curses.h
7983
7984 echo "$as_me:7984: checking if we have identified curses headers" >&5
7985 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7986 if test "${cf_cv_ncurses_header+set}" = set; then
7987   echo $ECHO_N "(cached) $ECHO_C" >&6
7988 else
7989
7990 cf_cv_ncurses_header=none
7991 for cf_header in  \
7992     ncursesw/ncurses.h \
7993         ncursesw/curses.h \
7994         ncurses.h \
7995         curses.h
7996 do
7997 cat >conftest.$ac_ext <<_ACEOF
7998 #line 7998 "configure"
7999 #include "confdefs.h"
8000 #include <${cf_header}>
8001 int
8002 main ()
8003 {
8004 initscr(); tgoto("?", 0,0)
8005   ;
8006   return 0;
8007 }
8008 _ACEOF
8009 rm -f conftest.$ac_objext
8010 if { (eval echo "$as_me:8010: \"$ac_compile\"") >&5
8011   (eval $ac_compile) 2>&5
8012   ac_status=$?
8013   echo "$as_me:8013: \$? = $ac_status" >&5
8014   (exit $ac_status); } &&
8015          { ac_try='test -s conftest.$ac_objext'
8016   { (eval echo "$as_me:8016: \"$ac_try\"") >&5
8017   (eval $ac_try) 2>&5
8018   ac_status=$?
8019   echo "$as_me:8019: \$? = $ac_status" >&5
8020   (exit $ac_status); }; }; then
8021   cf_cv_ncurses_header=$cf_header; break
8022 else
8023   echo "$as_me: failed program was:" >&5
8024 cat conftest.$ac_ext >&5
8025 fi
8026 rm -f conftest.$ac_objext conftest.$ac_ext
8027 done
8028
8029 fi
8030 echo "$as_me:8030: result: $cf_cv_ncurses_header" >&5
8031 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8032
8033 if test "$cf_cv_ncurses_header" = none ; then
8034         { { echo "$as_me:8034: error: No curses header-files found" >&5
8035 echo "$as_me: error: No curses header-files found" >&2;}
8036    { (exit 1); exit 1; }; }
8037 fi
8038
8039 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8040
8041 for ac_header in $cf_cv_ncurses_header
8042 do
8043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8044 echo "$as_me:8044: checking for $ac_header" >&5
8045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8047   echo $ECHO_N "(cached) $ECHO_C" >&6
8048 else
8049   cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <$ac_header>
8053 _ACEOF
8054 if { (eval echo "$as_me:8054: \"$ac_cpp conftest.$ac_ext\"") >&5
8055   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8056   ac_status=$?
8057   egrep -v '^ *\+' conftest.er1 >conftest.err
8058   rm -f conftest.er1
8059   cat conftest.err >&5
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit $ac_status); } >/dev/null; then
8062   if test -s conftest.err; then
8063     ac_cpp_err=$ac_c_preproc_warn_flag
8064   else
8065     ac_cpp_err=
8066   fi
8067 else
8068   ac_cpp_err=yes
8069 fi
8070 if test -z "$ac_cpp_err"; then
8071   eval "$as_ac_Header=yes"
8072 else
8073   echo "$as_me: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   eval "$as_ac_Header=no"
8076 fi
8077 rm -f conftest.err conftest.$ac_ext
8078 fi
8079 echo "$as_me:8079: result: `eval echo '${'$as_ac_Header'}'`" >&5
8080 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8081 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8082   cat >>confdefs.h <<EOF
8083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8084 EOF
8085
8086 fi
8087 done
8088
8089 cat >>confdefs.h <<\EOF
8090 #define NCURSES 1
8091 EOF
8092
8093 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8094
8095 cat >>confdefs.h <<EOF
8096 #define $cf_nculib_ROOT 1
8097 EOF
8098
8099 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8100
8101 else
8102
8103 cf_ncuhdr_root=ncursesw
8104
8105 test -n "$cf_cv_curses_dir" && \
8106 test "$cf_cv_curses_dir" != "no" && { \
8107
8108 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8109   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8110   do
8111         while test $cf_add_incdir != /usr/include
8112         do
8113           if test -d $cf_add_incdir
8114           then
8115                 cf_have_incdir=no
8116                 if test -n "$CFLAGS$CPPFLAGS" ; then
8117                   # a loop is needed to ensure we can add subdirs of existing dirs
8118                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8119                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8120                           cf_have_incdir=yes; break
8121                         fi
8122                   done
8123                 fi
8124
8125                 if test "$cf_have_incdir" = no ; then
8126                   if test "$cf_add_incdir" = /usr/local/include ; then
8127                         if test "$GCC" = yes
8128                         then
8129                           cf_save_CPPFLAGS=$CPPFLAGS
8130                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8131                           cat >conftest.$ac_ext <<_ACEOF
8132 #line 8132 "configure"
8133 #include "confdefs.h"
8134 #include <stdio.h>
8135 int
8136 main ()
8137 {
8138 printf("Hello")
8139   ;
8140   return 0;
8141 }
8142 _ACEOF
8143 rm -f conftest.$ac_objext
8144 if { (eval echo "$as_me:8144: \"$ac_compile\"") >&5
8145   (eval $ac_compile) 2>&5
8146   ac_status=$?
8147   echo "$as_me:8147: \$? = $ac_status" >&5
8148   (exit $ac_status); } &&
8149          { ac_try='test -s conftest.$ac_objext'
8150   { (eval echo "$as_me:8150: \"$ac_try\"") >&5
8151   (eval $ac_try) 2>&5
8152   ac_status=$?
8153   echo "$as_me:8153: \$? = $ac_status" >&5
8154   (exit $ac_status); }; }; then
8155   :
8156 else
8157   echo "$as_me: failed program was:" >&5
8158 cat conftest.$ac_ext >&5
8159 cf_have_incdir=yes
8160 fi
8161 rm -f conftest.$ac_objext conftest.$ac_ext
8162                           CPPFLAGS=$cf_save_CPPFLAGS
8163                         fi
8164                   fi
8165                 fi
8166
8167                 if test "$cf_have_incdir" = no ; then
8168                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8169
8170 echo "${as_me:-configure}:8170: testing adding $cf_add_incdir to include-path ..." 1>&5
8171
8172                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8173
8174                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8175                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8176                   cf_add_incdir="$cf_top_incdir"
8177                 else
8178                   break
8179                 fi
8180           fi
8181         done
8182   done
8183 fi
8184
8185 }
8186
8187 echo "$as_me:8187: checking for $cf_ncuhdr_root header in include-path" >&5
8188 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8189 if test "${cf_cv_ncurses_h+set}" = set; then
8190   echo $ECHO_N "(cached) $ECHO_C" >&6
8191 else
8192
8193         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8194         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8195         for cf_header in $cf_header_list
8196         do
8197
8198         cat >conftest.$ac_ext <<_ACEOF
8199 #line 8199 "configure"
8200 #include "confdefs.h"
8201
8202 #define _XOPEN_SOURCE_EXTENDED
8203 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
8204 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
8205
8206 #include <$cf_header>
8207 int
8208 main ()
8209 {
8210
8211 #ifdef NCURSES_VERSION
8212
8213 #ifndef WACS_BSSB
8214         make an error
8215 #endif
8216
8217 printf("%s\n", NCURSES_VERSION);
8218 #else
8219 #ifdef __NCURSES_H
8220 printf("old\n");
8221 #else
8222         make an error
8223 #endif
8224 #endif
8225
8226   ;
8227   return 0;
8228 }
8229 _ACEOF
8230 rm -f conftest.$ac_objext
8231 if { (eval echo "$as_me:8231: \"$ac_compile\"") >&5
8232   (eval $ac_compile) 2>&5
8233   ac_status=$?
8234   echo "$as_me:8234: \$? = $ac_status" >&5
8235   (exit $ac_status); } &&
8236          { ac_try='test -s conftest.$ac_objext'
8237   { (eval echo "$as_me:8237: \"$ac_try\"") >&5
8238   (eval $ac_try) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit $ac_status); }; }; then
8242   cf_cv_ncurses_h=$cf_header
8243
8244 else
8245   echo "$as_me: failed program was:" >&5
8246 cat conftest.$ac_ext >&5
8247 cf_cv_ncurses_h=no
8248 fi
8249 rm -f conftest.$ac_objext conftest.$ac_ext
8250
8251                 test "$cf_cv_ncurses_h" != no && break
8252         done
8253
8254 fi
8255 echo "$as_me:8255: result: $cf_cv_ncurses_h" >&5
8256 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8257
8258 if test "$cf_cv_ncurses_h" != no ; then
8259         cf_cv_ncurses_header=$cf_cv_ncurses_h
8260 else
8261
8262 echo "$as_me:8262: checking for $cf_ncuhdr_root include-path" >&5
8263 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8264 if test "${cf_cv_ncurses_h2+set}" = set; then
8265   echo $ECHO_N "(cached) $ECHO_C" >&6
8266 else
8267
8268         test -n "$verbose" && echo
8269
8270 cf_search=
8271
8272 # collect the current set of include-directories from compiler flags
8273 cf_header_path_list=""
8274 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8275         for cf_header_path in $CPPFLAGS $CFLAGS
8276         do
8277                 case $cf_header_path in #(vi
8278                 -I*)
8279                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8280
8281 test "$cf_header_path" != "NONE" && \
8282 test -d "$cf_header_path" && \
8283  {
8284         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8285         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8286         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8287         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8288         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8289         test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8290 }
8291
8292                         cf_header_path_list="$cf_header_path_list $cf_search"
8293                         ;;
8294                 esac
8295         done
8296 fi
8297
8298 # add the variations for the package we are looking for
8299
8300 cf_search=
8301
8302 test "/usr" != "$prefix" && \
8303 test -d "/usr" && \
8304 (test $prefix = NONE || test "/usr" != "$prefix") && {
8305         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8306         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8307         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8308         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8309         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8310         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8311 }
8312
8313 test "$prefix" != "NONE" && \
8314 test -d "$prefix" && \
8315  {
8316         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8317         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8318         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8319         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8320         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8321         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8322 }
8323
8324 test "/usr/local" != "$prefix" && \
8325 test -d "/usr/local" && \
8326 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8327         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8328         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8329         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8330         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8331         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8332         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8333 }
8334
8335 test "/opt" != "$prefix" && \
8336 test -d "/opt" && \
8337 (test $prefix = NONE || test "/opt" != "$prefix") && {
8338         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8339         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8340         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8341         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8342         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8343         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8344 }
8345
8346 test "$HOME" != "$prefix" && \
8347 test -d "$HOME" && \
8348 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8349         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8350         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8351         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8352         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8353         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8354         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8355 }
8356
8357 test "$includedir" != NONE && \
8358 test "$includedir" != "/usr/include" && \
8359 test -d "$includedir" && {
8360         test -d $includedir &&    cf_search="$cf_search $includedir"
8361         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8362 }
8363
8364 test "$oldincludedir" != NONE && \
8365 test "$oldincludedir" != "/usr/include" && \
8366 test -d "$oldincludedir" && {
8367         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8368         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8369 }
8370
8371 cf_search="$cf_search $cf_header_path_list"
8372
8373         test -n "$verbose" && echo search path $cf_search
8374         cf_save2_CPPFLAGS="$CPPFLAGS"
8375         for cf_incdir in $cf_search
8376         do
8377
8378 if test -n "$cf_incdir" ; then
8379   for cf_add_incdir in $cf_incdir
8380   do
8381         while test $cf_add_incdir != /usr/include
8382         do
8383           if test -d $cf_add_incdir
8384           then
8385                 cf_have_incdir=no
8386                 if test -n "$CFLAGS$CPPFLAGS" ; then
8387                   # a loop is needed to ensure we can add subdirs of existing dirs
8388                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8389                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8390                           cf_have_incdir=yes; break
8391                         fi
8392                   done
8393                 fi
8394
8395                 if test "$cf_have_incdir" = no ; then
8396                   if test "$cf_add_incdir" = /usr/local/include ; then
8397                         if test "$GCC" = yes
8398                         then
8399                           cf_save_CPPFLAGS=$CPPFLAGS
8400                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8401                           cat >conftest.$ac_ext <<_ACEOF
8402 #line 8402 "configure"
8403 #include "confdefs.h"
8404 #include <stdio.h>
8405 int
8406 main ()
8407 {
8408 printf("Hello")
8409   ;
8410   return 0;
8411 }
8412 _ACEOF
8413 rm -f conftest.$ac_objext
8414 if { (eval echo "$as_me:8414: \"$ac_compile\"") >&5
8415   (eval $ac_compile) 2>&5
8416   ac_status=$?
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); } &&
8419          { ac_try='test -s conftest.$ac_objext'
8420   { (eval echo "$as_me:8420: \"$ac_try\"") >&5
8421   (eval $ac_try) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); }; }; then
8425   :
8426 else
8427   echo "$as_me: failed program was:" >&5
8428 cat conftest.$ac_ext >&5
8429 cf_have_incdir=yes
8430 fi
8431 rm -f conftest.$ac_objext conftest.$ac_ext
8432                           CPPFLAGS=$cf_save_CPPFLAGS
8433                         fi
8434                   fi
8435                 fi
8436
8437                 if test "$cf_have_incdir" = no ; then
8438                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8439
8440 echo "${as_me:-configure}:8440: testing adding $cf_add_incdir to include-path ..." 1>&5
8441
8442                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8443
8444                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8445                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8446                   cf_add_incdir="$cf_top_incdir"
8447                 else
8448                   break
8449                 fi
8450           fi
8451         done
8452   done
8453 fi
8454
8455                 for cf_header in \
8456                         ncurses.h \
8457                         curses.h
8458                 do
8459
8460         cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8463
8464 #include <$cf_header>
8465 int
8466 main ()
8467 {
8468
8469 #ifdef NCURSES_VERSION
8470
8471 printf("%s\n", NCURSES_VERSION);
8472 #else
8473 #ifdef __NCURSES_H
8474 printf("old\n");
8475 #else
8476         make an error
8477 #endif
8478 #endif
8479
8480   ;
8481   return 0;
8482 }
8483 _ACEOF
8484 rm -f conftest.$ac_objext
8485 if { (eval echo "$as_me:8485: \"$ac_compile\"") >&5
8486   (eval $ac_compile) 2>&5
8487   ac_status=$?
8488   echo "$as_me:8488: \$? = $ac_status" >&5
8489   (exit $ac_status); } &&
8490          { ac_try='test -s conftest.$ac_objext'
8491   { (eval echo "$as_me:8491: \"$ac_try\"") >&5
8492   (eval $ac_try) 2>&5
8493   ac_status=$?
8494   echo "$as_me:8494: \$? = $ac_status" >&5
8495   (exit $ac_status); }; }; then
8496   cf_cv_ncurses_h2=$cf_header
8497
8498 else
8499   echo "$as_me: failed program was:" >&5
8500 cat conftest.$ac_ext >&5
8501 cf_cv_ncurses_h2=no
8502 fi
8503 rm -f conftest.$ac_objext conftest.$ac_ext
8504
8505                         if test "$cf_cv_ncurses_h2" != no ; then
8506                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8507                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
8508                                 break
8509                         fi
8510                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
8511                 done
8512                 CPPFLAGS="$cf_save2_CPPFLAGS"
8513                 test "$cf_cv_ncurses_h2" != no && break
8514         done
8515         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8515: error: not found" >&5
8516 echo "$as_me: error: not found" >&2;}
8517    { (exit 1); exit 1; }; }
8518
8519 fi
8520 echo "$as_me:8520: result: $cf_cv_ncurses_h2" >&5
8521 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8522
8523         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8524         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8525         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8526                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8527         fi
8528
8529 if test -n "$cf_1st_incdir" ; then
8530   for cf_add_incdir in $cf_1st_incdir
8531   do
8532         while test $cf_add_incdir != /usr/include
8533         do
8534           if test -d $cf_add_incdir
8535           then
8536                 cf_have_incdir=no
8537                 if test -n "$CFLAGS$CPPFLAGS" ; then
8538                   # a loop is needed to ensure we can add subdirs of existing dirs
8539                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8540                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8541                           cf_have_incdir=yes; break
8542                         fi
8543                   done
8544                 fi
8545
8546                 if test "$cf_have_incdir" = no ; then
8547                   if test "$cf_add_incdir" = /usr/local/include ; then
8548                         if test "$GCC" = yes
8549                         then
8550                           cf_save_CPPFLAGS=$CPPFLAGS
8551                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8552                           cat >conftest.$ac_ext <<_ACEOF
8553 #line 8553 "configure"
8554 #include "confdefs.h"
8555 #include <stdio.h>
8556 int
8557 main ()
8558 {
8559 printf("Hello")
8560   ;
8561   return 0;
8562 }
8563 _ACEOF
8564 rm -f conftest.$ac_objext
8565 if { (eval echo "$as_me:8565: \"$ac_compile\"") >&5
8566   (eval $ac_compile) 2>&5
8567   ac_status=$?
8568   echo "$as_me:8568: \$? = $ac_status" >&5
8569   (exit $ac_status); } &&
8570          { ac_try='test -s conftest.$ac_objext'
8571   { (eval echo "$as_me:8571: \"$ac_try\"") >&5
8572   (eval $ac_try) 2>&5
8573   ac_status=$?
8574   echo "$as_me:8574: \$? = $ac_status" >&5
8575   (exit $ac_status); }; }; then
8576   :
8577 else
8578   echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8580 cf_have_incdir=yes
8581 fi
8582 rm -f conftest.$ac_objext conftest.$ac_ext
8583                           CPPFLAGS=$cf_save_CPPFLAGS
8584                         fi
8585                   fi
8586                 fi
8587
8588                 if test "$cf_have_incdir" = no ; then
8589                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8590
8591 echo "${as_me:-configure}:8591: testing adding $cf_add_incdir to include-path ..." 1>&5
8592
8593                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8594
8595                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8596                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8597                   cf_add_incdir="$cf_top_incdir"
8598                 else
8599                   break
8600                 fi
8601           fi
8602         done
8603   done
8604 fi
8605
8606 fi
8607
8608 # Set definitions to allow ifdef'ing for ncurses.h
8609
8610 case $cf_cv_ncurses_header in # (vi
8611 *ncurses.h)
8612         cat >>confdefs.h <<\EOF
8613 #define HAVE_NCURSES_H 1
8614 EOF
8615
8616         ;;
8617 esac
8618
8619 case $cf_cv_ncurses_header in # (vi
8620 ncurses/curses.h|ncurses/ncurses.h)
8621         cat >>confdefs.h <<\EOF
8622 #define HAVE_NCURSES_NCURSES_H 1
8623 EOF
8624
8625         ;;
8626 ncursesw/curses.h|ncursesw/ncurses.h)
8627         cat >>confdefs.h <<\EOF
8628 #define HAVE_NCURSESW_NCURSES_H 1
8629 EOF
8630
8631         ;;
8632 esac
8633
8634 echo "$as_me:8634: checking for terminfo header" >&5
8635 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8636 if test "${cf_cv_term_header+set}" = set; then
8637   echo $ECHO_N "(cached) $ECHO_C" >&6
8638 else
8639
8640 case ${cf_cv_ncurses_header} in #(vi
8641 */ncurses.h|*/ncursesw.h) #(vi
8642         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8643         ;;
8644 *)
8645         cf_term_header=term.h
8646         ;;
8647 esac
8648
8649 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8650 do
8651 cat >conftest.$ac_ext <<_ACEOF
8652 #line 8652 "configure"
8653 #include "confdefs.h"
8654 #include <stdio.h>
8655 #include <${cf_cv_ncurses_header:-curses.h}>
8656 #include <$cf_test>
8657
8658 int
8659 main ()
8660 {
8661 int x = auto_left_margin
8662   ;
8663   return 0;
8664 }
8665 _ACEOF
8666 rm -f conftest.$ac_objext
8667 if { (eval echo "$as_me:8667: \"$ac_compile\"") >&5
8668   (eval $ac_compile) 2>&5
8669   ac_status=$?
8670   echo "$as_me:8670: \$? = $ac_status" >&5
8671   (exit $ac_status); } &&
8672          { ac_try='test -s conftest.$ac_objext'
8673   { (eval echo "$as_me:8673: \"$ac_try\"") >&5
8674   (eval $ac_try) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit $ac_status); }; }; then
8678
8679         cf_cv_term_header="$cf_test"
8680 else
8681   echo "$as_me: failed program was:" >&5
8682 cat conftest.$ac_ext >&5
8683
8684         cf_cv_term_header=unknown
8685
8686 fi
8687 rm -f conftest.$ac_objext conftest.$ac_ext
8688         test "$cf_cv_term_header" != unknown && break
8689 done
8690
8691 fi
8692 echo "$as_me:8692: result: $cf_cv_term_header" >&5
8693 echo "${ECHO_T}$cf_cv_term_header" >&6
8694
8695 # Set definitions to allow ifdef'ing to accommodate subdirectories
8696
8697 case $cf_cv_term_header in # (vi
8698 *term.h)
8699         cat >>confdefs.h <<\EOF
8700 #define HAVE_TERM_H 1
8701 EOF
8702
8703         ;;
8704 esac
8705
8706 case $cf_cv_term_header in # (vi
8707 ncurses/term.h) #(vi
8708         cat >>confdefs.h <<\EOF
8709 #define HAVE_NCURSES_TERM_H 1
8710 EOF
8711
8712         ;;
8713 ncursesw/term.h)
8714         cat >>confdefs.h <<\EOF
8715 #define HAVE_NCURSESW_TERM_H 1
8716 EOF
8717
8718         ;;
8719 esac
8720
8721 # some applications need this, but should check for NCURSES_VERSION
8722 cat >>confdefs.h <<\EOF
8723 #define NCURSES 1
8724 EOF
8725
8726 echo "$as_me:8726: checking for ncurses version" >&5
8727 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8728 if test "${cf_cv_ncurses_version+set}" = set; then
8729   echo $ECHO_N "(cached) $ECHO_C" >&6
8730 else
8731
8732         cf_cv_ncurses_version=no
8733         cf_tempfile=out$$
8734         rm -f $cf_tempfile
8735         if test "$cross_compiling" = yes; then
8736
8737         # This will not work if the preprocessor splits the line after the
8738         # Autoconf token.  The 'unproto' program does that.
8739         cat > conftest.$ac_ext <<EOF
8740 #include <${cf_cv_ncurses_header:-curses.h}>
8741 #undef Autoconf
8742 #ifdef NCURSES_VERSION
8743 Autoconf NCURSES_VERSION
8744 #else
8745 #ifdef __NCURSES_H
8746 Autoconf "old"
8747 #endif
8748 ;
8749 #endif
8750 EOF
8751         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8752         { (eval echo "$as_me:8752: \"$cf_try\"") >&5
8753   (eval $cf_try) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit $ac_status); }
8757         if test -f conftest.out ; then
8758                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8759                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8760                 rm -f conftest.out
8761         fi
8762
8763 else
8764   cat >conftest.$ac_ext <<_ACEOF
8765 #line 8765 "configure"
8766 #include "confdefs.h"
8767
8768 #include <${cf_cv_ncurses_header:-curses.h}>
8769 #include <stdio.h>
8770 int main()
8771 {
8772         FILE *fp = fopen("$cf_tempfile", "w");
8773 #ifdef NCURSES_VERSION
8774 # ifdef NCURSES_VERSION_PATCH
8775         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8776 # else
8777         fprintf(fp, "%s\n", NCURSES_VERSION);
8778 # endif
8779 #else
8780 # ifdef __NCURSES_H
8781         fprintf(fp, "old\n");
8782 # else
8783         make an error
8784 # endif
8785 #endif
8786         ${cf_cv_main_return:-return}(0);
8787 }
8788 _ACEOF
8789 rm -f conftest$ac_exeext
8790 if { (eval echo "$as_me:8790: \"$ac_link\"") >&5
8791   (eval $ac_link) 2>&5
8792   ac_status=$?
8793   echo "$as_me:8793: \$? = $ac_status" >&5
8794   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8795   { (eval echo "$as_me:8795: \"$ac_try\"") >&5
8796   (eval $ac_try) 2>&5
8797   ac_status=$?
8798   echo "$as_me:8798: \$? = $ac_status" >&5
8799   (exit $ac_status); }; }; then
8800
8801         cf_cv_ncurses_version=`cat $cf_tempfile`
8802 else
8803   echo "$as_me: program exited with status $ac_status" >&5
8804 echo "$as_me: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8806 fi
8807 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8808 fi
8809         rm -f $cf_tempfile
8810
8811 fi
8812 echo "$as_me:8812: result: $cf_cv_ncurses_version" >&5
8813 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8814 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
8815 #define NCURSES 1
8816 EOF
8817
8818 cf_nculib_root=ncursesw
8819         # This works, except for the special case where we find gpm, but
8820         # ncurses is in a nonstandard location via $LIBS, and we really want
8821         # to link gpm.
8822 cf_ncurses_LIBS=""
8823 cf_ncurses_SAVE="$LIBS"
8824 echo "$as_me:8824: checking for Gpm_Open in -lgpm" >&5
8825 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8826 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8827   echo $ECHO_N "(cached) $ECHO_C" >&6
8828 else
8829   ac_check_lib_save_LIBS=$LIBS
8830 LIBS="-lgpm  $LIBS"
8831 cat >conftest.$ac_ext <<_ACEOF
8832 #line 8832 "configure"
8833 #include "confdefs.h"
8834
8835 /* Override any gcc2 internal prototype to avoid an error.  */
8836 #ifdef __cplusplus
8837 extern "C"
8838 #endif
8839 /* We use char because int might match the return type of a gcc2
8840    builtin and then its argument prototype would still apply.  */
8841 char Gpm_Open ();
8842 int
8843 main ()
8844 {
8845 Gpm_Open ();
8846   ;
8847   return 0;
8848 }
8849 _ACEOF
8850 rm -f conftest.$ac_objext conftest$ac_exeext
8851 if { (eval echo "$as_me:8851: \"$ac_link\"") >&5
8852   (eval $ac_link) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); } &&
8856          { ac_try='test -s conftest$ac_exeext'
8857   { (eval echo "$as_me:8857: \"$ac_try\"") >&5
8858   (eval $ac_try) 2>&5
8859   ac_status=$?
8860   echo "$as_me:8860: \$? = $ac_status" >&5
8861   (exit $ac_status); }; }; then
8862   ac_cv_lib_gpm_Gpm_Open=yes
8863 else
8864   echo "$as_me: failed program was:" >&5
8865 cat conftest.$ac_ext >&5
8866 ac_cv_lib_gpm_Gpm_Open=no
8867 fi
8868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8869 LIBS=$ac_check_lib_save_LIBS
8870 fi
8871 echo "$as_me:8871: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8872 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8873 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8874   echo "$as_me:8874: checking for initscr in -lgpm" >&5
8875 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8876 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8877   echo $ECHO_N "(cached) $ECHO_C" >&6
8878 else
8879   ac_check_lib_save_LIBS=$LIBS
8880 LIBS="-lgpm  $LIBS"
8881 cat >conftest.$ac_ext <<_ACEOF
8882 #line 8882 "configure"
8883 #include "confdefs.h"
8884
8885 /* Override any gcc2 internal prototype to avoid an error.  */
8886 #ifdef __cplusplus
8887 extern "C"
8888 #endif
8889 /* We use char because int might match the return type of a gcc2
8890    builtin and then its argument prototype would still apply.  */
8891 char initscr ();
8892 int
8893 main ()
8894 {
8895 initscr ();
8896   ;
8897   return 0;
8898 }
8899 _ACEOF
8900 rm -f conftest.$ac_objext conftest$ac_exeext
8901 if { (eval echo "$as_me:8901: \"$ac_link\"") >&5
8902   (eval $ac_link) 2>&5
8903   ac_status=$?
8904   echo "$as_me:8904: \$? = $ac_status" >&5
8905   (exit $ac_status); } &&
8906          { ac_try='test -s conftest$ac_exeext'
8907   { (eval echo "$as_me:8907: \"$ac_try\"") >&5
8908   (eval $ac_try) 2>&5
8909   ac_status=$?
8910   echo "$as_me:8910: \$? = $ac_status" >&5
8911   (exit $ac_status); }; }; then
8912   ac_cv_lib_gpm_initscr=yes
8913 else
8914   echo "$as_me: failed program was:" >&5
8915 cat conftest.$ac_ext >&5
8916 ac_cv_lib_gpm_initscr=no
8917 fi
8918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8919 LIBS=$ac_check_lib_save_LIBS
8920 fi
8921 echo "$as_me:8921: result: $ac_cv_lib_gpm_initscr" >&5
8922 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8923 if test $ac_cv_lib_gpm_initscr = yes; then
8924   LIBS="$cf_ncurses_SAVE"
8925 else
8926   cf_ncurses_LIBS="-lgpm"
8927 fi
8928
8929 fi
8930
8931 case $host_os in #(vi
8932 freebsd*)
8933         # This is only necessary if you are linking against an obsolete
8934         # version of ncurses (but it should do no harm, since it's static).
8935         if test "$cf_nculib_root" = ncurses ; then
8936                 echo "$as_me:8936: checking for tgoto in -lmytinfo" >&5
8937 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8938 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8939   echo $ECHO_N "(cached) $ECHO_C" >&6
8940 else
8941   ac_check_lib_save_LIBS=$LIBS
8942 LIBS="-lmytinfo  $LIBS"
8943 cat >conftest.$ac_ext <<_ACEOF
8944 #line 8944 "configure"
8945 #include "confdefs.h"
8946
8947 /* Override any gcc2 internal prototype to avoid an error.  */
8948 #ifdef __cplusplus
8949 extern "C"
8950 #endif
8951 /* We use char because int might match the return type of a gcc2
8952    builtin and then its argument prototype would still apply.  */
8953 char tgoto ();
8954 int
8955 main ()
8956 {
8957 tgoto ();
8958   ;
8959   return 0;
8960 }
8961 _ACEOF
8962 rm -f conftest.$ac_objext conftest$ac_exeext
8963 if { (eval echo "$as_me:8963: \"$ac_link\"") >&5
8964   (eval $ac_link) 2>&5
8965   ac_status=$?
8966   echo "$as_me:8966: \$? = $ac_status" >&5
8967   (exit $ac_status); } &&
8968          { ac_try='test -s conftest$ac_exeext'
8969   { (eval echo "$as_me:8969: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); }; }; then
8974   ac_cv_lib_mytinfo_tgoto=yes
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 cat conftest.$ac_ext >&5
8978 ac_cv_lib_mytinfo_tgoto=no
8979 fi
8980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8981 LIBS=$ac_check_lib_save_LIBS
8982 fi
8983 echo "$as_me:8983: result: $ac_cv_lib_mytinfo_tgoto" >&5
8984 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8985 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8986   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8987 fi
8988
8989         fi
8990         ;;
8991 esac
8992
8993 LIBS="$cf_ncurses_LIBS $LIBS"
8994
8995 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8996 then
8997         LIBS="-l$cf_nculib_root $LIBS"
8998 else
8999
9000         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9001         cf_libdir=""
9002         echo "$as_me:9002: checking for initscr" >&5
9003 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9004 if test "${ac_cv_func_initscr+set}" = set; then
9005   echo $ECHO_N "(cached) $ECHO_C" >&6
9006 else
9007   cat >conftest.$ac_ext <<_ACEOF
9008 #line 9008 "configure"
9009 #include "confdefs.h"
9010 /* System header to define __stub macros and hopefully few prototypes,
9011     which can conflict with char initscr (); below.  */
9012 #include <assert.h>
9013 /* Override any gcc2 internal prototype to avoid an error.  */
9014 #ifdef __cplusplus
9015 extern "C"
9016 #endif
9017 /* We use char because int might match the return type of a gcc2
9018    builtin and then its argument prototype would still apply.  */
9019 char initscr ();
9020 char (*f) ();
9021
9022 int
9023 main ()
9024 {
9025 /* The GNU C library defines this for functions which it implements
9026     to always fail with ENOSYS.  Some functions are actually named
9027     something starting with __ and the normal name is an alias.  */
9028 #if defined (__stub_initscr) || defined (__stub___initscr)
9029 choke me
9030 #else
9031 f = initscr;
9032 #endif
9033
9034   ;
9035   return 0;
9036 }
9037 _ACEOF
9038 rm -f conftest.$ac_objext conftest$ac_exeext
9039 if { (eval echo "$as_me:9039: \"$ac_link\"") >&5
9040   (eval $ac_link) 2>&5
9041   ac_status=$?
9042   echo "$as_me:9042: \$? = $ac_status" >&5
9043   (exit $ac_status); } &&
9044          { ac_try='test -s conftest$ac_exeext'
9045   { (eval echo "$as_me:9045: \"$ac_try\"") >&5
9046   (eval $ac_try) 2>&5
9047   ac_status=$?
9048   echo "$as_me:9048: \$? = $ac_status" >&5
9049   (exit $ac_status); }; }; then
9050   ac_cv_func_initscr=yes
9051 else
9052   echo "$as_me: failed program was:" >&5
9053 cat conftest.$ac_ext >&5
9054 ac_cv_func_initscr=no
9055 fi
9056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9057 fi
9058 echo "$as_me:9058: result: $ac_cv_func_initscr" >&5
9059 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9060 if test $ac_cv_func_initscr = yes; then
9061   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9062 else
9063
9064                 cf_save_LIBS="$LIBS"
9065                 echo "$as_me:9065: checking for initscr in -l$cf_nculib_root" >&5
9066 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9067                 LIBS="-l$cf_nculib_root $LIBS"
9068                 cat >conftest.$ac_ext <<_ACEOF
9069 #line 9069 "configure"
9070 #include "confdefs.h"
9071 #include <${cf_cv_ncurses_header:-curses.h}>
9072 int
9073 main ()
9074 {
9075 initscr()
9076   ;
9077   return 0;
9078 }
9079 _ACEOF
9080 rm -f conftest.$ac_objext conftest$ac_exeext
9081 if { (eval echo "$as_me:9081: \"$ac_link\"") >&5
9082   (eval $ac_link) 2>&5
9083   ac_status=$?
9084   echo "$as_me:9084: \$? = $ac_status" >&5
9085   (exit $ac_status); } &&
9086          { ac_try='test -s conftest$ac_exeext'
9087   { (eval echo "$as_me:9087: \"$ac_try\"") >&5
9088   (eval $ac_try) 2>&5
9089   ac_status=$?
9090   echo "$as_me:9090: \$? = $ac_status" >&5
9091   (exit $ac_status); }; }; then
9092   echo "$as_me:9092: result: yes" >&5
9093 echo "${ECHO_T}yes" >&6
9094                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9095
9096 else
9097   echo "$as_me: failed program was:" >&5
9098 cat conftest.$ac_ext >&5
9099 echo "$as_me:9099: result: no" >&5
9100 echo "${ECHO_T}no" >&6
9101
9102 cf_search=
9103 cf_library_path_list=""
9104 if test -n "${LDFLAGS}${LIBS}" ; then
9105         for cf_library_path in $LDFLAGS $LIBS
9106         do
9107                 case $cf_library_path in #(vi
9108                 -L*)
9109                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9110
9111 test "$cf_library_path" != "NONE" && \
9112 test -d "$cf_library_path" && \
9113  {
9114         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9115         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9116         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9117         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9118         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9119         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
9120 }
9121
9122                         cf_library_path_list="$cf_library_path_list $cf_search"
9123                         ;;
9124                 esac
9125         done
9126 fi
9127
9128 cf_search=
9129
9130 test "/usr" != "$prefix" && \
9131 test -d "/usr" && \
9132 (test $prefix = NONE || test "/usr" != "$prefix") && {
9133         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9134         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9135         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
9136         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9137         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
9138         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9139 }
9140
9141 test "$prefix" != "NONE" && \
9142 test -d "$prefix" && \
9143  {
9144         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9145         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9146         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9147         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9148         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9149         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9150 }
9151
9152 test "/usr/local" != "$prefix" && \
9153 test -d "/usr/local" && \
9154 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9155         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9156         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9157         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9158         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9159         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9160         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9161 }
9162
9163 test "/opt" != "$prefix" && \
9164 test -d "/opt" && \
9165 (test $prefix = NONE || test "/opt" != "$prefix") && {
9166         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9167         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9168         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
9169         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9170         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
9171         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9172 }
9173
9174 test "$HOME" != "$prefix" && \
9175 test -d "$HOME" && \
9176 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9177         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9178         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9179         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9180         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9181         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9182         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9183 }
9184
9185 cf_search="$cf_library_path_list $cf_search"
9186
9187                         for cf_libdir in $cf_search
9188                         do
9189                                 echo "$as_me:9189: checking for -l$cf_nculib_root in $cf_libdir" >&5
9190 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9191                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9192                                 cat >conftest.$ac_ext <<_ACEOF
9193 #line 9193 "configure"
9194 #include "confdefs.h"
9195 #include <${cf_cv_ncurses_header:-curses.h}>
9196 int
9197 main ()
9198 {
9199 initscr()
9200   ;
9201   return 0;
9202 }
9203 _ACEOF
9204 rm -f conftest.$ac_objext conftest$ac_exeext
9205 if { (eval echo "$as_me:9205: \"$ac_link\"") >&5
9206   (eval $ac_link) 2>&5
9207   ac_status=$?
9208   echo "$as_me:9208: \$? = $ac_status" >&5
9209   (exit $ac_status); } &&
9210          { ac_try='test -s conftest$ac_exeext'
9211   { (eval echo "$as_me:9211: \"$ac_try\"") >&5
9212   (eval $ac_try) 2>&5
9213   ac_status=$?
9214   echo "$as_me:9214: \$? = $ac_status" >&5
9215   (exit $ac_status); }; }; then
9216   echo "$as_me:9216: result: yes" >&5
9217 echo "${ECHO_T}yes" >&6
9218                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9219                                          break
9220 else
9221   echo "$as_me: failed program was:" >&5
9222 cat conftest.$ac_ext >&5
9223 echo "$as_me:9223: result: no" >&5
9224 echo "${ECHO_T}no" >&6
9225                                          LIBS="$cf_save_LIBS"
9226 fi
9227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9228                         done
9229
9230 fi
9231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9232
9233 fi
9234
9235 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9236
9237 if test $cf_found_library = no ; then
9238         { { echo "$as_me:9238: error: Cannot link $cf_nculib_root library" >&5
9239 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9240    { (exit 1); exit 1; }; }
9241 fi
9242
9243 fi
9244
9245 if test -n "$cf_ncurses_LIBS" ; then
9246         echo "$as_me:9246: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9247 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9248         cf_ncurses_SAVE="$LIBS"
9249         for p in $cf_ncurses_LIBS ; do
9250                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9251                 if test "$q" != "$LIBS" ; then
9252                         LIBS="$q"
9253                 fi
9254         done
9255         cat >conftest.$ac_ext <<_ACEOF
9256 #line 9256 "configure"
9257 #include "confdefs.h"
9258 #include <${cf_cv_ncurses_header:-curses.h}>
9259 int
9260 main ()
9261 {
9262 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9263   ;
9264   return 0;
9265 }
9266 _ACEOF
9267 rm -f conftest.$ac_objext conftest$ac_exeext
9268 if { (eval echo "$as_me:9268: \"$ac_link\"") >&5
9269   (eval $ac_link) 2>&5
9270   ac_status=$?
9271   echo "$as_me:9271: \$? = $ac_status" >&5
9272   (exit $ac_status); } &&
9273          { ac_try='test -s conftest$ac_exeext'
9274   { (eval echo "$as_me:9274: \"$ac_try\"") >&5
9275   (eval $ac_try) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); }; }; then
9279   echo "$as_me:9279: result: yes" >&5
9280 echo "${ECHO_T}yes" >&6
9281 else
9282   echo "$as_me: failed program was:" >&5
9283 cat conftest.$ac_ext >&5
9284 echo "$as_me:9284: result: no" >&5
9285 echo "${ECHO_T}no" >&6
9286                  LIBS="$cf_ncurses_SAVE"
9287 fi
9288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9289 fi
9290
9291 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9292
9293 cat >>confdefs.h <<EOF
9294 #define $cf_nculib_ROOT 1
9295 EOF
9296
9297 fi
9298
9299         ;;
9300 pdcurses) #(vi
9301
9302 echo "$as_me:9302: checking if you want to use pkg-config" >&5
9303 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9304
9305 # Check whether --with-pkg-config or --without-pkg-config was given.
9306 if test "${with_pkg_config+set}" = set; then
9307   withval="$with_pkg_config"
9308   cf_pkg_config=$withval
9309 else
9310   cf_pkg_config=yes
9311 fi;
9312 echo "$as_me:9312: result: $cf_pkg_config" >&5
9313 echo "${ECHO_T}$cf_pkg_config" >&6
9314
9315 case $cf_pkg_config in #(vi
9316 no) #(vi
9317         PKG_CONFIG=none
9318         ;;
9319 yes) #(vi
9320
9321 if test -n "$ac_tool_prefix"; then
9322   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9323 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9324 echo "$as_me:9324: checking for $ac_word" >&5
9325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9326 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9327   echo $ECHO_N "(cached) $ECHO_C" >&6
9328 else
9329   case $PKG_CONFIG in
9330   [\\/]* | ?:[\\/]*)
9331   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9332   ;;
9333   *)
9334   ac_save_IFS=$IFS; IFS=$ac_path_separator
9335 ac_dummy="$PATH"
9336 for ac_dir in $ac_dummy; do
9337   IFS=$ac_save_IFS
9338   test -z "$ac_dir" && ac_dir=.
9339   if $as_executable_p "$ac_dir/$ac_word"; then
9340    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9341    echo "$as_me:9341: found $ac_dir/$ac_word" >&5
9342    break
9343 fi
9344 done
9345
9346   ;;
9347 esac
9348 fi
9349 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9350
9351 if test -n "$PKG_CONFIG"; then
9352   echo "$as_me:9352: result: $PKG_CONFIG" >&5
9353 echo "${ECHO_T}$PKG_CONFIG" >&6
9354 else
9355   echo "$as_me:9355: result: no" >&5
9356 echo "${ECHO_T}no" >&6
9357 fi
9358
9359 fi
9360 if test -z "$ac_cv_path_PKG_CONFIG"; then
9361   ac_pt_PKG_CONFIG=$PKG_CONFIG
9362   # Extract the first word of "pkg-config", so it can be a program name with args.
9363 set dummy pkg-config; ac_word=$2
9364 echo "$as_me:9364: checking for $ac_word" >&5
9365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9366 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9367   echo $ECHO_N "(cached) $ECHO_C" >&6
9368 else
9369   case $ac_pt_PKG_CONFIG in
9370   [\\/]* | ?:[\\/]*)
9371   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9372   ;;
9373   *)
9374   ac_save_IFS=$IFS; IFS=$ac_path_separator
9375 ac_dummy="$PATH"
9376 for ac_dir in $ac_dummy; do
9377   IFS=$ac_save_IFS
9378   test -z "$ac_dir" && ac_dir=.
9379   if $as_executable_p "$ac_dir/$ac_word"; then
9380    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9381    echo "$as_me:9381: found $ac_dir/$ac_word" >&5
9382    break
9383 fi
9384 done
9385
9386   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9387   ;;
9388 esac
9389 fi
9390 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9391
9392 if test -n "$ac_pt_PKG_CONFIG"; then
9393   echo "$as_me:9393: result: $ac_pt_PKG_CONFIG" >&5
9394 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9395 else
9396   echo "$as_me:9396: result: no" >&5
9397 echo "${ECHO_T}no" >&6
9398 fi
9399
9400   PKG_CONFIG=$ac_pt_PKG_CONFIG
9401 else
9402   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9403 fi
9404
9405         ;;
9406 *)
9407         PKG_CONFIG=$withval
9408         ;;
9409 esac
9410
9411 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9412 if test "$PKG_CONFIG" != none ; then
9413
9414 if test "x$prefix" != xNONE; then
9415   cf_path_syntax="$prefix"
9416 else
9417   cf_path_syntax="$ac_default_prefix"
9418 fi
9419
9420 case ".$PKG_CONFIG" in #(vi
9421 .\$\(*\)*|.\'*\'*) #(vi
9422   ;;
9423 ..|./*|.\\*) #(vi
9424   ;;
9425 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9426   ;;
9427 .\${*prefix}*) #(vi
9428   eval PKG_CONFIG="$PKG_CONFIG"
9429   case ".$PKG_CONFIG" in #(vi
9430   .NONE/*)
9431     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9432     ;;
9433   esac
9434   ;; #(vi
9435 .no|.NONE/*)
9436   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9437   ;;
9438 *)
9439   { { echo "$as_me:9439: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9440 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9441    { (exit 1); exit 1; }; }
9442   ;;
9443 esac
9444
9445 fi
9446
9447 echo "$as_me:9447: checking for X" >&5
9448 echo $ECHO_N "checking for X... $ECHO_C" >&6
9449
9450 # Check whether --with-x or --without-x was given.
9451 if test "${with_x+set}" = set; then
9452   withval="$with_x"
9453
9454 fi;
9455 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9456 if test "x$with_x" = xno; then
9457   # The user explicitly disabled X.
9458   have_x=disabled
9459 else
9460   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9461     # Both variables are already set.
9462     have_x=yes
9463   else
9464     if test "${ac_cv_have_x+set}" = set; then
9465   echo $ECHO_N "(cached) $ECHO_C" >&6
9466 else
9467   # One or both of the vars are not set, and there is no cached value.
9468 ac_x_includes=no ac_x_libraries=no
9469 rm -fr conftest.dir
9470 if mkdir conftest.dir; then
9471   cd conftest.dir
9472   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9473   cat >Imakefile <<'EOF'
9474 acfindx:
9475         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9476 EOF
9477   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9478     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9479     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9480     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9481     for ac_extension in a so sl dylib dll; do
9482       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9483          test -f $ac_im_libdir/libX11.$ac_extension; then
9484         ac_im_usrlibdir=$ac_im_libdir; break
9485       fi
9486     done
9487     # Screen out bogus values from the imake configuration.  They are
9488     # bogus both because they are the default anyway, and because
9489     # using them would break gcc on systems where it needs fixed includes.
9490     case $ac_im_incroot in
9491         /usr/include) ;;
9492         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9493     esac
9494     case $ac_im_usrlibdir in
9495         /usr/lib | /lib) ;;
9496         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9497     esac
9498   fi
9499   cd ..
9500   rm -fr conftest.dir
9501 fi
9502
9503 # Standard set of common directories for X headers.
9504 # Check X11 before X11Rn because it is often a symlink to the current release.
9505 ac_x_header_dirs='
9506 /usr/X11/include
9507 /usr/X11R6/include
9508 /usr/X11R5/include
9509 /usr/X11R4/include
9510
9511 /usr/include/X11
9512 /usr/include/X11R6
9513 /usr/include/X11R5
9514 /usr/include/X11R4
9515
9516 /usr/local/X11/include
9517 /usr/local/X11R6/include
9518 /usr/local/X11R5/include
9519 /usr/local/X11R4/include
9520
9521 /usr/local/include/X11
9522 /usr/local/include/X11R6
9523 /usr/local/include/X11R5
9524 /usr/local/include/X11R4
9525
9526 /usr/X386/include
9527 /usr/x386/include
9528 /usr/XFree86/include/X11
9529
9530 /usr/include
9531 /usr/local/include
9532 /usr/unsupported/include
9533 /usr/athena/include
9534 /usr/local/x11r5/include
9535 /usr/lpp/Xamples/include
9536
9537 /usr/openwin/include
9538 /usr/openwin/share/include'
9539
9540 if test "$ac_x_includes" = no; then
9541   # Guess where to find include files, by looking for Intrinsic.h.
9542   # First, try using that file with no special directory specified.
9543   cat >conftest.$ac_ext <<_ACEOF
9544 #line 9544 "configure"
9545 #include "confdefs.h"
9546 #include <X11/Intrinsic.h>
9547 _ACEOF
9548 if { (eval echo "$as_me:9548: \"$ac_cpp conftest.$ac_ext\"") >&5
9549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9550   ac_status=$?
9551   egrep -v '^ *\+' conftest.er1 >conftest.err
9552   rm -f conftest.er1
9553   cat conftest.err >&5
9554   echo "$as_me:9554: \$? = $ac_status" >&5
9555   (exit $ac_status); } >/dev/null; then
9556   if test -s conftest.err; then
9557     ac_cpp_err=$ac_c_preproc_warn_flag
9558   else
9559     ac_cpp_err=
9560   fi
9561 else
9562   ac_cpp_err=yes
9563 fi
9564 if test -z "$ac_cpp_err"; then
9565   # We can compile using X headers with no special include directory.
9566 ac_x_includes=
9567 else
9568   echo "$as_me: failed program was:" >&5
9569   cat conftest.$ac_ext >&5
9570   for ac_dir in $ac_x_header_dirs; do
9571   if test -r "$ac_dir/X11/Intrinsic.h"; then
9572     ac_x_includes=$ac_dir
9573     break
9574   fi
9575 done
9576 fi
9577 rm -f conftest.err conftest.$ac_ext
9578 fi # $ac_x_includes = no
9579
9580 if test "$ac_x_libraries" = no; then
9581   # Check for the libraries.
9582   # See if we find them without any special options.
9583   # Don't add to $LIBS permanently.
9584   ac_save_LIBS=$LIBS
9585   LIBS="-lXt $LIBS"
9586   cat >conftest.$ac_ext <<_ACEOF
9587 #line 9587 "configure"
9588 #include "confdefs.h"
9589 #include <X11/Intrinsic.h>
9590 int
9591 main ()
9592 {
9593 XtMalloc (0)
9594   ;
9595   return 0;
9596 }
9597 _ACEOF
9598 rm -f conftest.$ac_objext conftest$ac_exeext
9599 if { (eval echo "$as_me:9599: \"$ac_link\"") >&5
9600   (eval $ac_link) 2>&5
9601   ac_status=$?
9602   echo "$as_me:9602: \$? = $ac_status" >&5
9603   (exit $ac_status); } &&
9604          { ac_try='test -s conftest$ac_exeext'
9605   { (eval echo "$as_me:9605: \"$ac_try\"") >&5
9606   (eval $ac_try) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); }; }; then
9610   LIBS=$ac_save_LIBS
9611 # We can link X programs with no special library path.
9612 ac_x_libraries=
9613 else
9614   echo "$as_me: failed program was:" >&5
9615 cat conftest.$ac_ext >&5
9616 LIBS=$ac_save_LIBS
9617 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9618 do
9619   # Don't even attempt the hair of trying to link an X program!
9620   for ac_extension in a so sl dylib dll; do
9621     if test -r $ac_dir/libXt.$ac_extension; then
9622       ac_x_libraries=$ac_dir
9623       break 2
9624     fi
9625   done
9626 done
9627 fi
9628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9629 fi # $ac_x_libraries = no
9630
9631 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9632   # Didn't find X anywhere.  Cache the known absence of X.
9633   ac_cv_have_x="have_x=no"
9634 else
9635   # Record where we found X for the cache.
9636   ac_cv_have_x="have_x=yes \
9637                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9638 fi
9639 fi
9640
9641   fi
9642   eval "$ac_cv_have_x"
9643 fi # $with_x != no
9644
9645 if test "$have_x" != yes; then
9646   echo "$as_me:9646: result: $have_x" >&5
9647 echo "${ECHO_T}$have_x" >&6
9648   no_x=yes
9649 else
9650   # If each of the values was on the command line, it overrides each guess.
9651   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9652   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9653   # Update the cache value to reflect the command line values.
9654   ac_cv_have_x="have_x=yes \
9655                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9656   echo "$as_me:9656: result: libraries $x_libraries, headers $x_includes" >&5
9657 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9658 fi
9659
9660 if test "$no_x" = yes; then
9661   # Not all programs may use this symbol, but it does not hurt to define it.
9662
9663 cat >>confdefs.h <<\EOF
9664 #define X_DISPLAY_MISSING 1
9665 EOF
9666
9667   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9668 else
9669   if test -n "$x_includes"; then
9670     X_CFLAGS="$X_CFLAGS -I$x_includes"
9671   fi
9672
9673   # It would also be nice to do this for all -L options, not just this one.
9674   if test -n "$x_libraries"; then
9675     X_LIBS="$X_LIBS -L$x_libraries"
9676     # For Solaris; some versions of Sun CC require a space after -R and
9677     # others require no space.  Words are not sufficient . . . .
9678     case `(uname -sr) 2>/dev/null` in
9679     "SunOS 5"*)
9680       echo "$as_me:9680: checking whether -R must be followed by a space" >&5
9681 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9682       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9683       cat >conftest.$ac_ext <<_ACEOF
9684 #line 9684 "configure"
9685 #include "confdefs.h"
9686
9687 int
9688 main ()
9689 {
9690
9691   ;
9692   return 0;
9693 }
9694 _ACEOF
9695 rm -f conftest.$ac_objext conftest$ac_exeext
9696 if { (eval echo "$as_me:9696: \"$ac_link\"") >&5
9697   (eval $ac_link) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -s conftest$ac_exeext'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); }; }; then
9707   ac_R_nospace=yes
9708 else
9709   echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 ac_R_nospace=no
9712 fi
9713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9714       if test $ac_R_nospace = yes; then
9715         echo "$as_me:9715: result: no" >&5
9716 echo "${ECHO_T}no" >&6
9717         X_LIBS="$X_LIBS -R$x_libraries"
9718       else
9719         LIBS="$ac_xsave_LIBS -R $x_libraries"
9720         cat >conftest.$ac_ext <<_ACEOF
9721 #line 9721 "configure"
9722 #include "confdefs.h"
9723
9724 int
9725 main ()
9726 {
9727
9728   ;
9729   return 0;
9730 }
9731 _ACEOF
9732 rm -f conftest.$ac_objext conftest$ac_exeext
9733 if { (eval echo "$as_me:9733: \"$ac_link\"") >&5
9734   (eval $ac_link) 2>&5
9735   ac_status=$?
9736   echo "$as_me:9736: \$? = $ac_status" >&5
9737   (exit $ac_status); } &&
9738          { ac_try='test -s conftest$ac_exeext'
9739   { (eval echo "$as_me:9739: \"$ac_try\"") >&5
9740   (eval $ac_try) 2>&5
9741   ac_status=$?
9742   echo "$as_me:9742: \$? = $ac_status" >&5
9743   (exit $ac_status); }; }; then
9744   ac_R_space=yes
9745 else
9746   echo "$as_me: failed program was:" >&5
9747 cat conftest.$ac_ext >&5
9748 ac_R_space=no
9749 fi
9750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9751         if test $ac_R_space = yes; then
9752           echo "$as_me:9752: result: yes" >&5
9753 echo "${ECHO_T}yes" >&6
9754           X_LIBS="$X_LIBS -R $x_libraries"
9755         else
9756           echo "$as_me:9756: result: neither works" >&5
9757 echo "${ECHO_T}neither works" >&6
9758         fi
9759       fi
9760       LIBS=$ac_xsave_LIBS
9761     esac
9762   fi
9763
9764   # Check for system-dependent libraries X programs must link with.
9765   # Do this before checking for the system-independent R6 libraries
9766   # (-lICE), since we may need -lsocket or whatever for X linking.
9767
9768   if test "$ISC" = yes; then
9769     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9770   else
9771     # Martyn Johnson says this is needed for Ultrix, if the X
9772     # libraries were built with DECnet support.  And Karl Berry says
9773     # the Alpha needs dnet_stub (dnet does not exist).
9774     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9775     cat >conftest.$ac_ext <<_ACEOF
9776 #line 9776 "configure"
9777 #include "confdefs.h"
9778
9779 /* Override any gcc2 internal prototype to avoid an error.  */
9780 #ifdef __cplusplus
9781 extern "C"
9782 #endif
9783 /* We use char because int might match the return type of a gcc2
9784    builtin and then its argument prototype would still apply.  */
9785 char XOpenDisplay ();
9786 int
9787 main ()
9788 {
9789 XOpenDisplay ();
9790   ;
9791   return 0;
9792 }
9793 _ACEOF
9794 rm -f conftest.$ac_objext conftest$ac_exeext
9795 if { (eval echo "$as_me:9795: \"$ac_link\"") >&5
9796   (eval $ac_link) 2>&5
9797   ac_status=$?
9798   echo "$as_me:9798: \$? = $ac_status" >&5
9799   (exit $ac_status); } &&
9800          { ac_try='test -s conftest$ac_exeext'
9801   { (eval echo "$as_me:9801: \"$ac_try\"") >&5
9802   (eval $ac_try) 2>&5
9803   ac_status=$?
9804   echo "$as_me:9804: \$? = $ac_status" >&5
9805   (exit $ac_status); }; }; then
9806   :
9807 else
9808   echo "$as_me: failed program was:" >&5
9809 cat conftest.$ac_ext >&5
9810 echo "$as_me:9810: checking for dnet_ntoa in -ldnet" >&5
9811 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9812 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9813   echo $ECHO_N "(cached) $ECHO_C" >&6
9814 else
9815   ac_check_lib_save_LIBS=$LIBS
9816 LIBS="-ldnet  $LIBS"
9817 cat >conftest.$ac_ext <<_ACEOF
9818 #line 9818 "configure"
9819 #include "confdefs.h"
9820
9821 /* Override any gcc2 internal prototype to avoid an error.  */
9822 #ifdef __cplusplus
9823 extern "C"
9824 #endif
9825 /* We use char because int might match the return type of a gcc2
9826    builtin and then its argument prototype would still apply.  */
9827 char dnet_ntoa ();
9828 int
9829 main ()
9830 {
9831 dnet_ntoa ();
9832   ;
9833   return 0;
9834 }
9835 _ACEOF
9836 rm -f conftest.$ac_objext conftest$ac_exeext
9837 if { (eval echo "$as_me:9837: \"$ac_link\"") >&5
9838   (eval $ac_link) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); } &&
9842          { ac_try='test -s conftest$ac_exeext'
9843   { (eval echo "$as_me:9843: \"$ac_try\"") >&5
9844   (eval $ac_try) 2>&5
9845   ac_status=$?
9846   echo "$as_me:9846: \$? = $ac_status" >&5
9847   (exit $ac_status); }; }; then
9848   ac_cv_lib_dnet_dnet_ntoa=yes
9849 else
9850   echo "$as_me: failed program was:" >&5
9851 cat conftest.$ac_ext >&5
9852 ac_cv_lib_dnet_dnet_ntoa=no
9853 fi
9854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9855 LIBS=$ac_check_lib_save_LIBS
9856 fi
9857 echo "$as_me:9857: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9858 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9859 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9860   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9861 fi
9862
9863     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9864       echo "$as_me:9864: checking for dnet_ntoa in -ldnet_stub" >&5
9865 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9866 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9867   echo $ECHO_N "(cached) $ECHO_C" >&6
9868 else
9869   ac_check_lib_save_LIBS=$LIBS
9870 LIBS="-ldnet_stub  $LIBS"
9871 cat >conftest.$ac_ext <<_ACEOF
9872 #line 9872 "configure"
9873 #include "confdefs.h"
9874
9875 /* Override any gcc2 internal prototype to avoid an error.  */
9876 #ifdef __cplusplus
9877 extern "C"
9878 #endif
9879 /* We use char because int might match the return type of a gcc2
9880    builtin and then its argument prototype would still apply.  */
9881 char dnet_ntoa ();
9882 int
9883 main ()
9884 {
9885 dnet_ntoa ();
9886   ;
9887   return 0;
9888 }
9889 _ACEOF
9890 rm -f conftest.$ac_objext conftest$ac_exeext
9891 if { (eval echo "$as_me:9891: \"$ac_link\"") >&5
9892   (eval $ac_link) 2>&5
9893   ac_status=$?
9894   echo "$as_me:9894: \$? = $ac_status" >&5
9895   (exit $ac_status); } &&
9896          { ac_try='test -s conftest$ac_exeext'
9897   { (eval echo "$as_me:9897: \"$ac_try\"") >&5
9898   (eval $ac_try) 2>&5
9899   ac_status=$?
9900   echo "$as_me:9900: \$? = $ac_status" >&5
9901   (exit $ac_status); }; }; then
9902   ac_cv_lib_dnet_stub_dnet_ntoa=yes
9903 else
9904   echo "$as_me: failed program was:" >&5
9905 cat conftest.$ac_ext >&5
9906 ac_cv_lib_dnet_stub_dnet_ntoa=no
9907 fi
9908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9909 LIBS=$ac_check_lib_save_LIBS
9910 fi
9911 echo "$as_me:9911: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9912 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9913 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9914   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9915 fi
9916
9917     fi
9918 fi
9919 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9920     LIBS="$ac_xsave_LIBS"
9921
9922     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9923     # to get the SysV transport functions.
9924     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9925     # needs -lnsl.
9926     # The nsl library prevents programs from opening the X display
9927     # on Irix 5.2, according to T.E. Dickey.
9928     # The functions gethostbyname, getservbyname, and inet_addr are
9929     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9930     echo "$as_me:9930: checking for gethostbyname" >&5
9931 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9932 if test "${ac_cv_func_gethostbyname+set}" = set; then
9933   echo $ECHO_N "(cached) $ECHO_C" >&6
9934 else
9935   cat >conftest.$ac_ext <<_ACEOF
9936 #line 9936 "configure"
9937 #include "confdefs.h"
9938 /* System header to define __stub macros and hopefully few prototypes,
9939     which can conflict with char gethostbyname (); below.  */
9940 #include <assert.h>
9941 /* Override any gcc2 internal prototype to avoid an error.  */
9942 #ifdef __cplusplus
9943 extern "C"
9944 #endif
9945 /* We use char because int might match the return type of a gcc2
9946    builtin and then its argument prototype would still apply.  */
9947 char gethostbyname ();
9948 char (*f) ();
9949
9950 int
9951 main ()
9952 {
9953 /* The GNU C library defines this for functions which it implements
9954     to always fail with ENOSYS.  Some functions are actually named
9955     something starting with __ and the normal name is an alias.  */
9956 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9957 choke me
9958 #else
9959 f = gethostbyname;
9960 #endif
9961
9962   ;
9963   return 0;
9964 }
9965 _ACEOF
9966 rm -f conftest.$ac_objext conftest$ac_exeext
9967 if { (eval echo "$as_me:9967: \"$ac_link\"") >&5
9968   (eval $ac_link) 2>&5
9969   ac_status=$?
9970   echo "$as_me:9970: \$? = $ac_status" >&5
9971   (exit $ac_status); } &&
9972          { ac_try='test -s conftest$ac_exeext'
9973   { (eval echo "$as_me:9973: \"$ac_try\"") >&5
9974   (eval $ac_try) 2>&5
9975   ac_status=$?
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit $ac_status); }; }; then
9978   ac_cv_func_gethostbyname=yes
9979 else
9980   echo "$as_me: failed program was:" >&5
9981 cat conftest.$ac_ext >&5
9982 ac_cv_func_gethostbyname=no
9983 fi
9984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9985 fi
9986 echo "$as_me:9986: result: $ac_cv_func_gethostbyname" >&5
9987 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9988
9989     if test $ac_cv_func_gethostbyname = no; then
9990       echo "$as_me:9990: checking for gethostbyname in -lnsl" >&5
9991 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9992 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9993   echo $ECHO_N "(cached) $ECHO_C" >&6
9994 else
9995   ac_check_lib_save_LIBS=$LIBS
9996 LIBS="-lnsl  $LIBS"
9997 cat >conftest.$ac_ext <<_ACEOF
9998 #line 9998 "configure"
9999 #include "confdefs.h"
10000
10001 /* Override any gcc2 internal prototype to avoid an error.  */
10002 #ifdef __cplusplus
10003 extern "C"
10004 #endif
10005 /* We use char because int might match the return type of a gcc2
10006    builtin and then its argument prototype would still apply.  */
10007 char gethostbyname ();
10008 int
10009 main ()
10010 {
10011 gethostbyname ();
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext conftest$ac_exeext
10017 if { (eval echo "$as_me:10017: \"$ac_link\"") >&5
10018   (eval $ac_link) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest$ac_exeext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028   ac_cv_lib_nsl_gethostbyname=yes
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 ac_cv_lib_nsl_gethostbyname=no
10033 fi
10034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10035 LIBS=$ac_check_lib_save_LIBS
10036 fi
10037 echo "$as_me:10037: result: $ac_cv_lib_nsl_gethostbyname" >&5
10038 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10039 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10040   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10041 fi
10042
10043       if test $ac_cv_lib_nsl_gethostbyname = no; then
10044         echo "$as_me:10044: checking for gethostbyname in -lbsd" >&5
10045 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10046 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10047   echo $ECHO_N "(cached) $ECHO_C" >&6
10048 else
10049   ac_check_lib_save_LIBS=$LIBS
10050 LIBS="-lbsd  $LIBS"
10051 cat >conftest.$ac_ext <<_ACEOF
10052 #line 10052 "configure"
10053 #include "confdefs.h"
10054
10055 /* Override any gcc2 internal prototype to avoid an error.  */
10056 #ifdef __cplusplus
10057 extern "C"
10058 #endif
10059 /* We use char because int might match the return type of a gcc2
10060    builtin and then its argument prototype would still apply.  */
10061 char gethostbyname ();
10062 int
10063 main ()
10064 {
10065 gethostbyname ();
10066   ;
10067   return 0;
10068 }
10069 _ACEOF
10070 rm -f conftest.$ac_objext conftest$ac_exeext
10071 if { (eval echo "$as_me:10071: \"$ac_link\"") >&5
10072   (eval $ac_link) 2>&5
10073   ac_status=$?
10074   echo "$as_me:10074: \$? = $ac_status" >&5
10075   (exit $ac_status); } &&
10076          { ac_try='test -s conftest$ac_exeext'
10077   { (eval echo "$as_me:10077: \"$ac_try\"") >&5
10078   (eval $ac_try) 2>&5
10079   ac_status=$?
10080   echo "$as_me:10080: \$? = $ac_status" >&5
10081   (exit $ac_status); }; }; then
10082   ac_cv_lib_bsd_gethostbyname=yes
10083 else
10084   echo "$as_me: failed program was:" >&5
10085 cat conftest.$ac_ext >&5
10086 ac_cv_lib_bsd_gethostbyname=no
10087 fi
10088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10089 LIBS=$ac_check_lib_save_LIBS
10090 fi
10091 echo "$as_me:10091: result: $ac_cv_lib_bsd_gethostbyname" >&5
10092 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10093 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10094   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10095 fi
10096
10097       fi
10098     fi
10099
10100     # lieder@skyler.mavd.honeywell.com says without -lsocket,
10101     # socket/setsockopt and other routines are undefined under SCO ODT
10102     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
10103     # on later versions), says Simon Leinen: it contains gethostby*
10104     # variants that don't use the nameserver (or something).  -lsocket
10105     # must be given before -lnsl if both are needed.  We assume that
10106     # if connect needs -lnsl, so does gethostbyname.
10107     echo "$as_me:10107: checking for connect" >&5
10108 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10109 if test "${ac_cv_func_connect+set}" = set; then
10110   echo $ECHO_N "(cached) $ECHO_C" >&6
10111 else
10112   cat >conftest.$ac_ext <<_ACEOF
10113 #line 10113 "configure"
10114 #include "confdefs.h"
10115 /* System header to define __stub macros and hopefully few prototypes,
10116     which can conflict with char connect (); below.  */
10117 #include <assert.h>
10118 /* Override any gcc2 internal prototype to avoid an error.  */
10119 #ifdef __cplusplus
10120 extern "C"
10121 #endif
10122 /* We use char because int might match the return type of a gcc2
10123    builtin and then its argument prototype would still apply.  */
10124 char connect ();
10125 char (*f) ();
10126
10127 int
10128 main ()
10129 {
10130 /* The GNU C library defines this for functions which it implements
10131     to always fail with ENOSYS.  Some functions are actually named
10132     something starting with __ and the normal name is an alias.  */
10133 #if defined (__stub_connect) || defined (__stub___connect)
10134 choke me
10135 #else
10136 f = connect;
10137 #endif
10138
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 rm -f conftest.$ac_objext conftest$ac_exeext
10144 if { (eval echo "$as_me:10144: \"$ac_link\"") >&5
10145   (eval $ac_link) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -s conftest$ac_exeext'
10150   { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151   (eval $ac_try) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); }; }; then
10155   ac_cv_func_connect=yes
10156 else
10157   echo "$as_me: failed program was:" >&5
10158 cat conftest.$ac_ext >&5
10159 ac_cv_func_connect=no
10160 fi
10161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10162 fi
10163 echo "$as_me:10163: result: $ac_cv_func_connect" >&5
10164 echo "${ECHO_T}$ac_cv_func_connect" >&6
10165
10166     if test $ac_cv_func_connect = no; then
10167       echo "$as_me:10167: checking for connect in -lsocket" >&5
10168 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10169 if test "${ac_cv_lib_socket_connect+set}" = set; then
10170   echo $ECHO_N "(cached) $ECHO_C" >&6
10171 else
10172   ac_check_lib_save_LIBS=$LIBS
10173 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10174 cat >conftest.$ac_ext <<_ACEOF
10175 #line 10175 "configure"
10176 #include "confdefs.h"
10177
10178 /* Override any gcc2 internal prototype to avoid an error.  */
10179 #ifdef __cplusplus
10180 extern "C"
10181 #endif
10182 /* We use char because int might match the return type of a gcc2
10183    builtin and then its argument prototype would still apply.  */
10184 char connect ();
10185 int
10186 main ()
10187 {
10188 connect ();
10189   ;
10190   return 0;
10191 }
10192 _ACEOF
10193 rm -f conftest.$ac_objext conftest$ac_exeext
10194 if { (eval echo "$as_me:10194: \"$ac_link\"") >&5
10195   (eval $ac_link) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit $ac_status); } &&
10199          { ac_try='test -s conftest$ac_exeext'
10200   { (eval echo "$as_me:10200: \"$ac_try\"") >&5
10201   (eval $ac_try) 2>&5
10202   ac_status=$?
10203   echo "$as_me:10203: \$? = $ac_status" >&5
10204   (exit $ac_status); }; }; then
10205   ac_cv_lib_socket_connect=yes
10206 else
10207   echo "$as_me: failed program was:" >&5
10208 cat conftest.$ac_ext >&5
10209 ac_cv_lib_socket_connect=no
10210 fi
10211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10212 LIBS=$ac_check_lib_save_LIBS
10213 fi
10214 echo "$as_me:10214: result: $ac_cv_lib_socket_connect" >&5
10215 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10216 if test $ac_cv_lib_socket_connect = yes; then
10217   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10218 fi
10219
10220     fi
10221
10222     # Guillermo Gomez says -lposix is necessary on A/UX.
10223     echo "$as_me:10223: checking for remove" >&5
10224 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10225 if test "${ac_cv_func_remove+set}" = set; then
10226   echo $ECHO_N "(cached) $ECHO_C" >&6
10227 else
10228   cat >conftest.$ac_ext <<_ACEOF
10229 #line 10229 "configure"
10230 #include "confdefs.h"
10231 /* System header to define __stub macros and hopefully few prototypes,
10232     which can conflict with char remove (); below.  */
10233 #include <assert.h>
10234 /* Override any gcc2 internal prototype to avoid an error.  */
10235 #ifdef __cplusplus
10236 extern "C"
10237 #endif
10238 /* We use char because int might match the return type of a gcc2
10239    builtin and then its argument prototype would still apply.  */
10240 char remove ();
10241 char (*f) ();
10242
10243 int
10244 main ()
10245 {
10246 /* The GNU C library defines this for functions which it implements
10247     to always fail with ENOSYS.  Some functions are actually named
10248     something starting with __ and the normal name is an alias.  */
10249 #if defined (__stub_remove) || defined (__stub___remove)
10250 choke me
10251 #else
10252 f = remove;
10253 #endif
10254
10255   ;
10256   return 0;
10257 }
10258 _ACEOF
10259 rm -f conftest.$ac_objext conftest$ac_exeext
10260 if { (eval echo "$as_me:10260: \"$ac_link\"") >&5
10261   (eval $ac_link) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); } &&
10265          { ac_try='test -s conftest$ac_exeext'
10266   { (eval echo "$as_me:10266: \"$ac_try\"") >&5
10267   (eval $ac_try) 2>&5
10268   ac_status=$?
10269   echo "$as_me:10269: \$? = $ac_status" >&5
10270   (exit $ac_status); }; }; then
10271   ac_cv_func_remove=yes
10272 else
10273   echo "$as_me: failed program was:" >&5
10274 cat conftest.$ac_ext >&5
10275 ac_cv_func_remove=no
10276 fi
10277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10278 fi
10279 echo "$as_me:10279: result: $ac_cv_func_remove" >&5
10280 echo "${ECHO_T}$ac_cv_func_remove" >&6
10281
10282     if test $ac_cv_func_remove = no; then
10283       echo "$as_me:10283: checking for remove in -lposix" >&5
10284 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10285 if test "${ac_cv_lib_posix_remove+set}" = set; then
10286   echo $ECHO_N "(cached) $ECHO_C" >&6
10287 else
10288   ac_check_lib_save_LIBS=$LIBS
10289 LIBS="-lposix  $LIBS"
10290 cat >conftest.$ac_ext <<_ACEOF
10291 #line 10291 "configure"
10292 #include "confdefs.h"
10293
10294 /* Override any gcc2 internal prototype to avoid an error.  */
10295 #ifdef __cplusplus
10296 extern "C"
10297 #endif
10298 /* We use char because int might match the return type of a gcc2
10299    builtin and then its argument prototype would still apply.  */
10300 char remove ();
10301 int
10302 main ()
10303 {
10304 remove ();
10305   ;
10306   return 0;
10307 }
10308 _ACEOF
10309 rm -f conftest.$ac_objext conftest$ac_exeext
10310 if { (eval echo "$as_me:10310: \"$ac_link\"") >&5
10311   (eval $ac_link) 2>&5
10312   ac_status=$?
10313   echo "$as_me:10313: \$? = $ac_status" >&5
10314   (exit $ac_status); } &&
10315          { ac_try='test -s conftest$ac_exeext'
10316   { (eval echo "$as_me:10316: \"$ac_try\"") >&5
10317   (eval $ac_try) 2>&5
10318   ac_status=$?
10319   echo "$as_me:10319: \$? = $ac_status" >&5
10320   (exit $ac_status); }; }; then
10321   ac_cv_lib_posix_remove=yes
10322 else
10323   echo "$as_me: failed program was:" >&5
10324 cat conftest.$ac_ext >&5
10325 ac_cv_lib_posix_remove=no
10326 fi
10327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10328 LIBS=$ac_check_lib_save_LIBS
10329 fi
10330 echo "$as_me:10330: result: $ac_cv_lib_posix_remove" >&5
10331 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10332 if test $ac_cv_lib_posix_remove = yes; then
10333   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10334 fi
10335
10336     fi
10337
10338     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10339     echo "$as_me:10339: checking for shmat" >&5
10340 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10341 if test "${ac_cv_func_shmat+set}" = set; then
10342   echo $ECHO_N "(cached) $ECHO_C" >&6
10343 else
10344   cat >conftest.$ac_ext <<_ACEOF
10345 #line 10345 "configure"
10346 #include "confdefs.h"
10347 /* System header to define __stub macros and hopefully few prototypes,
10348     which can conflict with char shmat (); below.  */
10349 #include <assert.h>
10350 /* Override any gcc2 internal prototype to avoid an error.  */
10351 #ifdef __cplusplus
10352 extern "C"
10353 #endif
10354 /* We use char because int might match the return type of a gcc2
10355    builtin and then its argument prototype would still apply.  */
10356 char shmat ();
10357 char (*f) ();
10358
10359 int
10360 main ()
10361 {
10362 /* The GNU C library defines this for functions which it implements
10363     to always fail with ENOSYS.  Some functions are actually named
10364     something starting with __ and the normal name is an alias.  */
10365 #if defined (__stub_shmat) || defined (__stub___shmat)
10366 choke me
10367 #else
10368 f = shmat;
10369 #endif
10370
10371   ;
10372   return 0;
10373 }
10374 _ACEOF
10375 rm -f conftest.$ac_objext conftest$ac_exeext
10376 if { (eval echo "$as_me:10376: \"$ac_link\"") >&5
10377   (eval $ac_link) 2>&5
10378   ac_status=$?
10379   echo "$as_me:10379: \$? = $ac_status" >&5
10380   (exit $ac_status); } &&
10381          { ac_try='test -s conftest$ac_exeext'
10382   { (eval echo "$as_me:10382: \"$ac_try\"") >&5
10383   (eval $ac_try) 2>&5
10384   ac_status=$?
10385   echo "$as_me:10385: \$? = $ac_status" >&5
10386   (exit $ac_status); }; }; then
10387   ac_cv_func_shmat=yes
10388 else
10389   echo "$as_me: failed program was:" >&5
10390 cat conftest.$ac_ext >&5
10391 ac_cv_func_shmat=no
10392 fi
10393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10394 fi
10395 echo "$as_me:10395: result: $ac_cv_func_shmat" >&5
10396 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10397
10398     if test $ac_cv_func_shmat = no; then
10399       echo "$as_me:10399: checking for shmat in -lipc" >&5
10400 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10401 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10402   echo $ECHO_N "(cached) $ECHO_C" >&6
10403 else
10404   ac_check_lib_save_LIBS=$LIBS
10405 LIBS="-lipc  $LIBS"
10406 cat >conftest.$ac_ext <<_ACEOF
10407 #line 10407 "configure"
10408 #include "confdefs.h"
10409
10410 /* Override any gcc2 internal prototype to avoid an error.  */
10411 #ifdef __cplusplus
10412 extern "C"
10413 #endif
10414 /* We use char because int might match the return type of a gcc2
10415    builtin and then its argument prototype would still apply.  */
10416 char shmat ();
10417 int
10418 main ()
10419 {
10420 shmat ();
10421   ;
10422   return 0;
10423 }
10424 _ACEOF
10425 rm -f conftest.$ac_objext conftest$ac_exeext
10426 if { (eval echo "$as_me:10426: \"$ac_link\"") >&5
10427   (eval $ac_link) 2>&5
10428   ac_status=$?
10429   echo "$as_me:10429: \$? = $ac_status" >&5
10430   (exit $ac_status); } &&
10431          { ac_try='test -s conftest$ac_exeext'
10432   { (eval echo "$as_me:10432: \"$ac_try\"") >&5
10433   (eval $ac_try) 2>&5
10434   ac_status=$?
10435   echo "$as_me:10435: \$? = $ac_status" >&5
10436   (exit $ac_status); }; }; then
10437   ac_cv_lib_ipc_shmat=yes
10438 else
10439   echo "$as_me: failed program was:" >&5
10440 cat conftest.$ac_ext >&5
10441 ac_cv_lib_ipc_shmat=no
10442 fi
10443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10444 LIBS=$ac_check_lib_save_LIBS
10445 fi
10446 echo "$as_me:10446: result: $ac_cv_lib_ipc_shmat" >&5
10447 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10448 if test $ac_cv_lib_ipc_shmat = yes; then
10449   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10450 fi
10451
10452     fi
10453   fi
10454
10455   # Check for libraries that X11R6 Xt/Xaw programs need.
10456   ac_save_LDFLAGS=$LDFLAGS
10457   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10458   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10459   # check for ICE first), but we must link in the order -lSM -lICE or
10460   # we get undefined symbols.  So assume we have SM if we have ICE.
10461   # These have to be linked with before -lX11, unlike the other
10462   # libraries we check for below, so use a different variable.
10463   # John Interrante, Karl Berry
10464   echo "$as_me:10464: checking for IceConnectionNumber in -lICE" >&5
10465 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10466 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10467   echo $ECHO_N "(cached) $ECHO_C" >&6
10468 else
10469   ac_check_lib_save_LIBS=$LIBS
10470 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10471 cat >conftest.$ac_ext <<_ACEOF
10472 #line 10472 "configure"
10473 #include "confdefs.h"
10474
10475 /* Override any gcc2 internal prototype to avoid an error.  */
10476 #ifdef __cplusplus
10477 extern "C"
10478 #endif
10479 /* We use char because int might match the return type of a gcc2
10480    builtin and then its argument prototype would still apply.  */
10481 char IceConnectionNumber ();
10482 int
10483 main ()
10484 {
10485 IceConnectionNumber ();
10486   ;
10487   return 0;
10488 }
10489 _ACEOF
10490 rm -f conftest.$ac_objext conftest$ac_exeext
10491 if { (eval echo "$as_me:10491: \"$ac_link\"") >&5
10492   (eval $ac_link) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit $ac_status); } &&
10496          { ac_try='test -s conftest$ac_exeext'
10497   { (eval echo "$as_me:10497: \"$ac_try\"") >&5
10498   (eval $ac_try) 2>&5
10499   ac_status=$?
10500   echo "$as_me:10500: \$? = $ac_status" >&5
10501   (exit $ac_status); }; }; then
10502   ac_cv_lib_ICE_IceConnectionNumber=yes
10503 else
10504   echo "$as_me: failed program was:" >&5
10505 cat conftest.$ac_ext >&5
10506 ac_cv_lib_ICE_IceConnectionNumber=no
10507 fi
10508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10509 LIBS=$ac_check_lib_save_LIBS
10510 fi
10511 echo "$as_me:10511: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10512 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10513 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10514   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10515 fi
10516
10517   LDFLAGS=$ac_save_LDFLAGS
10518
10519 fi
10520
10521 cf_x_athena=${cf_x_athena:-Xaw}
10522
10523 echo "$as_me:10523: checking if you want to link with Xaw 3d library" >&5
10524 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10525 withval=
10526
10527 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10528 if test "${with_Xaw3d+set}" = set; then
10529   withval="$with_Xaw3d"
10530
10531 fi;
10532 if test "$withval" = yes ; then
10533         cf_x_athena=Xaw3d
10534         echo "$as_me:10534: result: yes" >&5
10535 echo "${ECHO_T}yes" >&6
10536 else
10537         echo "$as_me:10537: result: no" >&5
10538 echo "${ECHO_T}no" >&6
10539 fi
10540
10541 echo "$as_me:10541: checking if you want to link with neXT Athena library" >&5
10542 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10543 withval=
10544
10545 # Check whether --with-neXtaw or --without-neXtaw was given.
10546 if test "${with_neXtaw+set}" = set; then
10547   withval="$with_neXtaw"
10548
10549 fi;
10550 if test "$withval" = yes ; then
10551         cf_x_athena=neXtaw
10552         echo "$as_me:10552: result: yes" >&5
10553 echo "${ECHO_T}yes" >&6
10554 else
10555         echo "$as_me:10555: result: no" >&5
10556 echo "${ECHO_T}no" >&6
10557 fi
10558
10559 echo "$as_me:10559: checking if you want to link with Athena-Plus library" >&5
10560 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10561 withval=
10562
10563 # Check whether --with-XawPlus or --without-XawPlus was given.
10564 if test "${with_XawPlus+set}" = set; then
10565   withval="$with_XawPlus"
10566
10567 fi;
10568 if test "$withval" = yes ; then
10569         cf_x_athena=XawPlus
10570         echo "$as_me:10570: result: yes" >&5
10571 echo "${ECHO_T}yes" >&6
10572 else
10573         echo "$as_me:10573: result: no" >&5
10574 echo "${ECHO_T}no" >&6
10575 fi
10576
10577 cf_x_athena_lib=""
10578
10579 if test "$PKG_CONFIG" != none ; then
10580         cf_athena_list=
10581         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10582         for cf_athena_pkg in \
10583                 $cf_athena_list \
10584                 ${cf_x_athena} \
10585                 ${cf_x_athena}-devel \
10586                 lib${cf_x_athena} \
10587                 lib${cf_x_athena}-devel
10588         do
10589
10590 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10591         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
10592
10593 echo "${as_me:-configure}:10593: testing found package $cf_athena_pkg ..." 1>&5
10594
10595         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10596         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10597         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10598
10599 echo "${as_me:-configure}:10599: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10600
10601         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10602
10603 echo "${as_me:-configure}:10603: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10604
10605 cf_fix_cppflags=no
10606 cf_new_cflags=
10607 cf_new_cppflags=
10608 cf_new_extra_cppflags=
10609
10610 for cf_add_cflags in $cf_pkgconfig_incs
10611 do
10612 case $cf_fix_cppflags in
10613 no)
10614         case $cf_add_cflags in #(vi
10615         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10616                 case $cf_add_cflags in
10617                 -D*)
10618                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10619
10620                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10621                                 && test -z "${cf_tst_cflags}" \
10622                                 && cf_fix_cppflags=yes
10623
10624                         if test $cf_fix_cppflags = yes ; then
10625                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10626                                 continue
10627                         elif test "${cf_tst_cflags}" = "\"'" ; then
10628                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10629                                 continue
10630                         fi
10631                         ;;
10632                 esac
10633                 case "$CPPFLAGS" in
10634                 *$cf_add_cflags) #(vi
10635                         ;;
10636                 *) #(vi
10637                         case $cf_add_cflags in #(vi
10638                         -D*)
10639                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10640
10641 CPPFLAGS=`echo "$CPPFLAGS" | \
10642         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10643                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10644
10645                                 ;;
10646                         esac
10647                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10648                         ;;
10649                 esac
10650                 ;;
10651         *)
10652                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10653                 ;;
10654         esac
10655         ;;
10656 yes)
10657         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10658
10659         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10660
10661         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10662                 && test -z "${cf_tst_cflags}" \
10663                 && cf_fix_cppflags=no
10664         ;;
10665 esac
10666 done
10667
10668 if test -n "$cf_new_cflags" ; then
10669
10670         CFLAGS="$CFLAGS $cf_new_cflags"
10671 fi
10672
10673 if test -n "$cf_new_cppflags" ; then
10674
10675         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10676 fi
10677
10678 if test -n "$cf_new_extra_cppflags" ; then
10679
10680         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10681 fi
10682
10683         LIBS="$cf_pkgconfig_libs $LIBS"
10684
10685                         cf_x_athena_lib="$cf_pkgconfig_libs"
10686
10687 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10688
10689                         cat >>confdefs.h <<EOF
10690 #define $cf_x_athena_LIBS 1
10691 EOF
10692
10693 echo "$as_me:10693: checking for usable $cf_x_athena/Xmu package" >&5
10694 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10695 if test "${cf_cv_xaw_compat+set}" = set; then
10696   echo $ECHO_N "(cached) $ECHO_C" >&6
10697 else
10698
10699 cat >conftest.$ac_ext <<_ACEOF
10700 #line 10700 "configure"
10701 #include "confdefs.h"
10702
10703 #include <X11/Xmu/CharSet.h>
10704
10705 int
10706 main ()
10707 {
10708
10709 int check = XmuCompareISOLatin1("big", "small")
10710
10711   ;
10712   return 0;
10713 }
10714 _ACEOF
10715 rm -f conftest.$ac_objext conftest$ac_exeext
10716 if { (eval echo "$as_me:10716: \"$ac_link\"") >&5
10717   (eval $ac_link) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit $ac_status); } &&
10721          { ac_try='test -s conftest$ac_exeext'
10722   { (eval echo "$as_me:10722: \"$ac_try\"") >&5
10723   (eval $ac_try) 2>&5
10724   ac_status=$?
10725   echo "$as_me:10725: \$? = $ac_status" >&5
10726   (exit $ac_status); }; }; then
10727   cf_cv_xaw_compat=yes
10728 else
10729   echo "$as_me: failed program was:" >&5
10730 cat conftest.$ac_ext >&5
10731 cf_cv_xaw_compat=no
10732 fi
10733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10734 fi
10735 echo "$as_me:10735: result: $cf_cv_xaw_compat" >&5
10736 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10737
10738                         if test "$cf_cv_xaw_compat" = no
10739                         then
10740                                 # workaround for broken ".pc" files...
10741                                 case "$cf_x_athena_lib" in #(vi
10742                                 *-lXmu*) #(vi
10743                                         ;;
10744                                 *)
10745                                         test -n "$verbose" && echo "    work around broken package" 1>&6
10746
10747 echo "${as_me:-configure}:10747: testing work around broken package ..." 1>&5
10748
10749 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10750         test -n "$verbose" && echo "    found package xmu" 1>&6
10751
10752 echo "${as_me:-configure}:10752: testing found package xmu ..." 1>&5
10753
10754         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10755         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10756         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10757
10758 echo "${as_me:-configure}:10758: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10759
10760         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10761
10762 echo "${as_me:-configure}:10762: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10763
10764 cf_fix_cppflags=no
10765 cf_new_cflags=
10766 cf_new_cppflags=
10767 cf_new_extra_cppflags=
10768
10769 for cf_add_cflags in $cf_pkgconfig_incs
10770 do
10771 case $cf_fix_cppflags in
10772 no)
10773         case $cf_add_cflags in #(vi
10774         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10775                 case $cf_add_cflags in
10776                 -D*)
10777                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10778
10779                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10780                                 && test -z "${cf_tst_cflags}" \
10781                                 && cf_fix_cppflags=yes
10782
10783                         if test $cf_fix_cppflags = yes ; then
10784                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10785                                 continue
10786                         elif test "${cf_tst_cflags}" = "\"'" ; then
10787                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10788                                 continue
10789                         fi
10790                         ;;
10791                 esac
10792                 case "$CPPFLAGS" in
10793                 *$cf_add_cflags) #(vi
10794                         ;;
10795                 *) #(vi
10796                         case $cf_add_cflags in #(vi
10797                         -D*)
10798                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10799
10800 CPPFLAGS=`echo "$CPPFLAGS" | \
10801         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10802                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10803
10804                                 ;;
10805                         esac
10806                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10807                         ;;
10808                 esac
10809                 ;;
10810         *)
10811                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10812                 ;;
10813         esac
10814         ;;
10815 yes)
10816         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10817
10818         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10819
10820         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10821                 && test -z "${cf_tst_cflags}" \
10822                 && cf_fix_cppflags=no
10823         ;;
10824 esac
10825 done
10826
10827 if test -n "$cf_new_cflags" ; then
10828
10829         CFLAGS="$CFLAGS $cf_new_cflags"
10830 fi
10831
10832 if test -n "$cf_new_cppflags" ; then
10833
10834         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10835 fi
10836
10837 if test -n "$cf_new_extra_cppflags" ; then
10838
10839         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10840 fi
10841
10842         LIBS="$cf_pkgconfig_libs $LIBS"
10843         :
10844 else
10845
10846 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10847
10848 echo "${as_me:-configure}:10848: testing ...before $LIBS ..." 1>&5
10849
10850 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
10851 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10852
10853 echo "${as_me:-configure}:10853: testing ...after  $LIBS ..." 1>&5
10854
10855 fi
10856
10857                                         ;;
10858                                 esac
10859                         fi
10860
10861                         break
10862 else
10863         :
10864 fi
10865
10866         done
10867 fi
10868
10869 if test -z "$cf_x_athena_lib" ; then
10870
10871 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10872         test -n "$verbose" && echo "    found package Xext" 1>&6
10873
10874 echo "${as_me:-configure}:10874: testing found package Xext ..." 1>&5
10875
10876         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10877         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
10878         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10879
10880 echo "${as_me:-configure}:10880: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10881
10882         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10883
10884 echo "${as_me:-configure}:10884: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10885
10886 cf_fix_cppflags=no
10887 cf_new_cflags=
10888 cf_new_cppflags=
10889 cf_new_extra_cppflags=
10890
10891 for cf_add_cflags in $cf_pkgconfig_incs
10892 do
10893 case $cf_fix_cppflags in
10894 no)
10895         case $cf_add_cflags in #(vi
10896         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10897                 case $cf_add_cflags in
10898                 -D*)
10899                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10900
10901                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10902                                 && test -z "${cf_tst_cflags}" \
10903                                 && cf_fix_cppflags=yes
10904
10905                         if test $cf_fix_cppflags = yes ; then
10906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10907                                 continue
10908                         elif test "${cf_tst_cflags}" = "\"'" ; then
10909                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10910                                 continue
10911                         fi
10912                         ;;
10913                 esac
10914                 case "$CPPFLAGS" in
10915                 *$cf_add_cflags) #(vi
10916                         ;;
10917                 *) #(vi
10918                         case $cf_add_cflags in #(vi
10919                         -D*)
10920                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10921
10922 CPPFLAGS=`echo "$CPPFLAGS" | \
10923         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10924                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10925
10926                                 ;;
10927                         esac
10928                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10929                         ;;
10930                 esac
10931                 ;;
10932         *)
10933                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10934                 ;;
10935         esac
10936         ;;
10937 yes)
10938         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10939
10940         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10941
10942         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10943                 && test -z "${cf_tst_cflags}" \
10944                 && cf_fix_cppflags=no
10945         ;;
10946 esac
10947 done
10948
10949 if test -n "$cf_new_cflags" ; then
10950
10951         CFLAGS="$CFLAGS $cf_new_cflags"
10952 fi
10953
10954 if test -n "$cf_new_cppflags" ; then
10955
10956         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10957 fi
10958
10959 if test -n "$cf_new_extra_cppflags" ; then
10960
10961         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10962 fi
10963
10964         LIBS="$cf_pkgconfig_libs $LIBS"
10965         :
10966 else
10967
10968         echo "$as_me:10968: checking for XextCreateExtension in -lXext" >&5
10969 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10970 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10971   echo $ECHO_N "(cached) $ECHO_C" >&6
10972 else
10973   ac_check_lib_save_LIBS=$LIBS
10974 LIBS="-lXext  $LIBS"
10975 cat >conftest.$ac_ext <<_ACEOF
10976 #line 10976 "configure"
10977 #include "confdefs.h"
10978
10979 /* Override any gcc2 internal prototype to avoid an error.  */
10980 #ifdef __cplusplus
10981 extern "C"
10982 #endif
10983 /* We use char because int might match the return type of a gcc2
10984    builtin and then its argument prototype would still apply.  */
10985 char XextCreateExtension ();
10986 int
10987 main ()
10988 {
10989 XextCreateExtension ();
10990   ;
10991   return 0;
10992 }
10993 _ACEOF
10994 rm -f conftest.$ac_objext conftest$ac_exeext
10995 if { (eval echo "$as_me:10995: \"$ac_link\"") >&5
10996   (eval $ac_link) 2>&5
10997   ac_status=$?
10998   echo "$as_me:10998: \$? = $ac_status" >&5
10999   (exit $ac_status); } &&
11000          { ac_try='test -s conftest$ac_exeext'
11001   { (eval echo "$as_me:11001: \"$ac_try\"") >&5
11002   (eval $ac_try) 2>&5
11003   ac_status=$?
11004   echo "$as_me:11004: \$? = $ac_status" >&5
11005   (exit $ac_status); }; }; then
11006   ac_cv_lib_Xext_XextCreateExtension=yes
11007 else
11008   echo "$as_me: failed program was:" >&5
11009 cat conftest.$ac_ext >&5
11010 ac_cv_lib_Xext_XextCreateExtension=no
11011 fi
11012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11013 LIBS=$ac_check_lib_save_LIBS
11014 fi
11015 echo "$as_me:11015: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11016 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11017 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11018   LIBS="-lXext $LIBS"
11019 fi
11020
11021 fi
11022
11023 cf_have_X_LIBS=no
11024
11025 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11026         test -n "$verbose" && echo "    found package xt" 1>&6
11027
11028 echo "${as_me:-configure}:11028: testing found package xt ..." 1>&5
11029
11030         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11031         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11032         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11033
11034 echo "${as_me:-configure}:11034: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11035
11036         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
11037
11038 echo "${as_me:-configure}:11038: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11039
11040 cf_fix_cppflags=no
11041 cf_new_cflags=
11042 cf_new_cppflags=
11043 cf_new_extra_cppflags=
11044
11045 for cf_add_cflags in $cf_pkgconfig_incs
11046 do
11047 case $cf_fix_cppflags in
11048 no)
11049         case $cf_add_cflags in #(vi
11050         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11051                 case $cf_add_cflags in
11052                 -D*)
11053                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11054
11055                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11056                                 && test -z "${cf_tst_cflags}" \
11057                                 && cf_fix_cppflags=yes
11058
11059                         if test $cf_fix_cppflags = yes ; then
11060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11061                                 continue
11062                         elif test "${cf_tst_cflags}" = "\"'" ; then
11063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11064                                 continue
11065                         fi
11066                         ;;
11067                 esac
11068                 case "$CPPFLAGS" in
11069                 *$cf_add_cflags) #(vi
11070                         ;;
11071                 *) #(vi
11072                         case $cf_add_cflags in #(vi
11073                         -D*)
11074                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11075
11076 CPPFLAGS=`echo "$CPPFLAGS" | \
11077         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11078                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11079
11080                                 ;;
11081                         esac
11082                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11083                         ;;
11084                 esac
11085                 ;;
11086         *)
11087                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11088                 ;;
11089         esac
11090         ;;
11091 yes)
11092         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11093
11094         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11095
11096         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11097                 && test -z "${cf_tst_cflags}" \
11098                 && cf_fix_cppflags=no
11099         ;;
11100 esac
11101 done
11102
11103 if test -n "$cf_new_cflags" ; then
11104
11105         CFLAGS="$CFLAGS $cf_new_cflags"
11106 fi
11107
11108 if test -n "$cf_new_cppflags" ; then
11109
11110         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11111 fi
11112
11113 if test -n "$cf_new_extra_cppflags" ; then
11114
11115         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11116 fi
11117
11118         LIBS="$cf_pkgconfig_libs $LIBS"
11119
11120         case "x$LIBS" in #(vi
11121         *-lX11*) #(vi
11122                 ;;
11123         *)
11124 # we have an "xt" package, but it may omit Xt's dependency on X11
11125 echo "$as_me:11125: checking for usable X dependency" >&5
11126 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11127 if test "${cf_cv_xt_x11_compat+set}" = set; then
11128   echo $ECHO_N "(cached) $ECHO_C" >&6
11129 else
11130
11131 cat >conftest.$ac_ext <<_ACEOF
11132 #line 11132 "configure"
11133 #include "confdefs.h"
11134
11135 #include <X11/Xlib.h>
11136
11137 int
11138 main ()
11139 {
11140
11141         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11142         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11143         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11144         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11145
11146   ;
11147   return 0;
11148 }
11149 _ACEOF
11150 rm -f conftest.$ac_objext conftest$ac_exeext
11151 if { (eval echo "$as_me:11151: \"$ac_link\"") >&5
11152   (eval $ac_link) 2>&5
11153   ac_status=$?
11154   echo "$as_me:11154: \$? = $ac_status" >&5
11155   (exit $ac_status); } &&
11156          { ac_try='test -s conftest$ac_exeext'
11157   { (eval echo "$as_me:11157: \"$ac_try\"") >&5
11158   (eval $ac_try) 2>&5
11159   ac_status=$?
11160   echo "$as_me:11160: \$? = $ac_status" >&5
11161   (exit $ac_status); }; }; then
11162   cf_cv_xt_x11_compat=yes
11163 else
11164   echo "$as_me: failed program was:" >&5
11165 cat conftest.$ac_ext >&5
11166 cf_cv_xt_x11_compat=no
11167 fi
11168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11169 fi
11170 echo "$as_me:11170: result: $cf_cv_xt_x11_compat" >&5
11171 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11172                 if test "$cf_cv_xt_x11_compat" = no
11173                 then
11174                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11175
11176 echo "${as_me:-configure}:11176: testing work around broken X11 dependency ..." 1>&5
11177
11178                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11179
11180 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11181         test -n "$verbose" && echo "    found package x11" 1>&6
11182
11183 echo "${as_me:-configure}:11183: testing found package x11 ..." 1>&5
11184
11185         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11186         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11187         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11188
11189 echo "${as_me:-configure}:11189: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11190
11191         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11192
11193 echo "${as_me:-configure}:11193: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11194
11195 cf_fix_cppflags=no
11196 cf_new_cflags=
11197 cf_new_cppflags=
11198 cf_new_extra_cppflags=
11199
11200 for cf_add_cflags in $cf_pkgconfig_incs
11201 do
11202 case $cf_fix_cppflags in
11203 no)
11204         case $cf_add_cflags in #(vi
11205         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11206                 case $cf_add_cflags in
11207                 -D*)
11208                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11209
11210                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11211                                 && test -z "${cf_tst_cflags}" \
11212                                 && cf_fix_cppflags=yes
11213
11214                         if test $cf_fix_cppflags = yes ; then
11215                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11216                                 continue
11217                         elif test "${cf_tst_cflags}" = "\"'" ; then
11218                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11219                                 continue
11220                         fi
11221                         ;;
11222                 esac
11223                 case "$CPPFLAGS" in
11224                 *$cf_add_cflags) #(vi
11225                         ;;
11226                 *) #(vi
11227                         case $cf_add_cflags in #(vi
11228                         -D*)
11229                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11230
11231 CPPFLAGS=`echo "$CPPFLAGS" | \
11232         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11233                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11234
11235                                 ;;
11236                         esac
11237                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11238                         ;;
11239                 esac
11240                 ;;
11241         *)
11242                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11243                 ;;
11244         esac
11245         ;;
11246 yes)
11247         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11248
11249         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11250
11251         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11252                 && test -z "${cf_tst_cflags}" \
11253                 && cf_fix_cppflags=no
11254         ;;
11255 esac
11256 done
11257
11258 if test -n "$cf_new_cflags" ; then
11259
11260         CFLAGS="$CFLAGS $cf_new_cflags"
11261 fi
11262
11263 if test -n "$cf_new_cppflags" ; then
11264
11265         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11266 fi
11267
11268 if test -n "$cf_new_extra_cppflags" ; then
11269
11270         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11271 fi
11272
11273         LIBS="$cf_pkgconfig_libs $LIBS"
11274         :
11275 else
11276
11277 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11278
11279 echo "${as_me:-configure}:11279: testing ...before $LIBS ..." 1>&5
11280
11281 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
11282 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11283
11284 echo "${as_me:-configure}:11284: testing ...after  $LIBS ..." 1>&5
11285
11286 fi
11287
11288                 fi
11289                 ;;
11290         esac
11291
11292 echo "$as_me:11292: checking for usable X Toolkit package" >&5
11293 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11294 if test "${cf_cv_xt_ice_compat+set}" = set; then
11295   echo $ECHO_N "(cached) $ECHO_C" >&6
11296 else
11297
11298 cat >conftest.$ac_ext <<_ACEOF
11299 #line 11299 "configure"
11300 #include "confdefs.h"
11301
11302 #include <X11/Shell.h>
11303
11304 int
11305 main ()
11306 {
11307 int num = IceConnectionNumber(0)
11308
11309   ;
11310   return 0;
11311 }
11312 _ACEOF
11313 rm -f conftest.$ac_objext conftest$ac_exeext
11314 if { (eval echo "$as_me:11314: \"$ac_link\"") >&5
11315   (eval $ac_link) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit $ac_status); } &&
11319          { ac_try='test -s conftest$ac_exeext'
11320   { (eval echo "$as_me:11320: \"$ac_try\"") >&5
11321   (eval $ac_try) 2>&5
11322   ac_status=$?
11323   echo "$as_me:11323: \$? = $ac_status" >&5
11324   (exit $ac_status); }; }; then
11325   cf_cv_xt_ice_compat=yes
11326 else
11327   echo "$as_me: failed program was:" >&5
11328 cat conftest.$ac_ext >&5
11329 cf_cv_xt_ice_compat=no
11330 fi
11331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11332 fi
11333 echo "$as_me:11333: result: $cf_cv_xt_ice_compat" >&5
11334 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11335
11336         if test "$cf_cv_xt_ice_compat" = no
11337         then
11338                 # workaround for broken ".pc" files used for X Toolkit.
11339                 case "x$X_PRE_LIBS" in #(vi
11340                 *-lICE*)
11341                         case "x$LIBS" in #(vi
11342                         *-lICE*) #(vi
11343                                 ;;
11344                         *)
11345                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11346
11347 echo "${as_me:-configure}:11347: testing work around broken ICE dependency ..." 1>&5
11348
11349 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11350         test -n "$verbose" && echo "    found package ice" 1>&6
11351
11352 echo "${as_me:-configure}:11352: testing found package ice ..." 1>&5
11353
11354         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11355         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11356         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11357
11358 echo "${as_me:-configure}:11358: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11359
11360         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11361
11362 echo "${as_me:-configure}:11362: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11363
11364 cf_fix_cppflags=no
11365 cf_new_cflags=
11366 cf_new_cppflags=
11367 cf_new_extra_cppflags=
11368
11369 for cf_add_cflags in $cf_pkgconfig_incs
11370 do
11371 case $cf_fix_cppflags in
11372 no)
11373         case $cf_add_cflags in #(vi
11374         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11375                 case $cf_add_cflags in
11376                 -D*)
11377                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11378
11379                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11380                                 && test -z "${cf_tst_cflags}" \
11381                                 && cf_fix_cppflags=yes
11382
11383                         if test $cf_fix_cppflags = yes ; then
11384                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11385                                 continue
11386                         elif test "${cf_tst_cflags}" = "\"'" ; then
11387                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11388                                 continue
11389                         fi
11390                         ;;
11391                 esac
11392                 case "$CPPFLAGS" in
11393                 *$cf_add_cflags) #(vi
11394                         ;;
11395                 *) #(vi
11396                         case $cf_add_cflags in #(vi
11397                         -D*)
11398                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11399
11400 CPPFLAGS=`echo "$CPPFLAGS" | \
11401         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11402                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11403
11404                                 ;;
11405                         esac
11406                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11407                         ;;
11408                 esac
11409                 ;;
11410         *)
11411                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11412                 ;;
11413         esac
11414         ;;
11415 yes)
11416         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11417
11418         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11419
11420         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11421                 && test -z "${cf_tst_cflags}" \
11422                 && cf_fix_cppflags=no
11423         ;;
11424 esac
11425 done
11426
11427 if test -n "$cf_new_cflags" ; then
11428
11429         CFLAGS="$CFLAGS $cf_new_cflags"
11430 fi
11431
11432 if test -n "$cf_new_cppflags" ; then
11433
11434         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11435 fi
11436
11437 if test -n "$cf_new_extra_cppflags" ; then
11438
11439         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11440 fi
11441
11442         LIBS="$cf_pkgconfig_libs $LIBS"
11443
11444 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11445         test -n "$verbose" && echo "    found package sm" 1>&6
11446
11447 echo "${as_me:-configure}:11447: testing found package sm ..." 1>&5
11448
11449         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11450         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11451         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11452
11453 echo "${as_me:-configure}:11453: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11454
11455         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11456
11457 echo "${as_me:-configure}:11457: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11458
11459 cf_fix_cppflags=no
11460 cf_new_cflags=
11461 cf_new_cppflags=
11462 cf_new_extra_cppflags=
11463
11464 for cf_add_cflags in $cf_pkgconfig_incs
11465 do
11466 case $cf_fix_cppflags in
11467 no)
11468         case $cf_add_cflags in #(vi
11469         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11470                 case $cf_add_cflags in
11471                 -D*)
11472                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11473
11474                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11475                                 && test -z "${cf_tst_cflags}" \
11476                                 && cf_fix_cppflags=yes
11477
11478                         if test $cf_fix_cppflags = yes ; then
11479                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11480                                 continue
11481                         elif test "${cf_tst_cflags}" = "\"'" ; then
11482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11483                                 continue
11484                         fi
11485                         ;;
11486                 esac
11487                 case "$CPPFLAGS" in
11488                 *$cf_add_cflags) #(vi
11489                         ;;
11490                 *) #(vi
11491                         case $cf_add_cflags in #(vi
11492                         -D*)
11493                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11494
11495 CPPFLAGS=`echo "$CPPFLAGS" | \
11496         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11497                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11498
11499                                 ;;
11500                         esac
11501                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11502                         ;;
11503                 esac
11504                 ;;
11505         *)
11506                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11507                 ;;
11508         esac
11509         ;;
11510 yes)
11511         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11512
11513         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11514
11515         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11516                 && test -z "${cf_tst_cflags}" \
11517                 && cf_fix_cppflags=no
11518         ;;
11519 esac
11520 done
11521
11522 if test -n "$cf_new_cflags" ; then
11523
11524         CFLAGS="$CFLAGS $cf_new_cflags"
11525 fi
11526
11527 if test -n "$cf_new_cppflags" ; then
11528
11529         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11530 fi
11531
11532 if test -n "$cf_new_extra_cppflags" ; then
11533
11534         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11535 fi
11536
11537         LIBS="$cf_pkgconfig_libs $LIBS"
11538         :
11539 else
11540         :
11541 fi
11542
11543 else
11544
11545 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11546
11547 echo "${as_me:-configure}:11547: testing ...before $LIBS ..." 1>&5
11548
11549 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
11550 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11551
11552 echo "${as_me:-configure}:11552: testing ...after  $LIBS ..." 1>&5
11553
11554 fi
11555
11556                                 ;;
11557                         esac
11558                         ;;
11559                 esac
11560         fi
11561
11562         cf_have_X_LIBS=yes
11563
11564 else
11565
11566         LDFLAGS="$X_LIBS $LDFLAGS"
11567
11568 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
11569
11570 echo "${as_me:-configure}:11570: testing checking additions to CFLAGS ..." 1>&5
11571
11572 cf_check_cflags="$CFLAGS"
11573 cf_check_cppflags="$CPPFLAGS"
11574
11575 cf_fix_cppflags=no
11576 cf_new_cflags=
11577 cf_new_cppflags=
11578 cf_new_extra_cppflags=
11579
11580 for cf_add_cflags in $X_CFLAGS
11581 do
11582 case $cf_fix_cppflags in
11583 no)
11584         case $cf_add_cflags in #(vi
11585         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11586                 case $cf_add_cflags in
11587                 -D*)
11588                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11589
11590                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11591                                 && test -z "${cf_tst_cflags}" \
11592                                 && cf_fix_cppflags=yes
11593
11594                         if test $cf_fix_cppflags = yes ; then
11595                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11596                                 continue
11597                         elif test "${cf_tst_cflags}" = "\"'" ; then
11598                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11599                                 continue
11600                         fi
11601                         ;;
11602                 esac
11603                 case "$CPPFLAGS" in
11604                 *$cf_add_cflags) #(vi
11605                         ;;
11606                 *) #(vi
11607                         case $cf_add_cflags in #(vi
11608                         -D*)
11609                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11610
11611 CPPFLAGS=`echo "$CPPFLAGS" | \
11612         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11613                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11614
11615                                 ;;
11616                         esac
11617                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11618                         ;;
11619                 esac
11620                 ;;
11621         *)
11622                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11623                 ;;
11624         esac
11625         ;;
11626 yes)
11627         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11628
11629         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11630
11631         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11632                 && test -z "${cf_tst_cflags}" \
11633                 && cf_fix_cppflags=no
11634         ;;
11635 esac
11636 done
11637
11638 if test -n "$cf_new_cflags" ; then
11639         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11640
11641 echo "${as_me:-configure}:11641: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11642
11643         CFLAGS="$CFLAGS $cf_new_cflags"
11644 fi
11645
11646 if test -n "$cf_new_cppflags" ; then
11647         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11648
11649 echo "${as_me:-configure}:11649: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11650
11651         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11652 fi
11653
11654 if test -n "$cf_new_extra_cppflags" ; then
11655         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11656
11657 echo "${as_me:-configure}:11657: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11658
11659         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11660 fi
11661
11662 if test "$cf_check_cflags" != "$CFLAGS" ; then
11663 cat >conftest.$ac_ext <<_ACEOF
11664 #line 11664 "configure"
11665 #include "confdefs.h"
11666 #include <stdio.h>
11667 int
11668 main ()
11669 {
11670 printf("Hello world");
11671   ;
11672   return 0;
11673 }
11674 _ACEOF
11675 rm -f conftest.$ac_objext conftest$ac_exeext
11676 if { (eval echo "$as_me:11676: \"$ac_link\"") >&5
11677   (eval $ac_link) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit $ac_status); } &&
11681          { ac_try='test -s conftest$ac_exeext'
11682   { (eval echo "$as_me:11682: \"$ac_try\"") >&5
11683   (eval $ac_try) 2>&5
11684   ac_status=$?
11685   echo "$as_me:11685: \$? = $ac_status" >&5
11686   (exit $ac_status); }; }; then
11687   :
11688 else
11689   echo "$as_me: failed program was:" >&5
11690 cat conftest.$ac_ext >&5
11691 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11692
11693 echo "${as_me:-configure}:11693: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11694
11695          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11696                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
11697
11698 echo "${as_me:-configure}:11698: testing but keeping change to \$CPPFLAGS ..." 1>&5
11699
11700          fi
11701          CFLAGS="$cf_check_flags"
11702 fi
11703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11704 fi
11705
11706         echo "$as_me:11706: checking for XOpenDisplay" >&5
11707 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11708 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11709   echo $ECHO_N "(cached) $ECHO_C" >&6
11710 else
11711   cat >conftest.$ac_ext <<_ACEOF
11712 #line 11712 "configure"
11713 #include "confdefs.h"
11714 /* System header to define __stub macros and hopefully few prototypes,
11715     which can conflict with char XOpenDisplay (); below.  */
11716 #include <assert.h>
11717 /* Override any gcc2 internal prototype to avoid an error.  */
11718 #ifdef __cplusplus
11719 extern "C"
11720 #endif
11721 /* We use char because int might match the return type of a gcc2
11722    builtin and then its argument prototype would still apply.  */
11723 char XOpenDisplay ();
11724 char (*f) ();
11725
11726 int
11727 main ()
11728 {
11729 /* The GNU C library defines this for functions which it implements
11730     to always fail with ENOSYS.  Some functions are actually named
11731     something starting with __ and the normal name is an alias.  */
11732 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11733 choke me
11734 #else
11735 f = XOpenDisplay;
11736 #endif
11737
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 rm -f conftest.$ac_objext conftest$ac_exeext
11743 if { (eval echo "$as_me:11743: \"$ac_link\"") >&5
11744   (eval $ac_link) 2>&5
11745   ac_status=$?
11746   echo "$as_me:11746: \$? = $ac_status" >&5
11747   (exit $ac_status); } &&
11748          { ac_try='test -s conftest$ac_exeext'
11749   { (eval echo "$as_me:11749: \"$ac_try\"") >&5
11750   (eval $ac_try) 2>&5
11751   ac_status=$?
11752   echo "$as_me:11752: \$? = $ac_status" >&5
11753   (exit $ac_status); }; }; then
11754   ac_cv_func_XOpenDisplay=yes
11755 else
11756   echo "$as_me: failed program was:" >&5
11757 cat conftest.$ac_ext >&5
11758 ac_cv_func_XOpenDisplay=no
11759 fi
11760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11761 fi
11762 echo "$as_me:11762: result: $ac_cv_func_XOpenDisplay" >&5
11763 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11764 if test $ac_cv_func_XOpenDisplay = yes; then
11765   :
11766 else
11767
11768         echo "$as_me:11768: checking for XOpenDisplay in -lX11" >&5
11769 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11770 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11771   echo $ECHO_N "(cached) $ECHO_C" >&6
11772 else
11773   ac_check_lib_save_LIBS=$LIBS
11774 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11775 cat >conftest.$ac_ext <<_ACEOF
11776 #line 11776 "configure"
11777 #include "confdefs.h"
11778
11779 /* Override any gcc2 internal prototype to avoid an error.  */
11780 #ifdef __cplusplus
11781 extern "C"
11782 #endif
11783 /* We use char because int might match the return type of a gcc2
11784    builtin and then its argument prototype would still apply.  */
11785 char XOpenDisplay ();
11786 int
11787 main ()
11788 {
11789 XOpenDisplay ();
11790   ;
11791   return 0;
11792 }
11793 _ACEOF
11794 rm -f conftest.$ac_objext conftest$ac_exeext
11795 if { (eval echo "$as_me:11795: \"$ac_link\"") >&5
11796   (eval $ac_link) 2>&5
11797   ac_status=$?
11798   echo "$as_me:11798: \$? = $ac_status" >&5
11799   (exit $ac_status); } &&
11800          { ac_try='test -s conftest$ac_exeext'
11801   { (eval echo "$as_me:11801: \"$ac_try\"") >&5
11802   (eval $ac_try) 2>&5
11803   ac_status=$?
11804   echo "$as_me:11804: \$? = $ac_status" >&5
11805   (exit $ac_status); }; }; then
11806   ac_cv_lib_X11_XOpenDisplay=yes
11807 else
11808   echo "$as_me: failed program was:" >&5
11809 cat conftest.$ac_ext >&5
11810 ac_cv_lib_X11_XOpenDisplay=no
11811 fi
11812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11813 LIBS=$ac_check_lib_save_LIBS
11814 fi
11815 echo "$as_me:11815: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11816 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11817 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
11818   LIBS="-lX11 $LIBS"
11819 fi
11820
11821 fi
11822
11823         echo "$as_me:11823: checking for XtAppInitialize" >&5
11824 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11825 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11826   echo $ECHO_N "(cached) $ECHO_C" >&6
11827 else
11828   cat >conftest.$ac_ext <<_ACEOF
11829 #line 11829 "configure"
11830 #include "confdefs.h"
11831 /* System header to define __stub macros and hopefully few prototypes,
11832     which can conflict with char XtAppInitialize (); below.  */
11833 #include <assert.h>
11834 /* Override any gcc2 internal prototype to avoid an error.  */
11835 #ifdef __cplusplus
11836 extern "C"
11837 #endif
11838 /* We use char because int might match the return type of a gcc2
11839    builtin and then its argument prototype would still apply.  */
11840 char XtAppInitialize ();
11841 char (*f) ();
11842
11843 int
11844 main ()
11845 {
11846 /* The GNU C library defines this for functions which it implements
11847     to always fail with ENOSYS.  Some functions are actually named
11848     something starting with __ and the normal name is an alias.  */
11849 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11850 choke me
11851 #else
11852 f = XtAppInitialize;
11853 #endif
11854
11855   ;
11856   return 0;
11857 }
11858 _ACEOF
11859 rm -f conftest.$ac_objext conftest$ac_exeext
11860 if { (eval echo "$as_me:11860: \"$ac_link\"") >&5
11861   (eval $ac_link) 2>&5
11862   ac_status=$?
11863   echo "$as_me:11863: \$? = $ac_status" >&5
11864   (exit $ac_status); } &&
11865          { ac_try='test -s conftest$ac_exeext'
11866   { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867   (eval $ac_try) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); }; }; then
11871   ac_cv_func_XtAppInitialize=yes
11872 else
11873   echo "$as_me: failed program was:" >&5
11874 cat conftest.$ac_ext >&5
11875 ac_cv_func_XtAppInitialize=no
11876 fi
11877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11878 fi
11879 echo "$as_me:11879: result: $ac_cv_func_XtAppInitialize" >&5
11880 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11881 if test $ac_cv_func_XtAppInitialize = yes; then
11882   :
11883 else
11884
11885         echo "$as_me:11885: checking for XtAppInitialize in -lXt" >&5
11886 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11887 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11888   echo $ECHO_N "(cached) $ECHO_C" >&6
11889 else
11890   ac_check_lib_save_LIBS=$LIBS
11891 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11892 cat >conftest.$ac_ext <<_ACEOF
11893 #line 11893 "configure"
11894 #include "confdefs.h"
11895
11896 /* Override any gcc2 internal prototype to avoid an error.  */
11897 #ifdef __cplusplus
11898 extern "C"
11899 #endif
11900 /* We use char because int might match the return type of a gcc2
11901    builtin and then its argument prototype would still apply.  */
11902 char XtAppInitialize ();
11903 int
11904 main ()
11905 {
11906 XtAppInitialize ();
11907   ;
11908   return 0;
11909 }
11910 _ACEOF
11911 rm -f conftest.$ac_objext conftest$ac_exeext
11912 if { (eval echo "$as_me:11912: \"$ac_link\"") >&5
11913   (eval $ac_link) 2>&5
11914   ac_status=$?
11915   echo "$as_me:11915: \$? = $ac_status" >&5
11916   (exit $ac_status); } &&
11917          { ac_try='test -s conftest$ac_exeext'
11918   { (eval echo "$as_me:11918: \"$ac_try\"") >&5
11919   (eval $ac_try) 2>&5
11920   ac_status=$?
11921   echo "$as_me:11921: \$? = $ac_status" >&5
11922   (exit $ac_status); }; }; then
11923   ac_cv_lib_Xt_XtAppInitialize=yes
11924 else
11925   echo "$as_me: failed program was:" >&5
11926 cat conftest.$ac_ext >&5
11927 ac_cv_lib_Xt_XtAppInitialize=no
11928 fi
11929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11930 LIBS=$ac_check_lib_save_LIBS
11931 fi
11932 echo "$as_me:11932: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11933 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11934 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
11935   cat >>confdefs.h <<\EOF
11936 #define HAVE_LIBXT 1
11937 EOF
11938
11939                  cf_have_X_LIBS=Xt
11940                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11941 fi
11942
11943 fi
11944
11945 fi
11946
11947 if test $cf_have_X_LIBS = no ; then
11948         { echo "$as_me:11948: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11949 test program.  You will have to check and add the proper libraries by hand
11950 to makefile." >&5
11951 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11952 test program.  You will have to check and add the proper libraries by hand
11953 to makefile." >&2;}
11954 fi
11955
11956 cf_x_athena_root=$cf_x_athena
11957 cf_x_athena_inc=""
11958
11959 for cf_path in default \
11960         /usr/contrib/X11R6 \
11961         /usr/contrib/X11R5 \
11962         /usr/lib/X11R5 \
11963         /usr/local
11964 do
11965         if test -z "$cf_x_athena_inc" ; then
11966                 cf_save="$CPPFLAGS"
11967                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
11968                 if test $cf_path != default ; then
11969                         CPPFLAGS="$cf_save -I$cf_path/include"
11970                         echo "$as_me:11970: checking for $cf_test in $cf_path" >&5
11971 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
11972                 else
11973                         echo "$as_me:11973: checking for $cf_test" >&5
11974 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
11975                 fi
11976                 cat >conftest.$ac_ext <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11979
11980 #include <X11/Intrinsic.h>
11981 #include <$cf_test>
11982 int
11983 main ()
11984 {
11985
11986   ;
11987   return 0;
11988 }
11989 _ACEOF
11990 rm -f conftest.$ac_objext
11991 if { (eval echo "$as_me:11991: \"$ac_compile\"") >&5
11992   (eval $ac_compile) 2>&5
11993   ac_status=$?
11994   echo "$as_me:11994: \$? = $ac_status" >&5
11995   (exit $ac_status); } &&
11996          { ac_try='test -s conftest.$ac_objext'
11997   { (eval echo "$as_me:11997: \"$ac_try\"") >&5
11998   (eval $ac_try) 2>&5
11999   ac_status=$?
12000   echo "$as_me:12000: \$? = $ac_status" >&5
12001   (exit $ac_status); }; }; then
12002   cf_result=yes
12003 else
12004   echo "$as_me: failed program was:" >&5
12005 cat conftest.$ac_ext >&5
12006 cf_result=no
12007 fi
12008 rm -f conftest.$ac_objext conftest.$ac_ext
12009                 echo "$as_me:12009: result: $cf_result" >&5
12010 echo "${ECHO_T}$cf_result" >&6
12011                 if test "$cf_result" = yes ; then
12012                         cf_x_athena_inc=$cf_path
12013                         break
12014                 else
12015                         CPPFLAGS="$cf_save"
12016                 fi
12017         fi
12018 done
12019
12020 if test -z "$cf_x_athena_inc" ; then
12021         { echo "$as_me:12021: WARNING: Unable to successfully find Athena header files with test program" >&5
12022 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12023 elif test "$cf_x_athena_inc" != default ; then
12024         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12025 fi
12026
12027 cf_x_athena_root=$cf_x_athena
12028 cf_x_athena_lib=""
12029
12030 for cf_path in default \
12031         /usr/contrib/X11R6 \
12032         /usr/contrib/X11R5 \
12033         /usr/lib/X11R5 \
12034         /usr/local
12035 do
12036         for cf_lib in \
12037                 ${cf_x_athena_root} \
12038                 ${cf_x_athena_root}7 \
12039                 ${cf_x_athena_root}6
12040         do
12041         for cf_libs in \
12042                 "-l$cf_lib -lXmu" \
12043                 "-l$cf_lib -lXpm -lXmu" \
12044                 "-l${cf_lib}_s -lXmu_s"
12045         do
12046                 if test -z "$cf_x_athena_lib" ; then
12047                         cf_save="$LIBS"
12048                         cf_test=XawSimpleMenuAddGlobalActions
12049                         if test $cf_path != default ; then
12050                                 LIBS="-L$cf_path/lib $cf_libs $LIBS"
12051                                 echo "$as_me:12051: checking for $cf_libs in $cf_path" >&5
12052 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12053                         else
12054                                 LIBS="$cf_libs $LIBS"
12055                                 echo "$as_me:12055: checking for $cf_test in $cf_libs" >&5
12056 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12057                         fi
12058                         cat >conftest.$ac_ext <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061
12062 #include <X11/Intrinsic.h>
12063 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12064
12065 int
12066 main ()
12067 {
12068
12069 $cf_test((XtAppContext) 0)
12070   ;
12071   return 0;
12072 }
12073 _ACEOF
12074 rm -f conftest.$ac_objext conftest$ac_exeext
12075 if { (eval echo "$as_me:12075: \"$ac_link\"") >&5
12076   (eval $ac_link) 2>&5
12077   ac_status=$?
12078   echo "$as_me:12078: \$? = $ac_status" >&5
12079   (exit $ac_status); } &&
12080          { ac_try='test -s conftest$ac_exeext'
12081   { (eval echo "$as_me:12081: \"$ac_try\"") >&5
12082   (eval $ac_try) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit $ac_status); }; }; then
12086   cf_result=yes
12087 else
12088   echo "$as_me: failed program was:" >&5
12089 cat conftest.$ac_ext >&5
12090 cf_result=no
12091 fi
12092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12093                         echo "$as_me:12093: result: $cf_result" >&5
12094 echo "${ECHO_T}$cf_result" >&6
12095                         if test "$cf_result" = yes ; then
12096                                 cf_x_athena_lib="$cf_libs"
12097                                 break
12098                         fi
12099                         LIBS="$cf_save"
12100                 fi
12101         done # cf_libs
12102                 test -n "$cf_x_athena_lib" && break
12103         done # cf_lib
12104 done
12105
12106 if test -z "$cf_x_athena_lib" ; then
12107         { { echo "$as_me:12107: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12108 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12109    { (exit 1); exit 1; }; }
12110 fi
12111
12112 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12113
12114 cat >>confdefs.h <<EOF
12115 #define $cf_x_athena_LIBS 1
12116 EOF
12117
12118 fi
12119
12120 for ac_prog in xcurses-config
12121 do
12122   # Extract the first word of "$ac_prog", so it can be a program name with args.
12123 set dummy $ac_prog; ac_word=$2
12124 echo "$as_me:12124: checking for $ac_word" >&5
12125 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12126 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
12127   echo $ECHO_N "(cached) $ECHO_C" >&6
12128 else
12129   case $XCURSES_CONFIG in
12130   [\\/]* | ?:[\\/]*)
12131   ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
12132   ;;
12133   *)
12134   ac_save_IFS=$IFS; IFS=$ac_path_separator
12135 ac_dummy="$PATH"
12136 for ac_dir in $ac_dummy; do
12137   IFS=$ac_save_IFS
12138   test -z "$ac_dir" && ac_dir=.
12139   if $as_executable_p "$ac_dir/$ac_word"; then
12140    ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
12141    echo "$as_me:12141: found $ac_dir/$ac_word" >&5
12142    break
12143 fi
12144 done
12145
12146   ;;
12147 esac
12148 fi
12149 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
12150
12151 if test -n "$XCURSES_CONFIG"; then
12152   echo "$as_me:12152: result: $XCURSES_CONFIG" >&5
12153 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12154 else
12155   echo "$as_me:12155: result: no" >&5
12156 echo "${ECHO_T}no" >&6
12157 fi
12158
12159   test -n "$XCURSES_CONFIG" && break
12160 done
12161 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
12162
12163 if test "$XCURSES_CONFIG" != none ; then
12164
12165 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12166 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12167
12168 cf_cv_lib_XCurses=yes
12169
12170 else
12171
12172 LDFLAGS="$LDFLAGS $X_LIBS"
12173
12174 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12175
12176 echo "${as_me:-configure}:12176: testing checking additions to CFLAGS ..." 1>&5
12177
12178 cf_check_cflags="$CFLAGS"
12179 cf_check_cppflags="$CPPFLAGS"
12180
12181 cf_fix_cppflags=no
12182 cf_new_cflags=
12183 cf_new_cppflags=
12184 cf_new_extra_cppflags=
12185
12186 for cf_add_cflags in $X_CFLAGS
12187 do
12188 case $cf_fix_cppflags in
12189 no)
12190         case $cf_add_cflags in #(vi
12191         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12192                 case $cf_add_cflags in
12193                 -D*)
12194                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12195
12196                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12197                                 && test -z "${cf_tst_cflags}" \
12198                                 && cf_fix_cppflags=yes
12199
12200                         if test $cf_fix_cppflags = yes ; then
12201                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12202                                 continue
12203                         elif test "${cf_tst_cflags}" = "\"'" ; then
12204                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12205                                 continue
12206                         fi
12207                         ;;
12208                 esac
12209                 case "$CPPFLAGS" in
12210                 *$cf_add_cflags) #(vi
12211                         ;;
12212                 *) #(vi
12213                         case $cf_add_cflags in #(vi
12214                         -D*)
12215                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12216
12217 CPPFLAGS=`echo "$CPPFLAGS" | \
12218         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12219                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12220
12221                                 ;;
12222                         esac
12223                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12224                         ;;
12225                 esac
12226                 ;;
12227         *)
12228                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12229                 ;;
12230         esac
12231         ;;
12232 yes)
12233         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12234
12235         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12236
12237         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12238                 && test -z "${cf_tst_cflags}" \
12239                 && cf_fix_cppflags=no
12240         ;;
12241 esac
12242 done
12243
12244 if test -n "$cf_new_cflags" ; then
12245         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12246
12247 echo "${as_me:-configure}:12247: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12248
12249         CFLAGS="$CFLAGS $cf_new_cflags"
12250 fi
12251
12252 if test -n "$cf_new_cppflags" ; then
12253         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12254
12255 echo "${as_me:-configure}:12255: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12256
12257         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12258 fi
12259
12260 if test -n "$cf_new_extra_cppflags" ; then
12261         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12262
12263 echo "${as_me:-configure}:12263: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12264
12265         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12266 fi
12267
12268 if test "$cf_check_cflags" != "$CFLAGS" ; then
12269 cat >conftest.$ac_ext <<_ACEOF
12270 #line 12270 "configure"
12271 #include "confdefs.h"
12272 #include <stdio.h>
12273 int
12274 main ()
12275 {
12276 printf("Hello world");
12277   ;
12278   return 0;
12279 }
12280 _ACEOF
12281 rm -f conftest.$ac_objext conftest$ac_exeext
12282 if { (eval echo "$as_me:12282: \"$ac_link\"") >&5
12283   (eval $ac_link) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); } &&
12287          { ac_try='test -s conftest$ac_exeext'
12288   { (eval echo "$as_me:12288: \"$ac_try\"") >&5
12289   (eval $ac_try) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit $ac_status); }; }; then
12293   :
12294 else
12295   echo "$as_me: failed program was:" >&5
12296 cat conftest.$ac_ext >&5
12297 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12298
12299 echo "${as_me:-configure}:12299: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12300
12301          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12302                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12303
12304 echo "${as_me:-configure}:12304: testing but keeping change to \$CPPFLAGS ..." 1>&5
12305
12306          fi
12307          CFLAGS="$cf_check_flags"
12308 fi
12309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12310 fi
12311
12312 echo "$as_me:12312: checking for XOpenDisplay in -lX11" >&5
12313 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12314 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12315   echo $ECHO_N "(cached) $ECHO_C" >&6
12316 else
12317   ac_check_lib_save_LIBS=$LIBS
12318 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12319 cat >conftest.$ac_ext <<_ACEOF
12320 #line 12320 "configure"
12321 #include "confdefs.h"
12322
12323 /* Override any gcc2 internal prototype to avoid an error.  */
12324 #ifdef __cplusplus
12325 extern "C"
12326 #endif
12327 /* We use char because int might match the return type of a gcc2
12328    builtin and then its argument prototype would still apply.  */
12329 char XOpenDisplay ();
12330 int
12331 main ()
12332 {
12333 XOpenDisplay ();
12334   ;
12335   return 0;
12336 }
12337 _ACEOF
12338 rm -f conftest.$ac_objext conftest$ac_exeext
12339 if { (eval echo "$as_me:12339: \"$ac_link\"") >&5
12340   (eval $ac_link) 2>&5
12341   ac_status=$?
12342   echo "$as_me:12342: \$? = $ac_status" >&5
12343   (exit $ac_status); } &&
12344          { ac_try='test -s conftest$ac_exeext'
12345   { (eval echo "$as_me:12345: \"$ac_try\"") >&5
12346   (eval $ac_try) 2>&5
12347   ac_status=$?
12348   echo "$as_me:12348: \$? = $ac_status" >&5
12349   (exit $ac_status); }; }; then
12350   ac_cv_lib_X11_XOpenDisplay=yes
12351 else
12352   echo "$as_me: failed program was:" >&5
12353 cat conftest.$ac_ext >&5
12354 ac_cv_lib_X11_XOpenDisplay=no
12355 fi
12356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12357 LIBS=$ac_check_lib_save_LIBS
12358 fi
12359 echo "$as_me:12359: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12360 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12361 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12362   LIBS="-lX11 $LIBS"
12363 fi
12364
12365 echo "$as_me:12365: checking for XCurses library" >&5
12366 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12367 if test "${cf_cv_lib_XCurses+set}" = set; then
12368   echo $ECHO_N "(cached) $ECHO_C" >&6
12369 else
12370
12371 LIBS="-lXCurses $LIBS"
12372 cat >conftest.$ac_ext <<_ACEOF
12373 #line 12373 "configure"
12374 #include "confdefs.h"
12375
12376 #include <xcurses.h>
12377 char *XCursesProgramName = "test";
12378
12379 int
12380 main ()
12381 {
12382 XCursesExit();
12383   ;
12384   return 0;
12385 }
12386 _ACEOF
12387 rm -f conftest.$ac_objext conftest$ac_exeext
12388 if { (eval echo "$as_me:12388: \"$ac_link\"") >&5
12389   (eval $ac_link) 2>&5
12390   ac_status=$?
12391   echo "$as_me:12391: \$? = $ac_status" >&5
12392   (exit $ac_status); } &&
12393          { ac_try='test -s conftest$ac_exeext'
12394   { (eval echo "$as_me:12394: \"$ac_try\"") >&5
12395   (eval $ac_try) 2>&5
12396   ac_status=$?
12397   echo "$as_me:12397: \$? = $ac_status" >&5
12398   (exit $ac_status); }; }; then
12399   cf_cv_lib_XCurses=yes
12400 else
12401   echo "$as_me: failed program was:" >&5
12402 cat conftest.$ac_ext >&5
12403 cf_cv_lib_XCurses=no
12404 fi
12405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12406
12407 fi
12408 echo "$as_me:12408: result: $cf_cv_lib_XCurses" >&5
12409 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12410
12411 fi
12412
12413 if test $cf_cv_lib_XCurses = yes ; then
12414         cat >>confdefs.h <<\EOF
12415 #define UNIX 1
12416 EOF
12417
12418         cat >>confdefs.h <<\EOF
12419 #define XCURSES 1
12420 EOF
12421
12422         echo "$as_me:12422: checking for xcurses.h" >&5
12423 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12424 if test "${ac_cv_header_xcurses_h+set}" = set; then
12425   echo $ECHO_N "(cached) $ECHO_C" >&6
12426 else
12427   cat >conftest.$ac_ext <<_ACEOF
12428 #line 12428 "configure"
12429 #include "confdefs.h"
12430 #include <xcurses.h>
12431 _ACEOF
12432 if { (eval echo "$as_me:12432: \"$ac_cpp conftest.$ac_ext\"") >&5
12433   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12434   ac_status=$?
12435   egrep -v '^ *\+' conftest.er1 >conftest.err
12436   rm -f conftest.er1
12437   cat conftest.err >&5
12438   echo "$as_me:12438: \$? = $ac_status" >&5
12439   (exit $ac_status); } >/dev/null; then
12440   if test -s conftest.err; then
12441     ac_cpp_err=$ac_c_preproc_warn_flag
12442   else
12443     ac_cpp_err=
12444   fi
12445 else
12446   ac_cpp_err=yes
12447 fi
12448 if test -z "$ac_cpp_err"; then
12449   ac_cv_header_xcurses_h=yes
12450 else
12451   echo "$as_me: failed program was:" >&5
12452   cat conftest.$ac_ext >&5
12453   ac_cv_header_xcurses_h=no
12454 fi
12455 rm -f conftest.err conftest.$ac_ext
12456 fi
12457 echo "$as_me:12457: result: $ac_cv_header_xcurses_h" >&5
12458 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12459 if test $ac_cv_header_xcurses_h = yes; then
12460   cat >>confdefs.h <<\EOF
12461 #define HAVE_XCURSES 1
12462 EOF
12463
12464 fi
12465
12466 else
12467         { { echo "$as_me:12467: error: Cannot link with XCurses" >&5
12468 echo "$as_me: error: Cannot link with XCurses" >&2;}
12469    { (exit 1); exit 1; }; }
12470 fi
12471
12472         ;;
12473 esac
12474
12475 case $cf_cv_screen in #(vi
12476 pdcurses) #(vi
12477         ;;
12478 *)
12479         # look for curses-related libraries
12480
12481 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
12482 echo "$as_me:12482: checking for new_panel in -lpanel$cf_cv_libtype" >&5
12483 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
12484 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12485   echo $ECHO_N "(cached) $ECHO_C" >&6
12486 else
12487   ac_check_lib_save_LIBS=$LIBS
12488 LIBS="-lpanel$cf_cv_libtype  $LIBS"
12489 cat >conftest.$ac_ext <<_ACEOF
12490 #line 12490 "configure"
12491 #include "confdefs.h"
12492
12493 /* Override any gcc2 internal prototype to avoid an error.  */
12494 #ifdef __cplusplus
12495 extern "C"
12496 #endif
12497 /* We use char because int might match the return type of a gcc2
12498    builtin and then its argument prototype would still apply.  */
12499 char new_panel ();
12500 int
12501 main ()
12502 {
12503 new_panel ();
12504   ;
12505   return 0;
12506 }
12507 _ACEOF
12508 rm -f conftest.$ac_objext conftest$ac_exeext
12509 if { (eval echo "$as_me:12509: \"$ac_link\"") >&5
12510   (eval $ac_link) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit $ac_status); } &&
12514          { ac_try='test -s conftest$ac_exeext'
12515   { (eval echo "$as_me:12515: \"$ac_try\"") >&5
12516   (eval $ac_try) 2>&5
12517   ac_status=$?
12518   echo "$as_me:12518: \$? = $ac_status" >&5
12519   (exit $ac_status); }; }; then
12520   eval "$as_ac_Lib=yes"
12521 else
12522   echo "$as_me: failed program was:" >&5
12523 cat conftest.$ac_ext >&5
12524 eval "$as_ac_Lib=no"
12525 fi
12526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12527 LIBS=$ac_check_lib_save_LIBS
12528 fi
12529 echo "$as_me:12529: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12530 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12531 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12532   cat >>confdefs.h <<EOF
12533 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
12534 EOF
12535
12536   LIBS="-lpanel$cf_cv_libtype $LIBS"
12537
12538 fi
12539
12540 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
12541 echo "$as_me:12541: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
12542 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
12543 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12544   echo $ECHO_N "(cached) $ECHO_C" >&6
12545 else
12546   ac_check_lib_save_LIBS=$LIBS
12547 LIBS="-lmenu$cf_cv_libtype  $LIBS"
12548 cat >conftest.$ac_ext <<_ACEOF
12549 #line 12549 "configure"
12550 #include "confdefs.h"
12551
12552 /* Override any gcc2 internal prototype to avoid an error.  */
12553 #ifdef __cplusplus
12554 extern "C"
12555 #endif
12556 /* We use char because int might match the return type of a gcc2
12557    builtin and then its argument prototype would still apply.  */
12558 char menu_driver ();
12559 int
12560 main ()
12561 {
12562 menu_driver ();
12563   ;
12564   return 0;
12565 }
12566 _ACEOF
12567 rm -f conftest.$ac_objext conftest$ac_exeext
12568 if { (eval echo "$as_me:12568: \"$ac_link\"") >&5
12569   (eval $ac_link) 2>&5
12570   ac_status=$?
12571   echo "$as_me:12571: \$? = $ac_status" >&5
12572   (exit $ac_status); } &&
12573          { ac_try='test -s conftest$ac_exeext'
12574   { (eval echo "$as_me:12574: \"$ac_try\"") >&5
12575   (eval $ac_try) 2>&5
12576   ac_status=$?
12577   echo "$as_me:12577: \$? = $ac_status" >&5
12578   (exit $ac_status); }; }; then
12579   eval "$as_ac_Lib=yes"
12580 else
12581   echo "$as_me: failed program was:" >&5
12582 cat conftest.$ac_ext >&5
12583 eval "$as_ac_Lib=no"
12584 fi
12585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12586 LIBS=$ac_check_lib_save_LIBS
12587 fi
12588 echo "$as_me:12588: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12589 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12590 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12591   cat >>confdefs.h <<EOF
12592 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
12593 EOF
12594
12595   LIBS="-lmenu$cf_cv_libtype $LIBS"
12596
12597 fi
12598
12599 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
12600 echo "$as_me:12600: checking for form_driver in -lform$cf_cv_libtype" >&5
12601 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
12602 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12603   echo $ECHO_N "(cached) $ECHO_C" >&6
12604 else
12605   ac_check_lib_save_LIBS=$LIBS
12606 LIBS="-lform$cf_cv_libtype  $LIBS"
12607 cat >conftest.$ac_ext <<_ACEOF
12608 #line 12608 "configure"
12609 #include "confdefs.h"
12610
12611 /* Override any gcc2 internal prototype to avoid an error.  */
12612 #ifdef __cplusplus
12613 extern "C"
12614 #endif
12615 /* We use char because int might match the return type of a gcc2
12616    builtin and then its argument prototype would still apply.  */
12617 char form_driver ();
12618 int
12619 main ()
12620 {
12621 form_driver ();
12622   ;
12623   return 0;
12624 }
12625 _ACEOF
12626 rm -f conftest.$ac_objext conftest$ac_exeext
12627 if { (eval echo "$as_me:12627: \"$ac_link\"") >&5
12628   (eval $ac_link) 2>&5
12629   ac_status=$?
12630   echo "$as_me:12630: \$? = $ac_status" >&5
12631   (exit $ac_status); } &&
12632          { ac_try='test -s conftest$ac_exeext'
12633   { (eval echo "$as_me:12633: \"$ac_try\"") >&5
12634   (eval $ac_try) 2>&5
12635   ac_status=$?
12636   echo "$as_me:12636: \$? = $ac_status" >&5
12637   (exit $ac_status); }; }; then
12638   eval "$as_ac_Lib=yes"
12639 else
12640   echo "$as_me: failed program was:" >&5
12641 cat conftest.$ac_ext >&5
12642 eval "$as_ac_Lib=no"
12643 fi
12644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12645 LIBS=$ac_check_lib_save_LIBS
12646 fi
12647 echo "$as_me:12647: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12648 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12649 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12650   cat >>confdefs.h <<EOF
12651 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
12652 EOF
12653
12654   LIBS="-lform$cf_cv_libtype $LIBS"
12655
12656 fi
12657
12658         # look for curses-related headers
12659
12660 for ac_header in \
12661                 nc_alloc.h \
12662                 nomacros.h \
12663                 form.h \
12664                 menu.h \
12665                 panel.h \
12666                 term_entry.h \
12667
12668 do
12669 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12670 echo "$as_me:12670: checking for $ac_header" >&5
12671 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12673   echo $ECHO_N "(cached) $ECHO_C" >&6
12674 else
12675   cat >conftest.$ac_ext <<_ACEOF
12676 #line 12676 "configure"
12677 #include "confdefs.h"
12678 #include <$ac_header>
12679 _ACEOF
12680 if { (eval echo "$as_me:12680: \"$ac_cpp conftest.$ac_ext\"") >&5
12681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12682   ac_status=$?
12683   egrep -v '^ *\+' conftest.er1 >conftest.err
12684   rm -f conftest.er1
12685   cat conftest.err >&5
12686   echo "$as_me:12686: \$? = $ac_status" >&5
12687   (exit $ac_status); } >/dev/null; then
12688   if test -s conftest.err; then
12689     ac_cpp_err=$ac_c_preproc_warn_flag
12690   else
12691     ac_cpp_err=
12692   fi
12693 else
12694   ac_cpp_err=yes
12695 fi
12696 if test -z "$ac_cpp_err"; then
12697   eval "$as_ac_Header=yes"
12698 else
12699   echo "$as_me: failed program was:" >&5
12700   cat conftest.$ac_ext >&5
12701   eval "$as_ac_Header=no"
12702 fi
12703 rm -f conftest.err conftest.$ac_ext
12704 fi
12705 echo "$as_me:12705: result: `eval echo '${'$as_ac_Header'}'`" >&5
12706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12707 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12708   cat >>confdefs.h <<EOF
12709 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12710 EOF
12711
12712 fi
12713 done
12714
12715         ;;
12716 esac
12717
12718 echo "$as_me:12718: checking return type of signal handlers" >&5
12719 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12720 if test "${ac_cv_type_signal+set}" = set; then
12721   echo $ECHO_N "(cached) $ECHO_C" >&6
12722 else
12723   cat >conftest.$ac_ext <<_ACEOF
12724 #line 12724 "configure"
12725 #include "confdefs.h"
12726 #include <sys/types.h>
12727 #include <signal.h>
12728 #ifdef signal
12729 # undef signal
12730 #endif
12731 #ifdef __cplusplus
12732 extern "C" void (*signal (int, void (*)(int)))(int);
12733 #else
12734 void (*signal ()) ();
12735 #endif
12736
12737 int
12738 main ()
12739 {
12740 int i;
12741   ;
12742   return 0;
12743 }
12744 _ACEOF
12745 rm -f conftest.$ac_objext
12746 if { (eval echo "$as_me:12746: \"$ac_compile\"") >&5
12747   (eval $ac_compile) 2>&5
12748   ac_status=$?
12749   echo "$as_me:12749: \$? = $ac_status" >&5
12750   (exit $ac_status); } &&
12751          { ac_try='test -s conftest.$ac_objext'
12752   { (eval echo "$as_me:12752: \"$ac_try\"") >&5
12753   (eval $ac_try) 2>&5
12754   ac_status=$?
12755   echo "$as_me:12755: \$? = $ac_status" >&5
12756   (exit $ac_status); }; }; then
12757   ac_cv_type_signal=void
12758 else
12759   echo "$as_me: failed program was:" >&5
12760 cat conftest.$ac_ext >&5
12761 ac_cv_type_signal=int
12762 fi
12763 rm -f conftest.$ac_objext conftest.$ac_ext
12764 fi
12765 echo "$as_me:12765: result: $ac_cv_type_signal" >&5
12766 echo "${ECHO_T}$ac_cv_type_signal" >&6
12767
12768 cat >>confdefs.h <<EOF
12769 #define RETSIGTYPE $ac_cv_type_signal
12770 EOF
12771
12772 echo "$as_me:12772: checking for ANSI C header files" >&5
12773 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12774 if test "${ac_cv_header_stdc+set}" = set; then
12775   echo $ECHO_N "(cached) $ECHO_C" >&6
12776 else
12777   cat >conftest.$ac_ext <<_ACEOF
12778 #line 12778 "configure"
12779 #include "confdefs.h"
12780 #include <stdlib.h>
12781 #include <stdarg.h>
12782 #include <string.h>
12783 #include <float.h>
12784
12785 _ACEOF
12786 if { (eval echo "$as_me:12786: \"$ac_cpp conftest.$ac_ext\"") >&5
12787   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12788   ac_status=$?
12789   egrep -v '^ *\+' conftest.er1 >conftest.err
12790   rm -f conftest.er1
12791   cat conftest.err >&5
12792   echo "$as_me:12792: \$? = $ac_status" >&5
12793   (exit $ac_status); } >/dev/null; then
12794   if test -s conftest.err; then
12795     ac_cpp_err=$ac_c_preproc_warn_flag
12796   else
12797     ac_cpp_err=
12798   fi
12799 else
12800   ac_cpp_err=yes
12801 fi
12802 if test -z "$ac_cpp_err"; then
12803   ac_cv_header_stdc=yes
12804 else
12805   echo "$as_me: failed program was:" >&5
12806   cat conftest.$ac_ext >&5
12807   ac_cv_header_stdc=no
12808 fi
12809 rm -f conftest.err conftest.$ac_ext
12810
12811 if test $ac_cv_header_stdc = yes; then
12812   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12813   cat >conftest.$ac_ext <<_ACEOF
12814 #line 12814 "configure"
12815 #include "confdefs.h"
12816 #include <string.h>
12817
12818 _ACEOF
12819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12820   egrep "memchr" >/dev/null 2>&1; then
12821   :
12822 else
12823   ac_cv_header_stdc=no
12824 fi
12825 rm -rf conftest*
12826
12827 fi
12828
12829 if test $ac_cv_header_stdc = yes; then
12830   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12831   cat >conftest.$ac_ext <<_ACEOF
12832 #line 12832 "configure"
12833 #include "confdefs.h"
12834 #include <stdlib.h>
12835
12836 _ACEOF
12837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12838   egrep "free" >/dev/null 2>&1; then
12839   :
12840 else
12841   ac_cv_header_stdc=no
12842 fi
12843 rm -rf conftest*
12844
12845 fi
12846
12847 if test $ac_cv_header_stdc = yes; then
12848   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12849   if test "$cross_compiling" = yes; then
12850   :
12851 else
12852   cat >conftest.$ac_ext <<_ACEOF
12853 #line 12853 "configure"
12854 #include "confdefs.h"
12855 #include <ctype.h>
12856 #if ((' ' & 0x0FF) == 0x020)
12857 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12858 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12859 #else
12860 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12861                      || ('j' <= (c) && (c) <= 'r') \
12862                      || ('s' <= (c) && (c) <= 'z'))
12863 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12864 #endif
12865
12866 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12867 int
12868 main ()
12869 {
12870   int i;
12871   for (i = 0; i < 256; i++)
12872     if (XOR (islower (i), ISLOWER (i))
12873         || toupper (i) != TOUPPER (i))
12874       $ac_main_return(2);
12875   $ac_main_return (0);
12876 }
12877 _ACEOF
12878 rm -f conftest$ac_exeext
12879 if { (eval echo "$as_me:12879: \"$ac_link\"") >&5
12880   (eval $ac_link) 2>&5
12881   ac_status=$?
12882   echo "$as_me:12882: \$? = $ac_status" >&5
12883   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12884   { (eval echo "$as_me:12884: \"$ac_try\"") >&5
12885   (eval $ac_try) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit $ac_status); }; }; then
12889   :
12890 else
12891   echo "$as_me: program exited with status $ac_status" >&5
12892 echo "$as_me: failed program was:" >&5
12893 cat conftest.$ac_ext >&5
12894 ac_cv_header_stdc=no
12895 fi
12896 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12897 fi
12898 fi
12899 fi
12900 echo "$as_me:12900: result: $ac_cv_header_stdc" >&5
12901 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12902 if test $ac_cv_header_stdc = yes; then
12903
12904 cat >>confdefs.h <<\EOF
12905 #define STDC_HEADERS 1
12906 EOF
12907
12908 fi
12909
12910 echo "$as_me:12910: checking whether time.h and sys/time.h may both be included" >&5
12911 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12912 if test "${ac_cv_header_time+set}" = set; then
12913   echo $ECHO_N "(cached) $ECHO_C" >&6
12914 else
12915   cat >conftest.$ac_ext <<_ACEOF
12916 #line 12916 "configure"
12917 #include "confdefs.h"
12918 #include <sys/types.h>
12919 #include <sys/time.h>
12920 #include <time.h>
12921
12922 int
12923 main ()
12924 {
12925 if ((struct tm *) 0)
12926 return 0;
12927   ;
12928   return 0;
12929 }
12930 _ACEOF
12931 rm -f conftest.$ac_objext
12932 if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
12933   (eval $ac_compile) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); } &&
12937          { ac_try='test -s conftest.$ac_objext'
12938   { (eval echo "$as_me:12938: \"$ac_try\"") >&5
12939   (eval $ac_try) 2>&5
12940   ac_status=$?
12941   echo "$as_me:12941: \$? = $ac_status" >&5
12942   (exit $ac_status); }; }; then
12943   ac_cv_header_time=yes
12944 else
12945   echo "$as_me: failed program was:" >&5
12946 cat conftest.$ac_ext >&5
12947 ac_cv_header_time=no
12948 fi
12949 rm -f conftest.$ac_objext conftest.$ac_ext
12950 fi
12951 echo "$as_me:12951: result: $ac_cv_header_time" >&5
12952 echo "${ECHO_T}$ac_cv_header_time" >&6
12953 if test $ac_cv_header_time = yes; then
12954
12955 cat >>confdefs.h <<\EOF
12956 #define TIME_WITH_SYS_TIME 1
12957 EOF
12958
12959 fi
12960
12961 for ac_header in \
12962 getopt.h \
12963 locale.h \
12964 math.h \
12965 stdarg.h \
12966 sys/ioctl.h \
12967 sys/select.h \
12968 sys/time.h \
12969 termios.h \
12970 unistd.h \
12971
12972 do
12973 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12974 echo "$as_me:12974: checking for $ac_header" >&5
12975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12977   echo $ECHO_N "(cached) $ECHO_C" >&6
12978 else
12979   cat >conftest.$ac_ext <<_ACEOF
12980 #line 12980 "configure"
12981 #include "confdefs.h"
12982 #include <$ac_header>
12983 _ACEOF
12984 if { (eval echo "$as_me:12984: \"$ac_cpp conftest.$ac_ext\"") >&5
12985   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12986   ac_status=$?
12987   egrep -v '^ *\+' conftest.er1 >conftest.err
12988   rm -f conftest.er1
12989   cat conftest.err >&5
12990   echo "$as_me:12990: \$? = $ac_status" >&5
12991   (exit $ac_status); } >/dev/null; then
12992   if test -s conftest.err; then
12993     ac_cpp_err=$ac_c_preproc_warn_flag
12994   else
12995     ac_cpp_err=
12996   fi
12997 else
12998   ac_cpp_err=yes
12999 fi
13000 if test -z "$ac_cpp_err"; then
13001   eval "$as_ac_Header=yes"
13002 else
13003   echo "$as_me: failed program was:" >&5
13004   cat conftest.$ac_ext >&5
13005   eval "$as_ac_Header=no"
13006 fi
13007 rm -f conftest.err conftest.$ac_ext
13008 fi
13009 echo "$as_me:13009: result: `eval echo '${'$as_ac_Header'}'`" >&5
13010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13011 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13012   cat >>confdefs.h <<EOF
13013 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13014 EOF
13015
13016 fi
13017 done
13018
13019 for ac_header in unistd.h getopt.h
13020 do
13021 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13022 echo "$as_me:13022: checking for $ac_header" >&5
13023 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13025   echo $ECHO_N "(cached) $ECHO_C" >&6
13026 else
13027   cat >conftest.$ac_ext <<_ACEOF
13028 #line 13028 "configure"
13029 #include "confdefs.h"
13030 #include <$ac_header>
13031 _ACEOF
13032 if { (eval echo "$as_me:13032: \"$ac_cpp conftest.$ac_ext\"") >&5
13033   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13034   ac_status=$?
13035   egrep -v '^ *\+' conftest.er1 >conftest.err
13036   rm -f conftest.er1
13037   cat conftest.err >&5
13038   echo "$as_me:13038: \$? = $ac_status" >&5
13039   (exit $ac_status); } >/dev/null; then
13040   if test -s conftest.err; then
13041     ac_cpp_err=$ac_c_preproc_warn_flag
13042   else
13043     ac_cpp_err=
13044   fi
13045 else
13046   ac_cpp_err=yes
13047 fi
13048 if test -z "$ac_cpp_err"; then
13049   eval "$as_ac_Header=yes"
13050 else
13051   echo "$as_me: failed program was:" >&5
13052   cat conftest.$ac_ext >&5
13053   eval "$as_ac_Header=no"
13054 fi
13055 rm -f conftest.err conftest.$ac_ext
13056 fi
13057 echo "$as_me:13057: result: `eval echo '${'$as_ac_Header'}'`" >&5
13058 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13059 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13060   cat >>confdefs.h <<EOF
13061 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13062 EOF
13063
13064 fi
13065 done
13066
13067 echo "$as_me:13067: checking for header declaring getopt variables" >&5
13068 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13069 if test "${cf_cv_getopt_header+set}" = set; then
13070   echo $ECHO_N "(cached) $ECHO_C" >&6
13071 else
13072
13073 cf_cv_getopt_header=none
13074 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13075 do
13076 cat >conftest.$ac_ext <<_ACEOF
13077 #line 13077 "configure"
13078 #include "confdefs.h"
13079
13080 #include <$cf_header>
13081 int
13082 main ()
13083 {
13084 int x = optind; char *y = optarg
13085   ;
13086   return 0;
13087 }
13088 _ACEOF
13089 rm -f conftest.$ac_objext
13090 if { (eval echo "$as_me:13090: \"$ac_compile\"") >&5
13091   (eval $ac_compile) 2>&5
13092   ac_status=$?
13093   echo "$as_me:13093: \$? = $ac_status" >&5
13094   (exit $ac_status); } &&
13095          { ac_try='test -s conftest.$ac_objext'
13096   { (eval echo "$as_me:13096: \"$ac_try\"") >&5
13097   (eval $ac_try) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit $ac_status); }; }; then
13101   cf_cv_getopt_header=$cf_header
13102  break
13103 else
13104   echo "$as_me: failed program was:" >&5
13105 cat conftest.$ac_ext >&5
13106 fi
13107 rm -f conftest.$ac_objext conftest.$ac_ext
13108 done
13109
13110 fi
13111 echo "$as_me:13111: result: $cf_cv_getopt_header" >&5
13112 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13113 if test $cf_cv_getopt_header != none ; then
13114         cat >>confdefs.h <<\EOF
13115 #define HAVE_GETOPT_HEADER 1
13116 EOF
13117
13118 fi
13119
13120 for ac_func in \
13121 gettimeofday \
13122 strdup \
13123
13124 do
13125 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13126 echo "$as_me:13126: checking for $ac_func" >&5
13127 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13128 if eval "test \"\${$as_ac_var+set}\" = set"; then
13129   echo $ECHO_N "(cached) $ECHO_C" >&6
13130 else
13131   cat >conftest.$ac_ext <<_ACEOF
13132 #line 13132 "configure"
13133 #include "confdefs.h"
13134 /* System header to define __stub macros and hopefully few prototypes,
13135     which can conflict with char $ac_func (); below.  */
13136 #include <assert.h>
13137 /* Override any gcc2 internal prototype to avoid an error.  */
13138 #ifdef __cplusplus
13139 extern "C"
13140 #endif
13141 /* We use char because int might match the return type of a gcc2
13142    builtin and then its argument prototype would still apply.  */
13143 char $ac_func ();
13144 char (*f) ();
13145
13146 int
13147 main ()
13148 {
13149 /* The GNU C library defines this for functions which it implements
13150     to always fail with ENOSYS.  Some functions are actually named
13151     something starting with __ and the normal name is an alias.  */
13152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13153 choke me
13154 #else
13155 f = $ac_func;
13156 #endif
13157
13158   ;
13159   return 0;
13160 }
13161 _ACEOF
13162 rm -f conftest.$ac_objext conftest$ac_exeext
13163 if { (eval echo "$as_me:13163: \"$ac_link\"") >&5
13164   (eval $ac_link) 2>&5
13165   ac_status=$?
13166   echo "$as_me:13166: \$? = $ac_status" >&5
13167   (exit $ac_status); } &&
13168          { ac_try='test -s conftest$ac_exeext'
13169   { (eval echo "$as_me:13169: \"$ac_try\"") >&5
13170   (eval $ac_try) 2>&5
13171   ac_status=$?
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit $ac_status); }; }; then
13174   eval "$as_ac_var=yes"
13175 else
13176   echo "$as_me: failed program was:" >&5
13177 cat conftest.$ac_ext >&5
13178 eval "$as_ac_var=no"
13179 fi
13180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13181 fi
13182 echo "$as_me:13182: result: `eval echo '${'$as_ac_var'}'`" >&5
13183 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13184 if test `eval echo '${'$as_ac_var'}'` = yes; then
13185   cat >>confdefs.h <<EOF
13186 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13187 EOF
13188
13189 fi
13190 done
13191
13192 if test "$cf_enable_widec" = yes; then
13193
13194 for ac_func in \
13195 mblen \
13196 mbrlen \
13197 mbrtowc \
13198 mbsrtowcs \
13199 mbstowcs \
13200 mbtowc \
13201 wcsrtombs \
13202 wcstombs \
13203
13204 do
13205 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13206 echo "$as_me:13206: checking for $ac_func" >&5
13207 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13208 if eval "test \"\${$as_ac_var+set}\" = set"; then
13209   echo $ECHO_N "(cached) $ECHO_C" >&6
13210 else
13211   cat >conftest.$ac_ext <<_ACEOF
13212 #line 13212 "configure"
13213 #include "confdefs.h"
13214 /* System header to define __stub macros and hopefully few prototypes,
13215     which can conflict with char $ac_func (); below.  */
13216 #include <assert.h>
13217 /* Override any gcc2 internal prototype to avoid an error.  */
13218 #ifdef __cplusplus
13219 extern "C"
13220 #endif
13221 /* We use char because int might match the return type of a gcc2
13222    builtin and then its argument prototype would still apply.  */
13223 char $ac_func ();
13224 char (*f) ();
13225
13226 int
13227 main ()
13228 {
13229 /* The GNU C library defines this for functions which it implements
13230     to always fail with ENOSYS.  Some functions are actually named
13231     something starting with __ and the normal name is an alias.  */
13232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13233 choke me
13234 #else
13235 f = $ac_func;
13236 #endif
13237
13238   ;
13239   return 0;
13240 }
13241 _ACEOF
13242 rm -f conftest.$ac_objext conftest$ac_exeext
13243 if { (eval echo "$as_me:13243: \"$ac_link\"") >&5
13244   (eval $ac_link) 2>&5
13245   ac_status=$?
13246   echo "$as_me:13246: \$? = $ac_status" >&5
13247   (exit $ac_status); } &&
13248          { ac_try='test -s conftest$ac_exeext'
13249   { (eval echo "$as_me:13249: \"$ac_try\"") >&5
13250   (eval $ac_try) 2>&5
13251   ac_status=$?
13252   echo "$as_me:13252: \$? = $ac_status" >&5
13253   (exit $ac_status); }; }; then
13254   eval "$as_ac_var=yes"
13255 else
13256   echo "$as_me: failed program was:" >&5
13257 cat conftest.$ac_ext >&5
13258 eval "$as_ac_var=no"
13259 fi
13260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13261 fi
13262 echo "$as_me:13262: result: `eval echo '${'$as_ac_var'}'`" >&5
13263 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13264 if test `eval echo '${'$as_ac_var'}'` = yes; then
13265   cat >>confdefs.h <<EOF
13266 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13267 EOF
13268
13269 fi
13270 done
13271
13272 fi
13273
13274 echo "$as_me:13274: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13275 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13276 if test "${cf_cv_need_xopen_extension+set}" = set; then
13277   echo $ECHO_N "(cached) $ECHO_C" >&6
13278 else
13279
13280 cat >conftest.$ac_ext <<_ACEOF
13281 #line 13281 "configure"
13282 #include "confdefs.h"
13283
13284 #include <stdlib.h>
13285 #include <${cf_cv_ncurses_header:-curses.h}>
13286 int
13287 main ()
13288 {
13289
13290 #if defined(NCURSES_VERSION_PATCH)
13291 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13292         make an error
13293 #endif
13294 #endif
13295         long x = winnstr(stdscr, "", 0);
13296         int x1, y1;
13297         getbegyx(stdscr, y1, x1)
13298   ;
13299   return 0;
13300 }
13301 _ACEOF
13302 rm -f conftest.$ac_objext conftest$ac_exeext
13303 if { (eval echo "$as_me:13303: \"$ac_link\"") >&5
13304   (eval $ac_link) 2>&5
13305   ac_status=$?
13306   echo "$as_me:13306: \$? = $ac_status" >&5
13307   (exit $ac_status); } &&
13308          { ac_try='test -s conftest$ac_exeext'
13309   { (eval echo "$as_me:13309: \"$ac_try\"") >&5
13310   (eval $ac_try) 2>&5
13311   ac_status=$?
13312   echo "$as_me:13312: \$? = $ac_status" >&5
13313   (exit $ac_status); }; }; then
13314   cf_cv_need_xopen_extension=no
13315 else
13316   echo "$as_me: failed program was:" >&5
13317 cat conftest.$ac_ext >&5
13318 cat >conftest.$ac_ext <<_ACEOF
13319 #line 13319 "configure"
13320 #include "confdefs.h"
13321
13322 #define _XOPEN_SOURCE_EXTENDED
13323 #include <stdlib.h>
13324 #include <${cf_cv_ncurses_header:-curses.h}>
13325 int
13326 main ()
13327 {
13328
13329 #ifdef NCURSES_VERSION
13330         cchar_t check;
13331         int check2 = curs_set((int)sizeof(check));
13332 #endif
13333         long x = winnstr(stdscr, "", 0);
13334         int x1, y1;
13335         getbegyx(stdscr, y1, x1)
13336   ;
13337   return 0;
13338 }
13339 _ACEOF
13340 rm -f conftest.$ac_objext conftest$ac_exeext
13341 if { (eval echo "$as_me:13341: \"$ac_link\"") >&5
13342   (eval $ac_link) 2>&5
13343   ac_status=$?
13344   echo "$as_me:13344: \$? = $ac_status" >&5
13345   (exit $ac_status); } &&
13346          { ac_try='test -s conftest$ac_exeext'
13347   { (eval echo "$as_me:13347: \"$ac_try\"") >&5
13348   (eval $ac_try) 2>&5
13349   ac_status=$?
13350   echo "$as_me:13350: \$? = $ac_status" >&5
13351   (exit $ac_status); }; }; then
13352   cf_cv_need_xopen_extension=yes
13353 else
13354   echo "$as_me: failed program was:" >&5
13355 cat conftest.$ac_ext >&5
13356 cf_cv_need_xopen_extension=unknown
13357 fi
13358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13359 fi
13360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13361 fi
13362 echo "$as_me:13362: result: $cf_cv_need_xopen_extension" >&5
13363 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13364 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13365
13366 echo "$as_me:13366: checking for term.h" >&5
13367 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13368 if test "${cf_cv_term_header+set}" = set; then
13369   echo $ECHO_N "(cached) $ECHO_C" >&6
13370 else
13371
13372 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13373 # for <term.h> if we do not find the variant.
13374
13375 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13376
13377 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13378 */*)
13379         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13380         cf_header_list="$cf_header_item $cf_header_list"
13381         ;;
13382 esac
13383
13384 for cf_header in $cf_header_list
13385 do
13386         cat >conftest.$ac_ext <<_ACEOF
13387 #line 13387 "configure"
13388 #include "confdefs.h"
13389
13390 #include <${cf_cv_ncurses_header:-curses.h}>
13391 #include <${cf_header}>
13392 int
13393 main ()
13394 {
13395 WINDOW *x
13396   ;
13397   return 0;
13398 }
13399 _ACEOF
13400 rm -f conftest.$ac_objext
13401 if { (eval echo "$as_me:13401: \"$ac_compile\"") >&5
13402   (eval $ac_compile) 2>&5
13403   ac_status=$?
13404   echo "$as_me:13404: \$? = $ac_status" >&5
13405   (exit $ac_status); } &&
13406          { ac_try='test -s conftest.$ac_objext'
13407   { (eval echo "$as_me:13407: \"$ac_try\"") >&5
13408   (eval $ac_try) 2>&5
13409   ac_status=$?
13410   echo "$as_me:13410: \$? = $ac_status" >&5
13411   (exit $ac_status); }; }; then
13412   cf_cv_term_header=$cf_header
13413          break
13414 else
13415   echo "$as_me: failed program was:" >&5
13416 cat conftest.$ac_ext >&5
13417 cf_cv_term_header=no
13418 fi
13419 rm -f conftest.$ac_objext conftest.$ac_ext
13420 done
13421
13422 case $cf_cv_term_header in #(vi
13423 no)
13424         # If curses is ncurses, some packagers still mess it up by trying to make
13425         # us use GNU termcap.  This handles the most common case.
13426         for cf_header in ncurses/term.h ncursesw/term.h
13427         do
13428                 cat >conftest.$ac_ext <<_ACEOF
13429 #line 13429 "configure"
13430 #include "confdefs.h"
13431
13432 #include <${cf_cv_ncurses_header:-curses.h}>
13433 #ifdef NCURSES_VERSION
13434 #include <${cf_header}>
13435 #else
13436 make an error
13437 #endif
13438 int
13439 main ()
13440 {
13441 WINDOW *x
13442   ;
13443   return 0;
13444 }
13445 _ACEOF
13446 rm -f conftest.$ac_objext
13447 if { (eval echo "$as_me:13447: \"$ac_compile\"") >&5
13448   (eval $ac_compile) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit $ac_status); } &&
13452          { ac_try='test -s conftest.$ac_objext'
13453   { (eval echo "$as_me:13453: \"$ac_try\"") >&5
13454   (eval $ac_try) 2>&5
13455   ac_status=$?
13456   echo "$as_me:13456: \$? = $ac_status" >&5
13457   (exit $ac_status); }; }; then
13458   cf_cv_term_header=$cf_header
13459                          break
13460 else
13461   echo "$as_me: failed program was:" >&5
13462 cat conftest.$ac_ext >&5
13463 cf_cv_term_header=no
13464 fi
13465 rm -f conftest.$ac_objext conftest.$ac_ext
13466         done
13467         ;;
13468 esac
13469
13470 fi
13471 echo "$as_me:13471: result: $cf_cv_term_header" >&5
13472 echo "${ECHO_T}$cf_cv_term_header" >&6
13473
13474 case $cf_cv_term_header in #(vi
13475 term.h) #(vi
13476         cat >>confdefs.h <<\EOF
13477 #define HAVE_TERM_H 1
13478 EOF
13479
13480         ;;
13481 ncurses/term.h) #(vi
13482         cat >>confdefs.h <<\EOF
13483 #define HAVE_NCURSES_TERM_H 1
13484 EOF
13485
13486         ;;
13487 ncursesw/term.h)
13488         cat >>confdefs.h <<\EOF
13489 #define HAVE_NCURSESW_TERM_H 1
13490 EOF
13491
13492         ;;
13493 esac
13494
13495 echo "$as_me:13495: checking for unctrl.h" >&5
13496 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13497 if test "${cf_cv_unctrl_header+set}" = set; then
13498   echo $ECHO_N "(cached) $ECHO_C" >&6
13499 else
13500
13501 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13502 # for <unctrl.h> if we do not find the variant.
13503
13504 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13505
13506 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13507 */*)
13508         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13509         cf_header_list="$cf_header_item $cf_header_list"
13510         ;;
13511 esac
13512
13513 for cf_header in $cf_header_list
13514 do
13515         cat >conftest.$ac_ext <<_ACEOF
13516 #line 13516 "configure"
13517 #include "confdefs.h"
13518
13519 #include <${cf_cv_ncurses_header:-curses.h}>
13520 #include <${cf_header}>
13521 int
13522 main ()
13523 {
13524 WINDOW *x
13525   ;
13526   return 0;
13527 }
13528 _ACEOF
13529 rm -f conftest.$ac_objext
13530 if { (eval echo "$as_me:13530: \"$ac_compile\"") >&5
13531   (eval $ac_compile) 2>&5
13532   ac_status=$?
13533   echo "$as_me:13533: \$? = $ac_status" >&5
13534   (exit $ac_status); } &&
13535          { ac_try='test -s conftest.$ac_objext'
13536   { (eval echo "$as_me:13536: \"$ac_try\"") >&5
13537   (eval $ac_try) 2>&5
13538   ac_status=$?
13539   echo "$as_me:13539: \$? = $ac_status" >&5
13540   (exit $ac_status); }; }; then
13541   cf_cv_unctrl_header=$cf_header
13542          break
13543 else
13544   echo "$as_me: failed program was:" >&5
13545 cat conftest.$ac_ext >&5
13546 cf_cv_unctrl_header=no
13547 fi
13548 rm -f conftest.$ac_objext conftest.$ac_ext
13549 done
13550
13551 case $cf_cv_unctrl_header in #(vi
13552 no)
13553         { echo "$as_me:13553: WARNING: unctrl.h header not found" >&5
13554 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13555         ;;
13556 esac
13557
13558 fi
13559 echo "$as_me:13559: result: $cf_cv_unctrl_header" >&5
13560 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13561
13562 case $cf_cv_unctrl_header in #(vi
13563 unctrl.h) #(vi
13564         cat >>confdefs.h <<\EOF
13565 #define HAVE_UNCTRL_H 1
13566 EOF
13567
13568         ;;
13569 ncurses/unctrl.h) #(vi
13570         cat >>confdefs.h <<\EOF
13571 #define HAVE_NCURSES_UNCTRL_H 1
13572 EOF
13573
13574         ;;
13575 ncursesw/unctrl.h)
13576         cat >>confdefs.h <<\EOF
13577 #define HAVE_NCURSESW_UNCTRL_H 1
13578 EOF
13579
13580         ;;
13581 esac
13582
13583 for cf_func in \
13584 assume_default_colors \
13585 chgat \
13586 color_set \
13587 filter \
13588 getbegx \
13589 getcurx \
13590 getmaxx \
13591 getnstr \
13592 getparx \
13593 getwin \
13594 mvvline \
13595 mvwvline \
13596 napms \
13597 putwin \
13598 resize_term \
13599 resizeterm \
13600 ripoffline \
13601 scr_dump \
13602 setupterm \
13603 slk_color \
13604 slk_init \
13605 termattrs \
13606 tgetent \
13607 tigetnum \
13608 tigetstr \
13609 typeahead \
13610 use_default_colors \
13611 use_screen \
13612 use_window \
13613 vsscanf \
13614 vw_printw \
13615 wchgat \
13616 winsstr \
13617 wresize \
13618 wsyncdown \
13619
13620 do
13621
13622 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13623
13624         echo "$as_me:13624: checking for ${cf_func}" >&5
13625 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13626
13627 echo "${as_me:-configure}:13627: testing ${cf_func} ..." 1>&5
13628
13629         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13630   echo $ECHO_N "(cached) $ECHO_C" >&6
13631 else
13632
13633                 eval cf_result='$ac_cv_func_'$cf_func
13634                 if test ".$cf_result" != ".no"; then
13635                         cat >conftest.$ac_ext <<_ACEOF
13636 #line 13636 "configure"
13637 #include "confdefs.h"
13638
13639 #ifdef HAVE_XCURSES
13640 #include <xcurses.h>
13641 char * XCursesProgramName = "test";
13642 #else
13643 #include <${cf_cv_ncurses_header:-curses.h}>
13644 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13645 #include <ncursesw/term.h>
13646 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13647 #include <ncurses/term.h>
13648 #elif defined(HAVE_TERM_H)
13649 #include <term.h>
13650 #endif
13651 #endif
13652
13653 int
13654 main ()
13655 {
13656
13657 #ifndef ${cf_func}
13658 long foo = (long)(&${cf_func});
13659 if (foo + 1234 > 5678)
13660         ${cf_cv_main_return:-return}(foo);
13661 #endif
13662
13663   ;
13664   return 0;
13665 }
13666 _ACEOF
13667 rm -f conftest.$ac_objext conftest$ac_exeext
13668 if { (eval echo "$as_me:13668: \"$ac_link\"") >&5
13669   (eval $ac_link) 2>&5
13670   ac_status=$?
13671   echo "$as_me:13671: \$? = $ac_status" >&5
13672   (exit $ac_status); } &&
13673          { ac_try='test -s conftest$ac_exeext'
13674   { (eval echo "$as_me:13674: \"$ac_try\"") >&5
13675   (eval $ac_try) 2>&5
13676   ac_status=$?
13677   echo "$as_me:13677: \$? = $ac_status" >&5
13678   (exit $ac_status); }; }; then
13679   cf_result=yes
13680 else
13681   echo "$as_me: failed program was:" >&5
13682 cat conftest.$ac_ext >&5
13683 cf_result=no
13684 fi
13685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13686                 fi
13687                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13688
13689 fi
13690
13691         # use the computed/retrieved cache-value:
13692         eval 'cf_result=$cf_cv_func_'$cf_func
13693         echo "$as_me:13693: result: $cf_result" >&5
13694 echo "${ECHO_T}$cf_result" >&6
13695         if test $cf_result != no; then
13696                 cat >>confdefs.h <<EOF
13697 #define HAVE_${cf_tr_func} 1
13698 EOF
13699
13700         fi
13701 done
13702
13703 for cf_func in tputs
13704 do
13705
13706 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13707
13708         echo "$as_me:13708: checking for ${cf_func}" >&5
13709 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13710
13711 echo "${as_me:-configure}:13711: testing ${cf_func} ..." 1>&5
13712
13713         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13714   echo $ECHO_N "(cached) $ECHO_C" >&6
13715 else
13716
13717                 eval cf_result='$ac_cv_func_'$cf_func
13718                 if test ".$cf_result" != ".no"; then
13719                         cat >conftest.$ac_ext <<_ACEOF
13720 #line 13720 "configure"
13721 #include "confdefs.h"
13722
13723 #ifdef HAVE_XCURSES
13724 #include <xcurses.h>
13725 char * XCursesProgramName = "test";
13726 #else
13727 #include <${cf_cv_ncurses_header:-curses.h}>
13728 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13729 #include <ncursesw/term.h>
13730 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13731 #include <ncurses/term.h>
13732 #elif defined(HAVE_TERM_H)
13733 #include <term.h>
13734 #endif
13735 #endif
13736
13737 int
13738 main ()
13739 {
13740
13741 #ifndef ${cf_func}
13742 long foo = (long)(&${cf_func});
13743 if (foo + 1234 > 5678)
13744         ${cf_cv_main_return:-return}(foo);
13745 #endif
13746
13747   ;
13748   return 0;
13749 }
13750 _ACEOF
13751 rm -f conftest.$ac_objext conftest$ac_exeext
13752 if { (eval echo "$as_me:13752: \"$ac_link\"") >&5
13753   (eval $ac_link) 2>&5
13754   ac_status=$?
13755   echo "$as_me:13755: \$? = $ac_status" >&5
13756   (exit $ac_status); } &&
13757          { ac_try='test -s conftest$ac_exeext'
13758   { (eval echo "$as_me:13758: \"$ac_try\"") >&5
13759   (eval $ac_try) 2>&5
13760   ac_status=$?
13761   echo "$as_me:13761: \$? = $ac_status" >&5
13762   (exit $ac_status); }; }; then
13763   cf_result=yes
13764 else
13765   echo "$as_me: failed program was:" >&5
13766 cat conftest.$ac_ext >&5
13767 cf_result=no
13768 fi
13769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13770                 fi
13771                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13772
13773 fi
13774
13775         # use the computed/retrieved cache-value:
13776         eval 'cf_result=$cf_cv_func_'$cf_func
13777         echo "$as_me:13777: result: $cf_result" >&5
13778 echo "${ECHO_T}$cf_result" >&6
13779         if test $cf_result != no; then
13780                 cat >>confdefs.h <<EOF
13781 #define HAVE_${cf_tr_func} 1
13782 EOF
13783
13784         fi
13785 done
13786
13787 if test x$cf_cv_func_tputs = xyes
13788 then
13789         cf_done=no
13790         for cf_arg in int char
13791         do
13792                 for cf_ret in int void
13793                 do
13794                         if test $cf_ret = void
13795                         then
13796                                 cf_return="/* nothing */"
13797                         else
13798                                 cf_return="return value"
13799                         fi
13800                         cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803
13804 #include <${cf_cv_ncurses_header:-curses.h}>
13805 #include <$cf_cv_term_header>
13806
13807 static $cf_ret outc($cf_arg value) { $cf_return; }
13808
13809 int
13810 main ()
13811 {
13812
13813         tputs("hello", 0, outc);
13814         ${cf_cv_main_return:-return}(0);
13815
13816   ;
13817   return 0;
13818 }
13819 _ACEOF
13820 rm -f conftest.$ac_objext
13821 if { (eval echo "$as_me:13821: \"$ac_compile\"") >&5
13822   (eval $ac_compile) 2>&5
13823   ac_status=$?
13824   echo "$as_me:13824: \$? = $ac_status" >&5
13825   (exit $ac_status); } &&
13826          { ac_try='test -s conftest.$ac_objext'
13827   { (eval echo "$as_me:13827: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:13830: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832
13833                 test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
13834
13835 echo "${as_me:-configure}:13835: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
13836
13837                 cat >>confdefs.h <<EOF
13838 #define TPUTS_ARG               $cf_arg
13839 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
13840 #define TPUTS_RETURN(value)     $cf_return
13841 EOF
13842                 cf_done=yes
13843                 break
13844
13845 else
13846   echo "$as_me: failed program was:" >&5
13847 cat conftest.$ac_ext >&5
13848 fi
13849 rm -f conftest.$ac_objext conftest.$ac_ext
13850                 done
13851                 test $cf_done = yes && break
13852         done
13853 fi
13854
13855 echo "$as_me:13855: checking for ncurses extended functions" >&5
13856 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
13857 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
13858   echo $ECHO_N "(cached) $ECHO_C" >&6
13859 else
13860
13861 cat >conftest.$ac_ext <<_ACEOF
13862 #line 13862 "configure"
13863 #include "confdefs.h"
13864
13865 #include <${cf_cv_ncurses_header:-curses.h}>
13866 int
13867 main ()
13868 {
13869
13870 int x = NCURSES_EXT_FUNCS
13871
13872   ;
13873   return 0;
13874 }
13875 _ACEOF
13876 rm -f conftest.$ac_objext
13877 if { (eval echo "$as_me:13877: \"$ac_compile\"") >&5
13878   (eval $ac_compile) 2>&5
13879   ac_status=$?
13880   echo "$as_me:13880: \$? = $ac_status" >&5
13881   (exit $ac_status); } &&
13882          { ac_try='test -s conftest.$ac_objext'
13883   { (eval echo "$as_me:13883: \"$ac_try\"") >&5
13884   (eval $ac_try) 2>&5
13885   ac_status=$?
13886   echo "$as_me:13886: \$? = $ac_status" >&5
13887   (exit $ac_status); }; }; then
13888   cf_cv_ncurses_ext_funcs=defined
13889 else
13890   echo "$as_me: failed program was:" >&5
13891 cat conftest.$ac_ext >&5
13892
13893 cat >conftest.$ac_ext <<_ACEOF
13894 #line 13894 "configure"
13895 #include "confdefs.h"
13896
13897 #include <${cf_cv_ncurses_header:-curses.h}>
13898 int
13899 main ()
13900 {
13901
13902         (void) assume_default_colors (0, 0);
13903         (void) curses_version ();
13904         (void) define_key (0, 0);
13905         (void) is_term_resized (0, 0);
13906         (void) key_defined (0);
13907         (void) keybound (0, 0);
13908         (void) keyok (0, 0);
13909         (void) resize_term (0, 0);
13910         (void) resizeterm (0, 0);
13911         (void) use_default_colors ();
13912         (void) use_extended_names (0);
13913         (void) wresize (0, 0, 0);
13914   ;
13915   return 0;
13916 }
13917 _ACEOF
13918 rm -f conftest.$ac_objext conftest$ac_exeext
13919 if { (eval echo "$as_me:13919: \"$ac_link\"") >&5
13920   (eval $ac_link) 2>&5
13921   ac_status=$?
13922   echo "$as_me:13922: \$? = $ac_status" >&5
13923   (exit $ac_status); } &&
13924          { ac_try='test -s conftest$ac_exeext'
13925   { (eval echo "$as_me:13925: \"$ac_try\"") >&5
13926   (eval $ac_try) 2>&5
13927   ac_status=$?
13928   echo "$as_me:13928: \$? = $ac_status" >&5
13929   (exit $ac_status); }; }; then
13930   cf_cv_ncurses_ext_funcs=yes
13931 else
13932   echo "$as_me: failed program was:" >&5
13933 cat conftest.$ac_ext >&5
13934 cf_cv_ncurses_ext_funcs=no
13935 fi
13936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13937
13938 fi
13939 rm -f conftest.$ac_objext conftest.$ac_ext
13940
13941 fi
13942 echo "$as_me:13942: result: $cf_cv_ncurses_ext_funcs" >&5
13943 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
13944 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
13945 #define NCURSES_EXT_FUNCS 1
13946 EOF
13947
13948 if test "$cf_enable_widec" = yes
13949 then
13950         echo "$as_me:13950: checking for wide-character functions" >&5
13951 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
13952 if test "${cf_cv_widechar_funcs+set}" = set; then
13953   echo $ECHO_N "(cached) $ECHO_C" >&6
13954 else
13955
13956         cat >conftest.$ac_ext <<_ACEOF
13957 #line 13957 "configure"
13958 #include "confdefs.h"
13959
13960 #include <${cf_cv_ncurses_header:-curses.h}>
13961 int
13962 main ()
13963 {
13964
13965                 static wchar_t src_wchar[2];
13966                 static cchar_t dst_cchar;
13967                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
13968
13969   ;
13970   return 0;
13971 }
13972 _ACEOF
13973 rm -f conftest.$ac_objext conftest$ac_exeext
13974 if { (eval echo "$as_me:13974: \"$ac_link\"") >&5
13975   (eval $ac_link) 2>&5
13976   ac_status=$?
13977   echo "$as_me:13977: \$? = $ac_status" >&5
13978   (exit $ac_status); } &&
13979          { ac_try='test -s conftest$ac_exeext'
13980   { (eval echo "$as_me:13980: \"$ac_try\"") >&5
13981   (eval $ac_try) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); }; }; then
13985   cf_cv_widechar_funcs=yes
13986 else
13987   echo "$as_me: failed program was:" >&5
13988 cat conftest.$ac_ext >&5
13989 cf_cv_widechar_funcs=no
13990 fi
13991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13992
13993 fi
13994 echo "$as_me:13994: result: $cf_cv_widechar_funcs" >&5
13995 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
13996         if test "$cf_cv_widechar_funcs" != no ; then
13997                 cat >>confdefs.h <<\EOF
13998 #define USE_WIDEC_SUPPORT 1
13999 EOF
14000
14001         else
14002                 cat >>confdefs.h <<\EOF
14003 #define USE_WIDEC_SUPPORT 0
14004 EOF
14005
14006         fi
14007 else
14008         cat >>confdefs.h <<\EOF
14009 #define USE_WIDEC_SUPPORT 0
14010 EOF
14011
14012 fi
14013
14014 echo "$as_me:14014: checking if sys/time.h works with sys/select.h" >&5
14015 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14016 if test "${cf_cv_sys_time_select+set}" = set; then
14017   echo $ECHO_N "(cached) $ECHO_C" >&6
14018 else
14019
14020 cat >conftest.$ac_ext <<_ACEOF
14021 #line 14021 "configure"
14022 #include "confdefs.h"
14023
14024 #include <sys/types.h>
14025 #ifdef HAVE_SYS_TIME_H
14026 #include <sys/time.h>
14027 #endif
14028 #ifdef HAVE_SYS_SELECT_H
14029 #include <sys/select.h>
14030 #endif
14031
14032 int
14033 main ()
14034 {
14035
14036   ;
14037   return 0;
14038 }
14039 _ACEOF
14040 rm -f conftest.$ac_objext
14041 if { (eval echo "$as_me:14041: \"$ac_compile\"") >&5
14042   (eval $ac_compile) 2>&5
14043   ac_status=$?
14044   echo "$as_me:14044: \$? = $ac_status" >&5
14045   (exit $ac_status); } &&
14046          { ac_try='test -s conftest.$ac_objext'
14047   { (eval echo "$as_me:14047: \"$ac_try\"") >&5
14048   (eval $ac_try) 2>&5
14049   ac_status=$?
14050   echo "$as_me:14050: \$? = $ac_status" >&5
14051   (exit $ac_status); }; }; then
14052   cf_cv_sys_time_select=yes
14053 else
14054   echo "$as_me: failed program was:" >&5
14055 cat conftest.$ac_ext >&5
14056 cf_cv_sys_time_select=no
14057 fi
14058 rm -f conftest.$ac_objext conftest.$ac_ext
14059
14060 fi
14061
14062 echo "$as_me:14062: result: $cf_cv_sys_time_select" >&5
14063 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14064 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14065 #define HAVE_SYS_TIME_SELECT 1
14066 EOF
14067
14068 echo "$as_me:14068: checking for function curses_version" >&5
14069 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14070 if test "${cf_cv_func_curses_version+set}" = set; then
14071   echo $ECHO_N "(cached) $ECHO_C" >&6
14072 else
14073
14074 if test "$cross_compiling" = yes; then
14075   cf_cv_func_curses_version=unknown
14076 else
14077   cat >conftest.$ac_ext <<_ACEOF
14078 #line 14078 "configure"
14079 #include "confdefs.h"
14080
14081 #include <${cf_cv_ncurses_header:-curses.h}>
14082 int main()
14083 {
14084         char temp[1024];
14085         sprintf(temp, "%s\n", curses_version());
14086         ${cf_cv_main_return:-return}(0);
14087 }
14088
14089 _ACEOF
14090 rm -f conftest$ac_exeext
14091 if { (eval echo "$as_me:14091: \"$ac_link\"") >&5
14092   (eval $ac_link) 2>&5
14093   ac_status=$?
14094   echo "$as_me:14094: \$? = $ac_status" >&5
14095   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14096   { (eval echo "$as_me:14096: \"$ac_try\"") >&5
14097   (eval $ac_try) 2>&5
14098   ac_status=$?
14099   echo "$as_me:14099: \$? = $ac_status" >&5
14100   (exit $ac_status); }; }; then
14101   cf_cv_func_curses_version=yes
14102
14103 else
14104   echo "$as_me: program exited with status $ac_status" >&5
14105 echo "$as_me: failed program was:" >&5
14106 cat conftest.$ac_ext >&5
14107 cf_cv_func_curses_version=no
14108
14109 fi
14110 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14111 fi
14112 rm -f core
14113 fi
14114 echo "$as_me:14114: result: $cf_cv_func_curses_version" >&5
14115 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14116 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14117 #define HAVE_CURSES_VERSION 1
14118 EOF
14119
14120 echo "$as_me:14120: checking for ncurses wrap-prefix" >&5
14121 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14122
14123 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14124 if test "${with_ncurses_wrap_prefix+set}" = set; then
14125   withval="$with_ncurses_wrap_prefix"
14126   NCURSES_WRAP_PREFIX=$withval
14127 else
14128   NCURSES_WRAP_PREFIX=_nc_
14129 fi;
14130 echo "$as_me:14130: result: $NCURSES_WRAP_PREFIX" >&5
14131 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14132
14133 echo "$as_me:14133: checking for alternate character set array" >&5
14134 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14135 if test "${cf_cv_curses_acs_map+set}" = set; then
14136   echo $ECHO_N "(cached) $ECHO_C" >&6
14137 else
14138
14139 cf_cv_curses_acs_map=unknown
14140 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14141 do
14142 cat >conftest.$ac_ext <<_ACEOF
14143 #line 14143 "configure"
14144 #include "confdefs.h"
14145
14146 #include <${cf_cv_ncurses_header:-curses.h}>
14147
14148 int
14149 main ()
14150 {
14151
14152 $name['k'] = ACS_PLUS
14153
14154   ;
14155   return 0;
14156 }
14157 _ACEOF
14158 rm -f conftest.$ac_objext conftest$ac_exeext
14159 if { (eval echo "$as_me:14159: \"$ac_link\"") >&5
14160   (eval $ac_link) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit $ac_status); } &&
14164          { ac_try='test -s conftest$ac_exeext'
14165   { (eval echo "$as_me:14165: \"$ac_try\"") >&5
14166   (eval $ac_try) 2>&5
14167   ac_status=$?
14168   echo "$as_me:14168: \$? = $ac_status" >&5
14169   (exit $ac_status); }; }; then
14170   cf_cv_curses_acs_map=$name; break
14171 else
14172   echo "$as_me: failed program was:" >&5
14173 cat conftest.$ac_ext >&5
14174 fi
14175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14176 done
14177
14178 fi
14179 echo "$as_me:14179: result: $cf_cv_curses_acs_map" >&5
14180 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14181
14182 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14183 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14184 EOF
14185
14186 if test "$cf_enable_widec" = yes; then
14187
14188 echo "$as_me:14188: checking for wide alternate character set array" >&5
14189 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14190 if test "${cf_cv_curses_wacs_map+set}" = set; then
14191   echo $ECHO_N "(cached) $ECHO_C" >&6
14192 else
14193
14194         cf_cv_curses_wacs_map=unknown
14195         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14196         do
14197         cat >conftest.$ac_ext <<_ACEOF
14198 #line 14198 "configure"
14199 #include "confdefs.h"
14200
14201 #ifndef _XOPEN_SOURCE_EXTENDED
14202 #define _XOPEN_SOURCE_EXTENDED
14203 #endif
14204 #include <${cf_cv_ncurses_header:-curses.h}>
14205 int
14206 main ()
14207 {
14208 void *foo = &($name['k'])
14209   ;
14210   return 0;
14211 }
14212 _ACEOF
14213 rm -f conftest.$ac_objext conftest$ac_exeext
14214 if { (eval echo "$as_me:14214: \"$ac_link\"") >&5
14215   (eval $ac_link) 2>&5
14216   ac_status=$?
14217   echo "$as_me:14217: \$? = $ac_status" >&5
14218   (exit $ac_status); } &&
14219          { ac_try='test -s conftest$ac_exeext'
14220   { (eval echo "$as_me:14220: \"$ac_try\"") >&5
14221   (eval $ac_try) 2>&5
14222   ac_status=$?
14223   echo "$as_me:14223: \$? = $ac_status" >&5
14224   (exit $ac_status); }; }; then
14225   cf_cv_curses_wacs_map=$name
14226          break
14227 else
14228   echo "$as_me: failed program was:" >&5
14229 cat conftest.$ac_ext >&5
14230 fi
14231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14232         done
14233 fi
14234 echo "$as_me:14234: result: $cf_cv_curses_wacs_map" >&5
14235 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14236
14237 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14238 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14239 EOF
14240
14241 echo "$as_me:14241: checking for wide alternate character constants" >&5
14242 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14243 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14244   echo $ECHO_N "(cached) $ECHO_C" >&6
14245 else
14246
14247 cf_cv_curses_wacs_symbols=no
14248 if test "$cf_cv_curses_wacs_map" != unknown
14249 then
14250         cat >conftest.$ac_ext <<_ACEOF
14251 #line 14251 "configure"
14252 #include "confdefs.h"
14253
14254 #ifndef _XOPEN_SOURCE_EXTENDED
14255 #define _XOPEN_SOURCE_EXTENDED
14256 #endif
14257 #include <${cf_cv_ncurses_header:-curses.h}>
14258 int
14259 main ()
14260 {
14261 cchar_t *foo = WACS_PLUS;
14262          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14263   ;
14264   return 0;
14265 }
14266 _ACEOF
14267 rm -f conftest.$ac_objext conftest$ac_exeext
14268 if { (eval echo "$as_me:14268: \"$ac_link\"") >&5
14269   (eval $ac_link) 2>&5
14270   ac_status=$?
14271   echo "$as_me:14271: \$? = $ac_status" >&5
14272   (exit $ac_status); } &&
14273          { ac_try='test -s conftest$ac_exeext'
14274   { (eval echo "$as_me:14274: \"$ac_try\"") >&5
14275   (eval $ac_try) 2>&5
14276   ac_status=$?
14277   echo "$as_me:14277: \$? = $ac_status" >&5
14278   (exit $ac_status); }; }; then
14279   cf_cv_curses_wacs_symbols=yes
14280 else
14281   echo "$as_me: failed program was:" >&5
14282 cat conftest.$ac_ext >&5
14283 fi
14284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14285 else
14286         cat >conftest.$ac_ext <<_ACEOF
14287 #line 14287 "configure"
14288 #include "confdefs.h"
14289
14290 #ifndef _XOPEN_SOURCE_EXTENDED
14291 #define _XOPEN_SOURCE_EXTENDED
14292 #endif
14293 #include <${cf_cv_ncurses_header:-curses.h}>
14294 int
14295 main ()
14296 {
14297 cchar_t *foo = WACS_PLUS
14298   ;
14299   return 0;
14300 }
14301 _ACEOF
14302 rm -f conftest.$ac_objext conftest$ac_exeext
14303 if { (eval echo "$as_me:14303: \"$ac_link\"") >&5
14304   (eval $ac_link) 2>&5
14305   ac_status=$?
14306   echo "$as_me:14306: \$? = $ac_status" >&5
14307   (exit $ac_status); } &&
14308          { ac_try='test -s conftest$ac_exeext'
14309   { (eval echo "$as_me:14309: \"$ac_try\"") >&5
14310   (eval $ac_try) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); }; }; then
14314   cf_cv_curses_wacs_symbols=yes
14315 else
14316   echo "$as_me: failed program was:" >&5
14317 cat conftest.$ac_ext >&5
14318 fi
14319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14320 fi
14321
14322 fi
14323 echo "$as_me:14323: result: $cf_cv_curses_wacs_symbols" >&5
14324 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14325
14326 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
14327 #define CURSES_WACS_SYMBOLS 1
14328 EOF
14329
14330 fi
14331
14332 echo "$as_me:14332: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14333 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14334 cat >conftest.$ac_ext <<_ACEOF
14335 #line 14335 "configure"
14336 #include "confdefs.h"
14337
14338 #ifndef _XOPEN_SOURCE_EXTENDED
14339 #define _XOPEN_SOURCE_EXTENDED
14340 #endif
14341 #include <${cf_cv_ncurses_header:-curses.h}>
14342 int
14343 main ()
14344 {
14345
14346 attr_t foo
14347
14348   ;
14349   return 0;
14350 }
14351 _ACEOF
14352 rm -f conftest.$ac_objext
14353 if { (eval echo "$as_me:14353: \"$ac_compile\"") >&5
14354   (eval $ac_compile) 2>&5
14355   ac_status=$?
14356   echo "$as_me:14356: \$? = $ac_status" >&5
14357   (exit $ac_status); } &&
14358          { ac_try='test -s conftest.$ac_objext'
14359   { (eval echo "$as_me:14359: \"$ac_try\"") >&5
14360   (eval $ac_try) 2>&5
14361   ac_status=$?
14362   echo "$as_me:14362: \$? = $ac_status" >&5
14363   (exit $ac_status); }; }; then
14364   cf_result=yes
14365 else
14366   echo "$as_me: failed program was:" >&5
14367 cat conftest.$ac_ext >&5
14368 cf_result=no
14369 fi
14370 rm -f conftest.$ac_objext conftest.$ac_ext
14371 echo "$as_me:14371: result: $cf_result" >&5
14372 echo "${ECHO_T}$cf_result" >&6
14373 if test $cf_result = yes ; then
14374
14375 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14376
14377         cat >>confdefs.h <<EOF
14378 #define $cf_result 1
14379 EOF
14380
14381 else
14382         cat >>confdefs.h <<EOF
14383 #define attr_t long
14384 EOF
14385
14386 fi
14387
14388 if test "$cf_enable_widec" = yes; then
14389
14390 # This is needed on Tru64 5.0 to declare mbstate_t
14391 echo "$as_me:14391: checking if we must include wchar.h to declare mbstate_t" >&5
14392 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14393 if test "${cf_cv_mbstate_t+set}" = set; then
14394   echo $ECHO_N "(cached) $ECHO_C" >&6
14395 else
14396
14397 cat >conftest.$ac_ext <<_ACEOF
14398 #line 14398 "configure"
14399 #include "confdefs.h"
14400
14401 #include <stdlib.h>
14402 #include <stdarg.h>
14403 #include <stdio.h>
14404 #ifdef HAVE_LIBUTF8_H
14405 #include <libutf8.h>
14406 #endif
14407 int
14408 main ()
14409 {
14410 mbstate_t state
14411   ;
14412   return 0;
14413 }
14414 _ACEOF
14415 rm -f conftest.$ac_objext
14416 if { (eval echo "$as_me:14416: \"$ac_compile\"") >&5
14417   (eval $ac_compile) 2>&5
14418   ac_status=$?
14419   echo "$as_me:14419: \$? = $ac_status" >&5
14420   (exit $ac_status); } &&
14421          { ac_try='test -s conftest.$ac_objext'
14422   { (eval echo "$as_me:14422: \"$ac_try\"") >&5
14423   (eval $ac_try) 2>&5
14424   ac_status=$?
14425   echo "$as_me:14425: \$? = $ac_status" >&5
14426   (exit $ac_status); }; }; then
14427   cf_cv_mbstate_t=no
14428 else
14429   echo "$as_me: failed program was:" >&5
14430 cat conftest.$ac_ext >&5
14431 cat >conftest.$ac_ext <<_ACEOF
14432 #line 14432 "configure"
14433 #include "confdefs.h"
14434
14435 #include <stdlib.h>
14436 #include <stdarg.h>
14437 #include <stdio.h>
14438 #include <wchar.h>
14439 #ifdef HAVE_LIBUTF8_H
14440 #include <libutf8.h>
14441 #endif
14442 int
14443 main ()
14444 {
14445 mbstate_t value
14446   ;
14447   return 0;
14448 }
14449 _ACEOF
14450 rm -f conftest.$ac_objext
14451 if { (eval echo "$as_me:14451: \"$ac_compile\"") >&5
14452   (eval $ac_compile) 2>&5
14453   ac_status=$?
14454   echo "$as_me:14454: \$? = $ac_status" >&5
14455   (exit $ac_status); } &&
14456          { ac_try='test -s conftest.$ac_objext'
14457   { (eval echo "$as_me:14457: \"$ac_try\"") >&5
14458   (eval $ac_try) 2>&5
14459   ac_status=$?
14460   echo "$as_me:14460: \$? = $ac_status" >&5
14461   (exit $ac_status); }; }; then
14462   cf_cv_mbstate_t=yes
14463 else
14464   echo "$as_me: failed program was:" >&5
14465 cat conftest.$ac_ext >&5
14466 cf_cv_mbstate_t=unknown
14467 fi
14468 rm -f conftest.$ac_objext conftest.$ac_ext
14469 fi
14470 rm -f conftest.$ac_objext conftest.$ac_ext
14471 fi
14472 echo "$as_me:14472: result: $cf_cv_mbstate_t" >&5
14473 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14474
14475 if test "$cf_cv_mbstate_t" = yes ; then
14476         cat >>confdefs.h <<\EOF
14477 #define NEED_WCHAR_H 1
14478 EOF
14479
14480         NEED_WCHAR_H=1
14481 fi
14482
14483 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
14484 if test "$cf_cv_mbstate_t" = unknown ; then
14485         NCURSES_MBSTATE_T=1
14486 fi
14487
14488 # if we find mbstate_t in either place, use substitution to provide a fallback.
14489 if test "$cf_cv_mbstate_t" != unknown ; then
14490         NCURSES_OK_MBSTATE_T=1
14491 fi
14492
14493 # This is needed on Tru64 5.0 to declare wchar_t
14494 echo "$as_me:14494: checking if we must include wchar.h to declare wchar_t" >&5
14495 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
14496 if test "${cf_cv_wchar_t+set}" = set; then
14497   echo $ECHO_N "(cached) $ECHO_C" >&6
14498 else
14499
14500 cat >conftest.$ac_ext <<_ACEOF
14501 #line 14501 "configure"
14502 #include "confdefs.h"
14503
14504 #include <stdlib.h>
14505 #include <stdarg.h>
14506 #include <stdio.h>
14507 #ifdef HAVE_LIBUTF8_H
14508 #include <libutf8.h>
14509 #endif
14510 int
14511 main ()
14512 {
14513 wchar_t state
14514   ;
14515   return 0;
14516 }
14517 _ACEOF
14518 rm -f conftest.$ac_objext
14519 if { (eval echo "$as_me:14519: \"$ac_compile\"") >&5
14520   (eval $ac_compile) 2>&5
14521   ac_status=$?
14522   echo "$as_me:14522: \$? = $ac_status" >&5
14523   (exit $ac_status); } &&
14524          { ac_try='test -s conftest.$ac_objext'
14525   { (eval echo "$as_me:14525: \"$ac_try\"") >&5
14526   (eval $ac_try) 2>&5
14527   ac_status=$?
14528   echo "$as_me:14528: \$? = $ac_status" >&5
14529   (exit $ac_status); }; }; then
14530   cf_cv_wchar_t=no
14531 else
14532   echo "$as_me: failed program was:" >&5
14533 cat conftest.$ac_ext >&5
14534 cat >conftest.$ac_ext <<_ACEOF
14535 #line 14535 "configure"
14536 #include "confdefs.h"
14537
14538 #include <stdlib.h>
14539 #include <stdarg.h>
14540 #include <stdio.h>
14541 #include <wchar.h>
14542 #ifdef HAVE_LIBUTF8_H
14543 #include <libutf8.h>
14544 #endif
14545 int
14546 main ()
14547 {
14548 wchar_t value
14549   ;
14550   return 0;
14551 }
14552 _ACEOF
14553 rm -f conftest.$ac_objext
14554 if { (eval echo "$as_me:14554: \"$ac_compile\"") >&5
14555   (eval $ac_compile) 2>&5
14556   ac_status=$?
14557   echo "$as_me:14557: \$? = $ac_status" >&5
14558   (exit $ac_status); } &&
14559          { ac_try='test -s conftest.$ac_objext'
14560   { (eval echo "$as_me:14560: \"$ac_try\"") >&5
14561   (eval $ac_try) 2>&5
14562   ac_status=$?
14563   echo "$as_me:14563: \$? = $ac_status" >&5
14564   (exit $ac_status); }; }; then
14565   cf_cv_wchar_t=yes
14566 else
14567   echo "$as_me: failed program was:" >&5
14568 cat conftest.$ac_ext >&5
14569 cf_cv_wchar_t=unknown
14570 fi
14571 rm -f conftest.$ac_objext conftest.$ac_ext
14572 fi
14573 rm -f conftest.$ac_objext conftest.$ac_ext
14574 fi
14575 echo "$as_me:14575: result: $cf_cv_wchar_t" >&5
14576 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14577
14578 if test "$cf_cv_wchar_t" = yes ; then
14579         cat >>confdefs.h <<\EOF
14580 #define NEED_WCHAR_H 1
14581 EOF
14582
14583         NEED_WCHAR_H=1
14584 fi
14585
14586 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14587 if test "$cf_cv_wchar_t" = unknown ; then
14588         NCURSES_WCHAR_T=1
14589 fi
14590
14591 # if we find wchar_t in either place, use substitution to provide a fallback.
14592 if test "$cf_cv_wchar_t" != unknown ; then
14593         NCURSES_OK_WCHAR_T=1
14594 fi
14595
14596 # This is needed on Tru64 5.0 to declare wint_t
14597 echo "$as_me:14597: checking if we must include wchar.h to declare wint_t" >&5
14598 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14599 if test "${cf_cv_wint_t+set}" = set; then
14600   echo $ECHO_N "(cached) $ECHO_C" >&6
14601 else
14602
14603 cat >conftest.$ac_ext <<_ACEOF
14604 #line 14604 "configure"
14605 #include "confdefs.h"
14606
14607 #include <stdlib.h>
14608 #include <stdarg.h>
14609 #include <stdio.h>
14610 #ifdef HAVE_LIBUTF8_H
14611 #include <libutf8.h>
14612 #endif
14613 int
14614 main ()
14615 {
14616 wint_t state
14617   ;
14618   return 0;
14619 }
14620 _ACEOF
14621 rm -f conftest.$ac_objext
14622 if { (eval echo "$as_me:14622: \"$ac_compile\"") >&5
14623   (eval $ac_compile) 2>&5
14624   ac_status=$?
14625   echo "$as_me:14625: \$? = $ac_status" >&5
14626   (exit $ac_status); } &&
14627          { ac_try='test -s conftest.$ac_objext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633   cf_cv_wint_t=no
14634 else
14635   echo "$as_me: failed program was:" >&5
14636 cat conftest.$ac_ext >&5
14637 cat >conftest.$ac_ext <<_ACEOF
14638 #line 14638 "configure"
14639 #include "confdefs.h"
14640
14641 #include <stdlib.h>
14642 #include <stdarg.h>
14643 #include <stdio.h>
14644 #include <wchar.h>
14645 #ifdef HAVE_LIBUTF8_H
14646 #include <libutf8.h>
14647 #endif
14648 int
14649 main ()
14650 {
14651 wint_t value
14652   ;
14653   return 0;
14654 }
14655 _ACEOF
14656 rm -f conftest.$ac_objext
14657 if { (eval echo "$as_me:14657: \"$ac_compile\"") >&5
14658   (eval $ac_compile) 2>&5
14659   ac_status=$?
14660   echo "$as_me:14660: \$? = $ac_status" >&5
14661   (exit $ac_status); } &&
14662          { ac_try='test -s conftest.$ac_objext'
14663   { (eval echo "$as_me:14663: \"$ac_try\"") >&5
14664   (eval $ac_try) 2>&5
14665   ac_status=$?
14666   echo "$as_me:14666: \$? = $ac_status" >&5
14667   (exit $ac_status); }; }; then
14668   cf_cv_wint_t=yes
14669 else
14670   echo "$as_me: failed program was:" >&5
14671 cat conftest.$ac_ext >&5
14672 cf_cv_wint_t=unknown
14673 fi
14674 rm -f conftest.$ac_objext conftest.$ac_ext
14675 fi
14676 rm -f conftest.$ac_objext conftest.$ac_ext
14677 fi
14678 echo "$as_me:14678: result: $cf_cv_wint_t" >&5
14679 echo "${ECHO_T}$cf_cv_wint_t" >&6
14680
14681 if test "$cf_cv_wint_t" = yes ; then
14682         cat >>confdefs.h <<\EOF
14683 #define NEED_WCHAR_H 1
14684 EOF
14685
14686         NEED_WCHAR_H=1
14687 fi
14688
14689 # if we do not find wint_t in either place, use substitution to provide a fallback.
14690 if test "$cf_cv_wint_t" = unknown ; then
14691         NCURSES_WINT_T=1
14692 fi
14693
14694 # if we find wint_t in either place, use substitution to provide a fallback.
14695 if test "$cf_cv_wint_t" != unknown ; then
14696         NCURSES_OK_WINT_T=1
14697 fi
14698
14699         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
14700
14701 echo "$as_me:14701: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14702 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14703 cat >conftest.$ac_ext <<_ACEOF
14704 #line 14704 "configure"
14705 #include "confdefs.h"
14706
14707 #ifndef _XOPEN_SOURCE_EXTENDED
14708 #define _XOPEN_SOURCE_EXTENDED
14709 #endif
14710 #include <${cf_cv_ncurses_header:-curses.h}>
14711 int
14712 main ()
14713 {
14714
14715 mbstate_t foo
14716
14717   ;
14718   return 0;
14719 }
14720 _ACEOF
14721 rm -f conftest.$ac_objext
14722 if { (eval echo "$as_me:14722: \"$ac_compile\"") >&5
14723   (eval $ac_compile) 2>&5
14724   ac_status=$?
14725   echo "$as_me:14725: \$? = $ac_status" >&5
14726   (exit $ac_status); } &&
14727          { ac_try='test -s conftest.$ac_objext'
14728   { (eval echo "$as_me:14728: \"$ac_try\"") >&5
14729   (eval $ac_try) 2>&5
14730   ac_status=$?
14731   echo "$as_me:14731: \$? = $ac_status" >&5
14732   (exit $ac_status); }; }; then
14733   cf_result=yes
14734 else
14735   echo "$as_me: failed program was:" >&5
14736 cat conftest.$ac_ext >&5
14737 cf_result=no
14738 fi
14739 rm -f conftest.$ac_objext conftest.$ac_ext
14740 echo "$as_me:14740: result: $cf_result" >&5
14741 echo "${ECHO_T}$cf_result" >&6
14742 if test $cf_result = yes ; then
14743
14744 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14745
14746         cat >>confdefs.h <<EOF
14747 #define $cf_result 1
14748 EOF
14749
14750 else
14751         cat >>confdefs.h <<EOF
14752 #define mbstate_t long
14753 EOF
14754
14755 fi
14756
14757         fi
14758
14759         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
14760
14761 echo "$as_me:14761: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14762 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14763 cat >conftest.$ac_ext <<_ACEOF
14764 #line 14764 "configure"
14765 #include "confdefs.h"
14766
14767 #ifndef _XOPEN_SOURCE_EXTENDED
14768 #define _XOPEN_SOURCE_EXTENDED
14769 #endif
14770 #include <${cf_cv_ncurses_header:-curses.h}>
14771 int
14772 main ()
14773 {
14774
14775 wchar_t foo
14776
14777   ;
14778   return 0;
14779 }
14780 _ACEOF
14781 rm -f conftest.$ac_objext
14782 if { (eval echo "$as_me:14782: \"$ac_compile\"") >&5
14783   (eval $ac_compile) 2>&5
14784   ac_status=$?
14785   echo "$as_me:14785: \$? = $ac_status" >&5
14786   (exit $ac_status); } &&
14787          { ac_try='test -s conftest.$ac_objext'
14788   { (eval echo "$as_me:14788: \"$ac_try\"") >&5
14789   (eval $ac_try) 2>&5
14790   ac_status=$?
14791   echo "$as_me:14791: \$? = $ac_status" >&5
14792   (exit $ac_status); }; }; then
14793   cf_result=yes
14794 else
14795   echo "$as_me: failed program was:" >&5
14796 cat conftest.$ac_ext >&5
14797 cf_result=no
14798 fi
14799 rm -f conftest.$ac_objext conftest.$ac_ext
14800 echo "$as_me:14800: result: $cf_result" >&5
14801 echo "${ECHO_T}$cf_result" >&6
14802 if test $cf_result = yes ; then
14803
14804 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14805
14806         cat >>confdefs.h <<EOF
14807 #define $cf_result 1
14808 EOF
14809
14810 else
14811         cat >>confdefs.h <<EOF
14812 #define wchar_t long
14813 EOF
14814
14815 fi
14816
14817         fi
14818
14819         if test "$NCURSES_OK_WINT_T" = 0 ; then
14820
14821 echo "$as_me:14821: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14822 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14823 cat >conftest.$ac_ext <<_ACEOF
14824 #line 14824 "configure"
14825 #include "confdefs.h"
14826
14827 #ifndef _XOPEN_SOURCE_EXTENDED
14828 #define _XOPEN_SOURCE_EXTENDED
14829 #endif
14830 #include <${cf_cv_ncurses_header:-curses.h}>
14831 int
14832 main ()
14833 {
14834
14835 wint_t foo
14836
14837   ;
14838   return 0;
14839 }
14840 _ACEOF
14841 rm -f conftest.$ac_objext
14842 if { (eval echo "$as_me:14842: \"$ac_compile\"") >&5
14843   (eval $ac_compile) 2>&5
14844   ac_status=$?
14845   echo "$as_me:14845: \$? = $ac_status" >&5
14846   (exit $ac_status); } &&
14847          { ac_try='test -s conftest.$ac_objext'
14848   { (eval echo "$as_me:14848: \"$ac_try\"") >&5
14849   (eval $ac_try) 2>&5
14850   ac_status=$?
14851   echo "$as_me:14851: \$? = $ac_status" >&5
14852   (exit $ac_status); }; }; then
14853   cf_result=yes
14854 else
14855   echo "$as_me: failed program was:" >&5
14856 cat conftest.$ac_ext >&5
14857 cf_result=no
14858 fi
14859 rm -f conftest.$ac_objext conftest.$ac_ext
14860 echo "$as_me:14860: result: $cf_result" >&5
14861 echo "${ECHO_T}$cf_result" >&6
14862 if test $cf_result = yes ; then
14863
14864 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14865
14866         cat >>confdefs.h <<EOF
14867 #define $cf_result 1
14868 EOF
14869
14870 else
14871         cat >>confdefs.h <<EOF
14872 #define wint_t long
14873 EOF
14874
14875 fi
14876
14877         fi
14878 fi
14879
14880 echo "$as_me:14880: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
14881 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14882
14883 cat >conftest.$ac_ext <<_ACEOF
14884 #line 14884 "configure"
14885 #include "confdefs.h"
14886
14887 #ifdef HAVE_XCURSES
14888 #include <xcurses.h>
14889 char * XCursesProgramName = "test";
14890 #else
14891 #include <${cf_cv_ncurses_header:-curses.h}>
14892 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14893 #include <ncursesw/term.h>
14894 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14895 #include <ncurses/term.h>
14896 #elif defined(HAVE_TERM_H)
14897 #include <term.h>
14898 #endif
14899 #endif
14900
14901 int
14902 main ()
14903 {
14904
14905 void *foo = &(boolnames)
14906
14907   ;
14908   return 0;
14909 }
14910 _ACEOF
14911 rm -f conftest.$ac_objext
14912 if { (eval echo "$as_me:14912: \"$ac_compile\"") >&5
14913   (eval $ac_compile) 2>&5
14914   ac_status=$?
14915   echo "$as_me:14915: \$? = $ac_status" >&5
14916   (exit $ac_status); } &&
14917          { ac_try='test -s conftest.$ac_objext'
14918   { (eval echo "$as_me:14918: \"$ac_try\"") >&5
14919   (eval $ac_try) 2>&5
14920   ac_status=$?
14921   echo "$as_me:14921: \$? = $ac_status" >&5
14922   (exit $ac_status); }; }; then
14923   cf_result=yes
14924 else
14925   echo "$as_me: failed program was:" >&5
14926 cat conftest.$ac_ext >&5
14927 cf_result=no
14928 fi
14929 rm -f conftest.$ac_objext conftest.$ac_ext
14930 echo "$as_me:14930: result: $cf_result" >&5
14931 echo "${ECHO_T}$cf_result" >&6
14932
14933 if test $cf_result = yes ; then
14934
14935 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14936
14937         cat >>confdefs.h <<EOF
14938 #define $cf_result 1
14939 EOF
14940
14941 else
14942         echo "$as_me:14942: checking for data boolnames in library" >&5
14943 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
14944         # BSD linkers insist on making weak linkage, but resolve at runtime.
14945         if test "$cross_compiling" = yes; then
14946
14947         # cross-compiling
14948         cat >conftest.$ac_ext <<_ACEOF
14949 #line 14949 "configure"
14950 #include "confdefs.h"
14951
14952 #ifdef HAVE_XCURSES
14953 #include <xcurses.h>
14954 char * XCursesProgramName = "test";
14955 #else
14956 #include <${cf_cv_ncurses_header:-curses.h}>
14957 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14958 #include <ncursesw/term.h>
14959 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14960 #include <ncurses/term.h>
14961 #elif defined(HAVE_TERM_H)
14962 #include <term.h>
14963 #endif
14964 #endif
14965
14966 extern char boolnames;
14967 int
14968 main ()
14969 {
14970
14971         do {
14972                 void *foo = &(boolnames);
14973                 ${cf_cv_main_return:-return}(foo == 0);
14974         } while (0)
14975
14976   ;
14977   return 0;
14978 }
14979 _ACEOF
14980 rm -f conftest.$ac_objext conftest$ac_exeext
14981 if { (eval echo "$as_me:14981: \"$ac_link\"") >&5
14982   (eval $ac_link) 2>&5
14983   ac_status=$?
14984   echo "$as_me:14984: \$? = $ac_status" >&5
14985   (exit $ac_status); } &&
14986          { ac_try='test -s conftest$ac_exeext'
14987   { (eval echo "$as_me:14987: \"$ac_try\"") >&5
14988   (eval $ac_try) 2>&5
14989   ac_status=$?
14990   echo "$as_me:14990: \$? = $ac_status" >&5
14991   (exit $ac_status); }; }; then
14992   cf_result=yes
14993 else
14994   echo "$as_me: failed program was:" >&5
14995 cat conftest.$ac_ext >&5
14996 cf_result=no
14997 fi
14998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14999
15000 else
15001   cat >conftest.$ac_ext <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004
15005 #ifdef HAVE_XCURSES
15006 #include <xcurses.h>
15007 char * XCursesProgramName = "test";
15008 #else
15009 #include <${cf_cv_ncurses_header:-curses.h}>
15010 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15011 #include <ncursesw/term.h>
15012 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15013 #include <ncurses/term.h>
15014 #elif defined(HAVE_TERM_H)
15015 #include <term.h>
15016 #endif
15017 #endif
15018
15019 extern char boolnames;
15020 int main(void)
15021 {
15022         void *foo = &(boolnames);
15023         ${cf_cv_main_return:-return}(foo == 0);
15024 }
15025 _ACEOF
15026 rm -f conftest$ac_exeext
15027 if { (eval echo "$as_me:15027: \"$ac_link\"") >&5
15028   (eval $ac_link) 2>&5
15029   ac_status=$?
15030   echo "$as_me:15030: \$? = $ac_status" >&5
15031   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15032   { (eval echo "$as_me:15032: \"$ac_try\"") >&5
15033   (eval $ac_try) 2>&5
15034   ac_status=$?
15035   echo "$as_me:15035: \$? = $ac_status" >&5
15036   (exit $ac_status); }; }; then
15037   cf_result=yes
15038 else
15039   echo "$as_me: program exited with status $ac_status" >&5
15040 echo "$as_me: failed program was:" >&5
15041 cat conftest.$ac_ext >&5
15042 cf_result=no
15043 fi
15044 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15045 fi
15046         echo "$as_me:15046: result: $cf_result" >&5
15047 echo "${ECHO_T}$cf_result" >&6
15048         if test $cf_result = yes ; then
15049
15050 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15051
15052                 cat >>confdefs.h <<EOF
15053 #define $cf_result 1
15054 EOF
15055
15056         fi
15057 fi
15058
15059 echo "$as_me:15059: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15060 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15061
15062 cat >conftest.$ac_ext <<_ACEOF
15063 #line 15063 "configure"
15064 #include "confdefs.h"
15065
15066 #ifdef HAVE_XCURSES
15067 #include <xcurses.h>
15068 char * XCursesProgramName = "test";
15069 #else
15070 #include <${cf_cv_ncurses_header:-curses.h}>
15071 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15072 #include <ncursesw/term.h>
15073 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15074 #include <ncurses/term.h>
15075 #elif defined(HAVE_TERM_H)
15076 #include <term.h>
15077 #endif
15078 #endif
15079
15080 int
15081 main ()
15082 {
15083
15084 void *foo = &(boolfnames)
15085
15086   ;
15087   return 0;
15088 }
15089 _ACEOF
15090 rm -f conftest.$ac_objext
15091 if { (eval echo "$as_me:15091: \"$ac_compile\"") >&5
15092   (eval $ac_compile) 2>&5
15093   ac_status=$?
15094   echo "$as_me:15094: \$? = $ac_status" >&5
15095   (exit $ac_status); } &&
15096          { ac_try='test -s conftest.$ac_objext'
15097   { (eval echo "$as_me:15097: \"$ac_try\"") >&5
15098   (eval $ac_try) 2>&5
15099   ac_status=$?
15100   echo "$as_me:15100: \$? = $ac_status" >&5
15101   (exit $ac_status); }; }; then
15102   cf_result=yes
15103 else
15104   echo "$as_me: failed program was:" >&5
15105 cat conftest.$ac_ext >&5
15106 cf_result=no
15107 fi
15108 rm -f conftest.$ac_objext conftest.$ac_ext
15109 echo "$as_me:15109: result: $cf_result" >&5
15110 echo "${ECHO_T}$cf_result" >&6
15111
15112 if test $cf_result = yes ; then
15113
15114 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15115
15116         cat >>confdefs.h <<EOF
15117 #define $cf_result 1
15118 EOF
15119
15120 else
15121         echo "$as_me:15121: checking for data boolfnames in library" >&5
15122 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15123         # BSD linkers insist on making weak linkage, but resolve at runtime.
15124         if test "$cross_compiling" = yes; then
15125
15126         # cross-compiling
15127         cat >conftest.$ac_ext <<_ACEOF
15128 #line 15128 "configure"
15129 #include "confdefs.h"
15130
15131 #ifdef HAVE_XCURSES
15132 #include <xcurses.h>
15133 char * XCursesProgramName = "test";
15134 #else
15135 #include <${cf_cv_ncurses_header:-curses.h}>
15136 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15137 #include <ncursesw/term.h>
15138 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15139 #include <ncurses/term.h>
15140 #elif defined(HAVE_TERM_H)
15141 #include <term.h>
15142 #endif
15143 #endif
15144
15145 extern char boolfnames;
15146 int
15147 main ()
15148 {
15149
15150         do {
15151                 void *foo = &(boolfnames);
15152                 ${cf_cv_main_return:-return}(foo == 0);
15153         } while (0)
15154
15155   ;
15156   return 0;
15157 }
15158 _ACEOF
15159 rm -f conftest.$ac_objext conftest$ac_exeext
15160 if { (eval echo "$as_me:15160: \"$ac_link\"") >&5
15161   (eval $ac_link) 2>&5
15162   ac_status=$?
15163   echo "$as_me:15163: \$? = $ac_status" >&5
15164   (exit $ac_status); } &&
15165          { ac_try='test -s conftest$ac_exeext'
15166   { (eval echo "$as_me:15166: \"$ac_try\"") >&5
15167   (eval $ac_try) 2>&5
15168   ac_status=$?
15169   echo "$as_me:15169: \$? = $ac_status" >&5
15170   (exit $ac_status); }; }; then
15171   cf_result=yes
15172 else
15173   echo "$as_me: failed program was:" >&5
15174 cat conftest.$ac_ext >&5
15175 cf_result=no
15176 fi
15177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15178
15179 else
15180   cat >conftest.$ac_ext <<_ACEOF
15181 #line 15181 "configure"
15182 #include "confdefs.h"
15183
15184 #ifdef HAVE_XCURSES
15185 #include <xcurses.h>
15186 char * XCursesProgramName = "test";
15187 #else
15188 #include <${cf_cv_ncurses_header:-curses.h}>
15189 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15190 #include <ncursesw/term.h>
15191 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15192 #include <ncurses/term.h>
15193 #elif defined(HAVE_TERM_H)
15194 #include <term.h>
15195 #endif
15196 #endif
15197
15198 extern char boolfnames;
15199 int main(void)
15200 {
15201         void *foo = &(boolfnames);
15202         ${cf_cv_main_return:-return}(foo == 0);
15203 }
15204 _ACEOF
15205 rm -f conftest$ac_exeext
15206 if { (eval echo "$as_me:15206: \"$ac_link\"") >&5
15207   (eval $ac_link) 2>&5
15208   ac_status=$?
15209   echo "$as_me:15209: \$? = $ac_status" >&5
15210   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15211   { (eval echo "$as_me:15211: \"$ac_try\"") >&5
15212   (eval $ac_try) 2>&5
15213   ac_status=$?
15214   echo "$as_me:15214: \$? = $ac_status" >&5
15215   (exit $ac_status); }; }; then
15216   cf_result=yes
15217 else
15218   echo "$as_me: program exited with status $ac_status" >&5
15219 echo "$as_me: failed program was:" >&5
15220 cat conftest.$ac_ext >&5
15221 cf_result=no
15222 fi
15223 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15224 fi
15225         echo "$as_me:15225: result: $cf_result" >&5
15226 echo "${ECHO_T}$cf_result" >&6
15227         if test $cf_result = yes ; then
15228
15229 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15230
15231                 cat >>confdefs.h <<EOF
15232 #define $cf_result 1
15233 EOF
15234
15235         fi
15236 fi
15237
15238 TEST_ARGS="$LIBS"
15239 LIBS=
15240
15241 ac_config_files="$ac_config_files Makefile"
15242 ac_config_commands="$ac_config_commands default"
15243 cat >confcache <<\_ACEOF
15244 # This file is a shell script that caches the results of configure
15245 # tests run on this system so they can be shared between configure
15246 # scripts and configure runs, see configure's option --config-cache.
15247 # It is not useful on other systems.  If it contains results you don't
15248 # want to keep, you may remove or edit it.
15249 #
15250 # config.status only pays attention to the cache file if you give it
15251 # the --recheck option to rerun configure.
15252 #
15253 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15254 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15255 # following values.
15256
15257 _ACEOF
15258
15259 # The following way of writing the cache mishandles newlines in values,
15260 # but we know of no workaround that is simple, portable, and efficient.
15261 # So, don't put newlines in cache variables' values.
15262 # Ultrix sh set writes to stderr and can't be redirected directly,
15263 # and sets the high bit in the cache file unless we assign to the vars.
15264 {
15265   (set) 2>&1 |
15266     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15267     *ac_space=\ *)
15268       # `set' does not quote correctly, so add quotes (double-quote
15269       # substitution turns \\\\ into \\, and sed turns \\ into \).
15270       sed -n \
15271         "s/'/'\\\\''/g;
15272           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15273       ;;
15274     *)
15275       # `set' quotes correctly as required by POSIX, so do not add quotes.
15276       sed -n \
15277         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15278       ;;
15279     esac;
15280 } |
15281   sed '
15282      t clear
15283      : clear
15284      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15285      t end
15286      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15287      : end' >>confcache
15288 if cmp -s $cache_file confcache; then :; else
15289   if test -w $cache_file; then
15290     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15291     cat confcache >$cache_file
15292   else
15293     echo "not updating unwritable cache $cache_file"
15294   fi
15295 fi
15296 rm -f confcache
15297
15298 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15299 # Let make expand exec_prefix.
15300 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15301
15302 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15303 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15304 # trailing colons and then remove the whole line if VPATH becomes empty
15305 # (actually we leave an empty line to preserve line numbers).
15306 if test "x$srcdir" = x.; then
15307   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15308 s/:*\$(srcdir):*/:/;
15309 s/:*\${srcdir}:*/:/;
15310 s/:*@srcdir@:*/:/;
15311 s/^\([^=]*=[    ]*\):*/\1/;
15312 s/:*$//;
15313 s/^[^=]*=[      ]*$//;
15314 }'
15315 fi
15316
15317 DEFS=-DHAVE_CONFIG_H
15318
15319 : ${CONFIG_STATUS=./config.status}
15320 ac_clean_files_save=$ac_clean_files
15321 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15322 { echo "$as_me:15322: creating $CONFIG_STATUS" >&5
15323 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15324 cat >$CONFIG_STATUS <<_ACEOF
15325 #! $SHELL
15326 # Generated automatically by configure.
15327 # Run this file to recreate the current configuration.
15328 # Compiler output produced by configure, useful for debugging
15329 # configure, is in config.log if it exists.
15330
15331 debug=false
15332 SHELL=\${CONFIG_SHELL-$SHELL}
15333 ac_cs_invocation="\$0 \$@"
15334
15335 _ACEOF
15336
15337 cat >>$CONFIG_STATUS <<\_ACEOF
15338 # Be Bourne compatible
15339 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15340   emulate sh
15341   NULLCMD=:
15342 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15343   set -o posix
15344 fi
15345
15346 # Name of the executable.
15347 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15348
15349 if expr a : '\(a\)' >/dev/null 2>&1; then
15350   as_expr=expr
15351 else
15352   as_expr=false
15353 fi
15354
15355 rm -f conf$$ conf$$.exe conf$$.file
15356 echo >conf$$.file
15357 if ln -s conf$$.file conf$$ 2>/dev/null; then
15358   # We could just check for DJGPP; but this test a) works b) is more generic
15359   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15360   if test -f conf$$.exe; then
15361     # Don't use ln at all; we don't have any links
15362     as_ln_s='cp -p'
15363   else
15364     as_ln_s='ln -s'
15365   fi
15366 elif ln conf$$.file conf$$ 2>/dev/null; then
15367   as_ln_s=ln
15368 else
15369   as_ln_s='cp -p'
15370 fi
15371 rm -f conf$$ conf$$.exe conf$$.file
15372
15373 as_executable_p="test -f"
15374
15375 # Support unset when possible.
15376 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15377   as_unset=unset
15378 else
15379   as_unset=false
15380 fi
15381
15382 # NLS nuisances.
15383 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15384 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15385 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15386 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15387 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15388 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15389 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15390 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15391
15392 # IFS
15393 # We need space, tab and new line, in precisely that order.
15394 as_nl='
15395 '
15396 IFS="   $as_nl"
15397
15398 # CDPATH.
15399 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15400
15401 exec 6>&1
15402
15403 _ACEOF
15404
15405 # Files that config.status was made for.
15406 if test -n "$ac_config_files"; then
15407   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15408 fi
15409
15410 if test -n "$ac_config_headers"; then
15411   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15412 fi
15413
15414 if test -n "$ac_config_links"; then
15415   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15416 fi
15417
15418 if test -n "$ac_config_commands"; then
15419   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15420 fi
15421
15422 cat >>$CONFIG_STATUS <<\EOF
15423
15424 ac_cs_usage="\
15425 \`$as_me' instantiates files from templates according to the
15426 current configuration.
15427
15428 Usage: $0 [OPTIONS] [FILE]...
15429
15430   -h, --help       print this help, then exit
15431   -V, --version    print version number, then exit
15432   -d, --debug      don't remove temporary files
15433       --recheck    update $as_me by reconfiguring in the same conditions
15434   --file=FILE[:TEMPLATE]
15435                    instantiate the configuration file FILE
15436   --header=FILE[:TEMPLATE]
15437                    instantiate the configuration header FILE
15438
15439 Configuration files:
15440 $config_files
15441
15442 Configuration headers:
15443 $config_headers
15444
15445 Configuration commands:
15446 $config_commands
15447
15448 Report bugs to <dickey@invisible-island.net>."
15449 EOF
15450
15451 cat >>$CONFIG_STATUS <<EOF
15452 ac_cs_version="\\
15453 config.status
15454 configured by $0, generated by GNU Autoconf 2.52.20101002,
15455   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15456
15457 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15458 Free Software Foundation, Inc.
15459 This config.status script is free software; the Free Software Foundation
15460 gives unlimited permission to copy, distribute and modify it."
15461 srcdir=$srcdir
15462 INSTALL="$INSTALL"
15463 EOF
15464
15465 cat >>$CONFIG_STATUS <<\EOF
15466 # If no file are specified by the user, then we need to provide default
15467 # value.  By we need to know if files were specified by the user.
15468 ac_need_defaults=:
15469 while test $# != 0
15470 do
15471   case $1 in
15472   --*=*)
15473     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15474     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15475     shift
15476     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15477     shift
15478     ;;
15479   -*);;
15480   *) # This is not an option, so the user has probably given explicit
15481      # arguments.
15482      ac_need_defaults=false;;
15483   esac
15484
15485   case $1 in
15486   # Handling of the options.
15487 EOF
15488 cat >>$CONFIG_STATUS <<EOF
15489   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15490     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15491     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15492 EOF
15493 cat >>$CONFIG_STATUS <<\EOF
15494   --version | --vers* | -V )
15495     echo "$ac_cs_version"; exit 0 ;;
15496   --he | --h)
15497     # Conflict between --help and --header
15498     { { echo "$as_me:15498: error: ambiguous option: $1
15499 Try \`$0 --help' for more information." >&5
15500 echo "$as_me: error: ambiguous option: $1
15501 Try \`$0 --help' for more information." >&2;}
15502    { (exit 1); exit 1; }; };;
15503   --help | --hel | -h )
15504     echo "$ac_cs_usage"; exit 0 ;;
15505   --debug | --d* | -d )
15506     debug=: ;;
15507   --file | --fil | --fi | --f )
15508     shift
15509     CONFIG_FILES="$CONFIG_FILES $1"
15510     ac_need_defaults=false;;
15511   --header | --heade | --head | --hea )
15512     shift
15513     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15514     ac_need_defaults=false;;
15515
15516   # This is an error.
15517   -*) { { echo "$as_me:15517: error: unrecognized option: $1
15518 Try \`$0 --help' for more information." >&5
15519 echo "$as_me: error: unrecognized option: $1
15520 Try \`$0 --help' for more information." >&2;}
15521    { (exit 1); exit 1; }; } ;;
15522
15523   *) ac_config_targets="$ac_config_targets $1" ;;
15524
15525   esac
15526   shift
15527 done
15528
15529 exec 5>>config.log
15530 cat >&5 << _ACEOF
15531
15532 ## ----------------------- ##
15533 ## Running config.status.  ##
15534 ## ----------------------- ##
15535
15536 This file was extended by $as_me 2.52.20101002, executed with
15537   CONFIG_FILES    = $CONFIG_FILES
15538   CONFIG_HEADERS  = $CONFIG_HEADERS
15539   CONFIG_LINKS    = $CONFIG_LINKS
15540   CONFIG_COMMANDS = $CONFIG_COMMANDS
15541   > $ac_cs_invocation
15542 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15543
15544 _ACEOF
15545 EOF
15546
15547 cat >>$CONFIG_STATUS <<EOF
15548 #
15549 # INIT-COMMANDS section.
15550 #
15551
15552 AWK="$AWK"
15553 ECHO_LD="$ECHO_LD"
15554
15555 EOF
15556
15557 cat >>$CONFIG_STATUS <<\EOF
15558 for ac_config_target in $ac_config_targets
15559 do
15560   case "$ac_config_target" in
15561   # Handling of arguments.
15562   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15563   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15564   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
15565   *) { { echo "$as_me:15565: error: invalid argument: $ac_config_target" >&5
15566 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15567    { (exit 1); exit 1; }; };;
15568   esac
15569 done
15570
15571 # If the user did not use the arguments to specify the items to instantiate,
15572 # then the envvar interface is used.  Set only those that are not.
15573 # We use the long form for the default assignment because of an extremely
15574 # bizarre bug on SunOS 4.1.3.
15575 if $ac_need_defaults; then
15576   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15577   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15578   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15579 fi
15580
15581 # Create a temporary directory, and hook for its removal unless debugging.
15582 $debug ||
15583 {
15584   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15585   trap '{ (exit 1); exit 1; }' 1 2 13 15
15586 }
15587
15588 # Create a (secure) tmp directory for tmp files.
15589 : ${TMPDIR=/tmp}
15590 {
15591   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15592   test -n "$tmp" && test -d "$tmp"
15593 }  ||
15594 {
15595   tmp=$TMPDIR/cs$$-$RANDOM
15596   (umask 077 && mkdir $tmp)
15597 } ||
15598 {
15599    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15600    { (exit 1); exit 1; }
15601 }
15602
15603 EOF
15604
15605 cat >>$CONFIG_STATUS <<EOF
15606
15607 #
15608 # CONFIG_FILES section.
15609 #
15610
15611 # No need to generate the scripts if there are no CONFIG_FILES.
15612 # This happens for instance when ./config.status config.h
15613 if test -n "\$CONFIG_FILES"; then
15614   # Protect against being on the right side of a sed subst in config.status.
15615   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15616    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15617 s,@SHELL@,$SHELL,;t t
15618 s,@exec_prefix@,$exec_prefix,;t t
15619 s,@prefix@,$prefix,;t t
15620 s,@program_transform_name@,$program_transform_name,;t t
15621 s,@bindir@,$bindir,;t t
15622 s,@sbindir@,$sbindir,;t t
15623 s,@libexecdir@,$libexecdir,;t t
15624 s,@datadir@,$datadir,;t t
15625 s,@sysconfdir@,$sysconfdir,;t t
15626 s,@sharedstatedir@,$sharedstatedir,;t t
15627 s,@localstatedir@,$localstatedir,;t t
15628 s,@libdir@,$libdir,;t t
15629 s,@includedir@,$includedir,;t t
15630 s,@oldincludedir@,$oldincludedir,;t t
15631 s,@infodir@,$infodir,;t t
15632 s,@mandir@,$mandir,;t t
15633 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15634 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15635 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15636 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15637 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15638 s,@build_alias@,$build_alias,;t t
15639 s,@host_alias@,$host_alias,;t t
15640 s,@target_alias@,$target_alias,;t t
15641 s,@ECHO_C@,$ECHO_C,;t t
15642 s,@ECHO_N@,$ECHO_N,;t t
15643 s,@ECHO_T@,$ECHO_T,;t t
15644 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15645 s,@DEFS@,$DEFS,;t t
15646 s,@LIBS@,$LIBS,;t t
15647 s,@build@,$build,;t t
15648 s,@build_cpu@,$build_cpu,;t t
15649 s,@build_vendor@,$build_vendor,;t t
15650 s,@build_os@,$build_os,;t t
15651 s,@host@,$host,;t t
15652 s,@host_cpu@,$host_cpu,;t t
15653 s,@host_vendor@,$host_vendor,;t t
15654 s,@host_os@,$host_os,;t t
15655 s,@SET_MAKE@,$SET_MAKE,;t t
15656 s,@CC@,$CC,;t t
15657 s,@CFLAGS@,$CFLAGS,;t t
15658 s,@LDFLAGS@,$LDFLAGS,;t t
15659 s,@CPPFLAGS@,$CPPFLAGS,;t t
15660 s,@ac_ct_CC@,$ac_ct_CC,;t t
15661 s,@EXEEXT@,$EXEEXT,;t t
15662 s,@OBJEXT@,$OBJEXT,;t t
15663 s,@CPP@,$CPP,;t t
15664 s,@AWK@,$AWK,;t t
15665 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15666 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15667 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15668 s,@LINT@,$LINT,;t t
15669 s,@LINT_OPTS@,$LINT_OPTS,;t t
15670 s,@CTAGS@,$CTAGS,;t t
15671 s,@ETAGS@,$ETAGS,;t t
15672 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15673 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15674 s,@MATH_LIB@,$MATH_LIB,;t t
15675 s,@CC_G_OPT@,$CC_G_OPT,;t t
15676 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15677 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15678 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15679 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15680 s,@LD@,$LD,;t t
15681 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
15682 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
15683 s,@LD_MODEL@,$LD_MODEL,;t t
15684 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15685 s,@LIBTOOL@,$LIBTOOL,;t t
15686 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15687 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15688 s,@LIB_LINK@,$LIB_LINK,;t t
15689 s,@LINK_TESTS@,$LINK_TESTS,;t t
15690 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15691 s,@PTHREAD@,$PTHREAD,;t t
15692 s,@TEST_ARGS@,$TEST_ARGS,;t t
15693 s,@TEST_DEPS@,$TEST_DEPS,;t t
15694 s,@TEST_LIBS@,$TEST_LIBS,;t t
15695 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
15696 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15697 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15698 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15699 s,@ECHO_LT@,$ECHO_LT,;t t
15700 s,@ECHO_LD@,$ECHO_LD,;t t
15701 s,@RULE_CC@,$RULE_CC,;t t
15702 s,@SHOW_CC@,$SHOW_CC,;t t
15703 s,@ECHO_CC@,$ECHO_CC,;t t
15704 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15705 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15706 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15707 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15708 s,@X_CFLAGS@,$X_CFLAGS,;t t
15709 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
15710 s,@X_LIBS@,$X_LIBS,;t t
15711 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
15712 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
15713 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15714 CEOF
15715
15716 EOF
15717
15718   cat >>$CONFIG_STATUS <<\EOF
15719   # Split the substitutions into bite-sized pieces for seds with
15720   # small command number limits, like on Digital OSF/1 and HP-UX.
15721   ac_max_sed_lines=48
15722   ac_sed_frag=1 # Number of current file.
15723   ac_beg=1 # First line for current file.
15724   ac_end=$ac_max_sed_lines # Line after last line for current file.
15725   ac_more_lines=:
15726   ac_sed_cmds=
15727   while $ac_more_lines; do
15728     if test $ac_beg -gt 1; then
15729       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15730     else
15731       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15732     fi
15733     if test ! -s $tmp/subs.frag; then
15734       ac_more_lines=false
15735     else
15736       # The purpose of the label and of the branching condition is to
15737       # speed up the sed processing (if there are no `@' at all, there
15738       # is no need to browse any of the substitutions).
15739       # These are the two extra sed commands mentioned above.
15740       (echo ':t
15741   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15742       if test -z "$ac_sed_cmds"; then
15743         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15744       else
15745         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15746       fi
15747       ac_sed_frag=`expr $ac_sed_frag + 1`
15748       ac_beg=$ac_end
15749       ac_end=`expr $ac_end + $ac_max_sed_lines`
15750     fi
15751   done
15752   if test -z "$ac_sed_cmds"; then
15753     ac_sed_cmds=cat
15754   fi
15755 fi # test -n "$CONFIG_FILES"
15756
15757 EOF
15758 cat >>$CONFIG_STATUS <<\EOF
15759 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15760   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15761   case $ac_file in
15762   - | *:- | *:-:* ) # input from stdin
15763         cat >$tmp/stdin
15764         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15765         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15766   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15767         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15768   * )   ac_file_in=$ac_file.in ;;
15769   esac
15770
15771   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15772   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15773          X"$ac_file" : 'X\(//\)[^/]' \| \
15774          X"$ac_file" : 'X\(//\)$' \| \
15775          X"$ac_file" : 'X\(/\)' \| \
15776          .     : '\(.\)' 2>/dev/null ||
15777 echo X"$ac_file" |
15778     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15779           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15780           /^X\(\/\/\)$/{ s//\1/; q; }
15781           /^X\(\/\).*/{ s//\1/; q; }
15782           s/.*/./; q'`
15783   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15784     { case "$ac_dir" in
15785   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15786   *)                      as_incr_dir=.;;
15787 esac
15788 as_dummy="$ac_dir"
15789 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15790   case $as_mkdir_dir in
15791     # Skip DOS drivespec
15792     ?:) as_incr_dir=$as_mkdir_dir ;;
15793     *)
15794       as_incr_dir=$as_incr_dir/$as_mkdir_dir
15795       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15796     ;;
15797   esac
15798 done; }
15799
15800     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15801     # A "../" for each directory in $ac_dir_suffix.
15802     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15803   else
15804     ac_dir_suffix= ac_dots=
15805   fi
15806
15807   case $srcdir in
15808   .)  ac_srcdir=.
15809       if test -z "$ac_dots"; then
15810          ac_top_srcdir=.
15811       else
15812          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15813       fi ;;
15814   [\\/]* | ?:[\\/]* )
15815       ac_srcdir=$srcdir$ac_dir_suffix;
15816       ac_top_srcdir=$srcdir ;;
15817   *) # Relative path.
15818     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15819     ac_top_srcdir=$ac_dots$srcdir ;;
15820   esac
15821
15822   case $INSTALL in
15823   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15824   *) ac_INSTALL=$ac_dots$INSTALL ;;
15825   esac
15826
15827   if test x"$ac_file" != x-; then
15828     { echo "$as_me:15828: creating $ac_file" >&5
15829 echo "$as_me: creating $ac_file" >&6;}
15830     rm -f "$ac_file"
15831   fi
15832   # Let's still pretend it is `configure' which instantiates (i.e., don't
15833   # use $as_me), people would be surprised to read:
15834   #    /* config.h.  Generated automatically by config.status.  */
15835   configure_input="Generated automatically from `echo $ac_file_in |
15836                                                  sed 's,.*/,,'` by configure."
15837
15838   # First look for the input files in the build tree, otherwise in the
15839   # src tree.
15840   ac_file_inputs=`IFS=:
15841     for f in $ac_file_in; do
15842       case $f in
15843       -) echo $tmp/stdin ;;
15844       [\\/$]*)
15845          # Absolute (can't be DOS-style, as IFS=:)
15846          test -f "$f" || { { echo "$as_me:15846: error: cannot find input file: $f" >&5
15847 echo "$as_me: error: cannot find input file: $f" >&2;}
15848    { (exit 1); exit 1; }; }
15849          echo $f;;
15850       *) # Relative
15851          if test -f "$f"; then
15852            # Build tree
15853            echo $f
15854          elif test -f "$srcdir/$f"; then
15855            # Source tree
15856            echo $srcdir/$f
15857          else
15858            # /dev/null tree
15859            { { echo "$as_me:15859: error: cannot find input file: $f" >&5
15860 echo "$as_me: error: cannot find input file: $f" >&2;}
15861    { (exit 1); exit 1; }; }
15862          fi;;
15863       esac
15864     done` || { (exit 1); exit 1; }
15865 EOF
15866 cat >>$CONFIG_STATUS <<EOF
15867   sed "$ac_vpsub
15868 $extrasub
15869 EOF
15870 cat >>$CONFIG_STATUS <<\EOF
15871 :t
15872 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15873 s,@configure_input@,$configure_input,;t t
15874 s,@srcdir@,$ac_srcdir,;t t
15875 s,@top_srcdir@,$ac_top_srcdir,;t t
15876 s,@INSTALL@,$ac_INSTALL,;t t
15877 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15878   rm -f $tmp/stdin
15879   if test x"$ac_file" != x-; then
15880     mv $tmp/out $ac_file
15881   else
15882     cat $tmp/out
15883     rm -f $tmp/out
15884   fi
15885
15886 done
15887 EOF
15888 cat >>$CONFIG_STATUS <<\EOF
15889
15890 #
15891 # CONFIG_HEADER section.
15892 #
15893
15894 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15895 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15896 #
15897 # ac_d sets the value in "#define NAME VALUE" lines.
15898 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15899 ac_dB='[        ].*$,\1#\2'
15900 ac_dC=' '
15901 ac_dD=',;t'
15902 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15903 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15904 ac_iB='\([      ]\),\1#\2define\3'
15905 ac_iC=' '
15906 ac_iD='\4,;t'
15907 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15908 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15909 ac_uB='$,\1#\2define\3'
15910 ac_uC=' '
15911 ac_uD=',;t'
15912
15913 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15914   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15915   case $ac_file in
15916   - | *:- | *:-:* ) # input from stdin
15917         cat >$tmp/stdin
15918         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15919         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15920   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15921         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15922   * )   ac_file_in=$ac_file.in ;;
15923   esac
15924
15925   test x"$ac_file" != x- && { echo "$as_me:15925: creating $ac_file" >&5
15926 echo "$as_me: creating $ac_file" >&6;}
15927
15928   # First look for the input files in the build tree, otherwise in the
15929   # src tree.
15930   ac_file_inputs=`IFS=:
15931     for f in $ac_file_in; do
15932       case $f in
15933       -) echo $tmp/stdin ;;
15934       [\\/$]*)
15935          # Absolute (can't be DOS-style, as IFS=:)
15936          test -f "$f" || { { echo "$as_me:15936: error: cannot find input file: $f" >&5
15937 echo "$as_me: error: cannot find input file: $f" >&2;}
15938    { (exit 1); exit 1; }; }
15939          echo $f;;
15940       *) # Relative
15941          if test -f "$f"; then
15942            # Build tree
15943            echo $f
15944          elif test -f "$srcdir/$f"; then
15945            # Source tree
15946            echo $srcdir/$f
15947          else
15948            # /dev/null tree
15949            { { echo "$as_me:15949: error: cannot find input file: $f" >&5
15950 echo "$as_me: error: cannot find input file: $f" >&2;}
15951    { (exit 1); exit 1; }; }
15952          fi;;
15953       esac
15954     done` || { (exit 1); exit 1; }
15955   # Remove the trailing spaces.
15956   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
15957
15958 EOF
15959
15960 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
15961 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
15962 # be either 'cat' or 'sort'.
15963 cat confdefs.h | uniq >conftest.vals
15964
15965 # Break up conftest.vals because some shells have a limit on
15966 # the size of here documents, and old seds have small limits too.
15967
15968 rm -f conftest.tail
15969 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
15970 while grep . conftest.vals >/dev/null
15971 do
15972   # Write chunks of a limited-size here document to conftest.frag.
15973   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15974   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15975   echo 'CEOF' >> $CONFIG_STATUS
15976   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15977   rm -f conftest.vals
15978   mv conftest.tail conftest.vals
15979 done
15980 rm -f conftest.vals
15981
15982 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15983 # marker @DEFS@.
15984 echo '  cat >> conftest.edit <<CEOF
15985 /@DEFS@/r conftest.frag
15986 /@DEFS@/d
15987 CEOF
15988 sed -f conftest.edit $tmp/in > $tmp/out
15989 rm -f $tmp/in
15990 mv $tmp/out $tmp/in
15991 rm -f conftest.edit conftest.frag
15992 ' >> $CONFIG_STATUS
15993
15994 cat >>$CONFIG_STATUS <<\EOF
15995   # Let's still pretend it is `configure' which instantiates (i.e., don't
15996   # use $as_me), people would be surprised to read:
15997   #    /* config.h.  Generated automatically by config.status.  */
15998   if test x"$ac_file" = x-; then
15999     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16000   else
16001     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16002   fi
16003   cat $tmp/in >>$tmp/config.h
16004   rm -f $tmp/in
16005   if test x"$ac_file" != x-; then
16006     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16007       { echo "$as_me:16007: $ac_file is unchanged" >&5
16008 echo "$as_me: $ac_file is unchanged" >&6;}
16009     else
16010       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16011          X"$ac_file" : 'X\(//\)[^/]' \| \
16012          X"$ac_file" : 'X\(//\)$' \| \
16013          X"$ac_file" : 'X\(/\)' \| \
16014          .     : '\(.\)' 2>/dev/null ||
16015 echo X"$ac_file" |
16016     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16017           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16018           /^X\(\/\/\)$/{ s//\1/; q; }
16019           /^X\(\/\).*/{ s//\1/; q; }
16020           s/.*/./; q'`
16021       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16022         { case "$ac_dir" in
16023   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16024   *)                      as_incr_dir=.;;
16025 esac
16026 as_dummy="$ac_dir"
16027 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16028   case $as_mkdir_dir in
16029     # Skip DOS drivespec
16030     ?:) as_incr_dir=$as_mkdir_dir ;;
16031     *)
16032       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16033       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16034     ;;
16035   esac
16036 done; }
16037
16038       fi
16039       rm -f $ac_file
16040       mv $tmp/config.h $ac_file
16041     fi
16042   else
16043     cat $tmp/config.h
16044     rm -f $tmp/config.h
16045   fi
16046 done
16047 EOF
16048 cat >>$CONFIG_STATUS <<\EOF
16049 #
16050 # CONFIG_COMMANDS section.
16051 #
16052 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16053   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16054   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16055
16056   case $ac_dest in
16057     default )
16058
16059 for cf_dir in .
16060 do
16061         if test ! -d $srcdir/$cf_dir; then
16062                 continue
16063         elif test -f $srcdir/$cf_dir/programs; then
16064                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16065         fi
16066 done
16067
16068         cat >>Makefile <<TEST_EOF
16069
16070 # These rules are generated so we do not rely on suffix rules, which do not
16071 # work consistently for different make-programs (the '\$(MODEL)/' confuses
16072 # some, and the '\$x' confuses others).
16073 TEST_EOF
16074
16075 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
16076 for N in $LIST
16077 do
16078         cat >>Makefile <<TEST_EOF
16079
16080 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
16081         \$(srcdir)/test.priv.h \\
16082         ncurses_cfg.h
16083         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
16084 TEST_EOF
16085 done
16086
16087 if test -f ../config.guess && test -f ../config.sub
16088 then
16089         cat >>Makefile <<TEST_EOF
16090
16091 # if we used CF_INHERIT for getting these files, we can remove them
16092 distclean::
16093         rm -f config.guess config.sub
16094 TEST_EOF
16095 fi
16096  ;;
16097   esac
16098 done
16099 EOF
16100
16101 cat >>$CONFIG_STATUS <<\EOF
16102
16103 { (exit 0); exit 0; }
16104 EOF
16105 chmod +x $CONFIG_STATUS
16106 ac_clean_files=$ac_clean_files_save
16107
16108 # configure is writing to config.log, and then calls config.status.
16109 # config.status does its own redirection, appending to config.log.
16110 # Unfortunately, on DOS this fails, as config.log is still kept open
16111 # by configure, so config.status won't be able to write to it; its
16112 # output is simply discarded.  So we exec the FD to /dev/null,
16113 # effectively closing config.log, so it can be properly (re)opened and
16114 # appended to by config.status.  When coming back to configure, we
16115 # need to make the FD available again.
16116 if test "$no_create" != yes; then
16117   ac_cs_success=:
16118   exec 5>/dev/null
16119   $SHELL $CONFIG_STATUS || ac_cs_success=false
16120   exec 5>>config.log
16121   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16122   # would make configure fail if this is the last instruction.
16123   $ac_cs_success || { (exit 1); exit 1; }
16124 fi
16125