]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
446ae0f2c6e90046b34b7154f83307c981e02710
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101002.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="ncurses.c"
108
109 # Initialize some variables set by options.
110 ac_init_help=
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
114 cache_file=/dev/null
115 exec_prefix=NONE
116 no_create=
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 verbose=
126 x_includes=NONE
127 x_libraries=NONE
128
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datadir='${prefix}/share'
138 sysconfdir='${prefix}/etc'
139 sharedstatedir='${prefix}/com'
140 localstatedir='${prefix}/var'
141 libdir='${exec_prefix}/lib'
142 includedir='${prefix}/include'
143 oldincludedir='/usr/include'
144 infodir='${prefix}/info'
145 mandir='${prefix}/man'
146
147 # Identity of this package.
148 PACKAGE_NAME=
149 PACKAGE_TARNAME=
150 PACKAGE_VERSION=
151 PACKAGE_STRING=
152 PACKAGE_BUGREPORT=
153
154 ac_prev=
155 for ac_option
156 do
157   # If the previous option needs an argument, assign it.
158   if test -n "$ac_prev"; then
159     eval "$ac_prev=\$ac_option"
160     ac_prev=
161     continue
162   fi
163
164   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
165
166   # Accept the important Cygnus configure options, so we can diagnose typos.
167
168   case $ac_option in
169
170   -bindir | --bindir | --bindi | --bind | --bin | --bi)
171     ac_prev=bindir ;;
172   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173     bindir=$ac_optarg ;;
174
175   -build | --build | --buil | --bui | --bu)
176     ac_prev=build_alias ;;
177   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178     build_alias=$ac_optarg ;;
179
180   -cache-file | --cache-file | --cache-fil | --cache-fi \
181   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182     ac_prev=cache_file ;;
183   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185     cache_file=$ac_optarg ;;
186
187   --config-cache | -C)
188     cache_file=config.cache ;;
189
190   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
191     ac_prev=datadir ;;
192   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
193   | --da=*)
194     datadir=$ac_optarg ;;
195
196   -disable-* | --disable-*)
197     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
198     # Reject names that are not valid shell variable names.
199     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
200       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
201    { (exit 1); exit 1; }; }
202     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
203     eval "enable_$ac_feature=no" ;;
204
205   -enable-* | --enable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     case $ac_option in
213       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
214       *) ac_optarg=yes ;;
215     esac
216     eval "enable_$ac_feature='$ac_optarg'" ;;
217
218   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
219   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
220   | --exec | --exe | --ex)
221     ac_prev=exec_prefix ;;
222   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
223   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
224   | --exec=* | --exe=* | --ex=*)
225     exec_prefix=$ac_optarg ;;
226
227   -gas | --gas | --ga | --g)
228     # Obsolete; use --with-gas.
229     with_gas=yes ;;
230
231   -help | --help | --hel | --he | -h)
232     ac_init_help=long ;;
233   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
234     ac_init_help=recursive ;;
235   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
236     ac_init_help=short ;;
237
238   -host | --host | --hos | --ho)
239     ac_prev=host_alias ;;
240   -host=* | --host=* | --hos=* | --ho=*)
241     host_alias=$ac_optarg ;;
242
243   -includedir | --includedir | --includedi | --included | --include \
244   | --includ | --inclu | --incl | --inc)
245     ac_prev=includedir ;;
246   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247   | --includ=* | --inclu=* | --incl=* | --inc=*)
248     includedir=$ac_optarg ;;
249
250   -infodir | --infodir | --infodi | --infod | --info | --inf)
251     ac_prev=infodir ;;
252   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253     infodir=$ac_optarg ;;
254
255   -libdir | --libdir | --libdi | --libd)
256     ac_prev=libdir ;;
257   -libdir=* | --libdir=* | --libdi=* | --libd=*)
258     libdir=$ac_optarg ;;
259
260   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261   | --libexe | --libex | --libe)
262     ac_prev=libexecdir ;;
263   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264   | --libexe=* | --libex=* | --libe=*)
265     libexecdir=$ac_optarg ;;
266
267   -localstatedir | --localstatedir | --localstatedi | --localstated \
268   | --localstate | --localstat | --localsta | --localst \
269   | --locals | --local | --loca | --loc | --lo)
270     ac_prev=localstatedir ;;
271   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274     localstatedir=$ac_optarg ;;
275
276   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277     ac_prev=mandir ;;
278   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279     mandir=$ac_optarg ;;
280
281   -nfp | --nfp | --nf)
282     # Obsolete; use --without-fp.
283     with_fp=no ;;
284
285   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286   | --no-cr | --no-c)
287     no_create=yes ;;
288
289   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291     no_recursion=yes ;;
292
293   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295   | --oldin | --oldi | --old | --ol | --o)
296     ac_prev=oldincludedir ;;
297   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300     oldincludedir=$ac_optarg ;;
301
302   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303     ac_prev=prefix ;;
304   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305     prefix=$ac_optarg ;;
306
307   -program-prefix | --program-prefix | --program-prefi | --program-pref \
308   | --program-pre | --program-pr | --program-p)
309     ac_prev=program_prefix ;;
310   -program-prefix=* | --program-prefix=* | --program-prefi=* \
311   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312     program_prefix=$ac_optarg ;;
313
314   -program-suffix | --program-suffix | --program-suffi | --program-suff \
315   | --program-suf | --program-su | --program-s)
316     ac_prev=program_suffix ;;
317   -program-suffix=* | --program-suffix=* | --program-suffi=* \
318   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319     program_suffix=$ac_optarg ;;
320
321   -program-transform-name | --program-transform-name \
322   | --program-transform-nam | --program-transform-na \
323   | --program-transform-n | --program-transform- \
324   | --program-transform | --program-transfor \
325   | --program-transfo | --program-transf \
326   | --program-trans | --program-tran \
327   | --progr-tra | --program-tr | --program-t)
328     ac_prev=program_transform_name ;;
329   -program-transform-name=* | --program-transform-name=* \
330   | --program-transform-nam=* | --program-transform-na=* \
331   | --program-transform-n=* | --program-transform-=* \
332   | --program-transform=* | --program-transfor=* \
333   | --program-transfo=* | --program-transf=* \
334   | --program-trans=* | --program-tran=* \
335   | --progr-tra=* | --program-tr=* | --program-t=*)
336     program_transform_name=$ac_optarg ;;
337
338   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339   | -silent | --silent | --silen | --sile | --sil)
340     silent=yes ;;
341
342   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343     ac_prev=sbindir ;;
344   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345   | --sbi=* | --sb=*)
346     sbindir=$ac_optarg ;;
347
348   -sharedstatedir | --sharedstatedir | --sharedstatedi \
349   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350   | --sharedst | --shareds | --shared | --share | --shar \
351   | --sha | --sh)
352     ac_prev=sharedstatedir ;;
353   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356   | --sha=* | --sh=*)
357     sharedstatedir=$ac_optarg ;;
358
359   -site | --site | --sit)
360     ac_prev=site ;;
361   -site=* | --site=* | --sit=*)
362     site=$ac_optarg ;;
363
364   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365     ac_prev=srcdir ;;
366   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367     srcdir=$ac_optarg ;;
368
369   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370   | --syscon | --sysco | --sysc | --sys | --sy)
371     ac_prev=sysconfdir ;;
372   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374     sysconfdir=$ac_optarg ;;
375
376   -target | --target | --targe | --targ | --tar | --ta | --t)
377     ac_prev=target_alias ;;
378   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379     target_alias=$ac_optarg ;;
380
381   -v | -verbose | --verbose | --verbos | --verbo | --verb)
382     verbose=yes ;;
383
384   -version | --version | --versio | --versi | --vers | -V)
385     ac_init_version=: ;;
386
387   -with-* | --with-*)
388     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
389     # Reject names that are not valid shell variable names.
390     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
391       { echo "$as_me: error: invalid package name: $ac_package" >&2
392    { (exit 1); exit 1; }; }
393     ac_package=`echo $ac_package| sed 's/-/_/g'`
394     case $ac_option in
395       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
396       *) ac_optarg=yes ;;
397     esac
398     eval "with_$ac_package='$ac_optarg'" ;;
399
400   -without-* | --without-*)
401     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid package name: $ac_package" >&2
405    { (exit 1); exit 1; }; }
406     ac_package=`echo $ac_package | sed 's/-/_/g'`
407     eval "with_$ac_package=no" ;;
408
409   --x)
410     # Obsolete; use --with-x.
411     with_x=yes ;;
412
413   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414   | --x-incl | --x-inc | --x-in | --x-i)
415     ac_prev=x_includes ;;
416   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418     x_includes=$ac_optarg ;;
419
420   -x-libraries | --x-libraries | --x-librarie | --x-librari \
421   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422     ac_prev=x_libraries ;;
423   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425     x_libraries=$ac_optarg ;;
426
427   -*) { echo "$as_me: error: unrecognized option: $ac_option
428 Try \`$0 --help' for more information." >&2
429    { (exit 1); exit 1; }; }
430     ;;
431
432   *=*)
433     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
437    { (exit 1); exit 1; }; }
438     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
439     eval "$ac_envvar='$ac_optarg'"
440     export $ac_envvar ;;
441
442   *)
443     # FIXME: should be removed in autoconf 3.0.
444     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
445     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
446       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
447     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
448     ;;
449
450   esac
451 done
452
453 if test -n "$ac_prev"; then
454   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
455   { echo "$as_me: error: missing argument to $ac_option" >&2
456    { (exit 1); exit 1; }; }
457 fi
458
459 # Be sure to have absolute paths.
460 for ac_var in exec_prefix prefix
461 do
462   eval ac_val=$`echo $ac_var`
463   case $ac_val in
464     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
465     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
466    { (exit 1); exit 1; }; };;
467   esac
468 done
469
470 # Be sure to have absolute paths.
471 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
472               localstatedir libdir includedir oldincludedir infodir mandir
473 do
474   eval ac_val=$`echo $ac_var`
475   case $ac_val in
476     [\\/$]* | ?:[\\/]* ) ;;
477     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
478    { (exit 1); exit 1; }; };;
479   esac
480 done
481
482 # There might be people who depend on the old broken behavior: `$host'
483 # used to hold the argument of --host etc.
484 build=$build_alias
485 host=$host_alias
486 target=$target_alias
487
488 # FIXME: should be removed in autoconf 3.0.
489 if test "x$host_alias" != x; then
490   if test "x$build_alias" = x; then
491     cross_compiling=maybe
492     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
493     If a cross compiler is detected then cross compile mode will be used." >&2
494   elif test "x$build_alias" != "x$host_alias"; then
495     cross_compiling=yes
496   fi
497 fi
498
499 ac_tool_prefix=
500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
501
502 test "$silent" = yes && exec 6>/dev/null
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506   ac_srcdir_defaulted=yes
507   # Try the directory containing this script, then its parent.
508   ac_prog=$0
509   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
510   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511   srcdir=$ac_confdir
512   if test ! -r $srcdir/$ac_unique_file; then
513     srcdir=..
514   fi
515 else
516   ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519   if test "$ac_srcdir_defaulted" = yes; then
520     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
521    { (exit 1); exit 1; }; }
522   else
523     { echo "$as_me: error: cannot find sources in $srcdir" >&2
524    { (exit 1); exit 1; }; }
525   fi
526 fi
527 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
528 ac_env_build_alias_set=${build_alias+set}
529 ac_env_build_alias_value=$build_alias
530 ac_cv_env_build_alias_set=${build_alias+set}
531 ac_cv_env_build_alias_value=$build_alias
532 ac_env_host_alias_set=${host_alias+set}
533 ac_env_host_alias_value=$host_alias
534 ac_cv_env_host_alias_set=${host_alias+set}
535 ac_cv_env_host_alias_value=$host_alias
536 ac_env_target_alias_set=${target_alias+set}
537 ac_env_target_alias_value=$target_alias
538 ac_cv_env_target_alias_set=${target_alias+set}
539 ac_cv_env_target_alias_value=$target_alias
540 ac_env_CC_set=${CC+set}
541 ac_env_CC_value=$CC
542 ac_cv_env_CC_set=${CC+set}
543 ac_cv_env_CC_value=$CC
544 ac_env_CFLAGS_set=${CFLAGS+set}
545 ac_env_CFLAGS_value=$CFLAGS
546 ac_cv_env_CFLAGS_set=${CFLAGS+set}
547 ac_cv_env_CFLAGS_value=$CFLAGS
548 ac_env_LDFLAGS_set=${LDFLAGS+set}
549 ac_env_LDFLAGS_value=$LDFLAGS
550 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
551 ac_cv_env_LDFLAGS_value=$LDFLAGS
552 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
553 ac_env_CPPFLAGS_value=$CPPFLAGS
554 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
555 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
556 ac_env_CPP_set=${CPP+set}
557 ac_env_CPP_value=$CPP
558 ac_cv_env_CPP_set=${CPP+set}
559 ac_cv_env_CPP_value=$CPP
560
561 #
562 # Report the --help message.
563 #
564 if test "$ac_init_help" = "long"; then
565   # Omit some internal or obsolete options to make the list less imposing.
566   # This message is too long to be a string in the A/UX 3.1 sh.
567   cat <<EOF
568 \`configure' configures this package to adapt to many kinds of systems.
569
570 Usage: $0 [OPTION]... [VAR=VALUE]...
571
572 To assign environment variables (e.g., CC, CFLAGS...), specify them as
573 VAR=VALUE.  See below for descriptions of some of the useful variables.
574
575 Defaults for the options are specified in brackets.
576
577 Configuration:
578   -h, --help              display this help and exit
579       --help=short        display options specific to this package
580       --help=recursive    display the short help of all the included packages
581   -V, --version           display version information and exit
582   -q, --quiet, --silent   do not print \`checking...' messages
583       --cache-file=FILE   cache test results in FILE [disabled]
584   -C, --config-cache      alias for \`--cache-file=config.cache'
585   -n, --no-create         do not create output files
586       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
587
588 EOF
589
590   cat <<EOF
591 Installation directories:
592   --prefix=PREFIX         install architecture-independent files in PREFIX
593                           [$ac_default_prefix]
594   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
595                           [PREFIX]
596
597 By default, \`make install' will install all the files in
598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
600 for instance \`--prefix=\$HOME'.
601
602 For better control, use the options below.
603
604 Fine tuning of the installation directories:
605   --bindir=DIR            user executables [EPREFIX/bin]
606   --sbindir=DIR           system admin executables [EPREFIX/sbin]
607   --libexecdir=DIR        program executables [EPREFIX/libexec]
608   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
609   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
610   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
611   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
612   --libdir=DIR            object code libraries [EPREFIX/lib]
613   --includedir=DIR        C header files [PREFIX/include]
614   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
615   --infodir=DIR           info documentation [PREFIX/info]
616   --mandir=DIR            man documentation [PREFIX/man]
617 EOF
618
619   cat <<\EOF
620
621 Program names:
622   --program-prefix=PREFIX            prepend PREFIX to installed program names
623   --program-suffix=SUFFIX            append SUFFIX to installed program names
624   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
625
626 X features:
627   --x-includes=DIR    X include files are in DIR
628   --x-libraries=DIR   X library files are in DIR
629
630 System types:
631   --build=BUILD           configure for building on BUILD [guessed]
632   --host=HOST       build programs to run on HOST [BUILD]
633 EOF
634 fi
635
636 if test -n "$ac_init_help"; then
637
638   cat <<\EOF
639
640 Optional Features:
641   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
642   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
643
644 Optional Packages:
645   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
646   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
647
648   --disable-echo          display "compiling" commands
649   --enable-warnings       test: turn on gcc compiler warnings
650   --with-dmalloc          test: use Gray Watson's dmalloc library
651   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
652   --with-valgrind         test: use valgrind
653   --disable-leaks         test: free permanent memory, analyze leaks
654 --disable-widec           disable checks for wide-character functions
655   --with-curses-dir=DIR   directory in which (n)curses is installed
656   --with-ncursesw         use wide ncurses-libraries (installed)
657   --with-ncurses          use ncurses-libraries (installed)
658   --with-pdcurses         compile/link with pdcurses X11 library
659   --with-curses-colr      compile/link with HPUX 10.x color-curses
660   --with-curses-5lib      compile/link with SunOS 5lib curses
661   --with-Xaw3d            link with Xaw 3d library
662   --with-neXtaw           link with neXT Athena library
663   --with-XawPlus          link with Athena-Plus library
664   --with-pkg-config{=path} enable/disable use of pkg-config
665   --with-x                use the X Window System
666   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
667
668 Some influential environment variables:
669   CC          C compiler command
670   CFLAGS      C compiler flags
671   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
672               nonstandard directory <lib dir>
673   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
674               headers in a nonstandard directory <include dir>
675   CPP         C preprocessor
676
677 Use these variables to override the choices made by `configure' or to help
678 it to find libraries and programs with nonstandard names/locations.
679
680 EOF
681 fi
682
683 if test "$ac_init_help" = "recursive"; then
684   # If there are subdirs, report their specific --help.
685   ac_popdir=`pwd`
686   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
687     cd $ac_subdir
688     # A "../" for each directory in /$ac_subdir.
689     ac_dots=`echo $ac_subdir |
690              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
691
692     case $srcdir in
693     .) # No --srcdir option.  We are building in place.
694       ac_sub_srcdir=$srcdir ;;
695     [\\/]* | ?:[\\/]* ) # Absolute path.
696       ac_sub_srcdir=$srcdir/$ac_subdir ;;
697     *) # Relative path.
698       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
699     esac
700
701     # Check for guested configure; otherwise get Cygnus style configure.
702     if test -f $ac_sub_srcdir/configure.gnu; then
703       echo
704       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
705     elif test -f $ac_sub_srcdir/configure; then
706       echo
707       $SHELL $ac_sub_srcdir/configure  --help=recursive
708     elif test -f $ac_sub_srcdir/configure.ac ||
709            test -f $ac_sub_srcdir/configure.in; then
710       echo
711       $ac_configure --help
712     else
713       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
714     fi
715     cd $ac_popdir
716   done
717 fi
718
719 test -n "$ac_init_help" && exit 0
720 if $ac_init_version; then
721   cat <<\EOF
722
723 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
724 Free Software Foundation, Inc.
725 This configure script is free software; the Free Software Foundation
726 gives unlimited permission to copy, distribute and modify it.
727 EOF
728   exit 0
729 fi
730 exec 5>config.log
731 cat >&5 <<EOF
732 This file contains any messages produced by compilers while
733 running configure, to aid debugging if configure makes a mistake.
734
735 It was created by $as_me, which was
736 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
737
738   $ $0 $@
739
740 EOF
741 {
742 cat <<_ASUNAME
743 ## ---------- ##
744 ## Platform.  ##
745 ## ---------- ##
746
747 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
748 uname -m = `(uname -m) 2>/dev/null || echo unknown`
749 uname -r = `(uname -r) 2>/dev/null || echo unknown`
750 uname -s = `(uname -s) 2>/dev/null || echo unknown`
751 uname -v = `(uname -v) 2>/dev/null || echo unknown`
752
753 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
754 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
755
756 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
757 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
758 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
759 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
760 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
761 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
762 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
763
764 PATH = $PATH
765
766 _ASUNAME
767 } >&5
768
769 cat >&5 <<EOF
770 ## ------------ ##
771 ## Core tests.  ##
772 ## ------------ ##
773
774 EOF
775
776 # Keep a trace of the command line.
777 # Strip out --no-create and --no-recursion so they do not pile up.
778 # Also quote any args containing shell meta-characters.
779 ac_configure_args=
780 ac_sep=
781 for ac_arg
782 do
783   case $ac_arg in
784   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
785   | --no-cr | --no-c) ;;
786   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
787   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
788   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
789     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
790     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
791     ac_sep=" " ;;
792   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
793      ac_sep=" " ;;
794   esac
795   # Get rid of the leading space.
796 done
797
798 # When interrupted or exit'd, cleanup temporary files, and complete
799 # config.log.  We remove comments because anyway the quotes in there
800 # would cause problems or look ugly.
801 trap 'exit_status=$?
802   # Save into config.log some information that might help in debugging.
803   echo >&5
804   echo "## ----------------- ##" >&5
805   echo "## Cache variables.  ##" >&5
806   echo "## ----------------- ##" >&5
807   echo >&5
808   # The following way of writing the cache mishandles newlines in values,
809 {
810   (set) 2>&1 |
811     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
812     *ac_space=\ *)
813       sed -n \
814         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
815           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
816       ;;
817     *)
818       sed -n \
819         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
820       ;;
821     esac;
822 } >&5
823   sed "/^$/d" confdefs.h >conftest.log
824   if test -s conftest.log; then
825     echo >&5
826     echo "## ------------ ##" >&5
827     echo "## confdefs.h.  ##" >&5
828     echo "## ------------ ##" >&5
829     echo >&5
830     cat conftest.log >&5
831   fi
832   (echo; echo) >&5
833   test "$ac_signal" != 0 &&
834     echo "$as_me: caught signal $ac_signal" >&5
835   echo "$as_me: exit $exit_status" >&5
836   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
837     exit $exit_status
838      ' 0
839 for ac_signal in 1 2 13 15; do
840   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
841 done
842 ac_signal=0
843
844 # confdefs.h avoids OS command line length limits that DEFS can exceed.
845 rm -rf conftest* confdefs.h
846 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
847 echo >confdefs.h
848
849 # Let the site file select an alternate cache file if it wants to.
850 # Prefer explicitly selected file to automatically selected ones.
851 if test -z "$CONFIG_SITE"; then
852   if test "x$prefix" != xNONE; then
853     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
854   else
855     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
856   fi
857 fi
858 for ac_site_file in $CONFIG_SITE; do
859   if test -r "$ac_site_file"; then
860     { echo "$as_me:860: loading site script $ac_site_file" >&5
861 echo "$as_me: loading site script $ac_site_file" >&6;}
862     cat "$ac_site_file" >&5
863     . "$ac_site_file"
864   fi
865 done
866
867 if test -r "$cache_file"; then
868   # Some versions of bash will fail to source /dev/null (special
869   # files actually), so we avoid doing that.
870   if test -f "$cache_file"; then
871     { echo "$as_me:871: loading cache $cache_file" >&5
872 echo "$as_me: loading cache $cache_file" >&6;}
873     case $cache_file in
874       [\\/]* | ?:[\\/]* ) . $cache_file;;
875       *)                      . ./$cache_file;;
876     esac
877   fi
878 else
879   { echo "$as_me:879: creating cache $cache_file" >&5
880 echo "$as_me: creating cache $cache_file" >&6;}
881   >$cache_file
882 fi
883
884 # Check that the precious variables saved in the cache have kept the same
885 # value.
886 ac_cache_corrupted=false
887 for ac_var in `(set) 2>&1 |
888                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
889   eval ac_old_set=\$ac_cv_env_${ac_var}_set
890   eval ac_new_set=\$ac_env_${ac_var}_set
891   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
892   eval ac_new_val="\$ac_env_${ac_var}_value"
893   case $ac_old_set,$ac_new_set in
894     set,)
895       { echo "$as_me:895: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
896 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
897       ac_cache_corrupted=: ;;
898     ,set)
899       { echo "$as_me:899: error: \`$ac_var' was not set in the previous run" >&5
900 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
901       ac_cache_corrupted=: ;;
902     ,);;
903     *)
904       if test "x$ac_old_val" != "x$ac_new_val"; then
905         { echo "$as_me:905: error: \`$ac_var' has changed since the previous run:" >&5
906 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
907         { echo "$as_me:907:   former value:  $ac_old_val" >&5
908 echo "$as_me:   former value:  $ac_old_val" >&2;}
909         { echo "$as_me:909:   current value: $ac_new_val" >&5
910 echo "$as_me:   current value: $ac_new_val" >&2;}
911         ac_cache_corrupted=:
912       fi;;
913   esac
914   # Pass precious variables to config.status.  It doesn't matter if
915   # we pass some twice (in addition to the command line arguments).
916   if test "$ac_new_set" = set; then
917     case $ac_new_val in
918     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
919       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
920       ac_configure_args="$ac_configure_args '$ac_arg'"
921       ;;
922     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
923        ;;
924     esac
925   fi
926 done
927 if $ac_cache_corrupted; then
928   { echo "$as_me:928: error: changes in the environment can compromise the build" >&5
929 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
930   { { echo "$as_me:930: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
931 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
932    { (exit 1); exit 1; }; }
933 fi
934
935 ac_ext=c
936 ac_cpp='$CPP $CPPFLAGS'
937 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
938 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
939 ac_compiler_gnu=$ac_cv_c_compiler_gnu
940 ac_main_return=return
941
942 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
943   *c*,-n*) ECHO_N= ECHO_C='
944 ' ECHO_T='      ' ;;
945   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
946   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
947 esac
948 echo "#! $SHELL" >conftest.sh
949 echo  "exit 0"   >>conftest.sh
950 chmod +x conftest.sh
951 if { (echo "$as_me:951: PATH=\".;.\"; conftest.sh") >&5
952   (PATH=".;."; conftest.sh) 2>&5
953   ac_status=$?
954   echo "$as_me:954: \$? = $ac_status" >&5
955   (exit $ac_status); }; then
956   ac_path_separator=';'
957 else
958   ac_path_separator=:
959 fi
960 PATH_SEPARATOR="$ac_path_separator"
961 rm -f conftest.sh
962
963 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
964
965 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
966
967 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
968
969 ac_aux_dir=
970 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
971   if test -f $ac_dir/install-sh; then
972     ac_aux_dir=$ac_dir
973     ac_install_sh="$ac_aux_dir/install-sh -c"
974     break
975   elif test -f $ac_dir/install.sh; then
976     ac_aux_dir=$ac_dir
977     ac_install_sh="$ac_aux_dir/install.sh -c"
978     break
979   elif test -f $ac_dir/shtool; then
980     ac_aux_dir=$ac_dir
981     ac_install_sh="$ac_aux_dir/shtool install -c"
982     break
983   fi
984 done
985 if test -z "$ac_aux_dir"; then
986   { { echo "$as_me:986: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
987 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
988    { (exit 1); exit 1; }; }
989 fi
990 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
991 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
992 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
993
994 # Make sure we can run config.sub.
995 $ac_config_sub sun4 >/dev/null 2>&1 ||
996   { { echo "$as_me:996: error: cannot run $ac_config_sub" >&5
997 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
998    { (exit 1); exit 1; }; }
999
1000 echo "$as_me:1000: checking build system type" >&5
1001 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1002 if test "${ac_cv_build+set}" = set; then
1003   echo $ECHO_N "(cached) $ECHO_C" >&6
1004 else
1005   ac_cv_build_alias=$build_alias
1006 test -z "$ac_cv_build_alias" &&
1007   ac_cv_build_alias=`$ac_config_guess`
1008 test -z "$ac_cv_build_alias" &&
1009   { { echo "$as_me:1009: error: cannot guess build type; you must specify one" >&5
1010 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1011    { (exit 1); exit 1; }; }
1012 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1013   { { echo "$as_me:1013: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1014 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1015    { (exit 1); exit 1; }; }
1016
1017 fi
1018 echo "$as_me:1018: result: $ac_cv_build" >&5
1019 echo "${ECHO_T}$ac_cv_build" >&6
1020 build=$ac_cv_build
1021 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1022 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1023 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1024
1025 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1026         echo "$as_me:1026: checking host system type" >&5
1027 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1028 if test "${ac_cv_host+set}" = set; then
1029   echo $ECHO_N "(cached) $ECHO_C" >&6
1030 else
1031   ac_cv_host_alias=$host_alias
1032 test -z "$ac_cv_host_alias" &&
1033   ac_cv_host_alias=$ac_cv_build_alias
1034 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1035   { { echo "$as_me:1035: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1036 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1037    { (exit 1); exit 1; }; }
1038
1039 fi
1040 echo "$as_me:1040: result: $ac_cv_host" >&5
1041 echo "${ECHO_T}$ac_cv_host" >&6
1042 host=$ac_cv_host
1043 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1044 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1045 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1046
1047         system_name="$host_os"
1048 else
1049         system_name="`(uname -s -r) 2>/dev/null`"
1050         if test -z "$system_name" ; then
1051                 system_name="`(hostname) 2>/dev/null`"
1052         fi
1053 fi
1054 test -n "$system_name" && cat >>confdefs.h <<EOF
1055 #define SYSTEM_NAME "$system_name"
1056 EOF
1057
1058 if test "${cf_cv_system_name+set}" = set; then
1059   echo $ECHO_N "(cached) $ECHO_C" >&6
1060 else
1061   cf_cv_system_name="$system_name"
1062 fi
1063
1064 test -z "$system_name" && system_name="$cf_cv_system_name"
1065 test -n "$cf_cv_system_name" && echo "$as_me:1065: result: Configuring for $cf_cv_system_name" >&5
1066 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1067
1068 if test ".$system_name" != ".$cf_cv_system_name" ; then
1069         echo "$as_me:1069: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1070 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1071         { { echo "$as_me:1071: error: \"Please remove config.cache and try again.\"" >&5
1072 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1073    { (exit 1); exit 1; }; }
1074 fi
1075
1076 test "$program_prefix" != NONE &&
1077   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1078 # Use a double $ so make ignores it.
1079 test "$program_suffix" != NONE &&
1080   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1081 # Double any \ or $.  echo might interpret backslashes.
1082 # By default was `s,x,x', remove it if useless.
1083 cat <<\_ACEOF >conftest.sed
1084 s/[\\$]/&&/g;s/;s,x,x,$//
1085 _ACEOF
1086 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1087 rm conftest.sed
1088
1089 echo "$as_me:1089: checking whether ${MAKE-make} sets \${MAKE}" >&5
1090 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1091 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1092 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1093   echo $ECHO_N "(cached) $ECHO_C" >&6
1094 else
1095   cat >conftest.make <<\EOF
1096 all:
1097         @echo 'ac_maketemp="${MAKE}"'
1098 EOF
1099 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1100 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1101 if test -n "$ac_maketemp"; then
1102   eval ac_cv_prog_make_${ac_make}_set=yes
1103 else
1104   eval ac_cv_prog_make_${ac_make}_set=no
1105 fi
1106 rm -f conftest.make
1107 fi
1108 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1109   echo "$as_me:1109: result: yes" >&5
1110 echo "${ECHO_T}yes" >&6
1111   SET_MAKE=
1112 else
1113   echo "$as_me:1113: result: no" >&5
1114 echo "${ECHO_T}no" >&6
1115   SET_MAKE="MAKE=${MAKE-make}"
1116 fi
1117
1118 ac_ext=c
1119 ac_cpp='$CPP $CPPFLAGS'
1120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1123 ac_main_return=return
1124 if test -n "$ac_tool_prefix"; then
1125   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1126 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1127 echo "$as_me:1127: checking for $ac_word" >&5
1128 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1129 if test "${ac_cv_prog_CC+set}" = set; then
1130   echo $ECHO_N "(cached) $ECHO_C" >&6
1131 else
1132   if test -n "$CC"; then
1133   ac_cv_prog_CC="$CC" # Let the user override the test.
1134 else
1135   ac_save_IFS=$IFS; IFS=$ac_path_separator
1136 ac_dummy="$PATH"
1137 for ac_dir in $ac_dummy; do
1138   IFS=$ac_save_IFS
1139   test -z "$ac_dir" && ac_dir=.
1140   $as_executable_p "$ac_dir/$ac_word" || continue
1141 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1142 echo "$as_me:1142: found $ac_dir/$ac_word" >&5
1143 break
1144 done
1145
1146 fi
1147 fi
1148 CC=$ac_cv_prog_CC
1149 if test -n "$CC"; then
1150   echo "$as_me:1150: result: $CC" >&5
1151 echo "${ECHO_T}$CC" >&6
1152 else
1153   echo "$as_me:1153: result: no" >&5
1154 echo "${ECHO_T}no" >&6
1155 fi
1156
1157 fi
1158 if test -z "$ac_cv_prog_CC"; then
1159   ac_ct_CC=$CC
1160   # Extract the first word of "gcc", so it can be a program name with args.
1161 set dummy gcc; ac_word=$2
1162 echo "$as_me:1162: checking for $ac_word" >&5
1163 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1164 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1165   echo $ECHO_N "(cached) $ECHO_C" >&6
1166 else
1167   if test -n "$ac_ct_CC"; then
1168   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1169 else
1170   ac_save_IFS=$IFS; IFS=$ac_path_separator
1171 ac_dummy="$PATH"
1172 for ac_dir in $ac_dummy; do
1173   IFS=$ac_save_IFS
1174   test -z "$ac_dir" && ac_dir=.
1175   $as_executable_p "$ac_dir/$ac_word" || continue
1176 ac_cv_prog_ac_ct_CC="gcc"
1177 echo "$as_me:1177: found $ac_dir/$ac_word" >&5
1178 break
1179 done
1180
1181 fi
1182 fi
1183 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1184 if test -n "$ac_ct_CC"; then
1185   echo "$as_me:1185: result: $ac_ct_CC" >&5
1186 echo "${ECHO_T}$ac_ct_CC" >&6
1187 else
1188   echo "$as_me:1188: result: no" >&5
1189 echo "${ECHO_T}no" >&6
1190 fi
1191
1192   CC=$ac_ct_CC
1193 else
1194   CC="$ac_cv_prog_CC"
1195 fi
1196
1197 if test -z "$CC"; then
1198   if test -n "$ac_tool_prefix"; then
1199   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1200 set dummy ${ac_tool_prefix}cc; ac_word=$2
1201 echo "$as_me:1201: checking for $ac_word" >&5
1202 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1203 if test "${ac_cv_prog_CC+set}" = set; then
1204   echo $ECHO_N "(cached) $ECHO_C" >&6
1205 else
1206   if test -n "$CC"; then
1207   ac_cv_prog_CC="$CC" # Let the user override the test.
1208 else
1209   ac_save_IFS=$IFS; IFS=$ac_path_separator
1210 ac_dummy="$PATH"
1211 for ac_dir in $ac_dummy; do
1212   IFS=$ac_save_IFS
1213   test -z "$ac_dir" && ac_dir=.
1214   $as_executable_p "$ac_dir/$ac_word" || continue
1215 ac_cv_prog_CC="${ac_tool_prefix}cc"
1216 echo "$as_me:1216: found $ac_dir/$ac_word" >&5
1217 break
1218 done
1219
1220 fi
1221 fi
1222 CC=$ac_cv_prog_CC
1223 if test -n "$CC"; then
1224   echo "$as_me:1224: result: $CC" >&5
1225 echo "${ECHO_T}$CC" >&6
1226 else
1227   echo "$as_me:1227: result: no" >&5
1228 echo "${ECHO_T}no" >&6
1229 fi
1230
1231 fi
1232 if test -z "$ac_cv_prog_CC"; then
1233   ac_ct_CC=$CC
1234   # Extract the first word of "cc", so it can be a program name with args.
1235 set dummy cc; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   if test -n "$ac_ct_CC"; then
1242   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1243 else
1244   ac_save_IFS=$IFS; IFS=$ac_path_separator
1245 ac_dummy="$PATH"
1246 for ac_dir in $ac_dummy; do
1247   IFS=$ac_save_IFS
1248   test -z "$ac_dir" && ac_dir=.
1249   $as_executable_p "$ac_dir/$ac_word" || continue
1250 ac_cv_prog_ac_ct_CC="cc"
1251 echo "$as_me:1251: found $ac_dir/$ac_word" >&5
1252 break
1253 done
1254
1255 fi
1256 fi
1257 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1258 if test -n "$ac_ct_CC"; then
1259   echo "$as_me:1259: result: $ac_ct_CC" >&5
1260 echo "${ECHO_T}$ac_ct_CC" >&6
1261 else
1262   echo "$as_me:1262: result: no" >&5
1263 echo "${ECHO_T}no" >&6
1264 fi
1265
1266   CC=$ac_ct_CC
1267 else
1268   CC="$ac_cv_prog_CC"
1269 fi
1270
1271 fi
1272 if test -z "$CC"; then
1273   # Extract the first word of "cc", so it can be a program name with args.
1274 set dummy cc; ac_word=$2
1275 echo "$as_me:1275: checking for $ac_word" >&5
1276 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1277 if test "${ac_cv_prog_CC+set}" = set; then
1278   echo $ECHO_N "(cached) $ECHO_C" >&6
1279 else
1280   if test -n "$CC"; then
1281   ac_cv_prog_CC="$CC" # Let the user override the test.
1282 else
1283   ac_prog_rejected=no
1284   ac_save_IFS=$IFS; IFS=$ac_path_separator
1285 ac_dummy="$PATH"
1286 for ac_dir in $ac_dummy; do
1287   IFS=$ac_save_IFS
1288   test -z "$ac_dir" && ac_dir=.
1289   $as_executable_p "$ac_dir/$ac_word" || continue
1290 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1291   ac_prog_rejected=yes
1292   continue
1293 fi
1294 ac_cv_prog_CC="cc"
1295 echo "$as_me:1295: found $ac_dir/$ac_word" >&5
1296 break
1297 done
1298
1299 if test $ac_prog_rejected = yes; then
1300   # We found a bogon in the path, so make sure we never use it.
1301   set dummy $ac_cv_prog_CC
1302   shift
1303   if test $# != 0; then
1304     # We chose a different compiler from the bogus one.
1305     # However, it has the same basename, so the bogon will be chosen
1306     # first if we set CC to just the basename; use the full file name.
1307     shift
1308     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1309     shift
1310     ac_cv_prog_CC="$@"
1311   fi
1312 fi
1313 fi
1314 fi
1315 CC=$ac_cv_prog_CC
1316 if test -n "$CC"; then
1317   echo "$as_me:1317: result: $CC" >&5
1318 echo "${ECHO_T}$CC" >&6
1319 else
1320   echo "$as_me:1320: result: no" >&5
1321 echo "${ECHO_T}no" >&6
1322 fi
1323
1324 fi
1325 if test -z "$CC"; then
1326   if test -n "$ac_tool_prefix"; then
1327   for ac_prog in cl
1328   do
1329     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1330 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1331 echo "$as_me:1331: checking for $ac_word" >&5
1332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1333 if test "${ac_cv_prog_CC+set}" = set; then
1334   echo $ECHO_N "(cached) $ECHO_C" >&6
1335 else
1336   if test -n "$CC"; then
1337   ac_cv_prog_CC="$CC" # Let the user override the test.
1338 else
1339   ac_save_IFS=$IFS; IFS=$ac_path_separator
1340 ac_dummy="$PATH"
1341 for ac_dir in $ac_dummy; do
1342   IFS=$ac_save_IFS
1343   test -z "$ac_dir" && ac_dir=.
1344   $as_executable_p "$ac_dir/$ac_word" || continue
1345 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1346 echo "$as_me:1346: found $ac_dir/$ac_word" >&5
1347 break
1348 done
1349
1350 fi
1351 fi
1352 CC=$ac_cv_prog_CC
1353 if test -n "$CC"; then
1354   echo "$as_me:1354: result: $CC" >&5
1355 echo "${ECHO_T}$CC" >&6
1356 else
1357   echo "$as_me:1357: result: no" >&5
1358 echo "${ECHO_T}no" >&6
1359 fi
1360
1361     test -n "$CC" && break
1362   done
1363 fi
1364 if test -z "$CC"; then
1365   ac_ct_CC=$CC
1366   for ac_prog in cl
1367 do
1368   # Extract the first word of "$ac_prog", so it can be a program name with args.
1369 set dummy $ac_prog; ac_word=$2
1370 echo "$as_me:1370: checking for $ac_word" >&5
1371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1372 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1373   echo $ECHO_N "(cached) $ECHO_C" >&6
1374 else
1375   if test -n "$ac_ct_CC"; then
1376   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1377 else
1378   ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 ac_dummy="$PATH"
1380 for ac_dir in $ac_dummy; do
1381   IFS=$ac_save_IFS
1382   test -z "$ac_dir" && ac_dir=.
1383   $as_executable_p "$ac_dir/$ac_word" || continue
1384 ac_cv_prog_ac_ct_CC="$ac_prog"
1385 echo "$as_me:1385: found $ac_dir/$ac_word" >&5
1386 break
1387 done
1388
1389 fi
1390 fi
1391 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1392 if test -n "$ac_ct_CC"; then
1393   echo "$as_me:1393: result: $ac_ct_CC" >&5
1394 echo "${ECHO_T}$ac_ct_CC" >&6
1395 else
1396   echo "$as_me:1396: result: no" >&5
1397 echo "${ECHO_T}no" >&6
1398 fi
1399
1400   test -n "$ac_ct_CC" && break
1401 done
1402
1403   CC=$ac_ct_CC
1404 fi
1405
1406 fi
1407
1408 test -z "$CC" && { { echo "$as_me:1408: error: no acceptable cc found in \$PATH" >&5
1409 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1410    { (exit 1); exit 1; }; }
1411
1412 # Provide some information about the compiler.
1413 echo "$as_me:1413:" \
1414      "checking for C compiler version" >&5
1415 ac_compiler=`set X $ac_compile; echo $2`
1416 { (eval echo "$as_me:1416: \"$ac_compiler --version </dev/null >&5\"") >&5
1417   (eval $ac_compiler --version </dev/null >&5) 2>&5
1418   ac_status=$?
1419   echo "$as_me:1419: \$? = $ac_status" >&5
1420   (exit $ac_status); }
1421 { (eval echo "$as_me:1421: \"$ac_compiler -v </dev/null >&5\"") >&5
1422   (eval $ac_compiler -v </dev/null >&5) 2>&5
1423   ac_status=$?
1424   echo "$as_me:1424: \$? = $ac_status" >&5
1425   (exit $ac_status); }
1426 { (eval echo "$as_me:1426: \"$ac_compiler -V </dev/null >&5\"") >&5
1427   (eval $ac_compiler -V </dev/null >&5) 2>&5
1428   ac_status=$?
1429   echo "$as_me:1429: \$? = $ac_status" >&5
1430   (exit $ac_status); }
1431
1432 cat >conftest.$ac_ext <<_ACEOF
1433 #line 1433 "configure"
1434 #include "confdefs.h"
1435
1436 int
1437 main ()
1438 {
1439
1440   ;
1441   return 0;
1442 }
1443 _ACEOF
1444 ac_clean_files_save=$ac_clean_files
1445 ac_clean_files="$ac_clean_files a.out a.exe"
1446 # Try to create an executable without -o first, disregard a.out.
1447 # It will help us diagnose broken compilers, and finding out an intuition
1448 # of exeext.
1449 echo "$as_me:1449: checking for C compiler default output" >&5
1450 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1451 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1452 if { (eval echo "$as_me:1452: \"$ac_link_default\"") >&5
1453   (eval $ac_link_default) 2>&5
1454   ac_status=$?
1455   echo "$as_me:1455: \$? = $ac_status" >&5
1456   (exit $ac_status); }; then
1457   # Find the output, starting from the most likely.  This scheme is
1458 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1459 # resort.
1460 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1461                 ls a.out conftest 2>/dev/null;
1462                 ls a.* conftest.* 2>/dev/null`; do
1463   case $ac_file in
1464     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1465     a.out ) # We found the default executable, but exeext='' is most
1466             # certainly right.
1467             break;;
1468     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1469           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1470           export ac_cv_exeext
1471           break;;
1472     * ) break;;
1473   esac
1474 done
1475 else
1476   echo "$as_me: failed program was:" >&5
1477 cat conftest.$ac_ext >&5
1478 { { echo "$as_me:1478: error: C compiler cannot create executables" >&5
1479 echo "$as_me: error: C compiler cannot create executables" >&2;}
1480    { (exit 77); exit 77; }; }
1481 fi
1482
1483 ac_exeext=$ac_cv_exeext
1484 echo "$as_me:1484: result: $ac_file" >&5
1485 echo "${ECHO_T}$ac_file" >&6
1486
1487 # Check the compiler produces executables we can run.  If not, either
1488 # the compiler is broken, or we cross compile.
1489 echo "$as_me:1489: checking whether the C compiler works" >&5
1490 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1491 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1492 # If not cross compiling, check that we can run a simple program.
1493 if test "$cross_compiling" != yes; then
1494   if { ac_try='./$ac_file'
1495   { (eval echo "$as_me:1495: \"$ac_try\"") >&5
1496   (eval $ac_try) 2>&5
1497   ac_status=$?
1498   echo "$as_me:1498: \$? = $ac_status" >&5
1499   (exit $ac_status); }; }; then
1500     cross_compiling=no
1501   else
1502     if test "$cross_compiling" = maybe; then
1503         cross_compiling=yes
1504     else
1505         { { echo "$as_me:1505: error: cannot run C compiled programs.
1506 If you meant to cross compile, use \`--host'." >&5
1507 echo "$as_me: error: cannot run C compiled programs.
1508 If you meant to cross compile, use \`--host'." >&2;}
1509    { (exit 1); exit 1; }; }
1510     fi
1511   fi
1512 fi
1513 echo "$as_me:1513: result: yes" >&5
1514 echo "${ECHO_T}yes" >&6
1515
1516 rm -f a.out a.exe conftest$ac_cv_exeext
1517 ac_clean_files=$ac_clean_files_save
1518 # Check the compiler produces executables we can run.  If not, either
1519 # the compiler is broken, or we cross compile.
1520 echo "$as_me:1520: checking whether we are cross compiling" >&5
1521 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1522 echo "$as_me:1522: result: $cross_compiling" >&5
1523 echo "${ECHO_T}$cross_compiling" >&6
1524
1525 echo "$as_me:1525: checking for executable suffix" >&5
1526 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1527 if { (eval echo "$as_me:1527: \"$ac_link\"") >&5
1528   (eval $ac_link) 2>&5
1529   ac_status=$?
1530   echo "$as_me:1530: \$? = $ac_status" >&5
1531   (exit $ac_status); }; then
1532   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1533 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1534 # work properly (i.e., refer to `conftest.exe'), while it won't with
1535 # `rm'.
1536 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1537   case $ac_file in
1538     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1539     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1540           export ac_cv_exeext
1541           break;;
1542     * ) break;;
1543   esac
1544 done
1545 else
1546   { { echo "$as_me:1546: error: cannot compute EXEEXT: cannot compile and link" >&5
1547 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1548    { (exit 1); exit 1; }; }
1549 fi
1550
1551 rm -f conftest$ac_cv_exeext
1552 echo "$as_me:1552: result: $ac_cv_exeext" >&5
1553 echo "${ECHO_T}$ac_cv_exeext" >&6
1554
1555 rm -f conftest.$ac_ext
1556 EXEEXT=$ac_cv_exeext
1557 ac_exeext=$EXEEXT
1558 echo "$as_me:1558: checking for object suffix" >&5
1559 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1560 if test "${ac_cv_objext+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   cat >conftest.$ac_ext <<_ACEOF
1564 #line 1564 "configure"
1565 #include "confdefs.h"
1566
1567 int
1568 main ()
1569 {
1570
1571   ;
1572   return 0;
1573 }
1574 _ACEOF
1575 rm -f conftest.o conftest.obj
1576 if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5
1577   (eval $ac_compile) 2>&5
1578   ac_status=$?
1579   echo "$as_me:1579: \$? = $ac_status" >&5
1580   (exit $ac_status); }; then
1581   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1582   case $ac_file in
1583     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1584     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1585        break;;
1586   esac
1587 done
1588 else
1589   echo "$as_me: failed program was:" >&5
1590 cat conftest.$ac_ext >&5
1591 { { echo "$as_me:1591: error: cannot compute OBJEXT: cannot compile" >&5
1592 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1593    { (exit 1); exit 1; }; }
1594 fi
1595
1596 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1597 fi
1598 echo "$as_me:1598: result: $ac_cv_objext" >&5
1599 echo "${ECHO_T}$ac_cv_objext" >&6
1600 OBJEXT=$ac_cv_objext
1601 ac_objext=$OBJEXT
1602 echo "$as_me:1602: checking whether we are using the GNU C compiler" >&5
1603 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1604 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1605   echo $ECHO_N "(cached) $ECHO_C" >&6
1606 else
1607   cat >conftest.$ac_ext <<_ACEOF
1608 #line 1608 "configure"
1609 #include "confdefs.h"
1610
1611 int
1612 main ()
1613 {
1614 #ifndef __GNUC__
1615        choke me
1616 #endif
1617
1618   ;
1619   return 0;
1620 }
1621 _ACEOF
1622 rm -f conftest.$ac_objext
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624   (eval $ac_compile) 2>&5
1625   ac_status=$?
1626   echo "$as_me:1626: \$? = $ac_status" >&5
1627   (exit $ac_status); } &&
1628          { ac_try='test -s conftest.$ac_objext'
1629   { (eval echo "$as_me:1629: \"$ac_try\"") >&5
1630   (eval $ac_try) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }; }; then
1634   ac_compiler_gnu=yes
1635 else
1636   echo "$as_me: failed program was:" >&5
1637 cat conftest.$ac_ext >&5
1638 ac_compiler_gnu=no
1639 fi
1640 rm -f conftest.$ac_objext conftest.$ac_ext
1641 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1642
1643 fi
1644 echo "$as_me:1644: result: $ac_cv_c_compiler_gnu" >&5
1645 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1646 GCC=`test $ac_compiler_gnu = yes && echo yes`
1647 ac_test_CFLAGS=${CFLAGS+set}
1648 ac_save_CFLAGS=$CFLAGS
1649 CFLAGS="-g"
1650 echo "$as_me:1650: checking whether $CC accepts -g" >&5
1651 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1652 if test "${ac_cv_prog_cc_g+set}" = set; then
1653   echo $ECHO_N "(cached) $ECHO_C" >&6
1654 else
1655   cat >conftest.$ac_ext <<_ACEOF
1656 #line 1656 "configure"
1657 #include "confdefs.h"
1658
1659 int
1660 main ()
1661 {
1662
1663   ;
1664   return 0;
1665 }
1666 _ACEOF
1667 rm -f conftest.$ac_objext
1668 if { (eval echo "$as_me:1668: \"$ac_compile\"") >&5
1669   (eval $ac_compile) 2>&5
1670   ac_status=$?
1671   echo "$as_me:1671: \$? = $ac_status" >&5
1672   (exit $ac_status); } &&
1673          { ac_try='test -s conftest.$ac_objext'
1674   { (eval echo "$as_me:1674: \"$ac_try\"") >&5
1675   (eval $ac_try) 2>&5
1676   ac_status=$?
1677   echo "$as_me:1677: \$? = $ac_status" >&5
1678   (exit $ac_status); }; }; then
1679   ac_cv_prog_cc_g=yes
1680 else
1681   echo "$as_me: failed program was:" >&5
1682 cat conftest.$ac_ext >&5
1683 ac_cv_prog_cc_g=no
1684 fi
1685 rm -f conftest.$ac_objext conftest.$ac_ext
1686 fi
1687 echo "$as_me:1687: result: $ac_cv_prog_cc_g" >&5
1688 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1689 if test "$ac_test_CFLAGS" = set; then
1690   CFLAGS=$ac_save_CFLAGS
1691 elif test $ac_cv_prog_cc_g = yes; then
1692   if test "$GCC" = yes; then
1693     CFLAGS="-g -O2"
1694   else
1695     CFLAGS="-g"
1696   fi
1697 else
1698   if test "$GCC" = yes; then
1699     CFLAGS="-O2"
1700   else
1701     CFLAGS=
1702   fi
1703 fi
1704 # Some people use a C++ compiler to compile C.  Since we use `exit',
1705 # in C++ we need to declare it.  In case someone uses the same compiler
1706 # for both compiling C and C++ we need to have the C++ compiler decide
1707 # the declaration of exit, since it's the most demanding environment.
1708 cat >conftest.$ac_ext <<_ACEOF
1709 #ifndef __cplusplus
1710   choke me
1711 #endif
1712 _ACEOF
1713 rm -f conftest.$ac_objext
1714 if { (eval echo "$as_me:1714: \"$ac_compile\"") >&5
1715   (eval $ac_compile) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); } &&
1719          { ac_try='test -s conftest.$ac_objext'
1720   { (eval echo "$as_me:1720: \"$ac_try\"") >&5
1721   (eval $ac_try) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }; }; then
1725   for ac_declaration in \
1726    ''\
1727    '#include <stdlib.h>' \
1728    'extern "C" void std::exit (int) throw (); using std::exit;' \
1729    'extern "C" void std::exit (int); using std::exit;' \
1730    'extern "C" void exit (int) throw ();' \
1731    'extern "C" void exit (int);' \
1732    'void exit (int);'
1733 do
1734   cat >conftest.$ac_ext <<_ACEOF
1735 #line 1735 "configure"
1736 #include "confdefs.h"
1737 #include <stdlib.h>
1738 $ac_declaration
1739 int
1740 main ()
1741 {
1742 exit (42);
1743   ;
1744   return 0;
1745 }
1746 _ACEOF
1747 rm -f conftest.$ac_objext
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749   (eval $ac_compile) 2>&5
1750   ac_status=$?
1751   echo "$as_me:1751: \$? = $ac_status" >&5
1752   (exit $ac_status); } &&
1753          { ac_try='test -s conftest.$ac_objext'
1754   { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1755   (eval $ac_try) 2>&5
1756   ac_status=$?
1757   echo "$as_me:1757: \$? = $ac_status" >&5
1758   (exit $ac_status); }; }; then
1759   :
1760 else
1761   echo "$as_me: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1763 continue
1764 fi
1765 rm -f conftest.$ac_objext conftest.$ac_ext
1766   cat >conftest.$ac_ext <<_ACEOF
1767 #line 1767 "configure"
1768 #include "confdefs.h"
1769 $ac_declaration
1770 int
1771 main ()
1772 {
1773 exit (42);
1774   ;
1775   return 0;
1776 }
1777 _ACEOF
1778 rm -f conftest.$ac_objext
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780   (eval $ac_compile) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); } &&
1784          { ac_try='test -s conftest.$ac_objext'
1785   { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1786   (eval $ac_try) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); }; }; then
1790   break
1791 else
1792   echo "$as_me: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 fi
1795 rm -f conftest.$ac_objext conftest.$ac_ext
1796 done
1797 rm -rf conftest*
1798 if test -n "$ac_declaration"; then
1799   echo '#ifdef __cplusplus' >>confdefs.h
1800   echo $ac_declaration      >>confdefs.h
1801   echo '#endif'             >>confdefs.h
1802 fi
1803
1804 else
1805   echo "$as_me: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 fi
1808 rm -f conftest.$ac_objext conftest.$ac_ext
1809 ac_ext=c
1810 ac_cpp='$CPP $CPPFLAGS'
1811 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1812 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1813 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1814 ac_main_return=return
1815
1816 ac_ext=c
1817 ac_cpp='$CPP $CPPFLAGS'
1818 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1819 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1820 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1821 ac_main_return=return
1822 echo "$as_me:1822: checking how to run the C preprocessor" >&5
1823 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1824 # On Suns, sometimes $CPP names a directory.
1825 if test -n "$CPP" && test -d "$CPP"; then
1826   CPP=
1827 fi
1828 if test -z "$CPP"; then
1829   if test "${ac_cv_prog_CPP+set}" = set; then
1830   echo $ECHO_N "(cached) $ECHO_C" >&6
1831 else
1832       # Double quotes because CPP needs to be expanded
1833     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1834     do
1835       ac_preproc_ok=false
1836 for ac_c_preproc_warn_flag in '' yes
1837 do
1838   # Use a header file that comes with gcc, so configuring glibc
1839   # with a fresh cross-compiler works.
1840   # On the NeXT, cc -E runs the code through the compiler's parser,
1841   # not just through cpp. "Syntax error" is here to catch this case.
1842   cat >conftest.$ac_ext <<_ACEOF
1843 #line 1843 "configure"
1844 #include "confdefs.h"
1845 #include <assert.h>
1846                      Syntax error
1847 _ACEOF
1848 if { (eval echo "$as_me:1848: \"$ac_cpp conftest.$ac_ext\"") >&5
1849   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1850   ac_status=$?
1851   egrep -v '^ *\+' conftest.er1 >conftest.err
1852   rm -f conftest.er1
1853   cat conftest.err >&5
1854   echo "$as_me:1854: \$? = $ac_status" >&5
1855   (exit $ac_status); } >/dev/null; then
1856   if test -s conftest.err; then
1857     ac_cpp_err=$ac_c_preproc_warn_flag
1858   else
1859     ac_cpp_err=
1860   fi
1861 else
1862   ac_cpp_err=yes
1863 fi
1864 if test -z "$ac_cpp_err"; then
1865   :
1866 else
1867   echo "$as_me: failed program was:" >&5
1868   cat conftest.$ac_ext >&5
1869   # Broken: fails on valid input.
1870 continue
1871 fi
1872 rm -f conftest.err conftest.$ac_ext
1873
1874   # OK, works on sane cases.  Now check whether non-existent headers
1875   # can be detected and how.
1876   cat >conftest.$ac_ext <<_ACEOF
1877 #line 1877 "configure"
1878 #include "confdefs.h"
1879 #include <ac_nonexistent.h>
1880 _ACEOF
1881 if { (eval echo "$as_me:1881: \"$ac_cpp conftest.$ac_ext\"") >&5
1882   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1883   ac_status=$?
1884   egrep -v '^ *\+' conftest.er1 >conftest.err
1885   rm -f conftest.er1
1886   cat conftest.err >&5
1887   echo "$as_me:1887: \$? = $ac_status" >&5
1888   (exit $ac_status); } >/dev/null; then
1889   if test -s conftest.err; then
1890     ac_cpp_err=$ac_c_preproc_warn_flag
1891   else
1892     ac_cpp_err=
1893   fi
1894 else
1895   ac_cpp_err=yes
1896 fi
1897 if test -z "$ac_cpp_err"; then
1898   # Broken: success on invalid input.
1899 continue
1900 else
1901   echo "$as_me: failed program was:" >&5
1902   cat conftest.$ac_ext >&5
1903   # Passes both tests.
1904 ac_preproc_ok=:
1905 break
1906 fi
1907 rm -f conftest.err conftest.$ac_ext
1908
1909 done
1910 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1911 rm -f conftest.err conftest.$ac_ext
1912 if $ac_preproc_ok; then
1913   break
1914 fi
1915
1916     done
1917     ac_cv_prog_CPP=$CPP
1918
1919 fi
1920   CPP=$ac_cv_prog_CPP
1921 else
1922   ac_cv_prog_CPP=$CPP
1923 fi
1924 echo "$as_me:1924: result: $CPP" >&5
1925 echo "${ECHO_T}$CPP" >&6
1926 ac_preproc_ok=false
1927 for ac_c_preproc_warn_flag in '' yes
1928 do
1929   # Use a header file that comes with gcc, so configuring glibc
1930   # with a fresh cross-compiler works.
1931   # On the NeXT, cc -E runs the code through the compiler's parser,
1932   # not just through cpp. "Syntax error" is here to catch this case.
1933   cat >conftest.$ac_ext <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1936 #include <assert.h>
1937                      Syntax error
1938 _ACEOF
1939 if { (eval echo "$as_me:1939: \"$ac_cpp conftest.$ac_ext\"") >&5
1940   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1941   ac_status=$?
1942   egrep -v '^ *\+' conftest.er1 >conftest.err
1943   rm -f conftest.er1
1944   cat conftest.err >&5
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); } >/dev/null; then
1947   if test -s conftest.err; then
1948     ac_cpp_err=$ac_c_preproc_warn_flag
1949   else
1950     ac_cpp_err=
1951   fi
1952 else
1953   ac_cpp_err=yes
1954 fi
1955 if test -z "$ac_cpp_err"; then
1956   :
1957 else
1958   echo "$as_me: failed program was:" >&5
1959   cat conftest.$ac_ext >&5
1960   # Broken: fails on valid input.
1961 continue
1962 fi
1963 rm -f conftest.err conftest.$ac_ext
1964
1965   # OK, works on sane cases.  Now check whether non-existent headers
1966   # can be detected and how.
1967   cat >conftest.$ac_ext <<_ACEOF
1968 #line 1968 "configure"
1969 #include "confdefs.h"
1970 #include <ac_nonexistent.h>
1971 _ACEOF
1972 if { (eval echo "$as_me:1972: \"$ac_cpp conftest.$ac_ext\"") >&5
1973   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1974   ac_status=$?
1975   egrep -v '^ *\+' conftest.er1 >conftest.err
1976   rm -f conftest.er1
1977   cat conftest.err >&5
1978   echo "$as_me:1978: \$? = $ac_status" >&5
1979   (exit $ac_status); } >/dev/null; then
1980   if test -s conftest.err; then
1981     ac_cpp_err=$ac_c_preproc_warn_flag
1982   else
1983     ac_cpp_err=
1984   fi
1985 else
1986   ac_cpp_err=yes
1987 fi
1988 if test -z "$ac_cpp_err"; then
1989   # Broken: success on invalid input.
1990 continue
1991 else
1992   echo "$as_me: failed program was:" >&5
1993   cat conftest.$ac_ext >&5
1994   # Passes both tests.
1995 ac_preproc_ok=:
1996 break
1997 fi
1998 rm -f conftest.err conftest.$ac_ext
1999
2000 done
2001 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2002 rm -f conftest.err conftest.$ac_ext
2003 if $ac_preproc_ok; then
2004   :
2005 else
2006   { { echo "$as_me:2006: error: C preprocessor \"$CPP\" fails sanity check" >&5
2007 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2008    { (exit 1); exit 1; }; }
2009 fi
2010
2011 ac_ext=c
2012 ac_cpp='$CPP $CPPFLAGS'
2013 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2014 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2015 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2016 ac_main_return=return
2017
2018 for ac_prog in mawk gawk nawk awk
2019 do
2020   # Extract the first word of "$ac_prog", so it can be a program name with args.
2021 set dummy $ac_prog; ac_word=$2
2022 echo "$as_me:2022: checking for $ac_word" >&5
2023 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2024 if test "${ac_cv_prog_AWK+set}" = set; then
2025   echo $ECHO_N "(cached) $ECHO_C" >&6
2026 else
2027   if test -n "$AWK"; then
2028   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2029 else
2030   ac_save_IFS=$IFS; IFS=$ac_path_separator
2031 ac_dummy="$PATH"
2032 for ac_dir in $ac_dummy; do
2033   IFS=$ac_save_IFS
2034   test -z "$ac_dir" && ac_dir=.
2035   $as_executable_p "$ac_dir/$ac_word" || continue
2036 ac_cv_prog_AWK="$ac_prog"
2037 echo "$as_me:2037: found $ac_dir/$ac_word" >&5
2038 break
2039 done
2040
2041 fi
2042 fi
2043 AWK=$ac_cv_prog_AWK
2044 if test -n "$AWK"; then
2045   echo "$as_me:2045: result: $AWK" >&5
2046 echo "${ECHO_T}$AWK" >&6
2047 else
2048   echo "$as_me:2048: result: no" >&5
2049 echo "${ECHO_T}no" >&6
2050 fi
2051
2052   test -n "$AWK" && break
2053 done
2054
2055 # Find a good install program.  We prefer a C program (faster),
2056 # so one script is as good as another.  But avoid the broken or
2057 # incompatible versions:
2058 # SysV /etc/install, /usr/sbin/install
2059 # SunOS /usr/etc/install
2060 # IRIX /sbin/install
2061 # AIX /bin/install
2062 # AmigaOS /C/install, which installs bootblocks on floppy discs
2063 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2064 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2065 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2066 # ./install, which can be erroneously created by make from ./install.sh.
2067 echo "$as_me:2067: checking for a BSD compatible install" >&5
2068 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2069 if test -z "$INSTALL"; then
2070 if test "${ac_cv_path_install+set}" = set; then
2071   echo $ECHO_N "(cached) $ECHO_C" >&6
2072 else
2073     ac_save_IFS=$IFS; IFS=$ac_path_separator
2074   for ac_dir in $PATH; do
2075     IFS=$ac_save_IFS
2076     # Account for people who put trailing slashes in PATH elements.
2077     case $ac_dir/ in
2078     / | ./ | .// | /cC/* \
2079     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2080     | /usr/ucb/* ) ;;
2081     *)
2082       # OSF1 and SCO ODT 3.0 have their own names for install.
2083       # Don't use installbsd from OSF since it installs stuff as root
2084       # by default.
2085       for ac_prog in ginstall scoinst install; do
2086         if $as_executable_p "$ac_dir/$ac_prog"; then
2087           if test $ac_prog = install &&
2088             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2089             # AIX install.  It has an incompatible calling convention.
2090             :
2091           elif test $ac_prog = install &&
2092             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2093             # program-specific install script used by HP pwplus--don't use.
2094             :
2095           else
2096             ac_cv_path_install="$ac_dir/$ac_prog -c"
2097             break 2
2098           fi
2099         fi
2100       done
2101       ;;
2102     esac
2103   done
2104
2105 fi
2106   if test "${ac_cv_path_install+set}" = set; then
2107     INSTALL=$ac_cv_path_install
2108   else
2109     # As a last resort, use the slow shell script.  We don't cache a
2110     # path for INSTALL within a source directory, because that will
2111     # break other packages using the cache if that directory is
2112     # removed, or if the path is relative.
2113     INSTALL=$ac_install_sh
2114   fi
2115 fi
2116 echo "$as_me:2116: result: $INSTALL" >&5
2117 echo "${ECHO_T}$INSTALL" >&6
2118
2119 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2120 # It thinks the first close brace ends the variable substitution.
2121 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2122
2123 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2124
2125 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2126
2127 case $INSTALL in
2128 /*)
2129   ;;
2130 *)
2131   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2132   test -z "$cf_dir" && cf_dir=.
2133   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2134   ;;
2135 esac
2136
2137 for ac_prog in tdlint lint alint splint lclint
2138 do
2139   # Extract the first word of "$ac_prog", so it can be a program name with args.
2140 set dummy $ac_prog; ac_word=$2
2141 echo "$as_me:2141: checking for $ac_word" >&5
2142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2143 if test "${ac_cv_prog_LINT+set}" = set; then
2144   echo $ECHO_N "(cached) $ECHO_C" >&6
2145 else
2146   if test -n "$LINT"; then
2147   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2148 else
2149   ac_save_IFS=$IFS; IFS=$ac_path_separator
2150 ac_dummy="$PATH"
2151 for ac_dir in $ac_dummy; do
2152   IFS=$ac_save_IFS
2153   test -z "$ac_dir" && ac_dir=.
2154   $as_executable_p "$ac_dir/$ac_word" || continue
2155 ac_cv_prog_LINT="$ac_prog"
2156 echo "$as_me:2156: found $ac_dir/$ac_word" >&5
2157 break
2158 done
2159
2160 fi
2161 fi
2162 LINT=$ac_cv_prog_LINT
2163 if test -n "$LINT"; then
2164   echo "$as_me:2164: result: $LINT" >&5
2165 echo "${ECHO_T}$LINT" >&6
2166 else
2167   echo "$as_me:2167: result: no" >&5
2168 echo "${ECHO_T}no" >&6
2169 fi
2170
2171   test -n "$LINT" && break
2172 done
2173
2174 echo "$as_me:2174: checking if filesystem supports mixed-case filenames" >&5
2175 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2176 if test "${cf_cv_mixedcase+set}" = set; then
2177   echo $ECHO_N "(cached) $ECHO_C" >&6
2178 else
2179
2180 if test "$cross_compiling" = yes ; then
2181         case $target_alias in #(vi
2182         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2183                 cf_cv_mixedcase=no
2184                 ;;
2185         *)
2186                 cf_cv_mixedcase=yes
2187                 ;;
2188         esac
2189 else
2190         rm -f conftest CONFTEST
2191         echo test >conftest
2192         if test -f CONFTEST ; then
2193                 cf_cv_mixedcase=no
2194         else
2195                 cf_cv_mixedcase=yes
2196         fi
2197         rm -f conftest CONFTEST
2198 fi
2199
2200 fi
2201 echo "$as_me:2201: result: $cf_cv_mixedcase" >&5
2202 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2203 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2204 #define MIXEDCASE_FILENAMES 1
2205 EOF
2206
2207 for ac_prog in exctags ctags
2208 do
2209   # Extract the first word of "$ac_prog", so it can be a program name with args.
2210 set dummy $ac_prog; ac_word=$2
2211 echo "$as_me:2211: checking for $ac_word" >&5
2212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2213 if test "${ac_cv_prog_CTAGS+set}" = set; then
2214   echo $ECHO_N "(cached) $ECHO_C" >&6
2215 else
2216   if test -n "$CTAGS"; then
2217   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2218 else
2219   ac_save_IFS=$IFS; IFS=$ac_path_separator
2220 ac_dummy="$PATH"
2221 for ac_dir in $ac_dummy; do
2222   IFS=$ac_save_IFS
2223   test -z "$ac_dir" && ac_dir=.
2224   $as_executable_p "$ac_dir/$ac_word" || continue
2225 ac_cv_prog_CTAGS="$ac_prog"
2226 echo "$as_me:2226: found $ac_dir/$ac_word" >&5
2227 break
2228 done
2229
2230 fi
2231 fi
2232 CTAGS=$ac_cv_prog_CTAGS
2233 if test -n "$CTAGS"; then
2234   echo "$as_me:2234: result: $CTAGS" >&5
2235 echo "${ECHO_T}$CTAGS" >&6
2236 else
2237   echo "$as_me:2237: result: no" >&5
2238 echo "${ECHO_T}no" >&6
2239 fi
2240
2241   test -n "$CTAGS" && break
2242 done
2243
2244 for ac_prog in exetags etags
2245 do
2246   # Extract the first word of "$ac_prog", so it can be a program name with args.
2247 set dummy $ac_prog; ac_word=$2
2248 echo "$as_me:2248: checking for $ac_word" >&5
2249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2250 if test "${ac_cv_prog_ETAGS+set}" = set; then
2251   echo $ECHO_N "(cached) $ECHO_C" >&6
2252 else
2253   if test -n "$ETAGS"; then
2254   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2255 else
2256   ac_save_IFS=$IFS; IFS=$ac_path_separator
2257 ac_dummy="$PATH"
2258 for ac_dir in $ac_dummy; do
2259   IFS=$ac_save_IFS
2260   test -z "$ac_dir" && ac_dir=.
2261   $as_executable_p "$ac_dir/$ac_word" || continue
2262 ac_cv_prog_ETAGS="$ac_prog"
2263 echo "$as_me:2263: found $ac_dir/$ac_word" >&5
2264 break
2265 done
2266
2267 fi
2268 fi
2269 ETAGS=$ac_cv_prog_ETAGS
2270 if test -n "$ETAGS"; then
2271   echo "$as_me:2271: result: $ETAGS" >&5
2272 echo "${ECHO_T}$ETAGS" >&6
2273 else
2274   echo "$as_me:2274: result: no" >&5
2275 echo "${ECHO_T}no" >&6
2276 fi
2277
2278   test -n "$ETAGS" && break
2279 done
2280
2281 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2282 set dummy ${CTAGS:-ctags}; ac_word=$2
2283 echo "$as_me:2283: checking for $ac_word" >&5
2284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2285 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2286   echo $ECHO_N "(cached) $ECHO_C" >&6
2287 else
2288   if test -n "$MAKE_LOWER_TAGS"; then
2289   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2290 else
2291   ac_save_IFS=$IFS; IFS=$ac_path_separator
2292 ac_dummy="$PATH"
2293 for ac_dir in $ac_dummy; do
2294   IFS=$ac_save_IFS
2295   test -z "$ac_dir" && ac_dir=.
2296   $as_executable_p "$ac_dir/$ac_word" || continue
2297 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2298 echo "$as_me:2298: found $ac_dir/$ac_word" >&5
2299 break
2300 done
2301
2302   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2303 fi
2304 fi
2305 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2306 if test -n "$MAKE_LOWER_TAGS"; then
2307   echo "$as_me:2307: result: $MAKE_LOWER_TAGS" >&5
2308 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2309 else
2310   echo "$as_me:2310: result: no" >&5
2311 echo "${ECHO_T}no" >&6
2312 fi
2313
2314 if test "$cf_cv_mixedcase" = yes ; then
2315         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2316 set dummy ${ETAGS:-etags}; ac_word=$2
2317 echo "$as_me:2317: checking for $ac_word" >&5
2318 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2319 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322   if test -n "$MAKE_UPPER_TAGS"; then
2323   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2324 else
2325   ac_save_IFS=$IFS; IFS=$ac_path_separator
2326 ac_dummy="$PATH"
2327 for ac_dir in $ac_dummy; do
2328   IFS=$ac_save_IFS
2329   test -z "$ac_dir" && ac_dir=.
2330   $as_executable_p "$ac_dir/$ac_word" || continue
2331 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2332 echo "$as_me:2332: found $ac_dir/$ac_word" >&5
2333 break
2334 done
2335
2336   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2337 fi
2338 fi
2339 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2340 if test -n "$MAKE_UPPER_TAGS"; then
2341   echo "$as_me:2341: result: $MAKE_UPPER_TAGS" >&5
2342 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2343 else
2344   echo "$as_me:2344: result: no" >&5
2345 echo "${ECHO_T}no" >&6
2346 fi
2347
2348 else
2349         MAKE_UPPER_TAGS=no
2350 fi
2351
2352 if test "$MAKE_UPPER_TAGS" = yes ; then
2353         MAKE_UPPER_TAGS=
2354 else
2355         MAKE_UPPER_TAGS="#"
2356 fi
2357
2358 if test "$MAKE_LOWER_TAGS" = yes ; then
2359         MAKE_LOWER_TAGS=
2360 else
2361         MAKE_LOWER_TAGS="#"
2362 fi
2363
2364 echo "$as_me:2364: checking if -lm needed for math functions" >&5
2365 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2366 if test "${cf_cv_need_libm+set}" = set; then
2367   echo $ECHO_N "(cached) $ECHO_C" >&6
2368 else
2369
2370         cat >conftest.$ac_ext <<_ACEOF
2371 #line 2371 "configure"
2372 #include "confdefs.h"
2373
2374         #include <stdio.h>
2375         #include <math.h>
2376
2377 int
2378 main ()
2379 {
2380 double x = rand(); printf("result = %g\n", sin(x))
2381   ;
2382   return 0;
2383 }
2384 _ACEOF
2385 rm -f conftest.$ac_objext conftest$ac_exeext
2386 if { (eval echo "$as_me:2386: \"$ac_link\"") >&5
2387   (eval $ac_link) 2>&5
2388   ac_status=$?
2389   echo "$as_me:2389: \$? = $ac_status" >&5
2390   (exit $ac_status); } &&
2391          { ac_try='test -s conftest$ac_exeext'
2392   { (eval echo "$as_me:2392: \"$ac_try\"") >&5
2393   (eval $ac_try) 2>&5
2394   ac_status=$?
2395   echo "$as_me:2395: \$? = $ac_status" >&5
2396   (exit $ac_status); }; }; then
2397   cf_cv_need_libm=no
2398 else
2399   echo "$as_me: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2401 cf_cv_need_libm=yes
2402 fi
2403 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2404 fi
2405 echo "$as_me:2405: result: $cf_cv_need_libm" >&5
2406 echo "${ECHO_T}$cf_cv_need_libm" >&6
2407 if test "$cf_cv_need_libm" = yes
2408 then
2409 MATH_LIB=-lm
2410 fi
2411
2412 CC_G_OPT="-g"
2413 CC_SHARED_OPTS=unknown
2414 CPPFLAGS="$CPPFLAGS"
2415 DFT_DEP_SUFFIX=""
2416 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2417 DFT_UPR_MODEL="NORMAL"
2418 LD="ld"
2419 LDFLAGS_SHARED=""
2420 LDFLAGS_STATIC=""
2421 LD_MODEL=""
2422 LD_SHARED_OPTS=""
2423 LIBTOOL=""
2424 LIB_CLEAN=""
2425 LIB_COMPILE=""
2426 LIB_LINK='${CC}'
2427 LINK_TESTS=""
2428 LOCAL_LDFLAGS=""
2429 PTHREAD="-lm"
2430 TEST_ARGS=""
2431 TEST_DEPS=""
2432 TEST_LIBS=""
2433 TINFO_ARGS='$(LIBS_CURSES)'
2434 cf_cv_abi_version=""
2435 cf_cv_rel_version=""
2436
2437 cf_cv_screen=curses
2438 cf_cv_libtype=
2439
2440 echo "$as_me:2440: checking for ${CC:-cc} option to accept ANSI C" >&5
2441 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2442 if test "${cf_cv_ansi_cc+set}" = set; then
2443   echo $ECHO_N "(cached) $ECHO_C" >&6
2444 else
2445
2446 cf_cv_ansi_cc=no
2447 cf_save_CFLAGS="$CFLAGS"
2448 cf_save_CPPFLAGS="$CPPFLAGS"
2449 # Don't try gcc -ansi; that turns off useful extensions and
2450 # breaks some systems' header files.
2451 # AIX                   -qlanglvl=ansi
2452 # Ultrix and OSF/1      -std1
2453 # HP-UX                 -Aa -D_HPUX_SOURCE
2454 # SVR4                  -Xc
2455 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2456 for cf_arg in "-DCC_HAS_PROTOS" \
2457         "" \
2458         -qlanglvl=ansi \
2459         -std1 \
2460         -Ae \
2461         "-Aa -D_HPUX_SOURCE" \
2462         -Xc
2463 do
2464
2465 cf_fix_cppflags=no
2466 cf_new_cflags=
2467 cf_new_cppflags=
2468 cf_new_extra_cppflags=
2469
2470 for cf_add_cflags in $cf_arg
2471 do
2472 case $cf_fix_cppflags in
2473 no)
2474         case $cf_add_cflags in #(vi
2475         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2476                 case $cf_add_cflags in
2477                 -D*)
2478                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2479
2480                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2481                                 && test -z "${cf_tst_cflags}" \
2482                                 && cf_fix_cppflags=yes
2483
2484                         if test $cf_fix_cppflags = yes ; then
2485                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2486                                 continue
2487                         elif test "${cf_tst_cflags}" = "\"'" ; then
2488                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2489                                 continue
2490                         fi
2491                         ;;
2492                 esac
2493                 case "$CPPFLAGS" in
2494                 *$cf_add_cflags) #(vi
2495                         ;;
2496                 *) #(vi
2497                         case $cf_add_cflags in #(vi
2498                         -D*)
2499                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2500
2501 CPPFLAGS=`echo "$CPPFLAGS" | \
2502         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2503                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2504
2505                                 ;;
2506                         esac
2507                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2508                         ;;
2509                 esac
2510                 ;;
2511         *)
2512                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2513                 ;;
2514         esac
2515         ;;
2516 yes)
2517         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2518
2519         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2520
2521         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2522                 && test -z "${cf_tst_cflags}" \
2523                 && cf_fix_cppflags=no
2524         ;;
2525 esac
2526 done
2527
2528 if test -n "$cf_new_cflags" ; then
2529
2530         CFLAGS="$CFLAGS $cf_new_cflags"
2531 fi
2532
2533 if test -n "$cf_new_cppflags" ; then
2534
2535         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2536 fi
2537
2538 if test -n "$cf_new_extra_cppflags" ; then
2539
2540         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2541 fi
2542
2543         cat >conftest.$ac_ext <<_ACEOF
2544 #line 2544 "configure"
2545 #include "confdefs.h"
2546
2547 #ifndef CC_HAS_PROTOS
2548 #if !defined(__STDC__) || (__STDC__ != 1)
2549 choke me
2550 #endif
2551 #endif
2552
2553 int
2554 main ()
2555 {
2556
2557         int test (int i, double x);
2558         struct s1 {int (*f) (int a);};
2559         struct s2 {int (*f) (double a);};
2560   ;
2561   return 0;
2562 }
2563 _ACEOF
2564 rm -f conftest.$ac_objext
2565 if { (eval echo "$as_me:2565: \"$ac_compile\"") >&5
2566   (eval $ac_compile) 2>&5
2567   ac_status=$?
2568   echo "$as_me:2568: \$? = $ac_status" >&5
2569   (exit $ac_status); } &&
2570          { ac_try='test -s conftest.$ac_objext'
2571   { (eval echo "$as_me:2571: \"$ac_try\"") >&5
2572   (eval $ac_try) 2>&5
2573   ac_status=$?
2574   echo "$as_me:2574: \$? = $ac_status" >&5
2575   (exit $ac_status); }; }; then
2576   cf_cv_ansi_cc="$cf_arg"; break
2577 else
2578   echo "$as_me: failed program was:" >&5
2579 cat conftest.$ac_ext >&5
2580 fi
2581 rm -f conftest.$ac_objext conftest.$ac_ext
2582 done
2583 CFLAGS="$cf_save_CFLAGS"
2584 CPPFLAGS="$cf_save_CPPFLAGS"
2585
2586 fi
2587 echo "$as_me:2587: result: $cf_cv_ansi_cc" >&5
2588 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2589
2590 if test "$cf_cv_ansi_cc" != "no"; then
2591 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2592
2593 cf_fix_cppflags=no
2594 cf_new_cflags=
2595 cf_new_cppflags=
2596 cf_new_extra_cppflags=
2597
2598 for cf_add_cflags in $cf_cv_ansi_cc
2599 do
2600 case $cf_fix_cppflags in
2601 no)
2602         case $cf_add_cflags in #(vi
2603         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2604                 case $cf_add_cflags in
2605                 -D*)
2606                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2607
2608                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2609                                 && test -z "${cf_tst_cflags}" \
2610                                 && cf_fix_cppflags=yes
2611
2612                         if test $cf_fix_cppflags = yes ; then
2613                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2614                                 continue
2615                         elif test "${cf_tst_cflags}" = "\"'" ; then
2616                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2617                                 continue
2618                         fi
2619                         ;;
2620                 esac
2621                 case "$CPPFLAGS" in
2622                 *$cf_add_cflags) #(vi
2623                         ;;
2624                 *) #(vi
2625                         case $cf_add_cflags in #(vi
2626                         -D*)
2627                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2628
2629 CPPFLAGS=`echo "$CPPFLAGS" | \
2630         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2631                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2632
2633                                 ;;
2634                         esac
2635                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2636                         ;;
2637                 esac
2638                 ;;
2639         *)
2640                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2641                 ;;
2642         esac
2643         ;;
2644 yes)
2645         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2646
2647         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2648
2649         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2650                 && test -z "${cf_tst_cflags}" \
2651                 && cf_fix_cppflags=no
2652         ;;
2653 esac
2654 done
2655
2656 if test -n "$cf_new_cflags" ; then
2657
2658         CFLAGS="$CFLAGS $cf_new_cflags"
2659 fi
2660
2661 if test -n "$cf_new_cppflags" ; then
2662
2663         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2664 fi
2665
2666 if test -n "$cf_new_extra_cppflags" ; then
2667
2668         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2669 fi
2670
2671 else
2672         cat >>confdefs.h <<\EOF
2673 #define CC_HAS_PROTOS 1
2674 EOF
2675
2676 fi
2677 fi
2678
2679 if test "$cf_cv_ansi_cc" = "no"; then
2680         { { echo "$as_me:2680: error: Your compiler does not appear to recognize prototypes.
2681 You have the following choices:
2682         a. adjust your compiler options
2683         b. get an up-to-date compiler
2684         c. use a wrapper such as unproto" >&5
2685 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2686 You have the following choices:
2687         a. adjust your compiler options
2688         b. get an up-to-date compiler
2689         c. use a wrapper such as unproto" >&2;}
2690    { (exit 1); exit 1; }; }
2691 fi
2692
2693 if test "$GCC" = yes
2694 then
2695 cat > conftest.i <<EOF
2696 #ifndef GCC_PRINTF
2697 #define GCC_PRINTF 0
2698 #endif
2699 #ifndef GCC_SCANF
2700 #define GCC_SCANF 0
2701 #endif
2702 #ifndef GCC_NORETURN
2703 #define GCC_NORETURN /* nothing */
2704 #endif
2705 #ifndef GCC_UNUSED
2706 #define GCC_UNUSED /* nothing */
2707 #endif
2708 EOF
2709 if test "$GCC" = yes
2710 then
2711         { echo "$as_me:2711: checking for $CC __attribute__ directives..." >&5
2712 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2713 cat > conftest.$ac_ext <<EOF
2714 #line 2714 "${as_me:-configure}"
2715 #include "confdefs.h"
2716 #include "conftest.h"
2717 #include "conftest.i"
2718 #if     GCC_PRINTF
2719 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2720 #else
2721 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2722 #endif
2723 #if     GCC_SCANF
2724 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2725 #else
2726 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2727 #endif
2728 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2729 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2730 extern void foo(void) GCC_NORETURN;
2731 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2732 EOF
2733         cf_printf_attribute=no
2734         cf_scanf_attribute=no
2735         for cf_attribute in scanf printf unused noreturn
2736         do
2737
2738 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2739
2740                 cf_directive="__attribute__(($cf_attribute))"
2741                 echo "checking for $CC $cf_directive" 1>&5
2742
2743                 case $cf_attribute in #(vi
2744                 printf) #(vi
2745                         cf_printf_attribute=yes
2746                         cat >conftest.h <<EOF
2747 #define GCC_$cf_ATTRIBUTE 1
2748 EOF
2749                         ;;
2750                 scanf) #(vi
2751                         cf_scanf_attribute=yes
2752                         cat >conftest.h <<EOF
2753 #define GCC_$cf_ATTRIBUTE 1
2754 EOF
2755                         ;;
2756                 *) #(vi
2757                         cat >conftest.h <<EOF
2758 #define GCC_$cf_ATTRIBUTE $cf_directive
2759 EOF
2760                         ;;
2761                 esac
2762
2763                 if { (eval echo "$as_me:2763: \"$ac_compile\"") >&5
2764   (eval $ac_compile) 2>&5
2765   ac_status=$?
2766   echo "$as_me:2766: \$? = $ac_status" >&5
2767   (exit $ac_status); }; then
2768                         test -n "$verbose" && echo "$as_me:2768: result: ... $cf_attribute" >&5
2769 echo "${ECHO_T}... $cf_attribute" >&6
2770                         cat conftest.h >>confdefs.h
2771                         case $cf_attribute in #(vi
2772                         printf) #(vi
2773                                 if test "$cf_printf_attribute" = no ; then
2774                                         cat >>confdefs.h <<EOF
2775 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2776 EOF
2777                                 else
2778                                         cat >>confdefs.h <<EOF
2779 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2780 EOF
2781                                 fi
2782                                 ;;
2783                         scanf) #(vi
2784                                 if test "$cf_scanf_attribute" = no ; then
2785                                         cat >>confdefs.h <<EOF
2786 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2787 EOF
2788                                 else
2789                                         cat >>confdefs.h <<EOF
2790 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2791 EOF
2792                                 fi
2793                                 ;;
2794                         esac
2795                 fi
2796         done
2797 else
2798         fgrep define conftest.i >>confdefs.h
2799 fi
2800 rm -rf conftest*
2801 fi
2802
2803 cf_XOPEN_SOURCE=500
2804 cf_POSIX_C_SOURCE=199506L
2805 cf_xopen_source=
2806
2807 case $host_os in #(vi
2808 aix[456]*) #(vi
2809         cf_xopen_source="-D_ALL_SOURCE"
2810         ;;
2811 cygwin) #(vi
2812         cf_XOPEN_SOURCE=600
2813         ;;
2814 darwin[0-8].*) #(vi
2815         cf_xopen_source="-D_APPLE_C_SOURCE"
2816         ;;
2817 darwin*) #(vi
2818         cf_xopen_source="-D_DARWIN_C_SOURCE"
2819         ;;
2820 freebsd*|dragonfly*) #(vi
2821         # 5.x headers associate
2822         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2823         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2824         cf_POSIX_C_SOURCE=200112L
2825         cf_XOPEN_SOURCE=600
2826         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2827         ;;
2828 hpux11*) #(vi
2829         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2830         ;;
2831 hpux*) #(vi
2832         cf_xopen_source="-D_HPUX_SOURCE"
2833         ;;
2834 irix[56].*) #(vi
2835         cf_xopen_source="-D_SGI_SOURCE"
2836         ;;
2837 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2838
2839 echo "$as_me:2839: checking if we must define _GNU_SOURCE" >&5
2840 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2841 if test "${cf_cv_gnu_source+set}" = set; then
2842   echo $ECHO_N "(cached) $ECHO_C" >&6
2843 else
2844
2845 cat >conftest.$ac_ext <<_ACEOF
2846 #line 2846 "configure"
2847 #include "confdefs.h"
2848 #include <sys/types.h>
2849 int
2850 main ()
2851 {
2852
2853 #ifndef _XOPEN_SOURCE
2854 make an error
2855 #endif
2856   ;
2857   return 0;
2858 }
2859 _ACEOF
2860 rm -f conftest.$ac_objext
2861 if { (eval echo "$as_me:2861: \"$ac_compile\"") >&5
2862   (eval $ac_compile) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); } &&
2866          { ac_try='test -s conftest.$ac_objext'
2867   { (eval echo "$as_me:2867: \"$ac_try\"") >&5
2868   (eval $ac_try) 2>&5
2869   ac_status=$?
2870   echo "$as_me:2870: \$? = $ac_status" >&5
2871   (exit $ac_status); }; }; then
2872   cf_cv_gnu_source=no
2873 else
2874   echo "$as_me: failed program was:" >&5
2875 cat conftest.$ac_ext >&5
2876 cf_save="$CPPFLAGS"
2877          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2878          cat >conftest.$ac_ext <<_ACEOF
2879 #line 2879 "configure"
2880 #include "confdefs.h"
2881 #include <sys/types.h>
2882 int
2883 main ()
2884 {
2885
2886 #ifdef _XOPEN_SOURCE
2887 make an error
2888 #endif
2889   ;
2890   return 0;
2891 }
2892 _ACEOF
2893 rm -f conftest.$ac_objext
2894 if { (eval echo "$as_me:2894: \"$ac_compile\"") >&5
2895   (eval $ac_compile) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); } &&
2899          { ac_try='test -s conftest.$ac_objext'
2900   { (eval echo "$as_me:2900: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); }; }; then
2905   cf_cv_gnu_source=no
2906 else
2907   echo "$as_me: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 cf_cv_gnu_source=yes
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912         CPPFLAGS="$cf_save"
2913
2914 fi
2915 rm -f conftest.$ac_objext conftest.$ac_ext
2916
2917 fi
2918 echo "$as_me:2918: result: $cf_cv_gnu_source" >&5
2919 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2920 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2921
2922         ;;
2923 mirbsd*) #(vi
2924         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2925         ;;
2926 netbsd*) #(vi
2927         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2928         ;;
2929 openbsd*) #(vi
2930         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2931         ;;
2932 osf[45]*) #(vi
2933         cf_xopen_source="-D_OSF_SOURCE"
2934         ;;
2935 nto-qnx*) #(vi
2936         cf_xopen_source="-D_QNX_SOURCE"
2937         ;;
2938 sco*) #(vi
2939         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2940         ;;
2941 solaris2.1[0-9]) #(vi
2942         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2943         ;;
2944 solaris2.[1-9]) #(vi
2945         cf_xopen_source="-D__EXTENSIONS__"
2946         ;;
2947 *)
2948         echo "$as_me:2948: checking if we should define _XOPEN_SOURCE" >&5
2949 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2950 if test "${cf_cv_xopen_source+set}" = set; then
2951   echo $ECHO_N "(cached) $ECHO_C" >&6
2952 else
2953
2954         cat >conftest.$ac_ext <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <sys/types.h>
2958 int
2959 main ()
2960 {
2961
2962 #ifndef _XOPEN_SOURCE
2963 make an error
2964 #endif
2965   ;
2966   return 0;
2967 }
2968 _ACEOF
2969 rm -f conftest.$ac_objext
2970 if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5
2971   (eval $ac_compile) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); } &&
2975          { ac_try='test -s conftest.$ac_objext'
2976   { (eval echo "$as_me:2976: \"$ac_try\"") >&5
2977   (eval $ac_try) 2>&5
2978   ac_status=$?
2979   echo "$as_me:2979: \$? = $ac_status" >&5
2980   (exit $ac_status); }; }; then
2981   cf_cv_xopen_source=no
2982 else
2983   echo "$as_me: failed program was:" >&5
2984 cat conftest.$ac_ext >&5
2985 cf_save="$CPPFLAGS"
2986          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2987          cat >conftest.$ac_ext <<_ACEOF
2988 #line 2988 "configure"
2989 #include "confdefs.h"
2990 #include <sys/types.h>
2991 int
2992 main ()
2993 {
2994
2995 #ifdef _XOPEN_SOURCE
2996 make an error
2997 #endif
2998   ;
2999   return 0;
3000 }
3001 _ACEOF
3002 rm -f conftest.$ac_objext
3003 if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5
3004   (eval $ac_compile) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); } &&
3008          { ac_try='test -s conftest.$ac_objext'
3009   { (eval echo "$as_me:3009: \"$ac_try\"") >&5
3010   (eval $ac_try) 2>&5
3011   ac_status=$?
3012   echo "$as_me:3012: \$? = $ac_status" >&5
3013   (exit $ac_status); }; }; then
3014   cf_cv_xopen_source=no
3015 else
3016   echo "$as_me: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3019 fi
3020 rm -f conftest.$ac_objext conftest.$ac_ext
3021         CPPFLAGS="$cf_save"
3022
3023 fi
3024 rm -f conftest.$ac_objext conftest.$ac_ext
3025
3026 fi
3027 echo "$as_me:3027: result: $cf_cv_xopen_source" >&5
3028 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3029         if test "$cf_cv_xopen_source" != no ; then
3030
3031 CFLAGS=`echo "$CFLAGS" | \
3032         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3033                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3034
3035 CPPFLAGS=`echo "$CPPFLAGS" | \
3036         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3037                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3038
3039                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3040
3041 cf_fix_cppflags=no
3042 cf_new_cflags=
3043 cf_new_cppflags=
3044 cf_new_extra_cppflags=
3045
3046 for cf_add_cflags in $cf_temp_xopen_source
3047 do
3048 case $cf_fix_cppflags in
3049 no)
3050         case $cf_add_cflags in #(vi
3051         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3052                 case $cf_add_cflags in
3053                 -D*)
3054                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3055
3056                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3057                                 && test -z "${cf_tst_cflags}" \
3058                                 && cf_fix_cppflags=yes
3059
3060                         if test $cf_fix_cppflags = yes ; then
3061                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3062                                 continue
3063                         elif test "${cf_tst_cflags}" = "\"'" ; then
3064                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3065                                 continue
3066                         fi
3067                         ;;
3068                 esac
3069                 case "$CPPFLAGS" in
3070                 *$cf_add_cflags) #(vi
3071                         ;;
3072                 *) #(vi
3073                         case $cf_add_cflags in #(vi
3074                         -D*)
3075                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3076
3077 CPPFLAGS=`echo "$CPPFLAGS" | \
3078         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3079                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3080
3081                                 ;;
3082                         esac
3083                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3084                         ;;
3085                 esac
3086                 ;;
3087         *)
3088                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3089                 ;;
3090         esac
3091         ;;
3092 yes)
3093         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3094
3095         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3096
3097         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3098                 && test -z "${cf_tst_cflags}" \
3099                 && cf_fix_cppflags=no
3100         ;;
3101 esac
3102 done
3103
3104 if test -n "$cf_new_cflags" ; then
3105
3106         CFLAGS="$CFLAGS $cf_new_cflags"
3107 fi
3108
3109 if test -n "$cf_new_cppflags" ; then
3110
3111         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3112 fi
3113
3114 if test -n "$cf_new_extra_cppflags" ; then
3115
3116         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3117 fi
3118
3119         fi
3120
3121 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3122
3123 cf_save_CFLAGS="$CFLAGS"
3124 cf_save_CPPFLAGS="$CPPFLAGS"
3125
3126 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3127         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3128                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3129
3130 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3131         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3132                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3133
3134 echo "$as_me:3134: checking if we should define _POSIX_C_SOURCE" >&5
3135 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3136 if test "${cf_cv_posix_c_source+set}" = set; then
3137   echo $ECHO_N "(cached) $ECHO_C" >&6
3138 else
3139
3140 echo "${as_me:-configure}:3140: testing if the symbol is already defined go no further ..." 1>&5
3141
3142         cat >conftest.$ac_ext <<_ACEOF
3143 #line 3143 "configure"
3144 #include "confdefs.h"
3145 #include <sys/types.h>
3146 int
3147 main ()
3148 {
3149
3150 #ifndef _POSIX_C_SOURCE
3151 make an error
3152 #endif
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -f conftest.$ac_objext
3158 if { (eval echo "$as_me:3158: \"$ac_compile\"") >&5
3159   (eval $ac_compile) 2>&5
3160   ac_status=$?
3161   echo "$as_me:3161: \$? = $ac_status" >&5
3162   (exit $ac_status); } &&
3163          { ac_try='test -s conftest.$ac_objext'
3164   { (eval echo "$as_me:3164: \"$ac_try\"") >&5
3165   (eval $ac_try) 2>&5
3166   ac_status=$?
3167   echo "$as_me:3167: \$? = $ac_status" >&5
3168   (exit $ac_status); }; }; then
3169   cf_cv_posix_c_source=no
3170 else
3171   echo "$as_me: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3173 cf_want_posix_source=no
3174          case .$cf_POSIX_C_SOURCE in #(vi
3175          .[12]??*) #(vi
3176                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3177                 ;;
3178          .2) #(vi
3179                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3180                 cf_want_posix_source=yes
3181                 ;;
3182          .*)
3183                 cf_want_posix_source=yes
3184                 ;;
3185          esac
3186          if test "$cf_want_posix_source" = yes ; then
3187                 cat >conftest.$ac_ext <<_ACEOF
3188 #line 3188 "configure"
3189 #include "confdefs.h"
3190 #include <sys/types.h>
3191 int
3192 main ()
3193 {
3194
3195 #ifdef _POSIX_SOURCE
3196 make an error
3197 #endif
3198   ;
3199   return 0;
3200 }
3201 _ACEOF
3202 rm -f conftest.$ac_objext
3203 if { (eval echo "$as_me:3203: \"$ac_compile\"") >&5
3204   (eval $ac_compile) 2>&5
3205   ac_status=$?
3206   echo "$as_me:3206: \$? = $ac_status" >&5
3207   (exit $ac_status); } &&
3208          { ac_try='test -s conftest.$ac_objext'
3209   { (eval echo "$as_me:3209: \"$ac_try\"") >&5
3210   (eval $ac_try) 2>&5
3211   ac_status=$?
3212   echo "$as_me:3212: \$? = $ac_status" >&5
3213   (exit $ac_status); }; }; then
3214   :
3215 else
3216   echo "$as_me: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
3218 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3219 fi
3220 rm -f conftest.$ac_objext conftest.$ac_ext
3221          fi
3222
3223 echo "${as_me:-configure}:3223: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3224
3225          CFLAGS="$cf_trim_CFLAGS"
3226          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3227
3228 echo "${as_me:-configure}:3228: testing if the second compile does not leave our definition intact error ..." 1>&5
3229
3230          cat >conftest.$ac_ext <<_ACEOF
3231 #line 3231 "configure"
3232 #include "confdefs.h"
3233 #include <sys/types.h>
3234 int
3235 main ()
3236 {
3237
3238 #ifndef _POSIX_C_SOURCE
3239 make an error
3240 #endif
3241   ;
3242   return 0;
3243 }
3244 _ACEOF
3245 rm -f conftest.$ac_objext
3246 if { (eval echo "$as_me:3246: \"$ac_compile\"") >&5
3247   (eval $ac_compile) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit $ac_status); } &&
3251          { ac_try='test -s conftest.$ac_objext'
3252   { (eval echo "$as_me:3252: \"$ac_try\"") >&5
3253   (eval $ac_try) 2>&5
3254   ac_status=$?
3255   echo "$as_me:3255: \$? = $ac_status" >&5
3256   (exit $ac_status); }; }; then
3257   :
3258 else
3259   echo "$as_me: failed program was:" >&5
3260 cat conftest.$ac_ext >&5
3261 cf_cv_posix_c_source=no
3262 fi
3263 rm -f conftest.$ac_objext conftest.$ac_ext
3264          CFLAGS="$cf_save_CFLAGS"
3265          CPPFLAGS="$cf_save_CPPFLAGS"
3266
3267 fi
3268 rm -f conftest.$ac_objext conftest.$ac_ext
3269
3270 fi
3271 echo "$as_me:3271: result: $cf_cv_posix_c_source" >&5
3272 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3273
3274 if test "$cf_cv_posix_c_source" != no ; then
3275         CFLAGS="$cf_trim_CFLAGS"
3276         CPPFLAGS="$cf_trim_CPPFLAGS"
3277
3278 cf_fix_cppflags=no
3279 cf_new_cflags=
3280 cf_new_cppflags=
3281 cf_new_extra_cppflags=
3282
3283 for cf_add_cflags in $cf_cv_posix_c_source
3284 do
3285 case $cf_fix_cppflags in
3286 no)
3287         case $cf_add_cflags in #(vi
3288         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3289                 case $cf_add_cflags in
3290                 -D*)
3291                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3292
3293                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3294                                 && test -z "${cf_tst_cflags}" \
3295                                 && cf_fix_cppflags=yes
3296
3297                         if test $cf_fix_cppflags = yes ; then
3298                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3299                                 continue
3300                         elif test "${cf_tst_cflags}" = "\"'" ; then
3301                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3302                                 continue
3303                         fi
3304                         ;;
3305                 esac
3306                 case "$CPPFLAGS" in
3307                 *$cf_add_cflags) #(vi
3308                         ;;
3309                 *) #(vi
3310                         case $cf_add_cflags in #(vi
3311                         -D*)
3312                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3313
3314 CPPFLAGS=`echo "$CPPFLAGS" | \
3315         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3316                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3317
3318                                 ;;
3319                         esac
3320                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3321                         ;;
3322                 esac
3323                 ;;
3324         *)
3325                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3326                 ;;
3327         esac
3328         ;;
3329 yes)
3330         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3331
3332         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3333
3334         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3335                 && test -z "${cf_tst_cflags}" \
3336                 && cf_fix_cppflags=no
3337         ;;
3338 esac
3339 done
3340
3341 if test -n "$cf_new_cflags" ; then
3342
3343         CFLAGS="$CFLAGS $cf_new_cflags"
3344 fi
3345
3346 if test -n "$cf_new_cppflags" ; then
3347
3348         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3349 fi
3350
3351 if test -n "$cf_new_extra_cppflags" ; then
3352
3353         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3354 fi
3355
3356 fi
3357
3358         ;;
3359 esac
3360
3361 if test -n "$cf_xopen_source" ; then
3362
3363 cf_fix_cppflags=no
3364 cf_new_cflags=
3365 cf_new_cppflags=
3366 cf_new_extra_cppflags=
3367
3368 for cf_add_cflags in $cf_xopen_source
3369 do
3370 case $cf_fix_cppflags in
3371 no)
3372         case $cf_add_cflags in #(vi
3373         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3374                 case $cf_add_cflags in
3375                 -D*)
3376                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3377
3378                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3379                                 && test -z "${cf_tst_cflags}" \
3380                                 && cf_fix_cppflags=yes
3381
3382                         if test $cf_fix_cppflags = yes ; then
3383                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3384                                 continue
3385                         elif test "${cf_tst_cflags}" = "\"'" ; then
3386                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3387                                 continue
3388                         fi
3389                         ;;
3390                 esac
3391                 case "$CPPFLAGS" in
3392                 *$cf_add_cflags) #(vi
3393                         ;;
3394                 *) #(vi
3395                         case $cf_add_cflags in #(vi
3396                         -D*)
3397                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3398
3399 CPPFLAGS=`echo "$CPPFLAGS" | \
3400         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3401                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3402
3403                                 ;;
3404                         esac
3405                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3406                         ;;
3407                 esac
3408                 ;;
3409         *)
3410                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3411                 ;;
3412         esac
3413         ;;
3414 yes)
3415         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3416
3417         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3418
3419         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3420                 && test -z "${cf_tst_cflags}" \
3421                 && cf_fix_cppflags=no
3422         ;;
3423 esac
3424 done
3425
3426 if test -n "$cf_new_cflags" ; then
3427
3428         CFLAGS="$CFLAGS $cf_new_cflags"
3429 fi
3430
3431 if test -n "$cf_new_cppflags" ; then
3432
3433         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3434 fi
3435
3436 if test -n "$cf_new_extra_cppflags" ; then
3437
3438         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3439 fi
3440
3441 fi
3442
3443 echo "$as_me:3443: checking for $CC option to accept ANSI C" >&5
3444 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3445 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3446   echo $ECHO_N "(cached) $ECHO_C" >&6
3447 else
3448   ac_cv_prog_cc_stdc=no
3449 ac_save_CC=$CC
3450 cat >conftest.$ac_ext <<_ACEOF
3451 #line 3451 "configure"
3452 #include "confdefs.h"
3453 #include <stdarg.h>
3454 #include <stdio.h>
3455 #include <sys/types.h>
3456 #include <sys/stat.h>
3457 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3458 struct buf { int x; };
3459 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3460 static char *e (p, i)
3461      char **p;
3462      int i;
3463 {
3464   return p[i];
3465 }
3466 static char *f (char * (*g) (char **, int), char **p, ...)
3467 {
3468   char *s;
3469   va_list v;
3470   va_start (v,p);
3471   s = g (p, va_arg (v,int));
3472   va_end (v);
3473   return s;
3474 }
3475 int test (int i, double x);
3476 struct s1 {int (*f) (int a);};
3477 struct s2 {int (*f) (double a);};
3478 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3479 int argc;
3480 char **argv;
3481 int
3482 main ()
3483 {
3484 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3485   ;
3486   return 0;
3487 }
3488 _ACEOF
3489 # Don't try gcc -ansi; that turns off useful extensions and
3490 # breaks some systems' header files.
3491 # AIX                   -qlanglvl=ansi
3492 # Ultrix and OSF/1      -std1
3493 # HP-UX 10.20 and later -Ae
3494 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3495 # SVR4                  -Xc -D__EXTENSIONS__
3496 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3497 do
3498   CC="$ac_save_CC $ac_arg"
3499   rm -f conftest.$ac_objext
3500 if { (eval echo "$as_me:3500: \"$ac_compile\"") >&5
3501   (eval $ac_compile) 2>&5
3502   ac_status=$?
3503   echo "$as_me:3503: \$? = $ac_status" >&5
3504   (exit $ac_status); } &&
3505          { ac_try='test -s conftest.$ac_objext'
3506   { (eval echo "$as_me:3506: \"$ac_try\"") >&5
3507   (eval $ac_try) 2>&5
3508   ac_status=$?
3509   echo "$as_me:3509: \$? = $ac_status" >&5
3510   (exit $ac_status); }; }; then
3511   ac_cv_prog_cc_stdc=$ac_arg
3512 break
3513 else
3514   echo "$as_me: failed program was:" >&5
3515 cat conftest.$ac_ext >&5
3516 fi
3517 rm -f conftest.$ac_objext
3518 done
3519 rm -f conftest.$ac_ext conftest.$ac_objext
3520 CC=$ac_save_CC
3521
3522 fi
3523
3524 case "x$ac_cv_prog_cc_stdc" in
3525   x|xno)
3526     echo "$as_me:3526: result: none needed" >&5
3527 echo "${ECHO_T}none needed" >&6 ;;
3528   *)
3529     echo "$as_me:3529: result: $ac_cv_prog_cc_stdc" >&5
3530 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3531     CC="$CC $ac_cv_prog_cc_stdc" ;;
3532 esac
3533
3534 echo "$as_me:3534: checking for an ANSI C-conforming const" >&5
3535 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3536 if test "${ac_cv_c_const+set}" = set; then
3537   echo $ECHO_N "(cached) $ECHO_C" >&6
3538 else
3539   cat >conftest.$ac_ext <<_ACEOF
3540 #line 3540 "configure"
3541 #include "confdefs.h"
3542
3543 int
3544 main ()
3545 {
3546 /* FIXME: Include the comments suggested by Paul. */
3547 #ifndef __cplusplus
3548   /* Ultrix mips cc rejects this.  */
3549   typedef int charset[2];
3550   const charset x;
3551   /* SunOS 4.1.1 cc rejects this.  */
3552   char const *const *ccp;
3553   char **p;
3554   /* NEC SVR4.0.2 mips cc rejects this.  */
3555   struct point {int x, y;};
3556   static struct point const zero = {0,0};
3557   /* AIX XL C 1.02.0.0 rejects this.
3558      It does not let you subtract one const X* pointer from another in
3559      an arm of an if-expression whose if-part is not a constant
3560      expression */
3561   const char *g = "string";
3562   ccp = &g + (g ? g-g : 0);
3563   /* HPUX 7.0 cc rejects these. */
3564   ++ccp;
3565   p = (char**) ccp;
3566   ccp = (char const *const *) p;
3567   { /* SCO 3.2v4 cc rejects this.  */
3568     char *t;
3569     char const *s = 0 ? (char *) 0 : (char const *) 0;
3570
3571     *t++ = 0;
3572   }
3573   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3574     int x[] = {25, 17};
3575     const int *foo = &x[0];
3576     ++foo;
3577   }
3578   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3579     typedef const int *iptr;
3580     iptr p = 0;
3581     ++p;
3582   }
3583   { /* AIX XL C 1.02.0.0 rejects this saying
3584        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3585     struct s { int j; const int *ap[3]; };
3586     struct s *b; b->j = 5;
3587   }
3588   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3589     const int foo = 10;
3590   }
3591 #endif
3592
3593   ;
3594   return 0;
3595 }
3596 _ACEOF
3597 rm -f conftest.$ac_objext
3598 if { (eval echo "$as_me:3598: \"$ac_compile\"") >&5
3599   (eval $ac_compile) 2>&5
3600   ac_status=$?
3601   echo "$as_me:3601: \$? = $ac_status" >&5
3602   (exit $ac_status); } &&
3603          { ac_try='test -s conftest.$ac_objext'
3604   { (eval echo "$as_me:3604: \"$ac_try\"") >&5
3605   (eval $ac_try) 2>&5
3606   ac_status=$?
3607   echo "$as_me:3607: \$? = $ac_status" >&5
3608   (exit $ac_status); }; }; then
3609   ac_cv_c_const=yes
3610 else
3611   echo "$as_me: failed program was:" >&5
3612 cat conftest.$ac_ext >&5
3613 ac_cv_c_const=no
3614 fi
3615 rm -f conftest.$ac_objext conftest.$ac_ext
3616 fi
3617 echo "$as_me:3617: result: $ac_cv_c_const" >&5
3618 echo "${ECHO_T}$ac_cv_c_const" >&6
3619 if test $ac_cv_c_const = no; then
3620
3621 cat >>confdefs.h <<\EOF
3622 #define const
3623 EOF
3624
3625 fi
3626
3627 echo "$as_me:3627: checking for signal global datatype" >&5
3628 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3629 if test "${cf_cv_sig_atomic_t+set}" = set; then
3630   echo $ECHO_N "(cached) $ECHO_C" >&6
3631 else
3632
3633         for cf_type in \
3634                 "volatile sig_atomic_t" \
3635                 "sig_atomic_t" \
3636                 "int"
3637         do
3638         cat >conftest.$ac_ext <<_ACEOF
3639 #line 3639 "configure"
3640 #include "confdefs.h"
3641
3642 #include <sys/types.h>
3643 #include <signal.h>
3644 #include <stdio.h>
3645
3646 extern $cf_type x;
3647 $cf_type x;
3648 static void handler(int sig)
3649 {
3650         x = 5;
3651 }
3652 int
3653 main ()
3654 {
3655 signal(SIGINT, handler);
3656                  x = 1
3657   ;
3658   return 0;
3659 }
3660 _ACEOF
3661 rm -f conftest.$ac_objext
3662 if { (eval echo "$as_me:3662: \"$ac_compile\"") >&5
3663   (eval $ac_compile) 2>&5
3664   ac_status=$?
3665   echo "$as_me:3665: \$? = $ac_status" >&5
3666   (exit $ac_status); } &&
3667          { ac_try='test -s conftest.$ac_objext'
3668   { (eval echo "$as_me:3668: \"$ac_try\"") >&5
3669   (eval $ac_try) 2>&5
3670   ac_status=$?
3671   echo "$as_me:3671: \$? = $ac_status" >&5
3672   (exit $ac_status); }; }; then
3673   cf_cv_sig_atomic_t=$cf_type
3674 else
3675   echo "$as_me: failed program was:" >&5
3676 cat conftest.$ac_ext >&5
3677 cf_cv_sig_atomic_t=no
3678 fi
3679 rm -f conftest.$ac_objext conftest.$ac_ext
3680                 test "$cf_cv_sig_atomic_t" != no && break
3681         done
3682
3683 fi
3684
3685 echo "$as_me:3685: result: $cf_cv_sig_atomic_t" >&5
3686 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3687 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3688 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3689 EOF
3690
3691 echo "$as_me:3691: checking if you want to see long compiling messages" >&5
3692 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3693
3694 # Check whether --enable-echo or --disable-echo was given.
3695 if test "${enable_echo+set}" = set; then
3696   enableval="$enable_echo"
3697   test "$enableval" != no && enableval=yes
3698   if test "$enableval" != "yes" ; then
3699
3700     ECHO_LT='--silent'
3701     ECHO_LD='@echo linking $@;'
3702     RULE_CC='@echo compiling $<'
3703     SHOW_CC='@echo compiling $@'
3704     ECHO_CC='@'
3705
3706   else
3707
3708     ECHO_LT=''
3709     ECHO_LD=''
3710     RULE_CC=''
3711     SHOW_CC=''
3712     ECHO_CC=''
3713
3714   fi
3715 else
3716   enableval=yes
3717
3718     ECHO_LT=''
3719     ECHO_LD=''
3720     RULE_CC=''
3721     SHOW_CC=''
3722     ECHO_CC=''
3723
3724 fi;
3725 echo "$as_me:3725: result: $enableval" >&5
3726 echo "${ECHO_T}$enableval" >&6
3727
3728 GCC_VERSION=none
3729 if test "$GCC" = yes ; then
3730         echo "$as_me:3730: checking version of $CC" >&5
3731 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3732         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3733         test -z "$GCC_VERSION" && GCC_VERSION=unknown
3734         echo "$as_me:3734: result: $GCC_VERSION" >&5
3735 echo "${ECHO_T}$GCC_VERSION" >&6
3736 fi
3737
3738 if ( test "$GCC" = yes || test "$GXX" = yes )
3739 then
3740 echo "$as_me:3740: checking if you want to turn on gcc warnings" >&5
3741 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
3742
3743 # Check whether --enable-warnings or --disable-warnings was given.
3744 if test "${enable_warnings+set}" = set; then
3745   enableval="$enable_warnings"
3746   test "$enableval" != yes && enableval=no
3747   if test "$enableval" != "no" ; then
3748     with_warnings=yes
3749   else
3750     with_warnings=no
3751   fi
3752 else
3753   enableval=no
3754   with_warnings=no
3755
3756 fi;
3757 echo "$as_me:3757: result: $with_warnings" >&5
3758 echo "${ECHO_T}$with_warnings" >&6
3759 if test "$with_warnings" = "yes"
3760 then
3761
3762 if test "$GCC" = yes
3763 then
3764 cat > conftest.i <<EOF
3765 #ifndef GCC_PRINTF
3766 #define GCC_PRINTF 0
3767 #endif
3768 #ifndef GCC_SCANF
3769 #define GCC_SCANF 0
3770 #endif
3771 #ifndef GCC_NORETURN
3772 #define GCC_NORETURN /* nothing */
3773 #endif
3774 #ifndef GCC_UNUSED
3775 #define GCC_UNUSED /* nothing */
3776 #endif
3777 EOF
3778 if test "$GCC" = yes
3779 then
3780         { echo "$as_me:3780: checking for $CC __attribute__ directives..." >&5
3781 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3782 cat > conftest.$ac_ext <<EOF
3783 #line 3783 "${as_me:-configure}"
3784 #include "confdefs.h"
3785 #include "conftest.h"
3786 #include "conftest.i"
3787 #if     GCC_PRINTF
3788 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3789 #else
3790 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3791 #endif
3792 #if     GCC_SCANF
3793 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3794 #else
3795 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
3796 #endif
3797 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3798 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3799 extern void foo(void) GCC_NORETURN;
3800 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3801 EOF
3802         cf_printf_attribute=no
3803         cf_scanf_attribute=no
3804         for cf_attribute in scanf printf unused noreturn
3805         do
3806
3807 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3808
3809                 cf_directive="__attribute__(($cf_attribute))"
3810                 echo "checking for $CC $cf_directive" 1>&5
3811
3812                 case $cf_attribute in #(vi
3813                 printf) #(vi
3814                         cf_printf_attribute=yes
3815                         cat >conftest.h <<EOF
3816 #define GCC_$cf_ATTRIBUTE 1
3817 EOF
3818                         ;;
3819                 scanf) #(vi
3820                         cf_scanf_attribute=yes
3821                         cat >conftest.h <<EOF
3822 #define GCC_$cf_ATTRIBUTE 1
3823 EOF
3824                         ;;
3825                 *) #(vi
3826                         cat >conftest.h <<EOF
3827 #define GCC_$cf_ATTRIBUTE $cf_directive
3828 EOF
3829                         ;;
3830                 esac
3831
3832                 if { (eval echo "$as_me:3832: \"$ac_compile\"") >&5
3833   (eval $ac_compile) 2>&5
3834   ac_status=$?
3835   echo "$as_me:3835: \$? = $ac_status" >&5
3836   (exit $ac_status); }; then
3837                         test -n "$verbose" && echo "$as_me:3837: result: ... $cf_attribute" >&5
3838 echo "${ECHO_T}... $cf_attribute" >&6
3839                         cat conftest.h >>confdefs.h
3840                         case $cf_attribute in #(vi
3841                         printf) #(vi
3842                                 if test "$cf_printf_attribute" = no ; then
3843                                         cat >>confdefs.h <<EOF
3844 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
3845 EOF
3846                                 else
3847                                         cat >>confdefs.h <<EOF
3848 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3849 EOF
3850                                 fi
3851                                 ;;
3852                         scanf) #(vi
3853                                 if test "$cf_scanf_attribute" = no ; then
3854                                         cat >>confdefs.h <<EOF
3855 #define GCC_SCANFLIKE(fmt,var) /* nothing */
3856 EOF
3857                                 else
3858                                         cat >>confdefs.h <<EOF
3859 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3860 EOF
3861                                 fi
3862                                 ;;
3863                         esac
3864                 fi
3865         done
3866 else
3867         fgrep define conftest.i >>confdefs.h
3868 fi
3869 rm -rf conftest*
3870 fi
3871
3872 INTEL_COMPILER=no
3873
3874 if test "$GCC" = yes ; then
3875         case $host_os in
3876         linux*|gnu*)
3877                 echo "$as_me:3877: checking if this is really Intel C compiler" >&5
3878 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
3879                 cf_save_CFLAGS="$CFLAGS"
3880                 CFLAGS="$CFLAGS -no-gcc"
3881                 cat >conftest.$ac_ext <<_ACEOF
3882 #line 3882 "configure"
3883 #include "confdefs.h"
3884
3885 int
3886 main ()
3887 {
3888
3889 #ifdef __INTEL_COMPILER
3890 #else
3891 make an error
3892 #endif
3893
3894   ;
3895   return 0;
3896 }
3897 _ACEOF
3898 rm -f conftest.$ac_objext
3899 if { (eval echo "$as_me:3899: \"$ac_compile\"") >&5
3900   (eval $ac_compile) 2>&5
3901   ac_status=$?
3902   echo "$as_me:3902: \$? = $ac_status" >&5
3903   (exit $ac_status); } &&
3904          { ac_try='test -s conftest.$ac_objext'
3905   { (eval echo "$as_me:3905: \"$ac_try\"") >&5
3906   (eval $ac_try) 2>&5
3907   ac_status=$?
3908   echo "$as_me:3908: \$? = $ac_status" >&5
3909   (exit $ac_status); }; }; then
3910   INTEL_COMPILER=yes
3911 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
3912
3913 else
3914   echo "$as_me: failed program was:" >&5
3915 cat conftest.$ac_ext >&5
3916 fi
3917 rm -f conftest.$ac_objext conftest.$ac_ext
3918                 CFLAGS="$cf_save_CFLAGS"
3919                 echo "$as_me:3919: result: $INTEL_COMPILER" >&5
3920 echo "${ECHO_T}$INTEL_COMPILER" >&6
3921                 ;;
3922         esac
3923 fi
3924
3925 cat > conftest.$ac_ext <<EOF
3926 #line 3926 "${as_me:-configure}"
3927 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
3928 EOF
3929
3930 if test "$INTEL_COMPILER" = yes
3931 then
3932 # The "-wdXXX" options suppress warnings:
3933 # remark #1419: external declaration in primary source file
3934 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
3935 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
3936 # remark #193: zero used for undefined preprocessing identifier
3937 # remark #593: variable "curs_sb_left_arrow" was set but never used
3938 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
3939 # remark #869: parameter "tw" was never referenced
3940 # remark #981: operands are evaluated in unspecified order
3941 # warning #279: controlling expression is constant
3942
3943         { echo "$as_me:3943: checking for $CC warning options..." >&5
3944 echo "$as_me: checking for $CC warning options..." >&6;}
3945         cf_save_CFLAGS="$CFLAGS"
3946         EXTRA_CFLAGS="-Wall"
3947         for cf_opt in \
3948                 wd1419 \
3949                 wd1683 \
3950                 wd1684 \
3951                 wd193 \
3952                 wd593 \
3953                 wd279 \
3954                 wd810 \
3955                 wd869 \
3956                 wd981
3957         do
3958                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
3959                 if { (eval echo "$as_me:3959: \"$ac_compile\"") >&5
3960   (eval $ac_compile) 2>&5
3961   ac_status=$?
3962   echo "$as_me:3962: \$? = $ac_status" >&5
3963   (exit $ac_status); }; then
3964                         test -n "$verbose" && echo "$as_me:3964: result: ... -$cf_opt" >&5
3965 echo "${ECHO_T}... -$cf_opt" >&6
3966                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
3967                 fi
3968         done
3969         CFLAGS="$cf_save_CFLAGS"
3970
3971 elif test "$GCC" = yes
3972 then
3973         { echo "$as_me:3973: checking for $CC warning options..." >&5
3974 echo "$as_me: checking for $CC warning options..." >&6;}
3975         cf_save_CFLAGS="$CFLAGS"
3976         EXTRA_CFLAGS=
3977         cf_warn_CONST=""
3978         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
3979         for cf_opt in W Wall \
3980                 Wbad-function-cast \
3981                 Wcast-align \
3982                 Wcast-qual \
3983                 Winline \
3984                 Wmissing-declarations \
3985                 Wmissing-prototypes \
3986                 Wnested-externs \
3987                 Wpointer-arith \
3988                 Wshadow \
3989                 Wstrict-prototypes \
3990                 Wundef $cf_warn_CONST
3991         do
3992                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
3993                 if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
3994   (eval $ac_compile) 2>&5
3995   ac_status=$?
3996   echo "$as_me:3996: \$? = $ac_status" >&5
3997   (exit $ac_status); }; then
3998                         test -n "$verbose" && echo "$as_me:3998: result: ... -$cf_opt" >&5
3999 echo "${ECHO_T}... -$cf_opt" >&6
4000                         case $cf_opt in #(vi
4001                         Wcast-qual) #(vi
4002                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4003                                 ;;
4004                         Winline) #(vi
4005                                 case $GCC_VERSION in
4006                                 [34].*)
4007                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4008
4009 echo "${as_me:-configure}:4009: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4010
4011                                         continue;;
4012                                 esac
4013                                 ;;
4014                         esac
4015                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4016                 fi
4017         done
4018         CFLAGS="$cf_save_CFLAGS"
4019 fi
4020 rm -rf conftest*
4021
4022 fi
4023 fi
4024
4025 echo "$as_me:4025: checking if you want to use dmalloc for testing" >&5
4026 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4027
4028 # Check whether --with-dmalloc or --without-dmalloc was given.
4029 if test "${with_dmalloc+set}" = set; then
4030   withval="$with_dmalloc"
4031   cat >>confdefs.h <<\EOF
4032 #define USE_DMALLOC 1
4033 EOF
4034
4035         : ${with_cflags:=-g}
4036         : ${with_no_leaks:=yes}
4037          with_dmalloc=yes
4038 else
4039   with_dmalloc=
4040 fi;
4041 echo "$as_me:4041: result: ${with_dmalloc:-no}" >&5
4042 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4043
4044 case .$with_cflags in #(vi
4045 .*-g*)
4046         case .$CFLAGS in #(vi
4047         .*-g*) #(vi
4048                 ;;
4049         *)
4050
4051 cf_fix_cppflags=no
4052 cf_new_cflags=
4053 cf_new_cppflags=
4054 cf_new_extra_cppflags=
4055
4056 for cf_add_cflags in -g
4057 do
4058 case $cf_fix_cppflags in
4059 no)
4060         case $cf_add_cflags in #(vi
4061         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4062                 case $cf_add_cflags in
4063                 -D*)
4064                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4065
4066                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4067                                 && test -z "${cf_tst_cflags}" \
4068                                 && cf_fix_cppflags=yes
4069
4070                         if test $cf_fix_cppflags = yes ; then
4071                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4072                                 continue
4073                         elif test "${cf_tst_cflags}" = "\"'" ; then
4074                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4075                                 continue
4076                         fi
4077                         ;;
4078                 esac
4079                 case "$CPPFLAGS" in
4080                 *$cf_add_cflags) #(vi
4081                         ;;
4082                 *) #(vi
4083                         case $cf_add_cflags in #(vi
4084                         -D*)
4085                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4086
4087 CPPFLAGS=`echo "$CPPFLAGS" | \
4088         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4089                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4090
4091                                 ;;
4092                         esac
4093                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4094                         ;;
4095                 esac
4096                 ;;
4097         *)
4098                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4099                 ;;
4100         esac
4101         ;;
4102 yes)
4103         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4104
4105         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4106
4107         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4108                 && test -z "${cf_tst_cflags}" \
4109                 && cf_fix_cppflags=no
4110         ;;
4111 esac
4112 done
4113
4114 if test -n "$cf_new_cflags" ; then
4115
4116         CFLAGS="$CFLAGS $cf_new_cflags"
4117 fi
4118
4119 if test -n "$cf_new_cppflags" ; then
4120
4121         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4122 fi
4123
4124 if test -n "$cf_new_extra_cppflags" ; then
4125
4126         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4127 fi
4128
4129                 ;;
4130         esac
4131         ;;
4132 esac
4133
4134 if test "$with_dmalloc" = yes ; then
4135         echo "$as_me:4135: checking for dmalloc.h" >&5
4136 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4137 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4138   echo $ECHO_N "(cached) $ECHO_C" >&6
4139 else
4140   cat >conftest.$ac_ext <<_ACEOF
4141 #line 4141 "configure"
4142 #include "confdefs.h"
4143 #include <dmalloc.h>
4144 _ACEOF
4145 if { (eval echo "$as_me:4145: \"$ac_cpp conftest.$ac_ext\"") >&5
4146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4147   ac_status=$?
4148   egrep -v '^ *\+' conftest.er1 >conftest.err
4149   rm -f conftest.er1
4150   cat conftest.err >&5
4151   echo "$as_me:4151: \$? = $ac_status" >&5
4152   (exit $ac_status); } >/dev/null; then
4153   if test -s conftest.err; then
4154     ac_cpp_err=$ac_c_preproc_warn_flag
4155   else
4156     ac_cpp_err=
4157   fi
4158 else
4159   ac_cpp_err=yes
4160 fi
4161 if test -z "$ac_cpp_err"; then
4162   ac_cv_header_dmalloc_h=yes
4163 else
4164   echo "$as_me: failed program was:" >&5
4165   cat conftest.$ac_ext >&5
4166   ac_cv_header_dmalloc_h=no
4167 fi
4168 rm -f conftest.err conftest.$ac_ext
4169 fi
4170 echo "$as_me:4170: result: $ac_cv_header_dmalloc_h" >&5
4171 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4172 if test $ac_cv_header_dmalloc_h = yes; then
4173
4174 echo "$as_me:4174: checking for dmalloc_debug in -ldmalloc" >&5
4175 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4176 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4177   echo $ECHO_N "(cached) $ECHO_C" >&6
4178 else
4179   ac_check_lib_save_LIBS=$LIBS
4180 LIBS="-ldmalloc  $LIBS"
4181 cat >conftest.$ac_ext <<_ACEOF
4182 #line 4182 "configure"
4183 #include "confdefs.h"
4184
4185 /* Override any gcc2 internal prototype to avoid an error.  */
4186 #ifdef __cplusplus
4187 extern "C"
4188 #endif
4189 /* We use char because int might match the return type of a gcc2
4190    builtin and then its argument prototype would still apply.  */
4191 char dmalloc_debug ();
4192 int
4193 main ()
4194 {
4195 dmalloc_debug ();
4196   ;
4197   return 0;
4198 }
4199 _ACEOF
4200 rm -f conftest.$ac_objext conftest$ac_exeext
4201 if { (eval echo "$as_me:4201: \"$ac_link\"") >&5
4202   (eval $ac_link) 2>&5
4203   ac_status=$?
4204   echo "$as_me:4204: \$? = $ac_status" >&5
4205   (exit $ac_status); } &&
4206          { ac_try='test -s conftest$ac_exeext'
4207   { (eval echo "$as_me:4207: \"$ac_try\"") >&5
4208   (eval $ac_try) 2>&5
4209   ac_status=$?
4210   echo "$as_me:4210: \$? = $ac_status" >&5
4211   (exit $ac_status); }; }; then
4212   ac_cv_lib_dmalloc_dmalloc_debug=yes
4213 else
4214   echo "$as_me: failed program was:" >&5
4215 cat conftest.$ac_ext >&5
4216 ac_cv_lib_dmalloc_dmalloc_debug=no
4217 fi
4218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4219 LIBS=$ac_check_lib_save_LIBS
4220 fi
4221 echo "$as_me:4221: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4222 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4223 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4224   cat >>confdefs.h <<EOF
4225 #define HAVE_LIBDMALLOC 1
4226 EOF
4227
4228   LIBS="-ldmalloc $LIBS"
4229
4230 fi
4231
4232 fi
4233
4234 fi
4235
4236 echo "$as_me:4236: checking if you want to use dbmalloc for testing" >&5
4237 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4238
4239 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4240 if test "${with_dbmalloc+set}" = set; then
4241   withval="$with_dbmalloc"
4242   cat >>confdefs.h <<\EOF
4243 #define USE_DBMALLOC 1
4244 EOF
4245
4246         : ${with_cflags:=-g}
4247         : ${with_no_leaks:=yes}
4248          with_dbmalloc=yes
4249 else
4250   with_dbmalloc=
4251 fi;
4252 echo "$as_me:4252: result: ${with_dbmalloc:-no}" >&5
4253 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4254
4255 case .$with_cflags in #(vi
4256 .*-g*)
4257         case .$CFLAGS in #(vi
4258         .*-g*) #(vi
4259                 ;;
4260         *)
4261
4262 cf_fix_cppflags=no
4263 cf_new_cflags=
4264 cf_new_cppflags=
4265 cf_new_extra_cppflags=
4266
4267 for cf_add_cflags in -g
4268 do
4269 case $cf_fix_cppflags in
4270 no)
4271         case $cf_add_cflags in #(vi
4272         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4273                 case $cf_add_cflags in
4274                 -D*)
4275                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4276
4277                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4278                                 && test -z "${cf_tst_cflags}" \
4279                                 && cf_fix_cppflags=yes
4280
4281                         if test $cf_fix_cppflags = yes ; then
4282                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4283                                 continue
4284                         elif test "${cf_tst_cflags}" = "\"'" ; then
4285                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4286                                 continue
4287                         fi
4288                         ;;
4289                 esac
4290                 case "$CPPFLAGS" in
4291                 *$cf_add_cflags) #(vi
4292                         ;;
4293                 *) #(vi
4294                         case $cf_add_cflags in #(vi
4295                         -D*)
4296                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4297
4298 CPPFLAGS=`echo "$CPPFLAGS" | \
4299         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4300                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4301
4302                                 ;;
4303                         esac
4304                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4305                         ;;
4306                 esac
4307                 ;;
4308         *)
4309                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4310                 ;;
4311         esac
4312         ;;
4313 yes)
4314         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4315
4316         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4317
4318         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4319                 && test -z "${cf_tst_cflags}" \
4320                 && cf_fix_cppflags=no
4321         ;;
4322 esac
4323 done
4324
4325 if test -n "$cf_new_cflags" ; then
4326
4327         CFLAGS="$CFLAGS $cf_new_cflags"
4328 fi
4329
4330 if test -n "$cf_new_cppflags" ; then
4331
4332         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4333 fi
4334
4335 if test -n "$cf_new_extra_cppflags" ; then
4336
4337         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4338 fi
4339
4340                 ;;
4341         esac
4342         ;;
4343 esac
4344
4345 if test "$with_dbmalloc" = yes ; then
4346         echo "$as_me:4346: checking for dbmalloc.h" >&5
4347 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4348 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4349   echo $ECHO_N "(cached) $ECHO_C" >&6
4350 else
4351   cat >conftest.$ac_ext <<_ACEOF
4352 #line 4352 "configure"
4353 #include "confdefs.h"
4354 #include <dbmalloc.h>
4355 _ACEOF
4356 if { (eval echo "$as_me:4356: \"$ac_cpp conftest.$ac_ext\"") >&5
4357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4358   ac_status=$?
4359   egrep -v '^ *\+' conftest.er1 >conftest.err
4360   rm -f conftest.er1
4361   cat conftest.err >&5
4362   echo "$as_me:4362: \$? = $ac_status" >&5
4363   (exit $ac_status); } >/dev/null; then
4364   if test -s conftest.err; then
4365     ac_cpp_err=$ac_c_preproc_warn_flag
4366   else
4367     ac_cpp_err=
4368   fi
4369 else
4370   ac_cpp_err=yes
4371 fi
4372 if test -z "$ac_cpp_err"; then
4373   ac_cv_header_dbmalloc_h=yes
4374 else
4375   echo "$as_me: failed program was:" >&5
4376   cat conftest.$ac_ext >&5
4377   ac_cv_header_dbmalloc_h=no
4378 fi
4379 rm -f conftest.err conftest.$ac_ext
4380 fi
4381 echo "$as_me:4381: result: $ac_cv_header_dbmalloc_h" >&5
4382 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4383 if test $ac_cv_header_dbmalloc_h = yes; then
4384
4385 echo "$as_me:4385: checking for debug_malloc in -ldbmalloc" >&5
4386 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4387 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4388   echo $ECHO_N "(cached) $ECHO_C" >&6
4389 else
4390   ac_check_lib_save_LIBS=$LIBS
4391 LIBS="-ldbmalloc  $LIBS"
4392 cat >conftest.$ac_ext <<_ACEOF
4393 #line 4393 "configure"
4394 #include "confdefs.h"
4395
4396 /* Override any gcc2 internal prototype to avoid an error.  */
4397 #ifdef __cplusplus
4398 extern "C"
4399 #endif
4400 /* We use char because int might match the return type of a gcc2
4401    builtin and then its argument prototype would still apply.  */
4402 char debug_malloc ();
4403 int
4404 main ()
4405 {
4406 debug_malloc ();
4407   ;
4408   return 0;
4409 }
4410 _ACEOF
4411 rm -f conftest.$ac_objext conftest$ac_exeext
4412 if { (eval echo "$as_me:4412: \"$ac_link\"") >&5
4413   (eval $ac_link) 2>&5
4414   ac_status=$?
4415   echo "$as_me:4415: \$? = $ac_status" >&5
4416   (exit $ac_status); } &&
4417          { ac_try='test -s conftest$ac_exeext'
4418   { (eval echo "$as_me:4418: \"$ac_try\"") >&5
4419   (eval $ac_try) 2>&5
4420   ac_status=$?
4421   echo "$as_me:4421: \$? = $ac_status" >&5
4422   (exit $ac_status); }; }; then
4423   ac_cv_lib_dbmalloc_debug_malloc=yes
4424 else
4425   echo "$as_me: failed program was:" >&5
4426 cat conftest.$ac_ext >&5
4427 ac_cv_lib_dbmalloc_debug_malloc=no
4428 fi
4429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4430 LIBS=$ac_check_lib_save_LIBS
4431 fi
4432 echo "$as_me:4432: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4433 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4434 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4435   cat >>confdefs.h <<EOF
4436 #define HAVE_LIBDBMALLOC 1
4437 EOF
4438
4439   LIBS="-ldbmalloc $LIBS"
4440
4441 fi
4442
4443 fi
4444
4445 fi
4446
4447 echo "$as_me:4447: checking if you want to use valgrind for testing" >&5
4448 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
4449
4450 # Check whether --with-valgrind or --without-valgrind was given.
4451 if test "${with_valgrind+set}" = set; then
4452   withval="$with_valgrind"
4453   cat >>confdefs.h <<\EOF
4454 #define USE_VALGRIND 1
4455 EOF
4456
4457         : ${with_cflags:=-g}
4458         : ${with_no_leaks:=yes}
4459          with_valgrind=yes
4460 else
4461   with_valgrind=
4462 fi;
4463 echo "$as_me:4463: result: ${with_valgrind:-no}" >&5
4464 echo "${ECHO_T}${with_valgrind:-no}" >&6
4465
4466 case .$with_cflags in #(vi
4467 .*-g*)
4468         case .$CFLAGS in #(vi
4469         .*-g*) #(vi
4470                 ;;
4471         *)
4472
4473 cf_fix_cppflags=no
4474 cf_new_cflags=
4475 cf_new_cppflags=
4476 cf_new_extra_cppflags=
4477
4478 for cf_add_cflags in -g
4479 do
4480 case $cf_fix_cppflags in
4481 no)
4482         case $cf_add_cflags in #(vi
4483         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4484                 case $cf_add_cflags in
4485                 -D*)
4486                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4487
4488                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4489                                 && test -z "${cf_tst_cflags}" \
4490                                 && cf_fix_cppflags=yes
4491
4492                         if test $cf_fix_cppflags = yes ; then
4493                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4494                                 continue
4495                         elif test "${cf_tst_cflags}" = "\"'" ; then
4496                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4497                                 continue
4498                         fi
4499                         ;;
4500                 esac
4501                 case "$CPPFLAGS" in
4502                 *$cf_add_cflags) #(vi
4503                         ;;
4504                 *) #(vi
4505                         case $cf_add_cflags in #(vi
4506                         -D*)
4507                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4508
4509 CPPFLAGS=`echo "$CPPFLAGS" | \
4510         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4511                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4512
4513                                 ;;
4514                         esac
4515                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4516                         ;;
4517                 esac
4518                 ;;
4519         *)
4520                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4521                 ;;
4522         esac
4523         ;;
4524 yes)
4525         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4526
4527         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4528
4529         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4530                 && test -z "${cf_tst_cflags}" \
4531                 && cf_fix_cppflags=no
4532         ;;
4533 esac
4534 done
4535
4536 if test -n "$cf_new_cflags" ; then
4537
4538         CFLAGS="$CFLAGS $cf_new_cflags"
4539 fi
4540
4541 if test -n "$cf_new_cppflags" ; then
4542
4543         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4544 fi
4545
4546 if test -n "$cf_new_extra_cppflags" ; then
4547
4548         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4549 fi
4550
4551                 ;;
4552         esac
4553         ;;
4554 esac
4555
4556 echo "$as_me:4556: checking if you want to perform memory-leak testing" >&5
4557 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
4558
4559 # Check whether --enable-leaks or --disable-leaks was given.
4560 if test "${enable_leaks+set}" = set; then
4561   enableval="$enable_leaks"
4562   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
4563 else
4564   : ${with_no_leaks:=no}
4565 fi;
4566 echo "$as_me:4566: result: $with_no_leaks" >&5
4567 echo "${ECHO_T}$with_no_leaks" >&6
4568
4569 if test "$with_no_leaks" = yes ; then
4570         cat >>confdefs.h <<\EOF
4571 #define NO_LEAKS 1
4572 EOF
4573
4574         cat >>confdefs.h <<\EOF
4575 #define YY_NO_LEAKS 1
4576 EOF
4577
4578 fi
4579
4580 echo "$as_me:4580: checking if you want to check for wide-character functions" >&5
4581 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4582
4583 # Check whether --enable-widec or --disable-widec was given.
4584 if test "${enable_widec+set}" = set; then
4585   enableval="$enable_widec"
4586   test "$enableval" != no && enableval=yes
4587   if test "$enableval" != "yes" ; then
4588     cf_enable_widec=no
4589   else
4590     cf_enable_widec=yes
4591   fi
4592 else
4593   enableval=yes
4594   cf_enable_widec=yes
4595
4596 fi;
4597 echo "$as_me:4597: result: $cf_enable_widec" >&5
4598 echo "${ECHO_T}$cf_enable_widec" >&6
4599
4600 echo "$as_me:4600: checking for specific curses-directory" >&5
4601 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4602
4603 # Check whether --with-curses-dir or --without-curses-dir was given.
4604 if test "${with_curses_dir+set}" = set; then
4605   withval="$with_curses_dir"
4606   cf_cv_curses_dir=$withval
4607 else
4608   cf_cv_curses_dir=no
4609 fi;
4610 echo "$as_me:4610: result: $cf_cv_curses_dir" >&5
4611 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4612
4613 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4614 then
4615
4616 if test "x$prefix" != xNONE; then
4617   cf_path_syntax="$prefix"
4618 else
4619   cf_path_syntax="$ac_default_prefix"
4620 fi
4621
4622 case ".$withval" in #(vi
4623 .\$\(*\)*|.\'*\'*) #(vi
4624   ;;
4625 ..|./*|.\\*) #(vi
4626   ;;
4627 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4628   ;;
4629 .\${*prefix}*) #(vi
4630   eval withval="$withval"
4631   case ".$withval" in #(vi
4632   .NONE/*)
4633     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4634     ;;
4635   esac
4636   ;; #(vi
4637 .no|.NONE/*)
4638   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4639   ;;
4640 *)
4641   { { echo "$as_me:4641: error: expected a pathname, not \"$withval\"" >&5
4642 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4643    { (exit 1); exit 1; }; }
4644   ;;
4645 esac
4646
4647         if test -d "$cf_cv_curses_dir"
4648         then
4649
4650 if test -n "$cf_cv_curses_dir/include" ; then
4651   for cf_add_incdir in $cf_cv_curses_dir/include
4652   do
4653         while test $cf_add_incdir != /usr/include
4654         do
4655           if test -d $cf_add_incdir
4656           then
4657                 cf_have_incdir=no
4658                 if test -n "$CFLAGS$CPPFLAGS" ; then
4659                   # a loop is needed to ensure we can add subdirs of existing dirs
4660                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4661                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4662                           cf_have_incdir=yes; break
4663                         fi
4664                   done
4665                 fi
4666
4667                 if test "$cf_have_incdir" = no ; then
4668                   if test "$cf_add_incdir" = /usr/local/include ; then
4669                         if test "$GCC" = yes
4670                         then
4671                           cf_save_CPPFLAGS=$CPPFLAGS
4672                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4673                           cat >conftest.$ac_ext <<_ACEOF
4674 #line 4674 "configure"
4675 #include "confdefs.h"
4676 #include <stdio.h>
4677 int
4678 main ()
4679 {
4680 printf("Hello")
4681   ;
4682   return 0;
4683 }
4684 _ACEOF
4685 rm -f conftest.$ac_objext
4686 if { (eval echo "$as_me:4686: \"$ac_compile\"") >&5
4687   (eval $ac_compile) 2>&5
4688   ac_status=$?
4689   echo "$as_me:4689: \$? = $ac_status" >&5
4690   (exit $ac_status); } &&
4691          { ac_try='test -s conftest.$ac_objext'
4692   { (eval echo "$as_me:4692: \"$ac_try\"") >&5
4693   (eval $ac_try) 2>&5
4694   ac_status=$?
4695   echo "$as_me:4695: \$? = $ac_status" >&5
4696   (exit $ac_status); }; }; then
4697   :
4698 else
4699   echo "$as_me: failed program was:" >&5
4700 cat conftest.$ac_ext >&5
4701 cf_have_incdir=yes
4702 fi
4703 rm -f conftest.$ac_objext conftest.$ac_ext
4704                           CPPFLAGS=$cf_save_CPPFLAGS
4705                         fi
4706                   fi
4707                 fi
4708
4709                 if test "$cf_have_incdir" = no ; then
4710                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4711
4712 echo "${as_me:-configure}:4712: testing adding $cf_add_incdir to include-path ..." 1>&5
4713
4714                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4715
4716                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4717                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4718                   cf_add_incdir="$cf_top_incdir"
4719                 else
4720                   break
4721                 fi
4722           fi
4723         done
4724   done
4725 fi
4726
4727 if test -n "$cf_cv_curses_dir/lib" ; then
4728   for cf_add_libdir in $cf_cv_curses_dir/lib
4729   do
4730     if test $cf_add_libdir = /usr/lib ; then
4731       :
4732     elif test -d $cf_add_libdir
4733     then
4734       cf_have_libdir=no
4735       if test -n "$LDFLAGS$LIBS" ; then
4736         # a loop is needed to ensure we can add subdirs of existing dirs
4737         for cf_test_libdir in $LDFLAGS $LIBS ; do
4738           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4739             cf_have_libdir=yes; break
4740           fi
4741         done
4742       fi
4743       if test "$cf_have_libdir" = no ; then
4744         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4745
4746 echo "${as_me:-configure}:4746: testing adding $cf_add_libdir to library-path ..." 1>&5
4747
4748         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4749       fi
4750     fi
4751   done
4752 fi
4753
4754         fi
4755 fi
4756
4757 echo "$as_me:4757: checking for specified curses library type" >&5
4758 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4759
4760 # Check whether --with-ncursesw or --without-ncursesw was given.
4761 if test "${with_ncursesw+set}" = set; then
4762   withval="$with_ncursesw"
4763   cf_cv_screen=ncursesw
4764 else
4765
4766 # Check whether --with-ncurses or --without-ncurses was given.
4767 if test "${with_ncurses+set}" = set; then
4768   withval="$with_ncurses"
4769   cf_cv_screen=ncurses
4770 else
4771
4772 # Check whether --with-pdcurses or --without-pdcurses was given.
4773 if test "${with_pdcurses+set}" = set; then
4774   withval="$with_pdcurses"
4775   cf_cv_screen=pdcurses
4776 else
4777
4778 # Check whether --with-curses-colr or --without-curses-colr was given.
4779 if test "${with_curses_colr+set}" = set; then
4780   withval="$with_curses_colr"
4781   cf_cv_screen=curses_colr
4782 else
4783
4784 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4785 if test "${with_curses_5lib+set}" = set; then
4786   withval="$with_curses_5lib"
4787   cf_cv_screen=curses_5lib
4788 fi;
4789 fi;
4790 fi;
4791 fi;
4792 fi;
4793
4794 echo "$as_me:4794: result: $cf_cv_screen" >&5
4795 echo "${ECHO_T}$cf_cv_screen" >&6
4796
4797 case $cf_cv_screen in
4798 curses|curses_*)
4799
4800 echo "$as_me:4800: checking for extra include directories" >&5
4801 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4802 if test "${cf_cv_curses_incdir+set}" = set; then
4803   echo $ECHO_N "(cached) $ECHO_C" >&6
4804 else
4805
4806 cf_cv_curses_incdir=no
4807 case $host_os in #(vi
4808 hpux10.*) #(vi
4809         if test "x$cf_cv_screen" = "xcurses_colr"
4810         then
4811                 test -d /usr/include/curses_colr && \
4812                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4813         fi
4814         ;;
4815 sunos3*|sunos4*)
4816         if test "x$cf_cv_screen" = "xcurses_5lib"
4817         then
4818                 test -d /usr/5lib && \
4819                 test -d /usr/5include && \
4820                 cf_cv_curses_incdir="-I/usr/5include"
4821         fi
4822         ;;
4823 esac
4824
4825 fi
4826 echo "$as_me:4826: result: $cf_cv_curses_incdir" >&5
4827 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4828 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4829
4830 echo "$as_me:4830: checking if we have identified curses headers" >&5
4831 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4832 if test "${cf_cv_ncurses_header+set}" = set; then
4833   echo $ECHO_N "(cached) $ECHO_C" >&6
4834 else
4835
4836 cf_cv_ncurses_header=none
4837 for cf_header in  \
4838         ncurses.h \
4839         curses.h ncurses/ncurses.h ncurses/curses.h
4840 do
4841 cat >conftest.$ac_ext <<_ACEOF
4842 #line 4842 "configure"
4843 #include "confdefs.h"
4844 #include <${cf_header}>
4845 int
4846 main ()
4847 {
4848 initscr(); tgoto("?", 0,0)
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 rm -f conftest.$ac_objext
4854 if { (eval echo "$as_me:4854: \"$ac_compile\"") >&5
4855   (eval $ac_compile) 2>&5
4856   ac_status=$?
4857   echo "$as_me:4857: \$? = $ac_status" >&5
4858   (exit $ac_status); } &&
4859          { ac_try='test -s conftest.$ac_objext'
4860   { (eval echo "$as_me:4860: \"$ac_try\"") >&5
4861   (eval $ac_try) 2>&5
4862   ac_status=$?
4863   echo "$as_me:4863: \$? = $ac_status" >&5
4864   (exit $ac_status); }; }; then
4865   cf_cv_ncurses_header=$cf_header; break
4866 else
4867   echo "$as_me: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4869 fi
4870 rm -f conftest.$ac_objext conftest.$ac_ext
4871 done
4872
4873 fi
4874 echo "$as_me:4874: result: $cf_cv_ncurses_header" >&5
4875 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4876
4877 if test "$cf_cv_ncurses_header" = none ; then
4878         { { echo "$as_me:4878: error: No curses header-files found" >&5
4879 echo "$as_me: error: No curses header-files found" >&2;}
4880    { (exit 1); exit 1; }; }
4881 fi
4882
4883 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4884
4885 for ac_header in $cf_cv_ncurses_header
4886 do
4887 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4888 echo "$as_me:4888: checking for $ac_header" >&5
4889 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4890 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4891   echo $ECHO_N "(cached) $ECHO_C" >&6
4892 else
4893   cat >conftest.$ac_ext <<_ACEOF
4894 #line 4894 "configure"
4895 #include "confdefs.h"
4896 #include <$ac_header>
4897 _ACEOF
4898 if { (eval echo "$as_me:4898: \"$ac_cpp conftest.$ac_ext\"") >&5
4899   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4900   ac_status=$?
4901   egrep -v '^ *\+' conftest.er1 >conftest.err
4902   rm -f conftest.er1
4903   cat conftest.err >&5
4904   echo "$as_me:4904: \$? = $ac_status" >&5
4905   (exit $ac_status); } >/dev/null; then
4906   if test -s conftest.err; then
4907     ac_cpp_err=$ac_c_preproc_warn_flag
4908   else
4909     ac_cpp_err=
4910   fi
4911 else
4912   ac_cpp_err=yes
4913 fi
4914 if test -z "$ac_cpp_err"; then
4915   eval "$as_ac_Header=yes"
4916 else
4917   echo "$as_me: failed program was:" >&5
4918   cat conftest.$ac_ext >&5
4919   eval "$as_ac_Header=no"
4920 fi
4921 rm -f conftest.err conftest.$ac_ext
4922 fi
4923 echo "$as_me:4923: result: `eval echo '${'$as_ac_Header'}'`" >&5
4924 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4925 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4926   cat >>confdefs.h <<EOF
4927 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4928 EOF
4929
4930 fi
4931 done
4932
4933 echo "$as_me:4933: checking for terminfo header" >&5
4934 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4935 if test "${cf_cv_term_header+set}" = set; then
4936   echo $ECHO_N "(cached) $ECHO_C" >&6
4937 else
4938
4939 case ${cf_cv_ncurses_header} in #(vi
4940 */ncurses.h|*/ncursesw.h) #(vi
4941         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4942         ;;
4943 *)
4944         cf_term_header=term.h
4945         ;;
4946 esac
4947
4948 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4949 do
4950 cat >conftest.$ac_ext <<_ACEOF
4951 #line 4951 "configure"
4952 #include "confdefs.h"
4953 #include <stdio.h>
4954 #include <${cf_cv_ncurses_header:-curses.h}>
4955 #include <$cf_test>
4956
4957 int
4958 main ()
4959 {
4960 int x = auto_left_margin
4961   ;
4962   return 0;
4963 }
4964 _ACEOF
4965 rm -f conftest.$ac_objext
4966 if { (eval echo "$as_me:4966: \"$ac_compile\"") >&5
4967   (eval $ac_compile) 2>&5
4968   ac_status=$?
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); } &&
4971          { ac_try='test -s conftest.$ac_objext'
4972   { (eval echo "$as_me:4972: \"$ac_try\"") >&5
4973   (eval $ac_try) 2>&5
4974   ac_status=$?
4975   echo "$as_me:4975: \$? = $ac_status" >&5
4976   (exit $ac_status); }; }; then
4977
4978         cf_cv_term_header="$cf_test"
4979 else
4980   echo "$as_me: failed program was:" >&5
4981 cat conftest.$ac_ext >&5
4982
4983         cf_cv_term_header=unknown
4984
4985 fi
4986 rm -f conftest.$ac_objext conftest.$ac_ext
4987         test "$cf_cv_term_header" != unknown && break
4988 done
4989
4990 fi
4991 echo "$as_me:4991: result: $cf_cv_term_header" >&5
4992 echo "${ECHO_T}$cf_cv_term_header" >&6
4993
4994 # Set definitions to allow ifdef'ing to accommodate subdirectories
4995
4996 case $cf_cv_term_header in # (vi
4997 *term.h)
4998         cat >>confdefs.h <<\EOF
4999 #define HAVE_TERM_H 1
5000 EOF
5001
5002         ;;
5003 esac
5004
5005 case $cf_cv_term_header in # (vi
5006 ncurses/term.h) #(vi
5007         cat >>confdefs.h <<\EOF
5008 #define HAVE_NCURSES_TERM_H 1
5009 EOF
5010
5011         ;;
5012 ncursesw/term.h)
5013         cat >>confdefs.h <<\EOF
5014 #define HAVE_NCURSESW_TERM_H 1
5015 EOF
5016
5017         ;;
5018 esac
5019
5020 echo "$as_me:5020: checking for ncurses version" >&5
5021 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5022 if test "${cf_cv_ncurses_version+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025
5026         cf_cv_ncurses_version=no
5027         cf_tempfile=out$$
5028         rm -f $cf_tempfile
5029         if test "$cross_compiling" = yes; then
5030
5031         # This will not work if the preprocessor splits the line after the
5032         # Autoconf token.  The 'unproto' program does that.
5033         cat > conftest.$ac_ext <<EOF
5034 #include <${cf_cv_ncurses_header:-curses.h}>
5035 #undef Autoconf
5036 #ifdef NCURSES_VERSION
5037 Autoconf NCURSES_VERSION
5038 #else
5039 #ifdef __NCURSES_H
5040 Autoconf "old"
5041 #endif
5042 ;
5043 #endif
5044 EOF
5045         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5046         { (eval echo "$as_me:5046: \"$cf_try\"") >&5
5047   (eval $cf_try) 2>&5
5048   ac_status=$?
5049   echo "$as_me:5049: \$? = $ac_status" >&5
5050   (exit $ac_status); }
5051         if test -f conftest.out ; then
5052                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5053                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5054                 rm -f conftest.out
5055         fi
5056
5057 else
5058   cat >conftest.$ac_ext <<_ACEOF
5059 #line 5059 "configure"
5060 #include "confdefs.h"
5061
5062 #include <${cf_cv_ncurses_header:-curses.h}>
5063 #include <stdio.h>
5064 int main()
5065 {
5066         FILE *fp = fopen("$cf_tempfile", "w");
5067 #ifdef NCURSES_VERSION
5068 # ifdef NCURSES_VERSION_PATCH
5069         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5070 # else
5071         fprintf(fp, "%s\n", NCURSES_VERSION);
5072 # endif
5073 #else
5074 # ifdef __NCURSES_H
5075         fprintf(fp, "old\n");
5076 # else
5077         make an error
5078 # endif
5079 #endif
5080         ${cf_cv_main_return:-return}(0);
5081 }
5082 _ACEOF
5083 rm -f conftest$ac_exeext
5084 if { (eval echo "$as_me:5084: \"$ac_link\"") >&5
5085   (eval $ac_link) 2>&5
5086   ac_status=$?
5087   echo "$as_me:5087: \$? = $ac_status" >&5
5088   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5089   { (eval echo "$as_me:5089: \"$ac_try\"") >&5
5090   (eval $ac_try) 2>&5
5091   ac_status=$?
5092   echo "$as_me:5092: \$? = $ac_status" >&5
5093   (exit $ac_status); }; }; then
5094
5095         cf_cv_ncurses_version=`cat $cf_tempfile`
5096 else
5097   echo "$as_me: program exited with status $ac_status" >&5
5098 echo "$as_me: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
5100 fi
5101 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5102 fi
5103         rm -f $cf_tempfile
5104
5105 fi
5106 echo "$as_me:5106: result: $cf_cv_ncurses_version" >&5
5107 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5108 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5109 #define NCURSES 1
5110 EOF
5111
5112 echo "$as_me:5112: checking if we have identified curses libraries" >&5
5113 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5114 cat >conftest.$ac_ext <<_ACEOF
5115 #line 5115 "configure"
5116 #include "confdefs.h"
5117 #include <${cf_cv_ncurses_header:-curses.h}>
5118 int
5119 main ()
5120 {
5121 initscr(); tgoto("?", 0,0)
5122   ;
5123   return 0;
5124 }
5125 _ACEOF
5126 rm -f conftest.$ac_objext conftest$ac_exeext
5127 if { (eval echo "$as_me:5127: \"$ac_link\"") >&5
5128   (eval $ac_link) 2>&5
5129   ac_status=$?
5130   echo "$as_me:5130: \$? = $ac_status" >&5
5131   (exit $ac_status); } &&
5132          { ac_try='test -s conftest$ac_exeext'
5133   { (eval echo "$as_me:5133: \"$ac_try\"") >&5
5134   (eval $ac_try) 2>&5
5135   ac_status=$?
5136   echo "$as_me:5136: \$? = $ac_status" >&5
5137   (exit $ac_status); }; }; then
5138   cf_result=yes
5139 else
5140   echo "$as_me: failed program was:" >&5
5141 cat conftest.$ac_ext >&5
5142 cf_result=no
5143 fi
5144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5145 echo "$as_me:5145: result: $cf_result" >&5
5146 echo "${ECHO_T}$cf_result" >&6
5147
5148 if test "$cf_result" = no ; then
5149 case $host_os in #(vi
5150 freebsd*) #(vi
5151     echo "$as_me:5151: checking for tgoto in -lmytinfo" >&5
5152 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5153 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5154   echo $ECHO_N "(cached) $ECHO_C" >&6
5155 else
5156   ac_check_lib_save_LIBS=$LIBS
5157 LIBS="-lmytinfo  $LIBS"
5158 cat >conftest.$ac_ext <<_ACEOF
5159 #line 5159 "configure"
5160 #include "confdefs.h"
5161
5162 /* Override any gcc2 internal prototype to avoid an error.  */
5163 #ifdef __cplusplus
5164 extern "C"
5165 #endif
5166 /* We use char because int might match the return type of a gcc2
5167    builtin and then its argument prototype would still apply.  */
5168 char tgoto ();
5169 int
5170 main ()
5171 {
5172 tgoto ();
5173   ;
5174   return 0;
5175 }
5176 _ACEOF
5177 rm -f conftest.$ac_objext conftest$ac_exeext
5178 if { (eval echo "$as_me:5178: \"$ac_link\"") >&5
5179   (eval $ac_link) 2>&5
5180   ac_status=$?
5181   echo "$as_me:5181: \$? = $ac_status" >&5
5182   (exit $ac_status); } &&
5183          { ac_try='test -s conftest$ac_exeext'
5184   { (eval echo "$as_me:5184: \"$ac_try\"") >&5
5185   (eval $ac_try) 2>&5
5186   ac_status=$?
5187   echo "$as_me:5187: \$? = $ac_status" >&5
5188   (exit $ac_status); }; }; then
5189   ac_cv_lib_mytinfo_tgoto=yes
5190 else
5191   echo "$as_me: failed program was:" >&5
5192 cat conftest.$ac_ext >&5
5193 ac_cv_lib_mytinfo_tgoto=no
5194 fi
5195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5196 LIBS=$ac_check_lib_save_LIBS
5197 fi
5198 echo "$as_me:5198: result: $ac_cv_lib_mytinfo_tgoto" >&5
5199 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5200 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5201   LIBS="-lmytinfo $LIBS"
5202 fi
5203
5204     ;;
5205 hpux10.*) #(vi
5206         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5207         # next (1998), and xcurses "newer" (2000).  There is no header file for
5208         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5209         # term.h) for cur_colr
5210         if test "x$cf_cv_screen" = "xcurses_colr"
5211         then
5212                 echo "$as_me:5212: checking for initscr in -lcur_colr" >&5
5213 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5214 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5215   echo $ECHO_N "(cached) $ECHO_C" >&6
5216 else
5217   ac_check_lib_save_LIBS=$LIBS
5218 LIBS="-lcur_colr  $LIBS"
5219 cat >conftest.$ac_ext <<_ACEOF
5220 #line 5220 "configure"
5221 #include "confdefs.h"
5222
5223 /* Override any gcc2 internal prototype to avoid an error.  */
5224 #ifdef __cplusplus
5225 extern "C"
5226 #endif
5227 /* We use char because int might match the return type of a gcc2
5228    builtin and then its argument prototype would still apply.  */
5229 char initscr ();
5230 int
5231 main ()
5232 {
5233 initscr ();
5234   ;
5235   return 0;
5236 }
5237 _ACEOF
5238 rm -f conftest.$ac_objext conftest$ac_exeext
5239 if { (eval echo "$as_me:5239: \"$ac_link\"") >&5
5240   (eval $ac_link) 2>&5
5241   ac_status=$?
5242   echo "$as_me:5242: \$? = $ac_status" >&5
5243   (exit $ac_status); } &&
5244          { ac_try='test -s conftest$ac_exeext'
5245   { (eval echo "$as_me:5245: \"$ac_try\"") >&5
5246   (eval $ac_try) 2>&5
5247   ac_status=$?
5248   echo "$as_me:5248: \$? = $ac_status" >&5
5249   (exit $ac_status); }; }; then
5250   ac_cv_lib_cur_colr_initscr=yes
5251 else
5252   echo "$as_me: failed program was:" >&5
5253 cat conftest.$ac_ext >&5
5254 ac_cv_lib_cur_colr_initscr=no
5255 fi
5256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5257 LIBS=$ac_check_lib_save_LIBS
5258 fi
5259 echo "$as_me:5259: result: $ac_cv_lib_cur_colr_initscr" >&5
5260 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5261 if test $ac_cv_lib_cur_colr_initscr = yes; then
5262
5263                         LIBS="-lcur_colr $LIBS"
5264                         ac_cv_func_initscr=yes
5265
5266 else
5267
5268                 echo "$as_me:5268: checking for initscr in -lHcurses" >&5
5269 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5270 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5271   echo $ECHO_N "(cached) $ECHO_C" >&6
5272 else
5273   ac_check_lib_save_LIBS=$LIBS
5274 LIBS="-lHcurses  $LIBS"
5275 cat >conftest.$ac_ext <<_ACEOF
5276 #line 5276 "configure"
5277 #include "confdefs.h"
5278
5279 /* Override any gcc2 internal prototype to avoid an error.  */
5280 #ifdef __cplusplus
5281 extern "C"
5282 #endif
5283 /* We use char because int might match the return type of a gcc2
5284    builtin and then its argument prototype would still apply.  */
5285 char initscr ();
5286 int
5287 main ()
5288 {
5289 initscr ();
5290   ;
5291   return 0;
5292 }
5293 _ACEOF
5294 rm -f conftest.$ac_objext conftest$ac_exeext
5295 if { (eval echo "$as_me:5295: \"$ac_link\"") >&5
5296   (eval $ac_link) 2>&5
5297   ac_status=$?
5298   echo "$as_me:5298: \$? = $ac_status" >&5
5299   (exit $ac_status); } &&
5300          { ac_try='test -s conftest$ac_exeext'
5301   { (eval echo "$as_me:5301: \"$ac_try\"") >&5
5302   (eval $ac_try) 2>&5
5303   ac_status=$?
5304   echo "$as_me:5304: \$? = $ac_status" >&5
5305   (exit $ac_status); }; }; then
5306   ac_cv_lib_Hcurses_initscr=yes
5307 else
5308   echo "$as_me: failed program was:" >&5
5309 cat conftest.$ac_ext >&5
5310 ac_cv_lib_Hcurses_initscr=no
5311 fi
5312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5313 LIBS=$ac_check_lib_save_LIBS
5314 fi
5315 echo "$as_me:5315: result: $ac_cv_lib_Hcurses_initscr" >&5
5316 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5317 if test $ac_cv_lib_Hcurses_initscr = yes; then
5318
5319                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5320                         LIBS="-lHcurses $LIBS"
5321                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5322                         ac_cv_func_initscr=yes
5323
5324 fi
5325
5326 fi
5327
5328         fi
5329     ;;
5330 linux*)
5331         case `arch 2>/dev/null` in
5332         x86_64)
5333                 if test -d /lib64
5334                 then
5335
5336 if test -n "/lib64" ; then
5337   for cf_add_libdir in /lib64
5338   do
5339     if test $cf_add_libdir = /usr/lib ; then
5340       :
5341     elif test -d $cf_add_libdir
5342     then
5343       cf_have_libdir=no
5344       if test -n "$LDFLAGS$LIBS" ; then
5345         # a loop is needed to ensure we can add subdirs of existing dirs
5346         for cf_test_libdir in $LDFLAGS $LIBS ; do
5347           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5348             cf_have_libdir=yes; break
5349           fi
5350         done
5351       fi
5352       if test "$cf_have_libdir" = no ; then
5353         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5354
5355 echo "${as_me:-configure}:5355: testing adding $cf_add_libdir to library-path ..." 1>&5
5356
5357         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5358       fi
5359     fi
5360   done
5361 fi
5362
5363                 else
5364
5365 if test -n "/lib" ; then
5366   for cf_add_libdir in /lib
5367   do
5368     if test $cf_add_libdir = /usr/lib ; then
5369       :
5370     elif test -d $cf_add_libdir
5371     then
5372       cf_have_libdir=no
5373       if test -n "$LDFLAGS$LIBS" ; then
5374         # a loop is needed to ensure we can add subdirs of existing dirs
5375         for cf_test_libdir in $LDFLAGS $LIBS ; do
5376           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5377             cf_have_libdir=yes; break
5378           fi
5379         done
5380       fi
5381       if test "$cf_have_libdir" = no ; then
5382         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5383
5384 echo "${as_me:-configure}:5384: testing adding $cf_add_libdir to library-path ..." 1>&5
5385
5386         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5387       fi
5388     fi
5389   done
5390 fi
5391
5392                 fi
5393                 ;;
5394         *)
5395
5396 if test -n "/lib" ; then
5397   for cf_add_libdir in /lib
5398   do
5399     if test $cf_add_libdir = /usr/lib ; then
5400       :
5401     elif test -d $cf_add_libdir
5402     then
5403       cf_have_libdir=no
5404       if test -n "$LDFLAGS$LIBS" ; then
5405         # a loop is needed to ensure we can add subdirs of existing dirs
5406         for cf_test_libdir in $LDFLAGS $LIBS ; do
5407           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5408             cf_have_libdir=yes; break
5409           fi
5410         done
5411       fi
5412       if test "$cf_have_libdir" = no ; then
5413         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5414
5415 echo "${as_me:-configure}:5415: testing adding $cf_add_libdir to library-path ..." 1>&5
5416
5417         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5418       fi
5419     fi
5420   done
5421 fi
5422
5423                 ;;
5424         esac
5425     ;;
5426 sunos3*|sunos4*)
5427         if test "x$cf_cv_screen" = "xcurses_5lib"
5428         then
5429                 if test -d /usr/5lib ; then
5430
5431 if test -n "/usr/5lib" ; then
5432   for cf_add_libdir in /usr/5lib
5433   do
5434     if test $cf_add_libdir = /usr/lib ; then
5435       :
5436     elif test -d $cf_add_libdir
5437     then
5438       cf_have_libdir=no
5439       if test -n "$LDFLAGS$LIBS" ; then
5440         # a loop is needed to ensure we can add subdirs of existing dirs
5441         for cf_test_libdir in $LDFLAGS $LIBS ; do
5442           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5443             cf_have_libdir=yes; break
5444           fi
5445         done
5446       fi
5447       if test "$cf_have_libdir" = no ; then
5448         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5449
5450 echo "${as_me:-configure}:5450: testing adding $cf_add_libdir to library-path ..." 1>&5
5451
5452         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5453       fi
5454     fi
5455   done
5456 fi
5457
5458                         LIBS="-lcurses -ltermcap $LIBS"
5459                 fi
5460     fi
5461     ac_cv_func_initscr=yes
5462     ;;
5463 esac
5464
5465 if test ".$ac_cv_func_initscr" != .yes ; then
5466     cf_save_LIBS="$LIBS"
5467     cf_term_lib=""
5468     cf_curs_lib=""
5469
5470     if test ".${cf_cv_ncurses_version:-no}" != .no
5471     then
5472         cf_check_list="ncurses curses cursesX"
5473     else
5474         cf_check_list="cursesX curses ncurses"
5475     fi
5476
5477     # Check for library containing tgoto.  Do this before curses library
5478     # because it may be needed to link the test-case for initscr.
5479     echo "$as_me:5479: checking for tgoto" >&5
5480 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5481 if test "${ac_cv_func_tgoto+set}" = set; then
5482   echo $ECHO_N "(cached) $ECHO_C" >&6
5483 else
5484   cat >conftest.$ac_ext <<_ACEOF
5485 #line 5485 "configure"
5486 #include "confdefs.h"
5487 /* System header to define __stub macros and hopefully few prototypes,
5488     which can conflict with char tgoto (); below.  */
5489 #include <assert.h>
5490 /* Override any gcc2 internal prototype to avoid an error.  */
5491 #ifdef __cplusplus
5492 extern "C"
5493 #endif
5494 /* We use char because int might match the return type of a gcc2
5495    builtin and then its argument prototype would still apply.  */
5496 char tgoto ();
5497 char (*f) ();
5498
5499 int
5500 main ()
5501 {
5502 /* The GNU C library defines this for functions which it implements
5503     to always fail with ENOSYS.  Some functions are actually named
5504     something starting with __ and the normal name is an alias.  */
5505 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5506 choke me
5507 #else
5508 f = tgoto;
5509 #endif
5510
5511   ;
5512   return 0;
5513 }
5514 _ACEOF
5515 rm -f conftest.$ac_objext conftest$ac_exeext
5516 if { (eval echo "$as_me:5516: \"$ac_link\"") >&5
5517   (eval $ac_link) 2>&5
5518   ac_status=$?
5519   echo "$as_me:5519: \$? = $ac_status" >&5
5520   (exit $ac_status); } &&
5521          { ac_try='test -s conftest$ac_exeext'
5522   { (eval echo "$as_me:5522: \"$ac_try\"") >&5
5523   (eval $ac_try) 2>&5
5524   ac_status=$?
5525   echo "$as_me:5525: \$? = $ac_status" >&5
5526   (exit $ac_status); }; }; then
5527   ac_cv_func_tgoto=yes
5528 else
5529   echo "$as_me: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
5531 ac_cv_func_tgoto=no
5532 fi
5533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5534 fi
5535 echo "$as_me:5535: result: $ac_cv_func_tgoto" >&5
5536 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5537 if test $ac_cv_func_tgoto = yes; then
5538   cf_term_lib=predefined
5539 else
5540
5541         for cf_term_lib in $cf_check_list termcap termlib unknown
5542         do
5543             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5544 echo "$as_me:5544: checking for tgoto in -l$cf_term_lib" >&5
5545 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5546 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5547   echo $ECHO_N "(cached) $ECHO_C" >&6
5548 else
5549   ac_check_lib_save_LIBS=$LIBS
5550 LIBS="-l$cf_term_lib  $LIBS"
5551 cat >conftest.$ac_ext <<_ACEOF
5552 #line 5552 "configure"
5553 #include "confdefs.h"
5554
5555 /* Override any gcc2 internal prototype to avoid an error.  */
5556 #ifdef __cplusplus
5557 extern "C"
5558 #endif
5559 /* We use char because int might match the return type of a gcc2
5560    builtin and then its argument prototype would still apply.  */
5561 char tgoto ();
5562 int
5563 main ()
5564 {
5565 tgoto ();
5566   ;
5567   return 0;
5568 }
5569 _ACEOF
5570 rm -f conftest.$ac_objext conftest$ac_exeext
5571 if { (eval echo "$as_me:5571: \"$ac_link\"") >&5
5572   (eval $ac_link) 2>&5
5573   ac_status=$?
5574   echo "$as_me:5574: \$? = $ac_status" >&5
5575   (exit $ac_status); } &&
5576          { ac_try='test -s conftest$ac_exeext'
5577   { (eval echo "$as_me:5577: \"$ac_try\"") >&5
5578   (eval $ac_try) 2>&5
5579   ac_status=$?
5580   echo "$as_me:5580: \$? = $ac_status" >&5
5581   (exit $ac_status); }; }; then
5582   eval "$as_ac_Lib=yes"
5583 else
5584   echo "$as_me: failed program was:" >&5
5585 cat conftest.$ac_ext >&5
5586 eval "$as_ac_Lib=no"
5587 fi
5588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5589 LIBS=$ac_check_lib_save_LIBS
5590 fi
5591 echo "$as_me:5591: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5592 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5593 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5594   break
5595 fi
5596
5597         done
5598
5599 fi
5600
5601     # Check for library containing initscr
5602     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5603         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5604     do
5605         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5606 echo "$as_me:5606: checking for initscr in -l$cf_curs_lib" >&5
5607 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5608 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5609   echo $ECHO_N "(cached) $ECHO_C" >&6
5610 else
5611   ac_check_lib_save_LIBS=$LIBS
5612 LIBS="-l$cf_curs_lib  $LIBS"
5613 cat >conftest.$ac_ext <<_ACEOF
5614 #line 5614 "configure"
5615 #include "confdefs.h"
5616
5617 /* Override any gcc2 internal prototype to avoid an error.  */
5618 #ifdef __cplusplus
5619 extern "C"
5620 #endif
5621 /* We use char because int might match the return type of a gcc2
5622    builtin and then its argument prototype would still apply.  */
5623 char initscr ();
5624 int
5625 main ()
5626 {
5627 initscr ();
5628   ;
5629   return 0;
5630 }
5631 _ACEOF
5632 rm -f conftest.$ac_objext conftest$ac_exeext
5633 if { (eval echo "$as_me:5633: \"$ac_link\"") >&5
5634   (eval $ac_link) 2>&5
5635   ac_status=$?
5636   echo "$as_me:5636: \$? = $ac_status" >&5
5637   (exit $ac_status); } &&
5638          { ac_try='test -s conftest$ac_exeext'
5639   { (eval echo "$as_me:5639: \"$ac_try\"") >&5
5640   (eval $ac_try) 2>&5
5641   ac_status=$?
5642   echo "$as_me:5642: \$? = $ac_status" >&5
5643   (exit $ac_status); }; }; then
5644   eval "$as_ac_Lib=yes"
5645 else
5646   echo "$as_me: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 eval "$as_ac_Lib=no"
5649 fi
5650 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5651 LIBS=$ac_check_lib_save_LIBS
5652 fi
5653 echo "$as_me:5653: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5654 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5655 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5656   break
5657 fi
5658
5659     done
5660     test $cf_curs_lib = unknown && { { echo "$as_me:5660: error: no curses library found" >&5
5661 echo "$as_me: error: no curses library found" >&2;}
5662    { (exit 1); exit 1; }; }
5663
5664     LIBS="-l$cf_curs_lib $cf_save_LIBS"
5665     if test "$cf_term_lib" = unknown ; then
5666         echo "$as_me:5666: checking if we can link with $cf_curs_lib library" >&5
5667 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5668         cat >conftest.$ac_ext <<_ACEOF
5669 #line 5669 "configure"
5670 #include "confdefs.h"
5671 #include <${cf_cv_ncurses_header:-curses.h}>
5672 int
5673 main ()
5674 {
5675 initscr()
5676   ;
5677   return 0;
5678 }
5679 _ACEOF
5680 rm -f conftest.$ac_objext conftest$ac_exeext
5681 if { (eval echo "$as_me:5681: \"$ac_link\"") >&5
5682   (eval $ac_link) 2>&5
5683   ac_status=$?
5684   echo "$as_me:5684: \$? = $ac_status" >&5
5685   (exit $ac_status); } &&
5686          { ac_try='test -s conftest$ac_exeext'
5687   { (eval echo "$as_me:5687: \"$ac_try\"") >&5
5688   (eval $ac_try) 2>&5
5689   ac_status=$?
5690   echo "$as_me:5690: \$? = $ac_status" >&5
5691   (exit $ac_status); }; }; then
5692   cf_result=yes
5693 else
5694   echo "$as_me: failed program was:" >&5
5695 cat conftest.$ac_ext >&5
5696 cf_result=no
5697 fi
5698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5699         echo "$as_me:5699: result: $cf_result" >&5
5700 echo "${ECHO_T}$cf_result" >&6
5701         test $cf_result = no && { { echo "$as_me:5701: error: Cannot link curses library" >&5
5702 echo "$as_me: error: Cannot link curses library" >&2;}
5703    { (exit 1); exit 1; }; }
5704     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5705         :
5706     elif test "$cf_term_lib" != predefined ; then
5707         echo "$as_me:5707: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5708 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5709         cat >conftest.$ac_ext <<_ACEOF
5710 #line 5710 "configure"
5711 #include "confdefs.h"
5712 #include <${cf_cv_ncurses_header:-curses.h}>
5713 int
5714 main ()
5715 {
5716 initscr(); tgoto((char *)0, 0, 0);
5717   ;
5718   return 0;
5719 }
5720 _ACEOF
5721 rm -f conftest.$ac_objext conftest$ac_exeext
5722 if { (eval echo "$as_me:5722: \"$ac_link\"") >&5
5723   (eval $ac_link) 2>&5
5724   ac_status=$?
5725   echo "$as_me:5725: \$? = $ac_status" >&5
5726   (exit $ac_status); } &&
5727          { ac_try='test -s conftest$ac_exeext'
5728   { (eval echo "$as_me:5728: \"$ac_try\"") >&5
5729   (eval $ac_try) 2>&5
5730   ac_status=$?
5731   echo "$as_me:5731: \$? = $ac_status" >&5
5732   (exit $ac_status); }; }; then
5733   cf_result=no
5734 else
5735   echo "$as_me: failed program was:" >&5
5736 cat conftest.$ac_ext >&5
5737
5738             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5739             cat >conftest.$ac_ext <<_ACEOF
5740 #line 5740 "configure"
5741 #include "confdefs.h"
5742 #include <${cf_cv_ncurses_header:-curses.h}>
5743 int
5744 main ()
5745 {
5746 initscr()
5747   ;
5748   return 0;
5749 }
5750 _ACEOF
5751 rm -f conftest.$ac_objext conftest$ac_exeext
5752 if { (eval echo "$as_me:5752: \"$ac_link\"") >&5
5753   (eval $ac_link) 2>&5
5754   ac_status=$?
5755   echo "$as_me:5755: \$? = $ac_status" >&5
5756   (exit $ac_status); } &&
5757          { ac_try='test -s conftest$ac_exeext'
5758   { (eval echo "$as_me:5758: \"$ac_try\"") >&5
5759   (eval $ac_try) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); }; }; then
5763   cf_result=yes
5764 else
5765   echo "$as_me: failed program was:" >&5
5766 cat conftest.$ac_ext >&5
5767 cf_result=error
5768 fi
5769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5770
5771 fi
5772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5773         echo "$as_me:5773: result: $cf_result" >&5
5774 echo "${ECHO_T}$cf_result" >&6
5775     fi
5776 fi
5777 fi
5778
5779 echo "$as_me:5779: checking for NetBSD form.h" >&5
5780 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
5781 if test "${cf_cv_netbsd_form_h+set}" = set; then
5782   echo $ECHO_N "(cached) $ECHO_C" >&6
5783 else
5784
5785 cat >conftest.$ac_ext <<_ACEOF
5786 #line 5786 "configure"
5787 #include "confdefs.h"
5788
5789 #include <${cf_cv_ncurses_header:-curses.h}>
5790 #include <form.h>
5791
5792 int
5793 main ()
5794 {
5795
5796         FORM *form;
5797         int y = current_field(form)->cursor_ypos;
5798         int x = current_field(form)->cursor_xpos;
5799
5800   ;
5801   return 0;
5802 }
5803 _ACEOF
5804 rm -f conftest.$ac_objext
5805 if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5
5806   (eval $ac_compile) 2>&5
5807   ac_status=$?
5808   echo "$as_me:5808: \$? = $ac_status" >&5
5809   (exit $ac_status); } &&
5810          { ac_try='test -s conftest.$ac_objext'
5811   { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5812   (eval $ac_try) 2>&5
5813   ac_status=$?
5814   echo "$as_me:5814: \$? = $ac_status" >&5
5815   (exit $ac_status); }; }; then
5816   cf_cv_netbsd_form_h=yes
5817
5818 else
5819   echo "$as_me: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5821 cf_cv_netbsd_form_h=no
5822 fi
5823 rm -f conftest.$ac_objext conftest.$ac_ext
5824
5825 fi
5826 echo "$as_me:5826: result: $cf_cv_netbsd_form_h" >&5
5827 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
5828
5829 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
5830 #define HAVE_NETBSD_FORM_H 1
5831 EOF
5832
5833 echo "$as_me:5833: checking for NetBSD menu.h" >&5
5834 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
5835 if test "${cf_cv_netbsd_menu_h+set}" = set; then
5836   echo $ECHO_N "(cached) $ECHO_C" >&6
5837 else
5838
5839 cat >conftest.$ac_ext <<_ACEOF
5840 #line 5840 "configure"
5841 #include "confdefs.h"
5842
5843 #include <${cf_cv_ncurses_header:-curses.h}>
5844 #include <menu.h>
5845
5846 int
5847 main ()
5848 {
5849
5850         MENU *menu;
5851         int y = menu->max_item_width;
5852
5853   ;
5854   return 0;
5855 }
5856 _ACEOF
5857 rm -f conftest.$ac_objext
5858 if { (eval echo "$as_me:5858: \"$ac_compile\"") >&5
5859   (eval $ac_compile) 2>&5
5860   ac_status=$?
5861   echo "$as_me:5861: \$? = $ac_status" >&5
5862   (exit $ac_status); } &&
5863          { ac_try='test -s conftest.$ac_objext'
5864   { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5865   (eval $ac_try) 2>&5
5866   ac_status=$?
5867   echo "$as_me:5867: \$? = $ac_status" >&5
5868   (exit $ac_status); }; }; then
5869   cf_cv_netbsd_menu_h=yes
5870
5871 else
5872   echo "$as_me: failed program was:" >&5
5873 cat conftest.$ac_ext >&5
5874 cf_cv_netbsd_menu_h=no
5875 fi
5876 rm -f conftest.$ac_objext conftest.$ac_ext
5877
5878 fi
5879 echo "$as_me:5879: result: $cf_cv_netbsd_menu_h" >&5
5880 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
5881
5882 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
5883 #define HAVE_NETBSD_MENU_H 1
5884 EOF
5885
5886         ;;
5887 ncurses)
5888
5889 cf_ncuconfig_root=ncurses
5890
5891 echo "Looking for ${cf_ncuconfig_root}-config"
5892 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5893 do
5894   # Extract the first word of "$ac_prog", so it can be a program name with args.
5895 set dummy $ac_prog; ac_word=$2
5896 echo "$as_me:5896: checking for $ac_word" >&5
5897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5898 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5899   echo $ECHO_N "(cached) $ECHO_C" >&6
5900 else
5901   case $NCURSES_CONFIG in
5902   [\\/]* | ?:[\\/]*)
5903   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5904   ;;
5905   *)
5906   ac_save_IFS=$IFS; IFS=$ac_path_separator
5907 ac_dummy="$PATH"
5908 for ac_dir in $ac_dummy; do
5909   IFS=$ac_save_IFS
5910   test -z "$ac_dir" && ac_dir=.
5911   if $as_executable_p "$ac_dir/$ac_word"; then
5912    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5913    echo "$as_me:5913: found $ac_dir/$ac_word" >&5
5914    break
5915 fi
5916 done
5917
5918   ;;
5919 esac
5920 fi
5921 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5922
5923 if test -n "$NCURSES_CONFIG"; then
5924   echo "$as_me:5924: result: $NCURSES_CONFIG" >&5
5925 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5926 else
5927   echo "$as_me:5927: result: no" >&5
5928 echo "${ECHO_T}no" >&6
5929 fi
5930
5931   test -n "$NCURSES_CONFIG" && break
5932 done
5933 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5934
5935 if test "$NCURSES_CONFIG" != none ; then
5936
5937 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5938 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5939
5940 # even with config script, some packages use no-override for curses.h
5941
5942 echo "$as_me:5942: checking if we have identified curses headers" >&5
5943 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5944 if test "${cf_cv_ncurses_header+set}" = set; then
5945   echo $ECHO_N "(cached) $ECHO_C" >&6
5946 else
5947
5948 cf_cv_ncurses_header=none
5949 for cf_header in  \
5950     ncurses/ncurses.h \
5951         ncurses/curses.h \
5952         ncurses.h \
5953         curses.h
5954 do
5955 cat >conftest.$ac_ext <<_ACEOF
5956 #line 5956 "configure"
5957 #include "confdefs.h"
5958 #include <${cf_header}>
5959 int
5960 main ()
5961 {
5962 initscr(); tgoto("?", 0,0)
5963   ;
5964   return 0;
5965 }
5966 _ACEOF
5967 rm -f conftest.$ac_objext
5968 if { (eval echo "$as_me:5968: \"$ac_compile\"") >&5
5969   (eval $ac_compile) 2>&5
5970   ac_status=$?
5971   echo "$as_me:5971: \$? = $ac_status" >&5
5972   (exit $ac_status); } &&
5973          { ac_try='test -s conftest.$ac_objext'
5974   { (eval echo "$as_me:5974: \"$ac_try\"") >&5
5975   (eval $ac_try) 2>&5
5976   ac_status=$?
5977   echo "$as_me:5977: \$? = $ac_status" >&5
5978   (exit $ac_status); }; }; then
5979   cf_cv_ncurses_header=$cf_header; break
5980 else
5981   echo "$as_me: failed program was:" >&5
5982 cat conftest.$ac_ext >&5
5983 fi
5984 rm -f conftest.$ac_objext conftest.$ac_ext
5985 done
5986
5987 fi
5988 echo "$as_me:5988: result: $cf_cv_ncurses_header" >&5
5989 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5990
5991 if test "$cf_cv_ncurses_header" = none ; then
5992         { { echo "$as_me:5992: error: No curses header-files found" >&5
5993 echo "$as_me: error: No curses header-files found" >&2;}
5994    { (exit 1); exit 1; }; }
5995 fi
5996
5997 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5998
5999 for ac_header in $cf_cv_ncurses_header
6000 do
6001 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6002 echo "$as_me:6002: checking for $ac_header" >&5
6003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6004 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6005   echo $ECHO_N "(cached) $ECHO_C" >&6
6006 else
6007   cat >conftest.$ac_ext <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010 #include <$ac_header>
6011 _ACEOF
6012 if { (eval echo "$as_me:6012: \"$ac_cpp conftest.$ac_ext\"") >&5
6013   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6014   ac_status=$?
6015   egrep -v '^ *\+' conftest.er1 >conftest.err
6016   rm -f conftest.er1
6017   cat conftest.err >&5
6018   echo "$as_me:6018: \$? = $ac_status" >&5
6019   (exit $ac_status); } >/dev/null; then
6020   if test -s conftest.err; then
6021     ac_cpp_err=$ac_c_preproc_warn_flag
6022   else
6023     ac_cpp_err=
6024   fi
6025 else
6026   ac_cpp_err=yes
6027 fi
6028 if test -z "$ac_cpp_err"; then
6029   eval "$as_ac_Header=yes"
6030 else
6031   echo "$as_me: failed program was:" >&5
6032   cat conftest.$ac_ext >&5
6033   eval "$as_ac_Header=no"
6034 fi
6035 rm -f conftest.err conftest.$ac_ext
6036 fi
6037 echo "$as_me:6037: result: `eval echo '${'$as_ac_Header'}'`" >&5
6038 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6039 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6040   cat >>confdefs.h <<EOF
6041 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6042 EOF
6043
6044 fi
6045 done
6046
6047 cat >>confdefs.h <<\EOF
6048 #define NCURSES 1
6049 EOF
6050
6051 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6052
6053 cat >>confdefs.h <<EOF
6054 #define $cf_nculib_ROOT 1
6055 EOF
6056
6057 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6058
6059 else
6060
6061 cf_ncuhdr_root=ncurses
6062
6063 test -n "$cf_cv_curses_dir" && \
6064 test "$cf_cv_curses_dir" != "no" && { \
6065
6066 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6067   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6068   do
6069         while test $cf_add_incdir != /usr/include
6070         do
6071           if test -d $cf_add_incdir
6072           then
6073                 cf_have_incdir=no
6074                 if test -n "$CFLAGS$CPPFLAGS" ; then
6075                   # a loop is needed to ensure we can add subdirs of existing dirs
6076                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6077                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6078                           cf_have_incdir=yes; break
6079                         fi
6080                   done
6081                 fi
6082
6083                 if test "$cf_have_incdir" = no ; then
6084                   if test "$cf_add_incdir" = /usr/local/include ; then
6085                         if test "$GCC" = yes
6086                         then
6087                           cf_save_CPPFLAGS=$CPPFLAGS
6088                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6089                           cat >conftest.$ac_ext <<_ACEOF
6090 #line 6090 "configure"
6091 #include "confdefs.h"
6092 #include <stdio.h>
6093 int
6094 main ()
6095 {
6096 printf("Hello")
6097   ;
6098   return 0;
6099 }
6100 _ACEOF
6101 rm -f conftest.$ac_objext
6102 if { (eval echo "$as_me:6102: \"$ac_compile\"") >&5
6103   (eval $ac_compile) 2>&5
6104   ac_status=$?
6105   echo "$as_me:6105: \$? = $ac_status" >&5
6106   (exit $ac_status); } &&
6107          { ac_try='test -s conftest.$ac_objext'
6108   { (eval echo "$as_me:6108: \"$ac_try\"") >&5
6109   (eval $ac_try) 2>&5
6110   ac_status=$?
6111   echo "$as_me:6111: \$? = $ac_status" >&5
6112   (exit $ac_status); }; }; then
6113   :
6114 else
6115   echo "$as_me: failed program was:" >&5
6116 cat conftest.$ac_ext >&5
6117 cf_have_incdir=yes
6118 fi
6119 rm -f conftest.$ac_objext conftest.$ac_ext
6120                           CPPFLAGS=$cf_save_CPPFLAGS
6121                         fi
6122                   fi
6123                 fi
6124
6125                 if test "$cf_have_incdir" = no ; then
6126                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6127
6128 echo "${as_me:-configure}:6128: testing adding $cf_add_incdir to include-path ..." 1>&5
6129
6130                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6131
6132                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6133                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6134                   cf_add_incdir="$cf_top_incdir"
6135                 else
6136                   break
6137                 fi
6138           fi
6139         done
6140   done
6141 fi
6142
6143 }
6144
6145 echo "$as_me:6145: checking for $cf_ncuhdr_root header in include-path" >&5
6146 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6147 if test "${cf_cv_ncurses_h+set}" = set; then
6148   echo $ECHO_N "(cached) $ECHO_C" >&6
6149 else
6150
6151         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6152         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6153         for cf_header in $cf_header_list
6154         do
6155
6156         cat >conftest.$ac_ext <<_ACEOF
6157 #line 6157 "configure"
6158 #include "confdefs.h"
6159
6160 #include <$cf_header>
6161 int
6162 main ()
6163 {
6164
6165 #ifdef NCURSES_VERSION
6166
6167 printf("%s\n", NCURSES_VERSION);
6168 #else
6169 #ifdef __NCURSES_H
6170 printf("old\n");
6171 #else
6172         make an error
6173 #endif
6174 #endif
6175
6176   ;
6177   return 0;
6178 }
6179 _ACEOF
6180 rm -f conftest.$ac_objext
6181 if { (eval echo "$as_me:6181: \"$ac_compile\"") >&5
6182   (eval $ac_compile) 2>&5
6183   ac_status=$?
6184   echo "$as_me:6184: \$? = $ac_status" >&5
6185   (exit $ac_status); } &&
6186          { ac_try='test -s conftest.$ac_objext'
6187   { (eval echo "$as_me:6187: \"$ac_try\"") >&5
6188   (eval $ac_try) 2>&5
6189   ac_status=$?
6190   echo "$as_me:6190: \$? = $ac_status" >&5
6191   (exit $ac_status); }; }; then
6192   cf_cv_ncurses_h=$cf_header
6193
6194 else
6195   echo "$as_me: failed program was:" >&5
6196 cat conftest.$ac_ext >&5
6197 cf_cv_ncurses_h=no
6198 fi
6199 rm -f conftest.$ac_objext conftest.$ac_ext
6200
6201                 test "$cf_cv_ncurses_h" != no && break
6202         done
6203
6204 fi
6205 echo "$as_me:6205: result: $cf_cv_ncurses_h" >&5
6206 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6207
6208 if test "$cf_cv_ncurses_h" != no ; then
6209         cf_cv_ncurses_header=$cf_cv_ncurses_h
6210 else
6211
6212 echo "$as_me:6212: checking for $cf_ncuhdr_root include-path" >&5
6213 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6214 if test "${cf_cv_ncurses_h2+set}" = set; then
6215   echo $ECHO_N "(cached) $ECHO_C" >&6
6216 else
6217
6218         test -n "$verbose" && echo
6219
6220 cf_search=
6221
6222 # collect the current set of include-directories from compiler flags
6223 cf_header_path_list=""
6224 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6225         for cf_header_path in $CPPFLAGS $CFLAGS
6226         do
6227                 case $cf_header_path in #(vi
6228                 -I*)
6229                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6230
6231 test "$cf_header_path" != "NONE" && \
6232 test -d "$cf_header_path" && \
6233  {
6234         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6235         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6236         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6237         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6238         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6239         test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6240 }
6241
6242                         cf_header_path_list="$cf_header_path_list $cf_search"
6243                         ;;
6244                 esac
6245         done
6246 fi
6247
6248 # add the variations for the package we are looking for
6249
6250 cf_search=
6251
6252 test "/usr" != "$prefix" && \
6253 test -d "/usr" && \
6254 (test $prefix = NONE || test "/usr" != "$prefix") && {
6255         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6256         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6257         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6258         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6259         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6260         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6261 }
6262
6263 test "$prefix" != "NONE" && \
6264 test -d "$prefix" && \
6265  {
6266         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6267         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6268         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6269         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6270         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6271         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6272 }
6273
6274 test "/usr/local" != "$prefix" && \
6275 test -d "/usr/local" && \
6276 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6277         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6278         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6279         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6280         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6281         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6282         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6283 }
6284
6285 test "/opt" != "$prefix" && \
6286 test -d "/opt" && \
6287 (test $prefix = NONE || test "/opt" != "$prefix") && {
6288         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6289         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6290         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6291         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6292         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6293         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6294 }
6295
6296 test "$HOME" != "$prefix" && \
6297 test -d "$HOME" && \
6298 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6299         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6300         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6301         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6302         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6303         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6304         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6305 }
6306
6307 test "$includedir" != NONE && \
6308 test "$includedir" != "/usr/include" && \
6309 test -d "$includedir" && {
6310         test -d $includedir &&    cf_search="$cf_search $includedir"
6311         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6312 }
6313
6314 test "$oldincludedir" != NONE && \
6315 test "$oldincludedir" != "/usr/include" && \
6316 test -d "$oldincludedir" && {
6317         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6318         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6319 }
6320
6321 cf_search="$cf_search $cf_header_path_list"
6322
6323         test -n "$verbose" && echo search path $cf_search
6324         cf_save2_CPPFLAGS="$CPPFLAGS"
6325         for cf_incdir in $cf_search
6326         do
6327
6328 if test -n "$cf_incdir" ; then
6329   for cf_add_incdir in $cf_incdir
6330   do
6331         while test $cf_add_incdir != /usr/include
6332         do
6333           if test -d $cf_add_incdir
6334           then
6335                 cf_have_incdir=no
6336                 if test -n "$CFLAGS$CPPFLAGS" ; then
6337                   # a loop is needed to ensure we can add subdirs of existing dirs
6338                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6339                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6340                           cf_have_incdir=yes; break
6341                         fi
6342                   done
6343                 fi
6344
6345                 if test "$cf_have_incdir" = no ; then
6346                   if test "$cf_add_incdir" = /usr/local/include ; then
6347                         if test "$GCC" = yes
6348                         then
6349                           cf_save_CPPFLAGS=$CPPFLAGS
6350                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6351                           cat >conftest.$ac_ext <<_ACEOF
6352 #line 6352 "configure"
6353 #include "confdefs.h"
6354 #include <stdio.h>
6355 int
6356 main ()
6357 {
6358 printf("Hello")
6359   ;
6360   return 0;
6361 }
6362 _ACEOF
6363 rm -f conftest.$ac_objext
6364 if { (eval echo "$as_me:6364: \"$ac_compile\"") >&5
6365   (eval $ac_compile) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); } &&
6369          { ac_try='test -s conftest.$ac_objext'
6370   { (eval echo "$as_me:6370: \"$ac_try\"") >&5
6371   (eval $ac_try) 2>&5
6372   ac_status=$?
6373   echo "$as_me:6373: \$? = $ac_status" >&5
6374   (exit $ac_status); }; }; then
6375   :
6376 else
6377   echo "$as_me: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379 cf_have_incdir=yes
6380 fi
6381 rm -f conftest.$ac_objext conftest.$ac_ext
6382                           CPPFLAGS=$cf_save_CPPFLAGS
6383                         fi
6384                   fi
6385                 fi
6386
6387                 if test "$cf_have_incdir" = no ; then
6388                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6389
6390 echo "${as_me:-configure}:6390: testing adding $cf_add_incdir to include-path ..." 1>&5
6391
6392                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6393
6394                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6395                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6396                   cf_add_incdir="$cf_top_incdir"
6397                 else
6398                   break
6399                 fi
6400           fi
6401         done
6402   done
6403 fi
6404
6405                 for cf_header in \
6406                         ncurses.h \
6407                         curses.h
6408                 do
6409
6410         cat >conftest.$ac_ext <<_ACEOF
6411 #line 6411 "configure"
6412 #include "confdefs.h"
6413
6414 #include <$cf_header>
6415 int
6416 main ()
6417 {
6418
6419 #ifdef NCURSES_VERSION
6420
6421 printf("%s\n", NCURSES_VERSION);
6422 #else
6423 #ifdef __NCURSES_H
6424 printf("old\n");
6425 #else
6426         make an error
6427 #endif
6428 #endif
6429
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -f conftest.$ac_objext
6435 if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5
6436   (eval $ac_compile) 2>&5
6437   ac_status=$?
6438   echo "$as_me:6438: \$? = $ac_status" >&5
6439   (exit $ac_status); } &&
6440          { ac_try='test -s conftest.$ac_objext'
6441   { (eval echo "$as_me:6441: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:6444: \$? = $ac_status" >&5
6445   (exit $ac_status); }; }; then
6446   cf_cv_ncurses_h2=$cf_header
6447
6448 else
6449   echo "$as_me: failed program was:" >&5
6450 cat conftest.$ac_ext >&5
6451 cf_cv_ncurses_h2=no
6452 fi
6453 rm -f conftest.$ac_objext conftest.$ac_ext
6454
6455                         if test "$cf_cv_ncurses_h2" != no ; then
6456                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6457                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6458                                 break
6459                         fi
6460                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6461                 done
6462                 CPPFLAGS="$cf_save2_CPPFLAGS"
6463                 test "$cf_cv_ncurses_h2" != no && break
6464         done
6465         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6465: error: not found" >&5
6466 echo "$as_me: error: not found" >&2;}
6467    { (exit 1); exit 1; }; }
6468
6469 fi
6470 echo "$as_me:6470: result: $cf_cv_ncurses_h2" >&5
6471 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6472
6473         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6474         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6475         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6476                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6477         fi
6478
6479 if test -n "$cf_1st_incdir" ; then
6480   for cf_add_incdir in $cf_1st_incdir
6481   do
6482         while test $cf_add_incdir != /usr/include
6483         do
6484           if test -d $cf_add_incdir
6485           then
6486                 cf_have_incdir=no
6487                 if test -n "$CFLAGS$CPPFLAGS" ; then
6488                   # a loop is needed to ensure we can add subdirs of existing dirs
6489                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6490                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6491                           cf_have_incdir=yes; break
6492                         fi
6493                   done
6494                 fi
6495
6496                 if test "$cf_have_incdir" = no ; then
6497                   if test "$cf_add_incdir" = /usr/local/include ; then
6498                         if test "$GCC" = yes
6499                         then
6500                           cf_save_CPPFLAGS=$CPPFLAGS
6501                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6502                           cat >conftest.$ac_ext <<_ACEOF
6503 #line 6503 "configure"
6504 #include "confdefs.h"
6505 #include <stdio.h>
6506 int
6507 main ()
6508 {
6509 printf("Hello")
6510   ;
6511   return 0;
6512 }
6513 _ACEOF
6514 rm -f conftest.$ac_objext
6515 if { (eval echo "$as_me:6515: \"$ac_compile\"") >&5
6516   (eval $ac_compile) 2>&5
6517   ac_status=$?
6518   echo "$as_me:6518: \$? = $ac_status" >&5
6519   (exit $ac_status); } &&
6520          { ac_try='test -s conftest.$ac_objext'
6521   { (eval echo "$as_me:6521: \"$ac_try\"") >&5
6522   (eval $ac_try) 2>&5
6523   ac_status=$?
6524   echo "$as_me:6524: \$? = $ac_status" >&5
6525   (exit $ac_status); }; }; then
6526   :
6527 else
6528   echo "$as_me: failed program was:" >&5
6529 cat conftest.$ac_ext >&5
6530 cf_have_incdir=yes
6531 fi
6532 rm -f conftest.$ac_objext conftest.$ac_ext
6533                           CPPFLAGS=$cf_save_CPPFLAGS
6534                         fi
6535                   fi
6536                 fi
6537
6538                 if test "$cf_have_incdir" = no ; then
6539                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6540
6541 echo "${as_me:-configure}:6541: testing adding $cf_add_incdir to include-path ..." 1>&5
6542
6543                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6544
6545                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6546                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6547                   cf_add_incdir="$cf_top_incdir"
6548                 else
6549                   break
6550                 fi
6551           fi
6552         done
6553   done
6554 fi
6555
6556 fi
6557
6558 # Set definitions to allow ifdef'ing for ncurses.h
6559
6560 case $cf_cv_ncurses_header in # (vi
6561 *ncurses.h)
6562         cat >>confdefs.h <<\EOF
6563 #define HAVE_NCURSES_H 1
6564 EOF
6565
6566         ;;
6567 esac
6568
6569 case $cf_cv_ncurses_header in # (vi
6570 ncurses/curses.h|ncurses/ncurses.h)
6571         cat >>confdefs.h <<\EOF
6572 #define HAVE_NCURSES_NCURSES_H 1
6573 EOF
6574
6575         ;;
6576 ncursesw/curses.h|ncursesw/ncurses.h)
6577         cat >>confdefs.h <<\EOF
6578 #define HAVE_NCURSESW_NCURSES_H 1
6579 EOF
6580
6581         ;;
6582 esac
6583
6584 echo "$as_me:6584: checking for terminfo header" >&5
6585 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6586 if test "${cf_cv_term_header+set}" = set; then
6587   echo $ECHO_N "(cached) $ECHO_C" >&6
6588 else
6589
6590 case ${cf_cv_ncurses_header} in #(vi
6591 */ncurses.h|*/ncursesw.h) #(vi
6592         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6593         ;;
6594 *)
6595         cf_term_header=term.h
6596         ;;
6597 esac
6598
6599 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6600 do
6601 cat >conftest.$ac_ext <<_ACEOF
6602 #line 6602 "configure"
6603 #include "confdefs.h"
6604 #include <stdio.h>
6605 #include <${cf_cv_ncurses_header:-curses.h}>
6606 #include <$cf_test>
6607
6608 int
6609 main ()
6610 {
6611 int x = auto_left_margin
6612   ;
6613   return 0;
6614 }
6615 _ACEOF
6616 rm -f conftest.$ac_objext
6617 if { (eval echo "$as_me:6617: \"$ac_compile\"") >&5
6618   (eval $ac_compile) 2>&5
6619   ac_status=$?
6620   echo "$as_me:6620: \$? = $ac_status" >&5
6621   (exit $ac_status); } &&
6622          { ac_try='test -s conftest.$ac_objext'
6623   { (eval echo "$as_me:6623: \"$ac_try\"") >&5
6624   (eval $ac_try) 2>&5
6625   ac_status=$?
6626   echo "$as_me:6626: \$? = $ac_status" >&5
6627   (exit $ac_status); }; }; then
6628
6629         cf_cv_term_header="$cf_test"
6630 else
6631   echo "$as_me: failed program was:" >&5
6632 cat conftest.$ac_ext >&5
6633
6634         cf_cv_term_header=unknown
6635
6636 fi
6637 rm -f conftest.$ac_objext conftest.$ac_ext
6638         test "$cf_cv_term_header" != unknown && break
6639 done
6640
6641 fi
6642 echo "$as_me:6642: result: $cf_cv_term_header" >&5
6643 echo "${ECHO_T}$cf_cv_term_header" >&6
6644
6645 # Set definitions to allow ifdef'ing to accommodate subdirectories
6646
6647 case $cf_cv_term_header in # (vi
6648 *term.h)
6649         cat >>confdefs.h <<\EOF
6650 #define HAVE_TERM_H 1
6651 EOF
6652
6653         ;;
6654 esac
6655
6656 case $cf_cv_term_header in # (vi
6657 ncurses/term.h) #(vi
6658         cat >>confdefs.h <<\EOF
6659 #define HAVE_NCURSES_TERM_H 1
6660 EOF
6661
6662         ;;
6663 ncursesw/term.h)
6664         cat >>confdefs.h <<\EOF
6665 #define HAVE_NCURSESW_TERM_H 1
6666 EOF
6667
6668         ;;
6669 esac
6670
6671 # some applications need this, but should check for NCURSES_VERSION
6672 cat >>confdefs.h <<\EOF
6673 #define NCURSES 1
6674 EOF
6675
6676 echo "$as_me:6676: checking for ncurses version" >&5
6677 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6678 if test "${cf_cv_ncurses_version+set}" = set; then
6679   echo $ECHO_N "(cached) $ECHO_C" >&6
6680 else
6681
6682         cf_cv_ncurses_version=no
6683         cf_tempfile=out$$
6684         rm -f $cf_tempfile
6685         if test "$cross_compiling" = yes; then
6686
6687         # This will not work if the preprocessor splits the line after the
6688         # Autoconf token.  The 'unproto' program does that.
6689         cat > conftest.$ac_ext <<EOF
6690 #include <${cf_cv_ncurses_header:-curses.h}>
6691 #undef Autoconf
6692 #ifdef NCURSES_VERSION
6693 Autoconf NCURSES_VERSION
6694 #else
6695 #ifdef __NCURSES_H
6696 Autoconf "old"
6697 #endif
6698 ;
6699 #endif
6700 EOF
6701         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6702         { (eval echo "$as_me:6702: \"$cf_try\"") >&5
6703   (eval $cf_try) 2>&5
6704   ac_status=$?
6705   echo "$as_me:6705: \$? = $ac_status" >&5
6706   (exit $ac_status); }
6707         if test -f conftest.out ; then
6708                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6709                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6710                 rm -f conftest.out
6711         fi
6712
6713 else
6714   cat >conftest.$ac_ext <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6717
6718 #include <${cf_cv_ncurses_header:-curses.h}>
6719 #include <stdio.h>
6720 int main()
6721 {
6722         FILE *fp = fopen("$cf_tempfile", "w");
6723 #ifdef NCURSES_VERSION
6724 # ifdef NCURSES_VERSION_PATCH
6725         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6726 # else
6727         fprintf(fp, "%s\n", NCURSES_VERSION);
6728 # endif
6729 #else
6730 # ifdef __NCURSES_H
6731         fprintf(fp, "old\n");
6732 # else
6733         make an error
6734 # endif
6735 #endif
6736         ${cf_cv_main_return:-return}(0);
6737 }
6738 _ACEOF
6739 rm -f conftest$ac_exeext
6740 if { (eval echo "$as_me:6740: \"$ac_link\"") >&5
6741   (eval $ac_link) 2>&5
6742   ac_status=$?
6743   echo "$as_me:6743: \$? = $ac_status" >&5
6744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6745   { (eval echo "$as_me:6745: \"$ac_try\"") >&5
6746   (eval $ac_try) 2>&5
6747   ac_status=$?
6748   echo "$as_me:6748: \$? = $ac_status" >&5
6749   (exit $ac_status); }; }; then
6750
6751         cf_cv_ncurses_version=`cat $cf_tempfile`
6752 else
6753   echo "$as_me: program exited with status $ac_status" >&5
6754 echo "$as_me: failed program was:" >&5
6755 cat conftest.$ac_ext >&5
6756 fi
6757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6758 fi
6759         rm -f $cf_tempfile
6760
6761 fi
6762 echo "$as_me:6762: result: $cf_cv_ncurses_version" >&5
6763 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6764 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
6765 #define NCURSES 1
6766 EOF
6767
6768 cf_nculib_root=ncurses
6769         # This works, except for the special case where we find gpm, but
6770         # ncurses is in a nonstandard location via $LIBS, and we really want
6771         # to link gpm.
6772 cf_ncurses_LIBS=""
6773 cf_ncurses_SAVE="$LIBS"
6774 echo "$as_me:6774: checking for Gpm_Open in -lgpm" >&5
6775 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6776 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6777   echo $ECHO_N "(cached) $ECHO_C" >&6
6778 else
6779   ac_check_lib_save_LIBS=$LIBS
6780 LIBS="-lgpm  $LIBS"
6781 cat >conftest.$ac_ext <<_ACEOF
6782 #line 6782 "configure"
6783 #include "confdefs.h"
6784
6785 /* Override any gcc2 internal prototype to avoid an error.  */
6786 #ifdef __cplusplus
6787 extern "C"
6788 #endif
6789 /* We use char because int might match the return type of a gcc2
6790    builtin and then its argument prototype would still apply.  */
6791 char Gpm_Open ();
6792 int
6793 main ()
6794 {
6795 Gpm_Open ();
6796   ;
6797   return 0;
6798 }
6799 _ACEOF
6800 rm -f conftest.$ac_objext conftest$ac_exeext
6801 if { (eval echo "$as_me:6801: \"$ac_link\"") >&5
6802   (eval $ac_link) 2>&5
6803   ac_status=$?
6804   echo "$as_me:6804: \$? = $ac_status" >&5
6805   (exit $ac_status); } &&
6806          { ac_try='test -s conftest$ac_exeext'
6807   { (eval echo "$as_me:6807: \"$ac_try\"") >&5
6808   (eval $ac_try) 2>&5
6809   ac_status=$?
6810   echo "$as_me:6810: \$? = $ac_status" >&5
6811   (exit $ac_status); }; }; then
6812   ac_cv_lib_gpm_Gpm_Open=yes
6813 else
6814   echo "$as_me: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6816 ac_cv_lib_gpm_Gpm_Open=no
6817 fi
6818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6819 LIBS=$ac_check_lib_save_LIBS
6820 fi
6821 echo "$as_me:6821: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6822 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6823 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6824   echo "$as_me:6824: checking for initscr in -lgpm" >&5
6825 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6826 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6827   echo $ECHO_N "(cached) $ECHO_C" >&6
6828 else
6829   ac_check_lib_save_LIBS=$LIBS
6830 LIBS="-lgpm  $LIBS"
6831 cat >conftest.$ac_ext <<_ACEOF
6832 #line 6832 "configure"
6833 #include "confdefs.h"
6834
6835 /* Override any gcc2 internal prototype to avoid an error.  */
6836 #ifdef __cplusplus
6837 extern "C"
6838 #endif
6839 /* We use char because int might match the return type of a gcc2
6840    builtin and then its argument prototype would still apply.  */
6841 char initscr ();
6842 int
6843 main ()
6844 {
6845 initscr ();
6846   ;
6847   return 0;
6848 }
6849 _ACEOF
6850 rm -f conftest.$ac_objext conftest$ac_exeext
6851 if { (eval echo "$as_me:6851: \"$ac_link\"") >&5
6852   (eval $ac_link) 2>&5
6853   ac_status=$?
6854   echo "$as_me:6854: \$? = $ac_status" >&5
6855   (exit $ac_status); } &&
6856          { ac_try='test -s conftest$ac_exeext'
6857   { (eval echo "$as_me:6857: \"$ac_try\"") >&5
6858   (eval $ac_try) 2>&5
6859   ac_status=$?
6860   echo "$as_me:6860: \$? = $ac_status" >&5
6861   (exit $ac_status); }; }; then
6862   ac_cv_lib_gpm_initscr=yes
6863 else
6864   echo "$as_me: failed program was:" >&5
6865 cat conftest.$ac_ext >&5
6866 ac_cv_lib_gpm_initscr=no
6867 fi
6868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6869 LIBS=$ac_check_lib_save_LIBS
6870 fi
6871 echo "$as_me:6871: result: $ac_cv_lib_gpm_initscr" >&5
6872 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6873 if test $ac_cv_lib_gpm_initscr = yes; then
6874   LIBS="$cf_ncurses_SAVE"
6875 else
6876   cf_ncurses_LIBS="-lgpm"
6877 fi
6878
6879 fi
6880
6881 case $host_os in #(vi
6882 freebsd*)
6883         # This is only necessary if you are linking against an obsolete
6884         # version of ncurses (but it should do no harm, since it's static).
6885         if test "$cf_nculib_root" = ncurses ; then
6886                 echo "$as_me:6886: checking for tgoto in -lmytinfo" >&5
6887 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6888 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6889   echo $ECHO_N "(cached) $ECHO_C" >&6
6890 else
6891   ac_check_lib_save_LIBS=$LIBS
6892 LIBS="-lmytinfo  $LIBS"
6893 cat >conftest.$ac_ext <<_ACEOF
6894 #line 6894 "configure"
6895 #include "confdefs.h"
6896
6897 /* Override any gcc2 internal prototype to avoid an error.  */
6898 #ifdef __cplusplus
6899 extern "C"
6900 #endif
6901 /* We use char because int might match the return type of a gcc2
6902    builtin and then its argument prototype would still apply.  */
6903 char tgoto ();
6904 int
6905 main ()
6906 {
6907 tgoto ();
6908   ;
6909   return 0;
6910 }
6911 _ACEOF
6912 rm -f conftest.$ac_objext conftest$ac_exeext
6913 if { (eval echo "$as_me:6913: \"$ac_link\"") >&5
6914   (eval $ac_link) 2>&5
6915   ac_status=$?
6916   echo "$as_me:6916: \$? = $ac_status" >&5
6917   (exit $ac_status); } &&
6918          { ac_try='test -s conftest$ac_exeext'
6919   { (eval echo "$as_me:6919: \"$ac_try\"") >&5
6920   (eval $ac_try) 2>&5
6921   ac_status=$?
6922   echo "$as_me:6922: \$? = $ac_status" >&5
6923   (exit $ac_status); }; }; then
6924   ac_cv_lib_mytinfo_tgoto=yes
6925 else
6926   echo "$as_me: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6928 ac_cv_lib_mytinfo_tgoto=no
6929 fi
6930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6931 LIBS=$ac_check_lib_save_LIBS
6932 fi
6933 echo "$as_me:6933: result: $ac_cv_lib_mytinfo_tgoto" >&5
6934 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6935 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6936   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6937 fi
6938
6939         fi
6940         ;;
6941 esac
6942
6943 LIBS="$cf_ncurses_LIBS $LIBS"
6944
6945 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6946 then
6947         LIBS="-l$cf_nculib_root $LIBS"
6948 else
6949
6950         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6951         cf_libdir=""
6952         echo "$as_me:6952: checking for initscr" >&5
6953 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6954 if test "${ac_cv_func_initscr+set}" = set; then
6955   echo $ECHO_N "(cached) $ECHO_C" >&6
6956 else
6957   cat >conftest.$ac_ext <<_ACEOF
6958 #line 6958 "configure"
6959 #include "confdefs.h"
6960 /* System header to define __stub macros and hopefully few prototypes,
6961     which can conflict with char initscr (); below.  */
6962 #include <assert.h>
6963 /* Override any gcc2 internal prototype to avoid an error.  */
6964 #ifdef __cplusplus
6965 extern "C"
6966 #endif
6967 /* We use char because int might match the return type of a gcc2
6968    builtin and then its argument prototype would still apply.  */
6969 char initscr ();
6970 char (*f) ();
6971
6972 int
6973 main ()
6974 {
6975 /* The GNU C library defines this for functions which it implements
6976     to always fail with ENOSYS.  Some functions are actually named
6977     something starting with __ and the normal name is an alias.  */
6978 #if defined (__stub_initscr) || defined (__stub___initscr)
6979 choke me
6980 #else
6981 f = initscr;
6982 #endif
6983
6984   ;
6985   return 0;
6986 }
6987 _ACEOF
6988 rm -f conftest.$ac_objext conftest$ac_exeext
6989 if { (eval echo "$as_me:6989: \"$ac_link\"") >&5
6990   (eval $ac_link) 2>&5
6991   ac_status=$?
6992   echo "$as_me:6992: \$? = $ac_status" >&5
6993   (exit $ac_status); } &&
6994          { ac_try='test -s conftest$ac_exeext'
6995   { (eval echo "$as_me:6995: \"$ac_try\"") >&5
6996   (eval $ac_try) 2>&5
6997   ac_status=$?
6998   echo "$as_me:6998: \$? = $ac_status" >&5
6999   (exit $ac_status); }; }; then
7000   ac_cv_func_initscr=yes
7001 else
7002   echo "$as_me: failed program was:" >&5
7003 cat conftest.$ac_ext >&5
7004 ac_cv_func_initscr=no
7005 fi
7006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7007 fi
7008 echo "$as_me:7008: result: $ac_cv_func_initscr" >&5
7009 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7010 if test $ac_cv_func_initscr = yes; then
7011   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7012 else
7013
7014                 cf_save_LIBS="$LIBS"
7015                 echo "$as_me:7015: checking for initscr in -l$cf_nculib_root" >&5
7016 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7017                 LIBS="-l$cf_nculib_root $LIBS"
7018                 cat >conftest.$ac_ext <<_ACEOF
7019 #line 7019 "configure"
7020 #include "confdefs.h"
7021 #include <${cf_cv_ncurses_header:-curses.h}>
7022 int
7023 main ()
7024 {
7025 initscr()
7026   ;
7027   return 0;
7028 }
7029 _ACEOF
7030 rm -f conftest.$ac_objext conftest$ac_exeext
7031 if { (eval echo "$as_me:7031: \"$ac_link\"") >&5
7032   (eval $ac_link) 2>&5
7033   ac_status=$?
7034   echo "$as_me:7034: \$? = $ac_status" >&5
7035   (exit $ac_status); } &&
7036          { ac_try='test -s conftest$ac_exeext'
7037   { (eval echo "$as_me:7037: \"$ac_try\"") >&5
7038   (eval $ac_try) 2>&5
7039   ac_status=$?
7040   echo "$as_me:7040: \$? = $ac_status" >&5
7041   (exit $ac_status); }; }; then
7042   echo "$as_me:7042: result: yes" >&5
7043 echo "${ECHO_T}yes" >&6
7044                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7045
7046 else
7047   echo "$as_me: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 echo "$as_me:7049: result: no" >&5
7050 echo "${ECHO_T}no" >&6
7051
7052 cf_search=
7053 cf_library_path_list=""
7054 if test -n "${LDFLAGS}${LIBS}" ; then
7055         for cf_library_path in $LDFLAGS $LIBS
7056         do
7057                 case $cf_library_path in #(vi
7058                 -L*)
7059                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7060
7061 test "$cf_library_path" != "NONE" && \
7062 test -d "$cf_library_path" && \
7063  {
7064         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7065         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7066         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7067         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7068         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7069         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
7070 }
7071
7072                         cf_library_path_list="$cf_library_path_list $cf_search"
7073                         ;;
7074                 esac
7075         done
7076 fi
7077
7078 cf_search=
7079
7080 test "/usr" != "$prefix" && \
7081 test -d "/usr" && \
7082 (test $prefix = NONE || test "/usr" != "$prefix") && {
7083         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7084         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7085         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7086         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7087         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7088         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7089 }
7090
7091 test "$prefix" != "NONE" && \
7092 test -d "$prefix" && \
7093  {
7094         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7095         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7096         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7097         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7098         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7099         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7100 }
7101
7102 test "/usr/local" != "$prefix" && \
7103 test -d "/usr/local" && \
7104 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7105         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7106         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7107         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7108         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7109         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7110         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7111 }
7112
7113 test "/opt" != "$prefix" && \
7114 test -d "/opt" && \
7115 (test $prefix = NONE || test "/opt" != "$prefix") && {
7116         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7117         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7118         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7119         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7120         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7121         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7122 }
7123
7124 test "$HOME" != "$prefix" && \
7125 test -d "$HOME" && \
7126 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7127         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7128         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7129         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7130         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7131         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7132         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7133 }
7134
7135 cf_search="$cf_library_path_list $cf_search"
7136
7137                         for cf_libdir in $cf_search
7138                         do
7139                                 echo "$as_me:7139: checking for -l$cf_nculib_root in $cf_libdir" >&5
7140 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7141                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7142                                 cat >conftest.$ac_ext <<_ACEOF
7143 #line 7143 "configure"
7144 #include "confdefs.h"
7145 #include <${cf_cv_ncurses_header:-curses.h}>
7146 int
7147 main ()
7148 {
7149 initscr()
7150   ;
7151   return 0;
7152 }
7153 _ACEOF
7154 rm -f conftest.$ac_objext conftest$ac_exeext
7155 if { (eval echo "$as_me:7155: \"$ac_link\"") >&5
7156   (eval $ac_link) 2>&5
7157   ac_status=$?
7158   echo "$as_me:7158: \$? = $ac_status" >&5
7159   (exit $ac_status); } &&
7160          { ac_try='test -s conftest$ac_exeext'
7161   { (eval echo "$as_me:7161: \"$ac_try\"") >&5
7162   (eval $ac_try) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); }; }; then
7166   echo "$as_me:7166: result: yes" >&5
7167 echo "${ECHO_T}yes" >&6
7168                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7169                                          break
7170 else
7171   echo "$as_me: failed program was:" >&5
7172 cat conftest.$ac_ext >&5
7173 echo "$as_me:7173: result: no" >&5
7174 echo "${ECHO_T}no" >&6
7175                                          LIBS="$cf_save_LIBS"
7176 fi
7177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7178                         done
7179
7180 fi
7181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7182
7183 fi
7184
7185 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7186
7187 if test $cf_found_library = no ; then
7188         { { echo "$as_me:7188: error: Cannot link $cf_nculib_root library" >&5
7189 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7190    { (exit 1); exit 1; }; }
7191 fi
7192
7193 fi
7194
7195 if test -n "$cf_ncurses_LIBS" ; then
7196         echo "$as_me:7196: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7197 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7198         cf_ncurses_SAVE="$LIBS"
7199         for p in $cf_ncurses_LIBS ; do
7200                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7201                 if test "$q" != "$LIBS" ; then
7202                         LIBS="$q"
7203                 fi
7204         done
7205         cat >conftest.$ac_ext <<_ACEOF
7206 #line 7206 "configure"
7207 #include "confdefs.h"
7208 #include <${cf_cv_ncurses_header:-curses.h}>
7209 int
7210 main ()
7211 {
7212 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7213   ;
7214   return 0;
7215 }
7216 _ACEOF
7217 rm -f conftest.$ac_objext conftest$ac_exeext
7218 if { (eval echo "$as_me:7218: \"$ac_link\"") >&5
7219   (eval $ac_link) 2>&5
7220   ac_status=$?
7221   echo "$as_me:7221: \$? = $ac_status" >&5
7222   (exit $ac_status); } &&
7223          { ac_try='test -s conftest$ac_exeext'
7224   { (eval echo "$as_me:7224: \"$ac_try\"") >&5
7225   (eval $ac_try) 2>&5
7226   ac_status=$?
7227   echo "$as_me:7227: \$? = $ac_status" >&5
7228   (exit $ac_status); }; }; then
7229   echo "$as_me:7229: result: yes" >&5
7230 echo "${ECHO_T}yes" >&6
7231 else
7232   echo "$as_me: failed program was:" >&5
7233 cat conftest.$ac_ext >&5
7234 echo "$as_me:7234: result: no" >&5
7235 echo "${ECHO_T}no" >&6
7236                  LIBS="$cf_ncurses_SAVE"
7237 fi
7238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7239 fi
7240
7241 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7242
7243 cat >>confdefs.h <<EOF
7244 #define $cf_nculib_ROOT 1
7245 EOF
7246
7247 fi
7248
7249         ;;
7250 ncursesw)
7251         cf_cv_libtype=w
7252
7253 echo "$as_me:7253: checking for multibyte character support" >&5
7254 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7255 if test "${cf_cv_utf8_lib+set}" = set; then
7256   echo $ECHO_N "(cached) $ECHO_C" >&6
7257 else
7258
7259         cf_save_LIBS="$LIBS"
7260         cat >conftest.$ac_ext <<_ACEOF
7261 #line 7261 "configure"
7262 #include "confdefs.h"
7263
7264 #include <stdlib.h>
7265 int
7266 main ()
7267 {
7268 putwc(0,0);
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 rm -f conftest.$ac_objext conftest$ac_exeext
7274 if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
7275   (eval $ac_link) 2>&5
7276   ac_status=$?
7277   echo "$as_me:7277: \$? = $ac_status" >&5
7278   (exit $ac_status); } &&
7279          { ac_try='test -s conftest$ac_exeext'
7280   { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281   (eval $ac_try) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit $ac_status); }; }; then
7285   cf_cv_utf8_lib=yes
7286 else
7287   echo "$as_me: failed program was:" >&5
7288 cat conftest.$ac_ext >&5
7289
7290 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7291 # will be set on completion of the AC_TRY_LINK below.
7292 cf_cv_header_path_utf8=
7293 cf_cv_library_path_utf8=
7294
7295 echo "${as_me:-configure}:7295: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7296
7297 cf_save_LIBS="$LIBS"
7298
7299 cat >conftest.$ac_ext <<_ACEOF
7300 #line 7300 "configure"
7301 #include "confdefs.h"
7302
7303 #include <libutf8.h>
7304 int
7305 main ()
7306 {
7307 putwc(0,0);
7308   ;
7309   return 0;
7310 }
7311 _ACEOF
7312 rm -f conftest.$ac_objext conftest$ac_exeext
7313 if { (eval echo "$as_me:7313: \"$ac_link\"") >&5
7314   (eval $ac_link) 2>&5
7315   ac_status=$?
7316   echo "$as_me:7316: \$? = $ac_status" >&5
7317   (exit $ac_status); } &&
7318          { ac_try='test -s conftest$ac_exeext'
7319   { (eval echo "$as_me:7319: \"$ac_try\"") >&5
7320   (eval $ac_try) 2>&5
7321   ac_status=$?
7322   echo "$as_me:7322: \$? = $ac_status" >&5
7323   (exit $ac_status); }; }; then
7324
7325         cf_cv_find_linkage_utf8=yes
7326         cf_cv_header_path_utf8=/usr/include
7327         cf_cv_library_path_utf8=/usr/lib
7328
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332
7333 LIBS="-lutf8  $cf_save_LIBS"
7334
7335 cat >conftest.$ac_ext <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338
7339 #include <libutf8.h>
7340 int
7341 main ()
7342 {
7343 putwc(0,0);
7344   ;
7345   return 0;
7346 }
7347 _ACEOF
7348 rm -f conftest.$ac_objext conftest$ac_exeext
7349 if { (eval echo "$as_me:7349: \"$ac_link\"") >&5
7350   (eval $ac_link) 2>&5
7351   ac_status=$?
7352   echo "$as_me:7352: \$? = $ac_status" >&5
7353   (exit $ac_status); } &&
7354          { ac_try='test -s conftest$ac_exeext'
7355   { (eval echo "$as_me:7355: \"$ac_try\"") >&5
7356   (eval $ac_try) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); }; }; then
7360
7361         cf_cv_find_linkage_utf8=yes
7362         cf_cv_header_path_utf8=/usr/include
7363         cf_cv_library_path_utf8=/usr/lib
7364         cf_cv_library_file_utf8="-lutf8"
7365
7366 else
7367   echo "$as_me: failed program was:" >&5
7368 cat conftest.$ac_ext >&5
7369
7370         cf_cv_find_linkage_utf8=no
7371         LIBS="$cf_save_LIBS"
7372
7373     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7374
7375 echo "${as_me:-configure}:7375: testing find linkage for utf8 library ..." 1>&5
7376
7377 echo "${as_me:-configure}:7377: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7378
7379     cf_save_CPPFLAGS="$CPPFLAGS"
7380     cf_test_CPPFLAGS="$CPPFLAGS"
7381
7382 cf_search=
7383
7384 # collect the current set of include-directories from compiler flags
7385 cf_header_path_list=""
7386 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7387         for cf_header_path in $CPPFLAGS $CFLAGS
7388         do
7389                 case $cf_header_path in #(vi
7390                 -I*)
7391                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7392
7393 test "$cf_header_path" != "NONE" && \
7394 test -d "$cf_header_path" && \
7395  {
7396         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7397         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7398         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7399         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7400         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7401         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7402 }
7403
7404                         cf_header_path_list="$cf_header_path_list $cf_search"
7405                         ;;
7406                 esac
7407         done
7408 fi
7409
7410 # add the variations for the package we are looking for
7411
7412 cf_search=
7413
7414 test "/usr" != "$prefix" && \
7415 test -d "/usr" && \
7416 (test $prefix = NONE || test "/usr" != "$prefix") && {
7417         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7418         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7419         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7420         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7421         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7422         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7423 }
7424
7425 test "$prefix" != "NONE" && \
7426 test -d "$prefix" && \
7427  {
7428         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7429         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7430         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7431         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7432         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7433         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7434 }
7435
7436 test "/usr/local" != "$prefix" && \
7437 test -d "/usr/local" && \
7438 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7439         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7440         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7441         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7442         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7443         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7444         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7445 }
7446
7447 test "/opt" != "$prefix" && \
7448 test -d "/opt" && \
7449 (test $prefix = NONE || test "/opt" != "$prefix") && {
7450         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7451         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7452         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7453         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7454         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7455         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7456 }
7457
7458 test "$HOME" != "$prefix" && \
7459 test -d "$HOME" && \
7460 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7461         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7462         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7463         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7464         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7465         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7466         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7467 }
7468
7469 test "$includedir" != NONE && \
7470 test "$includedir" != "/usr/include" && \
7471 test -d "$includedir" && {
7472         test -d $includedir &&    cf_search="$cf_search $includedir"
7473         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7474 }
7475
7476 test "$oldincludedir" != NONE && \
7477 test "$oldincludedir" != "/usr/include" && \
7478 test -d "$oldincludedir" && {
7479         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7480         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7481 }
7482
7483 cf_search="$cf_search $cf_header_path_list"
7484
7485     for cf_cv_header_path_utf8 in $cf_search
7486     do
7487       if test -d $cf_cv_header_path_utf8 ; then
7488         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7489
7490 echo "${as_me:-configure}:7490: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7491
7492         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7493         cat >conftest.$ac_ext <<_ACEOF
7494 #line 7494 "configure"
7495 #include "confdefs.h"
7496
7497 #include <libutf8.h>
7498 int
7499 main ()
7500 {
7501 putwc(0,0);
7502   ;
7503   return 0;
7504 }
7505 _ACEOF
7506 rm -f conftest.$ac_objext
7507 if { (eval echo "$as_me:7507: \"$ac_compile\"") >&5
7508   (eval $ac_compile) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); } &&
7512          { ac_try='test -s conftest.$ac_objext'
7513   { (eval echo "$as_me:7513: \"$ac_try\"") >&5
7514   (eval $ac_try) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); }; }; then
7518
7519             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7520
7521 echo "${as_me:-configure}:7521: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7522
7523             cf_cv_find_linkage_utf8=maybe
7524             cf_test_CPPFLAGS="$CPPFLAGS"
7525             break
7526 else
7527   echo "$as_me: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7529
7530             CPPFLAGS="$cf_save_CPPFLAGS"
7531
7532 fi
7533 rm -f conftest.$ac_objext conftest.$ac_ext
7534       fi
7535     done
7536
7537     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7538
7539 echo "${as_me:-configure}:7539: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7540
7541       cf_save_LIBS="$LIBS"
7542       cf_save_LDFLAGS="$LDFLAGS"
7543
7544       if test "$cf_cv_find_linkage_utf8" != yes ; then
7545
7546 cf_search=
7547 cf_library_path_list=""
7548 if test -n "${LDFLAGS}${LIBS}" ; then
7549         for cf_library_path in $LDFLAGS $LIBS
7550         do
7551                 case $cf_library_path in #(vi
7552                 -L*)
7553                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7554
7555 test "$cf_library_path" != "NONE" && \
7556 test -d "$cf_library_path" && \
7557  {
7558         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7559         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7560         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7561         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7562         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7563         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7564 }
7565
7566                         cf_library_path_list="$cf_library_path_list $cf_search"
7567                         ;;
7568                 esac
7569         done
7570 fi
7571
7572 cf_search=
7573
7574 test "/usr" != "$prefix" && \
7575 test -d "/usr" && \
7576 (test $prefix = NONE || test "/usr" != "$prefix") && {
7577         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7578         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7579         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7580         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7581         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7582         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7583 }
7584
7585 test "$prefix" != "NONE" && \
7586 test -d "$prefix" && \
7587  {
7588         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7589         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7590         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7591         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7592         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7593         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7594 }
7595
7596 test "/usr/local" != "$prefix" && \
7597 test -d "/usr/local" && \
7598 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7599         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7600         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7601         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7602         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7603         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7604         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7605 }
7606
7607 test "/opt" != "$prefix" && \
7608 test -d "/opt" && \
7609 (test $prefix = NONE || test "/opt" != "$prefix") && {
7610         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7611         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7612         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7613         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7614         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7615         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7616 }
7617
7618 test "$HOME" != "$prefix" && \
7619 test -d "$HOME" && \
7620 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7621         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7622         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7623         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7624         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7625         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7626         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7627 }
7628
7629 cf_search="$cf_library_path_list $cf_search"
7630
7631         for cf_cv_library_path_utf8 in $cf_search
7632         do
7633           if test -d $cf_cv_library_path_utf8 ; then
7634             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7635
7636 echo "${as_me:-configure}:7636: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7637
7638             CPPFLAGS="$cf_test_CPPFLAGS"
7639             LIBS="-lutf8  $cf_save_LIBS"
7640             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7641             cat >conftest.$ac_ext <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644
7645 #include <libutf8.h>
7646 int
7647 main ()
7648 {
7649 putwc(0,0);
7650   ;
7651   return 0;
7652 }
7653 _ACEOF
7654 rm -f conftest.$ac_objext conftest$ac_exeext
7655 if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
7656   (eval $ac_link) 2>&5
7657   ac_status=$?
7658   echo "$as_me:7658: \$? = $ac_status" >&5
7659   (exit $ac_status); } &&
7660          { ac_try='test -s conftest$ac_exeext'
7661   { (eval echo "$as_me:7661: \"$ac_try\"") >&5
7662   (eval $ac_try) 2>&5
7663   ac_status=$?
7664   echo "$as_me:7664: \$? = $ac_status" >&5
7665   (exit $ac_status); }; }; then
7666
7667                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7668
7669 echo "${as_me:-configure}:7669: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7670
7671                 cf_cv_find_linkage_utf8=yes
7672                 cf_cv_library_file_utf8="-lutf8"
7673                 break
7674 else
7675   echo "$as_me: failed program was:" >&5
7676 cat conftest.$ac_ext >&5
7677
7678                 CPPFLAGS="$cf_save_CPPFLAGS"
7679                 LIBS="$cf_save_LIBS"
7680                 LDFLAGS="$cf_save_LDFLAGS"
7681
7682 fi
7683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684           fi
7685         done
7686         CPPFLAGS="$cf_save_CPPFLAGS"
7687         LDFLAGS="$cf_save_LDFLAGS"
7688       fi
7689
7690     else
7691       cf_cv_find_linkage_utf8=no
7692     fi
7693
7694 fi
7695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7696
7697 fi
7698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7699
7700 LIBS="$cf_save_LIBS"
7701
7702 if test "$cf_cv_find_linkage_utf8" = yes ; then
7703 cf_cv_utf8_lib=add-on
7704 else
7705 cf_cv_utf8_lib=no
7706 fi
7707
7708 fi
7709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7710 fi
7711 echo "$as_me:7711: result: $cf_cv_utf8_lib" >&5
7712 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7713
7714 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7715 # ncurses/ncursesw:
7716 if test "$cf_cv_utf8_lib" = "add-on" ; then
7717         cat >>confdefs.h <<\EOF
7718 #define HAVE_LIBUTF8_H 1
7719 EOF
7720
7721 if test -n "$cf_cv_header_path_utf8" ; then
7722   for cf_add_incdir in $cf_cv_header_path_utf8
7723   do
7724         while test $cf_add_incdir != /usr/include
7725         do
7726           if test -d $cf_add_incdir
7727           then
7728                 cf_have_incdir=no
7729                 if test -n "$CFLAGS$CPPFLAGS" ; then
7730                   # a loop is needed to ensure we can add subdirs of existing dirs
7731                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7732                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7733                           cf_have_incdir=yes; break
7734                         fi
7735                   done
7736                 fi
7737
7738                 if test "$cf_have_incdir" = no ; then
7739                   if test "$cf_add_incdir" = /usr/local/include ; then
7740                         if test "$GCC" = yes
7741                         then
7742                           cf_save_CPPFLAGS=$CPPFLAGS
7743                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7744                           cat >conftest.$ac_ext <<_ACEOF
7745 #line 7745 "configure"
7746 #include "confdefs.h"
7747 #include <stdio.h>
7748 int
7749 main ()
7750 {
7751 printf("Hello")
7752   ;
7753   return 0;
7754 }
7755 _ACEOF
7756 rm -f conftest.$ac_objext
7757 if { (eval echo "$as_me:7757: \"$ac_compile\"") >&5
7758   (eval $ac_compile) 2>&5
7759   ac_status=$?
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); } &&
7762          { ac_try='test -s conftest.$ac_objext'
7763   { (eval echo "$as_me:7763: \"$ac_try\"") >&5
7764   (eval $ac_try) 2>&5
7765   ac_status=$?
7766   echo "$as_me:7766: \$? = $ac_status" >&5
7767   (exit $ac_status); }; }; then
7768   :
7769 else
7770   echo "$as_me: failed program was:" >&5
7771 cat conftest.$ac_ext >&5
7772 cf_have_incdir=yes
7773 fi
7774 rm -f conftest.$ac_objext conftest.$ac_ext
7775                           CPPFLAGS=$cf_save_CPPFLAGS
7776                         fi
7777                   fi
7778                 fi
7779
7780                 if test "$cf_have_incdir" = no ; then
7781                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7782
7783 echo "${as_me:-configure}:7783: testing adding $cf_add_incdir to include-path ..." 1>&5
7784
7785                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7786
7787                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7788                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7789                   cf_add_incdir="$cf_top_incdir"
7790                 else
7791                   break
7792                 fi
7793           fi
7794         done
7795   done
7796 fi
7797
7798 if test -n "$cf_cv_library_path_utf8" ; then
7799   for cf_add_libdir in $cf_cv_library_path_utf8
7800   do
7801     if test $cf_add_libdir = /usr/lib ; then
7802       :
7803     elif test -d $cf_add_libdir
7804     then
7805       cf_have_libdir=no
7806       if test -n "$LDFLAGS$LIBS" ; then
7807         # a loop is needed to ensure we can add subdirs of existing dirs
7808         for cf_test_libdir in $LDFLAGS $LIBS ; do
7809           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7810             cf_have_libdir=yes; break
7811           fi
7812         done
7813       fi
7814       if test "$cf_have_libdir" = no ; then
7815         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7816
7817 echo "${as_me:-configure}:7817: testing adding $cf_add_libdir to library-path ..." 1>&5
7818
7819         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7820       fi
7821     fi
7822   done
7823 fi
7824
7825         LIBS="$cf_cv_library_file_utf8 $LIBS"
7826 fi
7827
7828 cf_ncuconfig_root=ncursesw
7829
7830 echo "Looking for ${cf_ncuconfig_root}-config"
7831 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7832 do
7833   # Extract the first word of "$ac_prog", so it can be a program name with args.
7834 set dummy $ac_prog; ac_word=$2
7835 echo "$as_me:7835: checking for $ac_word" >&5
7836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7837 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
7838   echo $ECHO_N "(cached) $ECHO_C" >&6
7839 else
7840   case $NCURSES_CONFIG in
7841   [\\/]* | ?:[\\/]*)
7842   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
7843   ;;
7844   *)
7845   ac_save_IFS=$IFS; IFS=$ac_path_separator
7846 ac_dummy="$PATH"
7847 for ac_dir in $ac_dummy; do
7848   IFS=$ac_save_IFS
7849   test -z "$ac_dir" && ac_dir=.
7850   if $as_executable_p "$ac_dir/$ac_word"; then
7851    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
7852    echo "$as_me:7852: found $ac_dir/$ac_word" >&5
7853    break
7854 fi
7855 done
7856
7857   ;;
7858 esac
7859 fi
7860 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
7861
7862 if test -n "$NCURSES_CONFIG"; then
7863   echo "$as_me:7863: result: $NCURSES_CONFIG" >&5
7864 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7865 else
7866   echo "$as_me:7866: result: no" >&5
7867 echo "${ECHO_T}no" >&6
7868 fi
7869
7870   test -n "$NCURSES_CONFIG" && break
7871 done
7872 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
7873
7874 if test "$NCURSES_CONFIG" != none ; then
7875
7876 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7877 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
7878
7879 # even with config script, some packages use no-override for curses.h
7880
7881 echo "$as_me:7881: checking if we have identified curses headers" >&5
7882 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7883 if test "${cf_cv_ncurses_header+set}" = set; then
7884   echo $ECHO_N "(cached) $ECHO_C" >&6
7885 else
7886
7887 cf_cv_ncurses_header=none
7888 for cf_header in  \
7889     ncursesw/ncurses.h \
7890         ncursesw/curses.h \
7891         ncurses.h \
7892         curses.h
7893 do
7894 cat >conftest.$ac_ext <<_ACEOF
7895 #line 7895 "configure"
7896 #include "confdefs.h"
7897 #include <${cf_header}>
7898 int
7899 main ()
7900 {
7901 initscr(); tgoto("?", 0,0)
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 rm -f conftest.$ac_objext
7907 if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
7908   (eval $ac_compile) 2>&5
7909   ac_status=$?
7910   echo "$as_me:7910: \$? = $ac_status" >&5
7911   (exit $ac_status); } &&
7912          { ac_try='test -s conftest.$ac_objext'
7913   { (eval echo "$as_me:7913: \"$ac_try\"") >&5
7914   (eval $ac_try) 2>&5
7915   ac_status=$?
7916   echo "$as_me:7916: \$? = $ac_status" >&5
7917   (exit $ac_status); }; }; then
7918   cf_cv_ncurses_header=$cf_header; break
7919 else
7920   echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922 fi
7923 rm -f conftest.$ac_objext conftest.$ac_ext
7924 done
7925
7926 fi
7927 echo "$as_me:7927: result: $cf_cv_ncurses_header" >&5
7928 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7929
7930 if test "$cf_cv_ncurses_header" = none ; then
7931         { { echo "$as_me:7931: error: No curses header-files found" >&5
7932 echo "$as_me: error: No curses header-files found" >&2;}
7933    { (exit 1); exit 1; }; }
7934 fi
7935
7936 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7937
7938 for ac_header in $cf_cv_ncurses_header
7939 do
7940 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7941 echo "$as_me:7941: checking for $ac_header" >&5
7942 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7943 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7944   echo $ECHO_N "(cached) $ECHO_C" >&6
7945 else
7946   cat >conftest.$ac_ext <<_ACEOF
7947 #line 7947 "configure"
7948 #include "confdefs.h"
7949 #include <$ac_header>
7950 _ACEOF
7951 if { (eval echo "$as_me:7951: \"$ac_cpp conftest.$ac_ext\"") >&5
7952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7953   ac_status=$?
7954   egrep -v '^ *\+' conftest.er1 >conftest.err
7955   rm -f conftest.er1
7956   cat conftest.err >&5
7957   echo "$as_me:7957: \$? = $ac_status" >&5
7958   (exit $ac_status); } >/dev/null; then
7959   if test -s conftest.err; then
7960     ac_cpp_err=$ac_c_preproc_warn_flag
7961   else
7962     ac_cpp_err=
7963   fi
7964 else
7965   ac_cpp_err=yes
7966 fi
7967 if test -z "$ac_cpp_err"; then
7968   eval "$as_ac_Header=yes"
7969 else
7970   echo "$as_me: failed program was:" >&5
7971   cat conftest.$ac_ext >&5
7972   eval "$as_ac_Header=no"
7973 fi
7974 rm -f conftest.err conftest.$ac_ext
7975 fi
7976 echo "$as_me:7976: result: `eval echo '${'$as_ac_Header'}'`" >&5
7977 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7978 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7979   cat >>confdefs.h <<EOF
7980 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7981 EOF
7982
7983 fi
7984 done
7985
7986 cat >>confdefs.h <<\EOF
7987 #define NCURSES 1
7988 EOF
7989
7990 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7991
7992 cat >>confdefs.h <<EOF
7993 #define $cf_nculib_ROOT 1
7994 EOF
7995
7996 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7997
7998 else
7999
8000 cf_ncuhdr_root=ncursesw
8001
8002 test -n "$cf_cv_curses_dir" && \
8003 test "$cf_cv_curses_dir" != "no" && { \
8004
8005 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8006   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8007   do
8008         while test $cf_add_incdir != /usr/include
8009         do
8010           if test -d $cf_add_incdir
8011           then
8012                 cf_have_incdir=no
8013                 if test -n "$CFLAGS$CPPFLAGS" ; then
8014                   # a loop is needed to ensure we can add subdirs of existing dirs
8015                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8016                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8017                           cf_have_incdir=yes; break
8018                         fi
8019                   done
8020                 fi
8021
8022                 if test "$cf_have_incdir" = no ; then
8023                   if test "$cf_add_incdir" = /usr/local/include ; then
8024                         if test "$GCC" = yes
8025                         then
8026                           cf_save_CPPFLAGS=$CPPFLAGS
8027                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8028                           cat >conftest.$ac_ext <<_ACEOF
8029 #line 8029 "configure"
8030 #include "confdefs.h"
8031 #include <stdio.h>
8032 int
8033 main ()
8034 {
8035 printf("Hello")
8036   ;
8037   return 0;
8038 }
8039 _ACEOF
8040 rm -f conftest.$ac_objext
8041 if { (eval echo "$as_me:8041: \"$ac_compile\"") >&5
8042   (eval $ac_compile) 2>&5
8043   ac_status=$?
8044   echo "$as_me:8044: \$? = $ac_status" >&5
8045   (exit $ac_status); } &&
8046          { ac_try='test -s conftest.$ac_objext'
8047   { (eval echo "$as_me:8047: \"$ac_try\"") >&5
8048   (eval $ac_try) 2>&5
8049   ac_status=$?
8050   echo "$as_me:8050: \$? = $ac_status" >&5
8051   (exit $ac_status); }; }; then
8052   :
8053 else
8054   echo "$as_me: failed program was:" >&5
8055 cat conftest.$ac_ext >&5
8056 cf_have_incdir=yes
8057 fi
8058 rm -f conftest.$ac_objext conftest.$ac_ext
8059                           CPPFLAGS=$cf_save_CPPFLAGS
8060                         fi
8061                   fi
8062                 fi
8063
8064                 if test "$cf_have_incdir" = no ; then
8065                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8066
8067 echo "${as_me:-configure}:8067: testing adding $cf_add_incdir to include-path ..." 1>&5
8068
8069                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8070
8071                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8072                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8073                   cf_add_incdir="$cf_top_incdir"
8074                 else
8075                   break
8076                 fi
8077           fi
8078         done
8079   done
8080 fi
8081
8082 }
8083
8084 echo "$as_me:8084: checking for $cf_ncuhdr_root header in include-path" >&5
8085 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8086 if test "${cf_cv_ncurses_h+set}" = set; then
8087   echo $ECHO_N "(cached) $ECHO_C" >&6
8088 else
8089
8090         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8091         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8092         for cf_header in $cf_header_list
8093         do
8094
8095         cat >conftest.$ac_ext <<_ACEOF
8096 #line 8096 "configure"
8097 #include "confdefs.h"
8098
8099 #define _XOPEN_SOURCE_EXTENDED
8100 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
8101 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
8102
8103 #include <$cf_header>
8104 int
8105 main ()
8106 {
8107
8108 #ifdef NCURSES_VERSION
8109
8110 #ifndef WACS_BSSB
8111         make an error
8112 #endif
8113
8114 printf("%s\n", NCURSES_VERSION);
8115 #else
8116 #ifdef __NCURSES_H
8117 printf("old\n");
8118 #else
8119         make an error
8120 #endif
8121 #endif
8122
8123   ;
8124   return 0;
8125 }
8126 _ACEOF
8127 rm -f conftest.$ac_objext
8128 if { (eval echo "$as_me:8128: \"$ac_compile\"") >&5
8129   (eval $ac_compile) 2>&5
8130   ac_status=$?
8131   echo "$as_me:8131: \$? = $ac_status" >&5
8132   (exit $ac_status); } &&
8133          { ac_try='test -s conftest.$ac_objext'
8134   { (eval echo "$as_me:8134: \"$ac_try\"") >&5
8135   (eval $ac_try) 2>&5
8136   ac_status=$?
8137   echo "$as_me:8137: \$? = $ac_status" >&5
8138   (exit $ac_status); }; }; then
8139   cf_cv_ncurses_h=$cf_header
8140
8141 else
8142   echo "$as_me: failed program was:" >&5
8143 cat conftest.$ac_ext >&5
8144 cf_cv_ncurses_h=no
8145 fi
8146 rm -f conftest.$ac_objext conftest.$ac_ext
8147
8148                 test "$cf_cv_ncurses_h" != no && break
8149         done
8150
8151 fi
8152 echo "$as_me:8152: result: $cf_cv_ncurses_h" >&5
8153 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8154
8155 if test "$cf_cv_ncurses_h" != no ; then
8156         cf_cv_ncurses_header=$cf_cv_ncurses_h
8157 else
8158
8159 echo "$as_me:8159: checking for $cf_ncuhdr_root include-path" >&5
8160 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8161 if test "${cf_cv_ncurses_h2+set}" = set; then
8162   echo $ECHO_N "(cached) $ECHO_C" >&6
8163 else
8164
8165         test -n "$verbose" && echo
8166
8167 cf_search=
8168
8169 # collect the current set of include-directories from compiler flags
8170 cf_header_path_list=""
8171 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8172         for cf_header_path in $CPPFLAGS $CFLAGS
8173         do
8174                 case $cf_header_path in #(vi
8175                 -I*)
8176                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8177
8178 test "$cf_header_path" != "NONE" && \
8179 test -d "$cf_header_path" && \
8180  {
8181         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8182         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8183         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8184         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8185         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8186         test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8187 }
8188
8189                         cf_header_path_list="$cf_header_path_list $cf_search"
8190                         ;;
8191                 esac
8192         done
8193 fi
8194
8195 # add the variations for the package we are looking for
8196
8197 cf_search=
8198
8199 test "/usr" != "$prefix" && \
8200 test -d "/usr" && \
8201 (test $prefix = NONE || test "/usr" != "$prefix") && {
8202         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8203         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8204         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8205         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8206         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8207         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8208 }
8209
8210 test "$prefix" != "NONE" && \
8211 test -d "$prefix" && \
8212  {
8213         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8214         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8215         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8216         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8217         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8218         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8219 }
8220
8221 test "/usr/local" != "$prefix" && \
8222 test -d "/usr/local" && \
8223 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8224         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8225         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8226         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8227         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8228         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8229         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8230 }
8231
8232 test "/opt" != "$prefix" && \
8233 test -d "/opt" && \
8234 (test $prefix = NONE || test "/opt" != "$prefix") && {
8235         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8236         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8237         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8238         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8239         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8240         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8241 }
8242
8243 test "$HOME" != "$prefix" && \
8244 test -d "$HOME" && \
8245 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8246         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8247         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8248         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8249         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8250         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8251         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8252 }
8253
8254 test "$includedir" != NONE && \
8255 test "$includedir" != "/usr/include" && \
8256 test -d "$includedir" && {
8257         test -d $includedir &&    cf_search="$cf_search $includedir"
8258         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8259 }
8260
8261 test "$oldincludedir" != NONE && \
8262 test "$oldincludedir" != "/usr/include" && \
8263 test -d "$oldincludedir" && {
8264         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8265         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8266 }
8267
8268 cf_search="$cf_search $cf_header_path_list"
8269
8270         test -n "$verbose" && echo search path $cf_search
8271         cf_save2_CPPFLAGS="$CPPFLAGS"
8272         for cf_incdir in $cf_search
8273         do
8274
8275 if test -n "$cf_incdir" ; then
8276   for cf_add_incdir in $cf_incdir
8277   do
8278         while test $cf_add_incdir != /usr/include
8279         do
8280           if test -d $cf_add_incdir
8281           then
8282                 cf_have_incdir=no
8283                 if test -n "$CFLAGS$CPPFLAGS" ; then
8284                   # a loop is needed to ensure we can add subdirs of existing dirs
8285                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8286                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8287                           cf_have_incdir=yes; break
8288                         fi
8289                   done
8290                 fi
8291
8292                 if test "$cf_have_incdir" = no ; then
8293                   if test "$cf_add_incdir" = /usr/local/include ; then
8294                         if test "$GCC" = yes
8295                         then
8296                           cf_save_CPPFLAGS=$CPPFLAGS
8297                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8298                           cat >conftest.$ac_ext <<_ACEOF
8299 #line 8299 "configure"
8300 #include "confdefs.h"
8301 #include <stdio.h>
8302 int
8303 main ()
8304 {
8305 printf("Hello")
8306   ;
8307   return 0;
8308 }
8309 _ACEOF
8310 rm -f conftest.$ac_objext
8311 if { (eval echo "$as_me:8311: \"$ac_compile\"") >&5
8312   (eval $ac_compile) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); } &&
8316          { ac_try='test -s conftest.$ac_objext'
8317   { (eval echo "$as_me:8317: \"$ac_try\"") >&5
8318   (eval $ac_try) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); }; }; then
8322   :
8323 else
8324   echo "$as_me: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 cf_have_incdir=yes
8327 fi
8328 rm -f conftest.$ac_objext conftest.$ac_ext
8329                           CPPFLAGS=$cf_save_CPPFLAGS
8330                         fi
8331                   fi
8332                 fi
8333
8334                 if test "$cf_have_incdir" = no ; then
8335                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8336
8337 echo "${as_me:-configure}:8337: testing adding $cf_add_incdir to include-path ..." 1>&5
8338
8339                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8340
8341                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8342                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8343                   cf_add_incdir="$cf_top_incdir"
8344                 else
8345                   break
8346                 fi
8347           fi
8348         done
8349   done
8350 fi
8351
8352                 for cf_header in \
8353                         ncurses.h \
8354                         curses.h
8355                 do
8356
8357         cat >conftest.$ac_ext <<_ACEOF
8358 #line 8358 "configure"
8359 #include "confdefs.h"
8360
8361 #include <$cf_header>
8362 int
8363 main ()
8364 {
8365
8366 #ifdef NCURSES_VERSION
8367
8368 printf("%s\n", NCURSES_VERSION);
8369 #else
8370 #ifdef __NCURSES_H
8371 printf("old\n");
8372 #else
8373         make an error
8374 #endif
8375 #endif
8376
8377   ;
8378   return 0;
8379 }
8380 _ACEOF
8381 rm -f conftest.$ac_objext
8382 if { (eval echo "$as_me:8382: \"$ac_compile\"") >&5
8383   (eval $ac_compile) 2>&5
8384   ac_status=$?
8385   echo "$as_me:8385: \$? = $ac_status" >&5
8386   (exit $ac_status); } &&
8387          { ac_try='test -s conftest.$ac_objext'
8388   { (eval echo "$as_me:8388: \"$ac_try\"") >&5
8389   (eval $ac_try) 2>&5
8390   ac_status=$?
8391   echo "$as_me:8391: \$? = $ac_status" >&5
8392   (exit $ac_status); }; }; then
8393   cf_cv_ncurses_h2=$cf_header
8394
8395 else
8396   echo "$as_me: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 cf_cv_ncurses_h2=no
8399 fi
8400 rm -f conftest.$ac_objext conftest.$ac_ext
8401
8402                         if test "$cf_cv_ncurses_h2" != no ; then
8403                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8404                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
8405                                 break
8406                         fi
8407                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
8408                 done
8409                 CPPFLAGS="$cf_save2_CPPFLAGS"
8410                 test "$cf_cv_ncurses_h2" != no && break
8411         done
8412         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8412: error: not found" >&5
8413 echo "$as_me: error: not found" >&2;}
8414    { (exit 1); exit 1; }; }
8415
8416 fi
8417 echo "$as_me:8417: result: $cf_cv_ncurses_h2" >&5
8418 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8419
8420         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8421         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8422         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8423                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8424         fi
8425
8426 if test -n "$cf_1st_incdir" ; then
8427   for cf_add_incdir in $cf_1st_incdir
8428   do
8429         while test $cf_add_incdir != /usr/include
8430         do
8431           if test -d $cf_add_incdir
8432           then
8433                 cf_have_incdir=no
8434                 if test -n "$CFLAGS$CPPFLAGS" ; then
8435                   # a loop is needed to ensure we can add subdirs of existing dirs
8436                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8437                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8438                           cf_have_incdir=yes; break
8439                         fi
8440                   done
8441                 fi
8442
8443                 if test "$cf_have_incdir" = no ; then
8444                   if test "$cf_add_incdir" = /usr/local/include ; then
8445                         if test "$GCC" = yes
8446                         then
8447                           cf_save_CPPFLAGS=$CPPFLAGS
8448                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8449                           cat >conftest.$ac_ext <<_ACEOF
8450 #line 8450 "configure"
8451 #include "confdefs.h"
8452 #include <stdio.h>
8453 int
8454 main ()
8455 {
8456 printf("Hello")
8457   ;
8458   return 0;
8459 }
8460 _ACEOF
8461 rm -f conftest.$ac_objext
8462 if { (eval echo "$as_me:8462: \"$ac_compile\"") >&5
8463   (eval $ac_compile) 2>&5
8464   ac_status=$?
8465   echo "$as_me:8465: \$? = $ac_status" >&5
8466   (exit $ac_status); } &&
8467          { ac_try='test -s conftest.$ac_objext'
8468   { (eval echo "$as_me:8468: \"$ac_try\"") >&5
8469   (eval $ac_try) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit $ac_status); }; }; then
8473   :
8474 else
8475   echo "$as_me: failed program was:" >&5
8476 cat conftest.$ac_ext >&5
8477 cf_have_incdir=yes
8478 fi
8479 rm -f conftest.$ac_objext conftest.$ac_ext
8480                           CPPFLAGS=$cf_save_CPPFLAGS
8481                         fi
8482                   fi
8483                 fi
8484
8485                 if test "$cf_have_incdir" = no ; then
8486                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8487
8488 echo "${as_me:-configure}:8488: testing adding $cf_add_incdir to include-path ..." 1>&5
8489
8490                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8491
8492                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8493                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8494                   cf_add_incdir="$cf_top_incdir"
8495                 else
8496                   break
8497                 fi
8498           fi
8499         done
8500   done
8501 fi
8502
8503 fi
8504
8505 # Set definitions to allow ifdef'ing for ncurses.h
8506
8507 case $cf_cv_ncurses_header in # (vi
8508 *ncurses.h)
8509         cat >>confdefs.h <<\EOF
8510 #define HAVE_NCURSES_H 1
8511 EOF
8512
8513         ;;
8514 esac
8515
8516 case $cf_cv_ncurses_header in # (vi
8517 ncurses/curses.h|ncurses/ncurses.h)
8518         cat >>confdefs.h <<\EOF
8519 #define HAVE_NCURSES_NCURSES_H 1
8520 EOF
8521
8522         ;;
8523 ncursesw/curses.h|ncursesw/ncurses.h)
8524         cat >>confdefs.h <<\EOF
8525 #define HAVE_NCURSESW_NCURSES_H 1
8526 EOF
8527
8528         ;;
8529 esac
8530
8531 echo "$as_me:8531: checking for terminfo header" >&5
8532 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8533 if test "${cf_cv_term_header+set}" = set; then
8534   echo $ECHO_N "(cached) $ECHO_C" >&6
8535 else
8536
8537 case ${cf_cv_ncurses_header} in #(vi
8538 */ncurses.h|*/ncursesw.h) #(vi
8539         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8540         ;;
8541 *)
8542         cf_term_header=term.h
8543         ;;
8544 esac
8545
8546 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8547 do
8548 cat >conftest.$ac_ext <<_ACEOF
8549 #line 8549 "configure"
8550 #include "confdefs.h"
8551 #include <stdio.h>
8552 #include <${cf_cv_ncurses_header:-curses.h}>
8553 #include <$cf_test>
8554
8555 int
8556 main ()
8557 {
8558 int x = auto_left_margin
8559   ;
8560   return 0;
8561 }
8562 _ACEOF
8563 rm -f conftest.$ac_objext
8564 if { (eval echo "$as_me:8564: \"$ac_compile\"") >&5
8565   (eval $ac_compile) 2>&5
8566   ac_status=$?
8567   echo "$as_me:8567: \$? = $ac_status" >&5
8568   (exit $ac_status); } &&
8569          { ac_try='test -s conftest.$ac_objext'
8570   { (eval echo "$as_me:8570: \"$ac_try\"") >&5
8571   (eval $ac_try) 2>&5
8572   ac_status=$?
8573   echo "$as_me:8573: \$? = $ac_status" >&5
8574   (exit $ac_status); }; }; then
8575
8576         cf_cv_term_header="$cf_test"
8577 else
8578   echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8580
8581         cf_cv_term_header=unknown
8582
8583 fi
8584 rm -f conftest.$ac_objext conftest.$ac_ext
8585         test "$cf_cv_term_header" != unknown && break
8586 done
8587
8588 fi
8589 echo "$as_me:8589: result: $cf_cv_term_header" >&5
8590 echo "${ECHO_T}$cf_cv_term_header" >&6
8591
8592 # Set definitions to allow ifdef'ing to accommodate subdirectories
8593
8594 case $cf_cv_term_header in # (vi
8595 *term.h)
8596         cat >>confdefs.h <<\EOF
8597 #define HAVE_TERM_H 1
8598 EOF
8599
8600         ;;
8601 esac
8602
8603 case $cf_cv_term_header in # (vi
8604 ncurses/term.h) #(vi
8605         cat >>confdefs.h <<\EOF
8606 #define HAVE_NCURSES_TERM_H 1
8607 EOF
8608
8609         ;;
8610 ncursesw/term.h)
8611         cat >>confdefs.h <<\EOF
8612 #define HAVE_NCURSESW_TERM_H 1
8613 EOF
8614
8615         ;;
8616 esac
8617
8618 # some applications need this, but should check for NCURSES_VERSION
8619 cat >>confdefs.h <<\EOF
8620 #define NCURSES 1
8621 EOF
8622
8623 echo "$as_me:8623: checking for ncurses version" >&5
8624 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8625 if test "${cf_cv_ncurses_version+set}" = set; then
8626   echo $ECHO_N "(cached) $ECHO_C" >&6
8627 else
8628
8629         cf_cv_ncurses_version=no
8630         cf_tempfile=out$$
8631         rm -f $cf_tempfile
8632         if test "$cross_compiling" = yes; then
8633
8634         # This will not work if the preprocessor splits the line after the
8635         # Autoconf token.  The 'unproto' program does that.
8636         cat > conftest.$ac_ext <<EOF
8637 #include <${cf_cv_ncurses_header:-curses.h}>
8638 #undef Autoconf
8639 #ifdef NCURSES_VERSION
8640 Autoconf NCURSES_VERSION
8641 #else
8642 #ifdef __NCURSES_H
8643 Autoconf "old"
8644 #endif
8645 ;
8646 #endif
8647 EOF
8648         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8649         { (eval echo "$as_me:8649: \"$cf_try\"") >&5
8650   (eval $cf_try) 2>&5
8651   ac_status=$?
8652   echo "$as_me:8652: \$? = $ac_status" >&5
8653   (exit $ac_status); }
8654         if test -f conftest.out ; then
8655                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8656                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8657                 rm -f conftest.out
8658         fi
8659
8660 else
8661   cat >conftest.$ac_ext <<_ACEOF
8662 #line 8662 "configure"
8663 #include "confdefs.h"
8664
8665 #include <${cf_cv_ncurses_header:-curses.h}>
8666 #include <stdio.h>
8667 int main()
8668 {
8669         FILE *fp = fopen("$cf_tempfile", "w");
8670 #ifdef NCURSES_VERSION
8671 # ifdef NCURSES_VERSION_PATCH
8672         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8673 # else
8674         fprintf(fp, "%s\n", NCURSES_VERSION);
8675 # endif
8676 #else
8677 # ifdef __NCURSES_H
8678         fprintf(fp, "old\n");
8679 # else
8680         make an error
8681 # endif
8682 #endif
8683         ${cf_cv_main_return:-return}(0);
8684 }
8685 _ACEOF
8686 rm -f conftest$ac_exeext
8687 if { (eval echo "$as_me:8687: \"$ac_link\"") >&5
8688   (eval $ac_link) 2>&5
8689   ac_status=$?
8690   echo "$as_me:8690: \$? = $ac_status" >&5
8691   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8692   { (eval echo "$as_me:8692: \"$ac_try\"") >&5
8693   (eval $ac_try) 2>&5
8694   ac_status=$?
8695   echo "$as_me:8695: \$? = $ac_status" >&5
8696   (exit $ac_status); }; }; then
8697
8698         cf_cv_ncurses_version=`cat $cf_tempfile`
8699 else
8700   echo "$as_me: program exited with status $ac_status" >&5
8701 echo "$as_me: failed program was:" >&5
8702 cat conftest.$ac_ext >&5
8703 fi
8704 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8705 fi
8706         rm -f $cf_tempfile
8707
8708 fi
8709 echo "$as_me:8709: result: $cf_cv_ncurses_version" >&5
8710 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8711 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
8712 #define NCURSES 1
8713 EOF
8714
8715 cf_nculib_root=ncursesw
8716         # This works, except for the special case where we find gpm, but
8717         # ncurses is in a nonstandard location via $LIBS, and we really want
8718         # to link gpm.
8719 cf_ncurses_LIBS=""
8720 cf_ncurses_SAVE="$LIBS"
8721 echo "$as_me:8721: checking for Gpm_Open in -lgpm" >&5
8722 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8723 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8724   echo $ECHO_N "(cached) $ECHO_C" >&6
8725 else
8726   ac_check_lib_save_LIBS=$LIBS
8727 LIBS="-lgpm  $LIBS"
8728 cat >conftest.$ac_ext <<_ACEOF
8729 #line 8729 "configure"
8730 #include "confdefs.h"
8731
8732 /* Override any gcc2 internal prototype to avoid an error.  */
8733 #ifdef __cplusplus
8734 extern "C"
8735 #endif
8736 /* We use char because int might match the return type of a gcc2
8737    builtin and then its argument prototype would still apply.  */
8738 char Gpm_Open ();
8739 int
8740 main ()
8741 {
8742 Gpm_Open ();
8743   ;
8744   return 0;
8745 }
8746 _ACEOF
8747 rm -f conftest.$ac_objext conftest$ac_exeext
8748 if { (eval echo "$as_me:8748: \"$ac_link\"") >&5
8749   (eval $ac_link) 2>&5
8750   ac_status=$?
8751   echo "$as_me:8751: \$? = $ac_status" >&5
8752   (exit $ac_status); } &&
8753          { ac_try='test -s conftest$ac_exeext'
8754   { (eval echo "$as_me:8754: \"$ac_try\"") >&5
8755   (eval $ac_try) 2>&5
8756   ac_status=$?
8757   echo "$as_me:8757: \$? = $ac_status" >&5
8758   (exit $ac_status); }; }; then
8759   ac_cv_lib_gpm_Gpm_Open=yes
8760 else
8761   echo "$as_me: failed program was:" >&5
8762 cat conftest.$ac_ext >&5
8763 ac_cv_lib_gpm_Gpm_Open=no
8764 fi
8765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8766 LIBS=$ac_check_lib_save_LIBS
8767 fi
8768 echo "$as_me:8768: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8769 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8770 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8771   echo "$as_me:8771: checking for initscr in -lgpm" >&5
8772 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8773 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8774   echo $ECHO_N "(cached) $ECHO_C" >&6
8775 else
8776   ac_check_lib_save_LIBS=$LIBS
8777 LIBS="-lgpm  $LIBS"
8778 cat >conftest.$ac_ext <<_ACEOF
8779 #line 8779 "configure"
8780 #include "confdefs.h"
8781
8782 /* Override any gcc2 internal prototype to avoid an error.  */
8783 #ifdef __cplusplus
8784 extern "C"
8785 #endif
8786 /* We use char because int might match the return type of a gcc2
8787    builtin and then its argument prototype would still apply.  */
8788 char initscr ();
8789 int
8790 main ()
8791 {
8792 initscr ();
8793   ;
8794   return 0;
8795 }
8796 _ACEOF
8797 rm -f conftest.$ac_objext conftest$ac_exeext
8798 if { (eval echo "$as_me:8798: \"$ac_link\"") >&5
8799   (eval $ac_link) 2>&5
8800   ac_status=$?
8801   echo "$as_me:8801: \$? = $ac_status" >&5
8802   (exit $ac_status); } &&
8803          { ac_try='test -s conftest$ac_exeext'
8804   { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8805   (eval $ac_try) 2>&5
8806   ac_status=$?
8807   echo "$as_me:8807: \$? = $ac_status" >&5
8808   (exit $ac_status); }; }; then
8809   ac_cv_lib_gpm_initscr=yes
8810 else
8811   echo "$as_me: failed program was:" >&5
8812 cat conftest.$ac_ext >&5
8813 ac_cv_lib_gpm_initscr=no
8814 fi
8815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8816 LIBS=$ac_check_lib_save_LIBS
8817 fi
8818 echo "$as_me:8818: result: $ac_cv_lib_gpm_initscr" >&5
8819 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8820 if test $ac_cv_lib_gpm_initscr = yes; then
8821   LIBS="$cf_ncurses_SAVE"
8822 else
8823   cf_ncurses_LIBS="-lgpm"
8824 fi
8825
8826 fi
8827
8828 case $host_os in #(vi
8829 freebsd*)
8830         # This is only necessary if you are linking against an obsolete
8831         # version of ncurses (but it should do no harm, since it's static).
8832         if test "$cf_nculib_root" = ncurses ; then
8833                 echo "$as_me:8833: checking for tgoto in -lmytinfo" >&5
8834 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8835 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8836   echo $ECHO_N "(cached) $ECHO_C" >&6
8837 else
8838   ac_check_lib_save_LIBS=$LIBS
8839 LIBS="-lmytinfo  $LIBS"
8840 cat >conftest.$ac_ext <<_ACEOF
8841 #line 8841 "configure"
8842 #include "confdefs.h"
8843
8844 /* Override any gcc2 internal prototype to avoid an error.  */
8845 #ifdef __cplusplus
8846 extern "C"
8847 #endif
8848 /* We use char because int might match the return type of a gcc2
8849    builtin and then its argument prototype would still apply.  */
8850 char tgoto ();
8851 int
8852 main ()
8853 {
8854 tgoto ();
8855   ;
8856   return 0;
8857 }
8858 _ACEOF
8859 rm -f conftest.$ac_objext conftest$ac_exeext
8860 if { (eval echo "$as_me:8860: \"$ac_link\"") >&5
8861   (eval $ac_link) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); } &&
8865          { ac_try='test -s conftest$ac_exeext'
8866   { (eval echo "$as_me:8866: \"$ac_try\"") >&5
8867   (eval $ac_try) 2>&5
8868   ac_status=$?
8869   echo "$as_me:8869: \$? = $ac_status" >&5
8870   (exit $ac_status); }; }; then
8871   ac_cv_lib_mytinfo_tgoto=yes
8872 else
8873   echo "$as_me: failed program was:" >&5
8874 cat conftest.$ac_ext >&5
8875 ac_cv_lib_mytinfo_tgoto=no
8876 fi
8877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8878 LIBS=$ac_check_lib_save_LIBS
8879 fi
8880 echo "$as_me:8880: result: $ac_cv_lib_mytinfo_tgoto" >&5
8881 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8882 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8883   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8884 fi
8885
8886         fi
8887         ;;
8888 esac
8889
8890 LIBS="$cf_ncurses_LIBS $LIBS"
8891
8892 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8893 then
8894         LIBS="-l$cf_nculib_root $LIBS"
8895 else
8896
8897         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8898         cf_libdir=""
8899         echo "$as_me:8899: checking for initscr" >&5
8900 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8901 if test "${ac_cv_func_initscr+set}" = set; then
8902   echo $ECHO_N "(cached) $ECHO_C" >&6
8903 else
8904   cat >conftest.$ac_ext <<_ACEOF
8905 #line 8905 "configure"
8906 #include "confdefs.h"
8907 /* System header to define __stub macros and hopefully few prototypes,
8908     which can conflict with char initscr (); below.  */
8909 #include <assert.h>
8910 /* Override any gcc2 internal prototype to avoid an error.  */
8911 #ifdef __cplusplus
8912 extern "C"
8913 #endif
8914 /* We use char because int might match the return type of a gcc2
8915    builtin and then its argument prototype would still apply.  */
8916 char initscr ();
8917 char (*f) ();
8918
8919 int
8920 main ()
8921 {
8922 /* The GNU C library defines this for functions which it implements
8923     to always fail with ENOSYS.  Some functions are actually named
8924     something starting with __ and the normal name is an alias.  */
8925 #if defined (__stub_initscr) || defined (__stub___initscr)
8926 choke me
8927 #else
8928 f = initscr;
8929 #endif
8930
8931   ;
8932   return 0;
8933 }
8934 _ACEOF
8935 rm -f conftest.$ac_objext conftest$ac_exeext
8936 if { (eval echo "$as_me:8936: \"$ac_link\"") >&5
8937   (eval $ac_link) 2>&5
8938   ac_status=$?
8939   echo "$as_me:8939: \$? = $ac_status" >&5
8940   (exit $ac_status); } &&
8941          { ac_try='test -s conftest$ac_exeext'
8942   { (eval echo "$as_me:8942: \"$ac_try\"") >&5
8943   (eval $ac_try) 2>&5
8944   ac_status=$?
8945   echo "$as_me:8945: \$? = $ac_status" >&5
8946   (exit $ac_status); }; }; then
8947   ac_cv_func_initscr=yes
8948 else
8949   echo "$as_me: failed program was:" >&5
8950 cat conftest.$ac_ext >&5
8951 ac_cv_func_initscr=no
8952 fi
8953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8954 fi
8955 echo "$as_me:8955: result: $ac_cv_func_initscr" >&5
8956 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8957 if test $ac_cv_func_initscr = yes; then
8958   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8959 else
8960
8961                 cf_save_LIBS="$LIBS"
8962                 echo "$as_me:8962: checking for initscr in -l$cf_nculib_root" >&5
8963 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8964                 LIBS="-l$cf_nculib_root $LIBS"
8965                 cat >conftest.$ac_ext <<_ACEOF
8966 #line 8966 "configure"
8967 #include "confdefs.h"
8968 #include <${cf_cv_ncurses_header:-curses.h}>
8969 int
8970 main ()
8971 {
8972 initscr()
8973   ;
8974   return 0;
8975 }
8976 _ACEOF
8977 rm -f conftest.$ac_objext conftest$ac_exeext
8978 if { (eval echo "$as_me:8978: \"$ac_link\"") >&5
8979   (eval $ac_link) 2>&5
8980   ac_status=$?
8981   echo "$as_me:8981: \$? = $ac_status" >&5
8982   (exit $ac_status); } &&
8983          { ac_try='test -s conftest$ac_exeext'
8984   { (eval echo "$as_me:8984: \"$ac_try\"") >&5
8985   (eval $ac_try) 2>&5
8986   ac_status=$?
8987   echo "$as_me:8987: \$? = $ac_status" >&5
8988   (exit $ac_status); }; }; then
8989   echo "$as_me:8989: result: yes" >&5
8990 echo "${ECHO_T}yes" >&6
8991                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8992
8993 else
8994   echo "$as_me: failed program was:" >&5
8995 cat conftest.$ac_ext >&5
8996 echo "$as_me:8996: result: no" >&5
8997 echo "${ECHO_T}no" >&6
8998
8999 cf_search=
9000 cf_library_path_list=""
9001 if test -n "${LDFLAGS}${LIBS}" ; then
9002         for cf_library_path in $LDFLAGS $LIBS
9003         do
9004                 case $cf_library_path in #(vi
9005                 -L*)
9006                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9007
9008 test "$cf_library_path" != "NONE" && \
9009 test -d "$cf_library_path" && \
9010  {
9011         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9012         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9013         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9014         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9015         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9016         test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
9017 }
9018
9019                         cf_library_path_list="$cf_library_path_list $cf_search"
9020                         ;;
9021                 esac
9022         done
9023 fi
9024
9025 cf_search=
9026
9027 test "/usr" != "$prefix" && \
9028 test -d "/usr" && \
9029 (test $prefix = NONE || test "/usr" != "$prefix") && {
9030         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9031         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9032         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
9033         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9034         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
9035         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9036 }
9037
9038 test "$prefix" != "NONE" && \
9039 test -d "$prefix" && \
9040  {
9041         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9042         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9043         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9044         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9045         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9046         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9047 }
9048
9049 test "/usr/local" != "$prefix" && \
9050 test -d "/usr/local" && \
9051 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9052         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9053         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9054         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9055         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9056         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9057         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9058 }
9059
9060 test "/opt" != "$prefix" && \
9061 test -d "/opt" && \
9062 (test $prefix = NONE || test "/opt" != "$prefix") && {
9063         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9064         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9065         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
9066         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9067         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
9068         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9069 }
9070
9071 test "$HOME" != "$prefix" && \
9072 test -d "$HOME" && \
9073 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9074         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9075         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9076         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9077         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9078         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9079         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9080 }
9081
9082 cf_search="$cf_library_path_list $cf_search"
9083
9084                         for cf_libdir in $cf_search
9085                         do
9086                                 echo "$as_me:9086: checking for -l$cf_nculib_root in $cf_libdir" >&5
9087 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9088                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9089                                 cat >conftest.$ac_ext <<_ACEOF
9090 #line 9090 "configure"
9091 #include "confdefs.h"
9092 #include <${cf_cv_ncurses_header:-curses.h}>
9093 int
9094 main ()
9095 {
9096 initscr()
9097   ;
9098   return 0;
9099 }
9100 _ACEOF
9101 rm -f conftest.$ac_objext conftest$ac_exeext
9102 if { (eval echo "$as_me:9102: \"$ac_link\"") >&5
9103   (eval $ac_link) 2>&5
9104   ac_status=$?
9105   echo "$as_me:9105: \$? = $ac_status" >&5
9106   (exit $ac_status); } &&
9107          { ac_try='test -s conftest$ac_exeext'
9108   { (eval echo "$as_me:9108: \"$ac_try\"") >&5
9109   (eval $ac_try) 2>&5
9110   ac_status=$?
9111   echo "$as_me:9111: \$? = $ac_status" >&5
9112   (exit $ac_status); }; }; then
9113   echo "$as_me:9113: result: yes" >&5
9114 echo "${ECHO_T}yes" >&6
9115                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9116                                          break
9117 else
9118   echo "$as_me: failed program was:" >&5
9119 cat conftest.$ac_ext >&5
9120 echo "$as_me:9120: result: no" >&5
9121 echo "${ECHO_T}no" >&6
9122                                          LIBS="$cf_save_LIBS"
9123 fi
9124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9125                         done
9126
9127 fi
9128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9129
9130 fi
9131
9132 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9133
9134 if test $cf_found_library = no ; then
9135         { { echo "$as_me:9135: error: Cannot link $cf_nculib_root library" >&5
9136 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9137    { (exit 1); exit 1; }; }
9138 fi
9139
9140 fi
9141
9142 if test -n "$cf_ncurses_LIBS" ; then
9143         echo "$as_me:9143: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9144 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9145         cf_ncurses_SAVE="$LIBS"
9146         for p in $cf_ncurses_LIBS ; do
9147                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9148                 if test "$q" != "$LIBS" ; then
9149                         LIBS="$q"
9150                 fi
9151         done
9152         cat >conftest.$ac_ext <<_ACEOF
9153 #line 9153 "configure"
9154 #include "confdefs.h"
9155 #include <${cf_cv_ncurses_header:-curses.h}>
9156 int
9157 main ()
9158 {
9159 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9160   ;
9161   return 0;
9162 }
9163 _ACEOF
9164 rm -f conftest.$ac_objext conftest$ac_exeext
9165 if { (eval echo "$as_me:9165: \"$ac_link\"") >&5
9166   (eval $ac_link) 2>&5
9167   ac_status=$?
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit $ac_status); } &&
9170          { ac_try='test -s conftest$ac_exeext'
9171   { (eval echo "$as_me:9171: \"$ac_try\"") >&5
9172   (eval $ac_try) 2>&5
9173   ac_status=$?
9174   echo "$as_me:9174: \$? = $ac_status" >&5
9175   (exit $ac_status); }; }; then
9176   echo "$as_me:9176: result: yes" >&5
9177 echo "${ECHO_T}yes" >&6
9178 else
9179   echo "$as_me: failed program was:" >&5
9180 cat conftest.$ac_ext >&5
9181 echo "$as_me:9181: result: no" >&5
9182 echo "${ECHO_T}no" >&6
9183                  LIBS="$cf_ncurses_SAVE"
9184 fi
9185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9186 fi
9187
9188 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9189
9190 cat >>confdefs.h <<EOF
9191 #define $cf_nculib_ROOT 1
9192 EOF
9193
9194 fi
9195
9196         ;;
9197 pdcurses) #(vi
9198
9199 echo "$as_me:9199: checking if you want to use pkg-config" >&5
9200 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9201
9202 # Check whether --with-pkg-config or --without-pkg-config was given.
9203 if test "${with_pkg_config+set}" = set; then
9204   withval="$with_pkg_config"
9205   cf_pkg_config=$withval
9206 else
9207   cf_pkg_config=yes
9208 fi;
9209 echo "$as_me:9209: result: $cf_pkg_config" >&5
9210 echo "${ECHO_T}$cf_pkg_config" >&6
9211
9212 case $cf_pkg_config in #(vi
9213 no) #(vi
9214         PKG_CONFIG=none
9215         ;;
9216 yes) #(vi
9217
9218 if test -n "$ac_tool_prefix"; then
9219   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9220 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9221 echo "$as_me:9221: checking for $ac_word" >&5
9222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9223 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9224   echo $ECHO_N "(cached) $ECHO_C" >&6
9225 else
9226   case $PKG_CONFIG in
9227   [\\/]* | ?:[\\/]*)
9228   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9229   ;;
9230   *)
9231   ac_save_IFS=$IFS; IFS=$ac_path_separator
9232 ac_dummy="$PATH"
9233 for ac_dir in $ac_dummy; do
9234   IFS=$ac_save_IFS
9235   test -z "$ac_dir" && ac_dir=.
9236   if $as_executable_p "$ac_dir/$ac_word"; then
9237    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9238    echo "$as_me:9238: found $ac_dir/$ac_word" >&5
9239    break
9240 fi
9241 done
9242
9243   ;;
9244 esac
9245 fi
9246 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9247
9248 if test -n "$PKG_CONFIG"; then
9249   echo "$as_me:9249: result: $PKG_CONFIG" >&5
9250 echo "${ECHO_T}$PKG_CONFIG" >&6
9251 else
9252   echo "$as_me:9252: result: no" >&5
9253 echo "${ECHO_T}no" >&6
9254 fi
9255
9256 fi
9257 if test -z "$ac_cv_path_PKG_CONFIG"; then
9258   ac_pt_PKG_CONFIG=$PKG_CONFIG
9259   # Extract the first word of "pkg-config", so it can be a program name with args.
9260 set dummy pkg-config; ac_word=$2
9261 echo "$as_me:9261: checking for $ac_word" >&5
9262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9263 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9264   echo $ECHO_N "(cached) $ECHO_C" >&6
9265 else
9266   case $ac_pt_PKG_CONFIG in
9267   [\\/]* | ?:[\\/]*)
9268   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9269   ;;
9270   *)
9271   ac_save_IFS=$IFS; IFS=$ac_path_separator
9272 ac_dummy="$PATH"
9273 for ac_dir in $ac_dummy; do
9274   IFS=$ac_save_IFS
9275   test -z "$ac_dir" && ac_dir=.
9276   if $as_executable_p "$ac_dir/$ac_word"; then
9277    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9278    echo "$as_me:9278: found $ac_dir/$ac_word" >&5
9279    break
9280 fi
9281 done
9282
9283   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9284   ;;
9285 esac
9286 fi
9287 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9288
9289 if test -n "$ac_pt_PKG_CONFIG"; then
9290   echo "$as_me:9290: result: $ac_pt_PKG_CONFIG" >&5
9291 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9292 else
9293   echo "$as_me:9293: result: no" >&5
9294 echo "${ECHO_T}no" >&6
9295 fi
9296
9297   PKG_CONFIG=$ac_pt_PKG_CONFIG
9298 else
9299   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9300 fi
9301
9302         ;;
9303 *)
9304         PKG_CONFIG=$withval
9305         ;;
9306 esac
9307
9308 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9309 if test "$PKG_CONFIG" != none ; then
9310
9311 if test "x$prefix" != xNONE; then
9312   cf_path_syntax="$prefix"
9313 else
9314   cf_path_syntax="$ac_default_prefix"
9315 fi
9316
9317 case ".$PKG_CONFIG" in #(vi
9318 .\$\(*\)*|.\'*\'*) #(vi
9319   ;;
9320 ..|./*|.\\*) #(vi
9321   ;;
9322 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9323   ;;
9324 .\${*prefix}*) #(vi
9325   eval PKG_CONFIG="$PKG_CONFIG"
9326   case ".$PKG_CONFIG" in #(vi
9327   .NONE/*)
9328     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9329     ;;
9330   esac
9331   ;; #(vi
9332 .no|.NONE/*)
9333   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9334   ;;
9335 *)
9336   { { echo "$as_me:9336: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9337 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9338    { (exit 1); exit 1; }; }
9339   ;;
9340 esac
9341
9342 fi
9343
9344 echo "$as_me:9344: checking for X" >&5
9345 echo $ECHO_N "checking for X... $ECHO_C" >&6
9346
9347 # Check whether --with-x or --without-x was given.
9348 if test "${with_x+set}" = set; then
9349   withval="$with_x"
9350
9351 fi;
9352 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9353 if test "x$with_x" = xno; then
9354   # The user explicitly disabled X.
9355   have_x=disabled
9356 else
9357   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9358     # Both variables are already set.
9359     have_x=yes
9360   else
9361     if test "${ac_cv_have_x+set}" = set; then
9362   echo $ECHO_N "(cached) $ECHO_C" >&6
9363 else
9364   # One or both of the vars are not set, and there is no cached value.
9365 ac_x_includes=no ac_x_libraries=no
9366 rm -fr conftest.dir
9367 if mkdir conftest.dir; then
9368   cd conftest.dir
9369   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9370   cat >Imakefile <<'EOF'
9371 acfindx:
9372         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9373 EOF
9374   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9375     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9376     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9377     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9378     for ac_extension in a so sl dylib dll; do
9379       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9380          test -f $ac_im_libdir/libX11.$ac_extension; then
9381         ac_im_usrlibdir=$ac_im_libdir; break
9382       fi
9383     done
9384     # Screen out bogus values from the imake configuration.  They are
9385     # bogus both because they are the default anyway, and because
9386     # using them would break gcc on systems where it needs fixed includes.
9387     case $ac_im_incroot in
9388         /usr/include) ;;
9389         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9390     esac
9391     case $ac_im_usrlibdir in
9392         /usr/lib | /lib) ;;
9393         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9394     esac
9395   fi
9396   cd ..
9397   rm -fr conftest.dir
9398 fi
9399
9400 # Standard set of common directories for X headers.
9401 # Check X11 before X11Rn because it is often a symlink to the current release.
9402 ac_x_header_dirs='
9403 /usr/X11/include
9404 /usr/X11R6/include
9405 /usr/X11R5/include
9406 /usr/X11R4/include
9407
9408 /usr/include/X11
9409 /usr/include/X11R6
9410 /usr/include/X11R5
9411 /usr/include/X11R4
9412
9413 /usr/local/X11/include
9414 /usr/local/X11R6/include
9415 /usr/local/X11R5/include
9416 /usr/local/X11R4/include
9417
9418 /usr/local/include/X11
9419 /usr/local/include/X11R6
9420 /usr/local/include/X11R5
9421 /usr/local/include/X11R4
9422
9423 /usr/X386/include
9424 /usr/x386/include
9425 /usr/XFree86/include/X11
9426
9427 /usr/include
9428 /usr/local/include
9429 /usr/unsupported/include
9430 /usr/athena/include
9431 /usr/local/x11r5/include
9432 /usr/lpp/Xamples/include
9433
9434 /usr/openwin/include
9435 /usr/openwin/share/include'
9436
9437 if test "$ac_x_includes" = no; then
9438   # Guess where to find include files, by looking for Intrinsic.h.
9439   # First, try using that file with no special directory specified.
9440   cat >conftest.$ac_ext <<_ACEOF
9441 #line 9441 "configure"
9442 #include "confdefs.h"
9443 #include <X11/Intrinsic.h>
9444 _ACEOF
9445 if { (eval echo "$as_me:9445: \"$ac_cpp conftest.$ac_ext\"") >&5
9446   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9447   ac_status=$?
9448   egrep -v '^ *\+' conftest.er1 >conftest.err
9449   rm -f conftest.er1
9450   cat conftest.err >&5
9451   echo "$as_me:9451: \$? = $ac_status" >&5
9452   (exit $ac_status); } >/dev/null; then
9453   if test -s conftest.err; then
9454     ac_cpp_err=$ac_c_preproc_warn_flag
9455   else
9456     ac_cpp_err=
9457   fi
9458 else
9459   ac_cpp_err=yes
9460 fi
9461 if test -z "$ac_cpp_err"; then
9462   # We can compile using X headers with no special include directory.
9463 ac_x_includes=
9464 else
9465   echo "$as_me: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   for ac_dir in $ac_x_header_dirs; do
9468   if test -r "$ac_dir/X11/Intrinsic.h"; then
9469     ac_x_includes=$ac_dir
9470     break
9471   fi
9472 done
9473 fi
9474 rm -f conftest.err conftest.$ac_ext
9475 fi # $ac_x_includes = no
9476
9477 if test "$ac_x_libraries" = no; then
9478   # Check for the libraries.
9479   # See if we find them without any special options.
9480   # Don't add to $LIBS permanently.
9481   ac_save_LIBS=$LIBS
9482   LIBS="-lXt $LIBS"
9483   cat >conftest.$ac_ext <<_ACEOF
9484 #line 9484 "configure"
9485 #include "confdefs.h"
9486 #include <X11/Intrinsic.h>
9487 int
9488 main ()
9489 {
9490 XtMalloc (0)
9491   ;
9492   return 0;
9493 }
9494 _ACEOF
9495 rm -f conftest.$ac_objext conftest$ac_exeext
9496 if { (eval echo "$as_me:9496: \"$ac_link\"") >&5
9497   (eval $ac_link) 2>&5
9498   ac_status=$?
9499   echo "$as_me:9499: \$? = $ac_status" >&5
9500   (exit $ac_status); } &&
9501          { ac_try='test -s conftest$ac_exeext'
9502   { (eval echo "$as_me:9502: \"$ac_try\"") >&5
9503   (eval $ac_try) 2>&5
9504   ac_status=$?
9505   echo "$as_me:9505: \$? = $ac_status" >&5
9506   (exit $ac_status); }; }; then
9507   LIBS=$ac_save_LIBS
9508 # We can link X programs with no special library path.
9509 ac_x_libraries=
9510 else
9511   echo "$as_me: failed program was:" >&5
9512 cat conftest.$ac_ext >&5
9513 LIBS=$ac_save_LIBS
9514 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9515 do
9516   # Don't even attempt the hair of trying to link an X program!
9517   for ac_extension in a so sl dylib dll; do
9518     if test -r $ac_dir/libXt.$ac_extension; then
9519       ac_x_libraries=$ac_dir
9520       break 2
9521     fi
9522   done
9523 done
9524 fi
9525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9526 fi # $ac_x_libraries = no
9527
9528 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9529   # Didn't find X anywhere.  Cache the known absence of X.
9530   ac_cv_have_x="have_x=no"
9531 else
9532   # Record where we found X for the cache.
9533   ac_cv_have_x="have_x=yes \
9534                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9535 fi
9536 fi
9537
9538   fi
9539   eval "$ac_cv_have_x"
9540 fi # $with_x != no
9541
9542 if test "$have_x" != yes; then
9543   echo "$as_me:9543: result: $have_x" >&5
9544 echo "${ECHO_T}$have_x" >&6
9545   no_x=yes
9546 else
9547   # If each of the values was on the command line, it overrides each guess.
9548   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9549   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9550   # Update the cache value to reflect the command line values.
9551   ac_cv_have_x="have_x=yes \
9552                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9553   echo "$as_me:9553: result: libraries $x_libraries, headers $x_includes" >&5
9554 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9555 fi
9556
9557 if test "$no_x" = yes; then
9558   # Not all programs may use this symbol, but it does not hurt to define it.
9559
9560 cat >>confdefs.h <<\EOF
9561 #define X_DISPLAY_MISSING 1
9562 EOF
9563
9564   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9565 else
9566   if test -n "$x_includes"; then
9567     X_CFLAGS="$X_CFLAGS -I$x_includes"
9568   fi
9569
9570   # It would also be nice to do this for all -L options, not just this one.
9571   if test -n "$x_libraries"; then
9572     X_LIBS="$X_LIBS -L$x_libraries"
9573     # For Solaris; some versions of Sun CC require a space after -R and
9574     # others require no space.  Words are not sufficient . . . .
9575     case `(uname -sr) 2>/dev/null` in
9576     "SunOS 5"*)
9577       echo "$as_me:9577: checking whether -R must be followed by a space" >&5
9578 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9579       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9580       cat >conftest.$ac_ext <<_ACEOF
9581 #line 9581 "configure"
9582 #include "confdefs.h"
9583
9584 int
9585 main ()
9586 {
9587
9588   ;
9589   return 0;
9590 }
9591 _ACEOF
9592 rm -f conftest.$ac_objext conftest$ac_exeext
9593 if { (eval echo "$as_me:9593: \"$ac_link\"") >&5
9594   (eval $ac_link) 2>&5
9595   ac_status=$?
9596   echo "$as_me:9596: \$? = $ac_status" >&5
9597   (exit $ac_status); } &&
9598          { ac_try='test -s conftest$ac_exeext'
9599   { (eval echo "$as_me:9599: \"$ac_try\"") >&5
9600   (eval $ac_try) 2>&5
9601   ac_status=$?
9602   echo "$as_me:9602: \$? = $ac_status" >&5
9603   (exit $ac_status); }; }; then
9604   ac_R_nospace=yes
9605 else
9606   echo "$as_me: failed program was:" >&5
9607 cat conftest.$ac_ext >&5
9608 ac_R_nospace=no
9609 fi
9610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9611       if test $ac_R_nospace = yes; then
9612         echo "$as_me:9612: result: no" >&5
9613 echo "${ECHO_T}no" >&6
9614         X_LIBS="$X_LIBS -R$x_libraries"
9615       else
9616         LIBS="$ac_xsave_LIBS -R $x_libraries"
9617         cat >conftest.$ac_ext <<_ACEOF
9618 #line 9618 "configure"
9619 #include "confdefs.h"
9620
9621 int
9622 main ()
9623 {
9624
9625   ;
9626   return 0;
9627 }
9628 _ACEOF
9629 rm -f conftest.$ac_objext conftest$ac_exeext
9630 if { (eval echo "$as_me:9630: \"$ac_link\"") >&5
9631   (eval $ac_link) 2>&5
9632   ac_status=$?
9633   echo "$as_me:9633: \$? = $ac_status" >&5
9634   (exit $ac_status); } &&
9635          { ac_try='test -s conftest$ac_exeext'
9636   { (eval echo "$as_me:9636: \"$ac_try\"") >&5
9637   (eval $ac_try) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); }; }; then
9641   ac_R_space=yes
9642 else
9643   echo "$as_me: failed program was:" >&5
9644 cat conftest.$ac_ext >&5
9645 ac_R_space=no
9646 fi
9647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9648         if test $ac_R_space = yes; then
9649           echo "$as_me:9649: result: yes" >&5
9650 echo "${ECHO_T}yes" >&6
9651           X_LIBS="$X_LIBS -R $x_libraries"
9652         else
9653           echo "$as_me:9653: result: neither works" >&5
9654 echo "${ECHO_T}neither works" >&6
9655         fi
9656       fi
9657       LIBS=$ac_xsave_LIBS
9658     esac
9659   fi
9660
9661   # Check for system-dependent libraries X programs must link with.
9662   # Do this before checking for the system-independent R6 libraries
9663   # (-lICE), since we may need -lsocket or whatever for X linking.
9664
9665   if test "$ISC" = yes; then
9666     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9667   else
9668     # Martyn Johnson says this is needed for Ultrix, if the X
9669     # libraries were built with DECnet support.  And Karl Berry says
9670     # the Alpha needs dnet_stub (dnet does not exist).
9671     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9672     cat >conftest.$ac_ext <<_ACEOF
9673 #line 9673 "configure"
9674 #include "confdefs.h"
9675
9676 /* Override any gcc2 internal prototype to avoid an error.  */
9677 #ifdef __cplusplus
9678 extern "C"
9679 #endif
9680 /* We use char because int might match the return type of a gcc2
9681    builtin and then its argument prototype would still apply.  */
9682 char XOpenDisplay ();
9683 int
9684 main ()
9685 {
9686 XOpenDisplay ();
9687   ;
9688   return 0;
9689 }
9690 _ACEOF
9691 rm -f conftest.$ac_objext conftest$ac_exeext
9692 if { (eval echo "$as_me:9692: \"$ac_link\"") >&5
9693   (eval $ac_link) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit $ac_status); } &&
9697          { ac_try='test -s conftest$ac_exeext'
9698   { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); }; }; then
9703   :
9704 else
9705   echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9707 echo "$as_me:9707: checking for dnet_ntoa in -ldnet" >&5
9708 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9709 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9710   echo $ECHO_N "(cached) $ECHO_C" >&6
9711 else
9712   ac_check_lib_save_LIBS=$LIBS
9713 LIBS="-ldnet  $LIBS"
9714 cat >conftest.$ac_ext <<_ACEOF
9715 #line 9715 "configure"
9716 #include "confdefs.h"
9717
9718 /* Override any gcc2 internal prototype to avoid an error.  */
9719 #ifdef __cplusplus
9720 extern "C"
9721 #endif
9722 /* We use char because int might match the return type of a gcc2
9723    builtin and then its argument prototype would still apply.  */
9724 char dnet_ntoa ();
9725 int
9726 main ()
9727 {
9728 dnet_ntoa ();
9729   ;
9730   return 0;
9731 }
9732 _ACEOF
9733 rm -f conftest.$ac_objext conftest$ac_exeext
9734 if { (eval echo "$as_me:9734: \"$ac_link\"") >&5
9735   (eval $ac_link) 2>&5
9736   ac_status=$?
9737   echo "$as_me:9737: \$? = $ac_status" >&5
9738   (exit $ac_status); } &&
9739          { ac_try='test -s conftest$ac_exeext'
9740   { (eval echo "$as_me:9740: \"$ac_try\"") >&5
9741   (eval $ac_try) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); }; }; then
9745   ac_cv_lib_dnet_dnet_ntoa=yes
9746 else
9747   echo "$as_me: failed program was:" >&5
9748 cat conftest.$ac_ext >&5
9749 ac_cv_lib_dnet_dnet_ntoa=no
9750 fi
9751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9752 LIBS=$ac_check_lib_save_LIBS
9753 fi
9754 echo "$as_me:9754: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9755 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9756 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9757   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9758 fi
9759
9760     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9761       echo "$as_me:9761: checking for dnet_ntoa in -ldnet_stub" >&5
9762 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9763 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9764   echo $ECHO_N "(cached) $ECHO_C" >&6
9765 else
9766   ac_check_lib_save_LIBS=$LIBS
9767 LIBS="-ldnet_stub  $LIBS"
9768 cat >conftest.$ac_ext <<_ACEOF
9769 #line 9769 "configure"
9770 #include "confdefs.h"
9771
9772 /* Override any gcc2 internal prototype to avoid an error.  */
9773 #ifdef __cplusplus
9774 extern "C"
9775 #endif
9776 /* We use char because int might match the return type of a gcc2
9777    builtin and then its argument prototype would still apply.  */
9778 char dnet_ntoa ();
9779 int
9780 main ()
9781 {
9782 dnet_ntoa ();
9783   ;
9784   return 0;
9785 }
9786 _ACEOF
9787 rm -f conftest.$ac_objext conftest$ac_exeext
9788 if { (eval echo "$as_me:9788: \"$ac_link\"") >&5
9789   (eval $ac_link) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); } &&
9793          { ac_try='test -s conftest$ac_exeext'
9794   { (eval echo "$as_me:9794: \"$ac_try\"") >&5
9795   (eval $ac_try) 2>&5
9796   ac_status=$?
9797   echo "$as_me:9797: \$? = $ac_status" >&5
9798   (exit $ac_status); }; }; then
9799   ac_cv_lib_dnet_stub_dnet_ntoa=yes
9800 else
9801   echo "$as_me: failed program was:" >&5
9802 cat conftest.$ac_ext >&5
9803 ac_cv_lib_dnet_stub_dnet_ntoa=no
9804 fi
9805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9806 LIBS=$ac_check_lib_save_LIBS
9807 fi
9808 echo "$as_me:9808: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9809 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9810 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9811   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9812 fi
9813
9814     fi
9815 fi
9816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9817     LIBS="$ac_xsave_LIBS"
9818
9819     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9820     # to get the SysV transport functions.
9821     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9822     # needs -lnsl.
9823     # The nsl library prevents programs from opening the X display
9824     # on Irix 5.2, according to T.E. Dickey.
9825     # The functions gethostbyname, getservbyname, and inet_addr are
9826     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9827     echo "$as_me:9827: checking for gethostbyname" >&5
9828 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9829 if test "${ac_cv_func_gethostbyname+set}" = set; then
9830   echo $ECHO_N "(cached) $ECHO_C" >&6
9831 else
9832   cat >conftest.$ac_ext <<_ACEOF
9833 #line 9833 "configure"
9834 #include "confdefs.h"
9835 /* System header to define __stub macros and hopefully few prototypes,
9836     which can conflict with char gethostbyname (); below.  */
9837 #include <assert.h>
9838 /* Override any gcc2 internal prototype to avoid an error.  */
9839 #ifdef __cplusplus
9840 extern "C"
9841 #endif
9842 /* We use char because int might match the return type of a gcc2
9843    builtin and then its argument prototype would still apply.  */
9844 char gethostbyname ();
9845 char (*f) ();
9846
9847 int
9848 main ()
9849 {
9850 /* The GNU C library defines this for functions which it implements
9851     to always fail with ENOSYS.  Some functions are actually named
9852     something starting with __ and the normal name is an alias.  */
9853 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9854 choke me
9855 #else
9856 f = gethostbyname;
9857 #endif
9858
9859   ;
9860   return 0;
9861 }
9862 _ACEOF
9863 rm -f conftest.$ac_objext conftest$ac_exeext
9864 if { (eval echo "$as_me:9864: \"$ac_link\"") >&5
9865   (eval $ac_link) 2>&5
9866   ac_status=$?
9867   echo "$as_me:9867: \$? = $ac_status" >&5
9868   (exit $ac_status); } &&
9869          { ac_try='test -s conftest$ac_exeext'
9870   { (eval echo "$as_me:9870: \"$ac_try\"") >&5
9871   (eval $ac_try) 2>&5
9872   ac_status=$?
9873   echo "$as_me:9873: \$? = $ac_status" >&5
9874   (exit $ac_status); }; }; then
9875   ac_cv_func_gethostbyname=yes
9876 else
9877   echo "$as_me: failed program was:" >&5
9878 cat conftest.$ac_ext >&5
9879 ac_cv_func_gethostbyname=no
9880 fi
9881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9882 fi
9883 echo "$as_me:9883: result: $ac_cv_func_gethostbyname" >&5
9884 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9885
9886     if test $ac_cv_func_gethostbyname = no; then
9887       echo "$as_me:9887: checking for gethostbyname in -lnsl" >&5
9888 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9889 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9890   echo $ECHO_N "(cached) $ECHO_C" >&6
9891 else
9892   ac_check_lib_save_LIBS=$LIBS
9893 LIBS="-lnsl  $LIBS"
9894 cat >conftest.$ac_ext <<_ACEOF
9895 #line 9895 "configure"
9896 #include "confdefs.h"
9897
9898 /* Override any gcc2 internal prototype to avoid an error.  */
9899 #ifdef __cplusplus
9900 extern "C"
9901 #endif
9902 /* We use char because int might match the return type of a gcc2
9903    builtin and then its argument prototype would still apply.  */
9904 char gethostbyname ();
9905 int
9906 main ()
9907 {
9908 gethostbyname ();
9909   ;
9910   return 0;
9911 }
9912 _ACEOF
9913 rm -f conftest.$ac_objext conftest$ac_exeext
9914 if { (eval echo "$as_me:9914: \"$ac_link\"") >&5
9915   (eval $ac_link) 2>&5
9916   ac_status=$?
9917   echo "$as_me:9917: \$? = $ac_status" >&5
9918   (exit $ac_status); } &&
9919          { ac_try='test -s conftest$ac_exeext'
9920   { (eval echo "$as_me:9920: \"$ac_try\"") >&5
9921   (eval $ac_try) 2>&5
9922   ac_status=$?
9923   echo "$as_me:9923: \$? = $ac_status" >&5
9924   (exit $ac_status); }; }; then
9925   ac_cv_lib_nsl_gethostbyname=yes
9926 else
9927   echo "$as_me: failed program was:" >&5
9928 cat conftest.$ac_ext >&5
9929 ac_cv_lib_nsl_gethostbyname=no
9930 fi
9931 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9932 LIBS=$ac_check_lib_save_LIBS
9933 fi
9934 echo "$as_me:9934: result: $ac_cv_lib_nsl_gethostbyname" >&5
9935 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9936 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9937   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9938 fi
9939
9940       if test $ac_cv_lib_nsl_gethostbyname = no; then
9941         echo "$as_me:9941: checking for gethostbyname in -lbsd" >&5
9942 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9943 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9944   echo $ECHO_N "(cached) $ECHO_C" >&6
9945 else
9946   ac_check_lib_save_LIBS=$LIBS
9947 LIBS="-lbsd  $LIBS"
9948 cat >conftest.$ac_ext <<_ACEOF
9949 #line 9949 "configure"
9950 #include "confdefs.h"
9951
9952 /* Override any gcc2 internal prototype to avoid an error.  */
9953 #ifdef __cplusplus
9954 extern "C"
9955 #endif
9956 /* We use char because int might match the return type of a gcc2
9957    builtin and then its argument prototype would still apply.  */
9958 char gethostbyname ();
9959 int
9960 main ()
9961 {
9962 gethostbyname ();
9963   ;
9964   return 0;
9965 }
9966 _ACEOF
9967 rm -f conftest.$ac_objext conftest$ac_exeext
9968 if { (eval echo "$as_me:9968: \"$ac_link\"") >&5
9969   (eval $ac_link) 2>&5
9970   ac_status=$?
9971   echo "$as_me:9971: \$? = $ac_status" >&5
9972   (exit $ac_status); } &&
9973          { ac_try='test -s conftest$ac_exeext'
9974   { (eval echo "$as_me:9974: \"$ac_try\"") >&5
9975   (eval $ac_try) 2>&5
9976   ac_status=$?
9977   echo "$as_me:9977: \$? = $ac_status" >&5
9978   (exit $ac_status); }; }; then
9979   ac_cv_lib_bsd_gethostbyname=yes
9980 else
9981   echo "$as_me: failed program was:" >&5
9982 cat conftest.$ac_ext >&5
9983 ac_cv_lib_bsd_gethostbyname=no
9984 fi
9985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9986 LIBS=$ac_check_lib_save_LIBS
9987 fi
9988 echo "$as_me:9988: result: $ac_cv_lib_bsd_gethostbyname" >&5
9989 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9990 if test $ac_cv_lib_bsd_gethostbyname = yes; then
9991   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9992 fi
9993
9994       fi
9995     fi
9996
9997     # lieder@skyler.mavd.honeywell.com says without -lsocket,
9998     # socket/setsockopt and other routines are undefined under SCO ODT
9999     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
10000     # on later versions), says Simon Leinen: it contains gethostby*
10001     # variants that don't use the nameserver (or something).  -lsocket
10002     # must be given before -lnsl if both are needed.  We assume that
10003     # if connect needs -lnsl, so does gethostbyname.
10004     echo "$as_me:10004: checking for connect" >&5
10005 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10006 if test "${ac_cv_func_connect+set}" = set; then
10007   echo $ECHO_N "(cached) $ECHO_C" >&6
10008 else
10009   cat >conftest.$ac_ext <<_ACEOF
10010 #line 10010 "configure"
10011 #include "confdefs.h"
10012 /* System header to define __stub macros and hopefully few prototypes,
10013     which can conflict with char connect (); below.  */
10014 #include <assert.h>
10015 /* Override any gcc2 internal prototype to avoid an error.  */
10016 #ifdef __cplusplus
10017 extern "C"
10018 #endif
10019 /* We use char because int might match the return type of a gcc2
10020    builtin and then its argument prototype would still apply.  */
10021 char connect ();
10022 char (*f) ();
10023
10024 int
10025 main ()
10026 {
10027 /* The GNU C library defines this for functions which it implements
10028     to always fail with ENOSYS.  Some functions are actually named
10029     something starting with __ and the normal name is an alias.  */
10030 #if defined (__stub_connect) || defined (__stub___connect)
10031 choke me
10032 #else
10033 f = connect;
10034 #endif
10035
10036   ;
10037   return 0;
10038 }
10039 _ACEOF
10040 rm -f conftest.$ac_objext conftest$ac_exeext
10041 if { (eval echo "$as_me:10041: \"$ac_link\"") >&5
10042   (eval $ac_link) 2>&5
10043   ac_status=$?
10044   echo "$as_me:10044: \$? = $ac_status" >&5
10045   (exit $ac_status); } &&
10046          { ac_try='test -s conftest$ac_exeext'
10047   { (eval echo "$as_me:10047: \"$ac_try\"") >&5
10048   (eval $ac_try) 2>&5
10049   ac_status=$?
10050   echo "$as_me:10050: \$? = $ac_status" >&5
10051   (exit $ac_status); }; }; then
10052   ac_cv_func_connect=yes
10053 else
10054   echo "$as_me: failed program was:" >&5
10055 cat conftest.$ac_ext >&5
10056 ac_cv_func_connect=no
10057 fi
10058 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10059 fi
10060 echo "$as_me:10060: result: $ac_cv_func_connect" >&5
10061 echo "${ECHO_T}$ac_cv_func_connect" >&6
10062
10063     if test $ac_cv_func_connect = no; then
10064       echo "$as_me:10064: checking for connect in -lsocket" >&5
10065 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10066 if test "${ac_cv_lib_socket_connect+set}" = set; then
10067   echo $ECHO_N "(cached) $ECHO_C" >&6
10068 else
10069   ac_check_lib_save_LIBS=$LIBS
10070 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10071 cat >conftest.$ac_ext <<_ACEOF
10072 #line 10072 "configure"
10073 #include "confdefs.h"
10074
10075 /* Override any gcc2 internal prototype to avoid an error.  */
10076 #ifdef __cplusplus
10077 extern "C"
10078 #endif
10079 /* We use char because int might match the return type of a gcc2
10080    builtin and then its argument prototype would still apply.  */
10081 char connect ();
10082 int
10083 main ()
10084 {
10085 connect ();
10086   ;
10087   return 0;
10088 }
10089 _ACEOF
10090 rm -f conftest.$ac_objext conftest$ac_exeext
10091 if { (eval echo "$as_me:10091: \"$ac_link\"") >&5
10092   (eval $ac_link) 2>&5
10093   ac_status=$?
10094   echo "$as_me:10094: \$? = $ac_status" >&5
10095   (exit $ac_status); } &&
10096          { ac_try='test -s conftest$ac_exeext'
10097   { (eval echo "$as_me:10097: \"$ac_try\"") >&5
10098   (eval $ac_try) 2>&5
10099   ac_status=$?
10100   echo "$as_me:10100: \$? = $ac_status" >&5
10101   (exit $ac_status); }; }; then
10102   ac_cv_lib_socket_connect=yes
10103 else
10104   echo "$as_me: failed program was:" >&5
10105 cat conftest.$ac_ext >&5
10106 ac_cv_lib_socket_connect=no
10107 fi
10108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10109 LIBS=$ac_check_lib_save_LIBS
10110 fi
10111 echo "$as_me:10111: result: $ac_cv_lib_socket_connect" >&5
10112 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10113 if test $ac_cv_lib_socket_connect = yes; then
10114   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10115 fi
10116
10117     fi
10118
10119     # Guillermo Gomez says -lposix is necessary on A/UX.
10120     echo "$as_me:10120: checking for remove" >&5
10121 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10122 if test "${ac_cv_func_remove+set}" = set; then
10123   echo $ECHO_N "(cached) $ECHO_C" >&6
10124 else
10125   cat >conftest.$ac_ext <<_ACEOF
10126 #line 10126 "configure"
10127 #include "confdefs.h"
10128 /* System header to define __stub macros and hopefully few prototypes,
10129     which can conflict with char remove (); below.  */
10130 #include <assert.h>
10131 /* Override any gcc2 internal prototype to avoid an error.  */
10132 #ifdef __cplusplus
10133 extern "C"
10134 #endif
10135 /* We use char because int might match the return type of a gcc2
10136    builtin and then its argument prototype would still apply.  */
10137 char remove ();
10138 char (*f) ();
10139
10140 int
10141 main ()
10142 {
10143 /* The GNU C library defines this for functions which it implements
10144     to always fail with ENOSYS.  Some functions are actually named
10145     something starting with __ and the normal name is an alias.  */
10146 #if defined (__stub_remove) || defined (__stub___remove)
10147 choke me
10148 #else
10149 f = remove;
10150 #endif
10151
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 rm -f conftest.$ac_objext conftest$ac_exeext
10157 if { (eval echo "$as_me:10157: \"$ac_link\"") >&5
10158   (eval $ac_link) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit $ac_status); } &&
10162          { ac_try='test -s conftest$ac_exeext'
10163   { (eval echo "$as_me:10163: \"$ac_try\"") >&5
10164   (eval $ac_try) 2>&5
10165   ac_status=$?
10166   echo "$as_me:10166: \$? = $ac_status" >&5
10167   (exit $ac_status); }; }; then
10168   ac_cv_func_remove=yes
10169 else
10170   echo "$as_me: failed program was:" >&5
10171 cat conftest.$ac_ext >&5
10172 ac_cv_func_remove=no
10173 fi
10174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10175 fi
10176 echo "$as_me:10176: result: $ac_cv_func_remove" >&5
10177 echo "${ECHO_T}$ac_cv_func_remove" >&6
10178
10179     if test $ac_cv_func_remove = no; then
10180       echo "$as_me:10180: checking for remove in -lposix" >&5
10181 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10182 if test "${ac_cv_lib_posix_remove+set}" = set; then
10183   echo $ECHO_N "(cached) $ECHO_C" >&6
10184 else
10185   ac_check_lib_save_LIBS=$LIBS
10186 LIBS="-lposix  $LIBS"
10187 cat >conftest.$ac_ext <<_ACEOF
10188 #line 10188 "configure"
10189 #include "confdefs.h"
10190
10191 /* Override any gcc2 internal prototype to avoid an error.  */
10192 #ifdef __cplusplus
10193 extern "C"
10194 #endif
10195 /* We use char because int might match the return type of a gcc2
10196    builtin and then its argument prototype would still apply.  */
10197 char remove ();
10198 int
10199 main ()
10200 {
10201 remove ();
10202   ;
10203   return 0;
10204 }
10205 _ACEOF
10206 rm -f conftest.$ac_objext conftest$ac_exeext
10207 if { (eval echo "$as_me:10207: \"$ac_link\"") >&5
10208   (eval $ac_link) 2>&5
10209   ac_status=$?
10210   echo "$as_me:10210: \$? = $ac_status" >&5
10211   (exit $ac_status); } &&
10212          { ac_try='test -s conftest$ac_exeext'
10213   { (eval echo "$as_me:10213: \"$ac_try\"") >&5
10214   (eval $ac_try) 2>&5
10215   ac_status=$?
10216   echo "$as_me:10216: \$? = $ac_status" >&5
10217   (exit $ac_status); }; }; then
10218   ac_cv_lib_posix_remove=yes
10219 else
10220   echo "$as_me: failed program was:" >&5
10221 cat conftest.$ac_ext >&5
10222 ac_cv_lib_posix_remove=no
10223 fi
10224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10225 LIBS=$ac_check_lib_save_LIBS
10226 fi
10227 echo "$as_me:10227: result: $ac_cv_lib_posix_remove" >&5
10228 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10229 if test $ac_cv_lib_posix_remove = yes; then
10230   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10231 fi
10232
10233     fi
10234
10235     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10236     echo "$as_me:10236: checking for shmat" >&5
10237 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10238 if test "${ac_cv_func_shmat+set}" = set; then
10239   echo $ECHO_N "(cached) $ECHO_C" >&6
10240 else
10241   cat >conftest.$ac_ext <<_ACEOF
10242 #line 10242 "configure"
10243 #include "confdefs.h"
10244 /* System header to define __stub macros and hopefully few prototypes,
10245     which can conflict with char shmat (); below.  */
10246 #include <assert.h>
10247 /* Override any gcc2 internal prototype to avoid an error.  */
10248 #ifdef __cplusplus
10249 extern "C"
10250 #endif
10251 /* We use char because int might match the return type of a gcc2
10252    builtin and then its argument prototype would still apply.  */
10253 char shmat ();
10254 char (*f) ();
10255
10256 int
10257 main ()
10258 {
10259 /* The GNU C library defines this for functions which it implements
10260     to always fail with ENOSYS.  Some functions are actually named
10261     something starting with __ and the normal name is an alias.  */
10262 #if defined (__stub_shmat) || defined (__stub___shmat)
10263 choke me
10264 #else
10265 f = shmat;
10266 #endif
10267
10268   ;
10269   return 0;
10270 }
10271 _ACEOF
10272 rm -f conftest.$ac_objext conftest$ac_exeext
10273 if { (eval echo "$as_me:10273: \"$ac_link\"") >&5
10274   (eval $ac_link) 2>&5
10275   ac_status=$?
10276   echo "$as_me:10276: \$? = $ac_status" >&5
10277   (exit $ac_status); } &&
10278          { ac_try='test -s conftest$ac_exeext'
10279   { (eval echo "$as_me:10279: \"$ac_try\"") >&5
10280   (eval $ac_try) 2>&5
10281   ac_status=$?
10282   echo "$as_me:10282: \$? = $ac_status" >&5
10283   (exit $ac_status); }; }; then
10284   ac_cv_func_shmat=yes
10285 else
10286   echo "$as_me: failed program was:" >&5
10287 cat conftest.$ac_ext >&5
10288 ac_cv_func_shmat=no
10289 fi
10290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10291 fi
10292 echo "$as_me:10292: result: $ac_cv_func_shmat" >&5
10293 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10294
10295     if test $ac_cv_func_shmat = no; then
10296       echo "$as_me:10296: checking for shmat in -lipc" >&5
10297 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10298 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10299   echo $ECHO_N "(cached) $ECHO_C" >&6
10300 else
10301   ac_check_lib_save_LIBS=$LIBS
10302 LIBS="-lipc  $LIBS"
10303 cat >conftest.$ac_ext <<_ACEOF
10304 #line 10304 "configure"
10305 #include "confdefs.h"
10306
10307 /* Override any gcc2 internal prototype to avoid an error.  */
10308 #ifdef __cplusplus
10309 extern "C"
10310 #endif
10311 /* We use char because int might match the return type of a gcc2
10312    builtin and then its argument prototype would still apply.  */
10313 char shmat ();
10314 int
10315 main ()
10316 {
10317 shmat ();
10318   ;
10319   return 0;
10320 }
10321 _ACEOF
10322 rm -f conftest.$ac_objext conftest$ac_exeext
10323 if { (eval echo "$as_me:10323: \"$ac_link\"") >&5
10324   (eval $ac_link) 2>&5
10325   ac_status=$?
10326   echo "$as_me:10326: \$? = $ac_status" >&5
10327   (exit $ac_status); } &&
10328          { ac_try='test -s conftest$ac_exeext'
10329   { (eval echo "$as_me:10329: \"$ac_try\"") >&5
10330   (eval $ac_try) 2>&5
10331   ac_status=$?
10332   echo "$as_me:10332: \$? = $ac_status" >&5
10333   (exit $ac_status); }; }; then
10334   ac_cv_lib_ipc_shmat=yes
10335 else
10336   echo "$as_me: failed program was:" >&5
10337 cat conftest.$ac_ext >&5
10338 ac_cv_lib_ipc_shmat=no
10339 fi
10340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10341 LIBS=$ac_check_lib_save_LIBS
10342 fi
10343 echo "$as_me:10343: result: $ac_cv_lib_ipc_shmat" >&5
10344 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10345 if test $ac_cv_lib_ipc_shmat = yes; then
10346   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10347 fi
10348
10349     fi
10350   fi
10351
10352   # Check for libraries that X11R6 Xt/Xaw programs need.
10353   ac_save_LDFLAGS=$LDFLAGS
10354   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10355   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10356   # check for ICE first), but we must link in the order -lSM -lICE or
10357   # we get undefined symbols.  So assume we have SM if we have ICE.
10358   # These have to be linked with before -lX11, unlike the other
10359   # libraries we check for below, so use a different variable.
10360   # John Interrante, Karl Berry
10361   echo "$as_me:10361: checking for IceConnectionNumber in -lICE" >&5
10362 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10363 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10364   echo $ECHO_N "(cached) $ECHO_C" >&6
10365 else
10366   ac_check_lib_save_LIBS=$LIBS
10367 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10368 cat >conftest.$ac_ext <<_ACEOF
10369 #line 10369 "configure"
10370 #include "confdefs.h"
10371
10372 /* Override any gcc2 internal prototype to avoid an error.  */
10373 #ifdef __cplusplus
10374 extern "C"
10375 #endif
10376 /* We use char because int might match the return type of a gcc2
10377    builtin and then its argument prototype would still apply.  */
10378 char IceConnectionNumber ();
10379 int
10380 main ()
10381 {
10382 IceConnectionNumber ();
10383   ;
10384   return 0;
10385 }
10386 _ACEOF
10387 rm -f conftest.$ac_objext conftest$ac_exeext
10388 if { (eval echo "$as_me:10388: \"$ac_link\"") >&5
10389   (eval $ac_link) 2>&5
10390   ac_status=$?
10391   echo "$as_me:10391: \$? = $ac_status" >&5
10392   (exit $ac_status); } &&
10393          { ac_try='test -s conftest$ac_exeext'
10394   { (eval echo "$as_me:10394: \"$ac_try\"") >&5
10395   (eval $ac_try) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); }; }; then
10399   ac_cv_lib_ICE_IceConnectionNumber=yes
10400 else
10401   echo "$as_me: failed program was:" >&5
10402 cat conftest.$ac_ext >&5
10403 ac_cv_lib_ICE_IceConnectionNumber=no
10404 fi
10405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10406 LIBS=$ac_check_lib_save_LIBS
10407 fi
10408 echo "$as_me:10408: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10409 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10410 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10411   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10412 fi
10413
10414   LDFLAGS=$ac_save_LDFLAGS
10415
10416 fi
10417
10418 cf_x_athena=${cf_x_athena:-Xaw}
10419
10420 echo "$as_me:10420: checking if you want to link with Xaw 3d library" >&5
10421 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10422 withval=
10423
10424 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10425 if test "${with_Xaw3d+set}" = set; then
10426   withval="$with_Xaw3d"
10427
10428 fi;
10429 if test "$withval" = yes ; then
10430         cf_x_athena=Xaw3d
10431         echo "$as_me:10431: result: yes" >&5
10432 echo "${ECHO_T}yes" >&6
10433 else
10434         echo "$as_me:10434: result: no" >&5
10435 echo "${ECHO_T}no" >&6
10436 fi
10437
10438 echo "$as_me:10438: checking if you want to link with neXT Athena library" >&5
10439 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10440 withval=
10441
10442 # Check whether --with-neXtaw or --without-neXtaw was given.
10443 if test "${with_neXtaw+set}" = set; then
10444   withval="$with_neXtaw"
10445
10446 fi;
10447 if test "$withval" = yes ; then
10448         cf_x_athena=neXtaw
10449         echo "$as_me:10449: result: yes" >&5
10450 echo "${ECHO_T}yes" >&6
10451 else
10452         echo "$as_me:10452: result: no" >&5
10453 echo "${ECHO_T}no" >&6
10454 fi
10455
10456 echo "$as_me:10456: checking if you want to link with Athena-Plus library" >&5
10457 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10458 withval=
10459
10460 # Check whether --with-XawPlus or --without-XawPlus was given.
10461 if test "${with_XawPlus+set}" = set; then
10462   withval="$with_XawPlus"
10463
10464 fi;
10465 if test "$withval" = yes ; then
10466         cf_x_athena=XawPlus
10467         echo "$as_me:10467: result: yes" >&5
10468 echo "${ECHO_T}yes" >&6
10469 else
10470         echo "$as_me:10470: result: no" >&5
10471 echo "${ECHO_T}no" >&6
10472 fi
10473
10474 cf_x_athena_lib=""
10475
10476 if test "$PKG_CONFIG" != none ; then
10477         cf_athena_list=
10478         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10479         for cf_athena_pkg in \
10480                 $cf_athena_list \
10481                 ${cf_x_athena} \
10482                 ${cf_x_athena}-devel \
10483                 lib${cf_x_athena} \
10484                 lib${cf_x_athena}-devel
10485         do
10486
10487 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10488         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
10489
10490 echo "${as_me:-configure}:10490: testing found package $cf_athena_pkg ..." 1>&5
10491
10492         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10493         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10494         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10495
10496 echo "${as_me:-configure}:10496: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10497
10498         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10499
10500 echo "${as_me:-configure}:10500: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10501
10502 cf_fix_cppflags=no
10503 cf_new_cflags=
10504 cf_new_cppflags=
10505 cf_new_extra_cppflags=
10506
10507 for cf_add_cflags in $cf_pkgconfig_incs
10508 do
10509 case $cf_fix_cppflags in
10510 no)
10511         case $cf_add_cflags in #(vi
10512         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10513                 case $cf_add_cflags in
10514                 -D*)
10515                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10516
10517                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10518                                 && test -z "${cf_tst_cflags}" \
10519                                 && cf_fix_cppflags=yes
10520
10521                         if test $cf_fix_cppflags = yes ; then
10522                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10523                                 continue
10524                         elif test "${cf_tst_cflags}" = "\"'" ; then
10525                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10526                                 continue
10527                         fi
10528                         ;;
10529                 esac
10530                 case "$CPPFLAGS" in
10531                 *$cf_add_cflags) #(vi
10532                         ;;
10533                 *) #(vi
10534                         case $cf_add_cflags in #(vi
10535                         -D*)
10536                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10537
10538 CPPFLAGS=`echo "$CPPFLAGS" | \
10539         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10540                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10541
10542                                 ;;
10543                         esac
10544                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10545                         ;;
10546                 esac
10547                 ;;
10548         *)
10549                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10550                 ;;
10551         esac
10552         ;;
10553 yes)
10554         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10555
10556         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10557
10558         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10559                 && test -z "${cf_tst_cflags}" \
10560                 && cf_fix_cppflags=no
10561         ;;
10562 esac
10563 done
10564
10565 if test -n "$cf_new_cflags" ; then
10566
10567         CFLAGS="$CFLAGS $cf_new_cflags"
10568 fi
10569
10570 if test -n "$cf_new_cppflags" ; then
10571
10572         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10573 fi
10574
10575 if test -n "$cf_new_extra_cppflags" ; then
10576
10577         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10578 fi
10579
10580         LIBS="$cf_pkgconfig_libs $LIBS"
10581
10582                         cf_x_athena_lib="$cf_pkgconfig_libs"
10583
10584 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10585
10586                         cat >>confdefs.h <<EOF
10587 #define $cf_x_athena_LIBS 1
10588 EOF
10589
10590 echo "$as_me:10590: checking for usable $cf_x_athena/Xmu package" >&5
10591 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10592 if test "${cf_cv_xaw_compat+set}" = set; then
10593   echo $ECHO_N "(cached) $ECHO_C" >&6
10594 else
10595
10596 cat >conftest.$ac_ext <<_ACEOF
10597 #line 10597 "configure"
10598 #include "confdefs.h"
10599
10600 #include <X11/Xmu/CharSet.h>
10601
10602 int
10603 main ()
10604 {
10605
10606 int check = XmuCompareISOLatin1("big", "small")
10607
10608   ;
10609   return 0;
10610 }
10611 _ACEOF
10612 rm -f conftest.$ac_objext conftest$ac_exeext
10613 if { (eval echo "$as_me:10613: \"$ac_link\"") >&5
10614   (eval $ac_link) 2>&5
10615   ac_status=$?
10616   echo "$as_me:10616: \$? = $ac_status" >&5
10617   (exit $ac_status); } &&
10618          { ac_try='test -s conftest$ac_exeext'
10619   { (eval echo "$as_me:10619: \"$ac_try\"") >&5
10620   (eval $ac_try) 2>&5
10621   ac_status=$?
10622   echo "$as_me:10622: \$? = $ac_status" >&5
10623   (exit $ac_status); }; }; then
10624   cf_cv_xaw_compat=yes
10625 else
10626   echo "$as_me: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10628 cf_cv_xaw_compat=no
10629 fi
10630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10631 fi
10632 echo "$as_me:10632: result: $cf_cv_xaw_compat" >&5
10633 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10634
10635                         if test "$cf_cv_xaw_compat" = no
10636                         then
10637                                 # workaround for broken ".pc" files...
10638                                 case "$cf_x_athena_lib" in #(vi
10639                                 *-lXmu*) #(vi
10640                                         ;;
10641                                 *)
10642                                         test -n "$verbose" && echo "    work around broken package" 1>&6
10643
10644 echo "${as_me:-configure}:10644: testing work around broken package ..." 1>&5
10645
10646 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10647         test -n "$verbose" && echo "    found package xmu" 1>&6
10648
10649 echo "${as_me:-configure}:10649: testing found package xmu ..." 1>&5
10650
10651         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10652         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10653         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10654
10655 echo "${as_me:-configure}:10655: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10656
10657         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10658
10659 echo "${as_me:-configure}:10659: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10660
10661 cf_fix_cppflags=no
10662 cf_new_cflags=
10663 cf_new_cppflags=
10664 cf_new_extra_cppflags=
10665
10666 for cf_add_cflags in $cf_pkgconfig_incs
10667 do
10668 case $cf_fix_cppflags in
10669 no)
10670         case $cf_add_cflags in #(vi
10671         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10672                 case $cf_add_cflags in
10673                 -D*)
10674                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10675
10676                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10677                                 && test -z "${cf_tst_cflags}" \
10678                                 && cf_fix_cppflags=yes
10679
10680                         if test $cf_fix_cppflags = yes ; then
10681                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10682                                 continue
10683                         elif test "${cf_tst_cflags}" = "\"'" ; then
10684                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10685                                 continue
10686                         fi
10687                         ;;
10688                 esac
10689                 case "$CPPFLAGS" in
10690                 *$cf_add_cflags) #(vi
10691                         ;;
10692                 *) #(vi
10693                         case $cf_add_cflags in #(vi
10694                         -D*)
10695                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10696
10697 CPPFLAGS=`echo "$CPPFLAGS" | \
10698         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10699                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10700
10701                                 ;;
10702                         esac
10703                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10704                         ;;
10705                 esac
10706                 ;;
10707         *)
10708                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10709                 ;;
10710         esac
10711         ;;
10712 yes)
10713         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10714
10715         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10716
10717         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10718                 && test -z "${cf_tst_cflags}" \
10719                 && cf_fix_cppflags=no
10720         ;;
10721 esac
10722 done
10723
10724 if test -n "$cf_new_cflags" ; then
10725
10726         CFLAGS="$CFLAGS $cf_new_cflags"
10727 fi
10728
10729 if test -n "$cf_new_cppflags" ; then
10730
10731         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10732 fi
10733
10734 if test -n "$cf_new_extra_cppflags" ; then
10735
10736         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10737 fi
10738
10739         LIBS="$cf_pkgconfig_libs $LIBS"
10740         :
10741 else
10742
10743 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10744
10745 echo "${as_me:-configure}:10745: testing ...before $LIBS ..." 1>&5
10746
10747 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
10748 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10749
10750 echo "${as_me:-configure}:10750: testing ...after  $LIBS ..." 1>&5
10751
10752 fi
10753
10754                                         ;;
10755                                 esac
10756                         fi
10757
10758                         break
10759 else
10760         :
10761 fi
10762
10763         done
10764 fi
10765
10766 if test -z "$cf_x_athena_lib" ; then
10767
10768 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10769         test -n "$verbose" && echo "    found package Xext" 1>&6
10770
10771 echo "${as_me:-configure}:10771: testing found package Xext ..." 1>&5
10772
10773         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10774         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
10775         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10776
10777 echo "${as_me:-configure}:10777: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10778
10779         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10780
10781 echo "${as_me:-configure}:10781: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10782
10783 cf_fix_cppflags=no
10784 cf_new_cflags=
10785 cf_new_cppflags=
10786 cf_new_extra_cppflags=
10787
10788 for cf_add_cflags in $cf_pkgconfig_incs
10789 do
10790 case $cf_fix_cppflags in
10791 no)
10792         case $cf_add_cflags in #(vi
10793         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10794                 case $cf_add_cflags in
10795                 -D*)
10796                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10797
10798                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10799                                 && test -z "${cf_tst_cflags}" \
10800                                 && cf_fix_cppflags=yes
10801
10802                         if test $cf_fix_cppflags = yes ; then
10803                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10804                                 continue
10805                         elif test "${cf_tst_cflags}" = "\"'" ; then
10806                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10807                                 continue
10808                         fi
10809                         ;;
10810                 esac
10811                 case "$CPPFLAGS" in
10812                 *$cf_add_cflags) #(vi
10813                         ;;
10814                 *) #(vi
10815                         case $cf_add_cflags in #(vi
10816                         -D*)
10817                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10818
10819 CPPFLAGS=`echo "$CPPFLAGS" | \
10820         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10821                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10822
10823                                 ;;
10824                         esac
10825                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10826                         ;;
10827                 esac
10828                 ;;
10829         *)
10830                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10831                 ;;
10832         esac
10833         ;;
10834 yes)
10835         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10836
10837         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10838
10839         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10840                 && test -z "${cf_tst_cflags}" \
10841                 && cf_fix_cppflags=no
10842         ;;
10843 esac
10844 done
10845
10846 if test -n "$cf_new_cflags" ; then
10847
10848         CFLAGS="$CFLAGS $cf_new_cflags"
10849 fi
10850
10851 if test -n "$cf_new_cppflags" ; then
10852
10853         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10854 fi
10855
10856 if test -n "$cf_new_extra_cppflags" ; then
10857
10858         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10859 fi
10860
10861         LIBS="$cf_pkgconfig_libs $LIBS"
10862         :
10863 else
10864
10865         echo "$as_me:10865: checking for XextCreateExtension in -lXext" >&5
10866 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10867 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10868   echo $ECHO_N "(cached) $ECHO_C" >&6
10869 else
10870   ac_check_lib_save_LIBS=$LIBS
10871 LIBS="-lXext  $LIBS"
10872 cat >conftest.$ac_ext <<_ACEOF
10873 #line 10873 "configure"
10874 #include "confdefs.h"
10875
10876 /* Override any gcc2 internal prototype to avoid an error.  */
10877 #ifdef __cplusplus
10878 extern "C"
10879 #endif
10880 /* We use char because int might match the return type of a gcc2
10881    builtin and then its argument prototype would still apply.  */
10882 char XextCreateExtension ();
10883 int
10884 main ()
10885 {
10886 XextCreateExtension ();
10887   ;
10888   return 0;
10889 }
10890 _ACEOF
10891 rm -f conftest.$ac_objext conftest$ac_exeext
10892 if { (eval echo "$as_me:10892: \"$ac_link\"") >&5
10893   (eval $ac_link) 2>&5
10894   ac_status=$?
10895   echo "$as_me:10895: \$? = $ac_status" >&5
10896   (exit $ac_status); } &&
10897          { ac_try='test -s conftest$ac_exeext'
10898   { (eval echo "$as_me:10898: \"$ac_try\"") >&5
10899   (eval $ac_try) 2>&5
10900   ac_status=$?
10901   echo "$as_me:10901: \$? = $ac_status" >&5
10902   (exit $ac_status); }; }; then
10903   ac_cv_lib_Xext_XextCreateExtension=yes
10904 else
10905   echo "$as_me: failed program was:" >&5
10906 cat conftest.$ac_ext >&5
10907 ac_cv_lib_Xext_XextCreateExtension=no
10908 fi
10909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10910 LIBS=$ac_check_lib_save_LIBS
10911 fi
10912 echo "$as_me:10912: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10913 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10914 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10915   LIBS="-lXext $LIBS"
10916 fi
10917
10918 fi
10919
10920 cf_have_X_LIBS=no
10921
10922 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
10923         test -n "$verbose" && echo "    found package xt" 1>&6
10924
10925 echo "${as_me:-configure}:10925: testing found package xt ..." 1>&5
10926
10927         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
10928         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
10929         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10930
10931 echo "${as_me:-configure}:10931: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10932
10933         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
10934
10935 echo "${as_me:-configure}:10935: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10936
10937 cf_fix_cppflags=no
10938 cf_new_cflags=
10939 cf_new_cppflags=
10940 cf_new_extra_cppflags=
10941
10942 for cf_add_cflags in $cf_pkgconfig_incs
10943 do
10944 case $cf_fix_cppflags in
10945 no)
10946         case $cf_add_cflags in #(vi
10947         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10948                 case $cf_add_cflags in
10949                 -D*)
10950                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10951
10952                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10953                                 && test -z "${cf_tst_cflags}" \
10954                                 && cf_fix_cppflags=yes
10955
10956                         if test $cf_fix_cppflags = yes ; then
10957                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10958                                 continue
10959                         elif test "${cf_tst_cflags}" = "\"'" ; then
10960                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10961                                 continue
10962                         fi
10963                         ;;
10964                 esac
10965                 case "$CPPFLAGS" in
10966                 *$cf_add_cflags) #(vi
10967                         ;;
10968                 *) #(vi
10969                         case $cf_add_cflags in #(vi
10970                         -D*)
10971                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10972
10973 CPPFLAGS=`echo "$CPPFLAGS" | \
10974         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10975                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10976
10977                                 ;;
10978                         esac
10979                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10980                         ;;
10981                 esac
10982                 ;;
10983         *)
10984                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10985                 ;;
10986         esac
10987         ;;
10988 yes)
10989         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10990
10991         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10992
10993         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10994                 && test -z "${cf_tst_cflags}" \
10995                 && cf_fix_cppflags=no
10996         ;;
10997 esac
10998 done
10999
11000 if test -n "$cf_new_cflags" ; then
11001
11002         CFLAGS="$CFLAGS $cf_new_cflags"
11003 fi
11004
11005 if test -n "$cf_new_cppflags" ; then
11006
11007         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11008 fi
11009
11010 if test -n "$cf_new_extra_cppflags" ; then
11011
11012         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11013 fi
11014
11015         LIBS="$cf_pkgconfig_libs $LIBS"
11016
11017         case "x$LIBS" in #(vi
11018         *-lX11*) #(vi
11019                 ;;
11020         *)
11021 # we have an "xt" package, but it may omit Xt's dependency on X11
11022 echo "$as_me:11022: checking for usable X dependency" >&5
11023 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11024 if test "${cf_cv_xt_x11_compat+set}" = set; then
11025   echo $ECHO_N "(cached) $ECHO_C" >&6
11026 else
11027
11028 cat >conftest.$ac_ext <<_ACEOF
11029 #line 11029 "configure"
11030 #include "confdefs.h"
11031
11032 #include <X11/Xlib.h>
11033
11034 int
11035 main ()
11036 {
11037
11038         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11039         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11040         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11041         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11042
11043   ;
11044   return 0;
11045 }
11046 _ACEOF
11047 rm -f conftest.$ac_objext conftest$ac_exeext
11048 if { (eval echo "$as_me:11048: \"$ac_link\"") >&5
11049   (eval $ac_link) 2>&5
11050   ac_status=$?
11051   echo "$as_me:11051: \$? = $ac_status" >&5
11052   (exit $ac_status); } &&
11053          { ac_try='test -s conftest$ac_exeext'
11054   { (eval echo "$as_me:11054: \"$ac_try\"") >&5
11055   (eval $ac_try) 2>&5
11056   ac_status=$?
11057   echo "$as_me:11057: \$? = $ac_status" >&5
11058   (exit $ac_status); }; }; then
11059   cf_cv_xt_x11_compat=yes
11060 else
11061   echo "$as_me: failed program was:" >&5
11062 cat conftest.$ac_ext >&5
11063 cf_cv_xt_x11_compat=no
11064 fi
11065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11066 fi
11067 echo "$as_me:11067: result: $cf_cv_xt_x11_compat" >&5
11068 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11069                 if test "$cf_cv_xt_x11_compat" = no
11070                 then
11071                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11072
11073 echo "${as_me:-configure}:11073: testing work around broken X11 dependency ..." 1>&5
11074
11075                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11076
11077 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11078         test -n "$verbose" && echo "    found package x11" 1>&6
11079
11080 echo "${as_me:-configure}:11080: testing found package x11 ..." 1>&5
11081
11082         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11083         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11084         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11085
11086 echo "${as_me:-configure}:11086: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11087
11088         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11089
11090 echo "${as_me:-configure}:11090: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11091
11092 cf_fix_cppflags=no
11093 cf_new_cflags=
11094 cf_new_cppflags=
11095 cf_new_extra_cppflags=
11096
11097 for cf_add_cflags in $cf_pkgconfig_incs
11098 do
11099 case $cf_fix_cppflags in
11100 no)
11101         case $cf_add_cflags in #(vi
11102         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11103                 case $cf_add_cflags in
11104                 -D*)
11105                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11106
11107                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11108                                 && test -z "${cf_tst_cflags}" \
11109                                 && cf_fix_cppflags=yes
11110
11111                         if test $cf_fix_cppflags = yes ; then
11112                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11113                                 continue
11114                         elif test "${cf_tst_cflags}" = "\"'" ; then
11115                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11116                                 continue
11117                         fi
11118                         ;;
11119                 esac
11120                 case "$CPPFLAGS" in
11121                 *$cf_add_cflags) #(vi
11122                         ;;
11123                 *) #(vi
11124                         case $cf_add_cflags in #(vi
11125                         -D*)
11126                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11127
11128 CPPFLAGS=`echo "$CPPFLAGS" | \
11129         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11130                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11131
11132                                 ;;
11133                         esac
11134                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11135                         ;;
11136                 esac
11137                 ;;
11138         *)
11139                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11140                 ;;
11141         esac
11142         ;;
11143 yes)
11144         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11145
11146         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11147
11148         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11149                 && test -z "${cf_tst_cflags}" \
11150                 && cf_fix_cppflags=no
11151         ;;
11152 esac
11153 done
11154
11155 if test -n "$cf_new_cflags" ; then
11156
11157         CFLAGS="$CFLAGS $cf_new_cflags"
11158 fi
11159
11160 if test -n "$cf_new_cppflags" ; then
11161
11162         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11163 fi
11164
11165 if test -n "$cf_new_extra_cppflags" ; then
11166
11167         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11168 fi
11169
11170         LIBS="$cf_pkgconfig_libs $LIBS"
11171         :
11172 else
11173
11174 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11175
11176 echo "${as_me:-configure}:11176: testing ...before $LIBS ..." 1>&5
11177
11178 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
11179 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11180
11181 echo "${as_me:-configure}:11181: testing ...after  $LIBS ..." 1>&5
11182
11183 fi
11184
11185                 fi
11186                 ;;
11187         esac
11188
11189 echo "$as_me:11189: checking for usable X Toolkit package" >&5
11190 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11191 if test "${cf_cv_xt_ice_compat+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194
11195 cat >conftest.$ac_ext <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198
11199 #include <X11/Shell.h>
11200
11201 int
11202 main ()
11203 {
11204 int num = IceConnectionNumber(0)
11205
11206   ;
11207   return 0;
11208 }
11209 _ACEOF
11210 rm -f conftest.$ac_objext conftest$ac_exeext
11211 if { (eval echo "$as_me:11211: \"$ac_link\"") >&5
11212   (eval $ac_link) 2>&5
11213   ac_status=$?
11214   echo "$as_me:11214: \$? = $ac_status" >&5
11215   (exit $ac_status); } &&
11216          { ac_try='test -s conftest$ac_exeext'
11217   { (eval echo "$as_me:11217: \"$ac_try\"") >&5
11218   (eval $ac_try) 2>&5
11219   ac_status=$?
11220   echo "$as_me:11220: \$? = $ac_status" >&5
11221   (exit $ac_status); }; }; then
11222   cf_cv_xt_ice_compat=yes
11223 else
11224   echo "$as_me: failed program was:" >&5
11225 cat conftest.$ac_ext >&5
11226 cf_cv_xt_ice_compat=no
11227 fi
11228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11229 fi
11230 echo "$as_me:11230: result: $cf_cv_xt_ice_compat" >&5
11231 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11232
11233         if test "$cf_cv_xt_ice_compat" = no
11234         then
11235                 # workaround for broken ".pc" files used for X Toolkit.
11236                 case "x$X_PRE_LIBS" in #(vi
11237                 *-lICE*)
11238                         case "x$LIBS" in #(vi
11239                         *-lICE*) #(vi
11240                                 ;;
11241                         *)
11242                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11243
11244 echo "${as_me:-configure}:11244: testing work around broken ICE dependency ..." 1>&5
11245
11246 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11247         test -n "$verbose" && echo "    found package ice" 1>&6
11248
11249 echo "${as_me:-configure}:11249: testing found package ice ..." 1>&5
11250
11251         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11252         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11253         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11254
11255 echo "${as_me:-configure}:11255: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11256
11257         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11258
11259 echo "${as_me:-configure}:11259: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11260
11261 cf_fix_cppflags=no
11262 cf_new_cflags=
11263 cf_new_cppflags=
11264 cf_new_extra_cppflags=
11265
11266 for cf_add_cflags in $cf_pkgconfig_incs
11267 do
11268 case $cf_fix_cppflags in
11269 no)
11270         case $cf_add_cflags in #(vi
11271         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11272                 case $cf_add_cflags in
11273                 -D*)
11274                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11275
11276                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11277                                 && test -z "${cf_tst_cflags}" \
11278                                 && cf_fix_cppflags=yes
11279
11280                         if test $cf_fix_cppflags = yes ; then
11281                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11282                                 continue
11283                         elif test "${cf_tst_cflags}" = "\"'" ; then
11284                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11285                                 continue
11286                         fi
11287                         ;;
11288                 esac
11289                 case "$CPPFLAGS" in
11290                 *$cf_add_cflags) #(vi
11291                         ;;
11292                 *) #(vi
11293                         case $cf_add_cflags in #(vi
11294                         -D*)
11295                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11296
11297 CPPFLAGS=`echo "$CPPFLAGS" | \
11298         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11299                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11300
11301                                 ;;
11302                         esac
11303                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11304                         ;;
11305                 esac
11306                 ;;
11307         *)
11308                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11309                 ;;
11310         esac
11311         ;;
11312 yes)
11313         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11314
11315         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11316
11317         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11318                 && test -z "${cf_tst_cflags}" \
11319                 && cf_fix_cppflags=no
11320         ;;
11321 esac
11322 done
11323
11324 if test -n "$cf_new_cflags" ; then
11325
11326         CFLAGS="$CFLAGS $cf_new_cflags"
11327 fi
11328
11329 if test -n "$cf_new_cppflags" ; then
11330
11331         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11332 fi
11333
11334 if test -n "$cf_new_extra_cppflags" ; then
11335
11336         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11337 fi
11338
11339         LIBS="$cf_pkgconfig_libs $LIBS"
11340
11341 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11342         test -n "$verbose" && echo "    found package sm" 1>&6
11343
11344 echo "${as_me:-configure}:11344: testing found package sm ..." 1>&5
11345
11346         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11347         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11348         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11349
11350 echo "${as_me:-configure}:11350: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11351
11352         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11353
11354 echo "${as_me:-configure}:11354: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11355
11356 cf_fix_cppflags=no
11357 cf_new_cflags=
11358 cf_new_cppflags=
11359 cf_new_extra_cppflags=
11360
11361 for cf_add_cflags in $cf_pkgconfig_incs
11362 do
11363 case $cf_fix_cppflags in
11364 no)
11365         case $cf_add_cflags in #(vi
11366         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11367                 case $cf_add_cflags in
11368                 -D*)
11369                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11370
11371                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11372                                 && test -z "${cf_tst_cflags}" \
11373                                 && cf_fix_cppflags=yes
11374
11375                         if test $cf_fix_cppflags = yes ; then
11376                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11377                                 continue
11378                         elif test "${cf_tst_cflags}" = "\"'" ; then
11379                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11380                                 continue
11381                         fi
11382                         ;;
11383                 esac
11384                 case "$CPPFLAGS" in
11385                 *$cf_add_cflags) #(vi
11386                         ;;
11387                 *) #(vi
11388                         case $cf_add_cflags in #(vi
11389                         -D*)
11390                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11391
11392 CPPFLAGS=`echo "$CPPFLAGS" | \
11393         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11394                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11395
11396                                 ;;
11397                         esac
11398                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11399                         ;;
11400                 esac
11401                 ;;
11402         *)
11403                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11404                 ;;
11405         esac
11406         ;;
11407 yes)
11408         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11409
11410         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11411
11412         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11413                 && test -z "${cf_tst_cflags}" \
11414                 && cf_fix_cppflags=no
11415         ;;
11416 esac
11417 done
11418
11419 if test -n "$cf_new_cflags" ; then
11420
11421         CFLAGS="$CFLAGS $cf_new_cflags"
11422 fi
11423
11424 if test -n "$cf_new_cppflags" ; then
11425
11426         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11427 fi
11428
11429 if test -n "$cf_new_extra_cppflags" ; then
11430
11431         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11432 fi
11433
11434         LIBS="$cf_pkgconfig_libs $LIBS"
11435         :
11436 else
11437         :
11438 fi
11439
11440 else
11441
11442 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11443
11444 echo "${as_me:-configure}:11444: testing ...before $LIBS ..." 1>&5
11445
11446 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
11447 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11448
11449 echo "${as_me:-configure}:11449: testing ...after  $LIBS ..." 1>&5
11450
11451 fi
11452
11453                                 ;;
11454                         esac
11455                         ;;
11456                 esac
11457         fi
11458
11459         cf_have_X_LIBS=yes
11460
11461 else
11462
11463         LDFLAGS="$X_LIBS $LDFLAGS"
11464
11465 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
11466
11467 echo "${as_me:-configure}:11467: testing checking additions to CFLAGS ..." 1>&5
11468
11469 cf_check_cflags="$CFLAGS"
11470 cf_check_cppflags="$CPPFLAGS"
11471
11472 cf_fix_cppflags=no
11473 cf_new_cflags=
11474 cf_new_cppflags=
11475 cf_new_extra_cppflags=
11476
11477 for cf_add_cflags in $X_CFLAGS
11478 do
11479 case $cf_fix_cppflags in
11480 no)
11481         case $cf_add_cflags in #(vi
11482         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11483                 case $cf_add_cflags in
11484                 -D*)
11485                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11486
11487                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11488                                 && test -z "${cf_tst_cflags}" \
11489                                 && cf_fix_cppflags=yes
11490
11491                         if test $cf_fix_cppflags = yes ; then
11492                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11493                                 continue
11494                         elif test "${cf_tst_cflags}" = "\"'" ; then
11495                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11496                                 continue
11497                         fi
11498                         ;;
11499                 esac
11500                 case "$CPPFLAGS" in
11501                 *$cf_add_cflags) #(vi
11502                         ;;
11503                 *) #(vi
11504                         case $cf_add_cflags in #(vi
11505                         -D*)
11506                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11507
11508 CPPFLAGS=`echo "$CPPFLAGS" | \
11509         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11510                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11511
11512                                 ;;
11513                         esac
11514                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11515                         ;;
11516                 esac
11517                 ;;
11518         *)
11519                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11520                 ;;
11521         esac
11522         ;;
11523 yes)
11524         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11525
11526         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11527
11528         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11529                 && test -z "${cf_tst_cflags}" \
11530                 && cf_fix_cppflags=no
11531         ;;
11532 esac
11533 done
11534
11535 if test -n "$cf_new_cflags" ; then
11536         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11537
11538 echo "${as_me:-configure}:11538: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11539
11540         CFLAGS="$CFLAGS $cf_new_cflags"
11541 fi
11542
11543 if test -n "$cf_new_cppflags" ; then
11544         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11545
11546 echo "${as_me:-configure}:11546: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11547
11548         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11549 fi
11550
11551 if test -n "$cf_new_extra_cppflags" ; then
11552         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11553
11554 echo "${as_me:-configure}:11554: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11555
11556         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11557 fi
11558
11559 if test "$cf_check_cflags" != "$CFLAGS" ; then
11560 cat >conftest.$ac_ext <<_ACEOF
11561 #line 11561 "configure"
11562 #include "confdefs.h"
11563 #include <stdio.h>
11564 int
11565 main ()
11566 {
11567 printf("Hello world");
11568   ;
11569   return 0;
11570 }
11571 _ACEOF
11572 rm -f conftest.$ac_objext conftest$ac_exeext
11573 if { (eval echo "$as_me:11573: \"$ac_link\"") >&5
11574   (eval $ac_link) 2>&5
11575   ac_status=$?
11576   echo "$as_me:11576: \$? = $ac_status" >&5
11577   (exit $ac_status); } &&
11578          { ac_try='test -s conftest$ac_exeext'
11579   { (eval echo "$as_me:11579: \"$ac_try\"") >&5
11580   (eval $ac_try) 2>&5
11581   ac_status=$?
11582   echo "$as_me:11582: \$? = $ac_status" >&5
11583   (exit $ac_status); }; }; then
11584   :
11585 else
11586   echo "$as_me: failed program was:" >&5
11587 cat conftest.$ac_ext >&5
11588 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11589
11590 echo "${as_me:-configure}:11590: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11591
11592          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11593                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
11594
11595 echo "${as_me:-configure}:11595: testing but keeping change to \$CPPFLAGS ..." 1>&5
11596
11597          fi
11598          CFLAGS="$cf_check_flags"
11599 fi
11600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11601 fi
11602
11603         echo "$as_me:11603: checking for XOpenDisplay" >&5
11604 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11605 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11606   echo $ECHO_N "(cached) $ECHO_C" >&6
11607 else
11608   cat >conftest.$ac_ext <<_ACEOF
11609 #line 11609 "configure"
11610 #include "confdefs.h"
11611 /* System header to define __stub macros and hopefully few prototypes,
11612     which can conflict with char XOpenDisplay (); below.  */
11613 #include <assert.h>
11614 /* Override any gcc2 internal prototype to avoid an error.  */
11615 #ifdef __cplusplus
11616 extern "C"
11617 #endif
11618 /* We use char because int might match the return type of a gcc2
11619    builtin and then its argument prototype would still apply.  */
11620 char XOpenDisplay ();
11621 char (*f) ();
11622
11623 int
11624 main ()
11625 {
11626 /* The GNU C library defines this for functions which it implements
11627     to always fail with ENOSYS.  Some functions are actually named
11628     something starting with __ and the normal name is an alias.  */
11629 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11630 choke me
11631 #else
11632 f = XOpenDisplay;
11633 #endif
11634
11635   ;
11636   return 0;
11637 }
11638 _ACEOF
11639 rm -f conftest.$ac_objext conftest$ac_exeext
11640 if { (eval echo "$as_me:11640: \"$ac_link\"") >&5
11641   (eval $ac_link) 2>&5
11642   ac_status=$?
11643   echo "$as_me:11643: \$? = $ac_status" >&5
11644   (exit $ac_status); } &&
11645          { ac_try='test -s conftest$ac_exeext'
11646   { (eval echo "$as_me:11646: \"$ac_try\"") >&5
11647   (eval $ac_try) 2>&5
11648   ac_status=$?
11649   echo "$as_me:11649: \$? = $ac_status" >&5
11650   (exit $ac_status); }; }; then
11651   ac_cv_func_XOpenDisplay=yes
11652 else
11653   echo "$as_me: failed program was:" >&5
11654 cat conftest.$ac_ext >&5
11655 ac_cv_func_XOpenDisplay=no
11656 fi
11657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11658 fi
11659 echo "$as_me:11659: result: $ac_cv_func_XOpenDisplay" >&5
11660 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11661 if test $ac_cv_func_XOpenDisplay = yes; then
11662   :
11663 else
11664
11665         echo "$as_me:11665: checking for XOpenDisplay in -lX11" >&5
11666 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11667 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11668   echo $ECHO_N "(cached) $ECHO_C" >&6
11669 else
11670   ac_check_lib_save_LIBS=$LIBS
11671 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11672 cat >conftest.$ac_ext <<_ACEOF
11673 #line 11673 "configure"
11674 #include "confdefs.h"
11675
11676 /* Override any gcc2 internal prototype to avoid an error.  */
11677 #ifdef __cplusplus
11678 extern "C"
11679 #endif
11680 /* We use char because int might match the return type of a gcc2
11681    builtin and then its argument prototype would still apply.  */
11682 char XOpenDisplay ();
11683 int
11684 main ()
11685 {
11686 XOpenDisplay ();
11687   ;
11688   return 0;
11689 }
11690 _ACEOF
11691 rm -f conftest.$ac_objext conftest$ac_exeext
11692 if { (eval echo "$as_me:11692: \"$ac_link\"") >&5
11693   (eval $ac_link) 2>&5
11694   ac_status=$?
11695   echo "$as_me:11695: \$? = $ac_status" >&5
11696   (exit $ac_status); } &&
11697          { ac_try='test -s conftest$ac_exeext'
11698   { (eval echo "$as_me:11698: \"$ac_try\"") >&5
11699   (eval $ac_try) 2>&5
11700   ac_status=$?
11701   echo "$as_me:11701: \$? = $ac_status" >&5
11702   (exit $ac_status); }; }; then
11703   ac_cv_lib_X11_XOpenDisplay=yes
11704 else
11705   echo "$as_me: failed program was:" >&5
11706 cat conftest.$ac_ext >&5
11707 ac_cv_lib_X11_XOpenDisplay=no
11708 fi
11709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11710 LIBS=$ac_check_lib_save_LIBS
11711 fi
11712 echo "$as_me:11712: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11713 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11714 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
11715   LIBS="-lX11 $LIBS"
11716 fi
11717
11718 fi
11719
11720         echo "$as_me:11720: checking for XtAppInitialize" >&5
11721 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11722 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11723   echo $ECHO_N "(cached) $ECHO_C" >&6
11724 else
11725   cat >conftest.$ac_ext <<_ACEOF
11726 #line 11726 "configure"
11727 #include "confdefs.h"
11728 /* System header to define __stub macros and hopefully few prototypes,
11729     which can conflict with char XtAppInitialize (); below.  */
11730 #include <assert.h>
11731 /* Override any gcc2 internal prototype to avoid an error.  */
11732 #ifdef __cplusplus
11733 extern "C"
11734 #endif
11735 /* We use char because int might match the return type of a gcc2
11736    builtin and then its argument prototype would still apply.  */
11737 char XtAppInitialize ();
11738 char (*f) ();
11739
11740 int
11741 main ()
11742 {
11743 /* The GNU C library defines this for functions which it implements
11744     to always fail with ENOSYS.  Some functions are actually named
11745     something starting with __ and the normal name is an alias.  */
11746 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11747 choke me
11748 #else
11749 f = XtAppInitialize;
11750 #endif
11751
11752   ;
11753   return 0;
11754 }
11755 _ACEOF
11756 rm -f conftest.$ac_objext conftest$ac_exeext
11757 if { (eval echo "$as_me:11757: \"$ac_link\"") >&5
11758   (eval $ac_link) 2>&5
11759   ac_status=$?
11760   echo "$as_me:11760: \$? = $ac_status" >&5
11761   (exit $ac_status); } &&
11762          { ac_try='test -s conftest$ac_exeext'
11763   { (eval echo "$as_me:11763: \"$ac_try\"") >&5
11764   (eval $ac_try) 2>&5
11765   ac_status=$?
11766   echo "$as_me:11766: \$? = $ac_status" >&5
11767   (exit $ac_status); }; }; then
11768   ac_cv_func_XtAppInitialize=yes
11769 else
11770   echo "$as_me: failed program was:" >&5
11771 cat conftest.$ac_ext >&5
11772 ac_cv_func_XtAppInitialize=no
11773 fi
11774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11775 fi
11776 echo "$as_me:11776: result: $ac_cv_func_XtAppInitialize" >&5
11777 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11778 if test $ac_cv_func_XtAppInitialize = yes; then
11779   :
11780 else
11781
11782         echo "$as_me:11782: checking for XtAppInitialize in -lXt" >&5
11783 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11784 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11785   echo $ECHO_N "(cached) $ECHO_C" >&6
11786 else
11787   ac_check_lib_save_LIBS=$LIBS
11788 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11789 cat >conftest.$ac_ext <<_ACEOF
11790 #line 11790 "configure"
11791 #include "confdefs.h"
11792
11793 /* Override any gcc2 internal prototype to avoid an error.  */
11794 #ifdef __cplusplus
11795 extern "C"
11796 #endif
11797 /* We use char because int might match the return type of a gcc2
11798    builtin and then its argument prototype would still apply.  */
11799 char XtAppInitialize ();
11800 int
11801 main ()
11802 {
11803 XtAppInitialize ();
11804   ;
11805   return 0;
11806 }
11807 _ACEOF
11808 rm -f conftest.$ac_objext conftest$ac_exeext
11809 if { (eval echo "$as_me:11809: \"$ac_link\"") >&5
11810   (eval $ac_link) 2>&5
11811   ac_status=$?
11812   echo "$as_me:11812: \$? = $ac_status" >&5
11813   (exit $ac_status); } &&
11814          { ac_try='test -s conftest$ac_exeext'
11815   { (eval echo "$as_me:11815: \"$ac_try\"") >&5
11816   (eval $ac_try) 2>&5
11817   ac_status=$?
11818   echo "$as_me:11818: \$? = $ac_status" >&5
11819   (exit $ac_status); }; }; then
11820   ac_cv_lib_Xt_XtAppInitialize=yes
11821 else
11822   echo "$as_me: failed program was:" >&5
11823 cat conftest.$ac_ext >&5
11824 ac_cv_lib_Xt_XtAppInitialize=no
11825 fi
11826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11827 LIBS=$ac_check_lib_save_LIBS
11828 fi
11829 echo "$as_me:11829: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
11830 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
11831 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
11832   cat >>confdefs.h <<\EOF
11833 #define HAVE_LIBXT 1
11834 EOF
11835
11836                  cf_have_X_LIBS=Xt
11837                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
11838 fi
11839
11840 fi
11841
11842 fi
11843
11844 if test $cf_have_X_LIBS = no ; then
11845         { echo "$as_me:11845: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11846 test program.  You will have to check and add the proper libraries by hand
11847 to makefile." >&5
11848 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
11849 test program.  You will have to check and add the proper libraries by hand
11850 to makefile." >&2;}
11851 fi
11852
11853 cf_x_athena_root=$cf_x_athena
11854 cf_x_athena_inc=""
11855
11856 for cf_path in default \
11857         /usr/contrib/X11R6 \
11858         /usr/contrib/X11R5 \
11859         /usr/lib/X11R5 \
11860         /usr/local
11861 do
11862         if test -z "$cf_x_athena_inc" ; then
11863                 cf_save="$CPPFLAGS"
11864                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
11865                 if test $cf_path != default ; then
11866                         CPPFLAGS="$cf_save -I$cf_path/include"
11867                         echo "$as_me:11867: checking for $cf_test in $cf_path" >&5
11868 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
11869                 else
11870                         echo "$as_me:11870: checking for $cf_test" >&5
11871 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
11872                 fi
11873                 cat >conftest.$ac_ext <<_ACEOF
11874 #line 11874 "configure"
11875 #include "confdefs.h"
11876
11877 #include <X11/Intrinsic.h>
11878 #include <$cf_test>
11879 int
11880 main ()
11881 {
11882
11883   ;
11884   return 0;
11885 }
11886 _ACEOF
11887 rm -f conftest.$ac_objext
11888 if { (eval echo "$as_me:11888: \"$ac_compile\"") >&5
11889   (eval $ac_compile) 2>&5
11890   ac_status=$?
11891   echo "$as_me:11891: \$? = $ac_status" >&5
11892   (exit $ac_status); } &&
11893          { ac_try='test -s conftest.$ac_objext'
11894   { (eval echo "$as_me:11894: \"$ac_try\"") >&5
11895   (eval $ac_try) 2>&5
11896   ac_status=$?
11897   echo "$as_me:11897: \$? = $ac_status" >&5
11898   (exit $ac_status); }; }; then
11899   cf_result=yes
11900 else
11901   echo "$as_me: failed program was:" >&5
11902 cat conftest.$ac_ext >&5
11903 cf_result=no
11904 fi
11905 rm -f conftest.$ac_objext conftest.$ac_ext
11906                 echo "$as_me:11906: result: $cf_result" >&5
11907 echo "${ECHO_T}$cf_result" >&6
11908                 if test "$cf_result" = yes ; then
11909                         cf_x_athena_inc=$cf_path
11910                         break
11911                 else
11912                         CPPFLAGS="$cf_save"
11913                 fi
11914         fi
11915 done
11916
11917 if test -z "$cf_x_athena_inc" ; then
11918         { echo "$as_me:11918: WARNING: Unable to successfully find Athena header files with test program" >&5
11919 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
11920 elif test "$cf_x_athena_inc" != default ; then
11921         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
11922 fi
11923
11924 cf_x_athena_root=$cf_x_athena
11925 cf_x_athena_lib=""
11926
11927 for cf_path in default \
11928         /usr/contrib/X11R6 \
11929         /usr/contrib/X11R5 \
11930         /usr/lib/X11R5 \
11931         /usr/local
11932 do
11933         for cf_lib in \
11934                 "-l$cf_x_athena_root -lXmu" \
11935                 "-l$cf_x_athena_root -lXpm -lXmu" \
11936                 "-l${cf_x_athena_root}_s -lXmu_s"
11937         do
11938                 if test -z "$cf_x_athena_lib" ; then
11939                         cf_save="$LIBS"
11940                         cf_test=XawSimpleMenuAddGlobalActions
11941                         if test $cf_path != default ; then
11942                                 LIBS="-L$cf_path/lib $cf_lib $LIBS"
11943                                 echo "$as_me:11943: checking for $cf_lib in $cf_path" >&5
11944 echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
11945                         else
11946                                 LIBS="$cf_lib $LIBS"
11947                                 echo "$as_me:11947: checking for $cf_test in $cf_lib" >&5
11948 echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
11949                         fi
11950                         cat >conftest.$ac_ext <<_ACEOF
11951 #line 11951 "configure"
11952 #include "confdefs.h"
11953
11954 #include <X11/Intrinsic.h>
11955 #include <X11/$cf_x_athena_root/SimpleMenu.h>
11956
11957 int
11958 main ()
11959 {
11960
11961 $cf_test((XtAppContext) 0)
11962   ;
11963   return 0;
11964 }
11965 _ACEOF
11966 rm -f conftest.$ac_objext conftest$ac_exeext
11967 if { (eval echo "$as_me:11967: \"$ac_link\"") >&5
11968   (eval $ac_link) 2>&5
11969   ac_status=$?
11970   echo "$as_me:11970: \$? = $ac_status" >&5
11971   (exit $ac_status); } &&
11972          { ac_try='test -s conftest$ac_exeext'
11973   { (eval echo "$as_me:11973: \"$ac_try\"") >&5
11974   (eval $ac_try) 2>&5
11975   ac_status=$?
11976   echo "$as_me:11976: \$? = $ac_status" >&5
11977   (exit $ac_status); }; }; then
11978   cf_result=yes
11979 else
11980   echo "$as_me: failed program was:" >&5
11981 cat conftest.$ac_ext >&5
11982 cf_result=no
11983 fi
11984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11985                         echo "$as_me:11985: result: $cf_result" >&5
11986 echo "${ECHO_T}$cf_result" >&6
11987                         if test "$cf_result" = yes ; then
11988                                 cf_x_athena_lib="$cf_lib"
11989                                 break
11990                         fi
11991                         LIBS="$cf_save"
11992                 fi
11993         done
11994 done
11995
11996 if test -z "$cf_x_athena_lib" ; then
11997         { { echo "$as_me:11997: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
11998 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
11999    { (exit 1); exit 1; }; }
12000 fi
12001
12002 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12003
12004 cat >>confdefs.h <<EOF
12005 #define $cf_x_athena_LIBS 1
12006 EOF
12007
12008 fi
12009
12010 for ac_prog in xcurses-config
12011 do
12012   # Extract the first word of "$ac_prog", so it can be a program name with args.
12013 set dummy $ac_prog; ac_word=$2
12014 echo "$as_me:12014: checking for $ac_word" >&5
12015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12016 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
12017   echo $ECHO_N "(cached) $ECHO_C" >&6
12018 else
12019   case $XCURSES_CONFIG in
12020   [\\/]* | ?:[\\/]*)
12021   ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
12022   ;;
12023   *)
12024   ac_save_IFS=$IFS; IFS=$ac_path_separator
12025 ac_dummy="$PATH"
12026 for ac_dir in $ac_dummy; do
12027   IFS=$ac_save_IFS
12028   test -z "$ac_dir" && ac_dir=.
12029   if $as_executable_p "$ac_dir/$ac_word"; then
12030    ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
12031    echo "$as_me:12031: found $ac_dir/$ac_word" >&5
12032    break
12033 fi
12034 done
12035
12036   ;;
12037 esac
12038 fi
12039 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
12040
12041 if test -n "$XCURSES_CONFIG"; then
12042   echo "$as_me:12042: result: $XCURSES_CONFIG" >&5
12043 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12044 else
12045   echo "$as_me:12045: result: no" >&5
12046 echo "${ECHO_T}no" >&6
12047 fi
12048
12049   test -n "$XCURSES_CONFIG" && break
12050 done
12051 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
12052
12053 if test "$XCURSES_CONFIG" != none ; then
12054
12055 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12056 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12057
12058 cf_cv_lib_XCurses=yes
12059
12060 else
12061
12062 LDFLAGS="$LDFLAGS $X_LIBS"
12063
12064 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12065
12066 echo "${as_me:-configure}:12066: testing checking additions to CFLAGS ..." 1>&5
12067
12068 cf_check_cflags="$CFLAGS"
12069 cf_check_cppflags="$CPPFLAGS"
12070
12071 cf_fix_cppflags=no
12072 cf_new_cflags=
12073 cf_new_cppflags=
12074 cf_new_extra_cppflags=
12075
12076 for cf_add_cflags in $X_CFLAGS
12077 do
12078 case $cf_fix_cppflags in
12079 no)
12080         case $cf_add_cflags in #(vi
12081         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12082                 case $cf_add_cflags in
12083                 -D*)
12084                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12085
12086                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12087                                 && test -z "${cf_tst_cflags}" \
12088                                 && cf_fix_cppflags=yes
12089
12090                         if test $cf_fix_cppflags = yes ; then
12091                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12092                                 continue
12093                         elif test "${cf_tst_cflags}" = "\"'" ; then
12094                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12095                                 continue
12096                         fi
12097                         ;;
12098                 esac
12099                 case "$CPPFLAGS" in
12100                 *$cf_add_cflags) #(vi
12101                         ;;
12102                 *) #(vi
12103                         case $cf_add_cflags in #(vi
12104                         -D*)
12105                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12106
12107 CPPFLAGS=`echo "$CPPFLAGS" | \
12108         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12109                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12110
12111                                 ;;
12112                         esac
12113                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12114                         ;;
12115                 esac
12116                 ;;
12117         *)
12118                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12119                 ;;
12120         esac
12121         ;;
12122 yes)
12123         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12124
12125         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12126
12127         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12128                 && test -z "${cf_tst_cflags}" \
12129                 && cf_fix_cppflags=no
12130         ;;
12131 esac
12132 done
12133
12134 if test -n "$cf_new_cflags" ; then
12135         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12136
12137 echo "${as_me:-configure}:12137: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12138
12139         CFLAGS="$CFLAGS $cf_new_cflags"
12140 fi
12141
12142 if test -n "$cf_new_cppflags" ; then
12143         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12144
12145 echo "${as_me:-configure}:12145: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12146
12147         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12148 fi
12149
12150 if test -n "$cf_new_extra_cppflags" ; then
12151         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12152
12153 echo "${as_me:-configure}:12153: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12154
12155         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12156 fi
12157
12158 if test "$cf_check_cflags" != "$CFLAGS" ; then
12159 cat >conftest.$ac_ext <<_ACEOF
12160 #line 12160 "configure"
12161 #include "confdefs.h"
12162 #include <stdio.h>
12163 int
12164 main ()
12165 {
12166 printf("Hello world");
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 rm -f conftest.$ac_objext conftest$ac_exeext
12172 if { (eval echo "$as_me:12172: \"$ac_link\"") >&5
12173   (eval $ac_link) 2>&5
12174   ac_status=$?
12175   echo "$as_me:12175: \$? = $ac_status" >&5
12176   (exit $ac_status); } &&
12177          { ac_try='test -s conftest$ac_exeext'
12178   { (eval echo "$as_me:12178: \"$ac_try\"") >&5
12179   (eval $ac_try) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit $ac_status); }; }; then
12183   :
12184 else
12185   echo "$as_me: failed program was:" >&5
12186 cat conftest.$ac_ext >&5
12187 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12188
12189 echo "${as_me:-configure}:12189: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12190
12191          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12192                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12193
12194 echo "${as_me:-configure}:12194: testing but keeping change to \$CPPFLAGS ..." 1>&5
12195
12196          fi
12197          CFLAGS="$cf_check_flags"
12198 fi
12199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12200 fi
12201
12202 echo "$as_me:12202: checking for XOpenDisplay in -lX11" >&5
12203 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12204 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12205   echo $ECHO_N "(cached) $ECHO_C" >&6
12206 else
12207   ac_check_lib_save_LIBS=$LIBS
12208 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12209 cat >conftest.$ac_ext <<_ACEOF
12210 #line 12210 "configure"
12211 #include "confdefs.h"
12212
12213 /* Override any gcc2 internal prototype to avoid an error.  */
12214 #ifdef __cplusplus
12215 extern "C"
12216 #endif
12217 /* We use char because int might match the return type of a gcc2
12218    builtin and then its argument prototype would still apply.  */
12219 char XOpenDisplay ();
12220 int
12221 main ()
12222 {
12223 XOpenDisplay ();
12224   ;
12225   return 0;
12226 }
12227 _ACEOF
12228 rm -f conftest.$ac_objext conftest$ac_exeext
12229 if { (eval echo "$as_me:12229: \"$ac_link\"") >&5
12230   (eval $ac_link) 2>&5
12231   ac_status=$?
12232   echo "$as_me:12232: \$? = $ac_status" >&5
12233   (exit $ac_status); } &&
12234          { ac_try='test -s conftest$ac_exeext'
12235   { (eval echo "$as_me:12235: \"$ac_try\"") >&5
12236   (eval $ac_try) 2>&5
12237   ac_status=$?
12238   echo "$as_me:12238: \$? = $ac_status" >&5
12239   (exit $ac_status); }; }; then
12240   ac_cv_lib_X11_XOpenDisplay=yes
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 cat conftest.$ac_ext >&5
12244 ac_cv_lib_X11_XOpenDisplay=no
12245 fi
12246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12247 LIBS=$ac_check_lib_save_LIBS
12248 fi
12249 echo "$as_me:12249: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12250 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12251 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12252   LIBS="-lX11 $LIBS"
12253 fi
12254
12255 echo "$as_me:12255: checking for XCurses library" >&5
12256 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12257 if test "${cf_cv_lib_XCurses+set}" = set; then
12258   echo $ECHO_N "(cached) $ECHO_C" >&6
12259 else
12260
12261 LIBS="-lXCurses $LIBS"
12262 cat >conftest.$ac_ext <<_ACEOF
12263 #line 12263 "configure"
12264 #include "confdefs.h"
12265
12266 #include <xcurses.h>
12267 char *XCursesProgramName = "test";
12268
12269 int
12270 main ()
12271 {
12272 XCursesExit();
12273   ;
12274   return 0;
12275 }
12276 _ACEOF
12277 rm -f conftest.$ac_objext conftest$ac_exeext
12278 if { (eval echo "$as_me:12278: \"$ac_link\"") >&5
12279   (eval $ac_link) 2>&5
12280   ac_status=$?
12281   echo "$as_me:12281: \$? = $ac_status" >&5
12282   (exit $ac_status); } &&
12283          { ac_try='test -s conftest$ac_exeext'
12284   { (eval echo "$as_me:12284: \"$ac_try\"") >&5
12285   (eval $ac_try) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit $ac_status); }; }; then
12289   cf_cv_lib_XCurses=yes
12290 else
12291   echo "$as_me: failed program was:" >&5
12292 cat conftest.$ac_ext >&5
12293 cf_cv_lib_XCurses=no
12294 fi
12295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12296
12297 fi
12298 echo "$as_me:12298: result: $cf_cv_lib_XCurses" >&5
12299 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12300
12301 fi
12302
12303 if test $cf_cv_lib_XCurses = yes ; then
12304         cat >>confdefs.h <<\EOF
12305 #define UNIX 1
12306 EOF
12307
12308         cat >>confdefs.h <<\EOF
12309 #define XCURSES 1
12310 EOF
12311
12312         echo "$as_me:12312: checking for xcurses.h" >&5
12313 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12314 if test "${ac_cv_header_xcurses_h+set}" = set; then
12315   echo $ECHO_N "(cached) $ECHO_C" >&6
12316 else
12317   cat >conftest.$ac_ext <<_ACEOF
12318 #line 12318 "configure"
12319 #include "confdefs.h"
12320 #include <xcurses.h>
12321 _ACEOF
12322 if { (eval echo "$as_me:12322: \"$ac_cpp conftest.$ac_ext\"") >&5
12323   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12324   ac_status=$?
12325   egrep -v '^ *\+' conftest.er1 >conftest.err
12326   rm -f conftest.er1
12327   cat conftest.err >&5
12328   echo "$as_me:12328: \$? = $ac_status" >&5
12329   (exit $ac_status); } >/dev/null; then
12330   if test -s conftest.err; then
12331     ac_cpp_err=$ac_c_preproc_warn_flag
12332   else
12333     ac_cpp_err=
12334   fi
12335 else
12336   ac_cpp_err=yes
12337 fi
12338 if test -z "$ac_cpp_err"; then
12339   ac_cv_header_xcurses_h=yes
12340 else
12341   echo "$as_me: failed program was:" >&5
12342   cat conftest.$ac_ext >&5
12343   ac_cv_header_xcurses_h=no
12344 fi
12345 rm -f conftest.err conftest.$ac_ext
12346 fi
12347 echo "$as_me:12347: result: $ac_cv_header_xcurses_h" >&5
12348 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12349 if test $ac_cv_header_xcurses_h = yes; then
12350   cat >>confdefs.h <<\EOF
12351 #define HAVE_XCURSES 1
12352 EOF
12353
12354 fi
12355
12356 else
12357         { { echo "$as_me:12357: error: Cannot link with XCurses" >&5
12358 echo "$as_me: error: Cannot link with XCurses" >&2;}
12359    { (exit 1); exit 1; }; }
12360 fi
12361
12362         ;;
12363 esac
12364
12365 case $cf_cv_screen in #(vi
12366 pdcurses) #(vi
12367         ;;
12368 *)
12369         # look for curses-related libraries
12370
12371 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
12372 echo "$as_me:12372: checking for new_panel in -lpanel$cf_cv_libtype" >&5
12373 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
12374 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12375   echo $ECHO_N "(cached) $ECHO_C" >&6
12376 else
12377   ac_check_lib_save_LIBS=$LIBS
12378 LIBS="-lpanel$cf_cv_libtype  $LIBS"
12379 cat >conftest.$ac_ext <<_ACEOF
12380 #line 12380 "configure"
12381 #include "confdefs.h"
12382
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 #ifdef __cplusplus
12385 extern "C"
12386 #endif
12387 /* We use char because int might match the return type of a gcc2
12388    builtin and then its argument prototype would still apply.  */
12389 char new_panel ();
12390 int
12391 main ()
12392 {
12393 new_panel ();
12394   ;
12395   return 0;
12396 }
12397 _ACEOF
12398 rm -f conftest.$ac_objext conftest$ac_exeext
12399 if { (eval echo "$as_me:12399: \"$ac_link\"") >&5
12400   (eval $ac_link) 2>&5
12401   ac_status=$?
12402   echo "$as_me:12402: \$? = $ac_status" >&5
12403   (exit $ac_status); } &&
12404          { ac_try='test -s conftest$ac_exeext'
12405   { (eval echo "$as_me:12405: \"$ac_try\"") >&5
12406   (eval $ac_try) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); }; }; then
12410   eval "$as_ac_Lib=yes"
12411 else
12412   echo "$as_me: failed program was:" >&5
12413 cat conftest.$ac_ext >&5
12414 eval "$as_ac_Lib=no"
12415 fi
12416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12417 LIBS=$ac_check_lib_save_LIBS
12418 fi
12419 echo "$as_me:12419: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12420 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12421 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12422   cat >>confdefs.h <<EOF
12423 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
12424 EOF
12425
12426   LIBS="-lpanel$cf_cv_libtype $LIBS"
12427
12428 fi
12429
12430 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
12431 echo "$as_me:12431: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
12432 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
12433 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12434   echo $ECHO_N "(cached) $ECHO_C" >&6
12435 else
12436   ac_check_lib_save_LIBS=$LIBS
12437 LIBS="-lmenu$cf_cv_libtype  $LIBS"
12438 cat >conftest.$ac_ext <<_ACEOF
12439 #line 12439 "configure"
12440 #include "confdefs.h"
12441
12442 /* Override any gcc2 internal prototype to avoid an error.  */
12443 #ifdef __cplusplus
12444 extern "C"
12445 #endif
12446 /* We use char because int might match the return type of a gcc2
12447    builtin and then its argument prototype would still apply.  */
12448 char menu_driver ();
12449 int
12450 main ()
12451 {
12452 menu_driver ();
12453   ;
12454   return 0;
12455 }
12456 _ACEOF
12457 rm -f conftest.$ac_objext conftest$ac_exeext
12458 if { (eval echo "$as_me:12458: \"$ac_link\"") >&5
12459   (eval $ac_link) 2>&5
12460   ac_status=$?
12461   echo "$as_me:12461: \$? = $ac_status" >&5
12462   (exit $ac_status); } &&
12463          { ac_try='test -s conftest$ac_exeext'
12464   { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465   (eval $ac_try) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); }; }; then
12469   eval "$as_ac_Lib=yes"
12470 else
12471   echo "$as_me: failed program was:" >&5
12472 cat conftest.$ac_ext >&5
12473 eval "$as_ac_Lib=no"
12474 fi
12475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12476 LIBS=$ac_check_lib_save_LIBS
12477 fi
12478 echo "$as_me:12478: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12479 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12480 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12481   cat >>confdefs.h <<EOF
12482 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
12483 EOF
12484
12485   LIBS="-lmenu$cf_cv_libtype $LIBS"
12486
12487 fi
12488
12489 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
12490 echo "$as_me:12490: checking for form_driver in -lform$cf_cv_libtype" >&5
12491 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
12492 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12493   echo $ECHO_N "(cached) $ECHO_C" >&6
12494 else
12495   ac_check_lib_save_LIBS=$LIBS
12496 LIBS="-lform$cf_cv_libtype  $LIBS"
12497 cat >conftest.$ac_ext <<_ACEOF
12498 #line 12498 "configure"
12499 #include "confdefs.h"
12500
12501 /* Override any gcc2 internal prototype to avoid an error.  */
12502 #ifdef __cplusplus
12503 extern "C"
12504 #endif
12505 /* We use char because int might match the return type of a gcc2
12506    builtin and then its argument prototype would still apply.  */
12507 char form_driver ();
12508 int
12509 main ()
12510 {
12511 form_driver ();
12512   ;
12513   return 0;
12514 }
12515 _ACEOF
12516 rm -f conftest.$ac_objext conftest$ac_exeext
12517 if { (eval echo "$as_me:12517: \"$ac_link\"") >&5
12518   (eval $ac_link) 2>&5
12519   ac_status=$?
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit $ac_status); } &&
12522          { ac_try='test -s conftest$ac_exeext'
12523   { (eval echo "$as_me:12523: \"$ac_try\"") >&5
12524   (eval $ac_try) 2>&5
12525   ac_status=$?
12526   echo "$as_me:12526: \$? = $ac_status" >&5
12527   (exit $ac_status); }; }; then
12528   eval "$as_ac_Lib=yes"
12529 else
12530   echo "$as_me: failed program was:" >&5
12531 cat conftest.$ac_ext >&5
12532 eval "$as_ac_Lib=no"
12533 fi
12534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12535 LIBS=$ac_check_lib_save_LIBS
12536 fi
12537 echo "$as_me:12537: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12538 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12539 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12540   cat >>confdefs.h <<EOF
12541 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
12542 EOF
12543
12544   LIBS="-lform$cf_cv_libtype $LIBS"
12545
12546 fi
12547
12548         # look for curses-related headers
12549
12550 for ac_header in \
12551                 nc_alloc.h \
12552                 nomacros.h \
12553                 form.h \
12554                 menu.h \
12555                 panel.h \
12556                 term_entry.h \
12557
12558 do
12559 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12560 echo "$as_me:12560: checking for $ac_header" >&5
12561 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12562 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12563   echo $ECHO_N "(cached) $ECHO_C" >&6
12564 else
12565   cat >conftest.$ac_ext <<_ACEOF
12566 #line 12566 "configure"
12567 #include "confdefs.h"
12568 #include <$ac_header>
12569 _ACEOF
12570 if { (eval echo "$as_me:12570: \"$ac_cpp conftest.$ac_ext\"") >&5
12571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12572   ac_status=$?
12573   egrep -v '^ *\+' conftest.er1 >conftest.err
12574   rm -f conftest.er1
12575   cat conftest.err >&5
12576   echo "$as_me:12576: \$? = $ac_status" >&5
12577   (exit $ac_status); } >/dev/null; then
12578   if test -s conftest.err; then
12579     ac_cpp_err=$ac_c_preproc_warn_flag
12580   else
12581     ac_cpp_err=
12582   fi
12583 else
12584   ac_cpp_err=yes
12585 fi
12586 if test -z "$ac_cpp_err"; then
12587   eval "$as_ac_Header=yes"
12588 else
12589   echo "$as_me: failed program was:" >&5
12590   cat conftest.$ac_ext >&5
12591   eval "$as_ac_Header=no"
12592 fi
12593 rm -f conftest.err conftest.$ac_ext
12594 fi
12595 echo "$as_me:12595: result: `eval echo '${'$as_ac_Header'}'`" >&5
12596 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12597 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12598   cat >>confdefs.h <<EOF
12599 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12600 EOF
12601
12602 fi
12603 done
12604
12605         ;;
12606 esac
12607
12608 echo "$as_me:12608: checking return type of signal handlers" >&5
12609 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12610 if test "${ac_cv_type_signal+set}" = set; then
12611   echo $ECHO_N "(cached) $ECHO_C" >&6
12612 else
12613   cat >conftest.$ac_ext <<_ACEOF
12614 #line 12614 "configure"
12615 #include "confdefs.h"
12616 #include <sys/types.h>
12617 #include <signal.h>
12618 #ifdef signal
12619 # undef signal
12620 #endif
12621 #ifdef __cplusplus
12622 extern "C" void (*signal (int, void (*)(int)))(int);
12623 #else
12624 void (*signal ()) ();
12625 #endif
12626
12627 int
12628 main ()
12629 {
12630 int i;
12631   ;
12632   return 0;
12633 }
12634 _ACEOF
12635 rm -f conftest.$ac_objext
12636 if { (eval echo "$as_me:12636: \"$ac_compile\"") >&5
12637   (eval $ac_compile) 2>&5
12638   ac_status=$?
12639   echo "$as_me:12639: \$? = $ac_status" >&5
12640   (exit $ac_status); } &&
12641          { ac_try='test -s conftest.$ac_objext'
12642   { (eval echo "$as_me:12642: \"$ac_try\"") >&5
12643   (eval $ac_try) 2>&5
12644   ac_status=$?
12645   echo "$as_me:12645: \$? = $ac_status" >&5
12646   (exit $ac_status); }; }; then
12647   ac_cv_type_signal=void
12648 else
12649   echo "$as_me: failed program was:" >&5
12650 cat conftest.$ac_ext >&5
12651 ac_cv_type_signal=int
12652 fi
12653 rm -f conftest.$ac_objext conftest.$ac_ext
12654 fi
12655 echo "$as_me:12655: result: $ac_cv_type_signal" >&5
12656 echo "${ECHO_T}$ac_cv_type_signal" >&6
12657
12658 cat >>confdefs.h <<EOF
12659 #define RETSIGTYPE $ac_cv_type_signal
12660 EOF
12661
12662 echo "$as_me:12662: checking for ANSI C header files" >&5
12663 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12664 if test "${ac_cv_header_stdc+set}" = set; then
12665   echo $ECHO_N "(cached) $ECHO_C" >&6
12666 else
12667   cat >conftest.$ac_ext <<_ACEOF
12668 #line 12668 "configure"
12669 #include "confdefs.h"
12670 #include <stdlib.h>
12671 #include <stdarg.h>
12672 #include <string.h>
12673 #include <float.h>
12674
12675 _ACEOF
12676 if { (eval echo "$as_me:12676: \"$ac_cpp conftest.$ac_ext\"") >&5
12677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12678   ac_status=$?
12679   egrep -v '^ *\+' conftest.er1 >conftest.err
12680   rm -f conftest.er1
12681   cat conftest.err >&5
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); } >/dev/null; then
12684   if test -s conftest.err; then
12685     ac_cpp_err=$ac_c_preproc_warn_flag
12686   else
12687     ac_cpp_err=
12688   fi
12689 else
12690   ac_cpp_err=yes
12691 fi
12692 if test -z "$ac_cpp_err"; then
12693   ac_cv_header_stdc=yes
12694 else
12695   echo "$as_me: failed program was:" >&5
12696   cat conftest.$ac_ext >&5
12697   ac_cv_header_stdc=no
12698 fi
12699 rm -f conftest.err conftest.$ac_ext
12700
12701 if test $ac_cv_header_stdc = yes; then
12702   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12703   cat >conftest.$ac_ext <<_ACEOF
12704 #line 12704 "configure"
12705 #include "confdefs.h"
12706 #include <string.h>
12707
12708 _ACEOF
12709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12710   egrep "memchr" >/dev/null 2>&1; then
12711   :
12712 else
12713   ac_cv_header_stdc=no
12714 fi
12715 rm -rf conftest*
12716
12717 fi
12718
12719 if test $ac_cv_header_stdc = yes; then
12720   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12721   cat >conftest.$ac_ext <<_ACEOF
12722 #line 12722 "configure"
12723 #include "confdefs.h"
12724 #include <stdlib.h>
12725
12726 _ACEOF
12727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12728   egrep "free" >/dev/null 2>&1; then
12729   :
12730 else
12731   ac_cv_header_stdc=no
12732 fi
12733 rm -rf conftest*
12734
12735 fi
12736
12737 if test $ac_cv_header_stdc = yes; then
12738   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12739   if test "$cross_compiling" = yes; then
12740   :
12741 else
12742   cat >conftest.$ac_ext <<_ACEOF
12743 #line 12743 "configure"
12744 #include "confdefs.h"
12745 #include <ctype.h>
12746 #if ((' ' & 0x0FF) == 0x020)
12747 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12748 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12749 #else
12750 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12751                      || ('j' <= (c) && (c) <= 'r') \
12752                      || ('s' <= (c) && (c) <= 'z'))
12753 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12754 #endif
12755
12756 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12757 int
12758 main ()
12759 {
12760   int i;
12761   for (i = 0; i < 256; i++)
12762     if (XOR (islower (i), ISLOWER (i))
12763         || toupper (i) != TOUPPER (i))
12764       $ac_main_return(2);
12765   $ac_main_return (0);
12766 }
12767 _ACEOF
12768 rm -f conftest$ac_exeext
12769 if { (eval echo "$as_me:12769: \"$ac_link\"") >&5
12770   (eval $ac_link) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12774   { (eval echo "$as_me:12774: \"$ac_try\"") >&5
12775   (eval $ac_try) 2>&5
12776   ac_status=$?
12777   echo "$as_me:12777: \$? = $ac_status" >&5
12778   (exit $ac_status); }; }; then
12779   :
12780 else
12781   echo "$as_me: program exited with status $ac_status" >&5
12782 echo "$as_me: failed program was:" >&5
12783 cat conftest.$ac_ext >&5
12784 ac_cv_header_stdc=no
12785 fi
12786 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12787 fi
12788 fi
12789 fi
12790 echo "$as_me:12790: result: $ac_cv_header_stdc" >&5
12791 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12792 if test $ac_cv_header_stdc = yes; then
12793
12794 cat >>confdefs.h <<\EOF
12795 #define STDC_HEADERS 1
12796 EOF
12797
12798 fi
12799
12800 echo "$as_me:12800: checking whether time.h and sys/time.h may both be included" >&5
12801 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12802 if test "${ac_cv_header_time+set}" = set; then
12803   echo $ECHO_N "(cached) $ECHO_C" >&6
12804 else
12805   cat >conftest.$ac_ext <<_ACEOF
12806 #line 12806 "configure"
12807 #include "confdefs.h"
12808 #include <sys/types.h>
12809 #include <sys/time.h>
12810 #include <time.h>
12811
12812 int
12813 main ()
12814 {
12815 if ((struct tm *) 0)
12816 return 0;
12817   ;
12818   return 0;
12819 }
12820 _ACEOF
12821 rm -f conftest.$ac_objext
12822 if { (eval echo "$as_me:12822: \"$ac_compile\"") >&5
12823   (eval $ac_compile) 2>&5
12824   ac_status=$?
12825   echo "$as_me:12825: \$? = $ac_status" >&5
12826   (exit $ac_status); } &&
12827          { ac_try='test -s conftest.$ac_objext'
12828   { (eval echo "$as_me:12828: \"$ac_try\"") >&5
12829   (eval $ac_try) 2>&5
12830   ac_status=$?
12831   echo "$as_me:12831: \$? = $ac_status" >&5
12832   (exit $ac_status); }; }; then
12833   ac_cv_header_time=yes
12834 else
12835   echo "$as_me: failed program was:" >&5
12836 cat conftest.$ac_ext >&5
12837 ac_cv_header_time=no
12838 fi
12839 rm -f conftest.$ac_objext conftest.$ac_ext
12840 fi
12841 echo "$as_me:12841: result: $ac_cv_header_time" >&5
12842 echo "${ECHO_T}$ac_cv_header_time" >&6
12843 if test $ac_cv_header_time = yes; then
12844
12845 cat >>confdefs.h <<\EOF
12846 #define TIME_WITH_SYS_TIME 1
12847 EOF
12848
12849 fi
12850
12851 for ac_header in \
12852 getopt.h \
12853 locale.h \
12854 math.h \
12855 stdarg.h \
12856 sys/ioctl.h \
12857 sys/select.h \
12858 sys/time.h \
12859 termios.h \
12860 unistd.h \
12861
12862 do
12863 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12864 echo "$as_me:12864: checking for $ac_header" >&5
12865 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12866 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12867   echo $ECHO_N "(cached) $ECHO_C" >&6
12868 else
12869   cat >conftest.$ac_ext <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12872 #include <$ac_header>
12873 _ACEOF
12874 if { (eval echo "$as_me:12874: \"$ac_cpp conftest.$ac_ext\"") >&5
12875   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12876   ac_status=$?
12877   egrep -v '^ *\+' conftest.er1 >conftest.err
12878   rm -f conftest.er1
12879   cat conftest.err >&5
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit $ac_status); } >/dev/null; then
12882   if test -s conftest.err; then
12883     ac_cpp_err=$ac_c_preproc_warn_flag
12884   else
12885     ac_cpp_err=
12886   fi
12887 else
12888   ac_cpp_err=yes
12889 fi
12890 if test -z "$ac_cpp_err"; then
12891   eval "$as_ac_Header=yes"
12892 else
12893   echo "$as_me: failed program was:" >&5
12894   cat conftest.$ac_ext >&5
12895   eval "$as_ac_Header=no"
12896 fi
12897 rm -f conftest.err conftest.$ac_ext
12898 fi
12899 echo "$as_me:12899: result: `eval echo '${'$as_ac_Header'}'`" >&5
12900 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12901 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12902   cat >>confdefs.h <<EOF
12903 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12904 EOF
12905
12906 fi
12907 done
12908
12909 for ac_header in unistd.h getopt.h
12910 do
12911 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12912 echo "$as_me:12912: checking for $ac_header" >&5
12913 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12914 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12915   echo $ECHO_N "(cached) $ECHO_C" >&6
12916 else
12917   cat >conftest.$ac_ext <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12920 #include <$ac_header>
12921 _ACEOF
12922 if { (eval echo "$as_me:12922: \"$ac_cpp conftest.$ac_ext\"") >&5
12923   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12924   ac_status=$?
12925   egrep -v '^ *\+' conftest.er1 >conftest.err
12926   rm -f conftest.er1
12927   cat conftest.err >&5
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit $ac_status); } >/dev/null; then
12930   if test -s conftest.err; then
12931     ac_cpp_err=$ac_c_preproc_warn_flag
12932   else
12933     ac_cpp_err=
12934   fi
12935 else
12936   ac_cpp_err=yes
12937 fi
12938 if test -z "$ac_cpp_err"; then
12939   eval "$as_ac_Header=yes"
12940 else
12941   echo "$as_me: failed program was:" >&5
12942   cat conftest.$ac_ext >&5
12943   eval "$as_ac_Header=no"
12944 fi
12945 rm -f conftest.err conftest.$ac_ext
12946 fi
12947 echo "$as_me:12947: result: `eval echo '${'$as_ac_Header'}'`" >&5
12948 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12949 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12950   cat >>confdefs.h <<EOF
12951 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12952 EOF
12953
12954 fi
12955 done
12956
12957 echo "$as_me:12957: checking for header declaring getopt variables" >&5
12958 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
12959 if test "${cf_cv_getopt_header+set}" = set; then
12960   echo $ECHO_N "(cached) $ECHO_C" >&6
12961 else
12962
12963 cf_cv_getopt_header=none
12964 for cf_header in stdio.h stdlib.h unistd.h getopt.h
12965 do
12966 cat >conftest.$ac_ext <<_ACEOF
12967 #line 12967 "configure"
12968 #include "confdefs.h"
12969
12970 #include <$cf_header>
12971 int
12972 main ()
12973 {
12974 int x = optind; char *y = optarg
12975   ;
12976   return 0;
12977 }
12978 _ACEOF
12979 rm -f conftest.$ac_objext
12980 if { (eval echo "$as_me:12980: \"$ac_compile\"") >&5
12981   (eval $ac_compile) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); } &&
12985          { ac_try='test -s conftest.$ac_objext'
12986   { (eval echo "$as_me:12986: \"$ac_try\"") >&5
12987   (eval $ac_try) 2>&5
12988   ac_status=$?
12989   echo "$as_me:12989: \$? = $ac_status" >&5
12990   (exit $ac_status); }; }; then
12991   cf_cv_getopt_header=$cf_header
12992  break
12993 else
12994   echo "$as_me: failed program was:" >&5
12995 cat conftest.$ac_ext >&5
12996 fi
12997 rm -f conftest.$ac_objext conftest.$ac_ext
12998 done
12999
13000 fi
13001 echo "$as_me:13001: result: $cf_cv_getopt_header" >&5
13002 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13003 if test $cf_cv_getopt_header != none ; then
13004         cat >>confdefs.h <<\EOF
13005 #define HAVE_GETOPT_HEADER 1
13006 EOF
13007
13008 fi
13009
13010 for ac_func in \
13011 gettimeofday \
13012 strdup \
13013
13014 do
13015 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13016 echo "$as_me:13016: checking for $ac_func" >&5
13017 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13018 if eval "test \"\${$as_ac_var+set}\" = set"; then
13019   echo $ECHO_N "(cached) $ECHO_C" >&6
13020 else
13021   cat >conftest.$ac_ext <<_ACEOF
13022 #line 13022 "configure"
13023 #include "confdefs.h"
13024 /* System header to define __stub macros and hopefully few prototypes,
13025     which can conflict with char $ac_func (); below.  */
13026 #include <assert.h>
13027 /* Override any gcc2 internal prototype to avoid an error.  */
13028 #ifdef __cplusplus
13029 extern "C"
13030 #endif
13031 /* We use char because int might match the return type of a gcc2
13032    builtin and then its argument prototype would still apply.  */
13033 char $ac_func ();
13034 char (*f) ();
13035
13036 int
13037 main ()
13038 {
13039 /* The GNU C library defines this for functions which it implements
13040     to always fail with ENOSYS.  Some functions are actually named
13041     something starting with __ and the normal name is an alias.  */
13042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13043 choke me
13044 #else
13045 f = $ac_func;
13046 #endif
13047
13048   ;
13049   return 0;
13050 }
13051 _ACEOF
13052 rm -f conftest.$ac_objext conftest$ac_exeext
13053 if { (eval echo "$as_me:13053: \"$ac_link\"") >&5
13054   (eval $ac_link) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit $ac_status); } &&
13058          { ac_try='test -s conftest$ac_exeext'
13059   { (eval echo "$as_me:13059: \"$ac_try\"") >&5
13060   (eval $ac_try) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit $ac_status); }; }; then
13064   eval "$as_ac_var=yes"
13065 else
13066   echo "$as_me: failed program was:" >&5
13067 cat conftest.$ac_ext >&5
13068 eval "$as_ac_var=no"
13069 fi
13070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13071 fi
13072 echo "$as_me:13072: result: `eval echo '${'$as_ac_var'}'`" >&5
13073 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13074 if test `eval echo '${'$as_ac_var'}'` = yes; then
13075   cat >>confdefs.h <<EOF
13076 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13077 EOF
13078
13079 fi
13080 done
13081
13082 if test "$cf_enable_widec" = yes; then
13083
13084 for ac_func in \
13085 mblen \
13086 mbrlen \
13087 mbrtowc \
13088 mbsrtowcs \
13089 mbstowcs \
13090 mbtowc \
13091 wcsrtombs \
13092 wcstombs \
13093
13094 do
13095 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13096 echo "$as_me:13096: checking for $ac_func" >&5
13097 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13098 if eval "test \"\${$as_ac_var+set}\" = set"; then
13099   echo $ECHO_N "(cached) $ECHO_C" >&6
13100 else
13101   cat >conftest.$ac_ext <<_ACEOF
13102 #line 13102 "configure"
13103 #include "confdefs.h"
13104 /* System header to define __stub macros and hopefully few prototypes,
13105     which can conflict with char $ac_func (); below.  */
13106 #include <assert.h>
13107 /* Override any gcc2 internal prototype to avoid an error.  */
13108 #ifdef __cplusplus
13109 extern "C"
13110 #endif
13111 /* We use char because int might match the return type of a gcc2
13112    builtin and then its argument prototype would still apply.  */
13113 char $ac_func ();
13114 char (*f) ();
13115
13116 int
13117 main ()
13118 {
13119 /* The GNU C library defines this for functions which it implements
13120     to always fail with ENOSYS.  Some functions are actually named
13121     something starting with __ and the normal name is an alias.  */
13122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13123 choke me
13124 #else
13125 f = $ac_func;
13126 #endif
13127
13128   ;
13129   return 0;
13130 }
13131 _ACEOF
13132 rm -f conftest.$ac_objext conftest$ac_exeext
13133 if { (eval echo "$as_me:13133: \"$ac_link\"") >&5
13134   (eval $ac_link) 2>&5
13135   ac_status=$?
13136   echo "$as_me:13136: \$? = $ac_status" >&5
13137   (exit $ac_status); } &&
13138          { ac_try='test -s conftest$ac_exeext'
13139   { (eval echo "$as_me:13139: \"$ac_try\"") >&5
13140   (eval $ac_try) 2>&5
13141   ac_status=$?
13142   echo "$as_me:13142: \$? = $ac_status" >&5
13143   (exit $ac_status); }; }; then
13144   eval "$as_ac_var=yes"
13145 else
13146   echo "$as_me: failed program was:" >&5
13147 cat conftest.$ac_ext >&5
13148 eval "$as_ac_var=no"
13149 fi
13150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13151 fi
13152 echo "$as_me:13152: result: `eval echo '${'$as_ac_var'}'`" >&5
13153 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13154 if test `eval echo '${'$as_ac_var'}'` = yes; then
13155   cat >>confdefs.h <<EOF
13156 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13157 EOF
13158
13159 fi
13160 done
13161
13162 fi
13163
13164 echo "$as_me:13164: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13165 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13166 if test "${cf_cv_need_xopen_extension+set}" = set; then
13167   echo $ECHO_N "(cached) $ECHO_C" >&6
13168 else
13169
13170 cat >conftest.$ac_ext <<_ACEOF
13171 #line 13171 "configure"
13172 #include "confdefs.h"
13173
13174 #include <stdlib.h>
13175 #include <${cf_cv_ncurses_header:-curses.h}>
13176 int
13177 main ()
13178 {
13179
13180 #if defined(NCURSES_VERSION_PATCH)
13181 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13182         make an error
13183 #endif
13184 #endif
13185         long x = winnstr(stdscr, "", 0);
13186         int x1, y1;
13187         getbegyx(stdscr, y1, x1)
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 rm -f conftest.$ac_objext conftest$ac_exeext
13193 if { (eval echo "$as_me:13193: \"$ac_link\"") >&5
13194   (eval $ac_link) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit $ac_status); } &&
13198          { ac_try='test -s conftest$ac_exeext'
13199   { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:13202: \$? = $ac_status" >&5
13203   (exit $ac_status); }; }; then
13204   cf_cv_need_xopen_extension=no
13205 else
13206   echo "$as_me: failed program was:" >&5
13207 cat conftest.$ac_ext >&5
13208 cat >conftest.$ac_ext <<_ACEOF
13209 #line 13209 "configure"
13210 #include "confdefs.h"
13211
13212 #define _XOPEN_SOURCE_EXTENDED
13213 #include <stdlib.h>
13214 #include <${cf_cv_ncurses_header:-curses.h}>
13215 int
13216 main ()
13217 {
13218
13219 #ifdef NCURSES_VERSION
13220         cchar_t check;
13221         int check2 = curs_set((int)sizeof(check));
13222 #endif
13223         long x = winnstr(stdscr, "", 0);
13224         int x1, y1;
13225         getbegyx(stdscr, y1, x1)
13226   ;
13227   return 0;
13228 }
13229 _ACEOF
13230 rm -f conftest.$ac_objext conftest$ac_exeext
13231 if { (eval echo "$as_me:13231: \"$ac_link\"") >&5
13232   (eval $ac_link) 2>&5
13233   ac_status=$?
13234   echo "$as_me:13234: \$? = $ac_status" >&5
13235   (exit $ac_status); } &&
13236          { ac_try='test -s conftest$ac_exeext'
13237   { (eval echo "$as_me:13237: \"$ac_try\"") >&5
13238   (eval $ac_try) 2>&5
13239   ac_status=$?
13240   echo "$as_me:13240: \$? = $ac_status" >&5
13241   (exit $ac_status); }; }; then
13242   cf_cv_need_xopen_extension=yes
13243 else
13244   echo "$as_me: failed program was:" >&5
13245 cat conftest.$ac_ext >&5
13246 cf_cv_need_xopen_extension=unknown
13247 fi
13248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13249 fi
13250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13251 fi
13252 echo "$as_me:13252: result: $cf_cv_need_xopen_extension" >&5
13253 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13254 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13255
13256 echo "$as_me:13256: checking for term.h" >&5
13257 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13258 if test "${cf_cv_term_header+set}" = set; then
13259   echo $ECHO_N "(cached) $ECHO_C" >&6
13260 else
13261
13262 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13263 # for <term.h> if we do not find the variant.
13264
13265 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13266
13267 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13268 */*)
13269         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13270         cf_header_list="$cf_header_item $cf_header_list"
13271         ;;
13272 esac
13273
13274 for cf_header in $cf_header_list
13275 do
13276         cat >conftest.$ac_ext <<_ACEOF
13277 #line 13277 "configure"
13278 #include "confdefs.h"
13279
13280 #include <${cf_cv_ncurses_header:-curses.h}>
13281 #include <${cf_header}>
13282 int
13283 main ()
13284 {
13285 WINDOW *x
13286   ;
13287   return 0;
13288 }
13289 _ACEOF
13290 rm -f conftest.$ac_objext
13291 if { (eval echo "$as_me:13291: \"$ac_compile\"") >&5
13292   (eval $ac_compile) 2>&5
13293   ac_status=$?
13294   echo "$as_me:13294: \$? = $ac_status" >&5
13295   (exit $ac_status); } &&
13296          { ac_try='test -s conftest.$ac_objext'
13297   { (eval echo "$as_me:13297: \"$ac_try\"") >&5
13298   (eval $ac_try) 2>&5
13299   ac_status=$?
13300   echo "$as_me:13300: \$? = $ac_status" >&5
13301   (exit $ac_status); }; }; then
13302   cf_cv_term_header=$cf_header
13303          break
13304 else
13305   echo "$as_me: failed program was:" >&5
13306 cat conftest.$ac_ext >&5
13307 cf_cv_term_header=no
13308 fi
13309 rm -f conftest.$ac_objext conftest.$ac_ext
13310 done
13311
13312 case $cf_cv_term_header in #(vi
13313 no)
13314         # If curses is ncurses, some packagers still mess it up by trying to make
13315         # us use GNU termcap.  This handles the most common case.
13316         for cf_header in ncurses/term.h ncursesw/term.h
13317         do
13318                 cat >conftest.$ac_ext <<_ACEOF
13319 #line 13319 "configure"
13320 #include "confdefs.h"
13321
13322 #include <${cf_cv_ncurses_header:-curses.h}>
13323 #ifdef NCURSES_VERSION
13324 #include <${cf_header}>
13325 #else
13326 make an error
13327 #endif
13328 int
13329 main ()
13330 {
13331 WINDOW *x
13332   ;
13333   return 0;
13334 }
13335 _ACEOF
13336 rm -f conftest.$ac_objext
13337 if { (eval echo "$as_me:13337: \"$ac_compile\"") >&5
13338   (eval $ac_compile) 2>&5
13339   ac_status=$?
13340   echo "$as_me:13340: \$? = $ac_status" >&5
13341   (exit $ac_status); } &&
13342          { ac_try='test -s conftest.$ac_objext'
13343   { (eval echo "$as_me:13343: \"$ac_try\"") >&5
13344   (eval $ac_try) 2>&5
13345   ac_status=$?
13346   echo "$as_me:13346: \$? = $ac_status" >&5
13347   (exit $ac_status); }; }; then
13348   cf_cv_term_header=$cf_header
13349                          break
13350 else
13351   echo "$as_me: failed program was:" >&5
13352 cat conftest.$ac_ext >&5
13353 cf_cv_term_header=no
13354 fi
13355 rm -f conftest.$ac_objext conftest.$ac_ext
13356         done
13357         ;;
13358 esac
13359
13360 fi
13361 echo "$as_me:13361: result: $cf_cv_term_header" >&5
13362 echo "${ECHO_T}$cf_cv_term_header" >&6
13363
13364 case $cf_cv_term_header in #(vi
13365 term.h) #(vi
13366         cat >>confdefs.h <<\EOF
13367 #define HAVE_TERM_H 1
13368 EOF
13369
13370         ;;
13371 ncurses/term.h) #(vi
13372         cat >>confdefs.h <<\EOF
13373 #define HAVE_NCURSES_TERM_H 1
13374 EOF
13375
13376         ;;
13377 ncursesw/term.h)
13378         cat >>confdefs.h <<\EOF
13379 #define HAVE_NCURSESW_TERM_H 1
13380 EOF
13381
13382         ;;
13383 esac
13384
13385 echo "$as_me:13385: checking for unctrl.h" >&5
13386 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13387 if test "${cf_cv_unctrl_header+set}" = set; then
13388   echo $ECHO_N "(cached) $ECHO_C" >&6
13389 else
13390
13391 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13392 # for <unctrl.h> if we do not find the variant.
13393
13394 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13395
13396 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13397 */*)
13398         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13399         cf_header_list="$cf_header_item $cf_header_list"
13400         ;;
13401 esac
13402
13403 for cf_header in $cf_header_list
13404 do
13405         cat >conftest.$ac_ext <<_ACEOF
13406 #line 13406 "configure"
13407 #include "confdefs.h"
13408
13409 #include <${cf_cv_ncurses_header:-curses.h}>
13410 #include <${cf_header}>
13411 int
13412 main ()
13413 {
13414 WINDOW *x
13415   ;
13416   return 0;
13417 }
13418 _ACEOF
13419 rm -f conftest.$ac_objext
13420 if { (eval echo "$as_me:13420: \"$ac_compile\"") >&5
13421   (eval $ac_compile) 2>&5
13422   ac_status=$?
13423   echo "$as_me:13423: \$? = $ac_status" >&5
13424   (exit $ac_status); } &&
13425          { ac_try='test -s conftest.$ac_objext'
13426   { (eval echo "$as_me:13426: \"$ac_try\"") >&5
13427   (eval $ac_try) 2>&5
13428   ac_status=$?
13429   echo "$as_me:13429: \$? = $ac_status" >&5
13430   (exit $ac_status); }; }; then
13431   cf_cv_unctrl_header=$cf_header
13432          break
13433 else
13434   echo "$as_me: failed program was:" >&5
13435 cat conftest.$ac_ext >&5
13436 cf_cv_unctrl_header=no
13437 fi
13438 rm -f conftest.$ac_objext conftest.$ac_ext
13439 done
13440
13441 case $cf_cv_unctrl_header in #(vi
13442 no)
13443         { echo "$as_me:13443: WARNING: unctrl.h header not found" >&5
13444 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13445         ;;
13446 esac
13447
13448 fi
13449 echo "$as_me:13449: result: $cf_cv_unctrl_header" >&5
13450 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13451
13452 case $cf_cv_unctrl_header in #(vi
13453 unctrl.h) #(vi
13454         cat >>confdefs.h <<\EOF
13455 #define HAVE_UNCTRL_H 1
13456 EOF
13457
13458         ;;
13459 ncurses/unctrl.h) #(vi
13460         cat >>confdefs.h <<\EOF
13461 #define HAVE_NCURSES_UNCTRL_H 1
13462 EOF
13463
13464         ;;
13465 ncursesw/unctrl.h)
13466         cat >>confdefs.h <<\EOF
13467 #define HAVE_NCURSESW_UNCTRL_H 1
13468 EOF
13469
13470         ;;
13471 esac
13472
13473 for cf_func in \
13474 assume_default_colors \
13475 chgat \
13476 color_set \
13477 filter \
13478 getbegx \
13479 getcurx \
13480 getmaxx \
13481 getnstr \
13482 getparx \
13483 getwin \
13484 mvvline \
13485 mvwvline \
13486 napms \
13487 putwin \
13488 resize_term \
13489 resizeterm \
13490 ripoffline \
13491 scr_dump \
13492 setupterm \
13493 slk_color \
13494 slk_init \
13495 termattrs \
13496 tgetent \
13497 tigetnum \
13498 tigetstr \
13499 typeahead \
13500 use_default_colors \
13501 use_screen \
13502 use_window \
13503 vsscanf \
13504 vw_printw \
13505 wchgat \
13506 winsstr \
13507 wresize \
13508 wsyncdown \
13509
13510 do
13511
13512 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13513
13514         echo "$as_me:13514: checking for ${cf_func}" >&5
13515 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13516
13517 echo "${as_me:-configure}:13517: testing ${cf_func} ..." 1>&5
13518
13519         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13520   echo $ECHO_N "(cached) $ECHO_C" >&6
13521 else
13522
13523                 eval cf_result='$ac_cv_func_'$cf_func
13524                 if test ".$cf_result" != ".no"; then
13525                         cat >conftest.$ac_ext <<_ACEOF
13526 #line 13526 "configure"
13527 #include "confdefs.h"
13528
13529 #ifdef HAVE_XCURSES
13530 #include <xcurses.h>
13531 char * XCursesProgramName = "test";
13532 #else
13533 #include <${cf_cv_ncurses_header:-curses.h}>
13534 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13535 #include <ncursesw/term.h>
13536 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13537 #include <ncurses/term.h>
13538 #elif defined(HAVE_TERM_H)
13539 #include <term.h>
13540 #endif
13541 #endif
13542
13543 int
13544 main ()
13545 {
13546
13547 #ifndef ${cf_func}
13548 long foo = (long)(&${cf_func});
13549 if (foo + 1234 > 5678)
13550         ${cf_cv_main_return:-return}(foo);
13551 #endif
13552
13553   ;
13554   return 0;
13555 }
13556 _ACEOF
13557 rm -f conftest.$ac_objext conftest$ac_exeext
13558 if { (eval echo "$as_me:13558: \"$ac_link\"") >&5
13559   (eval $ac_link) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit $ac_status); } &&
13563          { ac_try='test -s conftest$ac_exeext'
13564   { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:13567: \$? = $ac_status" >&5
13568   (exit $ac_status); }; }; then
13569   cf_result=yes
13570 else
13571   echo "$as_me: failed program was:" >&5
13572 cat conftest.$ac_ext >&5
13573 cf_result=no
13574 fi
13575 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13576                 fi
13577                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13578
13579 fi
13580
13581         # use the computed/retrieved cache-value:
13582         eval 'cf_result=$cf_cv_func_'$cf_func
13583         echo "$as_me:13583: result: $cf_result" >&5
13584 echo "${ECHO_T}$cf_result" >&6
13585         if test $cf_result != no; then
13586                 cat >>confdefs.h <<EOF
13587 #define HAVE_${cf_tr_func} 1
13588 EOF
13589
13590         fi
13591 done
13592
13593 for cf_func in tputs
13594 do
13595
13596 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13597
13598         echo "$as_me:13598: checking for ${cf_func}" >&5
13599 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13600
13601 echo "${as_me:-configure}:13601: testing ${cf_func} ..." 1>&5
13602
13603         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13604   echo $ECHO_N "(cached) $ECHO_C" >&6
13605 else
13606
13607                 eval cf_result='$ac_cv_func_'$cf_func
13608                 if test ".$cf_result" != ".no"; then
13609                         cat >conftest.$ac_ext <<_ACEOF
13610 #line 13610 "configure"
13611 #include "confdefs.h"
13612
13613 #ifdef HAVE_XCURSES
13614 #include <xcurses.h>
13615 char * XCursesProgramName = "test";
13616 #else
13617 #include <${cf_cv_ncurses_header:-curses.h}>
13618 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13619 #include <ncursesw/term.h>
13620 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13621 #include <ncurses/term.h>
13622 #elif defined(HAVE_TERM_H)
13623 #include <term.h>
13624 #endif
13625 #endif
13626
13627 int
13628 main ()
13629 {
13630
13631 #ifndef ${cf_func}
13632 long foo = (long)(&${cf_func});
13633 if (foo + 1234 > 5678)
13634         ${cf_cv_main_return:-return}(foo);
13635 #endif
13636
13637   ;
13638   return 0;
13639 }
13640 _ACEOF
13641 rm -f conftest.$ac_objext conftest$ac_exeext
13642 if { (eval echo "$as_me:13642: \"$ac_link\"") >&5
13643   (eval $ac_link) 2>&5
13644   ac_status=$?
13645   echo "$as_me:13645: \$? = $ac_status" >&5
13646   (exit $ac_status); } &&
13647          { ac_try='test -s conftest$ac_exeext'
13648   { (eval echo "$as_me:13648: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit $ac_status); }; }; then
13653   cf_result=yes
13654 else
13655   echo "$as_me: failed program was:" >&5
13656 cat conftest.$ac_ext >&5
13657 cf_result=no
13658 fi
13659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13660                 fi
13661                 eval 'cf_cv_func_'$cf_func'=$cf_result'
13662
13663 fi
13664
13665         # use the computed/retrieved cache-value:
13666         eval 'cf_result=$cf_cv_func_'$cf_func
13667         echo "$as_me:13667: result: $cf_result" >&5
13668 echo "${ECHO_T}$cf_result" >&6
13669         if test $cf_result != no; then
13670                 cat >>confdefs.h <<EOF
13671 #define HAVE_${cf_tr_func} 1
13672 EOF
13673
13674         fi
13675 done
13676
13677 if test x$cf_cv_func_tputs = xyes
13678 then
13679         cf_done=no
13680         for cf_arg in int char
13681         do
13682                 for cf_ret in int void
13683                 do
13684                         if test $cf_ret = void
13685                         then
13686                                 cf_return="/* nothing */"
13687                         else
13688                                 cf_return="return value"
13689                         fi
13690                         cat >conftest.$ac_ext <<_ACEOF
13691 #line 13691 "configure"
13692 #include "confdefs.h"
13693
13694 #include <${cf_cv_ncurses_header:-curses.h}>
13695 #include <$cf_cv_term_header>
13696
13697 static $cf_ret outc($cf_arg value) { $cf_return; }
13698
13699 int
13700 main ()
13701 {
13702
13703         tputs("hello", 0, outc);
13704         ${cf_cv_main_return:-return}(0);
13705
13706   ;
13707   return 0;
13708 }
13709 _ACEOF
13710 rm -f conftest.$ac_objext
13711 if { (eval echo "$as_me:13711: \"$ac_compile\"") >&5
13712   (eval $ac_compile) 2>&5
13713   ac_status=$?
13714   echo "$as_me:13714: \$? = $ac_status" >&5
13715   (exit $ac_status); } &&
13716          { ac_try='test -s conftest.$ac_objext'
13717   { (eval echo "$as_me:13717: \"$ac_try\"") >&5
13718   (eval $ac_try) 2>&5
13719   ac_status=$?
13720   echo "$as_me:13720: \$? = $ac_status" >&5
13721   (exit $ac_status); }; }; then
13722
13723                 test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
13724
13725 echo "${as_me:-configure}:13725: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
13726
13727                 cat >>confdefs.h <<EOF
13728 #define TPUTS_ARG               $cf_arg
13729 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
13730 #define TPUTS_RETURN(value)     $cf_return
13731 EOF
13732                 cf_done=yes
13733                 break
13734
13735 else
13736   echo "$as_me: failed program was:" >&5
13737 cat conftest.$ac_ext >&5
13738 fi
13739 rm -f conftest.$ac_objext conftest.$ac_ext
13740                 done
13741                 test $cf_done = yes && break
13742         done
13743 fi
13744
13745 echo "$as_me:13745: checking for ncurses extended functions" >&5
13746 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
13747 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
13748   echo $ECHO_N "(cached) $ECHO_C" >&6
13749 else
13750
13751 cat >conftest.$ac_ext <<_ACEOF
13752 #line 13752 "configure"
13753 #include "confdefs.h"
13754
13755 #include <${cf_cv_ncurses_header:-curses.h}>
13756 int
13757 main ()
13758 {
13759
13760 int x = NCURSES_EXT_FUNCS
13761
13762   ;
13763   return 0;
13764 }
13765 _ACEOF
13766 rm -f conftest.$ac_objext
13767 if { (eval echo "$as_me:13767: \"$ac_compile\"") >&5
13768   (eval $ac_compile) 2>&5
13769   ac_status=$?
13770   echo "$as_me:13770: \$? = $ac_status" >&5
13771   (exit $ac_status); } &&
13772          { ac_try='test -s conftest.$ac_objext'
13773   { (eval echo "$as_me:13773: \"$ac_try\"") >&5
13774   (eval $ac_try) 2>&5
13775   ac_status=$?
13776   echo "$as_me:13776: \$? = $ac_status" >&5
13777   (exit $ac_status); }; }; then
13778   cf_cv_ncurses_ext_funcs=defined
13779 else
13780   echo "$as_me: failed program was:" >&5
13781 cat conftest.$ac_ext >&5
13782
13783 cat >conftest.$ac_ext <<_ACEOF
13784 #line 13784 "configure"
13785 #include "confdefs.h"
13786
13787 #include <${cf_cv_ncurses_header:-curses.h}>
13788 int
13789 main ()
13790 {
13791
13792         (void) assume_default_colors (0, 0);
13793         (void) curses_version ();
13794         (void) define_key (0, 0);
13795         (void) is_term_resized (0, 0);
13796         (void) key_defined (0);
13797         (void) keybound (0, 0);
13798         (void) keyok (0, 0);
13799         (void) resize_term (0, 0);
13800         (void) resizeterm (0, 0);
13801         (void) use_default_colors ();
13802         (void) use_extended_names (0);
13803         (void) wresize (0, 0, 0);
13804   ;
13805   return 0;
13806 }
13807 _ACEOF
13808 rm -f conftest.$ac_objext conftest$ac_exeext
13809 if { (eval echo "$as_me:13809: \"$ac_link\"") >&5
13810   (eval $ac_link) 2>&5
13811   ac_status=$?
13812   echo "$as_me:13812: \$? = $ac_status" >&5
13813   (exit $ac_status); } &&
13814          { ac_try='test -s conftest$ac_exeext'
13815   { (eval echo "$as_me:13815: \"$ac_try\"") >&5
13816   (eval $ac_try) 2>&5
13817   ac_status=$?
13818   echo "$as_me:13818: \$? = $ac_status" >&5
13819   (exit $ac_status); }; }; then
13820   cf_cv_ncurses_ext_funcs=yes
13821 else
13822   echo "$as_me: failed program was:" >&5
13823 cat conftest.$ac_ext >&5
13824 cf_cv_ncurses_ext_funcs=no
13825 fi
13826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13827
13828 fi
13829 rm -f conftest.$ac_objext conftest.$ac_ext
13830
13831 fi
13832 echo "$as_me:13832: result: $cf_cv_ncurses_ext_funcs" >&5
13833 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
13834 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
13835 #define NCURSES_EXT_FUNCS 1
13836 EOF
13837
13838 if test "$cf_enable_widec" = yes
13839 then
13840         echo "$as_me:13840: checking for wide-character functions" >&5
13841 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
13842 if test "${cf_cv_widechar_funcs+set}" = set; then
13843   echo $ECHO_N "(cached) $ECHO_C" >&6
13844 else
13845
13846         cat >conftest.$ac_ext <<_ACEOF
13847 #line 13847 "configure"
13848 #include "confdefs.h"
13849
13850 #include <${cf_cv_ncurses_header:-curses.h}>
13851 int
13852 main ()
13853 {
13854
13855                 static wchar_t src_wchar[2];
13856                 static cchar_t dst_cchar;
13857                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
13858
13859   ;
13860   return 0;
13861 }
13862 _ACEOF
13863 rm -f conftest.$ac_objext conftest$ac_exeext
13864 if { (eval echo "$as_me:13864: \"$ac_link\"") >&5
13865   (eval $ac_link) 2>&5
13866   ac_status=$?
13867   echo "$as_me:13867: \$? = $ac_status" >&5
13868   (exit $ac_status); } &&
13869          { ac_try='test -s conftest$ac_exeext'
13870   { (eval echo "$as_me:13870: \"$ac_try\"") >&5
13871   (eval $ac_try) 2>&5
13872   ac_status=$?
13873   echo "$as_me:13873: \$? = $ac_status" >&5
13874   (exit $ac_status); }; }; then
13875   cf_cv_widechar_funcs=yes
13876 else
13877   echo "$as_me: failed program was:" >&5
13878 cat conftest.$ac_ext >&5
13879 cf_cv_widechar_funcs=no
13880 fi
13881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13882
13883 fi
13884 echo "$as_me:13884: result: $cf_cv_widechar_funcs" >&5
13885 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
13886         if test "$cf_cv_widechar_funcs" != no ; then
13887                 cat >>confdefs.h <<\EOF
13888 #define USE_WIDEC_SUPPORT 1
13889 EOF
13890
13891         else
13892                 cat >>confdefs.h <<\EOF
13893 #define USE_WIDEC_SUPPORT 0
13894 EOF
13895
13896         fi
13897 else
13898         cat >>confdefs.h <<\EOF
13899 #define USE_WIDEC_SUPPORT 0
13900 EOF
13901
13902 fi
13903
13904 echo "$as_me:13904: checking if sys/time.h works with sys/select.h" >&5
13905 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13906 if test "${cf_cv_sys_time_select+set}" = set; then
13907   echo $ECHO_N "(cached) $ECHO_C" >&6
13908 else
13909
13910 cat >conftest.$ac_ext <<_ACEOF
13911 #line 13911 "configure"
13912 #include "confdefs.h"
13913
13914 #include <sys/types.h>
13915 #ifdef HAVE_SYS_TIME_H
13916 #include <sys/time.h>
13917 #endif
13918 #ifdef HAVE_SYS_SELECT_H
13919 #include <sys/select.h>
13920 #endif
13921
13922 int
13923 main ()
13924 {
13925
13926   ;
13927   return 0;
13928 }
13929 _ACEOF
13930 rm -f conftest.$ac_objext
13931 if { (eval echo "$as_me:13931: \"$ac_compile\"") >&5
13932   (eval $ac_compile) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit $ac_status); } &&
13936          { ac_try='test -s conftest.$ac_objext'
13937   { (eval echo "$as_me:13937: \"$ac_try\"") >&5
13938   (eval $ac_try) 2>&5
13939   ac_status=$?
13940   echo "$as_me:13940: \$? = $ac_status" >&5
13941   (exit $ac_status); }; }; then
13942   cf_cv_sys_time_select=yes
13943 else
13944   echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 cf_cv_sys_time_select=no
13947 fi
13948 rm -f conftest.$ac_objext conftest.$ac_ext
13949
13950 fi
13951
13952 echo "$as_me:13952: result: $cf_cv_sys_time_select" >&5
13953 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13954 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13955 #define HAVE_SYS_TIME_SELECT 1
13956 EOF
13957
13958 echo "$as_me:13958: checking for function curses_version" >&5
13959 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
13960 if test "${cf_cv_func_curses_version+set}" = set; then
13961   echo $ECHO_N "(cached) $ECHO_C" >&6
13962 else
13963
13964 if test "$cross_compiling" = yes; then
13965   cf_cv_func_curses_version=unknown
13966 else
13967   cat >conftest.$ac_ext <<_ACEOF
13968 #line 13968 "configure"
13969 #include "confdefs.h"
13970
13971 #include <${cf_cv_ncurses_header:-curses.h}>
13972 int main()
13973 {
13974         char temp[1024];
13975         sprintf(temp, "%s\n", curses_version());
13976         ${cf_cv_main_return:-return}(0);
13977 }
13978
13979 _ACEOF
13980 rm -f conftest$ac_exeext
13981 if { (eval echo "$as_me:13981: \"$ac_link\"") >&5
13982   (eval $ac_link) 2>&5
13983   ac_status=$?
13984   echo "$as_me:13984: \$? = $ac_status" >&5
13985   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   cf_cv_func_curses_version=yes
13992
13993 else
13994   echo "$as_me: program exited with status $ac_status" >&5
13995 echo "$as_me: failed program was:" >&5
13996 cat conftest.$ac_ext >&5
13997 cf_cv_func_curses_version=no
13998
13999 fi
14000 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14001 fi
14002 rm -f core
14003 fi
14004 echo "$as_me:14004: result: $cf_cv_func_curses_version" >&5
14005 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14006 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14007 #define HAVE_CURSES_VERSION 1
14008 EOF
14009
14010 echo "$as_me:14010: checking for ncurses wrap-prefix" >&5
14011 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14012
14013 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14014 if test "${with_ncurses_wrap_prefix+set}" = set; then
14015   withval="$with_ncurses_wrap_prefix"
14016   NCURSES_WRAP_PREFIX=$withval
14017 else
14018   NCURSES_WRAP_PREFIX=_nc_
14019 fi;
14020 echo "$as_me:14020: result: $NCURSES_WRAP_PREFIX" >&5
14021 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14022
14023 echo "$as_me:14023: checking for alternate character set array" >&5
14024 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14025 if test "${cf_cv_curses_acs_map+set}" = set; then
14026   echo $ECHO_N "(cached) $ECHO_C" >&6
14027 else
14028
14029 cf_cv_curses_acs_map=unknown
14030 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14031 do
14032 cat >conftest.$ac_ext <<_ACEOF
14033 #line 14033 "configure"
14034 #include "confdefs.h"
14035
14036 #include <${cf_cv_ncurses_header:-curses.h}>
14037
14038 int
14039 main ()
14040 {
14041
14042 $name['k'] = ACS_PLUS
14043
14044   ;
14045   return 0;
14046 }
14047 _ACEOF
14048 rm -f conftest.$ac_objext conftest$ac_exeext
14049 if { (eval echo "$as_me:14049: \"$ac_link\"") >&5
14050   (eval $ac_link) 2>&5
14051   ac_status=$?
14052   echo "$as_me:14052: \$? = $ac_status" >&5
14053   (exit $ac_status); } &&
14054          { ac_try='test -s conftest$ac_exeext'
14055   { (eval echo "$as_me:14055: \"$ac_try\"") >&5
14056   (eval $ac_try) 2>&5
14057   ac_status=$?
14058   echo "$as_me:14058: \$? = $ac_status" >&5
14059   (exit $ac_status); }; }; then
14060   cf_cv_curses_acs_map=$name; break
14061 else
14062   echo "$as_me: failed program was:" >&5
14063 cat conftest.$ac_ext >&5
14064 fi
14065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14066 done
14067
14068 fi
14069 echo "$as_me:14069: result: $cf_cv_curses_acs_map" >&5
14070 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14071
14072 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14073 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14074 EOF
14075
14076 if test "$cf_enable_widec" = yes; then
14077
14078 echo "$as_me:14078: checking for wide alternate character set array" >&5
14079 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14080 if test "${cf_cv_curses_wacs_map+set}" = set; then
14081   echo $ECHO_N "(cached) $ECHO_C" >&6
14082 else
14083
14084         cf_cv_curses_wacs_map=unknown
14085         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14086         do
14087         cat >conftest.$ac_ext <<_ACEOF
14088 #line 14088 "configure"
14089 #include "confdefs.h"
14090
14091 #ifndef _XOPEN_SOURCE_EXTENDED
14092 #define _XOPEN_SOURCE_EXTENDED
14093 #endif
14094 #include <${cf_cv_ncurses_header:-curses.h}>
14095 int
14096 main ()
14097 {
14098 void *foo = &($name['k'])
14099   ;
14100   return 0;
14101 }
14102 _ACEOF
14103 rm -f conftest.$ac_objext conftest$ac_exeext
14104 if { (eval echo "$as_me:14104: \"$ac_link\"") >&5
14105   (eval $ac_link) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); } &&
14109          { ac_try='test -s conftest$ac_exeext'
14110   { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111   (eval $ac_try) 2>&5
14112   ac_status=$?
14113   echo "$as_me:14113: \$? = $ac_status" >&5
14114   (exit $ac_status); }; }; then
14115   cf_cv_curses_wacs_map=$name
14116          break
14117 else
14118   echo "$as_me: failed program was:" >&5
14119 cat conftest.$ac_ext >&5
14120 fi
14121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14122         done
14123 fi
14124 echo "$as_me:14124: result: $cf_cv_curses_wacs_map" >&5
14125 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14126
14127 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14128 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14129 EOF
14130
14131 echo "$as_me:14131: checking for wide alternate character constants" >&5
14132 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14133 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14134   echo $ECHO_N "(cached) $ECHO_C" >&6
14135 else
14136
14137 cf_cv_curses_wacs_symbols=no
14138 if test "$cf_cv_curses_wacs_map" != unknown
14139 then
14140         cat >conftest.$ac_ext <<_ACEOF
14141 #line 14141 "configure"
14142 #include "confdefs.h"
14143
14144 #ifndef _XOPEN_SOURCE_EXTENDED
14145 #define _XOPEN_SOURCE_EXTENDED
14146 #endif
14147 #include <${cf_cv_ncurses_header:-curses.h}>
14148 int
14149 main ()
14150 {
14151 cchar_t *foo = WACS_PLUS;
14152          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14153   ;
14154   return 0;
14155 }
14156 _ACEOF
14157 rm -f conftest.$ac_objext conftest$ac_exeext
14158 if { (eval echo "$as_me:14158: \"$ac_link\"") >&5
14159   (eval $ac_link) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit $ac_status); } &&
14163          { ac_try='test -s conftest$ac_exeext'
14164   { (eval echo "$as_me:14164: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); }; }; then
14169   cf_cv_curses_wacs_symbols=yes
14170 else
14171   echo "$as_me: failed program was:" >&5
14172 cat conftest.$ac_ext >&5
14173 fi
14174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14175 else
14176         cat >conftest.$ac_ext <<_ACEOF
14177 #line 14177 "configure"
14178 #include "confdefs.h"
14179
14180 #ifndef _XOPEN_SOURCE_EXTENDED
14181 #define _XOPEN_SOURCE_EXTENDED
14182 #endif
14183 #include <${cf_cv_ncurses_header:-curses.h}>
14184 int
14185 main ()
14186 {
14187 cchar_t *foo = WACS_PLUS
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 rm -f conftest.$ac_objext conftest$ac_exeext
14193 if { (eval echo "$as_me:14193: \"$ac_link\"") >&5
14194   (eval $ac_link) 2>&5
14195   ac_status=$?
14196   echo "$as_me:14196: \$? = $ac_status" >&5
14197   (exit $ac_status); } &&
14198          { ac_try='test -s conftest$ac_exeext'
14199   { (eval echo "$as_me:14199: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit $ac_status); }; }; then
14204   cf_cv_curses_wacs_symbols=yes
14205 else
14206   echo "$as_me: failed program was:" >&5
14207 cat conftest.$ac_ext >&5
14208 fi
14209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14210 fi
14211
14212 fi
14213 echo "$as_me:14213: result: $cf_cv_curses_wacs_symbols" >&5
14214 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14215
14216 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
14217 #define CURSES_WACS_SYMBOLS 1
14218 EOF
14219
14220 fi
14221
14222 echo "$as_me:14222: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14223 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14224 cat >conftest.$ac_ext <<_ACEOF
14225 #line 14225 "configure"
14226 #include "confdefs.h"
14227
14228 #ifndef _XOPEN_SOURCE_EXTENDED
14229 #define _XOPEN_SOURCE_EXTENDED
14230 #endif
14231 #include <${cf_cv_ncurses_header:-curses.h}>
14232 int
14233 main ()
14234 {
14235
14236 attr_t foo
14237
14238   ;
14239   return 0;
14240 }
14241 _ACEOF
14242 rm -f conftest.$ac_objext
14243 if { (eval echo "$as_me:14243: \"$ac_compile\"") >&5
14244   (eval $ac_compile) 2>&5
14245   ac_status=$?
14246   echo "$as_me:14246: \$? = $ac_status" >&5
14247   (exit $ac_status); } &&
14248          { ac_try='test -s conftest.$ac_objext'
14249   { (eval echo "$as_me:14249: \"$ac_try\"") >&5
14250   (eval $ac_try) 2>&5
14251   ac_status=$?
14252   echo "$as_me:14252: \$? = $ac_status" >&5
14253   (exit $ac_status); }; }; then
14254   cf_result=yes
14255 else
14256   echo "$as_me: failed program was:" >&5
14257 cat conftest.$ac_ext >&5
14258 cf_result=no
14259 fi
14260 rm -f conftest.$ac_objext conftest.$ac_ext
14261 echo "$as_me:14261: result: $cf_result" >&5
14262 echo "${ECHO_T}$cf_result" >&6
14263 if test $cf_result = yes ; then
14264
14265 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14266
14267         cat >>confdefs.h <<EOF
14268 #define $cf_result 1
14269 EOF
14270
14271 else
14272         cat >>confdefs.h <<EOF
14273 #define attr_t long
14274 EOF
14275
14276 fi
14277
14278 if test "$cf_enable_widec" = yes; then
14279
14280 # This is needed on Tru64 5.0 to declare mbstate_t
14281 echo "$as_me:14281: checking if we must include wchar.h to declare mbstate_t" >&5
14282 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14283 if test "${cf_cv_mbstate_t+set}" = set; then
14284   echo $ECHO_N "(cached) $ECHO_C" >&6
14285 else
14286
14287 cat >conftest.$ac_ext <<_ACEOF
14288 #line 14288 "configure"
14289 #include "confdefs.h"
14290
14291 #include <stdlib.h>
14292 #include <stdarg.h>
14293 #include <stdio.h>
14294 #ifdef HAVE_LIBUTF8_H
14295 #include <libutf8.h>
14296 #endif
14297 int
14298 main ()
14299 {
14300 mbstate_t state
14301   ;
14302   return 0;
14303 }
14304 _ACEOF
14305 rm -f conftest.$ac_objext
14306 if { (eval echo "$as_me:14306: \"$ac_compile\"") >&5
14307   (eval $ac_compile) 2>&5
14308   ac_status=$?
14309   echo "$as_me:14309: \$? = $ac_status" >&5
14310   (exit $ac_status); } &&
14311          { ac_try='test -s conftest.$ac_objext'
14312   { (eval echo "$as_me:14312: \"$ac_try\"") >&5
14313   (eval $ac_try) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); }; }; then
14317   cf_cv_mbstate_t=no
14318 else
14319   echo "$as_me: failed program was:" >&5
14320 cat conftest.$ac_ext >&5
14321 cat >conftest.$ac_ext <<_ACEOF
14322 #line 14322 "configure"
14323 #include "confdefs.h"
14324
14325 #include <stdlib.h>
14326 #include <stdarg.h>
14327 #include <stdio.h>
14328 #include <wchar.h>
14329 #ifdef HAVE_LIBUTF8_H
14330 #include <libutf8.h>
14331 #endif
14332 int
14333 main ()
14334 {
14335 mbstate_t value
14336   ;
14337   return 0;
14338 }
14339 _ACEOF
14340 rm -f conftest.$ac_objext
14341 if { (eval echo "$as_me:14341: \"$ac_compile\"") >&5
14342   (eval $ac_compile) 2>&5
14343   ac_status=$?
14344   echo "$as_me:14344: \$? = $ac_status" >&5
14345   (exit $ac_status); } &&
14346          { ac_try='test -s conftest.$ac_objext'
14347   { (eval echo "$as_me:14347: \"$ac_try\"") >&5
14348   (eval $ac_try) 2>&5
14349   ac_status=$?
14350   echo "$as_me:14350: \$? = $ac_status" >&5
14351   (exit $ac_status); }; }; then
14352   cf_cv_mbstate_t=yes
14353 else
14354   echo "$as_me: failed program was:" >&5
14355 cat conftest.$ac_ext >&5
14356 cf_cv_mbstate_t=unknown
14357 fi
14358 rm -f conftest.$ac_objext conftest.$ac_ext
14359 fi
14360 rm -f conftest.$ac_objext conftest.$ac_ext
14361 fi
14362 echo "$as_me:14362: result: $cf_cv_mbstate_t" >&5
14363 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14364
14365 if test "$cf_cv_mbstate_t" = yes ; then
14366         cat >>confdefs.h <<\EOF
14367 #define NEED_WCHAR_H 1
14368 EOF
14369
14370         NEED_WCHAR_H=1
14371 fi
14372
14373 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
14374 if test "$cf_cv_mbstate_t" = unknown ; then
14375         NCURSES_MBSTATE_T=1
14376 fi
14377
14378 # if we find mbstate_t in either place, use substitution to provide a fallback.
14379 if test "$cf_cv_mbstate_t" != unknown ; then
14380         NCURSES_OK_MBSTATE_T=1
14381 fi
14382
14383 # This is needed on Tru64 5.0 to declare wchar_t
14384 echo "$as_me:14384: checking if we must include wchar.h to declare wchar_t" >&5
14385 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
14386 if test "${cf_cv_wchar_t+set}" = set; then
14387   echo $ECHO_N "(cached) $ECHO_C" >&6
14388 else
14389
14390 cat >conftest.$ac_ext <<_ACEOF
14391 #line 14391 "configure"
14392 #include "confdefs.h"
14393
14394 #include <stdlib.h>
14395 #include <stdarg.h>
14396 #include <stdio.h>
14397 #ifdef HAVE_LIBUTF8_H
14398 #include <libutf8.h>
14399 #endif
14400 int
14401 main ()
14402 {
14403 wchar_t state
14404   ;
14405   return 0;
14406 }
14407 _ACEOF
14408 rm -f conftest.$ac_objext
14409 if { (eval echo "$as_me:14409: \"$ac_compile\"") >&5
14410   (eval $ac_compile) 2>&5
14411   ac_status=$?
14412   echo "$as_me:14412: \$? = $ac_status" >&5
14413   (exit $ac_status); } &&
14414          { ac_try='test -s conftest.$ac_objext'
14415   { (eval echo "$as_me:14415: \"$ac_try\"") >&5
14416   (eval $ac_try) 2>&5
14417   ac_status=$?
14418   echo "$as_me:14418: \$? = $ac_status" >&5
14419   (exit $ac_status); }; }; then
14420   cf_cv_wchar_t=no
14421 else
14422   echo "$as_me: failed program was:" >&5
14423 cat conftest.$ac_ext >&5
14424 cat >conftest.$ac_ext <<_ACEOF
14425 #line 14425 "configure"
14426 #include "confdefs.h"
14427
14428 #include <stdlib.h>
14429 #include <stdarg.h>
14430 #include <stdio.h>
14431 #include <wchar.h>
14432 #ifdef HAVE_LIBUTF8_H
14433 #include <libutf8.h>
14434 #endif
14435 int
14436 main ()
14437 {
14438 wchar_t value
14439   ;
14440   return 0;
14441 }
14442 _ACEOF
14443 rm -f conftest.$ac_objext
14444 if { (eval echo "$as_me:14444: \"$ac_compile\"") >&5
14445   (eval $ac_compile) 2>&5
14446   ac_status=$?
14447   echo "$as_me:14447: \$? = $ac_status" >&5
14448   (exit $ac_status); } &&
14449          { ac_try='test -s conftest.$ac_objext'
14450   { (eval echo "$as_me:14450: \"$ac_try\"") >&5
14451   (eval $ac_try) 2>&5
14452   ac_status=$?
14453   echo "$as_me:14453: \$? = $ac_status" >&5
14454   (exit $ac_status); }; }; then
14455   cf_cv_wchar_t=yes
14456 else
14457   echo "$as_me: failed program was:" >&5
14458 cat conftest.$ac_ext >&5
14459 cf_cv_wchar_t=unknown
14460 fi
14461 rm -f conftest.$ac_objext conftest.$ac_ext
14462 fi
14463 rm -f conftest.$ac_objext conftest.$ac_ext
14464 fi
14465 echo "$as_me:14465: result: $cf_cv_wchar_t" >&5
14466 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14467
14468 if test "$cf_cv_wchar_t" = yes ; then
14469         cat >>confdefs.h <<\EOF
14470 #define NEED_WCHAR_H 1
14471 EOF
14472
14473         NEED_WCHAR_H=1
14474 fi
14475
14476 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14477 if test "$cf_cv_wchar_t" = unknown ; then
14478         NCURSES_WCHAR_T=1
14479 fi
14480
14481 # if we find wchar_t in either place, use substitution to provide a fallback.
14482 if test "$cf_cv_wchar_t" != unknown ; then
14483         NCURSES_OK_WCHAR_T=1
14484 fi
14485
14486 # This is needed on Tru64 5.0 to declare wint_t
14487 echo "$as_me:14487: checking if we must include wchar.h to declare wint_t" >&5
14488 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14489 if test "${cf_cv_wint_t+set}" = set; then
14490   echo $ECHO_N "(cached) $ECHO_C" >&6
14491 else
14492
14493 cat >conftest.$ac_ext <<_ACEOF
14494 #line 14494 "configure"
14495 #include "confdefs.h"
14496
14497 #include <stdlib.h>
14498 #include <stdarg.h>
14499 #include <stdio.h>
14500 #ifdef HAVE_LIBUTF8_H
14501 #include <libutf8.h>
14502 #endif
14503 int
14504 main ()
14505 {
14506 wint_t state
14507   ;
14508   return 0;
14509 }
14510 _ACEOF
14511 rm -f conftest.$ac_objext
14512 if { (eval echo "$as_me:14512: \"$ac_compile\"") >&5
14513   (eval $ac_compile) 2>&5
14514   ac_status=$?
14515   echo "$as_me:14515: \$? = $ac_status" >&5
14516   (exit $ac_status); } &&
14517          { ac_try='test -s conftest.$ac_objext'
14518   { (eval echo "$as_me:14518: \"$ac_try\"") >&5
14519   (eval $ac_try) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit $ac_status); }; }; then
14523   cf_cv_wint_t=no
14524 else
14525   echo "$as_me: failed program was:" >&5
14526 cat conftest.$ac_ext >&5
14527 cat >conftest.$ac_ext <<_ACEOF
14528 #line 14528 "configure"
14529 #include "confdefs.h"
14530
14531 #include <stdlib.h>
14532 #include <stdarg.h>
14533 #include <stdio.h>
14534 #include <wchar.h>
14535 #ifdef HAVE_LIBUTF8_H
14536 #include <libutf8.h>
14537 #endif
14538 int
14539 main ()
14540 {
14541 wint_t value
14542   ;
14543   return 0;
14544 }
14545 _ACEOF
14546 rm -f conftest.$ac_objext
14547 if { (eval echo "$as_me:14547: \"$ac_compile\"") >&5
14548   (eval $ac_compile) 2>&5
14549   ac_status=$?
14550   echo "$as_me:14550: \$? = $ac_status" >&5
14551   (exit $ac_status); } &&
14552          { ac_try='test -s conftest.$ac_objext'
14553   { (eval echo "$as_me:14553: \"$ac_try\"") >&5
14554   (eval $ac_try) 2>&5
14555   ac_status=$?
14556   echo "$as_me:14556: \$? = $ac_status" >&5
14557   (exit $ac_status); }; }; then
14558   cf_cv_wint_t=yes
14559 else
14560   echo "$as_me: failed program was:" >&5
14561 cat conftest.$ac_ext >&5
14562 cf_cv_wint_t=unknown
14563 fi
14564 rm -f conftest.$ac_objext conftest.$ac_ext
14565 fi
14566 rm -f conftest.$ac_objext conftest.$ac_ext
14567 fi
14568 echo "$as_me:14568: result: $cf_cv_wint_t" >&5
14569 echo "${ECHO_T}$cf_cv_wint_t" >&6
14570
14571 if test "$cf_cv_wint_t" = yes ; then
14572         cat >>confdefs.h <<\EOF
14573 #define NEED_WCHAR_H 1
14574 EOF
14575
14576         NEED_WCHAR_H=1
14577 fi
14578
14579 # if we do not find wint_t in either place, use substitution to provide a fallback.
14580 if test "$cf_cv_wint_t" = unknown ; then
14581         NCURSES_WINT_T=1
14582 fi
14583
14584 # if we find wint_t in either place, use substitution to provide a fallback.
14585 if test "$cf_cv_wint_t" != unknown ; then
14586         NCURSES_OK_WINT_T=1
14587 fi
14588
14589         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
14590
14591 echo "$as_me:14591: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14592 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14593 cat >conftest.$ac_ext <<_ACEOF
14594 #line 14594 "configure"
14595 #include "confdefs.h"
14596
14597 #ifndef _XOPEN_SOURCE_EXTENDED
14598 #define _XOPEN_SOURCE_EXTENDED
14599 #endif
14600 #include <${cf_cv_ncurses_header:-curses.h}>
14601 int
14602 main ()
14603 {
14604
14605 mbstate_t foo
14606
14607   ;
14608   return 0;
14609 }
14610 _ACEOF
14611 rm -f conftest.$ac_objext
14612 if { (eval echo "$as_me:14612: \"$ac_compile\"") >&5
14613   (eval $ac_compile) 2>&5
14614   ac_status=$?
14615   echo "$as_me:14615: \$? = $ac_status" >&5
14616   (exit $ac_status); } &&
14617          { ac_try='test -s conftest.$ac_objext'
14618   { (eval echo "$as_me:14618: \"$ac_try\"") >&5
14619   (eval $ac_try) 2>&5
14620   ac_status=$?
14621   echo "$as_me:14621: \$? = $ac_status" >&5
14622   (exit $ac_status); }; }; then
14623   cf_result=yes
14624 else
14625   echo "$as_me: failed program was:" >&5
14626 cat conftest.$ac_ext >&5
14627 cf_result=no
14628 fi
14629 rm -f conftest.$ac_objext conftest.$ac_ext
14630 echo "$as_me:14630: result: $cf_result" >&5
14631 echo "${ECHO_T}$cf_result" >&6
14632 if test $cf_result = yes ; then
14633
14634 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14635
14636         cat >>confdefs.h <<EOF
14637 #define $cf_result 1
14638 EOF
14639
14640 else
14641         cat >>confdefs.h <<EOF
14642 #define mbstate_t long
14643 EOF
14644
14645 fi
14646
14647         fi
14648
14649         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
14650
14651 echo "$as_me:14651: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14652 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14653 cat >conftest.$ac_ext <<_ACEOF
14654 #line 14654 "configure"
14655 #include "confdefs.h"
14656
14657 #ifndef _XOPEN_SOURCE_EXTENDED
14658 #define _XOPEN_SOURCE_EXTENDED
14659 #endif
14660 #include <${cf_cv_ncurses_header:-curses.h}>
14661 int
14662 main ()
14663 {
14664
14665 wchar_t foo
14666
14667   ;
14668   return 0;
14669 }
14670 _ACEOF
14671 rm -f conftest.$ac_objext
14672 if { (eval echo "$as_me:14672: \"$ac_compile\"") >&5
14673   (eval $ac_compile) 2>&5
14674   ac_status=$?
14675   echo "$as_me:14675: \$? = $ac_status" >&5
14676   (exit $ac_status); } &&
14677          { ac_try='test -s conftest.$ac_objext'
14678   { (eval echo "$as_me:14678: \"$ac_try\"") >&5
14679   (eval $ac_try) 2>&5
14680   ac_status=$?
14681   echo "$as_me:14681: \$? = $ac_status" >&5
14682   (exit $ac_status); }; }; then
14683   cf_result=yes
14684 else
14685   echo "$as_me: failed program was:" >&5
14686 cat conftest.$ac_ext >&5
14687 cf_result=no
14688 fi
14689 rm -f conftest.$ac_objext conftest.$ac_ext
14690 echo "$as_me:14690: result: $cf_result" >&5
14691 echo "${ECHO_T}$cf_result" >&6
14692 if test $cf_result = yes ; then
14693
14694 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14695
14696         cat >>confdefs.h <<EOF
14697 #define $cf_result 1
14698 EOF
14699
14700 else
14701         cat >>confdefs.h <<EOF
14702 #define wchar_t long
14703 EOF
14704
14705 fi
14706
14707         fi
14708
14709         if test "$NCURSES_OK_WINT_T" = 0 ; then
14710
14711 echo "$as_me:14711: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14712 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14713 cat >conftest.$ac_ext <<_ACEOF
14714 #line 14714 "configure"
14715 #include "confdefs.h"
14716
14717 #ifndef _XOPEN_SOURCE_EXTENDED
14718 #define _XOPEN_SOURCE_EXTENDED
14719 #endif
14720 #include <${cf_cv_ncurses_header:-curses.h}>
14721 int
14722 main ()
14723 {
14724
14725 wint_t foo
14726
14727   ;
14728   return 0;
14729 }
14730 _ACEOF
14731 rm -f conftest.$ac_objext
14732 if { (eval echo "$as_me:14732: \"$ac_compile\"") >&5
14733   (eval $ac_compile) 2>&5
14734   ac_status=$?
14735   echo "$as_me:14735: \$? = $ac_status" >&5
14736   (exit $ac_status); } &&
14737          { ac_try='test -s conftest.$ac_objext'
14738   { (eval echo "$as_me:14738: \"$ac_try\"") >&5
14739   (eval $ac_try) 2>&5
14740   ac_status=$?
14741   echo "$as_me:14741: \$? = $ac_status" >&5
14742   (exit $ac_status); }; }; then
14743   cf_result=yes
14744 else
14745   echo "$as_me: failed program was:" >&5
14746 cat conftest.$ac_ext >&5
14747 cf_result=no
14748 fi
14749 rm -f conftest.$ac_objext conftest.$ac_ext
14750 echo "$as_me:14750: result: $cf_result" >&5
14751 echo "${ECHO_T}$cf_result" >&6
14752 if test $cf_result = yes ; then
14753
14754 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14755
14756         cat >>confdefs.h <<EOF
14757 #define $cf_result 1
14758 EOF
14759
14760 else
14761         cat >>confdefs.h <<EOF
14762 #define wint_t long
14763 EOF
14764
14765 fi
14766
14767         fi
14768 fi
14769
14770 echo "$as_me:14770: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
14771 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14772
14773 cat >conftest.$ac_ext <<_ACEOF
14774 #line 14774 "configure"
14775 #include "confdefs.h"
14776
14777 #ifdef HAVE_XCURSES
14778 #include <xcurses.h>
14779 char * XCursesProgramName = "test";
14780 #else
14781 #include <${cf_cv_ncurses_header:-curses.h}>
14782 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14783 #include <ncursesw/term.h>
14784 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14785 #include <ncurses/term.h>
14786 #elif defined(HAVE_TERM_H)
14787 #include <term.h>
14788 #endif
14789 #endif
14790
14791 int
14792 main ()
14793 {
14794
14795 void *foo = &(boolnames)
14796
14797   ;
14798   return 0;
14799 }
14800 _ACEOF
14801 rm -f conftest.$ac_objext
14802 if { (eval echo "$as_me:14802: \"$ac_compile\"") >&5
14803   (eval $ac_compile) 2>&5
14804   ac_status=$?
14805   echo "$as_me:14805: \$? = $ac_status" >&5
14806   (exit $ac_status); } &&
14807          { ac_try='test -s conftest.$ac_objext'
14808   { (eval echo "$as_me:14808: \"$ac_try\"") >&5
14809   (eval $ac_try) 2>&5
14810   ac_status=$?
14811   echo "$as_me:14811: \$? = $ac_status" >&5
14812   (exit $ac_status); }; }; then
14813   cf_result=yes
14814 else
14815   echo "$as_me: failed program was:" >&5
14816 cat conftest.$ac_ext >&5
14817 cf_result=no
14818 fi
14819 rm -f conftest.$ac_objext conftest.$ac_ext
14820 echo "$as_me:14820: result: $cf_result" >&5
14821 echo "${ECHO_T}$cf_result" >&6
14822
14823 if test $cf_result = yes ; then
14824
14825 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14826
14827         cat >>confdefs.h <<EOF
14828 #define $cf_result 1
14829 EOF
14830
14831 else
14832         echo "$as_me:14832: checking for data boolnames in library" >&5
14833 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
14834         # BSD linkers insist on making weak linkage, but resolve at runtime.
14835         if test "$cross_compiling" = yes; then
14836
14837         # cross-compiling
14838         cat >conftest.$ac_ext <<_ACEOF
14839 #line 14839 "configure"
14840 #include "confdefs.h"
14841
14842 #ifdef HAVE_XCURSES
14843 #include <xcurses.h>
14844 char * XCursesProgramName = "test";
14845 #else
14846 #include <${cf_cv_ncurses_header:-curses.h}>
14847 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14848 #include <ncursesw/term.h>
14849 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14850 #include <ncurses/term.h>
14851 #elif defined(HAVE_TERM_H)
14852 #include <term.h>
14853 #endif
14854 #endif
14855
14856 extern char boolnames;
14857 int
14858 main ()
14859 {
14860
14861         do {
14862                 void *foo = &(boolnames);
14863                 ${cf_cv_main_return:-return}(foo == 0);
14864         } while (0)
14865
14866   ;
14867   return 0;
14868 }
14869 _ACEOF
14870 rm -f conftest.$ac_objext conftest$ac_exeext
14871 if { (eval echo "$as_me:14871: \"$ac_link\"") >&5
14872   (eval $ac_link) 2>&5
14873   ac_status=$?
14874   echo "$as_me:14874: \$? = $ac_status" >&5
14875   (exit $ac_status); } &&
14876          { ac_try='test -s conftest$ac_exeext'
14877   { (eval echo "$as_me:14877: \"$ac_try\"") >&5
14878   (eval $ac_try) 2>&5
14879   ac_status=$?
14880   echo "$as_me:14880: \$? = $ac_status" >&5
14881   (exit $ac_status); }; }; then
14882   cf_result=yes
14883 else
14884   echo "$as_me: failed program was:" >&5
14885 cat conftest.$ac_ext >&5
14886 cf_result=no
14887 fi
14888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14889
14890 else
14891   cat >conftest.$ac_ext <<_ACEOF
14892 #line 14892 "configure"
14893 #include "confdefs.h"
14894
14895 #ifdef HAVE_XCURSES
14896 #include <xcurses.h>
14897 char * XCursesProgramName = "test";
14898 #else
14899 #include <${cf_cv_ncurses_header:-curses.h}>
14900 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14901 #include <ncursesw/term.h>
14902 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14903 #include <ncurses/term.h>
14904 #elif defined(HAVE_TERM_H)
14905 #include <term.h>
14906 #endif
14907 #endif
14908
14909 extern char boolnames;
14910 int main(void)
14911 {
14912         void *foo = &(boolnames);
14913         ${cf_cv_main_return:-return}(foo == 0);
14914 }
14915 _ACEOF
14916 rm -f conftest$ac_exeext
14917 if { (eval echo "$as_me:14917: \"$ac_link\"") >&5
14918   (eval $ac_link) 2>&5
14919   ac_status=$?
14920   echo "$as_me:14920: \$? = $ac_status" >&5
14921   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14922   { (eval echo "$as_me:14922: \"$ac_try\"") >&5
14923   (eval $ac_try) 2>&5
14924   ac_status=$?
14925   echo "$as_me:14925: \$? = $ac_status" >&5
14926   (exit $ac_status); }; }; then
14927   cf_result=yes
14928 else
14929   echo "$as_me: program exited with status $ac_status" >&5
14930 echo "$as_me: failed program was:" >&5
14931 cat conftest.$ac_ext >&5
14932 cf_result=no
14933 fi
14934 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14935 fi
14936         echo "$as_me:14936: result: $cf_result" >&5
14937 echo "${ECHO_T}$cf_result" >&6
14938         if test $cf_result = yes ; then
14939
14940 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14941
14942                 cat >>confdefs.h <<EOF
14943 #define $cf_result 1
14944 EOF
14945
14946         fi
14947 fi
14948
14949 echo "$as_me:14949: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
14950 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14951
14952 cat >conftest.$ac_ext <<_ACEOF
14953 #line 14953 "configure"
14954 #include "confdefs.h"
14955
14956 #ifdef HAVE_XCURSES
14957 #include <xcurses.h>
14958 char * XCursesProgramName = "test";
14959 #else
14960 #include <${cf_cv_ncurses_header:-curses.h}>
14961 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14962 #include <ncursesw/term.h>
14963 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14964 #include <ncurses/term.h>
14965 #elif defined(HAVE_TERM_H)
14966 #include <term.h>
14967 #endif
14968 #endif
14969
14970 int
14971 main ()
14972 {
14973
14974 void *foo = &(boolfnames)
14975
14976   ;
14977   return 0;
14978 }
14979 _ACEOF
14980 rm -f conftest.$ac_objext
14981 if { (eval echo "$as_me:14981: \"$ac_compile\"") >&5
14982   (eval $ac_compile) 2>&5
14983   ac_status=$?
14984   echo "$as_me:14984: \$? = $ac_status" >&5
14985   (exit $ac_status); } &&
14986          { ac_try='test -s conftest.$ac_objext'
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_ext
14999 echo "$as_me:14999: result: $cf_result" >&5
15000 echo "${ECHO_T}$cf_result" >&6
15001
15002 if test $cf_result = yes ; then
15003
15004 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15005
15006         cat >>confdefs.h <<EOF
15007 #define $cf_result 1
15008 EOF
15009
15010 else
15011         echo "$as_me:15011: checking for data boolfnames in library" >&5
15012 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15013         # BSD linkers insist on making weak linkage, but resolve at runtime.
15014         if test "$cross_compiling" = yes; then
15015
15016         # cross-compiling
15017         cat >conftest.$ac_ext <<_ACEOF
15018 #line 15018 "configure"
15019 #include "confdefs.h"
15020
15021 #ifdef HAVE_XCURSES
15022 #include <xcurses.h>
15023 char * XCursesProgramName = "test";
15024 #else
15025 #include <${cf_cv_ncurses_header:-curses.h}>
15026 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15027 #include <ncursesw/term.h>
15028 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15029 #include <ncurses/term.h>
15030 #elif defined(HAVE_TERM_H)
15031 #include <term.h>
15032 #endif
15033 #endif
15034
15035 extern char boolfnames;
15036 int
15037 main ()
15038 {
15039
15040         do {
15041                 void *foo = &(boolfnames);
15042                 ${cf_cv_main_return:-return}(foo == 0);
15043         } while (0)
15044
15045   ;
15046   return 0;
15047 }
15048 _ACEOF
15049 rm -f conftest.$ac_objext conftest$ac_exeext
15050 if { (eval echo "$as_me:15050: \"$ac_link\"") >&5
15051   (eval $ac_link) 2>&5
15052   ac_status=$?
15053   echo "$as_me:15053: \$? = $ac_status" >&5
15054   (exit $ac_status); } &&
15055          { ac_try='test -s conftest$ac_exeext'
15056   { (eval echo "$as_me:15056: \"$ac_try\"") >&5
15057   (eval $ac_try) 2>&5
15058   ac_status=$?
15059   echo "$as_me:15059: \$? = $ac_status" >&5
15060   (exit $ac_status); }; }; then
15061   cf_result=yes
15062 else
15063   echo "$as_me: failed program was:" >&5
15064 cat conftest.$ac_ext >&5
15065 cf_result=no
15066 fi
15067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15068
15069 else
15070   cat >conftest.$ac_ext <<_ACEOF
15071 #line 15071 "configure"
15072 #include "confdefs.h"
15073
15074 #ifdef HAVE_XCURSES
15075 #include <xcurses.h>
15076 char * XCursesProgramName = "test";
15077 #else
15078 #include <${cf_cv_ncurses_header:-curses.h}>
15079 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15080 #include <ncursesw/term.h>
15081 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15082 #include <ncurses/term.h>
15083 #elif defined(HAVE_TERM_H)
15084 #include <term.h>
15085 #endif
15086 #endif
15087
15088 extern char boolfnames;
15089 int main(void)
15090 {
15091         void *foo = &(boolfnames);
15092         ${cf_cv_main_return:-return}(foo == 0);
15093 }
15094 _ACEOF
15095 rm -f conftest$ac_exeext
15096 if { (eval echo "$as_me:15096: \"$ac_link\"") >&5
15097   (eval $ac_link) 2>&5
15098   ac_status=$?
15099   echo "$as_me:15099: \$? = $ac_status" >&5
15100   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15101   { (eval echo "$as_me:15101: \"$ac_try\"") >&5
15102   (eval $ac_try) 2>&5
15103   ac_status=$?
15104   echo "$as_me:15104: \$? = $ac_status" >&5
15105   (exit $ac_status); }; }; then
15106   cf_result=yes
15107 else
15108   echo "$as_me: program exited with status $ac_status" >&5
15109 echo "$as_me: failed program was:" >&5
15110 cat conftest.$ac_ext >&5
15111 cf_result=no
15112 fi
15113 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15114 fi
15115         echo "$as_me:15115: result: $cf_result" >&5
15116 echo "${ECHO_T}$cf_result" >&6
15117         if test $cf_result = yes ; then
15118
15119 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15120
15121                 cat >>confdefs.h <<EOF
15122 #define $cf_result 1
15123 EOF
15124
15125         fi
15126 fi
15127
15128 TEST_ARGS="$LIBS"
15129 LIBS=
15130
15131 ac_config_files="$ac_config_files Makefile"
15132 ac_config_commands="$ac_config_commands default"
15133 cat >confcache <<\_ACEOF
15134 # This file is a shell script that caches the results of configure
15135 # tests run on this system so they can be shared between configure
15136 # scripts and configure runs, see configure's option --config-cache.
15137 # It is not useful on other systems.  If it contains results you don't
15138 # want to keep, you may remove or edit it.
15139 #
15140 # config.status only pays attention to the cache file if you give it
15141 # the --recheck option to rerun configure.
15142 #
15143 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15144 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15145 # following values.
15146
15147 _ACEOF
15148
15149 # The following way of writing the cache mishandles newlines in values,
15150 # but we know of no workaround that is simple, portable, and efficient.
15151 # So, don't put newlines in cache variables' values.
15152 # Ultrix sh set writes to stderr and can't be redirected directly,
15153 # and sets the high bit in the cache file unless we assign to the vars.
15154 {
15155   (set) 2>&1 |
15156     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15157     *ac_space=\ *)
15158       # `set' does not quote correctly, so add quotes (double-quote
15159       # substitution turns \\\\ into \\, and sed turns \\ into \).
15160       sed -n \
15161         "s/'/'\\\\''/g;
15162           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15163       ;;
15164     *)
15165       # `set' quotes correctly as required by POSIX, so do not add quotes.
15166       sed -n \
15167         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15168       ;;
15169     esac;
15170 } |
15171   sed '
15172      t clear
15173      : clear
15174      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15175      t end
15176      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15177      : end' >>confcache
15178 if cmp -s $cache_file confcache; then :; else
15179   if test -w $cache_file; then
15180     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15181     cat confcache >$cache_file
15182   else
15183     echo "not updating unwritable cache $cache_file"
15184   fi
15185 fi
15186 rm -f confcache
15187
15188 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15189 # Let make expand exec_prefix.
15190 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15191
15192 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15193 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15194 # trailing colons and then remove the whole line if VPATH becomes empty
15195 # (actually we leave an empty line to preserve line numbers).
15196 if test "x$srcdir" = x.; then
15197   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15198 s/:*\$(srcdir):*/:/;
15199 s/:*\${srcdir}:*/:/;
15200 s/:*@srcdir@:*/:/;
15201 s/^\([^=]*=[    ]*\):*/\1/;
15202 s/:*$//;
15203 s/^[^=]*=[      ]*$//;
15204 }'
15205 fi
15206
15207 DEFS=-DHAVE_CONFIG_H
15208
15209 : ${CONFIG_STATUS=./config.status}
15210 ac_clean_files_save=$ac_clean_files
15211 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15212 { echo "$as_me:15212: creating $CONFIG_STATUS" >&5
15213 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15214 cat >$CONFIG_STATUS <<_ACEOF
15215 #! $SHELL
15216 # Generated automatically by configure.
15217 # Run this file to recreate the current configuration.
15218 # Compiler output produced by configure, useful for debugging
15219 # configure, is in config.log if it exists.
15220
15221 debug=false
15222 SHELL=\${CONFIG_SHELL-$SHELL}
15223 ac_cs_invocation="\$0 \$@"
15224
15225 _ACEOF
15226
15227 cat >>$CONFIG_STATUS <<\_ACEOF
15228 # Be Bourne compatible
15229 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15230   emulate sh
15231   NULLCMD=:
15232 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15233   set -o posix
15234 fi
15235
15236 # Name of the executable.
15237 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15238
15239 if expr a : '\(a\)' >/dev/null 2>&1; then
15240   as_expr=expr
15241 else
15242   as_expr=false
15243 fi
15244
15245 rm -f conf$$ conf$$.exe conf$$.file
15246 echo >conf$$.file
15247 if ln -s conf$$.file conf$$ 2>/dev/null; then
15248   # We could just check for DJGPP; but this test a) works b) is more generic
15249   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15250   if test -f conf$$.exe; then
15251     # Don't use ln at all; we don't have any links
15252     as_ln_s='cp -p'
15253   else
15254     as_ln_s='ln -s'
15255   fi
15256 elif ln conf$$.file conf$$ 2>/dev/null; then
15257   as_ln_s=ln
15258 else
15259   as_ln_s='cp -p'
15260 fi
15261 rm -f conf$$ conf$$.exe conf$$.file
15262
15263 as_executable_p="test -f"
15264
15265 # Support unset when possible.
15266 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15267   as_unset=unset
15268 else
15269   as_unset=false
15270 fi
15271
15272 # NLS nuisances.
15273 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15274 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15275 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15276 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15277 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15278 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15279 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15280 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15281
15282 # IFS
15283 # We need space, tab and new line, in precisely that order.
15284 as_nl='
15285 '
15286 IFS="   $as_nl"
15287
15288 # CDPATH.
15289 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15290
15291 exec 6>&1
15292
15293 _ACEOF
15294
15295 # Files that config.status was made for.
15296 if test -n "$ac_config_files"; then
15297   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15298 fi
15299
15300 if test -n "$ac_config_headers"; then
15301   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15302 fi
15303
15304 if test -n "$ac_config_links"; then
15305   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15306 fi
15307
15308 if test -n "$ac_config_commands"; then
15309   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15310 fi
15311
15312 cat >>$CONFIG_STATUS <<\EOF
15313
15314 ac_cs_usage="\
15315 \`$as_me' instantiates files from templates according to the
15316 current configuration.
15317
15318 Usage: $0 [OPTIONS] [FILE]...
15319
15320   -h, --help       print this help, then exit
15321   -V, --version    print version number, then exit
15322   -d, --debug      don't remove temporary files
15323       --recheck    update $as_me by reconfiguring in the same conditions
15324   --file=FILE[:TEMPLATE]
15325                    instantiate the configuration file FILE
15326   --header=FILE[:TEMPLATE]
15327                    instantiate the configuration header FILE
15328
15329 Configuration files:
15330 $config_files
15331
15332 Configuration headers:
15333 $config_headers
15334
15335 Configuration commands:
15336 $config_commands
15337
15338 Report bugs to <dickey@invisible-island.net>."
15339 EOF
15340
15341 cat >>$CONFIG_STATUS <<EOF
15342 ac_cs_version="\\
15343 config.status
15344 configured by $0, generated by GNU Autoconf 2.52.20101002,
15345   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15346
15347 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15348 Free Software Foundation, Inc.
15349 This config.status script is free software; the Free Software Foundation
15350 gives unlimited permission to copy, distribute and modify it."
15351 srcdir=$srcdir
15352 INSTALL="$INSTALL"
15353 EOF
15354
15355 cat >>$CONFIG_STATUS <<\EOF
15356 # If no file are specified by the user, then we need to provide default
15357 # value.  By we need to know if files were specified by the user.
15358 ac_need_defaults=:
15359 while test $# != 0
15360 do
15361   case $1 in
15362   --*=*)
15363     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15364     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15365     shift
15366     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15367     shift
15368     ;;
15369   -*);;
15370   *) # This is not an option, so the user has probably given explicit
15371      # arguments.
15372      ac_need_defaults=false;;
15373   esac
15374
15375   case $1 in
15376   # Handling of the options.
15377 EOF
15378 cat >>$CONFIG_STATUS <<EOF
15379   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15380     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15381     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15382 EOF
15383 cat >>$CONFIG_STATUS <<\EOF
15384   --version | --vers* | -V )
15385     echo "$ac_cs_version"; exit 0 ;;
15386   --he | --h)
15387     # Conflict between --help and --header
15388     { { echo "$as_me:15388: error: ambiguous option: $1
15389 Try \`$0 --help' for more information." >&5
15390 echo "$as_me: error: ambiguous option: $1
15391 Try \`$0 --help' for more information." >&2;}
15392    { (exit 1); exit 1; }; };;
15393   --help | --hel | -h )
15394     echo "$ac_cs_usage"; exit 0 ;;
15395   --debug | --d* | -d )
15396     debug=: ;;
15397   --file | --fil | --fi | --f )
15398     shift
15399     CONFIG_FILES="$CONFIG_FILES $1"
15400     ac_need_defaults=false;;
15401   --header | --heade | --head | --hea )
15402     shift
15403     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15404     ac_need_defaults=false;;
15405
15406   # This is an error.
15407   -*) { { echo "$as_me:15407: error: unrecognized option: $1
15408 Try \`$0 --help' for more information." >&5
15409 echo "$as_me: error: unrecognized option: $1
15410 Try \`$0 --help' for more information." >&2;}
15411    { (exit 1); exit 1; }; } ;;
15412
15413   *) ac_config_targets="$ac_config_targets $1" ;;
15414
15415   esac
15416   shift
15417 done
15418
15419 exec 5>>config.log
15420 cat >&5 << _ACEOF
15421
15422 ## ----------------------- ##
15423 ## Running config.status.  ##
15424 ## ----------------------- ##
15425
15426 This file was extended by $as_me 2.52.20101002, executed with
15427   CONFIG_FILES    = $CONFIG_FILES
15428   CONFIG_HEADERS  = $CONFIG_HEADERS
15429   CONFIG_LINKS    = $CONFIG_LINKS
15430   CONFIG_COMMANDS = $CONFIG_COMMANDS
15431   > $ac_cs_invocation
15432 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15433
15434 _ACEOF
15435 EOF
15436
15437 cat >>$CONFIG_STATUS <<EOF
15438 #
15439 # INIT-COMMANDS section.
15440 #
15441
15442 AWK="$AWK"
15443 ECHO_LD="$ECHO_LD"
15444
15445 EOF
15446
15447 cat >>$CONFIG_STATUS <<\EOF
15448 for ac_config_target in $ac_config_targets
15449 do
15450   case "$ac_config_target" in
15451   # Handling of arguments.
15452   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15453   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15454   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
15455   *) { { echo "$as_me:15455: error: invalid argument: $ac_config_target" >&5
15456 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15457    { (exit 1); exit 1; }; };;
15458   esac
15459 done
15460
15461 # If the user did not use the arguments to specify the items to instantiate,
15462 # then the envvar interface is used.  Set only those that are not.
15463 # We use the long form for the default assignment because of an extremely
15464 # bizarre bug on SunOS 4.1.3.
15465 if $ac_need_defaults; then
15466   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15467   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15468   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15469 fi
15470
15471 # Create a temporary directory, and hook for its removal unless debugging.
15472 $debug ||
15473 {
15474   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15475   trap '{ (exit 1); exit 1; }' 1 2 13 15
15476 }
15477
15478 # Create a (secure) tmp directory for tmp files.
15479 : ${TMPDIR=/tmp}
15480 {
15481   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15482   test -n "$tmp" && test -d "$tmp"
15483 }  ||
15484 {
15485   tmp=$TMPDIR/cs$$-$RANDOM
15486   (umask 077 && mkdir $tmp)
15487 } ||
15488 {
15489    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15490    { (exit 1); exit 1; }
15491 }
15492
15493 EOF
15494
15495 cat >>$CONFIG_STATUS <<EOF
15496
15497 #
15498 # CONFIG_FILES section.
15499 #
15500
15501 # No need to generate the scripts if there are no CONFIG_FILES.
15502 # This happens for instance when ./config.status config.h
15503 if test -n "\$CONFIG_FILES"; then
15504   # Protect against being on the right side of a sed subst in config.status.
15505   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15506    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15507 s,@SHELL@,$SHELL,;t t
15508 s,@exec_prefix@,$exec_prefix,;t t
15509 s,@prefix@,$prefix,;t t
15510 s,@program_transform_name@,$program_transform_name,;t t
15511 s,@bindir@,$bindir,;t t
15512 s,@sbindir@,$sbindir,;t t
15513 s,@libexecdir@,$libexecdir,;t t
15514 s,@datadir@,$datadir,;t t
15515 s,@sysconfdir@,$sysconfdir,;t t
15516 s,@sharedstatedir@,$sharedstatedir,;t t
15517 s,@localstatedir@,$localstatedir,;t t
15518 s,@libdir@,$libdir,;t t
15519 s,@includedir@,$includedir,;t t
15520 s,@oldincludedir@,$oldincludedir,;t t
15521 s,@infodir@,$infodir,;t t
15522 s,@mandir@,$mandir,;t t
15523 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15524 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15525 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15526 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15527 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15528 s,@build_alias@,$build_alias,;t t
15529 s,@host_alias@,$host_alias,;t t
15530 s,@target_alias@,$target_alias,;t t
15531 s,@ECHO_C@,$ECHO_C,;t t
15532 s,@ECHO_N@,$ECHO_N,;t t
15533 s,@ECHO_T@,$ECHO_T,;t t
15534 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15535 s,@DEFS@,$DEFS,;t t
15536 s,@LIBS@,$LIBS,;t t
15537 s,@build@,$build,;t t
15538 s,@build_cpu@,$build_cpu,;t t
15539 s,@build_vendor@,$build_vendor,;t t
15540 s,@build_os@,$build_os,;t t
15541 s,@host@,$host,;t t
15542 s,@host_cpu@,$host_cpu,;t t
15543 s,@host_vendor@,$host_vendor,;t t
15544 s,@host_os@,$host_os,;t t
15545 s,@SET_MAKE@,$SET_MAKE,;t t
15546 s,@CC@,$CC,;t t
15547 s,@CFLAGS@,$CFLAGS,;t t
15548 s,@LDFLAGS@,$LDFLAGS,;t t
15549 s,@CPPFLAGS@,$CPPFLAGS,;t t
15550 s,@ac_ct_CC@,$ac_ct_CC,;t t
15551 s,@EXEEXT@,$EXEEXT,;t t
15552 s,@OBJEXT@,$OBJEXT,;t t
15553 s,@CPP@,$CPP,;t t
15554 s,@AWK@,$AWK,;t t
15555 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15556 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15557 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15558 s,@LINT@,$LINT,;t t
15559 s,@LINT_OPTS@,$LINT_OPTS,;t t
15560 s,@CTAGS@,$CTAGS,;t t
15561 s,@ETAGS@,$ETAGS,;t t
15562 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15563 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15564 s,@MATH_LIB@,$MATH_LIB,;t t
15565 s,@CC_G_OPT@,$CC_G_OPT,;t t
15566 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15567 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15568 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15569 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15570 s,@LD@,$LD,;t t
15571 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
15572 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
15573 s,@LD_MODEL@,$LD_MODEL,;t t
15574 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15575 s,@LIBTOOL@,$LIBTOOL,;t t
15576 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15577 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15578 s,@LIB_LINK@,$LIB_LINK,;t t
15579 s,@LINK_TESTS@,$LINK_TESTS,;t t
15580 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15581 s,@PTHREAD@,$PTHREAD,;t t
15582 s,@TEST_ARGS@,$TEST_ARGS,;t t
15583 s,@TEST_DEPS@,$TEST_DEPS,;t t
15584 s,@TEST_LIBS@,$TEST_LIBS,;t t
15585 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
15586 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15587 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15588 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15589 s,@ECHO_LT@,$ECHO_LT,;t t
15590 s,@ECHO_LD@,$ECHO_LD,;t t
15591 s,@RULE_CC@,$RULE_CC,;t t
15592 s,@SHOW_CC@,$SHOW_CC,;t t
15593 s,@ECHO_CC@,$ECHO_CC,;t t
15594 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15595 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15596 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15597 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15598 s,@X_CFLAGS@,$X_CFLAGS,;t t
15599 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
15600 s,@X_LIBS@,$X_LIBS,;t t
15601 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
15602 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
15603 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15604 CEOF
15605
15606 EOF
15607
15608   cat >>$CONFIG_STATUS <<\EOF
15609   # Split the substitutions into bite-sized pieces for seds with
15610   # small command number limits, like on Digital OSF/1 and HP-UX.
15611   ac_max_sed_lines=48
15612   ac_sed_frag=1 # Number of current file.
15613   ac_beg=1 # First line for current file.
15614   ac_end=$ac_max_sed_lines # Line after last line for current file.
15615   ac_more_lines=:
15616   ac_sed_cmds=
15617   while $ac_more_lines; do
15618     if test $ac_beg -gt 1; then
15619       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15620     else
15621       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15622     fi
15623     if test ! -s $tmp/subs.frag; then
15624       ac_more_lines=false
15625     else
15626       # The purpose of the label and of the branching condition is to
15627       # speed up the sed processing (if there are no `@' at all, there
15628       # is no need to browse any of the substitutions).
15629       # These are the two extra sed commands mentioned above.
15630       (echo ':t
15631   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15632       if test -z "$ac_sed_cmds"; then
15633         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15634       else
15635         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15636       fi
15637       ac_sed_frag=`expr $ac_sed_frag + 1`
15638       ac_beg=$ac_end
15639       ac_end=`expr $ac_end + $ac_max_sed_lines`
15640     fi
15641   done
15642   if test -z "$ac_sed_cmds"; then
15643     ac_sed_cmds=cat
15644   fi
15645 fi # test -n "$CONFIG_FILES"
15646
15647 EOF
15648 cat >>$CONFIG_STATUS <<\EOF
15649 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15650   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15651   case $ac_file in
15652   - | *:- | *:-:* ) # input from stdin
15653         cat >$tmp/stdin
15654         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15655         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15656   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15657         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15658   * )   ac_file_in=$ac_file.in ;;
15659   esac
15660
15661   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15662   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15663          X"$ac_file" : 'X\(//\)[^/]' \| \
15664          X"$ac_file" : 'X\(//\)$' \| \
15665          X"$ac_file" : 'X\(/\)' \| \
15666          .     : '\(.\)' 2>/dev/null ||
15667 echo X"$ac_file" |
15668     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15669           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15670           /^X\(\/\/\)$/{ s//\1/; q; }
15671           /^X\(\/\).*/{ s//\1/; q; }
15672           s/.*/./; q'`
15673   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15674     { case "$ac_dir" in
15675   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15676   *)                      as_incr_dir=.;;
15677 esac
15678 as_dummy="$ac_dir"
15679 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15680   case $as_mkdir_dir in
15681     # Skip DOS drivespec
15682     ?:) as_incr_dir=$as_mkdir_dir ;;
15683     *)
15684       as_incr_dir=$as_incr_dir/$as_mkdir_dir
15685       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15686     ;;
15687   esac
15688 done; }
15689
15690     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15691     # A "../" for each directory in $ac_dir_suffix.
15692     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15693   else
15694     ac_dir_suffix= ac_dots=
15695   fi
15696
15697   case $srcdir in
15698   .)  ac_srcdir=.
15699       if test -z "$ac_dots"; then
15700          ac_top_srcdir=.
15701       else
15702          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15703       fi ;;
15704   [\\/]* | ?:[\\/]* )
15705       ac_srcdir=$srcdir$ac_dir_suffix;
15706       ac_top_srcdir=$srcdir ;;
15707   *) # Relative path.
15708     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15709     ac_top_srcdir=$ac_dots$srcdir ;;
15710   esac
15711
15712   case $INSTALL in
15713   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15714   *) ac_INSTALL=$ac_dots$INSTALL ;;
15715   esac
15716
15717   if test x"$ac_file" != x-; then
15718     { echo "$as_me:15718: creating $ac_file" >&5
15719 echo "$as_me: creating $ac_file" >&6;}
15720     rm -f "$ac_file"
15721   fi
15722   # Let's still pretend it is `configure' which instantiates (i.e., don't
15723   # use $as_me), people would be surprised to read:
15724   #    /* config.h.  Generated automatically by config.status.  */
15725   configure_input="Generated automatically from `echo $ac_file_in |
15726                                                  sed 's,.*/,,'` by configure."
15727
15728   # First look for the input files in the build tree, otherwise in the
15729   # src tree.
15730   ac_file_inputs=`IFS=:
15731     for f in $ac_file_in; do
15732       case $f in
15733       -) echo $tmp/stdin ;;
15734       [\\/$]*)
15735          # Absolute (can't be DOS-style, as IFS=:)
15736          test -f "$f" || { { echo "$as_me:15736: error: cannot find input file: $f" >&5
15737 echo "$as_me: error: cannot find input file: $f" >&2;}
15738    { (exit 1); exit 1; }; }
15739          echo $f;;
15740       *) # Relative
15741          if test -f "$f"; then
15742            # Build tree
15743            echo $f
15744          elif test -f "$srcdir/$f"; then
15745            # Source tree
15746            echo $srcdir/$f
15747          else
15748            # /dev/null tree
15749            { { echo "$as_me:15749: error: cannot find input file: $f" >&5
15750 echo "$as_me: error: cannot find input file: $f" >&2;}
15751    { (exit 1); exit 1; }; }
15752          fi;;
15753       esac
15754     done` || { (exit 1); exit 1; }
15755 EOF
15756 cat >>$CONFIG_STATUS <<EOF
15757   sed "$ac_vpsub
15758 $extrasub
15759 EOF
15760 cat >>$CONFIG_STATUS <<\EOF
15761 :t
15762 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15763 s,@configure_input@,$configure_input,;t t
15764 s,@srcdir@,$ac_srcdir,;t t
15765 s,@top_srcdir@,$ac_top_srcdir,;t t
15766 s,@INSTALL@,$ac_INSTALL,;t t
15767 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15768   rm -f $tmp/stdin
15769   if test x"$ac_file" != x-; then
15770     mv $tmp/out $ac_file
15771   else
15772     cat $tmp/out
15773     rm -f $tmp/out
15774   fi
15775
15776 done
15777 EOF
15778 cat >>$CONFIG_STATUS <<\EOF
15779
15780 #
15781 # CONFIG_HEADER section.
15782 #
15783
15784 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15785 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15786 #
15787 # ac_d sets the value in "#define NAME VALUE" lines.
15788 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15789 ac_dB='[        ].*$,\1#\2'
15790 ac_dC=' '
15791 ac_dD=',;t'
15792 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15793 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15794 ac_iB='\([      ]\),\1#\2define\3'
15795 ac_iC=' '
15796 ac_iD='\4,;t'
15797 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15798 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15799 ac_uB='$,\1#\2define\3'
15800 ac_uC=' '
15801 ac_uD=',;t'
15802
15803 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15804   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15805   case $ac_file in
15806   - | *:- | *:-:* ) # input from stdin
15807         cat >$tmp/stdin
15808         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15809         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15810   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15811         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15812   * )   ac_file_in=$ac_file.in ;;
15813   esac
15814
15815   test x"$ac_file" != x- && { echo "$as_me:15815: creating $ac_file" >&5
15816 echo "$as_me: creating $ac_file" >&6;}
15817
15818   # First look for the input files in the build tree, otherwise in the
15819   # src tree.
15820   ac_file_inputs=`IFS=:
15821     for f in $ac_file_in; do
15822       case $f in
15823       -) echo $tmp/stdin ;;
15824       [\\/$]*)
15825          # Absolute (can't be DOS-style, as IFS=:)
15826          test -f "$f" || { { echo "$as_me:15826: error: cannot find input file: $f" >&5
15827 echo "$as_me: error: cannot find input file: $f" >&2;}
15828    { (exit 1); exit 1; }; }
15829          echo $f;;
15830       *) # Relative
15831          if test -f "$f"; then
15832            # Build tree
15833            echo $f
15834          elif test -f "$srcdir/$f"; then
15835            # Source tree
15836            echo $srcdir/$f
15837          else
15838            # /dev/null tree
15839            { { echo "$as_me:15839: error: cannot find input file: $f" >&5
15840 echo "$as_me: error: cannot find input file: $f" >&2;}
15841    { (exit 1); exit 1; }; }
15842          fi;;
15843       esac
15844     done` || { (exit 1); exit 1; }
15845   # Remove the trailing spaces.
15846   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
15847
15848 EOF
15849
15850 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
15851 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
15852 # be either 'cat' or 'sort'.
15853 cat confdefs.h | uniq >conftest.vals
15854
15855 # Break up conftest.vals because some shells have a limit on
15856 # the size of here documents, and old seds have small limits too.
15857
15858 rm -f conftest.tail
15859 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
15860 while grep . conftest.vals >/dev/null
15861 do
15862   # Write chunks of a limited-size here document to conftest.frag.
15863   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15864   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15865   echo 'CEOF' >> $CONFIG_STATUS
15866   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15867   rm -f conftest.vals
15868   mv conftest.tail conftest.vals
15869 done
15870 rm -f conftest.vals
15871
15872 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15873 # marker @DEFS@.
15874 echo '  cat >> conftest.edit <<CEOF
15875 /@DEFS@/r conftest.frag
15876 /@DEFS@/d
15877 CEOF
15878 sed -f conftest.edit $tmp/in > $tmp/out
15879 rm -f $tmp/in
15880 mv $tmp/out $tmp/in
15881 rm -f conftest.edit conftest.frag
15882 ' >> $CONFIG_STATUS
15883
15884 cat >>$CONFIG_STATUS <<\EOF
15885   # Let's still pretend it is `configure' which instantiates (i.e., don't
15886   # use $as_me), people would be surprised to read:
15887   #    /* config.h.  Generated automatically by config.status.  */
15888   if test x"$ac_file" = x-; then
15889     echo "/* Generated automatically by configure.  */" >$tmp/config.h
15890   else
15891     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
15892   fi
15893   cat $tmp/in >>$tmp/config.h
15894   rm -f $tmp/in
15895   if test x"$ac_file" != x-; then
15896     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
15897       { echo "$as_me:15897: $ac_file is unchanged" >&5
15898 echo "$as_me: $ac_file is unchanged" >&6;}
15899     else
15900       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15901          X"$ac_file" : 'X\(//\)[^/]' \| \
15902          X"$ac_file" : 'X\(//\)$' \| \
15903          X"$ac_file" : 'X\(/\)' \| \
15904          .     : '\(.\)' 2>/dev/null ||
15905 echo X"$ac_file" |
15906     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15907           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15908           /^X\(\/\/\)$/{ s//\1/; q; }
15909           /^X\(\/\).*/{ s//\1/; q; }
15910           s/.*/./; q'`
15911       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15912         { case "$ac_dir" in
15913   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15914   *)                      as_incr_dir=.;;
15915 esac
15916 as_dummy="$ac_dir"
15917 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15918   case $as_mkdir_dir in
15919     # Skip DOS drivespec
15920     ?:) as_incr_dir=$as_mkdir_dir ;;
15921     *)
15922       as_incr_dir=$as_incr_dir/$as_mkdir_dir
15923       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15924     ;;
15925   esac
15926 done; }
15927
15928       fi
15929       rm -f $ac_file
15930       mv $tmp/config.h $ac_file
15931     fi
15932   else
15933     cat $tmp/config.h
15934     rm -f $tmp/config.h
15935   fi
15936 done
15937 EOF
15938 cat >>$CONFIG_STATUS <<\EOF
15939 #
15940 # CONFIG_COMMANDS section.
15941 #
15942 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15943   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15944   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15945
15946   case $ac_dest in
15947     default )
15948
15949 for cf_dir in .
15950 do
15951         if test ! -d $srcdir/$cf_dir; then
15952                 continue
15953         elif test -f $srcdir/$cf_dir/programs; then
15954                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
15955         fi
15956 done
15957
15958         cat >>Makefile <<TEST_EOF
15959
15960 # These rules are generated so we do not rely on suffix rules, which do not
15961 # work consistently for different make-programs (the '\$(MODEL)/' confuses
15962 # some, and the '\$x' confuses others).
15963 TEST_EOF
15964
15965 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
15966 for N in $LIST
15967 do
15968         cat >>Makefile <<TEST_EOF
15969
15970 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
15971         \$(srcdir)/test.priv.h \\
15972         ncurses_cfg.h
15973         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
15974 TEST_EOF
15975 done
15976
15977 if test -f ../config.guess && test -f ../config.sub
15978 then
15979         cat >>Makefile <<TEST_EOF
15980
15981 # if we used CF_INHERIT for getting these files, we can remove them
15982 distclean::
15983         rm -f config.guess config.sub
15984 TEST_EOF
15985 fi
15986  ;;
15987   esac
15988 done
15989 EOF
15990
15991 cat >>$CONFIG_STATUS <<\EOF
15992
15993 { (exit 0); exit 0; }
15994 EOF
15995 chmod +x $CONFIG_STATUS
15996 ac_clean_files=$ac_clean_files_save
15997
15998 # configure is writing to config.log, and then calls config.status.
15999 # config.status does its own redirection, appending to config.log.
16000 # Unfortunately, on DOS this fails, as config.log is still kept open
16001 # by configure, so config.status won't be able to write to it; its
16002 # output is simply discarded.  So we exec the FD to /dev/null,
16003 # effectively closing config.log, so it can be properly (re)opened and
16004 # appended to by config.status.  When coming back to configure, we
16005 # need to make the FD available again.
16006 if test "$no_create" != yes; then
16007   ac_cs_success=:
16008   exec 5>/dev/null
16009   $SHELL $CONFIG_STATUS || ac_cs_success=false
16010   exec 5>>config.log
16011   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16012   # would make configure fail if this is the last instruction.
16013   $ac_cs_success || { (exit 1); exit 1; }
16014 fi
16015