]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.9 - patch 20120218
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101002.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="ncurses.c"
108
109 # Initialize some variables set by options.
110 ac_init_help=
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
114 cache_file=/dev/null
115 exec_prefix=NONE
116 no_create=
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 verbose=
126 x_includes=NONE
127 x_libraries=NONE
128
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datadir='${prefix}/share'
138 sysconfdir='${prefix}/etc'
139 sharedstatedir='${prefix}/com'
140 localstatedir='${prefix}/var'
141 libdir='${exec_prefix}/lib'
142 includedir='${prefix}/include'
143 oldincludedir='/usr/include'
144 infodir='${prefix}/info'
145 mandir='${prefix}/man'
146
147 # Identity of this package.
148 PACKAGE_NAME=
149 PACKAGE_TARNAME=
150 PACKAGE_VERSION=
151 PACKAGE_STRING=
152 PACKAGE_BUGREPORT=
153
154 ac_prev=
155 for ac_option
156 do
157   # If the previous option needs an argument, assign it.
158   if test -n "$ac_prev"; then
159     eval "$ac_prev=\$ac_option"
160     ac_prev=
161     continue
162   fi
163
164   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
165
166   # Accept the important Cygnus configure options, so we can diagnose typos.
167
168   case $ac_option in
169
170   -bindir | --bindir | --bindi | --bind | --bin | --bi)
171     ac_prev=bindir ;;
172   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173     bindir=$ac_optarg ;;
174
175   -build | --build | --buil | --bui | --bu)
176     ac_prev=build_alias ;;
177   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178     build_alias=$ac_optarg ;;
179
180   -cache-file | --cache-file | --cache-fil | --cache-fi \
181   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182     ac_prev=cache_file ;;
183   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185     cache_file=$ac_optarg ;;
186
187   --config-cache | -C)
188     cache_file=config.cache ;;
189
190   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
191     ac_prev=datadir ;;
192   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
193   | --da=*)
194     datadir=$ac_optarg ;;
195
196   -disable-* | --disable-*)
197     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
198     # Reject names that are not valid shell variable names.
199     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
200       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
201    { (exit 1); exit 1; }; }
202     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
203     eval "enable_$ac_feature=no" ;;
204
205   -enable-* | --enable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     case $ac_option in
213       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
214       *) ac_optarg=yes ;;
215     esac
216     eval "enable_$ac_feature='$ac_optarg'" ;;
217
218   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
219   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
220   | --exec | --exe | --ex)
221     ac_prev=exec_prefix ;;
222   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
223   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
224   | --exec=* | --exe=* | --ex=*)
225     exec_prefix=$ac_optarg ;;
226
227   -gas | --gas | --ga | --g)
228     # Obsolete; use --with-gas.
229     with_gas=yes ;;
230
231   -help | --help | --hel | --he | -h)
232     ac_init_help=long ;;
233   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
234     ac_init_help=recursive ;;
235   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
236     ac_init_help=short ;;
237
238   -host | --host | --hos | --ho)
239     ac_prev=host_alias ;;
240   -host=* | --host=* | --hos=* | --ho=*)
241     host_alias=$ac_optarg ;;
242
243   -includedir | --includedir | --includedi | --included | --include \
244   | --includ | --inclu | --incl | --inc)
245     ac_prev=includedir ;;
246   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247   | --includ=* | --inclu=* | --incl=* | --inc=*)
248     includedir=$ac_optarg ;;
249
250   -infodir | --infodir | --infodi | --infod | --info | --inf)
251     ac_prev=infodir ;;
252   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253     infodir=$ac_optarg ;;
254
255   -libdir | --libdir | --libdi | --libd)
256     ac_prev=libdir ;;
257   -libdir=* | --libdir=* | --libdi=* | --libd=*)
258     libdir=$ac_optarg ;;
259
260   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261   | --libexe | --libex | --libe)
262     ac_prev=libexecdir ;;
263   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264   | --libexe=* | --libex=* | --libe=*)
265     libexecdir=$ac_optarg ;;
266
267   -localstatedir | --localstatedir | --localstatedi | --localstated \
268   | --localstate | --localstat | --localsta | --localst \
269   | --locals | --local | --loca | --loc | --lo)
270     ac_prev=localstatedir ;;
271   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274     localstatedir=$ac_optarg ;;
275
276   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277     ac_prev=mandir ;;
278   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279     mandir=$ac_optarg ;;
280
281   -nfp | --nfp | --nf)
282     # Obsolete; use --without-fp.
283     with_fp=no ;;
284
285   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286   | --no-cr | --no-c)
287     no_create=yes ;;
288
289   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291     no_recursion=yes ;;
292
293   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295   | --oldin | --oldi | --old | --ol | --o)
296     ac_prev=oldincludedir ;;
297   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300     oldincludedir=$ac_optarg ;;
301
302   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303     ac_prev=prefix ;;
304   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305     prefix=$ac_optarg ;;
306
307   -program-prefix | --program-prefix | --program-prefi | --program-pref \
308   | --program-pre | --program-pr | --program-p)
309     ac_prev=program_prefix ;;
310   -program-prefix=* | --program-prefix=* | --program-prefi=* \
311   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312     program_prefix=$ac_optarg ;;
313
314   -program-suffix | --program-suffix | --program-suffi | --program-suff \
315   | --program-suf | --program-su | --program-s)
316     ac_prev=program_suffix ;;
317   -program-suffix=* | --program-suffix=* | --program-suffi=* \
318   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319     program_suffix=$ac_optarg ;;
320
321   -program-transform-name | --program-transform-name \
322   | --program-transform-nam | --program-transform-na \
323   | --program-transform-n | --program-transform- \
324   | --program-transform | --program-transfor \
325   | --program-transfo | --program-transf \
326   | --program-trans | --program-tran \
327   | --progr-tra | --program-tr | --program-t)
328     ac_prev=program_transform_name ;;
329   -program-transform-name=* | --program-transform-name=* \
330   | --program-transform-nam=* | --program-transform-na=* \
331   | --program-transform-n=* | --program-transform-=* \
332   | --program-transform=* | --program-transfor=* \
333   | --program-transfo=* | --program-transf=* \
334   | --program-trans=* | --program-tran=* \
335   | --progr-tra=* | --program-tr=* | --program-t=*)
336     program_transform_name=$ac_optarg ;;
337
338   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339   | -silent | --silent | --silen | --sile | --sil)
340     silent=yes ;;
341
342   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343     ac_prev=sbindir ;;
344   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345   | --sbi=* | --sb=*)
346     sbindir=$ac_optarg ;;
347
348   -sharedstatedir | --sharedstatedir | --sharedstatedi \
349   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350   | --sharedst | --shareds | --shared | --share | --shar \
351   | --sha | --sh)
352     ac_prev=sharedstatedir ;;
353   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356   | --sha=* | --sh=*)
357     sharedstatedir=$ac_optarg ;;
358
359   -site | --site | --sit)
360     ac_prev=site ;;
361   -site=* | --site=* | --sit=*)
362     site=$ac_optarg ;;
363
364   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365     ac_prev=srcdir ;;
366   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367     srcdir=$ac_optarg ;;
368
369   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370   | --syscon | --sysco | --sysc | --sys | --sy)
371     ac_prev=sysconfdir ;;
372   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374     sysconfdir=$ac_optarg ;;
375
376   -target | --target | --targe | --targ | --tar | --ta | --t)
377     ac_prev=target_alias ;;
378   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379     target_alias=$ac_optarg ;;
380
381   -v | -verbose | --verbose | --verbos | --verbo | --verb)
382     verbose=yes ;;
383
384   -version | --version | --versio | --versi | --vers | -V)
385     ac_init_version=: ;;
386
387   -with-* | --with-*)
388     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
389     # Reject names that are not valid shell variable names.
390     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
391       { echo "$as_me: error: invalid package name: $ac_package" >&2
392    { (exit 1); exit 1; }; }
393     ac_package=`echo $ac_package| sed 's/-/_/g'`
394     case $ac_option in
395       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
396       *) ac_optarg=yes ;;
397     esac
398     eval "with_$ac_package='$ac_optarg'" ;;
399
400   -without-* | --without-*)
401     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid package name: $ac_package" >&2
405    { (exit 1); exit 1; }; }
406     ac_package=`echo $ac_package | sed 's/-/_/g'`
407     eval "with_$ac_package=no" ;;
408
409   --x)
410     # Obsolete; use --with-x.
411     with_x=yes ;;
412
413   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414   | --x-incl | --x-inc | --x-in | --x-i)
415     ac_prev=x_includes ;;
416   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418     x_includes=$ac_optarg ;;
419
420   -x-libraries | --x-libraries | --x-librarie | --x-librari \
421   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422     ac_prev=x_libraries ;;
423   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425     x_libraries=$ac_optarg ;;
426
427   -*) { echo "$as_me: error: unrecognized option: $ac_option
428 Try \`$0 --help' for more information." >&2
429    { (exit 1); exit 1; }; }
430     ;;
431
432   *=*)
433     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
437    { (exit 1); exit 1; }; }
438     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
439     eval "$ac_envvar='$ac_optarg'"
440     export $ac_envvar ;;
441
442   *)
443     # FIXME: should be removed in autoconf 3.0.
444     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
445     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
446       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
447     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
448     ;;
449
450   esac
451 done
452
453 if test -n "$ac_prev"; then
454   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
455   { echo "$as_me: error: missing argument to $ac_option" >&2
456    { (exit 1); exit 1; }; }
457 fi
458
459 # Be sure to have absolute paths.
460 for ac_var in exec_prefix prefix
461 do
462   eval ac_val=$`echo $ac_var`
463   case $ac_val in
464     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
465     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
466    { (exit 1); exit 1; }; };;
467   esac
468 done
469
470 # Be sure to have absolute paths.
471 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
472               localstatedir libdir includedir oldincludedir infodir mandir
473 do
474   eval ac_val=$`echo $ac_var`
475   case $ac_val in
476     [\\/$]* | ?:[\\/]* ) ;;
477     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
478    { (exit 1); exit 1; }; };;
479   esac
480 done
481
482 # There might be people who depend on the old broken behavior: `$host'
483 # used to hold the argument of --host etc.
484 build=$build_alias
485 host=$host_alias
486 target=$target_alias
487
488 # FIXME: should be removed in autoconf 3.0.
489 if test "x$host_alias" != x; then
490   if test "x$build_alias" = x; then
491     cross_compiling=maybe
492     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
493     If a cross compiler is detected then cross compile mode will be used." >&2
494   elif test "x$build_alias" != "x$host_alias"; then
495     cross_compiling=yes
496   fi
497 fi
498
499 ac_tool_prefix=
500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
501
502 test "$silent" = yes && exec 6>/dev/null
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506   ac_srcdir_defaulted=yes
507   # Try the directory containing this script, then its parent.
508   ac_prog=$0
509   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
510   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511   srcdir=$ac_confdir
512   if test ! -r $srcdir/$ac_unique_file; then
513     srcdir=..
514   fi
515 else
516   ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519   if test "$ac_srcdir_defaulted" = yes; then
520     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
521    { (exit 1); exit 1; }; }
522   else
523     { echo "$as_me: error: cannot find sources in $srcdir" >&2
524    { (exit 1); exit 1; }; }
525   fi
526 fi
527 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
528 ac_env_build_alias_set=${build_alias+set}
529 ac_env_build_alias_value=$build_alias
530 ac_cv_env_build_alias_set=${build_alias+set}
531 ac_cv_env_build_alias_value=$build_alias
532 ac_env_host_alias_set=${host_alias+set}
533 ac_env_host_alias_value=$host_alias
534 ac_cv_env_host_alias_set=${host_alias+set}
535 ac_cv_env_host_alias_value=$host_alias
536 ac_env_target_alias_set=${target_alias+set}
537 ac_env_target_alias_value=$target_alias
538 ac_cv_env_target_alias_set=${target_alias+set}
539 ac_cv_env_target_alias_value=$target_alias
540 ac_env_CC_set=${CC+set}
541 ac_env_CC_value=$CC
542 ac_cv_env_CC_set=${CC+set}
543 ac_cv_env_CC_value=$CC
544 ac_env_CFLAGS_set=${CFLAGS+set}
545 ac_env_CFLAGS_value=$CFLAGS
546 ac_cv_env_CFLAGS_set=${CFLAGS+set}
547 ac_cv_env_CFLAGS_value=$CFLAGS
548 ac_env_LDFLAGS_set=${LDFLAGS+set}
549 ac_env_LDFLAGS_value=$LDFLAGS
550 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
551 ac_cv_env_LDFLAGS_value=$LDFLAGS
552 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
553 ac_env_CPPFLAGS_value=$CPPFLAGS
554 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
555 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
556 ac_env_CPP_set=${CPP+set}
557 ac_env_CPP_value=$CPP
558 ac_cv_env_CPP_set=${CPP+set}
559 ac_cv_env_CPP_value=$CPP
560
561 #
562 # Report the --help message.
563 #
564 if test "$ac_init_help" = "long"; then
565   # Omit some internal or obsolete options to make the list less imposing.
566   # This message is too long to be a string in the A/UX 3.1 sh.
567   cat <<EOF
568 \`configure' configures this package to adapt to many kinds of systems.
569
570 Usage: $0 [OPTION]... [VAR=VALUE]...
571
572 To assign environment variables (e.g., CC, CFLAGS...), specify them as
573 VAR=VALUE.  See below for descriptions of some of the useful variables.
574
575 Defaults for the options are specified in brackets.
576
577 Configuration:
578   -h, --help              display this help and exit
579       --help=short        display options specific to this package
580       --help=recursive    display the short help of all the included packages
581   -V, --version           display version information and exit
582   -q, --quiet, --silent   do not print \`checking...' messages
583       --cache-file=FILE   cache test results in FILE [disabled]
584   -C, --config-cache      alias for \`--cache-file=config.cache'
585   -n, --no-create         do not create output files
586       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
587
588 EOF
589
590   cat <<EOF
591 Installation directories:
592   --prefix=PREFIX         install architecture-independent files in PREFIX
593                           [$ac_default_prefix]
594   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
595                           [PREFIX]
596
597 By default, \`make install' will install all the files in
598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
600 for instance \`--prefix=\$HOME'.
601
602 For better control, use the options below.
603
604 Fine tuning of the installation directories:
605   --bindir=DIR            user executables [EPREFIX/bin]
606   --sbindir=DIR           system admin executables [EPREFIX/sbin]
607   --libexecdir=DIR        program executables [EPREFIX/libexec]
608   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
609   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
610   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
611   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
612   --libdir=DIR            object code libraries [EPREFIX/lib]
613   --includedir=DIR        C header files [PREFIX/include]
614   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
615   --infodir=DIR           info documentation [PREFIX/info]
616   --mandir=DIR            man documentation [PREFIX/man]
617 EOF
618
619   cat <<\EOF
620
621 Program names:
622   --program-prefix=PREFIX            prepend PREFIX to installed program names
623   --program-suffix=SUFFIX            append SUFFIX to installed program names
624   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
625
626 X features:
627   --x-includes=DIR    X include files are in DIR
628   --x-libraries=DIR   X library files are in DIR
629
630 System types:
631   --build=BUILD           configure for building on BUILD [guessed]
632   --host=HOST       build programs to run on HOST [BUILD]
633 EOF
634 fi
635
636 if test -n "$ac_init_help"; then
637
638   cat <<\EOF
639
640 Optional Features:
641   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
642   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
643
644 Optional Packages:
645   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
646   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
647
648   --disable-echo          display "compiling" commands
649   --enable-warnings       test: turn on gcc compiler warnings
650   --with-dmalloc          test: use Gray Watson's dmalloc library
651   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
652   --with-valgrind         test: use valgrind
653   --disable-leaks         test: free permanent memory, analyze leaks
654   --disable-widec           disable checks for wide-character functions
655   --with-curses-dir=DIR   directory in which (n)curses is installed
656   --with-ncursesw         use wide ncurses-libraries
657   --with-ncurses          use ncurses-libraries
658   --with-pdcurses         compile/link with pdcurses X11 library
659   --with-curses-colr      compile/link with HPUX 10.x color-curses
660   --with-curses-5lib      compile/link with SunOS 5lib curses
661   --with-Xaw3d            link with Xaw 3d library
662   --with-neXtaw           link with neXT Athena library
663   --with-XawPlus          link with Athena-Plus library
664   --with-pkg-config{=path} enable/disable use of pkg-config
665   --with-x                use the X Window System
666   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
667   --disable-rpath-hack    don't add rpath options for additional libraries
668
669 Some influential environment variables:
670   CC          C compiler command
671   CFLAGS      C compiler flags
672   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
673               nonstandard directory <lib dir>
674   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
675               headers in a nonstandard directory <include dir>
676   CPP         C preprocessor
677
678 Use these variables to override the choices made by `configure' or to help
679 it to find libraries and programs with nonstandard names/locations.
680
681 EOF
682 fi
683
684 if test "$ac_init_help" = "recursive"; then
685   # If there are subdirs, report their specific --help.
686   ac_popdir=`pwd`
687   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
688     cd $ac_subdir
689     # A "../" for each directory in /$ac_subdir.
690     ac_dots=`echo $ac_subdir |
691              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
692
693     case $srcdir in
694     .) # No --srcdir option.  We are building in place.
695       ac_sub_srcdir=$srcdir ;;
696     [\\/]* | ?:[\\/]* ) # Absolute path.
697       ac_sub_srcdir=$srcdir/$ac_subdir ;;
698     *) # Relative path.
699       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
700     esac
701
702     # Check for guested configure; otherwise get Cygnus style configure.
703     if test -f $ac_sub_srcdir/configure.gnu; then
704       echo
705       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
706     elif test -f $ac_sub_srcdir/configure; then
707       echo
708       $SHELL $ac_sub_srcdir/configure  --help=recursive
709     elif test -f $ac_sub_srcdir/configure.ac ||
710            test -f $ac_sub_srcdir/configure.in; then
711       echo
712       $ac_configure --help
713     else
714       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
715     fi
716     cd $ac_popdir
717   done
718 fi
719
720 test -n "$ac_init_help" && exit 0
721 if $ac_init_version; then
722   cat <<\EOF
723
724 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
725 Free Software Foundation, Inc.
726 This configure script is free software; the Free Software Foundation
727 gives unlimited permission to copy, distribute and modify it.
728 EOF
729   exit 0
730 fi
731 exec 5>config.log
732 cat >&5 <<EOF
733 This file contains any messages produced by compilers while
734 running configure, to aid debugging if configure makes a mistake.
735
736 It was created by $as_me, which was
737 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
738
739   $ $0 $@
740
741 EOF
742 {
743 cat <<_ASUNAME
744 ## ---------- ##
745 ## Platform.  ##
746 ## ---------- ##
747
748 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
749 uname -m = `(uname -m) 2>/dev/null || echo unknown`
750 uname -r = `(uname -r) 2>/dev/null || echo unknown`
751 uname -s = `(uname -s) 2>/dev/null || echo unknown`
752 uname -v = `(uname -v) 2>/dev/null || echo unknown`
753
754 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
755 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
756
757 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
758 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
759 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
760 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
761 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
762 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
763 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
764
765 PATH = $PATH
766
767 _ASUNAME
768 } >&5
769
770 cat >&5 <<EOF
771 ## ------------ ##
772 ## Core tests.  ##
773 ## ------------ ##
774
775 EOF
776
777 # Keep a trace of the command line.
778 # Strip out --no-create and --no-recursion so they do not pile up.
779 # Also quote any args containing shell meta-characters.
780 ac_configure_args=
781 ac_sep=
782 for ac_arg
783 do
784   case $ac_arg in
785   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
786   | --no-cr | --no-c) ;;
787   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
788   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
789   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
790     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
791     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
792     ac_sep=" " ;;
793   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
794      ac_sep=" " ;;
795   esac
796   # Get rid of the leading space.
797 done
798
799 # When interrupted or exit'd, cleanup temporary files, and complete
800 # config.log.  We remove comments because anyway the quotes in there
801 # would cause problems or look ugly.
802 trap 'exit_status=$?
803   # Save into config.log some information that might help in debugging.
804   echo >&5
805   echo "## ----------------- ##" >&5
806   echo "## Cache variables.  ##" >&5
807   echo "## ----------------- ##" >&5
808   echo >&5
809   # The following way of writing the cache mishandles newlines in values,
810 {
811   (set) 2>&1 |
812     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
813     *ac_space=\ *)
814       sed -n \
815         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
816           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
817       ;;
818     *)
819       sed -n \
820         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
821       ;;
822     esac;
823 } >&5
824   sed "/^$/d" confdefs.h >conftest.log
825   if test -s conftest.log; then
826     echo >&5
827     echo "## ------------ ##" >&5
828     echo "## confdefs.h.  ##" >&5
829     echo "## ------------ ##" >&5
830     echo >&5
831     cat conftest.log >&5
832   fi
833   (echo; echo) >&5
834   test "$ac_signal" != 0 &&
835     echo "$as_me: caught signal $ac_signal" >&5
836   echo "$as_me: exit $exit_status" >&5
837   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
838     exit $exit_status
839      ' 0
840 for ac_signal in 1 2 13 15; do
841   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
842 done
843 ac_signal=0
844
845 # confdefs.h avoids OS command line length limits that DEFS can exceed.
846 rm -rf conftest* confdefs.h
847 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
848 echo >confdefs.h
849
850 # Let the site file select an alternate cache file if it wants to.
851 # Prefer explicitly selected file to automatically selected ones.
852 if test -z "$CONFIG_SITE"; then
853   if test "x$prefix" != xNONE; then
854     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
855   else
856     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
857   fi
858 fi
859 for ac_site_file in $CONFIG_SITE; do
860   if test -r "$ac_site_file"; then
861     { echo "$as_me:861: loading site script $ac_site_file" >&5
862 echo "$as_me: loading site script $ac_site_file" >&6;}
863     cat "$ac_site_file" >&5
864     . "$ac_site_file"
865   fi
866 done
867
868 if test -r "$cache_file"; then
869   # Some versions of bash will fail to source /dev/null (special
870   # files actually), so we avoid doing that.
871   if test -f "$cache_file"; then
872     { echo "$as_me:872: loading cache $cache_file" >&5
873 echo "$as_me: loading cache $cache_file" >&6;}
874     case $cache_file in
875       [\\/]* | ?:[\\/]* ) . $cache_file;;
876       *)                      . ./$cache_file;;
877     esac
878   fi
879 else
880   { echo "$as_me:880: creating cache $cache_file" >&5
881 echo "$as_me: creating cache $cache_file" >&6;}
882   >$cache_file
883 fi
884
885 # Check that the precious variables saved in the cache have kept the same
886 # value.
887 ac_cache_corrupted=false
888 for ac_var in `(set) 2>&1 |
889                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
890   eval ac_old_set=\$ac_cv_env_${ac_var}_set
891   eval ac_new_set=\$ac_env_${ac_var}_set
892   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
893   eval ac_new_val="\$ac_env_${ac_var}_value"
894   case $ac_old_set,$ac_new_set in
895     set,)
896       { echo "$as_me:896: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
897 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
898       ac_cache_corrupted=: ;;
899     ,set)
900       { echo "$as_me:900: error: \`$ac_var' was not set in the previous run" >&5
901 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
902       ac_cache_corrupted=: ;;
903     ,);;
904     *)
905       if test "x$ac_old_val" != "x$ac_new_val"; then
906         { echo "$as_me:906: error: \`$ac_var' has changed since the previous run:" >&5
907 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
908         { echo "$as_me:908:   former value:  $ac_old_val" >&5
909 echo "$as_me:   former value:  $ac_old_val" >&2;}
910         { echo "$as_me:910:   current value: $ac_new_val" >&5
911 echo "$as_me:   current value: $ac_new_val" >&2;}
912         ac_cache_corrupted=:
913       fi;;
914   esac
915   # Pass precious variables to config.status.  It doesn't matter if
916   # we pass some twice (in addition to the command line arguments).
917   if test "$ac_new_set" = set; then
918     case $ac_new_val in
919     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
920       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
921       ac_configure_args="$ac_configure_args '$ac_arg'"
922       ;;
923     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
924        ;;
925     esac
926   fi
927 done
928 if $ac_cache_corrupted; then
929   { echo "$as_me:929: error: changes in the environment can compromise the build" >&5
930 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
931   { { echo "$as_me:931: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
932 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
933    { (exit 1); exit 1; }; }
934 fi
935
936 ac_ext=c
937 ac_cpp='$CPP $CPPFLAGS'
938 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
939 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
940 ac_compiler_gnu=$ac_cv_c_compiler_gnu
941 ac_main_return=return
942
943 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
944   *c*,-n*) ECHO_N= ECHO_C='
945 ' ECHO_T='      ' ;;
946   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
947   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
948 esac
949 echo "#! $SHELL" >conftest.sh
950 echo  "exit 0"   >>conftest.sh
951 chmod +x conftest.sh
952 if { (echo "$as_me:952: PATH=\".;.\"; conftest.sh") >&5
953   (PATH=".;."; conftest.sh) 2>&5
954   ac_status=$?
955   echo "$as_me:955: \$? = $ac_status" >&5
956   (exit $ac_status); }; then
957   ac_path_separator=';'
958 else
959   ac_path_separator=:
960 fi
961 PATH_SEPARATOR="$ac_path_separator"
962 rm -f conftest.sh
963
964 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
965
966 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
967
968 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
969
970 ac_aux_dir=
971 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
972   if test -f $ac_dir/install-sh; then
973     ac_aux_dir=$ac_dir
974     ac_install_sh="$ac_aux_dir/install-sh -c"
975     break
976   elif test -f $ac_dir/install.sh; then
977     ac_aux_dir=$ac_dir
978     ac_install_sh="$ac_aux_dir/install.sh -c"
979     break
980   elif test -f $ac_dir/shtool; then
981     ac_aux_dir=$ac_dir
982     ac_install_sh="$ac_aux_dir/shtool install -c"
983     break
984   fi
985 done
986 if test -z "$ac_aux_dir"; then
987   { { echo "$as_me:987: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
988 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
989    { (exit 1); exit 1; }; }
990 fi
991 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
992 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
993 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
994
995 # Make sure we can run config.sub.
996 $ac_config_sub sun4 >/dev/null 2>&1 ||
997   { { echo "$as_me:997: error: cannot run $ac_config_sub" >&5
998 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
999    { (exit 1); exit 1; }; }
1000
1001 echo "$as_me:1001: checking build system type" >&5
1002 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1003 if test "${ac_cv_build+set}" = set; then
1004   echo $ECHO_N "(cached) $ECHO_C" >&6
1005 else
1006   ac_cv_build_alias=$build_alias
1007 test -z "$ac_cv_build_alias" &&
1008   ac_cv_build_alias=`$ac_config_guess`
1009 test -z "$ac_cv_build_alias" &&
1010   { { echo "$as_me:1010: error: cannot guess build type; you must specify one" >&5
1011 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1012    { (exit 1); exit 1; }; }
1013 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1014   { { echo "$as_me:1014: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1015 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1016    { (exit 1); exit 1; }; }
1017
1018 fi
1019 echo "$as_me:1019: result: $ac_cv_build" >&5
1020 echo "${ECHO_T}$ac_cv_build" >&6
1021 build=$ac_cv_build
1022 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1023 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1024 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1025
1026 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1027         echo "$as_me:1027: checking host system type" >&5
1028 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1029 if test "${ac_cv_host+set}" = set; then
1030   echo $ECHO_N "(cached) $ECHO_C" >&6
1031 else
1032   ac_cv_host_alias=$host_alias
1033 test -z "$ac_cv_host_alias" &&
1034   ac_cv_host_alias=$ac_cv_build_alias
1035 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1036   { { echo "$as_me:1036: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1037 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1038    { (exit 1); exit 1; }; }
1039
1040 fi
1041 echo "$as_me:1041: result: $ac_cv_host" >&5
1042 echo "${ECHO_T}$ac_cv_host" >&6
1043 host=$ac_cv_host
1044 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1045 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1046 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1047
1048         system_name="$host_os"
1049 else
1050         system_name="`(uname -s -r) 2>/dev/null`"
1051         if test -z "$system_name" ; then
1052                 system_name="`(hostname) 2>/dev/null`"
1053         fi
1054 fi
1055 test -n "$system_name" && cat >>confdefs.h <<EOF
1056 #define SYSTEM_NAME "$system_name"
1057 EOF
1058
1059 if test "${cf_cv_system_name+set}" = set; then
1060   echo $ECHO_N "(cached) $ECHO_C" >&6
1061 else
1062   cf_cv_system_name="$system_name"
1063 fi
1064
1065 test -z "$system_name" && system_name="$cf_cv_system_name"
1066 test -n "$cf_cv_system_name" && echo "$as_me:1066: result: Configuring for $cf_cv_system_name" >&5
1067 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1068
1069 if test ".$system_name" != ".$cf_cv_system_name" ; then
1070         echo "$as_me:1070: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1071 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1072         { { echo "$as_me:1072: error: \"Please remove config.cache and try again.\"" >&5
1073 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1074    { (exit 1); exit 1; }; }
1075 fi
1076
1077 test "$program_prefix" != NONE &&
1078   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1079 # Use a double $ so make ignores it.
1080 test "$program_suffix" != NONE &&
1081   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1082 # Double any \ or $.  echo might interpret backslashes.
1083 # By default was `s,x,x', remove it if useless.
1084 cat <<\_ACEOF >conftest.sed
1085 s/[\\$]/&&/g;s/;s,x,x,$//
1086 _ACEOF
1087 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1088 rm conftest.sed
1089
1090 echo "$as_me:1090: checking whether ${MAKE-make} sets \${MAKE}" >&5
1091 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1092 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1093 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1094   echo $ECHO_N "(cached) $ECHO_C" >&6
1095 else
1096   cat >conftest.make <<\EOF
1097 all:
1098         @echo 'ac_maketemp="${MAKE}"'
1099 EOF
1100 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1101 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1102 if test -n "$ac_maketemp"; then
1103   eval ac_cv_prog_make_${ac_make}_set=yes
1104 else
1105   eval ac_cv_prog_make_${ac_make}_set=no
1106 fi
1107 rm -f conftest.make
1108 fi
1109 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1110   echo "$as_me:1110: result: yes" >&5
1111 echo "${ECHO_T}yes" >&6
1112   SET_MAKE=
1113 else
1114   echo "$as_me:1114: result: no" >&5
1115 echo "${ECHO_T}no" >&6
1116   SET_MAKE="MAKE=${MAKE-make}"
1117 fi
1118
1119 ac_ext=c
1120 ac_cpp='$CPP $CPPFLAGS'
1121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1124 ac_main_return=return
1125 if test -n "$ac_tool_prefix"; then
1126   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1127 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1128 echo "$as_me:1128: checking for $ac_word" >&5
1129 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1130 if test "${ac_cv_prog_CC+set}" = set; then
1131   echo $ECHO_N "(cached) $ECHO_C" >&6
1132 else
1133   if test -n "$CC"; then
1134   ac_cv_prog_CC="$CC" # Let the user override the test.
1135 else
1136   ac_save_IFS=$IFS; IFS=$ac_path_separator
1137 ac_dummy="$PATH"
1138 for ac_dir in $ac_dummy; do
1139   IFS=$ac_save_IFS
1140   test -z "$ac_dir" && ac_dir=.
1141   $as_executable_p "$ac_dir/$ac_word" || continue
1142 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1143 echo "$as_me:1143: found $ac_dir/$ac_word" >&5
1144 break
1145 done
1146
1147 fi
1148 fi
1149 CC=$ac_cv_prog_CC
1150 if test -n "$CC"; then
1151   echo "$as_me:1151: result: $CC" >&5
1152 echo "${ECHO_T}$CC" >&6
1153 else
1154   echo "$as_me:1154: result: no" >&5
1155 echo "${ECHO_T}no" >&6
1156 fi
1157
1158 fi
1159 if test -z "$ac_cv_prog_CC"; then
1160   ac_ct_CC=$CC
1161   # Extract the first word of "gcc", so it can be a program name with args.
1162 set dummy gcc; ac_word=$2
1163 echo "$as_me:1163: checking for $ac_word" >&5
1164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1165 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1166   echo $ECHO_N "(cached) $ECHO_C" >&6
1167 else
1168   if test -n "$ac_ct_CC"; then
1169   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1170 else
1171   ac_save_IFS=$IFS; IFS=$ac_path_separator
1172 ac_dummy="$PATH"
1173 for ac_dir in $ac_dummy; do
1174   IFS=$ac_save_IFS
1175   test -z "$ac_dir" && ac_dir=.
1176   $as_executable_p "$ac_dir/$ac_word" || continue
1177 ac_cv_prog_ac_ct_CC="gcc"
1178 echo "$as_me:1178: found $ac_dir/$ac_word" >&5
1179 break
1180 done
1181
1182 fi
1183 fi
1184 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1185 if test -n "$ac_ct_CC"; then
1186   echo "$as_me:1186: result: $ac_ct_CC" >&5
1187 echo "${ECHO_T}$ac_ct_CC" >&6
1188 else
1189   echo "$as_me:1189: result: no" >&5
1190 echo "${ECHO_T}no" >&6
1191 fi
1192
1193   CC=$ac_ct_CC
1194 else
1195   CC="$ac_cv_prog_CC"
1196 fi
1197
1198 if test -z "$CC"; then
1199   if test -n "$ac_tool_prefix"; then
1200   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1201 set dummy ${ac_tool_prefix}cc; ac_word=$2
1202 echo "$as_me:1202: checking for $ac_word" >&5
1203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1204 if test "${ac_cv_prog_CC+set}" = set; then
1205   echo $ECHO_N "(cached) $ECHO_C" >&6
1206 else
1207   if test -n "$CC"; then
1208   ac_cv_prog_CC="$CC" # Let the user override the test.
1209 else
1210   ac_save_IFS=$IFS; IFS=$ac_path_separator
1211 ac_dummy="$PATH"
1212 for ac_dir in $ac_dummy; do
1213   IFS=$ac_save_IFS
1214   test -z "$ac_dir" && ac_dir=.
1215   $as_executable_p "$ac_dir/$ac_word" || continue
1216 ac_cv_prog_CC="${ac_tool_prefix}cc"
1217 echo "$as_me:1217: found $ac_dir/$ac_word" >&5
1218 break
1219 done
1220
1221 fi
1222 fi
1223 CC=$ac_cv_prog_CC
1224 if test -n "$CC"; then
1225   echo "$as_me:1225: result: $CC" >&5
1226 echo "${ECHO_T}$CC" >&6
1227 else
1228   echo "$as_me:1228: result: no" >&5
1229 echo "${ECHO_T}no" >&6
1230 fi
1231
1232 fi
1233 if test -z "$ac_cv_prog_CC"; then
1234   ac_ct_CC=$CC
1235   # Extract the first word of "cc", so it can be a program name with args.
1236 set dummy cc; ac_word=$2
1237 echo "$as_me:1237: checking for $ac_word" >&5
1238 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1239 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1240   echo $ECHO_N "(cached) $ECHO_C" >&6
1241 else
1242   if test -n "$ac_ct_CC"; then
1243   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1244 else
1245   ac_save_IFS=$IFS; IFS=$ac_path_separator
1246 ac_dummy="$PATH"
1247 for ac_dir in $ac_dummy; do
1248   IFS=$ac_save_IFS
1249   test -z "$ac_dir" && ac_dir=.
1250   $as_executable_p "$ac_dir/$ac_word" || continue
1251 ac_cv_prog_ac_ct_CC="cc"
1252 echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1253 break
1254 done
1255
1256 fi
1257 fi
1258 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1259 if test -n "$ac_ct_CC"; then
1260   echo "$as_me:1260: result: $ac_ct_CC" >&5
1261 echo "${ECHO_T}$ac_ct_CC" >&6
1262 else
1263   echo "$as_me:1263: result: no" >&5
1264 echo "${ECHO_T}no" >&6
1265 fi
1266
1267   CC=$ac_ct_CC
1268 else
1269   CC="$ac_cv_prog_CC"
1270 fi
1271
1272 fi
1273 if test -z "$CC"; then
1274   # Extract the first word of "cc", so it can be a program name with args.
1275 set dummy cc; ac_word=$2
1276 echo "$as_me:1276: checking for $ac_word" >&5
1277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1278 if test "${ac_cv_prog_CC+set}" = set; then
1279   echo $ECHO_N "(cached) $ECHO_C" >&6
1280 else
1281   if test -n "$CC"; then
1282   ac_cv_prog_CC="$CC" # Let the user override the test.
1283 else
1284   ac_prog_rejected=no
1285   ac_save_IFS=$IFS; IFS=$ac_path_separator
1286 ac_dummy="$PATH"
1287 for ac_dir in $ac_dummy; do
1288   IFS=$ac_save_IFS
1289   test -z "$ac_dir" && ac_dir=.
1290   $as_executable_p "$ac_dir/$ac_word" || continue
1291 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1292   ac_prog_rejected=yes
1293   continue
1294 fi
1295 ac_cv_prog_CC="cc"
1296 echo "$as_me:1296: found $ac_dir/$ac_word" >&5
1297 break
1298 done
1299
1300 if test $ac_prog_rejected = yes; then
1301   # We found a bogon in the path, so make sure we never use it.
1302   set dummy $ac_cv_prog_CC
1303   shift
1304   if test $# != 0; then
1305     # We chose a different compiler from the bogus one.
1306     # However, it has the same basename, so the bogon will be chosen
1307     # first if we set CC to just the basename; use the full file name.
1308     shift
1309     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1310     shift
1311     ac_cv_prog_CC="$@"
1312   fi
1313 fi
1314 fi
1315 fi
1316 CC=$ac_cv_prog_CC
1317 if test -n "$CC"; then
1318   echo "$as_me:1318: result: $CC" >&5
1319 echo "${ECHO_T}$CC" >&6
1320 else
1321   echo "$as_me:1321: result: no" >&5
1322 echo "${ECHO_T}no" >&6
1323 fi
1324
1325 fi
1326 if test -z "$CC"; then
1327   if test -n "$ac_tool_prefix"; then
1328   for ac_prog in cl
1329   do
1330     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1331 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1332 echo "$as_me:1332: checking for $ac_word" >&5
1333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1334 if test "${ac_cv_prog_CC+set}" = set; then
1335   echo $ECHO_N "(cached) $ECHO_C" >&6
1336 else
1337   if test -n "$CC"; then
1338   ac_cv_prog_CC="$CC" # Let the user override the test.
1339 else
1340   ac_save_IFS=$IFS; IFS=$ac_path_separator
1341 ac_dummy="$PATH"
1342 for ac_dir in $ac_dummy; do
1343   IFS=$ac_save_IFS
1344   test -z "$ac_dir" && ac_dir=.
1345   $as_executable_p "$ac_dir/$ac_word" || continue
1346 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1347 echo "$as_me:1347: found $ac_dir/$ac_word" >&5
1348 break
1349 done
1350
1351 fi
1352 fi
1353 CC=$ac_cv_prog_CC
1354 if test -n "$CC"; then
1355   echo "$as_me:1355: result: $CC" >&5
1356 echo "${ECHO_T}$CC" >&6
1357 else
1358   echo "$as_me:1358: result: no" >&5
1359 echo "${ECHO_T}no" >&6
1360 fi
1361
1362     test -n "$CC" && break
1363   done
1364 fi
1365 if test -z "$CC"; then
1366   ac_ct_CC=$CC
1367   for ac_prog in cl
1368 do
1369   # Extract the first word of "$ac_prog", so it can be a program name with args.
1370 set dummy $ac_prog; ac_word=$2
1371 echo "$as_me:1371: checking for $ac_word" >&5
1372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1373 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1374   echo $ECHO_N "(cached) $ECHO_C" >&6
1375 else
1376   if test -n "$ac_ct_CC"; then
1377   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1378 else
1379   ac_save_IFS=$IFS; IFS=$ac_path_separator
1380 ac_dummy="$PATH"
1381 for ac_dir in $ac_dummy; do
1382   IFS=$ac_save_IFS
1383   test -z "$ac_dir" && ac_dir=.
1384   $as_executable_p "$ac_dir/$ac_word" || continue
1385 ac_cv_prog_ac_ct_CC="$ac_prog"
1386 echo "$as_me:1386: found $ac_dir/$ac_word" >&5
1387 break
1388 done
1389
1390 fi
1391 fi
1392 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1393 if test -n "$ac_ct_CC"; then
1394   echo "$as_me:1394: result: $ac_ct_CC" >&5
1395 echo "${ECHO_T}$ac_ct_CC" >&6
1396 else
1397   echo "$as_me:1397: result: no" >&5
1398 echo "${ECHO_T}no" >&6
1399 fi
1400
1401   test -n "$ac_ct_CC" && break
1402 done
1403
1404   CC=$ac_ct_CC
1405 fi
1406
1407 fi
1408
1409 test -z "$CC" && { { echo "$as_me:1409: error: no acceptable cc found in \$PATH" >&5
1410 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 # Provide some information about the compiler.
1414 echo "$as_me:1414:" \
1415      "checking for C compiler version" >&5
1416 ac_compiler=`set X $ac_compile; echo $2`
1417 { (eval echo "$as_me:1417: \"$ac_compiler --version </dev/null >&5\"") >&5
1418   (eval $ac_compiler --version </dev/null >&5) 2>&5
1419   ac_status=$?
1420   echo "$as_me:1420: \$? = $ac_status" >&5
1421   (exit $ac_status); }
1422 { (eval echo "$as_me:1422: \"$ac_compiler -v </dev/null >&5\"") >&5
1423   (eval $ac_compiler -v </dev/null >&5) 2>&5
1424   ac_status=$?
1425   echo "$as_me:1425: \$? = $ac_status" >&5
1426   (exit $ac_status); }
1427 { (eval echo "$as_me:1427: \"$ac_compiler -V </dev/null >&5\"") >&5
1428   (eval $ac_compiler -V </dev/null >&5) 2>&5
1429   ac_status=$?
1430   echo "$as_me:1430: \$? = $ac_status" >&5
1431   (exit $ac_status); }
1432
1433 cat >conftest.$ac_ext <<_ACEOF
1434 #line 1434 "configure"
1435 #include "confdefs.h"
1436
1437 int
1438 main ()
1439 {
1440
1441   ;
1442   return 0;
1443 }
1444 _ACEOF
1445 ac_clean_files_save=$ac_clean_files
1446 ac_clean_files="$ac_clean_files a.out a.exe"
1447 # Try to create an executable without -o first, disregard a.out.
1448 # It will help us diagnose broken compilers, and finding out an intuition
1449 # of exeext.
1450 echo "$as_me:1450: checking for C compiler default output" >&5
1451 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1452 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1453 if { (eval echo "$as_me:1453: \"$ac_link_default\"") >&5
1454   (eval $ac_link_default) 2>&5
1455   ac_status=$?
1456   echo "$as_me:1456: \$? = $ac_status" >&5
1457   (exit $ac_status); }; then
1458   # Find the output, starting from the most likely.  This scheme is
1459 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1460 # resort.
1461 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1462                 ls a.out conftest 2>/dev/null;
1463                 ls a.* conftest.* 2>/dev/null`; do
1464   case $ac_file in
1465     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1466     a.out ) # We found the default executable, but exeext='' is most
1467             # certainly right.
1468             break;;
1469     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1470           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1471           export ac_cv_exeext
1472           break;;
1473     * ) break;;
1474   esac
1475 done
1476 else
1477   echo "$as_me: failed program was:" >&5
1478 cat conftest.$ac_ext >&5
1479 { { echo "$as_me:1479: error: C compiler cannot create executables" >&5
1480 echo "$as_me: error: C compiler cannot create executables" >&2;}
1481    { (exit 77); exit 77; }; }
1482 fi
1483
1484 ac_exeext=$ac_cv_exeext
1485 echo "$as_me:1485: result: $ac_file" >&5
1486 echo "${ECHO_T}$ac_file" >&6
1487
1488 # Check the compiler produces executables we can run.  If not, either
1489 # the compiler is broken, or we cross compile.
1490 echo "$as_me:1490: checking whether the C compiler works" >&5
1491 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1492 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1493 # If not cross compiling, check that we can run a simple program.
1494 if test "$cross_compiling" != yes; then
1495   if { ac_try='./$ac_file'
1496   { (eval echo "$as_me:1496: \"$ac_try\"") >&5
1497   (eval $ac_try) 2>&5
1498   ac_status=$?
1499   echo "$as_me:1499: \$? = $ac_status" >&5
1500   (exit $ac_status); }; }; then
1501     cross_compiling=no
1502   else
1503     if test "$cross_compiling" = maybe; then
1504         cross_compiling=yes
1505     else
1506         { { echo "$as_me:1506: error: cannot run C compiled programs.
1507 If you meant to cross compile, use \`--host'." >&5
1508 echo "$as_me: error: cannot run C compiled programs.
1509 If you meant to cross compile, use \`--host'." >&2;}
1510    { (exit 1); exit 1; }; }
1511     fi
1512   fi
1513 fi
1514 echo "$as_me:1514: result: yes" >&5
1515 echo "${ECHO_T}yes" >&6
1516
1517 rm -f a.out a.exe conftest$ac_cv_exeext
1518 ac_clean_files=$ac_clean_files_save
1519 # Check the compiler produces executables we can run.  If not, either
1520 # the compiler is broken, or we cross compile.
1521 echo "$as_me:1521: checking whether we are cross compiling" >&5
1522 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1523 echo "$as_me:1523: result: $cross_compiling" >&5
1524 echo "${ECHO_T}$cross_compiling" >&6
1525
1526 echo "$as_me:1526: checking for executable suffix" >&5
1527 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1528 if { (eval echo "$as_me:1528: \"$ac_link\"") >&5
1529   (eval $ac_link) 2>&5
1530   ac_status=$?
1531   echo "$as_me:1531: \$? = $ac_status" >&5
1532   (exit $ac_status); }; then
1533   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1534 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1535 # work properly (i.e., refer to `conftest.exe'), while it won't with
1536 # `rm'.
1537 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1538   case $ac_file in
1539     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1540     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1541           export ac_cv_exeext
1542           break;;
1543     * ) break;;
1544   esac
1545 done
1546 else
1547   { { echo "$as_me:1547: error: cannot compute EXEEXT: cannot compile and link" >&5
1548 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1549    { (exit 1); exit 1; }; }
1550 fi
1551
1552 rm -f conftest$ac_cv_exeext
1553 echo "$as_me:1553: result: $ac_cv_exeext" >&5
1554 echo "${ECHO_T}$ac_cv_exeext" >&6
1555
1556 rm -f conftest.$ac_ext
1557 EXEEXT=$ac_cv_exeext
1558 ac_exeext=$EXEEXT
1559 echo "$as_me:1559: checking for object suffix" >&5
1560 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1561 if test "${ac_cv_objext+set}" = set; then
1562   echo $ECHO_N "(cached) $ECHO_C" >&6
1563 else
1564   cat >conftest.$ac_ext <<_ACEOF
1565 #line 1565 "configure"
1566 #include "confdefs.h"
1567
1568 int
1569 main ()
1570 {
1571
1572   ;
1573   return 0;
1574 }
1575 _ACEOF
1576 rm -f conftest.o conftest.obj
1577 if { (eval echo "$as_me:1577: \"$ac_compile\"") >&5
1578   (eval $ac_compile) 2>&5
1579   ac_status=$?
1580   echo "$as_me:1580: \$? = $ac_status" >&5
1581   (exit $ac_status); }; then
1582   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1583   case $ac_file in
1584     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1585     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1586        break;;
1587   esac
1588 done
1589 else
1590   echo "$as_me: failed program was:" >&5
1591 cat conftest.$ac_ext >&5
1592 { { echo "$as_me:1592: error: cannot compute OBJEXT: cannot compile" >&5
1593 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1594    { (exit 1); exit 1; }; }
1595 fi
1596
1597 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1598 fi
1599 echo "$as_me:1599: result: $ac_cv_objext" >&5
1600 echo "${ECHO_T}$ac_cv_objext" >&6
1601 OBJEXT=$ac_cv_objext
1602 ac_objext=$OBJEXT
1603 echo "$as_me:1603: checking whether we are using the GNU C compiler" >&5
1604 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1605 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1606   echo $ECHO_N "(cached) $ECHO_C" >&6
1607 else
1608   cat >conftest.$ac_ext <<_ACEOF
1609 #line 1609 "configure"
1610 #include "confdefs.h"
1611
1612 int
1613 main ()
1614 {
1615 #ifndef __GNUC__
1616        choke me
1617 #endif
1618
1619   ;
1620   return 0;
1621 }
1622 _ACEOF
1623 rm -f conftest.$ac_objext
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625   (eval $ac_compile) 2>&5
1626   ac_status=$?
1627   echo "$as_me:1627: \$? = $ac_status" >&5
1628   (exit $ac_status); } &&
1629          { ac_try='test -s conftest.$ac_objext'
1630   { (eval echo "$as_me:1630: \"$ac_try\"") >&5
1631   (eval $ac_try) 2>&5
1632   ac_status=$?
1633   echo "$as_me:1633: \$? = $ac_status" >&5
1634   (exit $ac_status); }; }; then
1635   ac_compiler_gnu=yes
1636 else
1637   echo "$as_me: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1639 ac_compiler_gnu=no
1640 fi
1641 rm -f conftest.$ac_objext conftest.$ac_ext
1642 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1643
1644 fi
1645 echo "$as_me:1645: result: $ac_cv_c_compiler_gnu" >&5
1646 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1647 GCC=`test $ac_compiler_gnu = yes && echo yes`
1648 ac_test_CFLAGS=${CFLAGS+set}
1649 ac_save_CFLAGS=$CFLAGS
1650 CFLAGS="-g"
1651 echo "$as_me:1651: checking whether $CC accepts -g" >&5
1652 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1653 if test "${ac_cv_prog_cc_g+set}" = set; then
1654   echo $ECHO_N "(cached) $ECHO_C" >&6
1655 else
1656   cat >conftest.$ac_ext <<_ACEOF
1657 #line 1657 "configure"
1658 #include "confdefs.h"
1659
1660 int
1661 main ()
1662 {
1663
1664   ;
1665   return 0;
1666 }
1667 _ACEOF
1668 rm -f conftest.$ac_objext
1669 if { (eval echo "$as_me:1669: \"$ac_compile\"") >&5
1670   (eval $ac_compile) 2>&5
1671   ac_status=$?
1672   echo "$as_me:1672: \$? = $ac_status" >&5
1673   (exit $ac_status); } &&
1674          { ac_try='test -s conftest.$ac_objext'
1675   { (eval echo "$as_me:1675: \"$ac_try\"") >&5
1676   (eval $ac_try) 2>&5
1677   ac_status=$?
1678   echo "$as_me:1678: \$? = $ac_status" >&5
1679   (exit $ac_status); }; }; then
1680   ac_cv_prog_cc_g=yes
1681 else
1682   echo "$as_me: failed program was:" >&5
1683 cat conftest.$ac_ext >&5
1684 ac_cv_prog_cc_g=no
1685 fi
1686 rm -f conftest.$ac_objext conftest.$ac_ext
1687 fi
1688 echo "$as_me:1688: result: $ac_cv_prog_cc_g" >&5
1689 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1690 if test "$ac_test_CFLAGS" = set; then
1691   CFLAGS=$ac_save_CFLAGS
1692 elif test $ac_cv_prog_cc_g = yes; then
1693   if test "$GCC" = yes; then
1694     CFLAGS="-g -O2"
1695   else
1696     CFLAGS="-g"
1697   fi
1698 else
1699   if test "$GCC" = yes; then
1700     CFLAGS="-O2"
1701   else
1702     CFLAGS=
1703   fi
1704 fi
1705 # Some people use a C++ compiler to compile C.  Since we use `exit',
1706 # in C++ we need to declare it.  In case someone uses the same compiler
1707 # for both compiling C and C++ we need to have the C++ compiler decide
1708 # the declaration of exit, since it's the most demanding environment.
1709 cat >conftest.$ac_ext <<_ACEOF
1710 #ifndef __cplusplus
1711   choke me
1712 #endif
1713 _ACEOF
1714 rm -f conftest.$ac_objext
1715 if { (eval echo "$as_me:1715: \"$ac_compile\"") >&5
1716   (eval $ac_compile) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); } &&
1720          { ac_try='test -s conftest.$ac_objext'
1721   { (eval echo "$as_me:1721: \"$ac_try\"") >&5
1722   (eval $ac_try) 2>&5
1723   ac_status=$?
1724   echo "$as_me:1724: \$? = $ac_status" >&5
1725   (exit $ac_status); }; }; then
1726   for ac_declaration in \
1727    ''\
1728    '#include <stdlib.h>' \
1729    'extern "C" void std::exit (int) throw (); using std::exit;' \
1730    'extern "C" void std::exit (int); using std::exit;' \
1731    'extern "C" void exit (int) throw ();' \
1732    'extern "C" void exit (int);' \
1733    'void exit (int);'
1734 do
1735   cat >conftest.$ac_ext <<_ACEOF
1736 #line 1736 "configure"
1737 #include "confdefs.h"
1738 #include <stdlib.h>
1739 $ac_declaration
1740 int
1741 main ()
1742 {
1743 exit (42);
1744   ;
1745   return 0;
1746 }
1747 _ACEOF
1748 rm -f conftest.$ac_objext
1749 if { (eval echo "$as_me:1749: \"$ac_compile\"") >&5
1750   (eval $ac_compile) 2>&5
1751   ac_status=$?
1752   echo "$as_me:1752: \$? = $ac_status" >&5
1753   (exit $ac_status); } &&
1754          { ac_try='test -s conftest.$ac_objext'
1755   { (eval echo "$as_me:1755: \"$ac_try\"") >&5
1756   (eval $ac_try) 2>&5
1757   ac_status=$?
1758   echo "$as_me:1758: \$? = $ac_status" >&5
1759   (exit $ac_status); }; }; then
1760   :
1761 else
1762   echo "$as_me: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1764 continue
1765 fi
1766 rm -f conftest.$ac_objext conftest.$ac_ext
1767   cat >conftest.$ac_ext <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1770 $ac_declaration
1771 int
1772 main ()
1773 {
1774 exit (42);
1775   ;
1776   return 0;
1777 }
1778 _ACEOF
1779 rm -f conftest.$ac_objext
1780 if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
1781   (eval $ac_compile) 2>&5
1782   ac_status=$?
1783   echo "$as_me:1783: \$? = $ac_status" >&5
1784   (exit $ac_status); } &&
1785          { ac_try='test -s conftest.$ac_objext'
1786   { (eval echo "$as_me:1786: \"$ac_try\"") >&5
1787   (eval $ac_try) 2>&5
1788   ac_status=$?
1789   echo "$as_me:1789: \$? = $ac_status" >&5
1790   (exit $ac_status); }; }; then
1791   break
1792 else
1793   echo "$as_me: failed program was:" >&5
1794 cat conftest.$ac_ext >&5
1795 fi
1796 rm -f conftest.$ac_objext conftest.$ac_ext
1797 done
1798 rm -rf conftest*
1799 if test -n "$ac_declaration"; then
1800   echo '#ifdef __cplusplus' >>confdefs.h
1801   echo $ac_declaration      >>confdefs.h
1802   echo '#endif'             >>confdefs.h
1803 fi
1804
1805 else
1806   echo "$as_me: failed program was:" >&5
1807 cat conftest.$ac_ext >&5
1808 fi
1809 rm -f conftest.$ac_objext conftest.$ac_ext
1810 ac_ext=c
1811 ac_cpp='$CPP $CPPFLAGS'
1812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1815 ac_main_return=return
1816
1817 ac_ext=c
1818 ac_cpp='$CPP $CPPFLAGS'
1819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1822 ac_main_return=return
1823 echo "$as_me:1823: checking how to run the C preprocessor" >&5
1824 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1825 # On Suns, sometimes $CPP names a directory.
1826 if test -n "$CPP" && test -d "$CPP"; then
1827   CPP=
1828 fi
1829 if test -z "$CPP"; then
1830   if test "${ac_cv_prog_CPP+set}" = set; then
1831   echo $ECHO_N "(cached) $ECHO_C" >&6
1832 else
1833       # Double quotes because CPP needs to be expanded
1834     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1835     do
1836       ac_preproc_ok=false
1837 for ac_c_preproc_warn_flag in '' yes
1838 do
1839   # Use a header file that comes with gcc, so configuring glibc
1840   # with a fresh cross-compiler works.
1841   # On the NeXT, cc -E runs the code through the compiler's parser,
1842   # not just through cpp. "Syntax error" is here to catch this case.
1843   cat >conftest.$ac_ext <<_ACEOF
1844 #line 1844 "configure"
1845 #include "confdefs.h"
1846 #include <assert.h>
1847                      Syntax error
1848 _ACEOF
1849 if { (eval echo "$as_me:1849: \"$ac_cpp conftest.$ac_ext\"") >&5
1850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1851   ac_status=$?
1852   egrep -v '^ *\+' conftest.er1 >conftest.err
1853   rm -f conftest.er1
1854   cat conftest.err >&5
1855   echo "$as_me:1855: \$? = $ac_status" >&5
1856   (exit $ac_status); } >/dev/null; then
1857   if test -s conftest.err; then
1858     ac_cpp_err=$ac_c_preproc_warn_flag
1859   else
1860     ac_cpp_err=
1861   fi
1862 else
1863   ac_cpp_err=yes
1864 fi
1865 if test -z "$ac_cpp_err"; then
1866   :
1867 else
1868   echo "$as_me: failed program was:" >&5
1869   cat conftest.$ac_ext >&5
1870   # Broken: fails on valid input.
1871 continue
1872 fi
1873 rm -f conftest.err conftest.$ac_ext
1874
1875   # OK, works on sane cases.  Now check whether non-existent headers
1876   # can be detected and how.
1877   cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880 #include <ac_nonexistent.h>
1881 _ACEOF
1882 if { (eval echo "$as_me:1882: \"$ac_cpp conftest.$ac_ext\"") >&5
1883   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1884   ac_status=$?
1885   egrep -v '^ *\+' conftest.er1 >conftest.err
1886   rm -f conftest.er1
1887   cat conftest.err >&5
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit $ac_status); } >/dev/null; then
1890   if test -s conftest.err; then
1891     ac_cpp_err=$ac_c_preproc_warn_flag
1892   else
1893     ac_cpp_err=
1894   fi
1895 else
1896   ac_cpp_err=yes
1897 fi
1898 if test -z "$ac_cpp_err"; then
1899   # Broken: success on invalid input.
1900 continue
1901 else
1902   echo "$as_me: failed program was:" >&5
1903   cat conftest.$ac_ext >&5
1904   # Passes both tests.
1905 ac_preproc_ok=:
1906 break
1907 fi
1908 rm -f conftest.err conftest.$ac_ext
1909
1910 done
1911 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1912 rm -f conftest.err conftest.$ac_ext
1913 if $ac_preproc_ok; then
1914   break
1915 fi
1916
1917     done
1918     ac_cv_prog_CPP=$CPP
1919
1920 fi
1921   CPP=$ac_cv_prog_CPP
1922 else
1923   ac_cv_prog_CPP=$CPP
1924 fi
1925 echo "$as_me:1925: result: $CPP" >&5
1926 echo "${ECHO_T}$CPP" >&6
1927 ac_preproc_ok=false
1928 for ac_c_preproc_warn_flag in '' yes
1929 do
1930   # Use a header file that comes with gcc, so configuring glibc
1931   # with a fresh cross-compiler works.
1932   # On the NeXT, cc -E runs the code through the compiler's parser,
1933   # not just through cpp. "Syntax error" is here to catch this case.
1934   cat >conftest.$ac_ext <<_ACEOF
1935 #line 1935 "configure"
1936 #include "confdefs.h"
1937 #include <assert.h>
1938                      Syntax error
1939 _ACEOF
1940 if { (eval echo "$as_me:1940: \"$ac_cpp conftest.$ac_ext\"") >&5
1941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1942   ac_status=$?
1943   egrep -v '^ *\+' conftest.er1 >conftest.err
1944   rm -f conftest.er1
1945   cat conftest.err >&5
1946   echo "$as_me:1946: \$? = $ac_status" >&5
1947   (exit $ac_status); } >/dev/null; then
1948   if test -s conftest.err; then
1949     ac_cpp_err=$ac_c_preproc_warn_flag
1950   else
1951     ac_cpp_err=
1952   fi
1953 else
1954   ac_cpp_err=yes
1955 fi
1956 if test -z "$ac_cpp_err"; then
1957   :
1958 else
1959   echo "$as_me: failed program was:" >&5
1960   cat conftest.$ac_ext >&5
1961   # Broken: fails on valid input.
1962 continue
1963 fi
1964 rm -f conftest.err conftest.$ac_ext
1965
1966   # OK, works on sane cases.  Now check whether non-existent headers
1967   # can be detected and how.
1968   cat >conftest.$ac_ext <<_ACEOF
1969 #line 1969 "configure"
1970 #include "confdefs.h"
1971 #include <ac_nonexistent.h>
1972 _ACEOF
1973 if { (eval echo "$as_me:1973: \"$ac_cpp conftest.$ac_ext\"") >&5
1974   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1975   ac_status=$?
1976   egrep -v '^ *\+' conftest.er1 >conftest.err
1977   rm -f conftest.er1
1978   cat conftest.err >&5
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); } >/dev/null; then
1981   if test -s conftest.err; then
1982     ac_cpp_err=$ac_c_preproc_warn_flag
1983   else
1984     ac_cpp_err=
1985   fi
1986 else
1987   ac_cpp_err=yes
1988 fi
1989 if test -z "$ac_cpp_err"; then
1990   # Broken: success on invalid input.
1991 continue
1992 else
1993   echo "$as_me: failed program was:" >&5
1994   cat conftest.$ac_ext >&5
1995   # Passes both tests.
1996 ac_preproc_ok=:
1997 break
1998 fi
1999 rm -f conftest.err conftest.$ac_ext
2000
2001 done
2002 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2003 rm -f conftest.err conftest.$ac_ext
2004 if $ac_preproc_ok; then
2005   :
2006 else
2007   { { echo "$as_me:2007: error: C preprocessor \"$CPP\" fails sanity check" >&5
2008 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2009    { (exit 1); exit 1; }; }
2010 fi
2011
2012 ac_ext=c
2013 ac_cpp='$CPP $CPPFLAGS'
2014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2017 ac_main_return=return
2018
2019 for ac_prog in mawk gawk nawk awk
2020 do
2021   # Extract the first word of "$ac_prog", so it can be a program name with args.
2022 set dummy $ac_prog; ac_word=$2
2023 echo "$as_me:2023: checking for $ac_word" >&5
2024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2025 if test "${ac_cv_prog_AWK+set}" = set; then
2026   echo $ECHO_N "(cached) $ECHO_C" >&6
2027 else
2028   if test -n "$AWK"; then
2029   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2030 else
2031   ac_save_IFS=$IFS; IFS=$ac_path_separator
2032 ac_dummy="$PATH"
2033 for ac_dir in $ac_dummy; do
2034   IFS=$ac_save_IFS
2035   test -z "$ac_dir" && ac_dir=.
2036   $as_executable_p "$ac_dir/$ac_word" || continue
2037 ac_cv_prog_AWK="$ac_prog"
2038 echo "$as_me:2038: found $ac_dir/$ac_word" >&5
2039 break
2040 done
2041
2042 fi
2043 fi
2044 AWK=$ac_cv_prog_AWK
2045 if test -n "$AWK"; then
2046   echo "$as_me:2046: result: $AWK" >&5
2047 echo "${ECHO_T}$AWK" >&6
2048 else
2049   echo "$as_me:2049: result: no" >&5
2050 echo "${ECHO_T}no" >&6
2051 fi
2052
2053   test -n "$AWK" && break
2054 done
2055
2056 # Find a good install program.  We prefer a C program (faster),
2057 # so one script is as good as another.  But avoid the broken or
2058 # incompatible versions:
2059 # SysV /etc/install, /usr/sbin/install
2060 # SunOS /usr/etc/install
2061 # IRIX /sbin/install
2062 # AIX /bin/install
2063 # AmigaOS /C/install, which installs bootblocks on floppy discs
2064 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2065 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2066 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2067 # ./install, which can be erroneously created by make from ./install.sh.
2068 echo "$as_me:2068: checking for a BSD compatible install" >&5
2069 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2070 if test -z "$INSTALL"; then
2071 if test "${ac_cv_path_install+set}" = set; then
2072   echo $ECHO_N "(cached) $ECHO_C" >&6
2073 else
2074     ac_save_IFS=$IFS; IFS=$ac_path_separator
2075   for ac_dir in $PATH; do
2076     IFS=$ac_save_IFS
2077     # Account for people who put trailing slashes in PATH elements.
2078     case $ac_dir/ in
2079     / | ./ | .// | /cC/* \
2080     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2081     | /usr/ucb/* ) ;;
2082     *)
2083       # OSF1 and SCO ODT 3.0 have their own names for install.
2084       # Don't use installbsd from OSF since it installs stuff as root
2085       # by default.
2086       for ac_prog in ginstall scoinst install; do
2087         if $as_executable_p "$ac_dir/$ac_prog"; then
2088           if test $ac_prog = install &&
2089             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2090             # AIX install.  It has an incompatible calling convention.
2091             :
2092           elif test $ac_prog = install &&
2093             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2094             # program-specific install script used by HP pwplus--don't use.
2095             :
2096           else
2097             ac_cv_path_install="$ac_dir/$ac_prog -c"
2098             break 2
2099           fi
2100         fi
2101       done
2102       ;;
2103     esac
2104   done
2105
2106 fi
2107   if test "${ac_cv_path_install+set}" = set; then
2108     INSTALL=$ac_cv_path_install
2109   else
2110     # As a last resort, use the slow shell script.  We don't cache a
2111     # path for INSTALL within a source directory, because that will
2112     # break other packages using the cache if that directory is
2113     # removed, or if the path is relative.
2114     INSTALL=$ac_install_sh
2115   fi
2116 fi
2117 echo "$as_me:2117: result: $INSTALL" >&5
2118 echo "${ECHO_T}$INSTALL" >&6
2119
2120 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2121 # It thinks the first close brace ends the variable substitution.
2122 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2123
2124 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2125
2126 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2127
2128 case $INSTALL in
2129 /*)
2130   ;;
2131 *)
2132   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2133   test -z "$cf_dir" && cf_dir=.
2134   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2135   ;;
2136 esac
2137
2138 for ac_prog in tdlint lint alint splint lclint
2139 do
2140   # Extract the first word of "$ac_prog", so it can be a program name with args.
2141 set dummy $ac_prog; ac_word=$2
2142 echo "$as_me:2142: checking for $ac_word" >&5
2143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2144 if test "${ac_cv_prog_LINT+set}" = set; then
2145   echo $ECHO_N "(cached) $ECHO_C" >&6
2146 else
2147   if test -n "$LINT"; then
2148   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2149 else
2150   ac_save_IFS=$IFS; IFS=$ac_path_separator
2151 ac_dummy="$PATH"
2152 for ac_dir in $ac_dummy; do
2153   IFS=$ac_save_IFS
2154   test -z "$ac_dir" && ac_dir=.
2155   $as_executable_p "$ac_dir/$ac_word" || continue
2156 ac_cv_prog_LINT="$ac_prog"
2157 echo "$as_me:2157: found $ac_dir/$ac_word" >&5
2158 break
2159 done
2160
2161 fi
2162 fi
2163 LINT=$ac_cv_prog_LINT
2164 if test -n "$LINT"; then
2165   echo "$as_me:2165: result: $LINT" >&5
2166 echo "${ECHO_T}$LINT" >&6
2167 else
2168   echo "$as_me:2168: result: no" >&5
2169 echo "${ECHO_T}no" >&6
2170 fi
2171
2172   test -n "$LINT" && break
2173 done
2174
2175 echo "$as_me:2175: checking if filesystem supports mixed-case filenames" >&5
2176 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2177 if test "${cf_cv_mixedcase+set}" = set; then
2178   echo $ECHO_N "(cached) $ECHO_C" >&6
2179 else
2180
2181 if test "$cross_compiling" = yes ; then
2182         case $target_alias in #(vi
2183         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2184                 cf_cv_mixedcase=no
2185                 ;;
2186         *)
2187                 cf_cv_mixedcase=yes
2188                 ;;
2189         esac
2190 else
2191         rm -f conftest CONFTEST
2192         echo test >conftest
2193         if test -f CONFTEST ; then
2194                 cf_cv_mixedcase=no
2195         else
2196                 cf_cv_mixedcase=yes
2197         fi
2198         rm -f conftest CONFTEST
2199 fi
2200
2201 fi
2202 echo "$as_me:2202: result: $cf_cv_mixedcase" >&5
2203 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2204 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2205 #define MIXEDCASE_FILENAMES 1
2206 EOF
2207
2208 for ac_prog in exctags ctags
2209 do
2210   # Extract the first word of "$ac_prog", so it can be a program name with args.
2211 set dummy $ac_prog; ac_word=$2
2212 echo "$as_me:2212: checking for $ac_word" >&5
2213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2214 if test "${ac_cv_prog_CTAGS+set}" = set; then
2215   echo $ECHO_N "(cached) $ECHO_C" >&6
2216 else
2217   if test -n "$CTAGS"; then
2218   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2219 else
2220   ac_save_IFS=$IFS; IFS=$ac_path_separator
2221 ac_dummy="$PATH"
2222 for ac_dir in $ac_dummy; do
2223   IFS=$ac_save_IFS
2224   test -z "$ac_dir" && ac_dir=.
2225   $as_executable_p "$ac_dir/$ac_word" || continue
2226 ac_cv_prog_CTAGS="$ac_prog"
2227 echo "$as_me:2227: found $ac_dir/$ac_word" >&5
2228 break
2229 done
2230
2231 fi
2232 fi
2233 CTAGS=$ac_cv_prog_CTAGS
2234 if test -n "$CTAGS"; then
2235   echo "$as_me:2235: result: $CTAGS" >&5
2236 echo "${ECHO_T}$CTAGS" >&6
2237 else
2238   echo "$as_me:2238: result: no" >&5
2239 echo "${ECHO_T}no" >&6
2240 fi
2241
2242   test -n "$CTAGS" && break
2243 done
2244
2245 for ac_prog in exetags etags
2246 do
2247   # Extract the first word of "$ac_prog", so it can be a program name with args.
2248 set dummy $ac_prog; ac_word=$2
2249 echo "$as_me:2249: checking for $ac_word" >&5
2250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2251 if test "${ac_cv_prog_ETAGS+set}" = set; then
2252   echo $ECHO_N "(cached) $ECHO_C" >&6
2253 else
2254   if test -n "$ETAGS"; then
2255   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2256 else
2257   ac_save_IFS=$IFS; IFS=$ac_path_separator
2258 ac_dummy="$PATH"
2259 for ac_dir in $ac_dummy; do
2260   IFS=$ac_save_IFS
2261   test -z "$ac_dir" && ac_dir=.
2262   $as_executable_p "$ac_dir/$ac_word" || continue
2263 ac_cv_prog_ETAGS="$ac_prog"
2264 echo "$as_me:2264: found $ac_dir/$ac_word" >&5
2265 break
2266 done
2267
2268 fi
2269 fi
2270 ETAGS=$ac_cv_prog_ETAGS
2271 if test -n "$ETAGS"; then
2272   echo "$as_me:2272: result: $ETAGS" >&5
2273 echo "${ECHO_T}$ETAGS" >&6
2274 else
2275   echo "$as_me:2275: result: no" >&5
2276 echo "${ECHO_T}no" >&6
2277 fi
2278
2279   test -n "$ETAGS" && break
2280 done
2281
2282 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2283 set dummy ${CTAGS:-ctags}; ac_word=$2
2284 echo "$as_me:2284: checking for $ac_word" >&5
2285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2286 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2287   echo $ECHO_N "(cached) $ECHO_C" >&6
2288 else
2289   if test -n "$MAKE_LOWER_TAGS"; then
2290   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2291 else
2292   ac_save_IFS=$IFS; IFS=$ac_path_separator
2293 ac_dummy="$PATH"
2294 for ac_dir in $ac_dummy; do
2295   IFS=$ac_save_IFS
2296   test -z "$ac_dir" && ac_dir=.
2297   $as_executable_p "$ac_dir/$ac_word" || continue
2298 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2299 echo "$as_me:2299: found $ac_dir/$ac_word" >&5
2300 break
2301 done
2302
2303   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2304 fi
2305 fi
2306 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2307 if test -n "$MAKE_LOWER_TAGS"; then
2308   echo "$as_me:2308: result: $MAKE_LOWER_TAGS" >&5
2309 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2310 else
2311   echo "$as_me:2311: result: no" >&5
2312 echo "${ECHO_T}no" >&6
2313 fi
2314
2315 if test "$cf_cv_mixedcase" = yes ; then
2316         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2317 set dummy ${ETAGS:-etags}; ac_word=$2
2318 echo "$as_me:2318: checking for $ac_word" >&5
2319 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2320 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2321   echo $ECHO_N "(cached) $ECHO_C" >&6
2322 else
2323   if test -n "$MAKE_UPPER_TAGS"; then
2324   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2325 else
2326   ac_save_IFS=$IFS; IFS=$ac_path_separator
2327 ac_dummy="$PATH"
2328 for ac_dir in $ac_dummy; do
2329   IFS=$ac_save_IFS
2330   test -z "$ac_dir" && ac_dir=.
2331   $as_executable_p "$ac_dir/$ac_word" || continue
2332 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2333 echo "$as_me:2333: found $ac_dir/$ac_word" >&5
2334 break
2335 done
2336
2337   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2338 fi
2339 fi
2340 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2341 if test -n "$MAKE_UPPER_TAGS"; then
2342   echo "$as_me:2342: result: $MAKE_UPPER_TAGS" >&5
2343 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2344 else
2345   echo "$as_me:2345: result: no" >&5
2346 echo "${ECHO_T}no" >&6
2347 fi
2348
2349 else
2350         MAKE_UPPER_TAGS=no
2351 fi
2352
2353 if test "$MAKE_UPPER_TAGS" = yes ; then
2354         MAKE_UPPER_TAGS=
2355 else
2356         MAKE_UPPER_TAGS="#"
2357 fi
2358
2359 if test "$MAKE_LOWER_TAGS" = yes ; then
2360         MAKE_LOWER_TAGS=
2361 else
2362         MAKE_LOWER_TAGS="#"
2363 fi
2364
2365 echo "$as_me:2365: checking if -lm needed for math functions" >&5
2366 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2367 if test "${cf_cv_need_libm+set}" = set; then
2368   echo $ECHO_N "(cached) $ECHO_C" >&6
2369 else
2370
2371         cat >conftest.$ac_ext <<_ACEOF
2372 #line 2372 "configure"
2373 #include "confdefs.h"
2374
2375         #include <stdio.h>
2376         #include <math.h>
2377
2378 int
2379 main ()
2380 {
2381 double x = rand(); printf("result = %g\n", sin(x))
2382   ;
2383   return 0;
2384 }
2385 _ACEOF
2386 rm -f conftest.$ac_objext conftest$ac_exeext
2387 if { (eval echo "$as_me:2387: \"$ac_link\"") >&5
2388   (eval $ac_link) 2>&5
2389   ac_status=$?
2390   echo "$as_me:2390: \$? = $ac_status" >&5
2391   (exit $ac_status); } &&
2392          { ac_try='test -s conftest$ac_exeext'
2393   { (eval echo "$as_me:2393: \"$ac_try\"") >&5
2394   (eval $ac_try) 2>&5
2395   ac_status=$?
2396   echo "$as_me:2396: \$? = $ac_status" >&5
2397   (exit $ac_status); }; }; then
2398   cf_cv_need_libm=no
2399 else
2400   echo "$as_me: failed program was:" >&5
2401 cat conftest.$ac_ext >&5
2402 cf_cv_need_libm=yes
2403 fi
2404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2405 fi
2406 echo "$as_me:2406: result: $cf_cv_need_libm" >&5
2407 echo "${ECHO_T}$cf_cv_need_libm" >&6
2408 if test "$cf_cv_need_libm" = yes
2409 then
2410 MATH_LIB=-lm
2411 fi
2412
2413 top_builddir=`pwd`
2414
2415 CC_G_OPT="-g"
2416 CC_SHARED_OPTS=unknown
2417 CPPFLAGS="$CPPFLAGS"
2418 DFT_DEP_SUFFIX=""
2419 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2420 DFT_UPR_MODEL="NORMAL"
2421 LD="ld"
2422 LDFLAGS_SHARED=""
2423 LDFLAGS_STATIC=""
2424 LD_MODEL=""
2425 LD_SHARED_OPTS=""
2426 LIBTOOL=""
2427 LIB_CLEAN=""
2428 LIB_COMPILE=""
2429 LIB_LINK='${CC}'
2430 LINK_TESTS=""
2431 LOCAL_LDFLAGS=""
2432 PTHREAD="-lm"
2433 TEST_ARGS=""
2434 TEST_DEPS=""
2435 TEST_LIBS=""
2436 TINFO_LDFLAGS=''
2437 TINFO_LIBS='$(LIBS_CURSES)'
2438 cf_cv_abi_version=""
2439 cf_cv_rel_version=""
2440
2441 cf_cv_screen=curses
2442 cf_cv_libtype=
2443
2444 # This should have been defined by AC_PROG_CC
2445 : ${CC:=cc}
2446
2447 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2448 # into CC.  This will not help with broken scripts that wrap the compiler with
2449 # options, but eliminates a more common category of user confusion.
2450 echo "$as_me:2450: checking \$CC variable" >&5
2451 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2452 case "$CC" in #(vi
2453 *[\ \   ]-[IUD]*)
2454         echo "$as_me:2454: result: broken" >&5
2455 echo "${ECHO_T}broken" >&6
2456         { echo "$as_me:2456: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2457 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2458         # humor him...
2459         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2460         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2461
2462 cf_fix_cppflags=no
2463 cf_new_cflags=
2464 cf_new_cppflags=
2465 cf_new_extra_cppflags=
2466
2467 for cf_add_cflags in $cf_flags
2468 do
2469 case $cf_fix_cppflags in
2470 no)
2471         case $cf_add_cflags in #(vi
2472         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2473                 case $cf_add_cflags in
2474                 -D*)
2475                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2476
2477                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2478                                 && test -z "${cf_tst_cflags}" \
2479                                 && cf_fix_cppflags=yes
2480
2481                         if test $cf_fix_cppflags = yes ; then
2482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2483                                 continue
2484                         elif test "${cf_tst_cflags}" = "\"'" ; then
2485                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2486                                 continue
2487                         fi
2488                         ;;
2489                 esac
2490                 case "$CPPFLAGS" in
2491                 *$cf_add_cflags) #(vi
2492                         ;;
2493                 *) #(vi
2494                         case $cf_add_cflags in #(vi
2495                         -D*)
2496                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2497
2498 CPPFLAGS=`echo "$CPPFLAGS" | \
2499         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2500                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2501
2502                                 ;;
2503                         esac
2504                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2505                         ;;
2506                 esac
2507                 ;;
2508         *)
2509                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2510                 ;;
2511         esac
2512         ;;
2513 yes)
2514         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2515
2516         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2517
2518         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2519                 && test -z "${cf_tst_cflags}" \
2520                 && cf_fix_cppflags=no
2521         ;;
2522 esac
2523 done
2524
2525 if test -n "$cf_new_cflags" ; then
2526
2527         CFLAGS="$CFLAGS $cf_new_cflags"
2528 fi
2529
2530 if test -n "$cf_new_cppflags" ; then
2531
2532         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2533 fi
2534
2535 if test -n "$cf_new_extra_cppflags" ; then
2536
2537         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2538 fi
2539
2540         ;;
2541 *)
2542         echo "$as_me:2542: result: ok" >&5
2543 echo "${ECHO_T}ok" >&6
2544         ;;
2545 esac
2546
2547 echo "$as_me:2547: checking for ${CC:-cc} option to accept ANSI C" >&5
2548 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2549 if test "${cf_cv_ansi_cc+set}" = set; then
2550   echo $ECHO_N "(cached) $ECHO_C" >&6
2551 else
2552
2553 cf_cv_ansi_cc=no
2554 cf_save_CFLAGS="$CFLAGS"
2555 cf_save_CPPFLAGS="$CPPFLAGS"
2556 # Don't try gcc -ansi; that turns off useful extensions and
2557 # breaks some systems' header files.
2558 # AIX                   -qlanglvl=ansi
2559 # Ultrix and OSF/1      -std1
2560 # HP-UX                 -Aa -D_HPUX_SOURCE
2561 # SVR4                  -Xc
2562 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2563 for cf_arg in "-DCC_HAS_PROTOS" \
2564         "" \
2565         -qlanglvl=ansi \
2566         -std1 \
2567         -Ae \
2568         "-Aa -D_HPUX_SOURCE" \
2569         -Xc
2570 do
2571
2572 cf_fix_cppflags=no
2573 cf_new_cflags=
2574 cf_new_cppflags=
2575 cf_new_extra_cppflags=
2576
2577 for cf_add_cflags in $cf_arg
2578 do
2579 case $cf_fix_cppflags in
2580 no)
2581         case $cf_add_cflags in #(vi
2582         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2583                 case $cf_add_cflags in
2584                 -D*)
2585                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2586
2587                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2588                                 && test -z "${cf_tst_cflags}" \
2589                                 && cf_fix_cppflags=yes
2590
2591                         if test $cf_fix_cppflags = yes ; then
2592                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2593                                 continue
2594                         elif test "${cf_tst_cflags}" = "\"'" ; then
2595                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2596                                 continue
2597                         fi
2598                         ;;
2599                 esac
2600                 case "$CPPFLAGS" in
2601                 *$cf_add_cflags) #(vi
2602                         ;;
2603                 *) #(vi
2604                         case $cf_add_cflags in #(vi
2605                         -D*)
2606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2607
2608 CPPFLAGS=`echo "$CPPFLAGS" | \
2609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2611
2612                                 ;;
2613                         esac
2614                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2615                         ;;
2616                 esac
2617                 ;;
2618         *)
2619                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2620                 ;;
2621         esac
2622         ;;
2623 yes)
2624         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2625
2626         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2627
2628         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2629                 && test -z "${cf_tst_cflags}" \
2630                 && cf_fix_cppflags=no
2631         ;;
2632 esac
2633 done
2634
2635 if test -n "$cf_new_cflags" ; then
2636
2637         CFLAGS="$CFLAGS $cf_new_cflags"
2638 fi
2639
2640 if test -n "$cf_new_cppflags" ; then
2641
2642         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2643 fi
2644
2645 if test -n "$cf_new_extra_cppflags" ; then
2646
2647         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2648 fi
2649
2650         cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2653
2654 #ifndef CC_HAS_PROTOS
2655 #if !defined(__STDC__) || (__STDC__ != 1)
2656 choke me
2657 #endif
2658 #endif
2659
2660 int
2661 main ()
2662 {
2663
2664         int test (int i, double x);
2665         struct s1 {int (*f) (int a);};
2666         struct s2 {int (*f) (double a);};
2667   ;
2668   return 0;
2669 }
2670 _ACEOF
2671 rm -f conftest.$ac_objext
2672 if { (eval echo "$as_me:2672: \"$ac_compile\"") >&5
2673   (eval $ac_compile) 2>&5
2674   ac_status=$?
2675   echo "$as_me:2675: \$? = $ac_status" >&5
2676   (exit $ac_status); } &&
2677          { ac_try='test -s conftest.$ac_objext'
2678   { (eval echo "$as_me:2678: \"$ac_try\"") >&5
2679   (eval $ac_try) 2>&5
2680   ac_status=$?
2681   echo "$as_me:2681: \$? = $ac_status" >&5
2682   (exit $ac_status); }; }; then
2683   cf_cv_ansi_cc="$cf_arg"; break
2684 else
2685   echo "$as_me: failed program was:" >&5
2686 cat conftest.$ac_ext >&5
2687 fi
2688 rm -f conftest.$ac_objext conftest.$ac_ext
2689 done
2690 CFLAGS="$cf_save_CFLAGS"
2691 CPPFLAGS="$cf_save_CPPFLAGS"
2692
2693 fi
2694 echo "$as_me:2694: result: $cf_cv_ansi_cc" >&5
2695 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2696
2697 if test "$cf_cv_ansi_cc" != "no"; then
2698 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2699
2700 cf_fix_cppflags=no
2701 cf_new_cflags=
2702 cf_new_cppflags=
2703 cf_new_extra_cppflags=
2704
2705 for cf_add_cflags in $cf_cv_ansi_cc
2706 do
2707 case $cf_fix_cppflags in
2708 no)
2709         case $cf_add_cflags in #(vi
2710         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2711                 case $cf_add_cflags in
2712                 -D*)
2713                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2714
2715                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2716                                 && test -z "${cf_tst_cflags}" \
2717                                 && cf_fix_cppflags=yes
2718
2719                         if test $cf_fix_cppflags = yes ; then
2720                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2721                                 continue
2722                         elif test "${cf_tst_cflags}" = "\"'" ; then
2723                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2724                                 continue
2725                         fi
2726                         ;;
2727                 esac
2728                 case "$CPPFLAGS" in
2729                 *$cf_add_cflags) #(vi
2730                         ;;
2731                 *) #(vi
2732                         case $cf_add_cflags in #(vi
2733                         -D*)
2734                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2735
2736 CPPFLAGS=`echo "$CPPFLAGS" | \
2737         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2738                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2739
2740                                 ;;
2741                         esac
2742                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2743                         ;;
2744                 esac
2745                 ;;
2746         *)
2747                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2748                 ;;
2749         esac
2750         ;;
2751 yes)
2752         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2753
2754         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2755
2756         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2757                 && test -z "${cf_tst_cflags}" \
2758                 && cf_fix_cppflags=no
2759         ;;
2760 esac
2761 done
2762
2763 if test -n "$cf_new_cflags" ; then
2764
2765         CFLAGS="$CFLAGS $cf_new_cflags"
2766 fi
2767
2768 if test -n "$cf_new_cppflags" ; then
2769
2770         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2771 fi
2772
2773 if test -n "$cf_new_extra_cppflags" ; then
2774
2775         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2776 fi
2777
2778 else
2779         cat >>confdefs.h <<\EOF
2780 #define CC_HAS_PROTOS 1
2781 EOF
2782
2783 fi
2784 fi
2785
2786 if test "$cf_cv_ansi_cc" = "no"; then
2787         { { echo "$as_me:2787: error: Your compiler does not appear to recognize prototypes.
2788 You have the following choices:
2789         a. adjust your compiler options
2790         b. get an up-to-date compiler
2791         c. use a wrapper such as unproto" >&5
2792 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2793 You have the following choices:
2794         a. adjust your compiler options
2795         b. get an up-to-date compiler
2796         c. use a wrapper such as unproto" >&2;}
2797    { (exit 1); exit 1; }; }
2798 fi
2799
2800 if test "$GCC" = yes
2801 then
2802 cat > conftest.i <<EOF
2803 #ifndef GCC_PRINTF
2804 #define GCC_PRINTF 0
2805 #endif
2806 #ifndef GCC_SCANF
2807 #define GCC_SCANF 0
2808 #endif
2809 #ifndef GCC_NORETURN
2810 #define GCC_NORETURN /* nothing */
2811 #endif
2812 #ifndef GCC_UNUSED
2813 #define GCC_UNUSED /* nothing */
2814 #endif
2815 EOF
2816 if test "$GCC" = yes
2817 then
2818         { echo "$as_me:2818: checking for $CC __attribute__ directives..." >&5
2819 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2820 cat > conftest.$ac_ext <<EOF
2821 #line 2821 "${as_me:-configure}"
2822 #include "confdefs.h"
2823 #include "conftest.h"
2824 #include "conftest.i"
2825 #if     GCC_PRINTF
2826 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2827 #else
2828 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2829 #endif
2830 #if     GCC_SCANF
2831 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2832 #else
2833 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2834 #endif
2835 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2836 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2837 extern void foo(void) GCC_NORETURN;
2838 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2839 EOF
2840         cf_printf_attribute=no
2841         cf_scanf_attribute=no
2842         for cf_attribute in scanf printf unused noreturn
2843         do
2844
2845 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2846
2847                 cf_directive="__attribute__(($cf_attribute))"
2848                 echo "checking for $CC $cf_directive" 1>&5
2849
2850                 case $cf_attribute in #(vi
2851                 printf) #(vi
2852                         cf_printf_attribute=yes
2853                         cat >conftest.h <<EOF
2854 #define GCC_$cf_ATTRIBUTE 1
2855 EOF
2856                         ;;
2857                 scanf) #(vi
2858                         cf_scanf_attribute=yes
2859                         cat >conftest.h <<EOF
2860 #define GCC_$cf_ATTRIBUTE 1
2861 EOF
2862                         ;;
2863                 *) #(vi
2864                         cat >conftest.h <<EOF
2865 #define GCC_$cf_ATTRIBUTE $cf_directive
2866 EOF
2867                         ;;
2868                 esac
2869
2870                 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871   (eval $ac_compile) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); }; then
2875                         test -n "$verbose" && echo "$as_me:2875: result: ... $cf_attribute" >&5
2876 echo "${ECHO_T}... $cf_attribute" >&6
2877                         cat conftest.h >>confdefs.h
2878                         case $cf_attribute in #(vi
2879                         printf) #(vi
2880                                 if test "$cf_printf_attribute" = no ; then
2881                                         cat >>confdefs.h <<EOF
2882 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2883 EOF
2884                                 else
2885                                         cat >>confdefs.h <<EOF
2886 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2887 EOF
2888                                 fi
2889                                 ;;
2890                         scanf) #(vi
2891                                 if test "$cf_scanf_attribute" = no ; then
2892                                         cat >>confdefs.h <<EOF
2893 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2894 EOF
2895                                 else
2896                                         cat >>confdefs.h <<EOF
2897 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2898 EOF
2899                                 fi
2900                                 ;;
2901                         esac
2902                 fi
2903         done
2904 else
2905         fgrep define conftest.i >>confdefs.h
2906 fi
2907 rm -rf conftest*
2908 fi
2909
2910 cf_XOPEN_SOURCE=500
2911 cf_POSIX_C_SOURCE=199506L
2912 cf_xopen_source=
2913
2914 case $host_os in #(vi
2915 aix[4-7]*) #(vi
2916         cf_xopen_source="-D_ALL_SOURCE"
2917         ;;
2918 cygwin) #(vi
2919         cf_XOPEN_SOURCE=600
2920         ;;
2921 darwin[0-8].*) #(vi
2922         cf_xopen_source="-D_APPLE_C_SOURCE"
2923         ;;
2924 darwin*) #(vi
2925         cf_xopen_source="-D_DARWIN_C_SOURCE"
2926         cf_XOPEN_SOURCE=
2927         ;;
2928 freebsd*|dragonfly*) #(vi
2929         # 5.x headers associate
2930         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2931         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2932         cf_POSIX_C_SOURCE=200112L
2933         cf_XOPEN_SOURCE=600
2934         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2935         ;;
2936 hpux11*) #(vi
2937         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2938         ;;
2939 hpux*) #(vi
2940         cf_xopen_source="-D_HPUX_SOURCE"
2941         ;;
2942 irix[56].*) #(vi
2943         cf_xopen_source="-D_SGI_SOURCE"
2944         cf_XOPEN_SOURCE=
2945         ;;
2946 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2947
2948 echo "$as_me:2948: checking if we must define _GNU_SOURCE" >&5
2949 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2950 if test "${cf_cv_gnu_source+set}" = set; then
2951   echo $ECHO_N "(cached) $ECHO_C" >&6
2952 else
2953
2954 cat >conftest.$ac_ext <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <sys/types.h>
2958 int
2959 main ()
2960 {
2961
2962 #ifndef _XOPEN_SOURCE
2963 make an error
2964 #endif
2965   ;
2966   return 0;
2967 }
2968 _ACEOF
2969 rm -f conftest.$ac_objext
2970 if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5
2971   (eval $ac_compile) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); } &&
2975          { ac_try='test -s conftest.$ac_objext'
2976   { (eval echo "$as_me:2976: \"$ac_try\"") >&5
2977   (eval $ac_try) 2>&5
2978   ac_status=$?
2979   echo "$as_me:2979: \$? = $ac_status" >&5
2980   (exit $ac_status); }; }; then
2981   cf_cv_gnu_source=no
2982 else
2983   echo "$as_me: failed program was:" >&5
2984 cat conftest.$ac_ext >&5
2985 cf_save="$CPPFLAGS"
2986          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2987          cat >conftest.$ac_ext <<_ACEOF
2988 #line 2988 "configure"
2989 #include "confdefs.h"
2990 #include <sys/types.h>
2991 int
2992 main ()
2993 {
2994
2995 #ifdef _XOPEN_SOURCE
2996 make an error
2997 #endif
2998   ;
2999   return 0;
3000 }
3001 _ACEOF
3002 rm -f conftest.$ac_objext
3003 if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5
3004   (eval $ac_compile) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); } &&
3008          { ac_try='test -s conftest.$ac_objext'
3009   { (eval echo "$as_me:3009: \"$ac_try\"") >&5
3010   (eval $ac_try) 2>&5
3011   ac_status=$?
3012   echo "$as_me:3012: \$? = $ac_status" >&5
3013   (exit $ac_status); }; }; then
3014   cf_cv_gnu_source=no
3015 else
3016   echo "$as_me: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 cf_cv_gnu_source=yes
3019 fi
3020 rm -f conftest.$ac_objext conftest.$ac_ext
3021         CPPFLAGS="$cf_save"
3022
3023 fi
3024 rm -f conftest.$ac_objext conftest.$ac_ext
3025
3026 fi
3027 echo "$as_me:3027: result: $cf_cv_gnu_source" >&5
3028 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3029 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3030
3031         ;;
3032 mirbsd*) #(vi
3033         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3034         cf_XOPEN_SOURCE=
3035
3036 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3037
3038 cf_save_CFLAGS="$CFLAGS"
3039 cf_save_CPPFLAGS="$CPPFLAGS"
3040
3041 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3042         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3043                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3044
3045 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3046         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3047                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3048
3049 echo "$as_me:3049: checking if we should define _POSIX_C_SOURCE" >&5
3050 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3051 if test "${cf_cv_posix_c_source+set}" = set; then
3052   echo $ECHO_N "(cached) $ECHO_C" >&6
3053 else
3054
3055 echo "${as_me:-configure}:3055: testing if the symbol is already defined go no further ..." 1>&5
3056
3057         cat >conftest.$ac_ext <<_ACEOF
3058 #line 3058 "configure"
3059 #include "confdefs.h"
3060 #include <sys/types.h>
3061 int
3062 main ()
3063 {
3064
3065 #ifndef _POSIX_C_SOURCE
3066 make an error
3067 #endif
3068   ;
3069   return 0;
3070 }
3071 _ACEOF
3072 rm -f conftest.$ac_objext
3073 if { (eval echo "$as_me:3073: \"$ac_compile\"") >&5
3074   (eval $ac_compile) 2>&5
3075   ac_status=$?
3076   echo "$as_me:3076: \$? = $ac_status" >&5
3077   (exit $ac_status); } &&
3078          { ac_try='test -s conftest.$ac_objext'
3079   { (eval echo "$as_me:3079: \"$ac_try\"") >&5
3080   (eval $ac_try) 2>&5
3081   ac_status=$?
3082   echo "$as_me:3082: \$? = $ac_status" >&5
3083   (exit $ac_status); }; }; then
3084   cf_cv_posix_c_source=no
3085 else
3086   echo "$as_me: failed program was:" >&5
3087 cat conftest.$ac_ext >&5
3088 cf_want_posix_source=no
3089          case .$cf_POSIX_C_SOURCE in #(vi
3090          .[12]??*) #(vi
3091                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3092                 ;;
3093          .2) #(vi
3094                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3095                 cf_want_posix_source=yes
3096                 ;;
3097          .*)
3098                 cf_want_posix_source=yes
3099                 ;;
3100          esac
3101          if test "$cf_want_posix_source" = yes ; then
3102                 cat >conftest.$ac_ext <<_ACEOF
3103 #line 3103 "configure"
3104 #include "confdefs.h"
3105 #include <sys/types.h>
3106 int
3107 main ()
3108 {
3109
3110 #ifdef _POSIX_SOURCE
3111 make an error
3112 #endif
3113   ;
3114   return 0;
3115 }
3116 _ACEOF
3117 rm -f conftest.$ac_objext
3118 if { (eval echo "$as_me:3118: \"$ac_compile\"") >&5
3119   (eval $ac_compile) 2>&5
3120   ac_status=$?
3121   echo "$as_me:3121: \$? = $ac_status" >&5
3122   (exit $ac_status); } &&
3123          { ac_try='test -s conftest.$ac_objext'
3124   { (eval echo "$as_me:3124: \"$ac_try\"") >&5
3125   (eval $ac_try) 2>&5
3126   ac_status=$?
3127   echo "$as_me:3127: \$? = $ac_status" >&5
3128   (exit $ac_status); }; }; then
3129   :
3130 else
3131   echo "$as_me: failed program was:" >&5
3132 cat conftest.$ac_ext >&5
3133 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3134 fi
3135 rm -f conftest.$ac_objext conftest.$ac_ext
3136          fi
3137
3138 echo "${as_me:-configure}:3138: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3139
3140          CFLAGS="$cf_trim_CFLAGS"
3141          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3142
3143 echo "${as_me:-configure}:3143: testing if the second compile does not leave our definition intact error ..." 1>&5
3144
3145          cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148 #include <sys/types.h>
3149 int
3150 main ()
3151 {
3152
3153 #ifndef _POSIX_C_SOURCE
3154 make an error
3155 #endif
3156   ;
3157   return 0;
3158 }
3159 _ACEOF
3160 rm -f conftest.$ac_objext
3161 if { (eval echo "$as_me:3161: \"$ac_compile\"") >&5
3162   (eval $ac_compile) 2>&5
3163   ac_status=$?
3164   echo "$as_me:3164: \$? = $ac_status" >&5
3165   (exit $ac_status); } &&
3166          { ac_try='test -s conftest.$ac_objext'
3167   { (eval echo "$as_me:3167: \"$ac_try\"") >&5
3168   (eval $ac_try) 2>&5
3169   ac_status=$?
3170   echo "$as_me:3170: \$? = $ac_status" >&5
3171   (exit $ac_status); }; }; then
3172   :
3173 else
3174   echo "$as_me: failed program was:" >&5
3175 cat conftest.$ac_ext >&5
3176 cf_cv_posix_c_source=no
3177 fi
3178 rm -f conftest.$ac_objext conftest.$ac_ext
3179          CFLAGS="$cf_save_CFLAGS"
3180          CPPFLAGS="$cf_save_CPPFLAGS"
3181
3182 fi
3183 rm -f conftest.$ac_objext conftest.$ac_ext
3184
3185 fi
3186 echo "$as_me:3186: result: $cf_cv_posix_c_source" >&5
3187 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3188
3189 if test "$cf_cv_posix_c_source" != no ; then
3190         CFLAGS="$cf_trim_CFLAGS"
3191         CPPFLAGS="$cf_trim_CPPFLAGS"
3192
3193 cf_fix_cppflags=no
3194 cf_new_cflags=
3195 cf_new_cppflags=
3196 cf_new_extra_cppflags=
3197
3198 for cf_add_cflags in $cf_cv_posix_c_source
3199 do
3200 case $cf_fix_cppflags in
3201 no)
3202         case $cf_add_cflags in #(vi
3203         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3204                 case $cf_add_cflags in
3205                 -D*)
3206                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3207
3208                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3209                                 && test -z "${cf_tst_cflags}" \
3210                                 && cf_fix_cppflags=yes
3211
3212                         if test $cf_fix_cppflags = yes ; then
3213                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3214                                 continue
3215                         elif test "${cf_tst_cflags}" = "\"'" ; then
3216                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3217                                 continue
3218                         fi
3219                         ;;
3220                 esac
3221                 case "$CPPFLAGS" in
3222                 *$cf_add_cflags) #(vi
3223                         ;;
3224                 *) #(vi
3225                         case $cf_add_cflags in #(vi
3226                         -D*)
3227                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3228
3229 CPPFLAGS=`echo "$CPPFLAGS" | \
3230         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3231                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3232
3233                                 ;;
3234                         esac
3235                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3236                         ;;
3237                 esac
3238                 ;;
3239         *)
3240                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3241                 ;;
3242         esac
3243         ;;
3244 yes)
3245         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3246
3247         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3248
3249         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3250                 && test -z "${cf_tst_cflags}" \
3251                 && cf_fix_cppflags=no
3252         ;;
3253 esac
3254 done
3255
3256 if test -n "$cf_new_cflags" ; then
3257
3258         CFLAGS="$CFLAGS $cf_new_cflags"
3259 fi
3260
3261 if test -n "$cf_new_cppflags" ; then
3262
3263         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3264 fi
3265
3266 if test -n "$cf_new_extra_cppflags" ; then
3267
3268         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3269 fi
3270
3271 fi
3272
3273         ;;
3274 netbsd*) #(vi
3275         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3276         ;;
3277 openbsd[4-9]*) #(vi
3278         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3279         cf_xopen_source="-D_BSD_SOURCE"
3280         cf_XOPEN_SOURCE=600
3281         ;;
3282 openbsd*) #(vi
3283         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3284         ;;
3285 osf[45]*) #(vi
3286         cf_xopen_source="-D_OSF_SOURCE"
3287         ;;
3288 nto-qnx*) #(vi
3289         cf_xopen_source="-D_QNX_SOURCE"
3290         ;;
3291 sco*) #(vi
3292         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3293         ;;
3294 solaris2.*) #(vi
3295         cf_xopen_source="-D__EXTENSIONS__"
3296         ;;
3297 *)
3298
3299 echo "$as_me:3299: checking if we should define _XOPEN_SOURCE" >&5
3300 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3301 if test "${cf_cv_xopen_source+set}" = set; then
3302   echo $ECHO_N "(cached) $ECHO_C" >&6
3303 else
3304
3305         cat >conftest.$ac_ext <<_ACEOF
3306 #line 3306 "configure"
3307 #include "confdefs.h"
3308
3309 #include <stdlib.h>
3310 #include <string.h>
3311 #include <sys/types.h>
3312
3313 int
3314 main ()
3315 {
3316
3317 #ifndef _XOPEN_SOURCE
3318 make an error
3319 #endif
3320   ;
3321   return 0;
3322 }
3323 _ACEOF
3324 rm -f conftest.$ac_objext
3325 if { (eval echo "$as_me:3325: \"$ac_compile\"") >&5
3326   (eval $ac_compile) 2>&5
3327   ac_status=$?
3328   echo "$as_me:3328: \$? = $ac_status" >&5
3329   (exit $ac_status); } &&
3330          { ac_try='test -s conftest.$ac_objext'
3331   { (eval echo "$as_me:3331: \"$ac_try\"") >&5
3332   (eval $ac_try) 2>&5
3333   ac_status=$?
3334   echo "$as_me:3334: \$? = $ac_status" >&5
3335   (exit $ac_status); }; }; then
3336   cf_cv_xopen_source=no
3337 else
3338   echo "$as_me: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3340 cf_save="$CPPFLAGS"
3341          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3342          cat >conftest.$ac_ext <<_ACEOF
3343 #line 3343 "configure"
3344 #include "confdefs.h"
3345
3346 #include <stdlib.h>
3347 #include <string.h>
3348 #include <sys/types.h>
3349
3350 int
3351 main ()
3352 {
3353
3354 #ifdef _XOPEN_SOURCE
3355 make an error
3356 #endif
3357   ;
3358   return 0;
3359 }
3360 _ACEOF
3361 rm -f conftest.$ac_objext
3362 if { (eval echo "$as_me:3362: \"$ac_compile\"") >&5
3363   (eval $ac_compile) 2>&5
3364   ac_status=$?
3365   echo "$as_me:3365: \$? = $ac_status" >&5
3366   (exit $ac_status); } &&
3367          { ac_try='test -s conftest.$ac_objext'
3368   { (eval echo "$as_me:3368: \"$ac_try\"") >&5
3369   (eval $ac_try) 2>&5
3370   ac_status=$?
3371   echo "$as_me:3371: \$? = $ac_status" >&5
3372   (exit $ac_status); }; }; then
3373   cf_cv_xopen_source=no
3374 else
3375   echo "$as_me: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3377 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3378 fi
3379 rm -f conftest.$ac_objext conftest.$ac_ext
3380         CPPFLAGS="$cf_save"
3381
3382 fi
3383 rm -f conftest.$ac_objext conftest.$ac_ext
3384
3385 fi
3386 echo "$as_me:3386: result: $cf_cv_xopen_source" >&5
3387 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3388
3389 if test "$cf_cv_xopen_source" != no ; then
3390
3391 CFLAGS=`echo "$CFLAGS" | \
3392         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3393                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3394
3395 CPPFLAGS=`echo "$CPPFLAGS" | \
3396         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3397                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3398
3399         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3400
3401 cf_fix_cppflags=no
3402 cf_new_cflags=
3403 cf_new_cppflags=
3404 cf_new_extra_cppflags=
3405
3406 for cf_add_cflags in $cf_temp_xopen_source
3407 do
3408 case $cf_fix_cppflags in
3409 no)
3410         case $cf_add_cflags in #(vi
3411         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3412                 case $cf_add_cflags in
3413                 -D*)
3414                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3415
3416                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3417                                 && test -z "${cf_tst_cflags}" \
3418                                 && cf_fix_cppflags=yes
3419
3420                         if test $cf_fix_cppflags = yes ; then
3421                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3422                                 continue
3423                         elif test "${cf_tst_cflags}" = "\"'" ; then
3424                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3425                                 continue
3426                         fi
3427                         ;;
3428                 esac
3429                 case "$CPPFLAGS" in
3430                 *$cf_add_cflags) #(vi
3431                         ;;
3432                 *) #(vi
3433                         case $cf_add_cflags in #(vi
3434                         -D*)
3435                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3436
3437 CPPFLAGS=`echo "$CPPFLAGS" | \
3438         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3439                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3440
3441                                 ;;
3442                         esac
3443                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3444                         ;;
3445                 esac
3446                 ;;
3447         *)
3448                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3449                 ;;
3450         esac
3451         ;;
3452 yes)
3453         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3454
3455         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3456
3457         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3458                 && test -z "${cf_tst_cflags}" \
3459                 && cf_fix_cppflags=no
3460         ;;
3461 esac
3462 done
3463
3464 if test -n "$cf_new_cflags" ; then
3465
3466         CFLAGS="$CFLAGS $cf_new_cflags"
3467 fi
3468
3469 if test -n "$cf_new_cppflags" ; then
3470
3471         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3472 fi
3473
3474 if test -n "$cf_new_extra_cppflags" ; then
3475
3476         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3477 fi
3478
3479 fi
3480
3481 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3482
3483 cf_save_CFLAGS="$CFLAGS"
3484 cf_save_CPPFLAGS="$CPPFLAGS"
3485
3486 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3487         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3488                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3489
3490 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3491         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3492                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3493
3494 echo "$as_me:3494: checking if we should define _POSIX_C_SOURCE" >&5
3495 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3496 if test "${cf_cv_posix_c_source+set}" = set; then
3497   echo $ECHO_N "(cached) $ECHO_C" >&6
3498 else
3499
3500 echo "${as_me:-configure}:3500: testing if the symbol is already defined go no further ..." 1>&5
3501
3502         cat >conftest.$ac_ext <<_ACEOF
3503 #line 3503 "configure"
3504 #include "confdefs.h"
3505 #include <sys/types.h>
3506 int
3507 main ()
3508 {
3509
3510 #ifndef _POSIX_C_SOURCE
3511 make an error
3512 #endif
3513   ;
3514   return 0;
3515 }
3516 _ACEOF
3517 rm -f conftest.$ac_objext
3518 if { (eval echo "$as_me:3518: \"$ac_compile\"") >&5
3519   (eval $ac_compile) 2>&5
3520   ac_status=$?
3521   echo "$as_me:3521: \$? = $ac_status" >&5
3522   (exit $ac_status); } &&
3523          { ac_try='test -s conftest.$ac_objext'
3524   { (eval echo "$as_me:3524: \"$ac_try\"") >&5
3525   (eval $ac_try) 2>&5
3526   ac_status=$?
3527   echo "$as_me:3527: \$? = $ac_status" >&5
3528   (exit $ac_status); }; }; then
3529   cf_cv_posix_c_source=no
3530 else
3531   echo "$as_me: failed program was:" >&5
3532 cat conftest.$ac_ext >&5
3533 cf_want_posix_source=no
3534          case .$cf_POSIX_C_SOURCE in #(vi
3535          .[12]??*) #(vi
3536                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3537                 ;;
3538          .2) #(vi
3539                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3540                 cf_want_posix_source=yes
3541                 ;;
3542          .*)
3543                 cf_want_posix_source=yes
3544                 ;;
3545          esac
3546          if test "$cf_want_posix_source" = yes ; then
3547                 cat >conftest.$ac_ext <<_ACEOF
3548 #line 3548 "configure"
3549 #include "confdefs.h"
3550 #include <sys/types.h>
3551 int
3552 main ()
3553 {
3554
3555 #ifdef _POSIX_SOURCE
3556 make an error
3557 #endif
3558   ;
3559   return 0;
3560 }
3561 _ACEOF
3562 rm -f conftest.$ac_objext
3563 if { (eval echo "$as_me:3563: \"$ac_compile\"") >&5
3564   (eval $ac_compile) 2>&5
3565   ac_status=$?
3566   echo "$as_me:3566: \$? = $ac_status" >&5
3567   (exit $ac_status); } &&
3568          { ac_try='test -s conftest.$ac_objext'
3569   { (eval echo "$as_me:3569: \"$ac_try\"") >&5
3570   (eval $ac_try) 2>&5
3571   ac_status=$?
3572   echo "$as_me:3572: \$? = $ac_status" >&5
3573   (exit $ac_status); }; }; then
3574   :
3575 else
3576   echo "$as_me: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3579 fi
3580 rm -f conftest.$ac_objext conftest.$ac_ext
3581          fi
3582
3583 echo "${as_me:-configure}:3583: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3584
3585          CFLAGS="$cf_trim_CFLAGS"
3586          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3587
3588 echo "${as_me:-configure}:3588: testing if the second compile does not leave our definition intact error ..." 1>&5
3589
3590          cat >conftest.$ac_ext <<_ACEOF
3591 #line 3591 "configure"
3592 #include "confdefs.h"
3593 #include <sys/types.h>
3594 int
3595 main ()
3596 {
3597
3598 #ifndef _POSIX_C_SOURCE
3599 make an error
3600 #endif
3601   ;
3602   return 0;
3603 }
3604 _ACEOF
3605 rm -f conftest.$ac_objext
3606 if { (eval echo "$as_me:3606: \"$ac_compile\"") >&5
3607   (eval $ac_compile) 2>&5
3608   ac_status=$?
3609   echo "$as_me:3609: \$? = $ac_status" >&5
3610   (exit $ac_status); } &&
3611          { ac_try='test -s conftest.$ac_objext'
3612   { (eval echo "$as_me:3612: \"$ac_try\"") >&5
3613   (eval $ac_try) 2>&5
3614   ac_status=$?
3615   echo "$as_me:3615: \$? = $ac_status" >&5
3616   (exit $ac_status); }; }; then
3617   :
3618 else
3619   echo "$as_me: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
3621 cf_cv_posix_c_source=no
3622 fi
3623 rm -f conftest.$ac_objext conftest.$ac_ext
3624          CFLAGS="$cf_save_CFLAGS"
3625          CPPFLAGS="$cf_save_CPPFLAGS"
3626
3627 fi
3628 rm -f conftest.$ac_objext conftest.$ac_ext
3629
3630 fi
3631 echo "$as_me:3631: result: $cf_cv_posix_c_source" >&5
3632 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3633
3634 if test "$cf_cv_posix_c_source" != no ; then
3635         CFLAGS="$cf_trim_CFLAGS"
3636         CPPFLAGS="$cf_trim_CPPFLAGS"
3637
3638 cf_fix_cppflags=no
3639 cf_new_cflags=
3640 cf_new_cppflags=
3641 cf_new_extra_cppflags=
3642
3643 for cf_add_cflags in $cf_cv_posix_c_source
3644 do
3645 case $cf_fix_cppflags in
3646 no)
3647         case $cf_add_cflags in #(vi
3648         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3649                 case $cf_add_cflags in
3650                 -D*)
3651                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3652
3653                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3654                                 && test -z "${cf_tst_cflags}" \
3655                                 && cf_fix_cppflags=yes
3656
3657                         if test $cf_fix_cppflags = yes ; then
3658                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3659                                 continue
3660                         elif test "${cf_tst_cflags}" = "\"'" ; then
3661                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3662                                 continue
3663                         fi
3664                         ;;
3665                 esac
3666                 case "$CPPFLAGS" in
3667                 *$cf_add_cflags) #(vi
3668                         ;;
3669                 *) #(vi
3670                         case $cf_add_cflags in #(vi
3671                         -D*)
3672                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3673
3674 CPPFLAGS=`echo "$CPPFLAGS" | \
3675         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3676                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3677
3678                                 ;;
3679                         esac
3680                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3681                         ;;
3682                 esac
3683                 ;;
3684         *)
3685                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3686                 ;;
3687         esac
3688         ;;
3689 yes)
3690         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3691
3692         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3693
3694         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3695                 && test -z "${cf_tst_cflags}" \
3696                 && cf_fix_cppflags=no
3697         ;;
3698 esac
3699 done
3700
3701 if test -n "$cf_new_cflags" ; then
3702
3703         CFLAGS="$CFLAGS $cf_new_cflags"
3704 fi
3705
3706 if test -n "$cf_new_cppflags" ; then
3707
3708         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3709 fi
3710
3711 if test -n "$cf_new_extra_cppflags" ; then
3712
3713         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3714 fi
3715
3716 fi
3717
3718         ;;
3719 esac
3720
3721 if test -n "$cf_xopen_source" ; then
3722
3723 cf_fix_cppflags=no
3724 cf_new_cflags=
3725 cf_new_cppflags=
3726 cf_new_extra_cppflags=
3727
3728 for cf_add_cflags in $cf_xopen_source
3729 do
3730 case $cf_fix_cppflags in
3731 no)
3732         case $cf_add_cflags in #(vi
3733         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3734                 case $cf_add_cflags in
3735                 -D*)
3736                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3737
3738                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3739                                 && test -z "${cf_tst_cflags}" \
3740                                 && cf_fix_cppflags=yes
3741
3742                         if test $cf_fix_cppflags = yes ; then
3743                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3744                                 continue
3745                         elif test "${cf_tst_cflags}" = "\"'" ; then
3746                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3747                                 continue
3748                         fi
3749                         ;;
3750                 esac
3751                 case "$CPPFLAGS" in
3752                 *$cf_add_cflags) #(vi
3753                         ;;
3754                 *) #(vi
3755                         case $cf_add_cflags in #(vi
3756                         -D*)
3757                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3758
3759 CPPFLAGS=`echo "$CPPFLAGS" | \
3760         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3761                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3762
3763                                 ;;
3764                         esac
3765                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3766                         ;;
3767                 esac
3768                 ;;
3769         *)
3770                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3771                 ;;
3772         esac
3773         ;;
3774 yes)
3775         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3776
3777         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3778
3779         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3780                 && test -z "${cf_tst_cflags}" \
3781                 && cf_fix_cppflags=no
3782         ;;
3783 esac
3784 done
3785
3786 if test -n "$cf_new_cflags" ; then
3787
3788         CFLAGS="$CFLAGS $cf_new_cflags"
3789 fi
3790
3791 if test -n "$cf_new_cppflags" ; then
3792
3793         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3794 fi
3795
3796 if test -n "$cf_new_extra_cppflags" ; then
3797
3798         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3799 fi
3800
3801 fi
3802
3803 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3804         echo "$as_me:3804: checking if _XOPEN_SOURCE really is set" >&5
3805 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3806         cat >conftest.$ac_ext <<_ACEOF
3807 #line 3807 "configure"
3808 #include "confdefs.h"
3809 #include <stdlib.h>
3810 int
3811 main ()
3812 {
3813
3814 #ifndef _XOPEN_SOURCE
3815 make an error
3816 #endif
3817   ;
3818   return 0;
3819 }
3820 _ACEOF
3821 rm -f conftest.$ac_objext
3822 if { (eval echo "$as_me:3822: \"$ac_compile\"") >&5
3823   (eval $ac_compile) 2>&5
3824   ac_status=$?
3825   echo "$as_me:3825: \$? = $ac_status" >&5
3826   (exit $ac_status); } &&
3827          { ac_try='test -s conftest.$ac_objext'
3828   { (eval echo "$as_me:3828: \"$ac_try\"") >&5
3829   (eval $ac_try) 2>&5
3830   ac_status=$?
3831   echo "$as_me:3831: \$? = $ac_status" >&5
3832   (exit $ac_status); }; }; then
3833   cf_XOPEN_SOURCE_set=yes
3834 else
3835   echo "$as_me: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 cf_XOPEN_SOURCE_set=no
3838 fi
3839 rm -f conftest.$ac_objext conftest.$ac_ext
3840         echo "$as_me:3840: result: $cf_XOPEN_SOURCE_set" >&5
3841 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3842         if test $cf_XOPEN_SOURCE_set = yes
3843         then
3844                 cat >conftest.$ac_ext <<_ACEOF
3845 #line 3845 "configure"
3846 #include "confdefs.h"
3847 #include <stdlib.h>
3848 int
3849 main ()
3850 {
3851
3852 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3853 make an error
3854 #endif
3855   ;
3856   return 0;
3857 }
3858 _ACEOF
3859 rm -f conftest.$ac_objext
3860 if { (eval echo "$as_me:3860: \"$ac_compile\"") >&5
3861   (eval $ac_compile) 2>&5
3862   ac_status=$?
3863   echo "$as_me:3863: \$? = $ac_status" >&5
3864   (exit $ac_status); } &&
3865          { ac_try='test -s conftest.$ac_objext'
3866   { (eval echo "$as_me:3866: \"$ac_try\"") >&5
3867   (eval $ac_try) 2>&5
3868   ac_status=$?
3869   echo "$as_me:3869: \$? = $ac_status" >&5
3870   (exit $ac_status); }; }; then
3871   cf_XOPEN_SOURCE_set_ok=yes
3872 else
3873   echo "$as_me: failed program was:" >&5
3874 cat conftest.$ac_ext >&5
3875 cf_XOPEN_SOURCE_set_ok=no
3876 fi
3877 rm -f conftest.$ac_objext conftest.$ac_ext
3878                 if test $cf_XOPEN_SOURCE_set_ok = no
3879                 then
3880                         { echo "$as_me:3880: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3881 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3882                 fi
3883         else
3884
3885 echo "$as_me:3885: checking if we should define _XOPEN_SOURCE" >&5
3886 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3887 if test "${cf_cv_xopen_source+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890
3891         cat >conftest.$ac_ext <<_ACEOF
3892 #line 3892 "configure"
3893 #include "confdefs.h"
3894
3895 #include <stdlib.h>
3896 #include <string.h>
3897 #include <sys/types.h>
3898
3899 int
3900 main ()
3901 {
3902
3903 #ifndef _XOPEN_SOURCE
3904 make an error
3905 #endif
3906   ;
3907   return 0;
3908 }
3909 _ACEOF
3910 rm -f conftest.$ac_objext
3911 if { (eval echo "$as_me:3911: \"$ac_compile\"") >&5
3912   (eval $ac_compile) 2>&5
3913   ac_status=$?
3914   echo "$as_me:3914: \$? = $ac_status" >&5
3915   (exit $ac_status); } &&
3916          { ac_try='test -s conftest.$ac_objext'
3917   { (eval echo "$as_me:3917: \"$ac_try\"") >&5
3918   (eval $ac_try) 2>&5
3919   ac_status=$?
3920   echo "$as_me:3920: \$? = $ac_status" >&5
3921   (exit $ac_status); }; }; then
3922   cf_cv_xopen_source=no
3923 else
3924   echo "$as_me: failed program was:" >&5
3925 cat conftest.$ac_ext >&5
3926 cf_save="$CPPFLAGS"
3927          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3928          cat >conftest.$ac_ext <<_ACEOF
3929 #line 3929 "configure"
3930 #include "confdefs.h"
3931
3932 #include <stdlib.h>
3933 #include <string.h>
3934 #include <sys/types.h>
3935
3936 int
3937 main ()
3938 {
3939
3940 #ifdef _XOPEN_SOURCE
3941 make an error
3942 #endif
3943   ;
3944   return 0;
3945 }
3946 _ACEOF
3947 rm -f conftest.$ac_objext
3948 if { (eval echo "$as_me:3948: \"$ac_compile\"") >&5
3949   (eval $ac_compile) 2>&5
3950   ac_status=$?
3951   echo "$as_me:3951: \$? = $ac_status" >&5
3952   (exit $ac_status); } &&
3953          { ac_try='test -s conftest.$ac_objext'
3954   { (eval echo "$as_me:3954: \"$ac_try\"") >&5
3955   (eval $ac_try) 2>&5
3956   ac_status=$?
3957   echo "$as_me:3957: \$? = $ac_status" >&5
3958   (exit $ac_status); }; }; then
3959   cf_cv_xopen_source=no
3960 else
3961   echo "$as_me: failed program was:" >&5
3962 cat conftest.$ac_ext >&5
3963 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3964 fi
3965 rm -f conftest.$ac_objext conftest.$ac_ext
3966         CPPFLAGS="$cf_save"
3967
3968 fi
3969 rm -f conftest.$ac_objext conftest.$ac_ext
3970
3971 fi
3972 echo "$as_me:3972: result: $cf_cv_xopen_source" >&5
3973 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3974
3975 if test "$cf_cv_xopen_source" != no ; then
3976
3977 CFLAGS=`echo "$CFLAGS" | \
3978         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3979                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3980
3981 CPPFLAGS=`echo "$CPPFLAGS" | \
3982         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3983                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3984
3985         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3986
3987 cf_fix_cppflags=no
3988 cf_new_cflags=
3989 cf_new_cppflags=
3990 cf_new_extra_cppflags=
3991
3992 for cf_add_cflags in $cf_temp_xopen_source
3993 do
3994 case $cf_fix_cppflags in
3995 no)
3996         case $cf_add_cflags in #(vi
3997         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3998                 case $cf_add_cflags in
3999                 -D*)
4000                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4001
4002                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4003                                 && test -z "${cf_tst_cflags}" \
4004                                 && cf_fix_cppflags=yes
4005
4006                         if test $cf_fix_cppflags = yes ; then
4007                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4008                                 continue
4009                         elif test "${cf_tst_cflags}" = "\"'" ; then
4010                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4011                                 continue
4012                         fi
4013                         ;;
4014                 esac
4015                 case "$CPPFLAGS" in
4016                 *$cf_add_cflags) #(vi
4017                         ;;
4018                 *) #(vi
4019                         case $cf_add_cflags in #(vi
4020                         -D*)
4021                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4022
4023 CPPFLAGS=`echo "$CPPFLAGS" | \
4024         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4025                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4026
4027                                 ;;
4028                         esac
4029                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4030                         ;;
4031                 esac
4032                 ;;
4033         *)
4034                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4035                 ;;
4036         esac
4037         ;;
4038 yes)
4039         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4040
4041         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4042
4043         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4044                 && test -z "${cf_tst_cflags}" \
4045                 && cf_fix_cppflags=no
4046         ;;
4047 esac
4048 done
4049
4050 if test -n "$cf_new_cflags" ; then
4051
4052         CFLAGS="$CFLAGS $cf_new_cflags"
4053 fi
4054
4055 if test -n "$cf_new_cppflags" ; then
4056
4057         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4058 fi
4059
4060 if test -n "$cf_new_extra_cppflags" ; then
4061
4062         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4063 fi
4064
4065 fi
4066
4067         fi
4068 fi
4069
4070 echo "$as_me:4070: checking for $CC option to accept ANSI C" >&5
4071 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4072 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4073   echo $ECHO_N "(cached) $ECHO_C" >&6
4074 else
4075   ac_cv_prog_cc_stdc=no
4076 ac_save_CC=$CC
4077 cat >conftest.$ac_ext <<_ACEOF
4078 #line 4078 "configure"
4079 #include "confdefs.h"
4080 #include <stdarg.h>
4081 #include <stdio.h>
4082 #include <sys/types.h>
4083 #include <sys/stat.h>
4084 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4085 struct buf { int x; };
4086 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4087 static char *e (p, i)
4088      char **p;
4089      int i;
4090 {
4091   return p[i];
4092 }
4093 static char *f (char * (*g) (char **, int), char **p, ...)
4094 {
4095   char *s;
4096   va_list v;
4097   va_start (v,p);
4098   s = g (p, va_arg (v,int));
4099   va_end (v);
4100   return s;
4101 }
4102 int test (int i, double x);
4103 struct s1 {int (*f) (int a);};
4104 struct s2 {int (*f) (double a);};
4105 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4106 int argc;
4107 char **argv;
4108 int
4109 main ()
4110 {
4111 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4112   ;
4113   return 0;
4114 }
4115 _ACEOF
4116 # Don't try gcc -ansi; that turns off useful extensions and
4117 # breaks some systems' header files.
4118 # AIX                   -qlanglvl=ansi
4119 # Ultrix and OSF/1      -std1
4120 # HP-UX 10.20 and later -Ae
4121 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4122 # SVR4                  -Xc -D__EXTENSIONS__
4123 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4124 do
4125   CC="$ac_save_CC $ac_arg"
4126   rm -f conftest.$ac_objext
4127 if { (eval echo "$as_me:4127: \"$ac_compile\"") >&5
4128   (eval $ac_compile) 2>&5
4129   ac_status=$?
4130   echo "$as_me:4130: \$? = $ac_status" >&5
4131   (exit $ac_status); } &&
4132          { ac_try='test -s conftest.$ac_objext'
4133   { (eval echo "$as_me:4133: \"$ac_try\"") >&5
4134   (eval $ac_try) 2>&5
4135   ac_status=$?
4136   echo "$as_me:4136: \$? = $ac_status" >&5
4137   (exit $ac_status); }; }; then
4138   ac_cv_prog_cc_stdc=$ac_arg
4139 break
4140 else
4141   echo "$as_me: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143 fi
4144 rm -f conftest.$ac_objext
4145 done
4146 rm -f conftest.$ac_ext conftest.$ac_objext
4147 CC=$ac_save_CC
4148
4149 fi
4150
4151 case "x$ac_cv_prog_cc_stdc" in
4152   x|xno)
4153     echo "$as_me:4153: result: none needed" >&5
4154 echo "${ECHO_T}none needed" >&6 ;;
4155   *)
4156     echo "$as_me:4156: result: $ac_cv_prog_cc_stdc" >&5
4157 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4158     CC="$CC $ac_cv_prog_cc_stdc" ;;
4159 esac
4160
4161 echo "$as_me:4161: checking for an ANSI C-conforming const" >&5
4162 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4163 if test "${ac_cv_c_const+set}" = set; then
4164   echo $ECHO_N "(cached) $ECHO_C" >&6
4165 else
4166   cat >conftest.$ac_ext <<_ACEOF
4167 #line 4167 "configure"
4168 #include "confdefs.h"
4169
4170 int
4171 main ()
4172 {
4173 /* FIXME: Include the comments suggested by Paul. */
4174 #ifndef __cplusplus
4175   /* Ultrix mips cc rejects this.  */
4176   typedef int charset[2];
4177   const charset x;
4178   /* SunOS 4.1.1 cc rejects this.  */
4179   char const *const *ccp;
4180   char **p;
4181   /* NEC SVR4.0.2 mips cc rejects this.  */
4182   struct point {int x, y;};
4183   static struct point const zero = {0,0};
4184   /* AIX XL C 1.02.0.0 rejects this.
4185      It does not let you subtract one const X* pointer from another in
4186      an arm of an if-expression whose if-part is not a constant
4187      expression */
4188   const char *g = "string";
4189   ccp = &g + (g ? g-g : 0);
4190   /* HPUX 7.0 cc rejects these. */
4191   ++ccp;
4192   p = (char**) ccp;
4193   ccp = (char const *const *) p;
4194   { /* SCO 3.2v4 cc rejects this.  */
4195     char *t;
4196     char const *s = 0 ? (char *) 0 : (char const *) 0;
4197
4198     *t++ = 0;
4199   }
4200   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4201     int x[] = {25, 17};
4202     const int *foo = &x[0];
4203     ++foo;
4204   }
4205   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4206     typedef const int *iptr;
4207     iptr p = 0;
4208     ++p;
4209   }
4210   { /* AIX XL C 1.02.0.0 rejects this saying
4211        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4212     struct s { int j; const int *ap[3]; };
4213     struct s *b; b->j = 5;
4214   }
4215   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4216     const int foo = 10;
4217   }
4218 #endif
4219
4220   ;
4221   return 0;
4222 }
4223 _ACEOF
4224 rm -f conftest.$ac_objext
4225 if { (eval echo "$as_me:4225: \"$ac_compile\"") >&5
4226   (eval $ac_compile) 2>&5
4227   ac_status=$?
4228   echo "$as_me:4228: \$? = $ac_status" >&5
4229   (exit $ac_status); } &&
4230          { ac_try='test -s conftest.$ac_objext'
4231   { (eval echo "$as_me:4231: \"$ac_try\"") >&5
4232   (eval $ac_try) 2>&5
4233   ac_status=$?
4234   echo "$as_me:4234: \$? = $ac_status" >&5
4235   (exit $ac_status); }; }; then
4236   ac_cv_c_const=yes
4237 else
4238   echo "$as_me: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4240 ac_cv_c_const=no
4241 fi
4242 rm -f conftest.$ac_objext conftest.$ac_ext
4243 fi
4244 echo "$as_me:4244: result: $ac_cv_c_const" >&5
4245 echo "${ECHO_T}$ac_cv_c_const" >&6
4246 if test $ac_cv_c_const = no; then
4247
4248 cat >>confdefs.h <<\EOF
4249 #define const
4250 EOF
4251
4252 fi
4253
4254 echo "$as_me:4254: checking for signal global datatype" >&5
4255 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4256 if test "${cf_cv_sig_atomic_t+set}" = set; then
4257   echo $ECHO_N "(cached) $ECHO_C" >&6
4258 else
4259
4260         for cf_type in \
4261                 "volatile sig_atomic_t" \
4262                 "sig_atomic_t" \
4263                 "int"
4264         do
4265         cat >conftest.$ac_ext <<_ACEOF
4266 #line 4266 "configure"
4267 #include "confdefs.h"
4268
4269 #include <sys/types.h>
4270 #include <signal.h>
4271 #include <stdio.h>
4272
4273 extern $cf_type x;
4274 $cf_type x;
4275 static void handler(int sig)
4276 {
4277         x = 5;
4278 }
4279 int
4280 main ()
4281 {
4282 signal(SIGINT, handler);
4283                  x = 1
4284   ;
4285   return 0;
4286 }
4287 _ACEOF
4288 rm -f conftest.$ac_objext
4289 if { (eval echo "$as_me:4289: \"$ac_compile\"") >&5
4290   (eval $ac_compile) 2>&5
4291   ac_status=$?
4292   echo "$as_me:4292: \$? = $ac_status" >&5
4293   (exit $ac_status); } &&
4294          { ac_try='test -s conftest.$ac_objext'
4295   { (eval echo "$as_me:4295: \"$ac_try\"") >&5
4296   (eval $ac_try) 2>&5
4297   ac_status=$?
4298   echo "$as_me:4298: \$? = $ac_status" >&5
4299   (exit $ac_status); }; }; then
4300   cf_cv_sig_atomic_t=$cf_type
4301 else
4302   echo "$as_me: failed program was:" >&5
4303 cat conftest.$ac_ext >&5
4304 cf_cv_sig_atomic_t=no
4305 fi
4306 rm -f conftest.$ac_objext conftest.$ac_ext
4307                 test "$cf_cv_sig_atomic_t" != no && break
4308         done
4309
4310 fi
4311
4312 echo "$as_me:4312: result: $cf_cv_sig_atomic_t" >&5
4313 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4314 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
4315 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4316 EOF
4317
4318 echo "$as_me:4318: checking if you want to see long compiling messages" >&5
4319 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4320
4321 # Check whether --enable-echo or --disable-echo was given.
4322 if test "${enable_echo+set}" = set; then
4323   enableval="$enable_echo"
4324   test "$enableval" != no && enableval=yes
4325   if test "$enableval" != "yes" ; then
4326
4327     ECHO_LT='--silent'
4328     ECHO_LD='@echo linking $@;'
4329     RULE_CC='@echo compiling $<'
4330     SHOW_CC='@echo compiling $@'
4331     ECHO_CC='@'
4332
4333   else
4334
4335     ECHO_LT=''
4336     ECHO_LD=''
4337     RULE_CC=''
4338     SHOW_CC=''
4339     ECHO_CC=''
4340
4341   fi
4342 else
4343   enableval=yes
4344
4345     ECHO_LT=''
4346     ECHO_LD=''
4347     RULE_CC=''
4348     SHOW_CC=''
4349     ECHO_CC=''
4350
4351 fi;
4352 echo "$as_me:4352: result: $enableval" >&5
4353 echo "${ECHO_T}$enableval" >&6
4354
4355 GCC_VERSION=none
4356 if test "$GCC" = yes ; then
4357         echo "$as_me:4357: checking version of $CC" >&5
4358 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
4359         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
4360         test -z "$GCC_VERSION" && GCC_VERSION=unknown
4361         echo "$as_me:4361: result: $GCC_VERSION" >&5
4362 echo "${ECHO_T}$GCC_VERSION" >&6
4363 fi
4364
4365 if ( test "$GCC" = yes || test "$GXX" = yes )
4366 then
4367 echo "$as_me:4367: checking if you want to turn on gcc warnings" >&5
4368 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
4369
4370 # Check whether --enable-warnings or --disable-warnings was given.
4371 if test "${enable_warnings+set}" = set; then
4372   enableval="$enable_warnings"
4373   test "$enableval" != yes && enableval=no
4374   if test "$enableval" != "no" ; then
4375     with_warnings=yes
4376   else
4377     with_warnings=no
4378   fi
4379 else
4380   enableval=no
4381   with_warnings=no
4382
4383 fi;
4384 echo "$as_me:4384: result: $with_warnings" >&5
4385 echo "${ECHO_T}$with_warnings" >&6
4386 if test "$with_warnings" = "yes"
4387 then
4388
4389 if test "$GCC" = yes
4390 then
4391 cat > conftest.i <<EOF
4392 #ifndef GCC_PRINTF
4393 #define GCC_PRINTF 0
4394 #endif
4395 #ifndef GCC_SCANF
4396 #define GCC_SCANF 0
4397 #endif
4398 #ifndef GCC_NORETURN
4399 #define GCC_NORETURN /* nothing */
4400 #endif
4401 #ifndef GCC_UNUSED
4402 #define GCC_UNUSED /* nothing */
4403 #endif
4404 EOF
4405 if test "$GCC" = yes
4406 then
4407         { echo "$as_me:4407: checking for $CC __attribute__ directives..." >&5
4408 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4410 "${as_me:-configure}"
4411 #include "confdefs.h"
4412 #include "conftest.h"
4413 #include "conftest.i"
4414 #if     GCC_PRINTF
4415 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4416 #else
4417 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4418 #endif
4419 #if     GCC_SCANF
4420 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4421 #else
4422 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
4423 #endif
4424 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4425 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4426 extern void foo(void) GCC_NORETURN;
4427 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4428 EOF
4429         cf_printf_attribute=no
4430         cf_scanf_attribute=no
4431         for cf_attribute in scanf printf unused noreturn
4432         do
4433
4434 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4435
4436                 cf_directive="__attribute__(($cf_attribute))"
4437                 echo "checking for $CC $cf_directive" 1>&5
4438
4439                 case $cf_attribute in #(vi
4440                 printf) #(vi
4441                         cf_printf_attribute=yes
4442                         cat >conftest.h <<EOF
4443 #define GCC_$cf_ATTRIBUTE 1
4444 EOF
4445                         ;;
4446                 scanf) #(vi
4447                         cf_scanf_attribute=yes
4448                         cat >conftest.h <<EOF
4449 #define GCC_$cf_ATTRIBUTE 1
4450 EOF
4451                         ;;
4452                 *) #(vi
4453                         cat >conftest.h <<EOF
4454 #define GCC_$cf_ATTRIBUTE $cf_directive
4455 EOF
4456                         ;;
4457                 esac
4458
4459                 if { (eval echo "$as_me:4459: \"$ac_compile\"") >&5
4460   (eval $ac_compile) 2>&5
4461   ac_status=$?
4462   echo "$as_me:4462: \$? = $ac_status" >&5
4463   (exit $ac_status); }; then
4464                         test -n "$verbose" && echo "$as_me:4464: result: ... $cf_attribute" >&5
4465 echo "${ECHO_T}... $cf_attribute" >&6
4466                         cat conftest.h >>confdefs.h
4467                         case $cf_attribute in #(vi
4468                         printf) #(vi
4469                                 if test "$cf_printf_attribute" = no ; then
4470                                         cat >>confdefs.h <<EOF
4471 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
4472 EOF
4473                                 else
4474                                         cat >>confdefs.h <<EOF
4475 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4476 EOF
4477                                 fi
4478                                 ;;
4479                         scanf) #(vi
4480                                 if test "$cf_scanf_attribute" = no ; then
4481                                         cat >>confdefs.h <<EOF
4482 #define GCC_SCANFLIKE(fmt,var) /* nothing */
4483 EOF
4484                                 else
4485                                         cat >>confdefs.h <<EOF
4486 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4487 EOF
4488                                 fi
4489                                 ;;
4490                         esac
4491                 fi
4492         done
4493 else
4494         fgrep define conftest.i >>confdefs.h
4495 fi
4496 rm -rf conftest*
4497 fi
4498
4499 INTEL_COMPILER=no
4500
4501 if test "$GCC" = yes ; then
4502         case $host_os in
4503         linux*|gnu*)
4504                 echo "$as_me:4504: checking if this is really Intel C compiler" >&5
4505 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4506                 cf_save_CFLAGS="$CFLAGS"
4507                 CFLAGS="$CFLAGS -no-gcc"
4508                 cat >conftest.$ac_ext <<_ACEOF
4509 #line 4509 "configure"
4510 #include "confdefs.h"
4511
4512 int
4513 main ()
4514 {
4515
4516 #ifdef __INTEL_COMPILER
4517 #else
4518 make an error
4519 #endif
4520
4521   ;
4522   return 0;
4523 }
4524 _ACEOF
4525 rm -f conftest.$ac_objext
4526 if { (eval echo "$as_me:4526: \"$ac_compile\"") >&5
4527   (eval $ac_compile) 2>&5
4528   ac_status=$?
4529   echo "$as_me:4529: \$? = $ac_status" >&5
4530   (exit $ac_status); } &&
4531          { ac_try='test -s conftest.$ac_objext'
4532   { (eval echo "$as_me:4532: \"$ac_try\"") >&5
4533   (eval $ac_try) 2>&5
4534   ac_status=$?
4535   echo "$as_me:4535: \$? = $ac_status" >&5
4536   (exit $ac_status); }; }; then
4537   INTEL_COMPILER=yes
4538 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4539
4540 else
4541   echo "$as_me: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4543 fi
4544 rm -f conftest.$ac_objext conftest.$ac_ext
4545                 CFLAGS="$cf_save_CFLAGS"
4546                 echo "$as_me:4546: result: $INTEL_COMPILER" >&5
4547 echo "${ECHO_T}$INTEL_COMPILER" >&6
4548                 ;;
4549         esac
4550 fi
4551
4552 cat > conftest.$ac_ext <<EOF
4553 #line 4553 "${as_me:-configure}"
4554 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4555 EOF
4556
4557 if test "$INTEL_COMPILER" = yes
4558 then
4559 # The "-wdXXX" options suppress warnings:
4560 # remark #1419: external declaration in primary source file
4561 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4562 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4563 # remark #193: zero used for undefined preprocessing identifier
4564 # remark #593: variable "curs_sb_left_arrow" was set but never used
4565 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4566 # remark #869: parameter "tw" was never referenced
4567 # remark #981: operands are evaluated in unspecified order
4568 # warning #279: controlling expression is constant
4569
4570         { echo "$as_me:4570: checking for $CC warning options..." >&5
4571 echo "$as_me: checking for $CC warning options..." >&6;}
4572         cf_save_CFLAGS="$CFLAGS"
4573         EXTRA_CFLAGS="-Wall"
4574         for cf_opt in \
4575                 wd1419 \
4576                 wd1683 \
4577                 wd1684 \
4578                 wd193 \
4579                 wd593 \
4580                 wd279 \
4581                 wd810 \
4582                 wd869 \
4583                 wd981
4584         do
4585                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4586                 if { (eval echo "$as_me:4586: \"$ac_compile\"") >&5
4587   (eval $ac_compile) 2>&5
4588   ac_status=$?
4589   echo "$as_me:4589: \$? = $ac_status" >&5
4590   (exit $ac_status); }; then
4591                         test -n "$verbose" && echo "$as_me:4591: result: ... -$cf_opt" >&5
4592 echo "${ECHO_T}... -$cf_opt" >&6
4593                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4594                 fi
4595         done
4596         CFLAGS="$cf_save_CFLAGS"
4597
4598 elif test "$GCC" = yes
4599 then
4600         { echo "$as_me:4600: checking for $CC warning options..." >&5
4601 echo "$as_me: checking for $CC warning options..." >&6;}
4602         cf_save_CFLAGS="$CFLAGS"
4603         EXTRA_CFLAGS=
4604         cf_warn_CONST=""
4605         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4606         for cf_opt in W Wall \
4607                 Wbad-function-cast \
4608                 Wcast-align \
4609                 Wcast-qual \
4610                 Winline \
4611                 Wmissing-declarations \
4612                 Wmissing-prototypes \
4613                 Wnested-externs \
4614                 Wpointer-arith \
4615                 Wshadow \
4616                 Wstrict-prototypes \
4617                 Wundef $cf_warn_CONST
4618         do
4619                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4620                 if { (eval echo "$as_me:4620: \"$ac_compile\"") >&5
4621   (eval $ac_compile) 2>&5
4622   ac_status=$?
4623   echo "$as_me:4623: \$? = $ac_status" >&5
4624   (exit $ac_status); }; then
4625                         test -n "$verbose" && echo "$as_me:4625: result: ... -$cf_opt" >&5
4626 echo "${ECHO_T}... -$cf_opt" >&6
4627                         case $cf_opt in #(vi
4628                         Wcast-qual) #(vi
4629                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4630                                 ;;
4631                         Winline) #(vi
4632                                 case $GCC_VERSION in
4633                                 [34].*)
4634                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4635
4636 echo "${as_me:-configure}:4636: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4637
4638                                         continue;;
4639                                 esac
4640                                 ;;
4641                         esac
4642                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4643                 fi
4644         done
4645         CFLAGS="$cf_save_CFLAGS"
4646 fi
4647 rm -rf conftest*
4648
4649 fi
4650 fi
4651
4652 echo "$as_me:4652: checking if you want to use dmalloc for testing" >&5
4653 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4654
4655 # Check whether --with-dmalloc or --without-dmalloc was given.
4656 if test "${with_dmalloc+set}" = set; then
4657   withval="$with_dmalloc"
4658   cat >>confdefs.h <<\EOF
4659 #define USE_DMALLOC 1
4660 EOF
4661
4662         : ${with_cflags:=-g}
4663         : ${with_no_leaks:=yes}
4664          with_dmalloc=yes
4665 else
4666   with_dmalloc=
4667 fi;
4668 echo "$as_me:4668: result: ${with_dmalloc:-no}" >&5
4669 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4670
4671 case .$with_cflags in #(vi
4672 .*-g*)
4673         case .$CFLAGS in #(vi
4674         .*-g*) #(vi
4675                 ;;
4676         *)
4677
4678 cf_fix_cppflags=no
4679 cf_new_cflags=
4680 cf_new_cppflags=
4681 cf_new_extra_cppflags=
4682
4683 for cf_add_cflags in -g
4684 do
4685 case $cf_fix_cppflags in
4686 no)
4687         case $cf_add_cflags in #(vi
4688         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4689                 case $cf_add_cflags in
4690                 -D*)
4691                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4692
4693                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4694                                 && test -z "${cf_tst_cflags}" \
4695                                 && cf_fix_cppflags=yes
4696
4697                         if test $cf_fix_cppflags = yes ; then
4698                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4699                                 continue
4700                         elif test "${cf_tst_cflags}" = "\"'" ; then
4701                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4702                                 continue
4703                         fi
4704                         ;;
4705                 esac
4706                 case "$CPPFLAGS" in
4707                 *$cf_add_cflags) #(vi
4708                         ;;
4709                 *) #(vi
4710                         case $cf_add_cflags in #(vi
4711                         -D*)
4712                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4713
4714 CPPFLAGS=`echo "$CPPFLAGS" | \
4715         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4716                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4717
4718                                 ;;
4719                         esac
4720                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4721                         ;;
4722                 esac
4723                 ;;
4724         *)
4725                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4726                 ;;
4727         esac
4728         ;;
4729 yes)
4730         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4731
4732         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4733
4734         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4735                 && test -z "${cf_tst_cflags}" \
4736                 && cf_fix_cppflags=no
4737         ;;
4738 esac
4739 done
4740
4741 if test -n "$cf_new_cflags" ; then
4742
4743         CFLAGS="$CFLAGS $cf_new_cflags"
4744 fi
4745
4746 if test -n "$cf_new_cppflags" ; then
4747
4748         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4749 fi
4750
4751 if test -n "$cf_new_extra_cppflags" ; then
4752
4753         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4754 fi
4755
4756                 ;;
4757         esac
4758         ;;
4759 esac
4760
4761 if test "$with_dmalloc" = yes ; then
4762         echo "$as_me:4762: checking for dmalloc.h" >&5
4763 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4764 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4765   echo $ECHO_N "(cached) $ECHO_C" >&6
4766 else
4767   cat >conftest.$ac_ext <<_ACEOF
4768 #line 4768 "configure"
4769 #include "confdefs.h"
4770 #include <dmalloc.h>
4771 _ACEOF
4772 if { (eval echo "$as_me:4772: \"$ac_cpp conftest.$ac_ext\"") >&5
4773   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4774   ac_status=$?
4775   egrep -v '^ *\+' conftest.er1 >conftest.err
4776   rm -f conftest.er1
4777   cat conftest.err >&5
4778   echo "$as_me:4778: \$? = $ac_status" >&5
4779   (exit $ac_status); } >/dev/null; then
4780   if test -s conftest.err; then
4781     ac_cpp_err=$ac_c_preproc_warn_flag
4782   else
4783     ac_cpp_err=
4784   fi
4785 else
4786   ac_cpp_err=yes
4787 fi
4788 if test -z "$ac_cpp_err"; then
4789   ac_cv_header_dmalloc_h=yes
4790 else
4791   echo "$as_me: failed program was:" >&5
4792   cat conftest.$ac_ext >&5
4793   ac_cv_header_dmalloc_h=no
4794 fi
4795 rm -f conftest.err conftest.$ac_ext
4796 fi
4797 echo "$as_me:4797: result: $ac_cv_header_dmalloc_h" >&5
4798 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4799 if test $ac_cv_header_dmalloc_h = yes; then
4800
4801 echo "$as_me:4801: checking for dmalloc_debug in -ldmalloc" >&5
4802 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4803 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4804   echo $ECHO_N "(cached) $ECHO_C" >&6
4805 else
4806   ac_check_lib_save_LIBS=$LIBS
4807 LIBS="-ldmalloc  $LIBS"
4808 cat >conftest.$ac_ext <<_ACEOF
4809 #line 4809 "configure"
4810 #include "confdefs.h"
4811
4812 /* Override any gcc2 internal prototype to avoid an error.  */
4813 #ifdef __cplusplus
4814 extern "C"
4815 #endif
4816 /* We use char because int might match the return type of a gcc2
4817    builtin and then its argument prototype would still apply.  */
4818 char dmalloc_debug ();
4819 int
4820 main ()
4821 {
4822 dmalloc_debug ();
4823   ;
4824   return 0;
4825 }
4826 _ACEOF
4827 rm -f conftest.$ac_objext conftest$ac_exeext
4828 if { (eval echo "$as_me:4828: \"$ac_link\"") >&5
4829   (eval $ac_link) 2>&5
4830   ac_status=$?
4831   echo "$as_me:4831: \$? = $ac_status" >&5
4832   (exit $ac_status); } &&
4833          { ac_try='test -s conftest$ac_exeext'
4834   { (eval echo "$as_me:4834: \"$ac_try\"") >&5
4835   (eval $ac_try) 2>&5
4836   ac_status=$?
4837   echo "$as_me:4837: \$? = $ac_status" >&5
4838   (exit $ac_status); }; }; then
4839   ac_cv_lib_dmalloc_dmalloc_debug=yes
4840 else
4841   echo "$as_me: failed program was:" >&5
4842 cat conftest.$ac_ext >&5
4843 ac_cv_lib_dmalloc_dmalloc_debug=no
4844 fi
4845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4846 LIBS=$ac_check_lib_save_LIBS
4847 fi
4848 echo "$as_me:4848: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4849 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4850 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4851   cat >>confdefs.h <<EOF
4852 #define HAVE_LIBDMALLOC 1
4853 EOF
4854
4855   LIBS="-ldmalloc $LIBS"
4856
4857 fi
4858
4859 fi
4860
4861 fi
4862
4863 echo "$as_me:4863: checking if you want to use dbmalloc for testing" >&5
4864 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4865
4866 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4867 if test "${with_dbmalloc+set}" = set; then
4868   withval="$with_dbmalloc"
4869   cat >>confdefs.h <<\EOF
4870 #define USE_DBMALLOC 1
4871 EOF
4872
4873         : ${with_cflags:=-g}
4874         : ${with_no_leaks:=yes}
4875          with_dbmalloc=yes
4876 else
4877   with_dbmalloc=
4878 fi;
4879 echo "$as_me:4879: result: ${with_dbmalloc:-no}" >&5
4880 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4881
4882 case .$with_cflags in #(vi
4883 .*-g*)
4884         case .$CFLAGS in #(vi
4885         .*-g*) #(vi
4886                 ;;
4887         *)
4888
4889 cf_fix_cppflags=no
4890 cf_new_cflags=
4891 cf_new_cppflags=
4892 cf_new_extra_cppflags=
4893
4894 for cf_add_cflags in -g
4895 do
4896 case $cf_fix_cppflags in
4897 no)
4898         case $cf_add_cflags in #(vi
4899         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4900                 case $cf_add_cflags in
4901                 -D*)
4902                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4903
4904                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4905                                 && test -z "${cf_tst_cflags}" \
4906                                 && cf_fix_cppflags=yes
4907
4908                         if test $cf_fix_cppflags = yes ; then
4909                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4910                                 continue
4911                         elif test "${cf_tst_cflags}" = "\"'" ; then
4912                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4913                                 continue
4914                         fi
4915                         ;;
4916                 esac
4917                 case "$CPPFLAGS" in
4918                 *$cf_add_cflags) #(vi
4919                         ;;
4920                 *) #(vi
4921                         case $cf_add_cflags in #(vi
4922                         -D*)
4923                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4924
4925 CPPFLAGS=`echo "$CPPFLAGS" | \
4926         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4927                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4928
4929                                 ;;
4930                         esac
4931                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4932                         ;;
4933                 esac
4934                 ;;
4935         *)
4936                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4937                 ;;
4938         esac
4939         ;;
4940 yes)
4941         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4942
4943         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4944
4945         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4946                 && test -z "${cf_tst_cflags}" \
4947                 && cf_fix_cppflags=no
4948         ;;
4949 esac
4950 done
4951
4952 if test -n "$cf_new_cflags" ; then
4953
4954         CFLAGS="$CFLAGS $cf_new_cflags"
4955 fi
4956
4957 if test -n "$cf_new_cppflags" ; then
4958
4959         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4960 fi
4961
4962 if test -n "$cf_new_extra_cppflags" ; then
4963
4964         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4965 fi
4966
4967                 ;;
4968         esac
4969         ;;
4970 esac
4971
4972 if test "$with_dbmalloc" = yes ; then
4973         echo "$as_me:4973: checking for dbmalloc.h" >&5
4974 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4975 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4976   echo $ECHO_N "(cached) $ECHO_C" >&6
4977 else
4978   cat >conftest.$ac_ext <<_ACEOF
4979 #line 4979 "configure"
4980 #include "confdefs.h"
4981 #include <dbmalloc.h>
4982 _ACEOF
4983 if { (eval echo "$as_me:4983: \"$ac_cpp conftest.$ac_ext\"") >&5
4984   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4985   ac_status=$?
4986   egrep -v '^ *\+' conftest.er1 >conftest.err
4987   rm -f conftest.er1
4988   cat conftest.err >&5
4989   echo "$as_me:4989: \$? = $ac_status" >&5
4990   (exit $ac_status); } >/dev/null; then
4991   if test -s conftest.err; then
4992     ac_cpp_err=$ac_c_preproc_warn_flag
4993   else
4994     ac_cpp_err=
4995   fi
4996 else
4997   ac_cpp_err=yes
4998 fi
4999 if test -z "$ac_cpp_err"; then
5000   ac_cv_header_dbmalloc_h=yes
5001 else
5002   echo "$as_me: failed program was:" >&5
5003   cat conftest.$ac_ext >&5
5004   ac_cv_header_dbmalloc_h=no
5005 fi
5006 rm -f conftest.err conftest.$ac_ext
5007 fi
5008 echo "$as_me:5008: result: $ac_cv_header_dbmalloc_h" >&5
5009 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
5010 if test $ac_cv_header_dbmalloc_h = yes; then
5011
5012 echo "$as_me:5012: checking for debug_malloc in -ldbmalloc" >&5
5013 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
5014 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
5015   echo $ECHO_N "(cached) $ECHO_C" >&6
5016 else
5017   ac_check_lib_save_LIBS=$LIBS
5018 LIBS="-ldbmalloc  $LIBS"
5019 cat >conftest.$ac_ext <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5022
5023 /* Override any gcc2 internal prototype to avoid an error.  */
5024 #ifdef __cplusplus
5025 extern "C"
5026 #endif
5027 /* We use char because int might match the return type of a gcc2
5028    builtin and then its argument prototype would still apply.  */
5029 char debug_malloc ();
5030 int
5031 main ()
5032 {
5033 debug_malloc ();
5034   ;
5035   return 0;
5036 }
5037 _ACEOF
5038 rm -f conftest.$ac_objext conftest$ac_exeext
5039 if { (eval echo "$as_me:5039: \"$ac_link\"") >&5
5040   (eval $ac_link) 2>&5
5041   ac_status=$?
5042   echo "$as_me:5042: \$? = $ac_status" >&5
5043   (exit $ac_status); } &&
5044          { ac_try='test -s conftest$ac_exeext'
5045   { (eval echo "$as_me:5045: \"$ac_try\"") >&5
5046   (eval $ac_try) 2>&5
5047   ac_status=$?
5048   echo "$as_me:5048: \$? = $ac_status" >&5
5049   (exit $ac_status); }; }; then
5050   ac_cv_lib_dbmalloc_debug_malloc=yes
5051 else
5052   echo "$as_me: failed program was:" >&5
5053 cat conftest.$ac_ext >&5
5054 ac_cv_lib_dbmalloc_debug_malloc=no
5055 fi
5056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5057 LIBS=$ac_check_lib_save_LIBS
5058 fi
5059 echo "$as_me:5059: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
5060 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
5061 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
5062   cat >>confdefs.h <<EOF
5063 #define HAVE_LIBDBMALLOC 1
5064 EOF
5065
5066   LIBS="-ldbmalloc $LIBS"
5067
5068 fi
5069
5070 fi
5071
5072 fi
5073
5074 echo "$as_me:5074: checking if you want to use valgrind for testing" >&5
5075 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
5076
5077 # Check whether --with-valgrind or --without-valgrind was given.
5078 if test "${with_valgrind+set}" = set; then
5079   withval="$with_valgrind"
5080   cat >>confdefs.h <<\EOF
5081 #define USE_VALGRIND 1
5082 EOF
5083
5084         : ${with_cflags:=-g}
5085         : ${with_no_leaks:=yes}
5086          with_valgrind=yes
5087 else
5088   with_valgrind=
5089 fi;
5090 echo "$as_me:5090: result: ${with_valgrind:-no}" >&5
5091 echo "${ECHO_T}${with_valgrind:-no}" >&6
5092
5093 case .$with_cflags in #(vi
5094 .*-g*)
5095         case .$CFLAGS in #(vi
5096         .*-g*) #(vi
5097                 ;;
5098         *)
5099
5100 cf_fix_cppflags=no
5101 cf_new_cflags=
5102 cf_new_cppflags=
5103 cf_new_extra_cppflags=
5104
5105 for cf_add_cflags in -g
5106 do
5107 case $cf_fix_cppflags in
5108 no)
5109         case $cf_add_cflags in #(vi
5110         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5111                 case $cf_add_cflags in
5112                 -D*)
5113                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5114
5115                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5116                                 && test -z "${cf_tst_cflags}" \
5117                                 && cf_fix_cppflags=yes
5118
5119                         if test $cf_fix_cppflags = yes ; then
5120                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5121                                 continue
5122                         elif test "${cf_tst_cflags}" = "\"'" ; then
5123                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5124                                 continue
5125                         fi
5126                         ;;
5127                 esac
5128                 case "$CPPFLAGS" in
5129                 *$cf_add_cflags) #(vi
5130                         ;;
5131                 *) #(vi
5132                         case $cf_add_cflags in #(vi
5133                         -D*)
5134                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5135
5136 CPPFLAGS=`echo "$CPPFLAGS" | \
5137         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
5138                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
5139
5140                                 ;;
5141                         esac
5142                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5143                         ;;
5144                 esac
5145                 ;;
5146         *)
5147                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5148                 ;;
5149         esac
5150         ;;
5151 yes)
5152         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5153
5154         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5155
5156         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5157                 && test -z "${cf_tst_cflags}" \
5158                 && cf_fix_cppflags=no
5159         ;;
5160 esac
5161 done
5162
5163 if test -n "$cf_new_cflags" ; then
5164
5165         CFLAGS="$CFLAGS $cf_new_cflags"
5166 fi
5167
5168 if test -n "$cf_new_cppflags" ; then
5169
5170         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
5171 fi
5172
5173 if test -n "$cf_new_extra_cppflags" ; then
5174
5175         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5176 fi
5177
5178                 ;;
5179         esac
5180         ;;
5181 esac
5182
5183 echo "$as_me:5183: checking if you want to perform memory-leak testing" >&5
5184 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
5185
5186 # Check whether --enable-leaks or --disable-leaks was given.
5187 if test "${enable_leaks+set}" = set; then
5188   enableval="$enable_leaks"
5189   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
5190 else
5191   : ${with_no_leaks:=no}
5192 fi;
5193 echo "$as_me:5193: result: $with_no_leaks" >&5
5194 echo "${ECHO_T}$with_no_leaks" >&6
5195
5196 if test "$with_no_leaks" = yes ; then
5197         cat >>confdefs.h <<\EOF
5198 #define NO_LEAKS 1
5199 EOF
5200
5201         cat >>confdefs.h <<\EOF
5202 #define YY_NO_LEAKS 1
5203 EOF
5204
5205 fi
5206
5207 echo "$as_me:5207: checking if you want to check for wide-character functions" >&5
5208 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5209
5210 # Check whether --enable-widec or --disable-widec was given.
5211 if test "${enable_widec+set}" = set; then
5212   enableval="$enable_widec"
5213   test "$enableval" != no && enableval=yes
5214   if test "$enableval" != "yes" ; then
5215     cf_enable_widec=no
5216   else
5217     cf_enable_widec=yes
5218   fi
5219 else
5220   enableval=yes
5221   cf_enable_widec=yes
5222
5223 fi;
5224 echo "$as_me:5224: result: $cf_enable_widec" >&5
5225 echo "${ECHO_T}$cf_enable_widec" >&6
5226
5227 echo "$as_me:5227: checking for specific curses-directory" >&5
5228 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5229
5230 # Check whether --with-curses-dir or --without-curses-dir was given.
5231 if test "${with_curses_dir+set}" = set; then
5232   withval="$with_curses_dir"
5233   cf_cv_curses_dir=$withval
5234 else
5235   cf_cv_curses_dir=no
5236 fi;
5237 echo "$as_me:5237: result: $cf_cv_curses_dir" >&5
5238 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5239
5240 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5241 then
5242
5243 if test "x$prefix" != xNONE; then
5244   cf_path_syntax="$prefix"
5245 else
5246   cf_path_syntax="$ac_default_prefix"
5247 fi
5248
5249 case ".$withval" in #(vi
5250 .\$\(*\)*|.\'*\'*) #(vi
5251   ;;
5252 ..|./*|.\\*) #(vi
5253   ;;
5254 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5255   ;;
5256 .\${*prefix}*) #(vi
5257   eval withval="$withval"
5258   case ".$withval" in #(vi
5259   .NONE/*)
5260     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5261     ;;
5262   esac
5263   ;; #(vi
5264 .no|.NONE/*)
5265   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5266   ;;
5267 *)
5268   { { echo "$as_me:5268: error: expected a pathname, not \"$withval\"" >&5
5269 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5270    { (exit 1); exit 1; }; }
5271   ;;
5272 esac
5273
5274         if test -d "$cf_cv_curses_dir"
5275         then
5276
5277 if test -n "$cf_cv_curses_dir/include" ; then
5278   for cf_add_incdir in $cf_cv_curses_dir/include
5279   do
5280         while test $cf_add_incdir != /usr/include
5281         do
5282           if test -d $cf_add_incdir
5283           then
5284                 cf_have_incdir=no
5285                 if test -n "$CFLAGS$CPPFLAGS" ; then
5286                   # a loop is needed to ensure we can add subdirs of existing dirs
5287                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5288                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5289                           cf_have_incdir=yes; break
5290                         fi
5291                   done
5292                 fi
5293
5294                 if test "$cf_have_incdir" = no ; then
5295                   if test "$cf_add_incdir" = /usr/local/include ; then
5296                         if test "$GCC" = yes
5297                         then
5298                           cf_save_CPPFLAGS=$CPPFLAGS
5299                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5300                           cat >conftest.$ac_ext <<_ACEOF
5301 #line 5301 "configure"
5302 #include "confdefs.h"
5303 #include <stdio.h>
5304 int
5305 main ()
5306 {
5307 printf("Hello")
5308   ;
5309   return 0;
5310 }
5311 _ACEOF
5312 rm -f conftest.$ac_objext
5313 if { (eval echo "$as_me:5313: \"$ac_compile\"") >&5
5314   (eval $ac_compile) 2>&5
5315   ac_status=$?
5316   echo "$as_me:5316: \$? = $ac_status" >&5
5317   (exit $ac_status); } &&
5318          { ac_try='test -s conftest.$ac_objext'
5319   { (eval echo "$as_me:5319: \"$ac_try\"") >&5
5320   (eval $ac_try) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); }; }; then
5324   :
5325 else
5326   echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 cf_have_incdir=yes
5329 fi
5330 rm -f conftest.$ac_objext conftest.$ac_ext
5331                           CPPFLAGS=$cf_save_CPPFLAGS
5332                         fi
5333                   fi
5334                 fi
5335
5336                 if test "$cf_have_incdir" = no ; then
5337                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5338
5339 echo "${as_me:-configure}:5339: testing adding $cf_add_incdir to include-path ..." 1>&5
5340
5341                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5342
5343                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5344                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5345                   cf_add_incdir="$cf_top_incdir"
5346                 else
5347                   break
5348                 fi
5349           fi
5350         done
5351   done
5352 fi
5353
5354 if test -n "$cf_cv_curses_dir/lib" ; then
5355   for cf_add_libdir in $cf_cv_curses_dir/lib
5356   do
5357     if test $cf_add_libdir = /usr/lib ; then
5358       :
5359     elif test -d $cf_add_libdir
5360     then
5361       cf_have_libdir=no
5362       if test -n "$LDFLAGS$LIBS" ; then
5363         # a loop is needed to ensure we can add subdirs of existing dirs
5364         for cf_test_libdir in $LDFLAGS $LIBS ; do
5365           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5366             cf_have_libdir=yes; break
5367           fi
5368         done
5369       fi
5370       if test "$cf_have_libdir" = no ; then
5371         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5372
5373 echo "${as_me:-configure}:5373: testing adding $cf_add_libdir to library-path ..." 1>&5
5374
5375         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5376       fi
5377     fi
5378   done
5379 fi
5380
5381         fi
5382 fi
5383
5384 cf_cv_screen=curses
5385
5386 echo "$as_me:5386: checking for specified curses library type" >&5
5387 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5388
5389 # Check whether --with-ncursesw or --without-ncursesw was given.
5390 if test "${with_ncursesw+set}" = set; then
5391   withval="$with_ncursesw"
5392   cf_cv_screen=ncursesw
5393 else
5394
5395 # Check whether --with-ncurses or --without-ncurses was given.
5396 if test "${with_ncurses+set}" = set; then
5397   withval="$with_ncurses"
5398   cf_cv_screen=ncurses
5399 else
5400
5401 # Check whether --with-pdcurses or --without-pdcurses was given.
5402 if test "${with_pdcurses+set}" = set; then
5403   withval="$with_pdcurses"
5404   cf_cv_screen=pdcurses
5405 else
5406
5407 # Check whether --with-curses-colr or --without-curses-colr was given.
5408 if test "${with_curses_colr+set}" = set; then
5409   withval="$with_curses_colr"
5410   cf_cv_screen=curses_colr
5411 else
5412
5413 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5414 if test "${with_curses_5lib+set}" = set; then
5415   withval="$with_curses_5lib"
5416   cf_cv_screen=curses_5lib
5417 fi;
5418 fi;
5419 fi;
5420 fi;
5421 fi;
5422
5423 echo "$as_me:5423: result: $cf_cv_screen" >&5
5424 echo "${ECHO_T}$cf_cv_screen" >&6
5425
5426 case $cf_cv_screen in #(vi
5427 curses|curses_*) #(vi
5428
5429 echo "$as_me:5429: checking for extra include directories" >&5
5430 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5431 if test "${cf_cv_curses_incdir+set}" = set; then
5432   echo $ECHO_N "(cached) $ECHO_C" >&6
5433 else
5434
5435 cf_cv_curses_incdir=no
5436 case $host_os in #(vi
5437 hpux10.*) #(vi
5438         if test "x$cf_cv_screen" = "xcurses_colr"
5439         then
5440                 test -d /usr/include/curses_colr && \
5441                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5442         fi
5443         ;;
5444 sunos3*|sunos4*)
5445         if test "x$cf_cv_screen" = "xcurses_5lib"
5446         then
5447                 test -d /usr/5lib && \
5448                 test -d /usr/5include && \
5449                 cf_cv_curses_incdir="-I/usr/5include"
5450         fi
5451         ;;
5452 esac
5453
5454 fi
5455 echo "$as_me:5455: result: $cf_cv_curses_incdir" >&5
5456 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5457 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5458
5459 echo "$as_me:5459: checking if we have identified curses headers" >&5
5460 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5461 if test "${cf_cv_ncurses_header+set}" = set; then
5462   echo $ECHO_N "(cached) $ECHO_C" >&6
5463 else
5464
5465 cf_cv_ncurses_header=none
5466 for cf_header in  \
5467         ncurses.h \
5468         curses.h ncurses/ncurses.h ncurses/curses.h
5469 do
5470 cat >conftest.$ac_ext <<_ACEOF
5471 #line 5471 "configure"
5472 #include "confdefs.h"
5473 #include <${cf_header}>
5474 int
5475 main ()
5476 {
5477 initscr(); tgoto("?", 0,0)
5478   ;
5479   return 0;
5480 }
5481 _ACEOF
5482 rm -f conftest.$ac_objext
5483 if { (eval echo "$as_me:5483: \"$ac_compile\"") >&5
5484   (eval $ac_compile) 2>&5
5485   ac_status=$?
5486   echo "$as_me:5486: \$? = $ac_status" >&5
5487   (exit $ac_status); } &&
5488          { ac_try='test -s conftest.$ac_objext'
5489   { (eval echo "$as_me:5489: \"$ac_try\"") >&5
5490   (eval $ac_try) 2>&5
5491   ac_status=$?
5492   echo "$as_me:5492: \$? = $ac_status" >&5
5493   (exit $ac_status); }; }; then
5494   cf_cv_ncurses_header=$cf_header; break
5495 else
5496   echo "$as_me: failed program was:" >&5
5497 cat conftest.$ac_ext >&5
5498 fi
5499 rm -f conftest.$ac_objext conftest.$ac_ext
5500 done
5501
5502 fi
5503 echo "$as_me:5503: result: $cf_cv_ncurses_header" >&5
5504 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5505
5506 if test "$cf_cv_ncurses_header" = none ; then
5507         { { echo "$as_me:5507: error: No curses header-files found" >&5
5508 echo "$as_me: error: No curses header-files found" >&2;}
5509    { (exit 1); exit 1; }; }
5510 fi
5511
5512 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5513
5514 for ac_header in $cf_cv_ncurses_header
5515 do
5516 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5517 echo "$as_me:5517: checking for $ac_header" >&5
5518 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5519 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5520   echo $ECHO_N "(cached) $ECHO_C" >&6
5521 else
5522   cat >conftest.$ac_ext <<_ACEOF
5523 #line 5523 "configure"
5524 #include "confdefs.h"
5525 #include <$ac_header>
5526 _ACEOF
5527 if { (eval echo "$as_me:5527: \"$ac_cpp conftest.$ac_ext\"") >&5
5528   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5529   ac_status=$?
5530   egrep -v '^ *\+' conftest.er1 >conftest.err
5531   rm -f conftest.er1
5532   cat conftest.err >&5
5533   echo "$as_me:5533: \$? = $ac_status" >&5
5534   (exit $ac_status); } >/dev/null; then
5535   if test -s conftest.err; then
5536     ac_cpp_err=$ac_c_preproc_warn_flag
5537   else
5538     ac_cpp_err=
5539   fi
5540 else
5541   ac_cpp_err=yes
5542 fi
5543 if test -z "$ac_cpp_err"; then
5544   eval "$as_ac_Header=yes"
5545 else
5546   echo "$as_me: failed program was:" >&5
5547   cat conftest.$ac_ext >&5
5548   eval "$as_ac_Header=no"
5549 fi
5550 rm -f conftest.err conftest.$ac_ext
5551 fi
5552 echo "$as_me:5552: result: `eval echo '${'$as_ac_Header'}'`" >&5
5553 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5554 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5555   cat >>confdefs.h <<EOF
5556 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5557 EOF
5558
5559 fi
5560 done
5561
5562 echo "$as_me:5562: checking for terminfo header" >&5
5563 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5564 if test "${cf_cv_term_header+set}" = set; then
5565   echo $ECHO_N "(cached) $ECHO_C" >&6
5566 else
5567
5568 case ${cf_cv_ncurses_header} in #(vi
5569 */ncurses.h|*/ncursesw.h) #(vi
5570         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5571         ;;
5572 *)
5573         cf_term_header=term.h
5574         ;;
5575 esac
5576
5577 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5578 do
5579 cat >conftest.$ac_ext <<_ACEOF
5580 #line 5580 "configure"
5581 #include "confdefs.h"
5582 #include <stdio.h>
5583 #include <${cf_cv_ncurses_header:-curses.h}>
5584 #include <$cf_test>
5585
5586 int
5587 main ()
5588 {
5589 int x = auto_left_margin
5590   ;
5591   return 0;
5592 }
5593 _ACEOF
5594 rm -f conftest.$ac_objext
5595 if { (eval echo "$as_me:5595: \"$ac_compile\"") >&5
5596   (eval $ac_compile) 2>&5
5597   ac_status=$?
5598   echo "$as_me:5598: \$? = $ac_status" >&5
5599   (exit $ac_status); } &&
5600          { ac_try='test -s conftest.$ac_objext'
5601   { (eval echo "$as_me:5601: \"$ac_try\"") >&5
5602   (eval $ac_try) 2>&5
5603   ac_status=$?
5604   echo "$as_me:5604: \$? = $ac_status" >&5
5605   (exit $ac_status); }; }; then
5606
5607         cf_cv_term_header="$cf_test"
5608 else
5609   echo "$as_me: failed program was:" >&5
5610 cat conftest.$ac_ext >&5
5611
5612         cf_cv_term_header=unknown
5613
5614 fi
5615 rm -f conftest.$ac_objext conftest.$ac_ext
5616         test "$cf_cv_term_header" != unknown && break
5617 done
5618
5619 fi
5620 echo "$as_me:5620: result: $cf_cv_term_header" >&5
5621 echo "${ECHO_T}$cf_cv_term_header" >&6
5622
5623 # Set definitions to allow ifdef'ing to accommodate subdirectories
5624
5625 case $cf_cv_term_header in # (vi
5626 *term.h)
5627         cat >>confdefs.h <<\EOF
5628 #define HAVE_TERM_H 1
5629 EOF
5630
5631         ;;
5632 esac
5633
5634 case $cf_cv_term_header in # (vi
5635 ncurses/term.h) #(vi
5636         cat >>confdefs.h <<\EOF
5637 #define HAVE_NCURSES_TERM_H 1
5638 EOF
5639
5640         ;;
5641 ncursesw/term.h)
5642         cat >>confdefs.h <<\EOF
5643 #define HAVE_NCURSESW_TERM_H 1
5644 EOF
5645
5646         ;;
5647 esac
5648
5649 echo "$as_me:5649: checking for ncurses version" >&5
5650 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5651 if test "${cf_cv_ncurses_version+set}" = set; then
5652   echo $ECHO_N "(cached) $ECHO_C" >&6
5653 else
5654
5655         cf_cv_ncurses_version=no
5656         cf_tempfile=out$$
5657         rm -f $cf_tempfile
5658         if test "$cross_compiling" = yes; then
5659
5660         # This will not work if the preprocessor splits the line after the
5661         # Autoconf token.  The 'unproto' program does that.
5662         cat > conftest.$ac_ext <<EOF
5663 #include <${cf_cv_ncurses_header:-curses.h}>
5664 #undef Autoconf
5665 #ifdef NCURSES_VERSION
5666 Autoconf NCURSES_VERSION
5667 #else
5668 #ifdef __NCURSES_H
5669 Autoconf "old"
5670 #endif
5671 ;
5672 #endif
5673 EOF
5674         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5675         { (eval echo "$as_me:5675: \"$cf_try\"") >&5
5676   (eval $cf_try) 2>&5
5677   ac_status=$?
5678   echo "$as_me:5678: \$? = $ac_status" >&5
5679   (exit $ac_status); }
5680         if test -f conftest.out ; then
5681                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5682                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5683                 rm -f conftest.out
5684         fi
5685
5686 else
5687   cat >conftest.$ac_ext <<_ACEOF
5688 #line 5688 "configure"
5689 #include "confdefs.h"
5690
5691 #include <${cf_cv_ncurses_header:-curses.h}>
5692 #include <stdio.h>
5693 int main()
5694 {
5695         FILE *fp = fopen("$cf_tempfile", "w");
5696 #ifdef NCURSES_VERSION
5697 # ifdef NCURSES_VERSION_PATCH
5698         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5699 # else
5700         fprintf(fp, "%s\n", NCURSES_VERSION);
5701 # endif
5702 #else
5703 # ifdef __NCURSES_H
5704         fprintf(fp, "old\n");
5705 # else
5706         make an error
5707 # endif
5708 #endif
5709         ${cf_cv_main_return:-return}(0);
5710 }
5711 _ACEOF
5712 rm -f conftest$ac_exeext
5713 if { (eval echo "$as_me:5713: \"$ac_link\"") >&5
5714   (eval $ac_link) 2>&5
5715   ac_status=$?
5716   echo "$as_me:5716: \$? = $ac_status" >&5
5717   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5718   { (eval echo "$as_me:5718: \"$ac_try\"") >&5
5719   (eval $ac_try) 2>&5
5720   ac_status=$?
5721   echo "$as_me:5721: \$? = $ac_status" >&5
5722   (exit $ac_status); }; }; then
5723
5724         cf_cv_ncurses_version=`cat $cf_tempfile`
5725 else
5726   echo "$as_me: program exited with status $ac_status" >&5
5727 echo "$as_me: failed program was:" >&5
5728 cat conftest.$ac_ext >&5
5729 fi
5730 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5731 fi
5732         rm -f $cf_tempfile
5733
5734 fi
5735 echo "$as_me:5735: result: $cf_cv_ncurses_version" >&5
5736 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5737 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5738 #define NCURSES 1
5739 EOF
5740
5741 echo "$as_me:5741: checking if we have identified curses libraries" >&5
5742 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5743 cat >conftest.$ac_ext <<_ACEOF
5744 #line 5744 "configure"
5745 #include "confdefs.h"
5746 #include <${cf_cv_ncurses_header:-curses.h}>
5747 int
5748 main ()
5749 {
5750 initscr(); tgoto("?", 0,0)
5751   ;
5752   return 0;
5753 }
5754 _ACEOF
5755 rm -f conftest.$ac_objext conftest$ac_exeext
5756 if { (eval echo "$as_me:5756: \"$ac_link\"") >&5
5757   (eval $ac_link) 2>&5
5758   ac_status=$?
5759   echo "$as_me:5759: \$? = $ac_status" >&5
5760   (exit $ac_status); } &&
5761          { ac_try='test -s conftest$ac_exeext'
5762   { (eval echo "$as_me:5762: \"$ac_try\"") >&5
5763   (eval $ac_try) 2>&5
5764   ac_status=$?
5765   echo "$as_me:5765: \$? = $ac_status" >&5
5766   (exit $ac_status); }; }; then
5767   cf_result=yes
5768 else
5769   echo "$as_me: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
5771 cf_result=no
5772 fi
5773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5774 echo "$as_me:5774: result: $cf_result" >&5
5775 echo "${ECHO_T}$cf_result" >&6
5776
5777 if test "$cf_result" = no ; then
5778 case $host_os in #(vi
5779 freebsd*) #(vi
5780     echo "$as_me:5780: checking for tgoto in -lmytinfo" >&5
5781 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5782 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5783   echo $ECHO_N "(cached) $ECHO_C" >&6
5784 else
5785   ac_check_lib_save_LIBS=$LIBS
5786 LIBS="-lmytinfo  $LIBS"
5787 cat >conftest.$ac_ext <<_ACEOF
5788 #line 5788 "configure"
5789 #include "confdefs.h"
5790
5791 /* Override any gcc2 internal prototype to avoid an error.  */
5792 #ifdef __cplusplus
5793 extern "C"
5794 #endif
5795 /* We use char because int might match the return type of a gcc2
5796    builtin and then its argument prototype would still apply.  */
5797 char tgoto ();
5798 int
5799 main ()
5800 {
5801 tgoto ();
5802   ;
5803   return 0;
5804 }
5805 _ACEOF
5806 rm -f conftest.$ac_objext conftest$ac_exeext
5807 if { (eval echo "$as_me:5807: \"$ac_link\"") >&5
5808   (eval $ac_link) 2>&5
5809   ac_status=$?
5810   echo "$as_me:5810: \$? = $ac_status" >&5
5811   (exit $ac_status); } &&
5812          { ac_try='test -s conftest$ac_exeext'
5813   { (eval echo "$as_me:5813: \"$ac_try\"") >&5
5814   (eval $ac_try) 2>&5
5815   ac_status=$?
5816   echo "$as_me:5816: \$? = $ac_status" >&5
5817   (exit $ac_status); }; }; then
5818   ac_cv_lib_mytinfo_tgoto=yes
5819 else
5820   echo "$as_me: failed program was:" >&5
5821 cat conftest.$ac_ext >&5
5822 ac_cv_lib_mytinfo_tgoto=no
5823 fi
5824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5825 LIBS=$ac_check_lib_save_LIBS
5826 fi
5827 echo "$as_me:5827: result: $ac_cv_lib_mytinfo_tgoto" >&5
5828 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5829 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5830   LIBS="-lmytinfo $LIBS"
5831 fi
5832
5833     ;;
5834 hpux10.*) #(vi
5835         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5836         # next (1998), and xcurses "newer" (2000).  There is no header file for
5837         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5838         # term.h) for cur_colr
5839         if test "x$cf_cv_screen" = "xcurses_colr"
5840         then
5841                 echo "$as_me:5841: checking for initscr in -lcur_colr" >&5
5842 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5843 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5844   echo $ECHO_N "(cached) $ECHO_C" >&6
5845 else
5846   ac_check_lib_save_LIBS=$LIBS
5847 LIBS="-lcur_colr  $LIBS"
5848 cat >conftest.$ac_ext <<_ACEOF
5849 #line 5849 "configure"
5850 #include "confdefs.h"
5851
5852 /* Override any gcc2 internal prototype to avoid an error.  */
5853 #ifdef __cplusplus
5854 extern "C"
5855 #endif
5856 /* We use char because int might match the return type of a gcc2
5857    builtin and then its argument prototype would still apply.  */
5858 char initscr ();
5859 int
5860 main ()
5861 {
5862 initscr ();
5863   ;
5864   return 0;
5865 }
5866 _ACEOF
5867 rm -f conftest.$ac_objext conftest$ac_exeext
5868 if { (eval echo "$as_me:5868: \"$ac_link\"") >&5
5869   (eval $ac_link) 2>&5
5870   ac_status=$?
5871   echo "$as_me:5871: \$? = $ac_status" >&5
5872   (exit $ac_status); } &&
5873          { ac_try='test -s conftest$ac_exeext'
5874   { (eval echo "$as_me:5874: \"$ac_try\"") >&5
5875   (eval $ac_try) 2>&5
5876   ac_status=$?
5877   echo "$as_me:5877: \$? = $ac_status" >&5
5878   (exit $ac_status); }; }; then
5879   ac_cv_lib_cur_colr_initscr=yes
5880 else
5881   echo "$as_me: failed program was:" >&5
5882 cat conftest.$ac_ext >&5
5883 ac_cv_lib_cur_colr_initscr=no
5884 fi
5885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5886 LIBS=$ac_check_lib_save_LIBS
5887 fi
5888 echo "$as_me:5888: result: $ac_cv_lib_cur_colr_initscr" >&5
5889 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5890 if test $ac_cv_lib_cur_colr_initscr = yes; then
5891
5892                         LIBS="-lcur_colr $LIBS"
5893                         ac_cv_func_initscr=yes
5894
5895 else
5896
5897                 echo "$as_me:5897: checking for initscr in -lHcurses" >&5
5898 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5899 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5900   echo $ECHO_N "(cached) $ECHO_C" >&6
5901 else
5902   ac_check_lib_save_LIBS=$LIBS
5903 LIBS="-lHcurses  $LIBS"
5904 cat >conftest.$ac_ext <<_ACEOF
5905 #line 5905 "configure"
5906 #include "confdefs.h"
5907
5908 /* Override any gcc2 internal prototype to avoid an error.  */
5909 #ifdef __cplusplus
5910 extern "C"
5911 #endif
5912 /* We use char because int might match the return type of a gcc2
5913    builtin and then its argument prototype would still apply.  */
5914 char initscr ();
5915 int
5916 main ()
5917 {
5918 initscr ();
5919   ;
5920   return 0;
5921 }
5922 _ACEOF
5923 rm -f conftest.$ac_objext conftest$ac_exeext
5924 if { (eval echo "$as_me:5924: \"$ac_link\"") >&5
5925   (eval $ac_link) 2>&5
5926   ac_status=$?
5927   echo "$as_me:5927: \$? = $ac_status" >&5
5928   (exit $ac_status); } &&
5929          { ac_try='test -s conftest$ac_exeext'
5930   { (eval echo "$as_me:5930: \"$ac_try\"") >&5
5931   (eval $ac_try) 2>&5
5932   ac_status=$?
5933   echo "$as_me:5933: \$? = $ac_status" >&5
5934   (exit $ac_status); }; }; then
5935   ac_cv_lib_Hcurses_initscr=yes
5936 else
5937   echo "$as_me: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
5939 ac_cv_lib_Hcurses_initscr=no
5940 fi
5941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5942 LIBS=$ac_check_lib_save_LIBS
5943 fi
5944 echo "$as_me:5944: result: $ac_cv_lib_Hcurses_initscr" >&5
5945 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5946 if test $ac_cv_lib_Hcurses_initscr = yes; then
5947
5948                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5949                         LIBS="-lHcurses $LIBS"
5950                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5951                         ac_cv_func_initscr=yes
5952
5953 fi
5954
5955 fi
5956
5957         fi
5958     ;;
5959 linux*)
5960         case `arch 2>/dev/null` in
5961         x86_64)
5962                 if test -d /lib64
5963                 then
5964
5965 if test -n "/lib64" ; then
5966   for cf_add_libdir in /lib64
5967   do
5968     if test $cf_add_libdir = /usr/lib ; then
5969       :
5970     elif test -d $cf_add_libdir
5971     then
5972       cf_have_libdir=no
5973       if test -n "$LDFLAGS$LIBS" ; then
5974         # a loop is needed to ensure we can add subdirs of existing dirs
5975         for cf_test_libdir in $LDFLAGS $LIBS ; do
5976           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5977             cf_have_libdir=yes; break
5978           fi
5979         done
5980       fi
5981       if test "$cf_have_libdir" = no ; then
5982         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5983
5984 echo "${as_me:-configure}:5984: testing adding $cf_add_libdir to library-path ..." 1>&5
5985
5986         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5987       fi
5988     fi
5989   done
5990 fi
5991
5992                 else
5993
5994 if test -n "/lib" ; then
5995   for cf_add_libdir in /lib
5996   do
5997     if test $cf_add_libdir = /usr/lib ; then
5998       :
5999     elif test -d $cf_add_libdir
6000     then
6001       cf_have_libdir=no
6002       if test -n "$LDFLAGS$LIBS" ; then
6003         # a loop is needed to ensure we can add subdirs of existing dirs
6004         for cf_test_libdir in $LDFLAGS $LIBS ; do
6005           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6006             cf_have_libdir=yes; break
6007           fi
6008         done
6009       fi
6010       if test "$cf_have_libdir" = no ; then
6011         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6012
6013 echo "${as_me:-configure}:6013: testing adding $cf_add_libdir to library-path ..." 1>&5
6014
6015         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6016       fi
6017     fi
6018   done
6019 fi
6020
6021                 fi
6022                 ;;
6023         *)
6024
6025 if test -n "/lib" ; then
6026   for cf_add_libdir in /lib
6027   do
6028     if test $cf_add_libdir = /usr/lib ; then
6029       :
6030     elif test -d $cf_add_libdir
6031     then
6032       cf_have_libdir=no
6033       if test -n "$LDFLAGS$LIBS" ; then
6034         # a loop is needed to ensure we can add subdirs of existing dirs
6035         for cf_test_libdir in $LDFLAGS $LIBS ; do
6036           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6037             cf_have_libdir=yes; break
6038           fi
6039         done
6040       fi
6041       if test "$cf_have_libdir" = no ; then
6042         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6043
6044 echo "${as_me:-configure}:6044: testing adding $cf_add_libdir to library-path ..." 1>&5
6045
6046         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6047       fi
6048     fi
6049   done
6050 fi
6051
6052                 ;;
6053         esac
6054     ;;
6055 sunos3*|sunos4*)
6056         if test "x$cf_cv_screen" = "xcurses_5lib"
6057         then
6058                 if test -d /usr/5lib ; then
6059
6060 if test -n "/usr/5lib" ; then
6061   for cf_add_libdir in /usr/5lib
6062   do
6063     if test $cf_add_libdir = /usr/lib ; then
6064       :
6065     elif test -d $cf_add_libdir
6066     then
6067       cf_have_libdir=no
6068       if test -n "$LDFLAGS$LIBS" ; then
6069         # a loop is needed to ensure we can add subdirs of existing dirs
6070         for cf_test_libdir in $LDFLAGS $LIBS ; do
6071           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6072             cf_have_libdir=yes; break
6073           fi
6074         done
6075       fi
6076       if test "$cf_have_libdir" = no ; then
6077         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6078
6079 echo "${as_me:-configure}:6079: testing adding $cf_add_libdir to library-path ..." 1>&5
6080
6081         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6082       fi
6083     fi
6084   done
6085 fi
6086
6087                         LIBS="-lcurses -ltermcap $LIBS"
6088                 fi
6089     fi
6090     ac_cv_func_initscr=yes
6091     ;;
6092 esac
6093
6094 if test ".$ac_cv_func_initscr" != .yes ; then
6095     cf_save_LIBS="$LIBS"
6096     cf_term_lib=""
6097     cf_curs_lib=""
6098
6099     if test ".${cf_cv_ncurses_version:-no}" != .no
6100     then
6101         cf_check_list="ncurses curses cursesX"
6102     else
6103         cf_check_list="cursesX curses ncurses"
6104     fi
6105
6106     # Check for library containing tgoto.  Do this before curses library
6107     # because it may be needed to link the test-case for initscr.
6108     echo "$as_me:6108: checking for tgoto" >&5
6109 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6110 if test "${ac_cv_func_tgoto+set}" = set; then
6111   echo $ECHO_N "(cached) $ECHO_C" >&6
6112 else
6113   cat >conftest.$ac_ext <<_ACEOF
6114 #line 6114 "configure"
6115 #include "confdefs.h"
6116 /* System header to define __stub macros and hopefully few prototypes,
6117     which can conflict with char tgoto (); below.  */
6118 #include <assert.h>
6119 /* Override any gcc2 internal prototype to avoid an error.  */
6120 #ifdef __cplusplus
6121 extern "C"
6122 #endif
6123 /* We use char because int might match the return type of a gcc2
6124    builtin and then its argument prototype would still apply.  */
6125 char tgoto ();
6126 char (*f) ();
6127
6128 int
6129 main ()
6130 {
6131 /* The GNU C library defines this for functions which it implements
6132     to always fail with ENOSYS.  Some functions are actually named
6133     something starting with __ and the normal name is an alias.  */
6134 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6135 choke me
6136 #else
6137 f = tgoto;
6138 #endif
6139
6140   ;
6141   return 0;
6142 }
6143 _ACEOF
6144 rm -f conftest.$ac_objext conftest$ac_exeext
6145 if { (eval echo "$as_me:6145: \"$ac_link\"") >&5
6146   (eval $ac_link) 2>&5
6147   ac_status=$?
6148   echo "$as_me:6148: \$? = $ac_status" >&5
6149   (exit $ac_status); } &&
6150          { ac_try='test -s conftest$ac_exeext'
6151   { (eval echo "$as_me:6151: \"$ac_try\"") >&5
6152   (eval $ac_try) 2>&5
6153   ac_status=$?
6154   echo "$as_me:6154: \$? = $ac_status" >&5
6155   (exit $ac_status); }; }; then
6156   ac_cv_func_tgoto=yes
6157 else
6158   echo "$as_me: failed program was:" >&5
6159 cat conftest.$ac_ext >&5
6160 ac_cv_func_tgoto=no
6161 fi
6162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6163 fi
6164 echo "$as_me:6164: result: $ac_cv_func_tgoto" >&5
6165 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6166 if test $ac_cv_func_tgoto = yes; then
6167   cf_term_lib=predefined
6168 else
6169
6170         for cf_term_lib in $cf_check_list otermcap termcap termlib unknown
6171         do
6172             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6173 echo "$as_me:6173: checking for tgoto in -l$cf_term_lib" >&5
6174 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6175 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6176   echo $ECHO_N "(cached) $ECHO_C" >&6
6177 else
6178   ac_check_lib_save_LIBS=$LIBS
6179 LIBS="-l$cf_term_lib  $LIBS"
6180 cat >conftest.$ac_ext <<_ACEOF
6181 #line 6181 "configure"
6182 #include "confdefs.h"
6183
6184 /* Override any gcc2 internal prototype to avoid an error.  */
6185 #ifdef __cplusplus
6186 extern "C"
6187 #endif
6188 /* We use char because int might match the return type of a gcc2
6189    builtin and then its argument prototype would still apply.  */
6190 char tgoto ();
6191 int
6192 main ()
6193 {
6194 tgoto ();
6195   ;
6196   return 0;
6197 }
6198 _ACEOF
6199 rm -f conftest.$ac_objext conftest$ac_exeext
6200 if { (eval echo "$as_me:6200: \"$ac_link\"") >&5
6201   (eval $ac_link) 2>&5
6202   ac_status=$?
6203   echo "$as_me:6203: \$? = $ac_status" >&5
6204   (exit $ac_status); } &&
6205          { ac_try='test -s conftest$ac_exeext'
6206   { (eval echo "$as_me:6206: \"$ac_try\"") >&5
6207   (eval $ac_try) 2>&5
6208   ac_status=$?
6209   echo "$as_me:6209: \$? = $ac_status" >&5
6210   (exit $ac_status); }; }; then
6211   eval "$as_ac_Lib=yes"
6212 else
6213   echo "$as_me: failed program was:" >&5
6214 cat conftest.$ac_ext >&5
6215 eval "$as_ac_Lib=no"
6216 fi
6217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6218 LIBS=$ac_check_lib_save_LIBS
6219 fi
6220 echo "$as_me:6220: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6221 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6222 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6223   break
6224 fi
6225
6226         done
6227
6228 fi
6229
6230     # Check for library containing initscr
6231     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6232         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6233     do
6234         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
6235 echo "$as_me:6235: checking for initscr in -l$cf_curs_lib" >&5
6236 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
6237 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6238   echo $ECHO_N "(cached) $ECHO_C" >&6
6239 else
6240   ac_check_lib_save_LIBS=$LIBS
6241 LIBS="-l$cf_curs_lib  $LIBS"
6242 cat >conftest.$ac_ext <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6245
6246 /* Override any gcc2 internal prototype to avoid an error.  */
6247 #ifdef __cplusplus
6248 extern "C"
6249 #endif
6250 /* We use char because int might match the return type of a gcc2
6251    builtin and then its argument prototype would still apply.  */
6252 char initscr ();
6253 int
6254 main ()
6255 {
6256 initscr ();
6257   ;
6258   return 0;
6259 }
6260 _ACEOF
6261 rm -f conftest.$ac_objext conftest$ac_exeext
6262 if { (eval echo "$as_me:6262: \"$ac_link\"") >&5
6263   (eval $ac_link) 2>&5
6264   ac_status=$?
6265   echo "$as_me:6265: \$? = $ac_status" >&5
6266   (exit $ac_status); } &&
6267          { ac_try='test -s conftest$ac_exeext'
6268   { (eval echo "$as_me:6268: \"$ac_try\"") >&5
6269   (eval $ac_try) 2>&5
6270   ac_status=$?
6271   echo "$as_me:6271: \$? = $ac_status" >&5
6272   (exit $ac_status); }; }; then
6273   eval "$as_ac_Lib=yes"
6274 else
6275   echo "$as_me: failed program was:" >&5
6276 cat conftest.$ac_ext >&5
6277 eval "$as_ac_Lib=no"
6278 fi
6279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6280 LIBS=$ac_check_lib_save_LIBS
6281 fi
6282 echo "$as_me:6282: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6283 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6284 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6285   break
6286 fi
6287
6288     done
6289     test $cf_curs_lib = unknown && { { echo "$as_me:6289: error: no curses library found" >&5
6290 echo "$as_me: error: no curses library found" >&2;}
6291    { (exit 1); exit 1; }; }
6292
6293     LIBS="-l$cf_curs_lib $cf_save_LIBS"
6294     if test "$cf_term_lib" = unknown ; then
6295         echo "$as_me:6295: checking if we can link with $cf_curs_lib library" >&5
6296 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6297         cat >conftest.$ac_ext <<_ACEOF
6298 #line 6298 "configure"
6299 #include "confdefs.h"
6300 #include <${cf_cv_ncurses_header:-curses.h}>
6301 int
6302 main ()
6303 {
6304 initscr()
6305   ;
6306   return 0;
6307 }
6308 _ACEOF
6309 rm -f conftest.$ac_objext conftest$ac_exeext
6310 if { (eval echo "$as_me:6310: \"$ac_link\"") >&5
6311   (eval $ac_link) 2>&5
6312   ac_status=$?
6313   echo "$as_me:6313: \$? = $ac_status" >&5
6314   (exit $ac_status); } &&
6315          { ac_try='test -s conftest$ac_exeext'
6316   { (eval echo "$as_me:6316: \"$ac_try\"") >&5
6317   (eval $ac_try) 2>&5
6318   ac_status=$?
6319   echo "$as_me:6319: \$? = $ac_status" >&5
6320   (exit $ac_status); }; }; then
6321   cf_result=yes
6322 else
6323   echo "$as_me: failed program was:" >&5
6324 cat conftest.$ac_ext >&5
6325 cf_result=no
6326 fi
6327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6328         echo "$as_me:6328: result: $cf_result" >&5
6329 echo "${ECHO_T}$cf_result" >&6
6330         test $cf_result = no && { { echo "$as_me:6330: error: Cannot link curses library" >&5
6331 echo "$as_me: error: Cannot link curses library" >&2;}
6332    { (exit 1); exit 1; }; }
6333     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6334         :
6335     elif test "$cf_term_lib" != predefined ; then
6336         echo "$as_me:6336: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6337 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6338         cat >conftest.$ac_ext <<_ACEOF
6339 #line 6339 "configure"
6340 #include "confdefs.h"
6341 #include <${cf_cv_ncurses_header:-curses.h}>
6342 int
6343 main ()
6344 {
6345 initscr(); tgoto((char *)0, 0, 0);
6346   ;
6347   return 0;
6348 }
6349 _ACEOF
6350 rm -f conftest.$ac_objext conftest$ac_exeext
6351 if { (eval echo "$as_me:6351: \"$ac_link\"") >&5
6352   (eval $ac_link) 2>&5
6353   ac_status=$?
6354   echo "$as_me:6354: \$? = $ac_status" >&5
6355   (exit $ac_status); } &&
6356          { ac_try='test -s conftest$ac_exeext'
6357   { (eval echo "$as_me:6357: \"$ac_try\"") >&5
6358   (eval $ac_try) 2>&5
6359   ac_status=$?
6360   echo "$as_me:6360: \$? = $ac_status" >&5
6361   (exit $ac_status); }; }; then
6362   cf_result=no
6363 else
6364   echo "$as_me: failed program was:" >&5
6365 cat conftest.$ac_ext >&5
6366
6367             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6368             cat >conftest.$ac_ext <<_ACEOF
6369 #line 6369 "configure"
6370 #include "confdefs.h"
6371 #include <${cf_cv_ncurses_header:-curses.h}>
6372 int
6373 main ()
6374 {
6375 initscr()
6376   ;
6377   return 0;
6378 }
6379 _ACEOF
6380 rm -f conftest.$ac_objext conftest$ac_exeext
6381 if { (eval echo "$as_me:6381: \"$ac_link\"") >&5
6382   (eval $ac_link) 2>&5
6383   ac_status=$?
6384   echo "$as_me:6384: \$? = $ac_status" >&5
6385   (exit $ac_status); } &&
6386          { ac_try='test -s conftest$ac_exeext'
6387   { (eval echo "$as_me:6387: \"$ac_try\"") >&5
6388   (eval $ac_try) 2>&5
6389   ac_status=$?
6390   echo "$as_me:6390: \$? = $ac_status" >&5
6391   (exit $ac_status); }; }; then
6392   cf_result=yes
6393 else
6394   echo "$as_me: failed program was:" >&5
6395 cat conftest.$ac_ext >&5
6396 cf_result=error
6397 fi
6398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6399
6400 fi
6401 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6402         echo "$as_me:6402: result: $cf_result" >&5
6403 echo "${ECHO_T}$cf_result" >&6
6404     fi
6405 fi
6406 fi
6407
6408         ;;
6409 ncurses) #(vi
6410
6411 cf_ncuconfig_root=ncurses
6412
6413 echo "Looking for ${cf_ncuconfig_root}-config"
6414
6415 if test -n "$ac_tool_prefix"; then
6416   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6417   do
6418     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6419 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6420 echo "$as_me:6420: checking for $ac_word" >&5
6421 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6422 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6423   echo $ECHO_N "(cached) $ECHO_C" >&6
6424 else
6425   if test -n "$NCURSES_CONFIG"; then
6426   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6427 else
6428   ac_save_IFS=$IFS; IFS=$ac_path_separator
6429 ac_dummy="$PATH"
6430 for ac_dir in $ac_dummy; do
6431   IFS=$ac_save_IFS
6432   test -z "$ac_dir" && ac_dir=.
6433   $as_executable_p "$ac_dir/$ac_word" || continue
6434 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6435 echo "$as_me:6435: found $ac_dir/$ac_word" >&5
6436 break
6437 done
6438
6439 fi
6440 fi
6441 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6442 if test -n "$NCURSES_CONFIG"; then
6443   echo "$as_me:6443: result: $NCURSES_CONFIG" >&5
6444 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6445 else
6446   echo "$as_me:6446: result: no" >&5
6447 echo "${ECHO_T}no" >&6
6448 fi
6449
6450     test -n "$NCURSES_CONFIG" && break
6451   done
6452 fi
6453 if test -z "$NCURSES_CONFIG"; then
6454   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6455   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6456 do
6457   # Extract the first word of "$ac_prog", so it can be a program name with args.
6458 set dummy $ac_prog; ac_word=$2
6459 echo "$as_me:6459: checking for $ac_word" >&5
6460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6461 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6462   echo $ECHO_N "(cached) $ECHO_C" >&6
6463 else
6464   if test -n "$ac_ct_NCURSES_CONFIG"; then
6465   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6466 else
6467   ac_save_IFS=$IFS; IFS=$ac_path_separator
6468 ac_dummy="$PATH"
6469 for ac_dir in $ac_dummy; do
6470   IFS=$ac_save_IFS
6471   test -z "$ac_dir" && ac_dir=.
6472   $as_executable_p "$ac_dir/$ac_word" || continue
6473 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6474 echo "$as_me:6474: found $ac_dir/$ac_word" >&5
6475 break
6476 done
6477
6478 fi
6479 fi
6480 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6481 if test -n "$ac_ct_NCURSES_CONFIG"; then
6482   echo "$as_me:6482: result: $ac_ct_NCURSES_CONFIG" >&5
6483 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6484 else
6485   echo "$as_me:6485: result: no" >&5
6486 echo "${ECHO_T}no" >&6
6487 fi
6488
6489   test -n "$ac_ct_NCURSES_CONFIG" && break
6490 done
6491 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6492
6493   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6494 fi
6495
6496 if test "$NCURSES_CONFIG" != none ; then
6497
6498 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6499 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6500
6501 # even with config script, some packages use no-override for curses.h
6502
6503 echo "$as_me:6503: checking if we have identified curses headers" >&5
6504 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6505 if test "${cf_cv_ncurses_header+set}" = set; then
6506   echo $ECHO_N "(cached) $ECHO_C" >&6
6507 else
6508
6509 cf_cv_ncurses_header=none
6510 for cf_header in  \
6511     ncurses/ncurses.h \
6512         ncurses/curses.h \
6513         ncurses.h \
6514         curses.h
6515 do
6516 cat >conftest.$ac_ext <<_ACEOF
6517 #line 6517 "configure"
6518 #include "confdefs.h"
6519 #include <${cf_header}>
6520 int
6521 main ()
6522 {
6523 initscr(); tgoto("?", 0,0)
6524   ;
6525   return 0;
6526 }
6527 _ACEOF
6528 rm -f conftest.$ac_objext
6529 if { (eval echo "$as_me:6529: \"$ac_compile\"") >&5
6530   (eval $ac_compile) 2>&5
6531   ac_status=$?
6532   echo "$as_me:6532: \$? = $ac_status" >&5
6533   (exit $ac_status); } &&
6534          { ac_try='test -s conftest.$ac_objext'
6535   { (eval echo "$as_me:6535: \"$ac_try\"") >&5
6536   (eval $ac_try) 2>&5
6537   ac_status=$?
6538   echo "$as_me:6538: \$? = $ac_status" >&5
6539   (exit $ac_status); }; }; then
6540   cf_cv_ncurses_header=$cf_header; break
6541 else
6542   echo "$as_me: failed program was:" >&5
6543 cat conftest.$ac_ext >&5
6544 fi
6545 rm -f conftest.$ac_objext conftest.$ac_ext
6546 done
6547
6548 fi
6549 echo "$as_me:6549: result: $cf_cv_ncurses_header" >&5
6550 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6551
6552 if test "$cf_cv_ncurses_header" = none ; then
6553         { { echo "$as_me:6553: error: No curses header-files found" >&5
6554 echo "$as_me: error: No curses header-files found" >&2;}
6555    { (exit 1); exit 1; }; }
6556 fi
6557
6558 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6559
6560 for ac_header in $cf_cv_ncurses_header
6561 do
6562 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6563 echo "$as_me:6563: checking for $ac_header" >&5
6564 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6565 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6566   echo $ECHO_N "(cached) $ECHO_C" >&6
6567 else
6568   cat >conftest.$ac_ext <<_ACEOF
6569 #line 6569 "configure"
6570 #include "confdefs.h"
6571 #include <$ac_header>
6572 _ACEOF
6573 if { (eval echo "$as_me:6573: \"$ac_cpp conftest.$ac_ext\"") >&5
6574   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6575   ac_status=$?
6576   egrep -v '^ *\+' conftest.er1 >conftest.err
6577   rm -f conftest.er1
6578   cat conftest.err >&5
6579   echo "$as_me:6579: \$? = $ac_status" >&5
6580   (exit $ac_status); } >/dev/null; then
6581   if test -s conftest.err; then
6582     ac_cpp_err=$ac_c_preproc_warn_flag
6583   else
6584     ac_cpp_err=
6585   fi
6586 else
6587   ac_cpp_err=yes
6588 fi
6589 if test -z "$ac_cpp_err"; then
6590   eval "$as_ac_Header=yes"
6591 else
6592   echo "$as_me: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594   eval "$as_ac_Header=no"
6595 fi
6596 rm -f conftest.err conftest.$ac_ext
6597 fi
6598 echo "$as_me:6598: result: `eval echo '${'$as_ac_Header'}'`" >&5
6599 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6600 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6601   cat >>confdefs.h <<EOF
6602 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6603 EOF
6604
6605 fi
6606 done
6607
6608 cat >>confdefs.h <<\EOF
6609 #define NCURSES 1
6610 EOF
6611
6612 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6613
6614 cat >>confdefs.h <<EOF
6615 #define $cf_nculib_ROOT 1
6616 EOF
6617
6618 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6619
6620 else
6621
6622 cf_ncuhdr_root=ncurses
6623
6624 test -n "$cf_cv_curses_dir" && \
6625 test "$cf_cv_curses_dir" != "no" && { \
6626
6627 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6628   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6629   do
6630         while test $cf_add_incdir != /usr/include
6631         do
6632           if test -d $cf_add_incdir
6633           then
6634                 cf_have_incdir=no
6635                 if test -n "$CFLAGS$CPPFLAGS" ; then
6636                   # a loop is needed to ensure we can add subdirs of existing dirs
6637                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6638                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6639                           cf_have_incdir=yes; break
6640                         fi
6641                   done
6642                 fi
6643
6644                 if test "$cf_have_incdir" = no ; then
6645                   if test "$cf_add_incdir" = /usr/local/include ; then
6646                         if test "$GCC" = yes
6647                         then
6648                           cf_save_CPPFLAGS=$CPPFLAGS
6649                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6650                           cat >conftest.$ac_ext <<_ACEOF
6651 #line 6651 "configure"
6652 #include "confdefs.h"
6653 #include <stdio.h>
6654 int
6655 main ()
6656 {
6657 printf("Hello")
6658   ;
6659   return 0;
6660 }
6661 _ACEOF
6662 rm -f conftest.$ac_objext
6663 if { (eval echo "$as_me:6663: \"$ac_compile\"") >&5
6664   (eval $ac_compile) 2>&5
6665   ac_status=$?
6666   echo "$as_me:6666: \$? = $ac_status" >&5
6667   (exit $ac_status); } &&
6668          { ac_try='test -s conftest.$ac_objext'
6669   { (eval echo "$as_me:6669: \"$ac_try\"") >&5
6670   (eval $ac_try) 2>&5
6671   ac_status=$?
6672   echo "$as_me:6672: \$? = $ac_status" >&5
6673   (exit $ac_status); }; }; then
6674   :
6675 else
6676   echo "$as_me: failed program was:" >&5
6677 cat conftest.$ac_ext >&5
6678 cf_have_incdir=yes
6679 fi
6680 rm -f conftest.$ac_objext conftest.$ac_ext
6681                           CPPFLAGS=$cf_save_CPPFLAGS
6682                         fi
6683                   fi
6684                 fi
6685
6686                 if test "$cf_have_incdir" = no ; then
6687                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6688
6689 echo "${as_me:-configure}:6689: testing adding $cf_add_incdir to include-path ..." 1>&5
6690
6691                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6692
6693                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6694                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6695                   cf_add_incdir="$cf_top_incdir"
6696                 else
6697                   break
6698                 fi
6699           fi
6700         done
6701   done
6702 fi
6703
6704 }
6705
6706 echo "$as_me:6706: checking for $cf_ncuhdr_root header in include-path" >&5
6707 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6708 if test "${cf_cv_ncurses_h+set}" = set; then
6709   echo $ECHO_N "(cached) $ECHO_C" >&6
6710 else
6711
6712         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6713         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6714         for cf_header in $cf_header_list
6715         do
6716
6717         cat >conftest.$ac_ext <<_ACEOF
6718 #line 6718 "configure"
6719 #include "confdefs.h"
6720
6721 #include <$cf_header>
6722 int
6723 main ()
6724 {
6725
6726 #ifdef NCURSES_VERSION
6727
6728 printf("%s\n", NCURSES_VERSION);
6729 #else
6730 #ifdef __NCURSES_H
6731 printf("old\n");
6732 #else
6733         make an error
6734 #endif
6735 #endif
6736
6737   ;
6738   return 0;
6739 }
6740 _ACEOF
6741 rm -f conftest.$ac_objext
6742 if { (eval echo "$as_me:6742: \"$ac_compile\"") >&5
6743   (eval $ac_compile) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); } &&
6747          { ac_try='test -s conftest.$ac_objext'
6748   { (eval echo "$as_me:6748: \"$ac_try\"") >&5
6749   (eval $ac_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:6751: \$? = $ac_status" >&5
6752   (exit $ac_status); }; }; then
6753   cf_cv_ncurses_h=$cf_header
6754
6755 else
6756   echo "$as_me: failed program was:" >&5
6757 cat conftest.$ac_ext >&5
6758 cf_cv_ncurses_h=no
6759 fi
6760 rm -f conftest.$ac_objext conftest.$ac_ext
6761
6762                 test "$cf_cv_ncurses_h" != no && break
6763         done
6764
6765 fi
6766 echo "$as_me:6766: result: $cf_cv_ncurses_h" >&5
6767 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6768
6769 if test "$cf_cv_ncurses_h" != no ; then
6770         cf_cv_ncurses_header=$cf_cv_ncurses_h
6771 else
6772
6773 echo "$as_me:6773: checking for $cf_ncuhdr_root include-path" >&5
6774 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6775 if test "${cf_cv_ncurses_h2+set}" = set; then
6776   echo $ECHO_N "(cached) $ECHO_C" >&6
6777 else
6778
6779         test -n "$verbose" && echo
6780
6781 cf_search=
6782
6783 # collect the current set of include-directories from compiler flags
6784 cf_header_path_list=""
6785 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6786         for cf_header_path in $CPPFLAGS $CFLAGS
6787         do
6788                 case $cf_header_path in #(vi
6789                 -I*)
6790                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6791
6792 test "$cf_header_path" != "NONE" && \
6793 test -d "$cf_header_path" && \
6794  {
6795         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6796         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6797         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6798         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6799         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6800         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"
6801 }
6802
6803                         cf_header_path_list="$cf_header_path_list $cf_search"
6804                         ;;
6805                 esac
6806         done
6807 fi
6808
6809 # add the variations for the package we are looking for
6810
6811 cf_search=
6812
6813 test "/usr" != "$prefix" && \
6814 test -d "/usr" && \
6815 (test $prefix = NONE || test "/usr" != "$prefix") && {
6816         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6817         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6818         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6819         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6820         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6821         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6822 }
6823
6824 test "$prefix" != "NONE" && \
6825 test -d "$prefix" && \
6826  {
6827         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6828         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6829         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6830         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6831         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6832         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6833 }
6834
6835 test "/usr/local" != "$prefix" && \
6836 test -d "/usr/local" && \
6837 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6838         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6839         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6840         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6841         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6842         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6843         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6844 }
6845
6846 test "/opt" != "$prefix" && \
6847 test -d "/opt" && \
6848 (test $prefix = NONE || test "/opt" != "$prefix") && {
6849         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6850         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6851         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6852         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6853         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6854         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6855 }
6856
6857 test "$HOME" != "$prefix" && \
6858 test -d "$HOME" && \
6859 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6860         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6861         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6862         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6863         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6864         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6865         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6866 }
6867
6868 test "$includedir" != NONE && \
6869 test "$includedir" != "/usr/include" && \
6870 test -d "$includedir" && {
6871         test -d $includedir &&    cf_search="$cf_search $includedir"
6872         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6873 }
6874
6875 test "$oldincludedir" != NONE && \
6876 test "$oldincludedir" != "/usr/include" && \
6877 test -d "$oldincludedir" && {
6878         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6879         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6880 }
6881
6882 cf_search="$cf_search $cf_header_path_list"
6883
6884         test -n "$verbose" && echo search path $cf_search
6885         cf_save2_CPPFLAGS="$CPPFLAGS"
6886         for cf_incdir in $cf_search
6887         do
6888
6889 if test -n "$cf_incdir" ; then
6890   for cf_add_incdir in $cf_incdir
6891   do
6892         while test $cf_add_incdir != /usr/include
6893         do
6894           if test -d $cf_add_incdir
6895           then
6896                 cf_have_incdir=no
6897                 if test -n "$CFLAGS$CPPFLAGS" ; then
6898                   # a loop is needed to ensure we can add subdirs of existing dirs
6899                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6900                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6901                           cf_have_incdir=yes; break
6902                         fi
6903                   done
6904                 fi
6905
6906                 if test "$cf_have_incdir" = no ; then
6907                   if test "$cf_add_incdir" = /usr/local/include ; then
6908                         if test "$GCC" = yes
6909                         then
6910                           cf_save_CPPFLAGS=$CPPFLAGS
6911                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6912                           cat >conftest.$ac_ext <<_ACEOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915 #include <stdio.h>
6916 int
6917 main ()
6918 {
6919 printf("Hello")
6920   ;
6921   return 0;
6922 }
6923 _ACEOF
6924 rm -f conftest.$ac_objext
6925 if { (eval echo "$as_me:6925: \"$ac_compile\"") >&5
6926   (eval $ac_compile) 2>&5
6927   ac_status=$?
6928   echo "$as_me:6928: \$? = $ac_status" >&5
6929   (exit $ac_status); } &&
6930          { ac_try='test -s conftest.$ac_objext'
6931   { (eval echo "$as_me:6931: \"$ac_try\"") >&5
6932   (eval $ac_try) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); }; }; then
6936   :
6937 else
6938   echo "$as_me: failed program was:" >&5
6939 cat conftest.$ac_ext >&5
6940 cf_have_incdir=yes
6941 fi
6942 rm -f conftest.$ac_objext conftest.$ac_ext
6943                           CPPFLAGS=$cf_save_CPPFLAGS
6944                         fi
6945                   fi
6946                 fi
6947
6948                 if test "$cf_have_incdir" = no ; then
6949                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6950
6951 echo "${as_me:-configure}:6951: testing adding $cf_add_incdir to include-path ..." 1>&5
6952
6953                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6954
6955                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6956                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6957                   cf_add_incdir="$cf_top_incdir"
6958                 else
6959                   break
6960                 fi
6961           fi
6962         done
6963   done
6964 fi
6965
6966                 for cf_header in \
6967                         ncurses.h \
6968                         curses.h
6969                 do
6970
6971         cat >conftest.$ac_ext <<_ACEOF
6972 #line 6972 "configure"
6973 #include "confdefs.h"
6974
6975 #include <$cf_header>
6976 int
6977 main ()
6978 {
6979
6980 #ifdef NCURSES_VERSION
6981
6982 printf("%s\n", NCURSES_VERSION);
6983 #else
6984 #ifdef __NCURSES_H
6985 printf("old\n");
6986 #else
6987         make an error
6988 #endif
6989 #endif
6990
6991   ;
6992   return 0;
6993 }
6994 _ACEOF
6995 rm -f conftest.$ac_objext
6996 if { (eval echo "$as_me:6996: \"$ac_compile\"") >&5
6997   (eval $ac_compile) 2>&5
6998   ac_status=$?
6999   echo "$as_me:6999: \$? = $ac_status" >&5
7000   (exit $ac_status); } &&
7001          { ac_try='test -s conftest.$ac_objext'
7002   { (eval echo "$as_me:7002: \"$ac_try\"") >&5
7003   (eval $ac_try) 2>&5
7004   ac_status=$?
7005   echo "$as_me:7005: \$? = $ac_status" >&5
7006   (exit $ac_status); }; }; then
7007   cf_cv_ncurses_h2=$cf_header
7008
7009 else
7010   echo "$as_me: failed program was:" >&5
7011 cat conftest.$ac_ext >&5
7012 cf_cv_ncurses_h2=no
7013 fi
7014 rm -f conftest.$ac_objext conftest.$ac_ext
7015
7016                         if test "$cf_cv_ncurses_h2" != no ; then
7017                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7018                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
7019                                 break
7020                         fi
7021                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
7022                 done
7023                 CPPFLAGS="$cf_save2_CPPFLAGS"
7024                 test "$cf_cv_ncurses_h2" != no && break
7025         done
7026         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7026: error: not found" >&5
7027 echo "$as_me: error: not found" >&2;}
7028    { (exit 1); exit 1; }; }
7029
7030 fi
7031 echo "$as_me:7031: result: $cf_cv_ncurses_h2" >&5
7032 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7033
7034         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7035         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7036         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7037                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7038         fi
7039
7040 if test -n "$cf_1st_incdir" ; then
7041   for cf_add_incdir in $cf_1st_incdir
7042   do
7043         while test $cf_add_incdir != /usr/include
7044         do
7045           if test -d $cf_add_incdir
7046           then
7047                 cf_have_incdir=no
7048                 if test -n "$CFLAGS$CPPFLAGS" ; then
7049                   # a loop is needed to ensure we can add subdirs of existing dirs
7050                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7051                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7052                           cf_have_incdir=yes; break
7053                         fi
7054                   done
7055                 fi
7056
7057                 if test "$cf_have_incdir" = no ; then
7058                   if test "$cf_add_incdir" = /usr/local/include ; then
7059                         if test "$GCC" = yes
7060                         then
7061                           cf_save_CPPFLAGS=$CPPFLAGS
7062                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7063                           cat >conftest.$ac_ext <<_ACEOF
7064 #line 7064 "configure"
7065 #include "confdefs.h"
7066 #include <stdio.h>
7067 int
7068 main ()
7069 {
7070 printf("Hello")
7071   ;
7072   return 0;
7073 }
7074 _ACEOF
7075 rm -f conftest.$ac_objext
7076 if { (eval echo "$as_me:7076: \"$ac_compile\"") >&5
7077   (eval $ac_compile) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); } &&
7081          { ac_try='test -s conftest.$ac_objext'
7082   { (eval echo "$as_me:7082: \"$ac_try\"") >&5
7083   (eval $ac_try) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); }; }; then
7087   :
7088 else
7089   echo "$as_me: failed program was:" >&5
7090 cat conftest.$ac_ext >&5
7091 cf_have_incdir=yes
7092 fi
7093 rm -f conftest.$ac_objext conftest.$ac_ext
7094                           CPPFLAGS=$cf_save_CPPFLAGS
7095                         fi
7096                   fi
7097                 fi
7098
7099                 if test "$cf_have_incdir" = no ; then
7100                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7101
7102 echo "${as_me:-configure}:7102: testing adding $cf_add_incdir to include-path ..." 1>&5
7103
7104                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7105
7106                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7107                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7108                   cf_add_incdir="$cf_top_incdir"
7109                 else
7110                   break
7111                 fi
7112           fi
7113         done
7114   done
7115 fi
7116
7117 fi
7118
7119 # Set definitions to allow ifdef'ing for ncurses.h
7120
7121 case $cf_cv_ncurses_header in # (vi
7122 *ncurses.h)
7123         cat >>confdefs.h <<\EOF
7124 #define HAVE_NCURSES_H 1
7125 EOF
7126
7127         ;;
7128 esac
7129
7130 case $cf_cv_ncurses_header in # (vi
7131 ncurses/curses.h|ncurses/ncurses.h)
7132         cat >>confdefs.h <<\EOF
7133 #define HAVE_NCURSES_NCURSES_H 1
7134 EOF
7135
7136         ;;
7137 ncursesw/curses.h|ncursesw/ncurses.h)
7138         cat >>confdefs.h <<\EOF
7139 #define HAVE_NCURSESW_NCURSES_H 1
7140 EOF
7141
7142         ;;
7143 esac
7144
7145 echo "$as_me:7145: checking for terminfo header" >&5
7146 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7147 if test "${cf_cv_term_header+set}" = set; then
7148   echo $ECHO_N "(cached) $ECHO_C" >&6
7149 else
7150
7151 case ${cf_cv_ncurses_header} in #(vi
7152 */ncurses.h|*/ncursesw.h) #(vi
7153         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7154         ;;
7155 *)
7156         cf_term_header=term.h
7157         ;;
7158 esac
7159
7160 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7161 do
7162 cat >conftest.$ac_ext <<_ACEOF
7163 #line 7163 "configure"
7164 #include "confdefs.h"
7165 #include <stdio.h>
7166 #include <${cf_cv_ncurses_header:-curses.h}>
7167 #include <$cf_test>
7168
7169 int
7170 main ()
7171 {
7172 int x = auto_left_margin
7173   ;
7174   return 0;
7175 }
7176 _ACEOF
7177 rm -f conftest.$ac_objext
7178 if { (eval echo "$as_me:7178: \"$ac_compile\"") >&5
7179   (eval $ac_compile) 2>&5
7180   ac_status=$?
7181   echo "$as_me:7181: \$? = $ac_status" >&5
7182   (exit $ac_status); } &&
7183          { ac_try='test -s conftest.$ac_objext'
7184   { (eval echo "$as_me:7184: \"$ac_try\"") >&5
7185   (eval $ac_try) 2>&5
7186   ac_status=$?
7187   echo "$as_me:7187: \$? = $ac_status" >&5
7188   (exit $ac_status); }; }; then
7189
7190         cf_cv_term_header="$cf_test"
7191 else
7192   echo "$as_me: failed program was:" >&5
7193 cat conftest.$ac_ext >&5
7194
7195         cf_cv_term_header=unknown
7196
7197 fi
7198 rm -f conftest.$ac_objext conftest.$ac_ext
7199         test "$cf_cv_term_header" != unknown && break
7200 done
7201
7202 fi
7203 echo "$as_me:7203: result: $cf_cv_term_header" >&5
7204 echo "${ECHO_T}$cf_cv_term_header" >&6
7205
7206 # Set definitions to allow ifdef'ing to accommodate subdirectories
7207
7208 case $cf_cv_term_header in # (vi
7209 *term.h)
7210         cat >>confdefs.h <<\EOF
7211 #define HAVE_TERM_H 1
7212 EOF
7213
7214         ;;
7215 esac
7216
7217 case $cf_cv_term_header in # (vi
7218 ncurses/term.h) #(vi
7219         cat >>confdefs.h <<\EOF
7220 #define HAVE_NCURSES_TERM_H 1
7221 EOF
7222
7223         ;;
7224 ncursesw/term.h)
7225         cat >>confdefs.h <<\EOF
7226 #define HAVE_NCURSESW_TERM_H 1
7227 EOF
7228
7229         ;;
7230 esac
7231
7232 # some applications need this, but should check for NCURSES_VERSION
7233 cat >>confdefs.h <<\EOF
7234 #define NCURSES 1
7235 EOF
7236
7237 echo "$as_me:7237: checking for ncurses version" >&5
7238 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7239 if test "${cf_cv_ncurses_version+set}" = set; then
7240   echo $ECHO_N "(cached) $ECHO_C" >&6
7241 else
7242
7243         cf_cv_ncurses_version=no
7244         cf_tempfile=out$$
7245         rm -f $cf_tempfile
7246         if test "$cross_compiling" = yes; then
7247
7248         # This will not work if the preprocessor splits the line after the
7249         # Autoconf token.  The 'unproto' program does that.
7250         cat > conftest.$ac_ext <<EOF
7251 #include <${cf_cv_ncurses_header:-curses.h}>
7252 #undef Autoconf
7253 #ifdef NCURSES_VERSION
7254 Autoconf NCURSES_VERSION
7255 #else
7256 #ifdef __NCURSES_H
7257 Autoconf "old"
7258 #endif
7259 ;
7260 #endif
7261 EOF
7262         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7263         { (eval echo "$as_me:7263: \"$cf_try\"") >&5
7264   (eval $cf_try) 2>&5
7265   ac_status=$?
7266   echo "$as_me:7266: \$? = $ac_status" >&5
7267   (exit $ac_status); }
7268         if test -f conftest.out ; then
7269                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7270                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7271                 rm -f conftest.out
7272         fi
7273
7274 else
7275   cat >conftest.$ac_ext <<_ACEOF
7276 #line 7276 "configure"
7277 #include "confdefs.h"
7278
7279 #include <${cf_cv_ncurses_header:-curses.h}>
7280 #include <stdio.h>
7281 int main()
7282 {
7283         FILE *fp = fopen("$cf_tempfile", "w");
7284 #ifdef NCURSES_VERSION
7285 # ifdef NCURSES_VERSION_PATCH
7286         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7287 # else
7288         fprintf(fp, "%s\n", NCURSES_VERSION);
7289 # endif
7290 #else
7291 # ifdef __NCURSES_H
7292         fprintf(fp, "old\n");
7293 # else
7294         make an error
7295 # endif
7296 #endif
7297         ${cf_cv_main_return:-return}(0);
7298 }
7299 _ACEOF
7300 rm -f conftest$ac_exeext
7301 if { (eval echo "$as_me:7301: \"$ac_link\"") >&5
7302   (eval $ac_link) 2>&5
7303   ac_status=$?
7304   echo "$as_me:7304: \$? = $ac_status" >&5
7305   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7306   { (eval echo "$as_me:7306: \"$ac_try\"") >&5
7307   (eval $ac_try) 2>&5
7308   ac_status=$?
7309   echo "$as_me:7309: \$? = $ac_status" >&5
7310   (exit $ac_status); }; }; then
7311
7312         cf_cv_ncurses_version=`cat $cf_tempfile`
7313 else
7314   echo "$as_me: program exited with status $ac_status" >&5
7315 echo "$as_me: failed program was:" >&5
7316 cat conftest.$ac_ext >&5
7317 fi
7318 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7319 fi
7320         rm -f $cf_tempfile
7321
7322 fi
7323 echo "$as_me:7323: result: $cf_cv_ncurses_version" >&5
7324 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7325 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
7326 #define NCURSES 1
7327 EOF
7328
7329 cf_nculib_root=ncurses
7330         # This works, except for the special case where we find gpm, but
7331         # ncurses is in a nonstandard location via $LIBS, and we really want
7332         # to link gpm.
7333 cf_ncurses_LIBS=""
7334 cf_ncurses_SAVE="$LIBS"
7335 echo "$as_me:7335: checking for Gpm_Open in -lgpm" >&5
7336 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7337 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7338   echo $ECHO_N "(cached) $ECHO_C" >&6
7339 else
7340   ac_check_lib_save_LIBS=$LIBS
7341 LIBS="-lgpm  $LIBS"
7342 cat >conftest.$ac_ext <<_ACEOF
7343 #line 7343 "configure"
7344 #include "confdefs.h"
7345
7346 /* Override any gcc2 internal prototype to avoid an error.  */
7347 #ifdef __cplusplus
7348 extern "C"
7349 #endif
7350 /* We use char because int might match the return type of a gcc2
7351    builtin and then its argument prototype would still apply.  */
7352 char Gpm_Open ();
7353 int
7354 main ()
7355 {
7356 Gpm_Open ();
7357   ;
7358   return 0;
7359 }
7360 _ACEOF
7361 rm -f conftest.$ac_objext conftest$ac_exeext
7362 if { (eval echo "$as_me:7362: \"$ac_link\"") >&5
7363   (eval $ac_link) 2>&5
7364   ac_status=$?
7365   echo "$as_me:7365: \$? = $ac_status" >&5
7366   (exit $ac_status); } &&
7367          { ac_try='test -s conftest$ac_exeext'
7368   { (eval echo "$as_me:7368: \"$ac_try\"") >&5
7369   (eval $ac_try) 2>&5
7370   ac_status=$?
7371   echo "$as_me:7371: \$? = $ac_status" >&5
7372   (exit $ac_status); }; }; then
7373   ac_cv_lib_gpm_Gpm_Open=yes
7374 else
7375   echo "$as_me: failed program was:" >&5
7376 cat conftest.$ac_ext >&5
7377 ac_cv_lib_gpm_Gpm_Open=no
7378 fi
7379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7380 LIBS=$ac_check_lib_save_LIBS
7381 fi
7382 echo "$as_me:7382: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7383 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7384 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7385   echo "$as_me:7385: checking for initscr in -lgpm" >&5
7386 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7387 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7388   echo $ECHO_N "(cached) $ECHO_C" >&6
7389 else
7390   ac_check_lib_save_LIBS=$LIBS
7391 LIBS="-lgpm  $LIBS"
7392 cat >conftest.$ac_ext <<_ACEOF
7393 #line 7393 "configure"
7394 #include "confdefs.h"
7395
7396 /* Override any gcc2 internal prototype to avoid an error.  */
7397 #ifdef __cplusplus
7398 extern "C"
7399 #endif
7400 /* We use char because int might match the return type of a gcc2
7401    builtin and then its argument prototype would still apply.  */
7402 char initscr ();
7403 int
7404 main ()
7405 {
7406 initscr ();
7407   ;
7408   return 0;
7409 }
7410 _ACEOF
7411 rm -f conftest.$ac_objext conftest$ac_exeext
7412 if { (eval echo "$as_me:7412: \"$ac_link\"") >&5
7413   (eval $ac_link) 2>&5
7414   ac_status=$?
7415   echo "$as_me:7415: \$? = $ac_status" >&5
7416   (exit $ac_status); } &&
7417          { ac_try='test -s conftest$ac_exeext'
7418   { (eval echo "$as_me:7418: \"$ac_try\"") >&5
7419   (eval $ac_try) 2>&5
7420   ac_status=$?
7421   echo "$as_me:7421: \$? = $ac_status" >&5
7422   (exit $ac_status); }; }; then
7423   ac_cv_lib_gpm_initscr=yes
7424 else
7425   echo "$as_me: failed program was:" >&5
7426 cat conftest.$ac_ext >&5
7427 ac_cv_lib_gpm_initscr=no
7428 fi
7429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7430 LIBS=$ac_check_lib_save_LIBS
7431 fi
7432 echo "$as_me:7432: result: $ac_cv_lib_gpm_initscr" >&5
7433 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7434 if test $ac_cv_lib_gpm_initscr = yes; then
7435   LIBS="$cf_ncurses_SAVE"
7436 else
7437   cf_ncurses_LIBS="-lgpm"
7438 fi
7439
7440 fi
7441
7442 case $host_os in #(vi
7443 freebsd*)
7444         # This is only necessary if you are linking against an obsolete
7445         # version of ncurses (but it should do no harm, since it's static).
7446         if test "$cf_nculib_root" = ncurses ; then
7447                 echo "$as_me:7447: checking for tgoto in -lmytinfo" >&5
7448 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7449 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7450   echo $ECHO_N "(cached) $ECHO_C" >&6
7451 else
7452   ac_check_lib_save_LIBS=$LIBS
7453 LIBS="-lmytinfo  $LIBS"
7454 cat >conftest.$ac_ext <<_ACEOF
7455 #line 7455 "configure"
7456 #include "confdefs.h"
7457
7458 /* Override any gcc2 internal prototype to avoid an error.  */
7459 #ifdef __cplusplus
7460 extern "C"
7461 #endif
7462 /* We use char because int might match the return type of a gcc2
7463    builtin and then its argument prototype would still apply.  */
7464 char tgoto ();
7465 int
7466 main ()
7467 {
7468 tgoto ();
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 rm -f conftest.$ac_objext conftest$ac_exeext
7474 if { (eval echo "$as_me:7474: \"$ac_link\"") >&5
7475   (eval $ac_link) 2>&5
7476   ac_status=$?
7477   echo "$as_me:7477: \$? = $ac_status" >&5
7478   (exit $ac_status); } &&
7479          { ac_try='test -s conftest$ac_exeext'
7480   { (eval echo "$as_me:7480: \"$ac_try\"") >&5
7481   (eval $ac_try) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit $ac_status); }; }; then
7485   ac_cv_lib_mytinfo_tgoto=yes
7486 else
7487   echo "$as_me: failed program was:" >&5
7488 cat conftest.$ac_ext >&5
7489 ac_cv_lib_mytinfo_tgoto=no
7490 fi
7491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7492 LIBS=$ac_check_lib_save_LIBS
7493 fi
7494 echo "$as_me:7494: result: $ac_cv_lib_mytinfo_tgoto" >&5
7495 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7496 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7497   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7498 fi
7499
7500         fi
7501         ;;
7502 esac
7503
7504 LIBS="$cf_ncurses_LIBS $LIBS"
7505
7506 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7507 then
7508         LIBS="-l$cf_nculib_root $LIBS"
7509 else
7510
7511         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7512         cf_libdir=""
7513         echo "$as_me:7513: checking for initscr" >&5
7514 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7515 if test "${ac_cv_func_initscr+set}" = set; then
7516   echo $ECHO_N "(cached) $ECHO_C" >&6
7517 else
7518   cat >conftest.$ac_ext <<_ACEOF
7519 #line 7519 "configure"
7520 #include "confdefs.h"
7521 /* System header to define __stub macros and hopefully few prototypes,
7522     which can conflict with char initscr (); below.  */
7523 #include <assert.h>
7524 /* Override any gcc2 internal prototype to avoid an error.  */
7525 #ifdef __cplusplus
7526 extern "C"
7527 #endif
7528 /* We use char because int might match the return type of a gcc2
7529    builtin and then its argument prototype would still apply.  */
7530 char initscr ();
7531 char (*f) ();
7532
7533 int
7534 main ()
7535 {
7536 /* The GNU C library defines this for functions which it implements
7537     to always fail with ENOSYS.  Some functions are actually named
7538     something starting with __ and the normal name is an alias.  */
7539 #if defined (__stub_initscr) || defined (__stub___initscr)
7540 choke me
7541 #else
7542 f = initscr;
7543 #endif
7544
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 rm -f conftest.$ac_objext conftest$ac_exeext
7550 if { (eval echo "$as_me:7550: \"$ac_link\"") >&5
7551   (eval $ac_link) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit $ac_status); } &&
7555          { ac_try='test -s conftest$ac_exeext'
7556   { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557   (eval $ac_try) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit $ac_status); }; }; then
7561   ac_cv_func_initscr=yes
7562 else
7563   echo "$as_me: failed program was:" >&5
7564 cat conftest.$ac_ext >&5
7565 ac_cv_func_initscr=no
7566 fi
7567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7568 fi
7569 echo "$as_me:7569: result: $ac_cv_func_initscr" >&5
7570 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7571 if test $ac_cv_func_initscr = yes; then
7572   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7573 else
7574
7575                 cf_save_LIBS="$LIBS"
7576                 echo "$as_me:7576: checking for initscr in -l$cf_nculib_root" >&5
7577 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7578                 LIBS="-l$cf_nculib_root $LIBS"
7579                 cat >conftest.$ac_ext <<_ACEOF
7580 #line 7580 "configure"
7581 #include "confdefs.h"
7582 #include <${cf_cv_ncurses_header:-curses.h}>
7583 int
7584 main ()
7585 {
7586 initscr()
7587   ;
7588   return 0;
7589 }
7590 _ACEOF
7591 rm -f conftest.$ac_objext conftest$ac_exeext
7592 if { (eval echo "$as_me:7592: \"$ac_link\"") >&5
7593   (eval $ac_link) 2>&5
7594   ac_status=$?
7595   echo "$as_me:7595: \$? = $ac_status" >&5
7596   (exit $ac_status); } &&
7597          { ac_try='test -s conftest$ac_exeext'
7598   { (eval echo "$as_me:7598: \"$ac_try\"") >&5
7599   (eval $ac_try) 2>&5
7600   ac_status=$?
7601   echo "$as_me:7601: \$? = $ac_status" >&5
7602   (exit $ac_status); }; }; then
7603   echo "$as_me:7603: result: yes" >&5
7604 echo "${ECHO_T}yes" >&6
7605                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7606
7607 else
7608   echo "$as_me: failed program was:" >&5
7609 cat conftest.$ac_ext >&5
7610 echo "$as_me:7610: result: no" >&5
7611 echo "${ECHO_T}no" >&6
7612
7613 cf_search=
7614 cf_library_path_list=""
7615 if test -n "${LDFLAGS}${LIBS}" ; then
7616         for cf_library_path in $LDFLAGS $LIBS
7617         do
7618                 case $cf_library_path in #(vi
7619                 -L*)
7620                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7621
7622 test "$cf_library_path" != "NONE" && \
7623 test -d "$cf_library_path" && \
7624  {
7625         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7626         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7627         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7628         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7629         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7630         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"
7631 }
7632
7633                         cf_library_path_list="$cf_library_path_list $cf_search"
7634                         ;;
7635                 esac
7636         done
7637 fi
7638
7639 cf_search=
7640
7641 test "/usr" != "$prefix" && \
7642 test -d "/usr" && \
7643 (test $prefix = NONE || test "/usr" != "$prefix") && {
7644         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7645         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7646         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7647         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7648         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7649         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7650 }
7651
7652 test "$prefix" != "NONE" && \
7653 test -d "$prefix" && \
7654  {
7655         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7656         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7657         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7658         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7659         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7660         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7661 }
7662
7663 test "/usr/local" != "$prefix" && \
7664 test -d "/usr/local" && \
7665 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7666         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7667         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7668         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7669         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7670         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7671         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7672 }
7673
7674 test "/opt" != "$prefix" && \
7675 test -d "/opt" && \
7676 (test $prefix = NONE || test "/opt" != "$prefix") && {
7677         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7678         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7679         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7680         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7681         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7682         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7683 }
7684
7685 test "$HOME" != "$prefix" && \
7686 test -d "$HOME" && \
7687 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7688         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7689         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7690         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7691         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7692         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7693         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7694 }
7695
7696 cf_search="$cf_library_path_list $cf_search"
7697
7698                         for cf_libdir in $cf_search
7699                         do
7700                                 echo "$as_me:7700: checking for -l$cf_nculib_root in $cf_libdir" >&5
7701 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7702                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7703                                 cat >conftest.$ac_ext <<_ACEOF
7704 #line 7704 "configure"
7705 #include "confdefs.h"
7706 #include <${cf_cv_ncurses_header:-curses.h}>
7707 int
7708 main ()
7709 {
7710 initscr()
7711   ;
7712   return 0;
7713 }
7714 _ACEOF
7715 rm -f conftest.$ac_objext conftest$ac_exeext
7716 if { (eval echo "$as_me:7716: \"$ac_link\"") >&5
7717   (eval $ac_link) 2>&5
7718   ac_status=$?
7719   echo "$as_me:7719: \$? = $ac_status" >&5
7720   (exit $ac_status); } &&
7721          { ac_try='test -s conftest$ac_exeext'
7722   { (eval echo "$as_me:7722: \"$ac_try\"") >&5
7723   (eval $ac_try) 2>&5
7724   ac_status=$?
7725   echo "$as_me:7725: \$? = $ac_status" >&5
7726   (exit $ac_status); }; }; then
7727   echo "$as_me:7727: result: yes" >&5
7728 echo "${ECHO_T}yes" >&6
7729                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7730                                          break
7731 else
7732   echo "$as_me: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7734 echo "$as_me:7734: result: no" >&5
7735 echo "${ECHO_T}no" >&6
7736                                          LIBS="$cf_save_LIBS"
7737 fi
7738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7739                         done
7740
7741 fi
7742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7743
7744 fi
7745
7746 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7747
7748 if test $cf_found_library = no ; then
7749         { { echo "$as_me:7749: error: Cannot link $cf_nculib_root library" >&5
7750 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7751    { (exit 1); exit 1; }; }
7752 fi
7753
7754 fi
7755
7756 if test -n "$cf_ncurses_LIBS" ; then
7757         echo "$as_me:7757: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7758 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7759         cf_ncurses_SAVE="$LIBS"
7760         for p in $cf_ncurses_LIBS ; do
7761                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7762                 if test "$q" != "$LIBS" ; then
7763                         LIBS="$q"
7764                 fi
7765         done
7766         cat >conftest.$ac_ext <<_ACEOF
7767 #line 7767 "configure"
7768 #include "confdefs.h"
7769 #include <${cf_cv_ncurses_header:-curses.h}>
7770 int
7771 main ()
7772 {
7773 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7774   ;
7775   return 0;
7776 }
7777 _ACEOF
7778 rm -f conftest.$ac_objext conftest$ac_exeext
7779 if { (eval echo "$as_me:7779: \"$ac_link\"") >&5
7780   (eval $ac_link) 2>&5
7781   ac_status=$?
7782   echo "$as_me:7782: \$? = $ac_status" >&5
7783   (exit $ac_status); } &&
7784          { ac_try='test -s conftest$ac_exeext'
7785   { (eval echo "$as_me:7785: \"$ac_try\"") >&5
7786   (eval $ac_try) 2>&5
7787   ac_status=$?
7788   echo "$as_me:7788: \$? = $ac_status" >&5
7789   (exit $ac_status); }; }; then
7790   echo "$as_me:7790: result: yes" >&5
7791 echo "${ECHO_T}yes" >&6
7792 else
7793   echo "$as_me: failed program was:" >&5
7794 cat conftest.$ac_ext >&5
7795 echo "$as_me:7795: result: no" >&5
7796 echo "${ECHO_T}no" >&6
7797                  LIBS="$cf_ncurses_SAVE"
7798 fi
7799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7800 fi
7801
7802 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7803
7804 cat >>confdefs.h <<EOF
7805 #define $cf_nculib_ROOT 1
7806 EOF
7807
7808 fi
7809
7810         ;;
7811 ncursesw) #(vi
7812
7813 echo "$as_me:7813: checking for multibyte character support" >&5
7814 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7815 if test "${cf_cv_utf8_lib+set}" = set; then
7816   echo $ECHO_N "(cached) $ECHO_C" >&6
7817 else
7818
7819         cf_save_LIBS="$LIBS"
7820         cat >conftest.$ac_ext <<_ACEOF
7821 #line 7821 "configure"
7822 #include "confdefs.h"
7823
7824 #include <stdlib.h>
7825 int
7826 main ()
7827 {
7828 putwc(0,0);
7829   ;
7830   return 0;
7831 }
7832 _ACEOF
7833 rm -f conftest.$ac_objext conftest$ac_exeext
7834 if { (eval echo "$as_me:7834: \"$ac_link\"") >&5
7835   (eval $ac_link) 2>&5
7836   ac_status=$?
7837   echo "$as_me:7837: \$? = $ac_status" >&5
7838   (exit $ac_status); } &&
7839          { ac_try='test -s conftest$ac_exeext'
7840   { (eval echo "$as_me:7840: \"$ac_try\"") >&5
7841   (eval $ac_try) 2>&5
7842   ac_status=$?
7843   echo "$as_me:7843: \$? = $ac_status" >&5
7844   (exit $ac_status); }; }; then
7845   cf_cv_utf8_lib=yes
7846 else
7847   echo "$as_me: failed program was:" >&5
7848 cat conftest.$ac_ext >&5
7849
7850 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7851 # will be set on completion of the AC_TRY_LINK below.
7852 cf_cv_header_path_utf8=
7853 cf_cv_library_path_utf8=
7854
7855 echo "${as_me:-configure}:7855: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7856
7857 cf_save_LIBS="$LIBS"
7858
7859 cat >conftest.$ac_ext <<_ACEOF
7860 #line 7860 "configure"
7861 #include "confdefs.h"
7862
7863 #include <libutf8.h>
7864 int
7865 main ()
7866 {
7867 putwc(0,0);
7868   ;
7869   return 0;
7870 }
7871 _ACEOF
7872 rm -f conftest.$ac_objext conftest$ac_exeext
7873 if { (eval echo "$as_me:7873: \"$ac_link\"") >&5
7874   (eval $ac_link) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); } &&
7878          { ac_try='test -s conftest$ac_exeext'
7879   { (eval echo "$as_me:7879: \"$ac_try\"") >&5
7880   (eval $ac_try) 2>&5
7881   ac_status=$?
7882   echo "$as_me:7882: \$? = $ac_status" >&5
7883   (exit $ac_status); }; }; then
7884
7885         cf_cv_find_linkage_utf8=yes
7886         cf_cv_header_path_utf8=/usr/include
7887         cf_cv_library_path_utf8=/usr/lib
7888
7889 else
7890   echo "$as_me: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892
7893 LIBS="-lutf8  $cf_save_LIBS"
7894
7895 cat >conftest.$ac_ext <<_ACEOF
7896 #line 7896 "configure"
7897 #include "confdefs.h"
7898
7899 #include <libutf8.h>
7900 int
7901 main ()
7902 {
7903 putwc(0,0);
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
7921         cf_cv_find_linkage_utf8=yes
7922         cf_cv_header_path_utf8=/usr/include
7923         cf_cv_library_path_utf8=/usr/lib
7924         cf_cv_library_file_utf8="-lutf8"
7925
7926 else
7927   echo "$as_me: failed program was:" >&5
7928 cat conftest.$ac_ext >&5
7929
7930         cf_cv_find_linkage_utf8=no
7931         LIBS="$cf_save_LIBS"
7932
7933     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7934
7935 echo "${as_me:-configure}:7935: testing find linkage for utf8 library ..." 1>&5
7936
7937 echo "${as_me:-configure}:7937: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7938
7939     cf_save_CPPFLAGS="$CPPFLAGS"
7940     cf_test_CPPFLAGS="$CPPFLAGS"
7941
7942 cf_search=
7943
7944 # collect the current set of include-directories from compiler flags
7945 cf_header_path_list=""
7946 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7947         for cf_header_path in $CPPFLAGS $CFLAGS
7948         do
7949                 case $cf_header_path in #(vi
7950                 -I*)
7951                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7952
7953 test "$cf_header_path" != "NONE" && \
7954 test -d "$cf_header_path" && \
7955  {
7956         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7957         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7958         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7959         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7960         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7961         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7962 }
7963
7964                         cf_header_path_list="$cf_header_path_list $cf_search"
7965                         ;;
7966                 esac
7967         done
7968 fi
7969
7970 # add the variations for the package we are looking for
7971
7972 cf_search=
7973
7974 test "/usr" != "$prefix" && \
7975 test -d "/usr" && \
7976 (test $prefix = NONE || test "/usr" != "$prefix") && {
7977         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7978         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7979         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7980         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7981         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7982         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7983 }
7984
7985 test "$prefix" != "NONE" && \
7986 test -d "$prefix" && \
7987  {
7988         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7989         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7990         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7991         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7992         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7993         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7994 }
7995
7996 test "/usr/local" != "$prefix" && \
7997 test -d "/usr/local" && \
7998 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7999         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8000         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8001         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8002         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8003         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8004         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8005 }
8006
8007 test "/opt" != "$prefix" && \
8008 test -d "/opt" && \
8009 (test $prefix = NONE || test "/opt" != "$prefix") && {
8010         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8011         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8012         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8013         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8014         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8015         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8016 }
8017
8018 test "$HOME" != "$prefix" && \
8019 test -d "$HOME" && \
8020 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8021         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8022         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8023         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8024         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8025         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8026         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8027 }
8028
8029 test "$includedir" != NONE && \
8030 test "$includedir" != "/usr/include" && \
8031 test -d "$includedir" && {
8032         test -d $includedir &&    cf_search="$cf_search $includedir"
8033         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8034 }
8035
8036 test "$oldincludedir" != NONE && \
8037 test "$oldincludedir" != "/usr/include" && \
8038 test -d "$oldincludedir" && {
8039         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8040         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8041 }
8042
8043 cf_search="$cf_search $cf_header_path_list"
8044
8045     for cf_cv_header_path_utf8 in $cf_search
8046     do
8047       if test -d $cf_cv_header_path_utf8 ; then
8048         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8049
8050 echo "${as_me:-configure}:8050: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8051
8052         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8053         cat >conftest.$ac_ext <<_ACEOF
8054 #line 8054 "configure"
8055 #include "confdefs.h"
8056
8057 #include <libutf8.h>
8058 int
8059 main ()
8060 {
8061 putwc(0,0);
8062   ;
8063   return 0;
8064 }
8065 _ACEOF
8066 rm -f conftest.$ac_objext
8067 if { (eval echo "$as_me:8067: \"$ac_compile\"") >&5
8068   (eval $ac_compile) 2>&5
8069   ac_status=$?
8070   echo "$as_me:8070: \$? = $ac_status" >&5
8071   (exit $ac_status); } &&
8072          { ac_try='test -s conftest.$ac_objext'
8073   { (eval echo "$as_me:8073: \"$ac_try\"") >&5
8074   (eval $ac_try) 2>&5
8075   ac_status=$?
8076   echo "$as_me:8076: \$? = $ac_status" >&5
8077   (exit $ac_status); }; }; then
8078
8079             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8080
8081 echo "${as_me:-configure}:8081: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8082
8083             cf_cv_find_linkage_utf8=maybe
8084             cf_test_CPPFLAGS="$CPPFLAGS"
8085             break
8086 else
8087   echo "$as_me: failed program was:" >&5
8088 cat conftest.$ac_ext >&5
8089
8090             CPPFLAGS="$cf_save_CPPFLAGS"
8091
8092 fi
8093 rm -f conftest.$ac_objext conftest.$ac_ext
8094       fi
8095     done
8096
8097     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8098
8099 echo "${as_me:-configure}:8099: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8100
8101       cf_save_LIBS="$LIBS"
8102       cf_save_LDFLAGS="$LDFLAGS"
8103
8104       if test "$cf_cv_find_linkage_utf8" != yes ; then
8105
8106 cf_search=
8107 cf_library_path_list=""
8108 if test -n "${LDFLAGS}${LIBS}" ; then
8109         for cf_library_path in $LDFLAGS $LIBS
8110         do
8111                 case $cf_library_path in #(vi
8112                 -L*)
8113                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8114
8115 test "$cf_library_path" != "NONE" && \
8116 test -d "$cf_library_path" && \
8117  {
8118         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8119         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8120         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8121         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8122         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8123         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8124 }
8125
8126                         cf_library_path_list="$cf_library_path_list $cf_search"
8127                         ;;
8128                 esac
8129         done
8130 fi
8131
8132 cf_search=
8133
8134 test "/usr" != "$prefix" && \
8135 test -d "/usr" && \
8136 (test $prefix = NONE || test "/usr" != "$prefix") && {
8137         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8138         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8139         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8140         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8141         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8142         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8143 }
8144
8145 test "$prefix" != "NONE" && \
8146 test -d "$prefix" && \
8147  {
8148         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8149         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8150         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8151         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8152         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8153         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8154 }
8155
8156 test "/usr/local" != "$prefix" && \
8157 test -d "/usr/local" && \
8158 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8159         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8160         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8161         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8162         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8163         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8164         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8165 }
8166
8167 test "/opt" != "$prefix" && \
8168 test -d "/opt" && \
8169 (test $prefix = NONE || test "/opt" != "$prefix") && {
8170         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8171         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8172         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8173         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8174         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8175         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8176 }
8177
8178 test "$HOME" != "$prefix" && \
8179 test -d "$HOME" && \
8180 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8181         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8182         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8183         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8184         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8185         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8186         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8187 }
8188
8189 cf_search="$cf_library_path_list $cf_search"
8190
8191         for cf_cv_library_path_utf8 in $cf_search
8192         do
8193           if test -d $cf_cv_library_path_utf8 ; then
8194             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8195
8196 echo "${as_me:-configure}:8196: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8197
8198             CPPFLAGS="$cf_test_CPPFLAGS"
8199             LIBS="-lutf8  $cf_save_LIBS"
8200             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8201             cat >conftest.$ac_ext <<_ACEOF
8202 #line 8202 "configure"
8203 #include "confdefs.h"
8204
8205 #include <libutf8.h>
8206 int
8207 main ()
8208 {
8209 putwc(0,0);
8210   ;
8211   return 0;
8212 }
8213 _ACEOF
8214 rm -f conftest.$ac_objext conftest$ac_exeext
8215 if { (eval echo "$as_me:8215: \"$ac_link\"") >&5
8216   (eval $ac_link) 2>&5
8217   ac_status=$?
8218   echo "$as_me:8218: \$? = $ac_status" >&5
8219   (exit $ac_status); } &&
8220          { ac_try='test -s conftest$ac_exeext'
8221   { (eval echo "$as_me:8221: \"$ac_try\"") >&5
8222   (eval $ac_try) 2>&5
8223   ac_status=$?
8224   echo "$as_me:8224: \$? = $ac_status" >&5
8225   (exit $ac_status); }; }; then
8226
8227                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8228
8229 echo "${as_me:-configure}:8229: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8230
8231                 cf_cv_find_linkage_utf8=yes
8232                 cf_cv_library_file_utf8="-lutf8"
8233                 break
8234 else
8235   echo "$as_me: failed program was:" >&5
8236 cat conftest.$ac_ext >&5
8237
8238                 CPPFLAGS="$cf_save_CPPFLAGS"
8239                 LIBS="$cf_save_LIBS"
8240                 LDFLAGS="$cf_save_LDFLAGS"
8241
8242 fi
8243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8244           fi
8245         done
8246         CPPFLAGS="$cf_save_CPPFLAGS"
8247         LDFLAGS="$cf_save_LDFLAGS"
8248       fi
8249
8250     else
8251       cf_cv_find_linkage_utf8=no
8252     fi
8253
8254 fi
8255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8256
8257 fi
8258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8259
8260 LIBS="$cf_save_LIBS"
8261
8262 if test "$cf_cv_find_linkage_utf8" = yes ; then
8263 cf_cv_utf8_lib=add-on
8264 else
8265 cf_cv_utf8_lib=no
8266 fi
8267
8268 fi
8269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8270 fi
8271 echo "$as_me:8271: result: $cf_cv_utf8_lib" >&5
8272 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8273
8274 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8275 # ncurses/ncursesw:
8276 if test "$cf_cv_utf8_lib" = "add-on" ; then
8277         cat >>confdefs.h <<\EOF
8278 #define HAVE_LIBUTF8_H 1
8279 EOF
8280
8281 if test -n "$cf_cv_header_path_utf8" ; then
8282   for cf_add_incdir in $cf_cv_header_path_utf8
8283   do
8284         while test $cf_add_incdir != /usr/include
8285         do
8286           if test -d $cf_add_incdir
8287           then
8288                 cf_have_incdir=no
8289                 if test -n "$CFLAGS$CPPFLAGS" ; then
8290                   # a loop is needed to ensure we can add subdirs of existing dirs
8291                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8292                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8293                           cf_have_incdir=yes; break
8294                         fi
8295                   done
8296                 fi
8297
8298                 if test "$cf_have_incdir" = no ; then
8299                   if test "$cf_add_incdir" = /usr/local/include ; then
8300                         if test "$GCC" = yes
8301                         then
8302                           cf_save_CPPFLAGS=$CPPFLAGS
8303                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8304                           cat >conftest.$ac_ext <<_ACEOF
8305 #line 8305 "configure"
8306 #include "confdefs.h"
8307 #include <stdio.h>
8308 int
8309 main ()
8310 {
8311 printf("Hello")
8312   ;
8313   return 0;
8314 }
8315 _ACEOF
8316 rm -f conftest.$ac_objext
8317 if { (eval echo "$as_me:8317: \"$ac_compile\"") >&5
8318   (eval $ac_compile) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); } &&
8322          { ac_try='test -s conftest.$ac_objext'
8323   { (eval echo "$as_me:8323: \"$ac_try\"") >&5
8324   (eval $ac_try) 2>&5
8325   ac_status=$?
8326   echo "$as_me:8326: \$? = $ac_status" >&5
8327   (exit $ac_status); }; }; then
8328   :
8329 else
8330   echo "$as_me: failed program was:" >&5
8331 cat conftest.$ac_ext >&5
8332 cf_have_incdir=yes
8333 fi
8334 rm -f conftest.$ac_objext conftest.$ac_ext
8335                           CPPFLAGS=$cf_save_CPPFLAGS
8336                         fi
8337                   fi
8338                 fi
8339
8340                 if test "$cf_have_incdir" = no ; then
8341                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8342
8343 echo "${as_me:-configure}:8343: testing adding $cf_add_incdir to include-path ..." 1>&5
8344
8345                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8346
8347                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8348                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8349                   cf_add_incdir="$cf_top_incdir"
8350                 else
8351                   break
8352                 fi
8353           fi
8354         done
8355   done
8356 fi
8357
8358 if test -n "$cf_cv_library_path_utf8" ; then
8359   for cf_add_libdir in $cf_cv_library_path_utf8
8360   do
8361     if test $cf_add_libdir = /usr/lib ; then
8362       :
8363     elif test -d $cf_add_libdir
8364     then
8365       cf_have_libdir=no
8366       if test -n "$LDFLAGS$LIBS" ; then
8367         # a loop is needed to ensure we can add subdirs of existing dirs
8368         for cf_test_libdir in $LDFLAGS $LIBS ; do
8369           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8370             cf_have_libdir=yes; break
8371           fi
8372         done
8373       fi
8374       if test "$cf_have_libdir" = no ; then
8375         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8376
8377 echo "${as_me:-configure}:8377: testing adding $cf_add_libdir to library-path ..." 1>&5
8378
8379         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8380       fi
8381     fi
8382   done
8383 fi
8384
8385         LIBS="$cf_cv_library_file_utf8 $LIBS"
8386 fi
8387
8388 cf_ncuconfig_root=ncursesw
8389
8390 echo "Looking for ${cf_ncuconfig_root}-config"
8391
8392 if test -n "$ac_tool_prefix"; then
8393   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8394   do
8395     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8396 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8397 echo "$as_me:8397: checking for $ac_word" >&5
8398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8399 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8400   echo $ECHO_N "(cached) $ECHO_C" >&6
8401 else
8402   if test -n "$NCURSES_CONFIG"; then
8403   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8404 else
8405   ac_save_IFS=$IFS; IFS=$ac_path_separator
8406 ac_dummy="$PATH"
8407 for ac_dir in $ac_dummy; do
8408   IFS=$ac_save_IFS
8409   test -z "$ac_dir" && ac_dir=.
8410   $as_executable_p "$ac_dir/$ac_word" || continue
8411 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8412 echo "$as_me:8412: found $ac_dir/$ac_word" >&5
8413 break
8414 done
8415
8416 fi
8417 fi
8418 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8419 if test -n "$NCURSES_CONFIG"; then
8420   echo "$as_me:8420: result: $NCURSES_CONFIG" >&5
8421 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8422 else
8423   echo "$as_me:8423: result: no" >&5
8424 echo "${ECHO_T}no" >&6
8425 fi
8426
8427     test -n "$NCURSES_CONFIG" && break
8428   done
8429 fi
8430 if test -z "$NCURSES_CONFIG"; then
8431   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8432   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8433 do
8434   # Extract the first word of "$ac_prog", so it can be a program name with args.
8435 set dummy $ac_prog; ac_word=$2
8436 echo "$as_me:8436: checking for $ac_word" >&5
8437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8438 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8439   echo $ECHO_N "(cached) $ECHO_C" >&6
8440 else
8441   if test -n "$ac_ct_NCURSES_CONFIG"; then
8442   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8443 else
8444   ac_save_IFS=$IFS; IFS=$ac_path_separator
8445 ac_dummy="$PATH"
8446 for ac_dir in $ac_dummy; do
8447   IFS=$ac_save_IFS
8448   test -z "$ac_dir" && ac_dir=.
8449   $as_executable_p "$ac_dir/$ac_word" || continue
8450 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8451 echo "$as_me:8451: found $ac_dir/$ac_word" >&5
8452 break
8453 done
8454
8455 fi
8456 fi
8457 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8458 if test -n "$ac_ct_NCURSES_CONFIG"; then
8459   echo "$as_me:8459: result: $ac_ct_NCURSES_CONFIG" >&5
8460 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8461 else
8462   echo "$as_me:8462: result: no" >&5
8463 echo "${ECHO_T}no" >&6
8464 fi
8465
8466   test -n "$ac_ct_NCURSES_CONFIG" && break
8467 done
8468 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8469
8470   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8471 fi
8472
8473 if test "$NCURSES_CONFIG" != none ; then
8474
8475 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8476 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
8477
8478 # even with config script, some packages use no-override for curses.h
8479
8480 echo "$as_me:8480: checking if we have identified curses headers" >&5
8481 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8482 if test "${cf_cv_ncurses_header+set}" = set; then
8483   echo $ECHO_N "(cached) $ECHO_C" >&6
8484 else
8485
8486 cf_cv_ncurses_header=none
8487 for cf_header in  \
8488     ncursesw/ncurses.h \
8489         ncursesw/curses.h \
8490         ncurses.h \
8491         curses.h
8492 do
8493 cat >conftest.$ac_ext <<_ACEOF
8494 #line 8494 "configure"
8495 #include "confdefs.h"
8496 #include <${cf_header}>
8497 int
8498 main ()
8499 {
8500 initscr(); tgoto("?", 0,0)
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505 rm -f conftest.$ac_objext
8506 if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
8507   (eval $ac_compile) 2>&5
8508   ac_status=$?
8509   echo "$as_me:8509: \$? = $ac_status" >&5
8510   (exit $ac_status); } &&
8511          { ac_try='test -s conftest.$ac_objext'
8512   { (eval echo "$as_me:8512: \"$ac_try\"") >&5
8513   (eval $ac_try) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit $ac_status); }; }; then
8517   cf_cv_ncurses_header=$cf_header; break
8518 else
8519   echo "$as_me: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 fi
8522 rm -f conftest.$ac_objext conftest.$ac_ext
8523 done
8524
8525 fi
8526 echo "$as_me:8526: result: $cf_cv_ncurses_header" >&5
8527 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8528
8529 if test "$cf_cv_ncurses_header" = none ; then
8530         { { echo "$as_me:8530: error: No curses header-files found" >&5
8531 echo "$as_me: error: No curses header-files found" >&2;}
8532    { (exit 1); exit 1; }; }
8533 fi
8534
8535 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8536
8537 for ac_header in $cf_cv_ncurses_header
8538 do
8539 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8540 echo "$as_me:8540: checking for $ac_header" >&5
8541 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8542 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8543   echo $ECHO_N "(cached) $ECHO_C" >&6
8544 else
8545   cat >conftest.$ac_ext <<_ACEOF
8546 #line 8546 "configure"
8547 #include "confdefs.h"
8548 #include <$ac_header>
8549 _ACEOF
8550 if { (eval echo "$as_me:8550: \"$ac_cpp conftest.$ac_ext\"") >&5
8551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8552   ac_status=$?
8553   egrep -v '^ *\+' conftest.er1 >conftest.err
8554   rm -f conftest.er1
8555   cat conftest.err >&5
8556   echo "$as_me:8556: \$? = $ac_status" >&5
8557   (exit $ac_status); } >/dev/null; then
8558   if test -s conftest.err; then
8559     ac_cpp_err=$ac_c_preproc_warn_flag
8560   else
8561     ac_cpp_err=
8562   fi
8563 else
8564   ac_cpp_err=yes
8565 fi
8566 if test -z "$ac_cpp_err"; then
8567   eval "$as_ac_Header=yes"
8568 else
8569   echo "$as_me: failed program was:" >&5
8570   cat conftest.$ac_ext >&5
8571   eval "$as_ac_Header=no"
8572 fi
8573 rm -f conftest.err conftest.$ac_ext
8574 fi
8575 echo "$as_me:8575: result: `eval echo '${'$as_ac_Header'}'`" >&5
8576 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8577 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8578   cat >>confdefs.h <<EOF
8579 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8580 EOF
8581
8582 fi
8583 done
8584
8585 cat >>confdefs.h <<\EOF
8586 #define NCURSES 1
8587 EOF
8588
8589 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8590
8591 cat >>confdefs.h <<EOF
8592 #define $cf_nculib_ROOT 1
8593 EOF
8594
8595 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8596
8597 else
8598
8599 cf_ncuhdr_root=ncursesw
8600
8601 test -n "$cf_cv_curses_dir" && \
8602 test "$cf_cv_curses_dir" != "no" && { \
8603
8604 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8605   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8606   do
8607         while test $cf_add_incdir != /usr/include
8608         do
8609           if test -d $cf_add_incdir
8610           then
8611                 cf_have_incdir=no
8612                 if test -n "$CFLAGS$CPPFLAGS" ; then
8613                   # a loop is needed to ensure we can add subdirs of existing dirs
8614                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8615                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8616                           cf_have_incdir=yes; break
8617                         fi
8618                   done
8619                 fi
8620
8621                 if test "$cf_have_incdir" = no ; then
8622                   if test "$cf_add_incdir" = /usr/local/include ; then
8623                         if test "$GCC" = yes
8624                         then
8625                           cf_save_CPPFLAGS=$CPPFLAGS
8626                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8627                           cat >conftest.$ac_ext <<_ACEOF
8628 #line 8628 "configure"
8629 #include "confdefs.h"
8630 #include <stdio.h>
8631 int
8632 main ()
8633 {
8634 printf("Hello")
8635   ;
8636   return 0;
8637 }
8638 _ACEOF
8639 rm -f conftest.$ac_objext
8640 if { (eval echo "$as_me:8640: \"$ac_compile\"") >&5
8641   (eval $ac_compile) 2>&5
8642   ac_status=$?
8643   echo "$as_me:8643: \$? = $ac_status" >&5
8644   (exit $ac_status); } &&
8645          { ac_try='test -s conftest.$ac_objext'
8646   { (eval echo "$as_me:8646: \"$ac_try\"") >&5
8647   (eval $ac_try) 2>&5
8648   ac_status=$?
8649   echo "$as_me:8649: \$? = $ac_status" >&5
8650   (exit $ac_status); }; }; then
8651   :
8652 else
8653   echo "$as_me: failed program was:" >&5
8654 cat conftest.$ac_ext >&5
8655 cf_have_incdir=yes
8656 fi
8657 rm -f conftest.$ac_objext conftest.$ac_ext
8658                           CPPFLAGS=$cf_save_CPPFLAGS
8659                         fi
8660                   fi
8661                 fi
8662
8663                 if test "$cf_have_incdir" = no ; then
8664                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8665
8666 echo "${as_me:-configure}:8666: testing adding $cf_add_incdir to include-path ..." 1>&5
8667
8668                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8669
8670                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8671                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8672                   cf_add_incdir="$cf_top_incdir"
8673                 else
8674                   break
8675                 fi
8676           fi
8677         done
8678   done
8679 fi
8680
8681 }
8682
8683 echo "$as_me:8683: checking for $cf_ncuhdr_root header in include-path" >&5
8684 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8685 if test "${cf_cv_ncurses_h+set}" = set; then
8686   echo $ECHO_N "(cached) $ECHO_C" >&6
8687 else
8688
8689         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8690         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8691         for cf_header in $cf_header_list
8692         do
8693
8694         cat >conftest.$ac_ext <<_ACEOF
8695 #line 8695 "configure"
8696 #include "confdefs.h"
8697
8698 #define _XOPEN_SOURCE_EXTENDED
8699 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
8700 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
8701
8702 #include <$cf_header>
8703 int
8704 main ()
8705 {
8706
8707 #ifdef NCURSES_VERSION
8708
8709 #ifndef WACS_BSSB
8710         make an error
8711 #endif
8712
8713 printf("%s\n", NCURSES_VERSION);
8714 #else
8715 #ifdef __NCURSES_H
8716 printf("old\n");
8717 #else
8718         make an error
8719 #endif
8720 #endif
8721
8722   ;
8723   return 0;
8724 }
8725 _ACEOF
8726 rm -f conftest.$ac_objext
8727 if { (eval echo "$as_me:8727: \"$ac_compile\"") >&5
8728   (eval $ac_compile) 2>&5
8729   ac_status=$?
8730   echo "$as_me:8730: \$? = $ac_status" >&5
8731   (exit $ac_status); } &&
8732          { ac_try='test -s conftest.$ac_objext'
8733   { (eval echo "$as_me:8733: \"$ac_try\"") >&5
8734   (eval $ac_try) 2>&5
8735   ac_status=$?
8736   echo "$as_me:8736: \$? = $ac_status" >&5
8737   (exit $ac_status); }; }; then
8738   cf_cv_ncurses_h=$cf_header
8739
8740 else
8741   echo "$as_me: failed program was:" >&5
8742 cat conftest.$ac_ext >&5
8743 cf_cv_ncurses_h=no
8744 fi
8745 rm -f conftest.$ac_objext conftest.$ac_ext
8746
8747                 test "$cf_cv_ncurses_h" != no && break
8748         done
8749
8750 fi
8751 echo "$as_me:8751: result: $cf_cv_ncurses_h" >&5
8752 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8753
8754 if test "$cf_cv_ncurses_h" != no ; then
8755         cf_cv_ncurses_header=$cf_cv_ncurses_h
8756 else
8757
8758 echo "$as_me:8758: checking for $cf_ncuhdr_root include-path" >&5
8759 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8760 if test "${cf_cv_ncurses_h2+set}" = set; then
8761   echo $ECHO_N "(cached) $ECHO_C" >&6
8762 else
8763
8764         test -n "$verbose" && echo
8765
8766 cf_search=
8767
8768 # collect the current set of include-directories from compiler flags
8769 cf_header_path_list=""
8770 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8771         for cf_header_path in $CPPFLAGS $CFLAGS
8772         do
8773                 case $cf_header_path in #(vi
8774                 -I*)
8775                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8776
8777 test "$cf_header_path" != "NONE" && \
8778 test -d "$cf_header_path" && \
8779  {
8780         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8781         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8782         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8783         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8784         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8785         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"
8786 }
8787
8788                         cf_header_path_list="$cf_header_path_list $cf_search"
8789                         ;;
8790                 esac
8791         done
8792 fi
8793
8794 # add the variations for the package we are looking for
8795
8796 cf_search=
8797
8798 test "/usr" != "$prefix" && \
8799 test -d "/usr" && \
8800 (test $prefix = NONE || test "/usr" != "$prefix") && {
8801         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8802         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8803         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8804         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8805         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8806         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8807 }
8808
8809 test "$prefix" != "NONE" && \
8810 test -d "$prefix" && \
8811  {
8812         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8813         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8814         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8815         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8816         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8817         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8818 }
8819
8820 test "/usr/local" != "$prefix" && \
8821 test -d "/usr/local" && \
8822 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8823         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8824         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8825         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8826         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8827         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8828         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8829 }
8830
8831 test "/opt" != "$prefix" && \
8832 test -d "/opt" && \
8833 (test $prefix = NONE || test "/opt" != "$prefix") && {
8834         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8835         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8836         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8837         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8838         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8839         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8840 }
8841
8842 test "$HOME" != "$prefix" && \
8843 test -d "$HOME" && \
8844 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8845         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8846         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8847         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8848         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8849         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8850         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8851 }
8852
8853 test "$includedir" != NONE && \
8854 test "$includedir" != "/usr/include" && \
8855 test -d "$includedir" && {
8856         test -d $includedir &&    cf_search="$cf_search $includedir"
8857         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8858 }
8859
8860 test "$oldincludedir" != NONE && \
8861 test "$oldincludedir" != "/usr/include" && \
8862 test -d "$oldincludedir" && {
8863         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8864         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8865 }
8866
8867 cf_search="$cf_search $cf_header_path_list"
8868
8869         test -n "$verbose" && echo search path $cf_search
8870         cf_save2_CPPFLAGS="$CPPFLAGS"
8871         for cf_incdir in $cf_search
8872         do
8873
8874 if test -n "$cf_incdir" ; then
8875   for cf_add_incdir in $cf_incdir
8876   do
8877         while test $cf_add_incdir != /usr/include
8878         do
8879           if test -d $cf_add_incdir
8880           then
8881                 cf_have_incdir=no
8882                 if test -n "$CFLAGS$CPPFLAGS" ; then
8883                   # a loop is needed to ensure we can add subdirs of existing dirs
8884                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8885                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8886                           cf_have_incdir=yes; break
8887                         fi
8888                   done
8889                 fi
8890
8891                 if test "$cf_have_incdir" = no ; then
8892                   if test "$cf_add_incdir" = /usr/local/include ; then
8893                         if test "$GCC" = yes
8894                         then
8895                           cf_save_CPPFLAGS=$CPPFLAGS
8896                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8897                           cat >conftest.$ac_ext <<_ACEOF
8898 #line 8898 "configure"
8899 #include "confdefs.h"
8900 #include <stdio.h>
8901 int
8902 main ()
8903 {
8904 printf("Hello")
8905   ;
8906   return 0;
8907 }
8908 _ACEOF
8909 rm -f conftest.$ac_objext
8910 if { (eval echo "$as_me:8910: \"$ac_compile\"") >&5
8911   (eval $ac_compile) 2>&5
8912   ac_status=$?
8913   echo "$as_me:8913: \$? = $ac_status" >&5
8914   (exit $ac_status); } &&
8915          { ac_try='test -s conftest.$ac_objext'
8916   { (eval echo "$as_me:8916: \"$ac_try\"") >&5
8917   (eval $ac_try) 2>&5
8918   ac_status=$?
8919   echo "$as_me:8919: \$? = $ac_status" >&5
8920   (exit $ac_status); }; }; then
8921   :
8922 else
8923   echo "$as_me: failed program was:" >&5
8924 cat conftest.$ac_ext >&5
8925 cf_have_incdir=yes
8926 fi
8927 rm -f conftest.$ac_objext conftest.$ac_ext
8928                           CPPFLAGS=$cf_save_CPPFLAGS
8929                         fi
8930                   fi
8931                 fi
8932
8933                 if test "$cf_have_incdir" = no ; then
8934                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8935
8936 echo "${as_me:-configure}:8936: testing adding $cf_add_incdir to include-path ..." 1>&5
8937
8938                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8939
8940                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8941                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8942                   cf_add_incdir="$cf_top_incdir"
8943                 else
8944                   break
8945                 fi
8946           fi
8947         done
8948   done
8949 fi
8950
8951                 for cf_header in \
8952                         ncurses.h \
8953                         curses.h
8954                 do
8955
8956         cat >conftest.$ac_ext <<_ACEOF
8957 #line 8957 "configure"
8958 #include "confdefs.h"
8959
8960 #include <$cf_header>
8961 int
8962 main ()
8963 {
8964
8965 #ifdef NCURSES_VERSION
8966
8967 printf("%s\n", NCURSES_VERSION);
8968 #else
8969 #ifdef __NCURSES_H
8970 printf("old\n");
8971 #else
8972         make an error
8973 #endif
8974 #endif
8975
8976   ;
8977   return 0;
8978 }
8979 _ACEOF
8980 rm -f conftest.$ac_objext
8981 if { (eval echo "$as_me:8981: \"$ac_compile\"") >&5
8982   (eval $ac_compile) 2>&5
8983   ac_status=$?
8984   echo "$as_me:8984: \$? = $ac_status" >&5
8985   (exit $ac_status); } &&
8986          { ac_try='test -s conftest.$ac_objext'
8987   { (eval echo "$as_me:8987: \"$ac_try\"") >&5
8988   (eval $ac_try) 2>&5
8989   ac_status=$?
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); }; }; then
8992   cf_cv_ncurses_h2=$cf_header
8993
8994 else
8995   echo "$as_me: failed program was:" >&5
8996 cat conftest.$ac_ext >&5
8997 cf_cv_ncurses_h2=no
8998 fi
8999 rm -f conftest.$ac_objext conftest.$ac_ext
9000
9001                         if test "$cf_cv_ncurses_h2" != no ; then
9002                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9003                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
9004                                 break
9005                         fi
9006                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
9007                 done
9008                 CPPFLAGS="$cf_save2_CPPFLAGS"
9009                 test "$cf_cv_ncurses_h2" != no && break
9010         done
9011         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9011: error: not found" >&5
9012 echo "$as_me: error: not found" >&2;}
9013    { (exit 1); exit 1; }; }
9014
9015 fi
9016 echo "$as_me:9016: result: $cf_cv_ncurses_h2" >&5
9017 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9018
9019         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9020         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9021         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9022                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9023         fi
9024
9025 if test -n "$cf_1st_incdir" ; then
9026   for cf_add_incdir in $cf_1st_incdir
9027   do
9028         while test $cf_add_incdir != /usr/include
9029         do
9030           if test -d $cf_add_incdir
9031           then
9032                 cf_have_incdir=no
9033                 if test -n "$CFLAGS$CPPFLAGS" ; then
9034                   # a loop is needed to ensure we can add subdirs of existing dirs
9035                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9036                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9037                           cf_have_incdir=yes; break
9038                         fi
9039                   done
9040                 fi
9041
9042                 if test "$cf_have_incdir" = no ; then
9043                   if test "$cf_add_incdir" = /usr/local/include ; then
9044                         if test "$GCC" = yes
9045                         then
9046                           cf_save_CPPFLAGS=$CPPFLAGS
9047                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9048                           cat >conftest.$ac_ext <<_ACEOF
9049 #line 9049 "configure"
9050 #include "confdefs.h"
9051 #include <stdio.h>
9052 int
9053 main ()
9054 {
9055 printf("Hello")
9056   ;
9057   return 0;
9058 }
9059 _ACEOF
9060 rm -f conftest.$ac_objext
9061 if { (eval echo "$as_me:9061: \"$ac_compile\"") >&5
9062   (eval $ac_compile) 2>&5
9063   ac_status=$?
9064   echo "$as_me:9064: \$? = $ac_status" >&5
9065   (exit $ac_status); } &&
9066          { ac_try='test -s conftest.$ac_objext'
9067   { (eval echo "$as_me:9067: \"$ac_try\"") >&5
9068   (eval $ac_try) 2>&5
9069   ac_status=$?
9070   echo "$as_me:9070: \$? = $ac_status" >&5
9071   (exit $ac_status); }; }; then
9072   :
9073 else
9074   echo "$as_me: failed program was:" >&5
9075 cat conftest.$ac_ext >&5
9076 cf_have_incdir=yes
9077 fi
9078 rm -f conftest.$ac_objext conftest.$ac_ext
9079                           CPPFLAGS=$cf_save_CPPFLAGS
9080                         fi
9081                   fi
9082                 fi
9083
9084                 if test "$cf_have_incdir" = no ; then
9085                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9086
9087 echo "${as_me:-configure}:9087: testing adding $cf_add_incdir to include-path ..." 1>&5
9088
9089                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9090
9091                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9092                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9093                   cf_add_incdir="$cf_top_incdir"
9094                 else
9095                   break
9096                 fi
9097           fi
9098         done
9099   done
9100 fi
9101
9102 fi
9103
9104 # Set definitions to allow ifdef'ing for ncurses.h
9105
9106 case $cf_cv_ncurses_header in # (vi
9107 *ncurses.h)
9108         cat >>confdefs.h <<\EOF
9109 #define HAVE_NCURSES_H 1
9110 EOF
9111
9112         ;;
9113 esac
9114
9115 case $cf_cv_ncurses_header in # (vi
9116 ncurses/curses.h|ncurses/ncurses.h)
9117         cat >>confdefs.h <<\EOF
9118 #define HAVE_NCURSES_NCURSES_H 1
9119 EOF
9120
9121         ;;
9122 ncursesw/curses.h|ncursesw/ncurses.h)
9123         cat >>confdefs.h <<\EOF
9124 #define HAVE_NCURSESW_NCURSES_H 1
9125 EOF
9126
9127         ;;
9128 esac
9129
9130 echo "$as_me:9130: checking for terminfo header" >&5
9131 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9132 if test "${cf_cv_term_header+set}" = set; then
9133   echo $ECHO_N "(cached) $ECHO_C" >&6
9134 else
9135
9136 case ${cf_cv_ncurses_header} in #(vi
9137 */ncurses.h|*/ncursesw.h) #(vi
9138         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9139         ;;
9140 *)
9141         cf_term_header=term.h
9142         ;;
9143 esac
9144
9145 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9146 do
9147 cat >conftest.$ac_ext <<_ACEOF
9148 #line 9148 "configure"
9149 #include "confdefs.h"
9150 #include <stdio.h>
9151 #include <${cf_cv_ncurses_header:-curses.h}>
9152 #include <$cf_test>
9153
9154 int
9155 main ()
9156 {
9157 int x = auto_left_margin
9158   ;
9159   return 0;
9160 }
9161 _ACEOF
9162 rm -f conftest.$ac_objext
9163 if { (eval echo "$as_me:9163: \"$ac_compile\"") >&5
9164   (eval $ac_compile) 2>&5
9165   ac_status=$?
9166   echo "$as_me:9166: \$? = $ac_status" >&5
9167   (exit $ac_status); } &&
9168          { ac_try='test -s conftest.$ac_objext'
9169   { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9170   (eval $ac_try) 2>&5
9171   ac_status=$?
9172   echo "$as_me:9172: \$? = $ac_status" >&5
9173   (exit $ac_status); }; }; then
9174
9175         cf_cv_term_header="$cf_test"
9176 else
9177   echo "$as_me: failed program was:" >&5
9178 cat conftest.$ac_ext >&5
9179
9180         cf_cv_term_header=unknown
9181
9182 fi
9183 rm -f conftest.$ac_objext conftest.$ac_ext
9184         test "$cf_cv_term_header" != unknown && break
9185 done
9186
9187 fi
9188 echo "$as_me:9188: result: $cf_cv_term_header" >&5
9189 echo "${ECHO_T}$cf_cv_term_header" >&6
9190
9191 # Set definitions to allow ifdef'ing to accommodate subdirectories
9192
9193 case $cf_cv_term_header in # (vi
9194 *term.h)
9195         cat >>confdefs.h <<\EOF
9196 #define HAVE_TERM_H 1
9197 EOF
9198
9199         ;;
9200 esac
9201
9202 case $cf_cv_term_header in # (vi
9203 ncurses/term.h) #(vi
9204         cat >>confdefs.h <<\EOF
9205 #define HAVE_NCURSES_TERM_H 1
9206 EOF
9207
9208         ;;
9209 ncursesw/term.h)
9210         cat >>confdefs.h <<\EOF
9211 #define HAVE_NCURSESW_TERM_H 1
9212 EOF
9213
9214         ;;
9215 esac
9216
9217 # some applications need this, but should check for NCURSES_VERSION
9218 cat >>confdefs.h <<\EOF
9219 #define NCURSES 1
9220 EOF
9221
9222 echo "$as_me:9222: checking for ncurses version" >&5
9223 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9224 if test "${cf_cv_ncurses_version+set}" = set; then
9225   echo $ECHO_N "(cached) $ECHO_C" >&6
9226 else
9227
9228         cf_cv_ncurses_version=no
9229         cf_tempfile=out$$
9230         rm -f $cf_tempfile
9231         if test "$cross_compiling" = yes; then
9232
9233         # This will not work if the preprocessor splits the line after the
9234         # Autoconf token.  The 'unproto' program does that.
9235         cat > conftest.$ac_ext <<EOF
9236 #include <${cf_cv_ncurses_header:-curses.h}>
9237 #undef Autoconf
9238 #ifdef NCURSES_VERSION
9239 Autoconf NCURSES_VERSION
9240 #else
9241 #ifdef __NCURSES_H
9242 Autoconf "old"
9243 #endif
9244 ;
9245 #endif
9246 EOF
9247         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9248         { (eval echo "$as_me:9248: \"$cf_try\"") >&5
9249   (eval $cf_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); }
9253         if test -f conftest.out ; then
9254                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9255                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9256                 rm -f conftest.out
9257         fi
9258
9259 else
9260   cat >conftest.$ac_ext <<_ACEOF
9261 #line 9261 "configure"
9262 #include "confdefs.h"
9263
9264 #include <${cf_cv_ncurses_header:-curses.h}>
9265 #include <stdio.h>
9266 int main()
9267 {
9268         FILE *fp = fopen("$cf_tempfile", "w");
9269 #ifdef NCURSES_VERSION
9270 # ifdef NCURSES_VERSION_PATCH
9271         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9272 # else
9273         fprintf(fp, "%s\n", NCURSES_VERSION);
9274 # endif
9275 #else
9276 # ifdef __NCURSES_H
9277         fprintf(fp, "old\n");
9278 # else
9279         make an error
9280 # endif
9281 #endif
9282         ${cf_cv_main_return:-return}(0);
9283 }
9284 _ACEOF
9285 rm -f conftest$ac_exeext
9286 if { (eval echo "$as_me:9286: \"$ac_link\"") >&5
9287   (eval $ac_link) 2>&5
9288   ac_status=$?
9289   echo "$as_me:9289: \$? = $ac_status" >&5
9290   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9291   { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9292   (eval $ac_try) 2>&5
9293   ac_status=$?
9294   echo "$as_me:9294: \$? = $ac_status" >&5
9295   (exit $ac_status); }; }; then
9296
9297         cf_cv_ncurses_version=`cat $cf_tempfile`
9298 else
9299   echo "$as_me: program exited with status $ac_status" >&5
9300 echo "$as_me: failed program was:" >&5
9301 cat conftest.$ac_ext >&5
9302 fi
9303 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9304 fi
9305         rm -f $cf_tempfile
9306
9307 fi
9308 echo "$as_me:9308: result: $cf_cv_ncurses_version" >&5
9309 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9310 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
9311 #define NCURSES 1
9312 EOF
9313
9314 cf_nculib_root=ncursesw
9315         # This works, except for the special case where we find gpm, but
9316         # ncurses is in a nonstandard location via $LIBS, and we really want
9317         # to link gpm.
9318 cf_ncurses_LIBS=""
9319 cf_ncurses_SAVE="$LIBS"
9320 echo "$as_me:9320: checking for Gpm_Open in -lgpm" >&5
9321 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9322 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9323   echo $ECHO_N "(cached) $ECHO_C" >&6
9324 else
9325   ac_check_lib_save_LIBS=$LIBS
9326 LIBS="-lgpm  $LIBS"
9327 cat >conftest.$ac_ext <<_ACEOF
9328 #line 9328 "configure"
9329 #include "confdefs.h"
9330
9331 /* Override any gcc2 internal prototype to avoid an error.  */
9332 #ifdef __cplusplus
9333 extern "C"
9334 #endif
9335 /* We use char because int might match the return type of a gcc2
9336    builtin and then its argument prototype would still apply.  */
9337 char Gpm_Open ();
9338 int
9339 main ()
9340 {
9341 Gpm_Open ();
9342   ;
9343   return 0;
9344 }
9345 _ACEOF
9346 rm -f conftest.$ac_objext conftest$ac_exeext
9347 if { (eval echo "$as_me:9347: \"$ac_link\"") >&5
9348   (eval $ac_link) 2>&5
9349   ac_status=$?
9350   echo "$as_me:9350: \$? = $ac_status" >&5
9351   (exit $ac_status); } &&
9352          { ac_try='test -s conftest$ac_exeext'
9353   { (eval echo "$as_me:9353: \"$ac_try\"") >&5
9354   (eval $ac_try) 2>&5
9355   ac_status=$?
9356   echo "$as_me:9356: \$? = $ac_status" >&5
9357   (exit $ac_status); }; }; then
9358   ac_cv_lib_gpm_Gpm_Open=yes
9359 else
9360   echo "$as_me: failed program was:" >&5
9361 cat conftest.$ac_ext >&5
9362 ac_cv_lib_gpm_Gpm_Open=no
9363 fi
9364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9365 LIBS=$ac_check_lib_save_LIBS
9366 fi
9367 echo "$as_me:9367: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9368 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9369 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9370   echo "$as_me:9370: checking for initscr in -lgpm" >&5
9371 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9372 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9373   echo $ECHO_N "(cached) $ECHO_C" >&6
9374 else
9375   ac_check_lib_save_LIBS=$LIBS
9376 LIBS="-lgpm  $LIBS"
9377 cat >conftest.$ac_ext <<_ACEOF
9378 #line 9378 "configure"
9379 #include "confdefs.h"
9380
9381 /* Override any gcc2 internal prototype to avoid an error.  */
9382 #ifdef __cplusplus
9383 extern "C"
9384 #endif
9385 /* We use char because int might match the return type of a gcc2
9386    builtin and then its argument prototype would still apply.  */
9387 char initscr ();
9388 int
9389 main ()
9390 {
9391 initscr ();
9392   ;
9393   return 0;
9394 }
9395 _ACEOF
9396 rm -f conftest.$ac_objext conftest$ac_exeext
9397 if { (eval echo "$as_me:9397: \"$ac_link\"") >&5
9398   (eval $ac_link) 2>&5
9399   ac_status=$?
9400   echo "$as_me:9400: \$? = $ac_status" >&5
9401   (exit $ac_status); } &&
9402          { ac_try='test -s conftest$ac_exeext'
9403   { (eval echo "$as_me:9403: \"$ac_try\"") >&5
9404   (eval $ac_try) 2>&5
9405   ac_status=$?
9406   echo "$as_me:9406: \$? = $ac_status" >&5
9407   (exit $ac_status); }; }; then
9408   ac_cv_lib_gpm_initscr=yes
9409 else
9410   echo "$as_me: failed program was:" >&5
9411 cat conftest.$ac_ext >&5
9412 ac_cv_lib_gpm_initscr=no
9413 fi
9414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9415 LIBS=$ac_check_lib_save_LIBS
9416 fi
9417 echo "$as_me:9417: result: $ac_cv_lib_gpm_initscr" >&5
9418 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9419 if test $ac_cv_lib_gpm_initscr = yes; then
9420   LIBS="$cf_ncurses_SAVE"
9421 else
9422   cf_ncurses_LIBS="-lgpm"
9423 fi
9424
9425 fi
9426
9427 case $host_os in #(vi
9428 freebsd*)
9429         # This is only necessary if you are linking against an obsolete
9430         # version of ncurses (but it should do no harm, since it's static).
9431         if test "$cf_nculib_root" = ncurses ; then
9432                 echo "$as_me:9432: checking for tgoto in -lmytinfo" >&5
9433 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9434 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9435   echo $ECHO_N "(cached) $ECHO_C" >&6
9436 else
9437   ac_check_lib_save_LIBS=$LIBS
9438 LIBS="-lmytinfo  $LIBS"
9439 cat >conftest.$ac_ext <<_ACEOF
9440 #line 9440 "configure"
9441 #include "confdefs.h"
9442
9443 /* Override any gcc2 internal prototype to avoid an error.  */
9444 #ifdef __cplusplus
9445 extern "C"
9446 #endif
9447 /* We use char because int might match the return type of a gcc2
9448    builtin and then its argument prototype would still apply.  */
9449 char tgoto ();
9450 int
9451 main ()
9452 {
9453 tgoto ();
9454   ;
9455   return 0;
9456 }
9457 _ACEOF
9458 rm -f conftest.$ac_objext conftest$ac_exeext
9459 if { (eval echo "$as_me:9459: \"$ac_link\"") >&5
9460   (eval $ac_link) 2>&5
9461   ac_status=$?
9462   echo "$as_me:9462: \$? = $ac_status" >&5
9463   (exit $ac_status); } &&
9464          { ac_try='test -s conftest$ac_exeext'
9465   { (eval echo "$as_me:9465: \"$ac_try\"") >&5
9466   (eval $ac_try) 2>&5
9467   ac_status=$?
9468   echo "$as_me:9468: \$? = $ac_status" >&5
9469   (exit $ac_status); }; }; then
9470   ac_cv_lib_mytinfo_tgoto=yes
9471 else
9472   echo "$as_me: failed program was:" >&5
9473 cat conftest.$ac_ext >&5
9474 ac_cv_lib_mytinfo_tgoto=no
9475 fi
9476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9477 LIBS=$ac_check_lib_save_LIBS
9478 fi
9479 echo "$as_me:9479: result: $ac_cv_lib_mytinfo_tgoto" >&5
9480 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9481 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9482   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9483 fi
9484
9485         fi
9486         ;;
9487 esac
9488
9489 LIBS="$cf_ncurses_LIBS $LIBS"
9490
9491 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9492 then
9493         LIBS="-l$cf_nculib_root $LIBS"
9494 else
9495
9496         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9497         cf_libdir=""
9498         echo "$as_me:9498: checking for initscr" >&5
9499 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9500 if test "${ac_cv_func_initscr+set}" = set; then
9501   echo $ECHO_N "(cached) $ECHO_C" >&6
9502 else
9503   cat >conftest.$ac_ext <<_ACEOF
9504 #line 9504 "configure"
9505 #include "confdefs.h"
9506 /* System header to define __stub macros and hopefully few prototypes,
9507     which can conflict with char initscr (); below.  */
9508 #include <assert.h>
9509 /* Override any gcc2 internal prototype to avoid an error.  */
9510 #ifdef __cplusplus
9511 extern "C"
9512 #endif
9513 /* We use char because int might match the return type of a gcc2
9514    builtin and then its argument prototype would still apply.  */
9515 char initscr ();
9516 char (*f) ();
9517
9518 int
9519 main ()
9520 {
9521 /* The GNU C library defines this for functions which it implements
9522     to always fail with ENOSYS.  Some functions are actually named
9523     something starting with __ and the normal name is an alias.  */
9524 #if defined (__stub_initscr) || defined (__stub___initscr)
9525 choke me
9526 #else
9527 f = initscr;
9528 #endif
9529
9530   ;
9531   return 0;
9532 }
9533 _ACEOF
9534 rm -f conftest.$ac_objext conftest$ac_exeext
9535 if { (eval echo "$as_me:9535: \"$ac_link\"") >&5
9536   (eval $ac_link) 2>&5
9537   ac_status=$?
9538   echo "$as_me:9538: \$? = $ac_status" >&5
9539   (exit $ac_status); } &&
9540          { ac_try='test -s conftest$ac_exeext'
9541   { (eval echo "$as_me:9541: \"$ac_try\"") >&5
9542   (eval $ac_try) 2>&5
9543   ac_status=$?
9544   echo "$as_me:9544: \$? = $ac_status" >&5
9545   (exit $ac_status); }; }; then
9546   ac_cv_func_initscr=yes
9547 else
9548   echo "$as_me: failed program was:" >&5
9549 cat conftest.$ac_ext >&5
9550 ac_cv_func_initscr=no
9551 fi
9552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9553 fi
9554 echo "$as_me:9554: result: $ac_cv_func_initscr" >&5
9555 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9556 if test $ac_cv_func_initscr = yes; then
9557   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9558 else
9559
9560                 cf_save_LIBS="$LIBS"
9561                 echo "$as_me:9561: checking for initscr in -l$cf_nculib_root" >&5
9562 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9563                 LIBS="-l$cf_nculib_root $LIBS"
9564                 cat >conftest.$ac_ext <<_ACEOF
9565 #line 9565 "configure"
9566 #include "confdefs.h"
9567 #include <${cf_cv_ncurses_header:-curses.h}>
9568 int
9569 main ()
9570 {
9571 initscr()
9572   ;
9573   return 0;
9574 }
9575 _ACEOF
9576 rm -f conftest.$ac_objext conftest$ac_exeext
9577 if { (eval echo "$as_me:9577: \"$ac_link\"") >&5
9578   (eval $ac_link) 2>&5
9579   ac_status=$?
9580   echo "$as_me:9580: \$? = $ac_status" >&5
9581   (exit $ac_status); } &&
9582          { ac_try='test -s conftest$ac_exeext'
9583   { (eval echo "$as_me:9583: \"$ac_try\"") >&5
9584   (eval $ac_try) 2>&5
9585   ac_status=$?
9586   echo "$as_me:9586: \$? = $ac_status" >&5
9587   (exit $ac_status); }; }; then
9588   echo "$as_me:9588: result: yes" >&5
9589 echo "${ECHO_T}yes" >&6
9590                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9591
9592 else
9593   echo "$as_me: failed program was:" >&5
9594 cat conftest.$ac_ext >&5
9595 echo "$as_me:9595: result: no" >&5
9596 echo "${ECHO_T}no" >&6
9597
9598 cf_search=
9599 cf_library_path_list=""
9600 if test -n "${LDFLAGS}${LIBS}" ; then
9601         for cf_library_path in $LDFLAGS $LIBS
9602         do
9603                 case $cf_library_path in #(vi
9604                 -L*)
9605                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9606
9607 test "$cf_library_path" != "NONE" && \
9608 test -d "$cf_library_path" && \
9609  {
9610         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9611         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9612         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9613         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9614         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9615         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"
9616 }
9617
9618                         cf_library_path_list="$cf_library_path_list $cf_search"
9619                         ;;
9620                 esac
9621         done
9622 fi
9623
9624 cf_search=
9625
9626 test "/usr" != "$prefix" && \
9627 test -d "/usr" && \
9628 (test $prefix = NONE || test "/usr" != "$prefix") && {
9629         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9630         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9631         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
9632         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9633         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
9634         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9635 }
9636
9637 test "$prefix" != "NONE" && \
9638 test -d "$prefix" && \
9639  {
9640         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9641         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9642         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9643         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9644         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9645         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9646 }
9647
9648 test "/usr/local" != "$prefix" && \
9649 test -d "/usr/local" && \
9650 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9651         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9652         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9653         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9654         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9655         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9656         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9657 }
9658
9659 test "/opt" != "$prefix" && \
9660 test -d "/opt" && \
9661 (test $prefix = NONE || test "/opt" != "$prefix") && {
9662         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9663         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9664         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
9665         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9666         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
9667         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9668 }
9669
9670 test "$HOME" != "$prefix" && \
9671 test -d "$HOME" && \
9672 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9673         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9674         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9675         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9676         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9677         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9678         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9679 }
9680
9681 cf_search="$cf_library_path_list $cf_search"
9682
9683                         for cf_libdir in $cf_search
9684                         do
9685                                 echo "$as_me:9685: checking for -l$cf_nculib_root in $cf_libdir" >&5
9686 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9687                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9688                                 cat >conftest.$ac_ext <<_ACEOF
9689 #line 9689 "configure"
9690 #include "confdefs.h"
9691 #include <${cf_cv_ncurses_header:-curses.h}>
9692 int
9693 main ()
9694 {
9695 initscr()
9696   ;
9697   return 0;
9698 }
9699 _ACEOF
9700 rm -f conftest.$ac_objext conftest$ac_exeext
9701 if { (eval echo "$as_me:9701: \"$ac_link\"") >&5
9702   (eval $ac_link) 2>&5
9703   ac_status=$?
9704   echo "$as_me:9704: \$? = $ac_status" >&5
9705   (exit $ac_status); } &&
9706          { ac_try='test -s conftest$ac_exeext'
9707   { (eval echo "$as_me:9707: \"$ac_try\"") >&5
9708   (eval $ac_try) 2>&5
9709   ac_status=$?
9710   echo "$as_me:9710: \$? = $ac_status" >&5
9711   (exit $ac_status); }; }; then
9712   echo "$as_me:9712: result: yes" >&5
9713 echo "${ECHO_T}yes" >&6
9714                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9715                                          break
9716 else
9717   echo "$as_me: failed program was:" >&5
9718 cat conftest.$ac_ext >&5
9719 echo "$as_me:9719: result: no" >&5
9720 echo "${ECHO_T}no" >&6
9721                                          LIBS="$cf_save_LIBS"
9722 fi
9723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9724                         done
9725
9726 fi
9727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9728
9729 fi
9730
9731 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9732
9733 if test $cf_found_library = no ; then
9734         { { echo "$as_me:9734: error: Cannot link $cf_nculib_root library" >&5
9735 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9736    { (exit 1); exit 1; }; }
9737 fi
9738
9739 fi
9740
9741 if test -n "$cf_ncurses_LIBS" ; then
9742         echo "$as_me:9742: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9743 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9744         cf_ncurses_SAVE="$LIBS"
9745         for p in $cf_ncurses_LIBS ; do
9746                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9747                 if test "$q" != "$LIBS" ; then
9748                         LIBS="$q"
9749                 fi
9750         done
9751         cat >conftest.$ac_ext <<_ACEOF
9752 #line 9752 "configure"
9753 #include "confdefs.h"
9754 #include <${cf_cv_ncurses_header:-curses.h}>
9755 int
9756 main ()
9757 {
9758 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9759   ;
9760   return 0;
9761 }
9762 _ACEOF
9763 rm -f conftest.$ac_objext conftest$ac_exeext
9764 if { (eval echo "$as_me:9764: \"$ac_link\"") >&5
9765   (eval $ac_link) 2>&5
9766   ac_status=$?
9767   echo "$as_me:9767: \$? = $ac_status" >&5
9768   (exit $ac_status); } &&
9769          { ac_try='test -s conftest$ac_exeext'
9770   { (eval echo "$as_me:9770: \"$ac_try\"") >&5
9771   (eval $ac_try) 2>&5
9772   ac_status=$?
9773   echo "$as_me:9773: \$? = $ac_status" >&5
9774   (exit $ac_status); }; }; then
9775   echo "$as_me:9775: result: yes" >&5
9776 echo "${ECHO_T}yes" >&6
9777 else
9778   echo "$as_me: failed program was:" >&5
9779 cat conftest.$ac_ext >&5
9780 echo "$as_me:9780: result: no" >&5
9781 echo "${ECHO_T}no" >&6
9782                  LIBS="$cf_ncurses_SAVE"
9783 fi
9784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9785 fi
9786
9787 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9788
9789 cat >>confdefs.h <<EOF
9790 #define $cf_nculib_ROOT 1
9791 EOF
9792
9793 fi
9794
9795         ;;
9796 pdcurses)
9797
9798 echo "$as_me:9798: checking if you want to use pkg-config" >&5
9799 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9800
9801 # Check whether --with-pkg-config or --without-pkg-config was given.
9802 if test "${with_pkg_config+set}" = set; then
9803   withval="$with_pkg_config"
9804   cf_pkg_config=$withval
9805 else
9806   cf_pkg_config=yes
9807 fi;
9808 echo "$as_me:9808: result: $cf_pkg_config" >&5
9809 echo "${ECHO_T}$cf_pkg_config" >&6
9810
9811 case $cf_pkg_config in #(vi
9812 no) #(vi
9813         PKG_CONFIG=none
9814         ;;
9815 yes) #(vi
9816
9817 if test -n "$ac_tool_prefix"; then
9818   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9819 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9820 echo "$as_me:9820: checking for $ac_word" >&5
9821 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9822 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9823   echo $ECHO_N "(cached) $ECHO_C" >&6
9824 else
9825   case $PKG_CONFIG in
9826   [\\/]* | ?:[\\/]*)
9827   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9828   ;;
9829   *)
9830   ac_save_IFS=$IFS; IFS=$ac_path_separator
9831 ac_dummy="$PATH"
9832 for ac_dir in $ac_dummy; do
9833   IFS=$ac_save_IFS
9834   test -z "$ac_dir" && ac_dir=.
9835   if $as_executable_p "$ac_dir/$ac_word"; then
9836    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9837    echo "$as_me:9837: found $ac_dir/$ac_word" >&5
9838    break
9839 fi
9840 done
9841
9842   ;;
9843 esac
9844 fi
9845 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9846
9847 if test -n "$PKG_CONFIG"; then
9848   echo "$as_me:9848: result: $PKG_CONFIG" >&5
9849 echo "${ECHO_T}$PKG_CONFIG" >&6
9850 else
9851   echo "$as_me:9851: result: no" >&5
9852 echo "${ECHO_T}no" >&6
9853 fi
9854
9855 fi
9856 if test -z "$ac_cv_path_PKG_CONFIG"; then
9857   ac_pt_PKG_CONFIG=$PKG_CONFIG
9858   # Extract the first word of "pkg-config", so it can be a program name with args.
9859 set dummy pkg-config; ac_word=$2
9860 echo "$as_me:9860: checking for $ac_word" >&5
9861 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9862 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9863   echo $ECHO_N "(cached) $ECHO_C" >&6
9864 else
9865   case $ac_pt_PKG_CONFIG in
9866   [\\/]* | ?:[\\/]*)
9867   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9868   ;;
9869   *)
9870   ac_save_IFS=$IFS; IFS=$ac_path_separator
9871 ac_dummy="$PATH"
9872 for ac_dir in $ac_dummy; do
9873   IFS=$ac_save_IFS
9874   test -z "$ac_dir" && ac_dir=.
9875   if $as_executable_p "$ac_dir/$ac_word"; then
9876    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9877    echo "$as_me:9877: found $ac_dir/$ac_word" >&5
9878    break
9879 fi
9880 done
9881
9882   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9883   ;;
9884 esac
9885 fi
9886 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9887
9888 if test -n "$ac_pt_PKG_CONFIG"; then
9889   echo "$as_me:9889: result: $ac_pt_PKG_CONFIG" >&5
9890 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9891 else
9892   echo "$as_me:9892: result: no" >&5
9893 echo "${ECHO_T}no" >&6
9894 fi
9895
9896   PKG_CONFIG=$ac_pt_PKG_CONFIG
9897 else
9898   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9899 fi
9900
9901         ;;
9902 *)
9903         PKG_CONFIG=$withval
9904         ;;
9905 esac
9906
9907 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9908 if test "$PKG_CONFIG" != none ; then
9909
9910 if test "x$prefix" != xNONE; then
9911   cf_path_syntax="$prefix"
9912 else
9913   cf_path_syntax="$ac_default_prefix"
9914 fi
9915
9916 case ".$PKG_CONFIG" in #(vi
9917 .\$\(*\)*|.\'*\'*) #(vi
9918   ;;
9919 ..|./*|.\\*) #(vi
9920   ;;
9921 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9922   ;;
9923 .\${*prefix}*) #(vi
9924   eval PKG_CONFIG="$PKG_CONFIG"
9925   case ".$PKG_CONFIG" in #(vi
9926   .NONE/*)
9927     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9928     ;;
9929   esac
9930   ;; #(vi
9931 .no|.NONE/*)
9932   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9933   ;;
9934 *)
9935   { { echo "$as_me:9935: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9936 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9937    { (exit 1); exit 1; }; }
9938   ;;
9939 esac
9940
9941 fi
9942
9943 echo "$as_me:9943: checking for X" >&5
9944 echo $ECHO_N "checking for X... $ECHO_C" >&6
9945
9946 # Check whether --with-x or --without-x was given.
9947 if test "${with_x+set}" = set; then
9948   withval="$with_x"
9949
9950 fi;
9951 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9952 if test "x$with_x" = xno; then
9953   # The user explicitly disabled X.
9954   have_x=disabled
9955 else
9956   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9957     # Both variables are already set.
9958     have_x=yes
9959   else
9960     if test "${ac_cv_have_x+set}" = set; then
9961   echo $ECHO_N "(cached) $ECHO_C" >&6
9962 else
9963   # One or both of the vars are not set, and there is no cached value.
9964 ac_x_includes=no ac_x_libraries=no
9965 rm -fr conftest.dir
9966 if mkdir conftest.dir; then
9967   cd conftest.dir
9968   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9969   cat >Imakefile <<'EOF'
9970 acfindx:
9971         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9972 EOF
9973   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9974     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9975     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9976     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9977     for ac_extension in a so sl dylib dll; do
9978       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9979          test -f $ac_im_libdir/libX11.$ac_extension; then
9980         ac_im_usrlibdir=$ac_im_libdir; break
9981       fi
9982     done
9983     # Screen out bogus values from the imake configuration.  They are
9984     # bogus both because they are the default anyway, and because
9985     # using them would break gcc on systems where it needs fixed includes.
9986     case $ac_im_incroot in
9987         /usr/include) ;;
9988         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9989     esac
9990     case $ac_im_usrlibdir in
9991         /usr/lib | /lib) ;;
9992         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9993     esac
9994   fi
9995   cd ..
9996   rm -fr conftest.dir
9997 fi
9998
9999 # Standard set of common directories for X headers.
10000 # Check X11 before X11Rn because it is often a symlink to the current release.
10001 ac_x_header_dirs='
10002 /usr/X11/include
10003 /usr/X11R6/include
10004 /usr/X11R5/include
10005 /usr/X11R4/include
10006
10007 /usr/include/X11
10008 /usr/include/X11R6
10009 /usr/include/X11R5
10010 /usr/include/X11R4
10011
10012 /usr/local/X11/include
10013 /usr/local/X11R6/include
10014 /usr/local/X11R5/include
10015 /usr/local/X11R4/include
10016
10017 /usr/local/include/X11
10018 /usr/local/include/X11R6
10019 /usr/local/include/X11R5
10020 /usr/local/include/X11R4
10021
10022 /usr/X386/include
10023 /usr/x386/include
10024 /usr/XFree86/include/X11
10025
10026 /usr/include
10027 /usr/local/include
10028 /usr/unsupported/include
10029 /usr/athena/include
10030 /usr/local/x11r5/include
10031 /usr/lpp/Xamples/include
10032
10033 /usr/openwin/include
10034 /usr/openwin/share/include'
10035
10036 if test "$ac_x_includes" = no; then
10037   # Guess where to find include files, by looking for Intrinsic.h.
10038   # First, try using that file with no special directory specified.
10039   cat >conftest.$ac_ext <<_ACEOF
10040 #line 10040 "configure"
10041 #include "confdefs.h"
10042 #include <X11/Intrinsic.h>
10043 _ACEOF
10044 if { (eval echo "$as_me:10044: \"$ac_cpp conftest.$ac_ext\"") >&5
10045   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10046   ac_status=$?
10047   egrep -v '^ *\+' conftest.er1 >conftest.err
10048   rm -f conftest.er1
10049   cat conftest.err >&5
10050   echo "$as_me:10050: \$? = $ac_status" >&5
10051   (exit $ac_status); } >/dev/null; then
10052   if test -s conftest.err; then
10053     ac_cpp_err=$ac_c_preproc_warn_flag
10054   else
10055     ac_cpp_err=
10056   fi
10057 else
10058   ac_cpp_err=yes
10059 fi
10060 if test -z "$ac_cpp_err"; then
10061   # We can compile using X headers with no special include directory.
10062 ac_x_includes=
10063 else
10064   echo "$as_me: failed program was:" >&5
10065   cat conftest.$ac_ext >&5
10066   for ac_dir in $ac_x_header_dirs; do
10067   if test -r "$ac_dir/X11/Intrinsic.h"; then
10068     ac_x_includes=$ac_dir
10069     break
10070   fi
10071 done
10072 fi
10073 rm -f conftest.err conftest.$ac_ext
10074 fi # $ac_x_includes = no
10075
10076 if test "$ac_x_libraries" = no; then
10077   # Check for the libraries.
10078   # See if we find them without any special options.
10079   # Don't add to $LIBS permanently.
10080   ac_save_LIBS=$LIBS
10081   LIBS="-lXt $LIBS"
10082   cat >conftest.$ac_ext <<_ACEOF
10083 #line 10083 "configure"
10084 #include "confdefs.h"
10085 #include <X11/Intrinsic.h>
10086 int
10087 main ()
10088 {
10089 XtMalloc (0)
10090   ;
10091   return 0;
10092 }
10093 _ACEOF
10094 rm -f conftest.$ac_objext conftest$ac_exeext
10095 if { (eval echo "$as_me:10095: \"$ac_link\"") >&5
10096   (eval $ac_link) 2>&5
10097   ac_status=$?
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); } &&
10100          { ac_try='test -s conftest$ac_exeext'
10101   { (eval echo "$as_me:10101: \"$ac_try\"") >&5
10102   (eval $ac_try) 2>&5
10103   ac_status=$?
10104   echo "$as_me:10104: \$? = $ac_status" >&5
10105   (exit $ac_status); }; }; then
10106   LIBS=$ac_save_LIBS
10107 # We can link X programs with no special library path.
10108 ac_x_libraries=
10109 else
10110   echo "$as_me: failed program was:" >&5
10111 cat conftest.$ac_ext >&5
10112 LIBS=$ac_save_LIBS
10113 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10114 do
10115   # Don't even attempt the hair of trying to link an X program!
10116   for ac_extension in a so sl dylib dll; do
10117     if test -r $ac_dir/libXt.$ac_extension; then
10118       ac_x_libraries=$ac_dir
10119       break 2
10120     fi
10121   done
10122 done
10123 fi
10124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10125 fi # $ac_x_libraries = no
10126
10127 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10128   # Didn't find X anywhere.  Cache the known absence of X.
10129   ac_cv_have_x="have_x=no"
10130 else
10131   # Record where we found X for the cache.
10132   ac_cv_have_x="have_x=yes \
10133                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10134 fi
10135 fi
10136
10137   fi
10138   eval "$ac_cv_have_x"
10139 fi # $with_x != no
10140
10141 if test "$have_x" != yes; then
10142   echo "$as_me:10142: result: $have_x" >&5
10143 echo "${ECHO_T}$have_x" >&6
10144   no_x=yes
10145 else
10146   # If each of the values was on the command line, it overrides each guess.
10147   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10148   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10149   # Update the cache value to reflect the command line values.
10150   ac_cv_have_x="have_x=yes \
10151                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10152   echo "$as_me:10152: result: libraries $x_libraries, headers $x_includes" >&5
10153 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10154 fi
10155
10156 if test "$no_x" = yes; then
10157   # Not all programs may use this symbol, but it does not hurt to define it.
10158
10159 cat >>confdefs.h <<\EOF
10160 #define X_DISPLAY_MISSING 1
10161 EOF
10162
10163   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10164 else
10165   if test -n "$x_includes"; then
10166     X_CFLAGS="$X_CFLAGS -I$x_includes"
10167   fi
10168
10169   # It would also be nice to do this for all -L options, not just this one.
10170   if test -n "$x_libraries"; then
10171     X_LIBS="$X_LIBS -L$x_libraries"
10172     # For Solaris; some versions of Sun CC require a space after -R and
10173     # others require no space.  Words are not sufficient . . . .
10174     case `(uname -sr) 2>/dev/null` in
10175     "SunOS 5"*)
10176       echo "$as_me:10176: checking whether -R must be followed by a space" >&5
10177 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10178       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10179       cat >conftest.$ac_ext <<_ACEOF
10180 #line 10180 "configure"
10181 #include "confdefs.h"
10182
10183 int
10184 main ()
10185 {
10186
10187   ;
10188   return 0;
10189 }
10190 _ACEOF
10191 rm -f conftest.$ac_objext conftest$ac_exeext
10192 if { (eval echo "$as_me:10192: \"$ac_link\"") >&5
10193   (eval $ac_link) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit $ac_status); } &&
10197          { ac_try='test -s conftest$ac_exeext'
10198   { (eval echo "$as_me:10198: \"$ac_try\"") >&5
10199   (eval $ac_try) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); }; }; then
10203   ac_R_nospace=yes
10204 else
10205   echo "$as_me: failed program was:" >&5
10206 cat conftest.$ac_ext >&5
10207 ac_R_nospace=no
10208 fi
10209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10210       if test $ac_R_nospace = yes; then
10211         echo "$as_me:10211: result: no" >&5
10212 echo "${ECHO_T}no" >&6
10213         X_LIBS="$X_LIBS -R$x_libraries"
10214       else
10215         LIBS="$ac_xsave_LIBS -R $x_libraries"
10216         cat >conftest.$ac_ext <<_ACEOF
10217 #line 10217 "configure"
10218 #include "confdefs.h"
10219
10220 int
10221 main ()
10222 {
10223
10224   ;
10225   return 0;
10226 }
10227 _ACEOF
10228 rm -f conftest.$ac_objext conftest$ac_exeext
10229 if { (eval echo "$as_me:10229: \"$ac_link\"") >&5
10230   (eval $ac_link) 2>&5
10231   ac_status=$?
10232   echo "$as_me:10232: \$? = $ac_status" >&5
10233   (exit $ac_status); } &&
10234          { ac_try='test -s conftest$ac_exeext'
10235   { (eval echo "$as_me:10235: \"$ac_try\"") >&5
10236   (eval $ac_try) 2>&5
10237   ac_status=$?
10238   echo "$as_me:10238: \$? = $ac_status" >&5
10239   (exit $ac_status); }; }; then
10240   ac_R_space=yes
10241 else
10242   echo "$as_me: failed program was:" >&5
10243 cat conftest.$ac_ext >&5
10244 ac_R_space=no
10245 fi
10246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10247         if test $ac_R_space = yes; then
10248           echo "$as_me:10248: result: yes" >&5
10249 echo "${ECHO_T}yes" >&6
10250           X_LIBS="$X_LIBS -R $x_libraries"
10251         else
10252           echo "$as_me:10252: result: neither works" >&5
10253 echo "${ECHO_T}neither works" >&6
10254         fi
10255       fi
10256       LIBS=$ac_xsave_LIBS
10257     esac
10258   fi
10259
10260   # Check for system-dependent libraries X programs must link with.
10261   # Do this before checking for the system-independent R6 libraries
10262   # (-lICE), since we may need -lsocket or whatever for X linking.
10263
10264   if test "$ISC" = yes; then
10265     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10266   else
10267     # Martyn Johnson says this is needed for Ultrix, if the X
10268     # libraries were built with DECnet support.  And Karl Berry says
10269     # the Alpha needs dnet_stub (dnet does not exist).
10270     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10271     cat >conftest.$ac_ext <<_ACEOF
10272 #line 10272 "configure"
10273 #include "confdefs.h"
10274
10275 /* Override any gcc2 internal prototype to avoid an error.  */
10276 #ifdef __cplusplus
10277 extern "C"
10278 #endif
10279 /* We use char because int might match the return type of a gcc2
10280    builtin and then its argument prototype would still apply.  */
10281 char XOpenDisplay ();
10282 int
10283 main ()
10284 {
10285 XOpenDisplay ();
10286   ;
10287   return 0;
10288 }
10289 _ACEOF
10290 rm -f conftest.$ac_objext conftest$ac_exeext
10291 if { (eval echo "$as_me:10291: \"$ac_link\"") >&5
10292   (eval $ac_link) 2>&5
10293   ac_status=$?
10294   echo "$as_me:10294: \$? = $ac_status" >&5
10295   (exit $ac_status); } &&
10296          { ac_try='test -s conftest$ac_exeext'
10297   { (eval echo "$as_me:10297: \"$ac_try\"") >&5
10298   (eval $ac_try) 2>&5
10299   ac_status=$?
10300   echo "$as_me:10300: \$? = $ac_status" >&5
10301   (exit $ac_status); }; }; then
10302   :
10303 else
10304   echo "$as_me: failed program was:" >&5
10305 cat conftest.$ac_ext >&5
10306 echo "$as_me:10306: checking for dnet_ntoa in -ldnet" >&5
10307 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10308 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10309   echo $ECHO_N "(cached) $ECHO_C" >&6
10310 else
10311   ac_check_lib_save_LIBS=$LIBS
10312 LIBS="-ldnet  $LIBS"
10313 cat >conftest.$ac_ext <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316
10317 /* Override any gcc2 internal prototype to avoid an error.  */
10318 #ifdef __cplusplus
10319 extern "C"
10320 #endif
10321 /* We use char because int might match the return type of a gcc2
10322    builtin and then its argument prototype would still apply.  */
10323 char dnet_ntoa ();
10324 int
10325 main ()
10326 {
10327 dnet_ntoa ();
10328   ;
10329   return 0;
10330 }
10331 _ACEOF
10332 rm -f conftest.$ac_objext conftest$ac_exeext
10333 if { (eval echo "$as_me:10333: \"$ac_link\"") >&5
10334   (eval $ac_link) 2>&5
10335   ac_status=$?
10336   echo "$as_me:10336: \$? = $ac_status" >&5
10337   (exit $ac_status); } &&
10338          { ac_try='test -s conftest$ac_exeext'
10339   { (eval echo "$as_me:10339: \"$ac_try\"") >&5
10340   (eval $ac_try) 2>&5
10341   ac_status=$?
10342   echo "$as_me:10342: \$? = $ac_status" >&5
10343   (exit $ac_status); }; }; then
10344   ac_cv_lib_dnet_dnet_ntoa=yes
10345 else
10346   echo "$as_me: failed program was:" >&5
10347 cat conftest.$ac_ext >&5
10348 ac_cv_lib_dnet_dnet_ntoa=no
10349 fi
10350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10351 LIBS=$ac_check_lib_save_LIBS
10352 fi
10353 echo "$as_me:10353: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10354 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10355 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10356   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10357 fi
10358
10359     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10360       echo "$as_me:10360: checking for dnet_ntoa in -ldnet_stub" >&5
10361 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10362 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10363   echo $ECHO_N "(cached) $ECHO_C" >&6
10364 else
10365   ac_check_lib_save_LIBS=$LIBS
10366 LIBS="-ldnet_stub  $LIBS"
10367 cat >conftest.$ac_ext <<_ACEOF
10368 #line 10368 "configure"
10369 #include "confdefs.h"
10370
10371 /* Override any gcc2 internal prototype to avoid an error.  */
10372 #ifdef __cplusplus
10373 extern "C"
10374 #endif
10375 /* We use char because int might match the return type of a gcc2
10376    builtin and then its argument prototype would still apply.  */
10377 char dnet_ntoa ();
10378 int
10379 main ()
10380 {
10381 dnet_ntoa ();
10382   ;
10383   return 0;
10384 }
10385 _ACEOF
10386 rm -f conftest.$ac_objext conftest$ac_exeext
10387 if { (eval echo "$as_me:10387: \"$ac_link\"") >&5
10388   (eval $ac_link) 2>&5
10389   ac_status=$?
10390   echo "$as_me:10390: \$? = $ac_status" >&5
10391   (exit $ac_status); } &&
10392          { ac_try='test -s conftest$ac_exeext'
10393   { (eval echo "$as_me:10393: \"$ac_try\"") >&5
10394   (eval $ac_try) 2>&5
10395   ac_status=$?
10396   echo "$as_me:10396: \$? = $ac_status" >&5
10397   (exit $ac_status); }; }; then
10398   ac_cv_lib_dnet_stub_dnet_ntoa=yes
10399 else
10400   echo "$as_me: failed program was:" >&5
10401 cat conftest.$ac_ext >&5
10402 ac_cv_lib_dnet_stub_dnet_ntoa=no
10403 fi
10404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10405 LIBS=$ac_check_lib_save_LIBS
10406 fi
10407 echo "$as_me:10407: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10408 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10409 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10410   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10411 fi
10412
10413     fi
10414 fi
10415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10416     LIBS="$ac_xsave_LIBS"
10417
10418     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10419     # to get the SysV transport functions.
10420     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10421     # needs -lnsl.
10422     # The nsl library prevents programs from opening the X display
10423     # on Irix 5.2, according to T.E. Dickey.
10424     # The functions gethostbyname, getservbyname, and inet_addr are
10425     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10426     echo "$as_me:10426: checking for gethostbyname" >&5
10427 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10428 if test "${ac_cv_func_gethostbyname+set}" = set; then
10429   echo $ECHO_N "(cached) $ECHO_C" >&6
10430 else
10431   cat >conftest.$ac_ext <<_ACEOF
10432 #line 10432 "configure"
10433 #include "confdefs.h"
10434 /* System header to define __stub macros and hopefully few prototypes,
10435     which can conflict with char gethostbyname (); below.  */
10436 #include <assert.h>
10437 /* Override any gcc2 internal prototype to avoid an error.  */
10438 #ifdef __cplusplus
10439 extern "C"
10440 #endif
10441 /* We use char because int might match the return type of a gcc2
10442    builtin and then its argument prototype would still apply.  */
10443 char gethostbyname ();
10444 char (*f) ();
10445
10446 int
10447 main ()
10448 {
10449 /* The GNU C library defines this for functions which it implements
10450     to always fail with ENOSYS.  Some functions are actually named
10451     something starting with __ and the normal name is an alias.  */
10452 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10453 choke me
10454 #else
10455 f = gethostbyname;
10456 #endif
10457
10458   ;
10459   return 0;
10460 }
10461 _ACEOF
10462 rm -f conftest.$ac_objext conftest$ac_exeext
10463 if { (eval echo "$as_me:10463: \"$ac_link\"") >&5
10464   (eval $ac_link) 2>&5
10465   ac_status=$?
10466   echo "$as_me:10466: \$? = $ac_status" >&5
10467   (exit $ac_status); } &&
10468          { ac_try='test -s conftest$ac_exeext'
10469   { (eval echo "$as_me:10469: \"$ac_try\"") >&5
10470   (eval $ac_try) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); }; }; then
10474   ac_cv_func_gethostbyname=yes
10475 else
10476   echo "$as_me: failed program was:" >&5
10477 cat conftest.$ac_ext >&5
10478 ac_cv_func_gethostbyname=no
10479 fi
10480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10481 fi
10482 echo "$as_me:10482: result: $ac_cv_func_gethostbyname" >&5
10483 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10484
10485     if test $ac_cv_func_gethostbyname = no; then
10486       echo "$as_me:10486: checking for gethostbyname in -lnsl" >&5
10487 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10488 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10489   echo $ECHO_N "(cached) $ECHO_C" >&6
10490 else
10491   ac_check_lib_save_LIBS=$LIBS
10492 LIBS="-lnsl  $LIBS"
10493 cat >conftest.$ac_ext <<_ACEOF
10494 #line 10494 "configure"
10495 #include "confdefs.h"
10496
10497 /* Override any gcc2 internal prototype to avoid an error.  */
10498 #ifdef __cplusplus
10499 extern "C"
10500 #endif
10501 /* We use char because int might match the return type of a gcc2
10502    builtin and then its argument prototype would still apply.  */
10503 char gethostbyname ();
10504 int
10505 main ()
10506 {
10507 gethostbyname ();
10508   ;
10509   return 0;
10510 }
10511 _ACEOF
10512 rm -f conftest.$ac_objext conftest$ac_exeext
10513 if { (eval echo "$as_me:10513: \"$ac_link\"") >&5
10514   (eval $ac_link) 2>&5
10515   ac_status=$?
10516   echo "$as_me:10516: \$? = $ac_status" >&5
10517   (exit $ac_status); } &&
10518          { ac_try='test -s conftest$ac_exeext'
10519   { (eval echo "$as_me:10519: \"$ac_try\"") >&5
10520   (eval $ac_try) 2>&5
10521   ac_status=$?
10522   echo "$as_me:10522: \$? = $ac_status" >&5
10523   (exit $ac_status); }; }; then
10524   ac_cv_lib_nsl_gethostbyname=yes
10525 else
10526   echo "$as_me: failed program was:" >&5
10527 cat conftest.$ac_ext >&5
10528 ac_cv_lib_nsl_gethostbyname=no
10529 fi
10530 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10531 LIBS=$ac_check_lib_save_LIBS
10532 fi
10533 echo "$as_me:10533: result: $ac_cv_lib_nsl_gethostbyname" >&5
10534 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10535 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10536   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10537 fi
10538
10539       if test $ac_cv_lib_nsl_gethostbyname = no; then
10540         echo "$as_me:10540: checking for gethostbyname in -lbsd" >&5
10541 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10542 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10543   echo $ECHO_N "(cached) $ECHO_C" >&6
10544 else
10545   ac_check_lib_save_LIBS=$LIBS
10546 LIBS="-lbsd  $LIBS"
10547 cat >conftest.$ac_ext <<_ACEOF
10548 #line 10548 "configure"
10549 #include "confdefs.h"
10550
10551 /* Override any gcc2 internal prototype to avoid an error.  */
10552 #ifdef __cplusplus
10553 extern "C"
10554 #endif
10555 /* We use char because int might match the return type of a gcc2
10556    builtin and then its argument prototype would still apply.  */
10557 char gethostbyname ();
10558 int
10559 main ()
10560 {
10561 gethostbyname ();
10562   ;
10563   return 0;
10564 }
10565 _ACEOF
10566 rm -f conftest.$ac_objext conftest$ac_exeext
10567 if { (eval echo "$as_me:10567: \"$ac_link\"") >&5
10568   (eval $ac_link) 2>&5
10569   ac_status=$?
10570   echo "$as_me:10570: \$? = $ac_status" >&5
10571   (exit $ac_status); } &&
10572          { ac_try='test -s conftest$ac_exeext'
10573   { (eval echo "$as_me:10573: \"$ac_try\"") >&5
10574   (eval $ac_try) 2>&5
10575   ac_status=$?
10576   echo "$as_me:10576: \$? = $ac_status" >&5
10577   (exit $ac_status); }; }; then
10578   ac_cv_lib_bsd_gethostbyname=yes
10579 else
10580   echo "$as_me: failed program was:" >&5
10581 cat conftest.$ac_ext >&5
10582 ac_cv_lib_bsd_gethostbyname=no
10583 fi
10584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10585 LIBS=$ac_check_lib_save_LIBS
10586 fi
10587 echo "$as_me:10587: result: $ac_cv_lib_bsd_gethostbyname" >&5
10588 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10589 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10590   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10591 fi
10592
10593       fi
10594     fi
10595
10596     # lieder@skyler.mavd.honeywell.com says without -lsocket,
10597     # socket/setsockopt and other routines are undefined under SCO ODT
10598     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
10599     # on later versions), says Simon Leinen: it contains gethostby*
10600     # variants that don't use the nameserver (or something).  -lsocket
10601     # must be given before -lnsl if both are needed.  We assume that
10602     # if connect needs -lnsl, so does gethostbyname.
10603     echo "$as_me:10603: checking for connect" >&5
10604 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10605 if test "${ac_cv_func_connect+set}" = set; then
10606   echo $ECHO_N "(cached) $ECHO_C" >&6
10607 else
10608   cat >conftest.$ac_ext <<_ACEOF
10609 #line 10609 "configure"
10610 #include "confdefs.h"
10611 /* System header to define __stub macros and hopefully few prototypes,
10612     which can conflict with char connect (); below.  */
10613 #include <assert.h>
10614 /* Override any gcc2 internal prototype to avoid an error.  */
10615 #ifdef __cplusplus
10616 extern "C"
10617 #endif
10618 /* We use char because int might match the return type of a gcc2
10619    builtin and then its argument prototype would still apply.  */
10620 char connect ();
10621 char (*f) ();
10622
10623 int
10624 main ()
10625 {
10626 /* The GNU C library defines this for functions which it implements
10627     to always fail with ENOSYS.  Some functions are actually named
10628     something starting with __ and the normal name is an alias.  */
10629 #if defined (__stub_connect) || defined (__stub___connect)
10630 choke me
10631 #else
10632 f = connect;
10633 #endif
10634
10635   ;
10636   return 0;
10637 }
10638 _ACEOF
10639 rm -f conftest.$ac_objext conftest$ac_exeext
10640 if { (eval echo "$as_me:10640: \"$ac_link\"") >&5
10641   (eval $ac_link) 2>&5
10642   ac_status=$?
10643   echo "$as_me:10643: \$? = $ac_status" >&5
10644   (exit $ac_status); } &&
10645          { ac_try='test -s conftest$ac_exeext'
10646   { (eval echo "$as_me:10646: \"$ac_try\"") >&5
10647   (eval $ac_try) 2>&5
10648   ac_status=$?
10649   echo "$as_me:10649: \$? = $ac_status" >&5
10650   (exit $ac_status); }; }; then
10651   ac_cv_func_connect=yes
10652 else
10653   echo "$as_me: failed program was:" >&5
10654 cat conftest.$ac_ext >&5
10655 ac_cv_func_connect=no
10656 fi
10657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10658 fi
10659 echo "$as_me:10659: result: $ac_cv_func_connect" >&5
10660 echo "${ECHO_T}$ac_cv_func_connect" >&6
10661
10662     if test $ac_cv_func_connect = no; then
10663       echo "$as_me:10663: checking for connect in -lsocket" >&5
10664 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10665 if test "${ac_cv_lib_socket_connect+set}" = set; then
10666   echo $ECHO_N "(cached) $ECHO_C" >&6
10667 else
10668   ac_check_lib_save_LIBS=$LIBS
10669 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10670 cat >conftest.$ac_ext <<_ACEOF
10671 #line 10671 "configure"
10672 #include "confdefs.h"
10673
10674 /* Override any gcc2 internal prototype to avoid an error.  */
10675 #ifdef __cplusplus
10676 extern "C"
10677 #endif
10678 /* We use char because int might match the return type of a gcc2
10679    builtin and then its argument prototype would still apply.  */
10680 char connect ();
10681 int
10682 main ()
10683 {
10684 connect ();
10685   ;
10686   return 0;
10687 }
10688 _ACEOF
10689 rm -f conftest.$ac_objext conftest$ac_exeext
10690 if { (eval echo "$as_me:10690: \"$ac_link\"") >&5
10691   (eval $ac_link) 2>&5
10692   ac_status=$?
10693   echo "$as_me:10693: \$? = $ac_status" >&5
10694   (exit $ac_status); } &&
10695          { ac_try='test -s conftest$ac_exeext'
10696   { (eval echo "$as_me:10696: \"$ac_try\"") >&5
10697   (eval $ac_try) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); }; }; then
10701   ac_cv_lib_socket_connect=yes
10702 else
10703   echo "$as_me: failed program was:" >&5
10704 cat conftest.$ac_ext >&5
10705 ac_cv_lib_socket_connect=no
10706 fi
10707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10708 LIBS=$ac_check_lib_save_LIBS
10709 fi
10710 echo "$as_me:10710: result: $ac_cv_lib_socket_connect" >&5
10711 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10712 if test $ac_cv_lib_socket_connect = yes; then
10713   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10714 fi
10715
10716     fi
10717
10718     # Guillermo Gomez says -lposix is necessary on A/UX.
10719     echo "$as_me:10719: checking for remove" >&5
10720 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10721 if test "${ac_cv_func_remove+set}" = set; then
10722   echo $ECHO_N "(cached) $ECHO_C" >&6
10723 else
10724   cat >conftest.$ac_ext <<_ACEOF
10725 #line 10725 "configure"
10726 #include "confdefs.h"
10727 /* System header to define __stub macros and hopefully few prototypes,
10728     which can conflict with char remove (); below.  */
10729 #include <assert.h>
10730 /* Override any gcc2 internal prototype to avoid an error.  */
10731 #ifdef __cplusplus
10732 extern "C"
10733 #endif
10734 /* We use char because int might match the return type of a gcc2
10735    builtin and then its argument prototype would still apply.  */
10736 char remove ();
10737 char (*f) ();
10738
10739 int
10740 main ()
10741 {
10742 /* The GNU C library defines this for functions which it implements
10743     to always fail with ENOSYS.  Some functions are actually named
10744     something starting with __ and the normal name is an alias.  */
10745 #if defined (__stub_remove) || defined (__stub___remove)
10746 choke me
10747 #else
10748 f = remove;
10749 #endif
10750
10751   ;
10752   return 0;
10753 }
10754 _ACEOF
10755 rm -f conftest.$ac_objext conftest$ac_exeext
10756 if { (eval echo "$as_me:10756: \"$ac_link\"") >&5
10757   (eval $ac_link) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit $ac_status); } &&
10761          { ac_try='test -s conftest$ac_exeext'
10762   { (eval echo "$as_me:10762: \"$ac_try\"") >&5
10763   (eval $ac_try) 2>&5
10764   ac_status=$?
10765   echo "$as_me:10765: \$? = $ac_status" >&5
10766   (exit $ac_status); }; }; then
10767   ac_cv_func_remove=yes
10768 else
10769   echo "$as_me: failed program was:" >&5
10770 cat conftest.$ac_ext >&5
10771 ac_cv_func_remove=no
10772 fi
10773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10774 fi
10775 echo "$as_me:10775: result: $ac_cv_func_remove" >&5
10776 echo "${ECHO_T}$ac_cv_func_remove" >&6
10777
10778     if test $ac_cv_func_remove = no; then
10779       echo "$as_me:10779: checking for remove in -lposix" >&5
10780 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10781 if test "${ac_cv_lib_posix_remove+set}" = set; then
10782   echo $ECHO_N "(cached) $ECHO_C" >&6
10783 else
10784   ac_check_lib_save_LIBS=$LIBS
10785 LIBS="-lposix  $LIBS"
10786 cat >conftest.$ac_ext <<_ACEOF
10787 #line 10787 "configure"
10788 #include "confdefs.h"
10789
10790 /* Override any gcc2 internal prototype to avoid an error.  */
10791 #ifdef __cplusplus
10792 extern "C"
10793 #endif
10794 /* We use char because int might match the return type of a gcc2
10795    builtin and then its argument prototype would still apply.  */
10796 char remove ();
10797 int
10798 main ()
10799 {
10800 remove ();
10801   ;
10802   return 0;
10803 }
10804 _ACEOF
10805 rm -f conftest.$ac_objext conftest$ac_exeext
10806 if { (eval echo "$as_me:10806: \"$ac_link\"") >&5
10807   (eval $ac_link) 2>&5
10808   ac_status=$?
10809   echo "$as_me:10809: \$? = $ac_status" >&5
10810   (exit $ac_status); } &&
10811          { ac_try='test -s conftest$ac_exeext'
10812   { (eval echo "$as_me:10812: \"$ac_try\"") >&5
10813   (eval $ac_try) 2>&5
10814   ac_status=$?
10815   echo "$as_me:10815: \$? = $ac_status" >&5
10816   (exit $ac_status); }; }; then
10817   ac_cv_lib_posix_remove=yes
10818 else
10819   echo "$as_me: failed program was:" >&5
10820 cat conftest.$ac_ext >&5
10821 ac_cv_lib_posix_remove=no
10822 fi
10823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10824 LIBS=$ac_check_lib_save_LIBS
10825 fi
10826 echo "$as_me:10826: result: $ac_cv_lib_posix_remove" >&5
10827 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10828 if test $ac_cv_lib_posix_remove = yes; then
10829   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10830 fi
10831
10832     fi
10833
10834     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10835     echo "$as_me:10835: checking for shmat" >&5
10836 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10837 if test "${ac_cv_func_shmat+set}" = set; then
10838   echo $ECHO_N "(cached) $ECHO_C" >&6
10839 else
10840   cat >conftest.$ac_ext <<_ACEOF
10841 #line 10841 "configure"
10842 #include "confdefs.h"
10843 /* System header to define __stub macros and hopefully few prototypes,
10844     which can conflict with char shmat (); below.  */
10845 #include <assert.h>
10846 /* Override any gcc2 internal prototype to avoid an error.  */
10847 #ifdef __cplusplus
10848 extern "C"
10849 #endif
10850 /* We use char because int might match the return type of a gcc2
10851    builtin and then its argument prototype would still apply.  */
10852 char shmat ();
10853 char (*f) ();
10854
10855 int
10856 main ()
10857 {
10858 /* The GNU C library defines this for functions which it implements
10859     to always fail with ENOSYS.  Some functions are actually named
10860     something starting with __ and the normal name is an alias.  */
10861 #if defined (__stub_shmat) || defined (__stub___shmat)
10862 choke me
10863 #else
10864 f = shmat;
10865 #endif
10866
10867   ;
10868   return 0;
10869 }
10870 _ACEOF
10871 rm -f conftest.$ac_objext conftest$ac_exeext
10872 if { (eval echo "$as_me:10872: \"$ac_link\"") >&5
10873   (eval $ac_link) 2>&5
10874   ac_status=$?
10875   echo "$as_me:10875: \$? = $ac_status" >&5
10876   (exit $ac_status); } &&
10877          { ac_try='test -s conftest$ac_exeext'
10878   { (eval echo "$as_me:10878: \"$ac_try\"") >&5
10879   (eval $ac_try) 2>&5
10880   ac_status=$?
10881   echo "$as_me:10881: \$? = $ac_status" >&5
10882   (exit $ac_status); }; }; then
10883   ac_cv_func_shmat=yes
10884 else
10885   echo "$as_me: failed program was:" >&5
10886 cat conftest.$ac_ext >&5
10887 ac_cv_func_shmat=no
10888 fi
10889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10890 fi
10891 echo "$as_me:10891: result: $ac_cv_func_shmat" >&5
10892 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10893
10894     if test $ac_cv_func_shmat = no; then
10895       echo "$as_me:10895: checking for shmat in -lipc" >&5
10896 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10897 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10898   echo $ECHO_N "(cached) $ECHO_C" >&6
10899 else
10900   ac_check_lib_save_LIBS=$LIBS
10901 LIBS="-lipc  $LIBS"
10902 cat >conftest.$ac_ext <<_ACEOF
10903 #line 10903 "configure"
10904 #include "confdefs.h"
10905
10906 /* Override any gcc2 internal prototype to avoid an error.  */
10907 #ifdef __cplusplus
10908 extern "C"
10909 #endif
10910 /* We use char because int might match the return type of a gcc2
10911    builtin and then its argument prototype would still apply.  */
10912 char shmat ();
10913 int
10914 main ()
10915 {
10916 shmat ();
10917   ;
10918   return 0;
10919 }
10920 _ACEOF
10921 rm -f conftest.$ac_objext conftest$ac_exeext
10922 if { (eval echo "$as_me:10922: \"$ac_link\"") >&5
10923   (eval $ac_link) 2>&5
10924   ac_status=$?
10925   echo "$as_me:10925: \$? = $ac_status" >&5
10926   (exit $ac_status); } &&
10927          { ac_try='test -s conftest$ac_exeext'
10928   { (eval echo "$as_me:10928: \"$ac_try\"") >&5
10929   (eval $ac_try) 2>&5
10930   ac_status=$?
10931   echo "$as_me:10931: \$? = $ac_status" >&5
10932   (exit $ac_status); }; }; then
10933   ac_cv_lib_ipc_shmat=yes
10934 else
10935   echo "$as_me: failed program was:" >&5
10936 cat conftest.$ac_ext >&5
10937 ac_cv_lib_ipc_shmat=no
10938 fi
10939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10940 LIBS=$ac_check_lib_save_LIBS
10941 fi
10942 echo "$as_me:10942: result: $ac_cv_lib_ipc_shmat" >&5
10943 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10944 if test $ac_cv_lib_ipc_shmat = yes; then
10945   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10946 fi
10947
10948     fi
10949   fi
10950
10951   # Check for libraries that X11R6 Xt/Xaw programs need.
10952   ac_save_LDFLAGS=$LDFLAGS
10953   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10954   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10955   # check for ICE first), but we must link in the order -lSM -lICE or
10956   # we get undefined symbols.  So assume we have SM if we have ICE.
10957   # These have to be linked with before -lX11, unlike the other
10958   # libraries we check for below, so use a different variable.
10959   # John Interrante, Karl Berry
10960   echo "$as_me:10960: checking for IceConnectionNumber in -lICE" >&5
10961 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10962 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10963   echo $ECHO_N "(cached) $ECHO_C" >&6
10964 else
10965   ac_check_lib_save_LIBS=$LIBS
10966 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10967 cat >conftest.$ac_ext <<_ACEOF
10968 #line 10968 "configure"
10969 #include "confdefs.h"
10970
10971 /* Override any gcc2 internal prototype to avoid an error.  */
10972 #ifdef __cplusplus
10973 extern "C"
10974 #endif
10975 /* We use char because int might match the return type of a gcc2
10976    builtin and then its argument prototype would still apply.  */
10977 char IceConnectionNumber ();
10978 int
10979 main ()
10980 {
10981 IceConnectionNumber ();
10982   ;
10983   return 0;
10984 }
10985 _ACEOF
10986 rm -f conftest.$ac_objext conftest$ac_exeext
10987 if { (eval echo "$as_me:10987: \"$ac_link\"") >&5
10988   (eval $ac_link) 2>&5
10989   ac_status=$?
10990   echo "$as_me:10990: \$? = $ac_status" >&5
10991   (exit $ac_status); } &&
10992          { ac_try='test -s conftest$ac_exeext'
10993   { (eval echo "$as_me:10993: \"$ac_try\"") >&5
10994   (eval $ac_try) 2>&5
10995   ac_status=$?
10996   echo "$as_me:10996: \$? = $ac_status" >&5
10997   (exit $ac_status); }; }; then
10998   ac_cv_lib_ICE_IceConnectionNumber=yes
10999 else
11000   echo "$as_me: failed program was:" >&5
11001 cat conftest.$ac_ext >&5
11002 ac_cv_lib_ICE_IceConnectionNumber=no
11003 fi
11004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11005 LIBS=$ac_check_lib_save_LIBS
11006 fi
11007 echo "$as_me:11007: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11008 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11009 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11010   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11011 fi
11012
11013   LDFLAGS=$ac_save_LDFLAGS
11014
11015 fi
11016
11017 cf_x_athena=${cf_x_athena:-Xaw}
11018
11019 echo "$as_me:11019: checking if you want to link with Xaw 3d library" >&5
11020 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11021 withval=
11022
11023 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11024 if test "${with_Xaw3d+set}" = set; then
11025   withval="$with_Xaw3d"
11026
11027 fi;
11028 if test "$withval" = yes ; then
11029         cf_x_athena=Xaw3d
11030         echo "$as_me:11030: result: yes" >&5
11031 echo "${ECHO_T}yes" >&6
11032 else
11033         echo "$as_me:11033: result: no" >&5
11034 echo "${ECHO_T}no" >&6
11035 fi
11036
11037 echo "$as_me:11037: checking if you want to link with neXT Athena library" >&5
11038 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11039 withval=
11040
11041 # Check whether --with-neXtaw or --without-neXtaw was given.
11042 if test "${with_neXtaw+set}" = set; then
11043   withval="$with_neXtaw"
11044
11045 fi;
11046 if test "$withval" = yes ; then
11047         cf_x_athena=neXtaw
11048         echo "$as_me:11048: result: yes" >&5
11049 echo "${ECHO_T}yes" >&6
11050 else
11051         echo "$as_me:11051: result: no" >&5
11052 echo "${ECHO_T}no" >&6
11053 fi
11054
11055 echo "$as_me:11055: checking if you want to link with Athena-Plus library" >&5
11056 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11057 withval=
11058
11059 # Check whether --with-XawPlus or --without-XawPlus was given.
11060 if test "${with_XawPlus+set}" = set; then
11061   withval="$with_XawPlus"
11062
11063 fi;
11064 if test "$withval" = yes ; then
11065         cf_x_athena=XawPlus
11066         echo "$as_me:11066: result: yes" >&5
11067 echo "${ECHO_T}yes" >&6
11068 else
11069         echo "$as_me:11069: result: no" >&5
11070 echo "${ECHO_T}no" >&6
11071 fi
11072
11073 cf_x_athena_lib=""
11074
11075 if test "$PKG_CONFIG" != none ; then
11076         cf_athena_list=
11077         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11078         for cf_athena_pkg in \
11079                 $cf_athena_list \
11080                 ${cf_x_athena} \
11081                 ${cf_x_athena}-devel \
11082                 lib${cf_x_athena} \
11083                 lib${cf_x_athena}-devel
11084         do
11085
11086 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11087         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
11088
11089 echo "${as_me:-configure}:11089: testing found package $cf_athena_pkg ..." 1>&5
11090
11091         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11092         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
11093         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11094
11095 echo "${as_me:-configure}:11095: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11096
11097         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11098
11099 echo "${as_me:-configure}:11099: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11100
11101 cf_fix_cppflags=no
11102 cf_new_cflags=
11103 cf_new_cppflags=
11104 cf_new_extra_cppflags=
11105
11106 for cf_add_cflags in $cf_pkgconfig_incs
11107 do
11108 case $cf_fix_cppflags in
11109 no)
11110         case $cf_add_cflags in #(vi
11111         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11112                 case $cf_add_cflags in
11113                 -D*)
11114                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11115
11116                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11117                                 && test -z "${cf_tst_cflags}" \
11118                                 && cf_fix_cppflags=yes
11119
11120                         if test $cf_fix_cppflags = yes ; then
11121                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11122                                 continue
11123                         elif test "${cf_tst_cflags}" = "\"'" ; then
11124                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11125                                 continue
11126                         fi
11127                         ;;
11128                 esac
11129                 case "$CPPFLAGS" in
11130                 *$cf_add_cflags) #(vi
11131                         ;;
11132                 *) #(vi
11133                         case $cf_add_cflags in #(vi
11134                         -D*)
11135                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11136
11137 CPPFLAGS=`echo "$CPPFLAGS" | \
11138         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11139                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11140
11141                                 ;;
11142                         esac
11143                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11144                         ;;
11145                 esac
11146                 ;;
11147         *)
11148                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11149                 ;;
11150         esac
11151         ;;
11152 yes)
11153         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11154
11155         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11156
11157         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11158                 && test -z "${cf_tst_cflags}" \
11159                 && cf_fix_cppflags=no
11160         ;;
11161 esac
11162 done
11163
11164 if test -n "$cf_new_cflags" ; then
11165
11166         CFLAGS="$CFLAGS $cf_new_cflags"
11167 fi
11168
11169 if test -n "$cf_new_cppflags" ; then
11170
11171         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11172 fi
11173
11174 if test -n "$cf_new_extra_cppflags" ; then
11175
11176         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11177 fi
11178
11179         LIBS="$cf_pkgconfig_libs $LIBS"
11180
11181                         cf_x_athena_lib="$cf_pkgconfig_libs"
11182
11183 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11184
11185                         cat >>confdefs.h <<EOF
11186 #define $cf_x_athena_LIBS 1
11187 EOF
11188
11189 echo "$as_me:11189: checking for usable $cf_x_athena/Xmu package" >&5
11190 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11191 if test "${cf_cv_xaw_compat+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194
11195 cat >conftest.$ac_ext <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198
11199 #include <X11/Xmu/CharSet.h>
11200
11201 int
11202 main ()
11203 {
11204
11205 int check = XmuCompareISOLatin1("big", "small")
11206
11207   ;
11208   return 0;
11209 }
11210 _ACEOF
11211 rm -f conftest.$ac_objext conftest$ac_exeext
11212 if { (eval echo "$as_me:11212: \"$ac_link\"") >&5
11213   (eval $ac_link) 2>&5
11214   ac_status=$?
11215   echo "$as_me:11215: \$? = $ac_status" >&5
11216   (exit $ac_status); } &&
11217          { ac_try='test -s conftest$ac_exeext'
11218   { (eval echo "$as_me:11218: \"$ac_try\"") >&5
11219   (eval $ac_try) 2>&5
11220   ac_status=$?
11221   echo "$as_me:11221: \$? = $ac_status" >&5
11222   (exit $ac_status); }; }; then
11223   cf_cv_xaw_compat=yes
11224 else
11225   echo "$as_me: failed program was:" >&5
11226 cat conftest.$ac_ext >&5
11227 cf_cv_xaw_compat=no
11228 fi
11229 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11230 fi
11231 echo "$as_me:11231: result: $cf_cv_xaw_compat" >&5
11232 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11233
11234                         if test "$cf_cv_xaw_compat" = no
11235                         then
11236                                 # workaround for broken ".pc" files...
11237                                 case "$cf_x_athena_lib" in #(vi
11238                                 *-lXmu*) #(vi
11239                                         ;;
11240                                 *)
11241                                         test -n "$verbose" && echo "    work around broken package" 1>&6
11242
11243 echo "${as_me:-configure}:11243: testing work around broken package ..." 1>&5
11244
11245 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11246         test -n "$verbose" && echo "    found package xmu" 1>&6
11247
11248 echo "${as_me:-configure}:11248: testing found package xmu ..." 1>&5
11249
11250         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11251         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
11252         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11253
11254 echo "${as_me:-configure}:11254: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11255
11256         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11257
11258 echo "${as_me:-configure}:11258: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11259
11260 cf_fix_cppflags=no
11261 cf_new_cflags=
11262 cf_new_cppflags=
11263 cf_new_extra_cppflags=
11264
11265 for cf_add_cflags in $cf_pkgconfig_incs
11266 do
11267 case $cf_fix_cppflags in
11268 no)
11269         case $cf_add_cflags in #(vi
11270         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11271                 case $cf_add_cflags in
11272                 -D*)
11273                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11274
11275                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11276                                 && test -z "${cf_tst_cflags}" \
11277                                 && cf_fix_cppflags=yes
11278
11279                         if test $cf_fix_cppflags = yes ; then
11280                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11281                                 continue
11282                         elif test "${cf_tst_cflags}" = "\"'" ; then
11283                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11284                                 continue
11285                         fi
11286                         ;;
11287                 esac
11288                 case "$CPPFLAGS" in
11289                 *$cf_add_cflags) #(vi
11290                         ;;
11291                 *) #(vi
11292                         case $cf_add_cflags in #(vi
11293                         -D*)
11294                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11295
11296 CPPFLAGS=`echo "$CPPFLAGS" | \
11297         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11298                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11299
11300                                 ;;
11301                         esac
11302                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11303                         ;;
11304                 esac
11305                 ;;
11306         *)
11307                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11308                 ;;
11309         esac
11310         ;;
11311 yes)
11312         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11313
11314         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11315
11316         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11317                 && test -z "${cf_tst_cflags}" \
11318                 && cf_fix_cppflags=no
11319         ;;
11320 esac
11321 done
11322
11323 if test -n "$cf_new_cflags" ; then
11324
11325         CFLAGS="$CFLAGS $cf_new_cflags"
11326 fi
11327
11328 if test -n "$cf_new_cppflags" ; then
11329
11330         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11331 fi
11332
11333 if test -n "$cf_new_extra_cppflags" ; then
11334
11335         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11336 fi
11337
11338         LIBS="$cf_pkgconfig_libs $LIBS"
11339         :
11340 else
11341
11342 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11343
11344 echo "${as_me:-configure}:11344: testing ...before $LIBS ..." 1>&5
11345
11346 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
11347 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11348
11349 echo "${as_me:-configure}:11349: testing ...after  $LIBS ..." 1>&5
11350
11351 fi
11352
11353                                         ;;
11354                                 esac
11355                         fi
11356
11357                         break
11358 else
11359         :
11360 fi
11361
11362         done
11363 fi
11364
11365 if test -z "$cf_x_athena_lib" ; then
11366
11367 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11368         test -n "$verbose" && echo "    found package Xext" 1>&6
11369
11370 echo "${as_me:-configure}:11370: testing found package Xext ..." 1>&5
11371
11372         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11373         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
11374         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11375
11376 echo "${as_me:-configure}:11376: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11377
11378         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11379
11380 echo "${as_me:-configure}:11380: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11381
11382 cf_fix_cppflags=no
11383 cf_new_cflags=
11384 cf_new_cppflags=
11385 cf_new_extra_cppflags=
11386
11387 for cf_add_cflags in $cf_pkgconfig_incs
11388 do
11389 case $cf_fix_cppflags in
11390 no)
11391         case $cf_add_cflags in #(vi
11392         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11393                 case $cf_add_cflags in
11394                 -D*)
11395                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11396
11397                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11398                                 && test -z "${cf_tst_cflags}" \
11399                                 && cf_fix_cppflags=yes
11400
11401                         if test $cf_fix_cppflags = yes ; then
11402                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11403                                 continue
11404                         elif test "${cf_tst_cflags}" = "\"'" ; then
11405                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11406                                 continue
11407                         fi
11408                         ;;
11409                 esac
11410                 case "$CPPFLAGS" in
11411                 *$cf_add_cflags) #(vi
11412                         ;;
11413                 *) #(vi
11414                         case $cf_add_cflags in #(vi
11415                         -D*)
11416                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11417
11418 CPPFLAGS=`echo "$CPPFLAGS" | \
11419         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11420                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11421
11422                                 ;;
11423                         esac
11424                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11425                         ;;
11426                 esac
11427                 ;;
11428         *)
11429                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11430                 ;;
11431         esac
11432         ;;
11433 yes)
11434         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11435
11436         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11437
11438         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11439                 && test -z "${cf_tst_cflags}" \
11440                 && cf_fix_cppflags=no
11441         ;;
11442 esac
11443 done
11444
11445 if test -n "$cf_new_cflags" ; then
11446
11447         CFLAGS="$CFLAGS $cf_new_cflags"
11448 fi
11449
11450 if test -n "$cf_new_cppflags" ; then
11451
11452         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11453 fi
11454
11455 if test -n "$cf_new_extra_cppflags" ; then
11456
11457         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11458 fi
11459
11460         LIBS="$cf_pkgconfig_libs $LIBS"
11461         :
11462 else
11463
11464         echo "$as_me:11464: checking for XextCreateExtension in -lXext" >&5
11465 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11466 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11467   echo $ECHO_N "(cached) $ECHO_C" >&6
11468 else
11469   ac_check_lib_save_LIBS=$LIBS
11470 LIBS="-lXext  $LIBS"
11471 cat >conftest.$ac_ext <<_ACEOF
11472 #line 11472 "configure"
11473 #include "confdefs.h"
11474
11475 /* Override any gcc2 internal prototype to avoid an error.  */
11476 #ifdef __cplusplus
11477 extern "C"
11478 #endif
11479 /* We use char because int might match the return type of a gcc2
11480    builtin and then its argument prototype would still apply.  */
11481 char XextCreateExtension ();
11482 int
11483 main ()
11484 {
11485 XextCreateExtension ();
11486   ;
11487   return 0;
11488 }
11489 _ACEOF
11490 rm -f conftest.$ac_objext conftest$ac_exeext
11491 if { (eval echo "$as_me:11491: \"$ac_link\"") >&5
11492   (eval $ac_link) 2>&5
11493   ac_status=$?
11494   echo "$as_me:11494: \$? = $ac_status" >&5
11495   (exit $ac_status); } &&
11496          { ac_try='test -s conftest$ac_exeext'
11497   { (eval echo "$as_me:11497: \"$ac_try\"") >&5
11498   (eval $ac_try) 2>&5
11499   ac_status=$?
11500   echo "$as_me:11500: \$? = $ac_status" >&5
11501   (exit $ac_status); }; }; then
11502   ac_cv_lib_Xext_XextCreateExtension=yes
11503 else
11504   echo "$as_me: failed program was:" >&5
11505 cat conftest.$ac_ext >&5
11506 ac_cv_lib_Xext_XextCreateExtension=no
11507 fi
11508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11509 LIBS=$ac_check_lib_save_LIBS
11510 fi
11511 echo "$as_me:11511: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11512 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11513 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11514   LIBS="-lXext $LIBS"
11515 fi
11516
11517 fi
11518
11519 cf_have_X_LIBS=no
11520
11521 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11522         test -n "$verbose" && echo "    found package xt" 1>&6
11523
11524 echo "${as_me:-configure}:11524: testing found package xt ..." 1>&5
11525
11526         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11527         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11528         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11529
11530 echo "${as_me:-configure}:11530: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11531
11532         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
11533
11534 echo "${as_me:-configure}:11534: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11535
11536 cf_fix_cppflags=no
11537 cf_new_cflags=
11538 cf_new_cppflags=
11539 cf_new_extra_cppflags=
11540
11541 for cf_add_cflags in $cf_pkgconfig_incs
11542 do
11543 case $cf_fix_cppflags in
11544 no)
11545         case $cf_add_cflags in #(vi
11546         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11547                 case $cf_add_cflags in
11548                 -D*)
11549                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11550
11551                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11552                                 && test -z "${cf_tst_cflags}" \
11553                                 && cf_fix_cppflags=yes
11554
11555                         if test $cf_fix_cppflags = yes ; then
11556                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11557                                 continue
11558                         elif test "${cf_tst_cflags}" = "\"'" ; then
11559                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11560                                 continue
11561                         fi
11562                         ;;
11563                 esac
11564                 case "$CPPFLAGS" in
11565                 *$cf_add_cflags) #(vi
11566                         ;;
11567                 *) #(vi
11568                         case $cf_add_cflags in #(vi
11569                         -D*)
11570                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11571
11572 CPPFLAGS=`echo "$CPPFLAGS" | \
11573         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11574                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11575
11576                                 ;;
11577                         esac
11578                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11579                         ;;
11580                 esac
11581                 ;;
11582         *)
11583                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11584                 ;;
11585         esac
11586         ;;
11587 yes)
11588         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11589
11590         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11591
11592         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11593                 && test -z "${cf_tst_cflags}" \
11594                 && cf_fix_cppflags=no
11595         ;;
11596 esac
11597 done
11598
11599 if test -n "$cf_new_cflags" ; then
11600
11601         CFLAGS="$CFLAGS $cf_new_cflags"
11602 fi
11603
11604 if test -n "$cf_new_cppflags" ; then
11605
11606         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11607 fi
11608
11609 if test -n "$cf_new_extra_cppflags" ; then
11610
11611         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11612 fi
11613
11614         LIBS="$cf_pkgconfig_libs $LIBS"
11615
11616         case "x$LIBS" in #(vi
11617         *-lX11*) #(vi
11618                 ;;
11619         *)
11620 # we have an "xt" package, but it may omit Xt's dependency on X11
11621 echo "$as_me:11621: checking for usable X dependency" >&5
11622 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11623 if test "${cf_cv_xt_x11_compat+set}" = set; then
11624   echo $ECHO_N "(cached) $ECHO_C" >&6
11625 else
11626
11627 cat >conftest.$ac_ext <<_ACEOF
11628 #line 11628 "configure"
11629 #include "confdefs.h"
11630
11631 #include <X11/Xlib.h>
11632
11633 int
11634 main ()
11635 {
11636
11637         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11638         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11639         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11640         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11641
11642   ;
11643   return 0;
11644 }
11645 _ACEOF
11646 rm -f conftest.$ac_objext conftest$ac_exeext
11647 if { (eval echo "$as_me:11647: \"$ac_link\"") >&5
11648   (eval $ac_link) 2>&5
11649   ac_status=$?
11650   echo "$as_me:11650: \$? = $ac_status" >&5
11651   (exit $ac_status); } &&
11652          { ac_try='test -s conftest$ac_exeext'
11653   { (eval echo "$as_me:11653: \"$ac_try\"") >&5
11654   (eval $ac_try) 2>&5
11655   ac_status=$?
11656   echo "$as_me:11656: \$? = $ac_status" >&5
11657   (exit $ac_status); }; }; then
11658   cf_cv_xt_x11_compat=yes
11659 else
11660   echo "$as_me: failed program was:" >&5
11661 cat conftest.$ac_ext >&5
11662 cf_cv_xt_x11_compat=no
11663 fi
11664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11665 fi
11666 echo "$as_me:11666: result: $cf_cv_xt_x11_compat" >&5
11667 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11668                 if test "$cf_cv_xt_x11_compat" = no
11669                 then
11670                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11671
11672 echo "${as_me:-configure}:11672: testing work around broken X11 dependency ..." 1>&5
11673
11674                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11675
11676 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11677         test -n "$verbose" && echo "    found package x11" 1>&6
11678
11679 echo "${as_me:-configure}:11679: testing found package x11 ..." 1>&5
11680
11681         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11682         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11683         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11684
11685 echo "${as_me:-configure}:11685: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11686
11687         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11688
11689 echo "${as_me:-configure}:11689: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11690
11691 cf_fix_cppflags=no
11692 cf_new_cflags=
11693 cf_new_cppflags=
11694 cf_new_extra_cppflags=
11695
11696 for cf_add_cflags in $cf_pkgconfig_incs
11697 do
11698 case $cf_fix_cppflags in
11699 no)
11700         case $cf_add_cflags in #(vi
11701         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11702                 case $cf_add_cflags in
11703                 -D*)
11704                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11705
11706                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11707                                 && test -z "${cf_tst_cflags}" \
11708                                 && cf_fix_cppflags=yes
11709
11710                         if test $cf_fix_cppflags = yes ; then
11711                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11712                                 continue
11713                         elif test "${cf_tst_cflags}" = "\"'" ; then
11714                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11715                                 continue
11716                         fi
11717                         ;;
11718                 esac
11719                 case "$CPPFLAGS" in
11720                 *$cf_add_cflags) #(vi
11721                         ;;
11722                 *) #(vi
11723                         case $cf_add_cflags in #(vi
11724                         -D*)
11725                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11726
11727 CPPFLAGS=`echo "$CPPFLAGS" | \
11728         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11729                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11730
11731                                 ;;
11732                         esac
11733                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11734                         ;;
11735                 esac
11736                 ;;
11737         *)
11738                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11739                 ;;
11740         esac
11741         ;;
11742 yes)
11743         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11744
11745         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11746
11747         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11748                 && test -z "${cf_tst_cflags}" \
11749                 && cf_fix_cppflags=no
11750         ;;
11751 esac
11752 done
11753
11754 if test -n "$cf_new_cflags" ; then
11755
11756         CFLAGS="$CFLAGS $cf_new_cflags"
11757 fi
11758
11759 if test -n "$cf_new_cppflags" ; then
11760
11761         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11762 fi
11763
11764 if test -n "$cf_new_extra_cppflags" ; then
11765
11766         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11767 fi
11768
11769         LIBS="$cf_pkgconfig_libs $LIBS"
11770         :
11771 else
11772
11773 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11774
11775 echo "${as_me:-configure}:11775: testing ...before $LIBS ..." 1>&5
11776
11777 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
11778 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11779
11780 echo "${as_me:-configure}:11780: testing ...after  $LIBS ..." 1>&5
11781
11782 fi
11783
11784                 fi
11785                 ;;
11786         esac
11787
11788 echo "$as_me:11788: checking for usable X Toolkit package" >&5
11789 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11790 if test "${cf_cv_xt_ice_compat+set}" = set; then
11791   echo $ECHO_N "(cached) $ECHO_C" >&6
11792 else
11793
11794 cat >conftest.$ac_ext <<_ACEOF
11795 #line 11795 "configure"
11796 #include "confdefs.h"
11797
11798 #include <X11/Shell.h>
11799
11800 int
11801 main ()
11802 {
11803 int num = IceConnectionNumber(0)
11804
11805   ;
11806   return 0;
11807 }
11808 _ACEOF
11809 rm -f conftest.$ac_objext conftest$ac_exeext
11810 if { (eval echo "$as_me:11810: \"$ac_link\"") >&5
11811   (eval $ac_link) 2>&5
11812   ac_status=$?
11813   echo "$as_me:11813: \$? = $ac_status" >&5
11814   (exit $ac_status); } &&
11815          { ac_try='test -s conftest$ac_exeext'
11816   { (eval echo "$as_me:11816: \"$ac_try\"") >&5
11817   (eval $ac_try) 2>&5
11818   ac_status=$?
11819   echo "$as_me:11819: \$? = $ac_status" >&5
11820   (exit $ac_status); }; }; then
11821   cf_cv_xt_ice_compat=yes
11822 else
11823   echo "$as_me: failed program was:" >&5
11824 cat conftest.$ac_ext >&5
11825 cf_cv_xt_ice_compat=no
11826 fi
11827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11828 fi
11829 echo "$as_me:11829: result: $cf_cv_xt_ice_compat" >&5
11830 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11831
11832         if test "$cf_cv_xt_ice_compat" = no
11833         then
11834                 # workaround for broken ".pc" files used for X Toolkit.
11835                 case "x$X_PRE_LIBS" in #(vi
11836                 *-lICE*)
11837                         case "x$LIBS" in #(vi
11838                         *-lICE*) #(vi
11839                                 ;;
11840                         *)
11841                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11842
11843 echo "${as_me:-configure}:11843: testing work around broken ICE dependency ..." 1>&5
11844
11845 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11846         test -n "$verbose" && echo "    found package ice" 1>&6
11847
11848 echo "${as_me:-configure}:11848: testing found package ice ..." 1>&5
11849
11850         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11851         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11852         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11853
11854 echo "${as_me:-configure}:11854: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11855
11856         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11857
11858 echo "${as_me:-configure}:11858: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11859
11860 cf_fix_cppflags=no
11861 cf_new_cflags=
11862 cf_new_cppflags=
11863 cf_new_extra_cppflags=
11864
11865 for cf_add_cflags in $cf_pkgconfig_incs
11866 do
11867 case $cf_fix_cppflags in
11868 no)
11869         case $cf_add_cflags in #(vi
11870         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11871                 case $cf_add_cflags in
11872                 -D*)
11873                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11874
11875                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11876                                 && test -z "${cf_tst_cflags}" \
11877                                 && cf_fix_cppflags=yes
11878
11879                         if test $cf_fix_cppflags = yes ; then
11880                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11881                                 continue
11882                         elif test "${cf_tst_cflags}" = "\"'" ; then
11883                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11884                                 continue
11885                         fi
11886                         ;;
11887                 esac
11888                 case "$CPPFLAGS" in
11889                 *$cf_add_cflags) #(vi
11890                         ;;
11891                 *) #(vi
11892                         case $cf_add_cflags in #(vi
11893                         -D*)
11894                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11895
11896 CPPFLAGS=`echo "$CPPFLAGS" | \
11897         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11898                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11899
11900                                 ;;
11901                         esac
11902                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11903                         ;;
11904                 esac
11905                 ;;
11906         *)
11907                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11908                 ;;
11909         esac
11910         ;;
11911 yes)
11912         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11913
11914         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11915
11916         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11917                 && test -z "${cf_tst_cflags}" \
11918                 && cf_fix_cppflags=no
11919         ;;
11920 esac
11921 done
11922
11923 if test -n "$cf_new_cflags" ; then
11924
11925         CFLAGS="$CFLAGS $cf_new_cflags"
11926 fi
11927
11928 if test -n "$cf_new_cppflags" ; then
11929
11930         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11931 fi
11932
11933 if test -n "$cf_new_extra_cppflags" ; then
11934
11935         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11936 fi
11937
11938         LIBS="$cf_pkgconfig_libs $LIBS"
11939
11940 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11941         test -n "$verbose" && echo "    found package sm" 1>&6
11942
11943 echo "${as_me:-configure}:11943: testing found package sm ..." 1>&5
11944
11945         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11946         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11947         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11948
11949 echo "${as_me:-configure}:11949: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11950
11951         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11952
11953 echo "${as_me:-configure}:11953: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11954
11955 cf_fix_cppflags=no
11956 cf_new_cflags=
11957 cf_new_cppflags=
11958 cf_new_extra_cppflags=
11959
11960 for cf_add_cflags in $cf_pkgconfig_incs
11961 do
11962 case $cf_fix_cppflags in
11963 no)
11964         case $cf_add_cflags in #(vi
11965         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11966                 case $cf_add_cflags in
11967                 -D*)
11968                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11969
11970                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11971                                 && test -z "${cf_tst_cflags}" \
11972                                 && cf_fix_cppflags=yes
11973
11974                         if test $cf_fix_cppflags = yes ; then
11975                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11976                                 continue
11977                         elif test "${cf_tst_cflags}" = "\"'" ; then
11978                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11979                                 continue
11980                         fi
11981                         ;;
11982                 esac
11983                 case "$CPPFLAGS" in
11984                 *$cf_add_cflags) #(vi
11985                         ;;
11986                 *) #(vi
11987                         case $cf_add_cflags in #(vi
11988                         -D*)
11989                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11990
11991 CPPFLAGS=`echo "$CPPFLAGS" | \
11992         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11993                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11994
11995                                 ;;
11996                         esac
11997                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11998                         ;;
11999                 esac
12000                 ;;
12001         *)
12002                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12003                 ;;
12004         esac
12005         ;;
12006 yes)
12007         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12008
12009         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12010
12011         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12012                 && test -z "${cf_tst_cflags}" \
12013                 && cf_fix_cppflags=no
12014         ;;
12015 esac
12016 done
12017
12018 if test -n "$cf_new_cflags" ; then
12019
12020         CFLAGS="$CFLAGS $cf_new_cflags"
12021 fi
12022
12023 if test -n "$cf_new_cppflags" ; then
12024
12025         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12026 fi
12027
12028 if test -n "$cf_new_extra_cppflags" ; then
12029
12030         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12031 fi
12032
12033         LIBS="$cf_pkgconfig_libs $LIBS"
12034         :
12035 else
12036         :
12037 fi
12038
12039 else
12040
12041 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
12042
12043 echo "${as_me:-configure}:12043: testing ...before $LIBS ..." 1>&5
12044
12045 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
12046 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
12047
12048 echo "${as_me:-configure}:12048: testing ...after  $LIBS ..." 1>&5
12049
12050 fi
12051
12052                                 ;;
12053                         esac
12054                         ;;
12055                 esac
12056         fi
12057
12058         cf_have_X_LIBS=yes
12059
12060 else
12061
12062         LDFLAGS="$X_LIBS $LDFLAGS"
12063
12064 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12065
12066 echo "${as_me:-configure}:12066: testing checking additions to CFLAGS ..." 1>&5
12067
12068 cf_check_cflags="$CFLAGS"
12069 cf_check_cppflags="$CPPFLAGS"
12070
12071 cf_fix_cppflags=no
12072 cf_new_cflags=
12073 cf_new_cppflags=
12074 cf_new_extra_cppflags=
12075
12076 for cf_add_cflags in $X_CFLAGS
12077 do
12078 case $cf_fix_cppflags in
12079 no)
12080         case $cf_add_cflags in #(vi
12081         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12082                 case $cf_add_cflags in
12083                 -D*)
12084                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12085
12086                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12087                                 && test -z "${cf_tst_cflags}" \
12088                                 && cf_fix_cppflags=yes
12089
12090                         if test $cf_fix_cppflags = yes ; then
12091                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12092                                 continue
12093                         elif test "${cf_tst_cflags}" = "\"'" ; then
12094                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12095                                 continue
12096                         fi
12097                         ;;
12098                 esac
12099                 case "$CPPFLAGS" in
12100                 *$cf_add_cflags) #(vi
12101                         ;;
12102                 *) #(vi
12103                         case $cf_add_cflags in #(vi
12104                         -D*)
12105                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12106
12107 CPPFLAGS=`echo "$CPPFLAGS" | \
12108         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12109                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12110
12111                                 ;;
12112                         esac
12113                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12114                         ;;
12115                 esac
12116                 ;;
12117         *)
12118                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12119                 ;;
12120         esac
12121         ;;
12122 yes)
12123         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12124
12125         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12126
12127         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12128                 && test -z "${cf_tst_cflags}" \
12129                 && cf_fix_cppflags=no
12130         ;;
12131 esac
12132 done
12133
12134 if test -n "$cf_new_cflags" ; then
12135         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12136
12137 echo "${as_me:-configure}:12137: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12138
12139         CFLAGS="$CFLAGS $cf_new_cflags"
12140 fi
12141
12142 if test -n "$cf_new_cppflags" ; then
12143         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12144
12145 echo "${as_me:-configure}:12145: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12146
12147         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12148 fi
12149
12150 if test -n "$cf_new_extra_cppflags" ; then
12151         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12152
12153 echo "${as_me:-configure}:12153: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12154
12155         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12156 fi
12157
12158 if test "$cf_check_cflags" != "$CFLAGS" ; then
12159 cat >conftest.$ac_ext <<_ACEOF
12160 #line 12160 "configure"
12161 #include "confdefs.h"
12162 #include <stdio.h>
12163 int
12164 main ()
12165 {
12166 printf("Hello world");
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 rm -f conftest.$ac_objext conftest$ac_exeext
12172 if { (eval echo "$as_me:12172: \"$ac_link\"") >&5
12173   (eval $ac_link) 2>&5
12174   ac_status=$?
12175   echo "$as_me:12175: \$? = $ac_status" >&5
12176   (exit $ac_status); } &&
12177          { ac_try='test -s conftest$ac_exeext'
12178   { (eval echo "$as_me:12178: \"$ac_try\"") >&5
12179   (eval $ac_try) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit $ac_status); }; }; then
12183   :
12184 else
12185   echo "$as_me: failed program was:" >&5
12186 cat conftest.$ac_ext >&5
12187 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12188
12189 echo "${as_me:-configure}:12189: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12190
12191          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12192                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12193
12194 echo "${as_me:-configure}:12194: testing but keeping change to \$CPPFLAGS ..." 1>&5
12195
12196          fi
12197          CFLAGS="$cf_check_flags"
12198 fi
12199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12200 fi
12201
12202         echo "$as_me:12202: checking for XOpenDisplay" >&5
12203 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12204 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12205   echo $ECHO_N "(cached) $ECHO_C" >&6
12206 else
12207   cat >conftest.$ac_ext <<_ACEOF
12208 #line 12208 "configure"
12209 #include "confdefs.h"
12210 /* System header to define __stub macros and hopefully few prototypes,
12211     which can conflict with char XOpenDisplay (); below.  */
12212 #include <assert.h>
12213 /* Override any gcc2 internal prototype to avoid an error.  */
12214 #ifdef __cplusplus
12215 extern "C"
12216 #endif
12217 /* We use char because int might match the return type of a gcc2
12218    builtin and then its argument prototype would still apply.  */
12219 char XOpenDisplay ();
12220 char (*f) ();
12221
12222 int
12223 main ()
12224 {
12225 /* The GNU C library defines this for functions which it implements
12226     to always fail with ENOSYS.  Some functions are actually named
12227     something starting with __ and the normal name is an alias.  */
12228 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12229 choke me
12230 #else
12231 f = XOpenDisplay;
12232 #endif
12233
12234   ;
12235   return 0;
12236 }
12237 _ACEOF
12238 rm -f conftest.$ac_objext conftest$ac_exeext
12239 if { (eval echo "$as_me:12239: \"$ac_link\"") >&5
12240   (eval $ac_link) 2>&5
12241   ac_status=$?
12242   echo "$as_me:12242: \$? = $ac_status" >&5
12243   (exit $ac_status); } &&
12244          { ac_try='test -s conftest$ac_exeext'
12245   { (eval echo "$as_me:12245: \"$ac_try\"") >&5
12246   (eval $ac_try) 2>&5
12247   ac_status=$?
12248   echo "$as_me:12248: \$? = $ac_status" >&5
12249   (exit $ac_status); }; }; then
12250   ac_cv_func_XOpenDisplay=yes
12251 else
12252   echo "$as_me: failed program was:" >&5
12253 cat conftest.$ac_ext >&5
12254 ac_cv_func_XOpenDisplay=no
12255 fi
12256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12257 fi
12258 echo "$as_me:12258: result: $ac_cv_func_XOpenDisplay" >&5
12259 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12260 if test $ac_cv_func_XOpenDisplay = yes; then
12261   :
12262 else
12263
12264         echo "$as_me:12264: checking for XOpenDisplay in -lX11" >&5
12265 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12266 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12267   echo $ECHO_N "(cached) $ECHO_C" >&6
12268 else
12269   ac_check_lib_save_LIBS=$LIBS
12270 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12271 cat >conftest.$ac_ext <<_ACEOF
12272 #line 12272 "configure"
12273 #include "confdefs.h"
12274
12275 /* Override any gcc2 internal prototype to avoid an error.  */
12276 #ifdef __cplusplus
12277 extern "C"
12278 #endif
12279 /* We use char because int might match the return type of a gcc2
12280    builtin and then its argument prototype would still apply.  */
12281 char XOpenDisplay ();
12282 int
12283 main ()
12284 {
12285 XOpenDisplay ();
12286   ;
12287   return 0;
12288 }
12289 _ACEOF
12290 rm -f conftest.$ac_objext conftest$ac_exeext
12291 if { (eval echo "$as_me:12291: \"$ac_link\"") >&5
12292   (eval $ac_link) 2>&5
12293   ac_status=$?
12294   echo "$as_me:12294: \$? = $ac_status" >&5
12295   (exit $ac_status); } &&
12296          { ac_try='test -s conftest$ac_exeext'
12297   { (eval echo "$as_me:12297: \"$ac_try\"") >&5
12298   (eval $ac_try) 2>&5
12299   ac_status=$?
12300   echo "$as_me:12300: \$? = $ac_status" >&5
12301   (exit $ac_status); }; }; then
12302   ac_cv_lib_X11_XOpenDisplay=yes
12303 else
12304   echo "$as_me: failed program was:" >&5
12305 cat conftest.$ac_ext >&5
12306 ac_cv_lib_X11_XOpenDisplay=no
12307 fi
12308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12309 LIBS=$ac_check_lib_save_LIBS
12310 fi
12311 echo "$as_me:12311: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12312 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12313 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12314   LIBS="-lX11 $LIBS"
12315 fi
12316
12317 fi
12318
12319         echo "$as_me:12319: checking for XtAppInitialize" >&5
12320 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12321 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12322   echo $ECHO_N "(cached) $ECHO_C" >&6
12323 else
12324   cat >conftest.$ac_ext <<_ACEOF
12325 #line 12325 "configure"
12326 #include "confdefs.h"
12327 /* System header to define __stub macros and hopefully few prototypes,
12328     which can conflict with char XtAppInitialize (); below.  */
12329 #include <assert.h>
12330 /* Override any gcc2 internal prototype to avoid an error.  */
12331 #ifdef __cplusplus
12332 extern "C"
12333 #endif
12334 /* We use char because int might match the return type of a gcc2
12335    builtin and then its argument prototype would still apply.  */
12336 char XtAppInitialize ();
12337 char (*f) ();
12338
12339 int
12340 main ()
12341 {
12342 /* The GNU C library defines this for functions which it implements
12343     to always fail with ENOSYS.  Some functions are actually named
12344     something starting with __ and the normal name is an alias.  */
12345 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12346 choke me
12347 #else
12348 f = XtAppInitialize;
12349 #endif
12350
12351   ;
12352   return 0;
12353 }
12354 _ACEOF
12355 rm -f conftest.$ac_objext conftest$ac_exeext
12356 if { (eval echo "$as_me:12356: \"$ac_link\"") >&5
12357   (eval $ac_link) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); } &&
12361          { ac_try='test -s conftest$ac_exeext'
12362   { (eval echo "$as_me:12362: \"$ac_try\"") >&5
12363   (eval $ac_try) 2>&5
12364   ac_status=$?
12365   echo "$as_me:12365: \$? = $ac_status" >&5
12366   (exit $ac_status); }; }; then
12367   ac_cv_func_XtAppInitialize=yes
12368 else
12369   echo "$as_me: failed program was:" >&5
12370 cat conftest.$ac_ext >&5
12371 ac_cv_func_XtAppInitialize=no
12372 fi
12373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12374 fi
12375 echo "$as_me:12375: result: $ac_cv_func_XtAppInitialize" >&5
12376 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12377 if test $ac_cv_func_XtAppInitialize = yes; then
12378   :
12379 else
12380
12381         echo "$as_me:12381: checking for XtAppInitialize in -lXt" >&5
12382 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12383 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12384   echo $ECHO_N "(cached) $ECHO_C" >&6
12385 else
12386   ac_check_lib_save_LIBS=$LIBS
12387 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12388 cat >conftest.$ac_ext <<_ACEOF
12389 #line 12389 "configure"
12390 #include "confdefs.h"
12391
12392 /* Override any gcc2 internal prototype to avoid an error.  */
12393 #ifdef __cplusplus
12394 extern "C"
12395 #endif
12396 /* We use char because int might match the return type of a gcc2
12397    builtin and then its argument prototype would still apply.  */
12398 char XtAppInitialize ();
12399 int
12400 main ()
12401 {
12402 XtAppInitialize ();
12403   ;
12404   return 0;
12405 }
12406 _ACEOF
12407 rm -f conftest.$ac_objext conftest$ac_exeext
12408 if { (eval echo "$as_me:12408: \"$ac_link\"") >&5
12409   (eval $ac_link) 2>&5
12410   ac_status=$?
12411   echo "$as_me:12411: \$? = $ac_status" >&5
12412   (exit $ac_status); } &&
12413          { ac_try='test -s conftest$ac_exeext'
12414   { (eval echo "$as_me:12414: \"$ac_try\"") >&5
12415   (eval $ac_try) 2>&5
12416   ac_status=$?
12417   echo "$as_me:12417: \$? = $ac_status" >&5
12418   (exit $ac_status); }; }; then
12419   ac_cv_lib_Xt_XtAppInitialize=yes
12420 else
12421   echo "$as_me: failed program was:" >&5
12422 cat conftest.$ac_ext >&5
12423 ac_cv_lib_Xt_XtAppInitialize=no
12424 fi
12425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12426 LIBS=$ac_check_lib_save_LIBS
12427 fi
12428 echo "$as_me:12428: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12429 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12430 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12431   cat >>confdefs.h <<\EOF
12432 #define HAVE_LIBXT 1
12433 EOF
12434
12435                  cf_have_X_LIBS=Xt
12436                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12437 fi
12438
12439 fi
12440
12441 fi
12442
12443 if test $cf_have_X_LIBS = no ; then
12444         { echo "$as_me:12444: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12445 test program.  You will have to check and add the proper libraries by hand
12446 to makefile." >&5
12447 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12448 test program.  You will have to check and add the proper libraries by hand
12449 to makefile." >&2;}
12450 fi
12451
12452 cf_x_athena_root=$cf_x_athena
12453 cf_x_athena_inc=""
12454
12455 for cf_path in default \
12456         /usr/contrib/X11R6 \
12457         /usr/contrib/X11R5 \
12458         /usr/lib/X11R5 \
12459         /usr/local
12460 do
12461         if test -z "$cf_x_athena_inc" ; then
12462                 cf_save="$CPPFLAGS"
12463                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12464                 if test $cf_path != default ; then
12465                         CPPFLAGS="$cf_save -I$cf_path/include"
12466                         echo "$as_me:12466: checking for $cf_test in $cf_path" >&5
12467 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12468                 else
12469                         echo "$as_me:12469: checking for $cf_test" >&5
12470 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12471                 fi
12472                 cat >conftest.$ac_ext <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475
12476 #include <X11/Intrinsic.h>
12477 #include <$cf_test>
12478 int
12479 main ()
12480 {
12481
12482   ;
12483   return 0;
12484 }
12485 _ACEOF
12486 rm -f conftest.$ac_objext
12487 if { (eval echo "$as_me:12487: \"$ac_compile\"") >&5
12488   (eval $ac_compile) 2>&5
12489   ac_status=$?
12490   echo "$as_me:12490: \$? = $ac_status" >&5
12491   (exit $ac_status); } &&
12492          { ac_try='test -s conftest.$ac_objext'
12493   { (eval echo "$as_me:12493: \"$ac_try\"") >&5
12494   (eval $ac_try) 2>&5
12495   ac_status=$?
12496   echo "$as_me:12496: \$? = $ac_status" >&5
12497   (exit $ac_status); }; }; then
12498   cf_result=yes
12499 else
12500   echo "$as_me: failed program was:" >&5
12501 cat conftest.$ac_ext >&5
12502 cf_result=no
12503 fi
12504 rm -f conftest.$ac_objext conftest.$ac_ext
12505                 echo "$as_me:12505: result: $cf_result" >&5
12506 echo "${ECHO_T}$cf_result" >&6
12507                 if test "$cf_result" = yes ; then
12508                         cf_x_athena_inc=$cf_path
12509                         break
12510                 else
12511                         CPPFLAGS="$cf_save"
12512                 fi
12513         fi
12514 done
12515
12516 if test -z "$cf_x_athena_inc" ; then
12517         { echo "$as_me:12517: WARNING: Unable to successfully find Athena header files with test program" >&5
12518 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12519 elif test "$cf_x_athena_inc" != default ; then
12520         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12521 fi
12522
12523 cf_x_athena_root=$cf_x_athena
12524 cf_x_athena_lib=""
12525
12526 for cf_path in default \
12527         /usr/contrib/X11R6 \
12528         /usr/contrib/X11R5 \
12529         /usr/lib/X11R5 \
12530         /usr/local
12531 do
12532         for cf_lib in \
12533                 ${cf_x_athena_root} \
12534                 ${cf_x_athena_root}7 \
12535                 ${cf_x_athena_root}6
12536         do
12537         for cf_libs in \
12538                 "-l$cf_lib -lXmu" \
12539                 "-l$cf_lib -lXpm -lXmu" \
12540                 "-l${cf_lib}_s -lXmu_s"
12541         do
12542                 if test -z "$cf_x_athena_lib" ; then
12543                         cf_save="$LIBS"
12544                         cf_test=XawSimpleMenuAddGlobalActions
12545                         if test $cf_path != default ; then
12546                                 LIBS="-L$cf_path/lib $cf_libs $LIBS"
12547                                 echo "$as_me:12547: checking for $cf_libs in $cf_path" >&5
12548 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12549                         else
12550                                 LIBS="$cf_libs $LIBS"
12551                                 echo "$as_me:12551: checking for $cf_test in $cf_libs" >&5
12552 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12553                         fi
12554                         cat >conftest.$ac_ext <<_ACEOF
12555 #line 12555 "configure"
12556 #include "confdefs.h"
12557
12558 #include <X11/Intrinsic.h>
12559 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12560
12561 int
12562 main ()
12563 {
12564
12565 $cf_test((XtAppContext) 0)
12566   ;
12567   return 0;
12568 }
12569 _ACEOF
12570 rm -f conftest.$ac_objext conftest$ac_exeext
12571 if { (eval echo "$as_me:12571: \"$ac_link\"") >&5
12572   (eval $ac_link) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); } &&
12576          { ac_try='test -s conftest$ac_exeext'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   cf_result=yes
12583 else
12584   echo "$as_me: failed program was:" >&5
12585 cat conftest.$ac_ext >&5
12586 cf_result=no
12587 fi
12588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12589                         echo "$as_me:12589: result: $cf_result" >&5
12590 echo "${ECHO_T}$cf_result" >&6
12591                         if test "$cf_result" = yes ; then
12592                                 cf_x_athena_lib="$cf_libs"
12593                                 break
12594                         fi
12595                         LIBS="$cf_save"
12596                 fi
12597         done # cf_libs
12598                 test -n "$cf_x_athena_lib" && break
12599         done # cf_lib
12600 done
12601
12602 if test -z "$cf_x_athena_lib" ; then
12603         { { echo "$as_me:12603: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12604 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12605    { (exit 1); exit 1; }; }
12606 fi
12607
12608 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12609
12610 cat >>confdefs.h <<EOF
12611 #define $cf_x_athena_LIBS 1
12612 EOF
12613
12614 fi
12615
12616 if test -n "$ac_tool_prefix"; then
12617   for ac_prog in xcurses-config
12618   do
12619     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12621 echo "$as_me:12621: checking for $ac_word" >&5
12622 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12623 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12624   echo $ECHO_N "(cached) $ECHO_C" >&6
12625 else
12626   if test -n "$XCURSES_CONFIG"; then
12627   ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12628 else
12629   ac_save_IFS=$IFS; IFS=$ac_path_separator
12630 ac_dummy="$PATH"
12631 for ac_dir in $ac_dummy; do
12632   IFS=$ac_save_IFS
12633   test -z "$ac_dir" && ac_dir=.
12634   $as_executable_p "$ac_dir/$ac_word" || continue
12635 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12636 echo "$as_me:12636: found $ac_dir/$ac_word" >&5
12637 break
12638 done
12639
12640 fi
12641 fi
12642 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12643 if test -n "$XCURSES_CONFIG"; then
12644   echo "$as_me:12644: result: $XCURSES_CONFIG" >&5
12645 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12646 else
12647   echo "$as_me:12647: result: no" >&5
12648 echo "${ECHO_T}no" >&6
12649 fi
12650
12651     test -n "$XCURSES_CONFIG" && break
12652   done
12653 fi
12654 if test -z "$XCURSES_CONFIG"; then
12655   ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12656   for ac_prog in xcurses-config
12657 do
12658   # Extract the first word of "$ac_prog", so it can be a program name with args.
12659 set dummy $ac_prog; ac_word=$2
12660 echo "$as_me:12660: checking for $ac_word" >&5
12661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12662 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12663   echo $ECHO_N "(cached) $ECHO_C" >&6
12664 else
12665   if test -n "$ac_ct_XCURSES_CONFIG"; then
12666   ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12667 else
12668   ac_save_IFS=$IFS; IFS=$ac_path_separator
12669 ac_dummy="$PATH"
12670 for ac_dir in $ac_dummy; do
12671   IFS=$ac_save_IFS
12672   test -z "$ac_dir" && ac_dir=.
12673   $as_executable_p "$ac_dir/$ac_word" || continue
12674 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12675 echo "$as_me:12675: found $ac_dir/$ac_word" >&5
12676 break
12677 done
12678
12679 fi
12680 fi
12681 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12682 if test -n "$ac_ct_XCURSES_CONFIG"; then
12683   echo "$as_me:12683: result: $ac_ct_XCURSES_CONFIG" >&5
12684 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12685 else
12686   echo "$as_me:12686: result: no" >&5
12687 echo "${ECHO_T}no" >&6
12688 fi
12689
12690   test -n "$ac_ct_XCURSES_CONFIG" && break
12691 done
12692 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12693
12694   XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12695 fi
12696
12697 if test "$XCURSES_CONFIG" != none ; then
12698
12699 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12700 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12701
12702 cf_cv_lib_XCurses=yes
12703
12704 else
12705
12706 LDFLAGS="$LDFLAGS $X_LIBS"
12707
12708 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12709
12710 echo "${as_me:-configure}:12710: testing checking additions to CFLAGS ..." 1>&5
12711
12712 cf_check_cflags="$CFLAGS"
12713 cf_check_cppflags="$CPPFLAGS"
12714
12715 cf_fix_cppflags=no
12716 cf_new_cflags=
12717 cf_new_cppflags=
12718 cf_new_extra_cppflags=
12719
12720 for cf_add_cflags in $X_CFLAGS
12721 do
12722 case $cf_fix_cppflags in
12723 no)
12724         case $cf_add_cflags in #(vi
12725         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12726                 case $cf_add_cflags in
12727                 -D*)
12728                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12729
12730                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12731                                 && test -z "${cf_tst_cflags}" \
12732                                 && cf_fix_cppflags=yes
12733
12734                         if test $cf_fix_cppflags = yes ; then
12735                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12736                                 continue
12737                         elif test "${cf_tst_cflags}" = "\"'" ; then
12738                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12739                                 continue
12740                         fi
12741                         ;;
12742                 esac
12743                 case "$CPPFLAGS" in
12744                 *$cf_add_cflags) #(vi
12745                         ;;
12746                 *) #(vi
12747                         case $cf_add_cflags in #(vi
12748                         -D*)
12749                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12750
12751 CPPFLAGS=`echo "$CPPFLAGS" | \
12752         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12753                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12754
12755                                 ;;
12756                         esac
12757                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12758                         ;;
12759                 esac
12760                 ;;
12761         *)
12762                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12763                 ;;
12764         esac
12765         ;;
12766 yes)
12767         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12768
12769         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12770
12771         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12772                 && test -z "${cf_tst_cflags}" \
12773                 && cf_fix_cppflags=no
12774         ;;
12775 esac
12776 done
12777
12778 if test -n "$cf_new_cflags" ; then
12779         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12780
12781 echo "${as_me:-configure}:12781: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12782
12783         CFLAGS="$CFLAGS $cf_new_cflags"
12784 fi
12785
12786 if test -n "$cf_new_cppflags" ; then
12787         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12788
12789 echo "${as_me:-configure}:12789: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12790
12791         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12792 fi
12793
12794 if test -n "$cf_new_extra_cppflags" ; then
12795         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12796
12797 echo "${as_me:-configure}:12797: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12798
12799         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12800 fi
12801
12802 if test "$cf_check_cflags" != "$CFLAGS" ; then
12803 cat >conftest.$ac_ext <<_ACEOF
12804 #line 12804 "configure"
12805 #include "confdefs.h"
12806 #include <stdio.h>
12807 int
12808 main ()
12809 {
12810 printf("Hello world");
12811   ;
12812   return 0;
12813 }
12814 _ACEOF
12815 rm -f conftest.$ac_objext conftest$ac_exeext
12816 if { (eval echo "$as_me:12816: \"$ac_link\"") >&5
12817   (eval $ac_link) 2>&5
12818   ac_status=$?
12819   echo "$as_me:12819: \$? = $ac_status" >&5
12820   (exit $ac_status); } &&
12821          { ac_try='test -s conftest$ac_exeext'
12822   { (eval echo "$as_me:12822: \"$ac_try\"") >&5
12823   (eval $ac_try) 2>&5
12824   ac_status=$?
12825   echo "$as_me:12825: \$? = $ac_status" >&5
12826   (exit $ac_status); }; }; then
12827   :
12828 else
12829   echo "$as_me: failed program was:" >&5
12830 cat conftest.$ac_ext >&5
12831 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12832
12833 echo "${as_me:-configure}:12833: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12834
12835          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12836                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12837
12838 echo "${as_me:-configure}:12838: testing but keeping change to \$CPPFLAGS ..." 1>&5
12839
12840          fi
12841          CFLAGS="$cf_check_flags"
12842 fi
12843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12844 fi
12845
12846 echo "$as_me:12846: checking for XOpenDisplay in -lX11" >&5
12847 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12848 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12849   echo $ECHO_N "(cached) $ECHO_C" >&6
12850 else
12851   ac_check_lib_save_LIBS=$LIBS
12852 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12853 cat >conftest.$ac_ext <<_ACEOF
12854 #line 12854 "configure"
12855 #include "confdefs.h"
12856
12857 /* Override any gcc2 internal prototype to avoid an error.  */
12858 #ifdef __cplusplus
12859 extern "C"
12860 #endif
12861 /* We use char because int might match the return type of a gcc2
12862    builtin and then its argument prototype would still apply.  */
12863 char XOpenDisplay ();
12864 int
12865 main ()
12866 {
12867 XOpenDisplay ();
12868   ;
12869   return 0;
12870 }
12871 _ACEOF
12872 rm -f conftest.$ac_objext conftest$ac_exeext
12873 if { (eval echo "$as_me:12873: \"$ac_link\"") >&5
12874   (eval $ac_link) 2>&5
12875   ac_status=$?
12876   echo "$as_me:12876: \$? = $ac_status" >&5
12877   (exit $ac_status); } &&
12878          { ac_try='test -s conftest$ac_exeext'
12879   { (eval echo "$as_me:12879: \"$ac_try\"") >&5
12880   (eval $ac_try) 2>&5
12881   ac_status=$?
12882   echo "$as_me:12882: \$? = $ac_status" >&5
12883   (exit $ac_status); }; }; then
12884   ac_cv_lib_X11_XOpenDisplay=yes
12885 else
12886   echo "$as_me: failed program was:" >&5
12887 cat conftest.$ac_ext >&5
12888 ac_cv_lib_X11_XOpenDisplay=no
12889 fi
12890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12891 LIBS=$ac_check_lib_save_LIBS
12892 fi
12893 echo "$as_me:12893: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12894 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12895 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12896   LIBS="-lX11 $LIBS"
12897 fi
12898
12899 echo "$as_me:12899: checking for XCurses library" >&5
12900 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12901 if test "${cf_cv_lib_XCurses+set}" = set; then
12902   echo $ECHO_N "(cached) $ECHO_C" >&6
12903 else
12904
12905 LIBS="-lXCurses $LIBS"
12906 cat >conftest.$ac_ext <<_ACEOF
12907 #line 12907 "configure"
12908 #include "confdefs.h"
12909
12910 #include <xcurses.h>
12911 char *XCursesProgramName = "test";
12912
12913 int
12914 main ()
12915 {
12916 XCursesExit();
12917   ;
12918   return 0;
12919 }
12920 _ACEOF
12921 rm -f conftest.$ac_objext conftest$ac_exeext
12922 if { (eval echo "$as_me:12922: \"$ac_link\"") >&5
12923   (eval $ac_link) 2>&5
12924   ac_status=$?
12925   echo "$as_me:12925: \$? = $ac_status" >&5
12926   (exit $ac_status); } &&
12927          { ac_try='test -s conftest$ac_exeext'
12928   { (eval echo "$as_me:12928: \"$ac_try\"") >&5
12929   (eval $ac_try) 2>&5
12930   ac_status=$?
12931   echo "$as_me:12931: \$? = $ac_status" >&5
12932   (exit $ac_status); }; }; then
12933   cf_cv_lib_XCurses=yes
12934 else
12935   echo "$as_me: failed program was:" >&5
12936 cat conftest.$ac_ext >&5
12937 cf_cv_lib_XCurses=no
12938 fi
12939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12940
12941 fi
12942 echo "$as_me:12942: result: $cf_cv_lib_XCurses" >&5
12943 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12944
12945 fi
12946
12947 if test $cf_cv_lib_XCurses = yes ; then
12948         cat >>confdefs.h <<\EOF
12949 #define UNIX 1
12950 EOF
12951
12952         cat >>confdefs.h <<\EOF
12953 #define XCURSES 1
12954 EOF
12955
12956         echo "$as_me:12956: checking for xcurses.h" >&5
12957 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12958 if test "${ac_cv_header_xcurses_h+set}" = set; then
12959   echo $ECHO_N "(cached) $ECHO_C" >&6
12960 else
12961   cat >conftest.$ac_ext <<_ACEOF
12962 #line 12962 "configure"
12963 #include "confdefs.h"
12964 #include <xcurses.h>
12965 _ACEOF
12966 if { (eval echo "$as_me:12966: \"$ac_cpp conftest.$ac_ext\"") >&5
12967   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12968   ac_status=$?
12969   egrep -v '^ *\+' conftest.er1 >conftest.err
12970   rm -f conftest.er1
12971   cat conftest.err >&5
12972   echo "$as_me:12972: \$? = $ac_status" >&5
12973   (exit $ac_status); } >/dev/null; then
12974   if test -s conftest.err; then
12975     ac_cpp_err=$ac_c_preproc_warn_flag
12976   else
12977     ac_cpp_err=
12978   fi
12979 else
12980   ac_cpp_err=yes
12981 fi
12982 if test -z "$ac_cpp_err"; then
12983   ac_cv_header_xcurses_h=yes
12984 else
12985   echo "$as_me: failed program was:" >&5
12986   cat conftest.$ac_ext >&5
12987   ac_cv_header_xcurses_h=no
12988 fi
12989 rm -f conftest.err conftest.$ac_ext
12990 fi
12991 echo "$as_me:12991: result: $ac_cv_header_xcurses_h" >&5
12992 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12993 if test $ac_cv_header_xcurses_h = yes; then
12994   cat >>confdefs.h <<\EOF
12995 #define HAVE_XCURSES 1
12996 EOF
12997
12998 fi
12999
13000 else
13001         { { echo "$as_me:13001: error: Cannot link with XCurses" >&5
13002 echo "$as_me: error: Cannot link with XCurses" >&2;}
13003    { (exit 1); exit 1; }; }
13004 fi
13005
13006         ;;
13007 esac
13008
13009 case $cf_cv_screen in
13010 curses|curses_*)
13011
13012 echo "$as_me:13012: checking for NetBSD form.h" >&5
13013 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13014 if test "${cf_cv_netbsd_form_h+set}" = set; then
13015   echo $ECHO_N "(cached) $ECHO_C" >&6
13016 else
13017
13018 cat >conftest.$ac_ext <<_ACEOF
13019 #line 13019 "configure"
13020 #include "confdefs.h"
13021
13022 #include <${cf_cv_ncurses_header:-curses.h}>
13023 #include <form.h>
13024
13025 int
13026 main ()
13027 {
13028
13029         FORM *form;
13030         int y = current_field(form)->cursor_ypos;
13031         int x = current_field(form)->cursor_xpos;
13032
13033   ;
13034   return 0;
13035 }
13036 _ACEOF
13037 rm -f conftest.$ac_objext
13038 if { (eval echo "$as_me:13038: \"$ac_compile\"") >&5
13039   (eval $ac_compile) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit $ac_status); } &&
13043          { ac_try='test -s conftest.$ac_objext'
13044   { (eval echo "$as_me:13044: \"$ac_try\"") >&5
13045   (eval $ac_try) 2>&5
13046   ac_status=$?
13047   echo "$as_me:13047: \$? = $ac_status" >&5
13048   (exit $ac_status); }; }; then
13049   cf_cv_netbsd_form_h=yes
13050
13051 else
13052   echo "$as_me: failed program was:" >&5
13053 cat conftest.$ac_ext >&5
13054 cf_cv_netbsd_form_h=no
13055 fi
13056 rm -f conftest.$ac_objext conftest.$ac_ext
13057
13058 fi
13059 echo "$as_me:13059: result: $cf_cv_netbsd_form_h" >&5
13060 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13061
13062 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
13063 #define HAVE_NETBSD_FORM_H 1
13064 EOF
13065
13066 echo "$as_me:13066: checking for NetBSD menu.h" >&5
13067 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13068 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13069   echo $ECHO_N "(cached) $ECHO_C" >&6
13070 else
13071
13072 cat >conftest.$ac_ext <<_ACEOF
13073 #line 13073 "configure"
13074 #include "confdefs.h"
13075
13076 #include <${cf_cv_ncurses_header:-curses.h}>
13077 #include <menu.h>
13078
13079 int
13080 main ()
13081 {
13082
13083         MENU *menu;
13084         int y = menu->max_item_width;
13085
13086   ;
13087   return 0;
13088 }
13089 _ACEOF
13090 rm -f conftest.$ac_objext
13091 if { (eval echo "$as_me:13091: \"$ac_compile\"") >&5
13092   (eval $ac_compile) 2>&5
13093   ac_status=$?
13094   echo "$as_me:13094: \$? = $ac_status" >&5
13095   (exit $ac_status); } &&
13096          { ac_try='test -s conftest.$ac_objext'
13097   { (eval echo "$as_me:13097: \"$ac_try\"") >&5
13098   (eval $ac_try) 2>&5
13099   ac_status=$?
13100   echo "$as_me:13100: \$? = $ac_status" >&5
13101   (exit $ac_status); }; }; then
13102   cf_cv_netbsd_menu_h=yes
13103
13104 else
13105   echo "$as_me: failed program was:" >&5
13106 cat conftest.$ac_ext >&5
13107 cf_cv_netbsd_menu_h=no
13108 fi
13109 rm -f conftest.$ac_objext conftest.$ac_ext
13110
13111 fi
13112 echo "$as_me:13112: result: $cf_cv_netbsd_menu_h" >&5
13113 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13114
13115 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
13116 #define HAVE_NETBSD_MENU_H 1
13117 EOF
13118
13119         ;;
13120 ncursesw)
13121         cf_cv_libtype=w
13122         ;;
13123 esac
13124
13125 case $cf_cv_screen in #(vi
13126 pdcurses) #(vi
13127         ;;
13128 *)
13129         # look for curses-related libraries
13130
13131 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13132 echo "$as_me:13132: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13133 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13134 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13135   echo $ECHO_N "(cached) $ECHO_C" >&6
13136 else
13137   ac_check_lib_save_LIBS=$LIBS
13138 LIBS="-lpanel$cf_cv_libtype  $LIBS"
13139 cat >conftest.$ac_ext <<_ACEOF
13140 #line 13140 "configure"
13141 #include "confdefs.h"
13142
13143 /* Override any gcc2 internal prototype to avoid an error.  */
13144 #ifdef __cplusplus
13145 extern "C"
13146 #endif
13147 /* We use char because int might match the return type of a gcc2
13148    builtin and then its argument prototype would still apply.  */
13149 char new_panel ();
13150 int
13151 main ()
13152 {
13153 new_panel ();
13154   ;
13155   return 0;
13156 }
13157 _ACEOF
13158 rm -f conftest.$ac_objext conftest$ac_exeext
13159 if { (eval echo "$as_me:13159: \"$ac_link\"") >&5
13160   (eval $ac_link) 2>&5
13161   ac_status=$?
13162   echo "$as_me:13162: \$? = $ac_status" >&5
13163   (exit $ac_status); } &&
13164          { ac_try='test -s conftest$ac_exeext'
13165   { (eval echo "$as_me:13165: \"$ac_try\"") >&5
13166   (eval $ac_try) 2>&5
13167   ac_status=$?
13168   echo "$as_me:13168: \$? = $ac_status" >&5
13169   (exit $ac_status); }; }; then
13170   eval "$as_ac_Lib=yes"
13171 else
13172   echo "$as_me: failed program was:" >&5
13173 cat conftest.$ac_ext >&5
13174 eval "$as_ac_Lib=no"
13175 fi
13176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13177 LIBS=$ac_check_lib_save_LIBS
13178 fi
13179 echo "$as_me:13179: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13180 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13181 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13182   cat >>confdefs.h <<EOF
13183 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
13184 EOF
13185
13186   LIBS="-lpanel$cf_cv_libtype $LIBS"
13187
13188 fi
13189
13190 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13191 echo "$as_me:13191: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13192 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13193 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13194   echo $ECHO_N "(cached) $ECHO_C" >&6
13195 else
13196   ac_check_lib_save_LIBS=$LIBS
13197 LIBS="-lmenu$cf_cv_libtype  $LIBS"
13198 cat >conftest.$ac_ext <<_ACEOF
13199 #line 13199 "configure"
13200 #include "confdefs.h"
13201
13202 /* Override any gcc2 internal prototype to avoid an error.  */
13203 #ifdef __cplusplus
13204 extern "C"
13205 #endif
13206 /* We use char because int might match the return type of a gcc2
13207    builtin and then its argument prototype would still apply.  */
13208 char menu_driver ();
13209 int
13210 main ()
13211 {
13212 menu_driver ();
13213   ;
13214   return 0;
13215 }
13216 _ACEOF
13217 rm -f conftest.$ac_objext conftest$ac_exeext
13218 if { (eval echo "$as_me:13218: \"$ac_link\"") >&5
13219   (eval $ac_link) 2>&5
13220   ac_status=$?
13221   echo "$as_me:13221: \$? = $ac_status" >&5
13222   (exit $ac_status); } &&
13223          { ac_try='test -s conftest$ac_exeext'
13224   { (eval echo "$as_me:13224: \"$ac_try\"") >&5
13225   (eval $ac_try) 2>&5
13226   ac_status=$?
13227   echo "$as_me:13227: \$? = $ac_status" >&5
13228   (exit $ac_status); }; }; then
13229   eval "$as_ac_Lib=yes"
13230 else
13231   echo "$as_me: failed program was:" >&5
13232 cat conftest.$ac_ext >&5
13233 eval "$as_ac_Lib=no"
13234 fi
13235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13236 LIBS=$ac_check_lib_save_LIBS
13237 fi
13238 echo "$as_me:13238: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13239 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13240 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13241   cat >>confdefs.h <<EOF
13242 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
13243 EOF
13244
13245   LIBS="-lmenu$cf_cv_libtype $LIBS"
13246
13247 fi
13248
13249 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13250 echo "$as_me:13250: checking for form_driver in -lform$cf_cv_libtype" >&5
13251 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13252 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13253   echo $ECHO_N "(cached) $ECHO_C" >&6
13254 else
13255   ac_check_lib_save_LIBS=$LIBS
13256 LIBS="-lform$cf_cv_libtype  $LIBS"
13257 cat >conftest.$ac_ext <<_ACEOF
13258 #line 13258 "configure"
13259 #include "confdefs.h"
13260
13261 /* Override any gcc2 internal prototype to avoid an error.  */
13262 #ifdef __cplusplus
13263 extern "C"
13264 #endif
13265 /* We use char because int might match the return type of a gcc2
13266    builtin and then its argument prototype would still apply.  */
13267 char form_driver ();
13268 int
13269 main ()
13270 {
13271 form_driver ();
13272   ;
13273   return 0;
13274 }
13275 _ACEOF
13276 rm -f conftest.$ac_objext conftest$ac_exeext
13277 if { (eval echo "$as_me:13277: \"$ac_link\"") >&5
13278   (eval $ac_link) 2>&5
13279   ac_status=$?
13280   echo "$as_me:13280: \$? = $ac_status" >&5
13281   (exit $ac_status); } &&
13282          { ac_try='test -s conftest$ac_exeext'
13283   { (eval echo "$as_me:13283: \"$ac_try\"") >&5
13284   (eval $ac_try) 2>&5
13285   ac_status=$?
13286   echo "$as_me:13286: \$? = $ac_status" >&5
13287   (exit $ac_status); }; }; then
13288   eval "$as_ac_Lib=yes"
13289 else
13290   echo "$as_me: failed program was:" >&5
13291 cat conftest.$ac_ext >&5
13292 eval "$as_ac_Lib=no"
13293 fi
13294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13295 LIBS=$ac_check_lib_save_LIBS
13296 fi
13297 echo "$as_me:13297: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13298 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13299 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13300   cat >>confdefs.h <<EOF
13301 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
13302 EOF
13303
13304   LIBS="-lform$cf_cv_libtype $LIBS"
13305
13306 fi
13307
13308         # look for curses-related headers
13309
13310 for ac_header in \
13311                 nc_alloc.h \
13312                 nomacros.h \
13313                 form.h \
13314                 menu.h \
13315                 panel.h \
13316                 term_entry.h \
13317
13318 do
13319 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13320 echo "$as_me:13320: checking for $ac_header" >&5
13321 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13322 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13323   echo $ECHO_N "(cached) $ECHO_C" >&6
13324 else
13325   cat >conftest.$ac_ext <<_ACEOF
13326 #line 13326 "configure"
13327 #include "confdefs.h"
13328 #include <$ac_header>
13329 _ACEOF
13330 if { (eval echo "$as_me:13330: \"$ac_cpp conftest.$ac_ext\"") >&5
13331   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13332   ac_status=$?
13333   egrep -v '^ *\+' conftest.er1 >conftest.err
13334   rm -f conftest.er1
13335   cat conftest.err >&5
13336   echo "$as_me:13336: \$? = $ac_status" >&5
13337   (exit $ac_status); } >/dev/null; then
13338   if test -s conftest.err; then
13339     ac_cpp_err=$ac_c_preproc_warn_flag
13340   else
13341     ac_cpp_err=
13342   fi
13343 else
13344   ac_cpp_err=yes
13345 fi
13346 if test -z "$ac_cpp_err"; then
13347   eval "$as_ac_Header=yes"
13348 else
13349   echo "$as_me: failed program was:" >&5
13350   cat conftest.$ac_ext >&5
13351   eval "$as_ac_Header=no"
13352 fi
13353 rm -f conftest.err conftest.$ac_ext
13354 fi
13355 echo "$as_me:13355: result: `eval echo '${'$as_ac_Header'}'`" >&5
13356 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13357 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13358   cat >>confdefs.h <<EOF
13359 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13360 EOF
13361
13362 fi
13363 done
13364
13365         ;;
13366 esac
13367
13368 echo "$as_me:13368: checking return type of signal handlers" >&5
13369 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13370 if test "${ac_cv_type_signal+set}" = set; then
13371   echo $ECHO_N "(cached) $ECHO_C" >&6
13372 else
13373   cat >conftest.$ac_ext <<_ACEOF
13374 #line 13374 "configure"
13375 #include "confdefs.h"
13376 #include <sys/types.h>
13377 #include <signal.h>
13378 #ifdef signal
13379 # undef signal
13380 #endif
13381 #ifdef __cplusplus
13382 extern "C" void (*signal (int, void (*)(int)))(int);
13383 #else
13384 void (*signal ()) ();
13385 #endif
13386
13387 int
13388 main ()
13389 {
13390 int i;
13391   ;
13392   return 0;
13393 }
13394 _ACEOF
13395 rm -f conftest.$ac_objext
13396 if { (eval echo "$as_me:13396: \"$ac_compile\"") >&5
13397   (eval $ac_compile) 2>&5
13398   ac_status=$?
13399   echo "$as_me:13399: \$? = $ac_status" >&5
13400   (exit $ac_status); } &&
13401          { ac_try='test -s conftest.$ac_objext'
13402   { (eval echo "$as_me:13402: \"$ac_try\"") >&5
13403   (eval $ac_try) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit $ac_status); }; }; then
13407   ac_cv_type_signal=void
13408 else
13409   echo "$as_me: failed program was:" >&5
13410 cat conftest.$ac_ext >&5
13411 ac_cv_type_signal=int
13412 fi
13413 rm -f conftest.$ac_objext conftest.$ac_ext
13414 fi
13415 echo "$as_me:13415: result: $ac_cv_type_signal" >&5
13416 echo "${ECHO_T}$ac_cv_type_signal" >&6
13417
13418 cat >>confdefs.h <<EOF
13419 #define RETSIGTYPE $ac_cv_type_signal
13420 EOF
13421
13422 echo "$as_me:13422: checking for ANSI C header files" >&5
13423 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13424 if test "${ac_cv_header_stdc+set}" = set; then
13425   echo $ECHO_N "(cached) $ECHO_C" >&6
13426 else
13427   cat >conftest.$ac_ext <<_ACEOF
13428 #line 13428 "configure"
13429 #include "confdefs.h"
13430 #include <stdlib.h>
13431 #include <stdarg.h>
13432 #include <string.h>
13433 #include <float.h>
13434
13435 _ACEOF
13436 if { (eval echo "$as_me:13436: \"$ac_cpp conftest.$ac_ext\"") >&5
13437   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13438   ac_status=$?
13439   egrep -v '^ *\+' conftest.er1 >conftest.err
13440   rm -f conftest.er1
13441   cat conftest.err >&5
13442   echo "$as_me:13442: \$? = $ac_status" >&5
13443   (exit $ac_status); } >/dev/null; then
13444   if test -s conftest.err; then
13445     ac_cpp_err=$ac_c_preproc_warn_flag
13446   else
13447     ac_cpp_err=
13448   fi
13449 else
13450   ac_cpp_err=yes
13451 fi
13452 if test -z "$ac_cpp_err"; then
13453   ac_cv_header_stdc=yes
13454 else
13455   echo "$as_me: failed program was:" >&5
13456   cat conftest.$ac_ext >&5
13457   ac_cv_header_stdc=no
13458 fi
13459 rm -f conftest.err conftest.$ac_ext
13460
13461 if test $ac_cv_header_stdc = yes; then
13462   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13463   cat >conftest.$ac_ext <<_ACEOF
13464 #line 13464 "configure"
13465 #include "confdefs.h"
13466 #include <string.h>
13467
13468 _ACEOF
13469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13470   egrep "memchr" >/dev/null 2>&1; then
13471   :
13472 else
13473   ac_cv_header_stdc=no
13474 fi
13475 rm -rf conftest*
13476
13477 fi
13478
13479 if test $ac_cv_header_stdc = yes; then
13480   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13481   cat >conftest.$ac_ext <<_ACEOF
13482 #line 13482 "configure"
13483 #include "confdefs.h"
13484 #include <stdlib.h>
13485
13486 _ACEOF
13487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13488   egrep "free" >/dev/null 2>&1; then
13489   :
13490 else
13491   ac_cv_header_stdc=no
13492 fi
13493 rm -rf conftest*
13494
13495 fi
13496
13497 if test $ac_cv_header_stdc = yes; then
13498   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13499   if test "$cross_compiling" = yes; then
13500   :
13501 else
13502   cat >conftest.$ac_ext <<_ACEOF
13503 #line 13503 "configure"
13504 #include "confdefs.h"
13505 #include <ctype.h>
13506 #if ((' ' & 0x0FF) == 0x020)
13507 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13508 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13509 #else
13510 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13511                      || ('j' <= (c) && (c) <= 'r') \
13512                      || ('s' <= (c) && (c) <= 'z'))
13513 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13514 #endif
13515
13516 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13517 int
13518 main ()
13519 {
13520   int i;
13521   for (i = 0; i < 256; i++)
13522     if (XOR (islower (i), ISLOWER (i))
13523         || toupper (i) != TOUPPER (i))
13524       $ac_main_return(2);
13525   $ac_main_return (0);
13526 }
13527 _ACEOF
13528 rm -f conftest$ac_exeext
13529 if { (eval echo "$as_me:13529: \"$ac_link\"") >&5
13530   (eval $ac_link) 2>&5
13531   ac_status=$?
13532   echo "$as_me:13532: \$? = $ac_status" >&5
13533   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13534   { (eval echo "$as_me:13534: \"$ac_try\"") >&5
13535   (eval $ac_try) 2>&5
13536   ac_status=$?
13537   echo "$as_me:13537: \$? = $ac_status" >&5
13538   (exit $ac_status); }; }; then
13539   :
13540 else
13541   echo "$as_me: program exited with status $ac_status" >&5
13542 echo "$as_me: failed program was:" >&5
13543 cat conftest.$ac_ext >&5
13544 ac_cv_header_stdc=no
13545 fi
13546 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13547 fi
13548 fi
13549 fi
13550 echo "$as_me:13550: result: $ac_cv_header_stdc" >&5
13551 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13552 if test $ac_cv_header_stdc = yes; then
13553
13554 cat >>confdefs.h <<\EOF
13555 #define STDC_HEADERS 1
13556 EOF
13557
13558 fi
13559
13560 echo "$as_me:13560: checking whether time.h and sys/time.h may both be included" >&5
13561 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13562 if test "${ac_cv_header_time+set}" = set; then
13563   echo $ECHO_N "(cached) $ECHO_C" >&6
13564 else
13565   cat >conftest.$ac_ext <<_ACEOF
13566 #line 13566 "configure"
13567 #include "confdefs.h"
13568 #include <sys/types.h>
13569 #include <sys/time.h>
13570 #include <time.h>
13571
13572 int
13573 main ()
13574 {
13575 if ((struct tm *) 0)
13576 return 0;
13577   ;
13578   return 0;
13579 }
13580 _ACEOF
13581 rm -f conftest.$ac_objext
13582 if { (eval echo "$as_me:13582: \"$ac_compile\"") >&5
13583   (eval $ac_compile) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit $ac_status); } &&
13587          { ac_try='test -s conftest.$ac_objext'
13588   { (eval echo "$as_me:13588: \"$ac_try\"") >&5
13589   (eval $ac_try) 2>&5
13590   ac_status=$?
13591   echo "$as_me:13591: \$? = $ac_status" >&5
13592   (exit $ac_status); }; }; then
13593   ac_cv_header_time=yes
13594 else
13595   echo "$as_me: failed program was:" >&5
13596 cat conftest.$ac_ext >&5
13597 ac_cv_header_time=no
13598 fi
13599 rm -f conftest.$ac_objext conftest.$ac_ext
13600 fi
13601 echo "$as_me:13601: result: $ac_cv_header_time" >&5
13602 echo "${ECHO_T}$ac_cv_header_time" >&6
13603 if test $ac_cv_header_time = yes; then
13604
13605 cat >>confdefs.h <<\EOF
13606 #define TIME_WITH_SYS_TIME 1
13607 EOF
13608
13609 fi
13610
13611 for ac_header in \
13612 getopt.h \
13613 locale.h \
13614 math.h \
13615 stdarg.h \
13616 sys/ioctl.h \
13617 sys/select.h \
13618 sys/time.h \
13619 termios.h \
13620 unistd.h \
13621
13622 do
13623 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13624 echo "$as_me:13624: checking for $ac_header" >&5
13625 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13626 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13627   echo $ECHO_N "(cached) $ECHO_C" >&6
13628 else
13629   cat >conftest.$ac_ext <<_ACEOF
13630 #line 13630 "configure"
13631 #include "confdefs.h"
13632 #include <$ac_header>
13633 _ACEOF
13634 if { (eval echo "$as_me:13634: \"$ac_cpp conftest.$ac_ext\"") >&5
13635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13636   ac_status=$?
13637   egrep -v '^ *\+' conftest.er1 >conftest.err
13638   rm -f conftest.er1
13639   cat conftest.err >&5
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); } >/dev/null; then
13642   if test -s conftest.err; then
13643     ac_cpp_err=$ac_c_preproc_warn_flag
13644   else
13645     ac_cpp_err=
13646   fi
13647 else
13648   ac_cpp_err=yes
13649 fi
13650 if test -z "$ac_cpp_err"; then
13651   eval "$as_ac_Header=yes"
13652 else
13653   echo "$as_me: failed program was:" >&5
13654   cat conftest.$ac_ext >&5
13655   eval "$as_ac_Header=no"
13656 fi
13657 rm -f conftest.err conftest.$ac_ext
13658 fi
13659 echo "$as_me:13659: result: `eval echo '${'$as_ac_Header'}'`" >&5
13660 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13661 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13662   cat >>confdefs.h <<EOF
13663 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13664 EOF
13665
13666 fi
13667 done
13668
13669 for ac_header in unistd.h getopt.h
13670 do
13671 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13672 echo "$as_me:13672: checking for $ac_header" >&5
13673 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13674 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13675   echo $ECHO_N "(cached) $ECHO_C" >&6
13676 else
13677   cat >conftest.$ac_ext <<_ACEOF
13678 #line 13678 "configure"
13679 #include "confdefs.h"
13680 #include <$ac_header>
13681 _ACEOF
13682 if { (eval echo "$as_me:13682: \"$ac_cpp conftest.$ac_ext\"") >&5
13683   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13684   ac_status=$?
13685   egrep -v '^ *\+' conftest.er1 >conftest.err
13686   rm -f conftest.er1
13687   cat conftest.err >&5
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit $ac_status); } >/dev/null; then
13690   if test -s conftest.err; then
13691     ac_cpp_err=$ac_c_preproc_warn_flag
13692   else
13693     ac_cpp_err=
13694   fi
13695 else
13696   ac_cpp_err=yes
13697 fi
13698 if test -z "$ac_cpp_err"; then
13699   eval "$as_ac_Header=yes"
13700 else
13701   echo "$as_me: failed program was:" >&5
13702   cat conftest.$ac_ext >&5
13703   eval "$as_ac_Header=no"
13704 fi
13705 rm -f conftest.err conftest.$ac_ext
13706 fi
13707 echo "$as_me:13707: result: `eval echo '${'$as_ac_Header'}'`" >&5
13708 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13709 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13710   cat >>confdefs.h <<EOF
13711 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13712 EOF
13713
13714 fi
13715 done
13716
13717 echo "$as_me:13717: checking for header declaring getopt variables" >&5
13718 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13719 if test "${cf_cv_getopt_header+set}" = set; then
13720   echo $ECHO_N "(cached) $ECHO_C" >&6
13721 else
13722
13723 cf_cv_getopt_header=none
13724 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13725 do
13726 cat >conftest.$ac_ext <<_ACEOF
13727 #line 13727 "configure"
13728 #include "confdefs.h"
13729
13730 #include <$cf_header>
13731 int
13732 main ()
13733 {
13734 int x = optind; char *y = optarg
13735   ;
13736   return 0;
13737 }
13738 _ACEOF
13739 rm -f conftest.$ac_objext
13740 if { (eval echo "$as_me:13740: \"$ac_compile\"") >&5
13741   (eval $ac_compile) 2>&5
13742   ac_status=$?
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit $ac_status); } &&
13745          { ac_try='test -s conftest.$ac_objext'
13746   { (eval echo "$as_me:13746: \"$ac_try\"") >&5
13747   (eval $ac_try) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit $ac_status); }; }; then
13751   cf_cv_getopt_header=$cf_header
13752  break
13753 else
13754   echo "$as_me: failed program was:" >&5
13755 cat conftest.$ac_ext >&5
13756 fi
13757 rm -f conftest.$ac_objext conftest.$ac_ext
13758 done
13759
13760 fi
13761 echo "$as_me:13761: result: $cf_cv_getopt_header" >&5
13762 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13763 if test $cf_cv_getopt_header != none ; then
13764         cat >>confdefs.h <<\EOF
13765 #define HAVE_GETOPT_HEADER 1
13766 EOF
13767
13768 fi
13769
13770 for ac_func in \
13771 gettimeofday \
13772 strdup \
13773
13774 do
13775 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13776 echo "$as_me:13776: checking for $ac_func" >&5
13777 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13778 if eval "test \"\${$as_ac_var+set}\" = set"; then
13779   echo $ECHO_N "(cached) $ECHO_C" >&6
13780 else
13781   cat >conftest.$ac_ext <<_ACEOF
13782 #line 13782 "configure"
13783 #include "confdefs.h"
13784 /* System header to define __stub macros and hopefully few prototypes,
13785     which can conflict with char $ac_func (); below.  */
13786 #include <assert.h>
13787 /* Override any gcc2 internal prototype to avoid an error.  */
13788 #ifdef __cplusplus
13789 extern "C"
13790 #endif
13791 /* We use char because int might match the return type of a gcc2
13792    builtin and then its argument prototype would still apply.  */
13793 char $ac_func ();
13794 char (*f) ();
13795
13796 int
13797 main ()
13798 {
13799 /* The GNU C library defines this for functions which it implements
13800     to always fail with ENOSYS.  Some functions are actually named
13801     something starting with __ and the normal name is an alias.  */
13802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13803 choke me
13804 #else
13805 f = $ac_func;
13806 #endif
13807
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 rm -f conftest.$ac_objext conftest$ac_exeext
13813 if { (eval echo "$as_me:13813: \"$ac_link\"") >&5
13814   (eval $ac_link) 2>&5
13815   ac_status=$?
13816   echo "$as_me:13816: \$? = $ac_status" >&5
13817   (exit $ac_status); } &&
13818          { ac_try='test -s conftest$ac_exeext'
13819   { (eval echo "$as_me:13819: \"$ac_try\"") >&5
13820   (eval $ac_try) 2>&5
13821   ac_status=$?
13822   echo "$as_me:13822: \$? = $ac_status" >&5
13823   (exit $ac_status); }; }; then
13824   eval "$as_ac_var=yes"
13825 else
13826   echo "$as_me: failed program was:" >&5
13827 cat conftest.$ac_ext >&5
13828 eval "$as_ac_var=no"
13829 fi
13830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13831 fi
13832 echo "$as_me:13832: result: `eval echo '${'$as_ac_var'}'`" >&5
13833 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13834 if test `eval echo '${'$as_ac_var'}'` = yes; then
13835   cat >>confdefs.h <<EOF
13836 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13837 EOF
13838
13839 fi
13840 done
13841
13842 if test "$cf_enable_widec" = yes; then
13843
13844 for ac_func in \
13845 mblen \
13846 mbrlen \
13847 mbrtowc \
13848 mbsrtowcs \
13849 mbstowcs \
13850 mbtowc \
13851 wcsrtombs \
13852 wcstombs \
13853
13854 do
13855 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13856 echo "$as_me:13856: checking for $ac_func" >&5
13857 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13858 if eval "test \"\${$as_ac_var+set}\" = set"; then
13859   echo $ECHO_N "(cached) $ECHO_C" >&6
13860 else
13861   cat >conftest.$ac_ext <<_ACEOF
13862 #line 13862 "configure"
13863 #include "confdefs.h"
13864 /* System header to define __stub macros and hopefully few prototypes,
13865     which can conflict with char $ac_func (); below.  */
13866 #include <assert.h>
13867 /* Override any gcc2 internal prototype to avoid an error.  */
13868 #ifdef __cplusplus
13869 extern "C"
13870 #endif
13871 /* We use char because int might match the return type of a gcc2
13872    builtin and then its argument prototype would still apply.  */
13873 char $ac_func ();
13874 char (*f) ();
13875
13876 int
13877 main ()
13878 {
13879 /* The GNU C library defines this for functions which it implements
13880     to always fail with ENOSYS.  Some functions are actually named
13881     something starting with __ and the normal name is an alias.  */
13882 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13883 choke me
13884 #else
13885 f = $ac_func;
13886 #endif
13887
13888   ;
13889   return 0;
13890 }
13891 _ACEOF
13892 rm -f conftest.$ac_objext conftest$ac_exeext
13893 if { (eval echo "$as_me:13893: \"$ac_link\"") >&5
13894   (eval $ac_link) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit $ac_status); } &&
13898          { ac_try='test -s conftest$ac_exeext'
13899   { (eval echo "$as_me:13899: \"$ac_try\"") >&5
13900   (eval $ac_try) 2>&5
13901   ac_status=$?
13902   echo "$as_me:13902: \$? = $ac_status" >&5
13903   (exit $ac_status); }; }; then
13904   eval "$as_ac_var=yes"
13905 else
13906   echo "$as_me: failed program was:" >&5
13907 cat conftest.$ac_ext >&5
13908 eval "$as_ac_var=no"
13909 fi
13910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13911 fi
13912 echo "$as_me:13912: result: `eval echo '${'$as_ac_var'}'`" >&5
13913 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13914 if test `eval echo '${'$as_ac_var'}'` = yes; then
13915   cat >>confdefs.h <<EOF
13916 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13917 EOF
13918
13919 fi
13920 done
13921
13922 fi
13923
13924 echo "$as_me:13924: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13925 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13926 if test "${cf_cv_need_xopen_extension+set}" = set; then
13927   echo $ECHO_N "(cached) $ECHO_C" >&6
13928 else
13929
13930 cat >conftest.$ac_ext <<_ACEOF
13931 #line 13931 "configure"
13932 #include "confdefs.h"
13933
13934 #include <stdlib.h>
13935 #include <${cf_cv_ncurses_header:-curses.h}>
13936 int
13937 main ()
13938 {
13939
13940 #if defined(NCURSES_VERSION_PATCH)
13941 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13942         make an error
13943 #endif
13944 #endif
13945         long x = winnstr(stdscr, "", 0);
13946         int x1, y1;
13947         getbegyx(stdscr, y1, x1)
13948   ;
13949   return 0;
13950 }
13951 _ACEOF
13952 rm -f conftest.$ac_objext conftest$ac_exeext
13953 if { (eval echo "$as_me:13953: \"$ac_link\"") >&5
13954   (eval $ac_link) 2>&5
13955   ac_status=$?
13956   echo "$as_me:13956: \$? = $ac_status" >&5
13957   (exit $ac_status); } &&
13958          { ac_try='test -s conftest$ac_exeext'
13959   { (eval echo "$as_me:13959: \"$ac_try\"") >&5
13960   (eval $ac_try) 2>&5
13961   ac_status=$?
13962   echo "$as_me:13962: \$? = $ac_status" >&5
13963   (exit $ac_status); }; }; then
13964   cf_cv_need_xopen_extension=no
13965 else
13966   echo "$as_me: failed program was:" >&5
13967 cat conftest.$ac_ext >&5
13968 cat >conftest.$ac_ext <<_ACEOF
13969 #line 13969 "configure"
13970 #include "confdefs.h"
13971
13972 #define _XOPEN_SOURCE_EXTENDED
13973 #include <stdlib.h>
13974 #include <${cf_cv_ncurses_header:-curses.h}>
13975 int
13976 main ()
13977 {
13978
13979 #ifdef NCURSES_VERSION
13980         cchar_t check;
13981         int check2 = curs_set((int)sizeof(check));
13982 #endif
13983         long x = winnstr(stdscr, "", 0);
13984         int x1, y1;
13985         getbegyx(stdscr, y1, x1)
13986   ;
13987   return 0;
13988 }
13989 _ACEOF
13990 rm -f conftest.$ac_objext conftest$ac_exeext
13991 if { (eval echo "$as_me:13991: \"$ac_link\"") >&5
13992   (eval $ac_link) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit $ac_status); } &&
13996          { ac_try='test -s conftest$ac_exeext'
13997   { (eval echo "$as_me:13997: \"$ac_try\"") >&5
13998   (eval $ac_try) 2>&5
13999   ac_status=$?
14000   echo "$as_me:14000: \$? = $ac_status" >&5
14001   (exit $ac_status); }; }; then
14002   cf_cv_need_xopen_extension=yes
14003 else
14004   echo "$as_me: failed program was:" >&5
14005 cat conftest.$ac_ext >&5
14006 cf_cv_need_xopen_extension=unknown
14007 fi
14008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14009 fi
14010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14011 fi
14012 echo "$as_me:14012: result: $cf_cv_need_xopen_extension" >&5
14013 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14014 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
14015
14016 echo "$as_me:14016: checking for term.h" >&5
14017 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14018 if test "${cf_cv_term_header+set}" = set; then
14019   echo $ECHO_N "(cached) $ECHO_C" >&6
14020 else
14021
14022 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14023 # for <term.h> if we do not find the variant.
14024
14025 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14026
14027 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14028 */*)
14029         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14030         cf_header_list="$cf_header_item $cf_header_list"
14031         ;;
14032 esac
14033
14034 for cf_header in $cf_header_list
14035 do
14036         cat >conftest.$ac_ext <<_ACEOF
14037 #line 14037 "configure"
14038 #include "confdefs.h"
14039
14040 #include <${cf_cv_ncurses_header:-curses.h}>
14041 #include <${cf_header}>
14042 int
14043 main ()
14044 {
14045 WINDOW *x
14046   ;
14047   return 0;
14048 }
14049 _ACEOF
14050 rm -f conftest.$ac_objext
14051 if { (eval echo "$as_me:14051: \"$ac_compile\"") >&5
14052   (eval $ac_compile) 2>&5
14053   ac_status=$?
14054   echo "$as_me:14054: \$? = $ac_status" >&5
14055   (exit $ac_status); } &&
14056          { ac_try='test -s conftest.$ac_objext'
14057   { (eval echo "$as_me:14057: \"$ac_try\"") >&5
14058   (eval $ac_try) 2>&5
14059   ac_status=$?
14060   echo "$as_me:14060: \$? = $ac_status" >&5
14061   (exit $ac_status); }; }; then
14062   cf_cv_term_header=$cf_header
14063          break
14064 else
14065   echo "$as_me: failed program was:" >&5
14066 cat conftest.$ac_ext >&5
14067 cf_cv_term_header=no
14068 fi
14069 rm -f conftest.$ac_objext conftest.$ac_ext
14070 done
14071
14072 case $cf_cv_term_header in #(vi
14073 no)
14074         # If curses is ncurses, some packagers still mess it up by trying to make
14075         # us use GNU termcap.  This handles the most common case.
14076         for cf_header in ncurses/term.h ncursesw/term.h
14077         do
14078                 cat >conftest.$ac_ext <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081
14082 #include <${cf_cv_ncurses_header:-curses.h}>
14083 #ifdef NCURSES_VERSION
14084 #include <${cf_header}>
14085 #else
14086 make an error
14087 #endif
14088 int
14089 main ()
14090 {
14091 WINDOW *x
14092   ;
14093   return 0;
14094 }
14095 _ACEOF
14096 rm -f conftest.$ac_objext
14097 if { (eval echo "$as_me:14097: \"$ac_compile\"") >&5
14098   (eval $ac_compile) 2>&5
14099   ac_status=$?
14100   echo "$as_me:14100: \$? = $ac_status" >&5
14101   (exit $ac_status); } &&
14102          { ac_try='test -s conftest.$ac_objext'
14103   { (eval echo "$as_me:14103: \"$ac_try\"") >&5
14104   (eval $ac_try) 2>&5
14105   ac_status=$?
14106   echo "$as_me:14106: \$? = $ac_status" >&5
14107   (exit $ac_status); }; }; then
14108   cf_cv_term_header=$cf_header
14109                          break
14110 else
14111   echo "$as_me: failed program was:" >&5
14112 cat conftest.$ac_ext >&5
14113 cf_cv_term_header=no
14114 fi
14115 rm -f conftest.$ac_objext conftest.$ac_ext
14116         done
14117         ;;
14118 esac
14119
14120 fi
14121 echo "$as_me:14121: result: $cf_cv_term_header" >&5
14122 echo "${ECHO_T}$cf_cv_term_header" >&6
14123
14124 case $cf_cv_term_header in #(vi
14125 term.h) #(vi
14126         cat >>confdefs.h <<\EOF
14127 #define HAVE_TERM_H 1
14128 EOF
14129
14130         ;;
14131 ncurses/term.h) #(vi
14132         cat >>confdefs.h <<\EOF
14133 #define HAVE_NCURSES_TERM_H 1
14134 EOF
14135
14136         ;;
14137 ncursesw/term.h)
14138         cat >>confdefs.h <<\EOF
14139 #define HAVE_NCURSESW_TERM_H 1
14140 EOF
14141
14142         ;;
14143 esac
14144
14145 echo "$as_me:14145: checking for unctrl.h" >&5
14146 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14147 if test "${cf_cv_unctrl_header+set}" = set; then
14148   echo $ECHO_N "(cached) $ECHO_C" >&6
14149 else
14150
14151 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14152 # for <unctrl.h> if we do not find the variant.
14153
14154 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14155
14156 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14157 */*)
14158         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14159         cf_header_list="$cf_header_item $cf_header_list"
14160         ;;
14161 esac
14162
14163 for cf_header in $cf_header_list
14164 do
14165         cat >conftest.$ac_ext <<_ACEOF
14166 #line 14166 "configure"
14167 #include "confdefs.h"
14168
14169 #include <${cf_cv_ncurses_header:-curses.h}>
14170 #include <${cf_header}>
14171 int
14172 main ()
14173 {
14174 WINDOW *x
14175   ;
14176   return 0;
14177 }
14178 _ACEOF
14179 rm -f conftest.$ac_objext
14180 if { (eval echo "$as_me:14180: \"$ac_compile\"") >&5
14181   (eval $ac_compile) 2>&5
14182   ac_status=$?
14183   echo "$as_me:14183: \$? = $ac_status" >&5
14184   (exit $ac_status); } &&
14185          { ac_try='test -s conftest.$ac_objext'
14186   { (eval echo "$as_me:14186: \"$ac_try\"") >&5
14187   (eval $ac_try) 2>&5
14188   ac_status=$?
14189   echo "$as_me:14189: \$? = $ac_status" >&5
14190   (exit $ac_status); }; }; then
14191   cf_cv_unctrl_header=$cf_header
14192          break
14193 else
14194   echo "$as_me: failed program was:" >&5
14195 cat conftest.$ac_ext >&5
14196 cf_cv_unctrl_header=no
14197 fi
14198 rm -f conftest.$ac_objext conftest.$ac_ext
14199 done
14200
14201 case $cf_cv_unctrl_header in #(vi
14202 no)
14203         { echo "$as_me:14203: WARNING: unctrl.h header not found" >&5
14204 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14205         ;;
14206 esac
14207
14208 fi
14209 echo "$as_me:14209: result: $cf_cv_unctrl_header" >&5
14210 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14211
14212 case $cf_cv_unctrl_header in #(vi
14213 unctrl.h) #(vi
14214         cat >>confdefs.h <<\EOF
14215 #define HAVE_UNCTRL_H 1
14216 EOF
14217
14218         ;;
14219 ncurses/unctrl.h) #(vi
14220         cat >>confdefs.h <<\EOF
14221 #define HAVE_NCURSES_UNCTRL_H 1
14222 EOF
14223
14224         ;;
14225 ncursesw/unctrl.h)
14226         cat >>confdefs.h <<\EOF
14227 #define HAVE_NCURSESW_UNCTRL_H 1
14228 EOF
14229
14230         ;;
14231 esac
14232
14233 for cf_func in \
14234 assume_default_colors \
14235 chgat \
14236 color_set \
14237 filter \
14238 getbegx \
14239 getcurx \
14240 getmaxx \
14241 getnstr \
14242 getparx \
14243 getwin \
14244 mvvline \
14245 mvwvline \
14246 napms \
14247 putwin \
14248 resize_term \
14249 resizeterm \
14250 ripoffline \
14251 scr_dump \
14252 setupterm \
14253 slk_color \
14254 slk_init \
14255 termattrs \
14256 tgetent \
14257 tigetnum \
14258 tigetstr \
14259 typeahead \
14260 use_default_colors \
14261 use_screen \
14262 use_window \
14263 vsscanf \
14264 vw_printw \
14265 wchgat \
14266 winsstr \
14267 wresize \
14268 wsyncdown \
14269
14270 do
14271
14272 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14273
14274         echo "$as_me:14274: checking for ${cf_func}" >&5
14275 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14276
14277 echo "${as_me:-configure}:14277: testing ${cf_func} ..." 1>&5
14278
14279         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14280   echo $ECHO_N "(cached) $ECHO_C" >&6
14281 else
14282
14283                 eval cf_result='$ac_cv_func_'$cf_func
14284                 if test ".$cf_result" != ".no"; then
14285                         cat >conftest.$ac_ext <<_ACEOF
14286 #line 14286 "configure"
14287 #include "confdefs.h"
14288
14289 #ifdef HAVE_XCURSES
14290 #include <xcurses.h>
14291 char * XCursesProgramName = "test";
14292 #else
14293 #include <${cf_cv_ncurses_header:-curses.h}>
14294 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14295 #include <ncursesw/term.h>
14296 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14297 #include <ncurses/term.h>
14298 #elif defined(HAVE_TERM_H)
14299 #include <term.h>
14300 #endif
14301 #endif
14302
14303 int
14304 main ()
14305 {
14306
14307 #ifndef ${cf_func}
14308 long foo = (long)(&${cf_func});
14309 if (foo + 1234 > 5678)
14310         ${cf_cv_main_return:-return}(foo);
14311 #endif
14312
14313   ;
14314   return 0;
14315 }
14316 _ACEOF
14317 rm -f conftest.$ac_objext conftest$ac_exeext
14318 if { (eval echo "$as_me:14318: \"$ac_link\"") >&5
14319   (eval $ac_link) 2>&5
14320   ac_status=$?
14321   echo "$as_me:14321: \$? = $ac_status" >&5
14322   (exit $ac_status); } &&
14323          { ac_try='test -s conftest$ac_exeext'
14324   { (eval echo "$as_me:14324: \"$ac_try\"") >&5
14325   (eval $ac_try) 2>&5
14326   ac_status=$?
14327   echo "$as_me:14327: \$? = $ac_status" >&5
14328   (exit $ac_status); }; }; then
14329   cf_result=yes
14330 else
14331   echo "$as_me: failed program was:" >&5
14332 cat conftest.$ac_ext >&5
14333 cf_result=no
14334 fi
14335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14336                 fi
14337                 eval 'cf_cv_func_'$cf_func'=$cf_result'
14338
14339 fi
14340
14341         # use the computed/retrieved cache-value:
14342         eval 'cf_result=$cf_cv_func_'$cf_func
14343         echo "$as_me:14343: result: $cf_result" >&5
14344 echo "${ECHO_T}$cf_result" >&6
14345         if test $cf_result != no; then
14346                 cat >>confdefs.h <<EOF
14347 #define HAVE_${cf_tr_func} 1
14348 EOF
14349
14350         fi
14351 done
14352
14353 for cf_func in tputs
14354 do
14355
14356 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14357
14358         echo "$as_me:14358: checking for ${cf_func}" >&5
14359 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14360
14361 echo "${as_me:-configure}:14361: testing ${cf_func} ..." 1>&5
14362
14363         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14364   echo $ECHO_N "(cached) $ECHO_C" >&6
14365 else
14366
14367                 eval cf_result='$ac_cv_func_'$cf_func
14368                 if test ".$cf_result" != ".no"; then
14369                         cat >conftest.$ac_ext <<_ACEOF
14370 #line 14370 "configure"
14371 #include "confdefs.h"
14372
14373 #ifdef HAVE_XCURSES
14374 #include <xcurses.h>
14375 char * XCursesProgramName = "test";
14376 #else
14377 #include <${cf_cv_ncurses_header:-curses.h}>
14378 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14379 #include <ncursesw/term.h>
14380 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14381 #include <ncurses/term.h>
14382 #elif defined(HAVE_TERM_H)
14383 #include <term.h>
14384 #endif
14385 #endif
14386
14387 int
14388 main ()
14389 {
14390
14391 #ifndef ${cf_func}
14392 long foo = (long)(&${cf_func});
14393 if (foo + 1234 > 5678)
14394         ${cf_cv_main_return:-return}(foo);
14395 #endif
14396
14397   ;
14398   return 0;
14399 }
14400 _ACEOF
14401 rm -f conftest.$ac_objext conftest$ac_exeext
14402 if { (eval echo "$as_me:14402: \"$ac_link\"") >&5
14403   (eval $ac_link) 2>&5
14404   ac_status=$?
14405   echo "$as_me:14405: \$? = $ac_status" >&5
14406   (exit $ac_status); } &&
14407          { ac_try='test -s conftest$ac_exeext'
14408   { (eval echo "$as_me:14408: \"$ac_try\"") >&5
14409   (eval $ac_try) 2>&5
14410   ac_status=$?
14411   echo "$as_me:14411: \$? = $ac_status" >&5
14412   (exit $ac_status); }; }; then
14413   cf_result=yes
14414 else
14415   echo "$as_me: failed program was:" >&5
14416 cat conftest.$ac_ext >&5
14417 cf_result=no
14418 fi
14419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14420                 fi
14421                 eval 'cf_cv_func_'$cf_func'=$cf_result'
14422
14423 fi
14424
14425         # use the computed/retrieved cache-value:
14426         eval 'cf_result=$cf_cv_func_'$cf_func
14427         echo "$as_me:14427: result: $cf_result" >&5
14428 echo "${ECHO_T}$cf_result" >&6
14429         if test $cf_result != no; then
14430                 cat >>confdefs.h <<EOF
14431 #define HAVE_${cf_tr_func} 1
14432 EOF
14433
14434         fi
14435 done
14436
14437 if test x$cf_cv_func_tputs = xyes
14438 then
14439         cf_done=no
14440         for cf_arg in int char
14441         do
14442                 for cf_ret in int void
14443                 do
14444                         if test $cf_ret = void
14445                         then
14446                                 cf_return="/* nothing */"
14447                         else
14448                                 cf_return="return value"
14449                         fi
14450                         cat >conftest.$ac_ext <<_ACEOF
14451 #line 14451 "configure"
14452 #include "confdefs.h"
14453
14454 #include <${cf_cv_ncurses_header:-curses.h}>
14455 #include <$cf_cv_term_header>
14456
14457 static $cf_ret outc($cf_arg value) { $cf_return; }
14458
14459 int
14460 main ()
14461 {
14462
14463         tputs("hello", 0, outc);
14464         ${cf_cv_main_return:-return}(0);
14465
14466   ;
14467   return 0;
14468 }
14469 _ACEOF
14470 rm -f conftest.$ac_objext
14471 if { (eval echo "$as_me:14471: \"$ac_compile\"") >&5
14472   (eval $ac_compile) 2>&5
14473   ac_status=$?
14474   echo "$as_me:14474: \$? = $ac_status" >&5
14475   (exit $ac_status); } &&
14476          { ac_try='test -s conftest.$ac_objext'
14477   { (eval echo "$as_me:14477: \"$ac_try\"") >&5
14478   (eval $ac_try) 2>&5
14479   ac_status=$?
14480   echo "$as_me:14480: \$? = $ac_status" >&5
14481   (exit $ac_status); }; }; then
14482
14483                 test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
14484
14485 echo "${as_me:-configure}:14485: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14486
14487                 cat >>confdefs.h <<EOF
14488 #define TPUTS_ARG               $cf_arg
14489 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14490 #define TPUTS_RETURN(value)     $cf_return
14491 EOF
14492                 cf_done=yes
14493                 break
14494
14495 else
14496   echo "$as_me: failed program was:" >&5
14497 cat conftest.$ac_ext >&5
14498 fi
14499 rm -f conftest.$ac_objext conftest.$ac_ext
14500                 done
14501                 test $cf_done = yes && break
14502         done
14503 fi
14504
14505 echo "$as_me:14505: checking for ncurses extended functions" >&5
14506 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14507 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14508   echo $ECHO_N "(cached) $ECHO_C" >&6
14509 else
14510
14511 cat >conftest.$ac_ext <<_ACEOF
14512 #line 14512 "configure"
14513 #include "confdefs.h"
14514
14515 #include <${cf_cv_ncurses_header:-curses.h}>
14516 int
14517 main ()
14518 {
14519
14520 int x = NCURSES_EXT_FUNCS
14521
14522   ;
14523   return 0;
14524 }
14525 _ACEOF
14526 rm -f conftest.$ac_objext
14527 if { (eval echo "$as_me:14527: \"$ac_compile\"") >&5
14528   (eval $ac_compile) 2>&5
14529   ac_status=$?
14530   echo "$as_me:14530: \$? = $ac_status" >&5
14531   (exit $ac_status); } &&
14532          { ac_try='test -s conftest.$ac_objext'
14533   { (eval echo "$as_me:14533: \"$ac_try\"") >&5
14534   (eval $ac_try) 2>&5
14535   ac_status=$?
14536   echo "$as_me:14536: \$? = $ac_status" >&5
14537   (exit $ac_status); }; }; then
14538   cf_cv_ncurses_ext_funcs=defined
14539 else
14540   echo "$as_me: failed program was:" >&5
14541 cat conftest.$ac_ext >&5
14542
14543 cat >conftest.$ac_ext <<_ACEOF
14544 #line 14544 "configure"
14545 #include "confdefs.h"
14546
14547 #include <${cf_cv_ncurses_header:-curses.h}>
14548 int
14549 main ()
14550 {
14551
14552         (void) assume_default_colors (0, 0);
14553         (void) curses_version ();
14554         (void) define_key (0, 0);
14555         (void) is_term_resized (0, 0);
14556         (void) key_defined (0);
14557         (void) keybound (0, 0);
14558         (void) keyok (0, 0);
14559         (void) resize_term (0, 0);
14560         (void) resizeterm (0, 0);
14561         (void) use_default_colors ();
14562         (void) use_extended_names (0);
14563         (void) wresize (0, 0, 0);
14564   ;
14565   return 0;
14566 }
14567 _ACEOF
14568 rm -f conftest.$ac_objext conftest$ac_exeext
14569 if { (eval echo "$as_me:14569: \"$ac_link\"") >&5
14570   (eval $ac_link) 2>&5
14571   ac_status=$?
14572   echo "$as_me:14572: \$? = $ac_status" >&5
14573   (exit $ac_status); } &&
14574          { ac_try='test -s conftest$ac_exeext'
14575   { (eval echo "$as_me:14575: \"$ac_try\"") >&5
14576   (eval $ac_try) 2>&5
14577   ac_status=$?
14578   echo "$as_me:14578: \$? = $ac_status" >&5
14579   (exit $ac_status); }; }; then
14580   cf_cv_ncurses_ext_funcs=yes
14581 else
14582   echo "$as_me: failed program was:" >&5
14583 cat conftest.$ac_ext >&5
14584 cf_cv_ncurses_ext_funcs=no
14585 fi
14586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14587
14588 fi
14589 rm -f conftest.$ac_objext conftest.$ac_ext
14590
14591 fi
14592 echo "$as_me:14592: result: $cf_cv_ncurses_ext_funcs" >&5
14593 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14594 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
14595 #define NCURSES_EXT_FUNCS 1
14596 EOF
14597
14598 if test "$cf_enable_widec" = yes
14599 then
14600         # workaround for systems with ncurses before 20111029, due to change of
14601         # feature test macro from _XPG5 to _XOPEN_SOURCE
14602         if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14603         then
14604                 cf_define_xpg5=no
14605                 echo "$as_me:14605: checking if _XPG5 should be defined to enable wide-characters" >&5
14606 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14607
14608                 cat >conftest.$ac_ext <<_ACEOF
14609 #line 14609 "configure"
14610 #include "confdefs.h"
14611
14612 #include <${cf_cv_ncurses_header:-curses.h}>
14613 int
14614 main ()
14615 {
14616 int x = _XPG5
14617   ;
14618   return 0;
14619 }
14620 _ACEOF
14621 rm -f conftest.$ac_objext
14622 if { (eval echo "$as_me:14622: \"$ac_compile\"") >&5
14623   (eval $ac_compile) 2>&5
14624   ac_status=$?
14625   echo "$as_me:14625: \$? = $ac_status" >&5
14626   (exit $ac_status); } &&
14627          { ac_try='test -s conftest.$ac_objext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633   :
14634 else
14635   echo "$as_me: failed program was:" >&5
14636 cat conftest.$ac_ext >&5
14637 cf_save_cppflags="$CPPFLAGS"
14638                          CPPFLAGS="$CPPFLAGS -D_XPG5"
14639                          cat >conftest.$ac_ext <<_ACEOF
14640 #line 14640 "configure"
14641 #include "confdefs.h"
14642
14643 #include <${cf_cv_ncurses_header:-curses.h}>
14644 int
14645 main ()
14646 {
14647 int x = _XPG5
14648   ;
14649   return 0;
14650 }
14651 _ACEOF
14652 rm -f conftest.$ac_objext
14653 if { (eval echo "$as_me:14653: \"$ac_compile\"") >&5
14654   (eval $ac_compile) 2>&5
14655   ac_status=$?
14656   echo "$as_me:14656: \$? = $ac_status" >&5
14657   (exit $ac_status); } &&
14658          { ac_try='test -s conftest.$ac_objext'
14659   { (eval echo "$as_me:14659: \"$ac_try\"") >&5
14660   (eval $ac_try) 2>&5
14661   ac_status=$?
14662   echo "$as_me:14662: \$? = $ac_status" >&5
14663   (exit $ac_status); }; }; then
14664   cf_define_xpg5=yes
14665 else
14666   echo "$as_me: failed program was:" >&5
14667 cat conftest.$ac_ext >&5
14668 fi
14669 rm -f conftest.$ac_objext conftest.$ac_ext
14670                          CPPFLAGS="$cf_save_cppflags"
14671 fi
14672 rm -f conftest.$ac_objext conftest.$ac_ext
14673                 echo "$as_me:14673: result: $cf_define_xpg5" >&5
14674 echo "${ECHO_T}$cf_define_xpg5" >&6
14675
14676                 if test "$cf_define_xpg5" = yes
14677                 then
14678                         CPPFLAGS="$CPPFLAGS -D_XPG5"
14679                 fi
14680         fi
14681
14682         echo "$as_me:14682: checking for wide-character functions" >&5
14683 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14684 if test "${cf_cv_widechar_funcs+set}" = set; then
14685   echo $ECHO_N "(cached) $ECHO_C" >&6
14686 else
14687
14688         cat >conftest.$ac_ext <<_ACEOF
14689 #line 14689 "configure"
14690 #include "confdefs.h"
14691
14692 #include <${cf_cv_ncurses_header:-curses.h}>
14693 int
14694 main ()
14695 {
14696
14697                 static wchar_t src_wchar[2];
14698                 static cchar_t dst_cchar;
14699                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14700
14701   ;
14702   return 0;
14703 }
14704 _ACEOF
14705 rm -f conftest.$ac_objext conftest$ac_exeext
14706 if { (eval echo "$as_me:14706: \"$ac_link\"") >&5
14707   (eval $ac_link) 2>&5
14708   ac_status=$?
14709   echo "$as_me:14709: \$? = $ac_status" >&5
14710   (exit $ac_status); } &&
14711          { ac_try='test -s conftest$ac_exeext'
14712   { (eval echo "$as_me:14712: \"$ac_try\"") >&5
14713   (eval $ac_try) 2>&5
14714   ac_status=$?
14715   echo "$as_me:14715: \$? = $ac_status" >&5
14716   (exit $ac_status); }; }; then
14717   cf_cv_widechar_funcs=yes
14718 else
14719   echo "$as_me: failed program was:" >&5
14720 cat conftest.$ac_ext >&5
14721 cf_cv_widechar_funcs=no
14722 fi
14723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14724
14725 fi
14726 echo "$as_me:14726: result: $cf_cv_widechar_funcs" >&5
14727 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14728         if test "$cf_cv_widechar_funcs" != no ; then
14729                 cat >>confdefs.h <<\EOF
14730 #define USE_WIDEC_SUPPORT 1
14731 EOF
14732
14733         else
14734                 cat >>confdefs.h <<\EOF
14735 #define USE_WIDEC_SUPPORT 0
14736 EOF
14737
14738         fi
14739 else
14740         cat >>confdefs.h <<\EOF
14741 #define USE_WIDEC_SUPPORT 0
14742 EOF
14743
14744 fi
14745
14746 echo "$as_me:14746: checking if sys/time.h works with sys/select.h" >&5
14747 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14748 if test "${cf_cv_sys_time_select+set}" = set; then
14749   echo $ECHO_N "(cached) $ECHO_C" >&6
14750 else
14751
14752 cat >conftest.$ac_ext <<_ACEOF
14753 #line 14753 "configure"
14754 #include "confdefs.h"
14755
14756 #include <sys/types.h>
14757 #ifdef HAVE_SYS_TIME_H
14758 #include <sys/time.h>
14759 #endif
14760 #ifdef HAVE_SYS_SELECT_H
14761 #include <sys/select.h>
14762 #endif
14763
14764 int
14765 main ()
14766 {
14767
14768   ;
14769   return 0;
14770 }
14771 _ACEOF
14772 rm -f conftest.$ac_objext
14773 if { (eval echo "$as_me:14773: \"$ac_compile\"") >&5
14774   (eval $ac_compile) 2>&5
14775   ac_status=$?
14776   echo "$as_me:14776: \$? = $ac_status" >&5
14777   (exit $ac_status); } &&
14778          { ac_try='test -s conftest.$ac_objext'
14779   { (eval echo "$as_me:14779: \"$ac_try\"") >&5
14780   (eval $ac_try) 2>&5
14781   ac_status=$?
14782   echo "$as_me:14782: \$? = $ac_status" >&5
14783   (exit $ac_status); }; }; then
14784   cf_cv_sys_time_select=yes
14785 else
14786   echo "$as_me: failed program was:" >&5
14787 cat conftest.$ac_ext >&5
14788 cf_cv_sys_time_select=no
14789 fi
14790 rm -f conftest.$ac_objext conftest.$ac_ext
14791
14792 fi
14793
14794 echo "$as_me:14794: result: $cf_cv_sys_time_select" >&5
14795 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14796 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14797 #define HAVE_SYS_TIME_SELECT 1
14798 EOF
14799
14800 echo "$as_me:14800: checking for function curses_version" >&5
14801 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14802 if test "${cf_cv_func_curses_version+set}" = set; then
14803   echo $ECHO_N "(cached) $ECHO_C" >&6
14804 else
14805
14806 if test "$cross_compiling" = yes; then
14807   cf_cv_func_curses_version=unknown
14808 else
14809   cat >conftest.$ac_ext <<_ACEOF
14810 #line 14810 "configure"
14811 #include "confdefs.h"
14812
14813 #include <${cf_cv_ncurses_header:-curses.h}>
14814 int main()
14815 {
14816         char temp[1024];
14817         sprintf(temp, "%s\n", curses_version());
14818         ${cf_cv_main_return:-return}(0);
14819 }
14820
14821 _ACEOF
14822 rm -f conftest$ac_exeext
14823 if { (eval echo "$as_me:14823: \"$ac_link\"") >&5
14824   (eval $ac_link) 2>&5
14825   ac_status=$?
14826   echo "$as_me:14826: \$? = $ac_status" >&5
14827   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14828   { (eval echo "$as_me:14828: \"$ac_try\"") >&5
14829   (eval $ac_try) 2>&5
14830   ac_status=$?
14831   echo "$as_me:14831: \$? = $ac_status" >&5
14832   (exit $ac_status); }; }; then
14833   cf_cv_func_curses_version=yes
14834
14835 else
14836   echo "$as_me: program exited with status $ac_status" >&5
14837 echo "$as_me: failed program was:" >&5
14838 cat conftest.$ac_ext >&5
14839 cf_cv_func_curses_version=no
14840
14841 fi
14842 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14843 fi
14844 rm -f core
14845 fi
14846 echo "$as_me:14846: result: $cf_cv_func_curses_version" >&5
14847 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14848 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14849 #define HAVE_CURSES_VERSION 1
14850 EOF
14851
14852 echo "$as_me:14852: checking for ncurses wrap-prefix" >&5
14853 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14854
14855 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14856 if test "${with_ncurses_wrap_prefix+set}" = set; then
14857   withval="$with_ncurses_wrap_prefix"
14858   NCURSES_WRAP_PREFIX=$withval
14859 else
14860   NCURSES_WRAP_PREFIX=_nc_
14861 fi;
14862 echo "$as_me:14862: result: $NCURSES_WRAP_PREFIX" >&5
14863 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14864
14865 echo "$as_me:14865: checking for alternate character set array" >&5
14866 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14867 if test "${cf_cv_curses_acs_map+set}" = set; then
14868   echo $ECHO_N "(cached) $ECHO_C" >&6
14869 else
14870
14871 cf_cv_curses_acs_map=unknown
14872 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14873 do
14874 cat >conftest.$ac_ext <<_ACEOF
14875 #line 14875 "configure"
14876 #include "confdefs.h"
14877
14878 #include <${cf_cv_ncurses_header:-curses.h}>
14879
14880 int
14881 main ()
14882 {
14883
14884 $name['k'] = ACS_PLUS
14885
14886   ;
14887   return 0;
14888 }
14889 _ACEOF
14890 rm -f conftest.$ac_objext conftest$ac_exeext
14891 if { (eval echo "$as_me:14891: \"$ac_link\"") >&5
14892   (eval $ac_link) 2>&5
14893   ac_status=$?
14894   echo "$as_me:14894: \$? = $ac_status" >&5
14895   (exit $ac_status); } &&
14896          { ac_try='test -s conftest$ac_exeext'
14897   { (eval echo "$as_me:14897: \"$ac_try\"") >&5
14898   (eval $ac_try) 2>&5
14899   ac_status=$?
14900   echo "$as_me:14900: \$? = $ac_status" >&5
14901   (exit $ac_status); }; }; then
14902   cf_cv_curses_acs_map=$name; break
14903 else
14904   echo "$as_me: failed program was:" >&5
14905 cat conftest.$ac_ext >&5
14906 fi
14907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14908 done
14909
14910 fi
14911 echo "$as_me:14911: result: $cf_cv_curses_acs_map" >&5
14912 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14913
14914 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14915 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14916 EOF
14917
14918 if test "$cf_enable_widec" = yes; then
14919
14920 echo "$as_me:14920: checking for wide alternate character set array" >&5
14921 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14922 if test "${cf_cv_curses_wacs_map+set}" = set; then
14923   echo $ECHO_N "(cached) $ECHO_C" >&6
14924 else
14925
14926         cf_cv_curses_wacs_map=unknown
14927         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14928         do
14929         cat >conftest.$ac_ext <<_ACEOF
14930 #line 14930 "configure"
14931 #include "confdefs.h"
14932
14933 #ifndef _XOPEN_SOURCE_EXTENDED
14934 #define _XOPEN_SOURCE_EXTENDED
14935 #endif
14936 #include <${cf_cv_ncurses_header:-curses.h}>
14937 int
14938 main ()
14939 {
14940 void *foo = &($name['k'])
14941   ;
14942   return 0;
14943 }
14944 _ACEOF
14945 rm -f conftest.$ac_objext conftest$ac_exeext
14946 if { (eval echo "$as_me:14946: \"$ac_link\"") >&5
14947   (eval $ac_link) 2>&5
14948   ac_status=$?
14949   echo "$as_me:14949: \$? = $ac_status" >&5
14950   (exit $ac_status); } &&
14951          { ac_try='test -s conftest$ac_exeext'
14952   { (eval echo "$as_me:14952: \"$ac_try\"") >&5
14953   (eval $ac_try) 2>&5
14954   ac_status=$?
14955   echo "$as_me:14955: \$? = $ac_status" >&5
14956   (exit $ac_status); }; }; then
14957   cf_cv_curses_wacs_map=$name
14958          break
14959 else
14960   echo "$as_me: failed program was:" >&5
14961 cat conftest.$ac_ext >&5
14962 fi
14963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14964         done
14965 fi
14966 echo "$as_me:14966: result: $cf_cv_curses_wacs_map" >&5
14967 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14968
14969 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14970 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14971 EOF
14972
14973 echo "$as_me:14973: checking for wide alternate character constants" >&5
14974 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14975 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14976   echo $ECHO_N "(cached) $ECHO_C" >&6
14977 else
14978
14979 cf_cv_curses_wacs_symbols=no
14980 if test "$cf_cv_curses_wacs_map" != unknown
14981 then
14982         cat >conftest.$ac_ext <<_ACEOF
14983 #line 14983 "configure"
14984 #include "confdefs.h"
14985
14986 #ifndef _XOPEN_SOURCE_EXTENDED
14987 #define _XOPEN_SOURCE_EXTENDED
14988 #endif
14989 #include <${cf_cv_ncurses_header:-curses.h}>
14990 int
14991 main ()
14992 {
14993 cchar_t *foo = WACS_PLUS;
14994          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14995   ;
14996   return 0;
14997 }
14998 _ACEOF
14999 rm -f conftest.$ac_objext conftest$ac_exeext
15000 if { (eval echo "$as_me:15000: \"$ac_link\"") >&5
15001   (eval $ac_link) 2>&5
15002   ac_status=$?
15003   echo "$as_me:15003: \$? = $ac_status" >&5
15004   (exit $ac_status); } &&
15005          { ac_try='test -s conftest$ac_exeext'
15006   { (eval echo "$as_me:15006: \"$ac_try\"") >&5
15007   (eval $ac_try) 2>&5
15008   ac_status=$?
15009   echo "$as_me:15009: \$? = $ac_status" >&5
15010   (exit $ac_status); }; }; then
15011   cf_cv_curses_wacs_symbols=yes
15012 else
15013   echo "$as_me: failed program was:" >&5
15014 cat conftest.$ac_ext >&5
15015 fi
15016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15017 else
15018         cat >conftest.$ac_ext <<_ACEOF
15019 #line 15019 "configure"
15020 #include "confdefs.h"
15021
15022 #ifndef _XOPEN_SOURCE_EXTENDED
15023 #define _XOPEN_SOURCE_EXTENDED
15024 #endif
15025 #include <${cf_cv_ncurses_header:-curses.h}>
15026 int
15027 main ()
15028 {
15029 cchar_t *foo = WACS_PLUS
15030   ;
15031   return 0;
15032 }
15033 _ACEOF
15034 rm -f conftest.$ac_objext conftest$ac_exeext
15035 if { (eval echo "$as_me:15035: \"$ac_link\"") >&5
15036   (eval $ac_link) 2>&5
15037   ac_status=$?
15038   echo "$as_me:15038: \$? = $ac_status" >&5
15039   (exit $ac_status); } &&
15040          { ac_try='test -s conftest$ac_exeext'
15041   { (eval echo "$as_me:15041: \"$ac_try\"") >&5
15042   (eval $ac_try) 2>&5
15043   ac_status=$?
15044   echo "$as_me:15044: \$? = $ac_status" >&5
15045   (exit $ac_status); }; }; then
15046   cf_cv_curses_wacs_symbols=yes
15047 else
15048   echo "$as_me: failed program was:" >&5
15049 cat conftest.$ac_ext >&5
15050 fi
15051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15052 fi
15053
15054 fi
15055 echo "$as_me:15055: result: $cf_cv_curses_wacs_symbols" >&5
15056 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15057
15058 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
15059 #define CURSES_WACS_SYMBOLS 1
15060 EOF
15061
15062 fi
15063
15064 echo "$as_me:15064: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15065 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15066 cat >conftest.$ac_ext <<_ACEOF
15067 #line 15067 "configure"
15068 #include "confdefs.h"
15069
15070 #ifndef _XOPEN_SOURCE_EXTENDED
15071 #define _XOPEN_SOURCE_EXTENDED
15072 #endif
15073 #include <${cf_cv_ncurses_header:-curses.h}>
15074 int
15075 main ()
15076 {
15077
15078 attr_t foo
15079
15080   ;
15081   return 0;
15082 }
15083 _ACEOF
15084 rm -f conftest.$ac_objext
15085 if { (eval echo "$as_me:15085: \"$ac_compile\"") >&5
15086   (eval $ac_compile) 2>&5
15087   ac_status=$?
15088   echo "$as_me:15088: \$? = $ac_status" >&5
15089   (exit $ac_status); } &&
15090          { ac_try='test -s conftest.$ac_objext'
15091   { (eval echo "$as_me:15091: \"$ac_try\"") >&5
15092   (eval $ac_try) 2>&5
15093   ac_status=$?
15094   echo "$as_me:15094: \$? = $ac_status" >&5
15095   (exit $ac_status); }; }; then
15096   cf_result=yes
15097 else
15098   echo "$as_me: failed program was:" >&5
15099 cat conftest.$ac_ext >&5
15100 cf_result=no
15101 fi
15102 rm -f conftest.$ac_objext conftest.$ac_ext
15103 echo "$as_me:15103: result: $cf_result" >&5
15104 echo "${ECHO_T}$cf_result" >&6
15105 if test $cf_result = yes ; then
15106
15107 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15108
15109         cat >>confdefs.h <<EOF
15110 #define $cf_result 1
15111 EOF
15112
15113 else
15114         cat >>confdefs.h <<EOF
15115 #define attr_t long
15116 EOF
15117
15118 fi
15119
15120 if test "$cf_enable_widec" = yes; then
15121
15122 # This is needed on Tru64 5.0 to declare mbstate_t
15123 echo "$as_me:15123: checking if we must include wchar.h to declare mbstate_t" >&5
15124 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15125 if test "${cf_cv_mbstate_t+set}" = set; then
15126   echo $ECHO_N "(cached) $ECHO_C" >&6
15127 else
15128
15129 cat >conftest.$ac_ext <<_ACEOF
15130 #line 15130 "configure"
15131 #include "confdefs.h"
15132
15133 #include <stdlib.h>
15134 #include <stdarg.h>
15135 #include <stdio.h>
15136 #ifdef HAVE_LIBUTF8_H
15137 #include <libutf8.h>
15138 #endif
15139 int
15140 main ()
15141 {
15142 mbstate_t state
15143   ;
15144   return 0;
15145 }
15146 _ACEOF
15147 rm -f conftest.$ac_objext
15148 if { (eval echo "$as_me:15148: \"$ac_compile\"") >&5
15149   (eval $ac_compile) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); } &&
15153          { ac_try='test -s conftest.$ac_objext'
15154   { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155   (eval $ac_try) 2>&5
15156   ac_status=$?
15157   echo "$as_me:15157: \$? = $ac_status" >&5
15158   (exit $ac_status); }; }; then
15159   cf_cv_mbstate_t=no
15160 else
15161   echo "$as_me: failed program was:" >&5
15162 cat conftest.$ac_ext >&5
15163 cat >conftest.$ac_ext <<_ACEOF
15164 #line 15164 "configure"
15165 #include "confdefs.h"
15166
15167 #include <stdlib.h>
15168 #include <stdarg.h>
15169 #include <stdio.h>
15170 #include <wchar.h>
15171 #ifdef HAVE_LIBUTF8_H
15172 #include <libutf8.h>
15173 #endif
15174 int
15175 main ()
15176 {
15177 mbstate_t value
15178   ;
15179   return 0;
15180 }
15181 _ACEOF
15182 rm -f conftest.$ac_objext
15183 if { (eval echo "$as_me:15183: \"$ac_compile\"") >&5
15184   (eval $ac_compile) 2>&5
15185   ac_status=$?
15186   echo "$as_me:15186: \$? = $ac_status" >&5
15187   (exit $ac_status); } &&
15188          { ac_try='test -s conftest.$ac_objext'
15189   { (eval echo "$as_me:15189: \"$ac_try\"") >&5
15190   (eval $ac_try) 2>&5
15191   ac_status=$?
15192   echo "$as_me:15192: \$? = $ac_status" >&5
15193   (exit $ac_status); }; }; then
15194   cf_cv_mbstate_t=yes
15195 else
15196   echo "$as_me: failed program was:" >&5
15197 cat conftest.$ac_ext >&5
15198 cf_cv_mbstate_t=unknown
15199 fi
15200 rm -f conftest.$ac_objext conftest.$ac_ext
15201 fi
15202 rm -f conftest.$ac_objext conftest.$ac_ext
15203 fi
15204 echo "$as_me:15204: result: $cf_cv_mbstate_t" >&5
15205 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15206
15207 if test "$cf_cv_mbstate_t" = yes ; then
15208         cat >>confdefs.h <<\EOF
15209 #define NEED_WCHAR_H 1
15210 EOF
15211
15212         NEED_WCHAR_H=1
15213 fi
15214
15215 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15216 if test "$cf_cv_mbstate_t" = unknown ; then
15217         NCURSES_MBSTATE_T=1
15218 fi
15219
15220 # if we find mbstate_t in either place, use substitution to provide a fallback.
15221 if test "$cf_cv_mbstate_t" != unknown ; then
15222         NCURSES_OK_MBSTATE_T=1
15223 fi
15224
15225 # This is needed on Tru64 5.0 to declare wchar_t
15226 echo "$as_me:15226: checking if we must include wchar.h to declare wchar_t" >&5
15227 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15228 if test "${cf_cv_wchar_t+set}" = set; then
15229   echo $ECHO_N "(cached) $ECHO_C" >&6
15230 else
15231
15232 cat >conftest.$ac_ext <<_ACEOF
15233 #line 15233 "configure"
15234 #include "confdefs.h"
15235
15236 #include <stdlib.h>
15237 #include <stdarg.h>
15238 #include <stdio.h>
15239 #ifdef HAVE_LIBUTF8_H
15240 #include <libutf8.h>
15241 #endif
15242 int
15243 main ()
15244 {
15245 wchar_t state
15246   ;
15247   return 0;
15248 }
15249 _ACEOF
15250 rm -f conftest.$ac_objext
15251 if { (eval echo "$as_me:15251: \"$ac_compile\"") >&5
15252   (eval $ac_compile) 2>&5
15253   ac_status=$?
15254   echo "$as_me:15254: \$? = $ac_status" >&5
15255   (exit $ac_status); } &&
15256          { ac_try='test -s conftest.$ac_objext'
15257   { (eval echo "$as_me:15257: \"$ac_try\"") >&5
15258   (eval $ac_try) 2>&5
15259   ac_status=$?
15260   echo "$as_me:15260: \$? = $ac_status" >&5
15261   (exit $ac_status); }; }; then
15262   cf_cv_wchar_t=no
15263 else
15264   echo "$as_me: failed program was:" >&5
15265 cat conftest.$ac_ext >&5
15266 cat >conftest.$ac_ext <<_ACEOF
15267 #line 15267 "configure"
15268 #include "confdefs.h"
15269
15270 #include <stdlib.h>
15271 #include <stdarg.h>
15272 #include <stdio.h>
15273 #include <wchar.h>
15274 #ifdef HAVE_LIBUTF8_H
15275 #include <libutf8.h>
15276 #endif
15277 int
15278 main ()
15279 {
15280 wchar_t value
15281   ;
15282   return 0;
15283 }
15284 _ACEOF
15285 rm -f conftest.$ac_objext
15286 if { (eval echo "$as_me:15286: \"$ac_compile\"") >&5
15287   (eval $ac_compile) 2>&5
15288   ac_status=$?
15289   echo "$as_me:15289: \$? = $ac_status" >&5
15290   (exit $ac_status); } &&
15291          { ac_try='test -s conftest.$ac_objext'
15292   { (eval echo "$as_me:15292: \"$ac_try\"") >&5
15293   (eval $ac_try) 2>&5
15294   ac_status=$?
15295   echo "$as_me:15295: \$? = $ac_status" >&5
15296   (exit $ac_status); }; }; then
15297   cf_cv_wchar_t=yes
15298 else
15299   echo "$as_me: failed program was:" >&5
15300 cat conftest.$ac_ext >&5
15301 cf_cv_wchar_t=unknown
15302 fi
15303 rm -f conftest.$ac_objext conftest.$ac_ext
15304 fi
15305 rm -f conftest.$ac_objext conftest.$ac_ext
15306 fi
15307 echo "$as_me:15307: result: $cf_cv_wchar_t" >&5
15308 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15309
15310 if test "$cf_cv_wchar_t" = yes ; then
15311         cat >>confdefs.h <<\EOF
15312 #define NEED_WCHAR_H 1
15313 EOF
15314
15315         NEED_WCHAR_H=1
15316 fi
15317
15318 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15319 if test "$cf_cv_wchar_t" = unknown ; then
15320         NCURSES_WCHAR_T=1
15321 fi
15322
15323 # if we find wchar_t in either place, use substitution to provide a fallback.
15324 if test "$cf_cv_wchar_t" != unknown ; then
15325         NCURSES_OK_WCHAR_T=1
15326 fi
15327
15328 # This is needed on Tru64 5.0 to declare wint_t
15329 echo "$as_me:15329: checking if we must include wchar.h to declare wint_t" >&5
15330 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15331 if test "${cf_cv_wint_t+set}" = set; then
15332   echo $ECHO_N "(cached) $ECHO_C" >&6
15333 else
15334
15335 cat >conftest.$ac_ext <<_ACEOF
15336 #line 15336 "configure"
15337 #include "confdefs.h"
15338
15339 #include <stdlib.h>
15340 #include <stdarg.h>
15341 #include <stdio.h>
15342 #ifdef HAVE_LIBUTF8_H
15343 #include <libutf8.h>
15344 #endif
15345 int
15346 main ()
15347 {
15348 wint_t state
15349   ;
15350   return 0;
15351 }
15352 _ACEOF
15353 rm -f conftest.$ac_objext
15354 if { (eval echo "$as_me:15354: \"$ac_compile\"") >&5
15355   (eval $ac_compile) 2>&5
15356   ac_status=$?
15357   echo "$as_me:15357: \$? = $ac_status" >&5
15358   (exit $ac_status); } &&
15359          { ac_try='test -s conftest.$ac_objext'
15360   { (eval echo "$as_me:15360: \"$ac_try\"") >&5
15361   (eval $ac_try) 2>&5
15362   ac_status=$?
15363   echo "$as_me:15363: \$? = $ac_status" >&5
15364   (exit $ac_status); }; }; then
15365   cf_cv_wint_t=no
15366 else
15367   echo "$as_me: failed program was:" >&5
15368 cat conftest.$ac_ext >&5
15369 cat >conftest.$ac_ext <<_ACEOF
15370 #line 15370 "configure"
15371 #include "confdefs.h"
15372
15373 #include <stdlib.h>
15374 #include <stdarg.h>
15375 #include <stdio.h>
15376 #include <wchar.h>
15377 #ifdef HAVE_LIBUTF8_H
15378 #include <libutf8.h>
15379 #endif
15380 int
15381 main ()
15382 {
15383 wint_t value
15384   ;
15385   return 0;
15386 }
15387 _ACEOF
15388 rm -f conftest.$ac_objext
15389 if { (eval echo "$as_me:15389: \"$ac_compile\"") >&5
15390   (eval $ac_compile) 2>&5
15391   ac_status=$?
15392   echo "$as_me:15392: \$? = $ac_status" >&5
15393   (exit $ac_status); } &&
15394          { ac_try='test -s conftest.$ac_objext'
15395   { (eval echo "$as_me:15395: \"$ac_try\"") >&5
15396   (eval $ac_try) 2>&5
15397   ac_status=$?
15398   echo "$as_me:15398: \$? = $ac_status" >&5
15399   (exit $ac_status); }; }; then
15400   cf_cv_wint_t=yes
15401 else
15402   echo "$as_me: failed program was:" >&5
15403 cat conftest.$ac_ext >&5
15404 cf_cv_wint_t=unknown
15405 fi
15406 rm -f conftest.$ac_objext conftest.$ac_ext
15407 fi
15408 rm -f conftest.$ac_objext conftest.$ac_ext
15409 fi
15410 echo "$as_me:15410: result: $cf_cv_wint_t" >&5
15411 echo "${ECHO_T}$cf_cv_wint_t" >&6
15412
15413 if test "$cf_cv_wint_t" = yes ; then
15414         cat >>confdefs.h <<\EOF
15415 #define NEED_WCHAR_H 1
15416 EOF
15417
15418         NEED_WCHAR_H=1
15419 fi
15420
15421 # if we do not find wint_t in either place, use substitution to provide a fallback.
15422 if test "$cf_cv_wint_t" = unknown ; then
15423         NCURSES_WINT_T=1
15424 fi
15425
15426 # if we find wint_t in either place, use substitution to provide a fallback.
15427 if test "$cf_cv_wint_t" != unknown ; then
15428         NCURSES_OK_WINT_T=1
15429 fi
15430
15431         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15432
15433 echo "$as_me:15433: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15434 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15435 cat >conftest.$ac_ext <<_ACEOF
15436 #line 15436 "configure"
15437 #include "confdefs.h"
15438
15439 #ifndef _XOPEN_SOURCE_EXTENDED
15440 #define _XOPEN_SOURCE_EXTENDED
15441 #endif
15442 #include <${cf_cv_ncurses_header:-curses.h}>
15443 int
15444 main ()
15445 {
15446
15447 mbstate_t foo
15448
15449   ;
15450   return 0;
15451 }
15452 _ACEOF
15453 rm -f conftest.$ac_objext
15454 if { (eval echo "$as_me:15454: \"$ac_compile\"") >&5
15455   (eval $ac_compile) 2>&5
15456   ac_status=$?
15457   echo "$as_me:15457: \$? = $ac_status" >&5
15458   (exit $ac_status); } &&
15459          { ac_try='test -s conftest.$ac_objext'
15460   { (eval echo "$as_me:15460: \"$ac_try\"") >&5
15461   (eval $ac_try) 2>&5
15462   ac_status=$?
15463   echo "$as_me:15463: \$? = $ac_status" >&5
15464   (exit $ac_status); }; }; then
15465   cf_result=yes
15466 else
15467   echo "$as_me: failed program was:" >&5
15468 cat conftest.$ac_ext >&5
15469 cf_result=no
15470 fi
15471 rm -f conftest.$ac_objext conftest.$ac_ext
15472 echo "$as_me:15472: result: $cf_result" >&5
15473 echo "${ECHO_T}$cf_result" >&6
15474 if test $cf_result = yes ; then
15475
15476 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15477
15478         cat >>confdefs.h <<EOF
15479 #define $cf_result 1
15480 EOF
15481
15482 else
15483         cat >>confdefs.h <<EOF
15484 #define mbstate_t long
15485 EOF
15486
15487 fi
15488
15489         fi
15490
15491         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15492
15493 echo "$as_me:15493: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15494 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15495 cat >conftest.$ac_ext <<_ACEOF
15496 #line 15496 "configure"
15497 #include "confdefs.h"
15498
15499 #ifndef _XOPEN_SOURCE_EXTENDED
15500 #define _XOPEN_SOURCE_EXTENDED
15501 #endif
15502 #include <${cf_cv_ncurses_header:-curses.h}>
15503 int
15504 main ()
15505 {
15506
15507 wchar_t foo
15508
15509   ;
15510   return 0;
15511 }
15512 _ACEOF
15513 rm -f conftest.$ac_objext
15514 if { (eval echo "$as_me:15514: \"$ac_compile\"") >&5
15515   (eval $ac_compile) 2>&5
15516   ac_status=$?
15517   echo "$as_me:15517: \$? = $ac_status" >&5
15518   (exit $ac_status); } &&
15519          { ac_try='test -s conftest.$ac_objext'
15520   { (eval echo "$as_me:15520: \"$ac_try\"") >&5
15521   (eval $ac_try) 2>&5
15522   ac_status=$?
15523   echo "$as_me:15523: \$? = $ac_status" >&5
15524   (exit $ac_status); }; }; then
15525   cf_result=yes
15526 else
15527   echo "$as_me: failed program was:" >&5
15528 cat conftest.$ac_ext >&5
15529 cf_result=no
15530 fi
15531 rm -f conftest.$ac_objext conftest.$ac_ext
15532 echo "$as_me:15532: result: $cf_result" >&5
15533 echo "${ECHO_T}$cf_result" >&6
15534 if test $cf_result = yes ; then
15535
15536 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15537
15538         cat >>confdefs.h <<EOF
15539 #define $cf_result 1
15540 EOF
15541
15542 else
15543         cat >>confdefs.h <<EOF
15544 #define wchar_t long
15545 EOF
15546
15547 fi
15548
15549         fi
15550
15551         if test "$NCURSES_OK_WINT_T" = 0 ; then
15552
15553 echo "$as_me:15553: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15554 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15555 cat >conftest.$ac_ext <<_ACEOF
15556 #line 15556 "configure"
15557 #include "confdefs.h"
15558
15559 #ifndef _XOPEN_SOURCE_EXTENDED
15560 #define _XOPEN_SOURCE_EXTENDED
15561 #endif
15562 #include <${cf_cv_ncurses_header:-curses.h}>
15563 int
15564 main ()
15565 {
15566
15567 wint_t foo
15568
15569   ;
15570   return 0;
15571 }
15572 _ACEOF
15573 rm -f conftest.$ac_objext
15574 if { (eval echo "$as_me:15574: \"$ac_compile\"") >&5
15575   (eval $ac_compile) 2>&5
15576   ac_status=$?
15577   echo "$as_me:15577: \$? = $ac_status" >&5
15578   (exit $ac_status); } &&
15579          { ac_try='test -s conftest.$ac_objext'
15580   { (eval echo "$as_me:15580: \"$ac_try\"") >&5
15581   (eval $ac_try) 2>&5
15582   ac_status=$?
15583   echo "$as_me:15583: \$? = $ac_status" >&5
15584   (exit $ac_status); }; }; then
15585   cf_result=yes
15586 else
15587   echo "$as_me: failed program was:" >&5
15588 cat conftest.$ac_ext >&5
15589 cf_result=no
15590 fi
15591 rm -f conftest.$ac_objext conftest.$ac_ext
15592 echo "$as_me:15592: result: $cf_result" >&5
15593 echo "${ECHO_T}$cf_result" >&6
15594 if test $cf_result = yes ; then
15595
15596 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15597
15598         cat >>confdefs.h <<EOF
15599 #define $cf_result 1
15600 EOF
15601
15602 else
15603         cat >>confdefs.h <<EOF
15604 #define wint_t long
15605 EOF
15606
15607 fi
15608
15609         fi
15610 fi
15611
15612 echo "$as_me:15612: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15613 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15614
15615 cat >conftest.$ac_ext <<_ACEOF
15616 #line 15616 "configure"
15617 #include "confdefs.h"
15618
15619 #ifdef HAVE_XCURSES
15620 #include <xcurses.h>
15621 char * XCursesProgramName = "test";
15622 #else
15623 #include <${cf_cv_ncurses_header:-curses.h}>
15624 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15625 #include <ncursesw/term.h>
15626 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15627 #include <ncurses/term.h>
15628 #elif defined(HAVE_TERM_H)
15629 #include <term.h>
15630 #endif
15631 #endif
15632
15633 int
15634 main ()
15635 {
15636
15637 void *foo = &(boolnames)
15638
15639   ;
15640   return 0;
15641 }
15642 _ACEOF
15643 rm -f conftest.$ac_objext
15644 if { (eval echo "$as_me:15644: \"$ac_compile\"") >&5
15645   (eval $ac_compile) 2>&5
15646   ac_status=$?
15647   echo "$as_me:15647: \$? = $ac_status" >&5
15648   (exit $ac_status); } &&
15649          { ac_try='test -s conftest.$ac_objext'
15650   { (eval echo "$as_me:15650: \"$ac_try\"") >&5
15651   (eval $ac_try) 2>&5
15652   ac_status=$?
15653   echo "$as_me:15653: \$? = $ac_status" >&5
15654   (exit $ac_status); }; }; then
15655   cf_result=yes
15656 else
15657   echo "$as_me: failed program was:" >&5
15658 cat conftest.$ac_ext >&5
15659 cf_result=no
15660 fi
15661 rm -f conftest.$ac_objext conftest.$ac_ext
15662 echo "$as_me:15662: result: $cf_result" >&5
15663 echo "${ECHO_T}$cf_result" >&6
15664
15665 if test $cf_result = yes ; then
15666
15667 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15668
15669         cat >>confdefs.h <<EOF
15670 #define $cf_result 1
15671 EOF
15672
15673 else
15674         echo "$as_me:15674: checking for data boolnames in library" >&5
15675 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15676         # BSD linkers insist on making weak linkage, but resolve at runtime.
15677         if test "$cross_compiling" = yes; then
15678
15679         # cross-compiling
15680         cat >conftest.$ac_ext <<_ACEOF
15681 #line 15681 "configure"
15682 #include "confdefs.h"
15683
15684 #ifdef HAVE_XCURSES
15685 #include <xcurses.h>
15686 char * XCursesProgramName = "test";
15687 #else
15688 #include <${cf_cv_ncurses_header:-curses.h}>
15689 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15690 #include <ncursesw/term.h>
15691 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15692 #include <ncurses/term.h>
15693 #elif defined(HAVE_TERM_H)
15694 #include <term.h>
15695 #endif
15696 #endif
15697
15698 extern char boolnames;
15699 int
15700 main ()
15701 {
15702
15703         do {
15704                 void *foo = &(boolnames);
15705                 ${cf_cv_main_return:-return}(foo == 0);
15706         } while (0)
15707
15708   ;
15709   return 0;
15710 }
15711 _ACEOF
15712 rm -f conftest.$ac_objext conftest$ac_exeext
15713 if { (eval echo "$as_me:15713: \"$ac_link\"") >&5
15714   (eval $ac_link) 2>&5
15715   ac_status=$?
15716   echo "$as_me:15716: \$? = $ac_status" >&5
15717   (exit $ac_status); } &&
15718          { ac_try='test -s conftest$ac_exeext'
15719   { (eval echo "$as_me:15719: \"$ac_try\"") >&5
15720   (eval $ac_try) 2>&5
15721   ac_status=$?
15722   echo "$as_me:15722: \$? = $ac_status" >&5
15723   (exit $ac_status); }; }; then
15724   cf_result=yes
15725 else
15726   echo "$as_me: failed program was:" >&5
15727 cat conftest.$ac_ext >&5
15728 cf_result=no
15729 fi
15730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15731
15732 else
15733   cat >conftest.$ac_ext <<_ACEOF
15734 #line 15734 "configure"
15735 #include "confdefs.h"
15736
15737 #ifdef HAVE_XCURSES
15738 #include <xcurses.h>
15739 char * XCursesProgramName = "test";
15740 #else
15741 #include <${cf_cv_ncurses_header:-curses.h}>
15742 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15743 #include <ncursesw/term.h>
15744 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15745 #include <ncurses/term.h>
15746 #elif defined(HAVE_TERM_H)
15747 #include <term.h>
15748 #endif
15749 #endif
15750
15751 extern char boolnames;
15752 int main(void)
15753 {
15754         void *foo = &(boolnames);
15755         ${cf_cv_main_return:-return}(foo == 0);
15756 }
15757 _ACEOF
15758 rm -f conftest$ac_exeext
15759 if { (eval echo "$as_me:15759: \"$ac_link\"") >&5
15760   (eval $ac_link) 2>&5
15761   ac_status=$?
15762   echo "$as_me:15762: \$? = $ac_status" >&5
15763   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15764   { (eval echo "$as_me:15764: \"$ac_try\"") >&5
15765   (eval $ac_try) 2>&5
15766   ac_status=$?
15767   echo "$as_me:15767: \$? = $ac_status" >&5
15768   (exit $ac_status); }; }; then
15769   cf_result=yes
15770 else
15771   echo "$as_me: program exited with status $ac_status" >&5
15772 echo "$as_me: failed program was:" >&5
15773 cat conftest.$ac_ext >&5
15774 cf_result=no
15775 fi
15776 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15777 fi
15778         echo "$as_me:15778: result: $cf_result" >&5
15779 echo "${ECHO_T}$cf_result" >&6
15780         if test $cf_result = yes ; then
15781
15782 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15783
15784                 cat >>confdefs.h <<EOF
15785 #define $cf_result 1
15786 EOF
15787
15788         fi
15789 fi
15790
15791 echo "$as_me:15791: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15792 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15793
15794 cat >conftest.$ac_ext <<_ACEOF
15795 #line 15795 "configure"
15796 #include "confdefs.h"
15797
15798 #ifdef HAVE_XCURSES
15799 #include <xcurses.h>
15800 char * XCursesProgramName = "test";
15801 #else
15802 #include <${cf_cv_ncurses_header:-curses.h}>
15803 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15804 #include <ncursesw/term.h>
15805 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15806 #include <ncurses/term.h>
15807 #elif defined(HAVE_TERM_H)
15808 #include <term.h>
15809 #endif
15810 #endif
15811
15812 int
15813 main ()
15814 {
15815
15816 void *foo = &(boolfnames)
15817
15818   ;
15819   return 0;
15820 }
15821 _ACEOF
15822 rm -f conftest.$ac_objext
15823 if { (eval echo "$as_me:15823: \"$ac_compile\"") >&5
15824   (eval $ac_compile) 2>&5
15825   ac_status=$?
15826   echo "$as_me:15826: \$? = $ac_status" >&5
15827   (exit $ac_status); } &&
15828          { ac_try='test -s conftest.$ac_objext'
15829   { (eval echo "$as_me:15829: \"$ac_try\"") >&5
15830   (eval $ac_try) 2>&5
15831   ac_status=$?
15832   echo "$as_me:15832: \$? = $ac_status" >&5
15833   (exit $ac_status); }; }; then
15834   cf_result=yes
15835 else
15836   echo "$as_me: failed program was:" >&5
15837 cat conftest.$ac_ext >&5
15838 cf_result=no
15839 fi
15840 rm -f conftest.$ac_objext conftest.$ac_ext
15841 echo "$as_me:15841: result: $cf_result" >&5
15842 echo "${ECHO_T}$cf_result" >&6
15843
15844 if test $cf_result = yes ; then
15845
15846 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15847
15848         cat >>confdefs.h <<EOF
15849 #define $cf_result 1
15850 EOF
15851
15852 else
15853         echo "$as_me:15853: checking for data boolfnames in library" >&5
15854 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15855         # BSD linkers insist on making weak linkage, but resolve at runtime.
15856         if test "$cross_compiling" = yes; then
15857
15858         # cross-compiling
15859         cat >conftest.$ac_ext <<_ACEOF
15860 #line 15860 "configure"
15861 #include "confdefs.h"
15862
15863 #ifdef HAVE_XCURSES
15864 #include <xcurses.h>
15865 char * XCursesProgramName = "test";
15866 #else
15867 #include <${cf_cv_ncurses_header:-curses.h}>
15868 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15869 #include <ncursesw/term.h>
15870 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15871 #include <ncurses/term.h>
15872 #elif defined(HAVE_TERM_H)
15873 #include <term.h>
15874 #endif
15875 #endif
15876
15877 extern char boolfnames;
15878 int
15879 main ()
15880 {
15881
15882         do {
15883                 void *foo = &(boolfnames);
15884                 ${cf_cv_main_return:-return}(foo == 0);
15885         } while (0)
15886
15887   ;
15888   return 0;
15889 }
15890 _ACEOF
15891 rm -f conftest.$ac_objext conftest$ac_exeext
15892 if { (eval echo "$as_me:15892: \"$ac_link\"") >&5
15893   (eval $ac_link) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); } &&
15897          { ac_try='test -s conftest$ac_exeext'
15898   { (eval echo "$as_me:15898: \"$ac_try\"") >&5
15899   (eval $ac_try) 2>&5
15900   ac_status=$?
15901   echo "$as_me:15901: \$? = $ac_status" >&5
15902   (exit $ac_status); }; }; then
15903   cf_result=yes
15904 else
15905   echo "$as_me: failed program was:" >&5
15906 cat conftest.$ac_ext >&5
15907 cf_result=no
15908 fi
15909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15910
15911 else
15912   cat >conftest.$ac_ext <<_ACEOF
15913 #line 15913 "configure"
15914 #include "confdefs.h"
15915
15916 #ifdef HAVE_XCURSES
15917 #include <xcurses.h>
15918 char * XCursesProgramName = "test";
15919 #else
15920 #include <${cf_cv_ncurses_header:-curses.h}>
15921 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15922 #include <ncursesw/term.h>
15923 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15924 #include <ncurses/term.h>
15925 #elif defined(HAVE_TERM_H)
15926 #include <term.h>
15927 #endif
15928 #endif
15929
15930 extern char boolfnames;
15931 int main(void)
15932 {
15933         void *foo = &(boolfnames);
15934         ${cf_cv_main_return:-return}(foo == 0);
15935 }
15936 _ACEOF
15937 rm -f conftest$ac_exeext
15938 if { (eval echo "$as_me:15938: \"$ac_link\"") >&5
15939   (eval $ac_link) 2>&5
15940   ac_status=$?
15941   echo "$as_me:15941: \$? = $ac_status" >&5
15942   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15943   { (eval echo "$as_me:15943: \"$ac_try\"") >&5
15944   (eval $ac_try) 2>&5
15945   ac_status=$?
15946   echo "$as_me:15946: \$? = $ac_status" >&5
15947   (exit $ac_status); }; }; then
15948   cf_result=yes
15949 else
15950   echo "$as_me: program exited with status $ac_status" >&5
15951 echo "$as_me: failed program was:" >&5
15952 cat conftest.$ac_ext >&5
15953 cf_result=no
15954 fi
15955 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15956 fi
15957         echo "$as_me:15957: result: $cf_result" >&5
15958 echo "${ECHO_T}$cf_result" >&6
15959         if test $cf_result = yes ; then
15960
15961 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15962
15963                 cat >>confdefs.h <<EOF
15964 #define $cf_result 1
15965 EOF
15966
15967         fi
15968 fi
15969
15970 LD_RPATH_OPT=
15971 echo "$as_me:15971: checking for an rpath option" >&5
15972 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
15973 case $cf_cv_system_name in #(vi
15974 irix*) #(vi
15975         if test "$GCC" = yes; then
15976                 LD_RPATH_OPT="-Wl,-rpath,"
15977         else
15978                 LD_RPATH_OPT="-rpath "
15979         fi
15980         ;;
15981 linux*|gnu*|k*bsd*-gnu) #(vi
15982         LD_RPATH_OPT="-Wl,-rpath,"
15983         ;;
15984 openbsd[2-9].*|mirbsd*) #(vi
15985         LD_RPATH_OPT="-Wl,-rpath,"
15986         ;;
15987 dragonfly*|freebsd*) #(vi
15988         LD_RPATH_OPT="-rpath "
15989         ;;
15990 netbsd*) #(vi
15991         LD_RPATH_OPT="-Wl,-rpath,"
15992         ;;
15993 osf*|mls+*) #(vi
15994         LD_RPATH_OPT="-rpath "
15995         ;;
15996 solaris2*) #(vi
15997         LD_RPATH_OPT="-R"
15998         ;;
15999 *)
16000         ;;
16001 esac
16002 echo "$as_me:16002: result: $LD_RPATH_OPT" >&5
16003 echo "${ECHO_T}$LD_RPATH_OPT" >&6
16004
16005 case "x$LD_RPATH_OPT" in #(vi
16006 x-R*)
16007         echo "$as_me:16007: checking if we need a space after rpath option" >&5
16008 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
16009         cf_save_LIBS="$LIBS"
16010         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
16011         cat >conftest.$ac_ext <<_ACEOF
16012 #line 16012 "configure"
16013 #include "confdefs.h"
16014
16015 int
16016 main ()
16017 {
16018
16019   ;
16020   return 0;
16021 }
16022 _ACEOF
16023 rm -f conftest.$ac_objext conftest$ac_exeext
16024 if { (eval echo "$as_me:16024: \"$ac_link\"") >&5
16025   (eval $ac_link) 2>&5
16026   ac_status=$?
16027   echo "$as_me:16027: \$? = $ac_status" >&5
16028   (exit $ac_status); } &&
16029          { ac_try='test -s conftest$ac_exeext'
16030   { (eval echo "$as_me:16030: \"$ac_try\"") >&5
16031   (eval $ac_try) 2>&5
16032   ac_status=$?
16033   echo "$as_me:16033: \$? = $ac_status" >&5
16034   (exit $ac_status); }; }; then
16035   cf_rpath_space=no
16036 else
16037   echo "$as_me: failed program was:" >&5
16038 cat conftest.$ac_ext >&5
16039 cf_rpath_space=yes
16040 fi
16041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16042         LIBS="$cf_save_LIBS"
16043         echo "$as_me:16043: result: $cf_rpath_space" >&5
16044 echo "${ECHO_T}$cf_rpath_space" >&6
16045         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
16046         ;;
16047 esac
16048
16049 echo "$as_me:16049: checking if rpath-hack should be disabled" >&5
16050 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
16051
16052 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
16053 if test "${enable_rpath_hack+set}" = set; then
16054   enableval="$enable_rpath_hack"
16055   test "$enableval" != no && enableval=yes
16056   if test "$enableval" != "yes" ; then
16057     cf_disable_rpath_hack=yes
16058   else
16059     cf_disable_rpath_hack=no
16060   fi
16061 else
16062   enableval=yes
16063   cf_disable_rpath_hack=no
16064
16065 fi;
16066 echo "$as_me:16066: result: $cf_disable_rpath_hack" >&5
16067 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
16068 if test "$cf_disable_rpath_hack" = no ; then
16069
16070 echo "$as_me:16070: checking for updated LDFLAGS" >&5
16071 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16072 if test -n "$LD_RPATH_OPT" ; then
16073         echo "$as_me:16073: result: maybe" >&5
16074 echo "${ECHO_T}maybe" >&6
16075
16076         for ac_prog in ldd
16077 do
16078   # Extract the first word of "$ac_prog", so it can be a program name with args.
16079 set dummy $ac_prog; ac_word=$2
16080 echo "$as_me:16080: checking for $ac_word" >&5
16081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16082 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
16083   echo $ECHO_N "(cached) $ECHO_C" >&6
16084 else
16085   if test -n "$cf_ldd_prog"; then
16086   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
16087 else
16088   ac_save_IFS=$IFS; IFS=$ac_path_separator
16089 ac_dummy="$PATH"
16090 for ac_dir in $ac_dummy; do
16091   IFS=$ac_save_IFS
16092   test -z "$ac_dir" && ac_dir=.
16093   $as_executable_p "$ac_dir/$ac_word" || continue
16094 ac_cv_prog_cf_ldd_prog="$ac_prog"
16095 echo "$as_me:16095: found $ac_dir/$ac_word" >&5
16096 break
16097 done
16098
16099 fi
16100 fi
16101 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
16102 if test -n "$cf_ldd_prog"; then
16103   echo "$as_me:16103: result: $cf_ldd_prog" >&5
16104 echo "${ECHO_T}$cf_ldd_prog" >&6
16105 else
16106   echo "$as_me:16106: result: no" >&5
16107 echo "${ECHO_T}no" >&6
16108 fi
16109
16110   test -n "$cf_ldd_prog" && break
16111 done
16112 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
16113
16114         cf_rpath_list="/usr/lib /lib"
16115         if test "$cf_ldd_prog" != no
16116         then
16117                 cf_rpath_oops=
16118
16119 cat >conftest.$ac_ext <<_ACEOF
16120 #line 16120 "configure"
16121 #include "confdefs.h"
16122 #include <stdio.h>
16123 int
16124 main ()
16125 {
16126 printf("Hello");
16127   ;
16128   return 0;
16129 }
16130 _ACEOF
16131 rm -f conftest.$ac_objext conftest$ac_exeext
16132 if { (eval echo "$as_me:16132: \"$ac_link\"") >&5
16133   (eval $ac_link) 2>&5
16134   ac_status=$?
16135   echo "$as_me:16135: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -s conftest$ac_exeext'
16138   { (eval echo "$as_me:16138: \"$ac_try\"") >&5
16139   (eval $ac_try) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; }; then
16143   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
16144                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 cat conftest.$ac_ext >&5
16148 fi
16149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16150
16151                 # If we passed the link-test, but get a "not found" on a given library,
16152                 # this could be due to inept reconfiguration of gcc to make it only
16153                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
16154                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
16155                 # /usr/local libraries.
16156                 if test -n "$cf_rpath_oops"
16157                 then
16158                         for cf_rpath_src in $cf_rpath_oops
16159                         do
16160                                 for cf_rpath_dir in \
16161                                         /usr/local \
16162                                         /usr/pkg \
16163                                         /opt/sfw
16164                                 do
16165                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
16166                                         then
16167                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16168
16169 echo "${as_me:-configure}:16169: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16170
16171                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16172                                                 break
16173                                         fi
16174                                 done
16175                         done
16176                 fi
16177         fi
16178
16179         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16180
16181 echo "${as_me:-configure}:16181: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16182
16183 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16184
16185 echo "${as_me:-configure}:16185: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16186
16187 cf_rpath_dst=
16188 for cf_rpath_src in $LDFLAGS
16189 do
16190         case $cf_rpath_src in #(vi
16191         -L*) #(vi
16192
16193                 # check if this refers to a directory which we will ignore
16194                 cf_rpath_skip=no
16195                 if test -n "$cf_rpath_list"
16196                 then
16197                         for cf_rpath_item in $cf_rpath_list
16198                         do
16199                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16200                                 then
16201                                         cf_rpath_skip=yes
16202                                         break
16203                                 fi
16204                         done
16205                 fi
16206
16207                 if test "$cf_rpath_skip" = no
16208                 then
16209                         # transform the option
16210                         if test "$LD_RPATH_OPT" = "-R " ; then
16211                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16212                         else
16213                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16214                         fi
16215
16216                         # if we have not already added this, add it now
16217                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16218                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16219                         then
16220                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16221
16222 echo "${as_me:-configure}:16222: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16223
16224                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16225                         fi
16226                 fi
16227                 ;;
16228         esac
16229         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16230 done
16231 LDFLAGS=$cf_rpath_dst
16232
16233 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16234
16235 echo "${as_me:-configure}:16235: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16236
16237 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
16238
16239 echo "${as_me:-configure}:16239: testing ...checking LIBS $LIBS ..." 1>&5
16240
16241 cf_rpath_dst=
16242 for cf_rpath_src in $LIBS
16243 do
16244         case $cf_rpath_src in #(vi
16245         -L*) #(vi
16246
16247                 # check if this refers to a directory which we will ignore
16248                 cf_rpath_skip=no
16249                 if test -n "$cf_rpath_list"
16250                 then
16251                         for cf_rpath_item in $cf_rpath_list
16252                         do
16253                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16254                                 then
16255                                         cf_rpath_skip=yes
16256                                         break
16257                                 fi
16258                         done
16259                 fi
16260
16261                 if test "$cf_rpath_skip" = no
16262                 then
16263                         # transform the option
16264                         if test "$LD_RPATH_OPT" = "-R " ; then
16265                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16266                         else
16267                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16268                         fi
16269
16270                         # if we have not already added this, add it now
16271                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16272                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16273                         then
16274                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16275
16276 echo "${as_me:-configure}:16276: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16277
16278                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16279                         fi
16280                 fi
16281                 ;;
16282         esac
16283         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16284 done
16285 LIBS=$cf_rpath_dst
16286
16287 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
16288
16289 echo "${as_me:-configure}:16289: testing ...checked LIBS $LIBS ..." 1>&5
16290
16291         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16292
16293 echo "${as_me:-configure}:16293: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16294
16295 fi
16296
16297 fi
16298
16299 TEST_ARGS="$LIBS"
16300 LIBS=
16301
16302 ac_config_files="$ac_config_files Makefile"
16303 ac_config_commands="$ac_config_commands default"
16304 cat >confcache <<\_ACEOF
16305 # This file is a shell script that caches the results of configure
16306 # tests run on this system so they can be shared between configure
16307 # scripts and configure runs, see configure's option --config-cache.
16308 # It is not useful on other systems.  If it contains results you don't
16309 # want to keep, you may remove or edit it.
16310 #
16311 # config.status only pays attention to the cache file if you give it
16312 # the --recheck option to rerun configure.
16313 #
16314 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16315 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16316 # following values.
16317
16318 _ACEOF
16319
16320 # The following way of writing the cache mishandles newlines in values,
16321 # but we know of no workaround that is simple, portable, and efficient.
16322 # So, don't put newlines in cache variables' values.
16323 # Ultrix sh set writes to stderr and can't be redirected directly,
16324 # and sets the high bit in the cache file unless we assign to the vars.
16325 {
16326   (set) 2>&1 |
16327     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16328     *ac_space=\ *)
16329       # `set' does not quote correctly, so add quotes (double-quote
16330       # substitution turns \\\\ into \\, and sed turns \\ into \).
16331       sed -n \
16332         "s/'/'\\\\''/g;
16333           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16334       ;;
16335     *)
16336       # `set' quotes correctly as required by POSIX, so do not add quotes.
16337       sed -n \
16338         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16339       ;;
16340     esac;
16341 } |
16342   sed '
16343      t clear
16344      : clear
16345      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16346      t end
16347      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16348      : end' >>confcache
16349 if cmp -s $cache_file confcache; then :; else
16350   if test -w $cache_file; then
16351     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16352     cat confcache >$cache_file
16353   else
16354     echo "not updating unwritable cache $cache_file"
16355   fi
16356 fi
16357 rm -f confcache
16358
16359 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16360 # Let make expand exec_prefix.
16361 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16362
16363 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16364 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16365 # trailing colons and then remove the whole line if VPATH becomes empty
16366 # (actually we leave an empty line to preserve line numbers).
16367 if test "x$srcdir" = x.; then
16368   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16369 s/:*\$(srcdir):*/:/;
16370 s/:*\${srcdir}:*/:/;
16371 s/:*@srcdir@:*/:/;
16372 s/^\([^=]*=[    ]*\):*/\1/;
16373 s/:*$//;
16374 s/^[^=]*=[      ]*$//;
16375 }'
16376 fi
16377
16378 DEFS=-DHAVE_CONFIG_H
16379
16380 : ${CONFIG_STATUS=./config.status}
16381 ac_clean_files_save=$ac_clean_files
16382 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16383 { echo "$as_me:16383: creating $CONFIG_STATUS" >&5
16384 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16385 cat >$CONFIG_STATUS <<_ACEOF
16386 #! $SHELL
16387 # Generated automatically by configure.
16388 # Run this file to recreate the current configuration.
16389 # Compiler output produced by configure, useful for debugging
16390 # configure, is in config.log if it exists.
16391
16392 debug=false
16393 SHELL=\${CONFIG_SHELL-$SHELL}
16394 ac_cs_invocation="\$0 \$@"
16395
16396 _ACEOF
16397
16398 cat >>$CONFIG_STATUS <<\_ACEOF
16399 # Be Bourne compatible
16400 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16401   emulate sh
16402   NULLCMD=:
16403 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16404   set -o posix
16405 fi
16406
16407 # Name of the executable.
16408 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16409
16410 if expr a : '\(a\)' >/dev/null 2>&1; then
16411   as_expr=expr
16412 else
16413   as_expr=false
16414 fi
16415
16416 rm -f conf$$ conf$$.exe conf$$.file
16417 echo >conf$$.file
16418 if ln -s conf$$.file conf$$ 2>/dev/null; then
16419   # We could just check for DJGPP; but this test a) works b) is more generic
16420   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16421   if test -f conf$$.exe; then
16422     # Don't use ln at all; we don't have any links
16423     as_ln_s='cp -p'
16424   else
16425     as_ln_s='ln -s'
16426   fi
16427 elif ln conf$$.file conf$$ 2>/dev/null; then
16428   as_ln_s=ln
16429 else
16430   as_ln_s='cp -p'
16431 fi
16432 rm -f conf$$ conf$$.exe conf$$.file
16433
16434 as_executable_p="test -f"
16435
16436 # Support unset when possible.
16437 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16438   as_unset=unset
16439 else
16440   as_unset=false
16441 fi
16442
16443 # NLS nuisances.
16444 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16445 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16446 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16447 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16448 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16449 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16450 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16451 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16452
16453 # IFS
16454 # We need space, tab and new line, in precisely that order.
16455 as_nl='
16456 '
16457 IFS="   $as_nl"
16458
16459 # CDPATH.
16460 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16461
16462 exec 6>&1
16463
16464 _ACEOF
16465
16466 # Files that config.status was made for.
16467 if test -n "$ac_config_files"; then
16468   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16469 fi
16470
16471 if test -n "$ac_config_headers"; then
16472   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16473 fi
16474
16475 if test -n "$ac_config_links"; then
16476   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16477 fi
16478
16479 if test -n "$ac_config_commands"; then
16480   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16481 fi
16482
16483 cat >>$CONFIG_STATUS <<\EOF
16484
16485 ac_cs_usage="\
16486 \`$as_me' instantiates files from templates according to the
16487 current configuration.
16488
16489 Usage: $0 [OPTIONS] [FILE]...
16490
16491   -h, --help       print this help, then exit
16492   -V, --version    print version number, then exit
16493   -d, --debug      don't remove temporary files
16494       --recheck    update $as_me by reconfiguring in the same conditions
16495   --file=FILE[:TEMPLATE]
16496                    instantiate the configuration file FILE
16497   --header=FILE[:TEMPLATE]
16498                    instantiate the configuration header FILE
16499
16500 Configuration files:
16501 $config_files
16502
16503 Configuration headers:
16504 $config_headers
16505
16506 Configuration commands:
16507 $config_commands
16508
16509 Report bugs to <dickey@invisible-island.net>."
16510 EOF
16511
16512 cat >>$CONFIG_STATUS <<EOF
16513 ac_cs_version="\\
16514 config.status
16515 configured by $0, generated by GNU Autoconf 2.52.20101002,
16516   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16517
16518 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16519 Free Software Foundation, Inc.
16520 This config.status script is free software; the Free Software Foundation
16521 gives unlimited permission to copy, distribute and modify it."
16522 srcdir=$srcdir
16523 INSTALL="$INSTALL"
16524 EOF
16525
16526 cat >>$CONFIG_STATUS <<\EOF
16527 # If no file are specified by the user, then we need to provide default
16528 # value.  By we need to know if files were specified by the user.
16529 ac_need_defaults=:
16530 while test $# != 0
16531 do
16532   case $1 in
16533   --*=*)
16534     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16535     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16536     shift
16537     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16538     shift
16539     ;;
16540   -*);;
16541   *) # This is not an option, so the user has probably given explicit
16542      # arguments.
16543      ac_need_defaults=false;;
16544   esac
16545
16546   case $1 in
16547   # Handling of the options.
16548 EOF
16549 cat >>$CONFIG_STATUS <<EOF
16550   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16551     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16552     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16553 EOF
16554 cat >>$CONFIG_STATUS <<\EOF
16555   --version | --vers* | -V )
16556     echo "$ac_cs_version"; exit 0 ;;
16557   --he | --h)
16558     # Conflict between --help and --header
16559     { { echo "$as_me:16559: error: ambiguous option: $1
16560 Try \`$0 --help' for more information." >&5
16561 echo "$as_me: error: ambiguous option: $1
16562 Try \`$0 --help' for more information." >&2;}
16563    { (exit 1); exit 1; }; };;
16564   --help | --hel | -h )
16565     echo "$ac_cs_usage"; exit 0 ;;
16566   --debug | --d* | -d )
16567     debug=: ;;
16568   --file | --fil | --fi | --f )
16569     shift
16570     CONFIG_FILES="$CONFIG_FILES $1"
16571     ac_need_defaults=false;;
16572   --header | --heade | --head | --hea )
16573     shift
16574     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16575     ac_need_defaults=false;;
16576
16577   # This is an error.
16578   -*) { { echo "$as_me:16578: error: unrecognized option: $1
16579 Try \`$0 --help' for more information." >&5
16580 echo "$as_me: error: unrecognized option: $1
16581 Try \`$0 --help' for more information." >&2;}
16582    { (exit 1); exit 1; }; } ;;
16583
16584   *) ac_config_targets="$ac_config_targets $1" ;;
16585
16586   esac
16587   shift
16588 done
16589
16590 exec 5>>config.log
16591 cat >&5 << _ACEOF
16592
16593 ## ----------------------- ##
16594 ## Running config.status.  ##
16595 ## ----------------------- ##
16596
16597 This file was extended by $as_me 2.52.20101002, executed with
16598   CONFIG_FILES    = $CONFIG_FILES
16599   CONFIG_HEADERS  = $CONFIG_HEADERS
16600   CONFIG_LINKS    = $CONFIG_LINKS
16601   CONFIG_COMMANDS = $CONFIG_COMMANDS
16602   > $ac_cs_invocation
16603 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16604
16605 _ACEOF
16606 EOF
16607
16608 cat >>$CONFIG_STATUS <<EOF
16609 #
16610 # INIT-COMMANDS section.
16611 #
16612
16613 AWK="$AWK"
16614 ECHO_LD="$ECHO_LD"
16615
16616 EOF
16617
16618 cat >>$CONFIG_STATUS <<\EOF
16619 for ac_config_target in $ac_config_targets
16620 do
16621   case "$ac_config_target" in
16622   # Handling of arguments.
16623   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16624   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16625   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
16626   *) { { echo "$as_me:16626: error: invalid argument: $ac_config_target" >&5
16627 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16628    { (exit 1); exit 1; }; };;
16629   esac
16630 done
16631
16632 # If the user did not use the arguments to specify the items to instantiate,
16633 # then the envvar interface is used.  Set only those that are not.
16634 # We use the long form for the default assignment because of an extremely
16635 # bizarre bug on SunOS 4.1.3.
16636 if $ac_need_defaults; then
16637   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16638   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16639   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16640 fi
16641
16642 # Create a temporary directory, and hook for its removal unless debugging.
16643 $debug ||
16644 {
16645   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16646   trap '{ (exit 1); exit 1; }' 1 2 13 15
16647 }
16648
16649 # Create a (secure) tmp directory for tmp files.
16650 : ${TMPDIR=/tmp}
16651 {
16652   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16653   test -n "$tmp" && test -d "$tmp"
16654 }  ||
16655 {
16656   tmp=$TMPDIR/cs$$-$RANDOM
16657   (umask 077 && mkdir $tmp)
16658 } ||
16659 {
16660    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16661    { (exit 1); exit 1; }
16662 }
16663
16664 EOF
16665
16666 cat >>$CONFIG_STATUS <<EOF
16667
16668 #
16669 # CONFIG_FILES section.
16670 #
16671
16672 # No need to generate the scripts if there are no CONFIG_FILES.
16673 # This happens for instance when ./config.status config.h
16674 if test -n "\$CONFIG_FILES"; then
16675   # Protect against being on the right side of a sed subst in config.status.
16676   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16677    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16678 s,@SHELL@,$SHELL,;t t
16679 s,@exec_prefix@,$exec_prefix,;t t
16680 s,@prefix@,$prefix,;t t
16681 s,@program_transform_name@,$program_transform_name,;t t
16682 s,@bindir@,$bindir,;t t
16683 s,@sbindir@,$sbindir,;t t
16684 s,@libexecdir@,$libexecdir,;t t
16685 s,@datadir@,$datadir,;t t
16686 s,@sysconfdir@,$sysconfdir,;t t
16687 s,@sharedstatedir@,$sharedstatedir,;t t
16688 s,@localstatedir@,$localstatedir,;t t
16689 s,@libdir@,$libdir,;t t
16690 s,@includedir@,$includedir,;t t
16691 s,@oldincludedir@,$oldincludedir,;t t
16692 s,@infodir@,$infodir,;t t
16693 s,@mandir@,$mandir,;t t
16694 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16695 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16696 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16697 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16698 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16699 s,@build_alias@,$build_alias,;t t
16700 s,@host_alias@,$host_alias,;t t
16701 s,@target_alias@,$target_alias,;t t
16702 s,@ECHO_C@,$ECHO_C,;t t
16703 s,@ECHO_N@,$ECHO_N,;t t
16704 s,@ECHO_T@,$ECHO_T,;t t
16705 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16706 s,@DEFS@,$DEFS,;t t
16707 s,@LIBS@,$LIBS,;t t
16708 s,@build@,$build,;t t
16709 s,@build_cpu@,$build_cpu,;t t
16710 s,@build_vendor@,$build_vendor,;t t
16711 s,@build_os@,$build_os,;t t
16712 s,@host@,$host,;t t
16713 s,@host_cpu@,$host_cpu,;t t
16714 s,@host_vendor@,$host_vendor,;t t
16715 s,@host_os@,$host_os,;t t
16716 s,@SET_MAKE@,$SET_MAKE,;t t
16717 s,@CC@,$CC,;t t
16718 s,@CFLAGS@,$CFLAGS,;t t
16719 s,@LDFLAGS@,$LDFLAGS,;t t
16720 s,@CPPFLAGS@,$CPPFLAGS,;t t
16721 s,@ac_ct_CC@,$ac_ct_CC,;t t
16722 s,@EXEEXT@,$EXEEXT,;t t
16723 s,@OBJEXT@,$OBJEXT,;t t
16724 s,@CPP@,$CPP,;t t
16725 s,@AWK@,$AWK,;t t
16726 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16727 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16728 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16729 s,@LINT@,$LINT,;t t
16730 s,@LINT_OPTS@,$LINT_OPTS,;t t
16731 s,@CTAGS@,$CTAGS,;t t
16732 s,@ETAGS@,$ETAGS,;t t
16733 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16734 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16735 s,@MATH_LIB@,$MATH_LIB,;t t
16736 s,@top_builddir@,$top_builddir,;t t
16737 s,@CC_G_OPT@,$CC_G_OPT,;t t
16738 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16739 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16740 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16741 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16742 s,@LD@,$LD,;t t
16743 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16744 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16745 s,@LD_MODEL@,$LD_MODEL,;t t
16746 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16747 s,@LIBTOOL@,$LIBTOOL,;t t
16748 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16749 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16750 s,@LIB_LINK@,$LIB_LINK,;t t
16751 s,@LINK_TESTS@,$LINK_TESTS,;t t
16752 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16753 s,@PTHREAD@,$PTHREAD,;t t
16754 s,@TEST_ARGS@,$TEST_ARGS,;t t
16755 s,@TEST_DEPS@,$TEST_DEPS,;t t
16756 s,@TEST_LIBS@,$TEST_LIBS,;t t
16757 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
16758 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16759 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16760 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16761 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16762 s,@ECHO_LT@,$ECHO_LT,;t t
16763 s,@ECHO_LD@,$ECHO_LD,;t t
16764 s,@RULE_CC@,$RULE_CC,;t t
16765 s,@SHOW_CC@,$SHOW_CC,;t t
16766 s,@ECHO_CC@,$ECHO_CC,;t t
16767 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16768 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16769 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16770 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16771 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16772 s,@X_CFLAGS@,$X_CFLAGS,;t t
16773 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
16774 s,@X_LIBS@,$X_LIBS,;t t
16775 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
16776 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
16777 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
16778 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16779 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16780 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16781 CEOF
16782
16783 EOF
16784
16785   cat >>$CONFIG_STATUS <<\EOF
16786   # Split the substitutions into bite-sized pieces for seds with
16787   # small command number limits, like on Digital OSF/1 and HP-UX.
16788   ac_max_sed_lines=48
16789   ac_sed_frag=1 # Number of current file.
16790   ac_beg=1 # First line for current file.
16791   ac_end=$ac_max_sed_lines # Line after last line for current file.
16792   ac_more_lines=:
16793   ac_sed_cmds=
16794   while $ac_more_lines; do
16795     if test $ac_beg -gt 1; then
16796       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16797     else
16798       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16799     fi
16800     if test ! -s $tmp/subs.frag; then
16801       ac_more_lines=false
16802     else
16803       # The purpose of the label and of the branching condition is to
16804       # speed up the sed processing (if there are no `@' at all, there
16805       # is no need to browse any of the substitutions).
16806       # These are the two extra sed commands mentioned above.
16807       (echo ':t
16808   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16809       if test -z "$ac_sed_cmds"; then
16810         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16811       else
16812         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16813       fi
16814       ac_sed_frag=`expr $ac_sed_frag + 1`
16815       ac_beg=$ac_end
16816       ac_end=`expr $ac_end + $ac_max_sed_lines`
16817     fi
16818   done
16819   if test -z "$ac_sed_cmds"; then
16820     ac_sed_cmds=cat
16821   fi
16822 fi # test -n "$CONFIG_FILES"
16823
16824 EOF
16825 cat >>$CONFIG_STATUS <<\EOF
16826 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16827   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16828   case $ac_file in
16829   - | *:- | *:-:* ) # input from stdin
16830         cat >$tmp/stdin
16831         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16832         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16833   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16834         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16835   * )   ac_file_in=$ac_file.in ;;
16836   esac
16837
16838   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16839   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16840          X"$ac_file" : 'X\(//\)[^/]' \| \
16841          X"$ac_file" : 'X\(//\)$' \| \
16842          X"$ac_file" : 'X\(/\)' \| \
16843          .     : '\(.\)' 2>/dev/null ||
16844 echo X"$ac_file" |
16845     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16846           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16847           /^X\(\/\/\)$/{ s//\1/; q; }
16848           /^X\(\/\).*/{ s//\1/; q; }
16849           s/.*/./; q'`
16850   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16851     { case "$ac_dir" in
16852   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16853   *)                      as_incr_dir=.;;
16854 esac
16855 as_dummy="$ac_dir"
16856 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16857   case $as_mkdir_dir in
16858     # Skip DOS drivespec
16859     ?:) as_incr_dir=$as_mkdir_dir ;;
16860     *)
16861       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16862       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16863     ;;
16864   esac
16865 done; }
16866
16867     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16868     # A "../" for each directory in $ac_dir_suffix.
16869     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16870   else
16871     ac_dir_suffix= ac_dots=
16872   fi
16873
16874   case $srcdir in
16875   .)  ac_srcdir=.
16876       if test -z "$ac_dots"; then
16877          ac_top_srcdir=.
16878       else
16879          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16880       fi ;;
16881   [\\/]* | ?:[\\/]* )
16882       ac_srcdir=$srcdir$ac_dir_suffix;
16883       ac_top_srcdir=$srcdir ;;
16884   *) # Relative path.
16885     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16886     ac_top_srcdir=$ac_dots$srcdir ;;
16887   esac
16888
16889   case $INSTALL in
16890   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16891   *) ac_INSTALL=$ac_dots$INSTALL ;;
16892   esac
16893
16894   if test x"$ac_file" != x-; then
16895     { echo "$as_me:16895: creating $ac_file" >&5
16896 echo "$as_me: creating $ac_file" >&6;}
16897     rm -f "$ac_file"
16898   fi
16899   # Let's still pretend it is `configure' which instantiates (i.e., don't
16900   # use $as_me), people would be surprised to read:
16901   #    /* config.h.  Generated automatically by config.status.  */
16902   configure_input="Generated automatically from `echo $ac_file_in |
16903                                                  sed 's,.*/,,'` by configure."
16904
16905   # First look for the input files in the build tree, otherwise in the
16906   # src tree.
16907   ac_file_inputs=`IFS=:
16908     for f in $ac_file_in; do
16909       case $f in
16910       -) echo $tmp/stdin ;;
16911       [\\/$]*)
16912          # Absolute (can't be DOS-style, as IFS=:)
16913          test -f "$f" || { { echo "$as_me:16913: error: cannot find input file: $f" >&5
16914 echo "$as_me: error: cannot find input file: $f" >&2;}
16915    { (exit 1); exit 1; }; }
16916          echo $f;;
16917       *) # Relative
16918          if test -f "$f"; then
16919            # Build tree
16920            echo $f
16921          elif test -f "$srcdir/$f"; then
16922            # Source tree
16923            echo $srcdir/$f
16924          else
16925            # /dev/null tree
16926            { { echo "$as_me:16926: error: cannot find input file: $f" >&5
16927 echo "$as_me: error: cannot find input file: $f" >&2;}
16928    { (exit 1); exit 1; }; }
16929          fi;;
16930       esac
16931     done` || { (exit 1); exit 1; }
16932 EOF
16933 cat >>$CONFIG_STATUS <<EOF
16934   sed "$ac_vpsub
16935 $extrasub
16936 EOF
16937 cat >>$CONFIG_STATUS <<\EOF
16938 :t
16939 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16940 s,@configure_input@,$configure_input,;t t
16941 s,@srcdir@,$ac_srcdir,;t t
16942 s,@top_srcdir@,$ac_top_srcdir,;t t
16943 s,@INSTALL@,$ac_INSTALL,;t t
16944 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16945   rm -f $tmp/stdin
16946   if test x"$ac_file" != x-; then
16947     mv $tmp/out $ac_file
16948   else
16949     cat $tmp/out
16950     rm -f $tmp/out
16951   fi
16952
16953 done
16954 EOF
16955 cat >>$CONFIG_STATUS <<\EOF
16956
16957 #
16958 # CONFIG_HEADER section.
16959 #
16960
16961 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16962 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16963 #
16964 # ac_d sets the value in "#define NAME VALUE" lines.
16965 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16966 ac_dB='[        ].*$,\1#\2'
16967 ac_dC=' '
16968 ac_dD=',;t'
16969 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16970 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16971 ac_iB='\([      ]\),\1#\2define\3'
16972 ac_iC=' '
16973 ac_iD='\4,;t'
16974 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16975 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16976 ac_uB='$,\1#\2define\3'
16977 ac_uC=' '
16978 ac_uD=',;t'
16979
16980 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16981   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16982   case $ac_file in
16983   - | *:- | *:-:* ) # input from stdin
16984         cat >$tmp/stdin
16985         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16986         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16987   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16988         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16989   * )   ac_file_in=$ac_file.in ;;
16990   esac
16991
16992   test x"$ac_file" != x- && { echo "$as_me:16992: creating $ac_file" >&5
16993 echo "$as_me: creating $ac_file" >&6;}
16994
16995   # First look for the input files in the build tree, otherwise in the
16996   # src tree.
16997   ac_file_inputs=`IFS=:
16998     for f in $ac_file_in; do
16999       case $f in
17000       -) echo $tmp/stdin ;;
17001       [\\/$]*)
17002          # Absolute (can't be DOS-style, as IFS=:)
17003          test -f "$f" || { { echo "$as_me:17003: error: cannot find input file: $f" >&5
17004 echo "$as_me: error: cannot find input file: $f" >&2;}
17005    { (exit 1); exit 1; }; }
17006          echo $f;;
17007       *) # Relative
17008          if test -f "$f"; then
17009            # Build tree
17010            echo $f
17011          elif test -f "$srcdir/$f"; then
17012            # Source tree
17013            echo $srcdir/$f
17014          else
17015            # /dev/null tree
17016            { { echo "$as_me:17016: error: cannot find input file: $f" >&5
17017 echo "$as_me: error: cannot find input file: $f" >&2;}
17018    { (exit 1); exit 1; }; }
17019          fi;;
17020       esac
17021     done` || { (exit 1); exit 1; }
17022   # Remove the trailing spaces.
17023   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17024
17025 EOF
17026
17027 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17028 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17029 # be either 'cat' or 'sort'.
17030 cat confdefs.h | uniq >conftest.vals
17031
17032 # Break up conftest.vals because some shells have a limit on
17033 # the size of here documents, and old seds have small limits too.
17034
17035 rm -f conftest.tail
17036 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17037 while grep . conftest.vals >/dev/null
17038 do
17039   # Write chunks of a limited-size here document to conftest.frag.
17040   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17041   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17042   echo 'CEOF' >> $CONFIG_STATUS
17043   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17044   rm -f conftest.vals
17045   mv conftest.tail conftest.vals
17046 done
17047 rm -f conftest.vals
17048
17049 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17050 # marker @DEFS@.
17051 echo '  cat >> conftest.edit <<CEOF
17052 /@DEFS@/r conftest.frag
17053 /@DEFS@/d
17054 CEOF
17055 sed -f conftest.edit $tmp/in > $tmp/out
17056 rm -f $tmp/in
17057 mv $tmp/out $tmp/in
17058 rm -f conftest.edit conftest.frag
17059 ' >> $CONFIG_STATUS
17060
17061 cat >>$CONFIG_STATUS <<\EOF
17062   # Let's still pretend it is `configure' which instantiates (i.e., don't
17063   # use $as_me), people would be surprised to read:
17064   #    /* config.h.  Generated automatically by config.status.  */
17065   if test x"$ac_file" = x-; then
17066     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17067   else
17068     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17069   fi
17070   cat $tmp/in >>$tmp/config.h
17071   rm -f $tmp/in
17072   if test x"$ac_file" != x-; then
17073     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17074       { echo "$as_me:17074: $ac_file is unchanged" >&5
17075 echo "$as_me: $ac_file is unchanged" >&6;}
17076     else
17077       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17078          X"$ac_file" : 'X\(//\)[^/]' \| \
17079          X"$ac_file" : 'X\(//\)$' \| \
17080          X"$ac_file" : 'X\(/\)' \| \
17081          .     : '\(.\)' 2>/dev/null ||
17082 echo X"$ac_file" |
17083     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17084           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17085           /^X\(\/\/\)$/{ s//\1/; q; }
17086           /^X\(\/\).*/{ s//\1/; q; }
17087           s/.*/./; q'`
17088       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17089         { case "$ac_dir" in
17090   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17091   *)                      as_incr_dir=.;;
17092 esac
17093 as_dummy="$ac_dir"
17094 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17095   case $as_mkdir_dir in
17096     # Skip DOS drivespec
17097     ?:) as_incr_dir=$as_mkdir_dir ;;
17098     *)
17099       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17100       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17101     ;;
17102   esac
17103 done; }
17104
17105       fi
17106       rm -f $ac_file
17107       mv $tmp/config.h $ac_file
17108     fi
17109   else
17110     cat $tmp/config.h
17111     rm -f $tmp/config.h
17112   fi
17113 done
17114 EOF
17115 cat >>$CONFIG_STATUS <<\EOF
17116 #
17117 # CONFIG_COMMANDS section.
17118 #
17119 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17120   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17121   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17122
17123   case $ac_dest in
17124     default )
17125
17126 for cf_dir in .
17127 do
17128         if test ! -d $srcdir/$cf_dir; then
17129                 continue
17130         elif test -f $srcdir/$cf_dir/programs; then
17131                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17132         fi
17133 done
17134
17135         cat >>Makefile <<TEST_EOF
17136
17137 # These rules are generated so we do not rely on suffix rules, which do not
17138 # work consistently for different make-programs (the '\$(MODEL)/' confuses
17139 # some, and the '\$x' confuses others).
17140 TEST_EOF
17141
17142 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
17143 for N in $LIST
17144 do
17145         cat >>Makefile <<TEST_EOF
17146
17147 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
17148         \$(srcdir)/test.priv.h \\
17149         ncurses_cfg.h
17150         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
17151 TEST_EOF
17152 done
17153
17154 if test -f ../config.guess && test -f ../config.sub
17155 then
17156         cat >>Makefile <<TEST_EOF
17157
17158 # if we used CF_INHERIT for getting these files, we can remove them
17159 distclean::
17160         rm -f config.guess config.sub
17161 TEST_EOF
17162 fi
17163  ;;
17164   esac
17165 done
17166 EOF
17167
17168 cat >>$CONFIG_STATUS <<\EOF
17169
17170 { (exit 0); exit 0; }
17171 EOF
17172 chmod +x $CONFIG_STATUS
17173 ac_clean_files=$ac_clean_files_save
17174
17175 # configure is writing to config.log, and then calls config.status.
17176 # config.status does its own redirection, appending to config.log.
17177 # Unfortunately, on DOS this fails, as config.log is still kept open
17178 # by configure, so config.status won't be able to write to it; its
17179 # output is simply discarded.  So we exec the FD to /dev/null,
17180 # effectively closing config.log, so it can be properly (re)opened and
17181 # appended to by config.status.  When coming back to configure, we
17182 # need to make the FD available again.
17183 if test "$no_create" != yes; then
17184   ac_cs_success=:
17185   exec 5>/dev/null
17186   $SHELL $CONFIG_STATUS || ac_cs_success=false
17187   exec 5>>config.log
17188   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17189   # would make configure fail if this is the last instruction.
17190   $ac_cs_success || { (exit 1); exit 1; }
17191 fi
17192