]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
7e8a814499a3bfa83b485ff612edbacbc5debf9c
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101001.
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 # Factoring default headers for most tests.
109 ac_includes_default="\
110 #include <stdio.h>
111 #if HAVE_SYS_TYPES_H
112 # include <sys/types.h>
113 #endif
114 #if HAVE_SYS_STAT_H
115 # include <sys/stat.h>
116 #endif
117 #if STDC_HEADERS
118 # include <stdlib.h>
119 # include <stddef.h>
120 #else
121 # if HAVE_STDLIB_H
122 #  include <stdlib.h>
123 # endif
124 #endif
125 #if HAVE_STRING_H
126 # if !STDC_HEADERS && HAVE_MEMORY_H
127 #  include <memory.h>
128 # endif
129 # include <string.h>
130 #endif
131 #if HAVE_STRINGS_H
132 # include <strings.h>
133 #endif
134 #if HAVE_INTTYPES_H
135 # include <inttypes.h>
136 #else
137 # if HAVE_STDINT_H
138 #  include <stdint.h>
139 # endif
140 #endif
141 #if HAVE_UNISTD_H
142 # include <unistd.h>
143 #endif"
144
145 # Initialize some variables set by options.
146 ac_init_help=
147 ac_init_version=false
148 # The variables have the same names as the options, with
149 # dashes changed to underlines.
150 cache_file=/dev/null
151 exec_prefix=NONE
152 no_create=
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 verbose=
162 x_includes=NONE
163 x_libraries=NONE
164
165 # Installation directory options.
166 # These are left unexpanded so users can "make install exec_prefix=/foo"
167 # and all the variables that are supposed to be based on exec_prefix
168 # by default will actually change.
169 # Use braces instead of parens because sh, perl, etc. also accept them.
170 bindir='${exec_prefix}/bin'
171 sbindir='${exec_prefix}/sbin'
172 libexecdir='${exec_prefix}/libexec'
173 datadir='${prefix}/share'
174 sysconfdir='${prefix}/etc'
175 sharedstatedir='${prefix}/com'
176 localstatedir='${prefix}/var'
177 libdir='${exec_prefix}/lib'
178 includedir='${prefix}/include'
179 oldincludedir='/usr/include'
180 infodir='${prefix}/info'
181 mandir='${prefix}/man'
182
183 # Identity of this package.
184 PACKAGE_NAME=
185 PACKAGE_TARNAME=
186 PACKAGE_VERSION=
187 PACKAGE_STRING=
188 PACKAGE_BUGREPORT=
189
190 ac_prev=
191 for ac_option
192 do
193   # If the previous option needs an argument, assign it.
194   if test -n "$ac_prev"; then
195     eval "$ac_prev=\$ac_option"
196     ac_prev=
197     continue
198   fi
199
200   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
201
202   # Accept the important Cygnus configure options, so we can diagnose typos.
203
204   case $ac_option in
205
206   -bindir | --bindir | --bindi | --bind | --bin | --bi)
207     ac_prev=bindir ;;
208   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
209     bindir=$ac_optarg ;;
210
211   -build | --build | --buil | --bui | --bu)
212     ac_prev=build_alias ;;
213   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
214     build_alias=$ac_optarg ;;
215
216   -cache-file | --cache-file | --cache-fil | --cache-fi \
217   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
218     ac_prev=cache_file ;;
219   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
220   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
221     cache_file=$ac_optarg ;;
222
223   --config-cache | -C)
224     cache_file=config.cache ;;
225
226   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
227     ac_prev=datadir ;;
228   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
229   | --da=*)
230     datadir=$ac_optarg ;;
231
232   -disable-* | --disable-*)
233     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
234     # Reject names that are not valid shell variable names.
235     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
236       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
237    { (exit 1); exit 1; }; }
238     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
239     eval "enable_$ac_feature=no" ;;
240
241   -enable-* | --enable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     case $ac_option in
249       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
250       *) ac_optarg=yes ;;
251     esac
252     eval "enable_$ac_feature='$ac_optarg'" ;;
253
254   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
255   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
256   | --exec | --exe | --ex)
257     ac_prev=exec_prefix ;;
258   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
259   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
260   | --exec=* | --exe=* | --ex=*)
261     exec_prefix=$ac_optarg ;;
262
263   -gas | --gas | --ga | --g)
264     # Obsolete; use --with-gas.
265     with_gas=yes ;;
266
267   -help | --help | --hel | --he | -h)
268     ac_init_help=long ;;
269   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
270     ac_init_help=recursive ;;
271   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
272     ac_init_help=short ;;
273
274   -host | --host | --hos | --ho)
275     ac_prev=host_alias ;;
276   -host=* | --host=* | --hos=* | --ho=*)
277     host_alias=$ac_optarg ;;
278
279   -includedir | --includedir | --includedi | --included | --include \
280   | --includ | --inclu | --incl | --inc)
281     ac_prev=includedir ;;
282   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
283   | --includ=* | --inclu=* | --incl=* | --inc=*)
284     includedir=$ac_optarg ;;
285
286   -infodir | --infodir | --infodi | --infod | --info | --inf)
287     ac_prev=infodir ;;
288   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
289     infodir=$ac_optarg ;;
290
291   -libdir | --libdir | --libdi | --libd)
292     ac_prev=libdir ;;
293   -libdir=* | --libdir=* | --libdi=* | --libd=*)
294     libdir=$ac_optarg ;;
295
296   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
297   | --libexe | --libex | --libe)
298     ac_prev=libexecdir ;;
299   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
300   | --libexe=* | --libex=* | --libe=*)
301     libexecdir=$ac_optarg ;;
302
303   -localstatedir | --localstatedir | --localstatedi | --localstated \
304   | --localstate | --localstat | --localsta | --localst \
305   | --locals | --local | --loca | --loc | --lo)
306     ac_prev=localstatedir ;;
307   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
308   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
309   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
310     localstatedir=$ac_optarg ;;
311
312   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313     ac_prev=mandir ;;
314   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
315     mandir=$ac_optarg ;;
316
317   -nfp | --nfp | --nf)
318     # Obsolete; use --without-fp.
319     with_fp=no ;;
320
321   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
322   | --no-cr | --no-c)
323     no_create=yes ;;
324
325   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
326   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
327     no_recursion=yes ;;
328
329   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
330   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
331   | --oldin | --oldi | --old | --ol | --o)
332     ac_prev=oldincludedir ;;
333   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
334   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
335   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
336     oldincludedir=$ac_optarg ;;
337
338   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339     ac_prev=prefix ;;
340   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
341     prefix=$ac_optarg ;;
342
343   -program-prefix | --program-prefix | --program-prefi | --program-pref \
344   | --program-pre | --program-pr | --program-p)
345     ac_prev=program_prefix ;;
346   -program-prefix=* | --program-prefix=* | --program-prefi=* \
347   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
348     program_prefix=$ac_optarg ;;
349
350   -program-suffix | --program-suffix | --program-suffi | --program-suff \
351   | --program-suf | --program-su | --program-s)
352     ac_prev=program_suffix ;;
353   -program-suffix=* | --program-suffix=* | --program-suffi=* \
354   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
355     program_suffix=$ac_optarg ;;
356
357   -program-transform-name | --program-transform-name \
358   | --program-transform-nam | --program-transform-na \
359   | --program-transform-n | --program-transform- \
360   | --program-transform | --program-transfor \
361   | --program-transfo | --program-transf \
362   | --program-trans | --program-tran \
363   | --progr-tra | --program-tr | --program-t)
364     ac_prev=program_transform_name ;;
365   -program-transform-name=* | --program-transform-name=* \
366   | --program-transform-nam=* | --program-transform-na=* \
367   | --program-transform-n=* | --program-transform-=* \
368   | --program-transform=* | --program-transfor=* \
369   | --program-transfo=* | --program-transf=* \
370   | --program-trans=* | --program-tran=* \
371   | --progr-tra=* | --program-tr=* | --program-t=*)
372     program_transform_name=$ac_optarg ;;
373
374   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
375   | -silent | --silent | --silen | --sile | --sil)
376     silent=yes ;;
377
378   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379     ac_prev=sbindir ;;
380   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381   | --sbi=* | --sb=*)
382     sbindir=$ac_optarg ;;
383
384   -sharedstatedir | --sharedstatedir | --sharedstatedi \
385   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
386   | --sharedst | --shareds | --shared | --share | --shar \
387   | --sha | --sh)
388     ac_prev=sharedstatedir ;;
389   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
390   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
391   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392   | --sha=* | --sh=*)
393     sharedstatedir=$ac_optarg ;;
394
395   -site | --site | --sit)
396     ac_prev=site ;;
397   -site=* | --site=* | --sit=*)
398     site=$ac_optarg ;;
399
400   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401     ac_prev=srcdir ;;
402   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
403     srcdir=$ac_optarg ;;
404
405   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
406   | --syscon | --sysco | --sysc | --sys | --sy)
407     ac_prev=sysconfdir ;;
408   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
409   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
410     sysconfdir=$ac_optarg ;;
411
412   -target | --target | --targe | --targ | --tar | --ta | --t)
413     ac_prev=target_alias ;;
414   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
415     target_alias=$ac_optarg ;;
416
417   -v | -verbose | --verbose | --verbos | --verbo | --verb)
418     verbose=yes ;;
419
420   -version | --version | --versio | --versi | --vers | -V)
421     ac_init_version=: ;;
422
423   -with-* | --with-*)
424     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
425     # Reject names that are not valid shell variable names.
426     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
427       { echo "$as_me: error: invalid package name: $ac_package" >&2
428    { (exit 1); exit 1; }; }
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     case $ac_option in
431       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "with_$ac_package='$ac_optarg'" ;;
435
436   -without-* | --without-*)
437     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
438     # Reject names that are not valid shell variable names.
439     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
440       { echo "$as_me: error: invalid package name: $ac_package" >&2
441    { (exit 1); exit 1; }; }
442     ac_package=`echo $ac_package | sed 's/-/_/g'`
443     eval "with_$ac_package=no" ;;
444
445   --x)
446     # Obsolete; use --with-x.
447     with_x=yes ;;
448
449   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450   | --x-incl | --x-inc | --x-in | --x-i)
451     ac_prev=x_includes ;;
452   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454     x_includes=$ac_optarg ;;
455
456   -x-libraries | --x-libraries | --x-librarie | --x-librari \
457   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458     ac_prev=x_libraries ;;
459   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461     x_libraries=$ac_optarg ;;
462
463   -*) { echo "$as_me: error: unrecognized option: $ac_option
464 Try \`$0 --help' for more information." >&2
465    { (exit 1); exit 1; }; }
466     ;;
467
468   *=*)
469     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
470     # Reject names that are not valid shell variable names.
471     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
472       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
473    { (exit 1); exit 1; }; }
474     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
475     eval "$ac_envvar='$ac_optarg'"
476     export $ac_envvar ;;
477
478   *)
479     # FIXME: should be removed in autoconf 3.0.
480     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
481     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
482       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
483     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
484     ;;
485
486   esac
487 done
488
489 if test -n "$ac_prev"; then
490   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
491   { echo "$as_me: error: missing argument to $ac_option" >&2
492    { (exit 1); exit 1; }; }
493 fi
494
495 # Be sure to have absolute paths.
496 for ac_var in exec_prefix prefix
497 do
498   eval ac_val=$`echo $ac_var`
499   case $ac_val in
500     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
501     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
502    { (exit 1); exit 1; }; };;
503   esac
504 done
505
506 # Be sure to have absolute paths.
507 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
508               localstatedir libdir includedir oldincludedir infodir mandir
509 do
510   eval ac_val=$`echo $ac_var`
511   case $ac_val in
512     [\\/$]* | ?:[\\/]* ) ;;
513     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
514    { (exit 1); exit 1; }; };;
515   esac
516 done
517
518 # There might be people who depend on the old broken behavior: `$host'
519 # used to hold the argument of --host etc.
520 build=$build_alias
521 host=$host_alias
522 target=$target_alias
523
524 # FIXME: should be removed in autoconf 3.0.
525 if test "x$host_alias" != x; then
526   if test "x$build_alias" = x; then
527     cross_compiling=maybe
528     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
529     If a cross compiler is detected then cross compile mode will be used." >&2
530   elif test "x$build_alias" != "x$host_alias"; then
531     cross_compiling=yes
532   fi
533 fi
534
535 ac_tool_prefix=
536 test -n "$host_alias" && ac_tool_prefix=$host_alias-
537
538 test "$silent" = yes && exec 6>/dev/null
539
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542   ac_srcdir_defaulted=yes
543   # Try the directory containing this script, then its parent.
544   ac_prog=$0
545   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
546   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547   srcdir=$ac_confdir
548   if test ! -r $srcdir/$ac_unique_file; then
549     srcdir=..
550   fi
551 else
552   ac_srcdir_defaulted=no
553 fi
554 if test ! -r $srcdir/$ac_unique_file; then
555   if test "$ac_srcdir_defaulted" = yes; then
556     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
557    { (exit 1); exit 1; }; }
558   else
559     { echo "$as_me: error: cannot find sources in $srcdir" >&2
560    { (exit 1); exit 1; }; }
561   fi
562 fi
563 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
564 ac_env_build_alias_set=${build_alias+set}
565 ac_env_build_alias_value=$build_alias
566 ac_cv_env_build_alias_set=${build_alias+set}
567 ac_cv_env_build_alias_value=$build_alias
568 ac_env_host_alias_set=${host_alias+set}
569 ac_env_host_alias_value=$host_alias
570 ac_cv_env_host_alias_set=${host_alias+set}
571 ac_cv_env_host_alias_value=$host_alias
572 ac_env_target_alias_set=${target_alias+set}
573 ac_env_target_alias_value=$target_alias
574 ac_cv_env_target_alias_set=${target_alias+set}
575 ac_cv_env_target_alias_value=$target_alias
576 ac_env_CC_set=${CC+set}
577 ac_env_CC_value=$CC
578 ac_cv_env_CC_set=${CC+set}
579 ac_cv_env_CC_value=$CC
580 ac_env_CFLAGS_set=${CFLAGS+set}
581 ac_env_CFLAGS_value=$CFLAGS
582 ac_cv_env_CFLAGS_set=${CFLAGS+set}
583 ac_cv_env_CFLAGS_value=$CFLAGS
584 ac_env_LDFLAGS_set=${LDFLAGS+set}
585 ac_env_LDFLAGS_value=$LDFLAGS
586 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
587 ac_cv_env_LDFLAGS_value=$LDFLAGS
588 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
589 ac_env_CPPFLAGS_value=$CPPFLAGS
590 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
591 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
592 ac_env_CPP_set=${CPP+set}
593 ac_env_CPP_value=$CPP
594 ac_cv_env_CPP_set=${CPP+set}
595 ac_cv_env_CPP_value=$CPP
596
597 #
598 # Report the --help message.
599 #
600 if test "$ac_init_help" = "long"; then
601   # Omit some internal or obsolete options to make the list less imposing.
602   # This message is too long to be a string in the A/UX 3.1 sh.
603   cat <<EOF
604 \`configure' configures this package to adapt to many kinds of systems.
605
606 Usage: $0 [OPTION]... [VAR=VALUE]...
607
608 To assign environment variables (e.g., CC, CFLAGS...), specify them as
609 VAR=VALUE.  See below for descriptions of some of the useful variables.
610
611 Defaults for the options are specified in brackets.
612
613 Configuration:
614   -h, --help              display this help and exit
615       --help=short        display options specific to this package
616       --help=recursive    display the short help of all the included packages
617   -V, --version           display version information and exit
618   -q, --quiet, --silent   do not print \`checking...' messages
619       --cache-file=FILE   cache test results in FILE [disabled]
620   -C, --config-cache      alias for \`--cache-file=config.cache'
621   -n, --no-create         do not create output files
622       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
623
624 EOF
625
626   cat <<EOF
627 Installation directories:
628   --prefix=PREFIX         install architecture-independent files in PREFIX
629                           [$ac_default_prefix]
630   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
631                           [PREFIX]
632
633 By default, \`make install' will install all the files in
634 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
635 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
636 for instance \`--prefix=\$HOME'.
637
638 For better control, use the options below.
639
640 Fine tuning of the installation directories:
641   --bindir=DIR            user executables [EPREFIX/bin]
642   --sbindir=DIR           system admin executables [EPREFIX/sbin]
643   --libexecdir=DIR        program executables [EPREFIX/libexec]
644   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
645   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
646   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
647   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
648   --libdir=DIR            object code libraries [EPREFIX/lib]
649   --includedir=DIR        C header files [PREFIX/include]
650   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
651   --infodir=DIR           info documentation [PREFIX/info]
652   --mandir=DIR            man documentation [PREFIX/man]
653 EOF
654
655   cat <<\EOF
656
657 Program names:
658   --program-prefix=PREFIX            prepend PREFIX to installed program names
659   --program-suffix=SUFFIX            append SUFFIX to installed program names
660   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
661
662 X features:
663   --x-includes=DIR    X include files are in DIR
664   --x-libraries=DIR   X library files are in DIR
665
666 System types:
667   --build=BUILD           configure for building on BUILD [guessed]
668   --host=HOST       build programs to run on HOST [BUILD]
669 EOF
670 fi
671
672 if test -n "$ac_init_help"; then
673
674   cat <<\EOF
675
676 Optional Features:
677   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
678   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
679
680 Optional Packages:
681   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
682   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
683
684   --disable-echo          display "compiling" commands
685   --enable-warnings       test: turn on gcc compiler warnings
686   --with-curses-dir=DIR   directory in which (n)curses is installed
687   --with-5lib             use SunOS sysv-libraries
688   --with-ncursesw         use wide ncurses-libraries (installed)
689   --with-ncurses          use ncurses-libraries (installed)
690   --with-pdcurses         compile/link with pdcurses X11 library
691   --with-Xaw3d            link with Xaw 3d library
692   --with-neXtaw           link with neXT Athena library
693   --with-XawPlus          link with Athena-Plus library
694   --with-pkg-config{=path} enable/disable use of pkg-config
695   --with-x                use the X Window System
696   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
697
698 Some influential environment variables:
699   CC          C compiler command
700   CFLAGS      C compiler flags
701   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
702               nonstandard directory <lib dir>
703   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
704               headers in a nonstandard directory <include dir>
705   CPP         C preprocessor
706
707 Use these variables to override the choices made by `configure' or to help
708 it to find libraries and programs with nonstandard names/locations.
709
710 EOF
711 fi
712
713 if test "$ac_init_help" = "recursive"; then
714   # If there are subdirs, report their specific --help.
715   ac_popdir=`pwd`
716   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
717     cd $ac_subdir
718     # A "../" for each directory in /$ac_subdir.
719     ac_dots=`echo $ac_subdir |
720              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
721
722     case $srcdir in
723     .) # No --srcdir option.  We are building in place.
724       ac_sub_srcdir=$srcdir ;;
725     [\\/]* | ?:[\\/]* ) # Absolute path.
726       ac_sub_srcdir=$srcdir/$ac_subdir ;;
727     *) # Relative path.
728       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
729     esac
730
731     # Check for guested configure; otherwise get Cygnus style configure.
732     if test -f $ac_sub_srcdir/configure.gnu; then
733       echo
734       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
735     elif test -f $ac_sub_srcdir/configure; then
736       echo
737       $SHELL $ac_sub_srcdir/configure  --help=recursive
738     elif test -f $ac_sub_srcdir/configure.ac ||
739            test -f $ac_sub_srcdir/configure.in; then
740       echo
741       $ac_configure --help
742     else
743       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
744     fi
745     cd $ac_popdir
746   done
747 fi
748
749 test -n "$ac_init_help" && exit 0
750 if $ac_init_version; then
751   cat <<\EOF
752
753 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
754 Free Software Foundation, Inc.
755 This configure script is free software; the Free Software Foundation
756 gives unlimited permission to copy, distribute and modify it.
757 EOF
758   exit 0
759 fi
760 exec 5>config.log
761 cat >&5 <<EOF
762 This file contains any messages produced by compilers while
763 running configure, to aid debugging if configure makes a mistake.
764
765 It was created by $as_me, which was
766 generated by GNU Autoconf 2.52.20101001.  Invocation command line was
767
768   $ $0 $@
769
770 EOF
771 {
772 cat <<_ASUNAME
773 ## ---------- ##
774 ## Platform.  ##
775 ## ---------- ##
776
777 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
778 uname -m = `(uname -m) 2>/dev/null || echo unknown`
779 uname -r = `(uname -r) 2>/dev/null || echo unknown`
780 uname -s = `(uname -s) 2>/dev/null || echo unknown`
781 uname -v = `(uname -v) 2>/dev/null || echo unknown`
782
783 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
784 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
785
786 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
787 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
788 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
789 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
790 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
791 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
792 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
793
794 PATH = $PATH
795
796 _ASUNAME
797 } >&5
798
799 cat >&5 <<EOF
800 ## ------------ ##
801 ## Core tests.  ##
802 ## ------------ ##
803
804 EOF
805
806 # Keep a trace of the command line.
807 # Strip out --no-create and --no-recursion so they do not pile up.
808 # Also quote any args containing shell meta-characters.
809 ac_configure_args=
810 ac_sep=
811 for ac_arg
812 do
813   case $ac_arg in
814   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
815   | --no-cr | --no-c) ;;
816   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
817   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
818   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
819     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
820     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
821     ac_sep=" " ;;
822   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
823      ac_sep=" " ;;
824   esac
825   # Get rid of the leading space.
826 done
827
828 # When interrupted or exit'd, cleanup temporary files, and complete
829 # config.log.  We remove comments because anyway the quotes in there
830 # would cause problems or look ugly.
831 trap 'exit_status=$?
832   # Save into config.log some information that might help in debugging.
833   echo >&5
834   echo "## ----------------- ##" >&5
835   echo "## Cache variables.  ##" >&5
836   echo "## ----------------- ##" >&5
837   echo >&5
838   # The following way of writing the cache mishandles newlines in values,
839 {
840   (set) 2>&1 |
841     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
842     *ac_space=\ *)
843       sed -n \
844         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
845           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
846       ;;
847     *)
848       sed -n \
849         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
850       ;;
851     esac;
852 } >&5
853   sed "/^$/d" confdefs.h >conftest.log
854   if test -s conftest.log; then
855     echo >&5
856     echo "## ------------ ##" >&5
857     echo "## confdefs.h.  ##" >&5
858     echo "## ------------ ##" >&5
859     echo >&5
860     cat conftest.log >&5
861   fi
862   (echo; echo) >&5
863   test "$ac_signal" != 0 &&
864     echo "$as_me: caught signal $ac_signal" >&5
865   echo "$as_me: exit $exit_status" >&5
866   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
867     exit $exit_status
868      ' 0
869 for ac_signal in 1 2 13 15; do
870   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
871 done
872 ac_signal=0
873
874 # confdefs.h avoids OS command line length limits that DEFS can exceed.
875 rm -rf conftest* confdefs.h
876 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
877 echo >confdefs.h
878
879 # Let the site file select an alternate cache file if it wants to.
880 # Prefer explicitly selected file to automatically selected ones.
881 if test -z "$CONFIG_SITE"; then
882   if test "x$prefix" != xNONE; then
883     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
884   else
885     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
886   fi
887 fi
888 for ac_site_file in $CONFIG_SITE; do
889   if test -r "$ac_site_file"; then
890     { echo "$as_me:890: loading site script $ac_site_file" >&5
891 echo "$as_me: loading site script $ac_site_file" >&6;}
892     cat "$ac_site_file" >&5
893     . "$ac_site_file"
894   fi
895 done
896
897 if test -r "$cache_file"; then
898   # Some versions of bash will fail to source /dev/null (special
899   # files actually), so we avoid doing that.
900   if test -f "$cache_file"; then
901     { echo "$as_me:901: loading cache $cache_file" >&5
902 echo "$as_me: loading cache $cache_file" >&6;}
903     case $cache_file in
904       [\\/]* | ?:[\\/]* ) . $cache_file;;
905       *)                      . ./$cache_file;;
906     esac
907   fi
908 else
909   { echo "$as_me:909: creating cache $cache_file" >&5
910 echo "$as_me: creating cache $cache_file" >&6;}
911   >$cache_file
912 fi
913
914 # Check that the precious variables saved in the cache have kept the same
915 # value.
916 ac_cache_corrupted=false
917 for ac_var in `(set) 2>&1 |
918                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
919   eval ac_old_set=\$ac_cv_env_${ac_var}_set
920   eval ac_new_set=\$ac_env_${ac_var}_set
921   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
922   eval ac_new_val="\$ac_env_${ac_var}_value"
923   case $ac_old_set,$ac_new_set in
924     set,)
925       { echo "$as_me:925: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
926 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
927       ac_cache_corrupted=: ;;
928     ,set)
929       { echo "$as_me:929: error: \`$ac_var' was not set in the previous run" >&5
930 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
931       ac_cache_corrupted=: ;;
932     ,);;
933     *)
934       if test "x$ac_old_val" != "x$ac_new_val"; then
935         { echo "$as_me:935: error: \`$ac_var' has changed since the previous run:" >&5
936 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
937         { echo "$as_me:937:   former value:  $ac_old_val" >&5
938 echo "$as_me:   former value:  $ac_old_val" >&2;}
939         { echo "$as_me:939:   current value: $ac_new_val" >&5
940 echo "$as_me:   current value: $ac_new_val" >&2;}
941         ac_cache_corrupted=:
942       fi;;
943   esac
944   # Pass precious variables to config.status.  It doesn't matter if
945   # we pass some twice (in addition to the command line arguments).
946   if test "$ac_new_set" = set; then
947     case $ac_new_val in
948     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
949       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
950       ac_configure_args="$ac_configure_args '$ac_arg'"
951       ;;
952     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
953        ;;
954     esac
955   fi
956 done
957 if $ac_cache_corrupted; then
958   { echo "$as_me:958: error: changes in the environment can compromise the build" >&5
959 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
960   { { echo "$as_me:960: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
961 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
962    { (exit 1); exit 1; }; }
963 fi
964
965 ac_ext=c
966 ac_cpp='$CPP $CPPFLAGS'
967 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
968 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
969 ac_compiler_gnu=$ac_cv_c_compiler_gnu
970 ac_main_return=return
971
972 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
973   *c*,-n*) ECHO_N= ECHO_C='
974 ' ECHO_T='      ' ;;
975   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
976   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
977 esac
978 echo "#! $SHELL" >conftest.sh
979 echo  "exit 0"   >>conftest.sh
980 chmod +x conftest.sh
981 if { (echo "$as_me:981: PATH=\".;.\"; conftest.sh") >&5
982   (PATH=".;."; conftest.sh) 2>&5
983   ac_status=$?
984   echo "$as_me:984: \$? = $ac_status" >&5
985   (exit $ac_status); }; then
986   ac_path_separator=';'
987 else
988   ac_path_separator=:
989 fi
990 PATH_SEPARATOR="$ac_path_separator"
991 rm -f conftest.sh
992
993 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
994
995 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
996
997 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
998
999 ac_aux_dir=
1000 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1001   if test -f $ac_dir/install-sh; then
1002     ac_aux_dir=$ac_dir
1003     ac_install_sh="$ac_aux_dir/install-sh -c"
1004     break
1005   elif test -f $ac_dir/install.sh; then
1006     ac_aux_dir=$ac_dir
1007     ac_install_sh="$ac_aux_dir/install.sh -c"
1008     break
1009   elif test -f $ac_dir/shtool; then
1010     ac_aux_dir=$ac_dir
1011     ac_install_sh="$ac_aux_dir/shtool install -c"
1012     break
1013   fi
1014 done
1015 if test -z "$ac_aux_dir"; then
1016   { { echo "$as_me:1016: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1017 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1018    { (exit 1); exit 1; }; }
1019 fi
1020 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1021 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1022 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1023
1024 # Make sure we can run config.sub.
1025 $ac_config_sub sun4 >/dev/null 2>&1 ||
1026   { { echo "$as_me:1026: error: cannot run $ac_config_sub" >&5
1027 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1028    { (exit 1); exit 1; }; }
1029
1030 echo "$as_me:1030: checking build system type" >&5
1031 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1032 if test "${ac_cv_build+set}" = set; then
1033   echo $ECHO_N "(cached) $ECHO_C" >&6
1034 else
1035   ac_cv_build_alias=$build_alias
1036 test -z "$ac_cv_build_alias" &&
1037   ac_cv_build_alias=`$ac_config_guess`
1038 test -z "$ac_cv_build_alias" &&
1039   { { echo "$as_me:1039: error: cannot guess build type; you must specify one" >&5
1040 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1041    { (exit 1); exit 1; }; }
1042 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1043   { { echo "$as_me:1043: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1044 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1045    { (exit 1); exit 1; }; }
1046
1047 fi
1048 echo "$as_me:1048: result: $ac_cv_build" >&5
1049 echo "${ECHO_T}$ac_cv_build" >&6
1050 build=$ac_cv_build
1051 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1052 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1053 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1054
1055 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1056         echo "$as_me:1056: checking host system type" >&5
1057 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1058 if test "${ac_cv_host+set}" = set; then
1059   echo $ECHO_N "(cached) $ECHO_C" >&6
1060 else
1061   ac_cv_host_alias=$host_alias
1062 test -z "$ac_cv_host_alias" &&
1063   ac_cv_host_alias=$ac_cv_build_alias
1064 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1065   { { echo "$as_me:1065: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1066 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1067    { (exit 1); exit 1; }; }
1068
1069 fi
1070 echo "$as_me:1070: result: $ac_cv_host" >&5
1071 echo "${ECHO_T}$ac_cv_host" >&6
1072 host=$ac_cv_host
1073 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1074 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1075 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1076
1077         system_name="$host_os"
1078 else
1079         system_name="`(uname -s -r) 2>/dev/null`"
1080         if test -z "$system_name" ; then
1081                 system_name="`(hostname) 2>/dev/null`"
1082         fi
1083 fi
1084 test -n "$system_name" && cat >>confdefs.h <<EOF
1085 #define SYSTEM_NAME "$system_name"
1086 EOF
1087
1088 if test "${cf_cv_system_name+set}" = set; then
1089   echo $ECHO_N "(cached) $ECHO_C" >&6
1090 else
1091   cf_cv_system_name="$system_name"
1092 fi
1093
1094 test -z "$system_name" && system_name="$cf_cv_system_name"
1095 test -n "$cf_cv_system_name" && echo "$as_me:1095: result: Configuring for $cf_cv_system_name" >&5
1096 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1097
1098 if test ".$system_name" != ".$cf_cv_system_name" ; then
1099         echo "$as_me:1099: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1100 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1101         { { echo "$as_me:1101: error: \"Please remove config.cache and try again.\"" >&5
1102 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1103    { (exit 1); exit 1; }; }
1104 fi
1105
1106 test "$program_prefix" != NONE &&
1107   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1108 # Use a double $ so make ignores it.
1109 test "$program_suffix" != NONE &&
1110   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1111 # Double any \ or $.  echo might interpret backslashes.
1112 # By default was `s,x,x', remove it if useless.
1113 cat <<\_ACEOF >conftest.sed
1114 s/[\\$]/&&/g;s/;s,x,x,$//
1115 _ACEOF
1116 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1117 rm conftest.sed
1118
1119 echo "$as_me:1119: checking whether ${MAKE-make} sets \${MAKE}" >&5
1120 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1121 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1122 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1123   echo $ECHO_N "(cached) $ECHO_C" >&6
1124 else
1125   cat >conftest.make <<\EOF
1126 all:
1127         @echo 'ac_maketemp="${MAKE}"'
1128 EOF
1129 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1130 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1131 if test -n "$ac_maketemp"; then
1132   eval ac_cv_prog_make_${ac_make}_set=yes
1133 else
1134   eval ac_cv_prog_make_${ac_make}_set=no
1135 fi
1136 rm -f conftest.make
1137 fi
1138 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1139   echo "$as_me:1139: result: yes" >&5
1140 echo "${ECHO_T}yes" >&6
1141   SET_MAKE=
1142 else
1143   echo "$as_me:1143: result: no" >&5
1144 echo "${ECHO_T}no" >&6
1145   SET_MAKE="MAKE=${MAKE-make}"
1146 fi
1147
1148 ac_ext=c
1149 ac_cpp='$CPP $CPPFLAGS'
1150 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1151 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1152 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1153 ac_main_return=return
1154 if test -n "$ac_tool_prefix"; then
1155   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1156 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1157 echo "$as_me:1157: checking for $ac_word" >&5
1158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1159 if test "${ac_cv_prog_CC+set}" = set; then
1160   echo $ECHO_N "(cached) $ECHO_C" >&6
1161 else
1162   if test -n "$CC"; then
1163   ac_cv_prog_CC="$CC" # Let the user override the test.
1164 else
1165   ac_save_IFS=$IFS; IFS=$ac_path_separator
1166 ac_dummy="$PATH"
1167 for ac_dir in $ac_dummy; do
1168   IFS=$ac_save_IFS
1169   test -z "$ac_dir" && ac_dir=.
1170   $as_executable_p "$ac_dir/$ac_word" || continue
1171 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1172 echo "$as_me:1172: found $ac_dir/$ac_word" >&5
1173 break
1174 done
1175
1176 fi
1177 fi
1178 CC=$ac_cv_prog_CC
1179 if test -n "$CC"; then
1180   echo "$as_me:1180: result: $CC" >&5
1181 echo "${ECHO_T}$CC" >&6
1182 else
1183   echo "$as_me:1183: result: no" >&5
1184 echo "${ECHO_T}no" >&6
1185 fi
1186
1187 fi
1188 if test -z "$ac_cv_prog_CC"; then
1189   ac_ct_CC=$CC
1190   # Extract the first word of "gcc", so it can be a program name with args.
1191 set dummy gcc; ac_word=$2
1192 echo "$as_me:1192: checking for $ac_word" >&5
1193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1194 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1195   echo $ECHO_N "(cached) $ECHO_C" >&6
1196 else
1197   if test -n "$ac_ct_CC"; then
1198   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1199 else
1200   ac_save_IFS=$IFS; IFS=$ac_path_separator
1201 ac_dummy="$PATH"
1202 for ac_dir in $ac_dummy; do
1203   IFS=$ac_save_IFS
1204   test -z "$ac_dir" && ac_dir=.
1205   $as_executable_p "$ac_dir/$ac_word" || continue
1206 ac_cv_prog_ac_ct_CC="gcc"
1207 echo "$as_me:1207: found $ac_dir/$ac_word" >&5
1208 break
1209 done
1210
1211 fi
1212 fi
1213 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1214 if test -n "$ac_ct_CC"; then
1215   echo "$as_me:1215: result: $ac_ct_CC" >&5
1216 echo "${ECHO_T}$ac_ct_CC" >&6
1217 else
1218   echo "$as_me:1218: result: no" >&5
1219 echo "${ECHO_T}no" >&6
1220 fi
1221
1222   CC=$ac_ct_CC
1223 else
1224   CC="$ac_cv_prog_CC"
1225 fi
1226
1227 if test -z "$CC"; then
1228   if test -n "$ac_tool_prefix"; then
1229   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1230 set dummy ${ac_tool_prefix}cc; ac_word=$2
1231 echo "$as_me:1231: checking for $ac_word" >&5
1232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1233 if test "${ac_cv_prog_CC+set}" = set; then
1234   echo $ECHO_N "(cached) $ECHO_C" >&6
1235 else
1236   if test -n "$CC"; then
1237   ac_cv_prog_CC="$CC" # Let the user override the test.
1238 else
1239   ac_save_IFS=$IFS; IFS=$ac_path_separator
1240 ac_dummy="$PATH"
1241 for ac_dir in $ac_dummy; do
1242   IFS=$ac_save_IFS
1243   test -z "$ac_dir" && ac_dir=.
1244   $as_executable_p "$ac_dir/$ac_word" || continue
1245 ac_cv_prog_CC="${ac_tool_prefix}cc"
1246 echo "$as_me:1246: found $ac_dir/$ac_word" >&5
1247 break
1248 done
1249
1250 fi
1251 fi
1252 CC=$ac_cv_prog_CC
1253 if test -n "$CC"; then
1254   echo "$as_me:1254: result: $CC" >&5
1255 echo "${ECHO_T}$CC" >&6
1256 else
1257   echo "$as_me:1257: result: no" >&5
1258 echo "${ECHO_T}no" >&6
1259 fi
1260
1261 fi
1262 if test -z "$ac_cv_prog_CC"; then
1263   ac_ct_CC=$CC
1264   # Extract the first word of "cc", so it can be a program name with args.
1265 set dummy cc; ac_word=$2
1266 echo "$as_me:1266: checking for $ac_word" >&5
1267 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1268 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1269   echo $ECHO_N "(cached) $ECHO_C" >&6
1270 else
1271   if test -n "$ac_ct_CC"; then
1272   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1273 else
1274   ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 ac_dummy="$PATH"
1276 for ac_dir in $ac_dummy; do
1277   IFS=$ac_save_IFS
1278   test -z "$ac_dir" && ac_dir=.
1279   $as_executable_p "$ac_dir/$ac_word" || continue
1280 ac_cv_prog_ac_ct_CC="cc"
1281 echo "$as_me:1281: found $ac_dir/$ac_word" >&5
1282 break
1283 done
1284
1285 fi
1286 fi
1287 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1288 if test -n "$ac_ct_CC"; then
1289   echo "$as_me:1289: result: $ac_ct_CC" >&5
1290 echo "${ECHO_T}$ac_ct_CC" >&6
1291 else
1292   echo "$as_me:1292: result: no" >&5
1293 echo "${ECHO_T}no" >&6
1294 fi
1295
1296   CC=$ac_ct_CC
1297 else
1298   CC="$ac_cv_prog_CC"
1299 fi
1300
1301 fi
1302 if test -z "$CC"; then
1303   # Extract the first word of "cc", so it can be a program name with args.
1304 set dummy cc; ac_word=$2
1305 echo "$as_me:1305: checking for $ac_word" >&5
1306 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1307 if test "${ac_cv_prog_CC+set}" = set; then
1308   echo $ECHO_N "(cached) $ECHO_C" >&6
1309 else
1310   if test -n "$CC"; then
1311   ac_cv_prog_CC="$CC" # Let the user override the test.
1312 else
1313   ac_prog_rejected=no
1314   ac_save_IFS=$IFS; IFS=$ac_path_separator
1315 ac_dummy="$PATH"
1316 for ac_dir in $ac_dummy; do
1317   IFS=$ac_save_IFS
1318   test -z "$ac_dir" && ac_dir=.
1319   $as_executable_p "$ac_dir/$ac_word" || continue
1320 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1321   ac_prog_rejected=yes
1322   continue
1323 fi
1324 ac_cv_prog_CC="cc"
1325 echo "$as_me:1325: found $ac_dir/$ac_word" >&5
1326 break
1327 done
1328
1329 if test $ac_prog_rejected = yes; then
1330   # We found a bogon in the path, so make sure we never use it.
1331   set dummy $ac_cv_prog_CC
1332   shift
1333   if test $# != 0; then
1334     # We chose a different compiler from the bogus one.
1335     # However, it has the same basename, so the bogon will be chosen
1336     # first if we set CC to just the basename; use the full file name.
1337     shift
1338     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1339     shift
1340     ac_cv_prog_CC="$@"
1341   fi
1342 fi
1343 fi
1344 fi
1345 CC=$ac_cv_prog_CC
1346 if test -n "$CC"; then
1347   echo "$as_me:1347: result: $CC" >&5
1348 echo "${ECHO_T}$CC" >&6
1349 else
1350   echo "$as_me:1350: result: no" >&5
1351 echo "${ECHO_T}no" >&6
1352 fi
1353
1354 fi
1355 if test -z "$CC"; then
1356   if test -n "$ac_tool_prefix"; then
1357   for ac_prog in cl
1358   do
1359     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1360 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1361 echo "$as_me:1361: checking for $ac_word" >&5
1362 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1363 if test "${ac_cv_prog_CC+set}" = set; then
1364   echo $ECHO_N "(cached) $ECHO_C" >&6
1365 else
1366   if test -n "$CC"; then
1367   ac_cv_prog_CC="$CC" # Let the user override the test.
1368 else
1369   ac_save_IFS=$IFS; IFS=$ac_path_separator
1370 ac_dummy="$PATH"
1371 for ac_dir in $ac_dummy; do
1372   IFS=$ac_save_IFS
1373   test -z "$ac_dir" && ac_dir=.
1374   $as_executable_p "$ac_dir/$ac_word" || continue
1375 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1376 echo "$as_me:1376: found $ac_dir/$ac_word" >&5
1377 break
1378 done
1379
1380 fi
1381 fi
1382 CC=$ac_cv_prog_CC
1383 if test -n "$CC"; then
1384   echo "$as_me:1384: result: $CC" >&5
1385 echo "${ECHO_T}$CC" >&6
1386 else
1387   echo "$as_me:1387: result: no" >&5
1388 echo "${ECHO_T}no" >&6
1389 fi
1390
1391     test -n "$CC" && break
1392   done
1393 fi
1394 if test -z "$CC"; then
1395   ac_ct_CC=$CC
1396   for ac_prog in cl
1397 do
1398   # Extract the first word of "$ac_prog", so it can be a program name with args.
1399 set dummy $ac_prog; ac_word=$2
1400 echo "$as_me:1400: checking for $ac_word" >&5
1401 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1402 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   if test -n "$ac_ct_CC"; then
1406   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1407 else
1408   ac_save_IFS=$IFS; IFS=$ac_path_separator
1409 ac_dummy="$PATH"
1410 for ac_dir in $ac_dummy; do
1411   IFS=$ac_save_IFS
1412   test -z "$ac_dir" && ac_dir=.
1413   $as_executable_p "$ac_dir/$ac_word" || continue
1414 ac_cv_prog_ac_ct_CC="$ac_prog"
1415 echo "$as_me:1415: found $ac_dir/$ac_word" >&5
1416 break
1417 done
1418
1419 fi
1420 fi
1421 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1422 if test -n "$ac_ct_CC"; then
1423   echo "$as_me:1423: result: $ac_ct_CC" >&5
1424 echo "${ECHO_T}$ac_ct_CC" >&6
1425 else
1426   echo "$as_me:1426: result: no" >&5
1427 echo "${ECHO_T}no" >&6
1428 fi
1429
1430   test -n "$ac_ct_CC" && break
1431 done
1432
1433   CC=$ac_ct_CC
1434 fi
1435
1436 fi
1437
1438 test -z "$CC" && { { echo "$as_me:1438: error: no acceptable cc found in \$PATH" >&5
1439 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1440    { (exit 1); exit 1; }; }
1441
1442 # Provide some information about the compiler.
1443 echo "$as_me:1443:" \
1444      "checking for C compiler version" >&5
1445 ac_compiler=`set X $ac_compile; echo $2`
1446 { (eval echo "$as_me:1446: \"$ac_compiler --version </dev/null >&5\"") >&5
1447   (eval $ac_compiler --version </dev/null >&5) 2>&5
1448   ac_status=$?
1449   echo "$as_me:1449: \$? = $ac_status" >&5
1450   (exit $ac_status); }
1451 { (eval echo "$as_me:1451: \"$ac_compiler -v </dev/null >&5\"") >&5
1452   (eval $ac_compiler -v </dev/null >&5) 2>&5
1453   ac_status=$?
1454   echo "$as_me:1454: \$? = $ac_status" >&5
1455   (exit $ac_status); }
1456 { (eval echo "$as_me:1456: \"$ac_compiler -V </dev/null >&5\"") >&5
1457   (eval $ac_compiler -V </dev/null >&5) 2>&5
1458   ac_status=$?
1459   echo "$as_me:1459: \$? = $ac_status" >&5
1460   (exit $ac_status); }
1461
1462 cat >conftest.$ac_ext <<_ACEOF
1463 #line 1463 "configure"
1464 #include "confdefs.h"
1465
1466 int
1467 main ()
1468 {
1469
1470   ;
1471   return 0;
1472 }
1473 _ACEOF
1474 ac_clean_files_save=$ac_clean_files
1475 ac_clean_files="$ac_clean_files a.out a.exe"
1476 # Try to create an executable without -o first, disregard a.out.
1477 # It will help us diagnose broken compilers, and finding out an intuition
1478 # of exeext.
1479 echo "$as_me:1479: checking for C compiler default output" >&5
1480 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1481 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1482 if { (eval echo "$as_me:1482: \"$ac_link_default\"") >&5
1483   (eval $ac_link_default) 2>&5
1484   ac_status=$?
1485   echo "$as_me:1485: \$? = $ac_status" >&5
1486   (exit $ac_status); }; then
1487   # Find the output, starting from the most likely.  This scheme is
1488 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1489 # resort.
1490 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1491                 ls a.out conftest 2>/dev/null;
1492                 ls a.* conftest.* 2>/dev/null`; do
1493   case $ac_file in
1494     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1495     a.out ) # We found the default executable, but exeext='' is most
1496             # certainly right.
1497             break;;
1498     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1499           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1500           export ac_cv_exeext
1501           break;;
1502     * ) break;;
1503   esac
1504 done
1505 else
1506   echo "$as_me: failed program was:" >&5
1507 cat conftest.$ac_ext >&5
1508 { { echo "$as_me:1508: error: C compiler cannot create executables" >&5
1509 echo "$as_me: error: C compiler cannot create executables" >&2;}
1510    { (exit 77); exit 77; }; }
1511 fi
1512
1513 ac_exeext=$ac_cv_exeext
1514 echo "$as_me:1514: result: $ac_file" >&5
1515 echo "${ECHO_T}$ac_file" >&6
1516
1517 # Check the compiler produces executables we can run.  If not, either
1518 # the compiler is broken, or we cross compile.
1519 echo "$as_me:1519: checking whether the C compiler works" >&5
1520 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1521 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1522 # If not cross compiling, check that we can run a simple program.
1523 if test "$cross_compiling" != yes; then
1524   if { ac_try='./$ac_file'
1525   { (eval echo "$as_me:1525: \"$ac_try\"") >&5
1526   (eval $ac_try) 2>&5
1527   ac_status=$?
1528   echo "$as_me:1528: \$? = $ac_status" >&5
1529   (exit $ac_status); }; }; then
1530     cross_compiling=no
1531   else
1532     if test "$cross_compiling" = maybe; then
1533         cross_compiling=yes
1534     else
1535         { { echo "$as_me:1535: error: cannot run C compiled programs.
1536 If you meant to cross compile, use \`--host'." >&5
1537 echo "$as_me: error: cannot run C compiled programs.
1538 If you meant to cross compile, use \`--host'." >&2;}
1539    { (exit 1); exit 1; }; }
1540     fi
1541   fi
1542 fi
1543 echo "$as_me:1543: result: yes" >&5
1544 echo "${ECHO_T}yes" >&6
1545
1546 rm -f a.out a.exe conftest$ac_cv_exeext
1547 ac_clean_files=$ac_clean_files_save
1548 # Check the compiler produces executables we can run.  If not, either
1549 # the compiler is broken, or we cross compile.
1550 echo "$as_me:1550: checking whether we are cross compiling" >&5
1551 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1552 echo "$as_me:1552: result: $cross_compiling" >&5
1553 echo "${ECHO_T}$cross_compiling" >&6
1554
1555 echo "$as_me:1555: checking for executable suffix" >&5
1556 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1557 if { (eval echo "$as_me:1557: \"$ac_link\"") >&5
1558   (eval $ac_link) 2>&5
1559   ac_status=$?
1560   echo "$as_me:1560: \$? = $ac_status" >&5
1561   (exit $ac_status); }; then
1562   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1563 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1564 # work properly (i.e., refer to `conftest.exe'), while it won't with
1565 # `rm'.
1566 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1567   case $ac_file in
1568     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1569     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1570           export ac_cv_exeext
1571           break;;
1572     * ) break;;
1573   esac
1574 done
1575 else
1576   { { echo "$as_me:1576: error: cannot compute EXEEXT: cannot compile and link" >&5
1577 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1578    { (exit 1); exit 1; }; }
1579 fi
1580
1581 rm -f conftest$ac_cv_exeext
1582 echo "$as_me:1582: result: $ac_cv_exeext" >&5
1583 echo "${ECHO_T}$ac_cv_exeext" >&6
1584
1585 rm -f conftest.$ac_ext
1586 EXEEXT=$ac_cv_exeext
1587 ac_exeext=$EXEEXT
1588 echo "$as_me:1588: checking for object suffix" >&5
1589 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1590 if test "${ac_cv_objext+set}" = set; then
1591   echo $ECHO_N "(cached) $ECHO_C" >&6
1592 else
1593   cat >conftest.$ac_ext <<_ACEOF
1594 #line 1594 "configure"
1595 #include "confdefs.h"
1596
1597 int
1598 main ()
1599 {
1600
1601   ;
1602   return 0;
1603 }
1604 _ACEOF
1605 rm -f conftest.o conftest.obj
1606 if { (eval echo "$as_me:1606: \"$ac_compile\"") >&5
1607   (eval $ac_compile) 2>&5
1608   ac_status=$?
1609   echo "$as_me:1609: \$? = $ac_status" >&5
1610   (exit $ac_status); }; then
1611   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1612   case $ac_file in
1613     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1614     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1615        break;;
1616   esac
1617 done
1618 else
1619   echo "$as_me: failed program was:" >&5
1620 cat conftest.$ac_ext >&5
1621 { { echo "$as_me:1621: error: cannot compute OBJEXT: cannot compile" >&5
1622 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1623    { (exit 1); exit 1; }; }
1624 fi
1625
1626 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1627 fi
1628 echo "$as_me:1628: result: $ac_cv_objext" >&5
1629 echo "${ECHO_T}$ac_cv_objext" >&6
1630 OBJEXT=$ac_cv_objext
1631 ac_objext=$OBJEXT
1632 echo "$as_me:1632: checking whether we are using the GNU C compiler" >&5
1633 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1634 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1635   echo $ECHO_N "(cached) $ECHO_C" >&6
1636 else
1637   cat >conftest.$ac_ext <<_ACEOF
1638 #line 1638 "configure"
1639 #include "confdefs.h"
1640
1641 int
1642 main ()
1643 {
1644 #ifndef __GNUC__
1645        choke me
1646 #endif
1647
1648   ;
1649   return 0;
1650 }
1651 _ACEOF
1652 rm -f conftest.$ac_objext
1653 if { (eval echo "$as_me:1653: \"$ac_compile\"") >&5
1654   (eval $ac_compile) 2>&5
1655   ac_status=$?
1656   echo "$as_me:1656: \$? = $ac_status" >&5
1657   (exit $ac_status); } &&
1658          { ac_try='test -s conftest.$ac_objext'
1659   { (eval echo "$as_me:1659: \"$ac_try\"") >&5
1660   (eval $ac_try) 2>&5
1661   ac_status=$?
1662   echo "$as_me:1662: \$? = $ac_status" >&5
1663   (exit $ac_status); }; }; then
1664   ac_compiler_gnu=yes
1665 else
1666   echo "$as_me: failed program was:" >&5
1667 cat conftest.$ac_ext >&5
1668 ac_compiler_gnu=no
1669 fi
1670 rm -f conftest.$ac_objext conftest.$ac_ext
1671 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1672
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_c_compiler_gnu" >&5
1675 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1676 GCC=`test $ac_compiler_gnu = yes && echo yes`
1677 ac_test_CFLAGS=${CFLAGS+set}
1678 ac_save_CFLAGS=$CFLAGS
1679 CFLAGS="-g"
1680 echo "$as_me:1680: checking whether $CC accepts -g" >&5
1681 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1682 if test "${ac_cv_prog_cc_g+set}" = set; then
1683   echo $ECHO_N "(cached) $ECHO_C" >&6
1684 else
1685   cat >conftest.$ac_ext <<_ACEOF
1686 #line 1686 "configure"
1687 #include "confdefs.h"
1688
1689 int
1690 main ()
1691 {
1692
1693   ;
1694   return 0;
1695 }
1696 _ACEOF
1697 rm -f conftest.$ac_objext
1698 if { (eval echo "$as_me:1698: \"$ac_compile\"") >&5
1699   (eval $ac_compile) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); } &&
1703          { ac_try='test -s conftest.$ac_objext'
1704   { (eval echo "$as_me:1704: \"$ac_try\"") >&5
1705   (eval $ac_try) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }; }; then
1709   ac_cv_prog_cc_g=yes
1710 else
1711   echo "$as_me: failed program was:" >&5
1712 cat conftest.$ac_ext >&5
1713 ac_cv_prog_cc_g=no
1714 fi
1715 rm -f conftest.$ac_objext conftest.$ac_ext
1716 fi
1717 echo "$as_me:1717: result: $ac_cv_prog_cc_g" >&5
1718 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1719 if test "$ac_test_CFLAGS" = set; then
1720   CFLAGS=$ac_save_CFLAGS
1721 elif test $ac_cv_prog_cc_g = yes; then
1722   if test "$GCC" = yes; then
1723     CFLAGS="-g -O2"
1724   else
1725     CFLAGS="-g"
1726   fi
1727 else
1728   if test "$GCC" = yes; then
1729     CFLAGS="-O2"
1730   else
1731     CFLAGS=
1732   fi
1733 fi
1734 # Some people use a C++ compiler to compile C.  Since we use `exit',
1735 # in C++ we need to declare it.  In case someone uses the same compiler
1736 # for both compiling C and C++ we need to have the C++ compiler decide
1737 # the declaration of exit, since it's the most demanding environment.
1738 cat >conftest.$ac_ext <<_ACEOF
1739 #ifndef __cplusplus
1740   choke me
1741 #endif
1742 _ACEOF
1743 rm -f conftest.$ac_objext
1744 if { (eval echo "$as_me:1744: \"$ac_compile\"") >&5
1745   (eval $ac_compile) 2>&5
1746   ac_status=$?
1747   echo "$as_me:1747: \$? = $ac_status" >&5
1748   (exit $ac_status); } &&
1749          { ac_try='test -s conftest.$ac_objext'
1750   { (eval echo "$as_me:1750: \"$ac_try\"") >&5
1751   (eval $ac_try) 2>&5
1752   ac_status=$?
1753   echo "$as_me:1753: \$? = $ac_status" >&5
1754   (exit $ac_status); }; }; then
1755   for ac_declaration in \
1756    ''\
1757    '#include <stdlib.h>' \
1758    'extern "C" void std::exit (int) throw (); using std::exit;' \
1759    'extern "C" void std::exit (int); using std::exit;' \
1760    'extern "C" void exit (int) throw ();' \
1761    'extern "C" void exit (int);' \
1762    'void exit (int);'
1763 do
1764   cat >conftest.$ac_ext <<_ACEOF
1765 #line 1765 "configure"
1766 #include "confdefs.h"
1767 #include <stdlib.h>
1768 $ac_declaration
1769 int
1770 main ()
1771 {
1772 exit (42);
1773   ;
1774   return 0;
1775 }
1776 _ACEOF
1777 rm -f conftest.$ac_objext
1778 if { (eval echo "$as_me:1778: \"$ac_compile\"") >&5
1779   (eval $ac_compile) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); } &&
1783          { ac_try='test -s conftest.$ac_objext'
1784   { (eval echo "$as_me:1784: \"$ac_try\"") >&5
1785   (eval $ac_try) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; }; then
1789   :
1790 else
1791   echo "$as_me: failed program was:" >&5
1792 cat conftest.$ac_ext >&5
1793 continue
1794 fi
1795 rm -f conftest.$ac_objext conftest.$ac_ext
1796   cat >conftest.$ac_ext <<_ACEOF
1797 #line 1797 "configure"
1798 #include "confdefs.h"
1799 $ac_declaration
1800 int
1801 main ()
1802 {
1803 exit (42);
1804   ;
1805   return 0;
1806 }
1807 _ACEOF
1808 rm -f conftest.$ac_objext
1809 if { (eval echo "$as_me:1809: \"$ac_compile\"") >&5
1810   (eval $ac_compile) 2>&5
1811   ac_status=$?
1812   echo "$as_me:1812: \$? = $ac_status" >&5
1813   (exit $ac_status); } &&
1814          { ac_try='test -s conftest.$ac_objext'
1815   { (eval echo "$as_me:1815: \"$ac_try\"") >&5
1816   (eval $ac_try) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; }; then
1820   break
1821 else
1822   echo "$as_me: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1824 fi
1825 rm -f conftest.$ac_objext conftest.$ac_ext
1826 done
1827 rm -rf conftest*
1828 if test -n "$ac_declaration"; then
1829   echo '#ifdef __cplusplus' >>confdefs.h
1830   echo $ac_declaration      >>confdefs.h
1831   echo '#endif'             >>confdefs.h
1832 fi
1833
1834 else
1835   echo "$as_me: failed program was:" >&5
1836 cat conftest.$ac_ext >&5
1837 fi
1838 rm -f conftest.$ac_objext conftest.$ac_ext
1839 ac_ext=c
1840 ac_cpp='$CPP $CPPFLAGS'
1841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1843 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1844 ac_main_return=return
1845
1846 ac_ext=c
1847 ac_cpp='$CPP $CPPFLAGS'
1848 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1849 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1851 ac_main_return=return
1852 echo "$as_me:1852: checking how to run the C preprocessor" >&5
1853 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1854 # On Suns, sometimes $CPP names a directory.
1855 if test -n "$CPP" && test -d "$CPP"; then
1856   CPP=
1857 fi
1858 if test -z "$CPP"; then
1859   if test "${ac_cv_prog_CPP+set}" = set; then
1860   echo $ECHO_N "(cached) $ECHO_C" >&6
1861 else
1862       # Double quotes because CPP needs to be expanded
1863     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1864     do
1865       ac_preproc_ok=false
1866 for ac_c_preproc_warn_flag in '' yes
1867 do
1868   # Use a header file that comes with gcc, so configuring glibc
1869   # with a fresh cross-compiler works.
1870   # On the NeXT, cc -E runs the code through the compiler's parser,
1871   # not just through cpp. "Syntax error" is here to catch this case.
1872   cat >conftest.$ac_ext <<_ACEOF
1873 #line 1873 "configure"
1874 #include "confdefs.h"
1875 #include <assert.h>
1876                      Syntax error
1877 _ACEOF
1878 if { (eval echo "$as_me:1878: \"$ac_cpp conftest.$ac_ext\"") >&5
1879   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1880   ac_status=$?
1881   egrep -v '^ *\+' conftest.er1 >conftest.err
1882   rm -f conftest.er1
1883   cat conftest.err >&5
1884   echo "$as_me:1884: \$? = $ac_status" >&5
1885   (exit $ac_status); } >/dev/null; then
1886   if test -s conftest.err; then
1887     ac_cpp_err=$ac_c_preproc_warn_flag
1888   else
1889     ac_cpp_err=
1890   fi
1891 else
1892   ac_cpp_err=yes
1893 fi
1894 if test -z "$ac_cpp_err"; then
1895   :
1896 else
1897   echo "$as_me: failed program was:" >&5
1898   cat conftest.$ac_ext >&5
1899   # Broken: fails on valid input.
1900 continue
1901 fi
1902 rm -f conftest.err conftest.$ac_ext
1903
1904   # OK, works on sane cases.  Now check whether non-existent headers
1905   # can be detected and how.
1906   cat >conftest.$ac_ext <<_ACEOF
1907 #line 1907 "configure"
1908 #include "confdefs.h"
1909 #include <ac_nonexistent.h>
1910 _ACEOF
1911 if { (eval echo "$as_me:1911: \"$ac_cpp conftest.$ac_ext\"") >&5
1912   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1913   ac_status=$?
1914   egrep -v '^ *\+' conftest.er1 >conftest.err
1915   rm -f conftest.er1
1916   cat conftest.err >&5
1917   echo "$as_me:1917: \$? = $ac_status" >&5
1918   (exit $ac_status); } >/dev/null; then
1919   if test -s conftest.err; then
1920     ac_cpp_err=$ac_c_preproc_warn_flag
1921   else
1922     ac_cpp_err=
1923   fi
1924 else
1925   ac_cpp_err=yes
1926 fi
1927 if test -z "$ac_cpp_err"; then
1928   # Broken: success on invalid input.
1929 continue
1930 else
1931   echo "$as_me: failed program was:" >&5
1932   cat conftest.$ac_ext >&5
1933   # Passes both tests.
1934 ac_preproc_ok=:
1935 break
1936 fi
1937 rm -f conftest.err conftest.$ac_ext
1938
1939 done
1940 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1941 rm -f conftest.err conftest.$ac_ext
1942 if $ac_preproc_ok; then
1943   break
1944 fi
1945
1946     done
1947     ac_cv_prog_CPP=$CPP
1948
1949 fi
1950   CPP=$ac_cv_prog_CPP
1951 else
1952   ac_cv_prog_CPP=$CPP
1953 fi
1954 echo "$as_me:1954: result: $CPP" >&5
1955 echo "${ECHO_T}$CPP" >&6
1956 ac_preproc_ok=false
1957 for ac_c_preproc_warn_flag in '' yes
1958 do
1959   # Use a header file that comes with gcc, so configuring glibc
1960   # with a fresh cross-compiler works.
1961   # On the NeXT, cc -E runs the code through the compiler's parser,
1962   # not just through cpp. "Syntax error" is here to catch this case.
1963   cat >conftest.$ac_ext <<_ACEOF
1964 #line 1964 "configure"
1965 #include "confdefs.h"
1966 #include <assert.h>
1967                      Syntax error
1968 _ACEOF
1969 if { (eval echo "$as_me:1969: \"$ac_cpp conftest.$ac_ext\"") >&5
1970   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1971   ac_status=$?
1972   egrep -v '^ *\+' conftest.er1 >conftest.err
1973   rm -f conftest.er1
1974   cat conftest.err >&5
1975   echo "$as_me:1975: \$? = $ac_status" >&5
1976   (exit $ac_status); } >/dev/null; then
1977   if test -s conftest.err; then
1978     ac_cpp_err=$ac_c_preproc_warn_flag
1979   else
1980     ac_cpp_err=
1981   fi
1982 else
1983   ac_cpp_err=yes
1984 fi
1985 if test -z "$ac_cpp_err"; then
1986   :
1987 else
1988   echo "$as_me: failed program was:" >&5
1989   cat conftest.$ac_ext >&5
1990   # Broken: fails on valid input.
1991 continue
1992 fi
1993 rm -f conftest.err conftest.$ac_ext
1994
1995   # OK, works on sane cases.  Now check whether non-existent headers
1996   # can be detected and how.
1997   cat >conftest.$ac_ext <<_ACEOF
1998 #line 1998 "configure"
1999 #include "confdefs.h"
2000 #include <ac_nonexistent.h>
2001 _ACEOF
2002 if { (eval echo "$as_me:2002: \"$ac_cpp conftest.$ac_ext\"") >&5
2003   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2004   ac_status=$?
2005   egrep -v '^ *\+' conftest.er1 >conftest.err
2006   rm -f conftest.er1
2007   cat conftest.err >&5
2008   echo "$as_me:2008: \$? = $ac_status" >&5
2009   (exit $ac_status); } >/dev/null; then
2010   if test -s conftest.err; then
2011     ac_cpp_err=$ac_c_preproc_warn_flag
2012   else
2013     ac_cpp_err=
2014   fi
2015 else
2016   ac_cpp_err=yes
2017 fi
2018 if test -z "$ac_cpp_err"; then
2019   # Broken: success on invalid input.
2020 continue
2021 else
2022   echo "$as_me: failed program was:" >&5
2023   cat conftest.$ac_ext >&5
2024   # Passes both tests.
2025 ac_preproc_ok=:
2026 break
2027 fi
2028 rm -f conftest.err conftest.$ac_ext
2029
2030 done
2031 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2032 rm -f conftest.err conftest.$ac_ext
2033 if $ac_preproc_ok; then
2034   :
2035 else
2036   { { echo "$as_me:2036: error: C preprocessor \"$CPP\" fails sanity check" >&5
2037 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2038    { (exit 1); exit 1; }; }
2039 fi
2040
2041 ac_ext=c
2042 ac_cpp='$CPP $CPPFLAGS'
2043 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2044 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2045 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2046 ac_main_return=return
2047
2048 for ac_prog in mawk gawk nawk awk
2049 do
2050   # Extract the first word of "$ac_prog", so it can be a program name with args.
2051 set dummy $ac_prog; ac_word=$2
2052 echo "$as_me:2052: checking for $ac_word" >&5
2053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2054 if test "${ac_cv_prog_AWK+set}" = set; then
2055   echo $ECHO_N "(cached) $ECHO_C" >&6
2056 else
2057   if test -n "$AWK"; then
2058   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2059 else
2060   ac_save_IFS=$IFS; IFS=$ac_path_separator
2061 ac_dummy="$PATH"
2062 for ac_dir in $ac_dummy; do
2063   IFS=$ac_save_IFS
2064   test -z "$ac_dir" && ac_dir=.
2065   $as_executable_p "$ac_dir/$ac_word" || continue
2066 ac_cv_prog_AWK="$ac_prog"
2067 echo "$as_me:2067: found $ac_dir/$ac_word" >&5
2068 break
2069 done
2070
2071 fi
2072 fi
2073 AWK=$ac_cv_prog_AWK
2074 if test -n "$AWK"; then
2075   echo "$as_me:2075: result: $AWK" >&5
2076 echo "${ECHO_T}$AWK" >&6
2077 else
2078   echo "$as_me:2078: result: no" >&5
2079 echo "${ECHO_T}no" >&6
2080 fi
2081
2082   test -n "$AWK" && break
2083 done
2084
2085 # Find a good install program.  We prefer a C program (faster),
2086 # so one script is as good as another.  But avoid the broken or
2087 # incompatible versions:
2088 # SysV /etc/install, /usr/sbin/install
2089 # SunOS /usr/etc/install
2090 # IRIX /sbin/install
2091 # AIX /bin/install
2092 # AmigaOS /C/install, which installs bootblocks on floppy discs
2093 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2094 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2095 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2096 # ./install, which can be erroneously created by make from ./install.sh.
2097 echo "$as_me:2097: checking for a BSD compatible install" >&5
2098 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2099 if test -z "$INSTALL"; then
2100 if test "${ac_cv_path_install+set}" = set; then
2101   echo $ECHO_N "(cached) $ECHO_C" >&6
2102 else
2103     ac_save_IFS=$IFS; IFS=$ac_path_separator
2104   for ac_dir in $PATH; do
2105     IFS=$ac_save_IFS
2106     # Account for people who put trailing slashes in PATH elements.
2107     case $ac_dir/ in
2108     / | ./ | .// | /cC/* \
2109     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2110     | /usr/ucb/* ) ;;
2111     *)
2112       # OSF1 and SCO ODT 3.0 have their own names for install.
2113       # Don't use installbsd from OSF since it installs stuff as root
2114       # by default.
2115       for ac_prog in ginstall scoinst install; do
2116         if $as_executable_p "$ac_dir/$ac_prog"; then
2117           if test $ac_prog = install &&
2118             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2119             # AIX install.  It has an incompatible calling convention.
2120             :
2121           elif test $ac_prog = install &&
2122             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2123             # program-specific install script used by HP pwplus--don't use.
2124             :
2125           else
2126             ac_cv_path_install="$ac_dir/$ac_prog -c"
2127             break 2
2128           fi
2129         fi
2130       done
2131       ;;
2132     esac
2133   done
2134
2135 fi
2136   if test "${ac_cv_path_install+set}" = set; then
2137     INSTALL=$ac_cv_path_install
2138   else
2139     # As a last resort, use the slow shell script.  We don't cache a
2140     # path for INSTALL within a source directory, because that will
2141     # break other packages using the cache if that directory is
2142     # removed, or if the path is relative.
2143     INSTALL=$ac_install_sh
2144   fi
2145 fi
2146 echo "$as_me:2146: result: $INSTALL" >&5
2147 echo "${ECHO_T}$INSTALL" >&6
2148
2149 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2150 # It thinks the first close brace ends the variable substitution.
2151 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2152
2153 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2154
2155 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2156
2157 case $INSTALL in
2158 /*)
2159   ;;
2160 *)
2161   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2162   test -z "$cf_dir" && cf_dir=.
2163   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2164   ;;
2165 esac
2166
2167 for ac_prog in tdlint lint alint splint lclint
2168 do
2169   # Extract the first word of "$ac_prog", so it can be a program name with args.
2170 set dummy $ac_prog; ac_word=$2
2171 echo "$as_me:2171: checking for $ac_word" >&5
2172 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2173 if test "${ac_cv_prog_LINT+set}" = set; then
2174   echo $ECHO_N "(cached) $ECHO_C" >&6
2175 else
2176   if test -n "$LINT"; then
2177   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2178 else
2179   ac_save_IFS=$IFS; IFS=$ac_path_separator
2180 ac_dummy="$PATH"
2181 for ac_dir in $ac_dummy; do
2182   IFS=$ac_save_IFS
2183   test -z "$ac_dir" && ac_dir=.
2184   $as_executable_p "$ac_dir/$ac_word" || continue
2185 ac_cv_prog_LINT="$ac_prog"
2186 echo "$as_me:2186: found $ac_dir/$ac_word" >&5
2187 break
2188 done
2189
2190 fi
2191 fi
2192 LINT=$ac_cv_prog_LINT
2193 if test -n "$LINT"; then
2194   echo "$as_me:2194: result: $LINT" >&5
2195 echo "${ECHO_T}$LINT" >&6
2196 else
2197   echo "$as_me:2197: result: no" >&5
2198 echo "${ECHO_T}no" >&6
2199 fi
2200
2201   test -n "$LINT" && break
2202 done
2203
2204 echo "$as_me:2204: checking if filesystem supports mixed-case filenames" >&5
2205 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2206 if test "${cf_cv_mixedcase+set}" = set; then
2207   echo $ECHO_N "(cached) $ECHO_C" >&6
2208 else
2209
2210 if test "$cross_compiling" = yes ; then
2211         case $target_alias in #(vi
2212         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2213                 cf_cv_mixedcase=no
2214                 ;;
2215         *)
2216                 cf_cv_mixedcase=yes
2217                 ;;
2218         esac
2219 else
2220         rm -f conftest CONFTEST
2221         echo test >conftest
2222         if test -f CONFTEST ; then
2223                 cf_cv_mixedcase=no
2224         else
2225                 cf_cv_mixedcase=yes
2226         fi
2227         rm -f conftest CONFTEST
2228 fi
2229
2230 fi
2231 echo "$as_me:2231: result: $cf_cv_mixedcase" >&5
2232 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2233 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2234 #define MIXEDCASE_FILENAMES 1
2235 EOF
2236
2237 for ac_prog in exctags ctags
2238 do
2239   # Extract the first word of "$ac_prog", so it can be a program name with args.
2240 set dummy $ac_prog; ac_word=$2
2241 echo "$as_me:2241: checking for $ac_word" >&5
2242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2243 if test "${ac_cv_prog_CTAGS+set}" = set; then
2244   echo $ECHO_N "(cached) $ECHO_C" >&6
2245 else
2246   if test -n "$CTAGS"; then
2247   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2248 else
2249   ac_save_IFS=$IFS; IFS=$ac_path_separator
2250 ac_dummy="$PATH"
2251 for ac_dir in $ac_dummy; do
2252   IFS=$ac_save_IFS
2253   test -z "$ac_dir" && ac_dir=.
2254   $as_executable_p "$ac_dir/$ac_word" || continue
2255 ac_cv_prog_CTAGS="$ac_prog"
2256 echo "$as_me:2256: found $ac_dir/$ac_word" >&5
2257 break
2258 done
2259
2260 fi
2261 fi
2262 CTAGS=$ac_cv_prog_CTAGS
2263 if test -n "$CTAGS"; then
2264   echo "$as_me:2264: result: $CTAGS" >&5
2265 echo "${ECHO_T}$CTAGS" >&6
2266 else
2267   echo "$as_me:2267: result: no" >&5
2268 echo "${ECHO_T}no" >&6
2269 fi
2270
2271   test -n "$CTAGS" && break
2272 done
2273
2274 for ac_prog in exetags etags
2275 do
2276   # Extract the first word of "$ac_prog", so it can be a program name with args.
2277 set dummy $ac_prog; ac_word=$2
2278 echo "$as_me:2278: checking for $ac_word" >&5
2279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2280 if test "${ac_cv_prog_ETAGS+set}" = set; then
2281   echo $ECHO_N "(cached) $ECHO_C" >&6
2282 else
2283   if test -n "$ETAGS"; then
2284   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2285 else
2286   ac_save_IFS=$IFS; IFS=$ac_path_separator
2287 ac_dummy="$PATH"
2288 for ac_dir in $ac_dummy; do
2289   IFS=$ac_save_IFS
2290   test -z "$ac_dir" && ac_dir=.
2291   $as_executable_p "$ac_dir/$ac_word" || continue
2292 ac_cv_prog_ETAGS="$ac_prog"
2293 echo "$as_me:2293: found $ac_dir/$ac_word" >&5
2294 break
2295 done
2296
2297 fi
2298 fi
2299 ETAGS=$ac_cv_prog_ETAGS
2300 if test -n "$ETAGS"; then
2301   echo "$as_me:2301: result: $ETAGS" >&5
2302 echo "${ECHO_T}$ETAGS" >&6
2303 else
2304   echo "$as_me:2304: result: no" >&5
2305 echo "${ECHO_T}no" >&6
2306 fi
2307
2308   test -n "$ETAGS" && break
2309 done
2310
2311 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2312 set dummy ${CTAGS:-ctags}; ac_word=$2
2313 echo "$as_me:2313: checking for $ac_word" >&5
2314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2315 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2316   echo $ECHO_N "(cached) $ECHO_C" >&6
2317 else
2318   if test -n "$MAKE_LOWER_TAGS"; then
2319   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2320 else
2321   ac_save_IFS=$IFS; IFS=$ac_path_separator
2322 ac_dummy="$PATH"
2323 for ac_dir in $ac_dummy; do
2324   IFS=$ac_save_IFS
2325   test -z "$ac_dir" && ac_dir=.
2326   $as_executable_p "$ac_dir/$ac_word" || continue
2327 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2328 echo "$as_me:2328: found $ac_dir/$ac_word" >&5
2329 break
2330 done
2331
2332   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2333 fi
2334 fi
2335 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2336 if test -n "$MAKE_LOWER_TAGS"; then
2337   echo "$as_me:2337: result: $MAKE_LOWER_TAGS" >&5
2338 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2339 else
2340   echo "$as_me:2340: result: no" >&5
2341 echo "${ECHO_T}no" >&6
2342 fi
2343
2344 if test "$cf_cv_mixedcase" = yes ; then
2345         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2346 set dummy ${ETAGS:-etags}; ac_word=$2
2347 echo "$as_me:2347: checking for $ac_word" >&5
2348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2349 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2350   echo $ECHO_N "(cached) $ECHO_C" >&6
2351 else
2352   if test -n "$MAKE_UPPER_TAGS"; then
2353   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2354 else
2355   ac_save_IFS=$IFS; IFS=$ac_path_separator
2356 ac_dummy="$PATH"
2357 for ac_dir in $ac_dummy; do
2358   IFS=$ac_save_IFS
2359   test -z "$ac_dir" && ac_dir=.
2360   $as_executable_p "$ac_dir/$ac_word" || continue
2361 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2362 echo "$as_me:2362: found $ac_dir/$ac_word" >&5
2363 break
2364 done
2365
2366   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2367 fi
2368 fi
2369 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2370 if test -n "$MAKE_UPPER_TAGS"; then
2371   echo "$as_me:2371: result: $MAKE_UPPER_TAGS" >&5
2372 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2373 else
2374   echo "$as_me:2374: result: no" >&5
2375 echo "${ECHO_T}no" >&6
2376 fi
2377
2378 else
2379         MAKE_UPPER_TAGS=no
2380 fi
2381
2382 if test "$MAKE_UPPER_TAGS" = yes ; then
2383         MAKE_UPPER_TAGS=
2384 else
2385         MAKE_UPPER_TAGS="#"
2386 fi
2387
2388 if test "$MAKE_LOWER_TAGS" = yes ; then
2389         MAKE_LOWER_TAGS=
2390 else
2391         MAKE_LOWER_TAGS="#"
2392 fi
2393
2394 echo "$as_me:2394: checking if -lm needed for math functions" >&5
2395 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2396 if test "${cf_cv_need_libm+set}" = set; then
2397   echo $ECHO_N "(cached) $ECHO_C" >&6
2398 else
2399
2400         cat >conftest.$ac_ext <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404         #include <stdio.h>
2405         #include <math.h>
2406
2407 int
2408 main ()
2409 {
2410 double x = rand(); printf("result = %g\n", sin(x))
2411   ;
2412   return 0;
2413 }
2414 _ACEOF
2415 rm -f conftest.$ac_objext conftest$ac_exeext
2416 if { (eval echo "$as_me:2416: \"$ac_link\"") >&5
2417   (eval $ac_link) 2>&5
2418   ac_status=$?
2419   echo "$as_me:2419: \$? = $ac_status" >&5
2420   (exit $ac_status); } &&
2421          { ac_try='test -s conftest$ac_exeext'
2422   { (eval echo "$as_me:2422: \"$ac_try\"") >&5
2423   (eval $ac_try) 2>&5
2424   ac_status=$?
2425   echo "$as_me:2425: \$? = $ac_status" >&5
2426   (exit $ac_status); }; }; then
2427   cf_cv_need_libm=no
2428 else
2429   echo "$as_me: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
2431 cf_cv_need_libm=yes
2432 fi
2433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2434 fi
2435 echo "$as_me:2435: result: $cf_cv_need_libm" >&5
2436 echo "${ECHO_T}$cf_cv_need_libm" >&6
2437 if test "$cf_cv_need_libm" = yes
2438 then
2439 MATH_LIB=-lm
2440 fi
2441
2442 CC_G_OPT="-g"
2443 CC_SHARED_OPTS=unknown
2444 CPPFLAGS="$CPPFLAGS"
2445 DFT_DEP_SUFFIX=""
2446 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2447 DFT_UPR_MODEL="NORMAL"
2448 LD="ld"
2449 LDFLAGS_SHARED=""
2450 LDFLAGS_STATIC=""
2451 LD_MODEL=""
2452 LD_SHARED_OPTS=""
2453 LIBTOOL=""
2454 LIB_CLEAN=""
2455 LIB_COMPILE=""
2456 LIB_LINK='${CC}'
2457 LINK_TESTS=""
2458 LOCAL_LDFLAGS=""
2459 PTHREAD="-lm"
2460 TEST_ARGS=""
2461 TEST_DEPS=""
2462 TEST_LIBS=""
2463 TINFO_ARGS='$(LIBS_CURSES)'
2464 cf_cv_abi_version=""
2465 cf_cv_rel_version=""
2466
2467 cf_cv_screen=curses
2468 cf_cv_libtype=
2469
2470 echo "$as_me:2470: checking for ${CC:-cc} option to accept ANSI C" >&5
2471 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2472 if test "${cf_cv_ansi_cc+set}" = set; then
2473   echo $ECHO_N "(cached) $ECHO_C" >&6
2474 else
2475
2476 cf_cv_ansi_cc=no
2477 cf_save_CFLAGS="$CFLAGS"
2478 cf_save_CPPFLAGS="$CPPFLAGS"
2479 # Don't try gcc -ansi; that turns off useful extensions and
2480 # breaks some systems' header files.
2481 # AIX                   -qlanglvl=ansi
2482 # Ultrix and OSF/1      -std1
2483 # HP-UX                 -Aa -D_HPUX_SOURCE
2484 # SVR4                  -Xc
2485 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2486 for cf_arg in "-DCC_HAS_PROTOS" \
2487         "" \
2488         -qlanglvl=ansi \
2489         -std1 \
2490         -Ae \
2491         "-Aa -D_HPUX_SOURCE" \
2492         -Xc
2493 do
2494
2495 cf_fix_cppflags=no
2496 cf_new_cflags=
2497 cf_new_cppflags=
2498 cf_new_extra_cppflags=
2499
2500 for cf_add_cflags in $cf_arg
2501 do
2502 case $cf_fix_cppflags in
2503 no)
2504         case $cf_add_cflags in #(vi
2505         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2506                 case $cf_add_cflags in
2507                 -D*)
2508                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2509
2510                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2511                                 && test -z "${cf_tst_cflags}" \
2512                                 && cf_fix_cppflags=yes
2513
2514                         if test $cf_fix_cppflags = yes ; then
2515                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2516                                 continue
2517                         elif test "${cf_tst_cflags}" = "\"'" ; then
2518                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2519                                 continue
2520                         fi
2521                         ;;
2522                 esac
2523                 case "$CPPFLAGS" in
2524                 *$cf_add_cflags) #(vi
2525                         ;;
2526                 *) #(vi
2527                         case $cf_add_cflags in #(vi
2528                         -D*)
2529                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2530
2531 CPPFLAGS=`echo "$CPPFLAGS" | \
2532         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2533                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2534
2535                                 ;;
2536                         esac
2537                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2538                         ;;
2539                 esac
2540                 ;;
2541         *)
2542                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2543                 ;;
2544         esac
2545         ;;
2546 yes)
2547         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2548
2549         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2550
2551         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2552                 && test -z "${cf_tst_cflags}" \
2553                 && cf_fix_cppflags=no
2554         ;;
2555 esac
2556 done
2557
2558 if test -n "$cf_new_cflags" ; then
2559
2560         CFLAGS="$CFLAGS $cf_new_cflags"
2561 fi
2562
2563 if test -n "$cf_new_cppflags" ; then
2564
2565         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2566 fi
2567
2568 if test -n "$cf_new_extra_cppflags" ; then
2569
2570         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2571 fi
2572
2573         cat >conftest.$ac_ext <<_ACEOF
2574 #line 2574 "configure"
2575 #include "confdefs.h"
2576
2577 #ifndef CC_HAS_PROTOS
2578 #if !defined(__STDC__) || (__STDC__ != 1)
2579 choke me
2580 #endif
2581 #endif
2582
2583 int
2584 main ()
2585 {
2586
2587         int test (int i, double x);
2588         struct s1 {int (*f) (int a);};
2589         struct s2 {int (*f) (double a);};
2590   ;
2591   return 0;
2592 }
2593 _ACEOF
2594 rm -f conftest.$ac_objext
2595 if { (eval echo "$as_me:2595: \"$ac_compile\"") >&5
2596   (eval $ac_compile) 2>&5
2597   ac_status=$?
2598   echo "$as_me:2598: \$? = $ac_status" >&5
2599   (exit $ac_status); } &&
2600          { ac_try='test -s conftest.$ac_objext'
2601   { (eval echo "$as_me:2601: \"$ac_try\"") >&5
2602   (eval $ac_try) 2>&5
2603   ac_status=$?
2604   echo "$as_me:2604: \$? = $ac_status" >&5
2605   (exit $ac_status); }; }; then
2606   cf_cv_ansi_cc="$cf_arg"; break
2607 else
2608   echo "$as_me: failed program was:" >&5
2609 cat conftest.$ac_ext >&5
2610 fi
2611 rm -f conftest.$ac_objext conftest.$ac_ext
2612 done
2613 CFLAGS="$cf_save_CFLAGS"
2614 CPPFLAGS="$cf_save_CPPFLAGS"
2615
2616 fi
2617 echo "$as_me:2617: result: $cf_cv_ansi_cc" >&5
2618 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2619
2620 if test "$cf_cv_ansi_cc" != "no"; then
2621 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2622
2623 cf_fix_cppflags=no
2624 cf_new_cflags=
2625 cf_new_cppflags=
2626 cf_new_extra_cppflags=
2627
2628 for cf_add_cflags in $cf_cv_ansi_cc
2629 do
2630 case $cf_fix_cppflags in
2631 no)
2632         case $cf_add_cflags in #(vi
2633         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2634                 case $cf_add_cflags in
2635                 -D*)
2636                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2637
2638                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2639                                 && test -z "${cf_tst_cflags}" \
2640                                 && cf_fix_cppflags=yes
2641
2642                         if test $cf_fix_cppflags = yes ; then
2643                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2644                                 continue
2645                         elif test "${cf_tst_cflags}" = "\"'" ; then
2646                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2647                                 continue
2648                         fi
2649                         ;;
2650                 esac
2651                 case "$CPPFLAGS" in
2652                 *$cf_add_cflags) #(vi
2653                         ;;
2654                 *) #(vi
2655                         case $cf_add_cflags in #(vi
2656                         -D*)
2657                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2658
2659 CPPFLAGS=`echo "$CPPFLAGS" | \
2660         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2661                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2662
2663                                 ;;
2664                         esac
2665                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2666                         ;;
2667                 esac
2668                 ;;
2669         *)
2670                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2671                 ;;
2672         esac
2673         ;;
2674 yes)
2675         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2676
2677         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2678
2679         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2680                 && test -z "${cf_tst_cflags}" \
2681                 && cf_fix_cppflags=no
2682         ;;
2683 esac
2684 done
2685
2686 if test -n "$cf_new_cflags" ; then
2687
2688         CFLAGS="$CFLAGS $cf_new_cflags"
2689 fi
2690
2691 if test -n "$cf_new_cppflags" ; then
2692
2693         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2694 fi
2695
2696 if test -n "$cf_new_extra_cppflags" ; then
2697
2698         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2699 fi
2700
2701 else
2702         cat >>confdefs.h <<\EOF
2703 #define CC_HAS_PROTOS 1
2704 EOF
2705
2706 fi
2707 fi
2708
2709 if test "$cf_cv_ansi_cc" = "no"; then
2710         { { echo "$as_me:2710: error: Your compiler does not appear to recognize prototypes.
2711 You have the following choices:
2712         a. adjust your compiler options
2713         b. get an up-to-date compiler
2714         c. use a wrapper such as unproto" >&5
2715 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2716 You have the following choices:
2717         a. adjust your compiler options
2718         b. get an up-to-date compiler
2719         c. use a wrapper such as unproto" >&2;}
2720    { (exit 1); exit 1; }; }
2721 fi
2722
2723 if test "$GCC" = yes
2724 then
2725 cat > conftest.i <<EOF
2726 #ifndef GCC_PRINTF
2727 #define GCC_PRINTF 0
2728 #endif
2729 #ifndef GCC_SCANF
2730 #define GCC_SCANF 0
2731 #endif
2732 #ifndef GCC_NORETURN
2733 #define GCC_NORETURN /* nothing */
2734 #endif
2735 #ifndef GCC_UNUSED
2736 #define GCC_UNUSED /* nothing */
2737 #endif
2738 EOF
2739 if test "$GCC" = yes
2740 then
2741         { echo "$as_me:2741: checking for $CC __attribute__ directives..." >&5
2742 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2743 cat > conftest.$ac_ext <<EOF
2744 #line 2744 "${as_me:-configure}"
2745 #include "confdefs.h"
2746 #include "conftest.h"
2747 #include "conftest.i"
2748 #if     GCC_PRINTF
2749 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2750 #else
2751 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2752 #endif
2753 #if     GCC_SCANF
2754 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2755 #else
2756 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2757 #endif
2758 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2759 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2760 extern void foo(void) GCC_NORETURN;
2761 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2762 EOF
2763         cf_printf_attribute=no
2764         cf_scanf_attribute=no
2765         for cf_attribute in scanf printf unused noreturn
2766         do
2767
2768 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2769
2770                 cf_directive="__attribute__(($cf_attribute))"
2771                 echo "checking for $CC $cf_directive" 1>&5
2772
2773                 case $cf_attribute in #(vi
2774                 printf) #(vi
2775                         cf_printf_attribute=yes
2776                         cat >conftest.h <<EOF
2777 #define GCC_$cf_ATTRIBUTE 1
2778 EOF
2779                         ;;
2780                 scanf) #(vi
2781                         cf_scanf_attribute=yes
2782                         cat >conftest.h <<EOF
2783 #define GCC_$cf_ATTRIBUTE 1
2784 EOF
2785                         ;;
2786                 *) #(vi
2787                         cat >conftest.h <<EOF
2788 #define GCC_$cf_ATTRIBUTE $cf_directive
2789 EOF
2790                         ;;
2791                 esac
2792
2793                 if { (eval echo "$as_me:2793: \"$ac_compile\"") >&5
2794   (eval $ac_compile) 2>&5
2795   ac_status=$?
2796   echo "$as_me:2796: \$? = $ac_status" >&5
2797   (exit $ac_status); }; then
2798                         test -n "$verbose" && echo "$as_me:2798: result: ... $cf_attribute" >&5
2799 echo "${ECHO_T}... $cf_attribute" >&6
2800                         cat conftest.h >>confdefs.h
2801                         case $cf_attribute in #(vi
2802                         printf) #(vi
2803                                 if test "$cf_printf_attribute" = no ; then
2804                                         cat >>confdefs.h <<EOF
2805 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2806 EOF
2807                                 else
2808                                         cat >>confdefs.h <<EOF
2809 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2810 EOF
2811                                 fi
2812                                 ;;
2813                         scanf) #(vi
2814                                 if test "$cf_scanf_attribute" = no ; then
2815                                         cat >>confdefs.h <<EOF
2816 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2817 EOF
2818                                 else
2819                                         cat >>confdefs.h <<EOF
2820 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2821 EOF
2822                                 fi
2823                                 ;;
2824                         esac
2825                 fi
2826         done
2827 else
2828         fgrep define conftest.i >>confdefs.h
2829 fi
2830 rm -rf conftest*
2831 fi
2832
2833 cf_XOPEN_SOURCE=500
2834 cf_POSIX_C_SOURCE=199506L
2835 cf_xopen_source=
2836
2837 case $host_os in #(vi
2838 aix[456]*) #(vi
2839         cf_xopen_source="-D_ALL_SOURCE"
2840         ;;
2841 darwin[0-8].*) #(vi
2842         cf_xopen_source="-D_APPLE_C_SOURCE"
2843         ;;
2844 darwin*) #(vi
2845         cf_xopen_source="-D_DARWIN_C_SOURCE"
2846         ;;
2847 freebsd*|dragonfly*) #(vi
2848         # 5.x headers associate
2849         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2850         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2851         cf_POSIX_C_SOURCE=200112L
2852         cf_XOPEN_SOURCE=600
2853         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2854         ;;
2855 hpux11*) #(vi
2856         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2857         ;;
2858 hpux*) #(vi
2859         cf_xopen_source="-D_HPUX_SOURCE"
2860         ;;
2861 irix[56].*) #(vi
2862         cf_xopen_source="-D_SGI_SOURCE"
2863         ;;
2864 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2865
2866 echo "$as_me:2866: checking if we must define _GNU_SOURCE" >&5
2867 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2868 if test "${cf_cv_gnu_source+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871
2872 cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875 #include <sys/types.h>
2876 int
2877 main ()
2878 {
2879
2880 #ifndef _XOPEN_SOURCE
2881 make an error
2882 #endif
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:2888: \"$ac_compile\"") >&5
2889   (eval $ac_compile) 2>&5
2890   ac_status=$?
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -s conftest.$ac_objext'
2894   { (eval echo "$as_me:2894: \"$ac_try\"") >&5
2895   (eval $ac_try) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); }; }; then
2899   cf_cv_gnu_source=no
2900 else
2901   echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 cf_save="$CPPFLAGS"
2904          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2905          cat >conftest.$ac_ext <<_ACEOF
2906 #line 2906 "configure"
2907 #include "confdefs.h"
2908 #include <sys/types.h>
2909 int
2910 main ()
2911 {
2912
2913 #ifdef _XOPEN_SOURCE
2914 make an error
2915 #endif
2916   ;
2917   return 0;
2918 }
2919 _ACEOF
2920 rm -f conftest.$ac_objext
2921 if { (eval echo "$as_me:2921: \"$ac_compile\"") >&5
2922   (eval $ac_compile) 2>&5
2923   ac_status=$?
2924   echo "$as_me:2924: \$? = $ac_status" >&5
2925   (exit $ac_status); } &&
2926          { ac_try='test -s conftest.$ac_objext'
2927   { (eval echo "$as_me:2927: \"$ac_try\"") >&5
2928   (eval $ac_try) 2>&5
2929   ac_status=$?
2930   echo "$as_me:2930: \$? = $ac_status" >&5
2931   (exit $ac_status); }; }; then
2932   cf_cv_gnu_source=no
2933 else
2934   echo "$as_me: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
2936 cf_cv_gnu_source=yes
2937 fi
2938 rm -f conftest.$ac_objext conftest.$ac_ext
2939         CPPFLAGS="$cf_save"
2940
2941 fi
2942 rm -f conftest.$ac_objext conftest.$ac_ext
2943
2944 fi
2945 echo "$as_me:2945: result: $cf_cv_gnu_source" >&5
2946 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2947 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2948
2949         ;;
2950 mirbsd*) #(vi
2951         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2952         ;;
2953 netbsd*) #(vi
2954         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2955         ;;
2956 openbsd*) #(vi
2957         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2958         ;;
2959 osf[45]*) #(vi
2960         cf_xopen_source="-D_OSF_SOURCE"
2961         ;;
2962 nto-qnx*) #(vi
2963         cf_xopen_source="-D_QNX_SOURCE"
2964         ;;
2965 sco*) #(vi
2966         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2967         ;;
2968 solaris2.1[0-9]) #(vi
2969         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2970         ;;
2971 solaris2.[1-9]) #(vi
2972         cf_xopen_source="-D__EXTENSIONS__"
2973         ;;
2974 *)
2975         echo "$as_me:2975: checking if we should define _XOPEN_SOURCE" >&5
2976 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2977 if test "${cf_cv_xopen_source+set}" = set; then
2978   echo $ECHO_N "(cached) $ECHO_C" >&6
2979 else
2980
2981         cat >conftest.$ac_ext <<_ACEOF
2982 #line 2982 "configure"
2983 #include "confdefs.h"
2984 #include <sys/types.h>
2985 int
2986 main ()
2987 {
2988
2989 #ifndef _XOPEN_SOURCE
2990 make an error
2991 #endif
2992   ;
2993   return 0;
2994 }
2995 _ACEOF
2996 rm -f conftest.$ac_objext
2997 if { (eval echo "$as_me:2997: \"$ac_compile\"") >&5
2998   (eval $ac_compile) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); } &&
3002          { ac_try='test -s conftest.$ac_objext'
3003   { (eval echo "$as_me:3003: \"$ac_try\"") >&5
3004   (eval $ac_try) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); }; }; then
3008   cf_cv_xopen_source=no
3009 else
3010   echo "$as_me: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 cf_save="$CPPFLAGS"
3013          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3014          cat >conftest.$ac_ext <<_ACEOF
3015 #line 3015 "configure"
3016 #include "confdefs.h"
3017 #include <sys/types.h>
3018 int
3019 main ()
3020 {
3021
3022 #ifdef _XOPEN_SOURCE
3023 make an error
3024 #endif
3025   ;
3026   return 0;
3027 }
3028 _ACEOF
3029 rm -f conftest.$ac_objext
3030 if { (eval echo "$as_me:3030: \"$ac_compile\"") >&5
3031   (eval $ac_compile) 2>&5
3032   ac_status=$?
3033   echo "$as_me:3033: \$? = $ac_status" >&5
3034   (exit $ac_status); } &&
3035          { ac_try='test -s conftest.$ac_objext'
3036   { (eval echo "$as_me:3036: \"$ac_try\"") >&5
3037   (eval $ac_try) 2>&5
3038   ac_status=$?
3039   echo "$as_me:3039: \$? = $ac_status" >&5
3040   (exit $ac_status); }; }; then
3041   cf_cv_xopen_source=no
3042 else
3043   echo "$as_me: failed program was:" >&5
3044 cat conftest.$ac_ext >&5
3045 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3046 fi
3047 rm -f conftest.$ac_objext conftest.$ac_ext
3048         CPPFLAGS="$cf_save"
3049
3050 fi
3051 rm -f conftest.$ac_objext conftest.$ac_ext
3052
3053 fi
3054 echo "$as_me:3054: result: $cf_cv_xopen_source" >&5
3055 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3056         if test "$cf_cv_xopen_source" != no ; then
3057
3058 CFLAGS=`echo "$CFLAGS" | \
3059         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3060                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3061
3062 CPPFLAGS=`echo "$CPPFLAGS" | \
3063         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3064                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3065
3066                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3067
3068 cf_fix_cppflags=no
3069 cf_new_cflags=
3070 cf_new_cppflags=
3071 cf_new_extra_cppflags=
3072
3073 for cf_add_cflags in $cf_temp_xopen_source
3074 do
3075 case $cf_fix_cppflags in
3076 no)
3077         case $cf_add_cflags in #(vi
3078         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3079                 case $cf_add_cflags in
3080                 -D*)
3081                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3082
3083                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3084                                 && test -z "${cf_tst_cflags}" \
3085                                 && cf_fix_cppflags=yes
3086
3087                         if test $cf_fix_cppflags = yes ; then
3088                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3089                                 continue
3090                         elif test "${cf_tst_cflags}" = "\"'" ; then
3091                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3092                                 continue
3093                         fi
3094                         ;;
3095                 esac
3096                 case "$CPPFLAGS" in
3097                 *$cf_add_cflags) #(vi
3098                         ;;
3099                 *) #(vi
3100                         case $cf_add_cflags in #(vi
3101                         -D*)
3102                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3103
3104 CPPFLAGS=`echo "$CPPFLAGS" | \
3105         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3106                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3107
3108                                 ;;
3109                         esac
3110                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3111                         ;;
3112                 esac
3113                 ;;
3114         *)
3115                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3116                 ;;
3117         esac
3118         ;;
3119 yes)
3120         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3121
3122         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3123
3124         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3125                 && test -z "${cf_tst_cflags}" \
3126                 && cf_fix_cppflags=no
3127         ;;
3128 esac
3129 done
3130
3131 if test -n "$cf_new_cflags" ; then
3132
3133         CFLAGS="$CFLAGS $cf_new_cflags"
3134 fi
3135
3136 if test -n "$cf_new_cppflags" ; then
3137
3138         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3139 fi
3140
3141 if test -n "$cf_new_extra_cppflags" ; then
3142
3143         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3144 fi
3145
3146         fi
3147
3148 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3149
3150 cf_save_CFLAGS="$CFLAGS"
3151 cf_save_CPPFLAGS="$CPPFLAGS"
3152
3153 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3154         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3155                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3156
3157 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3158         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3159                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3160
3161 echo "$as_me:3161: checking if we should define _POSIX_C_SOURCE" >&5
3162 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3163 if test "${cf_cv_posix_c_source+set}" = set; then
3164   echo $ECHO_N "(cached) $ECHO_C" >&6
3165 else
3166
3167 echo "${as_me:-configure}:3167: testing if the symbol is already defined go no further ..." 1>&5
3168
3169         cat >conftest.$ac_ext <<_ACEOF
3170 #line 3170 "configure"
3171 #include "confdefs.h"
3172 #include <sys/types.h>
3173 int
3174 main ()
3175 {
3176
3177 #ifndef _POSIX_C_SOURCE
3178 make an error
3179 #endif
3180   ;
3181   return 0;
3182 }
3183 _ACEOF
3184 rm -f conftest.$ac_objext
3185 if { (eval echo "$as_me:3185: \"$ac_compile\"") >&5
3186   (eval $ac_compile) 2>&5
3187   ac_status=$?
3188   echo "$as_me:3188: \$? = $ac_status" >&5
3189   (exit $ac_status); } &&
3190          { ac_try='test -s conftest.$ac_objext'
3191   { (eval echo "$as_me:3191: \"$ac_try\"") >&5
3192   (eval $ac_try) 2>&5
3193   ac_status=$?
3194   echo "$as_me:3194: \$? = $ac_status" >&5
3195   (exit $ac_status); }; }; then
3196   cf_cv_posix_c_source=no
3197 else
3198   echo "$as_me: failed program was:" >&5
3199 cat conftest.$ac_ext >&5
3200 cf_want_posix_source=no
3201          case .$cf_POSIX_C_SOURCE in #(vi
3202          .[12]??*) #(vi
3203                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3204                 ;;
3205          .2) #(vi
3206                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3207                 cf_want_posix_source=yes
3208                 ;;
3209          .*)
3210                 cf_want_posix_source=yes
3211                 ;;
3212          esac
3213          if test "$cf_want_posix_source" = yes ; then
3214                 cat >conftest.$ac_ext <<_ACEOF
3215 #line 3215 "configure"
3216 #include "confdefs.h"
3217 #include <sys/types.h>
3218 int
3219 main ()
3220 {
3221
3222 #ifdef _POSIX_SOURCE
3223 make an error
3224 #endif
3225   ;
3226   return 0;
3227 }
3228 _ACEOF
3229 rm -f conftest.$ac_objext
3230 if { (eval echo "$as_me:3230: \"$ac_compile\"") >&5
3231   (eval $ac_compile) 2>&5
3232   ac_status=$?
3233   echo "$as_me:3233: \$? = $ac_status" >&5
3234   (exit $ac_status); } &&
3235          { ac_try='test -s conftest.$ac_objext'
3236   { (eval echo "$as_me:3236: \"$ac_try\"") >&5
3237   (eval $ac_try) 2>&5
3238   ac_status=$?
3239   echo "$as_me:3239: \$? = $ac_status" >&5
3240   (exit $ac_status); }; }; then
3241   :
3242 else
3243   echo "$as_me: failed program was:" >&5
3244 cat conftest.$ac_ext >&5
3245 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3246 fi
3247 rm -f conftest.$ac_objext conftest.$ac_ext
3248          fi
3249
3250 echo "${as_me:-configure}:3250: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3251
3252          CFLAGS="$cf_trim_CFLAGS"
3253          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3254
3255 echo "${as_me:-configure}:3255: testing if the second compile does not leave our definition intact error ..." 1>&5
3256
3257          cat >conftest.$ac_ext <<_ACEOF
3258 #line 3258 "configure"
3259 #include "confdefs.h"
3260 #include <sys/types.h>
3261 int
3262 main ()
3263 {
3264
3265 #ifndef _POSIX_C_SOURCE
3266 make an error
3267 #endif
3268   ;
3269   return 0;
3270 }
3271 _ACEOF
3272 rm -f conftest.$ac_objext
3273 if { (eval echo "$as_me:3273: \"$ac_compile\"") >&5
3274   (eval $ac_compile) 2>&5
3275   ac_status=$?
3276   echo "$as_me:3276: \$? = $ac_status" >&5
3277   (exit $ac_status); } &&
3278          { ac_try='test -s conftest.$ac_objext'
3279   { (eval echo "$as_me:3279: \"$ac_try\"") >&5
3280   (eval $ac_try) 2>&5
3281   ac_status=$?
3282   echo "$as_me:3282: \$? = $ac_status" >&5
3283   (exit $ac_status); }; }; then
3284   :
3285 else
3286   echo "$as_me: failed program was:" >&5
3287 cat conftest.$ac_ext >&5
3288 cf_cv_posix_c_source=no
3289 fi
3290 rm -f conftest.$ac_objext conftest.$ac_ext
3291          CFLAGS="$cf_save_CFLAGS"
3292          CPPFLAGS="$cf_save_CPPFLAGS"
3293
3294 fi
3295 rm -f conftest.$ac_objext conftest.$ac_ext
3296
3297 fi
3298 echo "$as_me:3298: result: $cf_cv_posix_c_source" >&5
3299 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3300
3301 if test "$cf_cv_posix_c_source" != no ; then
3302         CFLAGS="$cf_trim_CFLAGS"
3303         CPPFLAGS="$cf_trim_CPPFLAGS"
3304
3305 cf_fix_cppflags=no
3306 cf_new_cflags=
3307 cf_new_cppflags=
3308 cf_new_extra_cppflags=
3309
3310 for cf_add_cflags in $cf_cv_posix_c_source
3311 do
3312 case $cf_fix_cppflags in
3313 no)
3314         case $cf_add_cflags in #(vi
3315         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3316                 case $cf_add_cflags in
3317                 -D*)
3318                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3319
3320                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3321                                 && test -z "${cf_tst_cflags}" \
3322                                 && cf_fix_cppflags=yes
3323
3324                         if test $cf_fix_cppflags = yes ; then
3325                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3326                                 continue
3327                         elif test "${cf_tst_cflags}" = "\"'" ; then
3328                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3329                                 continue
3330                         fi
3331                         ;;
3332                 esac
3333                 case "$CPPFLAGS" in
3334                 *$cf_add_cflags) #(vi
3335                         ;;
3336                 *) #(vi
3337                         case $cf_add_cflags in #(vi
3338                         -D*)
3339                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3340
3341 CPPFLAGS=`echo "$CPPFLAGS" | \
3342         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3343                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3344
3345                                 ;;
3346                         esac
3347                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3348                         ;;
3349                 esac
3350                 ;;
3351         *)
3352                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3353                 ;;
3354         esac
3355         ;;
3356 yes)
3357         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3358
3359         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3360
3361         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3362                 && test -z "${cf_tst_cflags}" \
3363                 && cf_fix_cppflags=no
3364         ;;
3365 esac
3366 done
3367
3368 if test -n "$cf_new_cflags" ; then
3369
3370         CFLAGS="$CFLAGS $cf_new_cflags"
3371 fi
3372
3373 if test -n "$cf_new_cppflags" ; then
3374
3375         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3376 fi
3377
3378 if test -n "$cf_new_extra_cppflags" ; then
3379
3380         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3381 fi
3382
3383 fi
3384
3385         ;;
3386 esac
3387
3388 if test -n "$cf_xopen_source" ; then
3389
3390 cf_fix_cppflags=no
3391 cf_new_cflags=
3392 cf_new_cppflags=
3393 cf_new_extra_cppflags=
3394
3395 for cf_add_cflags in $cf_xopen_source
3396 do
3397 case $cf_fix_cppflags in
3398 no)
3399         case $cf_add_cflags in #(vi
3400         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3401                 case $cf_add_cflags in
3402                 -D*)
3403                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3404
3405                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3406                                 && test -z "${cf_tst_cflags}" \
3407                                 && cf_fix_cppflags=yes
3408
3409                         if test $cf_fix_cppflags = yes ; then
3410                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3411                                 continue
3412                         elif test "${cf_tst_cflags}" = "\"'" ; then
3413                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3414                                 continue
3415                         fi
3416                         ;;
3417                 esac
3418                 case "$CPPFLAGS" in
3419                 *$cf_add_cflags) #(vi
3420                         ;;
3421                 *) #(vi
3422                         case $cf_add_cflags in #(vi
3423                         -D*)
3424                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3425
3426 CPPFLAGS=`echo "$CPPFLAGS" | \
3427         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3428                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3429
3430                                 ;;
3431                         esac
3432                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3433                         ;;
3434                 esac
3435                 ;;
3436         *)
3437                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3438                 ;;
3439         esac
3440         ;;
3441 yes)
3442         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3443
3444         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3445
3446         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3447                 && test -z "${cf_tst_cflags}" \
3448                 && cf_fix_cppflags=no
3449         ;;
3450 esac
3451 done
3452
3453 if test -n "$cf_new_cflags" ; then
3454
3455         CFLAGS="$CFLAGS $cf_new_cflags"
3456 fi
3457
3458 if test -n "$cf_new_cppflags" ; then
3459
3460         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3461 fi
3462
3463 if test -n "$cf_new_extra_cppflags" ; then
3464
3465         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3466 fi
3467
3468 fi
3469
3470 echo "$as_me:3470: checking for $CC option to accept ANSI C" >&5
3471 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3472 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3473   echo $ECHO_N "(cached) $ECHO_C" >&6
3474 else
3475   ac_cv_prog_cc_stdc=no
3476 ac_save_CC=$CC
3477 cat >conftest.$ac_ext <<_ACEOF
3478 #line 3478 "configure"
3479 #include "confdefs.h"
3480 #include <stdarg.h>
3481 #include <stdio.h>
3482 #include <sys/types.h>
3483 #include <sys/stat.h>
3484 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3485 struct buf { int x; };
3486 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3487 static char *e (p, i)
3488      char **p;
3489      int i;
3490 {
3491   return p[i];
3492 }
3493 static char *f (char * (*g) (char **, int), char **p, ...)
3494 {
3495   char *s;
3496   va_list v;
3497   va_start (v,p);
3498   s = g (p, va_arg (v,int));
3499   va_end (v);
3500   return s;
3501 }
3502 int test (int i, double x);
3503 struct s1 {int (*f) (int a);};
3504 struct s2 {int (*f) (double a);};
3505 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3506 int argc;
3507 char **argv;
3508 int
3509 main ()
3510 {
3511 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3512   ;
3513   return 0;
3514 }
3515 _ACEOF
3516 # Don't try gcc -ansi; that turns off useful extensions and
3517 # breaks some systems' header files.
3518 # AIX                   -qlanglvl=ansi
3519 # Ultrix and OSF/1      -std1
3520 # HP-UX 10.20 and later -Ae
3521 # HP-UX older versions  -Aa -D_HPUX_SOURCE
3522 # SVR4                  -Xc -D__EXTENSIONS__
3523 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3524 do
3525   CC="$ac_save_CC $ac_arg"
3526   rm -f conftest.$ac_objext
3527 if { (eval echo "$as_me:3527: \"$ac_compile\"") >&5
3528   (eval $ac_compile) 2>&5
3529   ac_status=$?
3530   echo "$as_me:3530: \$? = $ac_status" >&5
3531   (exit $ac_status); } &&
3532          { ac_try='test -s conftest.$ac_objext'
3533   { (eval echo "$as_me:3533: \"$ac_try\"") >&5
3534   (eval $ac_try) 2>&5
3535   ac_status=$?
3536   echo "$as_me:3536: \$? = $ac_status" >&5
3537   (exit $ac_status); }; }; then
3538   ac_cv_prog_cc_stdc=$ac_arg
3539 break
3540 else
3541   echo "$as_me: failed program was:" >&5
3542 cat conftest.$ac_ext >&5
3543 fi
3544 rm -f conftest.$ac_objext
3545 done
3546 rm -f conftest.$ac_ext conftest.$ac_objext
3547 CC=$ac_save_CC
3548
3549 fi
3550
3551 case "x$ac_cv_prog_cc_stdc" in
3552   x|xno)
3553     echo "$as_me:3553: result: none needed" >&5
3554 echo "${ECHO_T}none needed" >&6 ;;
3555   *)
3556     echo "$as_me:3556: result: $ac_cv_prog_cc_stdc" >&5
3557 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3558     CC="$CC $ac_cv_prog_cc_stdc" ;;
3559 esac
3560
3561 echo "$as_me:3561: checking for an ANSI C-conforming const" >&5
3562 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3563 if test "${ac_cv_c_const+set}" = set; then
3564   echo $ECHO_N "(cached) $ECHO_C" >&6
3565 else
3566   cat >conftest.$ac_ext <<_ACEOF
3567 #line 3567 "configure"
3568 #include "confdefs.h"
3569
3570 int
3571 main ()
3572 {
3573 /* FIXME: Include the comments suggested by Paul. */
3574 #ifndef __cplusplus
3575   /* Ultrix mips cc rejects this.  */
3576   typedef int charset[2];
3577   const charset x;
3578   /* SunOS 4.1.1 cc rejects this.  */
3579   char const *const *ccp;
3580   char **p;
3581   /* NEC SVR4.0.2 mips cc rejects this.  */
3582   struct point {int x, y;};
3583   static struct point const zero = {0,0};
3584   /* AIX XL C 1.02.0.0 rejects this.
3585      It does not let you subtract one const X* pointer from another in
3586      an arm of an if-expression whose if-part is not a constant
3587      expression */
3588   const char *g = "string";
3589   ccp = &g + (g ? g-g : 0);
3590   /* HPUX 7.0 cc rejects these. */
3591   ++ccp;
3592   p = (char**) ccp;
3593   ccp = (char const *const *) p;
3594   { /* SCO 3.2v4 cc rejects this.  */
3595     char *t;
3596     char const *s = 0 ? (char *) 0 : (char const *) 0;
3597
3598     *t++ = 0;
3599   }
3600   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3601     int x[] = {25, 17};
3602     const int *foo = &x[0];
3603     ++foo;
3604   }
3605   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3606     typedef const int *iptr;
3607     iptr p = 0;
3608     ++p;
3609   }
3610   { /* AIX XL C 1.02.0.0 rejects this saying
3611        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3612     struct s { int j; const int *ap[3]; };
3613     struct s *b; b->j = 5;
3614   }
3615   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3616     const int foo = 10;
3617   }
3618 #endif
3619
3620   ;
3621   return 0;
3622 }
3623 _ACEOF
3624 rm -f conftest.$ac_objext
3625 if { (eval echo "$as_me:3625: \"$ac_compile\"") >&5
3626   (eval $ac_compile) 2>&5
3627   ac_status=$?
3628   echo "$as_me:3628: \$? = $ac_status" >&5
3629   (exit $ac_status); } &&
3630          { ac_try='test -s conftest.$ac_objext'
3631   { (eval echo "$as_me:3631: \"$ac_try\"") >&5
3632   (eval $ac_try) 2>&5
3633   ac_status=$?
3634   echo "$as_me:3634: \$? = $ac_status" >&5
3635   (exit $ac_status); }; }; then
3636   ac_cv_c_const=yes
3637 else
3638   echo "$as_me: failed program was:" >&5
3639 cat conftest.$ac_ext >&5
3640 ac_cv_c_const=no
3641 fi
3642 rm -f conftest.$ac_objext conftest.$ac_ext
3643 fi
3644 echo "$as_me:3644: result: $ac_cv_c_const" >&5
3645 echo "${ECHO_T}$ac_cv_c_const" >&6
3646 if test $ac_cv_c_const = no; then
3647
3648 cat >>confdefs.h <<\EOF
3649 #define const
3650 EOF
3651
3652 fi
3653
3654 echo "$as_me:3654: checking for signal global datatype" >&5
3655 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3656 if test "${cf_cv_sig_atomic_t+set}" = set; then
3657   echo $ECHO_N "(cached) $ECHO_C" >&6
3658 else
3659
3660         for cf_type in \
3661                 "volatile sig_atomic_t" \
3662                 "sig_atomic_t" \
3663                 "int"
3664         do
3665         cat >conftest.$ac_ext <<_ACEOF
3666 #line 3666 "configure"
3667 #include "confdefs.h"
3668
3669 #include <sys/types.h>
3670 #include <signal.h>
3671 #include <stdio.h>
3672
3673 extern $cf_type x;
3674 $cf_type x;
3675 static void handler(int sig)
3676 {
3677         x = 5;
3678 }
3679 int
3680 main ()
3681 {
3682 signal(SIGINT, handler);
3683                  x = 1
3684   ;
3685   return 0;
3686 }
3687 _ACEOF
3688 rm -f conftest.$ac_objext
3689 if { (eval echo "$as_me:3689: \"$ac_compile\"") >&5
3690   (eval $ac_compile) 2>&5
3691   ac_status=$?
3692   echo "$as_me:3692: \$? = $ac_status" >&5
3693   (exit $ac_status); } &&
3694          { ac_try='test -s conftest.$ac_objext'
3695   { (eval echo "$as_me:3695: \"$ac_try\"") >&5
3696   (eval $ac_try) 2>&5
3697   ac_status=$?
3698   echo "$as_me:3698: \$? = $ac_status" >&5
3699   (exit $ac_status); }; }; then
3700   cf_cv_sig_atomic_t=$cf_type
3701 else
3702   echo "$as_me: failed program was:" >&5
3703 cat conftest.$ac_ext >&5
3704 cf_cv_sig_atomic_t=no
3705 fi
3706 rm -f conftest.$ac_objext conftest.$ac_ext
3707                 test "$cf_cv_sig_atomic_t" != no && break
3708         done
3709
3710 fi
3711
3712 echo "$as_me:3712: result: $cf_cv_sig_atomic_t" >&5
3713 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
3714 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
3715 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
3716 EOF
3717
3718 echo "$as_me:3718: checking if you want to see long compiling messages" >&5
3719 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3720
3721 # Check whether --enable-echo or --disable-echo was given.
3722 if test "${enable_echo+set}" = set; then
3723   enableval="$enable_echo"
3724   test "$enableval" != no && enableval=yes
3725   if test "$enableval" != "yes" ; then
3726
3727     ECHO_LT='--silent'
3728     ECHO_LD='@echo linking $@;'
3729     RULE_CC='@echo compiling $<'
3730     SHOW_CC='@echo compiling $@'
3731     ECHO_CC='@'
3732
3733   else
3734
3735     ECHO_LT=''
3736     ECHO_LD=''
3737     RULE_CC=''
3738     SHOW_CC=''
3739     ECHO_CC=''
3740
3741   fi
3742 else
3743   enableval=yes
3744
3745     ECHO_LT=''
3746     ECHO_LD=''
3747     RULE_CC=''
3748     SHOW_CC=''
3749     ECHO_CC=''
3750
3751 fi;
3752 echo "$as_me:3752: result: $enableval" >&5
3753 echo "${ECHO_T}$enableval" >&6
3754
3755 GCC_VERSION=none
3756 if test "$GCC" = yes ; then
3757         echo "$as_me:3757: checking version of $CC" >&5
3758 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
3759         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3760         test -z "$GCC_VERSION" && GCC_VERSION=unknown
3761         echo "$as_me:3761: result: $GCC_VERSION" >&5
3762 echo "${ECHO_T}$GCC_VERSION" >&6
3763 fi
3764
3765 if ( test "$GCC" = yes || test "$GXX" = yes )
3766 then
3767 echo "$as_me:3767: checking if you want to turn on gcc warnings" >&5
3768 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
3769
3770 # Check whether --enable-warnings or --disable-warnings was given.
3771 if test "${enable_warnings+set}" = set; then
3772   enableval="$enable_warnings"
3773   test "$enableval" != yes && enableval=no
3774   if test "$enableval" != "no" ; then
3775     with_warnings=yes
3776   else
3777     with_warnings=no
3778   fi
3779 else
3780   enableval=no
3781   with_warnings=no
3782
3783 fi;
3784 echo "$as_me:3784: result: $with_warnings" >&5
3785 echo "${ECHO_T}$with_warnings" >&6
3786 if test "$with_warnings" = "yes"
3787 then
3788
3789 if test "$GCC" = yes
3790 then
3791 cat > conftest.i <<EOF
3792 #ifndef GCC_PRINTF
3793 #define GCC_PRINTF 0
3794 #endif
3795 #ifndef GCC_SCANF
3796 #define GCC_SCANF 0
3797 #endif
3798 #ifndef GCC_NORETURN
3799 #define GCC_NORETURN /* nothing */
3800 #endif
3801 #ifndef GCC_UNUSED
3802 #define GCC_UNUSED /* nothing */
3803 #endif
3804 EOF
3805 if test "$GCC" = yes
3806 then
3807         { echo "$as_me:3807: checking for $CC __attribute__ directives..." >&5
3808 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3809 cat > conftest.$ac_ext <<EOF
3810 #line 3810 "${as_me:-configure}"
3811 #include "confdefs.h"
3812 #include "conftest.h"
3813 #include "conftest.i"
3814 #if     GCC_PRINTF
3815 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3816 #else
3817 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3818 #endif
3819 #if     GCC_SCANF
3820 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3821 #else
3822 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
3823 #endif
3824 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3825 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
3826 extern void foo(void) GCC_NORETURN;
3827 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
3828 EOF
3829         cf_printf_attribute=no
3830         cf_scanf_attribute=no
3831         for cf_attribute in scanf printf unused noreturn
3832         do
3833
3834 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3835
3836                 cf_directive="__attribute__(($cf_attribute))"
3837                 echo "checking for $CC $cf_directive" 1>&5
3838
3839                 case $cf_attribute in #(vi
3840                 printf) #(vi
3841                         cf_printf_attribute=yes
3842                         cat >conftest.h <<EOF
3843 #define GCC_$cf_ATTRIBUTE 1
3844 EOF
3845                         ;;
3846                 scanf) #(vi
3847                         cf_scanf_attribute=yes
3848                         cat >conftest.h <<EOF
3849 #define GCC_$cf_ATTRIBUTE 1
3850 EOF
3851                         ;;
3852                 *) #(vi
3853                         cat >conftest.h <<EOF
3854 #define GCC_$cf_ATTRIBUTE $cf_directive
3855 EOF
3856                         ;;
3857                 esac
3858
3859                 if { (eval echo "$as_me:3859: \"$ac_compile\"") >&5
3860   (eval $ac_compile) 2>&5
3861   ac_status=$?
3862   echo "$as_me:3862: \$? = $ac_status" >&5
3863   (exit $ac_status); }; then
3864                         test -n "$verbose" && echo "$as_me:3864: result: ... $cf_attribute" >&5
3865 echo "${ECHO_T}... $cf_attribute" >&6
3866                         cat conftest.h >>confdefs.h
3867                         case $cf_attribute in #(vi
3868                         printf) #(vi
3869                                 if test "$cf_printf_attribute" = no ; then
3870                                         cat >>confdefs.h <<EOF
3871 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
3872 EOF
3873                                 else
3874                                         cat >>confdefs.h <<EOF
3875 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3876 EOF
3877                                 fi
3878                                 ;;
3879                         scanf) #(vi
3880                                 if test "$cf_scanf_attribute" = no ; then
3881                                         cat >>confdefs.h <<EOF
3882 #define GCC_SCANFLIKE(fmt,var) /* nothing */
3883 EOF
3884                                 else
3885                                         cat >>confdefs.h <<EOF
3886 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
3887 EOF
3888                                 fi
3889                                 ;;
3890                         esac
3891                 fi
3892         done
3893 else
3894         fgrep define conftest.i >>confdefs.h
3895 fi
3896 rm -rf conftest*
3897 fi
3898
3899 INTEL_COMPILER=no
3900
3901 if test "$GCC" = yes ; then
3902         case $host_os in
3903         linux*|gnu*)
3904                 echo "$as_me:3904: checking if this is really Intel C compiler" >&5
3905 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
3906                 cf_save_CFLAGS="$CFLAGS"
3907                 CFLAGS="$CFLAGS -no-gcc"
3908                 cat >conftest.$ac_ext <<_ACEOF
3909 #line 3909 "configure"
3910 #include "confdefs.h"
3911
3912 int
3913 main ()
3914 {
3915
3916 #ifdef __INTEL_COMPILER
3917 #else
3918 make an error
3919 #endif
3920
3921   ;
3922   return 0;
3923 }
3924 _ACEOF
3925 rm -f conftest.$ac_objext
3926 if { (eval echo "$as_me:3926: \"$ac_compile\"") >&5
3927   (eval $ac_compile) 2>&5
3928   ac_status=$?
3929   echo "$as_me:3929: \$? = $ac_status" >&5
3930   (exit $ac_status); } &&
3931          { ac_try='test -s conftest.$ac_objext'
3932   { (eval echo "$as_me:3932: \"$ac_try\"") >&5
3933   (eval $ac_try) 2>&5
3934   ac_status=$?
3935   echo "$as_me:3935: \$? = $ac_status" >&5
3936   (exit $ac_status); }; }; then
3937   INTEL_COMPILER=yes
3938 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
3939
3940 else
3941   echo "$as_me: failed program was:" >&5
3942 cat conftest.$ac_ext >&5
3943 fi
3944 rm -f conftest.$ac_objext conftest.$ac_ext
3945                 CFLAGS="$cf_save_CFLAGS"
3946                 echo "$as_me:3946: result: $INTEL_COMPILER" >&5
3947 echo "${ECHO_T}$INTEL_COMPILER" >&6
3948                 ;;
3949         esac
3950 fi
3951
3952 cat > conftest.$ac_ext <<EOF
3953 #line 3953 "${as_me:-configure}"
3954 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
3955 EOF
3956
3957 if test "$INTEL_COMPILER" = yes
3958 then
3959 # The "-wdXXX" options suppress warnings:
3960 # remark #1419: external declaration in primary source file
3961 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
3962 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
3963 # remark #193: zero used for undefined preprocessing identifier
3964 # remark #593: variable "curs_sb_left_arrow" was set but never used
3965 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
3966 # remark #869: parameter "tw" was never referenced
3967 # remark #981: operands are evaluated in unspecified order
3968 # warning #279: controlling expression is constant
3969
3970         { echo "$as_me:3970: checking for $CC warning options..." >&5
3971 echo "$as_me: checking for $CC warning options..." >&6;}
3972         cf_save_CFLAGS="$CFLAGS"
3973         EXTRA_CFLAGS="-Wall"
3974         for cf_opt in \
3975                 wd1419 \
3976                 wd1683 \
3977                 wd1684 \
3978                 wd193 \
3979                 wd593 \
3980                 wd279 \
3981                 wd810 \
3982                 wd869 \
3983                 wd981
3984         do
3985                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
3986                 if { (eval echo "$as_me:3986: \"$ac_compile\"") >&5
3987   (eval $ac_compile) 2>&5
3988   ac_status=$?
3989   echo "$as_me:3989: \$? = $ac_status" >&5
3990   (exit $ac_status); }; then
3991                         test -n "$verbose" && echo "$as_me:3991: result: ... -$cf_opt" >&5
3992 echo "${ECHO_T}... -$cf_opt" >&6
3993                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
3994                 fi
3995         done
3996         CFLAGS="$cf_save_CFLAGS"
3997
3998 elif test "$GCC" = yes
3999 then
4000         { echo "$as_me:4000: checking for $CC warning options..." >&5
4001 echo "$as_me: checking for $CC warning options..." >&6;}
4002         cf_save_CFLAGS="$CFLAGS"
4003         EXTRA_CFLAGS=
4004         cf_warn_CONST=""
4005         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4006         for cf_opt in W Wall \
4007                 Wbad-function-cast \
4008                 Wcast-align \
4009                 Wcast-qual \
4010                 Winline \
4011                 Wmissing-declarations \
4012                 Wmissing-prototypes \
4013                 Wnested-externs \
4014                 Wpointer-arith \
4015                 Wshadow \
4016                 Wstrict-prototypes \
4017                 Wundef $cf_warn_CONST
4018         do
4019                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4020                 if { (eval echo "$as_me:4020: \"$ac_compile\"") >&5
4021   (eval $ac_compile) 2>&5
4022   ac_status=$?
4023   echo "$as_me:4023: \$? = $ac_status" >&5
4024   (exit $ac_status); }; then
4025                         test -n "$verbose" && echo "$as_me:4025: result: ... -$cf_opt" >&5
4026 echo "${ECHO_T}... -$cf_opt" >&6
4027                         case $cf_opt in #(vi
4028                         Wcast-qual) #(vi
4029                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4030                                 ;;
4031                         Winline) #(vi
4032                                 case $GCC_VERSION in
4033                                 [34].*)
4034                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4035
4036 echo "${as_me:-configure}:4036: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4037
4038                                         continue;;
4039                                 esac
4040                                 ;;
4041                         esac
4042                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4043                 fi
4044         done
4045         CFLAGS="$cf_save_CFLAGS"
4046 fi
4047 rm -rf conftest*
4048
4049 fi
4050 fi
4051
4052 # Check whether --with-curses-dir or --without-curses-dir was given.
4053 if test "${with_curses_dir+set}" = set; then
4054   withval="$with_curses_dir"
4055
4056 if test "x$prefix" != xNONE; then
4057   cf_path_syntax="$prefix"
4058 else
4059   cf_path_syntax="$ac_default_prefix"
4060 fi
4061
4062 case ".$withval" in #(vi
4063 .\$\(*\)*|.\'*\'*) #(vi
4064   ;;
4065 ..|./*|.\\*) #(vi
4066   ;;
4067 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4068   ;;
4069 .\${*prefix}*) #(vi
4070   eval withval="$withval"
4071   case ".$withval" in #(vi
4072   .NONE/*)
4073     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4074     ;;
4075   esac
4076   ;; #(vi
4077 .no|.NONE/*)
4078   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4079   ;;
4080 *)
4081   { { echo "$as_me:4081: error: expected a pathname, not \"$withval\"" >&5
4082 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4083    { (exit 1); exit 1; }; }
4084   ;;
4085 esac
4086
4087          cf_cv_curses_dir=$withval
4088 else
4089   cf_cv_curses_dir=no
4090 fi;
4091
4092 # Check whether --with-5lib or --without-5lib was given.
4093 if test "${with_5lib+set}" = set; then
4094   withval="$with_5lib"
4095   LIBS="-L/usr/5lib $LIBS"
4096          CPPFLAGS="$CPPFLAGS -I/usr/5include"
4097 fi;
4098
4099 # Check whether --with-ncursesw or --without-ncursesw was given.
4100 if test "${with_ncursesw+set}" = set; then
4101   withval="$with_ncursesw"
4102   cf_cv_screen=ncursesw
4103 else
4104
4105 # Check whether --with-ncurses or --without-ncurses was given.
4106 if test "${with_ncurses+set}" = set; then
4107   withval="$with_ncurses"
4108   cf_cv_screen=ncurses
4109 else
4110
4111 # Check whether --with-pdcurses or --without-pdcurses was given.
4112 if test "${with_pdcurses+set}" = set; then
4113   withval="$with_pdcurses"
4114   cf_cv_screen=pdcurses
4115 fi;
4116 fi;
4117 fi;
4118
4119 case $cf_cv_screen in
4120 curses)
4121
4122 echo "$as_me:4122: checking for extra include directories" >&5
4123 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4124 if test "${cf_cv_curses_incdir+set}" = set; then
4125   echo $ECHO_N "(cached) $ECHO_C" >&6
4126 else
4127
4128 cf_cv_curses_incdir=no
4129 case $host_os in #(vi
4130 hpux10.*) #(vi
4131         test -d /usr/include/curses_colr && \
4132         cf_cv_curses_incdir="-I/usr/include/curses_colr"
4133         ;;
4134 sunos3*|sunos4*)
4135         test -d /usr/5lib && \
4136         test -d /usr/5include && \
4137         cf_cv_curses_incdir="-I/usr/5include"
4138         ;;
4139 esac
4140
4141 fi
4142 echo "$as_me:4142: result: $cf_cv_curses_incdir" >&5
4143 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4144 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4145
4146 echo "$as_me:4146: checking if we have identified curses headers" >&5
4147 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4148 if test "${cf_cv_ncurses_header+set}" = set; then
4149   echo $ECHO_N "(cached) $ECHO_C" >&6
4150 else
4151
4152 cf_cv_ncurses_header=none
4153 for cf_header in  \
4154         curses.h \
4155         ncurses.h ncurses/curses.h ncurses/ncurses.h
4156 do
4157 cat >conftest.$ac_ext <<_ACEOF
4158 #line 4158 "configure"
4159 #include "confdefs.h"
4160 #include <${cf_header}>
4161 int
4162 main ()
4163 {
4164 initscr(); tgoto("?", 0,0)
4165   ;
4166   return 0;
4167 }
4168 _ACEOF
4169 rm -f conftest.$ac_objext
4170 if { (eval echo "$as_me:4170: \"$ac_compile\"") >&5
4171   (eval $ac_compile) 2>&5
4172   ac_status=$?
4173   echo "$as_me:4173: \$? = $ac_status" >&5
4174   (exit $ac_status); } &&
4175          { ac_try='test -s conftest.$ac_objext'
4176   { (eval echo "$as_me:4176: \"$ac_try\"") >&5
4177   (eval $ac_try) 2>&5
4178   ac_status=$?
4179   echo "$as_me:4179: \$? = $ac_status" >&5
4180   (exit $ac_status); }; }; then
4181   cf_cv_ncurses_header=$cf_header; break
4182 else
4183   echo "$as_me: failed program was:" >&5
4184 cat conftest.$ac_ext >&5
4185 fi
4186 rm -f conftest.$ac_objext conftest.$ac_ext
4187 done
4188
4189 fi
4190 echo "$as_me:4190: result: $cf_cv_ncurses_header" >&5
4191 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4192
4193 if test "$cf_cv_ncurses_header" = none ; then
4194         { { echo "$as_me:4194: error: No curses header-files found" >&5
4195 echo "$as_me: error: No curses header-files found" >&2;}
4196    { (exit 1); exit 1; }; }
4197 fi
4198
4199 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4200
4201 for ac_header in $cf_cv_ncurses_header
4202 do
4203 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4204 echo "$as_me:4204: checking for $ac_header" >&5
4205 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4206 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4207   echo $ECHO_N "(cached) $ECHO_C" >&6
4208 else
4209   cat >conftest.$ac_ext <<_ACEOF
4210 #line 4210 "configure"
4211 #include "confdefs.h"
4212 #include <$ac_header>
4213 _ACEOF
4214 if { (eval echo "$as_me:4214: \"$ac_cpp conftest.$ac_ext\"") >&5
4215   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4216   ac_status=$?
4217   egrep -v '^ *\+' conftest.er1 >conftest.err
4218   rm -f conftest.er1
4219   cat conftest.err >&5
4220   echo "$as_me:4220: \$? = $ac_status" >&5
4221   (exit $ac_status); } >/dev/null; then
4222   if test -s conftest.err; then
4223     ac_cpp_err=$ac_c_preproc_warn_flag
4224   else
4225     ac_cpp_err=
4226   fi
4227 else
4228   ac_cpp_err=yes
4229 fi
4230 if test -z "$ac_cpp_err"; then
4231   eval "$as_ac_Header=yes"
4232 else
4233   echo "$as_me: failed program was:" >&5
4234   cat conftest.$ac_ext >&5
4235   eval "$as_ac_Header=no"
4236 fi
4237 rm -f conftest.err conftest.$ac_ext
4238 fi
4239 echo "$as_me:4239: result: `eval echo '${'$as_ac_Header'}'`" >&5
4240 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4241 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4242   cat >>confdefs.h <<EOF
4243 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4244 EOF
4245
4246 fi
4247 done
4248
4249 echo "$as_me:4249: checking for terminfo header" >&5
4250 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4251 if test "${cf_cv_term_header+set}" = set; then
4252   echo $ECHO_N "(cached) $ECHO_C" >&6
4253 else
4254
4255 case ${cf_cv_ncurses_header} in #(vi
4256 */ncurses.h|*/ncursesw.h) #(vi
4257         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4258         ;;
4259 *)
4260         cf_term_header=term.h
4261         ;;
4262 esac
4263
4264 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4265 do
4266 cat >conftest.$ac_ext <<_ACEOF
4267 #line 4267 "configure"
4268 #include "confdefs.h"
4269 #include <stdio.h>
4270 #include <${cf_cv_ncurses_header:-curses.h}>
4271 #include <$cf_test>
4272
4273 int
4274 main ()
4275 {
4276 int x = auto_left_margin
4277   ;
4278   return 0;
4279 }
4280 _ACEOF
4281 rm -f conftest.$ac_objext
4282 if { (eval echo "$as_me:4282: \"$ac_compile\"") >&5
4283   (eval $ac_compile) 2>&5
4284   ac_status=$?
4285   echo "$as_me:4285: \$? = $ac_status" >&5
4286   (exit $ac_status); } &&
4287          { ac_try='test -s conftest.$ac_objext'
4288   { (eval echo "$as_me:4288: \"$ac_try\"") >&5
4289   (eval $ac_try) 2>&5
4290   ac_status=$?
4291   echo "$as_me:4291: \$? = $ac_status" >&5
4292   (exit $ac_status); }; }; then
4293
4294         cf_cv_term_header="$cf_test"
4295 else
4296   echo "$as_me: failed program was:" >&5
4297 cat conftest.$ac_ext >&5
4298
4299         cf_cv_term_header=unknown
4300
4301 fi
4302 rm -f conftest.$ac_objext conftest.$ac_ext
4303         test "$cf_cv_term_header" != unknown && break
4304 done
4305
4306 fi
4307 echo "$as_me:4307: result: $cf_cv_term_header" >&5
4308 echo "${ECHO_T}$cf_cv_term_header" >&6
4309
4310 # Set definitions to allow ifdef'ing to accommodate subdirectories
4311
4312 case $cf_cv_term_header in # (vi
4313 *term.h)
4314         cat >>confdefs.h <<\EOF
4315 #define HAVE_TERM_H 1
4316 EOF
4317
4318         ;;
4319 esac
4320
4321 case $cf_cv_term_header in # (vi
4322 ncurses/term.h) #(vi
4323         cat >>confdefs.h <<\EOF
4324 #define HAVE_NCURSES_TERM_H 1
4325 EOF
4326
4327         ;;
4328 ncursesw/term.h)
4329         cat >>confdefs.h <<\EOF
4330 #define HAVE_NCURSESW_TERM_H 1
4331 EOF
4332
4333         ;;
4334 esac
4335
4336 echo "$as_me:4336: checking for ncurses version" >&5
4337 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4338 if test "${cf_cv_ncurses_version+set}" = set; then
4339   echo $ECHO_N "(cached) $ECHO_C" >&6
4340 else
4341
4342         cf_cv_ncurses_version=no
4343         cf_tempfile=out$$
4344         rm -f $cf_tempfile
4345         if test "$cross_compiling" = yes; then
4346
4347         # This will not work if the preprocessor splits the line after the
4348         # Autoconf token.  The 'unproto' program does that.
4349         cat > conftest.$ac_ext <<EOF
4350 #include <${cf_cv_ncurses_header:-curses.h}>
4351 #undef Autoconf
4352 #ifdef NCURSES_VERSION
4353 Autoconf NCURSES_VERSION
4354 #else
4355 #ifdef __NCURSES_H
4356 Autoconf "old"
4357 #endif
4358 ;
4359 #endif
4360 EOF
4361         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4362         { (eval echo "$as_me:4362: \"$cf_try\"") >&5
4363   (eval $cf_try) 2>&5
4364   ac_status=$?
4365   echo "$as_me:4365: \$? = $ac_status" >&5
4366   (exit $ac_status); }
4367         if test -f conftest.out ; then
4368                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4369                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4370                 rm -f conftest.out
4371         fi
4372
4373 else
4374   cat >conftest.$ac_ext <<_ACEOF
4375 #line 4375 "configure"
4376 #include "confdefs.h"
4377
4378 #include <${cf_cv_ncurses_header:-curses.h}>
4379 #include <stdio.h>
4380 int main()
4381 {
4382         FILE *fp = fopen("$cf_tempfile", "w");
4383 #ifdef NCURSES_VERSION
4384 # ifdef NCURSES_VERSION_PATCH
4385         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4386 # else
4387         fprintf(fp, "%s\n", NCURSES_VERSION);
4388 # endif
4389 #else
4390 # ifdef __NCURSES_H
4391         fprintf(fp, "old\n");
4392 # else
4393         make an error
4394 # endif
4395 #endif
4396         ${cf_cv_main_return:-return}(0);
4397 }
4398 _ACEOF
4399 rm -f conftest$ac_exeext
4400 if { (eval echo "$as_me:4400: \"$ac_link\"") >&5
4401   (eval $ac_link) 2>&5
4402   ac_status=$?
4403   echo "$as_me:4403: \$? = $ac_status" >&5
4404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4405   { (eval echo "$as_me:4405: \"$ac_try\"") >&5
4406   (eval $ac_try) 2>&5
4407   ac_status=$?
4408   echo "$as_me:4408: \$? = $ac_status" >&5
4409   (exit $ac_status); }; }; then
4410
4411         cf_cv_ncurses_version=`cat $cf_tempfile`
4412 else
4413   echo "$as_me: program exited with status $ac_status" >&5
4414 echo "$as_me: failed program was:" >&5
4415 cat conftest.$ac_ext >&5
4416 fi
4417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4418 fi
4419         rm -f $cf_tempfile
4420
4421 fi
4422 echo "$as_me:4422: result: $cf_cv_ncurses_version" >&5
4423 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4424 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
4425 #define NCURSES 1
4426 EOF
4427
4428 echo "$as_me:4428: checking if we have identified curses libraries" >&5
4429 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
4430 cat >conftest.$ac_ext <<_ACEOF
4431 #line 4431 "configure"
4432 #include "confdefs.h"
4433 #include <${cf_cv_ncurses_header:-curses.h}>
4434 int
4435 main ()
4436 {
4437 initscr(); tgoto("?", 0,0)
4438   ;
4439   return 0;
4440 }
4441 _ACEOF
4442 rm -f conftest.$ac_objext conftest$ac_exeext
4443 if { (eval echo "$as_me:4443: \"$ac_link\"") >&5
4444   (eval $ac_link) 2>&5
4445   ac_status=$?
4446   echo "$as_me:4446: \$? = $ac_status" >&5
4447   (exit $ac_status); } &&
4448          { ac_try='test -s conftest$ac_exeext'
4449   { (eval echo "$as_me:4449: \"$ac_try\"") >&5
4450   (eval $ac_try) 2>&5
4451   ac_status=$?
4452   echo "$as_me:4452: \$? = $ac_status" >&5
4453   (exit $ac_status); }; }; then
4454   cf_result=yes
4455 else
4456   echo "$as_me: failed program was:" >&5
4457 cat conftest.$ac_ext >&5
4458 cf_result=no
4459 fi
4460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4461 echo "$as_me:4461: result: $cf_result" >&5
4462 echo "${ECHO_T}$cf_result" >&6
4463
4464 if test "$cf_result" = no ; then
4465 case $host_os in #(vi
4466 freebsd*) #(vi
4467     echo "$as_me:4467: checking for tgoto in -lmytinfo" >&5
4468 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4469 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   ac_check_lib_save_LIBS=$LIBS
4473 LIBS="-lmytinfo  $LIBS"
4474 cat >conftest.$ac_ext <<_ACEOF
4475 #line 4475 "configure"
4476 #include "confdefs.h"
4477
4478 /* Override any gcc2 internal prototype to avoid an error.  */
4479 #ifdef __cplusplus
4480 extern "C"
4481 #endif
4482 /* We use char because int might match the return type of a gcc2
4483    builtin and then its argument prototype would still apply.  */
4484 char tgoto ();
4485 int
4486 main ()
4487 {
4488 tgoto ();
4489   ;
4490   return 0;
4491 }
4492 _ACEOF
4493 rm -f conftest.$ac_objext conftest$ac_exeext
4494 if { (eval echo "$as_me:4494: \"$ac_link\"") >&5
4495   (eval $ac_link) 2>&5
4496   ac_status=$?
4497   echo "$as_me:4497: \$? = $ac_status" >&5
4498   (exit $ac_status); } &&
4499          { ac_try='test -s conftest$ac_exeext'
4500   { (eval echo "$as_me:4500: \"$ac_try\"") >&5
4501   (eval $ac_try) 2>&5
4502   ac_status=$?
4503   echo "$as_me:4503: \$? = $ac_status" >&5
4504   (exit $ac_status); }; }; then
4505   ac_cv_lib_mytinfo_tgoto=yes
4506 else
4507   echo "$as_me: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
4509 ac_cv_lib_mytinfo_tgoto=no
4510 fi
4511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4512 LIBS=$ac_check_lib_save_LIBS
4513 fi
4514 echo "$as_me:4514: result: $ac_cv_lib_mytinfo_tgoto" >&5
4515 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4516 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4517   LIBS="-lmytinfo $LIBS"
4518 fi
4519
4520     ;;
4521 hpux10.*) #(vi
4522     echo "$as_me:4522: checking for initscr in -lcur_colr" >&5
4523 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
4524 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
4525   echo $ECHO_N "(cached) $ECHO_C" >&6
4526 else
4527   ac_check_lib_save_LIBS=$LIBS
4528 LIBS="-lcur_colr  $LIBS"
4529 cat >conftest.$ac_ext <<_ACEOF
4530 #line 4530 "configure"
4531 #include "confdefs.h"
4532
4533 /* Override any gcc2 internal prototype to avoid an error.  */
4534 #ifdef __cplusplus
4535 extern "C"
4536 #endif
4537 /* We use char because int might match the return type of a gcc2
4538    builtin and then its argument prototype would still apply.  */
4539 char initscr ();
4540 int
4541 main ()
4542 {
4543 initscr ();
4544   ;
4545   return 0;
4546 }
4547 _ACEOF
4548 rm -f conftest.$ac_objext conftest$ac_exeext
4549 if { (eval echo "$as_me:4549: \"$ac_link\"") >&5
4550   (eval $ac_link) 2>&5
4551   ac_status=$?
4552   echo "$as_me:4552: \$? = $ac_status" >&5
4553   (exit $ac_status); } &&
4554          { ac_try='test -s conftest$ac_exeext'
4555   { (eval echo "$as_me:4555: \"$ac_try\"") >&5
4556   (eval $ac_try) 2>&5
4557   ac_status=$?
4558   echo "$as_me:4558: \$? = $ac_status" >&5
4559   (exit $ac_status); }; }; then
4560   ac_cv_lib_cur_colr_initscr=yes
4561 else
4562   echo "$as_me: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
4564 ac_cv_lib_cur_colr_initscr=no
4565 fi
4566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4567 LIBS=$ac_check_lib_save_LIBS
4568 fi
4569 echo "$as_me:4569: result: $ac_cv_lib_cur_colr_initscr" >&5
4570 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
4571 if test $ac_cv_lib_cur_colr_initscr = yes; then
4572
4573         LIBS="-lcur_colr $LIBS"
4574         ac_cv_func_initscr=yes
4575
4576 else
4577
4578     echo "$as_me:4578: checking for initscr in -lHcurses" >&5
4579 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
4580 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
4581   echo $ECHO_N "(cached) $ECHO_C" >&6
4582 else
4583   ac_check_lib_save_LIBS=$LIBS
4584 LIBS="-lHcurses  $LIBS"
4585 cat >conftest.$ac_ext <<_ACEOF
4586 #line 4586 "configure"
4587 #include "confdefs.h"
4588
4589 /* Override any gcc2 internal prototype to avoid an error.  */
4590 #ifdef __cplusplus
4591 extern "C"
4592 #endif
4593 /* We use char because int might match the return type of a gcc2
4594    builtin and then its argument prototype would still apply.  */
4595 char initscr ();
4596 int
4597 main ()
4598 {
4599 initscr ();
4600   ;
4601   return 0;
4602 }
4603 _ACEOF
4604 rm -f conftest.$ac_objext conftest$ac_exeext
4605 if { (eval echo "$as_me:4605: \"$ac_link\"") >&5
4606   (eval $ac_link) 2>&5
4607   ac_status=$?
4608   echo "$as_me:4608: \$? = $ac_status" >&5
4609   (exit $ac_status); } &&
4610          { ac_try='test -s conftest$ac_exeext'
4611   { (eval echo "$as_me:4611: \"$ac_try\"") >&5
4612   (eval $ac_try) 2>&5
4613   ac_status=$?
4614   echo "$as_me:4614: \$? = $ac_status" >&5
4615   (exit $ac_status); }; }; then
4616   ac_cv_lib_Hcurses_initscr=yes
4617 else
4618   echo "$as_me: failed program was:" >&5
4619 cat conftest.$ac_ext >&5
4620 ac_cv_lib_Hcurses_initscr=no
4621 fi
4622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4623 LIBS=$ac_check_lib_save_LIBS
4624 fi
4625 echo "$as_me:4625: result: $ac_cv_lib_Hcurses_initscr" >&5
4626 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
4627 if test $ac_cv_lib_Hcurses_initscr = yes; then
4628
4629         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
4630         LIBS="-lHcurses $LIBS"
4631         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
4632         ac_cv_func_initscr=yes
4633
4634 fi
4635
4636 fi
4637
4638     ;;
4639 linux*) # Suse Linux does not follow /usr/lib convention
4640
4641 if test -n "/lib" ; then
4642   for cf_add_libdir in /lib
4643   do
4644     if test $cf_add_libdir = /usr/lib ; then
4645       :
4646     elif test -d $cf_add_libdir
4647     then
4648       cf_have_libdir=no
4649       if test -n "$LDFLAGS$LIBS" ; then
4650         # a loop is needed to ensure we can add subdirs of existing dirs
4651         for cf_test_libdir in $LDFLAGS $LIBS ; do
4652           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4653             cf_have_libdir=yes; break
4654           fi
4655         done
4656       fi
4657       if test "$cf_have_libdir" = no ; then
4658         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4659
4660 echo "${as_me:-configure}:4660: testing adding $cf_add_libdir to library-path ..." 1>&5
4661
4662         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4663       fi
4664     fi
4665   done
4666 fi
4667
4668     ;;
4669 sunos3*|sunos4*)
4670     if test -d /usr/5lib ; then
4671
4672 if test -n "/usr/5lib" ; then
4673   for cf_add_libdir in /usr/5lib
4674   do
4675     if test $cf_add_libdir = /usr/lib ; then
4676       :
4677     elif test -d $cf_add_libdir
4678     then
4679       cf_have_libdir=no
4680       if test -n "$LDFLAGS$LIBS" ; then
4681         # a loop is needed to ensure we can add subdirs of existing dirs
4682         for cf_test_libdir in $LDFLAGS $LIBS ; do
4683           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4684             cf_have_libdir=yes; break
4685           fi
4686         done
4687       fi
4688       if test "$cf_have_libdir" = no ; then
4689         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4690
4691 echo "${as_me:-configure}:4691: testing adding $cf_add_libdir to library-path ..." 1>&5
4692
4693         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4694       fi
4695     fi
4696   done
4697 fi
4698
4699       LIBS="-lcurses -ltermcap $LIBS"
4700     fi
4701     ac_cv_func_initscr=yes
4702     ;;
4703 esac
4704
4705 if test ".$ac_cv_func_initscr" != .yes ; then
4706     cf_save_LIBS="$LIBS"
4707     cf_term_lib=""
4708     cf_curs_lib=""
4709
4710     if test ".${cf_cv_ncurses_version:-no}" != .no
4711     then
4712         cf_check_list="ncurses curses cursesX"
4713     else
4714         cf_check_list="cursesX curses ncurses"
4715     fi
4716
4717     # Check for library containing tgoto.  Do this before curses library
4718     # because it may be needed to link the test-case for initscr.
4719     echo "$as_me:4719: checking for tgoto" >&5
4720 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
4721 if test "${ac_cv_func_tgoto+set}" = set; then
4722   echo $ECHO_N "(cached) $ECHO_C" >&6
4723 else
4724   cat >conftest.$ac_ext <<_ACEOF
4725 #line 4725 "configure"
4726 #include "confdefs.h"
4727 /* System header to define __stub macros and hopefully few prototypes,
4728     which can conflict with char tgoto (); below.  */
4729 #include <assert.h>
4730 /* Override any gcc2 internal prototype to avoid an error.  */
4731 #ifdef __cplusplus
4732 extern "C"
4733 #endif
4734 /* We use char because int might match the return type of a gcc2
4735    builtin and then its argument prototype would still apply.  */
4736 char tgoto ();
4737 char (*f) ();
4738
4739 int
4740 main ()
4741 {
4742 /* The GNU C library defines this for functions which it implements
4743     to always fail with ENOSYS.  Some functions are actually named
4744     something starting with __ and the normal name is an alias.  */
4745 #if defined (__stub_tgoto) || defined (__stub___tgoto)
4746 choke me
4747 #else
4748 f = tgoto;
4749 #endif
4750
4751   ;
4752   return 0;
4753 }
4754 _ACEOF
4755 rm -f conftest.$ac_objext conftest$ac_exeext
4756 if { (eval echo "$as_me:4756: \"$ac_link\"") >&5
4757   (eval $ac_link) 2>&5
4758   ac_status=$?
4759   echo "$as_me:4759: \$? = $ac_status" >&5
4760   (exit $ac_status); } &&
4761          { ac_try='test -s conftest$ac_exeext'
4762   { (eval echo "$as_me:4762: \"$ac_try\"") >&5
4763   (eval $ac_try) 2>&5
4764   ac_status=$?
4765   echo "$as_me:4765: \$? = $ac_status" >&5
4766   (exit $ac_status); }; }; then
4767   ac_cv_func_tgoto=yes
4768 else
4769   echo "$as_me: failed program was:" >&5
4770 cat conftest.$ac_ext >&5
4771 ac_cv_func_tgoto=no
4772 fi
4773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4774 fi
4775 echo "$as_me:4775: result: $ac_cv_func_tgoto" >&5
4776 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
4777 if test $ac_cv_func_tgoto = yes; then
4778   cf_term_lib=predefined
4779 else
4780
4781         for cf_term_lib in $cf_check_list termcap termlib unknown
4782         do
4783             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
4784 echo "$as_me:4784: checking for tgoto in -l$cf_term_lib" >&5
4785 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
4786 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
4787   echo $ECHO_N "(cached) $ECHO_C" >&6
4788 else
4789   ac_check_lib_save_LIBS=$LIBS
4790 LIBS="-l$cf_term_lib  $LIBS"
4791 cat >conftest.$ac_ext <<_ACEOF
4792 #line 4792 "configure"
4793 #include "confdefs.h"
4794
4795 /* Override any gcc2 internal prototype to avoid an error.  */
4796 #ifdef __cplusplus
4797 extern "C"
4798 #endif
4799 /* We use char because int might match the return type of a gcc2
4800    builtin and then its argument prototype would still apply.  */
4801 char tgoto ();
4802 int
4803 main ()
4804 {
4805 tgoto ();
4806   ;
4807   return 0;
4808 }
4809 _ACEOF
4810 rm -f conftest.$ac_objext conftest$ac_exeext
4811 if { (eval echo "$as_me:4811: \"$ac_link\"") >&5
4812   (eval $ac_link) 2>&5
4813   ac_status=$?
4814   echo "$as_me:4814: \$? = $ac_status" >&5
4815   (exit $ac_status); } &&
4816          { ac_try='test -s conftest$ac_exeext'
4817   { (eval echo "$as_me:4817: \"$ac_try\"") >&5
4818   (eval $ac_try) 2>&5
4819   ac_status=$?
4820   echo "$as_me:4820: \$? = $ac_status" >&5
4821   (exit $ac_status); }; }; then
4822   eval "$as_ac_Lib=yes"
4823 else
4824   echo "$as_me: failed program was:" >&5
4825 cat conftest.$ac_ext >&5
4826 eval "$as_ac_Lib=no"
4827 fi
4828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4829 LIBS=$ac_check_lib_save_LIBS
4830 fi
4831 echo "$as_me:4831: result: `eval echo '${'$as_ac_Lib'}'`" >&5
4832 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
4833 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
4834   break
4835 fi
4836
4837         done
4838
4839 fi
4840
4841     # Check for library containing initscr
4842     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
4843         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
4844     do
4845         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
4846 echo "$as_me:4846: checking for initscr in -l$cf_curs_lib" >&5
4847 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
4848 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
4849   echo $ECHO_N "(cached) $ECHO_C" >&6
4850 else
4851   ac_check_lib_save_LIBS=$LIBS
4852 LIBS="-l$cf_curs_lib  $LIBS"
4853 cat >conftest.$ac_ext <<_ACEOF
4854 #line 4854 "configure"
4855 #include "confdefs.h"
4856
4857 /* Override any gcc2 internal prototype to avoid an error.  */
4858 #ifdef __cplusplus
4859 extern "C"
4860 #endif
4861 /* We use char because int might match the return type of a gcc2
4862    builtin and then its argument prototype would still apply.  */
4863 char initscr ();
4864 int
4865 main ()
4866 {
4867 initscr ();
4868   ;
4869   return 0;
4870 }
4871 _ACEOF
4872 rm -f conftest.$ac_objext conftest$ac_exeext
4873 if { (eval echo "$as_me:4873: \"$ac_link\"") >&5
4874   (eval $ac_link) 2>&5
4875   ac_status=$?
4876   echo "$as_me:4876: \$? = $ac_status" >&5
4877   (exit $ac_status); } &&
4878          { ac_try='test -s conftest$ac_exeext'
4879   { (eval echo "$as_me:4879: \"$ac_try\"") >&5
4880   (eval $ac_try) 2>&5
4881   ac_status=$?
4882   echo "$as_me:4882: \$? = $ac_status" >&5
4883   (exit $ac_status); }; }; then
4884   eval "$as_ac_Lib=yes"
4885 else
4886   echo "$as_me: failed program was:" >&5
4887 cat conftest.$ac_ext >&5
4888 eval "$as_ac_Lib=no"
4889 fi
4890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4891 LIBS=$ac_check_lib_save_LIBS
4892 fi
4893 echo "$as_me:4893: result: `eval echo '${'$as_ac_Lib'}'`" >&5
4894 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
4895 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
4896   break
4897 fi
4898
4899     done
4900     test $cf_curs_lib = unknown && { { echo "$as_me:4900: error: no curses library found" >&5
4901 echo "$as_me: error: no curses library found" >&2;}
4902    { (exit 1); exit 1; }; }
4903
4904     LIBS="-l$cf_curs_lib $cf_save_LIBS"
4905     if test "$cf_term_lib" = unknown ; then
4906         echo "$as_me:4906: checking if we can link with $cf_curs_lib library" >&5
4907 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
4908         cat >conftest.$ac_ext <<_ACEOF
4909 #line 4909 "configure"
4910 #include "confdefs.h"
4911 #include <${cf_cv_ncurses_header:-curses.h}>
4912 int
4913 main ()
4914 {
4915 initscr()
4916   ;
4917   return 0;
4918 }
4919 _ACEOF
4920 rm -f conftest.$ac_objext conftest$ac_exeext
4921 if { (eval echo "$as_me:4921: \"$ac_link\"") >&5
4922   (eval $ac_link) 2>&5
4923   ac_status=$?
4924   echo "$as_me:4924: \$? = $ac_status" >&5
4925   (exit $ac_status); } &&
4926          { ac_try='test -s conftest$ac_exeext'
4927   { (eval echo "$as_me:4927: \"$ac_try\"") >&5
4928   (eval $ac_try) 2>&5
4929   ac_status=$?
4930   echo "$as_me:4930: \$? = $ac_status" >&5
4931   (exit $ac_status); }; }; then
4932   cf_result=yes
4933 else
4934   echo "$as_me: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
4936 cf_result=no
4937 fi
4938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4939         echo "$as_me:4939: result: $cf_result" >&5
4940 echo "${ECHO_T}$cf_result" >&6
4941         test $cf_result = no && { { echo "$as_me:4941: error: Cannot link curses library" >&5
4942 echo "$as_me: error: Cannot link curses library" >&2;}
4943    { (exit 1); exit 1; }; }
4944     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
4945         :
4946     elif test "$cf_term_lib" != predefined ; then
4947         echo "$as_me:4947: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
4948 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
4949         cat >conftest.$ac_ext <<_ACEOF
4950 #line 4950 "configure"
4951 #include "confdefs.h"
4952 #include <${cf_cv_ncurses_header:-curses.h}>
4953 int
4954 main ()
4955 {
4956 initscr(); tgoto((char *)0, 0, 0);
4957   ;
4958   return 0;
4959 }
4960 _ACEOF
4961 rm -f conftest.$ac_objext conftest$ac_exeext
4962 if { (eval echo "$as_me:4962: \"$ac_link\"") >&5
4963   (eval $ac_link) 2>&5
4964   ac_status=$?
4965   echo "$as_me:4965: \$? = $ac_status" >&5
4966   (exit $ac_status); } &&
4967          { ac_try='test -s conftest$ac_exeext'
4968   { (eval echo "$as_me:4968: \"$ac_try\"") >&5
4969   (eval $ac_try) 2>&5
4970   ac_status=$?
4971   echo "$as_me:4971: \$? = $ac_status" >&5
4972   (exit $ac_status); }; }; then
4973   cf_result=no
4974 else
4975   echo "$as_me: failed program was:" >&5
4976 cat conftest.$ac_ext >&5
4977
4978             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
4979             cat >conftest.$ac_ext <<_ACEOF
4980 #line 4980 "configure"
4981 #include "confdefs.h"
4982 #include <${cf_cv_ncurses_header:-curses.h}>
4983 int
4984 main ()
4985 {
4986 initscr()
4987   ;
4988   return 0;
4989 }
4990 _ACEOF
4991 rm -f conftest.$ac_objext conftest$ac_exeext
4992 if { (eval echo "$as_me:4992: \"$ac_link\"") >&5
4993   (eval $ac_link) 2>&5
4994   ac_status=$?
4995   echo "$as_me:4995: \$? = $ac_status" >&5
4996   (exit $ac_status); } &&
4997          { ac_try='test -s conftest$ac_exeext'
4998   { (eval echo "$as_me:4998: \"$ac_try\"") >&5
4999   (eval $ac_try) 2>&5
5000   ac_status=$?
5001   echo "$as_me:5001: \$? = $ac_status" >&5
5002   (exit $ac_status); }; }; then
5003   cf_result=yes
5004 else
5005   echo "$as_me: failed program was:" >&5
5006 cat conftest.$ac_ext >&5
5007 cf_result=error
5008 fi
5009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5010
5011 fi
5012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5013         echo "$as_me:5013: result: $cf_result" >&5
5014 echo "${ECHO_T}$cf_result" >&6
5015     fi
5016 fi
5017 fi
5018
5019         ;;
5020 ncurses)
5021
5022 cf_ncuconfig_root=ncurses
5023
5024 echo "Looking for ${cf_ncuconfig_root}-config"
5025 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5026 do
5027   # Extract the first word of "$ac_prog", so it can be a program name with args.
5028 set dummy $ac_prog; ac_word=$2
5029 echo "$as_me:5029: checking for $ac_word" >&5
5030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5031 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
5032   echo $ECHO_N "(cached) $ECHO_C" >&6
5033 else
5034   case $NCURSES_CONFIG in
5035   [\\/]* | ?:[\\/]*)
5036   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5037   ;;
5038   *)
5039   ac_save_IFS=$IFS; IFS=$ac_path_separator
5040 ac_dummy="$PATH"
5041 for ac_dir in $ac_dummy; do
5042   IFS=$ac_save_IFS
5043   test -z "$ac_dir" && ac_dir=.
5044   if $as_executable_p "$ac_dir/$ac_word"; then
5045    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5046    echo "$as_me:5046: found $ac_dir/$ac_word" >&5
5047    break
5048 fi
5049 done
5050
5051   ;;
5052 esac
5053 fi
5054 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
5055
5056 if test -n "$NCURSES_CONFIG"; then
5057   echo "$as_me:5057: result: $NCURSES_CONFIG" >&5
5058 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5059 else
5060   echo "$as_me:5060: result: no" >&5
5061 echo "${ECHO_T}no" >&6
5062 fi
5063
5064   test -n "$NCURSES_CONFIG" && break
5065 done
5066 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5067
5068 if test "$NCURSES_CONFIG" != none ; then
5069
5070 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5071 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5072
5073 # even with config script, some packages use no-override for curses.h
5074
5075 echo "$as_me:5075: checking if we have identified curses headers" >&5
5076 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5077 if test "${cf_cv_ncurses_header+set}" = set; then
5078   echo $ECHO_N "(cached) $ECHO_C" >&6
5079 else
5080
5081 cf_cv_ncurses_header=none
5082 for cf_header in  \
5083     ncurses/curses.h \
5084         ncurses/ncurses.h \
5085         curses.h \
5086         ncurses.h
5087 do
5088 cat >conftest.$ac_ext <<_ACEOF
5089 #line 5089 "configure"
5090 #include "confdefs.h"
5091 #include <${cf_header}>
5092 int
5093 main ()
5094 {
5095 initscr(); tgoto("?", 0,0)
5096   ;
5097   return 0;
5098 }
5099 _ACEOF
5100 rm -f conftest.$ac_objext
5101 if { (eval echo "$as_me:5101: \"$ac_compile\"") >&5
5102   (eval $ac_compile) 2>&5
5103   ac_status=$?
5104   echo "$as_me:5104: \$? = $ac_status" >&5
5105   (exit $ac_status); } &&
5106          { ac_try='test -s conftest.$ac_objext'
5107   { (eval echo "$as_me:5107: \"$ac_try\"") >&5
5108   (eval $ac_try) 2>&5
5109   ac_status=$?
5110   echo "$as_me:5110: \$? = $ac_status" >&5
5111   (exit $ac_status); }; }; then
5112   cf_cv_ncurses_header=$cf_header; break
5113 else
5114   echo "$as_me: failed program was:" >&5
5115 cat conftest.$ac_ext >&5
5116 fi
5117 rm -f conftest.$ac_objext conftest.$ac_ext
5118 done
5119
5120 fi
5121 echo "$as_me:5121: result: $cf_cv_ncurses_header" >&5
5122 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5123
5124 if test "$cf_cv_ncurses_header" = none ; then
5125         { { echo "$as_me:5125: error: No curses header-files found" >&5
5126 echo "$as_me: error: No curses header-files found" >&2;}
5127    { (exit 1); exit 1; }; }
5128 fi
5129
5130 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5131
5132 for ac_header in $cf_cv_ncurses_header
5133 do
5134 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5135 echo "$as_me:5135: checking for $ac_header" >&5
5136 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5137 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5138   echo $ECHO_N "(cached) $ECHO_C" >&6
5139 else
5140   cat >conftest.$ac_ext <<_ACEOF
5141 #line 5141 "configure"
5142 #include "confdefs.h"
5143 #include <$ac_header>
5144 _ACEOF
5145 if { (eval echo "$as_me:5145: \"$ac_cpp conftest.$ac_ext\"") >&5
5146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5147   ac_status=$?
5148   egrep -v '^ *\+' conftest.er1 >conftest.err
5149   rm -f conftest.er1
5150   cat conftest.err >&5
5151   echo "$as_me:5151: \$? = $ac_status" >&5
5152   (exit $ac_status); } >/dev/null; then
5153   if test -s conftest.err; then
5154     ac_cpp_err=$ac_c_preproc_warn_flag
5155   else
5156     ac_cpp_err=
5157   fi
5158 else
5159   ac_cpp_err=yes
5160 fi
5161 if test -z "$ac_cpp_err"; then
5162   eval "$as_ac_Header=yes"
5163 else
5164   echo "$as_me: failed program was:" >&5
5165   cat conftest.$ac_ext >&5
5166   eval "$as_ac_Header=no"
5167 fi
5168 rm -f conftest.err conftest.$ac_ext
5169 fi
5170 echo "$as_me:5170: result: `eval echo '${'$as_ac_Header'}'`" >&5
5171 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5172 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5173   cat >>confdefs.h <<EOF
5174 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5175 EOF
5176
5177 fi
5178 done
5179
5180 cat >>confdefs.h <<\EOF
5181 #define NCURSES 1
5182 EOF
5183
5184 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5185
5186 cat >>confdefs.h <<EOF
5187 #define $cf_nculib_ROOT 1
5188 EOF
5189
5190 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5191
5192 else
5193
5194 cf_ncuhdr_root=ncurses
5195
5196 test -n "$cf_cv_curses_dir" && \
5197 test "$cf_cv_curses_dir" != "no" && { \
5198
5199 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5200   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
5201   do
5202         while test $cf_add_incdir != /usr/include
5203         do
5204           if test -d $cf_add_incdir
5205           then
5206                 cf_have_incdir=no
5207                 if test -n "$CFLAGS$CPPFLAGS" ; then
5208                   # a loop is needed to ensure we can add subdirs of existing dirs
5209                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5210                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5211                           cf_have_incdir=yes; break
5212                         fi
5213                   done
5214                 fi
5215
5216                 if test "$cf_have_incdir" = no ; then
5217                   if test "$cf_add_incdir" = /usr/local/include ; then
5218                         if test "$GCC" = yes
5219                         then
5220                           cf_save_CPPFLAGS=$CPPFLAGS
5221                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5222                           cat >conftest.$ac_ext <<_ACEOF
5223 #line 5223 "configure"
5224 #include "confdefs.h"
5225 #include <stdio.h>
5226 int
5227 main ()
5228 {
5229 printf("Hello")
5230   ;
5231   return 0;
5232 }
5233 _ACEOF
5234 rm -f conftest.$ac_objext
5235 if { (eval echo "$as_me:5235: \"$ac_compile\"") >&5
5236   (eval $ac_compile) 2>&5
5237   ac_status=$?
5238   echo "$as_me:5238: \$? = $ac_status" >&5
5239   (exit $ac_status); } &&
5240          { ac_try='test -s conftest.$ac_objext'
5241   { (eval echo "$as_me:5241: \"$ac_try\"") >&5
5242   (eval $ac_try) 2>&5
5243   ac_status=$?
5244   echo "$as_me:5244: \$? = $ac_status" >&5
5245   (exit $ac_status); }; }; then
5246   :
5247 else
5248   echo "$as_me: failed program was:" >&5
5249 cat conftest.$ac_ext >&5
5250 cf_have_incdir=yes
5251 fi
5252 rm -f conftest.$ac_objext conftest.$ac_ext
5253                           CPPFLAGS=$cf_save_CPPFLAGS
5254                         fi
5255                   fi
5256                 fi
5257
5258                 if test "$cf_have_incdir" = no ; then
5259                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5260
5261 echo "${as_me:-configure}:5261: testing adding $cf_add_incdir to include-path ..." 1>&5
5262
5263                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5264
5265                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5266                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5267                   cf_add_incdir="$cf_top_incdir"
5268                 else
5269                   break
5270                 fi
5271           fi
5272         done
5273   done
5274 fi
5275
5276 }
5277
5278 echo "$as_me:5278: checking for $cf_ncuhdr_root header in include-path" >&5
5279 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5280 if test "${cf_cv_ncurses_h+set}" = set; then
5281   echo $ECHO_N "(cached) $ECHO_C" >&6
5282 else
5283
5284         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5285         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5286         for cf_header in $cf_header_list
5287         do
5288
5289         cat >conftest.$ac_ext <<_ACEOF
5290 #line 5290 "configure"
5291 #include "confdefs.h"
5292
5293 #include <$cf_header>
5294 int
5295 main ()
5296 {
5297
5298 #ifdef NCURSES_VERSION
5299
5300 printf("%s\n", NCURSES_VERSION);
5301 #else
5302 #ifdef __NCURSES_H
5303 printf("old\n");
5304 #else
5305         make an error
5306 #endif
5307 #endif
5308
5309   ;
5310   return 0;
5311 }
5312 _ACEOF
5313 rm -f conftest.$ac_objext
5314 if { (eval echo "$as_me:5314: \"$ac_compile\"") >&5
5315   (eval $ac_compile) 2>&5
5316   ac_status=$?
5317   echo "$as_me:5317: \$? = $ac_status" >&5
5318   (exit $ac_status); } &&
5319          { ac_try='test -s conftest.$ac_objext'
5320   { (eval echo "$as_me:5320: \"$ac_try\"") >&5
5321   (eval $ac_try) 2>&5
5322   ac_status=$?
5323   echo "$as_me:5323: \$? = $ac_status" >&5
5324   (exit $ac_status); }; }; then
5325   cf_cv_ncurses_h=$cf_header
5326
5327 else
5328   echo "$as_me: failed program was:" >&5
5329 cat conftest.$ac_ext >&5
5330 cf_cv_ncurses_h=no
5331 fi
5332 rm -f conftest.$ac_objext conftest.$ac_ext
5333
5334                 test "$cf_cv_ncurses_h" != no && break
5335         done
5336
5337 fi
5338 echo "$as_me:5338: result: $cf_cv_ncurses_h" >&5
5339 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5340
5341 if test "$cf_cv_ncurses_h" != no ; then
5342         cf_cv_ncurses_header=$cf_cv_ncurses_h
5343 else
5344
5345 echo "$as_me:5345: checking for $cf_ncuhdr_root include-path" >&5
5346 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5347 if test "${cf_cv_ncurses_h2+set}" = set; then
5348   echo $ECHO_N "(cached) $ECHO_C" >&6
5349 else
5350
5351         test -n "$verbose" && echo
5352
5353 cf_search=
5354
5355 # collect the current set of include-directories from compiler flags
5356 cf_header_path_list=""
5357 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5358         for cf_header_path in $CPPFLAGS $CFLAGS
5359         do
5360                 case $cf_header_path in #(vi
5361                 -I*)
5362                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5363
5364 test "$cf_header_path" != "NONE" && \
5365 test -d "$cf_header_path" && \
5366  {
5367         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
5368         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
5369         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5370         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5371         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5372         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"
5373 }
5374
5375                         cf_header_path_list="$cf_header_path_list $cf_search"
5376                         ;;
5377                 esac
5378         done
5379 fi
5380
5381 # add the variations for the package we are looking for
5382
5383 cf_search=
5384
5385 test "/usr" != "$prefix" && \
5386 test -d "/usr" && \
5387 (test $prefix = NONE || test "/usr" != "$prefix") && {
5388         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
5389         test -d /usr/include &&          cf_search="$cf_search /usr/include"
5390         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5391         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5392         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5393         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5394 }
5395
5396 test "$prefix" != "NONE" && \
5397 test -d "$prefix" && \
5398  {
5399         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
5400         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
5401         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5402         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5403         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5404         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5405 }
5406
5407 test "/usr/local" != "$prefix" && \
5408 test -d "/usr/local" && \
5409 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
5410         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
5411         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5412         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5413         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5414         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5415         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5416 }
5417
5418 test "/opt" != "$prefix" && \
5419 test -d "/opt" && \
5420 (test $prefix = NONE || test "/opt" != "$prefix") && {
5421         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
5422         test -d /opt/include &&          cf_search="$cf_search /opt/include"
5423         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5424         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5425         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5426         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5427 }
5428
5429 test "$HOME" != "$prefix" && \
5430 test -d "$HOME" && \
5431 (test $prefix = NONE || test "$HOME" != "$prefix") && {
5432         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
5433         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5434         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5435         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5436         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5437         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5438 }
5439
5440 test "$includedir" != NONE && \
5441 test "$includedir" != "/usr/include" && \
5442 test -d "$includedir" && {
5443         test -d $includedir &&    cf_search="$cf_search $includedir"
5444         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5445 }
5446
5447 test "$oldincludedir" != NONE && \
5448 test "$oldincludedir" != "/usr/include" && \
5449 test -d "$oldincludedir" && {
5450         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5451         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5452 }
5453
5454 cf_search="$cf_search $cf_header_path_list"
5455
5456         test -n "$verbose" && echo search path $cf_search
5457         cf_save2_CPPFLAGS="$CPPFLAGS"
5458         for cf_incdir in $cf_search
5459         do
5460
5461 if test -n "$cf_incdir" ; then
5462   for cf_add_incdir in $cf_incdir
5463   do
5464         while test $cf_add_incdir != /usr/include
5465         do
5466           if test -d $cf_add_incdir
5467           then
5468                 cf_have_incdir=no
5469                 if test -n "$CFLAGS$CPPFLAGS" ; then
5470                   # a loop is needed to ensure we can add subdirs of existing dirs
5471                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5472                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5473                           cf_have_incdir=yes; break
5474                         fi
5475                   done
5476                 fi
5477
5478                 if test "$cf_have_incdir" = no ; then
5479                   if test "$cf_add_incdir" = /usr/local/include ; then
5480                         if test "$GCC" = yes
5481                         then
5482                           cf_save_CPPFLAGS=$CPPFLAGS
5483                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5484                           cat >conftest.$ac_ext <<_ACEOF
5485 #line 5485 "configure"
5486 #include "confdefs.h"
5487 #include <stdio.h>
5488 int
5489 main ()
5490 {
5491 printf("Hello")
5492   ;
5493   return 0;
5494 }
5495 _ACEOF
5496 rm -f conftest.$ac_objext
5497 if { (eval echo "$as_me:5497: \"$ac_compile\"") >&5
5498   (eval $ac_compile) 2>&5
5499   ac_status=$?
5500   echo "$as_me:5500: \$? = $ac_status" >&5
5501   (exit $ac_status); } &&
5502          { ac_try='test -s conftest.$ac_objext'
5503   { (eval echo "$as_me:5503: \"$ac_try\"") >&5
5504   (eval $ac_try) 2>&5
5505   ac_status=$?
5506   echo "$as_me:5506: \$? = $ac_status" >&5
5507   (exit $ac_status); }; }; then
5508   :
5509 else
5510   echo "$as_me: failed program was:" >&5
5511 cat conftest.$ac_ext >&5
5512 cf_have_incdir=yes
5513 fi
5514 rm -f conftest.$ac_objext conftest.$ac_ext
5515                           CPPFLAGS=$cf_save_CPPFLAGS
5516                         fi
5517                   fi
5518                 fi
5519
5520                 if test "$cf_have_incdir" = no ; then
5521                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5522
5523 echo "${as_me:-configure}:5523: testing adding $cf_add_incdir to include-path ..." 1>&5
5524
5525                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5526
5527                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5528                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5529                   cf_add_incdir="$cf_top_incdir"
5530                 else
5531                   break
5532                 fi
5533           fi
5534         done
5535   done
5536 fi
5537
5538                 for cf_header in \
5539                         ncurses.h \
5540                         curses.h
5541                 do
5542
5543         cat >conftest.$ac_ext <<_ACEOF
5544 #line 5544 "configure"
5545 #include "confdefs.h"
5546
5547 #include <$cf_header>
5548 int
5549 main ()
5550 {
5551
5552 #ifdef NCURSES_VERSION
5553
5554 printf("%s\n", NCURSES_VERSION);
5555 #else
5556 #ifdef __NCURSES_H
5557 printf("old\n");
5558 #else
5559         make an error
5560 #endif
5561 #endif
5562
5563   ;
5564   return 0;
5565 }
5566 _ACEOF
5567 rm -f conftest.$ac_objext
5568 if { (eval echo "$as_me:5568: \"$ac_compile\"") >&5
5569   (eval $ac_compile) 2>&5
5570   ac_status=$?
5571   echo "$as_me:5571: \$? = $ac_status" >&5
5572   (exit $ac_status); } &&
5573          { ac_try='test -s conftest.$ac_objext'
5574   { (eval echo "$as_me:5574: \"$ac_try\"") >&5
5575   (eval $ac_try) 2>&5
5576   ac_status=$?
5577   echo "$as_me:5577: \$? = $ac_status" >&5
5578   (exit $ac_status); }; }; then
5579   cf_cv_ncurses_h2=$cf_header
5580
5581 else
5582   echo "$as_me: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5584 cf_cv_ncurses_h2=no
5585 fi
5586 rm -f conftest.$ac_objext conftest.$ac_ext
5587
5588                         if test "$cf_cv_ncurses_h2" != no ; then
5589                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5590                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
5591                                 break
5592                         fi
5593                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
5594                 done
5595                 CPPFLAGS="$cf_save2_CPPFLAGS"
5596                 test "$cf_cv_ncurses_h2" != no && break
5597         done
5598         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5598: error: not found" >&5
5599 echo "$as_me: error: not found" >&2;}
5600    { (exit 1); exit 1; }; }
5601
5602 fi
5603 echo "$as_me:5603: result: $cf_cv_ncurses_h2" >&5
5604 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5605
5606         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5607         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5608         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5609                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5610         fi
5611
5612 if test -n "$cf_1st_incdir" ; then
5613   for cf_add_incdir in $cf_1st_incdir
5614   do
5615         while test $cf_add_incdir != /usr/include
5616         do
5617           if test -d $cf_add_incdir
5618           then
5619                 cf_have_incdir=no
5620                 if test -n "$CFLAGS$CPPFLAGS" ; then
5621                   # a loop is needed to ensure we can add subdirs of existing dirs
5622                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5623                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5624                           cf_have_incdir=yes; break
5625                         fi
5626                   done
5627                 fi
5628
5629                 if test "$cf_have_incdir" = no ; then
5630                   if test "$cf_add_incdir" = /usr/local/include ; then
5631                         if test "$GCC" = yes
5632                         then
5633                           cf_save_CPPFLAGS=$CPPFLAGS
5634                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5635                           cat >conftest.$ac_ext <<_ACEOF
5636 #line 5636 "configure"
5637 #include "confdefs.h"
5638 #include <stdio.h>
5639 int
5640 main ()
5641 {
5642 printf("Hello")
5643   ;
5644   return 0;
5645 }
5646 _ACEOF
5647 rm -f conftest.$ac_objext
5648 if { (eval echo "$as_me:5648: \"$ac_compile\"") >&5
5649   (eval $ac_compile) 2>&5
5650   ac_status=$?
5651   echo "$as_me:5651: \$? = $ac_status" >&5
5652   (exit $ac_status); } &&
5653          { ac_try='test -s conftest.$ac_objext'
5654   { (eval echo "$as_me:5654: \"$ac_try\"") >&5
5655   (eval $ac_try) 2>&5
5656   ac_status=$?
5657   echo "$as_me:5657: \$? = $ac_status" >&5
5658   (exit $ac_status); }; }; then
5659   :
5660 else
5661   echo "$as_me: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5663 cf_have_incdir=yes
5664 fi
5665 rm -f conftest.$ac_objext conftest.$ac_ext
5666                           CPPFLAGS=$cf_save_CPPFLAGS
5667                         fi
5668                   fi
5669                 fi
5670
5671                 if test "$cf_have_incdir" = no ; then
5672                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5673
5674 echo "${as_me:-configure}:5674: testing adding $cf_add_incdir to include-path ..." 1>&5
5675
5676                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5677
5678                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5679                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5680                   cf_add_incdir="$cf_top_incdir"
5681                 else
5682                   break
5683                 fi
5684           fi
5685         done
5686   done
5687 fi
5688
5689 fi
5690
5691 # Set definitions to allow ifdef'ing for ncurses.h
5692
5693 case $cf_cv_ncurses_header in # (vi
5694 *ncurses.h)
5695         cat >>confdefs.h <<\EOF
5696 #define HAVE_NCURSES_H 1
5697 EOF
5698
5699         ;;
5700 esac
5701
5702 case $cf_cv_ncurses_header in # (vi
5703 ncurses/curses.h|ncurses/ncurses.h)
5704         cat >>confdefs.h <<\EOF
5705 #define HAVE_NCURSES_NCURSES_H 1
5706 EOF
5707
5708         ;;
5709 ncursesw/curses.h|ncursesw/ncurses.h)
5710         cat >>confdefs.h <<\EOF
5711 #define HAVE_NCURSESW_NCURSES_H 1
5712 EOF
5713
5714         ;;
5715 esac
5716
5717 echo "$as_me:5717: checking for terminfo header" >&5
5718 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5719 if test "${cf_cv_term_header+set}" = set; then
5720   echo $ECHO_N "(cached) $ECHO_C" >&6
5721 else
5722
5723 case ${cf_cv_ncurses_header} in #(vi
5724 */ncurses.h|*/ncursesw.h) #(vi
5725         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5726         ;;
5727 *)
5728         cf_term_header=term.h
5729         ;;
5730 esac
5731
5732 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5733 do
5734 cat >conftest.$ac_ext <<_ACEOF
5735 #line 5735 "configure"
5736 #include "confdefs.h"
5737 #include <stdio.h>
5738 #include <${cf_cv_ncurses_header:-curses.h}>
5739 #include <$cf_test>
5740
5741 int
5742 main ()
5743 {
5744 int x = auto_left_margin
5745   ;
5746   return 0;
5747 }
5748 _ACEOF
5749 rm -f conftest.$ac_objext
5750 if { (eval echo "$as_me:5750: \"$ac_compile\"") >&5
5751   (eval $ac_compile) 2>&5
5752   ac_status=$?
5753   echo "$as_me:5753: \$? = $ac_status" >&5
5754   (exit $ac_status); } &&
5755          { ac_try='test -s conftest.$ac_objext'
5756   { (eval echo "$as_me:5756: \"$ac_try\"") >&5
5757   (eval $ac_try) 2>&5
5758   ac_status=$?
5759   echo "$as_me:5759: \$? = $ac_status" >&5
5760   (exit $ac_status); }; }; then
5761
5762         cf_cv_term_header="$cf_test"
5763 else
5764   echo "$as_me: failed program was:" >&5
5765 cat conftest.$ac_ext >&5
5766
5767         cf_cv_term_header=unknown
5768
5769 fi
5770 rm -f conftest.$ac_objext conftest.$ac_ext
5771         test "$cf_cv_term_header" != unknown && break
5772 done
5773
5774 fi
5775 echo "$as_me:5775: result: $cf_cv_term_header" >&5
5776 echo "${ECHO_T}$cf_cv_term_header" >&6
5777
5778 # Set definitions to allow ifdef'ing to accommodate subdirectories
5779
5780 case $cf_cv_term_header in # (vi
5781 *term.h)
5782         cat >>confdefs.h <<\EOF
5783 #define HAVE_TERM_H 1
5784 EOF
5785
5786         ;;
5787 esac
5788
5789 case $cf_cv_term_header in # (vi
5790 ncurses/term.h) #(vi
5791         cat >>confdefs.h <<\EOF
5792 #define HAVE_NCURSES_TERM_H 1
5793 EOF
5794
5795         ;;
5796 ncursesw/term.h)
5797         cat >>confdefs.h <<\EOF
5798 #define HAVE_NCURSESW_TERM_H 1
5799 EOF
5800
5801         ;;
5802 esac
5803
5804 # some applications need this, but should check for NCURSES_VERSION
5805 cat >>confdefs.h <<\EOF
5806 #define NCURSES 1
5807 EOF
5808
5809 echo "$as_me:5809: checking for ncurses version" >&5
5810 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5811 if test "${cf_cv_ncurses_version+set}" = set; then
5812   echo $ECHO_N "(cached) $ECHO_C" >&6
5813 else
5814
5815         cf_cv_ncurses_version=no
5816         cf_tempfile=out$$
5817         rm -f $cf_tempfile
5818         if test "$cross_compiling" = yes; then
5819
5820         # This will not work if the preprocessor splits the line after the
5821         # Autoconf token.  The 'unproto' program does that.
5822         cat > conftest.$ac_ext <<EOF
5823 #include <${cf_cv_ncurses_header:-curses.h}>
5824 #undef Autoconf
5825 #ifdef NCURSES_VERSION
5826 Autoconf NCURSES_VERSION
5827 #else
5828 #ifdef __NCURSES_H
5829 Autoconf "old"
5830 #endif
5831 ;
5832 #endif
5833 EOF
5834         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5835         { (eval echo "$as_me:5835: \"$cf_try\"") >&5
5836   (eval $cf_try) 2>&5
5837   ac_status=$?
5838   echo "$as_me:5838: \$? = $ac_status" >&5
5839   (exit $ac_status); }
5840         if test -f conftest.out ; then
5841                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5842                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5843                 rm -f conftest.out
5844         fi
5845
5846 else
5847   cat >conftest.$ac_ext <<_ACEOF
5848 #line 5848 "configure"
5849 #include "confdefs.h"
5850
5851 #include <${cf_cv_ncurses_header:-curses.h}>
5852 #include <stdio.h>
5853 int main()
5854 {
5855         FILE *fp = fopen("$cf_tempfile", "w");
5856 #ifdef NCURSES_VERSION
5857 # ifdef NCURSES_VERSION_PATCH
5858         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5859 # else
5860         fprintf(fp, "%s\n", NCURSES_VERSION);
5861 # endif
5862 #else
5863 # ifdef __NCURSES_H
5864         fprintf(fp, "old\n");
5865 # else
5866         make an error
5867 # endif
5868 #endif
5869         ${cf_cv_main_return:-return}(0);
5870 }
5871 _ACEOF
5872 rm -f conftest$ac_exeext
5873 if { (eval echo "$as_me:5873: \"$ac_link\"") >&5
5874   (eval $ac_link) 2>&5
5875   ac_status=$?
5876   echo "$as_me:5876: \$? = $ac_status" >&5
5877   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5878   { (eval echo "$as_me:5878: \"$ac_try\"") >&5
5879   (eval $ac_try) 2>&5
5880   ac_status=$?
5881   echo "$as_me:5881: \$? = $ac_status" >&5
5882   (exit $ac_status); }; }; then
5883
5884         cf_cv_ncurses_version=`cat $cf_tempfile`
5885 else
5886   echo "$as_me: program exited with status $ac_status" >&5
5887 echo "$as_me: failed program was:" >&5
5888 cat conftest.$ac_ext >&5
5889 fi
5890 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5891 fi
5892         rm -f $cf_tempfile
5893
5894 fi
5895 echo "$as_me:5895: result: $cf_cv_ncurses_version" >&5
5896 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5897 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5898 #define NCURSES 1
5899 EOF
5900
5901 cf_nculib_root=ncurses
5902         # This works, except for the special case where we find gpm, but
5903         # ncurses is in a nonstandard location via $LIBS, and we really want
5904         # to link gpm.
5905 cf_ncurses_LIBS=""
5906 cf_ncurses_SAVE="$LIBS"
5907 echo "$as_me:5907: checking for Gpm_Open in -lgpm" >&5
5908 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5909 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5910   echo $ECHO_N "(cached) $ECHO_C" >&6
5911 else
5912   ac_check_lib_save_LIBS=$LIBS
5913 LIBS="-lgpm  $LIBS"
5914 cat >conftest.$ac_ext <<_ACEOF
5915 #line 5915 "configure"
5916 #include "confdefs.h"
5917
5918 /* Override any gcc2 internal prototype to avoid an error.  */
5919 #ifdef __cplusplus
5920 extern "C"
5921 #endif
5922 /* We use char because int might match the return type of a gcc2
5923    builtin and then its argument prototype would still apply.  */
5924 char Gpm_Open ();
5925 int
5926 main ()
5927 {
5928 Gpm_Open ();
5929   ;
5930   return 0;
5931 }
5932 _ACEOF
5933 rm -f conftest.$ac_objext conftest$ac_exeext
5934 if { (eval echo "$as_me:5934: \"$ac_link\"") >&5
5935   (eval $ac_link) 2>&5
5936   ac_status=$?
5937   echo "$as_me:5937: \$? = $ac_status" >&5
5938   (exit $ac_status); } &&
5939          { ac_try='test -s conftest$ac_exeext'
5940   { (eval echo "$as_me:5940: \"$ac_try\"") >&5
5941   (eval $ac_try) 2>&5
5942   ac_status=$?
5943   echo "$as_me:5943: \$? = $ac_status" >&5
5944   (exit $ac_status); }; }; then
5945   ac_cv_lib_gpm_Gpm_Open=yes
5946 else
5947   echo "$as_me: failed program was:" >&5
5948 cat conftest.$ac_ext >&5
5949 ac_cv_lib_gpm_Gpm_Open=no
5950 fi
5951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5952 LIBS=$ac_check_lib_save_LIBS
5953 fi
5954 echo "$as_me:5954: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5955 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5956 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5957   echo "$as_me:5957: checking for initscr in -lgpm" >&5
5958 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5959 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5960   echo $ECHO_N "(cached) $ECHO_C" >&6
5961 else
5962   ac_check_lib_save_LIBS=$LIBS
5963 LIBS="-lgpm  $LIBS"
5964 cat >conftest.$ac_ext <<_ACEOF
5965 #line 5965 "configure"
5966 #include "confdefs.h"
5967
5968 /* Override any gcc2 internal prototype to avoid an error.  */
5969 #ifdef __cplusplus
5970 extern "C"
5971 #endif
5972 /* We use char because int might match the return type of a gcc2
5973    builtin and then its argument prototype would still apply.  */
5974 char initscr ();
5975 int
5976 main ()
5977 {
5978 initscr ();
5979   ;
5980   return 0;
5981 }
5982 _ACEOF
5983 rm -f conftest.$ac_objext conftest$ac_exeext
5984 if { (eval echo "$as_me:5984: \"$ac_link\"") >&5
5985   (eval $ac_link) 2>&5
5986   ac_status=$?
5987   echo "$as_me:5987: \$? = $ac_status" >&5
5988   (exit $ac_status); } &&
5989          { ac_try='test -s conftest$ac_exeext'
5990   { (eval echo "$as_me:5990: \"$ac_try\"") >&5
5991   (eval $ac_try) 2>&5
5992   ac_status=$?
5993   echo "$as_me:5993: \$? = $ac_status" >&5
5994   (exit $ac_status); }; }; then
5995   ac_cv_lib_gpm_initscr=yes
5996 else
5997   echo "$as_me: failed program was:" >&5
5998 cat conftest.$ac_ext >&5
5999 ac_cv_lib_gpm_initscr=no
6000 fi
6001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6002 LIBS=$ac_check_lib_save_LIBS
6003 fi
6004 echo "$as_me:6004: result: $ac_cv_lib_gpm_initscr" >&5
6005 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6006 if test $ac_cv_lib_gpm_initscr = yes; then
6007   LIBS="$cf_ncurses_SAVE"
6008 else
6009   cf_ncurses_LIBS="-lgpm"
6010 fi
6011
6012 fi
6013
6014 case $host_os in #(vi
6015 freebsd*)
6016         # This is only necessary if you are linking against an obsolete
6017         # version of ncurses (but it should do no harm, since it's static).
6018         if test "$cf_nculib_root" = ncurses ; then
6019                 echo "$as_me:6019: checking for tgoto in -lmytinfo" >&5
6020 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6021 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6022   echo $ECHO_N "(cached) $ECHO_C" >&6
6023 else
6024   ac_check_lib_save_LIBS=$LIBS
6025 LIBS="-lmytinfo  $LIBS"
6026 cat >conftest.$ac_ext <<_ACEOF
6027 #line 6027 "configure"
6028 #include "confdefs.h"
6029
6030 /* Override any gcc2 internal prototype to avoid an error.  */
6031 #ifdef __cplusplus
6032 extern "C"
6033 #endif
6034 /* We use char because int might match the return type of a gcc2
6035    builtin and then its argument prototype would still apply.  */
6036 char tgoto ();
6037 int
6038 main ()
6039 {
6040 tgoto ();
6041   ;
6042   return 0;
6043 }
6044 _ACEOF
6045 rm -f conftest.$ac_objext conftest$ac_exeext
6046 if { (eval echo "$as_me:6046: \"$ac_link\"") >&5
6047   (eval $ac_link) 2>&5
6048   ac_status=$?
6049   echo "$as_me:6049: \$? = $ac_status" >&5
6050   (exit $ac_status); } &&
6051          { ac_try='test -s conftest$ac_exeext'
6052   { (eval echo "$as_me:6052: \"$ac_try\"") >&5
6053   (eval $ac_try) 2>&5
6054   ac_status=$?
6055   echo "$as_me:6055: \$? = $ac_status" >&5
6056   (exit $ac_status); }; }; then
6057   ac_cv_lib_mytinfo_tgoto=yes
6058 else
6059   echo "$as_me: failed program was:" >&5
6060 cat conftest.$ac_ext >&5
6061 ac_cv_lib_mytinfo_tgoto=no
6062 fi
6063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6064 LIBS=$ac_check_lib_save_LIBS
6065 fi
6066 echo "$as_me:6066: result: $ac_cv_lib_mytinfo_tgoto" >&5
6067 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6068 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6069   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6070 fi
6071
6072         fi
6073         ;;
6074 esac
6075
6076 LIBS="$cf_ncurses_LIBS $LIBS"
6077
6078 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6079 then
6080
6081 if test -n "$cf_cv_curses_dir/lib" ; then
6082   for cf_add_libdir in $cf_cv_curses_dir/lib
6083   do
6084     if test $cf_add_libdir = /usr/lib ; then
6085       :
6086     elif test -d $cf_add_libdir
6087     then
6088       cf_have_libdir=no
6089       if test -n "$LDFLAGS$LIBS" ; then
6090         # a loop is needed to ensure we can add subdirs of existing dirs
6091         for cf_test_libdir in $LDFLAGS $LIBS ; do
6092           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6093             cf_have_libdir=yes; break
6094           fi
6095         done
6096       fi
6097       if test "$cf_have_libdir" = no ; then
6098         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6099
6100 echo "${as_me:-configure}:6100: testing adding $cf_add_libdir to library-path ..." 1>&5
6101
6102         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6103       fi
6104     fi
6105   done
6106 fi
6107
6108         LIBS="-l$cf_nculib_root $LIBS"
6109 else
6110
6111         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6112         cf_libdir=""
6113         echo "$as_me:6113: checking for initscr" >&5
6114 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6115 if test "${ac_cv_func_initscr+set}" = set; then
6116   echo $ECHO_N "(cached) $ECHO_C" >&6
6117 else
6118   cat >conftest.$ac_ext <<_ACEOF
6119 #line 6119 "configure"
6120 #include "confdefs.h"
6121 /* System header to define __stub macros and hopefully few prototypes,
6122     which can conflict with char initscr (); below.  */
6123 #include <assert.h>
6124 /* Override any gcc2 internal prototype to avoid an error.  */
6125 #ifdef __cplusplus
6126 extern "C"
6127 #endif
6128 /* We use char because int might match the return type of a gcc2
6129    builtin and then its argument prototype would still apply.  */
6130 char initscr ();
6131 char (*f) ();
6132
6133 int
6134 main ()
6135 {
6136 /* The GNU C library defines this for functions which it implements
6137     to always fail with ENOSYS.  Some functions are actually named
6138     something starting with __ and the normal name is an alias.  */
6139 #if defined (__stub_initscr) || defined (__stub___initscr)
6140 choke me
6141 #else
6142 f = initscr;
6143 #endif
6144
6145   ;
6146   return 0;
6147 }
6148 _ACEOF
6149 rm -f conftest.$ac_objext conftest$ac_exeext
6150 if { (eval echo "$as_me:6150: \"$ac_link\"") >&5
6151   (eval $ac_link) 2>&5
6152   ac_status=$?
6153   echo "$as_me:6153: \$? = $ac_status" >&5
6154   (exit $ac_status); } &&
6155          { ac_try='test -s conftest$ac_exeext'
6156   { (eval echo "$as_me:6156: \"$ac_try\"") >&5
6157   (eval $ac_try) 2>&5
6158   ac_status=$?
6159   echo "$as_me:6159: \$? = $ac_status" >&5
6160   (exit $ac_status); }; }; then
6161   ac_cv_func_initscr=yes
6162 else
6163   echo "$as_me: failed program was:" >&5
6164 cat conftest.$ac_ext >&5
6165 ac_cv_func_initscr=no
6166 fi
6167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6168 fi
6169 echo "$as_me:6169: result: $ac_cv_func_initscr" >&5
6170 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6171 if test $ac_cv_func_initscr = yes; then
6172   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6173 else
6174
6175                 cf_save_LIBS="$LIBS"
6176                 echo "$as_me:6176: checking for initscr in -l$cf_nculib_root" >&5
6177 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6178                 LIBS="-l$cf_nculib_root $LIBS"
6179                 cat >conftest.$ac_ext <<_ACEOF
6180 #line 6180 "configure"
6181 #include "confdefs.h"
6182 #include <${cf_cv_ncurses_header:-curses.h}>
6183 int
6184 main ()
6185 {
6186 initscr()
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -f conftest.$ac_objext conftest$ac_exeext
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193   (eval $ac_link) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit $ac_status); } &&
6197          { ac_try='test -s conftest$ac_exeext'
6198   { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199   (eval $ac_try) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit $ac_status); }; }; then
6203   echo "$as_me:6203: result: yes" >&5
6204 echo "${ECHO_T}yes" >&6
6205                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6206
6207 else
6208   echo "$as_me: failed program was:" >&5
6209 cat conftest.$ac_ext >&5
6210 echo "$as_me:6210: result: no" >&5
6211 echo "${ECHO_T}no" >&6
6212
6213 cf_search=
6214 cf_library_path_list=""
6215 if test -n "${LDFLAGS}${LIBS}" ; then
6216         for cf_library_path in $LDFLAGS $LIBS
6217         do
6218                 case $cf_library_path in #(vi
6219                 -L*)
6220                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6221
6222 test "$cf_library_path" != "NONE" && \
6223 test -d "$cf_library_path" && \
6224  {
6225         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6226         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6227         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6228         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6229         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6230         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"
6231 }
6232
6233                         cf_library_path_list="$cf_library_path_list $cf_search"
6234                         ;;
6235                 esac
6236         done
6237 fi
6238
6239 cf_search=
6240
6241 test "/usr" != "$prefix" && \
6242 test -d "/usr" && \
6243 (test $prefix = NONE || test "/usr" != "$prefix") && {
6244         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6245         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6246         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6247         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6248         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6249         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6250 }
6251
6252 test "$prefix" != "NONE" && \
6253 test -d "$prefix" && \
6254  {
6255         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6256         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6257         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6258         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6259         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6260         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6261 }
6262
6263 test "/usr/local" != "$prefix" && \
6264 test -d "/usr/local" && \
6265 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6266         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6267         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6268         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6269         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6270         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6271         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6272 }
6273
6274 test "/opt" != "$prefix" && \
6275 test -d "/opt" && \
6276 (test $prefix = NONE || test "/opt" != "$prefix") && {
6277         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6278         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6279         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6280         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6281         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
6282         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6283 }
6284
6285 test "$HOME" != "$prefix" && \
6286 test -d "$HOME" && \
6287 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6288         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6289         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6290         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6291         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6292         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6293         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6294 }
6295
6296 cf_search="$cf_library_path_list $cf_search"
6297
6298                         for cf_libdir in $cf_search
6299                         do
6300                                 echo "$as_me:6300: checking for -l$cf_nculib_root in $cf_libdir" >&5
6301 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6302                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6303                                 cat >conftest.$ac_ext <<_ACEOF
6304 #line 6304 "configure"
6305 #include "confdefs.h"
6306 #include <${cf_cv_ncurses_header:-curses.h}>
6307 int
6308 main ()
6309 {
6310 initscr()
6311   ;
6312   return 0;
6313 }
6314 _ACEOF
6315 rm -f conftest.$ac_objext conftest$ac_exeext
6316 if { (eval echo "$as_me:6316: \"$ac_link\"") >&5
6317   (eval $ac_link) 2>&5
6318   ac_status=$?
6319   echo "$as_me:6319: \$? = $ac_status" >&5
6320   (exit $ac_status); } &&
6321          { ac_try='test -s conftest$ac_exeext'
6322   { (eval echo "$as_me:6322: \"$ac_try\"") >&5
6323   (eval $ac_try) 2>&5
6324   ac_status=$?
6325   echo "$as_me:6325: \$? = $ac_status" >&5
6326   (exit $ac_status); }; }; then
6327   echo "$as_me:6327: result: yes" >&5
6328 echo "${ECHO_T}yes" >&6
6329                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6330                                          break
6331 else
6332   echo "$as_me: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6334 echo "$as_me:6334: result: no" >&5
6335 echo "${ECHO_T}no" >&6
6336                                          LIBS="$cf_save_LIBS"
6337 fi
6338 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6339                         done
6340
6341 fi
6342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6343
6344 fi
6345
6346 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6347
6348 if test $cf_found_library = no ; then
6349         { { echo "$as_me:6349: error: Cannot link $cf_nculib_root library" >&5
6350 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6351    { (exit 1); exit 1; }; }
6352 fi
6353
6354 fi
6355
6356 if test -n "$cf_ncurses_LIBS" ; then
6357         echo "$as_me:6357: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6358 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6359         cf_ncurses_SAVE="$LIBS"
6360         for p in $cf_ncurses_LIBS ; do
6361                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6362                 if test "$q" != "$LIBS" ; then
6363                         LIBS="$q"
6364                 fi
6365         done
6366         cat >conftest.$ac_ext <<_ACEOF
6367 #line 6367 "configure"
6368 #include "confdefs.h"
6369 #include <${cf_cv_ncurses_header:-curses.h}>
6370 int
6371 main ()
6372 {
6373 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6374   ;
6375   return 0;
6376 }
6377 _ACEOF
6378 rm -f conftest.$ac_objext conftest$ac_exeext
6379 if { (eval echo "$as_me:6379: \"$ac_link\"") >&5
6380   (eval $ac_link) 2>&5
6381   ac_status=$?
6382   echo "$as_me:6382: \$? = $ac_status" >&5
6383   (exit $ac_status); } &&
6384          { ac_try='test -s conftest$ac_exeext'
6385   { (eval echo "$as_me:6385: \"$ac_try\"") >&5
6386   (eval $ac_try) 2>&5
6387   ac_status=$?
6388   echo "$as_me:6388: \$? = $ac_status" >&5
6389   (exit $ac_status); }; }; then
6390   echo "$as_me:6390: result: yes" >&5
6391 echo "${ECHO_T}yes" >&6
6392 else
6393   echo "$as_me: failed program was:" >&5
6394 cat conftest.$ac_ext >&5
6395 echo "$as_me:6395: result: no" >&5
6396 echo "${ECHO_T}no" >&6
6397                  LIBS="$cf_ncurses_SAVE"
6398 fi
6399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6400 fi
6401
6402 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6403
6404 cat >>confdefs.h <<EOF
6405 #define $cf_nculib_ROOT 1
6406 EOF
6407
6408 fi
6409
6410         ;;
6411 ncursesw)
6412         cf_cv_libtype=w
6413
6414 echo "$as_me:6414: checking for multibyte character support" >&5
6415 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6416 if test "${cf_cv_utf8_lib+set}" = set; then
6417   echo $ECHO_N "(cached) $ECHO_C" >&6
6418 else
6419
6420         cf_save_LIBS="$LIBS"
6421         cat >conftest.$ac_ext <<_ACEOF
6422 #line 6422 "configure"
6423 #include "confdefs.h"
6424
6425 #include <stdlib.h>
6426 int
6427 main ()
6428 {
6429 putwc(0,0);
6430   ;
6431   return 0;
6432 }
6433 _ACEOF
6434 rm -f conftest.$ac_objext conftest$ac_exeext
6435 if { (eval echo "$as_me:6435: \"$ac_link\"") >&5
6436   (eval $ac_link) 2>&5
6437   ac_status=$?
6438   echo "$as_me:6438: \$? = $ac_status" >&5
6439   (exit $ac_status); } &&
6440          { ac_try='test -s conftest$ac_exeext'
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_utf8_lib=yes
6447 else
6448   echo "$as_me: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6450
6451 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6452 # will be set on completion of the AC_TRY_LINK below.
6453 cf_cv_header_path_utf8=
6454 cf_cv_library_path_utf8=
6455
6456 echo "${as_me:-configure}:6456: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6457
6458 cf_save_LIBS="$LIBS"
6459
6460 cat >conftest.$ac_ext <<_ACEOF
6461 #line 6461 "configure"
6462 #include "confdefs.h"
6463
6464 #include <libutf8.h>
6465 int
6466 main ()
6467 {
6468 putwc(0,0);
6469   ;
6470   return 0;
6471 }
6472 _ACEOF
6473 rm -f conftest.$ac_objext conftest$ac_exeext
6474 if { (eval echo "$as_me:6474: \"$ac_link\"") >&5
6475   (eval $ac_link) 2>&5
6476   ac_status=$?
6477   echo "$as_me:6477: \$? = $ac_status" >&5
6478   (exit $ac_status); } &&
6479          { ac_try='test -s conftest$ac_exeext'
6480   { (eval echo "$as_me:6480: \"$ac_try\"") >&5
6481   (eval $ac_try) 2>&5
6482   ac_status=$?
6483   echo "$as_me:6483: \$? = $ac_status" >&5
6484   (exit $ac_status); }; }; then
6485
6486         cf_cv_find_linkage_utf8=yes
6487         cf_cv_header_path_utf8=/usr/include
6488         cf_cv_library_path_utf8=/usr/lib
6489
6490 else
6491   echo "$as_me: failed program was:" >&5
6492 cat conftest.$ac_ext >&5
6493
6494 LIBS="-lutf8  $cf_save_LIBS"
6495
6496 cat >conftest.$ac_ext <<_ACEOF
6497 #line 6497 "configure"
6498 #include "confdefs.h"
6499
6500 #include <libutf8.h>
6501 int
6502 main ()
6503 {
6504 putwc(0,0);
6505   ;
6506   return 0;
6507 }
6508 _ACEOF
6509 rm -f conftest.$ac_objext conftest$ac_exeext
6510 if { (eval echo "$as_me:6510: \"$ac_link\"") >&5
6511   (eval $ac_link) 2>&5
6512   ac_status=$?
6513   echo "$as_me:6513: \$? = $ac_status" >&5
6514   (exit $ac_status); } &&
6515          { ac_try='test -s conftest$ac_exeext'
6516   { (eval echo "$as_me:6516: \"$ac_try\"") >&5
6517   (eval $ac_try) 2>&5
6518   ac_status=$?
6519   echo "$as_me:6519: \$? = $ac_status" >&5
6520   (exit $ac_status); }; }; then
6521
6522         cf_cv_find_linkage_utf8=yes
6523         cf_cv_header_path_utf8=/usr/include
6524         cf_cv_library_path_utf8=/usr/lib
6525         cf_cv_library_file_utf8="-lutf8"
6526
6527 else
6528   echo "$as_me: failed program was:" >&5
6529 cat conftest.$ac_ext >&5
6530
6531         cf_cv_find_linkage_utf8=no
6532         LIBS="$cf_save_LIBS"
6533
6534     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
6535
6536 echo "${as_me:-configure}:6536: testing find linkage for utf8 library ..." 1>&5
6537
6538 echo "${as_me:-configure}:6538: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6539
6540     cf_save_CPPFLAGS="$CPPFLAGS"
6541     cf_test_CPPFLAGS="$CPPFLAGS"
6542
6543 cf_search=
6544
6545 # collect the current set of include-directories from compiler flags
6546 cf_header_path_list=""
6547 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6548         for cf_header_path in $CPPFLAGS $CFLAGS
6549         do
6550                 case $cf_header_path in #(vi
6551                 -I*)
6552                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6553
6554 test "$cf_header_path" != "NONE" && \
6555 test -d "$cf_header_path" && \
6556  {
6557         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6558         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6559         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
6560         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
6561         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
6562         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6563 }
6564
6565                         cf_header_path_list="$cf_header_path_list $cf_search"
6566                         ;;
6567                 esac
6568         done
6569 fi
6570
6571 # add the variations for the package we are looking for
6572
6573 cf_search=
6574
6575 test "/usr" != "$prefix" && \
6576 test -d "/usr" && \
6577 (test $prefix = NONE || test "/usr" != "$prefix") && {
6578         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6579         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6580         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
6581         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
6582         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
6583         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
6584 }
6585
6586 test "$prefix" != "NONE" && \
6587 test -d "$prefix" && \
6588  {
6589         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6590         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6591         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
6592         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
6593         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
6594         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
6595 }
6596
6597 test "/usr/local" != "$prefix" && \
6598 test -d "/usr/local" && \
6599 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6600         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6601         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6602         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
6603         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
6604         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
6605         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
6606 }
6607
6608 test "/opt" != "$prefix" && \
6609 test -d "/opt" && \
6610 (test $prefix = NONE || test "/opt" != "$prefix") && {
6611         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6612         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6613         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
6614         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
6615         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
6616         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
6617 }
6618
6619 test "$HOME" != "$prefix" && \
6620 test -d "$HOME" && \
6621 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6622         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6623         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6624         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
6625         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
6626         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
6627         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
6628 }
6629
6630 test "$includedir" != NONE && \
6631 test "$includedir" != "/usr/include" && \
6632 test -d "$includedir" && {
6633         test -d $includedir &&    cf_search="$cf_search $includedir"
6634         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6635 }
6636
6637 test "$oldincludedir" != NONE && \
6638 test "$oldincludedir" != "/usr/include" && \
6639 test -d "$oldincludedir" && {
6640         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6641         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6642 }
6643
6644 cf_search="$cf_search $cf_header_path_list"
6645
6646     for cf_cv_header_path_utf8 in $cf_search
6647     do
6648       if test -d $cf_cv_header_path_utf8 ; then
6649         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
6650
6651 echo "${as_me:-configure}:6651: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6652
6653         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
6654         cat >conftest.$ac_ext <<_ACEOF
6655 #line 6655 "configure"
6656 #include "confdefs.h"
6657
6658 #include <libutf8.h>
6659 int
6660 main ()
6661 {
6662 putwc(0,0);
6663   ;
6664   return 0;
6665 }
6666 _ACEOF
6667 rm -f conftest.$ac_objext
6668 if { (eval echo "$as_me:6668: \"$ac_compile\"") >&5
6669   (eval $ac_compile) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit $ac_status); } &&
6673          { ac_try='test -s conftest.$ac_objext'
6674   { (eval echo "$as_me:6674: \"$ac_try\"") >&5
6675   (eval $ac_try) 2>&5
6676   ac_status=$?
6677   echo "$as_me:6677: \$? = $ac_status" >&5
6678   (exit $ac_status); }; }; then
6679
6680             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6681
6682 echo "${as_me:-configure}:6682: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6683
6684             cf_cv_find_linkage_utf8=maybe
6685             cf_test_CPPFLAGS="$CPPFLAGS"
6686             break
6687 else
6688   echo "$as_me: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6690
6691             CPPFLAGS="$cf_save_CPPFLAGS"
6692
6693 fi
6694 rm -f conftest.$ac_objext conftest.$ac_ext
6695       fi
6696     done
6697
6698     if test "$cf_cv_find_linkage_utf8" = maybe ; then
6699
6700 echo "${as_me:-configure}:6700: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6701
6702       cf_save_LIBS="$LIBS"
6703       cf_save_LDFLAGS="$LDFLAGS"
6704
6705       if test "$cf_cv_find_linkage_utf8" != yes ; then
6706
6707 cf_search=
6708 cf_library_path_list=""
6709 if test -n "${LDFLAGS}${LIBS}" ; then
6710         for cf_library_path in $LDFLAGS $LIBS
6711         do
6712                 case $cf_library_path in #(vi
6713                 -L*)
6714                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6715
6716 test "$cf_library_path" != "NONE" && \
6717 test -d "$cf_library_path" && \
6718  {
6719         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6720         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6721         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
6722         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6723         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
6724         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6725 }
6726
6727                         cf_library_path_list="$cf_library_path_list $cf_search"
6728                         ;;
6729                 esac
6730         done
6731 fi
6732
6733 cf_search=
6734
6735 test "/usr" != "$prefix" && \
6736 test -d "/usr" && \
6737 (test $prefix = NONE || test "/usr" != "$prefix") && {
6738         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6739         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6740         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
6741         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
6742         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
6743         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
6744 }
6745
6746 test "$prefix" != "NONE" && \
6747 test -d "$prefix" && \
6748  {
6749         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6750         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6751         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
6752         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
6753         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
6754         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
6755 }
6756
6757 test "/usr/local" != "$prefix" && \
6758 test -d "/usr/local" && \
6759 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6760         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6761         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6762         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
6763         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
6764         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
6765         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
6766 }
6767
6768 test "/opt" != "$prefix" && \
6769 test -d "/opt" && \
6770 (test $prefix = NONE || test "/opt" != "$prefix") && {
6771         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6772         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6773         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
6774         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
6775         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
6776         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
6777 }
6778
6779 test "$HOME" != "$prefix" && \
6780 test -d "$HOME" && \
6781 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6782         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6783         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6784         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
6785         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
6786         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
6787         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
6788 }
6789
6790 cf_search="$cf_library_path_list $cf_search"
6791
6792         for cf_cv_library_path_utf8 in $cf_search
6793         do
6794           if test -d $cf_cv_library_path_utf8 ; then
6795             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
6796
6797 echo "${as_me:-configure}:6797: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6798
6799             CPPFLAGS="$cf_test_CPPFLAGS"
6800             LIBS="-lutf8  $cf_save_LIBS"
6801             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6802             cat >conftest.$ac_ext <<_ACEOF
6803 #line 6803 "configure"
6804 #include "confdefs.h"
6805
6806 #include <libutf8.h>
6807 int
6808 main ()
6809 {
6810 putwc(0,0);
6811   ;
6812   return 0;
6813 }
6814 _ACEOF
6815 rm -f conftest.$ac_objext conftest$ac_exeext
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817   (eval $ac_link) 2>&5
6818   ac_status=$?
6819   echo "$as_me:6819: \$? = $ac_status" >&5
6820   (exit $ac_status); } &&
6821          { ac_try='test -s conftest$ac_exeext'
6822   { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6823   (eval $ac_try) 2>&5
6824   ac_status=$?
6825   echo "$as_me:6825: \$? = $ac_status" >&5
6826   (exit $ac_status); }; }; then
6827
6828                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6829
6830 echo "${as_me:-configure}:6830: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6831
6832                 cf_cv_find_linkage_utf8=yes
6833                 cf_cv_library_file_utf8="-lutf8"
6834                 break
6835 else
6836   echo "$as_me: failed program was:" >&5
6837 cat conftest.$ac_ext >&5
6838
6839                 CPPFLAGS="$cf_save_CPPFLAGS"
6840                 LIBS="$cf_save_LIBS"
6841                 LDFLAGS="$cf_save_LDFLAGS"
6842
6843 fi
6844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6845           fi
6846         done
6847         CPPFLAGS="$cf_save_CPPFLAGS"
6848         LDFLAGS="$cf_save_LDFLAGS"
6849       fi
6850
6851     else
6852       cf_cv_find_linkage_utf8=no
6853     fi
6854
6855 fi
6856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6857
6858 fi
6859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6860
6861 LIBS="$cf_save_LIBS"
6862
6863 if test "$cf_cv_find_linkage_utf8" = yes ; then
6864 cf_cv_utf8_lib=add-on
6865 else
6866 cf_cv_utf8_lib=no
6867 fi
6868
6869 fi
6870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6871 fi
6872 echo "$as_me:6872: result: $cf_cv_utf8_lib" >&5
6873 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6874
6875 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6876 # ncurses/ncursesw:
6877 if test "$cf_cv_utf8_lib" = "add-on" ; then
6878         cat >>confdefs.h <<\EOF
6879 #define HAVE_LIBUTF8_H 1
6880 EOF
6881
6882 if test -n "$cf_cv_header_path_utf8" ; then
6883   for cf_add_incdir in $cf_cv_header_path_utf8
6884   do
6885         while test $cf_add_incdir != /usr/include
6886         do
6887           if test -d $cf_add_incdir
6888           then
6889                 cf_have_incdir=no
6890                 if test -n "$CFLAGS$CPPFLAGS" ; then
6891                   # a loop is needed to ensure we can add subdirs of existing dirs
6892                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6893                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6894                           cf_have_incdir=yes; break
6895                         fi
6896                   done
6897                 fi
6898
6899                 if test "$cf_have_incdir" = no ; then
6900                   if test "$cf_add_incdir" = /usr/local/include ; then
6901                         if test "$GCC" = yes
6902                         then
6903                           cf_save_CPPFLAGS=$CPPFLAGS
6904                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6905                           cat >conftest.$ac_ext <<_ACEOF
6906 #line 6906 "configure"
6907 #include "confdefs.h"
6908 #include <stdio.h>
6909 int
6910 main ()
6911 {
6912 printf("Hello")
6913   ;
6914   return 0;
6915 }
6916 _ACEOF
6917 rm -f conftest.$ac_objext
6918 if { (eval echo "$as_me:6918: \"$ac_compile\"") >&5
6919   (eval $ac_compile) 2>&5
6920   ac_status=$?
6921   echo "$as_me:6921: \$? = $ac_status" >&5
6922   (exit $ac_status); } &&
6923          { ac_try='test -s conftest.$ac_objext'
6924   { (eval echo "$as_me:6924: \"$ac_try\"") >&5
6925   (eval $ac_try) 2>&5
6926   ac_status=$?
6927   echo "$as_me:6927: \$? = $ac_status" >&5
6928   (exit $ac_status); }; }; then
6929   :
6930 else
6931   echo "$as_me: failed program was:" >&5
6932 cat conftest.$ac_ext >&5
6933 cf_have_incdir=yes
6934 fi
6935 rm -f conftest.$ac_objext conftest.$ac_ext
6936                           CPPFLAGS=$cf_save_CPPFLAGS
6937                         fi
6938                   fi
6939                 fi
6940
6941                 if test "$cf_have_incdir" = no ; then
6942                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6943
6944 echo "${as_me:-configure}:6944: testing adding $cf_add_incdir to include-path ..." 1>&5
6945
6946                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6947
6948                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6949                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6950                   cf_add_incdir="$cf_top_incdir"
6951                 else
6952                   break
6953                 fi
6954           fi
6955         done
6956   done
6957 fi
6958
6959 if test -n "$cf_cv_library_path_utf8" ; then
6960   for cf_add_libdir in $cf_cv_library_path_utf8
6961   do
6962     if test $cf_add_libdir = /usr/lib ; then
6963       :
6964     elif test -d $cf_add_libdir
6965     then
6966       cf_have_libdir=no
6967       if test -n "$LDFLAGS$LIBS" ; then
6968         # a loop is needed to ensure we can add subdirs of existing dirs
6969         for cf_test_libdir in $LDFLAGS $LIBS ; do
6970           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6971             cf_have_libdir=yes; break
6972           fi
6973         done
6974       fi
6975       if test "$cf_have_libdir" = no ; then
6976         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6977
6978 echo "${as_me:-configure}:6978: testing adding $cf_add_libdir to library-path ..." 1>&5
6979
6980         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6981       fi
6982     fi
6983   done
6984 fi
6985
6986         LIBS="$cf_cv_library_file_utf8 $LIBS"
6987 fi
6988
6989 cf_ncuconfig_root=ncursesw
6990
6991 echo "Looking for ${cf_ncuconfig_root}-config"
6992 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6993 do
6994   # Extract the first word of "$ac_prog", so it can be a program name with args.
6995 set dummy $ac_prog; ac_word=$2
6996 echo "$as_me:6996: checking for $ac_word" >&5
6997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6998 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
6999   echo $ECHO_N "(cached) $ECHO_C" >&6
7000 else
7001   case $NCURSES_CONFIG in
7002   [\\/]* | ?:[\\/]*)
7003   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
7004   ;;
7005   *)
7006   ac_save_IFS=$IFS; IFS=$ac_path_separator
7007 ac_dummy="$PATH"
7008 for ac_dir in $ac_dummy; do
7009   IFS=$ac_save_IFS
7010   test -z "$ac_dir" && ac_dir=.
7011   if $as_executable_p "$ac_dir/$ac_word"; then
7012    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
7013    echo "$as_me:7013: found $ac_dir/$ac_word" >&5
7014    break
7015 fi
7016 done
7017
7018   ;;
7019 esac
7020 fi
7021 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
7022
7023 if test -n "$NCURSES_CONFIG"; then
7024   echo "$as_me:7024: result: $NCURSES_CONFIG" >&5
7025 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7026 else
7027   echo "$as_me:7027: result: no" >&5
7028 echo "${ECHO_T}no" >&6
7029 fi
7030
7031   test -n "$NCURSES_CONFIG" && break
7032 done
7033 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
7034
7035 if test "$NCURSES_CONFIG" != none ; then
7036
7037 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7038 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
7039
7040 # even with config script, some packages use no-override for curses.h
7041
7042 echo "$as_me:7042: checking if we have identified curses headers" >&5
7043 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7044 if test "${cf_cv_ncurses_header+set}" = set; then
7045   echo $ECHO_N "(cached) $ECHO_C" >&6
7046 else
7047
7048 cf_cv_ncurses_header=none
7049 for cf_header in  \
7050     ncursesw/curses.h \
7051         ncursesw/ncurses.h \
7052         curses.h \
7053         ncurses.h
7054 do
7055 cat >conftest.$ac_ext <<_ACEOF
7056 #line 7056 "configure"
7057 #include "confdefs.h"
7058 #include <${cf_header}>
7059 int
7060 main ()
7061 {
7062 initscr(); tgoto("?", 0,0)
7063   ;
7064   return 0;
7065 }
7066 _ACEOF
7067 rm -f conftest.$ac_objext
7068 if { (eval echo "$as_me:7068: \"$ac_compile\"") >&5
7069   (eval $ac_compile) 2>&5
7070   ac_status=$?
7071   echo "$as_me:7071: \$? = $ac_status" >&5
7072   (exit $ac_status); } &&
7073          { ac_try='test -s conftest.$ac_objext'
7074   { (eval echo "$as_me:7074: \"$ac_try\"") >&5
7075   (eval $ac_try) 2>&5
7076   ac_status=$?
7077   echo "$as_me:7077: \$? = $ac_status" >&5
7078   (exit $ac_status); }; }; then
7079   cf_cv_ncurses_header=$cf_header; break
7080 else
7081   echo "$as_me: failed program was:" >&5
7082 cat conftest.$ac_ext >&5
7083 fi
7084 rm -f conftest.$ac_objext conftest.$ac_ext
7085 done
7086
7087 fi
7088 echo "$as_me:7088: result: $cf_cv_ncurses_header" >&5
7089 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7090
7091 if test "$cf_cv_ncurses_header" = none ; then
7092         { { echo "$as_me:7092: error: No curses header-files found" >&5
7093 echo "$as_me: error: No curses header-files found" >&2;}
7094    { (exit 1); exit 1; }; }
7095 fi
7096
7097 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7098
7099 for ac_header in $cf_cv_ncurses_header
7100 do
7101 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7102 echo "$as_me:7102: checking for $ac_header" >&5
7103 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7104 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7105   echo $ECHO_N "(cached) $ECHO_C" >&6
7106 else
7107   cat >conftest.$ac_ext <<_ACEOF
7108 #line 7108 "configure"
7109 #include "confdefs.h"
7110 #include <$ac_header>
7111 _ACEOF
7112 if { (eval echo "$as_me:7112: \"$ac_cpp conftest.$ac_ext\"") >&5
7113   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7114   ac_status=$?
7115   egrep -v '^ *\+' conftest.er1 >conftest.err
7116   rm -f conftest.er1
7117   cat conftest.err >&5
7118   echo "$as_me:7118: \$? = $ac_status" >&5
7119   (exit $ac_status); } >/dev/null; then
7120   if test -s conftest.err; then
7121     ac_cpp_err=$ac_c_preproc_warn_flag
7122   else
7123     ac_cpp_err=
7124   fi
7125 else
7126   ac_cpp_err=yes
7127 fi
7128 if test -z "$ac_cpp_err"; then
7129   eval "$as_ac_Header=yes"
7130 else
7131   echo "$as_me: failed program was:" >&5
7132   cat conftest.$ac_ext >&5
7133   eval "$as_ac_Header=no"
7134 fi
7135 rm -f conftest.err conftest.$ac_ext
7136 fi
7137 echo "$as_me:7137: result: `eval echo '${'$as_ac_Header'}'`" >&5
7138 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7139 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7140   cat >>confdefs.h <<EOF
7141 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7142 EOF
7143
7144 fi
7145 done
7146
7147 cat >>confdefs.h <<\EOF
7148 #define NCURSES 1
7149 EOF
7150
7151 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7152
7153 cat >>confdefs.h <<EOF
7154 #define $cf_nculib_ROOT 1
7155 EOF
7156
7157 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7158
7159 else
7160
7161 cf_ncuhdr_root=ncursesw
7162
7163 test -n "$cf_cv_curses_dir" && \
7164 test "$cf_cv_curses_dir" != "no" && { \
7165
7166 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7167   for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
7168   do
7169         while test $cf_add_incdir != /usr/include
7170         do
7171           if test -d $cf_add_incdir
7172           then
7173                 cf_have_incdir=no
7174                 if test -n "$CFLAGS$CPPFLAGS" ; then
7175                   # a loop is needed to ensure we can add subdirs of existing dirs
7176                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7177                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7178                           cf_have_incdir=yes; break
7179                         fi
7180                   done
7181                 fi
7182
7183                 if test "$cf_have_incdir" = no ; then
7184                   if test "$cf_add_incdir" = /usr/local/include ; then
7185                         if test "$GCC" = yes
7186                         then
7187                           cf_save_CPPFLAGS=$CPPFLAGS
7188                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7189                           cat >conftest.$ac_ext <<_ACEOF
7190 #line 7190 "configure"
7191 #include "confdefs.h"
7192 #include <stdio.h>
7193 int
7194 main ()
7195 {
7196 printf("Hello")
7197   ;
7198   return 0;
7199 }
7200 _ACEOF
7201 rm -f conftest.$ac_objext
7202 if { (eval echo "$as_me:7202: \"$ac_compile\"") >&5
7203   (eval $ac_compile) 2>&5
7204   ac_status=$?
7205   echo "$as_me:7205: \$? = $ac_status" >&5
7206   (exit $ac_status); } &&
7207          { ac_try='test -s conftest.$ac_objext'
7208   { (eval echo "$as_me:7208: \"$ac_try\"") >&5
7209   (eval $ac_try) 2>&5
7210   ac_status=$?
7211   echo "$as_me:7211: \$? = $ac_status" >&5
7212   (exit $ac_status); }; }; then
7213   :
7214 else
7215   echo "$as_me: failed program was:" >&5
7216 cat conftest.$ac_ext >&5
7217 cf_have_incdir=yes
7218 fi
7219 rm -f conftest.$ac_objext conftest.$ac_ext
7220                           CPPFLAGS=$cf_save_CPPFLAGS
7221                         fi
7222                   fi
7223                 fi
7224
7225                 if test "$cf_have_incdir" = no ; then
7226                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7227
7228 echo "${as_me:-configure}:7228: testing adding $cf_add_incdir to include-path ..." 1>&5
7229
7230                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7231
7232                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7233                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7234                   cf_add_incdir="$cf_top_incdir"
7235                 else
7236                   break
7237                 fi
7238           fi
7239         done
7240   done
7241 fi
7242
7243 }
7244
7245 echo "$as_me:7245: checking for $cf_ncuhdr_root header in include-path" >&5
7246 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7247 if test "${cf_cv_ncurses_h+set}" = set; then
7248   echo $ECHO_N "(cached) $ECHO_C" >&6
7249 else
7250
7251         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7252         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7253         for cf_header in $cf_header_list
7254         do
7255
7256         cat >conftest.$ac_ext <<_ACEOF
7257 #line 7257 "configure"
7258 #include "confdefs.h"
7259
7260 #define _XOPEN_SOURCE_EXTENDED
7261 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
7262 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
7263
7264 #include <$cf_header>
7265 int
7266 main ()
7267 {
7268
7269 #ifdef NCURSES_VERSION
7270
7271 #ifndef WACS_BSSB
7272         make an error
7273 #endif
7274
7275 printf("%s\n", NCURSES_VERSION);
7276 #else
7277 #ifdef __NCURSES_H
7278 printf("old\n");
7279 #else
7280         make an error
7281 #endif
7282 #endif
7283
7284   ;
7285   return 0;
7286 }
7287 _ACEOF
7288 rm -f conftest.$ac_objext
7289 if { (eval echo "$as_me:7289: \"$ac_compile\"") >&5
7290   (eval $ac_compile) 2>&5
7291   ac_status=$?
7292   echo "$as_me:7292: \$? = $ac_status" >&5
7293   (exit $ac_status); } &&
7294          { ac_try='test -s conftest.$ac_objext'
7295   { (eval echo "$as_me:7295: \"$ac_try\"") >&5
7296   (eval $ac_try) 2>&5
7297   ac_status=$?
7298   echo "$as_me:7298: \$? = $ac_status" >&5
7299   (exit $ac_status); }; }; then
7300   cf_cv_ncurses_h=$cf_header
7301
7302 else
7303   echo "$as_me: failed program was:" >&5
7304 cat conftest.$ac_ext >&5
7305 cf_cv_ncurses_h=no
7306 fi
7307 rm -f conftest.$ac_objext conftest.$ac_ext
7308
7309                 test "$cf_cv_ncurses_h" != no && break
7310         done
7311
7312 fi
7313 echo "$as_me:7313: result: $cf_cv_ncurses_h" >&5
7314 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7315
7316 if test "$cf_cv_ncurses_h" != no ; then
7317         cf_cv_ncurses_header=$cf_cv_ncurses_h
7318 else
7319
7320 echo "$as_me:7320: checking for $cf_ncuhdr_root include-path" >&5
7321 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7322 if test "${cf_cv_ncurses_h2+set}" = set; then
7323   echo $ECHO_N "(cached) $ECHO_C" >&6
7324 else
7325
7326         test -n "$verbose" && echo
7327
7328 cf_search=
7329
7330 # collect the current set of include-directories from compiler flags
7331 cf_header_path_list=""
7332 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7333         for cf_header_path in $CPPFLAGS $CFLAGS
7334         do
7335                 case $cf_header_path in #(vi
7336                 -I*)
7337                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7338
7339 test "$cf_header_path" != "NONE" && \
7340 test -d "$cf_header_path" && \
7341  {
7342         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7343         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7344         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7345         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7346         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7347         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"
7348 }
7349
7350                         cf_header_path_list="$cf_header_path_list $cf_search"
7351                         ;;
7352                 esac
7353         done
7354 fi
7355
7356 # add the variations for the package we are looking for
7357
7358 cf_search=
7359
7360 test "/usr" != "$prefix" && \
7361 test -d "/usr" && \
7362 (test $prefix = NONE || test "/usr" != "$prefix") && {
7363         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7364         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7365         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
7366         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
7367         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
7368         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7369 }
7370
7371 test "$prefix" != "NONE" && \
7372 test -d "$prefix" && \
7373  {
7374         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7375         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7376         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7377         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7378         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7379         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7380 }
7381
7382 test "/usr/local" != "$prefix" && \
7383 test -d "/usr/local" && \
7384 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7385         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7386         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7387         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
7388         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
7389         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
7390         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7391 }
7392
7393 test "/opt" != "$prefix" && \
7394 test -d "/opt" && \
7395 (test $prefix = NONE || test "/opt" != "$prefix") && {
7396         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7397         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7398         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
7399         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
7400         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
7401         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7402 }
7403
7404 test "$HOME" != "$prefix" && \
7405 test -d "$HOME" && \
7406 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7407         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7408         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7409         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
7410         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
7411         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
7412         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7413 }
7414
7415 test "$includedir" != NONE && \
7416 test "$includedir" != "/usr/include" && \
7417 test -d "$includedir" && {
7418         test -d $includedir &&    cf_search="$cf_search $includedir"
7419         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7420 }
7421
7422 test "$oldincludedir" != NONE && \
7423 test "$oldincludedir" != "/usr/include" && \
7424 test -d "$oldincludedir" && {
7425         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7426         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7427 }
7428
7429 cf_search="$cf_search $cf_header_path_list"
7430
7431         test -n "$verbose" && echo search path $cf_search
7432         cf_save2_CPPFLAGS="$CPPFLAGS"
7433         for cf_incdir in $cf_search
7434         do
7435
7436 if test -n "$cf_incdir" ; then
7437   for cf_add_incdir in $cf_incdir
7438   do
7439         while test $cf_add_incdir != /usr/include
7440         do
7441           if test -d $cf_add_incdir
7442           then
7443                 cf_have_incdir=no
7444                 if test -n "$CFLAGS$CPPFLAGS" ; then
7445                   # a loop is needed to ensure we can add subdirs of existing dirs
7446                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7447                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7448                           cf_have_incdir=yes; break
7449                         fi
7450                   done
7451                 fi
7452
7453                 if test "$cf_have_incdir" = no ; then
7454                   if test "$cf_add_incdir" = /usr/local/include ; then
7455                         if test "$GCC" = yes
7456                         then
7457                           cf_save_CPPFLAGS=$CPPFLAGS
7458                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7459                           cat >conftest.$ac_ext <<_ACEOF
7460 #line 7460 "configure"
7461 #include "confdefs.h"
7462 #include <stdio.h>
7463 int
7464 main ()
7465 {
7466 printf("Hello")
7467   ;
7468   return 0;
7469 }
7470 _ACEOF
7471 rm -f conftest.$ac_objext
7472 if { (eval echo "$as_me:7472: \"$ac_compile\"") >&5
7473   (eval $ac_compile) 2>&5
7474   ac_status=$?
7475   echo "$as_me:7475: \$? = $ac_status" >&5
7476   (exit $ac_status); } &&
7477          { ac_try='test -s conftest.$ac_objext'
7478   { (eval echo "$as_me:7478: \"$ac_try\"") >&5
7479   (eval $ac_try) 2>&5
7480   ac_status=$?
7481   echo "$as_me:7481: \$? = $ac_status" >&5
7482   (exit $ac_status); }; }; then
7483   :
7484 else
7485   echo "$as_me: failed program was:" >&5
7486 cat conftest.$ac_ext >&5
7487 cf_have_incdir=yes
7488 fi
7489 rm -f conftest.$ac_objext conftest.$ac_ext
7490                           CPPFLAGS=$cf_save_CPPFLAGS
7491                         fi
7492                   fi
7493                 fi
7494
7495                 if test "$cf_have_incdir" = no ; then
7496                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7497
7498 echo "${as_me:-configure}:7498: testing adding $cf_add_incdir to include-path ..." 1>&5
7499
7500                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7501
7502                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7503                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7504                   cf_add_incdir="$cf_top_incdir"
7505                 else
7506                   break
7507                 fi
7508           fi
7509         done
7510   done
7511 fi
7512
7513                 for cf_header in \
7514                         ncurses.h \
7515                         curses.h
7516                 do
7517
7518         cat >conftest.$ac_ext <<_ACEOF
7519 #line 7519 "configure"
7520 #include "confdefs.h"
7521
7522 #include <$cf_header>
7523 int
7524 main ()
7525 {
7526
7527 #ifdef NCURSES_VERSION
7528
7529 printf("%s\n", NCURSES_VERSION);
7530 #else
7531 #ifdef __NCURSES_H
7532 printf("old\n");
7533 #else
7534         make an error
7535 #endif
7536 #endif
7537
7538   ;
7539   return 0;
7540 }
7541 _ACEOF
7542 rm -f conftest.$ac_objext
7543 if { (eval echo "$as_me:7543: \"$ac_compile\"") >&5
7544   (eval $ac_compile) 2>&5
7545   ac_status=$?
7546   echo "$as_me:7546: \$? = $ac_status" >&5
7547   (exit $ac_status); } &&
7548          { ac_try='test -s conftest.$ac_objext'
7549   { (eval echo "$as_me:7549: \"$ac_try\"") >&5
7550   (eval $ac_try) 2>&5
7551   ac_status=$?
7552   echo "$as_me:7552: \$? = $ac_status" >&5
7553   (exit $ac_status); }; }; then
7554   cf_cv_ncurses_h2=$cf_header
7555
7556 else
7557   echo "$as_me: failed program was:" >&5
7558 cat conftest.$ac_ext >&5
7559 cf_cv_ncurses_h2=no
7560 fi
7561 rm -f conftest.$ac_objext conftest.$ac_ext
7562
7563                         if test "$cf_cv_ncurses_h2" != no ; then
7564                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7565                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
7566                                 break
7567                         fi
7568                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
7569                 done
7570                 CPPFLAGS="$cf_save2_CPPFLAGS"
7571                 test "$cf_cv_ncurses_h2" != no && break
7572         done
7573         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7573: error: not found" >&5
7574 echo "$as_me: error: not found" >&2;}
7575    { (exit 1); exit 1; }; }
7576
7577 fi
7578 echo "$as_me:7578: result: $cf_cv_ncurses_h2" >&5
7579 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7580
7581         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7582         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7583         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7584                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7585         fi
7586
7587 if test -n "$cf_1st_incdir" ; then
7588   for cf_add_incdir in $cf_1st_incdir
7589   do
7590         while test $cf_add_incdir != /usr/include
7591         do
7592           if test -d $cf_add_incdir
7593           then
7594                 cf_have_incdir=no
7595                 if test -n "$CFLAGS$CPPFLAGS" ; then
7596                   # a loop is needed to ensure we can add subdirs of existing dirs
7597                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7598                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7599                           cf_have_incdir=yes; break
7600                         fi
7601                   done
7602                 fi
7603
7604                 if test "$cf_have_incdir" = no ; then
7605                   if test "$cf_add_incdir" = /usr/local/include ; then
7606                         if test "$GCC" = yes
7607                         then
7608                           cf_save_CPPFLAGS=$CPPFLAGS
7609                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7610                           cat >conftest.$ac_ext <<_ACEOF
7611 #line 7611 "configure"
7612 #include "confdefs.h"
7613 #include <stdio.h>
7614 int
7615 main ()
7616 {
7617 printf("Hello")
7618   ;
7619   return 0;
7620 }
7621 _ACEOF
7622 rm -f conftest.$ac_objext
7623 if { (eval echo "$as_me:7623: \"$ac_compile\"") >&5
7624   (eval $ac_compile) 2>&5
7625   ac_status=$?
7626   echo "$as_me:7626: \$? = $ac_status" >&5
7627   (exit $ac_status); } &&
7628          { ac_try='test -s conftest.$ac_objext'
7629   { (eval echo "$as_me:7629: \"$ac_try\"") >&5
7630   (eval $ac_try) 2>&5
7631   ac_status=$?
7632   echo "$as_me:7632: \$? = $ac_status" >&5
7633   (exit $ac_status); }; }; then
7634   :
7635 else
7636   echo "$as_me: failed program was:" >&5
7637 cat conftest.$ac_ext >&5
7638 cf_have_incdir=yes
7639 fi
7640 rm -f conftest.$ac_objext conftest.$ac_ext
7641                           CPPFLAGS=$cf_save_CPPFLAGS
7642                         fi
7643                   fi
7644                 fi
7645
7646                 if test "$cf_have_incdir" = no ; then
7647                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7648
7649 echo "${as_me:-configure}:7649: testing adding $cf_add_incdir to include-path ..." 1>&5
7650
7651                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7652
7653                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7654                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7655                   cf_add_incdir="$cf_top_incdir"
7656                 else
7657                   break
7658                 fi
7659           fi
7660         done
7661   done
7662 fi
7663
7664 fi
7665
7666 # Set definitions to allow ifdef'ing for ncurses.h
7667
7668 case $cf_cv_ncurses_header in # (vi
7669 *ncurses.h)
7670         cat >>confdefs.h <<\EOF
7671 #define HAVE_NCURSES_H 1
7672 EOF
7673
7674         ;;
7675 esac
7676
7677 case $cf_cv_ncurses_header in # (vi
7678 ncurses/curses.h|ncurses/ncurses.h)
7679         cat >>confdefs.h <<\EOF
7680 #define HAVE_NCURSES_NCURSES_H 1
7681 EOF
7682
7683         ;;
7684 ncursesw/curses.h|ncursesw/ncurses.h)
7685         cat >>confdefs.h <<\EOF
7686 #define HAVE_NCURSESW_NCURSES_H 1
7687 EOF
7688
7689         ;;
7690 esac
7691
7692 echo "$as_me:7692: checking for terminfo header" >&5
7693 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7694 if test "${cf_cv_term_header+set}" = set; then
7695   echo $ECHO_N "(cached) $ECHO_C" >&6
7696 else
7697
7698 case ${cf_cv_ncurses_header} in #(vi
7699 */ncurses.h|*/ncursesw.h) #(vi
7700         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7701         ;;
7702 *)
7703         cf_term_header=term.h
7704         ;;
7705 esac
7706
7707 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7708 do
7709 cat >conftest.$ac_ext <<_ACEOF
7710 #line 7710 "configure"
7711 #include "confdefs.h"
7712 #include <stdio.h>
7713 #include <${cf_cv_ncurses_header:-curses.h}>
7714 #include <$cf_test>
7715
7716 int
7717 main ()
7718 {
7719 int x = auto_left_margin
7720   ;
7721   return 0;
7722 }
7723 _ACEOF
7724 rm -f conftest.$ac_objext
7725 if { (eval echo "$as_me:7725: \"$ac_compile\"") >&5
7726   (eval $ac_compile) 2>&5
7727   ac_status=$?
7728   echo "$as_me:7728: \$? = $ac_status" >&5
7729   (exit $ac_status); } &&
7730          { ac_try='test -s conftest.$ac_objext'
7731   { (eval echo "$as_me:7731: \"$ac_try\"") >&5
7732   (eval $ac_try) 2>&5
7733   ac_status=$?
7734   echo "$as_me:7734: \$? = $ac_status" >&5
7735   (exit $ac_status); }; }; then
7736
7737         cf_cv_term_header="$cf_test"
7738 else
7739   echo "$as_me: failed program was:" >&5
7740 cat conftest.$ac_ext >&5
7741
7742         cf_cv_term_header=unknown
7743
7744 fi
7745 rm -f conftest.$ac_objext conftest.$ac_ext
7746         test "$cf_cv_term_header" != unknown && break
7747 done
7748
7749 fi
7750 echo "$as_me:7750: result: $cf_cv_term_header" >&5
7751 echo "${ECHO_T}$cf_cv_term_header" >&6
7752
7753 # Set definitions to allow ifdef'ing to accommodate subdirectories
7754
7755 case $cf_cv_term_header in # (vi
7756 *term.h)
7757         cat >>confdefs.h <<\EOF
7758 #define HAVE_TERM_H 1
7759 EOF
7760
7761         ;;
7762 esac
7763
7764 case $cf_cv_term_header in # (vi
7765 ncurses/term.h) #(vi
7766         cat >>confdefs.h <<\EOF
7767 #define HAVE_NCURSES_TERM_H 1
7768 EOF
7769
7770         ;;
7771 ncursesw/term.h)
7772         cat >>confdefs.h <<\EOF
7773 #define HAVE_NCURSESW_TERM_H 1
7774 EOF
7775
7776         ;;
7777 esac
7778
7779 # some applications need this, but should check for NCURSES_VERSION
7780 cat >>confdefs.h <<\EOF
7781 #define NCURSES 1
7782 EOF
7783
7784 echo "$as_me:7784: checking for ncurses version" >&5
7785 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7786 if test "${cf_cv_ncurses_version+set}" = set; then
7787   echo $ECHO_N "(cached) $ECHO_C" >&6
7788 else
7789
7790         cf_cv_ncurses_version=no
7791         cf_tempfile=out$$
7792         rm -f $cf_tempfile
7793         if test "$cross_compiling" = yes; then
7794
7795         # This will not work if the preprocessor splits the line after the
7796         # Autoconf token.  The 'unproto' program does that.
7797         cat > conftest.$ac_ext <<EOF
7798 #include <${cf_cv_ncurses_header:-curses.h}>
7799 #undef Autoconf
7800 #ifdef NCURSES_VERSION
7801 Autoconf NCURSES_VERSION
7802 #else
7803 #ifdef __NCURSES_H
7804 Autoconf "old"
7805 #endif
7806 ;
7807 #endif
7808 EOF
7809         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7810         { (eval echo "$as_me:7810: \"$cf_try\"") >&5
7811   (eval $cf_try) 2>&5
7812   ac_status=$?
7813   echo "$as_me:7813: \$? = $ac_status" >&5
7814   (exit $ac_status); }
7815         if test -f conftest.out ; then
7816                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7817                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7818                 rm -f conftest.out
7819         fi
7820
7821 else
7822   cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825
7826 #include <${cf_cv_ncurses_header:-curses.h}>
7827 #include <stdio.h>
7828 int main()
7829 {
7830         FILE *fp = fopen("$cf_tempfile", "w");
7831 #ifdef NCURSES_VERSION
7832 # ifdef NCURSES_VERSION_PATCH
7833         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7834 # else
7835         fprintf(fp, "%s\n", NCURSES_VERSION);
7836 # endif
7837 #else
7838 # ifdef __NCURSES_H
7839         fprintf(fp, "old\n");
7840 # else
7841         make an error
7842 # endif
7843 #endif
7844         ${cf_cv_main_return:-return}(0);
7845 }
7846 _ACEOF
7847 rm -f conftest$ac_exeext
7848 if { (eval echo "$as_me:7848: \"$ac_link\"") >&5
7849   (eval $ac_link) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7853   { (eval echo "$as_me:7853: \"$ac_try\"") >&5
7854   (eval $ac_try) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); }; }; then
7858
7859         cf_cv_ncurses_version=`cat $cf_tempfile`
7860 else
7861   echo "$as_me: program exited with status $ac_status" >&5
7862 echo "$as_me: failed program was:" >&5
7863 cat conftest.$ac_ext >&5
7864 fi
7865 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7866 fi
7867         rm -f $cf_tempfile
7868
7869 fi
7870 echo "$as_me:7870: result: $cf_cv_ncurses_version" >&5
7871 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7872 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
7873 #define NCURSES 1
7874 EOF
7875
7876 cf_nculib_root=ncursesw
7877         # This works, except for the special case where we find gpm, but
7878         # ncurses is in a nonstandard location via $LIBS, and we really want
7879         # to link gpm.
7880 cf_ncurses_LIBS=""
7881 cf_ncurses_SAVE="$LIBS"
7882 echo "$as_me:7882: checking for Gpm_Open in -lgpm" >&5
7883 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7884 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7885   echo $ECHO_N "(cached) $ECHO_C" >&6
7886 else
7887   ac_check_lib_save_LIBS=$LIBS
7888 LIBS="-lgpm  $LIBS"
7889 cat >conftest.$ac_ext <<_ACEOF
7890 #line 7890 "configure"
7891 #include "confdefs.h"
7892
7893 /* Override any gcc2 internal prototype to avoid an error.  */
7894 #ifdef __cplusplus
7895 extern "C"
7896 #endif
7897 /* We use char because int might match the return type of a gcc2
7898    builtin and then its argument prototype would still apply.  */
7899 char Gpm_Open ();
7900 int
7901 main ()
7902 {
7903 Gpm_Open ();
7904   ;
7905   return 0;
7906 }
7907 _ACEOF
7908 rm -f conftest.$ac_objext conftest$ac_exeext
7909 if { (eval echo "$as_me:7909: \"$ac_link\"") >&5
7910   (eval $ac_link) 2>&5
7911   ac_status=$?
7912   echo "$as_me:7912: \$? = $ac_status" >&5
7913   (exit $ac_status); } &&
7914          { ac_try='test -s conftest$ac_exeext'
7915   { (eval echo "$as_me:7915: \"$ac_try\"") >&5
7916   (eval $ac_try) 2>&5
7917   ac_status=$?
7918   echo "$as_me:7918: \$? = $ac_status" >&5
7919   (exit $ac_status); }; }; then
7920   ac_cv_lib_gpm_Gpm_Open=yes
7921 else
7922   echo "$as_me: failed program was:" >&5
7923 cat conftest.$ac_ext >&5
7924 ac_cv_lib_gpm_Gpm_Open=no
7925 fi
7926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7927 LIBS=$ac_check_lib_save_LIBS
7928 fi
7929 echo "$as_me:7929: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7930 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7931 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7932   echo "$as_me:7932: checking for initscr in -lgpm" >&5
7933 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7934 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7935   echo $ECHO_N "(cached) $ECHO_C" >&6
7936 else
7937   ac_check_lib_save_LIBS=$LIBS
7938 LIBS="-lgpm  $LIBS"
7939 cat >conftest.$ac_ext <<_ACEOF
7940 #line 7940 "configure"
7941 #include "confdefs.h"
7942
7943 /* Override any gcc2 internal prototype to avoid an error.  */
7944 #ifdef __cplusplus
7945 extern "C"
7946 #endif
7947 /* We use char because int might match the return type of a gcc2
7948    builtin and then its argument prototype would still apply.  */
7949 char initscr ();
7950 int
7951 main ()
7952 {
7953 initscr ();
7954   ;
7955   return 0;
7956 }
7957 _ACEOF
7958 rm -f conftest.$ac_objext conftest$ac_exeext
7959 if { (eval echo "$as_me:7959: \"$ac_link\"") >&5
7960   (eval $ac_link) 2>&5
7961   ac_status=$?
7962   echo "$as_me:7962: \$? = $ac_status" >&5
7963   (exit $ac_status); } &&
7964          { ac_try='test -s conftest$ac_exeext'
7965   { (eval echo "$as_me:7965: \"$ac_try\"") >&5
7966   (eval $ac_try) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit $ac_status); }; }; then
7970   ac_cv_lib_gpm_initscr=yes
7971 else
7972   echo "$as_me: failed program was:" >&5
7973 cat conftest.$ac_ext >&5
7974 ac_cv_lib_gpm_initscr=no
7975 fi
7976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7977 LIBS=$ac_check_lib_save_LIBS
7978 fi
7979 echo "$as_me:7979: result: $ac_cv_lib_gpm_initscr" >&5
7980 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7981 if test $ac_cv_lib_gpm_initscr = yes; then
7982   LIBS="$cf_ncurses_SAVE"
7983 else
7984   cf_ncurses_LIBS="-lgpm"
7985 fi
7986
7987 fi
7988
7989 case $host_os in #(vi
7990 freebsd*)
7991         # This is only necessary if you are linking against an obsolete
7992         # version of ncurses (but it should do no harm, since it's static).
7993         if test "$cf_nculib_root" = ncurses ; then
7994                 echo "$as_me:7994: checking for tgoto in -lmytinfo" >&5
7995 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7996 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7997   echo $ECHO_N "(cached) $ECHO_C" >&6
7998 else
7999   ac_check_lib_save_LIBS=$LIBS
8000 LIBS="-lmytinfo  $LIBS"
8001 cat >conftest.$ac_ext <<_ACEOF
8002 #line 8002 "configure"
8003 #include "confdefs.h"
8004
8005 /* Override any gcc2 internal prototype to avoid an error.  */
8006 #ifdef __cplusplus
8007 extern "C"
8008 #endif
8009 /* We use char because int might match the return type of a gcc2
8010    builtin and then its argument prototype would still apply.  */
8011 char tgoto ();
8012 int
8013 main ()
8014 {
8015 tgoto ();
8016   ;
8017   return 0;
8018 }
8019 _ACEOF
8020 rm -f conftest.$ac_objext conftest$ac_exeext
8021 if { (eval echo "$as_me:8021: \"$ac_link\"") >&5
8022   (eval $ac_link) 2>&5
8023   ac_status=$?
8024   echo "$as_me:8024: \$? = $ac_status" >&5
8025   (exit $ac_status); } &&
8026          { ac_try='test -s conftest$ac_exeext'
8027   { (eval echo "$as_me:8027: \"$ac_try\"") >&5
8028   (eval $ac_try) 2>&5
8029   ac_status=$?
8030   echo "$as_me:8030: \$? = $ac_status" >&5
8031   (exit $ac_status); }; }; then
8032   ac_cv_lib_mytinfo_tgoto=yes
8033 else
8034   echo "$as_me: failed program was:" >&5
8035 cat conftest.$ac_ext >&5
8036 ac_cv_lib_mytinfo_tgoto=no
8037 fi
8038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8039 LIBS=$ac_check_lib_save_LIBS
8040 fi
8041 echo "$as_me:8041: result: $ac_cv_lib_mytinfo_tgoto" >&5
8042 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8043 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8044   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8045 fi
8046
8047         fi
8048         ;;
8049 esac
8050
8051 LIBS="$cf_ncurses_LIBS $LIBS"
8052
8053 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8054 then
8055
8056 if test -n "$cf_cv_curses_dir/lib" ; then
8057   for cf_add_libdir in $cf_cv_curses_dir/lib
8058   do
8059     if test $cf_add_libdir = /usr/lib ; then
8060       :
8061     elif test -d $cf_add_libdir
8062     then
8063       cf_have_libdir=no
8064       if test -n "$LDFLAGS$LIBS" ; then
8065         # a loop is needed to ensure we can add subdirs of existing dirs
8066         for cf_test_libdir in $LDFLAGS $LIBS ; do
8067           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8068             cf_have_libdir=yes; break
8069           fi
8070         done
8071       fi
8072       if test "$cf_have_libdir" = no ; then
8073         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8074
8075 echo "${as_me:-configure}:8075: testing adding $cf_add_libdir to library-path ..." 1>&5
8076
8077         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8078       fi
8079     fi
8080   done
8081 fi
8082
8083         LIBS="-l$cf_nculib_root $LIBS"
8084 else
8085
8086         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8087         cf_libdir=""
8088         echo "$as_me:8088: checking for initscr" >&5
8089 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8090 if test "${ac_cv_func_initscr+set}" = set; then
8091   echo $ECHO_N "(cached) $ECHO_C" >&6
8092 else
8093   cat >conftest.$ac_ext <<_ACEOF
8094 #line 8094 "configure"
8095 #include "confdefs.h"
8096 /* System header to define __stub macros and hopefully few prototypes,
8097     which can conflict with char initscr (); below.  */
8098 #include <assert.h>
8099 /* Override any gcc2 internal prototype to avoid an error.  */
8100 #ifdef __cplusplus
8101 extern "C"
8102 #endif
8103 /* We use char because int might match the return type of a gcc2
8104    builtin and then its argument prototype would still apply.  */
8105 char initscr ();
8106 char (*f) ();
8107
8108 int
8109 main ()
8110 {
8111 /* The GNU C library defines this for functions which it implements
8112     to always fail with ENOSYS.  Some functions are actually named
8113     something starting with __ and the normal name is an alias.  */
8114 #if defined (__stub_initscr) || defined (__stub___initscr)
8115 choke me
8116 #else
8117 f = initscr;
8118 #endif
8119
8120   ;
8121   return 0;
8122 }
8123 _ACEOF
8124 rm -f conftest.$ac_objext conftest$ac_exeext
8125 if { (eval echo "$as_me:8125: \"$ac_link\"") >&5
8126   (eval $ac_link) 2>&5
8127   ac_status=$?
8128   echo "$as_me:8128: \$? = $ac_status" >&5
8129   (exit $ac_status); } &&
8130          { ac_try='test -s conftest$ac_exeext'
8131   { (eval echo "$as_me:8131: \"$ac_try\"") >&5
8132   (eval $ac_try) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); }; }; then
8136   ac_cv_func_initscr=yes
8137 else
8138   echo "$as_me: failed program was:" >&5
8139 cat conftest.$ac_ext >&5
8140 ac_cv_func_initscr=no
8141 fi
8142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8143 fi
8144 echo "$as_me:8144: result: $ac_cv_func_initscr" >&5
8145 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8146 if test $ac_cv_func_initscr = yes; then
8147   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8148 else
8149
8150                 cf_save_LIBS="$LIBS"
8151                 echo "$as_me:8151: checking for initscr in -l$cf_nculib_root" >&5
8152 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8153                 LIBS="-l$cf_nculib_root $LIBS"
8154                 cat >conftest.$ac_ext <<_ACEOF
8155 #line 8155 "configure"
8156 #include "confdefs.h"
8157 #include <${cf_cv_ncurses_header:-curses.h}>
8158 int
8159 main ()
8160 {
8161 initscr()
8162   ;
8163   return 0;
8164 }
8165 _ACEOF
8166 rm -f conftest.$ac_objext conftest$ac_exeext
8167 if { (eval echo "$as_me:8167: \"$ac_link\"") >&5
8168   (eval $ac_link) 2>&5
8169   ac_status=$?
8170   echo "$as_me:8170: \$? = $ac_status" >&5
8171   (exit $ac_status); } &&
8172          { ac_try='test -s conftest$ac_exeext'
8173   { (eval echo "$as_me:8173: \"$ac_try\"") >&5
8174   (eval $ac_try) 2>&5
8175   ac_status=$?
8176   echo "$as_me:8176: \$? = $ac_status" >&5
8177   (exit $ac_status); }; }; then
8178   echo "$as_me:8178: result: yes" >&5
8179 echo "${ECHO_T}yes" >&6
8180                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8181
8182 else
8183   echo "$as_me: failed program was:" >&5
8184 cat conftest.$ac_ext >&5
8185 echo "$as_me:8185: result: no" >&5
8186 echo "${ECHO_T}no" >&6
8187
8188 cf_search=
8189 cf_library_path_list=""
8190 if test -n "${LDFLAGS}${LIBS}" ; then
8191         for cf_library_path in $LDFLAGS $LIBS
8192         do
8193                 case $cf_library_path in #(vi
8194                 -L*)
8195                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8196
8197 test "$cf_library_path" != "NONE" && \
8198 test -d "$cf_library_path" && \
8199  {
8200         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8201         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8202         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8203         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8204         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8205         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"
8206 }
8207
8208                         cf_library_path_list="$cf_library_path_list $cf_search"
8209                         ;;
8210                 esac
8211         done
8212 fi
8213
8214 cf_search=
8215
8216 test "/usr" != "$prefix" && \
8217 test -d "/usr" && \
8218 (test $prefix = NONE || test "/usr" != "$prefix") && {
8219         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8220         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8221         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
8222         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
8223         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
8224         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
8225 }
8226
8227 test "$prefix" != "NONE" && \
8228 test -d "$prefix" && \
8229  {
8230         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8231         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8232         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8233         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8234         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8235         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8236 }
8237
8238 test "/usr/local" != "$prefix" && \
8239 test -d "/usr/local" && \
8240 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8241         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8242         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8243         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
8244         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
8245         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
8246         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
8247 }
8248
8249 test "/opt" != "$prefix" && \
8250 test -d "/opt" && \
8251 (test $prefix = NONE || test "/opt" != "$prefix") && {
8252         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8253         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8254         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
8255         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
8256         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
8257         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
8258 }
8259
8260 test "$HOME" != "$prefix" && \
8261 test -d "$HOME" && \
8262 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8263         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8264         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8265         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
8266         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
8267         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
8268         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
8269 }
8270
8271 cf_search="$cf_library_path_list $cf_search"
8272
8273                         for cf_libdir in $cf_search
8274                         do
8275                                 echo "$as_me:8275: checking for -l$cf_nculib_root in $cf_libdir" >&5
8276 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8277                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8278                                 cat >conftest.$ac_ext <<_ACEOF
8279 #line 8279 "configure"
8280 #include "confdefs.h"
8281 #include <${cf_cv_ncurses_header:-curses.h}>
8282 int
8283 main ()
8284 {
8285 initscr()
8286   ;
8287   return 0;
8288 }
8289 _ACEOF
8290 rm -f conftest.$ac_objext conftest$ac_exeext
8291 if { (eval echo "$as_me:8291: \"$ac_link\"") >&5
8292   (eval $ac_link) 2>&5
8293   ac_status=$?
8294   echo "$as_me:8294: \$? = $ac_status" >&5
8295   (exit $ac_status); } &&
8296          { ac_try='test -s conftest$ac_exeext'
8297   { (eval echo "$as_me:8297: \"$ac_try\"") >&5
8298   (eval $ac_try) 2>&5
8299   ac_status=$?
8300   echo "$as_me:8300: \$? = $ac_status" >&5
8301   (exit $ac_status); }; }; then
8302   echo "$as_me:8302: result: yes" >&5
8303 echo "${ECHO_T}yes" >&6
8304                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8305                                          break
8306 else
8307   echo "$as_me: failed program was:" >&5
8308 cat conftest.$ac_ext >&5
8309 echo "$as_me:8309: result: no" >&5
8310 echo "${ECHO_T}no" >&6
8311                                          LIBS="$cf_save_LIBS"
8312 fi
8313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8314                         done
8315
8316 fi
8317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8318
8319 fi
8320
8321 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8322
8323 if test $cf_found_library = no ; then
8324         { { echo "$as_me:8324: error: Cannot link $cf_nculib_root library" >&5
8325 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8326    { (exit 1); exit 1; }; }
8327 fi
8328
8329 fi
8330
8331 if test -n "$cf_ncurses_LIBS" ; then
8332         echo "$as_me:8332: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8333 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8334         cf_ncurses_SAVE="$LIBS"
8335         for p in $cf_ncurses_LIBS ; do
8336                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8337                 if test "$q" != "$LIBS" ; then
8338                         LIBS="$q"
8339                 fi
8340         done
8341         cat >conftest.$ac_ext <<_ACEOF
8342 #line 8342 "configure"
8343 #include "confdefs.h"
8344 #include <${cf_cv_ncurses_header:-curses.h}>
8345 int
8346 main ()
8347 {
8348 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8349   ;
8350   return 0;
8351 }
8352 _ACEOF
8353 rm -f conftest.$ac_objext conftest$ac_exeext
8354 if { (eval echo "$as_me:8354: \"$ac_link\"") >&5
8355   (eval $ac_link) 2>&5
8356   ac_status=$?
8357   echo "$as_me:8357: \$? = $ac_status" >&5
8358   (exit $ac_status); } &&
8359          { ac_try='test -s conftest$ac_exeext'
8360   { (eval echo "$as_me:8360: \"$ac_try\"") >&5
8361   (eval $ac_try) 2>&5
8362   ac_status=$?
8363   echo "$as_me:8363: \$? = $ac_status" >&5
8364   (exit $ac_status); }; }; then
8365   echo "$as_me:8365: result: yes" >&5
8366 echo "${ECHO_T}yes" >&6
8367 else
8368   echo "$as_me: failed program was:" >&5
8369 cat conftest.$ac_ext >&5
8370 echo "$as_me:8370: result: no" >&5
8371 echo "${ECHO_T}no" >&6
8372                  LIBS="$cf_ncurses_SAVE"
8373 fi
8374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8375 fi
8376
8377 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8378
8379 cat >>confdefs.h <<EOF
8380 #define $cf_nculib_ROOT 1
8381 EOF
8382
8383 fi
8384
8385         ;;
8386 pdcurses) #(vi
8387
8388 echo "$as_me:8388: checking if you want to use pkg-config" >&5
8389 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
8390
8391 # Check whether --with-pkg-config or --without-pkg-config was given.
8392 if test "${with_pkg_config+set}" = set; then
8393   withval="$with_pkg_config"
8394   cf_pkg_config=$withval
8395 else
8396   cf_pkg_config=yes
8397 fi;
8398 echo "$as_me:8398: result: $cf_pkg_config" >&5
8399 echo "${ECHO_T}$cf_pkg_config" >&6
8400
8401 case $cf_pkg_config in #(vi
8402 no) #(vi
8403         PKG_CONFIG=none
8404         ;;
8405 yes) #(vi
8406         # Extract the first word of "pkg-config", so it can be a program name with args.
8407 set dummy pkg-config; ac_word=$2
8408 echo "$as_me:8408: checking for $ac_word" >&5
8409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8410 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8411   echo $ECHO_N "(cached) $ECHO_C" >&6
8412 else
8413   case $PKG_CONFIG in
8414   [\\/]* | ?:[\\/]*)
8415   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8416   ;;
8417   *)
8418   ac_save_IFS=$IFS; IFS=$ac_path_separator
8419 ac_dummy="$PATH"
8420 for ac_dir in $ac_dummy; do
8421   IFS=$ac_save_IFS
8422   test -z "$ac_dir" && ac_dir=.
8423   if $as_executable_p "$ac_dir/$ac_word"; then
8424    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
8425    echo "$as_me:8425: found $ac_dir/$ac_word" >&5
8426    break
8427 fi
8428 done
8429
8430   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
8431   ;;
8432 esac
8433 fi
8434 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8435
8436 if test -n "$PKG_CONFIG"; then
8437   echo "$as_me:8437: result: $PKG_CONFIG" >&5
8438 echo "${ECHO_T}$PKG_CONFIG" >&6
8439 else
8440   echo "$as_me:8440: result: no" >&5
8441 echo "${ECHO_T}no" >&6
8442 fi
8443
8444         ;;
8445 *)
8446         PKG_CONFIG=$withval
8447         ;;
8448 esac
8449
8450 test -z "$PKG_CONFIG" && PKG_CONFIG=none
8451 if test "$PKG_CONFIG" != none ; then
8452
8453 if test "x$prefix" != xNONE; then
8454   cf_path_syntax="$prefix"
8455 else
8456   cf_path_syntax="$ac_default_prefix"
8457 fi
8458
8459 case ".$PKG_CONFIG" in #(vi
8460 .\$\(*\)*|.\'*\'*) #(vi
8461   ;;
8462 ..|./*|.\\*) #(vi
8463   ;;
8464 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8465   ;;
8466 .\${*prefix}*) #(vi
8467   eval PKG_CONFIG="$PKG_CONFIG"
8468   case ".$PKG_CONFIG" in #(vi
8469   .NONE/*)
8470     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8471     ;;
8472   esac
8473   ;; #(vi
8474 .no|.NONE/*)
8475   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
8476   ;;
8477 *)
8478   { { echo "$as_me:8478: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
8479 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
8480    { (exit 1); exit 1; }; }
8481   ;;
8482 esac
8483
8484 fi
8485
8486 echo "$as_me:8486: checking for X" >&5
8487 echo $ECHO_N "checking for X... $ECHO_C" >&6
8488
8489 # Check whether --with-x or --without-x was given.
8490 if test "${with_x+set}" = set; then
8491   withval="$with_x"
8492
8493 fi;
8494 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8495 if test "x$with_x" = xno; then
8496   # The user explicitly disabled X.
8497   have_x=disabled
8498 else
8499   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8500     # Both variables are already set.
8501     have_x=yes
8502   else
8503     if test "${ac_cv_have_x+set}" = set; then
8504   echo $ECHO_N "(cached) $ECHO_C" >&6
8505 else
8506   # One or both of the vars are not set, and there is no cached value.
8507 ac_x_includes=no ac_x_libraries=no
8508 rm -fr conftest.dir
8509 if mkdir conftest.dir; then
8510   cd conftest.dir
8511   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8512   cat >Imakefile <<'EOF'
8513 acfindx:
8514         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8515 EOF
8516   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8517     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8518     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8519     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8520     for ac_extension in a so sl dylib dll; do
8521       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8522          test -f $ac_im_libdir/libX11.$ac_extension; then
8523         ac_im_usrlibdir=$ac_im_libdir; break
8524       fi
8525     done
8526     # Screen out bogus values from the imake configuration.  They are
8527     # bogus both because they are the default anyway, and because
8528     # using them would break gcc on systems where it needs fixed includes.
8529     case $ac_im_incroot in
8530         /usr/include) ;;
8531         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8532     esac
8533     case $ac_im_usrlibdir in
8534         /usr/lib | /lib) ;;
8535         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8536     esac
8537   fi
8538   cd ..
8539   rm -fr conftest.dir
8540 fi
8541
8542 # Standard set of common directories for X headers.
8543 # Check X11 before X11Rn because it is often a symlink to the current release.
8544 ac_x_header_dirs='
8545 /usr/X11/include
8546 /usr/X11R6/include
8547 /usr/X11R5/include
8548 /usr/X11R4/include
8549
8550 /usr/include/X11
8551 /usr/include/X11R6
8552 /usr/include/X11R5
8553 /usr/include/X11R4
8554
8555 /usr/local/X11/include
8556 /usr/local/X11R6/include
8557 /usr/local/X11R5/include
8558 /usr/local/X11R4/include
8559
8560 /usr/local/include/X11
8561 /usr/local/include/X11R6
8562 /usr/local/include/X11R5
8563 /usr/local/include/X11R4
8564
8565 /usr/X386/include
8566 /usr/x386/include
8567 /usr/XFree86/include/X11
8568
8569 /usr/include
8570 /usr/local/include
8571 /usr/unsupported/include
8572 /usr/athena/include
8573 /usr/local/x11r5/include
8574 /usr/lpp/Xamples/include
8575
8576 /usr/openwin/include
8577 /usr/openwin/share/include'
8578
8579 if test "$ac_x_includes" = no; then
8580   # Guess where to find include files, by looking for Intrinsic.h.
8581   # First, try using that file with no special directory specified.
8582   cat >conftest.$ac_ext <<_ACEOF
8583 #line 8583 "configure"
8584 #include "confdefs.h"
8585 #include <X11/Intrinsic.h>
8586 _ACEOF
8587 if { (eval echo "$as_me:8587: \"$ac_cpp conftest.$ac_ext\"") >&5
8588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8589   ac_status=$?
8590   egrep -v '^ *\+' conftest.er1 >conftest.err
8591   rm -f conftest.er1
8592   cat conftest.err >&5
8593   echo "$as_me:8593: \$? = $ac_status" >&5
8594   (exit $ac_status); } >/dev/null; then
8595   if test -s conftest.err; then
8596     ac_cpp_err=$ac_c_preproc_warn_flag
8597   else
8598     ac_cpp_err=
8599   fi
8600 else
8601   ac_cpp_err=yes
8602 fi
8603 if test -z "$ac_cpp_err"; then
8604   # We can compile using X headers with no special include directory.
8605 ac_x_includes=
8606 else
8607   echo "$as_me: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   for ac_dir in $ac_x_header_dirs; do
8610   if test -r "$ac_dir/X11/Intrinsic.h"; then
8611     ac_x_includes=$ac_dir
8612     break
8613   fi
8614 done
8615 fi
8616 rm -f conftest.err conftest.$ac_ext
8617 fi # $ac_x_includes = no
8618
8619 if test "$ac_x_libraries" = no; then
8620   # Check for the libraries.
8621   # See if we find them without any special options.
8622   # Don't add to $LIBS permanently.
8623   ac_save_LIBS=$LIBS
8624   LIBS="-lXt $LIBS"
8625   cat >conftest.$ac_ext <<_ACEOF
8626 #line 8626 "configure"
8627 #include "confdefs.h"
8628 #include <X11/Intrinsic.h>
8629 int
8630 main ()
8631 {
8632 XtMalloc (0)
8633   ;
8634   return 0;
8635 }
8636 _ACEOF
8637 rm -f conftest.$ac_objext conftest$ac_exeext
8638 if { (eval echo "$as_me:8638: \"$ac_link\"") >&5
8639   (eval $ac_link) 2>&5
8640   ac_status=$?
8641   echo "$as_me:8641: \$? = $ac_status" >&5
8642   (exit $ac_status); } &&
8643          { ac_try='test -s conftest$ac_exeext'
8644   { (eval echo "$as_me:8644: \"$ac_try\"") >&5
8645   (eval $ac_try) 2>&5
8646   ac_status=$?
8647   echo "$as_me:8647: \$? = $ac_status" >&5
8648   (exit $ac_status); }; }; then
8649   LIBS=$ac_save_LIBS
8650 # We can link X programs with no special library path.
8651 ac_x_libraries=
8652 else
8653   echo "$as_me: failed program was:" >&5
8654 cat conftest.$ac_ext >&5
8655 LIBS=$ac_save_LIBS
8656 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8657 do
8658   # Don't even attempt the hair of trying to link an X program!
8659   for ac_extension in a so sl dylib dll; do
8660     if test -r $ac_dir/libXt.$ac_extension; then
8661       ac_x_libraries=$ac_dir
8662       break 2
8663     fi
8664   done
8665 done
8666 fi
8667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8668 fi # $ac_x_libraries = no
8669
8670 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8671   # Didn't find X anywhere.  Cache the known absence of X.
8672   ac_cv_have_x="have_x=no"
8673 else
8674   # Record where we found X for the cache.
8675   ac_cv_have_x="have_x=yes \
8676                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8677 fi
8678 fi
8679
8680   fi
8681   eval "$ac_cv_have_x"
8682 fi # $with_x != no
8683
8684 if test "$have_x" != yes; then
8685   echo "$as_me:8685: result: $have_x" >&5
8686 echo "${ECHO_T}$have_x" >&6
8687   no_x=yes
8688 else
8689   # If each of the values was on the command line, it overrides each guess.
8690   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8691   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8692   # Update the cache value to reflect the command line values.
8693   ac_cv_have_x="have_x=yes \
8694                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8695   echo "$as_me:8695: result: libraries $x_libraries, headers $x_includes" >&5
8696 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8697 fi
8698
8699 if test "$no_x" = yes; then
8700   # Not all programs may use this symbol, but it does not hurt to define it.
8701
8702 cat >>confdefs.h <<\EOF
8703 #define X_DISPLAY_MISSING 1
8704 EOF
8705
8706   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8707 else
8708   if test -n "$x_includes"; then
8709     X_CFLAGS="$X_CFLAGS -I$x_includes"
8710   fi
8711
8712   # It would also be nice to do this for all -L options, not just this one.
8713   if test -n "$x_libraries"; then
8714     X_LIBS="$X_LIBS -L$x_libraries"
8715     # For Solaris; some versions of Sun CC require a space after -R and
8716     # others require no space.  Words are not sufficient . . . .
8717     case `(uname -sr) 2>/dev/null` in
8718     "SunOS 5"*)
8719       echo "$as_me:8719: checking whether -R must be followed by a space" >&5
8720 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8721       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8722       cat >conftest.$ac_ext <<_ACEOF
8723 #line 8723 "configure"
8724 #include "confdefs.h"
8725
8726 int
8727 main ()
8728 {
8729
8730   ;
8731   return 0;
8732 }
8733 _ACEOF
8734 rm -f conftest.$ac_objext conftest$ac_exeext
8735 if { (eval echo "$as_me:8735: \"$ac_link\"") >&5
8736   (eval $ac_link) 2>&5
8737   ac_status=$?
8738   echo "$as_me:8738: \$? = $ac_status" >&5
8739   (exit $ac_status); } &&
8740          { ac_try='test -s conftest$ac_exeext'
8741   { (eval echo "$as_me:8741: \"$ac_try\"") >&5
8742   (eval $ac_try) 2>&5
8743   ac_status=$?
8744   echo "$as_me:8744: \$? = $ac_status" >&5
8745   (exit $ac_status); }; }; then
8746   ac_R_nospace=yes
8747 else
8748   echo "$as_me: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8750 ac_R_nospace=no
8751 fi
8752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8753       if test $ac_R_nospace = yes; then
8754         echo "$as_me:8754: result: no" >&5
8755 echo "${ECHO_T}no" >&6
8756         X_LIBS="$X_LIBS -R$x_libraries"
8757       else
8758         LIBS="$ac_xsave_LIBS -R $x_libraries"
8759         cat >conftest.$ac_ext <<_ACEOF
8760 #line 8760 "configure"
8761 #include "confdefs.h"
8762
8763 int
8764 main ()
8765 {
8766
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 rm -f conftest.$ac_objext conftest$ac_exeext
8772 if { (eval echo "$as_me:8772: \"$ac_link\"") >&5
8773   (eval $ac_link) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); } &&
8777          { ac_try='test -s conftest$ac_exeext'
8778   { (eval echo "$as_me:8778: \"$ac_try\"") >&5
8779   (eval $ac_try) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); }; }; then
8783   ac_R_space=yes
8784 else
8785   echo "$as_me: failed program was:" >&5
8786 cat conftest.$ac_ext >&5
8787 ac_R_space=no
8788 fi
8789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8790         if test $ac_R_space = yes; then
8791           echo "$as_me:8791: result: yes" >&5
8792 echo "${ECHO_T}yes" >&6
8793           X_LIBS="$X_LIBS -R $x_libraries"
8794         else
8795           echo "$as_me:8795: result: neither works" >&5
8796 echo "${ECHO_T}neither works" >&6
8797         fi
8798       fi
8799       LIBS=$ac_xsave_LIBS
8800     esac
8801   fi
8802
8803   # Check for system-dependent libraries X programs must link with.
8804   # Do this before checking for the system-independent R6 libraries
8805   # (-lICE), since we may need -lsocket or whatever for X linking.
8806
8807   if test "$ISC" = yes; then
8808     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8809   else
8810     # Martyn Johnson says this is needed for Ultrix, if the X
8811     # libraries were built with DECnet support.  And Karl Berry says
8812     # the Alpha needs dnet_stub (dnet does not exist).
8813     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8814     cat >conftest.$ac_ext <<_ACEOF
8815 #line 8815 "configure"
8816 #include "confdefs.h"
8817
8818 /* Override any gcc2 internal prototype to avoid an error.  */
8819 #ifdef __cplusplus
8820 extern "C"
8821 #endif
8822 /* We use char because int might match the return type of a gcc2
8823    builtin and then its argument prototype would still apply.  */
8824 char XOpenDisplay ();
8825 int
8826 main ()
8827 {
8828 XOpenDisplay ();
8829   ;
8830   return 0;
8831 }
8832 _ACEOF
8833 rm -f conftest.$ac_objext conftest$ac_exeext
8834 if { (eval echo "$as_me:8834: \"$ac_link\"") >&5
8835   (eval $ac_link) 2>&5
8836   ac_status=$?
8837   echo "$as_me:8837: \$? = $ac_status" >&5
8838   (exit $ac_status); } &&
8839          { ac_try='test -s conftest$ac_exeext'
8840   { (eval echo "$as_me:8840: \"$ac_try\"") >&5
8841   (eval $ac_try) 2>&5
8842   ac_status=$?
8843   echo "$as_me:8843: \$? = $ac_status" >&5
8844   (exit $ac_status); }; }; then
8845   :
8846 else
8847   echo "$as_me: failed program was:" >&5
8848 cat conftest.$ac_ext >&5
8849 echo "$as_me:8849: checking for dnet_ntoa in -ldnet" >&5
8850 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8851 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8852   echo $ECHO_N "(cached) $ECHO_C" >&6
8853 else
8854   ac_check_lib_save_LIBS=$LIBS
8855 LIBS="-ldnet  $LIBS"
8856 cat >conftest.$ac_ext <<_ACEOF
8857 #line 8857 "configure"
8858 #include "confdefs.h"
8859
8860 /* Override any gcc2 internal prototype to avoid an error.  */
8861 #ifdef __cplusplus
8862 extern "C"
8863 #endif
8864 /* We use char because int might match the return type of a gcc2
8865    builtin and then its argument prototype would still apply.  */
8866 char dnet_ntoa ();
8867 int
8868 main ()
8869 {
8870 dnet_ntoa ();
8871   ;
8872   return 0;
8873 }
8874 _ACEOF
8875 rm -f conftest.$ac_objext conftest$ac_exeext
8876 if { (eval echo "$as_me:8876: \"$ac_link\"") >&5
8877   (eval $ac_link) 2>&5
8878   ac_status=$?
8879   echo "$as_me:8879: \$? = $ac_status" >&5
8880   (exit $ac_status); } &&
8881          { ac_try='test -s conftest$ac_exeext'
8882   { (eval echo "$as_me:8882: \"$ac_try\"") >&5
8883   (eval $ac_try) 2>&5
8884   ac_status=$?
8885   echo "$as_me:8885: \$? = $ac_status" >&5
8886   (exit $ac_status); }; }; then
8887   ac_cv_lib_dnet_dnet_ntoa=yes
8888 else
8889   echo "$as_me: failed program was:" >&5
8890 cat conftest.$ac_ext >&5
8891 ac_cv_lib_dnet_dnet_ntoa=no
8892 fi
8893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8894 LIBS=$ac_check_lib_save_LIBS
8895 fi
8896 echo "$as_me:8896: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8897 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8898 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
8899   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8900 fi
8901
8902     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8903       echo "$as_me:8903: checking for dnet_ntoa in -ldnet_stub" >&5
8904 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8905 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8906   echo $ECHO_N "(cached) $ECHO_C" >&6
8907 else
8908   ac_check_lib_save_LIBS=$LIBS
8909 LIBS="-ldnet_stub  $LIBS"
8910 cat >conftest.$ac_ext <<_ACEOF
8911 #line 8911 "configure"
8912 #include "confdefs.h"
8913
8914 /* Override any gcc2 internal prototype to avoid an error.  */
8915 #ifdef __cplusplus
8916 extern "C"
8917 #endif
8918 /* We use char because int might match the return type of a gcc2
8919    builtin and then its argument prototype would still apply.  */
8920 char dnet_ntoa ();
8921 int
8922 main ()
8923 {
8924 dnet_ntoa ();
8925   ;
8926   return 0;
8927 }
8928 _ACEOF
8929 rm -f conftest.$ac_objext conftest$ac_exeext
8930 if { (eval echo "$as_me:8930: \"$ac_link\"") >&5
8931   (eval $ac_link) 2>&5
8932   ac_status=$?
8933   echo "$as_me:8933: \$? = $ac_status" >&5
8934   (exit $ac_status); } &&
8935          { ac_try='test -s conftest$ac_exeext'
8936   { (eval echo "$as_me:8936: \"$ac_try\"") >&5
8937   (eval $ac_try) 2>&5
8938   ac_status=$?
8939   echo "$as_me:8939: \$? = $ac_status" >&5
8940   (exit $ac_status); }; }; then
8941   ac_cv_lib_dnet_stub_dnet_ntoa=yes
8942 else
8943   echo "$as_me: failed program was:" >&5
8944 cat conftest.$ac_ext >&5
8945 ac_cv_lib_dnet_stub_dnet_ntoa=no
8946 fi
8947 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8948 LIBS=$ac_check_lib_save_LIBS
8949 fi
8950 echo "$as_me:8950: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8951 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
8952 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
8953   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8954 fi
8955
8956     fi
8957 fi
8958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8959     LIBS="$ac_xsave_LIBS"
8960
8961     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
8962     # to get the SysV transport functions.
8963     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8964     # needs -lnsl.
8965     # The nsl library prevents programs from opening the X display
8966     # on Irix 5.2, according to T.E. Dickey.
8967     # The functions gethostbyname, getservbyname, and inet_addr are
8968     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8969     echo "$as_me:8969: checking for gethostbyname" >&5
8970 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
8971 if test "${ac_cv_func_gethostbyname+set}" = set; then
8972   echo $ECHO_N "(cached) $ECHO_C" >&6
8973 else
8974   cat >conftest.$ac_ext <<_ACEOF
8975 #line 8975 "configure"
8976 #include "confdefs.h"
8977 /* System header to define __stub macros and hopefully few prototypes,
8978     which can conflict with char gethostbyname (); below.  */
8979 #include <assert.h>
8980 /* Override any gcc2 internal prototype to avoid an error.  */
8981 #ifdef __cplusplus
8982 extern "C"
8983 #endif
8984 /* We use char because int might match the return type of a gcc2
8985    builtin and then its argument prototype would still apply.  */
8986 char gethostbyname ();
8987 char (*f) ();
8988
8989 int
8990 main ()
8991 {
8992 /* The GNU C library defines this for functions which it implements
8993     to always fail with ENOSYS.  Some functions are actually named
8994     something starting with __ and the normal name is an alias.  */
8995 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
8996 choke me
8997 #else
8998 f = gethostbyname;
8999 #endif
9000
9001   ;
9002   return 0;
9003 }
9004 _ACEOF
9005 rm -f conftest.$ac_objext conftest$ac_exeext
9006 if { (eval echo "$as_me:9006: \"$ac_link\"") >&5
9007   (eval $ac_link) 2>&5
9008   ac_status=$?
9009   echo "$as_me:9009: \$? = $ac_status" >&5
9010   (exit $ac_status); } &&
9011          { ac_try='test -s conftest$ac_exeext'
9012   { (eval echo "$as_me:9012: \"$ac_try\"") >&5
9013   (eval $ac_try) 2>&5
9014   ac_status=$?
9015   echo "$as_me:9015: \$? = $ac_status" >&5
9016   (exit $ac_status); }; }; then
9017   ac_cv_func_gethostbyname=yes
9018 else
9019   echo "$as_me: failed program was:" >&5
9020 cat conftest.$ac_ext >&5
9021 ac_cv_func_gethostbyname=no
9022 fi
9023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9024 fi
9025 echo "$as_me:9025: result: $ac_cv_func_gethostbyname" >&5
9026 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9027
9028     if test $ac_cv_func_gethostbyname = no; then
9029       echo "$as_me:9029: checking for gethostbyname in -lnsl" >&5
9030 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9031 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9032   echo $ECHO_N "(cached) $ECHO_C" >&6
9033 else
9034   ac_check_lib_save_LIBS=$LIBS
9035 LIBS="-lnsl  $LIBS"
9036 cat >conftest.$ac_ext <<_ACEOF
9037 #line 9037 "configure"
9038 #include "confdefs.h"
9039
9040 /* Override any gcc2 internal prototype to avoid an error.  */
9041 #ifdef __cplusplus
9042 extern "C"
9043 #endif
9044 /* We use char because int might match the return type of a gcc2
9045    builtin and then its argument prototype would still apply.  */
9046 char gethostbyname ();
9047 int
9048 main ()
9049 {
9050 gethostbyname ();
9051   ;
9052   return 0;
9053 }
9054 _ACEOF
9055 rm -f conftest.$ac_objext conftest$ac_exeext
9056 if { (eval echo "$as_me:9056: \"$ac_link\"") >&5
9057   (eval $ac_link) 2>&5
9058   ac_status=$?
9059   echo "$as_me:9059: \$? = $ac_status" >&5
9060   (exit $ac_status); } &&
9061          { ac_try='test -s conftest$ac_exeext'
9062   { (eval echo "$as_me:9062: \"$ac_try\"") >&5
9063   (eval $ac_try) 2>&5
9064   ac_status=$?
9065   echo "$as_me:9065: \$? = $ac_status" >&5
9066   (exit $ac_status); }; }; then
9067   ac_cv_lib_nsl_gethostbyname=yes
9068 else
9069   echo "$as_me: failed program was:" >&5
9070 cat conftest.$ac_ext >&5
9071 ac_cv_lib_nsl_gethostbyname=no
9072 fi
9073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9074 LIBS=$ac_check_lib_save_LIBS
9075 fi
9076 echo "$as_me:9076: result: $ac_cv_lib_nsl_gethostbyname" >&5
9077 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9078 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9079   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9080 fi
9081
9082       if test $ac_cv_lib_nsl_gethostbyname = no; then
9083         echo "$as_me:9083: checking for gethostbyname in -lbsd" >&5
9084 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9085 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9086   echo $ECHO_N "(cached) $ECHO_C" >&6
9087 else
9088   ac_check_lib_save_LIBS=$LIBS
9089 LIBS="-lbsd  $LIBS"
9090 cat >conftest.$ac_ext <<_ACEOF
9091 #line 9091 "configure"
9092 #include "confdefs.h"
9093
9094 /* Override any gcc2 internal prototype to avoid an error.  */
9095 #ifdef __cplusplus
9096 extern "C"
9097 #endif
9098 /* We use char because int might match the return type of a gcc2
9099    builtin and then its argument prototype would still apply.  */
9100 char gethostbyname ();
9101 int
9102 main ()
9103 {
9104 gethostbyname ();
9105   ;
9106   return 0;
9107 }
9108 _ACEOF
9109 rm -f conftest.$ac_objext conftest$ac_exeext
9110 if { (eval echo "$as_me:9110: \"$ac_link\"") >&5
9111   (eval $ac_link) 2>&5
9112   ac_status=$?
9113   echo "$as_me:9113: \$? = $ac_status" >&5
9114   (exit $ac_status); } &&
9115          { ac_try='test -s conftest$ac_exeext'
9116   { (eval echo "$as_me:9116: \"$ac_try\"") >&5
9117   (eval $ac_try) 2>&5
9118   ac_status=$?
9119   echo "$as_me:9119: \$? = $ac_status" >&5
9120   (exit $ac_status); }; }; then
9121   ac_cv_lib_bsd_gethostbyname=yes
9122 else
9123   echo "$as_me: failed program was:" >&5
9124 cat conftest.$ac_ext >&5
9125 ac_cv_lib_bsd_gethostbyname=no
9126 fi
9127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9128 LIBS=$ac_check_lib_save_LIBS
9129 fi
9130 echo "$as_me:9130: result: $ac_cv_lib_bsd_gethostbyname" >&5
9131 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9132 if test $ac_cv_lib_bsd_gethostbyname = yes; then
9133   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9134 fi
9135
9136       fi
9137     fi
9138
9139     # lieder@skyler.mavd.honeywell.com says without -lsocket,
9140     # socket/setsockopt and other routines are undefined under SCO ODT
9141     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
9142     # on later versions), says Simon Leinen: it contains gethostby*
9143     # variants that don't use the nameserver (or something).  -lsocket
9144     # must be given before -lnsl if both are needed.  We assume that
9145     # if connect needs -lnsl, so does gethostbyname.
9146     echo "$as_me:9146: checking for connect" >&5
9147 echo $ECHO_N "checking for connect... $ECHO_C" >&6
9148 if test "${ac_cv_func_connect+set}" = set; then
9149   echo $ECHO_N "(cached) $ECHO_C" >&6
9150 else
9151   cat >conftest.$ac_ext <<_ACEOF
9152 #line 9152 "configure"
9153 #include "confdefs.h"
9154 /* System header to define __stub macros and hopefully few prototypes,
9155     which can conflict with char connect (); below.  */
9156 #include <assert.h>
9157 /* Override any gcc2 internal prototype to avoid an error.  */
9158 #ifdef __cplusplus
9159 extern "C"
9160 #endif
9161 /* We use char because int might match the return type of a gcc2
9162    builtin and then its argument prototype would still apply.  */
9163 char connect ();
9164 char (*f) ();
9165
9166 int
9167 main ()
9168 {
9169 /* The GNU C library defines this for functions which it implements
9170     to always fail with ENOSYS.  Some functions are actually named
9171     something starting with __ and the normal name is an alias.  */
9172 #if defined (__stub_connect) || defined (__stub___connect)
9173 choke me
9174 #else
9175 f = connect;
9176 #endif
9177
9178   ;
9179   return 0;
9180 }
9181 _ACEOF
9182 rm -f conftest.$ac_objext conftest$ac_exeext
9183 if { (eval echo "$as_me:9183: \"$ac_link\"") >&5
9184   (eval $ac_link) 2>&5
9185   ac_status=$?
9186   echo "$as_me:9186: \$? = $ac_status" >&5
9187   (exit $ac_status); } &&
9188          { ac_try='test -s conftest$ac_exeext'
9189   { (eval echo "$as_me:9189: \"$ac_try\"") >&5
9190   (eval $ac_try) 2>&5
9191   ac_status=$?
9192   echo "$as_me:9192: \$? = $ac_status" >&5
9193   (exit $ac_status); }; }; then
9194   ac_cv_func_connect=yes
9195 else
9196   echo "$as_me: failed program was:" >&5
9197 cat conftest.$ac_ext >&5
9198 ac_cv_func_connect=no
9199 fi
9200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9201 fi
9202 echo "$as_me:9202: result: $ac_cv_func_connect" >&5
9203 echo "${ECHO_T}$ac_cv_func_connect" >&6
9204
9205     if test $ac_cv_func_connect = no; then
9206       echo "$as_me:9206: checking for connect in -lsocket" >&5
9207 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9208 if test "${ac_cv_lib_socket_connect+set}" = set; then
9209   echo $ECHO_N "(cached) $ECHO_C" >&6
9210 else
9211   ac_check_lib_save_LIBS=$LIBS
9212 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9213 cat >conftest.$ac_ext <<_ACEOF
9214 #line 9214 "configure"
9215 #include "confdefs.h"
9216
9217 /* Override any gcc2 internal prototype to avoid an error.  */
9218 #ifdef __cplusplus
9219 extern "C"
9220 #endif
9221 /* We use char because int might match the return type of a gcc2
9222    builtin and then its argument prototype would still apply.  */
9223 char connect ();
9224 int
9225 main ()
9226 {
9227 connect ();
9228   ;
9229   return 0;
9230 }
9231 _ACEOF
9232 rm -f conftest.$ac_objext conftest$ac_exeext
9233 if { (eval echo "$as_me:9233: \"$ac_link\"") >&5
9234   (eval $ac_link) 2>&5
9235   ac_status=$?
9236   echo "$as_me:9236: \$? = $ac_status" >&5
9237   (exit $ac_status); } &&
9238          { ac_try='test -s conftest$ac_exeext'
9239   { (eval echo "$as_me:9239: \"$ac_try\"") >&5
9240   (eval $ac_try) 2>&5
9241   ac_status=$?
9242   echo "$as_me:9242: \$? = $ac_status" >&5
9243   (exit $ac_status); }; }; then
9244   ac_cv_lib_socket_connect=yes
9245 else
9246   echo "$as_me: failed program was:" >&5
9247 cat conftest.$ac_ext >&5
9248 ac_cv_lib_socket_connect=no
9249 fi
9250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9251 LIBS=$ac_check_lib_save_LIBS
9252 fi
9253 echo "$as_me:9253: result: $ac_cv_lib_socket_connect" >&5
9254 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9255 if test $ac_cv_lib_socket_connect = yes; then
9256   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9257 fi
9258
9259     fi
9260
9261     # Guillermo Gomez says -lposix is necessary on A/UX.
9262     echo "$as_me:9262: checking for remove" >&5
9263 echo $ECHO_N "checking for remove... $ECHO_C" >&6
9264 if test "${ac_cv_func_remove+set}" = set; then
9265   echo $ECHO_N "(cached) $ECHO_C" >&6
9266 else
9267   cat >conftest.$ac_ext <<_ACEOF
9268 #line 9268 "configure"
9269 #include "confdefs.h"
9270 /* System header to define __stub macros and hopefully few prototypes,
9271     which can conflict with char remove (); below.  */
9272 #include <assert.h>
9273 /* Override any gcc2 internal prototype to avoid an error.  */
9274 #ifdef __cplusplus
9275 extern "C"
9276 #endif
9277 /* We use char because int might match the return type of a gcc2
9278    builtin and then its argument prototype would still apply.  */
9279 char remove ();
9280 char (*f) ();
9281
9282 int
9283 main ()
9284 {
9285 /* The GNU C library defines this for functions which it implements
9286     to always fail with ENOSYS.  Some functions are actually named
9287     something starting with __ and the normal name is an alias.  */
9288 #if defined (__stub_remove) || defined (__stub___remove)
9289 choke me
9290 #else
9291 f = remove;
9292 #endif
9293
9294   ;
9295   return 0;
9296 }
9297 _ACEOF
9298 rm -f conftest.$ac_objext conftest$ac_exeext
9299 if { (eval echo "$as_me:9299: \"$ac_link\"") >&5
9300   (eval $ac_link) 2>&5
9301   ac_status=$?
9302   echo "$as_me:9302: \$? = $ac_status" >&5
9303   (exit $ac_status); } &&
9304          { ac_try='test -s conftest$ac_exeext'
9305   { (eval echo "$as_me:9305: \"$ac_try\"") >&5
9306   (eval $ac_try) 2>&5
9307   ac_status=$?
9308   echo "$as_me:9308: \$? = $ac_status" >&5
9309   (exit $ac_status); }; }; then
9310   ac_cv_func_remove=yes
9311 else
9312   echo "$as_me: failed program was:" >&5
9313 cat conftest.$ac_ext >&5
9314 ac_cv_func_remove=no
9315 fi
9316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9317 fi
9318 echo "$as_me:9318: result: $ac_cv_func_remove" >&5
9319 echo "${ECHO_T}$ac_cv_func_remove" >&6
9320
9321     if test $ac_cv_func_remove = no; then
9322       echo "$as_me:9322: checking for remove in -lposix" >&5
9323 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9324 if test "${ac_cv_lib_posix_remove+set}" = set; then
9325   echo $ECHO_N "(cached) $ECHO_C" >&6
9326 else
9327   ac_check_lib_save_LIBS=$LIBS
9328 LIBS="-lposix  $LIBS"
9329 cat >conftest.$ac_ext <<_ACEOF
9330 #line 9330 "configure"
9331 #include "confdefs.h"
9332
9333 /* Override any gcc2 internal prototype to avoid an error.  */
9334 #ifdef __cplusplus
9335 extern "C"
9336 #endif
9337 /* We use char because int might match the return type of a gcc2
9338    builtin and then its argument prototype would still apply.  */
9339 char remove ();
9340 int
9341 main ()
9342 {
9343 remove ();
9344   ;
9345   return 0;
9346 }
9347 _ACEOF
9348 rm -f conftest.$ac_objext conftest$ac_exeext
9349 if { (eval echo "$as_me:9349: \"$ac_link\"") >&5
9350   (eval $ac_link) 2>&5
9351   ac_status=$?
9352   echo "$as_me:9352: \$? = $ac_status" >&5
9353   (exit $ac_status); } &&
9354          { ac_try='test -s conftest$ac_exeext'
9355   { (eval echo "$as_me:9355: \"$ac_try\"") >&5
9356   (eval $ac_try) 2>&5
9357   ac_status=$?
9358   echo "$as_me:9358: \$? = $ac_status" >&5
9359   (exit $ac_status); }; }; then
9360   ac_cv_lib_posix_remove=yes
9361 else
9362   echo "$as_me: failed program was:" >&5
9363 cat conftest.$ac_ext >&5
9364 ac_cv_lib_posix_remove=no
9365 fi
9366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9367 LIBS=$ac_check_lib_save_LIBS
9368 fi
9369 echo "$as_me:9369: result: $ac_cv_lib_posix_remove" >&5
9370 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9371 if test $ac_cv_lib_posix_remove = yes; then
9372   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9373 fi
9374
9375     fi
9376
9377     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9378     echo "$as_me:9378: checking for shmat" >&5
9379 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9380 if test "${ac_cv_func_shmat+set}" = set; then
9381   echo $ECHO_N "(cached) $ECHO_C" >&6
9382 else
9383   cat >conftest.$ac_ext <<_ACEOF
9384 #line 9384 "configure"
9385 #include "confdefs.h"
9386 /* System header to define __stub macros and hopefully few prototypes,
9387     which can conflict with char shmat (); below.  */
9388 #include <assert.h>
9389 /* Override any gcc2 internal prototype to avoid an error.  */
9390 #ifdef __cplusplus
9391 extern "C"
9392 #endif
9393 /* We use char because int might match the return type of a gcc2
9394    builtin and then its argument prototype would still apply.  */
9395 char shmat ();
9396 char (*f) ();
9397
9398 int
9399 main ()
9400 {
9401 /* The GNU C library defines this for functions which it implements
9402     to always fail with ENOSYS.  Some functions are actually named
9403     something starting with __ and the normal name is an alias.  */
9404 #if defined (__stub_shmat) || defined (__stub___shmat)
9405 choke me
9406 #else
9407 f = shmat;
9408 #endif
9409
9410   ;
9411   return 0;
9412 }
9413 _ACEOF
9414 rm -f conftest.$ac_objext conftest$ac_exeext
9415 if { (eval echo "$as_me:9415: \"$ac_link\"") >&5
9416   (eval $ac_link) 2>&5
9417   ac_status=$?
9418   echo "$as_me:9418: \$? = $ac_status" >&5
9419   (exit $ac_status); } &&
9420          { ac_try='test -s conftest$ac_exeext'
9421   { (eval echo "$as_me:9421: \"$ac_try\"") >&5
9422   (eval $ac_try) 2>&5
9423   ac_status=$?
9424   echo "$as_me:9424: \$? = $ac_status" >&5
9425   (exit $ac_status); }; }; then
9426   ac_cv_func_shmat=yes
9427 else
9428   echo "$as_me: failed program was:" >&5
9429 cat conftest.$ac_ext >&5
9430 ac_cv_func_shmat=no
9431 fi
9432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9433 fi
9434 echo "$as_me:9434: result: $ac_cv_func_shmat" >&5
9435 echo "${ECHO_T}$ac_cv_func_shmat" >&6
9436
9437     if test $ac_cv_func_shmat = no; then
9438       echo "$as_me:9438: checking for shmat in -lipc" >&5
9439 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9440 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9441   echo $ECHO_N "(cached) $ECHO_C" >&6
9442 else
9443   ac_check_lib_save_LIBS=$LIBS
9444 LIBS="-lipc  $LIBS"
9445 cat >conftest.$ac_ext <<_ACEOF
9446 #line 9446 "configure"
9447 #include "confdefs.h"
9448
9449 /* Override any gcc2 internal prototype to avoid an error.  */
9450 #ifdef __cplusplus
9451 extern "C"
9452 #endif
9453 /* We use char because int might match the return type of a gcc2
9454    builtin and then its argument prototype would still apply.  */
9455 char shmat ();
9456 int
9457 main ()
9458 {
9459 shmat ();
9460   ;
9461   return 0;
9462 }
9463 _ACEOF
9464 rm -f conftest.$ac_objext conftest$ac_exeext
9465 if { (eval echo "$as_me:9465: \"$ac_link\"") >&5
9466   (eval $ac_link) 2>&5
9467   ac_status=$?
9468   echo "$as_me:9468: \$? = $ac_status" >&5
9469   (exit $ac_status); } &&
9470          { ac_try='test -s conftest$ac_exeext'
9471   { (eval echo "$as_me:9471: \"$ac_try\"") >&5
9472   (eval $ac_try) 2>&5
9473   ac_status=$?
9474   echo "$as_me:9474: \$? = $ac_status" >&5
9475   (exit $ac_status); }; }; then
9476   ac_cv_lib_ipc_shmat=yes
9477 else
9478   echo "$as_me: failed program was:" >&5
9479 cat conftest.$ac_ext >&5
9480 ac_cv_lib_ipc_shmat=no
9481 fi
9482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9483 LIBS=$ac_check_lib_save_LIBS
9484 fi
9485 echo "$as_me:9485: result: $ac_cv_lib_ipc_shmat" >&5
9486 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9487 if test $ac_cv_lib_ipc_shmat = yes; then
9488   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9489 fi
9490
9491     fi
9492   fi
9493
9494   # Check for libraries that X11R6 Xt/Xaw programs need.
9495   ac_save_LDFLAGS=$LDFLAGS
9496   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9497   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9498   # check for ICE first), but we must link in the order -lSM -lICE or
9499   # we get undefined symbols.  So assume we have SM if we have ICE.
9500   # These have to be linked with before -lX11, unlike the other
9501   # libraries we check for below, so use a different variable.
9502   # John Interrante, Karl Berry
9503   echo "$as_me:9503: checking for IceConnectionNumber in -lICE" >&5
9504 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9505 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9506   echo $ECHO_N "(cached) $ECHO_C" >&6
9507 else
9508   ac_check_lib_save_LIBS=$LIBS
9509 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9510 cat >conftest.$ac_ext <<_ACEOF
9511 #line 9511 "configure"
9512 #include "confdefs.h"
9513
9514 /* Override any gcc2 internal prototype to avoid an error.  */
9515 #ifdef __cplusplus
9516 extern "C"
9517 #endif
9518 /* We use char because int might match the return type of a gcc2
9519    builtin and then its argument prototype would still apply.  */
9520 char IceConnectionNumber ();
9521 int
9522 main ()
9523 {
9524 IceConnectionNumber ();
9525   ;
9526   return 0;
9527 }
9528 _ACEOF
9529 rm -f conftest.$ac_objext conftest$ac_exeext
9530 if { (eval echo "$as_me:9530: \"$ac_link\"") >&5
9531   (eval $ac_link) 2>&5
9532   ac_status=$?
9533   echo "$as_me:9533: \$? = $ac_status" >&5
9534   (exit $ac_status); } &&
9535          { ac_try='test -s conftest$ac_exeext'
9536   { (eval echo "$as_me:9536: \"$ac_try\"") >&5
9537   (eval $ac_try) 2>&5
9538   ac_status=$?
9539   echo "$as_me:9539: \$? = $ac_status" >&5
9540   (exit $ac_status); }; }; then
9541   ac_cv_lib_ICE_IceConnectionNumber=yes
9542 else
9543   echo "$as_me: failed program was:" >&5
9544 cat conftest.$ac_ext >&5
9545 ac_cv_lib_ICE_IceConnectionNumber=no
9546 fi
9547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9548 LIBS=$ac_check_lib_save_LIBS
9549 fi
9550 echo "$as_me:9550: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9551 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9552 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
9553   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9554 fi
9555
9556   LDFLAGS=$ac_save_LDFLAGS
9557
9558 fi
9559
9560 cf_x_athena=${cf_x_athena:-Xaw}
9561
9562 echo "$as_me:9562: checking if you want to link with Xaw 3d library" >&5
9563 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
9564 withval=
9565
9566 # Check whether --with-Xaw3d or --without-Xaw3d was given.
9567 if test "${with_Xaw3d+set}" = set; then
9568   withval="$with_Xaw3d"
9569
9570 fi;
9571 if test "$withval" = yes ; then
9572         cf_x_athena=Xaw3d
9573         echo "$as_me:9573: result: yes" >&5
9574 echo "${ECHO_T}yes" >&6
9575 else
9576         echo "$as_me:9576: result: no" >&5
9577 echo "${ECHO_T}no" >&6
9578 fi
9579
9580 echo "$as_me:9580: checking if you want to link with neXT Athena library" >&5
9581 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
9582 withval=
9583
9584 # Check whether --with-neXtaw or --without-neXtaw was given.
9585 if test "${with_neXtaw+set}" = set; then
9586   withval="$with_neXtaw"
9587
9588 fi;
9589 if test "$withval" = yes ; then
9590         cf_x_athena=neXtaw
9591         echo "$as_me:9591: result: yes" >&5
9592 echo "${ECHO_T}yes" >&6
9593 else
9594         echo "$as_me:9594: result: no" >&5
9595 echo "${ECHO_T}no" >&6
9596 fi
9597
9598 echo "$as_me:9598: checking if you want to link with Athena-Plus library" >&5
9599 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
9600 withval=
9601
9602 # Check whether --with-XawPlus or --without-XawPlus was given.
9603 if test "${with_XawPlus+set}" = set; then
9604   withval="$with_XawPlus"
9605
9606 fi;
9607 if test "$withval" = yes ; then
9608         cf_x_athena=XawPlus
9609         echo "$as_me:9609: result: yes" >&5
9610 echo "${ECHO_T}yes" >&6
9611 else
9612         echo "$as_me:9612: result: no" >&5
9613 echo "${ECHO_T}no" >&6
9614 fi
9615
9616 cf_x_athena_lib=""
9617
9618 if test "$PKG_CONFIG" != none ; then
9619         cf_athena_list=
9620         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
9621         for cf_athena_pkg in \
9622                 $cf_athena_list \
9623                 ${cf_x_athena} \
9624                 ${cf_x_athena}-devel \
9625                 lib${cf_x_athena} \
9626                 lib${cf_x_athena}-devel
9627         do
9628
9629 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
9630         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
9631
9632 echo "${as_me:-configure}:9632: testing found package $cf_athena_pkg ..." 1>&5
9633
9634         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
9635         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
9636         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
9637
9638 echo "${as_me:-configure}:9638: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9639
9640         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
9641
9642 echo "${as_me:-configure}:9642: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
9643
9644 cf_fix_cppflags=no
9645 cf_new_cflags=
9646 cf_new_cppflags=
9647 cf_new_extra_cppflags=
9648
9649 for cf_add_cflags in $cf_pkgconfig_incs
9650 do
9651 case $cf_fix_cppflags in
9652 no)
9653         case $cf_add_cflags in #(vi
9654         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9655                 case $cf_add_cflags in
9656                 -D*)
9657                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9658
9659                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9660                                 && test -z "${cf_tst_cflags}" \
9661                                 && cf_fix_cppflags=yes
9662
9663                         if test $cf_fix_cppflags = yes ; then
9664                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9665                                 continue
9666                         elif test "${cf_tst_cflags}" = "\"'" ; then
9667                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9668                                 continue
9669                         fi
9670                         ;;
9671                 esac
9672                 case "$CPPFLAGS" in
9673                 *$cf_add_cflags) #(vi
9674                         ;;
9675                 *) #(vi
9676                         case $cf_add_cflags in #(vi
9677                         -D*)
9678                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9679
9680 CPPFLAGS=`echo "$CPPFLAGS" | \
9681         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9682                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9683
9684                                 ;;
9685                         esac
9686                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9687                         ;;
9688                 esac
9689                 ;;
9690         *)
9691                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9692                 ;;
9693         esac
9694         ;;
9695 yes)
9696         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9697
9698         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9699
9700         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9701                 && test -z "${cf_tst_cflags}" \
9702                 && cf_fix_cppflags=no
9703         ;;
9704 esac
9705 done
9706
9707 if test -n "$cf_new_cflags" ; then
9708
9709         CFLAGS="$CFLAGS $cf_new_cflags"
9710 fi
9711
9712 if test -n "$cf_new_cppflags" ; then
9713
9714         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9715 fi
9716
9717 if test -n "$cf_new_extra_cppflags" ; then
9718
9719         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9720 fi
9721
9722         LIBS="$cf_pkgconfig_libs $LIBS"
9723
9724                         cf_x_athena_lib="$cf_pkgconfig_libs"
9725
9726 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9727
9728                         cat >>confdefs.h <<EOF
9729 #define $cf_x_athena_LIBS 1
9730 EOF
9731
9732 echo "$as_me:9732: checking for usable $cf_x_athena/Xmu package" >&5
9733 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
9734 if test "${cf_cv_xaw_compat+set}" = set; then
9735   echo $ECHO_N "(cached) $ECHO_C" >&6
9736 else
9737
9738 cat >conftest.$ac_ext <<_ACEOF
9739 #line 9739 "configure"
9740 #include "confdefs.h"
9741
9742 #include <X11/Xmu/CharSet.h>
9743
9744 int
9745 main ()
9746 {
9747
9748 int check = XmuCompareISOLatin1("big", "small")
9749
9750   ;
9751   return 0;
9752 }
9753 _ACEOF
9754 rm -f conftest.$ac_objext conftest$ac_exeext
9755 if { (eval echo "$as_me:9755: \"$ac_link\"") >&5
9756   (eval $ac_link) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); } &&
9760          { ac_try='test -s conftest$ac_exeext'
9761   { (eval echo "$as_me:9761: \"$ac_try\"") >&5
9762   (eval $ac_try) 2>&5
9763   ac_status=$?
9764   echo "$as_me:9764: \$? = $ac_status" >&5
9765   (exit $ac_status); }; }; then
9766   cf_cv_xaw_compat=yes
9767 else
9768   echo "$as_me: failed program was:" >&5
9769 cat conftest.$ac_ext >&5
9770 cf_cv_xaw_compat=no
9771 fi
9772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9773 fi
9774 echo "$as_me:9774: result: $cf_cv_xaw_compat" >&5
9775 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
9776
9777                         if test "$cf_cv_xaw_compat" = no
9778                         then
9779                                 # workaround for broken ".pc" files...
9780                                 case "$cf_x_athena_lib" in #(vi
9781                                 *-lXmu*) #(vi
9782                                         ;;
9783                                 *)
9784                                         test -n "$verbose" && echo "    work around broken package" 1>&6
9785
9786 echo "${as_me:-configure}:9786: testing work around broken package ..." 1>&5
9787
9788 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
9789         test -n "$verbose" && echo "    found package xmu" 1>&6
9790
9791 echo "${as_me:-configure}:9791: testing found package xmu ..." 1>&5
9792
9793         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
9794         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
9795         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
9796
9797 echo "${as_me:-configure}:9797: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9798
9799         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
9800
9801 echo "${as_me:-configure}:9801: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
9802
9803 cf_fix_cppflags=no
9804 cf_new_cflags=
9805 cf_new_cppflags=
9806 cf_new_extra_cppflags=
9807
9808 for cf_add_cflags in $cf_pkgconfig_incs
9809 do
9810 case $cf_fix_cppflags in
9811 no)
9812         case $cf_add_cflags in #(vi
9813         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9814                 case $cf_add_cflags in
9815                 -D*)
9816                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9817
9818                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9819                                 && test -z "${cf_tst_cflags}" \
9820                                 && cf_fix_cppflags=yes
9821
9822                         if test $cf_fix_cppflags = yes ; then
9823                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9824                                 continue
9825                         elif test "${cf_tst_cflags}" = "\"'" ; then
9826                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9827                                 continue
9828                         fi
9829                         ;;
9830                 esac
9831                 case "$CPPFLAGS" in
9832                 *$cf_add_cflags) #(vi
9833                         ;;
9834                 *) #(vi
9835                         case $cf_add_cflags in #(vi
9836                         -D*)
9837                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9838
9839 CPPFLAGS=`echo "$CPPFLAGS" | \
9840         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9841                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9842
9843                                 ;;
9844                         esac
9845                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9846                         ;;
9847                 esac
9848                 ;;
9849         *)
9850                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9851                 ;;
9852         esac
9853         ;;
9854 yes)
9855         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9856
9857         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9858
9859         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9860                 && test -z "${cf_tst_cflags}" \
9861                 && cf_fix_cppflags=no
9862         ;;
9863 esac
9864 done
9865
9866 if test -n "$cf_new_cflags" ; then
9867
9868         CFLAGS="$CFLAGS $cf_new_cflags"
9869 fi
9870
9871 if test -n "$cf_new_cppflags" ; then
9872
9873         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9874 fi
9875
9876 if test -n "$cf_new_extra_cppflags" ; then
9877
9878         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9879 fi
9880
9881         LIBS="$cf_pkgconfig_libs $LIBS"
9882         :
9883 else
9884
9885 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
9886
9887 echo "${as_me:-configure}:9887: testing ...before $LIBS ..." 1>&5
9888
9889 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
9890 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
9891
9892 echo "${as_me:-configure}:9892: testing ...after  $LIBS ..." 1>&5
9893
9894 fi
9895
9896                                         ;;
9897                                 esac
9898                         fi
9899
9900                         break
9901 else
9902         :
9903 fi
9904
9905         done
9906 fi
9907
9908 if test -z "$cf_x_athena_lib" ; then
9909
9910 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
9911         test -n "$verbose" && echo "    found package Xext" 1>&6
9912
9913 echo "${as_me:-configure}:9913: testing found package Xext ..." 1>&5
9914
9915         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
9916         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
9917         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
9918
9919 echo "${as_me:-configure}:9919: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9920
9921         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
9922
9923 echo "${as_me:-configure}:9923: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
9924
9925 cf_fix_cppflags=no
9926 cf_new_cflags=
9927 cf_new_cppflags=
9928 cf_new_extra_cppflags=
9929
9930 for cf_add_cflags in $cf_pkgconfig_incs
9931 do
9932 case $cf_fix_cppflags in
9933 no)
9934         case $cf_add_cflags in #(vi
9935         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9936                 case $cf_add_cflags in
9937                 -D*)
9938                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9939
9940                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9941                                 && test -z "${cf_tst_cflags}" \
9942                                 && cf_fix_cppflags=yes
9943
9944                         if test $cf_fix_cppflags = yes ; then
9945                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9946                                 continue
9947                         elif test "${cf_tst_cflags}" = "\"'" ; then
9948                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9949                                 continue
9950                         fi
9951                         ;;
9952                 esac
9953                 case "$CPPFLAGS" in
9954                 *$cf_add_cflags) #(vi
9955                         ;;
9956                 *) #(vi
9957                         case $cf_add_cflags in #(vi
9958                         -D*)
9959                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9960
9961 CPPFLAGS=`echo "$CPPFLAGS" | \
9962         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9963                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9964
9965                                 ;;
9966                         esac
9967                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9968                         ;;
9969                 esac
9970                 ;;
9971         *)
9972                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9973                 ;;
9974         esac
9975         ;;
9976 yes)
9977         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9978
9979         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9980
9981         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9982                 && test -z "${cf_tst_cflags}" \
9983                 && cf_fix_cppflags=no
9984         ;;
9985 esac
9986 done
9987
9988 if test -n "$cf_new_cflags" ; then
9989
9990         CFLAGS="$CFLAGS $cf_new_cflags"
9991 fi
9992
9993 if test -n "$cf_new_cppflags" ; then
9994
9995         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9996 fi
9997
9998 if test -n "$cf_new_extra_cppflags" ; then
9999
10000         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10001 fi
10002
10003         LIBS="$cf_pkgconfig_libs $LIBS"
10004         :
10005 else
10006
10007         echo "$as_me:10007: checking for XextCreateExtension in -lXext" >&5
10008 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10009 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10010   echo $ECHO_N "(cached) $ECHO_C" >&6
10011 else
10012   ac_check_lib_save_LIBS=$LIBS
10013 LIBS="-lXext  $LIBS"
10014 cat >conftest.$ac_ext <<_ACEOF
10015 #line 10015 "configure"
10016 #include "confdefs.h"
10017
10018 /* Override any gcc2 internal prototype to avoid an error.  */
10019 #ifdef __cplusplus
10020 extern "C"
10021 #endif
10022 /* We use char because int might match the return type of a gcc2
10023    builtin and then its argument prototype would still apply.  */
10024 char XextCreateExtension ();
10025 int
10026 main ()
10027 {
10028 XextCreateExtension ();
10029   ;
10030   return 0;
10031 }
10032 _ACEOF
10033 rm -f conftest.$ac_objext conftest$ac_exeext
10034 if { (eval echo "$as_me:10034: \"$ac_link\"") >&5
10035   (eval $ac_link) 2>&5
10036   ac_status=$?
10037   echo "$as_me:10037: \$? = $ac_status" >&5
10038   (exit $ac_status); } &&
10039          { ac_try='test -s conftest$ac_exeext'
10040   { (eval echo "$as_me:10040: \"$ac_try\"") >&5
10041   (eval $ac_try) 2>&5
10042   ac_status=$?
10043   echo "$as_me:10043: \$? = $ac_status" >&5
10044   (exit $ac_status); }; }; then
10045   ac_cv_lib_Xext_XextCreateExtension=yes
10046 else
10047   echo "$as_me: failed program was:" >&5
10048 cat conftest.$ac_ext >&5
10049 ac_cv_lib_Xext_XextCreateExtension=no
10050 fi
10051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10052 LIBS=$ac_check_lib_save_LIBS
10053 fi
10054 echo "$as_me:10054: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10055 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10056 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10057   LIBS="-lXext $LIBS"
10058 fi
10059
10060 fi
10061
10062 cf_have_X_LIBS=no
10063
10064 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
10065         test -n "$verbose" && echo "    found package xt" 1>&6
10066
10067 echo "${as_me:-configure}:10067: testing found package xt ..." 1>&5
10068
10069         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
10070         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
10071         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10072
10073 echo "${as_me:-configure}:10073: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10074
10075         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
10076
10077 echo "${as_me:-configure}:10077: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10078
10079 cf_fix_cppflags=no
10080 cf_new_cflags=
10081 cf_new_cppflags=
10082 cf_new_extra_cppflags=
10083
10084 for cf_add_cflags in $cf_pkgconfig_incs
10085 do
10086 case $cf_fix_cppflags in
10087 no)
10088         case $cf_add_cflags in #(vi
10089         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10090                 case $cf_add_cflags in
10091                 -D*)
10092                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10093
10094                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10095                                 && test -z "${cf_tst_cflags}" \
10096                                 && cf_fix_cppflags=yes
10097
10098                         if test $cf_fix_cppflags = yes ; then
10099                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10100                                 continue
10101                         elif test "${cf_tst_cflags}" = "\"'" ; then
10102                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10103                                 continue
10104                         fi
10105                         ;;
10106                 esac
10107                 case "$CPPFLAGS" in
10108                 *$cf_add_cflags) #(vi
10109                         ;;
10110                 *) #(vi
10111                         case $cf_add_cflags in #(vi
10112                         -D*)
10113                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10114
10115 CPPFLAGS=`echo "$CPPFLAGS" | \
10116         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10117                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10118
10119                                 ;;
10120                         esac
10121                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10122                         ;;
10123                 esac
10124                 ;;
10125         *)
10126                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10127                 ;;
10128         esac
10129         ;;
10130 yes)
10131         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10132
10133         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10134
10135         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10136                 && test -z "${cf_tst_cflags}" \
10137                 && cf_fix_cppflags=no
10138         ;;
10139 esac
10140 done
10141
10142 if test -n "$cf_new_cflags" ; then
10143
10144         CFLAGS="$CFLAGS $cf_new_cflags"
10145 fi
10146
10147 if test -n "$cf_new_cppflags" ; then
10148
10149         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10150 fi
10151
10152 if test -n "$cf_new_extra_cppflags" ; then
10153
10154         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10155 fi
10156
10157         LIBS="$cf_pkgconfig_libs $LIBS"
10158
10159 echo "$as_me:10159: checking for usable X Toolkit package" >&5
10160 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
10161 if test "${cf_cv_xt_compat+set}" = set; then
10162   echo $ECHO_N "(cached) $ECHO_C" >&6
10163 else
10164
10165 cat >conftest.$ac_ext <<_ACEOF
10166 #line 10166 "configure"
10167 #include "confdefs.h"
10168
10169 #include <X11/Shell.h>
10170
10171 int
10172 main ()
10173 {
10174 int num = IceConnectionNumber(0)
10175
10176   ;
10177   return 0;
10178 }
10179 _ACEOF
10180 rm -f conftest.$ac_objext conftest$ac_exeext
10181 if { (eval echo "$as_me:10181: \"$ac_link\"") >&5
10182   (eval $ac_link) 2>&5
10183   ac_status=$?
10184   echo "$as_me:10184: \$? = $ac_status" >&5
10185   (exit $ac_status); } &&
10186          { ac_try='test -s conftest$ac_exeext'
10187   { (eval echo "$as_me:10187: \"$ac_try\"") >&5
10188   (eval $ac_try) 2>&5
10189   ac_status=$?
10190   echo "$as_me:10190: \$? = $ac_status" >&5
10191   (exit $ac_status); }; }; then
10192   cf_cv_xt_compat=no
10193 else
10194   echo "$as_me: failed program was:" >&5
10195 cat conftest.$ac_ext >&5
10196 cf_cv_xt_compat=no
10197 fi
10198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10199 fi
10200 echo "$as_me:10200: result: $cf_cv_xt_compat" >&5
10201 echo "${ECHO_T}$cf_cv_xt_compat" >&6
10202
10203         if test "$cf_cv_xt_compat" = no
10204         then
10205                 # workaround for broken ".pc" files used for X Toolkit.
10206                 case "x$X_PRE_LIBS" in #(vi
10207                 *-lICE*)
10208                         case "x$LIBS" in #(vi
10209                         *-lICE*) #(vi
10210                                 ;;
10211                         *)
10212                                 test -n "$verbose" && echo "    work around broken package" 1>&6
10213
10214 echo "${as_me:-configure}:10214: testing work around broken package ..." 1>&5
10215
10216 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10217         test -n "$verbose" && echo "    found package ice" 1>&6
10218
10219 echo "${as_me:-configure}:10219: testing found package ice ..." 1>&5
10220
10221         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10222         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
10223         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10224
10225 echo "${as_me:-configure}:10225: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10226
10227         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
10228
10229 echo "${as_me:-configure}:10229: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10230
10231 cf_fix_cppflags=no
10232 cf_new_cflags=
10233 cf_new_cppflags=
10234 cf_new_extra_cppflags=
10235
10236 for cf_add_cflags in $cf_pkgconfig_incs
10237 do
10238 case $cf_fix_cppflags in
10239 no)
10240         case $cf_add_cflags in #(vi
10241         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10242                 case $cf_add_cflags in
10243                 -D*)
10244                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10245
10246                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10247                                 && test -z "${cf_tst_cflags}" \
10248                                 && cf_fix_cppflags=yes
10249
10250                         if test $cf_fix_cppflags = yes ; then
10251                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10252                                 continue
10253                         elif test "${cf_tst_cflags}" = "\"'" ; then
10254                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10255                                 continue
10256                         fi
10257                         ;;
10258                 esac
10259                 case "$CPPFLAGS" in
10260                 *$cf_add_cflags) #(vi
10261                         ;;
10262                 *) #(vi
10263                         case $cf_add_cflags in #(vi
10264                         -D*)
10265                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10266
10267 CPPFLAGS=`echo "$CPPFLAGS" | \
10268         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10269                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10270
10271                                 ;;
10272                         esac
10273                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10274                         ;;
10275                 esac
10276                 ;;
10277         *)
10278                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10279                 ;;
10280         esac
10281         ;;
10282 yes)
10283         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10284
10285         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10286
10287         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10288                 && test -z "${cf_tst_cflags}" \
10289                 && cf_fix_cppflags=no
10290         ;;
10291 esac
10292 done
10293
10294 if test -n "$cf_new_cflags" ; then
10295
10296         CFLAGS="$CFLAGS $cf_new_cflags"
10297 fi
10298
10299 if test -n "$cf_new_cppflags" ; then
10300
10301         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10302 fi
10303
10304 if test -n "$cf_new_extra_cppflags" ; then
10305
10306         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10307 fi
10308
10309         LIBS="$cf_pkgconfig_libs $LIBS"
10310
10311 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
10312         test -n "$verbose" && echo "    found package sm" 1>&6
10313
10314 echo "${as_me:-configure}:10314: testing found package sm ..." 1>&5
10315
10316         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
10317         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
10318         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10319
10320 echo "${as_me:-configure}:10320: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10321
10322         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
10323
10324 echo "${as_me:-configure}:10324: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10325
10326 cf_fix_cppflags=no
10327 cf_new_cflags=
10328 cf_new_cppflags=
10329 cf_new_extra_cppflags=
10330
10331 for cf_add_cflags in $cf_pkgconfig_incs
10332 do
10333 case $cf_fix_cppflags in
10334 no)
10335         case $cf_add_cflags in #(vi
10336         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10337                 case $cf_add_cflags in
10338                 -D*)
10339                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10340
10341                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10342                                 && test -z "${cf_tst_cflags}" \
10343                                 && cf_fix_cppflags=yes
10344
10345                         if test $cf_fix_cppflags = yes ; then
10346                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10347                                 continue
10348                         elif test "${cf_tst_cflags}" = "\"'" ; then
10349                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10350                                 continue
10351                         fi
10352                         ;;
10353                 esac
10354                 case "$CPPFLAGS" in
10355                 *$cf_add_cflags) #(vi
10356                         ;;
10357                 *) #(vi
10358                         case $cf_add_cflags in #(vi
10359                         -D*)
10360                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10361
10362 CPPFLAGS=`echo "$CPPFLAGS" | \
10363         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10364                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10365
10366                                 ;;
10367                         esac
10368                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10369                         ;;
10370                 esac
10371                 ;;
10372         *)
10373                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10374                 ;;
10375         esac
10376         ;;
10377 yes)
10378         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10379
10380         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10381
10382         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10383                 && test -z "${cf_tst_cflags}" \
10384                 && cf_fix_cppflags=no
10385         ;;
10386 esac
10387 done
10388
10389 if test -n "$cf_new_cflags" ; then
10390
10391         CFLAGS="$CFLAGS $cf_new_cflags"
10392 fi
10393
10394 if test -n "$cf_new_cppflags" ; then
10395
10396         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10397 fi
10398
10399 if test -n "$cf_new_extra_cppflags" ; then
10400
10401         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10402 fi
10403
10404         LIBS="$cf_pkgconfig_libs $LIBS"
10405         :
10406 else
10407         :
10408 fi
10409
10410 else
10411
10412 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10413
10414 echo "${as_me:-configure}:10414: testing ...before $LIBS ..." 1>&5
10415
10416 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
10417 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10418
10419 echo "${as_me:-configure}:10419: testing ...after  $LIBS ..." 1>&5
10420
10421 fi
10422
10423                                 ;;
10424                         esac
10425                         ;;
10426                 esac
10427         fi
10428
10429         cf_have_X_LIBS=yes
10430
10431 else
10432
10433         LDFLAGS="$X_LIBS $LDFLAGS"
10434
10435 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
10436
10437 echo "${as_me:-configure}:10437: testing checking additions to CFLAGS ..." 1>&5
10438
10439 cf_check_cflags="$CFLAGS"
10440 cf_check_cppflags="$CPPFLAGS"
10441
10442 cf_fix_cppflags=no
10443 cf_new_cflags=
10444 cf_new_cppflags=
10445 cf_new_extra_cppflags=
10446
10447 for cf_add_cflags in $X_CFLAGS
10448 do
10449 case $cf_fix_cppflags in
10450 no)
10451         case $cf_add_cflags in #(vi
10452         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10453                 case $cf_add_cflags in
10454                 -D*)
10455                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10456
10457                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10458                                 && test -z "${cf_tst_cflags}" \
10459                                 && cf_fix_cppflags=yes
10460
10461                         if test $cf_fix_cppflags = yes ; then
10462                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10463                                 continue
10464                         elif test "${cf_tst_cflags}" = "\"'" ; then
10465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10466                                 continue
10467                         fi
10468                         ;;
10469                 esac
10470                 case "$CPPFLAGS" in
10471                 *$cf_add_cflags) #(vi
10472                         ;;
10473                 *) #(vi
10474                         case $cf_add_cflags in #(vi
10475                         -D*)
10476                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10477
10478 CPPFLAGS=`echo "$CPPFLAGS" | \
10479         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10480                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10481
10482                                 ;;
10483                         esac
10484                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10485                         ;;
10486                 esac
10487                 ;;
10488         *)
10489                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10490                 ;;
10491         esac
10492         ;;
10493 yes)
10494         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10495
10496         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10497
10498         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10499                 && test -z "${cf_tst_cflags}" \
10500                 && cf_fix_cppflags=no
10501         ;;
10502 esac
10503 done
10504
10505 if test -n "$cf_new_cflags" ; then
10506         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10507
10508 echo "${as_me:-configure}:10508: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10509
10510         CFLAGS="$CFLAGS $cf_new_cflags"
10511 fi
10512
10513 if test -n "$cf_new_cppflags" ; then
10514         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10515
10516 echo "${as_me:-configure}:10516: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10517
10518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10519 fi
10520
10521 if test -n "$cf_new_extra_cppflags" ; then
10522         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10523
10524 echo "${as_me:-configure}:10524: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10525
10526         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10527 fi
10528
10529 if test "$cf_check_cflags" != "$CFLAGS" ; then
10530 cat >conftest.$ac_ext <<_ACEOF
10531 #line 10531 "configure"
10532 #include "confdefs.h"
10533 #include <stdio.h>
10534 int
10535 main ()
10536 {
10537 printf("Hello world");
10538   ;
10539   return 0;
10540 }
10541 _ACEOF
10542 rm -f conftest.$ac_objext conftest$ac_exeext
10543 if { (eval echo "$as_me:10543: \"$ac_link\"") >&5
10544   (eval $ac_link) 2>&5
10545   ac_status=$?
10546   echo "$as_me:10546: \$? = $ac_status" >&5
10547   (exit $ac_status); } &&
10548          { ac_try='test -s conftest$ac_exeext'
10549   { (eval echo "$as_me:10549: \"$ac_try\"") >&5
10550   (eval $ac_try) 2>&5
10551   ac_status=$?
10552   echo "$as_me:10552: \$? = $ac_status" >&5
10553   (exit $ac_status); }; }; then
10554   :
10555 else
10556   echo "$as_me: failed program was:" >&5
10557 cat conftest.$ac_ext >&5
10558 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
10559
10560 echo "${as_me:-configure}:10560: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
10561
10562          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
10563                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
10564
10565 echo "${as_me:-configure}:10565: testing but keeping change to \$CPPFLAGS ..." 1>&5
10566
10567          fi
10568          CFLAGS="$cf_check_flags"
10569 fi
10570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10571 fi
10572
10573         echo "$as_me:10573: checking for XOpenDisplay" >&5
10574 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
10575 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
10576   echo $ECHO_N "(cached) $ECHO_C" >&6
10577 else
10578   cat >conftest.$ac_ext <<_ACEOF
10579 #line 10579 "configure"
10580 #include "confdefs.h"
10581 /* System header to define __stub macros and hopefully few prototypes,
10582     which can conflict with char XOpenDisplay (); below.  */
10583 #include <assert.h>
10584 /* Override any gcc2 internal prototype to avoid an error.  */
10585 #ifdef __cplusplus
10586 extern "C"
10587 #endif
10588 /* We use char because int might match the return type of a gcc2
10589    builtin and then its argument prototype would still apply.  */
10590 char XOpenDisplay ();
10591 char (*f) ();
10592
10593 int
10594 main ()
10595 {
10596 /* The GNU C library defines this for functions which it implements
10597     to always fail with ENOSYS.  Some functions are actually named
10598     something starting with __ and the normal name is an alias.  */
10599 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
10600 choke me
10601 #else
10602 f = XOpenDisplay;
10603 #endif
10604
10605   ;
10606   return 0;
10607 }
10608 _ACEOF
10609 rm -f conftest.$ac_objext conftest$ac_exeext
10610 if { (eval echo "$as_me:10610: \"$ac_link\"") >&5
10611   (eval $ac_link) 2>&5
10612   ac_status=$?
10613   echo "$as_me:10613: \$? = $ac_status" >&5
10614   (exit $ac_status); } &&
10615          { ac_try='test -s conftest$ac_exeext'
10616   { (eval echo "$as_me:10616: \"$ac_try\"") >&5
10617   (eval $ac_try) 2>&5
10618   ac_status=$?
10619   echo "$as_me:10619: \$? = $ac_status" >&5
10620   (exit $ac_status); }; }; then
10621   ac_cv_func_XOpenDisplay=yes
10622 else
10623   echo "$as_me: failed program was:" >&5
10624 cat conftest.$ac_ext >&5
10625 ac_cv_func_XOpenDisplay=no
10626 fi
10627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10628 fi
10629 echo "$as_me:10629: result: $ac_cv_func_XOpenDisplay" >&5
10630 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
10631 if test $ac_cv_func_XOpenDisplay = yes; then
10632   :
10633 else
10634
10635         echo "$as_me:10635: checking for XOpenDisplay in -lX11" >&5
10636 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
10637 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
10638   echo $ECHO_N "(cached) $ECHO_C" >&6
10639 else
10640   ac_check_lib_save_LIBS=$LIBS
10641 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10642 cat >conftest.$ac_ext <<_ACEOF
10643 #line 10643 "configure"
10644 #include "confdefs.h"
10645
10646 /* Override any gcc2 internal prototype to avoid an error.  */
10647 #ifdef __cplusplus
10648 extern "C"
10649 #endif
10650 /* We use char because int might match the return type of a gcc2
10651    builtin and then its argument prototype would still apply.  */
10652 char XOpenDisplay ();
10653 int
10654 main ()
10655 {
10656 XOpenDisplay ();
10657   ;
10658   return 0;
10659 }
10660 _ACEOF
10661 rm -f conftest.$ac_objext conftest$ac_exeext
10662 if { (eval echo "$as_me:10662: \"$ac_link\"") >&5
10663   (eval $ac_link) 2>&5
10664   ac_status=$?
10665   echo "$as_me:10665: \$? = $ac_status" >&5
10666   (exit $ac_status); } &&
10667          { ac_try='test -s conftest$ac_exeext'
10668   { (eval echo "$as_me:10668: \"$ac_try\"") >&5
10669   (eval $ac_try) 2>&5
10670   ac_status=$?
10671   echo "$as_me:10671: \$? = $ac_status" >&5
10672   (exit $ac_status); }; }; then
10673   ac_cv_lib_X11_XOpenDisplay=yes
10674 else
10675   echo "$as_me: failed program was:" >&5
10676 cat conftest.$ac_ext >&5
10677 ac_cv_lib_X11_XOpenDisplay=no
10678 fi
10679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10680 LIBS=$ac_check_lib_save_LIBS
10681 fi
10682 echo "$as_me:10682: result: $ac_cv_lib_X11_XOpenDisplay" >&5
10683 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
10684 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
10685   LIBS="-lX11 $LIBS"
10686 fi
10687
10688 fi
10689
10690         echo "$as_me:10690: checking for XtAppInitialize" >&5
10691 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
10692 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695   cat >conftest.$ac_ext <<_ACEOF
10696 #line 10696 "configure"
10697 #include "confdefs.h"
10698 /* System header to define __stub macros and hopefully few prototypes,
10699     which can conflict with char XtAppInitialize (); below.  */
10700 #include <assert.h>
10701 /* Override any gcc2 internal prototype to avoid an error.  */
10702 #ifdef __cplusplus
10703 extern "C"
10704 #endif
10705 /* We use char because int might match the return type of a gcc2
10706    builtin and then its argument prototype would still apply.  */
10707 char XtAppInitialize ();
10708 char (*f) ();
10709
10710 int
10711 main ()
10712 {
10713 /* The GNU C library defines this for functions which it implements
10714     to always fail with ENOSYS.  Some functions are actually named
10715     something starting with __ and the normal name is an alias.  */
10716 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
10717 choke me
10718 #else
10719 f = XtAppInitialize;
10720 #endif
10721
10722   ;
10723   return 0;
10724 }
10725 _ACEOF
10726 rm -f conftest.$ac_objext conftest$ac_exeext
10727 if { (eval echo "$as_me:10727: \"$ac_link\"") >&5
10728   (eval $ac_link) 2>&5
10729   ac_status=$?
10730   echo "$as_me:10730: \$? = $ac_status" >&5
10731   (exit $ac_status); } &&
10732          { ac_try='test -s conftest$ac_exeext'
10733   { (eval echo "$as_me:10733: \"$ac_try\"") >&5
10734   (eval $ac_try) 2>&5
10735   ac_status=$?
10736   echo "$as_me:10736: \$? = $ac_status" >&5
10737   (exit $ac_status); }; }; then
10738   ac_cv_func_XtAppInitialize=yes
10739 else
10740   echo "$as_me: failed program was:" >&5
10741 cat conftest.$ac_ext >&5
10742 ac_cv_func_XtAppInitialize=no
10743 fi
10744 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10745 fi
10746 echo "$as_me:10746: result: $ac_cv_func_XtAppInitialize" >&5
10747 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
10748 if test $ac_cv_func_XtAppInitialize = yes; then
10749   :
10750 else
10751
10752         echo "$as_me:10752: checking for XtAppInitialize in -lXt" >&5
10753 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
10754 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
10755   echo $ECHO_N "(cached) $ECHO_C" >&6
10756 else
10757   ac_check_lib_save_LIBS=$LIBS
10758 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10759 cat >conftest.$ac_ext <<_ACEOF
10760 #line 10760 "configure"
10761 #include "confdefs.h"
10762
10763 /* Override any gcc2 internal prototype to avoid an error.  */
10764 #ifdef __cplusplus
10765 extern "C"
10766 #endif
10767 /* We use char because int might match the return type of a gcc2
10768    builtin and then its argument prototype would still apply.  */
10769 char XtAppInitialize ();
10770 int
10771 main ()
10772 {
10773 XtAppInitialize ();
10774   ;
10775   return 0;
10776 }
10777 _ACEOF
10778 rm -f conftest.$ac_objext conftest$ac_exeext
10779 if { (eval echo "$as_me:10779: \"$ac_link\"") >&5
10780   (eval $ac_link) 2>&5
10781   ac_status=$?
10782   echo "$as_me:10782: \$? = $ac_status" >&5
10783   (exit $ac_status); } &&
10784          { ac_try='test -s conftest$ac_exeext'
10785   { (eval echo "$as_me:10785: \"$ac_try\"") >&5
10786   (eval $ac_try) 2>&5
10787   ac_status=$?
10788   echo "$as_me:10788: \$? = $ac_status" >&5
10789   (exit $ac_status); }; }; then
10790   ac_cv_lib_Xt_XtAppInitialize=yes
10791 else
10792   echo "$as_me: failed program was:" >&5
10793 cat conftest.$ac_ext >&5
10794 ac_cv_lib_Xt_XtAppInitialize=no
10795 fi
10796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10797 LIBS=$ac_check_lib_save_LIBS
10798 fi
10799 echo "$as_me:10799: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
10800 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
10801 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
10802   cat >>confdefs.h <<\EOF
10803 #define HAVE_LIBXT 1
10804 EOF
10805
10806                  cf_have_X_LIBS=Xt
10807                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10808 fi
10809
10810 fi
10811
10812 fi
10813
10814 if test $cf_have_X_LIBS = no ; then
10815         { echo "$as_me:10815: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10816 test program.  You will have to check and add the proper libraries by hand
10817 to makefile." >&5
10818 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10819 test program.  You will have to check and add the proper libraries by hand
10820 to makefile." >&2;}
10821 fi
10822
10823 cf_x_athena_root=$cf_x_athena
10824 cf_x_athena_inc=""
10825
10826 for cf_path in default \
10827         /usr/contrib/X11R6 \
10828         /usr/contrib/X11R5 \
10829         /usr/lib/X11R5 \
10830         /usr/local
10831 do
10832         if test -z "$cf_x_athena_inc" ; then
10833                 cf_save="$CPPFLAGS"
10834                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
10835                 if test $cf_path != default ; then
10836                         CPPFLAGS="$cf_save -I$cf_path/include"
10837                         echo "$as_me:10837: checking for $cf_test in $cf_path" >&5
10838 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
10839                 else
10840                         echo "$as_me:10840: checking for $cf_test" >&5
10841 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
10842                 fi
10843                 cat >conftest.$ac_ext <<_ACEOF
10844 #line 10844 "configure"
10845 #include "confdefs.h"
10846
10847 #include <X11/Intrinsic.h>
10848 #include <$cf_test>
10849 int
10850 main ()
10851 {
10852
10853   ;
10854   return 0;
10855 }
10856 _ACEOF
10857 rm -f conftest.$ac_objext
10858 if { (eval echo "$as_me:10858: \"$ac_compile\"") >&5
10859   (eval $ac_compile) 2>&5
10860   ac_status=$?
10861   echo "$as_me:10861: \$? = $ac_status" >&5
10862   (exit $ac_status); } &&
10863          { ac_try='test -s conftest.$ac_objext'
10864   { (eval echo "$as_me:10864: \"$ac_try\"") >&5
10865   (eval $ac_try) 2>&5
10866   ac_status=$?
10867   echo "$as_me:10867: \$? = $ac_status" >&5
10868   (exit $ac_status); }; }; then
10869   cf_result=yes
10870 else
10871   echo "$as_me: failed program was:" >&5
10872 cat conftest.$ac_ext >&5
10873 cf_result=no
10874 fi
10875 rm -f conftest.$ac_objext conftest.$ac_ext
10876                 echo "$as_me:10876: result: $cf_result" >&5
10877 echo "${ECHO_T}$cf_result" >&6
10878                 if test "$cf_result" = yes ; then
10879                         cf_x_athena_inc=$cf_path
10880                         break
10881                 else
10882                         CPPFLAGS="$cf_save"
10883                 fi
10884         fi
10885 done
10886
10887 if test -z "$cf_x_athena_inc" ; then
10888         { echo "$as_me:10888: WARNING: Unable to successfully find Athena header files with test program" >&5
10889 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
10890 elif test "$cf_x_athena_inc" != default ; then
10891         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
10892 fi
10893
10894 cf_x_athena_root=$cf_x_athena
10895 cf_x_athena_lib=""
10896
10897 for cf_path in default \
10898         /usr/contrib/X11R6 \
10899         /usr/contrib/X11R5 \
10900         /usr/lib/X11R5 \
10901         /usr/local
10902 do
10903         for cf_lib in \
10904                 "-l$cf_x_athena_root -lXmu" \
10905                 "-l$cf_x_athena_root -lXpm -lXmu" \
10906                 "-l${cf_x_athena_root}_s -lXmu_s"
10907         do
10908                 if test -z "$cf_x_athena_lib" ; then
10909                         cf_save="$LIBS"
10910                         cf_test=XawSimpleMenuAddGlobalActions
10911                         if test $cf_path != default ; then
10912                                 LIBS="-L$cf_path/lib $cf_lib $LIBS"
10913                                 echo "$as_me:10913: checking for $cf_lib in $cf_path" >&5
10914 echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
10915                         else
10916                                 LIBS="$cf_lib $LIBS"
10917                                 echo "$as_me:10917: checking for $cf_test in $cf_lib" >&5
10918 echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
10919                         fi
10920                         cat >conftest.$ac_ext <<_ACEOF
10921 #line 10921 "configure"
10922 #include "confdefs.h"
10923
10924 int
10925 main ()
10926 {
10927 $cf_test()
10928   ;
10929   return 0;
10930 }
10931 _ACEOF
10932 rm -f conftest.$ac_objext conftest$ac_exeext
10933 if { (eval echo "$as_me:10933: \"$ac_link\"") >&5
10934   (eval $ac_link) 2>&5
10935   ac_status=$?
10936   echo "$as_me:10936: \$? = $ac_status" >&5
10937   (exit $ac_status); } &&
10938          { ac_try='test -s conftest$ac_exeext'
10939   { (eval echo "$as_me:10939: \"$ac_try\"") >&5
10940   (eval $ac_try) 2>&5
10941   ac_status=$?
10942   echo "$as_me:10942: \$? = $ac_status" >&5
10943   (exit $ac_status); }; }; then
10944   cf_result=yes
10945 else
10946   echo "$as_me: failed program was:" >&5
10947 cat conftest.$ac_ext >&5
10948 cf_result=no
10949 fi
10950 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10951                         echo "$as_me:10951: result: $cf_result" >&5
10952 echo "${ECHO_T}$cf_result" >&6
10953                         if test "$cf_result" = yes ; then
10954                                 cf_x_athena_lib="$cf_lib"
10955                                 break
10956                         fi
10957                         LIBS="$cf_save"
10958                 fi
10959         done
10960 done
10961
10962 if test -z "$cf_x_athena_lib" ; then
10963         { { echo "$as_me:10963: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
10964 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
10965    { (exit 1); exit 1; }; }
10966 fi
10967
10968 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10969
10970 cat >>confdefs.h <<EOF
10971 #define $cf_x_athena_LIBS 1
10972 EOF
10973
10974 fi
10975
10976 for ac_prog in xcurses-config
10977 do
10978   # Extract the first word of "$ac_prog", so it can be a program name with args.
10979 set dummy $ac_prog; ac_word=$2
10980 echo "$as_me:10980: checking for $ac_word" >&5
10981 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10982 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
10983   echo $ECHO_N "(cached) $ECHO_C" >&6
10984 else
10985   case $XCURSES_CONFIG in
10986   [\\/]* | ?:[\\/]*)
10987   ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
10988   ;;
10989   *)
10990   ac_save_IFS=$IFS; IFS=$ac_path_separator
10991 ac_dummy="$PATH"
10992 for ac_dir in $ac_dummy; do
10993   IFS=$ac_save_IFS
10994   test -z "$ac_dir" && ac_dir=.
10995   if $as_executable_p "$ac_dir/$ac_word"; then
10996    ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
10997    echo "$as_me:10997: found $ac_dir/$ac_word" >&5
10998    break
10999 fi
11000 done
11001
11002   ;;
11003 esac
11004 fi
11005 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
11006
11007 if test -n "$XCURSES_CONFIG"; then
11008   echo "$as_me:11008: result: $XCURSES_CONFIG" >&5
11009 echo "${ECHO_T}$XCURSES_CONFIG" >&6
11010 else
11011   echo "$as_me:11011: result: no" >&5
11012 echo "${ECHO_T}no" >&6
11013 fi
11014
11015   test -n "$XCURSES_CONFIG" && break
11016 done
11017 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
11018
11019 if test "$XCURSES_CONFIG" != none ; then
11020
11021 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
11022 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
11023
11024 cf_cv_lib_XCurses=yes
11025
11026 else
11027
11028 LDFLAGS="$LDFLAGS $X_LIBS"
11029
11030 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
11031
11032 echo "${as_me:-configure}:11032: testing checking additions to CFLAGS ..." 1>&5
11033
11034 cf_check_cflags="$CFLAGS"
11035 cf_check_cppflags="$CPPFLAGS"
11036
11037 cf_fix_cppflags=no
11038 cf_new_cflags=
11039 cf_new_cppflags=
11040 cf_new_extra_cppflags=
11041
11042 for cf_add_cflags in $X_CFLAGS
11043 do
11044 case $cf_fix_cppflags in
11045 no)
11046         case $cf_add_cflags in #(vi
11047         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11048                 case $cf_add_cflags in
11049                 -D*)
11050                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11051
11052                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11053                                 && test -z "${cf_tst_cflags}" \
11054                                 && cf_fix_cppflags=yes
11055
11056                         if test $cf_fix_cppflags = yes ; then
11057                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11058                                 continue
11059                         elif test "${cf_tst_cflags}" = "\"'" ; then
11060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11061                                 continue
11062                         fi
11063                         ;;
11064                 esac
11065                 case "$CPPFLAGS" in
11066                 *$cf_add_cflags) #(vi
11067                         ;;
11068                 *) #(vi
11069                         case $cf_add_cflags in #(vi
11070                         -D*)
11071                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11072
11073 CPPFLAGS=`echo "$CPPFLAGS" | \
11074         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11075                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11076
11077                                 ;;
11078                         esac
11079                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11080                         ;;
11081                 esac
11082                 ;;
11083         *)
11084                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11085                 ;;
11086         esac
11087         ;;
11088 yes)
11089         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11090
11091         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11092
11093         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11094                 && test -z "${cf_tst_cflags}" \
11095                 && cf_fix_cppflags=no
11096         ;;
11097 esac
11098 done
11099
11100 if test -n "$cf_new_cflags" ; then
11101         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11102
11103 echo "${as_me:-configure}:11103: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11104
11105         CFLAGS="$CFLAGS $cf_new_cflags"
11106 fi
11107
11108 if test -n "$cf_new_cppflags" ; then
11109         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11110
11111 echo "${as_me:-configure}:11111: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11112
11113         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11114 fi
11115
11116 if test -n "$cf_new_extra_cppflags" ; then
11117         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11118
11119 echo "${as_me:-configure}:11119: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11120
11121         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11122 fi
11123
11124 if test "$cf_check_cflags" != "$CFLAGS" ; then
11125 cat >conftest.$ac_ext <<_ACEOF
11126 #line 11126 "configure"
11127 #include "confdefs.h"
11128 #include <stdio.h>
11129 int
11130 main ()
11131 {
11132 printf("Hello world");
11133   ;
11134   return 0;
11135 }
11136 _ACEOF
11137 rm -f conftest.$ac_objext conftest$ac_exeext
11138 if { (eval echo "$as_me:11138: \"$ac_link\"") >&5
11139   (eval $ac_link) 2>&5
11140   ac_status=$?
11141   echo "$as_me:11141: \$? = $ac_status" >&5
11142   (exit $ac_status); } &&
11143          { ac_try='test -s conftest$ac_exeext'
11144   { (eval echo "$as_me:11144: \"$ac_try\"") >&5
11145   (eval $ac_try) 2>&5
11146   ac_status=$?
11147   echo "$as_me:11147: \$? = $ac_status" >&5
11148   (exit $ac_status); }; }; then
11149   :
11150 else
11151   echo "$as_me: failed program was:" >&5
11152 cat conftest.$ac_ext >&5
11153 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11154
11155 echo "${as_me:-configure}:11155: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11156
11157          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11158                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
11159
11160 echo "${as_me:-configure}:11160: testing but keeping change to \$CPPFLAGS ..." 1>&5
11161
11162          fi
11163          CFLAGS="$cf_check_flags"
11164 fi
11165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11166 fi
11167
11168 echo "$as_me:11168: checking for XOpenDisplay in -lX11" >&5
11169 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11170 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11171   echo $ECHO_N "(cached) $ECHO_C" >&6
11172 else
11173   ac_check_lib_save_LIBS=$LIBS
11174 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11175 cat >conftest.$ac_ext <<_ACEOF
11176 #line 11176 "configure"
11177 #include "confdefs.h"
11178
11179 /* Override any gcc2 internal prototype to avoid an error.  */
11180 #ifdef __cplusplus
11181 extern "C"
11182 #endif
11183 /* We use char because int might match the return type of a gcc2
11184    builtin and then its argument prototype would still apply.  */
11185 char XOpenDisplay ();
11186 int
11187 main ()
11188 {
11189 XOpenDisplay ();
11190   ;
11191   return 0;
11192 }
11193 _ACEOF
11194 rm -f conftest.$ac_objext conftest$ac_exeext
11195 if { (eval echo "$as_me:11195: \"$ac_link\"") >&5
11196   (eval $ac_link) 2>&5
11197   ac_status=$?
11198   echo "$as_me:11198: \$? = $ac_status" >&5
11199   (exit $ac_status); } &&
11200          { ac_try='test -s conftest$ac_exeext'
11201   { (eval echo "$as_me:11201: \"$ac_try\"") >&5
11202   (eval $ac_try) 2>&5
11203   ac_status=$?
11204   echo "$as_me:11204: \$? = $ac_status" >&5
11205   (exit $ac_status); }; }; then
11206   ac_cv_lib_X11_XOpenDisplay=yes
11207 else
11208   echo "$as_me: failed program was:" >&5
11209 cat conftest.$ac_ext >&5
11210 ac_cv_lib_X11_XOpenDisplay=no
11211 fi
11212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11213 LIBS=$ac_check_lib_save_LIBS
11214 fi
11215 echo "$as_me:11215: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11216 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11217 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
11218   LIBS="-lX11 $LIBS"
11219 fi
11220
11221 echo "$as_me:11221: checking for XCurses library" >&5
11222 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
11223 if test "${cf_cv_lib_XCurses+set}" = set; then
11224   echo $ECHO_N "(cached) $ECHO_C" >&6
11225 else
11226
11227 LIBS="-lXCurses $LIBS"
11228 cat >conftest.$ac_ext <<_ACEOF
11229 #line 11229 "configure"
11230 #include "confdefs.h"
11231
11232 #include <xcurses.h>
11233 char *XCursesProgramName = "test";
11234
11235 int
11236 main ()
11237 {
11238 XCursesExit();
11239   ;
11240   return 0;
11241 }
11242 _ACEOF
11243 rm -f conftest.$ac_objext conftest$ac_exeext
11244 if { (eval echo "$as_me:11244: \"$ac_link\"") >&5
11245   (eval $ac_link) 2>&5
11246   ac_status=$?
11247   echo "$as_me:11247: \$? = $ac_status" >&5
11248   (exit $ac_status); } &&
11249          { ac_try='test -s conftest$ac_exeext'
11250   { (eval echo "$as_me:11250: \"$ac_try\"") >&5
11251   (eval $ac_try) 2>&5
11252   ac_status=$?
11253   echo "$as_me:11253: \$? = $ac_status" >&5
11254   (exit $ac_status); }; }; then
11255   cf_cv_lib_XCurses=yes
11256 else
11257   echo "$as_me: failed program was:" >&5
11258 cat conftest.$ac_ext >&5
11259 cf_cv_lib_XCurses=no
11260 fi
11261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11262
11263 fi
11264 echo "$as_me:11264: result: $cf_cv_lib_XCurses" >&5
11265 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
11266
11267 fi
11268
11269 if test $cf_cv_lib_XCurses = yes ; then
11270         cat >>confdefs.h <<\EOF
11271 #define UNIX 1
11272 EOF
11273
11274         cat >>confdefs.h <<\EOF
11275 #define XCURSES 1
11276 EOF
11277
11278         cat >>confdefs.h <<\EOF
11279 #define HAVE_XCURSES 1
11280 EOF
11281
11282 else
11283         { { echo "$as_me:11283: error: Cannot link with XCurses" >&5
11284 echo "$as_me: error: Cannot link with XCurses" >&2;}
11285    { (exit 1); exit 1; }; }
11286 fi
11287
11288         ;;
11289 esac
11290
11291 case $cf_cv_screen in #(vi
11292 pdcurses) #(vi
11293         ;;
11294 *)
11295         # look for curses-related libraries
11296
11297 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
11298 echo "$as_me:11298: checking for new_panel in -lpanel$cf_cv_libtype" >&5
11299 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
11300 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11301   echo $ECHO_N "(cached) $ECHO_C" >&6
11302 else
11303   ac_check_lib_save_LIBS=$LIBS
11304 LIBS="-lpanel$cf_cv_libtype  $LIBS"
11305 cat >conftest.$ac_ext <<_ACEOF
11306 #line 11306 "configure"
11307 #include "confdefs.h"
11308
11309 /* Override any gcc2 internal prototype to avoid an error.  */
11310 #ifdef __cplusplus
11311 extern "C"
11312 #endif
11313 /* We use char because int might match the return type of a gcc2
11314    builtin and then its argument prototype would still apply.  */
11315 char new_panel ();
11316 int
11317 main ()
11318 {
11319 new_panel ();
11320   ;
11321   return 0;
11322 }
11323 _ACEOF
11324 rm -f conftest.$ac_objext conftest$ac_exeext
11325 if { (eval echo "$as_me:11325: \"$ac_link\"") >&5
11326   (eval $ac_link) 2>&5
11327   ac_status=$?
11328   echo "$as_me:11328: \$? = $ac_status" >&5
11329   (exit $ac_status); } &&
11330          { ac_try='test -s conftest$ac_exeext'
11331   { (eval echo "$as_me:11331: \"$ac_try\"") >&5
11332   (eval $ac_try) 2>&5
11333   ac_status=$?
11334   echo "$as_me:11334: \$? = $ac_status" >&5
11335   (exit $ac_status); }; }; then
11336   eval "$as_ac_Lib=yes"
11337 else
11338   echo "$as_me: failed program was:" >&5
11339 cat conftest.$ac_ext >&5
11340 eval "$as_ac_Lib=no"
11341 fi
11342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11343 LIBS=$ac_check_lib_save_LIBS
11344 fi
11345 echo "$as_me:11345: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11346 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11347 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11348   cat >>confdefs.h <<EOF
11349 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
11350 EOF
11351
11352   LIBS="-lpanel$cf_cv_libtype $LIBS"
11353
11354 fi
11355
11356 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
11357 echo "$as_me:11357: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
11358 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
11359 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11360   echo $ECHO_N "(cached) $ECHO_C" >&6
11361 else
11362   ac_check_lib_save_LIBS=$LIBS
11363 LIBS="-lmenu$cf_cv_libtype  $LIBS"
11364 cat >conftest.$ac_ext <<_ACEOF
11365 #line 11365 "configure"
11366 #include "confdefs.h"
11367
11368 /* Override any gcc2 internal prototype to avoid an error.  */
11369 #ifdef __cplusplus
11370 extern "C"
11371 #endif
11372 /* We use char because int might match the return type of a gcc2
11373    builtin and then its argument prototype would still apply.  */
11374 char menu_driver ();
11375 int
11376 main ()
11377 {
11378 menu_driver ();
11379   ;
11380   return 0;
11381 }
11382 _ACEOF
11383 rm -f conftest.$ac_objext conftest$ac_exeext
11384 if { (eval echo "$as_me:11384: \"$ac_link\"") >&5
11385   (eval $ac_link) 2>&5
11386   ac_status=$?
11387   echo "$as_me:11387: \$? = $ac_status" >&5
11388   (exit $ac_status); } &&
11389          { ac_try='test -s conftest$ac_exeext'
11390   { (eval echo "$as_me:11390: \"$ac_try\"") >&5
11391   (eval $ac_try) 2>&5
11392   ac_status=$?
11393   echo "$as_me:11393: \$? = $ac_status" >&5
11394   (exit $ac_status); }; }; then
11395   eval "$as_ac_Lib=yes"
11396 else
11397   echo "$as_me: failed program was:" >&5
11398 cat conftest.$ac_ext >&5
11399 eval "$as_ac_Lib=no"
11400 fi
11401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11402 LIBS=$ac_check_lib_save_LIBS
11403 fi
11404 echo "$as_me:11404: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11405 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11406 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11407   cat >>confdefs.h <<EOF
11408 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
11409 EOF
11410
11411   LIBS="-lmenu$cf_cv_libtype $LIBS"
11412
11413 fi
11414
11415 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
11416 echo "$as_me:11416: checking for form_driver in -lform$cf_cv_libtype" >&5
11417 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
11418 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
11419   echo $ECHO_N "(cached) $ECHO_C" >&6
11420 else
11421   ac_check_lib_save_LIBS=$LIBS
11422 LIBS="-lform$cf_cv_libtype  $LIBS"
11423 cat >conftest.$ac_ext <<_ACEOF
11424 #line 11424 "configure"
11425 #include "confdefs.h"
11426
11427 /* Override any gcc2 internal prototype to avoid an error.  */
11428 #ifdef __cplusplus
11429 extern "C"
11430 #endif
11431 /* We use char because int might match the return type of a gcc2
11432    builtin and then its argument prototype would still apply.  */
11433 char form_driver ();
11434 int
11435 main ()
11436 {
11437 form_driver ();
11438   ;
11439   return 0;
11440 }
11441 _ACEOF
11442 rm -f conftest.$ac_objext conftest$ac_exeext
11443 if { (eval echo "$as_me:11443: \"$ac_link\"") >&5
11444   (eval $ac_link) 2>&5
11445   ac_status=$?
11446   echo "$as_me:11446: \$? = $ac_status" >&5
11447   (exit $ac_status); } &&
11448          { ac_try='test -s conftest$ac_exeext'
11449   { (eval echo "$as_me:11449: \"$ac_try\"") >&5
11450   (eval $ac_try) 2>&5
11451   ac_status=$?
11452   echo "$as_me:11452: \$? = $ac_status" >&5
11453   (exit $ac_status); }; }; then
11454   eval "$as_ac_Lib=yes"
11455 else
11456   echo "$as_me: failed program was:" >&5
11457 cat conftest.$ac_ext >&5
11458 eval "$as_ac_Lib=no"
11459 fi
11460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11461 LIBS=$ac_check_lib_save_LIBS
11462 fi
11463 echo "$as_me:11463: result: `eval echo '${'$as_ac_Lib'}'`" >&5
11464 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
11465 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
11466   cat >>confdefs.h <<EOF
11467 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
11468 EOF
11469
11470   LIBS="-lform$cf_cv_libtype $LIBS"
11471
11472 fi
11473
11474         # look for curses-related headers
11475
11476 for ac_header in \
11477                 nc_alloc.h \
11478                 nomacros.h \
11479                 form.h \
11480                 menu.h \
11481                 panel.h \
11482
11483 do
11484 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11485 echo "$as_me:11485: checking for $ac_header" >&5
11486 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11487 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11488   echo $ECHO_N "(cached) $ECHO_C" >&6
11489 else
11490   cat >conftest.$ac_ext <<_ACEOF
11491 #line 11491 "configure"
11492 #include "confdefs.h"
11493 #include <$ac_header>
11494 _ACEOF
11495 if { (eval echo "$as_me:11495: \"$ac_cpp conftest.$ac_ext\"") >&5
11496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11497   ac_status=$?
11498   egrep -v '^ *\+' conftest.er1 >conftest.err
11499   rm -f conftest.er1
11500   cat conftest.err >&5
11501   echo "$as_me:11501: \$? = $ac_status" >&5
11502   (exit $ac_status); } >/dev/null; then
11503   if test -s conftest.err; then
11504     ac_cpp_err=$ac_c_preproc_warn_flag
11505   else
11506     ac_cpp_err=
11507   fi
11508 else
11509   ac_cpp_err=yes
11510 fi
11511 if test -z "$ac_cpp_err"; then
11512   eval "$as_ac_Header=yes"
11513 else
11514   echo "$as_me: failed program was:" >&5
11515   cat conftest.$ac_ext >&5
11516   eval "$as_ac_Header=no"
11517 fi
11518 rm -f conftest.err conftest.$ac_ext
11519 fi
11520 echo "$as_me:11520: result: `eval echo '${'$as_ac_Header'}'`" >&5
11521 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11522 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11523   cat >>confdefs.h <<EOF
11524 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11525 EOF
11526
11527 fi
11528 done
11529
11530         ;;
11531 esac
11532
11533 echo "$as_me:11533: checking return type of signal handlers" >&5
11534 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11535 if test "${ac_cv_type_signal+set}" = set; then
11536   echo $ECHO_N "(cached) $ECHO_C" >&6
11537 else
11538   cat >conftest.$ac_ext <<_ACEOF
11539 #line 11539 "configure"
11540 #include "confdefs.h"
11541 #include <sys/types.h>
11542 #include <signal.h>
11543 #ifdef signal
11544 # undef signal
11545 #endif
11546 #ifdef __cplusplus
11547 extern "C" void (*signal (int, void (*)(int)))(int);
11548 #else
11549 void (*signal ()) ();
11550 #endif
11551
11552 int
11553 main ()
11554 {
11555 int i;
11556   ;
11557   return 0;
11558 }
11559 _ACEOF
11560 rm -f conftest.$ac_objext
11561 if { (eval echo "$as_me:11561: \"$ac_compile\"") >&5
11562   (eval $ac_compile) 2>&5
11563   ac_status=$?
11564   echo "$as_me:11564: \$? = $ac_status" >&5
11565   (exit $ac_status); } &&
11566          { ac_try='test -s conftest.$ac_objext'
11567   { (eval echo "$as_me:11567: \"$ac_try\"") >&5
11568   (eval $ac_try) 2>&5
11569   ac_status=$?
11570   echo "$as_me:11570: \$? = $ac_status" >&5
11571   (exit $ac_status); }; }; then
11572   ac_cv_type_signal=void
11573 else
11574   echo "$as_me: failed program was:" >&5
11575 cat conftest.$ac_ext >&5
11576 ac_cv_type_signal=int
11577 fi
11578 rm -f conftest.$ac_objext conftest.$ac_ext
11579 fi
11580 echo "$as_me:11580: result: $ac_cv_type_signal" >&5
11581 echo "${ECHO_T}$ac_cv_type_signal" >&6
11582
11583 cat >>confdefs.h <<EOF
11584 #define RETSIGTYPE $ac_cv_type_signal
11585 EOF
11586
11587 echo "$as_me:11587: checking for ANSI C header files" >&5
11588 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11589 if test "${ac_cv_header_stdc+set}" = set; then
11590   echo $ECHO_N "(cached) $ECHO_C" >&6
11591 else
11592   cat >conftest.$ac_ext <<_ACEOF
11593 #line 11593 "configure"
11594 #include "confdefs.h"
11595 #include <stdlib.h>
11596 #include <stdarg.h>
11597 #include <string.h>
11598 #include <float.h>
11599
11600 _ACEOF
11601 if { (eval echo "$as_me:11601: \"$ac_cpp conftest.$ac_ext\"") >&5
11602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11603   ac_status=$?
11604   egrep -v '^ *\+' conftest.er1 >conftest.err
11605   rm -f conftest.er1
11606   cat conftest.err >&5
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit $ac_status); } >/dev/null; then
11609   if test -s conftest.err; then
11610     ac_cpp_err=$ac_c_preproc_warn_flag
11611   else
11612     ac_cpp_err=
11613   fi
11614 else
11615   ac_cpp_err=yes
11616 fi
11617 if test -z "$ac_cpp_err"; then
11618   ac_cv_header_stdc=yes
11619 else
11620   echo "$as_me: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   ac_cv_header_stdc=no
11623 fi
11624 rm -f conftest.err conftest.$ac_ext
11625
11626 if test $ac_cv_header_stdc = yes; then
11627   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11628   cat >conftest.$ac_ext <<_ACEOF
11629 #line 11629 "configure"
11630 #include "confdefs.h"
11631 #include <string.h>
11632
11633 _ACEOF
11634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11635   egrep "memchr" >/dev/null 2>&1; then
11636   :
11637 else
11638   ac_cv_header_stdc=no
11639 fi
11640 rm -rf conftest*
11641
11642 fi
11643
11644 if test $ac_cv_header_stdc = yes; then
11645   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11646   cat >conftest.$ac_ext <<_ACEOF
11647 #line 11647 "configure"
11648 #include "confdefs.h"
11649 #include <stdlib.h>
11650
11651 _ACEOF
11652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11653   egrep "free" >/dev/null 2>&1; then
11654   :
11655 else
11656   ac_cv_header_stdc=no
11657 fi
11658 rm -rf conftest*
11659
11660 fi
11661
11662 if test $ac_cv_header_stdc = yes; then
11663   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11664   if test "$cross_compiling" = yes; then
11665   :
11666 else
11667   cat >conftest.$ac_ext <<_ACEOF
11668 #line 11668 "configure"
11669 #include "confdefs.h"
11670 #include <ctype.h>
11671 #if ((' ' & 0x0FF) == 0x020)
11672 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11673 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11674 #else
11675 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11676                      || ('j' <= (c) && (c) <= 'r') \
11677                      || ('s' <= (c) && (c) <= 'z'))
11678 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11679 #endif
11680
11681 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11682 int
11683 main ()
11684 {
11685   int i;
11686   for (i = 0; i < 256; i++)
11687     if (XOR (islower (i), ISLOWER (i))
11688         || toupper (i) != TOUPPER (i))
11689       $ac_main_return(2);
11690   $ac_main_return (0);
11691 }
11692 _ACEOF
11693 rm -f conftest$ac_exeext
11694 if { (eval echo "$as_me:11694: \"$ac_link\"") >&5
11695   (eval $ac_link) 2>&5
11696   ac_status=$?
11697   echo "$as_me:11697: \$? = $ac_status" >&5
11698   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11699   { (eval echo "$as_me:11699: \"$ac_try\"") >&5
11700   (eval $ac_try) 2>&5
11701   ac_status=$?
11702   echo "$as_me:11702: \$? = $ac_status" >&5
11703   (exit $ac_status); }; }; then
11704   :
11705 else
11706   echo "$as_me: program exited with status $ac_status" >&5
11707 echo "$as_me: failed program was:" >&5
11708 cat conftest.$ac_ext >&5
11709 ac_cv_header_stdc=no
11710 fi
11711 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11712 fi
11713 fi
11714 fi
11715 echo "$as_me:11715: result: $ac_cv_header_stdc" >&5
11716 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11717 if test $ac_cv_header_stdc = yes; then
11718
11719 cat >>confdefs.h <<\EOF
11720 #define STDC_HEADERS 1
11721 EOF
11722
11723 fi
11724
11725 echo "$as_me:11725: checking whether time.h and sys/time.h may both be included" >&5
11726 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11727 if test "${ac_cv_header_time+set}" = set; then
11728   echo $ECHO_N "(cached) $ECHO_C" >&6
11729 else
11730   cat >conftest.$ac_ext <<_ACEOF
11731 #line 11731 "configure"
11732 #include "confdefs.h"
11733 #include <sys/types.h>
11734 #include <sys/time.h>
11735 #include <time.h>
11736
11737 int
11738 main ()
11739 {
11740 if ((struct tm *) 0)
11741 return 0;
11742   ;
11743   return 0;
11744 }
11745 _ACEOF
11746 rm -f conftest.$ac_objext
11747 if { (eval echo "$as_me:11747: \"$ac_compile\"") >&5
11748   (eval $ac_compile) 2>&5
11749   ac_status=$?
11750   echo "$as_me:11750: \$? = $ac_status" >&5
11751   (exit $ac_status); } &&
11752          { ac_try='test -s conftest.$ac_objext'
11753   { (eval echo "$as_me:11753: \"$ac_try\"") >&5
11754   (eval $ac_try) 2>&5
11755   ac_status=$?
11756   echo "$as_me:11756: \$? = $ac_status" >&5
11757   (exit $ac_status); }; }; then
11758   ac_cv_header_time=yes
11759 else
11760   echo "$as_me: failed program was:" >&5
11761 cat conftest.$ac_ext >&5
11762 ac_cv_header_time=no
11763 fi
11764 rm -f conftest.$ac_objext conftest.$ac_ext
11765 fi
11766 echo "$as_me:11766: result: $ac_cv_header_time" >&5
11767 echo "${ECHO_T}$ac_cv_header_time" >&6
11768 if test $ac_cv_header_time = yes; then
11769
11770 cat >>confdefs.h <<\EOF
11771 #define TIME_WITH_SYS_TIME 1
11772 EOF
11773
11774 fi
11775
11776 for ac_header in \
11777 getopt.h \
11778 locale.h \
11779 stdarg.h \
11780 sys/ioctl.h \
11781 sys/select.h \
11782 sys/time.h \
11783 termios.h \
11784 unistd.h \
11785
11786 do
11787 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11788 echo "$as_me:11788: checking for $ac_header" >&5
11789 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11791   echo $ECHO_N "(cached) $ECHO_C" >&6
11792 else
11793   cat >conftest.$ac_ext <<_ACEOF
11794 #line 11794 "configure"
11795 #include "confdefs.h"
11796 #include <$ac_header>
11797 _ACEOF
11798 if { (eval echo "$as_me:11798: \"$ac_cpp conftest.$ac_ext\"") >&5
11799   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11800   ac_status=$?
11801   egrep -v '^ *\+' conftest.er1 >conftest.err
11802   rm -f conftest.er1
11803   cat conftest.err >&5
11804   echo "$as_me:11804: \$? = $ac_status" >&5
11805   (exit $ac_status); } >/dev/null; then
11806   if test -s conftest.err; then
11807     ac_cpp_err=$ac_c_preproc_warn_flag
11808   else
11809     ac_cpp_err=
11810   fi
11811 else
11812   ac_cpp_err=yes
11813 fi
11814 if test -z "$ac_cpp_err"; then
11815   eval "$as_ac_Header=yes"
11816 else
11817   echo "$as_me: failed program was:" >&5
11818   cat conftest.$ac_ext >&5
11819   eval "$as_ac_Header=no"
11820 fi
11821 rm -f conftest.err conftest.$ac_ext
11822 fi
11823 echo "$as_me:11823: result: `eval echo '${'$as_ac_Header'}'`" >&5
11824 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11825 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11826   cat >>confdefs.h <<EOF
11827 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11828 EOF
11829
11830 fi
11831 done
11832
11833 for ac_func in \
11834 gettimeofday \
11835 mblen \
11836 mbrlen \
11837 mbrtowc \
11838 mbsrtowcs \
11839 mbstowcs \
11840 mbtowc \
11841 strdup \
11842 wcsrtombs \
11843 wcstombs \
11844
11845 do
11846 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11847 echo "$as_me:11847: checking for $ac_func" >&5
11848 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11849 if eval "test \"\${$as_ac_var+set}\" = set"; then
11850   echo $ECHO_N "(cached) $ECHO_C" >&6
11851 else
11852   cat >conftest.$ac_ext <<_ACEOF
11853 #line 11853 "configure"
11854 #include "confdefs.h"
11855 /* System header to define __stub macros and hopefully few prototypes,
11856     which can conflict with char $ac_func (); below.  */
11857 #include <assert.h>
11858 /* Override any gcc2 internal prototype to avoid an error.  */
11859 #ifdef __cplusplus
11860 extern "C"
11861 #endif
11862 /* We use char because int might match the return type of a gcc2
11863    builtin and then its argument prototype would still apply.  */
11864 char $ac_func ();
11865 char (*f) ();
11866
11867 int
11868 main ()
11869 {
11870 /* The GNU C library defines this for functions which it implements
11871     to always fail with ENOSYS.  Some functions are actually named
11872     something starting with __ and the normal name is an alias.  */
11873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11874 choke me
11875 #else
11876 f = $ac_func;
11877 #endif
11878
11879   ;
11880   return 0;
11881 }
11882 _ACEOF
11883 rm -f conftest.$ac_objext conftest$ac_exeext
11884 if { (eval echo "$as_me:11884: \"$ac_link\"") >&5
11885   (eval $ac_link) 2>&5
11886   ac_status=$?
11887   echo "$as_me:11887: \$? = $ac_status" >&5
11888   (exit $ac_status); } &&
11889          { ac_try='test -s conftest$ac_exeext'
11890   { (eval echo "$as_me:11890: \"$ac_try\"") >&5
11891   (eval $ac_try) 2>&5
11892   ac_status=$?
11893   echo "$as_me:11893: \$? = $ac_status" >&5
11894   (exit $ac_status); }; }; then
11895   eval "$as_ac_var=yes"
11896 else
11897   echo "$as_me: failed program was:" >&5
11898 cat conftest.$ac_ext >&5
11899 eval "$as_ac_var=no"
11900 fi
11901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11902 fi
11903 echo "$as_me:11903: result: `eval echo '${'$as_ac_var'}'`" >&5
11904 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11905 if test `eval echo '${'$as_ac_var'}'` = yes; then
11906   cat >>confdefs.h <<EOF
11907 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11908 EOF
11909
11910 fi
11911 done
11912
11913 echo "$as_me:11913: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11914 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11915 if test "${cf_cv_need_xopen_extension+set}" = set; then
11916   echo $ECHO_N "(cached) $ECHO_C" >&6
11917 else
11918
11919 cat >conftest.$ac_ext <<_ACEOF
11920 #line 11920 "configure"
11921 #include "confdefs.h"
11922
11923 #include <stdlib.h>
11924 #include <${cf_cv_ncurses_header:-curses.h}>
11925 int
11926 main ()
11927 {
11928
11929 #if defined(NCURSES_VERSION_PATCH)
11930 if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
11931         make an error
11932 #endif
11933 #endif
11934         long x = winnstr(stdscr, "", 0);
11935         int x1, y1;
11936         getbegyx(stdscr, y1, x1)
11937   ;
11938   return 0;
11939 }
11940 _ACEOF
11941 rm -f conftest.$ac_objext conftest$ac_exeext
11942 if { (eval echo "$as_me:11942: \"$ac_link\"") >&5
11943   (eval $ac_link) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); } &&
11947          { ac_try='test -s conftest$ac_exeext'
11948   { (eval echo "$as_me:11948: \"$ac_try\"") >&5
11949   (eval $ac_try) 2>&5
11950   ac_status=$?
11951   echo "$as_me:11951: \$? = $ac_status" >&5
11952   (exit $ac_status); }; }; then
11953   cf_cv_need_xopen_extension=no
11954 else
11955   echo "$as_me: failed program was:" >&5
11956 cat conftest.$ac_ext >&5
11957 cat >conftest.$ac_ext <<_ACEOF
11958 #line 11958 "configure"
11959 #include "confdefs.h"
11960
11961 #define _XOPEN_SOURCE_EXTENDED
11962 #include <stdlib.h>
11963 #include <${cf_cv_ncurses_header:-curses.h}>
11964 int
11965 main ()
11966 {
11967
11968 #ifdef NCURSES_VERSION
11969         cchar_t check;
11970         int check2 = curs_set((int)sizeof(check));
11971 #endif
11972         long x = winnstr(stdscr, "", 0);
11973         int x1, y1;
11974         getbegyx(stdscr, y1, x1)
11975   ;
11976   return 0;
11977 }
11978 _ACEOF
11979 rm -f conftest.$ac_objext conftest$ac_exeext
11980 if { (eval echo "$as_me:11980: \"$ac_link\"") >&5
11981   (eval $ac_link) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit $ac_status); } &&
11985          { ac_try='test -s conftest$ac_exeext'
11986   { (eval echo "$as_me:11986: \"$ac_try\"") >&5
11987   (eval $ac_try) 2>&5
11988   ac_status=$?
11989   echo "$as_me:11989: \$? = $ac_status" >&5
11990   (exit $ac_status); }; }; then
11991   cf_cv_need_xopen_extension=yes
11992 else
11993   echo "$as_me: failed program was:" >&5
11994 cat conftest.$ac_ext >&5
11995 cf_cv_need_xopen_extension=unknown
11996 fi
11997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11998 fi
11999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12000 fi
12001 echo "$as_me:12001: result: $cf_cv_need_xopen_extension" >&5
12002 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
12003 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12004
12005 echo "$as_me:12005: checking for term.h" >&5
12006 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
12007 if test "${cf_cv_term_header+set}" = set; then
12008   echo $ECHO_N "(cached) $ECHO_C" >&6
12009 else
12010
12011 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
12012 # for <term.h> if we do not find the variant.
12013 for cf_header in \
12014         `echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%/.*%/%'`term.h \
12015         term.h
12016 do
12017         cat >conftest.$ac_ext <<_ACEOF
12018 #line 12018 "configure"
12019 #include "confdefs.h"
12020
12021 #include <${cf_cv_ncurses_header:-curses.h}>
12022 #include <${cf_header}>
12023 int
12024 main ()
12025 {
12026 WINDOW *x
12027   ;
12028   return 0;
12029 }
12030 _ACEOF
12031 rm -f conftest.$ac_objext
12032 if { (eval echo "$as_me:12032: \"$ac_compile\"") >&5
12033   (eval $ac_compile) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit $ac_status); } &&
12037          { ac_try='test -s conftest.$ac_objext'
12038   { (eval echo "$as_me:12038: \"$ac_try\"") >&5
12039   (eval $ac_try) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit $ac_status); }; }; then
12043   cf_cv_term_header=$cf_header
12044          break
12045 else
12046   echo "$as_me: failed program was:" >&5
12047 cat conftest.$ac_ext >&5
12048 cf_cv_term_header=no
12049 fi
12050 rm -f conftest.$ac_objext conftest.$ac_ext
12051 done
12052
12053 case $cf_cv_term_header in #(vi
12054 no)
12055         # If curses is ncurses, some packagers still mess it up by trying to make
12056         # us use GNU termcap.  This handles the most common case.
12057         for cf_header in ncurses/term.h ncursesw/term.h
12058         do
12059                 cat >conftest.$ac_ext <<_ACEOF
12060 #line 12060 "configure"
12061 #include "confdefs.h"
12062
12063 #include <${cf_cv_ncurses_header:-curses.h}>
12064 #ifdef NCURSES_VERSION
12065 #include <${cf_header}>
12066 #else
12067 make an error
12068 #endif
12069 int
12070 main ()
12071 {
12072 WINDOW *x
12073   ;
12074   return 0;
12075 }
12076 _ACEOF
12077 rm -f conftest.$ac_objext
12078 if { (eval echo "$as_me:12078: \"$ac_compile\"") >&5
12079   (eval $ac_compile) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit $ac_status); } &&
12083          { ac_try='test -s conftest.$ac_objext'
12084   { (eval echo "$as_me:12084: \"$ac_try\"") >&5
12085   (eval $ac_try) 2>&5
12086   ac_status=$?
12087   echo "$as_me:12087: \$? = $ac_status" >&5
12088   (exit $ac_status); }; }; then
12089   cf_cv_term_header=$cf_header
12090                          break
12091 else
12092   echo "$as_me: failed program was:" >&5
12093 cat conftest.$ac_ext >&5
12094 cf_cv_term_header=no
12095 fi
12096 rm -f conftest.$ac_objext conftest.$ac_ext
12097         done
12098         ;;
12099 esac
12100
12101 fi
12102 echo "$as_me:12102: result: $cf_cv_term_header" >&5
12103 echo "${ECHO_T}$cf_cv_term_header" >&6
12104
12105 case $cf_cv_term_header in #(vi
12106 term.h) #(vi
12107         cat >>confdefs.h <<\EOF
12108 #define HAVE_TERM_H 1
12109 EOF
12110
12111         ;;
12112 ncurses/term.h) #(vi
12113         cat >>confdefs.h <<\EOF
12114 #define HAVE_NCURSES_TERM_H 1
12115 EOF
12116
12117         ;;
12118 ncursesw/term.h)
12119         cat >>confdefs.h <<\EOF
12120 #define HAVE_NCURSESW_TERM_H 1
12121 EOF
12122
12123         ;;
12124 esac
12125
12126 for cf_func in \
12127 chgat \
12128 color_set \
12129 filter \
12130 getbegx \
12131 getcurx \
12132 getmaxx \
12133 getnstr \
12134 getparx \
12135 getwin \
12136 mvvline \
12137 mvwvline \
12138 napms \
12139 putwin \
12140 resize_term \
12141 resizeterm \
12142 ripoffline \
12143 setupterm \
12144 slk_color \
12145 slk_init \
12146 termattrs \
12147 tgetent \
12148 tigetnum \
12149 tigetstr \
12150 typeahead \
12151 use_default_colors \
12152 vw_printw \
12153 vsscanf \
12154 wchgat \
12155 winsstr \
12156 wresize \
12157
12158 do
12159
12160 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12161
12162         echo "$as_me:12162: checking for ${cf_func}" >&5
12163 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
12164
12165 echo "${as_me:-configure}:12165: testing ${cf_func} ..." 1>&5
12166
12167         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
12168   echo $ECHO_N "(cached) $ECHO_C" >&6
12169 else
12170
12171                 eval cf_result='$ac_cv_func_'$cf_func
12172                 if test ".$cf_result" != ".no"; then
12173                         cat >conftest.$ac_ext <<_ACEOF
12174 #line 12174 "configure"
12175 #include "confdefs.h"
12176
12177 #ifdef HAVE_XCURSES
12178 #include <xcurses.h>
12179 char * XCursesProgramName = "test";
12180 #else
12181 #include <${cf_cv_ncurses_header:-curses.h}>
12182 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
12183 #include <ncursesw/term.h>
12184 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
12185 #include <ncurses/term.h>
12186 #elif defined(HAVE_TERM_H)
12187 #include <term.h>
12188 #endif
12189 #endif
12190
12191 int
12192 main ()
12193 {
12194
12195 #ifndef ${cf_func}
12196 long foo = (long)(&${cf_func});
12197 ${cf_cv_main_return:-return}(foo == 0);
12198 #endif
12199
12200   ;
12201   return 0;
12202 }
12203 _ACEOF
12204 rm -f conftest.$ac_objext conftest$ac_exeext
12205 if { (eval echo "$as_me:12205: \"$ac_link\"") >&5
12206   (eval $ac_link) 2>&5
12207   ac_status=$?
12208   echo "$as_me:12208: \$? = $ac_status" >&5
12209   (exit $ac_status); } &&
12210          { ac_try='test -s conftest$ac_exeext'
12211   { (eval echo "$as_me:12211: \"$ac_try\"") >&5
12212   (eval $ac_try) 2>&5
12213   ac_status=$?
12214   echo "$as_me:12214: \$? = $ac_status" >&5
12215   (exit $ac_status); }; }; then
12216   cf_result=yes
12217 else
12218   echo "$as_me: failed program was:" >&5
12219 cat conftest.$ac_ext >&5
12220 cf_result=no
12221 fi
12222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12223                 fi
12224                 eval 'cf_cv_func_'$cf_func'=$cf_result'
12225
12226 fi
12227
12228         # use the computed/retrieved cache-value:
12229         eval 'cf_result=$cf_cv_func_'$cf_func
12230         echo "$as_me:12230: result: $cf_result" >&5
12231 echo "${ECHO_T}$cf_result" >&6
12232         if test $cf_result != no; then
12233                 cat >>confdefs.h <<EOF
12234 #define HAVE_${cf_tr_func} 1
12235 EOF
12236
12237         fi
12238 done
12239
12240 echo "$as_me:12240: checking for ncurses extended functions" >&5
12241 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
12242 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
12243   echo $ECHO_N "(cached) $ECHO_C" >&6
12244 else
12245
12246 cat >conftest.$ac_ext <<_ACEOF
12247 #line 12247 "configure"
12248 #include "confdefs.h"
12249
12250 #include <${cf_cv_ncurses_header:-curses.h}>
12251 int
12252 main ()
12253 {
12254
12255 int x = NCURSES_EXT_FUNCS
12256
12257   ;
12258   return 0;
12259 }
12260 _ACEOF
12261 rm -f conftest.$ac_objext
12262 if { (eval echo "$as_me:12262: \"$ac_compile\"") >&5
12263   (eval $ac_compile) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit $ac_status); } &&
12267          { ac_try='test -s conftest.$ac_objext'
12268   { (eval echo "$as_me:12268: \"$ac_try\"") >&5
12269   (eval $ac_try) 2>&5
12270   ac_status=$?
12271   echo "$as_me:12271: \$? = $ac_status" >&5
12272   (exit $ac_status); }; }; then
12273   cf_cv_ncurses_ext_funcs=defined
12274 else
12275   echo "$as_me: failed program was:" >&5
12276 cat conftest.$ac_ext >&5
12277
12278 cat >conftest.$ac_ext <<_ACEOF
12279 #line 12279 "configure"
12280 #include "confdefs.h"
12281
12282 #include <${cf_cv_ncurses_header:-curses.h}>
12283 int
12284 main ()
12285 {
12286
12287         (void) assume_default_colors (0, 0);
12288         (void) curses_version ();
12289         (void) define_key (0, 0);
12290         (void) is_term_resized (0, 0);
12291         (void) key_defined (0);
12292         (void) keybound (0, 0);
12293         (void) keyok (0, 0);
12294         (void) resize_term (0, 0);
12295         (void) resizeterm (0, 0);
12296         (void) use_default_colors ();
12297         (void) use_extended_names (0);
12298         (void) wresize (0, 0, 0);
12299   ;
12300   return 0;
12301 }
12302 _ACEOF
12303 rm -f conftest.$ac_objext conftest$ac_exeext
12304 if { (eval echo "$as_me:12304: \"$ac_link\"") >&5
12305   (eval $ac_link) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit $ac_status); } &&
12309          { ac_try='test -s conftest$ac_exeext'
12310   { (eval echo "$as_me:12310: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit $ac_status); }; }; then
12315   cf_cv_ncurses_ext_funcs=yes
12316 else
12317   echo "$as_me: failed program was:" >&5
12318 cat conftest.$ac_ext >&5
12319 cf_cv_ncurses_ext_funcs=no
12320 fi
12321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12322
12323 fi
12324 rm -f conftest.$ac_objext conftest.$ac_ext
12325
12326 fi
12327 echo "$as_me:12327: result: $cf_cv_ncurses_ext_funcs" >&5
12328 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
12329 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
12330 #define NCURSES_EXT_FUNCS 1
12331 EOF
12332
12333 echo "$as_me:12333: checking for wide-character functions" >&5
12334 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
12335 if test "${cf_cv_widechar_funcs+set}" = set; then
12336   echo $ECHO_N "(cached) $ECHO_C" >&6
12337 else
12338
12339 cat >conftest.$ac_ext <<_ACEOF
12340 #line 12340 "configure"
12341 #include "confdefs.h"
12342
12343 #include <${cf_cv_ncurses_header:-curses.h}>
12344 int
12345 main ()
12346 {
12347
12348         static wchar_t src_wchar[2];
12349         static cchar_t dst_cchar;
12350         setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
12351
12352   ;
12353   return 0;
12354 }
12355 _ACEOF
12356 rm -f conftest.$ac_objext conftest$ac_exeext
12357 if { (eval echo "$as_me:12357: \"$ac_link\"") >&5
12358   (eval $ac_link) 2>&5
12359   ac_status=$?
12360   echo "$as_me:12360: \$? = $ac_status" >&5
12361   (exit $ac_status); } &&
12362          { ac_try='test -s conftest$ac_exeext'
12363   { (eval echo "$as_me:12363: \"$ac_try\"") >&5
12364   (eval $ac_try) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit $ac_status); }; }; then
12368   cf_cv_widechar_funcs=yes
12369 else
12370   echo "$as_me: failed program was:" >&5
12371 cat conftest.$ac_ext >&5
12372 cf_cv_widechar_funcs=no
12373 fi
12374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12375
12376 fi
12377 echo "$as_me:12377: result: $cf_cv_widechar_funcs" >&5
12378 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
12379 if test "$cf_cv_widechar_funcs" != no ; then
12380         cat >>confdefs.h <<\EOF
12381 #define USE_WIDEC_SUPPORT 1
12382 EOF
12383
12384 else
12385         cat >>confdefs.h <<\EOF
12386 #define USE_WIDEC_SUPPORT 0
12387 EOF
12388
12389 fi
12390
12391 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12392
12393 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12394                   inttypes.h stdint.h unistd.h
12395 do
12396 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12397 echo "$as_me:12397: checking for $ac_header" >&5
12398 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12399 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12400   echo $ECHO_N "(cached) $ECHO_C" >&6
12401 else
12402   cat >conftest.$ac_ext <<_ACEOF
12403 #line 12403 "configure"
12404 #include "confdefs.h"
12405 $ac_includes_default
12406 #include <$ac_header>
12407 _ACEOF
12408 rm -f conftest.$ac_objext
12409 if { (eval echo "$as_me:12409: \"$ac_compile\"") >&5
12410   (eval $ac_compile) 2>&5
12411   ac_status=$?
12412   echo "$as_me:12412: \$? = $ac_status" >&5
12413   (exit $ac_status); } &&
12414          { ac_try='test -s conftest.$ac_objext'
12415   { (eval echo "$as_me:12415: \"$ac_try\"") >&5
12416   (eval $ac_try) 2>&5
12417   ac_status=$?
12418   echo "$as_me:12418: \$? = $ac_status" >&5
12419   (exit $ac_status); }; }; then
12420   eval "$as_ac_Header=yes"
12421 else
12422   echo "$as_me: failed program was:" >&5
12423 cat conftest.$ac_ext >&5
12424 eval "$as_ac_Header=no"
12425 fi
12426 rm -f conftest.$ac_objext conftest.$ac_ext
12427 fi
12428 echo "$as_me:12428: result: `eval echo '${'$as_ac_Header'}'`" >&5
12429 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12430 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12431   cat >>confdefs.h <<EOF
12432 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12433 EOF
12434
12435 fi
12436 done
12437
12438 echo "$as_me:12438: checking for pid_t" >&5
12439 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
12440 if test "${ac_cv_type_pid_t+set}" = set; then
12441   echo $ECHO_N "(cached) $ECHO_C" >&6
12442 else
12443   cat >conftest.$ac_ext <<_ACEOF
12444 #line 12444 "configure"
12445 #include "confdefs.h"
12446 $ac_includes_default
12447 int
12448 main ()
12449 {
12450 if ((pid_t *) 0)
12451   return 0;
12452 if (sizeof (pid_t))
12453   return 0;
12454   ;
12455   return 0;
12456 }
12457 _ACEOF
12458 rm -f conftest.$ac_objext
12459 if { (eval echo "$as_me:12459: \"$ac_compile\"") >&5
12460   (eval $ac_compile) 2>&5
12461   ac_status=$?
12462   echo "$as_me:12462: \$? = $ac_status" >&5
12463   (exit $ac_status); } &&
12464          { ac_try='test -s conftest.$ac_objext'
12465   { (eval echo "$as_me:12465: \"$ac_try\"") >&5
12466   (eval $ac_try) 2>&5
12467   ac_status=$?
12468   echo "$as_me:12468: \$? = $ac_status" >&5
12469   (exit $ac_status); }; }; then
12470   ac_cv_type_pid_t=yes
12471 else
12472   echo "$as_me: failed program was:" >&5
12473 cat conftest.$ac_ext >&5
12474 ac_cv_type_pid_t=no
12475 fi
12476 rm -f conftest.$ac_objext conftest.$ac_ext
12477 fi
12478 echo "$as_me:12478: result: $ac_cv_type_pid_t" >&5
12479 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
12480 if test $ac_cv_type_pid_t = yes; then
12481   :
12482 else
12483
12484 cat >>confdefs.h <<EOF
12485 #define pid_t int
12486 EOF
12487
12488 fi
12489
12490 for ac_header in unistd.h vfork.h
12491 do
12492 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12493 echo "$as_me:12493: checking for $ac_header" >&5
12494 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12495 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12496   echo $ECHO_N "(cached) $ECHO_C" >&6
12497 else
12498   cat >conftest.$ac_ext <<_ACEOF
12499 #line 12499 "configure"
12500 #include "confdefs.h"
12501 #include <$ac_header>
12502 _ACEOF
12503 if { (eval echo "$as_me:12503: \"$ac_cpp conftest.$ac_ext\"") >&5
12504   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12505   ac_status=$?
12506   egrep -v '^ *\+' conftest.er1 >conftest.err
12507   rm -f conftest.er1
12508   cat conftest.err >&5
12509   echo "$as_me:12509: \$? = $ac_status" >&5
12510   (exit $ac_status); } >/dev/null; then
12511   if test -s conftest.err; then
12512     ac_cpp_err=$ac_c_preproc_warn_flag
12513   else
12514     ac_cpp_err=
12515   fi
12516 else
12517   ac_cpp_err=yes
12518 fi
12519 if test -z "$ac_cpp_err"; then
12520   eval "$as_ac_Header=yes"
12521 else
12522   echo "$as_me: failed program was:" >&5
12523   cat conftest.$ac_ext >&5
12524   eval "$as_ac_Header=no"
12525 fi
12526 rm -f conftest.err conftest.$ac_ext
12527 fi
12528 echo "$as_me:12528: result: `eval echo '${'$as_ac_Header'}'`" >&5
12529 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12530 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12531   cat >>confdefs.h <<EOF
12532 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12533 EOF
12534
12535 fi
12536 done
12537
12538 for ac_func in fork vfork
12539 do
12540 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12541 echo "$as_me:12541: checking for $ac_func" >&5
12542 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12543 if eval "test \"\${$as_ac_var+set}\" = set"; then
12544   echo $ECHO_N "(cached) $ECHO_C" >&6
12545 else
12546   cat >conftest.$ac_ext <<_ACEOF
12547 #line 12547 "configure"
12548 #include "confdefs.h"
12549 /* System header to define __stub macros and hopefully few prototypes,
12550     which can conflict with char $ac_func (); below.  */
12551 #include <assert.h>
12552 /* Override any gcc2 internal prototype to avoid an error.  */
12553 #ifdef __cplusplus
12554 extern "C"
12555 #endif
12556 /* We use char because int might match the return type of a gcc2
12557    builtin and then its argument prototype would still apply.  */
12558 char $ac_func ();
12559 char (*f) ();
12560
12561 int
12562 main ()
12563 {
12564 /* The GNU C library defines this for functions which it implements
12565     to always fail with ENOSYS.  Some functions are actually named
12566     something starting with __ and the normal name is an alias.  */
12567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12568 choke me
12569 #else
12570 f = $ac_func;
12571 #endif
12572
12573   ;
12574   return 0;
12575 }
12576 _ACEOF
12577 rm -f conftest.$ac_objext conftest$ac_exeext
12578 if { (eval echo "$as_me:12578: \"$ac_link\"") >&5
12579   (eval $ac_link) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); } &&
12583          { ac_try='test -s conftest$ac_exeext'
12584   { (eval echo "$as_me:12584: \"$ac_try\"") >&5
12585   (eval $ac_try) 2>&5
12586   ac_status=$?
12587   echo "$as_me:12587: \$? = $ac_status" >&5
12588   (exit $ac_status); }; }; then
12589   eval "$as_ac_var=yes"
12590 else
12591   echo "$as_me: failed program was:" >&5
12592 cat conftest.$ac_ext >&5
12593 eval "$as_ac_var=no"
12594 fi
12595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12596 fi
12597 echo "$as_me:12597: result: `eval echo '${'$as_ac_var'}'`" >&5
12598 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12599 if test `eval echo '${'$as_ac_var'}'` = yes; then
12600   cat >>confdefs.h <<EOF
12601 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12602 EOF
12603
12604 fi
12605 done
12606
12607 ac_cv_func_fork_works=$ac_cv_func_fork
12608 if test "x$ac_cv_func_fork" = xyes; then
12609   echo "$as_me:12609: checking for working fork" >&5
12610 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
12611 if test "${ac_cv_func_fork_works+set}" = set; then
12612   echo $ECHO_N "(cached) $ECHO_C" >&6
12613 else
12614   if test "$cross_compiling" = yes; then
12615   ac_cv_func_fork_works=cross
12616 else
12617   cat >conftest.$ac_ext <<_ACEOF
12618 /* By Rüdiger Kuhlmann. */
12619       #include <sys/types.h>
12620       #if HAVE_UNISTD_H
12621       # include <unistd.h>
12622       #endif
12623       /* Some systems only have a dummy stub for fork() */
12624       int main ()
12625       {
12626         if (fork() < 0)
12627           $ac_main_return (1);
12628         $ac_main_return (0);
12629       }
12630 _ACEOF
12631 rm -f conftest$ac_exeext
12632 if { (eval echo "$as_me:12632: \"$ac_link\"") >&5
12633   (eval $ac_link) 2>&5
12634   ac_status=$?
12635   echo "$as_me:12635: \$? = $ac_status" >&5
12636   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12637   { (eval echo "$as_me:12637: \"$ac_try\"") >&5
12638   (eval $ac_try) 2>&5
12639   ac_status=$?
12640   echo "$as_me:12640: \$? = $ac_status" >&5
12641   (exit $ac_status); }; }; then
12642   ac_cv_func_fork_works=yes
12643 else
12644   echo "$as_me: program exited with status $ac_status" >&5
12645 echo "$as_me: failed program was:" >&5
12646 cat conftest.$ac_ext >&5
12647 ac_cv_func_fork_works=no
12648 fi
12649 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12650 fi
12651 fi
12652 echo "$as_me:12652: result: $ac_cv_func_fork_works" >&5
12653 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
12654
12655 fi
12656 if test "x$ac_cv_func_fork_works" = xcross; then
12657   case $host in
12658     *-*-amigaos* | *-*-msdosdjgpp*)
12659       # Override, as these systems have only a dummy fork() stub
12660       ac_cv_func_fork_works=no
12661       ;;
12662     *)
12663       ac_cv_func_fork_works=yes
12664       ;;
12665   esac
12666   { echo "$as_me:12666: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
12667 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
12668 fi
12669 ac_cv_func_vfork_works=$ac_cv_func_vfork
12670 if test "x$ac_cv_func_vfork" = xyes; then
12671   echo "$as_me:12671: checking for working vfork" >&5
12672 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
12673 if test "${ac_cv_func_vfork_works+set}" = set; then
12674   echo $ECHO_N "(cached) $ECHO_C" >&6
12675 else
12676   if test "$cross_compiling" = yes; then
12677   ac_cv_func_vfork_works=cross
12678 else
12679   cat >conftest.$ac_ext <<_ACEOF
12680 #line 12680 "configure"
12681 #include "confdefs.h"
12682 /* Thanks to Paul Eggert for this test.  */
12683 #include <stdio.h>
12684 #include <sys/types.h>
12685 #include <sys/stat.h>
12686 #if HAVE_UNISTD_H
12687 # include <unistd.h>
12688 #endif
12689 #if HAVE_VFORK_H
12690 # include <vfork.h>
12691 #endif
12692 /* On some sparc systems, changes by the child to local and incoming
12693    argument registers are propagated back to the parent.  The compiler
12694    is told about this with #include <vfork.h>, but some compilers
12695    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
12696    static variable whose address is put into a register that is
12697    clobbered by the vfork.  */
12698 static
12699 #ifdef __cplusplus
12700 sparc_address_test (int arg)
12701 # else
12702 sparc_address_test (arg) int arg;
12703 #endif
12704 {
12705   static pid_t child;
12706   if (!child) {
12707     child = vfork ();
12708     if (child < 0) {
12709       perror ("vfork");
12710       _exit(2);
12711     }
12712     if (!child) {
12713       arg = getpid();
12714       write(-1, "", 0);
12715       _exit (arg);
12716     }
12717   }
12718 }
12719
12720 int
12721 main ()
12722 {
12723   pid_t parent = getpid ();
12724   pid_t child;
12725
12726   sparc_address_test ();
12727
12728   child = vfork ();
12729
12730   if (child == 0) {
12731     /* Here is another test for sparc vfork register problems.  This
12732        test uses lots of local variables, at least as many local
12733        variables as main has allocated so far including compiler
12734        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
12735        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
12736        reuse the register of parent for one of the local variables,
12737        since it will think that parent can't possibly be used any more
12738        in this routine.  Assigning to the local variable will thus
12739        munge parent in the parent process.  */
12740     pid_t
12741       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12742       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12743     /* Convince the compiler that p..p7 are live; otherwise, it might
12744        use the same hardware register for all 8 local variables.  */
12745     if (p != p1 || p != p2 || p != p3 || p != p4
12746         || p != p5 || p != p6 || p != p7)
12747       _exit(1);
12748
12749     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12750        from child file descriptors.  If the child closes a descriptor
12751        before it execs or exits, this munges the parent's descriptor
12752        as well.  Test for this by closing stdout in the child.  */
12753     _exit(close(fileno(stdout)) != 0);
12754   } else {
12755     int status;
12756     struct stat st;
12757
12758     while (wait(&status) != child)
12759       ;
12760     $ac_main_return(
12761          /* Was there some problem with vforking?  */
12762          child < 0
12763
12764          /* Did the child fail?  (This shouldn't happen.)  */
12765          || status
12766
12767          /* Did the vfork/compiler bug occur?  */
12768          || parent != getpid()
12769
12770          /* Did the file descriptor bug occur?  */
12771          || fstat(fileno(stdout), &st) != 0
12772          );
12773   }
12774 }
12775 _ACEOF
12776 rm -f conftest$ac_exeext
12777 if { (eval echo "$as_me:12777: \"$ac_link\"") >&5
12778   (eval $ac_link) 2>&5
12779   ac_status=$?
12780   echo "$as_me:12780: \$? = $ac_status" >&5
12781   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12782   { (eval echo "$as_me:12782: \"$ac_try\"") >&5
12783   (eval $ac_try) 2>&5
12784   ac_status=$?
12785   echo "$as_me:12785: \$? = $ac_status" >&5
12786   (exit $ac_status); }; }; then
12787   ac_cv_func_vfork_works=yes
12788 else
12789   echo "$as_me: program exited with status $ac_status" >&5
12790 echo "$as_me: failed program was:" >&5
12791 cat conftest.$ac_ext >&5
12792 ac_cv_func_vfork_works=no
12793 fi
12794 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12795 fi
12796 fi
12797 echo "$as_me:12797: result: $ac_cv_func_vfork_works" >&5
12798 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
12799
12800 fi;
12801 if test "x$ac_cv_func_fork_works" = xcross; then
12802   ac_cv_func_vfork_works=ac_cv_func_vfork
12803   { echo "$as_me:12803: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
12804 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
12805 fi
12806
12807 if test "x$ac_cv_func_vfork_works" = xyes; then
12808
12809 cat >>confdefs.h <<\EOF
12810 #define HAVE_WORKING_VFORK 1
12811 EOF
12812
12813 else
12814
12815 cat >>confdefs.h <<\EOF
12816 #define vfork fork
12817 EOF
12818
12819 fi
12820 if test "x$ac_cv_func_fork_works" = xyes; then
12821
12822 cat >>confdefs.h <<\EOF
12823 #define HAVE_WORKING_FORK 1
12824 EOF
12825
12826 fi
12827
12828 echo "$as_me:12828: checking if sys/time.h works with sys/select.h" >&5
12829 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12830 if test "${cf_cv_sys_time_select+set}" = set; then
12831   echo $ECHO_N "(cached) $ECHO_C" >&6
12832 else
12833
12834 cat >conftest.$ac_ext <<_ACEOF
12835 #line 12835 "configure"
12836 #include "confdefs.h"
12837
12838 #include <sys/types.h>
12839 #ifdef HAVE_SYS_TIME_H
12840 #include <sys/time.h>
12841 #endif
12842 #ifdef HAVE_SYS_SELECT_H
12843 #include <sys/select.h>
12844 #endif
12845
12846 int
12847 main ()
12848 {
12849
12850   ;
12851   return 0;
12852 }
12853 _ACEOF
12854 rm -f conftest.$ac_objext
12855 if { (eval echo "$as_me:12855: \"$ac_compile\"") >&5
12856   (eval $ac_compile) 2>&5
12857   ac_status=$?
12858   echo "$as_me:12858: \$? = $ac_status" >&5
12859   (exit $ac_status); } &&
12860          { ac_try='test -s conftest.$ac_objext'
12861   { (eval echo "$as_me:12861: \"$ac_try\"") >&5
12862   (eval $ac_try) 2>&5
12863   ac_status=$?
12864   echo "$as_me:12864: \$? = $ac_status" >&5
12865   (exit $ac_status); }; }; then
12866   cf_cv_sys_time_select=yes
12867 else
12868   echo "$as_me: failed program was:" >&5
12869 cat conftest.$ac_ext >&5
12870 cf_cv_sys_time_select=no
12871 fi
12872 rm -f conftest.$ac_objext conftest.$ac_ext
12873
12874 fi
12875
12876 echo "$as_me:12876: result: $cf_cv_sys_time_select" >&5
12877 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12878 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12879 #define HAVE_SYS_TIME_SELECT 1
12880 EOF
12881
12882 echo "$as_me:12882: checking for function curses_version" >&5
12883 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
12884 if test "${cf_cv_func_curses_version+set}" = set; then
12885   echo $ECHO_N "(cached) $ECHO_C" >&6
12886 else
12887
12888 if test "$cross_compiling" = yes; then
12889   cf_cv_func_curses_version=unknown
12890 else
12891   cat >conftest.$ac_ext <<_ACEOF
12892 #line 12892 "configure"
12893 #include "confdefs.h"
12894
12895 #include <${cf_cv_ncurses_header:-curses.h}>
12896 int main()
12897 {
12898         char temp[1024];
12899         sprintf(temp, "%s\n", curses_version());
12900         ${cf_cv_main_return:-return}(0);
12901 }
12902
12903 _ACEOF
12904 rm -f conftest$ac_exeext
12905 if { (eval echo "$as_me:12905: \"$ac_link\"") >&5
12906   (eval $ac_link) 2>&5
12907   ac_status=$?
12908   echo "$as_me:12908: \$? = $ac_status" >&5
12909   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12910   { (eval echo "$as_me:12910: \"$ac_try\"") >&5
12911   (eval $ac_try) 2>&5
12912   ac_status=$?
12913   echo "$as_me:12913: \$? = $ac_status" >&5
12914   (exit $ac_status); }; }; then
12915   cf_cv_func_curses_version=yes
12916
12917 else
12918   echo "$as_me: program exited with status $ac_status" >&5
12919 echo "$as_me: failed program was:" >&5
12920 cat conftest.$ac_ext >&5
12921 cf_cv_func_curses_version=no
12922
12923 fi
12924 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12925 fi
12926 rm -f core
12927 fi
12928 echo "$as_me:12928: result: $cf_cv_func_curses_version" >&5
12929 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
12930 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
12931 #define HAVE_CURSES_VERSION 1
12932 EOF
12933
12934 echo "$as_me:12934: checking for ncurses wrap-prefix" >&5
12935 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
12936
12937 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
12938 if test "${with_ncurses_wrap_prefix+set}" = set; then
12939   withval="$with_ncurses_wrap_prefix"
12940   NCURSES_WRAP_PREFIX=$withval
12941 else
12942   NCURSES_WRAP_PREFIX=_nc_
12943 fi;
12944 echo "$as_me:12944: result: $NCURSES_WRAP_PREFIX" >&5
12945 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12946
12947 echo "$as_me:12947: checking for alternate character set array" >&5
12948 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
12949 if test "${cf_cv_curses_acs_map+set}" = set; then
12950   echo $ECHO_N "(cached) $ECHO_C" >&6
12951 else
12952
12953 cf_cv_curses_acs_map=unknown
12954 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
12955 do
12956 cat >conftest.$ac_ext <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959
12960 #include <${cf_cv_ncurses_header:-curses.h}>
12961
12962 int
12963 main ()
12964 {
12965
12966 $name['k'] = ACS_PLUS
12967
12968   ;
12969   return 0;
12970 }
12971 _ACEOF
12972 rm -f conftest.$ac_objext conftest$ac_exeext
12973 if { (eval echo "$as_me:12973: \"$ac_link\"") >&5
12974   (eval $ac_link) 2>&5
12975   ac_status=$?
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit $ac_status); } &&
12978          { ac_try='test -s conftest$ac_exeext'
12979   { (eval echo "$as_me:12979: \"$ac_try\"") >&5
12980   (eval $ac_try) 2>&5
12981   ac_status=$?
12982   echo "$as_me:12982: \$? = $ac_status" >&5
12983   (exit $ac_status); }; }; then
12984   cf_cv_curses_acs_map=$name; break
12985 else
12986   echo "$as_me: failed program was:" >&5
12987 cat conftest.$ac_ext >&5
12988 fi
12989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12990 done
12991
12992 fi
12993 echo "$as_me:12993: result: $cf_cv_curses_acs_map" >&5
12994 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
12995
12996 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
12997 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
12998 EOF
12999
13000 echo "$as_me:13000: checking for wide alternate character set array" >&5
13001 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
13002 if test "${cf_cv_curses_wacs_map+set}" = set; then
13003   echo $ECHO_N "(cached) $ECHO_C" >&6
13004 else
13005
13006         cf_cv_curses_wacs_map=unknown
13007         for name in wacs_map _wacs_map __wacs_map _nc_wacs
13008         do
13009         cat >conftest.$ac_ext <<_ACEOF
13010 #line 13010 "configure"
13011 #include "confdefs.h"
13012
13013 #ifndef _XOPEN_SOURCE_EXTENDED
13014 #define _XOPEN_SOURCE_EXTENDED
13015 #endif
13016 #include <${cf_cv_ncurses_header:-curses.h}>
13017 int
13018 main ()
13019 {
13020 $name['k'] = *WACS_PLUS
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext conftest$ac_exeext
13026 if { (eval echo "$as_me:13026: \"$ac_link\"") >&5
13027   (eval $ac_link) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); } &&
13031          { ac_try='test -s conftest$ac_exeext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   cf_cv_curses_wacs_map=$name
13038          break
13039 else
13040   echo "$as_me: failed program was:" >&5
13041 cat conftest.$ac_ext >&5
13042 fi
13043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13044         done
13045 fi
13046 echo "$as_me:13046: result: $cf_cv_curses_wacs_map" >&5
13047 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
13048
13049 echo "$as_me:13049: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
13050 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
13051 cat >conftest.$ac_ext <<_ACEOF
13052 #line 13052 "configure"
13053 #include "confdefs.h"
13054
13055 #ifndef _XOPEN_SOURCE_EXTENDED
13056 #define _XOPEN_SOURCE_EXTENDED
13057 #endif
13058 #include <${cf_cv_ncurses_header:-curses.h}>
13059 int
13060 main ()
13061 {
13062
13063 attr_t foo
13064
13065   ;
13066   return 0;
13067 }
13068 _ACEOF
13069 rm -f conftest.$ac_objext
13070 if { (eval echo "$as_me:13070: \"$ac_compile\"") >&5
13071   (eval $ac_compile) 2>&5
13072   ac_status=$?
13073   echo "$as_me:13073: \$? = $ac_status" >&5
13074   (exit $ac_status); } &&
13075          { ac_try='test -s conftest.$ac_objext'
13076   { (eval echo "$as_me:13076: \"$ac_try\"") >&5
13077   (eval $ac_try) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit $ac_status); }; }; then
13081   cf_result=yes
13082 else
13083   echo "$as_me: failed program was:" >&5
13084 cat conftest.$ac_ext >&5
13085 cf_result=no
13086 fi
13087 rm -f conftest.$ac_objext conftest.$ac_ext
13088 echo "$as_me:13088: result: $cf_result" >&5
13089 echo "${ECHO_T}$cf_result" >&6
13090 if test $cf_result = yes ; then
13091
13092 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13093
13094         cat >>confdefs.h <<EOF
13095 #define $cf_result 1
13096 EOF
13097
13098 else
13099         cat >>confdefs.h <<EOF
13100 #define attr_t long
13101 EOF
13102
13103 fi
13104
13105 # This is needed on Tru64 5.0 to declare mbstate_t
13106 echo "$as_me:13106: checking if we must include wchar.h to declare mbstate_t" >&5
13107 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13108 if test "${cf_cv_mbstate_t+set}" = set; then
13109   echo $ECHO_N "(cached) $ECHO_C" >&6
13110 else
13111
13112 cat >conftest.$ac_ext <<_ACEOF
13113 #line 13113 "configure"
13114 #include "confdefs.h"
13115
13116 #include <stdlib.h>
13117 #include <stdarg.h>
13118 #include <stdio.h>
13119 #ifdef HAVE_LIBUTF8_H
13120 #include <libutf8.h>
13121 #endif
13122 int
13123 main ()
13124 {
13125 mbstate_t state
13126   ;
13127   return 0;
13128 }
13129 _ACEOF
13130 rm -f conftest.$ac_objext
13131 if { (eval echo "$as_me:13131: \"$ac_compile\"") >&5
13132   (eval $ac_compile) 2>&5
13133   ac_status=$?
13134   echo "$as_me:13134: \$? = $ac_status" >&5
13135   (exit $ac_status); } &&
13136          { ac_try='test -s conftest.$ac_objext'
13137   { (eval echo "$as_me:13137: \"$ac_try\"") >&5
13138   (eval $ac_try) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit $ac_status); }; }; then
13142   cf_cv_mbstate_t=no
13143 else
13144   echo "$as_me: failed program was:" >&5
13145 cat conftest.$ac_ext >&5
13146 cat >conftest.$ac_ext <<_ACEOF
13147 #line 13147 "configure"
13148 #include "confdefs.h"
13149
13150 #include <stdlib.h>
13151 #include <stdarg.h>
13152 #include <stdio.h>
13153 #include <wchar.h>
13154 #ifdef HAVE_LIBUTF8_H
13155 #include <libutf8.h>
13156 #endif
13157 int
13158 main ()
13159 {
13160 mbstate_t value
13161   ;
13162   return 0;
13163 }
13164 _ACEOF
13165 rm -f conftest.$ac_objext
13166 if { (eval echo "$as_me:13166: \"$ac_compile\"") >&5
13167   (eval $ac_compile) 2>&5
13168   ac_status=$?
13169   echo "$as_me:13169: \$? = $ac_status" >&5
13170   (exit $ac_status); } &&
13171          { ac_try='test -s conftest.$ac_objext'
13172   { (eval echo "$as_me:13172: \"$ac_try\"") >&5
13173   (eval $ac_try) 2>&5
13174   ac_status=$?
13175   echo "$as_me:13175: \$? = $ac_status" >&5
13176   (exit $ac_status); }; }; then
13177   cf_cv_mbstate_t=yes
13178 else
13179   echo "$as_me: failed program was:" >&5
13180 cat conftest.$ac_ext >&5
13181 cf_cv_mbstate_t=unknown
13182 fi
13183 rm -f conftest.$ac_objext conftest.$ac_ext
13184 fi
13185 rm -f conftest.$ac_objext conftest.$ac_ext
13186 fi
13187 echo "$as_me:13187: result: $cf_cv_mbstate_t" >&5
13188 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13189
13190 if test "$cf_cv_mbstate_t" = yes ; then
13191         cat >>confdefs.h <<\EOF
13192 #define NEED_WCHAR_H 1
13193 EOF
13194
13195         NEED_WCHAR_H=1
13196 fi
13197
13198 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13199 if test "$cf_cv_mbstate_t" = unknown ; then
13200         NCURSES_MBSTATE_T=1
13201 fi
13202
13203 # if we find mbstate_t in either place, use substitution to provide a fallback.
13204 if test "$cf_cv_mbstate_t" != unknown ; then
13205         NCURSES_OK_MBSTATE_T=1
13206 fi
13207
13208 # This is needed on Tru64 5.0 to declare wchar_t
13209 echo "$as_me:13209: checking if we must include wchar.h to declare wchar_t" >&5
13210 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13211 if test "${cf_cv_wchar_t+set}" = set; then
13212   echo $ECHO_N "(cached) $ECHO_C" >&6
13213 else
13214
13215 cat >conftest.$ac_ext <<_ACEOF
13216 #line 13216 "configure"
13217 #include "confdefs.h"
13218
13219 #include <stdlib.h>
13220 #include <stdarg.h>
13221 #include <stdio.h>
13222 #ifdef HAVE_LIBUTF8_H
13223 #include <libutf8.h>
13224 #endif
13225 int
13226 main ()
13227 {
13228 wchar_t state
13229   ;
13230   return 0;
13231 }
13232 _ACEOF
13233 rm -f conftest.$ac_objext
13234 if { (eval echo "$as_me:13234: \"$ac_compile\"") >&5
13235   (eval $ac_compile) 2>&5
13236   ac_status=$?
13237   echo "$as_me:13237: \$? = $ac_status" >&5
13238   (exit $ac_status); } &&
13239          { ac_try='test -s conftest.$ac_objext'
13240   { (eval echo "$as_me:13240: \"$ac_try\"") >&5
13241   (eval $ac_try) 2>&5
13242   ac_status=$?
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); }; }; then
13245   cf_cv_wchar_t=no
13246 else
13247   echo "$as_me: failed program was:" >&5
13248 cat conftest.$ac_ext >&5
13249 cat >conftest.$ac_ext <<_ACEOF
13250 #line 13250 "configure"
13251 #include "confdefs.h"
13252
13253 #include <stdlib.h>
13254 #include <stdarg.h>
13255 #include <stdio.h>
13256 #include <wchar.h>
13257 #ifdef HAVE_LIBUTF8_H
13258 #include <libutf8.h>
13259 #endif
13260 int
13261 main ()
13262 {
13263 wchar_t value
13264   ;
13265   return 0;
13266 }
13267 _ACEOF
13268 rm -f conftest.$ac_objext
13269 if { (eval echo "$as_me:13269: \"$ac_compile\"") >&5
13270   (eval $ac_compile) 2>&5
13271   ac_status=$?
13272   echo "$as_me:13272: \$? = $ac_status" >&5
13273   (exit $ac_status); } &&
13274          { ac_try='test -s conftest.$ac_objext'
13275   { (eval echo "$as_me:13275: \"$ac_try\"") >&5
13276   (eval $ac_try) 2>&5
13277   ac_status=$?
13278   echo "$as_me:13278: \$? = $ac_status" >&5
13279   (exit $ac_status); }; }; then
13280   cf_cv_wchar_t=yes
13281 else
13282   echo "$as_me: failed program was:" >&5
13283 cat conftest.$ac_ext >&5
13284 cf_cv_wchar_t=unknown
13285 fi
13286 rm -f conftest.$ac_objext conftest.$ac_ext
13287 fi
13288 rm -f conftest.$ac_objext conftest.$ac_ext
13289 fi
13290 echo "$as_me:13290: result: $cf_cv_wchar_t" >&5
13291 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13292
13293 if test "$cf_cv_wchar_t" = yes ; then
13294         cat >>confdefs.h <<\EOF
13295 #define NEED_WCHAR_H 1
13296 EOF
13297
13298         NEED_WCHAR_H=1
13299 fi
13300
13301 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13302 if test "$cf_cv_wchar_t" = unknown ; then
13303         NCURSES_WCHAR_T=1
13304 fi
13305
13306 # if we find wchar_t in either place, use substitution to provide a fallback.
13307 if test "$cf_cv_wchar_t" != unknown ; then
13308         NCURSES_OK_WCHAR_T=1
13309 fi
13310
13311 # This is needed on Tru64 5.0 to declare wint_t
13312 echo "$as_me:13312: checking if we must include wchar.h to declare wint_t" >&5
13313 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13314 if test "${cf_cv_wint_t+set}" = set; then
13315   echo $ECHO_N "(cached) $ECHO_C" >&6
13316 else
13317
13318 cat >conftest.$ac_ext <<_ACEOF
13319 #line 13319 "configure"
13320 #include "confdefs.h"
13321
13322 #include <stdlib.h>
13323 #include <stdarg.h>
13324 #include <stdio.h>
13325 #ifdef HAVE_LIBUTF8_H
13326 #include <libutf8.h>
13327 #endif
13328 int
13329 main ()
13330 {
13331 wint_t state
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_wint_t=no
13349 else
13350   echo "$as_me: failed program was:" >&5
13351 cat conftest.$ac_ext >&5
13352 cat >conftest.$ac_ext <<_ACEOF
13353 #line 13353 "configure"
13354 #include "confdefs.h"
13355
13356 #include <stdlib.h>
13357 #include <stdarg.h>
13358 #include <stdio.h>
13359 #include <wchar.h>
13360 #ifdef HAVE_LIBUTF8_H
13361 #include <libutf8.h>
13362 #endif
13363 int
13364 main ()
13365 {
13366 wint_t value
13367   ;
13368   return 0;
13369 }
13370 _ACEOF
13371 rm -f conftest.$ac_objext
13372 if { (eval echo "$as_me:13372: \"$ac_compile\"") >&5
13373   (eval $ac_compile) 2>&5
13374   ac_status=$?
13375   echo "$as_me:13375: \$? = $ac_status" >&5
13376   (exit $ac_status); } &&
13377          { ac_try='test -s conftest.$ac_objext'
13378   { (eval echo "$as_me:13378: \"$ac_try\"") >&5
13379   (eval $ac_try) 2>&5
13380   ac_status=$?
13381   echo "$as_me:13381: \$? = $ac_status" >&5
13382   (exit $ac_status); }; }; then
13383   cf_cv_wint_t=yes
13384 else
13385   echo "$as_me: failed program was:" >&5
13386 cat conftest.$ac_ext >&5
13387 cf_cv_wint_t=unknown
13388 fi
13389 rm -f conftest.$ac_objext conftest.$ac_ext
13390 fi
13391 rm -f conftest.$ac_objext conftest.$ac_ext
13392 fi
13393 echo "$as_me:13393: result: $cf_cv_wint_t" >&5
13394 echo "${ECHO_T}$cf_cv_wint_t" >&6
13395
13396 if test "$cf_cv_wint_t" = yes ; then
13397         cat >>confdefs.h <<\EOF
13398 #define NEED_WCHAR_H 1
13399 EOF
13400
13401         NEED_WCHAR_H=1
13402 fi
13403
13404 # if we do not find wint_t in either place, use substitution to provide a fallback.
13405 if test "$cf_cv_wint_t" = unknown ; then
13406         NCURSES_WINT_T=1
13407 fi
13408
13409 # if we find wint_t in either place, use substitution to provide a fallback.
13410 if test "$cf_cv_wint_t" != unknown ; then
13411         NCURSES_OK_WINT_T=1
13412 fi
13413
13414 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
13415
13416 echo "$as_me:13416: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
13417 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
13418 cat >conftest.$ac_ext <<_ACEOF
13419 #line 13419 "configure"
13420 #include "confdefs.h"
13421
13422 #ifndef _XOPEN_SOURCE_EXTENDED
13423 #define _XOPEN_SOURCE_EXTENDED
13424 #endif
13425 #include <${cf_cv_ncurses_header:-curses.h}>
13426 int
13427 main ()
13428 {
13429
13430 mbstate_t foo
13431
13432   ;
13433   return 0;
13434 }
13435 _ACEOF
13436 rm -f conftest.$ac_objext
13437 if { (eval echo "$as_me:13437: \"$ac_compile\"") >&5
13438   (eval $ac_compile) 2>&5
13439   ac_status=$?
13440   echo "$as_me:13440: \$? = $ac_status" >&5
13441   (exit $ac_status); } &&
13442          { ac_try='test -s conftest.$ac_objext'
13443   { (eval echo "$as_me:13443: \"$ac_try\"") >&5
13444   (eval $ac_try) 2>&5
13445   ac_status=$?
13446   echo "$as_me:13446: \$? = $ac_status" >&5
13447   (exit $ac_status); }; }; then
13448   cf_result=yes
13449 else
13450   echo "$as_me: failed program was:" >&5
13451 cat conftest.$ac_ext >&5
13452 cf_result=no
13453 fi
13454 rm -f conftest.$ac_objext conftest.$ac_ext
13455 echo "$as_me:13455: result: $cf_result" >&5
13456 echo "${ECHO_T}$cf_result" >&6
13457 if test $cf_result = yes ; then
13458
13459 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13460
13461         cat >>confdefs.h <<EOF
13462 #define $cf_result 1
13463 EOF
13464
13465 else
13466         cat >>confdefs.h <<EOF
13467 #define mbstate_t long
13468 EOF
13469
13470 fi
13471
13472 fi
13473
13474 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
13475
13476 echo "$as_me:13476: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
13477 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
13478 cat >conftest.$ac_ext <<_ACEOF
13479 #line 13479 "configure"
13480 #include "confdefs.h"
13481
13482 #ifndef _XOPEN_SOURCE_EXTENDED
13483 #define _XOPEN_SOURCE_EXTENDED
13484 #endif
13485 #include <${cf_cv_ncurses_header:-curses.h}>
13486 int
13487 main ()
13488 {
13489
13490 wchar_t foo
13491
13492   ;
13493   return 0;
13494 }
13495 _ACEOF
13496 rm -f conftest.$ac_objext
13497 if { (eval echo "$as_me:13497: \"$ac_compile\"") >&5
13498   (eval $ac_compile) 2>&5
13499   ac_status=$?
13500   echo "$as_me:13500: \$? = $ac_status" >&5
13501   (exit $ac_status); } &&
13502          { ac_try='test -s conftest.$ac_objext'
13503   { (eval echo "$as_me:13503: \"$ac_try\"") >&5
13504   (eval $ac_try) 2>&5
13505   ac_status=$?
13506   echo "$as_me:13506: \$? = $ac_status" >&5
13507   (exit $ac_status); }; }; then
13508   cf_result=yes
13509 else
13510   echo "$as_me: failed program was:" >&5
13511 cat conftest.$ac_ext >&5
13512 cf_result=no
13513 fi
13514 rm -f conftest.$ac_objext conftest.$ac_ext
13515 echo "$as_me:13515: result: $cf_result" >&5
13516 echo "${ECHO_T}$cf_result" >&6
13517 if test $cf_result = yes ; then
13518
13519 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13520
13521         cat >>confdefs.h <<EOF
13522 #define $cf_result 1
13523 EOF
13524
13525 else
13526         cat >>confdefs.h <<EOF
13527 #define wchar_t long
13528 EOF
13529
13530 fi
13531
13532 fi
13533
13534 if test "$NCURSES_OK_WINT_T" = 0 ; then
13535
13536 echo "$as_me:13536: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
13537 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
13538 cat >conftest.$ac_ext <<_ACEOF
13539 #line 13539 "configure"
13540 #include "confdefs.h"
13541
13542 #ifndef _XOPEN_SOURCE_EXTENDED
13543 #define _XOPEN_SOURCE_EXTENDED
13544 #endif
13545 #include <${cf_cv_ncurses_header:-curses.h}>
13546 int
13547 main ()
13548 {
13549
13550 wint_t foo
13551
13552   ;
13553   return 0;
13554 }
13555 _ACEOF
13556 rm -f conftest.$ac_objext
13557 if { (eval echo "$as_me:13557: \"$ac_compile\"") >&5
13558   (eval $ac_compile) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit $ac_status); } &&
13562          { ac_try='test -s conftest.$ac_objext'
13563   { (eval echo "$as_me:13563: \"$ac_try\"") >&5
13564   (eval $ac_try) 2>&5
13565   ac_status=$?
13566   echo "$as_me:13566: \$? = $ac_status" >&5
13567   (exit $ac_status); }; }; then
13568   cf_result=yes
13569 else
13570   echo "$as_me: failed program was:" >&5
13571 cat conftest.$ac_ext >&5
13572 cf_result=no
13573 fi
13574 rm -f conftest.$ac_objext conftest.$ac_ext
13575 echo "$as_me:13575: result: $cf_result" >&5
13576 echo "${ECHO_T}$cf_result" >&6
13577 if test $cf_result = yes ; then
13578
13579 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13580
13581         cat >>confdefs.h <<EOF
13582 #define $cf_result 1
13583 EOF
13584
13585 else
13586         cat >>confdefs.h <<EOF
13587 #define wint_t long
13588 EOF
13589
13590 fi
13591
13592 fi
13593
13594 echo "$as_me:13594: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
13595 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
13596 cat >conftest.$ac_ext <<_ACEOF
13597 #line 13597 "configure"
13598 #include "confdefs.h"
13599
13600 #ifdef HAVE_XCURSES
13601 #include <xcurses.h>
13602 char * XCursesProgramName = "test";
13603 #else
13604 #include <${cf_cv_ncurses_header:-curses.h}>
13605 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13606 #include <ncursesw/term.h>
13607 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13608 #include <ncurses/term.h>
13609 #elif defined(HAVE_TERM_H)
13610 #include <term.h>
13611 #endif
13612 #endif
13613
13614 int
13615 main ()
13616 {
13617
13618 void *foo = &(boolnames)
13619
13620   ;
13621   return 0;
13622 }
13623 _ACEOF
13624 rm -f conftest.$ac_objext
13625 if { (eval echo "$as_me:13625: \"$ac_compile\"") >&5
13626   (eval $ac_compile) 2>&5
13627   ac_status=$?
13628   echo "$as_me:13628: \$? = $ac_status" >&5
13629   (exit $ac_status); } &&
13630          { ac_try='test -s conftest.$ac_objext'
13631   { (eval echo "$as_me:13631: \"$ac_try\"") >&5
13632   (eval $ac_try) 2>&5
13633   ac_status=$?
13634   echo "$as_me:13634: \$? = $ac_status" >&5
13635   (exit $ac_status); }; }; then
13636   cf_result=yes
13637 else
13638   echo "$as_me: failed program was:" >&5
13639 cat conftest.$ac_ext >&5
13640 cf_result=no
13641 fi
13642 rm -f conftest.$ac_objext conftest.$ac_ext
13643 echo "$as_me:13643: result: $cf_result" >&5
13644 echo "${ECHO_T}$cf_result" >&6
13645 if test $cf_result = yes ; then
13646
13647 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13648
13649         cat >>confdefs.h <<EOF
13650 #define $cf_result 1
13651 EOF
13652
13653 else
13654         echo "$as_me:13654: checking for data boolnames in library" >&5
13655 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
13656         cat >conftest.$ac_ext <<_ACEOF
13657 #line 13657 "configure"
13658 #include "confdefs.h"
13659
13660 #ifdef HAVE_XCURSES
13661 #include <xcurses.h>
13662 char * XCursesProgramName = "test";
13663 #else
13664 #include <${cf_cv_ncurses_header:-curses.h}>
13665 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13666 #include <ncursesw/term.h>
13667 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13668 #include <ncurses/term.h>
13669 #elif defined(HAVE_TERM_H)
13670 #include <term.h>
13671 #endif
13672 #endif
13673
13674 extern char boolnames;
13675 int
13676 main ()
13677 {
13678
13679         do {
13680                 void *foo = &(boolnames);
13681                 ${cf_cv_main_return:-return}(foo == 0);
13682         } while (0)
13683
13684   ;
13685   return 0;
13686 }
13687 _ACEOF
13688 rm -f conftest.$ac_objext conftest$ac_exeext
13689 if { (eval echo "$as_me:13689: \"$ac_link\"") >&5
13690   (eval $ac_link) 2>&5
13691   ac_status=$?
13692   echo "$as_me:13692: \$? = $ac_status" >&5
13693   (exit $ac_status); } &&
13694          { ac_try='test -s conftest$ac_exeext'
13695   { (eval echo "$as_me:13695: \"$ac_try\"") >&5
13696   (eval $ac_try) 2>&5
13697   ac_status=$?
13698   echo "$as_me:13698: \$? = $ac_status" >&5
13699   (exit $ac_status); }; }; then
13700   cf_result=yes
13701 else
13702   echo "$as_me: failed program was:" >&5
13703 cat conftest.$ac_ext >&5
13704 cf_result=no
13705 fi
13706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13707         echo "$as_me:13707: result: $cf_result" >&5
13708 echo "${ECHO_T}$cf_result" >&6
13709         if test $cf_result = yes ; then
13710
13711 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13712
13713                 cat >>confdefs.h <<EOF
13714 #define $cf_result 1
13715 EOF
13716
13717         fi
13718 fi
13719
13720 echo "$as_me:13720: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
13721 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
13722 cat >conftest.$ac_ext <<_ACEOF
13723 #line 13723 "configure"
13724 #include "confdefs.h"
13725
13726 #ifdef HAVE_XCURSES
13727 #include <xcurses.h>
13728 char * XCursesProgramName = "test";
13729 #else
13730 #include <${cf_cv_ncurses_header:-curses.h}>
13731 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13732 #include <ncursesw/term.h>
13733 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13734 #include <ncurses/term.h>
13735 #elif defined(HAVE_TERM_H)
13736 #include <term.h>
13737 #endif
13738 #endif
13739
13740 int
13741 main ()
13742 {
13743
13744 void *foo = &(boolfnames)
13745
13746   ;
13747   return 0;
13748 }
13749 _ACEOF
13750 rm -f conftest.$ac_objext
13751 if { (eval echo "$as_me:13751: \"$ac_compile\"") >&5
13752   (eval $ac_compile) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit $ac_status); } &&
13756          { ac_try='test -s conftest.$ac_objext'
13757   { (eval echo "$as_me:13757: \"$ac_try\"") >&5
13758   (eval $ac_try) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); }; }; then
13762   cf_result=yes
13763 else
13764   echo "$as_me: failed program was:" >&5
13765 cat conftest.$ac_ext >&5
13766 cf_result=no
13767 fi
13768 rm -f conftest.$ac_objext conftest.$ac_ext
13769 echo "$as_me:13769: result: $cf_result" >&5
13770 echo "${ECHO_T}$cf_result" >&6
13771 if test $cf_result = yes ; then
13772
13773 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13774
13775         cat >>confdefs.h <<EOF
13776 #define $cf_result 1
13777 EOF
13778
13779 else
13780         echo "$as_me:13780: checking for data boolfnames in library" >&5
13781 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
13782         cat >conftest.$ac_ext <<_ACEOF
13783 #line 13783 "configure"
13784 #include "confdefs.h"
13785
13786 #ifdef HAVE_XCURSES
13787 #include <xcurses.h>
13788 char * XCursesProgramName = "test";
13789 #else
13790 #include <${cf_cv_ncurses_header:-curses.h}>
13791 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13792 #include <ncursesw/term.h>
13793 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13794 #include <ncurses/term.h>
13795 #elif defined(HAVE_TERM_H)
13796 #include <term.h>
13797 #endif
13798 #endif
13799
13800 extern char boolfnames;
13801 int
13802 main ()
13803 {
13804
13805         do {
13806                 void *foo = &(boolfnames);
13807                 ${cf_cv_main_return:-return}(foo == 0);
13808         } while (0)
13809
13810   ;
13811   return 0;
13812 }
13813 _ACEOF
13814 rm -f conftest.$ac_objext conftest$ac_exeext
13815 if { (eval echo "$as_me:13815: \"$ac_link\"") >&5
13816   (eval $ac_link) 2>&5
13817   ac_status=$?
13818   echo "$as_me:13818: \$? = $ac_status" >&5
13819   (exit $ac_status); } &&
13820          { ac_try='test -s conftest$ac_exeext'
13821   { (eval echo "$as_me:13821: \"$ac_try\"") >&5
13822   (eval $ac_try) 2>&5
13823   ac_status=$?
13824   echo "$as_me:13824: \$? = $ac_status" >&5
13825   (exit $ac_status); }; }; then
13826   cf_result=yes
13827 else
13828   echo "$as_me: failed program was:" >&5
13829 cat conftest.$ac_ext >&5
13830 cf_result=no
13831 fi
13832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13833         echo "$as_me:13833: result: $cf_result" >&5
13834 echo "${ECHO_T}$cf_result" >&6
13835         if test $cf_result = yes ; then
13836
13837 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13838
13839                 cat >>confdefs.h <<EOF
13840 #define $cf_result 1
13841 EOF
13842
13843         fi
13844 fi
13845
13846 TEST_ARGS="$LIBS"
13847 LIBS=
13848
13849 ac_config_files="$ac_config_files Makefile"
13850 ac_config_commands="$ac_config_commands default"
13851 cat >confcache <<\_ACEOF
13852 # This file is a shell script that caches the results of configure
13853 # tests run on this system so they can be shared between configure
13854 # scripts and configure runs, see configure's option --config-cache.
13855 # It is not useful on other systems.  If it contains results you don't
13856 # want to keep, you may remove or edit it.
13857 #
13858 # config.status only pays attention to the cache file if you give it
13859 # the --recheck option to rerun configure.
13860 #
13861 # `ac_cv_env_foo' variables (set or unset) will be overriden when
13862 # loading this file, other *unset* `ac_cv_foo' will be assigned the
13863 # following values.
13864
13865 _ACEOF
13866
13867 # The following way of writing the cache mishandles newlines in values,
13868 # but we know of no workaround that is simple, portable, and efficient.
13869 # So, don't put newlines in cache variables' values.
13870 # Ultrix sh set writes to stderr and can't be redirected directly,
13871 # and sets the high bit in the cache file unless we assign to the vars.
13872 {
13873   (set) 2>&1 |
13874     case `(ac_space=' '; set | grep ac_space) 2>&1` in
13875     *ac_space=\ *)
13876       # `set' does not quote correctly, so add quotes (double-quote
13877       # substitution turns \\\\ into \\, and sed turns \\ into \).
13878       sed -n \
13879         "s/'/'\\\\''/g;
13880           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13881       ;;
13882     *)
13883       # `set' quotes correctly as required by POSIX, so do not add quotes.
13884       sed -n \
13885         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
13886       ;;
13887     esac;
13888 } |
13889   sed '
13890      t clear
13891      : clear
13892      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13893      t end
13894      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13895      : end' >>confcache
13896 if cmp -s $cache_file confcache; then :; else
13897   if test -w $cache_file; then
13898     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
13899     cat confcache >$cache_file
13900   else
13901     echo "not updating unwritable cache $cache_file"
13902   fi
13903 fi
13904 rm -f confcache
13905
13906 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13907 # Let make expand exec_prefix.
13908 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13909
13910 # VPATH may cause trouble with some makes, so we remove $(srcdir),
13911 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
13912 # trailing colons and then remove the whole line if VPATH becomes empty
13913 # (actually we leave an empty line to preserve line numbers).
13914 if test "x$srcdir" = x.; then
13915   ac_vpsub='/^[         ]*VPATH[        ]*=/{
13916 s/:*\$(srcdir):*/:/;
13917 s/:*\${srcdir}:*/:/;
13918 s/:*@srcdir@:*/:/;
13919 s/^\([^=]*=[    ]*\):*/\1/;
13920 s/:*$//;
13921 s/^[^=]*=[      ]*$//;
13922 }'
13923 fi
13924
13925 DEFS=-DHAVE_CONFIG_H
13926
13927 : ${CONFIG_STATUS=./config.status}
13928 ac_clean_files_save=$ac_clean_files
13929 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
13930 { echo "$as_me:13930: creating $CONFIG_STATUS" >&5
13931 echo "$as_me: creating $CONFIG_STATUS" >&6;}
13932 cat >$CONFIG_STATUS <<_ACEOF
13933 #! $SHELL
13934 # Generated automatically by configure.
13935 # Run this file to recreate the current configuration.
13936 # Compiler output produced by configure, useful for debugging
13937 # configure, is in config.log if it exists.
13938
13939 debug=false
13940 SHELL=\${CONFIG_SHELL-$SHELL}
13941 ac_cs_invocation="\$0 \$@"
13942
13943 _ACEOF
13944
13945 cat >>$CONFIG_STATUS <<\_ACEOF
13946 # Be Bourne compatible
13947 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
13948   emulate sh
13949   NULLCMD=:
13950 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
13951   set -o posix
13952 fi
13953
13954 # Name of the executable.
13955 as_me=`echo "$0" |sed 's,.*[\\/],,'`
13956
13957 if expr a : '\(a\)' >/dev/null 2>&1; then
13958   as_expr=expr
13959 else
13960   as_expr=false
13961 fi
13962
13963 rm -f conf$$ conf$$.exe conf$$.file
13964 echo >conf$$.file
13965 if ln -s conf$$.file conf$$ 2>/dev/null; then
13966   # We could just check for DJGPP; but this test a) works b) is more generic
13967   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
13968   if test -f conf$$.exe; then
13969     # Don't use ln at all; we don't have any links
13970     as_ln_s='cp -p'
13971   else
13972     as_ln_s='ln -s'
13973   fi
13974 elif ln conf$$.file conf$$ 2>/dev/null; then
13975   as_ln_s=ln
13976 else
13977   as_ln_s='cp -p'
13978 fi
13979 rm -f conf$$ conf$$.exe conf$$.file
13980
13981 as_executable_p="test -f"
13982
13983 # Support unset when possible.
13984 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
13985   as_unset=unset
13986 else
13987   as_unset=false
13988 fi
13989
13990 # NLS nuisances.
13991 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
13992 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
13993 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
13994 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
13995 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
13996 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
13997 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
13998 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
13999
14000 # IFS
14001 # We need space, tab and new line, in precisely that order.
14002 as_nl='
14003 '
14004 IFS="   $as_nl"
14005
14006 # CDPATH.
14007 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14008
14009 exec 6>&1
14010
14011 _ACEOF
14012
14013 # Files that config.status was made for.
14014 if test -n "$ac_config_files"; then
14015   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14016 fi
14017
14018 if test -n "$ac_config_headers"; then
14019   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14020 fi
14021
14022 if test -n "$ac_config_links"; then
14023   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14024 fi
14025
14026 if test -n "$ac_config_commands"; then
14027   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14028 fi
14029
14030 cat >>$CONFIG_STATUS <<\EOF
14031
14032 ac_cs_usage="\
14033 \`$as_me' instantiates files from templates according to the
14034 current configuration.
14035
14036 Usage: $0 [OPTIONS] [FILE]...
14037
14038   -h, --help       print this help, then exit
14039   -V, --version    print version number, then exit
14040   -d, --debug      don't remove temporary files
14041       --recheck    update $as_me by reconfiguring in the same conditions
14042   --file=FILE[:TEMPLATE]
14043                    instantiate the configuration file FILE
14044   --header=FILE[:TEMPLATE]
14045                    instantiate the configuration header FILE
14046
14047 Configuration files:
14048 $config_files
14049
14050 Configuration headers:
14051 $config_headers
14052
14053 Configuration commands:
14054 $config_commands
14055
14056 Report bugs to <dickey@invisible-island.net>."
14057 EOF
14058
14059 cat >>$CONFIG_STATUS <<EOF
14060 ac_cs_version="\\
14061 config.status
14062 configured by $0, generated by GNU Autoconf 2.52.20101001,
14063   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14064
14065 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14066 Free Software Foundation, Inc.
14067 This config.status script is free software; the Free Software Foundation
14068 gives unlimited permission to copy, distribute and modify it."
14069 srcdir=$srcdir
14070 INSTALL="$INSTALL"
14071 EOF
14072
14073 cat >>$CONFIG_STATUS <<\EOF
14074 # If no file are specified by the user, then we need to provide default
14075 # value.  By we need to know if files were specified by the user.
14076 ac_need_defaults=:
14077 while test $# != 0
14078 do
14079   case $1 in
14080   --*=*)
14081     ac_option=`expr "x$1" : 'x\([^=]*\)='`
14082     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14083     shift
14084     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14085     shift
14086     ;;
14087   -*);;
14088   *) # This is not an option, so the user has probably given explicit
14089      # arguments.
14090      ac_need_defaults=false;;
14091   esac
14092
14093   case $1 in
14094   # Handling of the options.
14095 EOF
14096 cat >>$CONFIG_STATUS <<EOF
14097   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14098     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14099     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14100 EOF
14101 cat >>$CONFIG_STATUS <<\EOF
14102   --version | --vers* | -V )
14103     echo "$ac_cs_version"; exit 0 ;;
14104   --he | --h)
14105     # Conflict between --help and --header
14106     { { echo "$as_me:14106: error: ambiguous option: $1
14107 Try \`$0 --help' for more information." >&5
14108 echo "$as_me: error: ambiguous option: $1
14109 Try \`$0 --help' for more information." >&2;}
14110    { (exit 1); exit 1; }; };;
14111   --help | --hel | -h )
14112     echo "$ac_cs_usage"; exit 0 ;;
14113   --debug | --d* | -d )
14114     debug=: ;;
14115   --file | --fil | --fi | --f )
14116     shift
14117     CONFIG_FILES="$CONFIG_FILES $1"
14118     ac_need_defaults=false;;
14119   --header | --heade | --head | --hea )
14120     shift
14121     CONFIG_HEADERS="$CONFIG_HEADERS $1"
14122     ac_need_defaults=false;;
14123
14124   # This is an error.
14125   -*) { { echo "$as_me:14125: error: unrecognized option: $1
14126 Try \`$0 --help' for more information." >&5
14127 echo "$as_me: error: unrecognized option: $1
14128 Try \`$0 --help' for more information." >&2;}
14129    { (exit 1); exit 1; }; } ;;
14130
14131   *) ac_config_targets="$ac_config_targets $1" ;;
14132
14133   esac
14134   shift
14135 done
14136
14137 exec 5>>config.log
14138 cat >&5 << _ACEOF
14139
14140 ## ----------------------- ##
14141 ## Running config.status.  ##
14142 ## ----------------------- ##
14143
14144 This file was extended by $as_me 2.52.20101001, executed with
14145   CONFIG_FILES    = $CONFIG_FILES
14146   CONFIG_HEADERS  = $CONFIG_HEADERS
14147   CONFIG_LINKS    = $CONFIG_LINKS
14148   CONFIG_COMMANDS = $CONFIG_COMMANDS
14149   > $ac_cs_invocation
14150 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14151
14152 _ACEOF
14153 EOF
14154
14155 cat >>$CONFIG_STATUS <<EOF
14156 #
14157 # INIT-COMMANDS section.
14158 #
14159
14160 AWK="$AWK"
14161 ECHO_LD="$ECHO_LD"
14162
14163 EOF
14164
14165 cat >>$CONFIG_STATUS <<\EOF
14166 for ac_config_target in $ac_config_targets
14167 do
14168   case "$ac_config_target" in
14169   # Handling of arguments.
14170   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14171   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14172   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
14173   *) { { echo "$as_me:14173: error: invalid argument: $ac_config_target" >&5
14174 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14175    { (exit 1); exit 1; }; };;
14176   esac
14177 done
14178
14179 # If the user did not use the arguments to specify the items to instantiate,
14180 # then the envvar interface is used.  Set only those that are not.
14181 # We use the long form for the default assignment because of an extremely
14182 # bizarre bug on SunOS 4.1.3.
14183 if $ac_need_defaults; then
14184   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14185   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14186   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14187 fi
14188
14189 # Create a temporary directory, and hook for its removal unless debugging.
14190 $debug ||
14191 {
14192   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14193   trap '{ (exit 1); exit 1; }' 1 2 13 15
14194 }
14195
14196 # Create a (secure) tmp directory for tmp files.
14197 : ${TMPDIR=/tmp}
14198 {
14199   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14200   test -n "$tmp" && test -d "$tmp"
14201 }  ||
14202 {
14203   tmp=$TMPDIR/cs$$-$RANDOM
14204   (umask 077 && mkdir $tmp)
14205 } ||
14206 {
14207    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14208    { (exit 1); exit 1; }
14209 }
14210
14211 EOF
14212
14213 cat >>$CONFIG_STATUS <<EOF
14214
14215 #
14216 # CONFIG_FILES section.
14217 #
14218
14219 # No need to generate the scripts if there are no CONFIG_FILES.
14220 # This happens for instance when ./config.status config.h
14221 if test -n "\$CONFIG_FILES"; then
14222   # Protect against being on the right side of a sed subst in config.status.
14223   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14224    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14225 s,@SHELL@,$SHELL,;t t
14226 s,@exec_prefix@,$exec_prefix,;t t
14227 s,@prefix@,$prefix,;t t
14228 s,@program_transform_name@,$program_transform_name,;t t
14229 s,@bindir@,$bindir,;t t
14230 s,@sbindir@,$sbindir,;t t
14231 s,@libexecdir@,$libexecdir,;t t
14232 s,@datadir@,$datadir,;t t
14233 s,@sysconfdir@,$sysconfdir,;t t
14234 s,@sharedstatedir@,$sharedstatedir,;t t
14235 s,@localstatedir@,$localstatedir,;t t
14236 s,@libdir@,$libdir,;t t
14237 s,@includedir@,$includedir,;t t
14238 s,@oldincludedir@,$oldincludedir,;t t
14239 s,@infodir@,$infodir,;t t
14240 s,@mandir@,$mandir,;t t
14241 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14242 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14243 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14244 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14245 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14246 s,@build_alias@,$build_alias,;t t
14247 s,@host_alias@,$host_alias,;t t
14248 s,@target_alias@,$target_alias,;t t
14249 s,@ECHO_C@,$ECHO_C,;t t
14250 s,@ECHO_N@,$ECHO_N,;t t
14251 s,@ECHO_T@,$ECHO_T,;t t
14252 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14253 s,@DEFS@,$DEFS,;t t
14254 s,@LIBS@,$LIBS,;t t
14255 s,@build@,$build,;t t
14256 s,@build_cpu@,$build_cpu,;t t
14257 s,@build_vendor@,$build_vendor,;t t
14258 s,@build_os@,$build_os,;t t
14259 s,@host@,$host,;t t
14260 s,@host_cpu@,$host_cpu,;t t
14261 s,@host_vendor@,$host_vendor,;t t
14262 s,@host_os@,$host_os,;t t
14263 s,@SET_MAKE@,$SET_MAKE,;t t
14264 s,@CC@,$CC,;t t
14265 s,@CFLAGS@,$CFLAGS,;t t
14266 s,@LDFLAGS@,$LDFLAGS,;t t
14267 s,@CPPFLAGS@,$CPPFLAGS,;t t
14268 s,@ac_ct_CC@,$ac_ct_CC,;t t
14269 s,@EXEEXT@,$EXEEXT,;t t
14270 s,@OBJEXT@,$OBJEXT,;t t
14271 s,@CPP@,$CPP,;t t
14272 s,@AWK@,$AWK,;t t
14273 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14274 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14275 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14276 s,@LINT@,$LINT,;t t
14277 s,@LINT_OPTS@,$LINT_OPTS,;t t
14278 s,@CTAGS@,$CTAGS,;t t
14279 s,@ETAGS@,$ETAGS,;t t
14280 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14281 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14282 s,@MATH_LIB@,$MATH_LIB,;t t
14283 s,@CC_G_OPT@,$CC_G_OPT,;t t
14284 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14285 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
14286 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
14287 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14288 s,@LD@,$LD,;t t
14289 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
14290 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
14291 s,@LD_MODEL@,$LD_MODEL,;t t
14292 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14293 s,@LIBTOOL@,$LIBTOOL,;t t
14294 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
14295 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
14296 s,@LIB_LINK@,$LIB_LINK,;t t
14297 s,@LINK_TESTS@,$LINK_TESTS,;t t
14298 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14299 s,@PTHREAD@,$PTHREAD,;t t
14300 s,@TEST_ARGS@,$TEST_ARGS,;t t
14301 s,@TEST_DEPS@,$TEST_DEPS,;t t
14302 s,@TEST_LIBS@,$TEST_LIBS,;t t
14303 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
14304 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14305 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14306 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14307 s,@ECHO_LT@,$ECHO_LT,;t t
14308 s,@ECHO_LD@,$ECHO_LD,;t t
14309 s,@RULE_CC@,$RULE_CC,;t t
14310 s,@SHOW_CC@,$SHOW_CC,;t t
14311 s,@ECHO_CC@,$ECHO_CC,;t t
14312 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14313 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14314 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14315 s,@X_CFLAGS@,$X_CFLAGS,;t t
14316 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
14317 s,@X_LIBS@,$X_LIBS,;t t
14318 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
14319 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
14320 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
14321 CEOF
14322
14323 EOF
14324
14325   cat >>$CONFIG_STATUS <<\EOF
14326   # Split the substitutions into bite-sized pieces for seds with
14327   # small command number limits, like on Digital OSF/1 and HP-UX.
14328   ac_max_sed_lines=48
14329   ac_sed_frag=1 # Number of current file.
14330   ac_beg=1 # First line for current file.
14331   ac_end=$ac_max_sed_lines # Line after last line for current file.
14332   ac_more_lines=:
14333   ac_sed_cmds=
14334   while $ac_more_lines; do
14335     if test $ac_beg -gt 1; then
14336       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14337     else
14338       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14339     fi
14340     if test ! -s $tmp/subs.frag; then
14341       ac_more_lines=false
14342     else
14343       # The purpose of the label and of the branching condition is to
14344       # speed up the sed processing (if there are no `@' at all, there
14345       # is no need to browse any of the substitutions).
14346       # These are the two extra sed commands mentioned above.
14347       (echo ':t
14348   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14349       if test -z "$ac_sed_cmds"; then
14350         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14351       else
14352         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14353       fi
14354       ac_sed_frag=`expr $ac_sed_frag + 1`
14355       ac_beg=$ac_end
14356       ac_end=`expr $ac_end + $ac_max_sed_lines`
14357     fi
14358   done
14359   if test -z "$ac_sed_cmds"; then
14360     ac_sed_cmds=cat
14361   fi
14362 fi # test -n "$CONFIG_FILES"
14363
14364 EOF
14365 cat >>$CONFIG_STATUS <<\EOF
14366 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14367   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14368   case $ac_file in
14369   - | *:- | *:-:* ) # input from stdin
14370         cat >$tmp/stdin
14371         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14372         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14373   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14374         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14375   * )   ac_file_in=$ac_file.in ;;
14376   esac
14377
14378   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14379   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14380          X"$ac_file" : 'X\(//\)[^/]' \| \
14381          X"$ac_file" : 'X\(//\)$' \| \
14382          X"$ac_file" : 'X\(/\)' \| \
14383          .     : '\(.\)' 2>/dev/null ||
14384 echo X"$ac_file" |
14385     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14386           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14387           /^X\(\/\/\)$/{ s//\1/; q; }
14388           /^X\(\/\).*/{ s//\1/; q; }
14389           s/.*/./; q'`
14390   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14391     { case "$ac_dir" in
14392   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14393   *)                      as_incr_dir=.;;
14394 esac
14395 as_dummy="$ac_dir"
14396 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14397   case $as_mkdir_dir in
14398     # Skip DOS drivespec
14399     ?:) as_incr_dir=$as_mkdir_dir ;;
14400     *)
14401       as_incr_dir=$as_incr_dir/$as_mkdir_dir
14402       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14403     ;;
14404   esac
14405 done; }
14406
14407     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14408     # A "../" for each directory in $ac_dir_suffix.
14409     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14410   else
14411     ac_dir_suffix= ac_dots=
14412   fi
14413
14414   case $srcdir in
14415   .)  ac_srcdir=.
14416       if test -z "$ac_dots"; then
14417          ac_top_srcdir=.
14418       else
14419          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14420       fi ;;
14421   [\\/]* | ?:[\\/]* )
14422       ac_srcdir=$srcdir$ac_dir_suffix;
14423       ac_top_srcdir=$srcdir ;;
14424   *) # Relative path.
14425     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14426     ac_top_srcdir=$ac_dots$srcdir ;;
14427   esac
14428
14429   case $INSTALL in
14430   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14431   *) ac_INSTALL=$ac_dots$INSTALL ;;
14432   esac
14433
14434   if test x"$ac_file" != x-; then
14435     { echo "$as_me:14435: creating $ac_file" >&5
14436 echo "$as_me: creating $ac_file" >&6;}
14437     rm -f "$ac_file"
14438   fi
14439   # Let's still pretend it is `configure' which instantiates (i.e., don't
14440   # use $as_me), people would be surprised to read:
14441   #    /* config.h.  Generated automatically by config.status.  */
14442   configure_input="Generated automatically from `echo $ac_file_in |
14443                                                  sed 's,.*/,,'` by configure."
14444
14445   # First look for the input files in the build tree, otherwise in the
14446   # src tree.
14447   ac_file_inputs=`IFS=:
14448     for f in $ac_file_in; do
14449       case $f in
14450       -) echo $tmp/stdin ;;
14451       [\\/$]*)
14452          # Absolute (can't be DOS-style, as IFS=:)
14453          test -f "$f" || { { echo "$as_me:14453: error: cannot find input file: $f" >&5
14454 echo "$as_me: error: cannot find input file: $f" >&2;}
14455    { (exit 1); exit 1; }; }
14456          echo $f;;
14457       *) # Relative
14458          if test -f "$f"; then
14459            # Build tree
14460            echo $f
14461          elif test -f "$srcdir/$f"; then
14462            # Source tree
14463            echo $srcdir/$f
14464          else
14465            # /dev/null tree
14466            { { echo "$as_me:14466: error: cannot find input file: $f" >&5
14467 echo "$as_me: error: cannot find input file: $f" >&2;}
14468    { (exit 1); exit 1; }; }
14469          fi;;
14470       esac
14471     done` || { (exit 1); exit 1; }
14472 EOF
14473 cat >>$CONFIG_STATUS <<EOF
14474   sed "$ac_vpsub
14475 $extrasub
14476 EOF
14477 cat >>$CONFIG_STATUS <<\EOF
14478 :t
14479 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14480 s,@configure_input@,$configure_input,;t t
14481 s,@srcdir@,$ac_srcdir,;t t
14482 s,@top_srcdir@,$ac_top_srcdir,;t t
14483 s,@INSTALL@,$ac_INSTALL,;t t
14484 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14485   rm -f $tmp/stdin
14486   if test x"$ac_file" != x-; then
14487     mv $tmp/out $ac_file
14488   else
14489     cat $tmp/out
14490     rm -f $tmp/out
14491   fi
14492
14493 done
14494 EOF
14495 cat >>$CONFIG_STATUS <<\EOF
14496
14497 #
14498 # CONFIG_HEADER section.
14499 #
14500
14501 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14502 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14503 #
14504 # ac_d sets the value in "#define NAME VALUE" lines.
14505 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14506 ac_dB='[        ].*$,\1#\2'
14507 ac_dC=' '
14508 ac_dD=',;t'
14509 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14510 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14511 ac_iB='\([      ]\),\1#\2define\3'
14512 ac_iC=' '
14513 ac_iD='\4,;t'
14514 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14515 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14516 ac_uB='$,\1#\2define\3'
14517 ac_uC=' '
14518 ac_uD=',;t'
14519
14520 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14521   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14522   case $ac_file in
14523   - | *:- | *:-:* ) # input from stdin
14524         cat >$tmp/stdin
14525         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14526         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14527   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14528         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14529   * )   ac_file_in=$ac_file.in ;;
14530   esac
14531
14532   test x"$ac_file" != x- && { echo "$as_me:14532: creating $ac_file" >&5
14533 echo "$as_me: creating $ac_file" >&6;}
14534
14535   # First look for the input files in the build tree, otherwise in the
14536   # src tree.
14537   ac_file_inputs=`IFS=:
14538     for f in $ac_file_in; do
14539       case $f in
14540       -) echo $tmp/stdin ;;
14541       [\\/$]*)
14542          # Absolute (can't be DOS-style, as IFS=:)
14543          test -f "$f" || { { echo "$as_me:14543: error: cannot find input file: $f" >&5
14544 echo "$as_me: error: cannot find input file: $f" >&2;}
14545    { (exit 1); exit 1; }; }
14546          echo $f;;
14547       *) # Relative
14548          if test -f "$f"; then
14549            # Build tree
14550            echo $f
14551          elif test -f "$srcdir/$f"; then
14552            # Source tree
14553            echo $srcdir/$f
14554          else
14555            # /dev/null tree
14556            { { echo "$as_me:14556: error: cannot find input file: $f" >&5
14557 echo "$as_me: error: cannot find input file: $f" >&2;}
14558    { (exit 1); exit 1; }; }
14559          fi;;
14560       esac
14561     done` || { (exit 1); exit 1; }
14562   # Remove the trailing spaces.
14563   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
14564
14565 EOF
14566
14567 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
14568 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
14569 # be either 'cat' or 'sort'.
14570 cat confdefs.h | uniq >conftest.vals
14571
14572 # Break up conftest.vals because some shells have a limit on
14573 # the size of here documents, and old seds have small limits too.
14574
14575 rm -f conftest.tail
14576 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
14577 while grep . conftest.vals >/dev/null
14578 do
14579   # Write chunks of a limited-size here document to conftest.frag.
14580   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14581   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
14582   echo 'CEOF' >> $CONFIG_STATUS
14583   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14584   rm -f conftest.vals
14585   mv conftest.tail conftest.vals
14586 done
14587 rm -f conftest.vals
14588
14589 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
14590 # marker @DEFS@.
14591 echo '  cat >> conftest.edit <<CEOF
14592 /@DEFS@/r conftest.frag
14593 /@DEFS@/d
14594 CEOF
14595 sed -f conftest.edit $tmp/in > $tmp/out
14596 rm -f $tmp/in
14597 mv $tmp/out $tmp/in
14598 rm -f conftest.edit conftest.frag
14599 ' >> $CONFIG_STATUS
14600
14601 cat >>$CONFIG_STATUS <<\EOF
14602   # Let's still pretend it is `configure' which instantiates (i.e., don't
14603   # use $as_me), people would be surprised to read:
14604   #    /* config.h.  Generated automatically by config.status.  */
14605   if test x"$ac_file" = x-; then
14606     echo "/* Generated automatically by configure.  */" >$tmp/config.h
14607   else
14608     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
14609   fi
14610   cat $tmp/in >>$tmp/config.h
14611   rm -f $tmp/in
14612   if test x"$ac_file" != x-; then
14613     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14614       { echo "$as_me:14614: $ac_file is unchanged" >&5
14615 echo "$as_me: $ac_file is unchanged" >&6;}
14616     else
14617       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14618          X"$ac_file" : 'X\(//\)[^/]' \| \
14619          X"$ac_file" : 'X\(//\)$' \| \
14620          X"$ac_file" : 'X\(/\)' \| \
14621          .     : '\(.\)' 2>/dev/null ||
14622 echo X"$ac_file" |
14623     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14624           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14625           /^X\(\/\/\)$/{ s//\1/; q; }
14626           /^X\(\/\).*/{ s//\1/; q; }
14627           s/.*/./; q'`
14628       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14629         { case "$ac_dir" in
14630   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14631   *)                      as_incr_dir=.;;
14632 esac
14633 as_dummy="$ac_dir"
14634 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14635   case $as_mkdir_dir in
14636     # Skip DOS drivespec
14637     ?:) as_incr_dir=$as_mkdir_dir ;;
14638     *)
14639       as_incr_dir=$as_incr_dir/$as_mkdir_dir
14640       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14641     ;;
14642   esac
14643 done; }
14644
14645       fi
14646       rm -f $ac_file
14647       mv $tmp/config.h $ac_file
14648     fi
14649   else
14650     cat $tmp/config.h
14651     rm -f $tmp/config.h
14652   fi
14653 done
14654 EOF
14655 cat >>$CONFIG_STATUS <<\EOF
14656 #
14657 # CONFIG_COMMANDS section.
14658 #
14659 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14660   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14661   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14662
14663   case $ac_dest in
14664     default )
14665
14666 for cf_dir in .
14667 do
14668         if test ! -d $srcdir/$cf_dir; then
14669                 continue
14670         elif test -f $srcdir/$cf_dir/programs; then
14671                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
14672         fi
14673 done
14674
14675         cat >>Makefile <<TEST_EOF
14676
14677 # These rules are generated so we do not rely on suffix rules, which do not
14678 # work consistently for different make-programs (the '\$(MODEL)/' confuses
14679 # some, and the '\$x' confuses others).
14680 TEST_EOF
14681
14682 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
14683 for N in $LIST
14684 do
14685         cat >>Makefile <<TEST_EOF
14686
14687 \$(MODEL)/$N.o : $N.c \\
14688         test.priv.h \\
14689         ncurses_cfg.h
14690         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
14691 TEST_EOF
14692 done
14693
14694 if test -f ../config.guess && test -f ../config.sub
14695 then
14696         cat >>Makefile <<TEST_EOF
14697
14698 # if we used CF_INHERIT for getting these files, we can remove them
14699 distclean::
14700         rm -f config.guess config.sub
14701 TEST_EOF
14702 fi
14703  ;;
14704   esac
14705 done
14706 EOF
14707
14708 cat >>$CONFIG_STATUS <<\EOF
14709
14710 { (exit 0); exit 0; }
14711 EOF
14712 chmod +x $CONFIG_STATUS
14713 ac_clean_files=$ac_clean_files_save
14714
14715 # configure is writing to config.log, and then calls config.status.
14716 # config.status does its own redirection, appending to config.log.
14717 # Unfortunately, on DOS this fails, as config.log is still kept open
14718 # by configure, so config.status won't be able to write to it; its
14719 # output is simply discarded.  So we exec the FD to /dev/null,
14720 # effectively closing config.log, so it can be properly (re)opened and
14721 # appended to by config.status.  When coming back to configure, we
14722 # need to make the FD available again.
14723 if test "$no_create" != yes; then
14724   ac_cs_success=:
14725   exec 5>/dev/null
14726   $SHELL $CONFIG_STATUS || ac_cs_success=false
14727   exec 5>>config.log
14728   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14729   # would make configure fail if this is the last instruction.
14730   $ac_cs_success || { (exit 1); exit 1; }
14731 fi
14732