]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.9 - patch 20111112
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101002.
4 #
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25   emulate sh
26   NULLCMD=:
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28   set -o posix
29 fi
30
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34 if expr a : '\(a\)' >/dev/null 2>&1; then
35   as_expr=expr
36 else
37   as_expr=false
38 fi
39
40 rm -f conf$$ conf$$.exe conf$$.file
41 echo >conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43   # We could just check for DJGPP; but this test a) works b) is more generic
44   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45   if test -f conf$$.exe; then
46     # Don't use ln at all; we don't have any links
47     as_ln_s='cp -p'
48   else
49     as_ln_s='ln -s'
50   fi
51 elif ln conf$$.file conf$$ 2>/dev/null; then
52   as_ln_s=ln
53 else
54   as_ln_s='cp -p'
55 fi
56 rm -f conf$$ conf$$.exe conf$$.file
57
58 as_executable_p="test -f"
59
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62   as_unset=unset
63 else
64   as_unset=false
65 fi
66
67 # NLS nuisances.
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77 # IFS
78 # We need space, tab and new line, in precisely that order.
79 as_nl='
80 '
81 IFS="   $as_nl"
82
83 # CDPATH.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86 # Name of the host.
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91 exec 6>&1
92
93 #
94 # Initializations.
95 #
96 ac_default_prefix=/usr/local
97 cross_compiling=no
98 subdirs=
99 MFLAGS= MAKEFLAGS=
100 SHELL=${CONFIG_SHELL-/bin/sh}
101
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete.  It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
106
107 ac_unique_file="ncurses.c"
108
109 # Initialize some variables set by options.
110 ac_init_help=
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
114 cache_file=/dev/null
115 exec_prefix=NONE
116 no_create=
117 no_recursion=
118 prefix=NONE
119 program_prefix=NONE
120 program_suffix=NONE
121 program_transform_name=s,x,x,
122 silent=
123 site=
124 srcdir=
125 verbose=
126 x_includes=NONE
127 x_libraries=NONE
128
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datadir='${prefix}/share'
138 sysconfdir='${prefix}/etc'
139 sharedstatedir='${prefix}/com'
140 localstatedir='${prefix}/var'
141 libdir='${exec_prefix}/lib'
142 includedir='${prefix}/include'
143 oldincludedir='/usr/include'
144 infodir='${prefix}/info'
145 mandir='${prefix}/man'
146
147 # Identity of this package.
148 PACKAGE_NAME=
149 PACKAGE_TARNAME=
150 PACKAGE_VERSION=
151 PACKAGE_STRING=
152 PACKAGE_BUGREPORT=
153
154 ac_prev=
155 for ac_option
156 do
157   # If the previous option needs an argument, assign it.
158   if test -n "$ac_prev"; then
159     eval "$ac_prev=\$ac_option"
160     ac_prev=
161     continue
162   fi
163
164   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
165
166   # Accept the important Cygnus configure options, so we can diagnose typos.
167
168   case $ac_option in
169
170   -bindir | --bindir | --bindi | --bind | --bin | --bi)
171     ac_prev=bindir ;;
172   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
173     bindir=$ac_optarg ;;
174
175   -build | --build | --buil | --bui | --bu)
176     ac_prev=build_alias ;;
177   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178     build_alias=$ac_optarg ;;
179
180   -cache-file | --cache-file | --cache-fil | --cache-fi \
181   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182     ac_prev=cache_file ;;
183   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185     cache_file=$ac_optarg ;;
186
187   --config-cache | -C)
188     cache_file=config.cache ;;
189
190   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
191     ac_prev=datadir ;;
192   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
193   | --da=*)
194     datadir=$ac_optarg ;;
195
196   -disable-* | --disable-*)
197     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
198     # Reject names that are not valid shell variable names.
199     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
200       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
201    { (exit 1); exit 1; }; }
202     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
203     eval "enable_$ac_feature=no" ;;
204
205   -enable-* | --enable-*)
206     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
207     # Reject names that are not valid shell variable names.
208     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210    { (exit 1); exit 1; }; }
211     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
212     case $ac_option in
213       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
214       *) ac_optarg=yes ;;
215     esac
216     eval "enable_$ac_feature='$ac_optarg'" ;;
217
218   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
219   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
220   | --exec | --exe | --ex)
221     ac_prev=exec_prefix ;;
222   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
223   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
224   | --exec=* | --exe=* | --ex=*)
225     exec_prefix=$ac_optarg ;;
226
227   -gas | --gas | --ga | --g)
228     # Obsolete; use --with-gas.
229     with_gas=yes ;;
230
231   -help | --help | --hel | --he | -h)
232     ac_init_help=long ;;
233   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
234     ac_init_help=recursive ;;
235   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
236     ac_init_help=short ;;
237
238   -host | --host | --hos | --ho)
239     ac_prev=host_alias ;;
240   -host=* | --host=* | --hos=* | --ho=*)
241     host_alias=$ac_optarg ;;
242
243   -includedir | --includedir | --includedi | --included | --include \
244   | --includ | --inclu | --incl | --inc)
245     ac_prev=includedir ;;
246   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247   | --includ=* | --inclu=* | --incl=* | --inc=*)
248     includedir=$ac_optarg ;;
249
250   -infodir | --infodir | --infodi | --infod | --info | --inf)
251     ac_prev=infodir ;;
252   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253     infodir=$ac_optarg ;;
254
255   -libdir | --libdir | --libdi | --libd)
256     ac_prev=libdir ;;
257   -libdir=* | --libdir=* | --libdi=* | --libd=*)
258     libdir=$ac_optarg ;;
259
260   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261   | --libexe | --libex | --libe)
262     ac_prev=libexecdir ;;
263   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264   | --libexe=* | --libex=* | --libe=*)
265     libexecdir=$ac_optarg ;;
266
267   -localstatedir | --localstatedir | --localstatedi | --localstated \
268   | --localstate | --localstat | --localsta | --localst \
269   | --locals | --local | --loca | --loc | --lo)
270     ac_prev=localstatedir ;;
271   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274     localstatedir=$ac_optarg ;;
275
276   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277     ac_prev=mandir ;;
278   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279     mandir=$ac_optarg ;;
280
281   -nfp | --nfp | --nf)
282     # Obsolete; use --without-fp.
283     with_fp=no ;;
284
285   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286   | --no-cr | --no-c)
287     no_create=yes ;;
288
289   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291     no_recursion=yes ;;
292
293   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295   | --oldin | --oldi | --old | --ol | --o)
296     ac_prev=oldincludedir ;;
297   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300     oldincludedir=$ac_optarg ;;
301
302   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303     ac_prev=prefix ;;
304   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305     prefix=$ac_optarg ;;
306
307   -program-prefix | --program-prefix | --program-prefi | --program-pref \
308   | --program-pre | --program-pr | --program-p)
309     ac_prev=program_prefix ;;
310   -program-prefix=* | --program-prefix=* | --program-prefi=* \
311   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312     program_prefix=$ac_optarg ;;
313
314   -program-suffix | --program-suffix | --program-suffi | --program-suff \
315   | --program-suf | --program-su | --program-s)
316     ac_prev=program_suffix ;;
317   -program-suffix=* | --program-suffix=* | --program-suffi=* \
318   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319     program_suffix=$ac_optarg ;;
320
321   -program-transform-name | --program-transform-name \
322   | --program-transform-nam | --program-transform-na \
323   | --program-transform-n | --program-transform- \
324   | --program-transform | --program-transfor \
325   | --program-transfo | --program-transf \
326   | --program-trans | --program-tran \
327   | --progr-tra | --program-tr | --program-t)
328     ac_prev=program_transform_name ;;
329   -program-transform-name=* | --program-transform-name=* \
330   | --program-transform-nam=* | --program-transform-na=* \
331   | --program-transform-n=* | --program-transform-=* \
332   | --program-transform=* | --program-transfor=* \
333   | --program-transfo=* | --program-transf=* \
334   | --program-trans=* | --program-tran=* \
335   | --progr-tra=* | --program-tr=* | --program-t=*)
336     program_transform_name=$ac_optarg ;;
337
338   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339   | -silent | --silent | --silen | --sile | --sil)
340     silent=yes ;;
341
342   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343     ac_prev=sbindir ;;
344   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345   | --sbi=* | --sb=*)
346     sbindir=$ac_optarg ;;
347
348   -sharedstatedir | --sharedstatedir | --sharedstatedi \
349   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350   | --sharedst | --shareds | --shared | --share | --shar \
351   | --sha | --sh)
352     ac_prev=sharedstatedir ;;
353   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356   | --sha=* | --sh=*)
357     sharedstatedir=$ac_optarg ;;
358
359   -site | --site | --sit)
360     ac_prev=site ;;
361   -site=* | --site=* | --sit=*)
362     site=$ac_optarg ;;
363
364   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365     ac_prev=srcdir ;;
366   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367     srcdir=$ac_optarg ;;
368
369   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370   | --syscon | --sysco | --sysc | --sys | --sy)
371     ac_prev=sysconfdir ;;
372   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374     sysconfdir=$ac_optarg ;;
375
376   -target | --target | --targe | --targ | --tar | --ta | --t)
377     ac_prev=target_alias ;;
378   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379     target_alias=$ac_optarg ;;
380
381   -v | -verbose | --verbose | --verbos | --verbo | --verb)
382     verbose=yes ;;
383
384   -version | --version | --versio | --versi | --vers | -V)
385     ac_init_version=: ;;
386
387   -with-* | --with-*)
388     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
389     # Reject names that are not valid shell variable names.
390     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
391       { echo "$as_me: error: invalid package name: $ac_package" >&2
392    { (exit 1); exit 1; }; }
393     ac_package=`echo $ac_package| sed 's/-/_/g'`
394     case $ac_option in
395       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
396       *) ac_optarg=yes ;;
397     esac
398     eval "with_$ac_package='$ac_optarg'" ;;
399
400   -without-* | --without-*)
401     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
402     # Reject names that are not valid shell variable names.
403     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404       { echo "$as_me: error: invalid package name: $ac_package" >&2
405    { (exit 1); exit 1; }; }
406     ac_package=`echo $ac_package | sed 's/-/_/g'`
407     eval "with_$ac_package=no" ;;
408
409   --x)
410     # Obsolete; use --with-x.
411     with_x=yes ;;
412
413   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414   | --x-incl | --x-inc | --x-in | --x-i)
415     ac_prev=x_includes ;;
416   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418     x_includes=$ac_optarg ;;
419
420   -x-libraries | --x-libraries | --x-librarie | --x-librari \
421   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422     ac_prev=x_libraries ;;
423   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425     x_libraries=$ac_optarg ;;
426
427   -*) { echo "$as_me: error: unrecognized option: $ac_option
428 Try \`$0 --help' for more information." >&2
429    { (exit 1); exit 1; }; }
430     ;;
431
432   *=*)
433     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
437    { (exit 1); exit 1; }; }
438     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
439     eval "$ac_envvar='$ac_optarg'"
440     export $ac_envvar ;;
441
442   *)
443     # FIXME: should be removed in autoconf 3.0.
444     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
445     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
446       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
447     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
448     ;;
449
450   esac
451 done
452
453 if test -n "$ac_prev"; then
454   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
455   { echo "$as_me: error: missing argument to $ac_option" >&2
456    { (exit 1); exit 1; }; }
457 fi
458
459 # Be sure to have absolute paths.
460 for ac_var in exec_prefix prefix
461 do
462   eval ac_val=$`echo $ac_var`
463   case $ac_val in
464     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
465     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
466    { (exit 1); exit 1; }; };;
467   esac
468 done
469
470 # Be sure to have absolute paths.
471 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
472               localstatedir libdir includedir oldincludedir infodir mandir
473 do
474   eval ac_val=$`echo $ac_var`
475   case $ac_val in
476     [\\/$]* | ?:[\\/]* ) ;;
477     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
478    { (exit 1); exit 1; }; };;
479   esac
480 done
481
482 # There might be people who depend on the old broken behavior: `$host'
483 # used to hold the argument of --host etc.
484 build=$build_alias
485 host=$host_alias
486 target=$target_alias
487
488 # FIXME: should be removed in autoconf 3.0.
489 if test "x$host_alias" != x; then
490   if test "x$build_alias" = x; then
491     cross_compiling=maybe
492     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
493     If a cross compiler is detected then cross compile mode will be used." >&2
494   elif test "x$build_alias" != "x$host_alias"; then
495     cross_compiling=yes
496   fi
497 fi
498
499 ac_tool_prefix=
500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
501
502 test "$silent" = yes && exec 6>/dev/null
503
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506   ac_srcdir_defaulted=yes
507   # Try the directory containing this script, then its parent.
508   ac_prog=$0
509   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
510   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
511   srcdir=$ac_confdir
512   if test ! -r $srcdir/$ac_unique_file; then
513     srcdir=..
514   fi
515 else
516   ac_srcdir_defaulted=no
517 fi
518 if test ! -r $srcdir/$ac_unique_file; then
519   if test "$ac_srcdir_defaulted" = yes; then
520     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
521    { (exit 1); exit 1; }; }
522   else
523     { echo "$as_me: error: cannot find sources in $srcdir" >&2
524    { (exit 1); exit 1; }; }
525   fi
526 fi
527 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
528 ac_env_build_alias_set=${build_alias+set}
529 ac_env_build_alias_value=$build_alias
530 ac_cv_env_build_alias_set=${build_alias+set}
531 ac_cv_env_build_alias_value=$build_alias
532 ac_env_host_alias_set=${host_alias+set}
533 ac_env_host_alias_value=$host_alias
534 ac_cv_env_host_alias_set=${host_alias+set}
535 ac_cv_env_host_alias_value=$host_alias
536 ac_env_target_alias_set=${target_alias+set}
537 ac_env_target_alias_value=$target_alias
538 ac_cv_env_target_alias_set=${target_alias+set}
539 ac_cv_env_target_alias_value=$target_alias
540 ac_env_CC_set=${CC+set}
541 ac_env_CC_value=$CC
542 ac_cv_env_CC_set=${CC+set}
543 ac_cv_env_CC_value=$CC
544 ac_env_CFLAGS_set=${CFLAGS+set}
545 ac_env_CFLAGS_value=$CFLAGS
546 ac_cv_env_CFLAGS_set=${CFLAGS+set}
547 ac_cv_env_CFLAGS_value=$CFLAGS
548 ac_env_LDFLAGS_set=${LDFLAGS+set}
549 ac_env_LDFLAGS_value=$LDFLAGS
550 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
551 ac_cv_env_LDFLAGS_value=$LDFLAGS
552 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
553 ac_env_CPPFLAGS_value=$CPPFLAGS
554 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
555 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
556 ac_env_CPP_set=${CPP+set}
557 ac_env_CPP_value=$CPP
558 ac_cv_env_CPP_set=${CPP+set}
559 ac_cv_env_CPP_value=$CPP
560
561 #
562 # Report the --help message.
563 #
564 if test "$ac_init_help" = "long"; then
565   # Omit some internal or obsolete options to make the list less imposing.
566   # This message is too long to be a string in the A/UX 3.1 sh.
567   cat <<EOF
568 \`configure' configures this package to adapt to many kinds of systems.
569
570 Usage: $0 [OPTION]... [VAR=VALUE]...
571
572 To assign environment variables (e.g., CC, CFLAGS...), specify them as
573 VAR=VALUE.  See below for descriptions of some of the useful variables.
574
575 Defaults for the options are specified in brackets.
576
577 Configuration:
578   -h, --help              display this help and exit
579       --help=short        display options specific to this package
580       --help=recursive    display the short help of all the included packages
581   -V, --version           display version information and exit
582   -q, --quiet, --silent   do not print \`checking...' messages
583       --cache-file=FILE   cache test results in FILE [disabled]
584   -C, --config-cache      alias for \`--cache-file=config.cache'
585   -n, --no-create         do not create output files
586       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
587
588 EOF
589
590   cat <<EOF
591 Installation directories:
592   --prefix=PREFIX         install architecture-independent files in PREFIX
593                           [$ac_default_prefix]
594   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
595                           [PREFIX]
596
597 By default, \`make install' will install all the files in
598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
600 for instance \`--prefix=\$HOME'.
601
602 For better control, use the options below.
603
604 Fine tuning of the installation directories:
605   --bindir=DIR            user executables [EPREFIX/bin]
606   --sbindir=DIR           system admin executables [EPREFIX/sbin]
607   --libexecdir=DIR        program executables [EPREFIX/libexec]
608   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
609   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
610   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
611   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
612   --libdir=DIR            object code libraries [EPREFIX/lib]
613   --includedir=DIR        C header files [PREFIX/include]
614   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
615   --infodir=DIR           info documentation [PREFIX/info]
616   --mandir=DIR            man documentation [PREFIX/man]
617 EOF
618
619   cat <<\EOF
620
621 Program names:
622   --program-prefix=PREFIX            prepend PREFIX to installed program names
623   --program-suffix=SUFFIX            append SUFFIX to installed program names
624   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
625
626 X features:
627   --x-includes=DIR    X include files are in DIR
628   --x-libraries=DIR   X library files are in DIR
629
630 System types:
631   --build=BUILD           configure for building on BUILD [guessed]
632   --host=HOST       build programs to run on HOST [BUILD]
633 EOF
634 fi
635
636 if test -n "$ac_init_help"; then
637
638   cat <<\EOF
639
640 Optional Features:
641   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
642   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
643
644 Optional Packages:
645   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
646   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
647
648   --disable-echo          display "compiling" commands
649   --enable-warnings       test: turn on gcc compiler warnings
650   --with-dmalloc          test: use Gray Watson's dmalloc library
651   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
652   --with-valgrind         test: use valgrind
653   --disable-leaks         test: free permanent memory, analyze leaks
654   --disable-widec           disable checks for wide-character functions
655   --with-curses-dir=DIR   directory in which (n)curses is installed
656   --with-ncursesw         use wide ncurses-libraries (installed)
657   --with-ncurses          use ncurses-libraries (installed)
658   --with-pdcurses         compile/link with pdcurses X11 library
659   --with-curses-colr      compile/link with HPUX 10.x color-curses
660   --with-curses-5lib      compile/link with SunOS 5lib curses
661   --with-Xaw3d            link with Xaw 3d library
662   --with-neXtaw           link with neXT Athena library
663   --with-XawPlus          link with Athena-Plus library
664   --with-pkg-config{=path} enable/disable use of pkg-config
665   --with-x                use the X Window System
666   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
667   --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         ;;
2927 freebsd*|dragonfly*) #(vi
2928         # 5.x headers associate
2929         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2930         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2931         cf_POSIX_C_SOURCE=200112L
2932         cf_XOPEN_SOURCE=600
2933         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2934         ;;
2935 hpux11*) #(vi
2936         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2937         ;;
2938 hpux*) #(vi
2939         cf_xopen_source="-D_HPUX_SOURCE"
2940         ;;
2941 irix[56].*) #(vi
2942         cf_xopen_source="-D_SGI_SOURCE"
2943         ;;
2944 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2945
2946 echo "$as_me:2946: checking if we must define _GNU_SOURCE" >&5
2947 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2948 if test "${cf_cv_gnu_source+set}" = set; then
2949   echo $ECHO_N "(cached) $ECHO_C" >&6
2950 else
2951
2952 cat >conftest.$ac_ext <<_ACEOF
2953 #line 2953 "configure"
2954 #include "confdefs.h"
2955 #include <sys/types.h>
2956 int
2957 main ()
2958 {
2959
2960 #ifndef _XOPEN_SOURCE
2961 make an error
2962 #endif
2963   ;
2964   return 0;
2965 }
2966 _ACEOF
2967 rm -f conftest.$ac_objext
2968 if { (eval echo "$as_me:2968: \"$ac_compile\"") >&5
2969   (eval $ac_compile) 2>&5
2970   ac_status=$?
2971   echo "$as_me:2971: \$? = $ac_status" >&5
2972   (exit $ac_status); } &&
2973          { ac_try='test -s conftest.$ac_objext'
2974   { (eval echo "$as_me:2974: \"$ac_try\"") >&5
2975   (eval $ac_try) 2>&5
2976   ac_status=$?
2977   echo "$as_me:2977: \$? = $ac_status" >&5
2978   (exit $ac_status); }; }; then
2979   cf_cv_gnu_source=no
2980 else
2981   echo "$as_me: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
2983 cf_save="$CPPFLAGS"
2984          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2985          cat >conftest.$ac_ext <<_ACEOF
2986 #line 2986 "configure"
2987 #include "confdefs.h"
2988 #include <sys/types.h>
2989 int
2990 main ()
2991 {
2992
2993 #ifdef _XOPEN_SOURCE
2994 make an error
2995 #endif
2996   ;
2997   return 0;
2998 }
2999 _ACEOF
3000 rm -f conftest.$ac_objext
3001 if { (eval echo "$as_me:3001: \"$ac_compile\"") >&5
3002   (eval $ac_compile) 2>&5
3003   ac_status=$?
3004   echo "$as_me:3004: \$? = $ac_status" >&5
3005   (exit $ac_status); } &&
3006          { ac_try='test -s conftest.$ac_objext'
3007   { (eval echo "$as_me:3007: \"$ac_try\"") >&5
3008   (eval $ac_try) 2>&5
3009   ac_status=$?
3010   echo "$as_me:3010: \$? = $ac_status" >&5
3011   (exit $ac_status); }; }; then
3012   cf_cv_gnu_source=no
3013 else
3014   echo "$as_me: failed program was:" >&5
3015 cat conftest.$ac_ext >&5
3016 cf_cv_gnu_source=yes
3017 fi
3018 rm -f conftest.$ac_objext conftest.$ac_ext
3019         CPPFLAGS="$cf_save"
3020
3021 fi
3022 rm -f conftest.$ac_objext conftest.$ac_ext
3023
3024 fi
3025 echo "$as_me:3025: result: $cf_cv_gnu_source" >&5
3026 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3027 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3028
3029         ;;
3030 mirbsd*) #(vi
3031         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3032         cf_XOPEN_SOURCE=
3033
3034 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3035
3036 cf_save_CFLAGS="$CFLAGS"
3037 cf_save_CPPFLAGS="$CPPFLAGS"
3038
3039 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3040         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3041                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3042
3043 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3044         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3045                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3046
3047 echo "$as_me:3047: checking if we should define _POSIX_C_SOURCE" >&5
3048 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3049 if test "${cf_cv_posix_c_source+set}" = set; then
3050   echo $ECHO_N "(cached) $ECHO_C" >&6
3051 else
3052
3053 echo "${as_me:-configure}:3053: testing if the symbol is already defined go no further ..." 1>&5
3054
3055         cat >conftest.$ac_ext <<_ACEOF
3056 #line 3056 "configure"
3057 #include "confdefs.h"
3058 #include <sys/types.h>
3059 int
3060 main ()
3061 {
3062
3063 #ifndef _POSIX_C_SOURCE
3064 make an error
3065 #endif
3066   ;
3067   return 0;
3068 }
3069 _ACEOF
3070 rm -f conftest.$ac_objext
3071 if { (eval echo "$as_me:3071: \"$ac_compile\"") >&5
3072   (eval $ac_compile) 2>&5
3073   ac_status=$?
3074   echo "$as_me:3074: \$? = $ac_status" >&5
3075   (exit $ac_status); } &&
3076          { ac_try='test -s conftest.$ac_objext'
3077   { (eval echo "$as_me:3077: \"$ac_try\"") >&5
3078   (eval $ac_try) 2>&5
3079   ac_status=$?
3080   echo "$as_me:3080: \$? = $ac_status" >&5
3081   (exit $ac_status); }; }; then
3082   cf_cv_posix_c_source=no
3083 else
3084   echo "$as_me: failed program was:" >&5
3085 cat conftest.$ac_ext >&5
3086 cf_want_posix_source=no
3087          case .$cf_POSIX_C_SOURCE in #(vi
3088          .[12]??*) #(vi
3089                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3090                 ;;
3091          .2) #(vi
3092                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3093                 cf_want_posix_source=yes
3094                 ;;
3095          .*)
3096                 cf_want_posix_source=yes
3097                 ;;
3098          esac
3099          if test "$cf_want_posix_source" = yes ; then
3100                 cat >conftest.$ac_ext <<_ACEOF
3101 #line 3101 "configure"
3102 #include "confdefs.h"
3103 #include <sys/types.h>
3104 int
3105 main ()
3106 {
3107
3108 #ifdef _POSIX_SOURCE
3109 make an error
3110 #endif
3111   ;
3112   return 0;
3113 }
3114 _ACEOF
3115 rm -f conftest.$ac_objext
3116 if { (eval echo "$as_me:3116: \"$ac_compile\"") >&5
3117   (eval $ac_compile) 2>&5
3118   ac_status=$?
3119   echo "$as_me:3119: \$? = $ac_status" >&5
3120   (exit $ac_status); } &&
3121          { ac_try='test -s conftest.$ac_objext'
3122   { (eval echo "$as_me:3122: \"$ac_try\"") >&5
3123   (eval $ac_try) 2>&5
3124   ac_status=$?
3125   echo "$as_me:3125: \$? = $ac_status" >&5
3126   (exit $ac_status); }; }; then
3127   :
3128 else
3129   echo "$as_me: failed program was:" >&5
3130 cat conftest.$ac_ext >&5
3131 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3132 fi
3133 rm -f conftest.$ac_objext conftest.$ac_ext
3134          fi
3135
3136 echo "${as_me:-configure}:3136: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3137
3138          CFLAGS="$cf_trim_CFLAGS"
3139          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3140
3141 echo "${as_me:-configure}:3141: testing if the second compile does not leave our definition intact error ..." 1>&5
3142
3143          cat >conftest.$ac_ext <<_ACEOF
3144 #line 3144 "configure"
3145 #include "confdefs.h"
3146 #include <sys/types.h>
3147 int
3148 main ()
3149 {
3150
3151 #ifndef _POSIX_C_SOURCE
3152 make an error
3153 #endif
3154   ;
3155   return 0;
3156 }
3157 _ACEOF
3158 rm -f conftest.$ac_objext
3159 if { (eval echo "$as_me:3159: \"$ac_compile\"") >&5
3160   (eval $ac_compile) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); } &&
3164          { ac_try='test -s conftest.$ac_objext'
3165   { (eval echo "$as_me:3165: \"$ac_try\"") >&5
3166   (eval $ac_try) 2>&5
3167   ac_status=$?
3168   echo "$as_me:3168: \$? = $ac_status" >&5
3169   (exit $ac_status); }; }; then
3170   :
3171 else
3172   echo "$as_me: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 cf_cv_posix_c_source=no
3175 fi
3176 rm -f conftest.$ac_objext conftest.$ac_ext
3177          CFLAGS="$cf_save_CFLAGS"
3178          CPPFLAGS="$cf_save_CPPFLAGS"
3179
3180 fi
3181 rm -f conftest.$ac_objext conftest.$ac_ext
3182
3183 fi
3184 echo "$as_me:3184: result: $cf_cv_posix_c_source" >&5
3185 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3186
3187 if test "$cf_cv_posix_c_source" != no ; then
3188         CFLAGS="$cf_trim_CFLAGS"
3189         CPPFLAGS="$cf_trim_CPPFLAGS"
3190
3191 cf_fix_cppflags=no
3192 cf_new_cflags=
3193 cf_new_cppflags=
3194 cf_new_extra_cppflags=
3195
3196 for cf_add_cflags in $cf_cv_posix_c_source
3197 do
3198 case $cf_fix_cppflags in
3199 no)
3200         case $cf_add_cflags in #(vi
3201         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3202                 case $cf_add_cflags in
3203                 -D*)
3204                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3205
3206                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3207                                 && test -z "${cf_tst_cflags}" \
3208                                 && cf_fix_cppflags=yes
3209
3210                         if test $cf_fix_cppflags = yes ; then
3211                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3212                                 continue
3213                         elif test "${cf_tst_cflags}" = "\"'" ; then
3214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3215                                 continue
3216                         fi
3217                         ;;
3218                 esac
3219                 case "$CPPFLAGS" in
3220                 *$cf_add_cflags) #(vi
3221                         ;;
3222                 *) #(vi
3223                         case $cf_add_cflags in #(vi
3224                         -D*)
3225                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3226
3227 CPPFLAGS=`echo "$CPPFLAGS" | \
3228         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3229                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3230
3231                                 ;;
3232                         esac
3233                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3234                         ;;
3235                 esac
3236                 ;;
3237         *)
3238                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3239                 ;;
3240         esac
3241         ;;
3242 yes)
3243         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3244
3245         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3246
3247         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3248                 && test -z "${cf_tst_cflags}" \
3249                 && cf_fix_cppflags=no
3250         ;;
3251 esac
3252 done
3253
3254 if test -n "$cf_new_cflags" ; then
3255
3256         CFLAGS="$CFLAGS $cf_new_cflags"
3257 fi
3258
3259 if test -n "$cf_new_cppflags" ; then
3260
3261         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3262 fi
3263
3264 if test -n "$cf_new_extra_cppflags" ; then
3265
3266         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3267 fi
3268
3269 fi
3270
3271         ;;
3272 netbsd*) #(vi
3273         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3274         ;;
3275 openbsd[4-9]*) #(vi
3276         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3277         cf_XOPEN_SOURCE=600
3278         ;;
3279 openbsd*) #(vi
3280         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3281         ;;
3282 osf[45]*) #(vi
3283         cf_xopen_source="-D_OSF_SOURCE"
3284         ;;
3285 nto-qnx*) #(vi
3286         cf_xopen_source="-D_QNX_SOURCE"
3287         ;;
3288 sco*) #(vi
3289         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3290         ;;
3291 solaris2.*) #(vi
3292         cf_xopen_source="-D__EXTENSIONS__"
3293         ;;
3294 *)
3295
3296 echo "$as_me:3296: checking if we should define _XOPEN_SOURCE" >&5
3297 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3298 if test "${cf_cv_xopen_source+set}" = set; then
3299   echo $ECHO_N "(cached) $ECHO_C" >&6
3300 else
3301
3302         cat >conftest.$ac_ext <<_ACEOF
3303 #line 3303 "configure"
3304 #include "confdefs.h"
3305
3306 #include <stdlib.h>
3307 #include <string.h>
3308 #include <sys/types.h>
3309
3310 int
3311 main ()
3312 {
3313
3314 #ifndef _XOPEN_SOURCE
3315 make an error
3316 #endif
3317   ;
3318   return 0;
3319 }
3320 _ACEOF
3321 rm -f conftest.$ac_objext
3322 if { (eval echo "$as_me:3322: \"$ac_compile\"") >&5
3323   (eval $ac_compile) 2>&5
3324   ac_status=$?
3325   echo "$as_me:3325: \$? = $ac_status" >&5
3326   (exit $ac_status); } &&
3327          { ac_try='test -s conftest.$ac_objext'
3328   { (eval echo "$as_me:3328: \"$ac_try\"") >&5
3329   (eval $ac_try) 2>&5
3330   ac_status=$?
3331   echo "$as_me:3331: \$? = $ac_status" >&5
3332   (exit $ac_status); }; }; then
3333   cf_cv_xopen_source=no
3334 else
3335   echo "$as_me: failed program was:" >&5
3336 cat conftest.$ac_ext >&5
3337 cf_save="$CPPFLAGS"
3338          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3339          cat >conftest.$ac_ext <<_ACEOF
3340 #line 3340 "configure"
3341 #include "confdefs.h"
3342
3343 #include <stdlib.h>
3344 #include <string.h>
3345 #include <sys/types.h>
3346
3347 int
3348 main ()
3349 {
3350
3351 #ifdef _XOPEN_SOURCE
3352 make an error
3353 #endif
3354   ;
3355   return 0;
3356 }
3357 _ACEOF
3358 rm -f conftest.$ac_objext
3359 if { (eval echo "$as_me:3359: \"$ac_compile\"") >&5
3360   (eval $ac_compile) 2>&5
3361   ac_status=$?
3362   echo "$as_me:3362: \$? = $ac_status" >&5
3363   (exit $ac_status); } &&
3364          { ac_try='test -s conftest.$ac_objext'
3365   { (eval echo "$as_me:3365: \"$ac_try\"") >&5
3366   (eval $ac_try) 2>&5
3367   ac_status=$?
3368   echo "$as_me:3368: \$? = $ac_status" >&5
3369   (exit $ac_status); }; }; then
3370   cf_cv_xopen_source=no
3371 else
3372   echo "$as_me: failed program was:" >&5
3373 cat conftest.$ac_ext >&5
3374 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3375 fi
3376 rm -f conftest.$ac_objext conftest.$ac_ext
3377         CPPFLAGS="$cf_save"
3378
3379 fi
3380 rm -f conftest.$ac_objext conftest.$ac_ext
3381
3382 fi
3383 echo "$as_me:3383: result: $cf_cv_xopen_source" >&5
3384 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3385
3386 if test "$cf_cv_xopen_source" != no ; then
3387
3388 CFLAGS=`echo "$CFLAGS" | \
3389         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3390                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3391
3392 CPPFLAGS=`echo "$CPPFLAGS" | \
3393         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3394                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3395
3396         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3397
3398 cf_fix_cppflags=no
3399 cf_new_cflags=
3400 cf_new_cppflags=
3401 cf_new_extra_cppflags=
3402
3403 for cf_add_cflags in $cf_temp_xopen_source
3404 do
3405 case $cf_fix_cppflags in
3406 no)
3407         case $cf_add_cflags in #(vi
3408         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3409                 case $cf_add_cflags in
3410                 -D*)
3411                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3412
3413                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3414                                 && test -z "${cf_tst_cflags}" \
3415                                 && cf_fix_cppflags=yes
3416
3417                         if test $cf_fix_cppflags = yes ; then
3418                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3419                                 continue
3420                         elif test "${cf_tst_cflags}" = "\"'" ; then
3421                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3422                                 continue
3423                         fi
3424                         ;;
3425                 esac
3426                 case "$CPPFLAGS" in
3427                 *$cf_add_cflags) #(vi
3428                         ;;
3429                 *) #(vi
3430                         case $cf_add_cflags in #(vi
3431                         -D*)
3432                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3433
3434 CPPFLAGS=`echo "$CPPFLAGS" | \
3435         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3436                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3437
3438                                 ;;
3439                         esac
3440                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3441                         ;;
3442                 esac
3443                 ;;
3444         *)
3445                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3446                 ;;
3447         esac
3448         ;;
3449 yes)
3450         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3451
3452         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3453
3454         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3455                 && test -z "${cf_tst_cflags}" \
3456                 && cf_fix_cppflags=no
3457         ;;
3458 esac
3459 done
3460
3461 if test -n "$cf_new_cflags" ; then
3462
3463         CFLAGS="$CFLAGS $cf_new_cflags"
3464 fi
3465
3466 if test -n "$cf_new_cppflags" ; then
3467
3468         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3469 fi
3470
3471 if test -n "$cf_new_extra_cppflags" ; then
3472
3473         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3474 fi
3475
3476 fi
3477
3478 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3479
3480 cf_save_CFLAGS="$CFLAGS"
3481 cf_save_CPPFLAGS="$CPPFLAGS"
3482
3483 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3484         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3485                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3486
3487 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3488         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3489                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3490
3491 echo "$as_me:3491: checking if we should define _POSIX_C_SOURCE" >&5
3492 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3493 if test "${cf_cv_posix_c_source+set}" = set; then
3494   echo $ECHO_N "(cached) $ECHO_C" >&6
3495 else
3496
3497 echo "${as_me:-configure}:3497: testing if the symbol is already defined go no further ..." 1>&5
3498
3499         cat >conftest.$ac_ext <<_ACEOF
3500 #line 3500 "configure"
3501 #include "confdefs.h"
3502 #include <sys/types.h>
3503 int
3504 main ()
3505 {
3506
3507 #ifndef _POSIX_C_SOURCE
3508 make an error
3509 #endif
3510   ;
3511   return 0;
3512 }
3513 _ACEOF
3514 rm -f conftest.$ac_objext
3515 if { (eval echo "$as_me:3515: \"$ac_compile\"") >&5
3516   (eval $ac_compile) 2>&5
3517   ac_status=$?
3518   echo "$as_me:3518: \$? = $ac_status" >&5
3519   (exit $ac_status); } &&
3520          { ac_try='test -s conftest.$ac_objext'
3521   { (eval echo "$as_me:3521: \"$ac_try\"") >&5
3522   (eval $ac_try) 2>&5
3523   ac_status=$?
3524   echo "$as_me:3524: \$? = $ac_status" >&5
3525   (exit $ac_status); }; }; then
3526   cf_cv_posix_c_source=no
3527 else
3528   echo "$as_me: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
3530 cf_want_posix_source=no
3531          case .$cf_POSIX_C_SOURCE in #(vi
3532          .[12]??*) #(vi
3533                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3534                 ;;
3535          .2) #(vi
3536                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3537                 cf_want_posix_source=yes
3538                 ;;
3539          .*)
3540                 cf_want_posix_source=yes
3541                 ;;
3542          esac
3543          if test "$cf_want_posix_source" = yes ; then
3544                 cat >conftest.$ac_ext <<_ACEOF
3545 #line 3545 "configure"
3546 #include "confdefs.h"
3547 #include <sys/types.h>
3548 int
3549 main ()
3550 {
3551
3552 #ifdef _POSIX_SOURCE
3553 make an error
3554 #endif
3555   ;
3556   return 0;
3557 }
3558 _ACEOF
3559 rm -f conftest.$ac_objext
3560 if { (eval echo "$as_me:3560: \"$ac_compile\"") >&5
3561   (eval $ac_compile) 2>&5
3562   ac_status=$?
3563   echo "$as_me:3563: \$? = $ac_status" >&5
3564   (exit $ac_status); } &&
3565          { ac_try='test -s conftest.$ac_objext'
3566   { (eval echo "$as_me:3566: \"$ac_try\"") >&5
3567   (eval $ac_try) 2>&5
3568   ac_status=$?
3569   echo "$as_me:3569: \$? = $ac_status" >&5
3570   (exit $ac_status); }; }; then
3571   :
3572 else
3573   echo "$as_me: failed program was:" >&5
3574 cat conftest.$ac_ext >&5
3575 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3576 fi
3577 rm -f conftest.$ac_objext conftest.$ac_ext
3578          fi
3579
3580 echo "${as_me:-configure}:3580: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3581
3582          CFLAGS="$cf_trim_CFLAGS"
3583          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3584
3585 echo "${as_me:-configure}:3585: testing if the second compile does not leave our definition intact error ..." 1>&5
3586
3587          cat >conftest.$ac_ext <<_ACEOF
3588 #line 3588 "configure"
3589 #include "confdefs.h"
3590 #include <sys/types.h>
3591 int
3592 main ()
3593 {
3594
3595 #ifndef _POSIX_C_SOURCE
3596 make an error
3597 #endif
3598   ;
3599   return 0;
3600 }
3601 _ACEOF
3602 rm -f conftest.$ac_objext
3603 if { (eval echo "$as_me:3603: \"$ac_compile\"") >&5
3604   (eval $ac_compile) 2>&5
3605   ac_status=$?
3606   echo "$as_me:3606: \$? = $ac_status" >&5
3607   (exit $ac_status); } &&
3608          { ac_try='test -s conftest.$ac_objext'
3609   { (eval echo "$as_me:3609: \"$ac_try\"") >&5
3610   (eval $ac_try) 2>&5
3611   ac_status=$?
3612   echo "$as_me:3612: \$? = $ac_status" >&5
3613   (exit $ac_status); }; }; then
3614   :
3615 else
3616   echo "$as_me: failed program was:" >&5
3617 cat conftest.$ac_ext >&5
3618 cf_cv_posix_c_source=no
3619 fi
3620 rm -f conftest.$ac_objext conftest.$ac_ext
3621          CFLAGS="$cf_save_CFLAGS"
3622          CPPFLAGS="$cf_save_CPPFLAGS"
3623
3624 fi
3625 rm -f conftest.$ac_objext conftest.$ac_ext
3626
3627 fi
3628 echo "$as_me:3628: result: $cf_cv_posix_c_source" >&5
3629 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3630
3631 if test "$cf_cv_posix_c_source" != no ; then
3632         CFLAGS="$cf_trim_CFLAGS"
3633         CPPFLAGS="$cf_trim_CPPFLAGS"
3634
3635 cf_fix_cppflags=no
3636 cf_new_cflags=
3637 cf_new_cppflags=
3638 cf_new_extra_cppflags=
3639
3640 for cf_add_cflags in $cf_cv_posix_c_source
3641 do
3642 case $cf_fix_cppflags in
3643 no)
3644         case $cf_add_cflags in #(vi
3645         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3646                 case $cf_add_cflags in
3647                 -D*)
3648                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3649
3650                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3651                                 && test -z "${cf_tst_cflags}" \
3652                                 && cf_fix_cppflags=yes
3653
3654                         if test $cf_fix_cppflags = yes ; then
3655                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3656                                 continue
3657                         elif test "${cf_tst_cflags}" = "\"'" ; then
3658                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3659                                 continue
3660                         fi
3661                         ;;
3662                 esac
3663                 case "$CPPFLAGS" in
3664                 *$cf_add_cflags) #(vi
3665                         ;;
3666                 *) #(vi
3667                         case $cf_add_cflags in #(vi
3668                         -D*)
3669                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3670
3671 CPPFLAGS=`echo "$CPPFLAGS" | \
3672         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3673                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3674
3675                                 ;;
3676                         esac
3677                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3678                         ;;
3679                 esac
3680                 ;;
3681         *)
3682                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3683                 ;;
3684         esac
3685         ;;
3686 yes)
3687         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3688
3689         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3690
3691         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3692                 && test -z "${cf_tst_cflags}" \
3693                 && cf_fix_cppflags=no
3694         ;;
3695 esac
3696 done
3697
3698 if test -n "$cf_new_cflags" ; then
3699
3700         CFLAGS="$CFLAGS $cf_new_cflags"
3701 fi
3702
3703 if test -n "$cf_new_cppflags" ; then
3704
3705         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3706 fi
3707
3708 if test -n "$cf_new_extra_cppflags" ; then
3709
3710         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3711 fi
3712
3713 fi
3714
3715         ;;
3716 esac
3717
3718 if test -n "$cf_xopen_source" ; then
3719
3720 cf_fix_cppflags=no
3721 cf_new_cflags=
3722 cf_new_cppflags=
3723 cf_new_extra_cppflags=
3724
3725 for cf_add_cflags in $cf_xopen_source
3726 do
3727 case $cf_fix_cppflags in
3728 no)
3729         case $cf_add_cflags in #(vi
3730         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3731                 case $cf_add_cflags in
3732                 -D*)
3733                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3734
3735                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3736                                 && test -z "${cf_tst_cflags}" \
3737                                 && cf_fix_cppflags=yes
3738
3739                         if test $cf_fix_cppflags = yes ; then
3740                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3741                                 continue
3742                         elif test "${cf_tst_cflags}" = "\"'" ; then
3743                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3744                                 continue
3745                         fi
3746                         ;;
3747                 esac
3748                 case "$CPPFLAGS" in
3749                 *$cf_add_cflags) #(vi
3750                         ;;
3751                 *) #(vi
3752                         case $cf_add_cflags in #(vi
3753                         -D*)
3754                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3755
3756 CPPFLAGS=`echo "$CPPFLAGS" | \
3757         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3758                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3759
3760                                 ;;
3761                         esac
3762                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3763                         ;;
3764                 esac
3765                 ;;
3766         *)
3767                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3768                 ;;
3769         esac
3770         ;;
3771 yes)
3772         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3773
3774         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3775
3776         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3777                 && test -z "${cf_tst_cflags}" \
3778                 && cf_fix_cppflags=no
3779         ;;
3780 esac
3781 done
3782
3783 if test -n "$cf_new_cflags" ; then
3784
3785         CFLAGS="$CFLAGS $cf_new_cflags"
3786 fi
3787
3788 if test -n "$cf_new_cppflags" ; then
3789
3790         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3791 fi
3792
3793 if test -n "$cf_new_extra_cppflags" ; then
3794
3795         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3796 fi
3797
3798 fi
3799
3800 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3801         echo "$as_me:3801: checking if _XOPEN_SOURCE really is set" >&5
3802 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3803         cat >conftest.$ac_ext <<_ACEOF
3804 #line 3804 "configure"
3805 #include "confdefs.h"
3806 #include <stdlib.h>
3807 int
3808 main ()
3809 {
3810
3811 #ifndef _XOPEN_SOURCE
3812 make an error
3813 #endif
3814   ;
3815   return 0;
3816 }
3817 _ACEOF
3818 rm -f conftest.$ac_objext
3819 if { (eval echo "$as_me:3819: \"$ac_compile\"") >&5
3820   (eval $ac_compile) 2>&5
3821   ac_status=$?
3822   echo "$as_me:3822: \$? = $ac_status" >&5
3823   (exit $ac_status); } &&
3824          { ac_try='test -s conftest.$ac_objext'
3825   { (eval echo "$as_me:3825: \"$ac_try\"") >&5
3826   (eval $ac_try) 2>&5
3827   ac_status=$?
3828   echo "$as_me:3828: \$? = $ac_status" >&5
3829   (exit $ac_status); }; }; then
3830   cf_XOPEN_SOURCE_set=yes
3831 else
3832   echo "$as_me: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3834 cf_XOPEN_SOURCE_set=no
3835 fi
3836 rm -f conftest.$ac_objext conftest.$ac_ext
3837         echo "$as_me:3837: result: $cf_XOPEN_SOURCE_set" >&5
3838 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3839         if test $cf_XOPEN_SOURCE_set = yes
3840         then
3841                 cat >conftest.$ac_ext <<_ACEOF
3842 #line 3842 "configure"
3843 #include "confdefs.h"
3844 #include <stdlib.h>
3845 int
3846 main ()
3847 {
3848
3849 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3850 make an error
3851 #endif
3852   ;
3853   return 0;
3854 }
3855 _ACEOF
3856 rm -f conftest.$ac_objext
3857 if { (eval echo "$as_me:3857: \"$ac_compile\"") >&5
3858   (eval $ac_compile) 2>&5
3859   ac_status=$?
3860   echo "$as_me:3860: \$? = $ac_status" >&5
3861   (exit $ac_status); } &&
3862          { ac_try='test -s conftest.$ac_objext'
3863   { (eval echo "$as_me:3863: \"$ac_try\"") >&5
3864   (eval $ac_try) 2>&5
3865   ac_status=$?
3866   echo "$as_me:3866: \$? = $ac_status" >&5
3867   (exit $ac_status); }; }; then
3868   cf_XOPEN_SOURCE_set_ok=yes
3869 else
3870   echo "$as_me: failed program was:" >&5
3871 cat conftest.$ac_ext >&5
3872 cf_XOPEN_SOURCE_set_ok=no
3873 fi
3874 rm -f conftest.$ac_objext conftest.$ac_ext
3875                 if test $cf_XOPEN_SOURCE_set_ok = no
3876                 then
3877                         { echo "$as_me:3877: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3878 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3879                 fi
3880         else
3881
3882 echo "$as_me:3882: checking if we should define _XOPEN_SOURCE" >&5
3883 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3884 if test "${cf_cv_xopen_source+set}" = set; then
3885   echo $ECHO_N "(cached) $ECHO_C" >&6
3886 else
3887
3888         cat >conftest.$ac_ext <<_ACEOF
3889 #line 3889 "configure"
3890 #include "confdefs.h"
3891
3892 #include <stdlib.h>
3893 #include <string.h>
3894 #include <sys/types.h>
3895
3896 int
3897 main ()
3898 {
3899
3900 #ifndef _XOPEN_SOURCE
3901 make an error
3902 #endif
3903   ;
3904   return 0;
3905 }
3906 _ACEOF
3907 rm -f conftest.$ac_objext
3908 if { (eval echo "$as_me:3908: \"$ac_compile\"") >&5
3909   (eval $ac_compile) 2>&5
3910   ac_status=$?
3911   echo "$as_me:3911: \$? = $ac_status" >&5
3912   (exit $ac_status); } &&
3913          { ac_try='test -s conftest.$ac_objext'
3914   { (eval echo "$as_me:3914: \"$ac_try\"") >&5
3915   (eval $ac_try) 2>&5
3916   ac_status=$?
3917   echo "$as_me:3917: \$? = $ac_status" >&5
3918   (exit $ac_status); }; }; then
3919   cf_cv_xopen_source=no
3920 else
3921   echo "$as_me: failed program was:" >&5
3922 cat conftest.$ac_ext >&5
3923 cf_save="$CPPFLAGS"
3924          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3925          cat >conftest.$ac_ext <<_ACEOF
3926 #line 3926 "configure"
3927 #include "confdefs.h"
3928
3929 #include <stdlib.h>
3930 #include <string.h>
3931 #include <sys/types.h>
3932
3933 int
3934 main ()
3935 {
3936
3937 #ifdef _XOPEN_SOURCE
3938 make an error
3939 #endif
3940   ;
3941   return 0;
3942 }
3943 _ACEOF
3944 rm -f conftest.$ac_objext
3945 if { (eval echo "$as_me:3945: \"$ac_compile\"") >&5
3946   (eval $ac_compile) 2>&5
3947   ac_status=$?
3948   echo "$as_me:3948: \$? = $ac_status" >&5
3949   (exit $ac_status); } &&
3950          { ac_try='test -s conftest.$ac_objext'
3951   { (eval echo "$as_me:3951: \"$ac_try\"") >&5
3952   (eval $ac_try) 2>&5
3953   ac_status=$?
3954   echo "$as_me:3954: \$? = $ac_status" >&5
3955   (exit $ac_status); }; }; then
3956   cf_cv_xopen_source=no
3957 else
3958   echo "$as_me: failed program was:" >&5
3959 cat conftest.$ac_ext >&5
3960 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3961 fi
3962 rm -f conftest.$ac_objext conftest.$ac_ext
3963         CPPFLAGS="$cf_save"
3964
3965 fi
3966 rm -f conftest.$ac_objext conftest.$ac_ext
3967
3968 fi
3969 echo "$as_me:3969: result: $cf_cv_xopen_source" >&5
3970 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3971
3972 if test "$cf_cv_xopen_source" != no ; then
3973
3974 CFLAGS=`echo "$CFLAGS" | \
3975         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3976                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3977
3978 CPPFLAGS=`echo "$CPPFLAGS" | \
3979         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3980                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3981
3982         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3983
3984 cf_fix_cppflags=no
3985 cf_new_cflags=
3986 cf_new_cppflags=
3987 cf_new_extra_cppflags=
3988
3989 for cf_add_cflags in $cf_temp_xopen_source
3990 do
3991 case $cf_fix_cppflags in
3992 no)
3993         case $cf_add_cflags in #(vi
3994         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3995                 case $cf_add_cflags in
3996                 -D*)
3997                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3998
3999                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4000                                 && test -z "${cf_tst_cflags}" \
4001                                 && cf_fix_cppflags=yes
4002
4003                         if test $cf_fix_cppflags = yes ; then
4004                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4005                                 continue
4006                         elif test "${cf_tst_cflags}" = "\"'" ; then
4007                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4008                                 continue
4009                         fi
4010                         ;;
4011                 esac
4012                 case "$CPPFLAGS" in
4013                 *$cf_add_cflags) #(vi
4014                         ;;
4015                 *) #(vi
4016                         case $cf_add_cflags in #(vi
4017                         -D*)
4018                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4019
4020 CPPFLAGS=`echo "$CPPFLAGS" | \
4021         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4022                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4023
4024                                 ;;
4025                         esac
4026                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4027                         ;;
4028                 esac
4029                 ;;
4030         *)
4031                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4032                 ;;
4033         esac
4034         ;;
4035 yes)
4036         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4037
4038         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4039
4040         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4041                 && test -z "${cf_tst_cflags}" \
4042                 && cf_fix_cppflags=no
4043         ;;
4044 esac
4045 done
4046
4047 if test -n "$cf_new_cflags" ; then
4048
4049         CFLAGS="$CFLAGS $cf_new_cflags"
4050 fi
4051
4052 if test -n "$cf_new_cppflags" ; then
4053
4054         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4055 fi
4056
4057 if test -n "$cf_new_extra_cppflags" ; then
4058
4059         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4060 fi
4061
4062 fi
4063
4064         fi
4065 fi
4066
4067 echo "$as_me:4067: checking for $CC option to accept ANSI C" >&5
4068 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4069 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4070   echo $ECHO_N "(cached) $ECHO_C" >&6
4071 else
4072   ac_cv_prog_cc_stdc=no
4073 ac_save_CC=$CC
4074 cat >conftest.$ac_ext <<_ACEOF
4075 #line 4075 "configure"
4076 #include "confdefs.h"
4077 #include <stdarg.h>
4078 #include <stdio.h>
4079 #include <sys/types.h>
4080 #include <sys/stat.h>
4081 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4082 struct buf { int x; };
4083 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4084 static char *e (p, i)
4085      char **p;
4086      int i;
4087 {
4088   return p[i];
4089 }
4090 static char *f (char * (*g) (char **, int), char **p, ...)
4091 {
4092   char *s;
4093   va_list v;
4094   va_start (v,p);
4095   s = g (p, va_arg (v,int));
4096   va_end (v);
4097   return s;
4098 }
4099 int test (int i, double x);
4100 struct s1 {int (*f) (int a);};
4101 struct s2 {int (*f) (double a);};
4102 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4103 int argc;
4104 char **argv;
4105 int
4106 main ()
4107 {
4108 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4109   ;
4110   return 0;
4111 }
4112 _ACEOF
4113 # Don't try gcc -ansi; that turns off useful extensions and
4114 # breaks some systems' header files.
4115 # AIX                   -qlanglvl=ansi
4116 # Ultrix and OSF/1      -std1
4117 # HP-UX 10.20 and later -Ae
4118 # HP-UX older versions  -Aa -D_HPUX_SOURCE
4119 # SVR4                  -Xc -D__EXTENSIONS__
4120 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4121 do
4122   CC="$ac_save_CC $ac_arg"
4123   rm -f conftest.$ac_objext
4124 if { (eval echo "$as_me:4124: \"$ac_compile\"") >&5
4125   (eval $ac_compile) 2>&5
4126   ac_status=$?
4127   echo "$as_me:4127: \$? = $ac_status" >&5
4128   (exit $ac_status); } &&
4129          { ac_try='test -s conftest.$ac_objext'
4130   { (eval echo "$as_me:4130: \"$ac_try\"") >&5
4131   (eval $ac_try) 2>&5
4132   ac_status=$?
4133   echo "$as_me:4133: \$? = $ac_status" >&5
4134   (exit $ac_status); }; }; then
4135   ac_cv_prog_cc_stdc=$ac_arg
4136 break
4137 else
4138   echo "$as_me: failed program was:" >&5
4139 cat conftest.$ac_ext >&5
4140 fi
4141 rm -f conftest.$ac_objext
4142 done
4143 rm -f conftest.$ac_ext conftest.$ac_objext
4144 CC=$ac_save_CC
4145
4146 fi
4147
4148 case "x$ac_cv_prog_cc_stdc" in
4149   x|xno)
4150     echo "$as_me:4150: result: none needed" >&5
4151 echo "${ECHO_T}none needed" >&6 ;;
4152   *)
4153     echo "$as_me:4153: result: $ac_cv_prog_cc_stdc" >&5
4154 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4155     CC="$CC $ac_cv_prog_cc_stdc" ;;
4156 esac
4157
4158 echo "$as_me:4158: checking for an ANSI C-conforming const" >&5
4159 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4160 if test "${ac_cv_c_const+set}" = set; then
4161   echo $ECHO_N "(cached) $ECHO_C" >&6
4162 else
4163   cat >conftest.$ac_ext <<_ACEOF
4164 #line 4164 "configure"
4165 #include "confdefs.h"
4166
4167 int
4168 main ()
4169 {
4170 /* FIXME: Include the comments suggested by Paul. */
4171 #ifndef __cplusplus
4172   /* Ultrix mips cc rejects this.  */
4173   typedef int charset[2];
4174   const charset x;
4175   /* SunOS 4.1.1 cc rejects this.  */
4176   char const *const *ccp;
4177   char **p;
4178   /* NEC SVR4.0.2 mips cc rejects this.  */
4179   struct point {int x, y;};
4180   static struct point const zero = {0,0};
4181   /* AIX XL C 1.02.0.0 rejects this.
4182      It does not let you subtract one const X* pointer from another in
4183      an arm of an if-expression whose if-part is not a constant
4184      expression */
4185   const char *g = "string";
4186   ccp = &g + (g ? g-g : 0);
4187   /* HPUX 7.0 cc rejects these. */
4188   ++ccp;
4189   p = (char**) ccp;
4190   ccp = (char const *const *) p;
4191   { /* SCO 3.2v4 cc rejects this.  */
4192     char *t;
4193     char const *s = 0 ? (char *) 0 : (char const *) 0;
4194
4195     *t++ = 0;
4196   }
4197   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4198     int x[] = {25, 17};
4199     const int *foo = &x[0];
4200     ++foo;
4201   }
4202   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4203     typedef const int *iptr;
4204     iptr p = 0;
4205     ++p;
4206   }
4207   { /* AIX XL C 1.02.0.0 rejects this saying
4208        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4209     struct s { int j; const int *ap[3]; };
4210     struct s *b; b->j = 5;
4211   }
4212   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4213     const int foo = 10;
4214   }
4215 #endif
4216
4217   ;
4218   return 0;
4219 }
4220 _ACEOF
4221 rm -f conftest.$ac_objext
4222 if { (eval echo "$as_me:4222: \"$ac_compile\"") >&5
4223   (eval $ac_compile) 2>&5
4224   ac_status=$?
4225   echo "$as_me:4225: \$? = $ac_status" >&5
4226   (exit $ac_status); } &&
4227          { ac_try='test -s conftest.$ac_objext'
4228   { (eval echo "$as_me:4228: \"$ac_try\"") >&5
4229   (eval $ac_try) 2>&5
4230   ac_status=$?
4231   echo "$as_me:4231: \$? = $ac_status" >&5
4232   (exit $ac_status); }; }; then
4233   ac_cv_c_const=yes
4234 else
4235   echo "$as_me: failed program was:" >&5
4236 cat conftest.$ac_ext >&5
4237 ac_cv_c_const=no
4238 fi
4239 rm -f conftest.$ac_objext conftest.$ac_ext
4240 fi
4241 echo "$as_me:4241: result: $ac_cv_c_const" >&5
4242 echo "${ECHO_T}$ac_cv_c_const" >&6
4243 if test $ac_cv_c_const = no; then
4244
4245 cat >>confdefs.h <<\EOF
4246 #define const
4247 EOF
4248
4249 fi
4250
4251 echo "$as_me:4251: checking for signal global datatype" >&5
4252 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4253 if test "${cf_cv_sig_atomic_t+set}" = set; then
4254   echo $ECHO_N "(cached) $ECHO_C" >&6
4255 else
4256
4257         for cf_type in \
4258                 "volatile sig_atomic_t" \
4259                 "sig_atomic_t" \
4260                 "int"
4261         do
4262         cat >conftest.$ac_ext <<_ACEOF
4263 #line 4263 "configure"
4264 #include "confdefs.h"
4265
4266 #include <sys/types.h>
4267 #include <signal.h>
4268 #include <stdio.h>
4269
4270 extern $cf_type x;
4271 $cf_type x;
4272 static void handler(int sig)
4273 {
4274         x = 5;
4275 }
4276 int
4277 main ()
4278 {
4279 signal(SIGINT, handler);
4280                  x = 1
4281   ;
4282   return 0;
4283 }
4284 _ACEOF
4285 rm -f conftest.$ac_objext
4286 if { (eval echo "$as_me:4286: \"$ac_compile\"") >&5
4287   (eval $ac_compile) 2>&5
4288   ac_status=$?
4289   echo "$as_me:4289: \$? = $ac_status" >&5
4290   (exit $ac_status); } &&
4291          { ac_try='test -s conftest.$ac_objext'
4292   { (eval echo "$as_me:4292: \"$ac_try\"") >&5
4293   (eval $ac_try) 2>&5
4294   ac_status=$?
4295   echo "$as_me:4295: \$? = $ac_status" >&5
4296   (exit $ac_status); }; }; then
4297   cf_cv_sig_atomic_t=$cf_type
4298 else
4299   echo "$as_me: failed program was:" >&5
4300 cat conftest.$ac_ext >&5
4301 cf_cv_sig_atomic_t=no
4302 fi
4303 rm -f conftest.$ac_objext conftest.$ac_ext
4304                 test "$cf_cv_sig_atomic_t" != no && break
4305         done
4306
4307 fi
4308
4309 echo "$as_me:4309: result: $cf_cv_sig_atomic_t" >&5
4310 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4311 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
4312 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4313 EOF
4314
4315 echo "$as_me:4315: checking if you want to see long compiling messages" >&5
4316 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4317
4318 # Check whether --enable-echo or --disable-echo was given.
4319 if test "${enable_echo+set}" = set; then
4320   enableval="$enable_echo"
4321   test "$enableval" != no && enableval=yes
4322   if test "$enableval" != "yes" ; then
4323
4324     ECHO_LT='--silent'
4325     ECHO_LD='@echo linking $@;'
4326     RULE_CC='@echo compiling $<'
4327     SHOW_CC='@echo compiling $@'
4328     ECHO_CC='@'
4329
4330   else
4331
4332     ECHO_LT=''
4333     ECHO_LD=''
4334     RULE_CC=''
4335     SHOW_CC=''
4336     ECHO_CC=''
4337
4338   fi
4339 else
4340   enableval=yes
4341
4342     ECHO_LT=''
4343     ECHO_LD=''
4344     RULE_CC=''
4345     SHOW_CC=''
4346     ECHO_CC=''
4347
4348 fi;
4349 echo "$as_me:4349: result: $enableval" >&5
4350 echo "${ECHO_T}$enableval" >&6
4351
4352 GCC_VERSION=none
4353 if test "$GCC" = yes ; then
4354         echo "$as_me:4354: checking version of $CC" >&5
4355 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
4356         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
4357         test -z "$GCC_VERSION" && GCC_VERSION=unknown
4358         echo "$as_me:4358: result: $GCC_VERSION" >&5
4359 echo "${ECHO_T}$GCC_VERSION" >&6
4360 fi
4361
4362 if ( test "$GCC" = yes || test "$GXX" = yes )
4363 then
4364 echo "$as_me:4364: checking if you want to turn on gcc warnings" >&5
4365 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
4366
4367 # Check whether --enable-warnings or --disable-warnings was given.
4368 if test "${enable_warnings+set}" = set; then
4369   enableval="$enable_warnings"
4370   test "$enableval" != yes && enableval=no
4371   if test "$enableval" != "no" ; then
4372     with_warnings=yes
4373   else
4374     with_warnings=no
4375   fi
4376 else
4377   enableval=no
4378   with_warnings=no
4379
4380 fi;
4381 echo "$as_me:4381: result: $with_warnings" >&5
4382 echo "${ECHO_T}$with_warnings" >&6
4383 if test "$with_warnings" = "yes"
4384 then
4385
4386 if test "$GCC" = yes
4387 then
4388 cat > conftest.i <<EOF
4389 #ifndef GCC_PRINTF
4390 #define GCC_PRINTF 0
4391 #endif
4392 #ifndef GCC_SCANF
4393 #define GCC_SCANF 0
4394 #endif
4395 #ifndef GCC_NORETURN
4396 #define GCC_NORETURN /* nothing */
4397 #endif
4398 #ifndef GCC_UNUSED
4399 #define GCC_UNUSED /* nothing */
4400 #endif
4401 EOF
4402 if test "$GCC" = yes
4403 then
4404         { echo "$as_me:4404: checking for $CC __attribute__ directives..." >&5
4405 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4407 "${as_me:-configure}"
4408 #include "confdefs.h"
4409 #include "conftest.h"
4410 #include "conftest.i"
4411 #if     GCC_PRINTF
4412 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4413 #else
4414 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4415 #endif
4416 #if     GCC_SCANF
4417 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4418 #else
4419 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
4420 #endif
4421 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4422 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4423 extern void foo(void) GCC_NORETURN;
4424 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4425 EOF
4426         cf_printf_attribute=no
4427         cf_scanf_attribute=no
4428         for cf_attribute in scanf printf unused noreturn
4429         do
4430
4431 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4432
4433                 cf_directive="__attribute__(($cf_attribute))"
4434                 echo "checking for $CC $cf_directive" 1>&5
4435
4436                 case $cf_attribute in #(vi
4437                 printf) #(vi
4438                         cf_printf_attribute=yes
4439                         cat >conftest.h <<EOF
4440 #define GCC_$cf_ATTRIBUTE 1
4441 EOF
4442                         ;;
4443                 scanf) #(vi
4444                         cf_scanf_attribute=yes
4445                         cat >conftest.h <<EOF
4446 #define GCC_$cf_ATTRIBUTE 1
4447 EOF
4448                         ;;
4449                 *) #(vi
4450                         cat >conftest.h <<EOF
4451 #define GCC_$cf_ATTRIBUTE $cf_directive
4452 EOF
4453                         ;;
4454                 esac
4455
4456                 if { (eval echo "$as_me:4456: \"$ac_compile\"") >&5
4457   (eval $ac_compile) 2>&5
4458   ac_status=$?
4459   echo "$as_me:4459: \$? = $ac_status" >&5
4460   (exit $ac_status); }; then
4461                         test -n "$verbose" && echo "$as_me:4461: result: ... $cf_attribute" >&5
4462 echo "${ECHO_T}... $cf_attribute" >&6
4463                         cat conftest.h >>confdefs.h
4464                         case $cf_attribute in #(vi
4465                         printf) #(vi
4466                                 if test "$cf_printf_attribute" = no ; then
4467                                         cat >>confdefs.h <<EOF
4468 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
4469 EOF
4470                                 else
4471                                         cat >>confdefs.h <<EOF
4472 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4473 EOF
4474                                 fi
4475                                 ;;
4476                         scanf) #(vi
4477                                 if test "$cf_scanf_attribute" = no ; then
4478                                         cat >>confdefs.h <<EOF
4479 #define GCC_SCANFLIKE(fmt,var) /* nothing */
4480 EOF
4481                                 else
4482                                         cat >>confdefs.h <<EOF
4483 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
4484 EOF
4485                                 fi
4486                                 ;;
4487                         esac
4488                 fi
4489         done
4490 else
4491         fgrep define conftest.i >>confdefs.h
4492 fi
4493 rm -rf conftest*
4494 fi
4495
4496 INTEL_COMPILER=no
4497
4498 if test "$GCC" = yes ; then
4499         case $host_os in
4500         linux*|gnu*)
4501                 echo "$as_me:4501: checking if this is really Intel C compiler" >&5
4502 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4503                 cf_save_CFLAGS="$CFLAGS"
4504                 CFLAGS="$CFLAGS -no-gcc"
4505                 cat >conftest.$ac_ext <<_ACEOF
4506 #line 4506 "configure"
4507 #include "confdefs.h"
4508
4509 int
4510 main ()
4511 {
4512
4513 #ifdef __INTEL_COMPILER
4514 #else
4515 make an error
4516 #endif
4517
4518   ;
4519   return 0;
4520 }
4521 _ACEOF
4522 rm -f conftest.$ac_objext
4523 if { (eval echo "$as_me:4523: \"$ac_compile\"") >&5
4524   (eval $ac_compile) 2>&5
4525   ac_status=$?
4526   echo "$as_me:4526: \$? = $ac_status" >&5
4527   (exit $ac_status); } &&
4528          { ac_try='test -s conftest.$ac_objext'
4529   { (eval echo "$as_me:4529: \"$ac_try\"") >&5
4530   (eval $ac_try) 2>&5
4531   ac_status=$?
4532   echo "$as_me:4532: \$? = $ac_status" >&5
4533   (exit $ac_status); }; }; then
4534   INTEL_COMPILER=yes
4535 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4536
4537 else
4538   echo "$as_me: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 fi
4541 rm -f conftest.$ac_objext conftest.$ac_ext
4542                 CFLAGS="$cf_save_CFLAGS"
4543                 echo "$as_me:4543: result: $INTEL_COMPILER" >&5
4544 echo "${ECHO_T}$INTEL_COMPILER" >&6
4545                 ;;
4546         esac
4547 fi
4548
4549 cat > conftest.$ac_ext <<EOF
4550 #line 4550 "${as_me:-configure}"
4551 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4552 EOF
4553
4554 if test "$INTEL_COMPILER" = yes
4555 then
4556 # The "-wdXXX" options suppress warnings:
4557 # remark #1419: external declaration in primary source file
4558 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4559 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4560 # remark #193: zero used for undefined preprocessing identifier
4561 # remark #593: variable "curs_sb_left_arrow" was set but never used
4562 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4563 # remark #869: parameter "tw" was never referenced
4564 # remark #981: operands are evaluated in unspecified order
4565 # warning #279: controlling expression is constant
4566
4567         { echo "$as_me:4567: checking for $CC warning options..." >&5
4568 echo "$as_me: checking for $CC warning options..." >&6;}
4569         cf_save_CFLAGS="$CFLAGS"
4570         EXTRA_CFLAGS="-Wall"
4571         for cf_opt in \
4572                 wd1419 \
4573                 wd1683 \
4574                 wd1684 \
4575                 wd193 \
4576                 wd593 \
4577                 wd279 \
4578                 wd810 \
4579                 wd869 \
4580                 wd981
4581         do
4582                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4583                 if { (eval echo "$as_me:4583: \"$ac_compile\"") >&5
4584   (eval $ac_compile) 2>&5
4585   ac_status=$?
4586   echo "$as_me:4586: \$? = $ac_status" >&5
4587   (exit $ac_status); }; then
4588                         test -n "$verbose" && echo "$as_me:4588: result: ... -$cf_opt" >&5
4589 echo "${ECHO_T}... -$cf_opt" >&6
4590                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4591                 fi
4592         done
4593         CFLAGS="$cf_save_CFLAGS"
4594
4595 elif test "$GCC" = yes
4596 then
4597         { echo "$as_me:4597: checking for $CC warning options..." >&5
4598 echo "$as_me: checking for $CC warning options..." >&6;}
4599         cf_save_CFLAGS="$CFLAGS"
4600         EXTRA_CFLAGS=
4601         cf_warn_CONST=""
4602         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4603         for cf_opt in W Wall \
4604                 Wbad-function-cast \
4605                 Wcast-align \
4606                 Wcast-qual \
4607                 Winline \
4608                 Wmissing-declarations \
4609                 Wmissing-prototypes \
4610                 Wnested-externs \
4611                 Wpointer-arith \
4612                 Wshadow \
4613                 Wstrict-prototypes \
4614                 Wundef $cf_warn_CONST
4615         do
4616                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4617                 if { (eval echo "$as_me:4617: \"$ac_compile\"") >&5
4618   (eval $ac_compile) 2>&5
4619   ac_status=$?
4620   echo "$as_me:4620: \$? = $ac_status" >&5
4621   (exit $ac_status); }; then
4622                         test -n "$verbose" && echo "$as_me:4622: result: ... -$cf_opt" >&5
4623 echo "${ECHO_T}... -$cf_opt" >&6
4624                         case $cf_opt in #(vi
4625                         Wcast-qual) #(vi
4626                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4627                                 ;;
4628                         Winline) #(vi
4629                                 case $GCC_VERSION in
4630                                 [34].*)
4631                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
4632
4633 echo "${as_me:-configure}:4633: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4634
4635                                         continue;;
4636                                 esac
4637                                 ;;
4638                         esac
4639                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4640                 fi
4641         done
4642         CFLAGS="$cf_save_CFLAGS"
4643 fi
4644 rm -rf conftest*
4645
4646 fi
4647 fi
4648
4649 echo "$as_me:4649: checking if you want to use dmalloc for testing" >&5
4650 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4651
4652 # Check whether --with-dmalloc or --without-dmalloc was given.
4653 if test "${with_dmalloc+set}" = set; then
4654   withval="$with_dmalloc"
4655   cat >>confdefs.h <<\EOF
4656 #define USE_DMALLOC 1
4657 EOF
4658
4659         : ${with_cflags:=-g}
4660         : ${with_no_leaks:=yes}
4661          with_dmalloc=yes
4662 else
4663   with_dmalloc=
4664 fi;
4665 echo "$as_me:4665: result: ${with_dmalloc:-no}" >&5
4666 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4667
4668 case .$with_cflags in #(vi
4669 .*-g*)
4670         case .$CFLAGS in #(vi
4671         .*-g*) #(vi
4672                 ;;
4673         *)
4674
4675 cf_fix_cppflags=no
4676 cf_new_cflags=
4677 cf_new_cppflags=
4678 cf_new_extra_cppflags=
4679
4680 for cf_add_cflags in -g
4681 do
4682 case $cf_fix_cppflags in
4683 no)
4684         case $cf_add_cflags in #(vi
4685         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4686                 case $cf_add_cflags in
4687                 -D*)
4688                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4689
4690                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4691                                 && test -z "${cf_tst_cflags}" \
4692                                 && cf_fix_cppflags=yes
4693
4694                         if test $cf_fix_cppflags = yes ; then
4695                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4696                                 continue
4697                         elif test "${cf_tst_cflags}" = "\"'" ; then
4698                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4699                                 continue
4700                         fi
4701                         ;;
4702                 esac
4703                 case "$CPPFLAGS" in
4704                 *$cf_add_cflags) #(vi
4705                         ;;
4706                 *) #(vi
4707                         case $cf_add_cflags in #(vi
4708                         -D*)
4709                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4710
4711 CPPFLAGS=`echo "$CPPFLAGS" | \
4712         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4713                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4714
4715                                 ;;
4716                         esac
4717                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4718                         ;;
4719                 esac
4720                 ;;
4721         *)
4722                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4723                 ;;
4724         esac
4725         ;;
4726 yes)
4727         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4728
4729         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4730
4731         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4732                 && test -z "${cf_tst_cflags}" \
4733                 && cf_fix_cppflags=no
4734         ;;
4735 esac
4736 done
4737
4738 if test -n "$cf_new_cflags" ; then
4739
4740         CFLAGS="$CFLAGS $cf_new_cflags"
4741 fi
4742
4743 if test -n "$cf_new_cppflags" ; then
4744
4745         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4746 fi
4747
4748 if test -n "$cf_new_extra_cppflags" ; then
4749
4750         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4751 fi
4752
4753                 ;;
4754         esac
4755         ;;
4756 esac
4757
4758 if test "$with_dmalloc" = yes ; then
4759         echo "$as_me:4759: checking for dmalloc.h" >&5
4760 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4761 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4762   echo $ECHO_N "(cached) $ECHO_C" >&6
4763 else
4764   cat >conftest.$ac_ext <<_ACEOF
4765 #line 4765 "configure"
4766 #include "confdefs.h"
4767 #include <dmalloc.h>
4768 _ACEOF
4769 if { (eval echo "$as_me:4769: \"$ac_cpp conftest.$ac_ext\"") >&5
4770   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4771   ac_status=$?
4772   egrep -v '^ *\+' conftest.er1 >conftest.err
4773   rm -f conftest.er1
4774   cat conftest.err >&5
4775   echo "$as_me:4775: \$? = $ac_status" >&5
4776   (exit $ac_status); } >/dev/null; then
4777   if test -s conftest.err; then
4778     ac_cpp_err=$ac_c_preproc_warn_flag
4779   else
4780     ac_cpp_err=
4781   fi
4782 else
4783   ac_cpp_err=yes
4784 fi
4785 if test -z "$ac_cpp_err"; then
4786   ac_cv_header_dmalloc_h=yes
4787 else
4788   echo "$as_me: failed program was:" >&5
4789   cat conftest.$ac_ext >&5
4790   ac_cv_header_dmalloc_h=no
4791 fi
4792 rm -f conftest.err conftest.$ac_ext
4793 fi
4794 echo "$as_me:4794: result: $ac_cv_header_dmalloc_h" >&5
4795 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4796 if test $ac_cv_header_dmalloc_h = yes; then
4797
4798 echo "$as_me:4798: checking for dmalloc_debug in -ldmalloc" >&5
4799 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4800 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4801   echo $ECHO_N "(cached) $ECHO_C" >&6
4802 else
4803   ac_check_lib_save_LIBS=$LIBS
4804 LIBS="-ldmalloc  $LIBS"
4805 cat >conftest.$ac_ext <<_ACEOF
4806 #line 4806 "configure"
4807 #include "confdefs.h"
4808
4809 /* Override any gcc2 internal prototype to avoid an error.  */
4810 #ifdef __cplusplus
4811 extern "C"
4812 #endif
4813 /* We use char because int might match the return type of a gcc2
4814    builtin and then its argument prototype would still apply.  */
4815 char dmalloc_debug ();
4816 int
4817 main ()
4818 {
4819 dmalloc_debug ();
4820   ;
4821   return 0;
4822 }
4823 _ACEOF
4824 rm -f conftest.$ac_objext conftest$ac_exeext
4825 if { (eval echo "$as_me:4825: \"$ac_link\"") >&5
4826   (eval $ac_link) 2>&5
4827   ac_status=$?
4828   echo "$as_me:4828: \$? = $ac_status" >&5
4829   (exit $ac_status); } &&
4830          { ac_try='test -s conftest$ac_exeext'
4831   { (eval echo "$as_me:4831: \"$ac_try\"") >&5
4832   (eval $ac_try) 2>&5
4833   ac_status=$?
4834   echo "$as_me:4834: \$? = $ac_status" >&5
4835   (exit $ac_status); }; }; then
4836   ac_cv_lib_dmalloc_dmalloc_debug=yes
4837 else
4838   echo "$as_me: failed program was:" >&5
4839 cat conftest.$ac_ext >&5
4840 ac_cv_lib_dmalloc_dmalloc_debug=no
4841 fi
4842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4843 LIBS=$ac_check_lib_save_LIBS
4844 fi
4845 echo "$as_me:4845: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4846 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4847 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4848   cat >>confdefs.h <<EOF
4849 #define HAVE_LIBDMALLOC 1
4850 EOF
4851
4852   LIBS="-ldmalloc $LIBS"
4853
4854 fi
4855
4856 fi
4857
4858 fi
4859
4860 echo "$as_me:4860: checking if you want to use dbmalloc for testing" >&5
4861 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4862
4863 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4864 if test "${with_dbmalloc+set}" = set; then
4865   withval="$with_dbmalloc"
4866   cat >>confdefs.h <<\EOF
4867 #define USE_DBMALLOC 1
4868 EOF
4869
4870         : ${with_cflags:=-g}
4871         : ${with_no_leaks:=yes}
4872          with_dbmalloc=yes
4873 else
4874   with_dbmalloc=
4875 fi;
4876 echo "$as_me:4876: result: ${with_dbmalloc:-no}" >&5
4877 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4878
4879 case .$with_cflags in #(vi
4880 .*-g*)
4881         case .$CFLAGS in #(vi
4882         .*-g*) #(vi
4883                 ;;
4884         *)
4885
4886 cf_fix_cppflags=no
4887 cf_new_cflags=
4888 cf_new_cppflags=
4889 cf_new_extra_cppflags=
4890
4891 for cf_add_cflags in -g
4892 do
4893 case $cf_fix_cppflags in
4894 no)
4895         case $cf_add_cflags in #(vi
4896         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4897                 case $cf_add_cflags in
4898                 -D*)
4899                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4900
4901                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4902                                 && test -z "${cf_tst_cflags}" \
4903                                 && cf_fix_cppflags=yes
4904
4905                         if test $cf_fix_cppflags = yes ; then
4906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4907                                 continue
4908                         elif test "${cf_tst_cflags}" = "\"'" ; then
4909                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4910                                 continue
4911                         fi
4912                         ;;
4913                 esac
4914                 case "$CPPFLAGS" in
4915                 *$cf_add_cflags) #(vi
4916                         ;;
4917                 *) #(vi
4918                         case $cf_add_cflags in #(vi
4919                         -D*)
4920                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4921
4922 CPPFLAGS=`echo "$CPPFLAGS" | \
4923         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4924                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4925
4926                                 ;;
4927                         esac
4928                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4929                         ;;
4930                 esac
4931                 ;;
4932         *)
4933                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4934                 ;;
4935         esac
4936         ;;
4937 yes)
4938         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4939
4940         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4941
4942         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4943                 && test -z "${cf_tst_cflags}" \
4944                 && cf_fix_cppflags=no
4945         ;;
4946 esac
4947 done
4948
4949 if test -n "$cf_new_cflags" ; then
4950
4951         CFLAGS="$CFLAGS $cf_new_cflags"
4952 fi
4953
4954 if test -n "$cf_new_cppflags" ; then
4955
4956         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4957 fi
4958
4959 if test -n "$cf_new_extra_cppflags" ; then
4960
4961         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4962 fi
4963
4964                 ;;
4965         esac
4966         ;;
4967 esac
4968
4969 if test "$with_dbmalloc" = yes ; then
4970         echo "$as_me:4970: checking for dbmalloc.h" >&5
4971 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4972 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4973   echo $ECHO_N "(cached) $ECHO_C" >&6
4974 else
4975   cat >conftest.$ac_ext <<_ACEOF
4976 #line 4976 "configure"
4977 #include "confdefs.h"
4978 #include <dbmalloc.h>
4979 _ACEOF
4980 if { (eval echo "$as_me:4980: \"$ac_cpp conftest.$ac_ext\"") >&5
4981   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4982   ac_status=$?
4983   egrep -v '^ *\+' conftest.er1 >conftest.err
4984   rm -f conftest.er1
4985   cat conftest.err >&5
4986   echo "$as_me:4986: \$? = $ac_status" >&5
4987   (exit $ac_status); } >/dev/null; then
4988   if test -s conftest.err; then
4989     ac_cpp_err=$ac_c_preproc_warn_flag
4990   else
4991     ac_cpp_err=
4992   fi
4993 else
4994   ac_cpp_err=yes
4995 fi
4996 if test -z "$ac_cpp_err"; then
4997   ac_cv_header_dbmalloc_h=yes
4998 else
4999   echo "$as_me: failed program was:" >&5
5000   cat conftest.$ac_ext >&5
5001   ac_cv_header_dbmalloc_h=no
5002 fi
5003 rm -f conftest.err conftest.$ac_ext
5004 fi
5005 echo "$as_me:5005: result: $ac_cv_header_dbmalloc_h" >&5
5006 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
5007 if test $ac_cv_header_dbmalloc_h = yes; then
5008
5009 echo "$as_me:5009: checking for debug_malloc in -ldbmalloc" >&5
5010 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
5011 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
5012   echo $ECHO_N "(cached) $ECHO_C" >&6
5013 else
5014   ac_check_lib_save_LIBS=$LIBS
5015 LIBS="-ldbmalloc  $LIBS"
5016 cat >conftest.$ac_ext <<_ACEOF
5017 #line 5017 "configure"
5018 #include "confdefs.h"
5019
5020 /* Override any gcc2 internal prototype to avoid an error.  */
5021 #ifdef __cplusplus
5022 extern "C"
5023 #endif
5024 /* We use char because int might match the return type of a gcc2
5025    builtin and then its argument prototype would still apply.  */
5026 char debug_malloc ();
5027 int
5028 main ()
5029 {
5030 debug_malloc ();
5031   ;
5032   return 0;
5033 }
5034 _ACEOF
5035 rm -f conftest.$ac_objext conftest$ac_exeext
5036 if { (eval echo "$as_me:5036: \"$ac_link\"") >&5
5037   (eval $ac_link) 2>&5
5038   ac_status=$?
5039   echo "$as_me:5039: \$? = $ac_status" >&5
5040   (exit $ac_status); } &&
5041          { ac_try='test -s conftest$ac_exeext'
5042   { (eval echo "$as_me:5042: \"$ac_try\"") >&5
5043   (eval $ac_try) 2>&5
5044   ac_status=$?
5045   echo "$as_me:5045: \$? = $ac_status" >&5
5046   (exit $ac_status); }; }; then
5047   ac_cv_lib_dbmalloc_debug_malloc=yes
5048 else
5049   echo "$as_me: failed program was:" >&5
5050 cat conftest.$ac_ext >&5
5051 ac_cv_lib_dbmalloc_debug_malloc=no
5052 fi
5053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5054 LIBS=$ac_check_lib_save_LIBS
5055 fi
5056 echo "$as_me:5056: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
5057 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
5058 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
5059   cat >>confdefs.h <<EOF
5060 #define HAVE_LIBDBMALLOC 1
5061 EOF
5062
5063   LIBS="-ldbmalloc $LIBS"
5064
5065 fi
5066
5067 fi
5068
5069 fi
5070
5071 echo "$as_me:5071: checking if you want to use valgrind for testing" >&5
5072 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
5073
5074 # Check whether --with-valgrind or --without-valgrind was given.
5075 if test "${with_valgrind+set}" = set; then
5076   withval="$with_valgrind"
5077   cat >>confdefs.h <<\EOF
5078 #define USE_VALGRIND 1
5079 EOF
5080
5081         : ${with_cflags:=-g}
5082         : ${with_no_leaks:=yes}
5083          with_valgrind=yes
5084 else
5085   with_valgrind=
5086 fi;
5087 echo "$as_me:5087: result: ${with_valgrind:-no}" >&5
5088 echo "${ECHO_T}${with_valgrind:-no}" >&6
5089
5090 case .$with_cflags in #(vi
5091 .*-g*)
5092         case .$CFLAGS in #(vi
5093         .*-g*) #(vi
5094                 ;;
5095         *)
5096
5097 cf_fix_cppflags=no
5098 cf_new_cflags=
5099 cf_new_cppflags=
5100 cf_new_extra_cppflags=
5101
5102 for cf_add_cflags in -g
5103 do
5104 case $cf_fix_cppflags in
5105 no)
5106         case $cf_add_cflags in #(vi
5107         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5108                 case $cf_add_cflags in
5109                 -D*)
5110                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5111
5112                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5113                                 && test -z "${cf_tst_cflags}" \
5114                                 && cf_fix_cppflags=yes
5115
5116                         if test $cf_fix_cppflags = yes ; then
5117                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5118                                 continue
5119                         elif test "${cf_tst_cflags}" = "\"'" ; then
5120                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5121                                 continue
5122                         fi
5123                         ;;
5124                 esac
5125                 case "$CPPFLAGS" in
5126                 *$cf_add_cflags) #(vi
5127                         ;;
5128                 *) #(vi
5129                         case $cf_add_cflags in #(vi
5130                         -D*)
5131                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5132
5133 CPPFLAGS=`echo "$CPPFLAGS" | \
5134         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
5135                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
5136
5137                                 ;;
5138                         esac
5139                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5140                         ;;
5141                 esac
5142                 ;;
5143         *)
5144                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5145                 ;;
5146         esac
5147         ;;
5148 yes)
5149         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5150
5151         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5152
5153         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5154                 && test -z "${cf_tst_cflags}" \
5155                 && cf_fix_cppflags=no
5156         ;;
5157 esac
5158 done
5159
5160 if test -n "$cf_new_cflags" ; then
5161
5162         CFLAGS="$CFLAGS $cf_new_cflags"
5163 fi
5164
5165 if test -n "$cf_new_cppflags" ; then
5166
5167         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
5168 fi
5169
5170 if test -n "$cf_new_extra_cppflags" ; then
5171
5172         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5173 fi
5174
5175                 ;;
5176         esac
5177         ;;
5178 esac
5179
5180 echo "$as_me:5180: checking if you want to perform memory-leak testing" >&5
5181 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
5182
5183 # Check whether --enable-leaks or --disable-leaks was given.
5184 if test "${enable_leaks+set}" = set; then
5185   enableval="$enable_leaks"
5186   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
5187 else
5188   : ${with_no_leaks:=no}
5189 fi;
5190 echo "$as_me:5190: result: $with_no_leaks" >&5
5191 echo "${ECHO_T}$with_no_leaks" >&6
5192
5193 if test "$with_no_leaks" = yes ; then
5194         cat >>confdefs.h <<\EOF
5195 #define NO_LEAKS 1
5196 EOF
5197
5198         cat >>confdefs.h <<\EOF
5199 #define YY_NO_LEAKS 1
5200 EOF
5201
5202 fi
5203
5204 echo "$as_me:5204: checking if you want to check for wide-character functions" >&5
5205 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5206
5207 # Check whether --enable-widec or --disable-widec was given.
5208 if test "${enable_widec+set}" = set; then
5209   enableval="$enable_widec"
5210   test "$enableval" != no && enableval=yes
5211   if test "$enableval" != "yes" ; then
5212     cf_enable_widec=no
5213   else
5214     cf_enable_widec=yes
5215   fi
5216 else
5217   enableval=yes
5218   cf_enable_widec=yes
5219
5220 fi;
5221 echo "$as_me:5221: result: $cf_enable_widec" >&5
5222 echo "${ECHO_T}$cf_enable_widec" >&6
5223
5224 echo "$as_me:5224: checking for specific curses-directory" >&5
5225 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5226
5227 # Check whether --with-curses-dir or --without-curses-dir was given.
5228 if test "${with_curses_dir+set}" = set; then
5229   withval="$with_curses_dir"
5230   cf_cv_curses_dir=$withval
5231 else
5232   cf_cv_curses_dir=no
5233 fi;
5234 echo "$as_me:5234: result: $cf_cv_curses_dir" >&5
5235 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5236
5237 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5238 then
5239
5240 if test "x$prefix" != xNONE; then
5241   cf_path_syntax="$prefix"
5242 else
5243   cf_path_syntax="$ac_default_prefix"
5244 fi
5245
5246 case ".$withval" in #(vi
5247 .\$\(*\)*|.\'*\'*) #(vi
5248   ;;
5249 ..|./*|.\\*) #(vi
5250   ;;
5251 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5252   ;;
5253 .\${*prefix}*) #(vi
5254   eval withval="$withval"
5255   case ".$withval" in #(vi
5256   .NONE/*)
5257     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5258     ;;
5259   esac
5260   ;; #(vi
5261 .no|.NONE/*)
5262   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5263   ;;
5264 *)
5265   { { echo "$as_me:5265: error: expected a pathname, not \"$withval\"" >&5
5266 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5267    { (exit 1); exit 1; }; }
5268   ;;
5269 esac
5270
5271         if test -d "$cf_cv_curses_dir"
5272         then
5273
5274 if test -n "$cf_cv_curses_dir/include" ; then
5275   for cf_add_incdir in $cf_cv_curses_dir/include
5276   do
5277         while test $cf_add_incdir != /usr/include
5278         do
5279           if test -d $cf_add_incdir
5280           then
5281                 cf_have_incdir=no
5282                 if test -n "$CFLAGS$CPPFLAGS" ; then
5283                   # a loop is needed to ensure we can add subdirs of existing dirs
5284                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5285                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5286                           cf_have_incdir=yes; break
5287                         fi
5288                   done
5289                 fi
5290
5291                 if test "$cf_have_incdir" = no ; then
5292                   if test "$cf_add_incdir" = /usr/local/include ; then
5293                         if test "$GCC" = yes
5294                         then
5295                           cf_save_CPPFLAGS=$CPPFLAGS
5296                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5297                           cat >conftest.$ac_ext <<_ACEOF
5298 #line 5298 "configure"
5299 #include "confdefs.h"
5300 #include <stdio.h>
5301 int
5302 main ()
5303 {
5304 printf("Hello")
5305   ;
5306   return 0;
5307 }
5308 _ACEOF
5309 rm -f conftest.$ac_objext
5310 if { (eval echo "$as_me:5310: \"$ac_compile\"") >&5
5311   (eval $ac_compile) 2>&5
5312   ac_status=$?
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); } &&
5315          { ac_try='test -s conftest.$ac_objext'
5316   { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5317   (eval $ac_try) 2>&5
5318   ac_status=$?
5319   echo "$as_me:5319: \$? = $ac_status" >&5
5320   (exit $ac_status); }; }; then
5321   :
5322 else
5323   echo "$as_me: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 cf_have_incdir=yes
5326 fi
5327 rm -f conftest.$ac_objext conftest.$ac_ext
5328                           CPPFLAGS=$cf_save_CPPFLAGS
5329                         fi
5330                   fi
5331                 fi
5332
5333                 if test "$cf_have_incdir" = no ; then
5334                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5335
5336 echo "${as_me:-configure}:5336: testing adding $cf_add_incdir to include-path ..." 1>&5
5337
5338                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5339
5340                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5341                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5342                   cf_add_incdir="$cf_top_incdir"
5343                 else
5344                   break
5345                 fi
5346           fi
5347         done
5348   done
5349 fi
5350
5351 if test -n "$cf_cv_curses_dir/lib" ; then
5352   for cf_add_libdir in $cf_cv_curses_dir/lib
5353   do
5354     if test $cf_add_libdir = /usr/lib ; then
5355       :
5356     elif test -d $cf_add_libdir
5357     then
5358       cf_have_libdir=no
5359       if test -n "$LDFLAGS$LIBS" ; then
5360         # a loop is needed to ensure we can add subdirs of existing dirs
5361         for cf_test_libdir in $LDFLAGS $LIBS ; do
5362           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5363             cf_have_libdir=yes; break
5364           fi
5365         done
5366       fi
5367       if test "$cf_have_libdir" = no ; then
5368         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5369
5370 echo "${as_me:-configure}:5370: testing adding $cf_add_libdir to library-path ..." 1>&5
5371
5372         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5373       fi
5374     fi
5375   done
5376 fi
5377
5378         fi
5379 fi
5380
5381 echo "$as_me:5381: checking for specified curses library type" >&5
5382 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5383
5384 # Check whether --with-ncursesw or --without-ncursesw was given.
5385 if test "${with_ncursesw+set}" = set; then
5386   withval="$with_ncursesw"
5387   cf_cv_screen=ncursesw
5388 else
5389
5390 # Check whether --with-ncurses or --without-ncurses was given.
5391 if test "${with_ncurses+set}" = set; then
5392   withval="$with_ncurses"
5393   cf_cv_screen=ncurses
5394 else
5395
5396 # Check whether --with-pdcurses or --without-pdcurses was given.
5397 if test "${with_pdcurses+set}" = set; then
5398   withval="$with_pdcurses"
5399   cf_cv_screen=pdcurses
5400 else
5401
5402 # Check whether --with-curses-colr or --without-curses-colr was given.
5403 if test "${with_curses_colr+set}" = set; then
5404   withval="$with_curses_colr"
5405   cf_cv_screen=curses_colr
5406 else
5407
5408 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5409 if test "${with_curses_5lib+set}" = set; then
5410   withval="$with_curses_5lib"
5411   cf_cv_screen=curses_5lib
5412 fi;
5413 fi;
5414 fi;
5415 fi;
5416 fi;
5417
5418 echo "$as_me:5418: result: $cf_cv_screen" >&5
5419 echo "${ECHO_T}$cf_cv_screen" >&6
5420
5421 case $cf_cv_screen in
5422 curses|curses_*)
5423
5424 echo "$as_me:5424: checking for extra include directories" >&5
5425 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5426 if test "${cf_cv_curses_incdir+set}" = set; then
5427   echo $ECHO_N "(cached) $ECHO_C" >&6
5428 else
5429
5430 cf_cv_curses_incdir=no
5431 case $host_os in #(vi
5432 hpux10.*) #(vi
5433         if test "x$cf_cv_screen" = "xcurses_colr"
5434         then
5435                 test -d /usr/include/curses_colr && \
5436                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5437         fi
5438         ;;
5439 sunos3*|sunos4*)
5440         if test "x$cf_cv_screen" = "xcurses_5lib"
5441         then
5442                 test -d /usr/5lib && \
5443                 test -d /usr/5include && \
5444                 cf_cv_curses_incdir="-I/usr/5include"
5445         fi
5446         ;;
5447 esac
5448
5449 fi
5450 echo "$as_me:5450: result: $cf_cv_curses_incdir" >&5
5451 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5452 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5453
5454 echo "$as_me:5454: checking if we have identified curses headers" >&5
5455 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5456 if test "${cf_cv_ncurses_header+set}" = set; then
5457   echo $ECHO_N "(cached) $ECHO_C" >&6
5458 else
5459
5460 cf_cv_ncurses_header=none
5461 for cf_header in  \
5462         ncurses.h \
5463         curses.h ncurses/ncurses.h ncurses/curses.h
5464 do
5465 cat >conftest.$ac_ext <<_ACEOF
5466 #line 5466 "configure"
5467 #include "confdefs.h"
5468 #include <${cf_header}>
5469 int
5470 main ()
5471 {
5472 initscr(); tgoto("?", 0,0)
5473   ;
5474   return 0;
5475 }
5476 _ACEOF
5477 rm -f conftest.$ac_objext
5478 if { (eval echo "$as_me:5478: \"$ac_compile\"") >&5
5479   (eval $ac_compile) 2>&5
5480   ac_status=$?
5481   echo "$as_me:5481: \$? = $ac_status" >&5
5482   (exit $ac_status); } &&
5483          { ac_try='test -s conftest.$ac_objext'
5484   { (eval echo "$as_me:5484: \"$ac_try\"") >&5
5485   (eval $ac_try) 2>&5
5486   ac_status=$?
5487   echo "$as_me:5487: \$? = $ac_status" >&5
5488   (exit $ac_status); }; }; then
5489   cf_cv_ncurses_header=$cf_header; break
5490 else
5491   echo "$as_me: failed program was:" >&5
5492 cat conftest.$ac_ext >&5
5493 fi
5494 rm -f conftest.$ac_objext conftest.$ac_ext
5495 done
5496
5497 fi
5498 echo "$as_me:5498: result: $cf_cv_ncurses_header" >&5
5499 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5500
5501 if test "$cf_cv_ncurses_header" = none ; then
5502         { { echo "$as_me:5502: error: No curses header-files found" >&5
5503 echo "$as_me: error: No curses header-files found" >&2;}
5504    { (exit 1); exit 1; }; }
5505 fi
5506
5507 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5508
5509 for ac_header in $cf_cv_ncurses_header
5510 do
5511 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5512 echo "$as_me:5512: checking for $ac_header" >&5
5513 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5514 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5515   echo $ECHO_N "(cached) $ECHO_C" >&6
5516 else
5517   cat >conftest.$ac_ext <<_ACEOF
5518 #line 5518 "configure"
5519 #include "confdefs.h"
5520 #include <$ac_header>
5521 _ACEOF
5522 if { (eval echo "$as_me:5522: \"$ac_cpp conftest.$ac_ext\"") >&5
5523   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5524   ac_status=$?
5525   egrep -v '^ *\+' conftest.er1 >conftest.err
5526   rm -f conftest.er1
5527   cat conftest.err >&5
5528   echo "$as_me:5528: \$? = $ac_status" >&5
5529   (exit $ac_status); } >/dev/null; then
5530   if test -s conftest.err; then
5531     ac_cpp_err=$ac_c_preproc_warn_flag
5532   else
5533     ac_cpp_err=
5534   fi
5535 else
5536   ac_cpp_err=yes
5537 fi
5538 if test -z "$ac_cpp_err"; then
5539   eval "$as_ac_Header=yes"
5540 else
5541   echo "$as_me: failed program was:" >&5
5542   cat conftest.$ac_ext >&5
5543   eval "$as_ac_Header=no"
5544 fi
5545 rm -f conftest.err conftest.$ac_ext
5546 fi
5547 echo "$as_me:5547: result: `eval echo '${'$as_ac_Header'}'`" >&5
5548 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5549 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5550   cat >>confdefs.h <<EOF
5551 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5552 EOF
5553
5554 fi
5555 done
5556
5557 echo "$as_me:5557: checking for terminfo header" >&5
5558 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5559 if test "${cf_cv_term_header+set}" = set; then
5560   echo $ECHO_N "(cached) $ECHO_C" >&6
5561 else
5562
5563 case ${cf_cv_ncurses_header} in #(vi
5564 */ncurses.h|*/ncursesw.h) #(vi
5565         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5566         ;;
5567 *)
5568         cf_term_header=term.h
5569         ;;
5570 esac
5571
5572 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5573 do
5574 cat >conftest.$ac_ext <<_ACEOF
5575 #line 5575 "configure"
5576 #include "confdefs.h"
5577 #include <stdio.h>
5578 #include <${cf_cv_ncurses_header:-curses.h}>
5579 #include <$cf_test>
5580
5581 int
5582 main ()
5583 {
5584 int x = auto_left_margin
5585   ;
5586   return 0;
5587 }
5588 _ACEOF
5589 rm -f conftest.$ac_objext
5590 if { (eval echo "$as_me:5590: \"$ac_compile\"") >&5
5591   (eval $ac_compile) 2>&5
5592   ac_status=$?
5593   echo "$as_me:5593: \$? = $ac_status" >&5
5594   (exit $ac_status); } &&
5595          { ac_try='test -s conftest.$ac_objext'
5596   { (eval echo "$as_me:5596: \"$ac_try\"") >&5
5597   (eval $ac_try) 2>&5
5598   ac_status=$?
5599   echo "$as_me:5599: \$? = $ac_status" >&5
5600   (exit $ac_status); }; }; then
5601
5602         cf_cv_term_header="$cf_test"
5603 else
5604   echo "$as_me: failed program was:" >&5
5605 cat conftest.$ac_ext >&5
5606
5607         cf_cv_term_header=unknown
5608
5609 fi
5610 rm -f conftest.$ac_objext conftest.$ac_ext
5611         test "$cf_cv_term_header" != unknown && break
5612 done
5613
5614 fi
5615 echo "$as_me:5615: result: $cf_cv_term_header" >&5
5616 echo "${ECHO_T}$cf_cv_term_header" >&6
5617
5618 # Set definitions to allow ifdef'ing to accommodate subdirectories
5619
5620 case $cf_cv_term_header in # (vi
5621 *term.h)
5622         cat >>confdefs.h <<\EOF
5623 #define HAVE_TERM_H 1
5624 EOF
5625
5626         ;;
5627 esac
5628
5629 case $cf_cv_term_header in # (vi
5630 ncurses/term.h) #(vi
5631         cat >>confdefs.h <<\EOF
5632 #define HAVE_NCURSES_TERM_H 1
5633 EOF
5634
5635         ;;
5636 ncursesw/term.h)
5637         cat >>confdefs.h <<\EOF
5638 #define HAVE_NCURSESW_TERM_H 1
5639 EOF
5640
5641         ;;
5642 esac
5643
5644 echo "$as_me:5644: checking for ncurses version" >&5
5645 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5646 if test "${cf_cv_ncurses_version+set}" = set; then
5647   echo $ECHO_N "(cached) $ECHO_C" >&6
5648 else
5649
5650         cf_cv_ncurses_version=no
5651         cf_tempfile=out$$
5652         rm -f $cf_tempfile
5653         if test "$cross_compiling" = yes; then
5654
5655         # This will not work if the preprocessor splits the line after the
5656         # Autoconf token.  The 'unproto' program does that.
5657         cat > conftest.$ac_ext <<EOF
5658 #include <${cf_cv_ncurses_header:-curses.h}>
5659 #undef Autoconf
5660 #ifdef NCURSES_VERSION
5661 Autoconf NCURSES_VERSION
5662 #else
5663 #ifdef __NCURSES_H
5664 Autoconf "old"
5665 #endif
5666 ;
5667 #endif
5668 EOF
5669         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5670         { (eval echo "$as_me:5670: \"$cf_try\"") >&5
5671   (eval $cf_try) 2>&5
5672   ac_status=$?
5673   echo "$as_me:5673: \$? = $ac_status" >&5
5674   (exit $ac_status); }
5675         if test -f conftest.out ; then
5676                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5677                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5678                 rm -f conftest.out
5679         fi
5680
5681 else
5682   cat >conftest.$ac_ext <<_ACEOF
5683 #line 5683 "configure"
5684 #include "confdefs.h"
5685
5686 #include <${cf_cv_ncurses_header:-curses.h}>
5687 #include <stdio.h>
5688 int main()
5689 {
5690         FILE *fp = fopen("$cf_tempfile", "w");
5691 #ifdef NCURSES_VERSION
5692 # ifdef NCURSES_VERSION_PATCH
5693         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5694 # else
5695         fprintf(fp, "%s\n", NCURSES_VERSION);
5696 # endif
5697 #else
5698 # ifdef __NCURSES_H
5699         fprintf(fp, "old\n");
5700 # else
5701         make an error
5702 # endif
5703 #endif
5704         ${cf_cv_main_return:-return}(0);
5705 }
5706 _ACEOF
5707 rm -f conftest$ac_exeext
5708 if { (eval echo "$as_me:5708: \"$ac_link\"") >&5
5709   (eval $ac_link) 2>&5
5710   ac_status=$?
5711   echo "$as_me:5711: \$? = $ac_status" >&5
5712   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5713   { (eval echo "$as_me:5713: \"$ac_try\"") >&5
5714   (eval $ac_try) 2>&5
5715   ac_status=$?
5716   echo "$as_me:5716: \$? = $ac_status" >&5
5717   (exit $ac_status); }; }; then
5718
5719         cf_cv_ncurses_version=`cat $cf_tempfile`
5720 else
5721   echo "$as_me: program exited with status $ac_status" >&5
5722 echo "$as_me: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 fi
5725 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5726 fi
5727         rm -f $cf_tempfile
5728
5729 fi
5730 echo "$as_me:5730: result: $cf_cv_ncurses_version" >&5
5731 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5732 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5733 #define NCURSES 1
5734 EOF
5735
5736 echo "$as_me:5736: checking if we have identified curses libraries" >&5
5737 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5738 cat >conftest.$ac_ext <<_ACEOF
5739 #line 5739 "configure"
5740 #include "confdefs.h"
5741 #include <${cf_cv_ncurses_header:-curses.h}>
5742 int
5743 main ()
5744 {
5745 initscr(); tgoto("?", 0,0)
5746   ;
5747   return 0;
5748 }
5749 _ACEOF
5750 rm -f conftest.$ac_objext conftest$ac_exeext
5751 if { (eval echo "$as_me:5751: \"$ac_link\"") >&5
5752   (eval $ac_link) 2>&5
5753   ac_status=$?
5754   echo "$as_me:5754: \$? = $ac_status" >&5
5755   (exit $ac_status); } &&
5756          { ac_try='test -s conftest$ac_exeext'
5757   { (eval echo "$as_me:5757: \"$ac_try\"") >&5
5758   (eval $ac_try) 2>&5
5759   ac_status=$?
5760   echo "$as_me:5760: \$? = $ac_status" >&5
5761   (exit $ac_status); }; }; then
5762   cf_result=yes
5763 else
5764   echo "$as_me: failed program was:" >&5
5765 cat conftest.$ac_ext >&5
5766 cf_result=no
5767 fi
5768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5769 echo "$as_me:5769: result: $cf_result" >&5
5770 echo "${ECHO_T}$cf_result" >&6
5771
5772 if test "$cf_result" = no ; then
5773 case $host_os in #(vi
5774 freebsd*) #(vi
5775     echo "$as_me:5775: checking for tgoto in -lmytinfo" >&5
5776 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5777 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5778   echo $ECHO_N "(cached) $ECHO_C" >&6
5779 else
5780   ac_check_lib_save_LIBS=$LIBS
5781 LIBS="-lmytinfo  $LIBS"
5782 cat >conftest.$ac_ext <<_ACEOF
5783 #line 5783 "configure"
5784 #include "confdefs.h"
5785
5786 /* Override any gcc2 internal prototype to avoid an error.  */
5787 #ifdef __cplusplus
5788 extern "C"
5789 #endif
5790 /* We use char because int might match the return type of a gcc2
5791    builtin and then its argument prototype would still apply.  */
5792 char tgoto ();
5793 int
5794 main ()
5795 {
5796 tgoto ();
5797   ;
5798   return 0;
5799 }
5800 _ACEOF
5801 rm -f conftest.$ac_objext conftest$ac_exeext
5802 if { (eval echo "$as_me:5802: \"$ac_link\"") >&5
5803   (eval $ac_link) 2>&5
5804   ac_status=$?
5805   echo "$as_me:5805: \$? = $ac_status" >&5
5806   (exit $ac_status); } &&
5807          { ac_try='test -s conftest$ac_exeext'
5808   { (eval echo "$as_me:5808: \"$ac_try\"") >&5
5809   (eval $ac_try) 2>&5
5810   ac_status=$?
5811   echo "$as_me:5811: \$? = $ac_status" >&5
5812   (exit $ac_status); }; }; then
5813   ac_cv_lib_mytinfo_tgoto=yes
5814 else
5815   echo "$as_me: failed program was:" >&5
5816 cat conftest.$ac_ext >&5
5817 ac_cv_lib_mytinfo_tgoto=no
5818 fi
5819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5820 LIBS=$ac_check_lib_save_LIBS
5821 fi
5822 echo "$as_me:5822: result: $ac_cv_lib_mytinfo_tgoto" >&5
5823 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5824 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5825   LIBS="-lmytinfo $LIBS"
5826 fi
5827
5828     ;;
5829 hpux10.*) #(vi
5830         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5831         # next (1998), and xcurses "newer" (2000).  There is no header file for
5832         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5833         # term.h) for cur_colr
5834         if test "x$cf_cv_screen" = "xcurses_colr"
5835         then
5836                 echo "$as_me:5836: checking for initscr in -lcur_colr" >&5
5837 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5838 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5839   echo $ECHO_N "(cached) $ECHO_C" >&6
5840 else
5841   ac_check_lib_save_LIBS=$LIBS
5842 LIBS="-lcur_colr  $LIBS"
5843 cat >conftest.$ac_ext <<_ACEOF
5844 #line 5844 "configure"
5845 #include "confdefs.h"
5846
5847 /* Override any gcc2 internal prototype to avoid an error.  */
5848 #ifdef __cplusplus
5849 extern "C"
5850 #endif
5851 /* We use char because int might match the return type of a gcc2
5852    builtin and then its argument prototype would still apply.  */
5853 char initscr ();
5854 int
5855 main ()
5856 {
5857 initscr ();
5858   ;
5859   return 0;
5860 }
5861 _ACEOF
5862 rm -f conftest.$ac_objext conftest$ac_exeext
5863 if { (eval echo "$as_me:5863: \"$ac_link\"") >&5
5864   (eval $ac_link) 2>&5
5865   ac_status=$?
5866   echo "$as_me:5866: \$? = $ac_status" >&5
5867   (exit $ac_status); } &&
5868          { ac_try='test -s conftest$ac_exeext'
5869   { (eval echo "$as_me:5869: \"$ac_try\"") >&5
5870   (eval $ac_try) 2>&5
5871   ac_status=$?
5872   echo "$as_me:5872: \$? = $ac_status" >&5
5873   (exit $ac_status); }; }; then
5874   ac_cv_lib_cur_colr_initscr=yes
5875 else
5876   echo "$as_me: failed program was:" >&5
5877 cat conftest.$ac_ext >&5
5878 ac_cv_lib_cur_colr_initscr=no
5879 fi
5880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5881 LIBS=$ac_check_lib_save_LIBS
5882 fi
5883 echo "$as_me:5883: result: $ac_cv_lib_cur_colr_initscr" >&5
5884 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5885 if test $ac_cv_lib_cur_colr_initscr = yes; then
5886
5887                         LIBS="-lcur_colr $LIBS"
5888                         ac_cv_func_initscr=yes
5889
5890 else
5891
5892                 echo "$as_me:5892: checking for initscr in -lHcurses" >&5
5893 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5894 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5895   echo $ECHO_N "(cached) $ECHO_C" >&6
5896 else
5897   ac_check_lib_save_LIBS=$LIBS
5898 LIBS="-lHcurses  $LIBS"
5899 cat >conftest.$ac_ext <<_ACEOF
5900 #line 5900 "configure"
5901 #include "confdefs.h"
5902
5903 /* Override any gcc2 internal prototype to avoid an error.  */
5904 #ifdef __cplusplus
5905 extern "C"
5906 #endif
5907 /* We use char because int might match the return type of a gcc2
5908    builtin and then its argument prototype would still apply.  */
5909 char initscr ();
5910 int
5911 main ()
5912 {
5913 initscr ();
5914   ;
5915   return 0;
5916 }
5917 _ACEOF
5918 rm -f conftest.$ac_objext conftest$ac_exeext
5919 if { (eval echo "$as_me:5919: \"$ac_link\"") >&5
5920   (eval $ac_link) 2>&5
5921   ac_status=$?
5922   echo "$as_me:5922: \$? = $ac_status" >&5
5923   (exit $ac_status); } &&
5924          { ac_try='test -s conftest$ac_exeext'
5925   { (eval echo "$as_me:5925: \"$ac_try\"") >&5
5926   (eval $ac_try) 2>&5
5927   ac_status=$?
5928   echo "$as_me:5928: \$? = $ac_status" >&5
5929   (exit $ac_status); }; }; then
5930   ac_cv_lib_Hcurses_initscr=yes
5931 else
5932   echo "$as_me: failed program was:" >&5
5933 cat conftest.$ac_ext >&5
5934 ac_cv_lib_Hcurses_initscr=no
5935 fi
5936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5937 LIBS=$ac_check_lib_save_LIBS
5938 fi
5939 echo "$as_me:5939: result: $ac_cv_lib_Hcurses_initscr" >&5
5940 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5941 if test $ac_cv_lib_Hcurses_initscr = yes; then
5942
5943                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5944                         LIBS="-lHcurses $LIBS"
5945                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5946                         ac_cv_func_initscr=yes
5947
5948 fi
5949
5950 fi
5951
5952         fi
5953     ;;
5954 linux*)
5955         case `arch 2>/dev/null` in
5956         x86_64)
5957                 if test -d /lib64
5958                 then
5959
5960 if test -n "/lib64" ; then
5961   for cf_add_libdir in /lib64
5962   do
5963     if test $cf_add_libdir = /usr/lib ; then
5964       :
5965     elif test -d $cf_add_libdir
5966     then
5967       cf_have_libdir=no
5968       if test -n "$LDFLAGS$LIBS" ; then
5969         # a loop is needed to ensure we can add subdirs of existing dirs
5970         for cf_test_libdir in $LDFLAGS $LIBS ; do
5971           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5972             cf_have_libdir=yes; break
5973           fi
5974         done
5975       fi
5976       if test "$cf_have_libdir" = no ; then
5977         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5978
5979 echo "${as_me:-configure}:5979: testing adding $cf_add_libdir to library-path ..." 1>&5
5980
5981         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5982       fi
5983     fi
5984   done
5985 fi
5986
5987                 else
5988
5989 if test -n "/lib" ; then
5990   for cf_add_libdir in /lib
5991   do
5992     if test $cf_add_libdir = /usr/lib ; then
5993       :
5994     elif test -d $cf_add_libdir
5995     then
5996       cf_have_libdir=no
5997       if test -n "$LDFLAGS$LIBS" ; then
5998         # a loop is needed to ensure we can add subdirs of existing dirs
5999         for cf_test_libdir in $LDFLAGS $LIBS ; do
6000           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6001             cf_have_libdir=yes; break
6002           fi
6003         done
6004       fi
6005       if test "$cf_have_libdir" = no ; then
6006         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6007
6008 echo "${as_me:-configure}:6008: testing adding $cf_add_libdir to library-path ..." 1>&5
6009
6010         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6011       fi
6012     fi
6013   done
6014 fi
6015
6016                 fi
6017                 ;;
6018         *)
6019
6020 if test -n "/lib" ; then
6021   for cf_add_libdir in /lib
6022   do
6023     if test $cf_add_libdir = /usr/lib ; then
6024       :
6025     elif test -d $cf_add_libdir
6026     then
6027       cf_have_libdir=no
6028       if test -n "$LDFLAGS$LIBS" ; then
6029         # a loop is needed to ensure we can add subdirs of existing dirs
6030         for cf_test_libdir in $LDFLAGS $LIBS ; do
6031           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6032             cf_have_libdir=yes; break
6033           fi
6034         done
6035       fi
6036       if test "$cf_have_libdir" = no ; then
6037         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6038
6039 echo "${as_me:-configure}:6039: testing adding $cf_add_libdir to library-path ..." 1>&5
6040
6041         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6042       fi
6043     fi
6044   done
6045 fi
6046
6047                 ;;
6048         esac
6049     ;;
6050 sunos3*|sunos4*)
6051         if test "x$cf_cv_screen" = "xcurses_5lib"
6052         then
6053                 if test -d /usr/5lib ; then
6054
6055 if test -n "/usr/5lib" ; then
6056   for cf_add_libdir in /usr/5lib
6057   do
6058     if test $cf_add_libdir = /usr/lib ; then
6059       :
6060     elif test -d $cf_add_libdir
6061     then
6062       cf_have_libdir=no
6063       if test -n "$LDFLAGS$LIBS" ; then
6064         # a loop is needed to ensure we can add subdirs of existing dirs
6065         for cf_test_libdir in $LDFLAGS $LIBS ; do
6066           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6067             cf_have_libdir=yes; break
6068           fi
6069         done
6070       fi
6071       if test "$cf_have_libdir" = no ; then
6072         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
6073
6074 echo "${as_me:-configure}:6074: testing adding $cf_add_libdir to library-path ..." 1>&5
6075
6076         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6077       fi
6078     fi
6079   done
6080 fi
6081
6082                         LIBS="-lcurses -ltermcap $LIBS"
6083                 fi
6084     fi
6085     ac_cv_func_initscr=yes
6086     ;;
6087 esac
6088
6089 if test ".$ac_cv_func_initscr" != .yes ; then
6090     cf_save_LIBS="$LIBS"
6091     cf_term_lib=""
6092     cf_curs_lib=""
6093
6094     if test ".${cf_cv_ncurses_version:-no}" != .no
6095     then
6096         cf_check_list="ncurses curses cursesX"
6097     else
6098         cf_check_list="cursesX curses ncurses"
6099     fi
6100
6101     # Check for library containing tgoto.  Do this before curses library
6102     # because it may be needed to link the test-case for initscr.
6103     echo "$as_me:6103: checking for tgoto" >&5
6104 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6105 if test "${ac_cv_func_tgoto+set}" = set; then
6106   echo $ECHO_N "(cached) $ECHO_C" >&6
6107 else
6108   cat >conftest.$ac_ext <<_ACEOF
6109 #line 6109 "configure"
6110 #include "confdefs.h"
6111 /* System header to define __stub macros and hopefully few prototypes,
6112     which can conflict with char tgoto (); below.  */
6113 #include <assert.h>
6114 /* Override any gcc2 internal prototype to avoid an error.  */
6115 #ifdef __cplusplus
6116 extern "C"
6117 #endif
6118 /* We use char because int might match the return type of a gcc2
6119    builtin and then its argument prototype would still apply.  */
6120 char tgoto ();
6121 char (*f) ();
6122
6123 int
6124 main ()
6125 {
6126 /* The GNU C library defines this for functions which it implements
6127     to always fail with ENOSYS.  Some functions are actually named
6128     something starting with __ and the normal name is an alias.  */
6129 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6130 choke me
6131 #else
6132 f = tgoto;
6133 #endif
6134
6135   ;
6136   return 0;
6137 }
6138 _ACEOF
6139 rm -f conftest.$ac_objext conftest$ac_exeext
6140 if { (eval echo "$as_me:6140: \"$ac_link\"") >&5
6141   (eval $ac_link) 2>&5
6142   ac_status=$?
6143   echo "$as_me:6143: \$? = $ac_status" >&5
6144   (exit $ac_status); } &&
6145          { ac_try='test -s conftest$ac_exeext'
6146   { (eval echo "$as_me:6146: \"$ac_try\"") >&5
6147   (eval $ac_try) 2>&5
6148   ac_status=$?
6149   echo "$as_me:6149: \$? = $ac_status" >&5
6150   (exit $ac_status); }; }; then
6151   ac_cv_func_tgoto=yes
6152 else
6153   echo "$as_me: failed program was:" >&5
6154 cat conftest.$ac_ext >&5
6155 ac_cv_func_tgoto=no
6156 fi
6157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6158 fi
6159 echo "$as_me:6159: result: $ac_cv_func_tgoto" >&5
6160 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6161 if test $ac_cv_func_tgoto = yes; then
6162   cf_term_lib=predefined
6163 else
6164
6165         for cf_term_lib in $cf_check_list otermcap termcap termlib unknown
6166         do
6167             as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6168 echo "$as_me:6168: checking for tgoto in -l$cf_term_lib" >&5
6169 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6170 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6171   echo $ECHO_N "(cached) $ECHO_C" >&6
6172 else
6173   ac_check_lib_save_LIBS=$LIBS
6174 LIBS="-l$cf_term_lib  $LIBS"
6175 cat >conftest.$ac_ext <<_ACEOF
6176 #line 6176 "configure"
6177 #include "confdefs.h"
6178
6179 /* Override any gcc2 internal prototype to avoid an error.  */
6180 #ifdef __cplusplus
6181 extern "C"
6182 #endif
6183 /* We use char because int might match the return type of a gcc2
6184    builtin and then its argument prototype would still apply.  */
6185 char tgoto ();
6186 int
6187 main ()
6188 {
6189 tgoto ();
6190   ;
6191   return 0;
6192 }
6193 _ACEOF
6194 rm -f conftest.$ac_objext conftest$ac_exeext
6195 if { (eval echo "$as_me:6195: \"$ac_link\"") >&5
6196   (eval $ac_link) 2>&5
6197   ac_status=$?
6198   echo "$as_me:6198: \$? = $ac_status" >&5
6199   (exit $ac_status); } &&
6200          { ac_try='test -s conftest$ac_exeext'
6201   { (eval echo "$as_me:6201: \"$ac_try\"") >&5
6202   (eval $ac_try) 2>&5
6203   ac_status=$?
6204   echo "$as_me:6204: \$? = $ac_status" >&5
6205   (exit $ac_status); }; }; then
6206   eval "$as_ac_Lib=yes"
6207 else
6208   echo "$as_me: failed program was:" >&5
6209 cat conftest.$ac_ext >&5
6210 eval "$as_ac_Lib=no"
6211 fi
6212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6213 LIBS=$ac_check_lib_save_LIBS
6214 fi
6215 echo "$as_me:6215: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6216 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6217 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6218   break
6219 fi
6220
6221         done
6222
6223 fi
6224
6225     # Check for library containing initscr
6226     test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6227         for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6228     do
6229         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
6230 echo "$as_me:6230: checking for initscr in -l$cf_curs_lib" >&5
6231 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
6232 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6233   echo $ECHO_N "(cached) $ECHO_C" >&6
6234 else
6235   ac_check_lib_save_LIBS=$LIBS
6236 LIBS="-l$cf_curs_lib  $LIBS"
6237 cat >conftest.$ac_ext <<_ACEOF
6238 #line 6238 "configure"
6239 #include "confdefs.h"
6240
6241 /* Override any gcc2 internal prototype to avoid an error.  */
6242 #ifdef __cplusplus
6243 extern "C"
6244 #endif
6245 /* We use char because int might match the return type of a gcc2
6246    builtin and then its argument prototype would still apply.  */
6247 char initscr ();
6248 int
6249 main ()
6250 {
6251 initscr ();
6252   ;
6253   return 0;
6254 }
6255 _ACEOF
6256 rm -f conftest.$ac_objext conftest$ac_exeext
6257 if { (eval echo "$as_me:6257: \"$ac_link\"") >&5
6258   (eval $ac_link) 2>&5
6259   ac_status=$?
6260   echo "$as_me:6260: \$? = $ac_status" >&5
6261   (exit $ac_status); } &&
6262          { ac_try='test -s conftest$ac_exeext'
6263   { (eval echo "$as_me:6263: \"$ac_try\"") >&5
6264   (eval $ac_try) 2>&5
6265   ac_status=$?
6266   echo "$as_me:6266: \$? = $ac_status" >&5
6267   (exit $ac_status); }; }; then
6268   eval "$as_ac_Lib=yes"
6269 else
6270   echo "$as_me: failed program was:" >&5
6271 cat conftest.$ac_ext >&5
6272 eval "$as_ac_Lib=no"
6273 fi
6274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6275 LIBS=$ac_check_lib_save_LIBS
6276 fi
6277 echo "$as_me:6277: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6278 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6279 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6280   break
6281 fi
6282
6283     done
6284     test $cf_curs_lib = unknown && { { echo "$as_me:6284: error: no curses library found" >&5
6285 echo "$as_me: error: no curses library found" >&2;}
6286    { (exit 1); exit 1; }; }
6287
6288     LIBS="-l$cf_curs_lib $cf_save_LIBS"
6289     if test "$cf_term_lib" = unknown ; then
6290         echo "$as_me:6290: checking if we can link with $cf_curs_lib library" >&5
6291 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6292         cat >conftest.$ac_ext <<_ACEOF
6293 #line 6293 "configure"
6294 #include "confdefs.h"
6295 #include <${cf_cv_ncurses_header:-curses.h}>
6296 int
6297 main ()
6298 {
6299 initscr()
6300   ;
6301   return 0;
6302 }
6303 _ACEOF
6304 rm -f conftest.$ac_objext conftest$ac_exeext
6305 if { (eval echo "$as_me:6305: \"$ac_link\"") >&5
6306   (eval $ac_link) 2>&5
6307   ac_status=$?
6308   echo "$as_me:6308: \$? = $ac_status" >&5
6309   (exit $ac_status); } &&
6310          { ac_try='test -s conftest$ac_exeext'
6311   { (eval echo "$as_me:6311: \"$ac_try\"") >&5
6312   (eval $ac_try) 2>&5
6313   ac_status=$?
6314   echo "$as_me:6314: \$? = $ac_status" >&5
6315   (exit $ac_status); }; }; then
6316   cf_result=yes
6317 else
6318   echo "$as_me: failed program was:" >&5
6319 cat conftest.$ac_ext >&5
6320 cf_result=no
6321 fi
6322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6323         echo "$as_me:6323: result: $cf_result" >&5
6324 echo "${ECHO_T}$cf_result" >&6
6325         test $cf_result = no && { { echo "$as_me:6325: error: Cannot link curses library" >&5
6326 echo "$as_me: error: Cannot link curses library" >&2;}
6327    { (exit 1); exit 1; }; }
6328     elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6329         :
6330     elif test "$cf_term_lib" != predefined ; then
6331         echo "$as_me:6331: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6332 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6333         cat >conftest.$ac_ext <<_ACEOF
6334 #line 6334 "configure"
6335 #include "confdefs.h"
6336 #include <${cf_cv_ncurses_header:-curses.h}>
6337 int
6338 main ()
6339 {
6340 initscr(); tgoto((char *)0, 0, 0);
6341   ;
6342   return 0;
6343 }
6344 _ACEOF
6345 rm -f conftest.$ac_objext conftest$ac_exeext
6346 if { (eval echo "$as_me:6346: \"$ac_link\"") >&5
6347   (eval $ac_link) 2>&5
6348   ac_status=$?
6349   echo "$as_me:6349: \$? = $ac_status" >&5
6350   (exit $ac_status); } &&
6351          { ac_try='test -s conftest$ac_exeext'
6352   { (eval echo "$as_me:6352: \"$ac_try\"") >&5
6353   (eval $ac_try) 2>&5
6354   ac_status=$?
6355   echo "$as_me:6355: \$? = $ac_status" >&5
6356   (exit $ac_status); }; }; then
6357   cf_result=no
6358 else
6359   echo "$as_me: failed program was:" >&5
6360 cat conftest.$ac_ext >&5
6361
6362             LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6363             cat >conftest.$ac_ext <<_ACEOF
6364 #line 6364 "configure"
6365 #include "confdefs.h"
6366 #include <${cf_cv_ncurses_header:-curses.h}>
6367 int
6368 main ()
6369 {
6370 initscr()
6371   ;
6372   return 0;
6373 }
6374 _ACEOF
6375 rm -f conftest.$ac_objext conftest$ac_exeext
6376 if { (eval echo "$as_me:6376: \"$ac_link\"") >&5
6377   (eval $ac_link) 2>&5
6378   ac_status=$?
6379   echo "$as_me:6379: \$? = $ac_status" >&5
6380   (exit $ac_status); } &&
6381          { ac_try='test -s conftest$ac_exeext'
6382   { (eval echo "$as_me:6382: \"$ac_try\"") >&5
6383   (eval $ac_try) 2>&5
6384   ac_status=$?
6385   echo "$as_me:6385: \$? = $ac_status" >&5
6386   (exit $ac_status); }; }; then
6387   cf_result=yes
6388 else
6389   echo "$as_me: failed program was:" >&5
6390 cat conftest.$ac_ext >&5
6391 cf_result=error
6392 fi
6393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6394
6395 fi
6396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6397         echo "$as_me:6397: result: $cf_result" >&5
6398 echo "${ECHO_T}$cf_result" >&6
6399     fi
6400 fi
6401 fi
6402
6403 echo "$as_me:6403: checking for NetBSD form.h" >&5
6404 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
6405 if test "${cf_cv_netbsd_form_h+set}" = set; then
6406   echo $ECHO_N "(cached) $ECHO_C" >&6
6407 else
6408
6409 cat >conftest.$ac_ext <<_ACEOF
6410 #line 6410 "configure"
6411 #include "confdefs.h"
6412
6413 #include <${cf_cv_ncurses_header:-curses.h}>
6414 #include <form.h>
6415
6416 int
6417 main ()
6418 {
6419
6420         FORM *form;
6421         int y = current_field(form)->cursor_ypos;
6422         int x = current_field(form)->cursor_xpos;
6423
6424   ;
6425   return 0;
6426 }
6427 _ACEOF
6428 rm -f conftest.$ac_objext
6429 if { (eval echo "$as_me:6429: \"$ac_compile\"") >&5
6430   (eval $ac_compile) 2>&5
6431   ac_status=$?
6432   echo "$as_me:6432: \$? = $ac_status" >&5
6433   (exit $ac_status); } &&
6434          { ac_try='test -s conftest.$ac_objext'
6435   { (eval echo "$as_me:6435: \"$ac_try\"") >&5
6436   (eval $ac_try) 2>&5
6437   ac_status=$?
6438   echo "$as_me:6438: \$? = $ac_status" >&5
6439   (exit $ac_status); }; }; then
6440   cf_cv_netbsd_form_h=yes
6441
6442 else
6443   echo "$as_me: failed program was:" >&5
6444 cat conftest.$ac_ext >&5
6445 cf_cv_netbsd_form_h=no
6446 fi
6447 rm -f conftest.$ac_objext conftest.$ac_ext
6448
6449 fi
6450 echo "$as_me:6450: result: $cf_cv_netbsd_form_h" >&5
6451 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
6452
6453 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
6454 #define HAVE_NETBSD_FORM_H 1
6455 EOF
6456
6457 echo "$as_me:6457: checking for NetBSD menu.h" >&5
6458 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
6459 if test "${cf_cv_netbsd_menu_h+set}" = set; then
6460   echo $ECHO_N "(cached) $ECHO_C" >&6
6461 else
6462
6463 cat >conftest.$ac_ext <<_ACEOF
6464 #line 6464 "configure"
6465 #include "confdefs.h"
6466
6467 #include <${cf_cv_ncurses_header:-curses.h}>
6468 #include <menu.h>
6469
6470 int
6471 main ()
6472 {
6473
6474         MENU *menu;
6475         int y = menu->max_item_width;
6476
6477   ;
6478   return 0;
6479 }
6480 _ACEOF
6481 rm -f conftest.$ac_objext
6482 if { (eval echo "$as_me:6482: \"$ac_compile\"") >&5
6483   (eval $ac_compile) 2>&5
6484   ac_status=$?
6485   echo "$as_me:6485: \$? = $ac_status" >&5
6486   (exit $ac_status); } &&
6487          { ac_try='test -s conftest.$ac_objext'
6488   { (eval echo "$as_me:6488: \"$ac_try\"") >&5
6489   (eval $ac_try) 2>&5
6490   ac_status=$?
6491   echo "$as_me:6491: \$? = $ac_status" >&5
6492   (exit $ac_status); }; }; then
6493   cf_cv_netbsd_menu_h=yes
6494
6495 else
6496   echo "$as_me: failed program was:" >&5
6497 cat conftest.$ac_ext >&5
6498 cf_cv_netbsd_menu_h=no
6499 fi
6500 rm -f conftest.$ac_objext conftest.$ac_ext
6501
6502 fi
6503 echo "$as_me:6503: result: $cf_cv_netbsd_menu_h" >&5
6504 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
6505
6506 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
6507 #define HAVE_NETBSD_MENU_H 1
6508 EOF
6509
6510         ;;
6511 ncurses)
6512
6513 cf_ncuconfig_root=ncurses
6514
6515 echo "Looking for ${cf_ncuconfig_root}-config"
6516 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6517 do
6518   # Extract the first word of "$ac_prog", so it can be a program name with args.
6519 set dummy $ac_prog; ac_word=$2
6520 echo "$as_me:6520: checking for $ac_word" >&5
6521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6522 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
6523   echo $ECHO_N "(cached) $ECHO_C" >&6
6524 else
6525   case $NCURSES_CONFIG in
6526   [\\/]* | ?:[\\/]*)
6527   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
6528   ;;
6529   *)
6530   ac_save_IFS=$IFS; IFS=$ac_path_separator
6531 ac_dummy="$PATH"
6532 for ac_dir in $ac_dummy; do
6533   IFS=$ac_save_IFS
6534   test -z "$ac_dir" && ac_dir=.
6535   if $as_executable_p "$ac_dir/$ac_word"; then
6536    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
6537    echo "$as_me:6537: found $ac_dir/$ac_word" >&5
6538    break
6539 fi
6540 done
6541
6542   ;;
6543 esac
6544 fi
6545 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
6546
6547 if test -n "$NCURSES_CONFIG"; then
6548   echo "$as_me:6548: result: $NCURSES_CONFIG" >&5
6549 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6550 else
6551   echo "$as_me:6551: result: no" >&5
6552 echo "${ECHO_T}no" >&6
6553 fi
6554
6555   test -n "$NCURSES_CONFIG" && break
6556 done
6557 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
6558
6559 if test "$NCURSES_CONFIG" != none ; then
6560
6561 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6562 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6563
6564 # even with config script, some packages use no-override for curses.h
6565
6566 echo "$as_me:6566: checking if we have identified curses headers" >&5
6567 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6568 if test "${cf_cv_ncurses_header+set}" = set; then
6569   echo $ECHO_N "(cached) $ECHO_C" >&6
6570 else
6571
6572 cf_cv_ncurses_header=none
6573 for cf_header in  \
6574     ncurses/ncurses.h \
6575         ncurses/curses.h \
6576         ncurses.h \
6577         curses.h
6578 do
6579 cat >conftest.$ac_ext <<_ACEOF
6580 #line 6580 "configure"
6581 #include "confdefs.h"
6582 #include <${cf_header}>
6583 int
6584 main ()
6585 {
6586 initscr(); tgoto("?", 0,0)
6587   ;
6588   return 0;
6589 }
6590 _ACEOF
6591 rm -f conftest.$ac_objext
6592 if { (eval echo "$as_me:6592: \"$ac_compile\"") >&5
6593   (eval $ac_compile) 2>&5
6594   ac_status=$?
6595   echo "$as_me:6595: \$? = $ac_status" >&5
6596   (exit $ac_status); } &&
6597          { ac_try='test -s conftest.$ac_objext'
6598   { (eval echo "$as_me:6598: \"$ac_try\"") >&5
6599   (eval $ac_try) 2>&5
6600   ac_status=$?
6601   echo "$as_me:6601: \$? = $ac_status" >&5
6602   (exit $ac_status); }; }; then
6603   cf_cv_ncurses_header=$cf_header; break
6604 else
6605   echo "$as_me: failed program was:" >&5
6606 cat conftest.$ac_ext >&5
6607 fi
6608 rm -f conftest.$ac_objext conftest.$ac_ext
6609 done
6610
6611 fi
6612 echo "$as_me:6612: result: $cf_cv_ncurses_header" >&5
6613 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6614
6615 if test "$cf_cv_ncurses_header" = none ; then
6616         { { echo "$as_me:6616: error: No curses header-files found" >&5
6617 echo "$as_me: error: No curses header-files found" >&2;}
6618    { (exit 1); exit 1; }; }
6619 fi
6620
6621 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6622
6623 for ac_header in $cf_cv_ncurses_header
6624 do
6625 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6626 echo "$as_me:6626: checking for $ac_header" >&5
6627 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6628 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6629   echo $ECHO_N "(cached) $ECHO_C" >&6
6630 else
6631   cat >conftest.$ac_ext <<_ACEOF
6632 #line 6632 "configure"
6633 #include "confdefs.h"
6634 #include <$ac_header>
6635 _ACEOF
6636 if { (eval echo "$as_me:6636: \"$ac_cpp conftest.$ac_ext\"") >&5
6637   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6638   ac_status=$?
6639   egrep -v '^ *\+' conftest.er1 >conftest.err
6640   rm -f conftest.er1
6641   cat conftest.err >&5
6642   echo "$as_me:6642: \$? = $ac_status" >&5
6643   (exit $ac_status); } >/dev/null; then
6644   if test -s conftest.err; then
6645     ac_cpp_err=$ac_c_preproc_warn_flag
6646   else
6647     ac_cpp_err=
6648   fi
6649 else
6650   ac_cpp_err=yes
6651 fi
6652 if test -z "$ac_cpp_err"; then
6653   eval "$as_ac_Header=yes"
6654 else
6655   echo "$as_me: failed program was:" >&5
6656   cat conftest.$ac_ext >&5
6657   eval "$as_ac_Header=no"
6658 fi
6659 rm -f conftest.err conftest.$ac_ext
6660 fi
6661 echo "$as_me:6661: result: `eval echo '${'$as_ac_Header'}'`" >&5
6662 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6663 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6664   cat >>confdefs.h <<EOF
6665 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6666 EOF
6667
6668 fi
6669 done
6670
6671 cat >>confdefs.h <<\EOF
6672 #define NCURSES 1
6673 EOF
6674
6675 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6676
6677 cat >>confdefs.h <<EOF
6678 #define $cf_nculib_ROOT 1
6679 EOF
6680
6681 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6682
6683 else
6684
6685 cf_ncuhdr_root=ncurses
6686
6687 test -n "$cf_cv_curses_dir" && \
6688 test "$cf_cv_curses_dir" != "no" && { \
6689
6690 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6691   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6692   do
6693         while test $cf_add_incdir != /usr/include
6694         do
6695           if test -d $cf_add_incdir
6696           then
6697                 cf_have_incdir=no
6698                 if test -n "$CFLAGS$CPPFLAGS" ; then
6699                   # a loop is needed to ensure we can add subdirs of existing dirs
6700                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6701                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6702                           cf_have_incdir=yes; break
6703                         fi
6704                   done
6705                 fi
6706
6707                 if test "$cf_have_incdir" = no ; then
6708                   if test "$cf_add_incdir" = /usr/local/include ; then
6709                         if test "$GCC" = yes
6710                         then
6711                           cf_save_CPPFLAGS=$CPPFLAGS
6712                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6713                           cat >conftest.$ac_ext <<_ACEOF
6714 #line 6714 "configure"
6715 #include "confdefs.h"
6716 #include <stdio.h>
6717 int
6718 main ()
6719 {
6720 printf("Hello")
6721   ;
6722   return 0;
6723 }
6724 _ACEOF
6725 rm -f conftest.$ac_objext
6726 if { (eval echo "$as_me:6726: \"$ac_compile\"") >&5
6727   (eval $ac_compile) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); } &&
6731          { ac_try='test -s conftest.$ac_objext'
6732   { (eval echo "$as_me:6732: \"$ac_try\"") >&5
6733   (eval $ac_try) 2>&5
6734   ac_status=$?
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); }; }; then
6737   :
6738 else
6739   echo "$as_me: failed program was:" >&5
6740 cat conftest.$ac_ext >&5
6741 cf_have_incdir=yes
6742 fi
6743 rm -f conftest.$ac_objext conftest.$ac_ext
6744                           CPPFLAGS=$cf_save_CPPFLAGS
6745                         fi
6746                   fi
6747                 fi
6748
6749                 if test "$cf_have_incdir" = no ; then
6750                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6751
6752 echo "${as_me:-configure}:6752: testing adding $cf_add_incdir to include-path ..." 1>&5
6753
6754                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6755
6756                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6757                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6758                   cf_add_incdir="$cf_top_incdir"
6759                 else
6760                   break
6761                 fi
6762           fi
6763         done
6764   done
6765 fi
6766
6767 }
6768
6769 echo "$as_me:6769: checking for $cf_ncuhdr_root header in include-path" >&5
6770 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6771 if test "${cf_cv_ncurses_h+set}" = set; then
6772   echo $ECHO_N "(cached) $ECHO_C" >&6
6773 else
6774
6775         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6776         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6777         for cf_header in $cf_header_list
6778         do
6779
6780         cat >conftest.$ac_ext <<_ACEOF
6781 #line 6781 "configure"
6782 #include "confdefs.h"
6783
6784 #include <$cf_header>
6785 int
6786 main ()
6787 {
6788
6789 #ifdef NCURSES_VERSION
6790
6791 printf("%s\n", NCURSES_VERSION);
6792 #else
6793 #ifdef __NCURSES_H
6794 printf("old\n");
6795 #else
6796         make an error
6797 #endif
6798 #endif
6799
6800   ;
6801   return 0;
6802 }
6803 _ACEOF
6804 rm -f conftest.$ac_objext
6805 if { (eval echo "$as_me:6805: \"$ac_compile\"") >&5
6806   (eval $ac_compile) 2>&5
6807   ac_status=$?
6808   echo "$as_me:6808: \$? = $ac_status" >&5
6809   (exit $ac_status); } &&
6810          { ac_try='test -s conftest.$ac_objext'
6811   { (eval echo "$as_me:6811: \"$ac_try\"") >&5
6812   (eval $ac_try) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit $ac_status); }; }; then
6816   cf_cv_ncurses_h=$cf_header
6817
6818 else
6819   echo "$as_me: failed program was:" >&5
6820 cat conftest.$ac_ext >&5
6821 cf_cv_ncurses_h=no
6822 fi
6823 rm -f conftest.$ac_objext conftest.$ac_ext
6824
6825                 test "$cf_cv_ncurses_h" != no && break
6826         done
6827
6828 fi
6829 echo "$as_me:6829: result: $cf_cv_ncurses_h" >&5
6830 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6831
6832 if test "$cf_cv_ncurses_h" != no ; then
6833         cf_cv_ncurses_header=$cf_cv_ncurses_h
6834 else
6835
6836 echo "$as_me:6836: checking for $cf_ncuhdr_root include-path" >&5
6837 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6838 if test "${cf_cv_ncurses_h2+set}" = set; then
6839   echo $ECHO_N "(cached) $ECHO_C" >&6
6840 else
6841
6842         test -n "$verbose" && echo
6843
6844 cf_search=
6845
6846 # collect the current set of include-directories from compiler flags
6847 cf_header_path_list=""
6848 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6849         for cf_header_path in $CPPFLAGS $CFLAGS
6850         do
6851                 case $cf_header_path in #(vi
6852                 -I*)
6853                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6854
6855 test "$cf_header_path" != "NONE" && \
6856 test -d "$cf_header_path" && \
6857  {
6858         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
6859         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
6860         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6861         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6862         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6863         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"
6864 }
6865
6866                         cf_header_path_list="$cf_header_path_list $cf_search"
6867                         ;;
6868                 esac
6869         done
6870 fi
6871
6872 # add the variations for the package we are looking for
6873
6874 cf_search=
6875
6876 test "/usr" != "$prefix" && \
6877 test -d "/usr" && \
6878 (test $prefix = NONE || test "/usr" != "$prefix") && {
6879         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
6880         test -d /usr/include &&          cf_search="$cf_search /usr/include"
6881         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6882         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6883         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6884         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6885 }
6886
6887 test "$prefix" != "NONE" && \
6888 test -d "$prefix" && \
6889  {
6890         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
6891         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
6892         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6893         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6894         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6895         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6896 }
6897
6898 test "/usr/local" != "$prefix" && \
6899 test -d "/usr/local" && \
6900 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6901         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
6902         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
6903         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6904         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6905         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6906         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6907 }
6908
6909 test "/opt" != "$prefix" && \
6910 test -d "/opt" && \
6911 (test $prefix = NONE || test "/opt" != "$prefix") && {
6912         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
6913         test -d /opt/include &&          cf_search="$cf_search /opt/include"
6914         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6915         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6916         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6917         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6918 }
6919
6920 test "$HOME" != "$prefix" && \
6921 test -d "$HOME" && \
6922 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6923         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
6924         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
6925         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6926         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6927         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6928         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6929 }
6930
6931 test "$includedir" != NONE && \
6932 test "$includedir" != "/usr/include" && \
6933 test -d "$includedir" && {
6934         test -d $includedir &&    cf_search="$cf_search $includedir"
6935         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6936 }
6937
6938 test "$oldincludedir" != NONE && \
6939 test "$oldincludedir" != "/usr/include" && \
6940 test -d "$oldincludedir" && {
6941         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
6942         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6943 }
6944
6945 cf_search="$cf_search $cf_header_path_list"
6946
6947         test -n "$verbose" && echo search path $cf_search
6948         cf_save2_CPPFLAGS="$CPPFLAGS"
6949         for cf_incdir in $cf_search
6950         do
6951
6952 if test -n "$cf_incdir" ; then
6953   for cf_add_incdir in $cf_incdir
6954   do
6955         while test $cf_add_incdir != /usr/include
6956         do
6957           if test -d $cf_add_incdir
6958           then
6959                 cf_have_incdir=no
6960                 if test -n "$CFLAGS$CPPFLAGS" ; then
6961                   # a loop is needed to ensure we can add subdirs of existing dirs
6962                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6963                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6964                           cf_have_incdir=yes; break
6965                         fi
6966                   done
6967                 fi
6968
6969                 if test "$cf_have_incdir" = no ; then
6970                   if test "$cf_add_incdir" = /usr/local/include ; then
6971                         if test "$GCC" = yes
6972                         then
6973                           cf_save_CPPFLAGS=$CPPFLAGS
6974                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6975                           cat >conftest.$ac_ext <<_ACEOF
6976 #line 6976 "configure"
6977 #include "confdefs.h"
6978 #include <stdio.h>
6979 int
6980 main ()
6981 {
6982 printf("Hello")
6983   ;
6984   return 0;
6985 }
6986 _ACEOF
6987 rm -f conftest.$ac_objext
6988 if { (eval echo "$as_me:6988: \"$ac_compile\"") >&5
6989   (eval $ac_compile) 2>&5
6990   ac_status=$?
6991   echo "$as_me:6991: \$? = $ac_status" >&5
6992   (exit $ac_status); } &&
6993          { ac_try='test -s conftest.$ac_objext'
6994   { (eval echo "$as_me:6994: \"$ac_try\"") >&5
6995   (eval $ac_try) 2>&5
6996   ac_status=$?
6997   echo "$as_me:6997: \$? = $ac_status" >&5
6998   (exit $ac_status); }; }; then
6999   :
7000 else
7001   echo "$as_me: failed program was:" >&5
7002 cat conftest.$ac_ext >&5
7003 cf_have_incdir=yes
7004 fi
7005 rm -f conftest.$ac_objext conftest.$ac_ext
7006                           CPPFLAGS=$cf_save_CPPFLAGS
7007                         fi
7008                   fi
7009                 fi
7010
7011                 if test "$cf_have_incdir" = no ; then
7012                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7013
7014 echo "${as_me:-configure}:7014: testing adding $cf_add_incdir to include-path ..." 1>&5
7015
7016                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7017
7018                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7019                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7020                   cf_add_incdir="$cf_top_incdir"
7021                 else
7022                   break
7023                 fi
7024           fi
7025         done
7026   done
7027 fi
7028
7029                 for cf_header in \
7030                         ncurses.h \
7031                         curses.h
7032                 do
7033
7034         cat >conftest.$ac_ext <<_ACEOF
7035 #line 7035 "configure"
7036 #include "confdefs.h"
7037
7038 #include <$cf_header>
7039 int
7040 main ()
7041 {
7042
7043 #ifdef NCURSES_VERSION
7044
7045 printf("%s\n", NCURSES_VERSION);
7046 #else
7047 #ifdef __NCURSES_H
7048 printf("old\n");
7049 #else
7050         make an error
7051 #endif
7052 #endif
7053
7054   ;
7055   return 0;
7056 }
7057 _ACEOF
7058 rm -f conftest.$ac_objext
7059 if { (eval echo "$as_me:7059: \"$ac_compile\"") >&5
7060   (eval $ac_compile) 2>&5
7061   ac_status=$?
7062   echo "$as_me:7062: \$? = $ac_status" >&5
7063   (exit $ac_status); } &&
7064          { ac_try='test -s conftest.$ac_objext'
7065   { (eval echo "$as_me:7065: \"$ac_try\"") >&5
7066   (eval $ac_try) 2>&5
7067   ac_status=$?
7068   echo "$as_me:7068: \$? = $ac_status" >&5
7069   (exit $ac_status); }; }; then
7070   cf_cv_ncurses_h2=$cf_header
7071
7072 else
7073   echo "$as_me: failed program was:" >&5
7074 cat conftest.$ac_ext >&5
7075 cf_cv_ncurses_h2=no
7076 fi
7077 rm -f conftest.$ac_objext conftest.$ac_ext
7078
7079                         if test "$cf_cv_ncurses_h2" != no ; then
7080                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7081                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
7082                                 break
7083                         fi
7084                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
7085                 done
7086                 CPPFLAGS="$cf_save2_CPPFLAGS"
7087                 test "$cf_cv_ncurses_h2" != no && break
7088         done
7089         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7089: error: not found" >&5
7090 echo "$as_me: error: not found" >&2;}
7091    { (exit 1); exit 1; }; }
7092
7093 fi
7094 echo "$as_me:7094: result: $cf_cv_ncurses_h2" >&5
7095 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7096
7097         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7098         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7099         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7100                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7101         fi
7102
7103 if test -n "$cf_1st_incdir" ; then
7104   for cf_add_incdir in $cf_1st_incdir
7105   do
7106         while test $cf_add_incdir != /usr/include
7107         do
7108           if test -d $cf_add_incdir
7109           then
7110                 cf_have_incdir=no
7111                 if test -n "$CFLAGS$CPPFLAGS" ; then
7112                   # a loop is needed to ensure we can add subdirs of existing dirs
7113                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7114                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7115                           cf_have_incdir=yes; break
7116                         fi
7117                   done
7118                 fi
7119
7120                 if test "$cf_have_incdir" = no ; then
7121                   if test "$cf_add_incdir" = /usr/local/include ; then
7122                         if test "$GCC" = yes
7123                         then
7124                           cf_save_CPPFLAGS=$CPPFLAGS
7125                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7126                           cat >conftest.$ac_ext <<_ACEOF
7127 #line 7127 "configure"
7128 #include "confdefs.h"
7129 #include <stdio.h>
7130 int
7131 main ()
7132 {
7133 printf("Hello")
7134   ;
7135   return 0;
7136 }
7137 _ACEOF
7138 rm -f conftest.$ac_objext
7139 if { (eval echo "$as_me:7139: \"$ac_compile\"") >&5
7140   (eval $ac_compile) 2>&5
7141   ac_status=$?
7142   echo "$as_me:7142: \$? = $ac_status" >&5
7143   (exit $ac_status); } &&
7144          { ac_try='test -s conftest.$ac_objext'
7145   { (eval echo "$as_me:7145: \"$ac_try\"") >&5
7146   (eval $ac_try) 2>&5
7147   ac_status=$?
7148   echo "$as_me:7148: \$? = $ac_status" >&5
7149   (exit $ac_status); }; }; then
7150   :
7151 else
7152   echo "$as_me: failed program was:" >&5
7153 cat conftest.$ac_ext >&5
7154 cf_have_incdir=yes
7155 fi
7156 rm -f conftest.$ac_objext conftest.$ac_ext
7157                           CPPFLAGS=$cf_save_CPPFLAGS
7158                         fi
7159                   fi
7160                 fi
7161
7162                 if test "$cf_have_incdir" = no ; then
7163                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7164
7165 echo "${as_me:-configure}:7165: testing adding $cf_add_incdir to include-path ..." 1>&5
7166
7167                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7168
7169                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7170                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7171                   cf_add_incdir="$cf_top_incdir"
7172                 else
7173                   break
7174                 fi
7175           fi
7176         done
7177   done
7178 fi
7179
7180 fi
7181
7182 # Set definitions to allow ifdef'ing for ncurses.h
7183
7184 case $cf_cv_ncurses_header in # (vi
7185 *ncurses.h)
7186         cat >>confdefs.h <<\EOF
7187 #define HAVE_NCURSES_H 1
7188 EOF
7189
7190         ;;
7191 esac
7192
7193 case $cf_cv_ncurses_header in # (vi
7194 ncurses/curses.h|ncurses/ncurses.h)
7195         cat >>confdefs.h <<\EOF
7196 #define HAVE_NCURSES_NCURSES_H 1
7197 EOF
7198
7199         ;;
7200 ncursesw/curses.h|ncursesw/ncurses.h)
7201         cat >>confdefs.h <<\EOF
7202 #define HAVE_NCURSESW_NCURSES_H 1
7203 EOF
7204
7205         ;;
7206 esac
7207
7208 echo "$as_me:7208: checking for terminfo header" >&5
7209 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7210 if test "${cf_cv_term_header+set}" = set; then
7211   echo $ECHO_N "(cached) $ECHO_C" >&6
7212 else
7213
7214 case ${cf_cv_ncurses_header} in #(vi
7215 */ncurses.h|*/ncursesw.h) #(vi
7216         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7217         ;;
7218 *)
7219         cf_term_header=term.h
7220         ;;
7221 esac
7222
7223 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7224 do
7225 cat >conftest.$ac_ext <<_ACEOF
7226 #line 7226 "configure"
7227 #include "confdefs.h"
7228 #include <stdio.h>
7229 #include <${cf_cv_ncurses_header:-curses.h}>
7230 #include <$cf_test>
7231
7232 int
7233 main ()
7234 {
7235 int x = auto_left_margin
7236   ;
7237   return 0;
7238 }
7239 _ACEOF
7240 rm -f conftest.$ac_objext
7241 if { (eval echo "$as_me:7241: \"$ac_compile\"") >&5
7242   (eval $ac_compile) 2>&5
7243   ac_status=$?
7244   echo "$as_me:7244: \$? = $ac_status" >&5
7245   (exit $ac_status); } &&
7246          { ac_try='test -s conftest.$ac_objext'
7247   { (eval echo "$as_me:7247: \"$ac_try\"") >&5
7248   (eval $ac_try) 2>&5
7249   ac_status=$?
7250   echo "$as_me:7250: \$? = $ac_status" >&5
7251   (exit $ac_status); }; }; then
7252
7253         cf_cv_term_header="$cf_test"
7254 else
7255   echo "$as_me: failed program was:" >&5
7256 cat conftest.$ac_ext >&5
7257
7258         cf_cv_term_header=unknown
7259
7260 fi
7261 rm -f conftest.$ac_objext conftest.$ac_ext
7262         test "$cf_cv_term_header" != unknown && break
7263 done
7264
7265 fi
7266 echo "$as_me:7266: result: $cf_cv_term_header" >&5
7267 echo "${ECHO_T}$cf_cv_term_header" >&6
7268
7269 # Set definitions to allow ifdef'ing to accommodate subdirectories
7270
7271 case $cf_cv_term_header in # (vi
7272 *term.h)
7273         cat >>confdefs.h <<\EOF
7274 #define HAVE_TERM_H 1
7275 EOF
7276
7277         ;;
7278 esac
7279
7280 case $cf_cv_term_header in # (vi
7281 ncurses/term.h) #(vi
7282         cat >>confdefs.h <<\EOF
7283 #define HAVE_NCURSES_TERM_H 1
7284 EOF
7285
7286         ;;
7287 ncursesw/term.h)
7288         cat >>confdefs.h <<\EOF
7289 #define HAVE_NCURSESW_TERM_H 1
7290 EOF
7291
7292         ;;
7293 esac
7294
7295 # some applications need this, but should check for NCURSES_VERSION
7296 cat >>confdefs.h <<\EOF
7297 #define NCURSES 1
7298 EOF
7299
7300 echo "$as_me:7300: checking for ncurses version" >&5
7301 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7302 if test "${cf_cv_ncurses_version+set}" = set; then
7303   echo $ECHO_N "(cached) $ECHO_C" >&6
7304 else
7305
7306         cf_cv_ncurses_version=no
7307         cf_tempfile=out$$
7308         rm -f $cf_tempfile
7309         if test "$cross_compiling" = yes; then
7310
7311         # This will not work if the preprocessor splits the line after the
7312         # Autoconf token.  The 'unproto' program does that.
7313         cat > conftest.$ac_ext <<EOF
7314 #include <${cf_cv_ncurses_header:-curses.h}>
7315 #undef Autoconf
7316 #ifdef NCURSES_VERSION
7317 Autoconf NCURSES_VERSION
7318 #else
7319 #ifdef __NCURSES_H
7320 Autoconf "old"
7321 #endif
7322 ;
7323 #endif
7324 EOF
7325         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7326         { (eval echo "$as_me:7326: \"$cf_try\"") >&5
7327   (eval $cf_try) 2>&5
7328   ac_status=$?
7329   echo "$as_me:7329: \$? = $ac_status" >&5
7330   (exit $ac_status); }
7331         if test -f conftest.out ; then
7332                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7333                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7334                 rm -f conftest.out
7335         fi
7336
7337 else
7338   cat >conftest.$ac_ext <<_ACEOF
7339 #line 7339 "configure"
7340 #include "confdefs.h"
7341
7342 #include <${cf_cv_ncurses_header:-curses.h}>
7343 #include <stdio.h>
7344 int main()
7345 {
7346         FILE *fp = fopen("$cf_tempfile", "w");
7347 #ifdef NCURSES_VERSION
7348 # ifdef NCURSES_VERSION_PATCH
7349         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7350 # else
7351         fprintf(fp, "%s\n", NCURSES_VERSION);
7352 # endif
7353 #else
7354 # ifdef __NCURSES_H
7355         fprintf(fp, "old\n");
7356 # else
7357         make an error
7358 # endif
7359 #endif
7360         ${cf_cv_main_return:-return}(0);
7361 }
7362 _ACEOF
7363 rm -f conftest$ac_exeext
7364 if { (eval echo "$as_me:7364: \"$ac_link\"") >&5
7365   (eval $ac_link) 2>&5
7366   ac_status=$?
7367   echo "$as_me:7367: \$? = $ac_status" >&5
7368   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7369   { (eval echo "$as_me:7369: \"$ac_try\"") >&5
7370   (eval $ac_try) 2>&5
7371   ac_status=$?
7372   echo "$as_me:7372: \$? = $ac_status" >&5
7373   (exit $ac_status); }; }; then
7374
7375         cf_cv_ncurses_version=`cat $cf_tempfile`
7376 else
7377   echo "$as_me: program exited with status $ac_status" >&5
7378 echo "$as_me: failed program was:" >&5
7379 cat conftest.$ac_ext >&5
7380 fi
7381 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7382 fi
7383         rm -f $cf_tempfile
7384
7385 fi
7386 echo "$as_me:7386: result: $cf_cv_ncurses_version" >&5
7387 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7388 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
7389 #define NCURSES 1
7390 EOF
7391
7392 cf_nculib_root=ncurses
7393         # This works, except for the special case where we find gpm, but
7394         # ncurses is in a nonstandard location via $LIBS, and we really want
7395         # to link gpm.
7396 cf_ncurses_LIBS=""
7397 cf_ncurses_SAVE="$LIBS"
7398 echo "$as_me:7398: checking for Gpm_Open in -lgpm" >&5
7399 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7400 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7401   echo $ECHO_N "(cached) $ECHO_C" >&6
7402 else
7403   ac_check_lib_save_LIBS=$LIBS
7404 LIBS="-lgpm  $LIBS"
7405 cat >conftest.$ac_ext <<_ACEOF
7406 #line 7406 "configure"
7407 #include "confdefs.h"
7408
7409 /* Override any gcc2 internal prototype to avoid an error.  */
7410 #ifdef __cplusplus
7411 extern "C"
7412 #endif
7413 /* We use char because int might match the return type of a gcc2
7414    builtin and then its argument prototype would still apply.  */
7415 char Gpm_Open ();
7416 int
7417 main ()
7418 {
7419 Gpm_Open ();
7420   ;
7421   return 0;
7422 }
7423 _ACEOF
7424 rm -f conftest.$ac_objext conftest$ac_exeext
7425 if { (eval echo "$as_me:7425: \"$ac_link\"") >&5
7426   (eval $ac_link) 2>&5
7427   ac_status=$?
7428   echo "$as_me:7428: \$? = $ac_status" >&5
7429   (exit $ac_status); } &&
7430          { ac_try='test -s conftest$ac_exeext'
7431   { (eval echo "$as_me:7431: \"$ac_try\"") >&5
7432   (eval $ac_try) 2>&5
7433   ac_status=$?
7434   echo "$as_me:7434: \$? = $ac_status" >&5
7435   (exit $ac_status); }; }; then
7436   ac_cv_lib_gpm_Gpm_Open=yes
7437 else
7438   echo "$as_me: failed program was:" >&5
7439 cat conftest.$ac_ext >&5
7440 ac_cv_lib_gpm_Gpm_Open=no
7441 fi
7442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7443 LIBS=$ac_check_lib_save_LIBS
7444 fi
7445 echo "$as_me:7445: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7446 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7447 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7448   echo "$as_me:7448: checking for initscr in -lgpm" >&5
7449 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7450 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7451   echo $ECHO_N "(cached) $ECHO_C" >&6
7452 else
7453   ac_check_lib_save_LIBS=$LIBS
7454 LIBS="-lgpm  $LIBS"
7455 cat >conftest.$ac_ext <<_ACEOF
7456 #line 7456 "configure"
7457 #include "confdefs.h"
7458
7459 /* Override any gcc2 internal prototype to avoid an error.  */
7460 #ifdef __cplusplus
7461 extern "C"
7462 #endif
7463 /* We use char because int might match the return type of a gcc2
7464    builtin and then its argument prototype would still apply.  */
7465 char initscr ();
7466 int
7467 main ()
7468 {
7469 initscr ();
7470   ;
7471   return 0;
7472 }
7473 _ACEOF
7474 rm -f conftest.$ac_objext conftest$ac_exeext
7475 if { (eval echo "$as_me:7475: \"$ac_link\"") >&5
7476   (eval $ac_link) 2>&5
7477   ac_status=$?
7478   echo "$as_me:7478: \$? = $ac_status" >&5
7479   (exit $ac_status); } &&
7480          { ac_try='test -s conftest$ac_exeext'
7481   { (eval echo "$as_me:7481: \"$ac_try\"") >&5
7482   (eval $ac_try) 2>&5
7483   ac_status=$?
7484   echo "$as_me:7484: \$? = $ac_status" >&5
7485   (exit $ac_status); }; }; then
7486   ac_cv_lib_gpm_initscr=yes
7487 else
7488   echo "$as_me: failed program was:" >&5
7489 cat conftest.$ac_ext >&5
7490 ac_cv_lib_gpm_initscr=no
7491 fi
7492 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7493 LIBS=$ac_check_lib_save_LIBS
7494 fi
7495 echo "$as_me:7495: result: $ac_cv_lib_gpm_initscr" >&5
7496 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7497 if test $ac_cv_lib_gpm_initscr = yes; then
7498   LIBS="$cf_ncurses_SAVE"
7499 else
7500   cf_ncurses_LIBS="-lgpm"
7501 fi
7502
7503 fi
7504
7505 case $host_os in #(vi
7506 freebsd*)
7507         # This is only necessary if you are linking against an obsolete
7508         # version of ncurses (but it should do no harm, since it's static).
7509         if test "$cf_nculib_root" = ncurses ; then
7510                 echo "$as_me:7510: checking for tgoto in -lmytinfo" >&5
7511 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7512 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7513   echo $ECHO_N "(cached) $ECHO_C" >&6
7514 else
7515   ac_check_lib_save_LIBS=$LIBS
7516 LIBS="-lmytinfo  $LIBS"
7517 cat >conftest.$ac_ext <<_ACEOF
7518 #line 7518 "configure"
7519 #include "confdefs.h"
7520
7521 /* Override any gcc2 internal prototype to avoid an error.  */
7522 #ifdef __cplusplus
7523 extern "C"
7524 #endif
7525 /* We use char because int might match the return type of a gcc2
7526    builtin and then its argument prototype would still apply.  */
7527 char tgoto ();
7528 int
7529 main ()
7530 {
7531 tgoto ();
7532   ;
7533   return 0;
7534 }
7535 _ACEOF
7536 rm -f conftest.$ac_objext conftest$ac_exeext
7537 if { (eval echo "$as_me:7537: \"$ac_link\"") >&5
7538   (eval $ac_link) 2>&5
7539   ac_status=$?
7540   echo "$as_me:7540: \$? = $ac_status" >&5
7541   (exit $ac_status); } &&
7542          { ac_try='test -s conftest$ac_exeext'
7543   { (eval echo "$as_me:7543: \"$ac_try\"") >&5
7544   (eval $ac_try) 2>&5
7545   ac_status=$?
7546   echo "$as_me:7546: \$? = $ac_status" >&5
7547   (exit $ac_status); }; }; then
7548   ac_cv_lib_mytinfo_tgoto=yes
7549 else
7550   echo "$as_me: failed program was:" >&5
7551 cat conftest.$ac_ext >&5
7552 ac_cv_lib_mytinfo_tgoto=no
7553 fi
7554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7555 LIBS=$ac_check_lib_save_LIBS
7556 fi
7557 echo "$as_me:7557: result: $ac_cv_lib_mytinfo_tgoto" >&5
7558 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7559 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7560   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7561 fi
7562
7563         fi
7564         ;;
7565 esac
7566
7567 LIBS="$cf_ncurses_LIBS $LIBS"
7568
7569 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7570 then
7571         LIBS="-l$cf_nculib_root $LIBS"
7572 else
7573
7574         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7575         cf_libdir=""
7576         echo "$as_me:7576: checking for initscr" >&5
7577 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7578 if test "${ac_cv_func_initscr+set}" = set; then
7579   echo $ECHO_N "(cached) $ECHO_C" >&6
7580 else
7581   cat >conftest.$ac_ext <<_ACEOF
7582 #line 7582 "configure"
7583 #include "confdefs.h"
7584 /* System header to define __stub macros and hopefully few prototypes,
7585     which can conflict with char initscr (); below.  */
7586 #include <assert.h>
7587 /* Override any gcc2 internal prototype to avoid an error.  */
7588 #ifdef __cplusplus
7589 extern "C"
7590 #endif
7591 /* We use char because int might match the return type of a gcc2
7592    builtin and then its argument prototype would still apply.  */
7593 char initscr ();
7594 char (*f) ();
7595
7596 int
7597 main ()
7598 {
7599 /* The GNU C library defines this for functions which it implements
7600     to always fail with ENOSYS.  Some functions are actually named
7601     something starting with __ and the normal name is an alias.  */
7602 #if defined (__stub_initscr) || defined (__stub___initscr)
7603 choke me
7604 #else
7605 f = initscr;
7606 #endif
7607
7608   ;
7609   return 0;
7610 }
7611 _ACEOF
7612 rm -f conftest.$ac_objext conftest$ac_exeext
7613 if { (eval echo "$as_me:7613: \"$ac_link\"") >&5
7614   (eval $ac_link) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); } &&
7618          { ac_try='test -s conftest$ac_exeext'
7619   { (eval echo "$as_me:7619: \"$ac_try\"") >&5
7620   (eval $ac_try) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); }; }; then
7624   ac_cv_func_initscr=yes
7625 else
7626   echo "$as_me: failed program was:" >&5
7627 cat conftest.$ac_ext >&5
7628 ac_cv_func_initscr=no
7629 fi
7630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7631 fi
7632 echo "$as_me:7632: result: $ac_cv_func_initscr" >&5
7633 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7634 if test $ac_cv_func_initscr = yes; then
7635   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7636 else
7637
7638                 cf_save_LIBS="$LIBS"
7639                 echo "$as_me:7639: checking for initscr in -l$cf_nculib_root" >&5
7640 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7641                 LIBS="-l$cf_nculib_root $LIBS"
7642                 cat >conftest.$ac_ext <<_ACEOF
7643 #line 7643 "configure"
7644 #include "confdefs.h"
7645 #include <${cf_cv_ncurses_header:-curses.h}>
7646 int
7647 main ()
7648 {
7649 initscr()
7650   ;
7651   return 0;
7652 }
7653 _ACEOF
7654 rm -f conftest.$ac_objext conftest$ac_exeext
7655 if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
7656   (eval $ac_link) 2>&5
7657   ac_status=$?
7658   echo "$as_me:7658: \$? = $ac_status" >&5
7659   (exit $ac_status); } &&
7660          { ac_try='test -s conftest$ac_exeext'
7661   { (eval echo "$as_me:7661: \"$ac_try\"") >&5
7662   (eval $ac_try) 2>&5
7663   ac_status=$?
7664   echo "$as_me:7664: \$? = $ac_status" >&5
7665   (exit $ac_status); }; }; then
7666   echo "$as_me:7666: result: yes" >&5
7667 echo "${ECHO_T}yes" >&6
7668                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7669
7670 else
7671   echo "$as_me: failed program was:" >&5
7672 cat conftest.$ac_ext >&5
7673 echo "$as_me:7673: result: no" >&5
7674 echo "${ECHO_T}no" >&6
7675
7676 cf_search=
7677 cf_library_path_list=""
7678 if test -n "${LDFLAGS}${LIBS}" ; then
7679         for cf_library_path in $LDFLAGS $LIBS
7680         do
7681                 case $cf_library_path in #(vi
7682                 -L*)
7683                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7684
7685 test "$cf_library_path" != "NONE" && \
7686 test -d "$cf_library_path" && \
7687  {
7688         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7689         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7690         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7691         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7692         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7693         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"
7694 }
7695
7696                         cf_library_path_list="$cf_library_path_list $cf_search"
7697                         ;;
7698                 esac
7699         done
7700 fi
7701
7702 cf_search=
7703
7704 test "/usr" != "$prefix" && \
7705 test -d "/usr" && \
7706 (test $prefix = NONE || test "/usr" != "$prefix") && {
7707         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7708         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7709         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
7710         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7711         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
7712         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7713 }
7714
7715 test "$prefix" != "NONE" && \
7716 test -d "$prefix" && \
7717  {
7718         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7719         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7720         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7721         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7722         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7723         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7724 }
7725
7726 test "/usr/local" != "$prefix" && \
7727 test -d "/usr/local" && \
7728 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7729         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7730         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7731         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7732         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7733         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7734         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7735 }
7736
7737 test "/opt" != "$prefix" && \
7738 test -d "/opt" && \
7739 (test $prefix = NONE || test "/opt" != "$prefix") && {
7740         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7741         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7742         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
7743         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7744         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
7745         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7746 }
7747
7748 test "$HOME" != "$prefix" && \
7749 test -d "$HOME" && \
7750 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7751         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7752         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7753         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7754         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7755         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7756         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7757 }
7758
7759 cf_search="$cf_library_path_list $cf_search"
7760
7761                         for cf_libdir in $cf_search
7762                         do
7763                                 echo "$as_me:7763: checking for -l$cf_nculib_root in $cf_libdir" >&5
7764 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7765                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
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()
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                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7793                                          break
7794 else
7795   echo "$as_me: failed program was:" >&5
7796 cat conftest.$ac_ext >&5
7797 echo "$as_me:7797: result: no" >&5
7798 echo "${ECHO_T}no" >&6
7799                                          LIBS="$cf_save_LIBS"
7800 fi
7801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7802                         done
7803
7804 fi
7805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7806
7807 fi
7808
7809 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7810
7811 if test $cf_found_library = no ; then
7812         { { echo "$as_me:7812: error: Cannot link $cf_nculib_root library" >&5
7813 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7814    { (exit 1); exit 1; }; }
7815 fi
7816
7817 fi
7818
7819 if test -n "$cf_ncurses_LIBS" ; then
7820         echo "$as_me:7820: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7821 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7822         cf_ncurses_SAVE="$LIBS"
7823         for p in $cf_ncurses_LIBS ; do
7824                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7825                 if test "$q" != "$LIBS" ; then
7826                         LIBS="$q"
7827                 fi
7828         done
7829         cat >conftest.$ac_ext <<_ACEOF
7830 #line 7830 "configure"
7831 #include "confdefs.h"
7832 #include <${cf_cv_ncurses_header:-curses.h}>
7833 int
7834 main ()
7835 {
7836 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f conftest.$ac_objext conftest$ac_exeext
7842 if { (eval echo "$as_me:7842: \"$ac_link\"") >&5
7843   (eval $ac_link) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit $ac_status); } &&
7847          { ac_try='test -s conftest$ac_exeext'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit $ac_status); }; }; then
7853   echo "$as_me:7853: result: yes" >&5
7854 echo "${ECHO_T}yes" >&6
7855 else
7856   echo "$as_me: failed program was:" >&5
7857 cat conftest.$ac_ext >&5
7858 echo "$as_me:7858: result: no" >&5
7859 echo "${ECHO_T}no" >&6
7860                  LIBS="$cf_ncurses_SAVE"
7861 fi
7862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7863 fi
7864
7865 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7866
7867 cat >>confdefs.h <<EOF
7868 #define $cf_nculib_ROOT 1
7869 EOF
7870
7871 fi
7872
7873         ;;
7874 ncursesw)
7875         cf_cv_libtype=w
7876
7877 echo "$as_me:7877: checking for multibyte character support" >&5
7878 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7879 if test "${cf_cv_utf8_lib+set}" = set; then
7880   echo $ECHO_N "(cached) $ECHO_C" >&6
7881 else
7882
7883         cf_save_LIBS="$LIBS"
7884         cat >conftest.$ac_ext <<_ACEOF
7885 #line 7885 "configure"
7886 #include "confdefs.h"
7887
7888 #include <stdlib.h>
7889 int
7890 main ()
7891 {
7892 putwc(0,0);
7893   ;
7894   return 0;
7895 }
7896 _ACEOF
7897 rm -f conftest.$ac_objext conftest$ac_exeext
7898 if { (eval echo "$as_me:7898: \"$ac_link\"") >&5
7899   (eval $ac_link) 2>&5
7900   ac_status=$?
7901   echo "$as_me:7901: \$? = $ac_status" >&5
7902   (exit $ac_status); } &&
7903          { ac_try='test -s conftest$ac_exeext'
7904   { (eval echo "$as_me:7904: \"$ac_try\"") >&5
7905   (eval $ac_try) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); }; }; then
7909   cf_cv_utf8_lib=yes
7910 else
7911   echo "$as_me: failed program was:" >&5
7912 cat conftest.$ac_ext >&5
7913
7914 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7915 # will be set on completion of the AC_TRY_LINK below.
7916 cf_cv_header_path_utf8=
7917 cf_cv_library_path_utf8=
7918
7919 echo "${as_me:-configure}:7919: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7920
7921 cf_save_LIBS="$LIBS"
7922
7923 cat >conftest.$ac_ext <<_ACEOF
7924 #line 7924 "configure"
7925 #include "confdefs.h"
7926
7927 #include <libutf8.h>
7928 int
7929 main ()
7930 {
7931 putwc(0,0);
7932   ;
7933   return 0;
7934 }
7935 _ACEOF
7936 rm -f conftest.$ac_objext conftest$ac_exeext
7937 if { (eval echo "$as_me:7937: \"$ac_link\"") >&5
7938   (eval $ac_link) 2>&5
7939   ac_status=$?
7940   echo "$as_me:7940: \$? = $ac_status" >&5
7941   (exit $ac_status); } &&
7942          { ac_try='test -s conftest$ac_exeext'
7943   { (eval echo "$as_me:7943: \"$ac_try\"") >&5
7944   (eval $ac_try) 2>&5
7945   ac_status=$?
7946   echo "$as_me:7946: \$? = $ac_status" >&5
7947   (exit $ac_status); }; }; then
7948
7949         cf_cv_find_linkage_utf8=yes
7950         cf_cv_header_path_utf8=/usr/include
7951         cf_cv_library_path_utf8=/usr/lib
7952
7953 else
7954   echo "$as_me: failed program was:" >&5
7955 cat conftest.$ac_ext >&5
7956
7957 LIBS="-lutf8  $cf_save_LIBS"
7958
7959 cat >conftest.$ac_ext <<_ACEOF
7960 #line 7960 "configure"
7961 #include "confdefs.h"
7962
7963 #include <libutf8.h>
7964 int
7965 main ()
7966 {
7967 putwc(0,0);
7968   ;
7969   return 0;
7970 }
7971 _ACEOF
7972 rm -f conftest.$ac_objext conftest$ac_exeext
7973 if { (eval echo "$as_me:7973: \"$ac_link\"") >&5
7974   (eval $ac_link) 2>&5
7975   ac_status=$?
7976   echo "$as_me:7976: \$? = $ac_status" >&5
7977   (exit $ac_status); } &&
7978          { ac_try='test -s conftest$ac_exeext'
7979   { (eval echo "$as_me:7979: \"$ac_try\"") >&5
7980   (eval $ac_try) 2>&5
7981   ac_status=$?
7982   echo "$as_me:7982: \$? = $ac_status" >&5
7983   (exit $ac_status); }; }; then
7984
7985         cf_cv_find_linkage_utf8=yes
7986         cf_cv_header_path_utf8=/usr/include
7987         cf_cv_library_path_utf8=/usr/lib
7988         cf_cv_library_file_utf8="-lutf8"
7989
7990 else
7991   echo "$as_me: failed program was:" >&5
7992 cat conftest.$ac_ext >&5
7993
7994         cf_cv_find_linkage_utf8=no
7995         LIBS="$cf_save_LIBS"
7996
7997     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7998
7999 echo "${as_me:-configure}:7999: testing find linkage for utf8 library ..." 1>&5
8000
8001 echo "${as_me:-configure}:8001: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8002
8003     cf_save_CPPFLAGS="$CPPFLAGS"
8004     cf_test_CPPFLAGS="$CPPFLAGS"
8005
8006 cf_search=
8007
8008 # collect the current set of include-directories from compiler flags
8009 cf_header_path_list=""
8010 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8011         for cf_header_path in $CPPFLAGS $CFLAGS
8012         do
8013                 case $cf_header_path in #(vi
8014                 -I*)
8015                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8016
8017 test "$cf_header_path" != "NONE" && \
8018 test -d "$cf_header_path" && \
8019  {
8020         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8021         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8022         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8023         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8024         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8025         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8026 }
8027
8028                         cf_header_path_list="$cf_header_path_list $cf_search"
8029                         ;;
8030                 esac
8031         done
8032 fi
8033
8034 # add the variations for the package we are looking for
8035
8036 cf_search=
8037
8038 test "/usr" != "$prefix" && \
8039 test -d "/usr" && \
8040 (test $prefix = NONE || test "/usr" != "$prefix") && {
8041         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8042         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8043         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8044         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8045         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8046         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8047 }
8048
8049 test "$prefix" != "NONE" && \
8050 test -d "$prefix" && \
8051  {
8052         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8053         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8054         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8055         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8056         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8057         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8058 }
8059
8060 test "/usr/local" != "$prefix" && \
8061 test -d "/usr/local" && \
8062 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8063         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8064         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8065         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8066         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8067         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8068         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8069 }
8070
8071 test "/opt" != "$prefix" && \
8072 test -d "/opt" && \
8073 (test $prefix = NONE || test "/opt" != "$prefix") && {
8074         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8075         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8076         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8077         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8078         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8079         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8080 }
8081
8082 test "$HOME" != "$prefix" && \
8083 test -d "$HOME" && \
8084 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8085         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8086         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8087         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8088         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8089         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8090         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8091 }
8092
8093 test "$includedir" != NONE && \
8094 test "$includedir" != "/usr/include" && \
8095 test -d "$includedir" && {
8096         test -d $includedir &&    cf_search="$cf_search $includedir"
8097         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8098 }
8099
8100 test "$oldincludedir" != NONE && \
8101 test "$oldincludedir" != "/usr/include" && \
8102 test -d "$oldincludedir" && {
8103         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8104         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8105 }
8106
8107 cf_search="$cf_search $cf_header_path_list"
8108
8109     for cf_cv_header_path_utf8 in $cf_search
8110     do
8111       if test -d $cf_cv_header_path_utf8 ; then
8112         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8113
8114 echo "${as_me:-configure}:8114: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8115
8116         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8117         cat >conftest.$ac_ext <<_ACEOF
8118 #line 8118 "configure"
8119 #include "confdefs.h"
8120
8121 #include <libutf8.h>
8122 int
8123 main ()
8124 {
8125 putwc(0,0);
8126   ;
8127   return 0;
8128 }
8129 _ACEOF
8130 rm -f conftest.$ac_objext
8131 if { (eval echo "$as_me:8131: \"$ac_compile\"") >&5
8132   (eval $ac_compile) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); } &&
8136          { ac_try='test -s conftest.$ac_objext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142
8143             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8144
8145 echo "${as_me:-configure}:8145: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8146
8147             cf_cv_find_linkage_utf8=maybe
8148             cf_test_CPPFLAGS="$CPPFLAGS"
8149             break
8150 else
8151   echo "$as_me: failed program was:" >&5
8152 cat conftest.$ac_ext >&5
8153
8154             CPPFLAGS="$cf_save_CPPFLAGS"
8155
8156 fi
8157 rm -f conftest.$ac_objext conftest.$ac_ext
8158       fi
8159     done
8160
8161     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8162
8163 echo "${as_me:-configure}:8163: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8164
8165       cf_save_LIBS="$LIBS"
8166       cf_save_LDFLAGS="$LDFLAGS"
8167
8168       if test "$cf_cv_find_linkage_utf8" != yes ; then
8169
8170 cf_search=
8171 cf_library_path_list=""
8172 if test -n "${LDFLAGS}${LIBS}" ; then
8173         for cf_library_path in $LDFLAGS $LIBS
8174         do
8175                 case $cf_library_path in #(vi
8176                 -L*)
8177                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8178
8179 test "$cf_library_path" != "NONE" && \
8180 test -d "$cf_library_path" && \
8181  {
8182         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8183         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8184         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8185         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8186         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8187         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8188 }
8189
8190                         cf_library_path_list="$cf_library_path_list $cf_search"
8191                         ;;
8192                 esac
8193         done
8194 fi
8195
8196 cf_search=
8197
8198 test "/usr" != "$prefix" && \
8199 test -d "/usr" && \
8200 (test $prefix = NONE || test "/usr" != "$prefix") && {
8201         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8202         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8203         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8204         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8205         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8206         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8207 }
8208
8209 test "$prefix" != "NONE" && \
8210 test -d "$prefix" && \
8211  {
8212         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8213         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8214         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8215         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8216         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8217         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8218 }
8219
8220 test "/usr/local" != "$prefix" && \
8221 test -d "/usr/local" && \
8222 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8223         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8224         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8225         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8226         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8227         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8228         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8229 }
8230
8231 test "/opt" != "$prefix" && \
8232 test -d "/opt" && \
8233 (test $prefix = NONE || test "/opt" != "$prefix") && {
8234         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8235         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8236         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8237         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8238         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8239         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8240 }
8241
8242 test "$HOME" != "$prefix" && \
8243 test -d "$HOME" && \
8244 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8245         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8246         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8247         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8248         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8249         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8250         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8251 }
8252
8253 cf_search="$cf_library_path_list $cf_search"
8254
8255         for cf_cv_library_path_utf8 in $cf_search
8256         do
8257           if test -d $cf_cv_library_path_utf8 ; then
8258             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8259
8260 echo "${as_me:-configure}:8260: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8261
8262             CPPFLAGS="$cf_test_CPPFLAGS"
8263             LIBS="-lutf8  $cf_save_LIBS"
8264             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8265             cat >conftest.$ac_ext <<_ACEOF
8266 #line 8266 "configure"
8267 #include "confdefs.h"
8268
8269 #include <libutf8.h>
8270 int
8271 main ()
8272 {
8273 putwc(0,0);
8274   ;
8275   return 0;
8276 }
8277 _ACEOF
8278 rm -f conftest.$ac_objext conftest$ac_exeext
8279 if { (eval echo "$as_me:8279: \"$ac_link\"") >&5
8280   (eval $ac_link) 2>&5
8281   ac_status=$?
8282   echo "$as_me:8282: \$? = $ac_status" >&5
8283   (exit $ac_status); } &&
8284          { ac_try='test -s conftest$ac_exeext'
8285   { (eval echo "$as_me:8285: \"$ac_try\"") >&5
8286   (eval $ac_try) 2>&5
8287   ac_status=$?
8288   echo "$as_me:8288: \$? = $ac_status" >&5
8289   (exit $ac_status); }; }; then
8290
8291                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8292
8293 echo "${as_me:-configure}:8293: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8294
8295                 cf_cv_find_linkage_utf8=yes
8296                 cf_cv_library_file_utf8="-lutf8"
8297                 break
8298 else
8299   echo "$as_me: failed program was:" >&5
8300 cat conftest.$ac_ext >&5
8301
8302                 CPPFLAGS="$cf_save_CPPFLAGS"
8303                 LIBS="$cf_save_LIBS"
8304                 LDFLAGS="$cf_save_LDFLAGS"
8305
8306 fi
8307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8308           fi
8309         done
8310         CPPFLAGS="$cf_save_CPPFLAGS"
8311         LDFLAGS="$cf_save_LDFLAGS"
8312       fi
8313
8314     else
8315       cf_cv_find_linkage_utf8=no
8316     fi
8317
8318 fi
8319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8320
8321 fi
8322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8323
8324 LIBS="$cf_save_LIBS"
8325
8326 if test "$cf_cv_find_linkage_utf8" = yes ; then
8327 cf_cv_utf8_lib=add-on
8328 else
8329 cf_cv_utf8_lib=no
8330 fi
8331
8332 fi
8333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8334 fi
8335 echo "$as_me:8335: result: $cf_cv_utf8_lib" >&5
8336 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8337
8338 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8339 # ncurses/ncursesw:
8340 if test "$cf_cv_utf8_lib" = "add-on" ; then
8341         cat >>confdefs.h <<\EOF
8342 #define HAVE_LIBUTF8_H 1
8343 EOF
8344
8345 if test -n "$cf_cv_header_path_utf8" ; then
8346   for cf_add_incdir in $cf_cv_header_path_utf8
8347   do
8348         while test $cf_add_incdir != /usr/include
8349         do
8350           if test -d $cf_add_incdir
8351           then
8352                 cf_have_incdir=no
8353                 if test -n "$CFLAGS$CPPFLAGS" ; then
8354                   # a loop is needed to ensure we can add subdirs of existing dirs
8355                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8356                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8357                           cf_have_incdir=yes; break
8358                         fi
8359                   done
8360                 fi
8361
8362                 if test "$cf_have_incdir" = no ; then
8363                   if test "$cf_add_incdir" = /usr/local/include ; then
8364                         if test "$GCC" = yes
8365                         then
8366                           cf_save_CPPFLAGS=$CPPFLAGS
8367                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8368                           cat >conftest.$ac_ext <<_ACEOF
8369 #line 8369 "configure"
8370 #include "confdefs.h"
8371 #include <stdio.h>
8372 int
8373 main ()
8374 {
8375 printf("Hello")
8376   ;
8377   return 0;
8378 }
8379 _ACEOF
8380 rm -f conftest.$ac_objext
8381 if { (eval echo "$as_me:8381: \"$ac_compile\"") >&5
8382   (eval $ac_compile) 2>&5
8383   ac_status=$?
8384   echo "$as_me:8384: \$? = $ac_status" >&5
8385   (exit $ac_status); } &&
8386          { ac_try='test -s conftest.$ac_objext'
8387   { (eval echo "$as_me:8387: \"$ac_try\"") >&5
8388   (eval $ac_try) 2>&5
8389   ac_status=$?
8390   echo "$as_me:8390: \$? = $ac_status" >&5
8391   (exit $ac_status); }; }; then
8392   :
8393 else
8394   echo "$as_me: failed program was:" >&5
8395 cat conftest.$ac_ext >&5
8396 cf_have_incdir=yes
8397 fi
8398 rm -f conftest.$ac_objext conftest.$ac_ext
8399                           CPPFLAGS=$cf_save_CPPFLAGS
8400                         fi
8401                   fi
8402                 fi
8403
8404                 if test "$cf_have_incdir" = no ; then
8405                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8406
8407 echo "${as_me:-configure}:8407: testing adding $cf_add_incdir to include-path ..." 1>&5
8408
8409                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8410
8411                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8412                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8413                   cf_add_incdir="$cf_top_incdir"
8414                 else
8415                   break
8416                 fi
8417           fi
8418         done
8419   done
8420 fi
8421
8422 if test -n "$cf_cv_library_path_utf8" ; then
8423   for cf_add_libdir in $cf_cv_library_path_utf8
8424   do
8425     if test $cf_add_libdir = /usr/lib ; then
8426       :
8427     elif test -d $cf_add_libdir
8428     then
8429       cf_have_libdir=no
8430       if test -n "$LDFLAGS$LIBS" ; then
8431         # a loop is needed to ensure we can add subdirs of existing dirs
8432         for cf_test_libdir in $LDFLAGS $LIBS ; do
8433           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8434             cf_have_libdir=yes; break
8435           fi
8436         done
8437       fi
8438       if test "$cf_have_libdir" = no ; then
8439         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8440
8441 echo "${as_me:-configure}:8441: testing adding $cf_add_libdir to library-path ..." 1>&5
8442
8443         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8444       fi
8445     fi
8446   done
8447 fi
8448
8449         LIBS="$cf_cv_library_file_utf8 $LIBS"
8450 fi
8451
8452 cf_ncuconfig_root=ncursesw
8453
8454 echo "Looking for ${cf_ncuconfig_root}-config"
8455 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8456 do
8457   # Extract the first word of "$ac_prog", so it can be a program name with args.
8458 set dummy $ac_prog; ac_word=$2
8459 echo "$as_me:8459: checking for $ac_word" >&5
8460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8461 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
8462   echo $ECHO_N "(cached) $ECHO_C" >&6
8463 else
8464   case $NCURSES_CONFIG in
8465   [\\/]* | ?:[\\/]*)
8466   ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
8467   ;;
8468   *)
8469   ac_save_IFS=$IFS; IFS=$ac_path_separator
8470 ac_dummy="$PATH"
8471 for ac_dir in $ac_dummy; do
8472   IFS=$ac_save_IFS
8473   test -z "$ac_dir" && ac_dir=.
8474   if $as_executable_p "$ac_dir/$ac_word"; then
8475    ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
8476    echo "$as_me:8476: found $ac_dir/$ac_word" >&5
8477    break
8478 fi
8479 done
8480
8481   ;;
8482 esac
8483 fi
8484 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
8485
8486 if test -n "$NCURSES_CONFIG"; then
8487   echo "$as_me:8487: result: $NCURSES_CONFIG" >&5
8488 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8489 else
8490   echo "$as_me:8490: result: no" >&5
8491 echo "${ECHO_T}no" >&6
8492 fi
8493
8494   test -n "$NCURSES_CONFIG" && break
8495 done
8496 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
8497
8498 if test "$NCURSES_CONFIG" != none ; then
8499
8500 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8501 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
8502
8503 # even with config script, some packages use no-override for curses.h
8504
8505 echo "$as_me:8505: checking if we have identified curses headers" >&5
8506 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8507 if test "${cf_cv_ncurses_header+set}" = set; then
8508   echo $ECHO_N "(cached) $ECHO_C" >&6
8509 else
8510
8511 cf_cv_ncurses_header=none
8512 for cf_header in  \
8513     ncursesw/ncurses.h \
8514         ncursesw/curses.h \
8515         ncurses.h \
8516         curses.h
8517 do
8518 cat >conftest.$ac_ext <<_ACEOF
8519 #line 8519 "configure"
8520 #include "confdefs.h"
8521 #include <${cf_header}>
8522 int
8523 main ()
8524 {
8525 initscr(); tgoto("?", 0,0)
8526   ;
8527   return 0;
8528 }
8529 _ACEOF
8530 rm -f conftest.$ac_objext
8531 if { (eval echo "$as_me:8531: \"$ac_compile\"") >&5
8532   (eval $ac_compile) 2>&5
8533   ac_status=$?
8534   echo "$as_me:8534: \$? = $ac_status" >&5
8535   (exit $ac_status); } &&
8536          { ac_try='test -s conftest.$ac_objext'
8537   { (eval echo "$as_me:8537: \"$ac_try\"") >&5
8538   (eval $ac_try) 2>&5
8539   ac_status=$?
8540   echo "$as_me:8540: \$? = $ac_status" >&5
8541   (exit $ac_status); }; }; then
8542   cf_cv_ncurses_header=$cf_header; break
8543 else
8544   echo "$as_me: failed program was:" >&5
8545 cat conftest.$ac_ext >&5
8546 fi
8547 rm -f conftest.$ac_objext conftest.$ac_ext
8548 done
8549
8550 fi
8551 echo "$as_me:8551: result: $cf_cv_ncurses_header" >&5
8552 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8553
8554 if test "$cf_cv_ncurses_header" = none ; then
8555         { { echo "$as_me:8555: error: No curses header-files found" >&5
8556 echo "$as_me: error: No curses header-files found" >&2;}
8557    { (exit 1); exit 1; }; }
8558 fi
8559
8560 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8561
8562 for ac_header in $cf_cv_ncurses_header
8563 do
8564 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8565 echo "$as_me:8565: checking for $ac_header" >&5
8566 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8567 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8568   echo $ECHO_N "(cached) $ECHO_C" >&6
8569 else
8570   cat >conftest.$ac_ext <<_ACEOF
8571 #line 8571 "configure"
8572 #include "confdefs.h"
8573 #include <$ac_header>
8574 _ACEOF
8575 if { (eval echo "$as_me:8575: \"$ac_cpp conftest.$ac_ext\"") >&5
8576   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8577   ac_status=$?
8578   egrep -v '^ *\+' conftest.er1 >conftest.err
8579   rm -f conftest.er1
8580   cat conftest.err >&5
8581   echo "$as_me:8581: \$? = $ac_status" >&5
8582   (exit $ac_status); } >/dev/null; then
8583   if test -s conftest.err; then
8584     ac_cpp_err=$ac_c_preproc_warn_flag
8585   else
8586     ac_cpp_err=
8587   fi
8588 else
8589   ac_cpp_err=yes
8590 fi
8591 if test -z "$ac_cpp_err"; then
8592   eval "$as_ac_Header=yes"
8593 else
8594   echo "$as_me: failed program was:" >&5
8595   cat conftest.$ac_ext >&5
8596   eval "$as_ac_Header=no"
8597 fi
8598 rm -f conftest.err conftest.$ac_ext
8599 fi
8600 echo "$as_me:8600: result: `eval echo '${'$as_ac_Header'}'`" >&5
8601 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8602 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8603   cat >>confdefs.h <<EOF
8604 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8605 EOF
8606
8607 fi
8608 done
8609
8610 cat >>confdefs.h <<\EOF
8611 #define NCURSES 1
8612 EOF
8613
8614 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8615
8616 cat >>confdefs.h <<EOF
8617 #define $cf_nculib_ROOT 1
8618 EOF
8619
8620 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8621
8622 else
8623
8624 cf_ncuhdr_root=ncursesw
8625
8626 test -n "$cf_cv_curses_dir" && \
8627 test "$cf_cv_curses_dir" != "no" && { \
8628
8629 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8630   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8631   do
8632         while test $cf_add_incdir != /usr/include
8633         do
8634           if test -d $cf_add_incdir
8635           then
8636                 cf_have_incdir=no
8637                 if test -n "$CFLAGS$CPPFLAGS" ; then
8638                   # a loop is needed to ensure we can add subdirs of existing dirs
8639                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8640                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8641                           cf_have_incdir=yes; break
8642                         fi
8643                   done
8644                 fi
8645
8646                 if test "$cf_have_incdir" = no ; then
8647                   if test "$cf_add_incdir" = /usr/local/include ; then
8648                         if test "$GCC" = yes
8649                         then
8650                           cf_save_CPPFLAGS=$CPPFLAGS
8651                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8652                           cat >conftest.$ac_ext <<_ACEOF
8653 #line 8653 "configure"
8654 #include "confdefs.h"
8655 #include <stdio.h>
8656 int
8657 main ()
8658 {
8659 printf("Hello")
8660   ;
8661   return 0;
8662 }
8663 _ACEOF
8664 rm -f conftest.$ac_objext
8665 if { (eval echo "$as_me:8665: \"$ac_compile\"") >&5
8666   (eval $ac_compile) 2>&5
8667   ac_status=$?
8668   echo "$as_me:8668: \$? = $ac_status" >&5
8669   (exit $ac_status); } &&
8670          { ac_try='test -s conftest.$ac_objext'
8671   { (eval echo "$as_me:8671: \"$ac_try\"") >&5
8672   (eval $ac_try) 2>&5
8673   ac_status=$?
8674   echo "$as_me:8674: \$? = $ac_status" >&5
8675   (exit $ac_status); }; }; then
8676   :
8677 else
8678   echo "$as_me: failed program was:" >&5
8679 cat conftest.$ac_ext >&5
8680 cf_have_incdir=yes
8681 fi
8682 rm -f conftest.$ac_objext conftest.$ac_ext
8683                           CPPFLAGS=$cf_save_CPPFLAGS
8684                         fi
8685                   fi
8686                 fi
8687
8688                 if test "$cf_have_incdir" = no ; then
8689                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8690
8691 echo "${as_me:-configure}:8691: testing adding $cf_add_incdir to include-path ..." 1>&5
8692
8693                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8694
8695                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8696                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8697                   cf_add_incdir="$cf_top_incdir"
8698                 else
8699                   break
8700                 fi
8701           fi
8702         done
8703   done
8704 fi
8705
8706 }
8707
8708 echo "$as_me:8708: checking for $cf_ncuhdr_root header in include-path" >&5
8709 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8710 if test "${cf_cv_ncurses_h+set}" = set; then
8711   echo $ECHO_N "(cached) $ECHO_C" >&6
8712 else
8713
8714         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8715         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8716         for cf_header in $cf_header_list
8717         do
8718
8719         cat >conftest.$ac_ext <<_ACEOF
8720 #line 8720 "configure"
8721 #include "confdefs.h"
8722
8723 #define _XOPEN_SOURCE_EXTENDED
8724 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
8725 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
8726
8727 #include <$cf_header>
8728 int
8729 main ()
8730 {
8731
8732 #ifdef NCURSES_VERSION
8733
8734 #ifndef WACS_BSSB
8735         make an error
8736 #endif
8737
8738 printf("%s\n", NCURSES_VERSION);
8739 #else
8740 #ifdef __NCURSES_H
8741 printf("old\n");
8742 #else
8743         make an error
8744 #endif
8745 #endif
8746
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 rm -f conftest.$ac_objext
8752 if { (eval echo "$as_me:8752: \"$ac_compile\"") >&5
8753   (eval $ac_compile) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit $ac_status); } &&
8757          { ac_try='test -s conftest.$ac_objext'
8758   { (eval echo "$as_me:8758: \"$ac_try\"") >&5
8759   (eval $ac_try) 2>&5
8760   ac_status=$?
8761   echo "$as_me:8761: \$? = $ac_status" >&5
8762   (exit $ac_status); }; }; then
8763   cf_cv_ncurses_h=$cf_header
8764
8765 else
8766   echo "$as_me: failed program was:" >&5
8767 cat conftest.$ac_ext >&5
8768 cf_cv_ncurses_h=no
8769 fi
8770 rm -f conftest.$ac_objext conftest.$ac_ext
8771
8772                 test "$cf_cv_ncurses_h" != no && break
8773         done
8774
8775 fi
8776 echo "$as_me:8776: result: $cf_cv_ncurses_h" >&5
8777 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8778
8779 if test "$cf_cv_ncurses_h" != no ; then
8780         cf_cv_ncurses_header=$cf_cv_ncurses_h
8781 else
8782
8783 echo "$as_me:8783: checking for $cf_ncuhdr_root include-path" >&5
8784 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8785 if test "${cf_cv_ncurses_h2+set}" = set; then
8786   echo $ECHO_N "(cached) $ECHO_C" >&6
8787 else
8788
8789         test -n "$verbose" && echo
8790
8791 cf_search=
8792
8793 # collect the current set of include-directories from compiler flags
8794 cf_header_path_list=""
8795 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8796         for cf_header_path in $CPPFLAGS $CFLAGS
8797         do
8798                 case $cf_header_path in #(vi
8799                 -I*)
8800                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8801
8802 test "$cf_header_path" != "NONE" && \
8803 test -d "$cf_header_path" && \
8804  {
8805         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8806         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8807         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8808         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8809         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8810         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"
8811 }
8812
8813                         cf_header_path_list="$cf_header_path_list $cf_search"
8814                         ;;
8815                 esac
8816         done
8817 fi
8818
8819 # add the variations for the package we are looking for
8820
8821 cf_search=
8822
8823 test "/usr" != "$prefix" && \
8824 test -d "/usr" && \
8825 (test $prefix = NONE || test "/usr" != "$prefix") && {
8826         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8827         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8828         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8829         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8830         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8831         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8832 }
8833
8834 test "$prefix" != "NONE" && \
8835 test -d "$prefix" && \
8836  {
8837         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8838         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8839         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8840         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8841         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8842         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8843 }
8844
8845 test "/usr/local" != "$prefix" && \
8846 test -d "/usr/local" && \
8847 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8848         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8849         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8850         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8851         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8852         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8853         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8854 }
8855
8856 test "/opt" != "$prefix" && \
8857 test -d "/opt" && \
8858 (test $prefix = NONE || test "/opt" != "$prefix") && {
8859         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8860         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8861         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8862         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8863         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8864         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8865 }
8866
8867 test "$HOME" != "$prefix" && \
8868 test -d "$HOME" && \
8869 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8870         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8871         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8872         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8873         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8874         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8875         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8876 }
8877
8878 test "$includedir" != NONE && \
8879 test "$includedir" != "/usr/include" && \
8880 test -d "$includedir" && {
8881         test -d $includedir &&    cf_search="$cf_search $includedir"
8882         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8883 }
8884
8885 test "$oldincludedir" != NONE && \
8886 test "$oldincludedir" != "/usr/include" && \
8887 test -d "$oldincludedir" && {
8888         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8889         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8890 }
8891
8892 cf_search="$cf_search $cf_header_path_list"
8893
8894         test -n "$verbose" && echo search path $cf_search
8895         cf_save2_CPPFLAGS="$CPPFLAGS"
8896         for cf_incdir in $cf_search
8897         do
8898
8899 if test -n "$cf_incdir" ; then
8900   for cf_add_incdir in $cf_incdir
8901   do
8902         while test $cf_add_incdir != /usr/include
8903         do
8904           if test -d $cf_add_incdir
8905           then
8906                 cf_have_incdir=no
8907                 if test -n "$CFLAGS$CPPFLAGS" ; then
8908                   # a loop is needed to ensure we can add subdirs of existing dirs
8909                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8910                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8911                           cf_have_incdir=yes; break
8912                         fi
8913                   done
8914                 fi
8915
8916                 if test "$cf_have_incdir" = no ; then
8917                   if test "$cf_add_incdir" = /usr/local/include ; then
8918                         if test "$GCC" = yes
8919                         then
8920                           cf_save_CPPFLAGS=$CPPFLAGS
8921                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8922                           cat >conftest.$ac_ext <<_ACEOF
8923 #line 8923 "configure"
8924 #include "confdefs.h"
8925 #include <stdio.h>
8926 int
8927 main ()
8928 {
8929 printf("Hello")
8930   ;
8931   return 0;
8932 }
8933 _ACEOF
8934 rm -f conftest.$ac_objext
8935 if { (eval echo "$as_me:8935: \"$ac_compile\"") >&5
8936   (eval $ac_compile) 2>&5
8937   ac_status=$?
8938   echo "$as_me:8938: \$? = $ac_status" >&5
8939   (exit $ac_status); } &&
8940          { ac_try='test -s conftest.$ac_objext'
8941   { (eval echo "$as_me:8941: \"$ac_try\"") >&5
8942   (eval $ac_try) 2>&5
8943   ac_status=$?
8944   echo "$as_me:8944: \$? = $ac_status" >&5
8945   (exit $ac_status); }; }; then
8946   :
8947 else
8948   echo "$as_me: failed program was:" >&5
8949 cat conftest.$ac_ext >&5
8950 cf_have_incdir=yes
8951 fi
8952 rm -f conftest.$ac_objext conftest.$ac_ext
8953                           CPPFLAGS=$cf_save_CPPFLAGS
8954                         fi
8955                   fi
8956                 fi
8957
8958                 if test "$cf_have_incdir" = no ; then
8959                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8960
8961 echo "${as_me:-configure}:8961: testing adding $cf_add_incdir to include-path ..." 1>&5
8962
8963                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8964
8965                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8966                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8967                   cf_add_incdir="$cf_top_incdir"
8968                 else
8969                   break
8970                 fi
8971           fi
8972         done
8973   done
8974 fi
8975
8976                 for cf_header in \
8977                         ncurses.h \
8978                         curses.h
8979                 do
8980
8981         cat >conftest.$ac_ext <<_ACEOF
8982 #line 8982 "configure"
8983 #include "confdefs.h"
8984
8985 #include <$cf_header>
8986 int
8987 main ()
8988 {
8989
8990 #ifdef NCURSES_VERSION
8991
8992 printf("%s\n", NCURSES_VERSION);
8993 #else
8994 #ifdef __NCURSES_H
8995 printf("old\n");
8996 #else
8997         make an error
8998 #endif
8999 #endif
9000
9001   ;
9002   return 0;
9003 }
9004 _ACEOF
9005 rm -f conftest.$ac_objext
9006 if { (eval echo "$as_me:9006: \"$ac_compile\"") >&5
9007   (eval $ac_compile) 2>&5
9008   ac_status=$?
9009   echo "$as_me:9009: \$? = $ac_status" >&5
9010   (exit $ac_status); } &&
9011          { ac_try='test -s conftest.$ac_objext'
9012   { (eval echo "$as_me:9012: \"$ac_try\"") >&5
9013   (eval $ac_try) 2>&5
9014   ac_status=$?
9015   echo "$as_me:9015: \$? = $ac_status" >&5
9016   (exit $ac_status); }; }; then
9017   cf_cv_ncurses_h2=$cf_header
9018
9019 else
9020   echo "$as_me: failed program was:" >&5
9021 cat conftest.$ac_ext >&5
9022 cf_cv_ncurses_h2=no
9023 fi
9024 rm -f conftest.$ac_objext conftest.$ac_ext
9025
9026                         if test "$cf_cv_ncurses_h2" != no ; then
9027                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9028                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
9029                                 break
9030                         fi
9031                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
9032                 done
9033                 CPPFLAGS="$cf_save2_CPPFLAGS"
9034                 test "$cf_cv_ncurses_h2" != no && break
9035         done
9036         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9036: error: not found" >&5
9037 echo "$as_me: error: not found" >&2;}
9038    { (exit 1); exit 1; }; }
9039
9040 fi
9041 echo "$as_me:9041: result: $cf_cv_ncurses_h2" >&5
9042 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9043
9044         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9045         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9046         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9047                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9048         fi
9049
9050 if test -n "$cf_1st_incdir" ; then
9051   for cf_add_incdir in $cf_1st_incdir
9052   do
9053         while test $cf_add_incdir != /usr/include
9054         do
9055           if test -d $cf_add_incdir
9056           then
9057                 cf_have_incdir=no
9058                 if test -n "$CFLAGS$CPPFLAGS" ; then
9059                   # a loop is needed to ensure we can add subdirs of existing dirs
9060                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9061                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9062                           cf_have_incdir=yes; break
9063                         fi
9064                   done
9065                 fi
9066
9067                 if test "$cf_have_incdir" = no ; then
9068                   if test "$cf_add_incdir" = /usr/local/include ; then
9069                         if test "$GCC" = yes
9070                         then
9071                           cf_save_CPPFLAGS=$CPPFLAGS
9072                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9073                           cat >conftest.$ac_ext <<_ACEOF
9074 #line 9074 "configure"
9075 #include "confdefs.h"
9076 #include <stdio.h>
9077 int
9078 main ()
9079 {
9080 printf("Hello")
9081   ;
9082   return 0;
9083 }
9084 _ACEOF
9085 rm -f conftest.$ac_objext
9086 if { (eval echo "$as_me:9086: \"$ac_compile\"") >&5
9087   (eval $ac_compile) 2>&5
9088   ac_status=$?
9089   echo "$as_me:9089: \$? = $ac_status" >&5
9090   (exit $ac_status); } &&
9091          { ac_try='test -s conftest.$ac_objext'
9092   { (eval echo "$as_me:9092: \"$ac_try\"") >&5
9093   (eval $ac_try) 2>&5
9094   ac_status=$?
9095   echo "$as_me:9095: \$? = $ac_status" >&5
9096   (exit $ac_status); }; }; then
9097   :
9098 else
9099   echo "$as_me: failed program was:" >&5
9100 cat conftest.$ac_ext >&5
9101 cf_have_incdir=yes
9102 fi
9103 rm -f conftest.$ac_objext conftest.$ac_ext
9104                           CPPFLAGS=$cf_save_CPPFLAGS
9105                         fi
9106                   fi
9107                 fi
9108
9109                 if test "$cf_have_incdir" = no ; then
9110                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9111
9112 echo "${as_me:-configure}:9112: testing adding $cf_add_incdir to include-path ..." 1>&5
9113
9114                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9115
9116                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9117                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9118                   cf_add_incdir="$cf_top_incdir"
9119                 else
9120                   break
9121                 fi
9122           fi
9123         done
9124   done
9125 fi
9126
9127 fi
9128
9129 # Set definitions to allow ifdef'ing for ncurses.h
9130
9131 case $cf_cv_ncurses_header in # (vi
9132 *ncurses.h)
9133         cat >>confdefs.h <<\EOF
9134 #define HAVE_NCURSES_H 1
9135 EOF
9136
9137         ;;
9138 esac
9139
9140 case $cf_cv_ncurses_header in # (vi
9141 ncurses/curses.h|ncurses/ncurses.h)
9142         cat >>confdefs.h <<\EOF
9143 #define HAVE_NCURSES_NCURSES_H 1
9144 EOF
9145
9146         ;;
9147 ncursesw/curses.h|ncursesw/ncurses.h)
9148         cat >>confdefs.h <<\EOF
9149 #define HAVE_NCURSESW_NCURSES_H 1
9150 EOF
9151
9152         ;;
9153 esac
9154
9155 echo "$as_me:9155: checking for terminfo header" >&5
9156 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9157 if test "${cf_cv_term_header+set}" = set; then
9158   echo $ECHO_N "(cached) $ECHO_C" >&6
9159 else
9160
9161 case ${cf_cv_ncurses_header} in #(vi
9162 */ncurses.h|*/ncursesw.h) #(vi
9163         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9164         ;;
9165 *)
9166         cf_term_header=term.h
9167         ;;
9168 esac
9169
9170 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9171 do
9172 cat >conftest.$ac_ext <<_ACEOF
9173 #line 9173 "configure"
9174 #include "confdefs.h"
9175 #include <stdio.h>
9176 #include <${cf_cv_ncurses_header:-curses.h}>
9177 #include <$cf_test>
9178
9179 int
9180 main ()
9181 {
9182 int x = auto_left_margin
9183   ;
9184   return 0;
9185 }
9186 _ACEOF
9187 rm -f conftest.$ac_objext
9188 if { (eval echo "$as_me:9188: \"$ac_compile\"") >&5
9189   (eval $ac_compile) 2>&5
9190   ac_status=$?
9191   echo "$as_me:9191: \$? = $ac_status" >&5
9192   (exit $ac_status); } &&
9193          { ac_try='test -s conftest.$ac_objext'
9194   { (eval echo "$as_me:9194: \"$ac_try\"") >&5
9195   (eval $ac_try) 2>&5
9196   ac_status=$?
9197   echo "$as_me:9197: \$? = $ac_status" >&5
9198   (exit $ac_status); }; }; then
9199
9200         cf_cv_term_header="$cf_test"
9201 else
9202   echo "$as_me: failed program was:" >&5
9203 cat conftest.$ac_ext >&5
9204
9205         cf_cv_term_header=unknown
9206
9207 fi
9208 rm -f conftest.$ac_objext conftest.$ac_ext
9209         test "$cf_cv_term_header" != unknown && break
9210 done
9211
9212 fi
9213 echo "$as_me:9213: result: $cf_cv_term_header" >&5
9214 echo "${ECHO_T}$cf_cv_term_header" >&6
9215
9216 # Set definitions to allow ifdef'ing to accommodate subdirectories
9217
9218 case $cf_cv_term_header in # (vi
9219 *term.h)
9220         cat >>confdefs.h <<\EOF
9221 #define HAVE_TERM_H 1
9222 EOF
9223
9224         ;;
9225 esac
9226
9227 case $cf_cv_term_header in # (vi
9228 ncurses/term.h) #(vi
9229         cat >>confdefs.h <<\EOF
9230 #define HAVE_NCURSES_TERM_H 1
9231 EOF
9232
9233         ;;
9234 ncursesw/term.h)
9235         cat >>confdefs.h <<\EOF
9236 #define HAVE_NCURSESW_TERM_H 1
9237 EOF
9238
9239         ;;
9240 esac
9241
9242 # some applications need this, but should check for NCURSES_VERSION
9243 cat >>confdefs.h <<\EOF
9244 #define NCURSES 1
9245 EOF
9246
9247 echo "$as_me:9247: checking for ncurses version" >&5
9248 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9249 if test "${cf_cv_ncurses_version+set}" = set; then
9250   echo $ECHO_N "(cached) $ECHO_C" >&6
9251 else
9252
9253         cf_cv_ncurses_version=no
9254         cf_tempfile=out$$
9255         rm -f $cf_tempfile
9256         if test "$cross_compiling" = yes; then
9257
9258         # This will not work if the preprocessor splits the line after the
9259         # Autoconf token.  The 'unproto' program does that.
9260         cat > conftest.$ac_ext <<EOF
9261 #include <${cf_cv_ncurses_header:-curses.h}>
9262 #undef Autoconf
9263 #ifdef NCURSES_VERSION
9264 Autoconf NCURSES_VERSION
9265 #else
9266 #ifdef __NCURSES_H
9267 Autoconf "old"
9268 #endif
9269 ;
9270 #endif
9271 EOF
9272         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9273         { (eval echo "$as_me:9273: \"$cf_try\"") >&5
9274   (eval $cf_try) 2>&5
9275   ac_status=$?
9276   echo "$as_me:9276: \$? = $ac_status" >&5
9277   (exit $ac_status); }
9278         if test -f conftest.out ; then
9279                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9280                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9281                 rm -f conftest.out
9282         fi
9283
9284 else
9285   cat >conftest.$ac_ext <<_ACEOF
9286 #line 9286 "configure"
9287 #include "confdefs.h"
9288
9289 #include <${cf_cv_ncurses_header:-curses.h}>
9290 #include <stdio.h>
9291 int main()
9292 {
9293         FILE *fp = fopen("$cf_tempfile", "w");
9294 #ifdef NCURSES_VERSION
9295 # ifdef NCURSES_VERSION_PATCH
9296         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9297 # else
9298         fprintf(fp, "%s\n", NCURSES_VERSION);
9299 # endif
9300 #else
9301 # ifdef __NCURSES_H
9302         fprintf(fp, "old\n");
9303 # else
9304         make an error
9305 # endif
9306 #endif
9307         ${cf_cv_main_return:-return}(0);
9308 }
9309 _ACEOF
9310 rm -f conftest$ac_exeext
9311 if { (eval echo "$as_me:9311: \"$ac_link\"") >&5
9312   (eval $ac_link) 2>&5
9313   ac_status=$?
9314   echo "$as_me:9314: \$? = $ac_status" >&5
9315   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9316   { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:9319: \$? = $ac_status" >&5
9320   (exit $ac_status); }; }; then
9321
9322         cf_cv_ncurses_version=`cat $cf_tempfile`
9323 else
9324   echo "$as_me: program exited with status $ac_status" >&5
9325 echo "$as_me: failed program was:" >&5
9326 cat conftest.$ac_ext >&5
9327 fi
9328 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9329 fi
9330         rm -f $cf_tempfile
9331
9332 fi
9333 echo "$as_me:9333: result: $cf_cv_ncurses_version" >&5
9334 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9335 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
9336 #define NCURSES 1
9337 EOF
9338
9339 cf_nculib_root=ncursesw
9340         # This works, except for the special case where we find gpm, but
9341         # ncurses is in a nonstandard location via $LIBS, and we really want
9342         # to link gpm.
9343 cf_ncurses_LIBS=""
9344 cf_ncurses_SAVE="$LIBS"
9345 echo "$as_me:9345: checking for Gpm_Open in -lgpm" >&5
9346 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9347 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9348   echo $ECHO_N "(cached) $ECHO_C" >&6
9349 else
9350   ac_check_lib_save_LIBS=$LIBS
9351 LIBS="-lgpm  $LIBS"
9352 cat >conftest.$ac_ext <<_ACEOF
9353 #line 9353 "configure"
9354 #include "confdefs.h"
9355
9356 /* Override any gcc2 internal prototype to avoid an error.  */
9357 #ifdef __cplusplus
9358 extern "C"
9359 #endif
9360 /* We use char because int might match the return type of a gcc2
9361    builtin and then its argument prototype would still apply.  */
9362 char Gpm_Open ();
9363 int
9364 main ()
9365 {
9366 Gpm_Open ();
9367   ;
9368   return 0;
9369 }
9370 _ACEOF
9371 rm -f conftest.$ac_objext conftest$ac_exeext
9372 if { (eval echo "$as_me:9372: \"$ac_link\"") >&5
9373   (eval $ac_link) 2>&5
9374   ac_status=$?
9375   echo "$as_me:9375: \$? = $ac_status" >&5
9376   (exit $ac_status); } &&
9377          { ac_try='test -s conftest$ac_exeext'
9378   { (eval echo "$as_me:9378: \"$ac_try\"") >&5
9379   (eval $ac_try) 2>&5
9380   ac_status=$?
9381   echo "$as_me:9381: \$? = $ac_status" >&5
9382   (exit $ac_status); }; }; then
9383   ac_cv_lib_gpm_Gpm_Open=yes
9384 else
9385   echo "$as_me: failed program was:" >&5
9386 cat conftest.$ac_ext >&5
9387 ac_cv_lib_gpm_Gpm_Open=no
9388 fi
9389 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9390 LIBS=$ac_check_lib_save_LIBS
9391 fi
9392 echo "$as_me:9392: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9393 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9394 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9395   echo "$as_me:9395: checking for initscr in -lgpm" >&5
9396 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9397 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9398   echo $ECHO_N "(cached) $ECHO_C" >&6
9399 else
9400   ac_check_lib_save_LIBS=$LIBS
9401 LIBS="-lgpm  $LIBS"
9402 cat >conftest.$ac_ext <<_ACEOF
9403 #line 9403 "configure"
9404 #include "confdefs.h"
9405
9406 /* Override any gcc2 internal prototype to avoid an error.  */
9407 #ifdef __cplusplus
9408 extern "C"
9409 #endif
9410 /* We use char because int might match the return type of a gcc2
9411    builtin and then its argument prototype would still apply.  */
9412 char initscr ();
9413 int
9414 main ()
9415 {
9416 initscr ();
9417   ;
9418   return 0;
9419 }
9420 _ACEOF
9421 rm -f conftest.$ac_objext conftest$ac_exeext
9422 if { (eval echo "$as_me:9422: \"$ac_link\"") >&5
9423   (eval $ac_link) 2>&5
9424   ac_status=$?
9425   echo "$as_me:9425: \$? = $ac_status" >&5
9426   (exit $ac_status); } &&
9427          { ac_try='test -s conftest$ac_exeext'
9428   { (eval echo "$as_me:9428: \"$ac_try\"") >&5
9429   (eval $ac_try) 2>&5
9430   ac_status=$?
9431   echo "$as_me:9431: \$? = $ac_status" >&5
9432   (exit $ac_status); }; }; then
9433   ac_cv_lib_gpm_initscr=yes
9434 else
9435   echo "$as_me: failed program was:" >&5
9436 cat conftest.$ac_ext >&5
9437 ac_cv_lib_gpm_initscr=no
9438 fi
9439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9440 LIBS=$ac_check_lib_save_LIBS
9441 fi
9442 echo "$as_me:9442: result: $ac_cv_lib_gpm_initscr" >&5
9443 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9444 if test $ac_cv_lib_gpm_initscr = yes; then
9445   LIBS="$cf_ncurses_SAVE"
9446 else
9447   cf_ncurses_LIBS="-lgpm"
9448 fi
9449
9450 fi
9451
9452 case $host_os in #(vi
9453 freebsd*)
9454         # This is only necessary if you are linking against an obsolete
9455         # version of ncurses (but it should do no harm, since it's static).
9456         if test "$cf_nculib_root" = ncurses ; then
9457                 echo "$as_me:9457: checking for tgoto in -lmytinfo" >&5
9458 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9459 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9460   echo $ECHO_N "(cached) $ECHO_C" >&6
9461 else
9462   ac_check_lib_save_LIBS=$LIBS
9463 LIBS="-lmytinfo  $LIBS"
9464 cat >conftest.$ac_ext <<_ACEOF
9465 #line 9465 "configure"
9466 #include "confdefs.h"
9467
9468 /* Override any gcc2 internal prototype to avoid an error.  */
9469 #ifdef __cplusplus
9470 extern "C"
9471 #endif
9472 /* We use char because int might match the return type of a gcc2
9473    builtin and then its argument prototype would still apply.  */
9474 char tgoto ();
9475 int
9476 main ()
9477 {
9478 tgoto ();
9479   ;
9480   return 0;
9481 }
9482 _ACEOF
9483 rm -f conftest.$ac_objext conftest$ac_exeext
9484 if { (eval echo "$as_me:9484: \"$ac_link\"") >&5
9485   (eval $ac_link) 2>&5
9486   ac_status=$?
9487   echo "$as_me:9487: \$? = $ac_status" >&5
9488   (exit $ac_status); } &&
9489          { ac_try='test -s conftest$ac_exeext'
9490   { (eval echo "$as_me:9490: \"$ac_try\"") >&5
9491   (eval $ac_try) 2>&5
9492   ac_status=$?
9493   echo "$as_me:9493: \$? = $ac_status" >&5
9494   (exit $ac_status); }; }; then
9495   ac_cv_lib_mytinfo_tgoto=yes
9496 else
9497   echo "$as_me: failed program was:" >&5
9498 cat conftest.$ac_ext >&5
9499 ac_cv_lib_mytinfo_tgoto=no
9500 fi
9501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9502 LIBS=$ac_check_lib_save_LIBS
9503 fi
9504 echo "$as_me:9504: result: $ac_cv_lib_mytinfo_tgoto" >&5
9505 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9506 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9507   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9508 fi
9509
9510         fi
9511         ;;
9512 esac
9513
9514 LIBS="$cf_ncurses_LIBS $LIBS"
9515
9516 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9517 then
9518         LIBS="-l$cf_nculib_root $LIBS"
9519 else
9520
9521         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9522         cf_libdir=""
9523         echo "$as_me:9523: checking for initscr" >&5
9524 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9525 if test "${ac_cv_func_initscr+set}" = set; then
9526   echo $ECHO_N "(cached) $ECHO_C" >&6
9527 else
9528   cat >conftest.$ac_ext <<_ACEOF
9529 #line 9529 "configure"
9530 #include "confdefs.h"
9531 /* System header to define __stub macros and hopefully few prototypes,
9532     which can conflict with char initscr (); below.  */
9533 #include <assert.h>
9534 /* Override any gcc2 internal prototype to avoid an error.  */
9535 #ifdef __cplusplus
9536 extern "C"
9537 #endif
9538 /* We use char because int might match the return type of a gcc2
9539    builtin and then its argument prototype would still apply.  */
9540 char initscr ();
9541 char (*f) ();
9542
9543 int
9544 main ()
9545 {
9546 /* The GNU C library defines this for functions which it implements
9547     to always fail with ENOSYS.  Some functions are actually named
9548     something starting with __ and the normal name is an alias.  */
9549 #if defined (__stub_initscr) || defined (__stub___initscr)
9550 choke me
9551 #else
9552 f = initscr;
9553 #endif
9554
9555   ;
9556   return 0;
9557 }
9558 _ACEOF
9559 rm -f conftest.$ac_objext conftest$ac_exeext
9560 if { (eval echo "$as_me:9560: \"$ac_link\"") >&5
9561   (eval $ac_link) 2>&5
9562   ac_status=$?
9563   echo "$as_me:9563: \$? = $ac_status" >&5
9564   (exit $ac_status); } &&
9565          { ac_try='test -s conftest$ac_exeext'
9566   { (eval echo "$as_me:9566: \"$ac_try\"") >&5
9567   (eval $ac_try) 2>&5
9568   ac_status=$?
9569   echo "$as_me:9569: \$? = $ac_status" >&5
9570   (exit $ac_status); }; }; then
9571   ac_cv_func_initscr=yes
9572 else
9573   echo "$as_me: failed program was:" >&5
9574 cat conftest.$ac_ext >&5
9575 ac_cv_func_initscr=no
9576 fi
9577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9578 fi
9579 echo "$as_me:9579: result: $ac_cv_func_initscr" >&5
9580 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9581 if test $ac_cv_func_initscr = yes; then
9582   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9583 else
9584
9585                 cf_save_LIBS="$LIBS"
9586                 echo "$as_me:9586: checking for initscr in -l$cf_nculib_root" >&5
9587 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9588                 LIBS="-l$cf_nculib_root $LIBS"
9589                 cat >conftest.$ac_ext <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592 #include <${cf_cv_ncurses_header:-curses.h}>
9593 int
9594 main ()
9595 {
9596 initscr()
9597   ;
9598   return 0;
9599 }
9600 _ACEOF
9601 rm -f conftest.$ac_objext conftest$ac_exeext
9602 if { (eval echo "$as_me:9602: \"$ac_link\"") >&5
9603   (eval $ac_link) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); } &&
9607          { ac_try='test -s conftest$ac_exeext'
9608   { (eval echo "$as_me:9608: \"$ac_try\"") >&5
9609   (eval $ac_try) 2>&5
9610   ac_status=$?
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); }; }; then
9613   echo "$as_me:9613: result: yes" >&5
9614 echo "${ECHO_T}yes" >&6
9615                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9616
9617 else
9618   echo "$as_me: failed program was:" >&5
9619 cat conftest.$ac_ext >&5
9620 echo "$as_me:9620: result: no" >&5
9621 echo "${ECHO_T}no" >&6
9622
9623 cf_search=
9624 cf_library_path_list=""
9625 if test -n "${LDFLAGS}${LIBS}" ; then
9626         for cf_library_path in $LDFLAGS $LIBS
9627         do
9628                 case $cf_library_path in #(vi
9629                 -L*)
9630                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9631
9632 test "$cf_library_path" != "NONE" && \
9633 test -d "$cf_library_path" && \
9634  {
9635         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9636         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9637         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9638         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9639         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9640         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"
9641 }
9642
9643                         cf_library_path_list="$cf_library_path_list $cf_search"
9644                         ;;
9645                 esac
9646         done
9647 fi
9648
9649 cf_search=
9650
9651 test "/usr" != "$prefix" && \
9652 test -d "/usr" && \
9653 (test $prefix = NONE || test "/usr" != "$prefix") && {
9654         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9655         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9656         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
9657         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9658         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
9659         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9660 }
9661
9662 test "$prefix" != "NONE" && \
9663 test -d "$prefix" && \
9664  {
9665         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9666         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9667         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9668         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9669         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9670         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9671 }
9672
9673 test "/usr/local" != "$prefix" && \
9674 test -d "/usr/local" && \
9675 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9676         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9677         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9678         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9679         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9680         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9681         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9682 }
9683
9684 test "/opt" != "$prefix" && \
9685 test -d "/opt" && \
9686 (test $prefix = NONE || test "/opt" != "$prefix") && {
9687         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9688         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9689         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
9690         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9691         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
9692         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9693 }
9694
9695 test "$HOME" != "$prefix" && \
9696 test -d "$HOME" && \
9697 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9698         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9699         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9700         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9701         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9702         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9703         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9704 }
9705
9706 cf_search="$cf_library_path_list $cf_search"
9707
9708                         for cf_libdir in $cf_search
9709                         do
9710                                 echo "$as_me:9710: checking for -l$cf_nculib_root in $cf_libdir" >&5
9711 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9712                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9713                                 cat >conftest.$ac_ext <<_ACEOF
9714 #line 9714 "configure"
9715 #include "confdefs.h"
9716 #include <${cf_cv_ncurses_header:-curses.h}>
9717 int
9718 main ()
9719 {
9720 initscr()
9721   ;
9722   return 0;
9723 }
9724 _ACEOF
9725 rm -f conftest.$ac_objext conftest$ac_exeext
9726 if { (eval echo "$as_me:9726: \"$ac_link\"") >&5
9727   (eval $ac_link) 2>&5
9728   ac_status=$?
9729   echo "$as_me:9729: \$? = $ac_status" >&5
9730   (exit $ac_status); } &&
9731          { ac_try='test -s conftest$ac_exeext'
9732   { (eval echo "$as_me:9732: \"$ac_try\"") >&5
9733   (eval $ac_try) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit $ac_status); }; }; then
9737   echo "$as_me:9737: result: yes" >&5
9738 echo "${ECHO_T}yes" >&6
9739                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9740                                          break
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 cat conftest.$ac_ext >&5
9744 echo "$as_me:9744: result: no" >&5
9745 echo "${ECHO_T}no" >&6
9746                                          LIBS="$cf_save_LIBS"
9747 fi
9748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9749                         done
9750
9751 fi
9752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9753
9754 fi
9755
9756 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9757
9758 if test $cf_found_library = no ; then
9759         { { echo "$as_me:9759: error: Cannot link $cf_nculib_root library" >&5
9760 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9761    { (exit 1); exit 1; }; }
9762 fi
9763
9764 fi
9765
9766 if test -n "$cf_ncurses_LIBS" ; then
9767         echo "$as_me:9767: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9768 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9769         cf_ncurses_SAVE="$LIBS"
9770         for p in $cf_ncurses_LIBS ; do
9771                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9772                 if test "$q" != "$LIBS" ; then
9773                         LIBS="$q"
9774                 fi
9775         done
9776         cat >conftest.$ac_ext <<_ACEOF
9777 #line 9777 "configure"
9778 #include "confdefs.h"
9779 #include <${cf_cv_ncurses_header:-curses.h}>
9780 int
9781 main ()
9782 {
9783 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9784   ;
9785   return 0;
9786 }
9787 _ACEOF
9788 rm -f conftest.$ac_objext conftest$ac_exeext
9789 if { (eval echo "$as_me:9789: \"$ac_link\"") >&5
9790   (eval $ac_link) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); } &&
9794          { ac_try='test -s conftest$ac_exeext'
9795   { (eval echo "$as_me:9795: \"$ac_try\"") >&5
9796   (eval $ac_try) 2>&5
9797   ac_status=$?
9798   echo "$as_me:9798: \$? = $ac_status" >&5
9799   (exit $ac_status); }; }; then
9800   echo "$as_me:9800: result: yes" >&5
9801 echo "${ECHO_T}yes" >&6
9802 else
9803   echo "$as_me: failed program was:" >&5
9804 cat conftest.$ac_ext >&5
9805 echo "$as_me:9805: result: no" >&5
9806 echo "${ECHO_T}no" >&6
9807                  LIBS="$cf_ncurses_SAVE"
9808 fi
9809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9810 fi
9811
9812 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9813
9814 cat >>confdefs.h <<EOF
9815 #define $cf_nculib_ROOT 1
9816 EOF
9817
9818 fi
9819
9820         ;;
9821 pdcurses) #(vi
9822
9823 echo "$as_me:9823: checking if you want to use pkg-config" >&5
9824 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9825
9826 # Check whether --with-pkg-config or --without-pkg-config was given.
9827 if test "${with_pkg_config+set}" = set; then
9828   withval="$with_pkg_config"
9829   cf_pkg_config=$withval
9830 else
9831   cf_pkg_config=yes
9832 fi;
9833 echo "$as_me:9833: result: $cf_pkg_config" >&5
9834 echo "${ECHO_T}$cf_pkg_config" >&6
9835
9836 case $cf_pkg_config in #(vi
9837 no) #(vi
9838         PKG_CONFIG=none
9839         ;;
9840 yes) #(vi
9841
9842 if test -n "$ac_tool_prefix"; then
9843   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9844 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9845 echo "$as_me:9845: checking for $ac_word" >&5
9846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9847 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9848   echo $ECHO_N "(cached) $ECHO_C" >&6
9849 else
9850   case $PKG_CONFIG in
9851   [\\/]* | ?:[\\/]*)
9852   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9853   ;;
9854   *)
9855   ac_save_IFS=$IFS; IFS=$ac_path_separator
9856 ac_dummy="$PATH"
9857 for ac_dir in $ac_dummy; do
9858   IFS=$ac_save_IFS
9859   test -z "$ac_dir" && ac_dir=.
9860   if $as_executable_p "$ac_dir/$ac_word"; then
9861    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9862    echo "$as_me:9862: found $ac_dir/$ac_word" >&5
9863    break
9864 fi
9865 done
9866
9867   ;;
9868 esac
9869 fi
9870 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9871
9872 if test -n "$PKG_CONFIG"; then
9873   echo "$as_me:9873: result: $PKG_CONFIG" >&5
9874 echo "${ECHO_T}$PKG_CONFIG" >&6
9875 else
9876   echo "$as_me:9876: result: no" >&5
9877 echo "${ECHO_T}no" >&6
9878 fi
9879
9880 fi
9881 if test -z "$ac_cv_path_PKG_CONFIG"; then
9882   ac_pt_PKG_CONFIG=$PKG_CONFIG
9883   # Extract the first word of "pkg-config", so it can be a program name with args.
9884 set dummy pkg-config; ac_word=$2
9885 echo "$as_me:9885: checking for $ac_word" >&5
9886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9887 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9888   echo $ECHO_N "(cached) $ECHO_C" >&6
9889 else
9890   case $ac_pt_PKG_CONFIG in
9891   [\\/]* | ?:[\\/]*)
9892   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9893   ;;
9894   *)
9895   ac_save_IFS=$IFS; IFS=$ac_path_separator
9896 ac_dummy="$PATH"
9897 for ac_dir in $ac_dummy; do
9898   IFS=$ac_save_IFS
9899   test -z "$ac_dir" && ac_dir=.
9900   if $as_executable_p "$ac_dir/$ac_word"; then
9901    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9902    echo "$as_me:9902: found $ac_dir/$ac_word" >&5
9903    break
9904 fi
9905 done
9906
9907   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9908   ;;
9909 esac
9910 fi
9911 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9912
9913 if test -n "$ac_pt_PKG_CONFIG"; then
9914   echo "$as_me:9914: result: $ac_pt_PKG_CONFIG" >&5
9915 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9916 else
9917   echo "$as_me:9917: result: no" >&5
9918 echo "${ECHO_T}no" >&6
9919 fi
9920
9921   PKG_CONFIG=$ac_pt_PKG_CONFIG
9922 else
9923   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9924 fi
9925
9926         ;;
9927 *)
9928         PKG_CONFIG=$withval
9929         ;;
9930 esac
9931
9932 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9933 if test "$PKG_CONFIG" != none ; then
9934
9935 if test "x$prefix" != xNONE; then
9936   cf_path_syntax="$prefix"
9937 else
9938   cf_path_syntax="$ac_default_prefix"
9939 fi
9940
9941 case ".$PKG_CONFIG" in #(vi
9942 .\$\(*\)*|.\'*\'*) #(vi
9943   ;;
9944 ..|./*|.\\*) #(vi
9945   ;;
9946 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9947   ;;
9948 .\${*prefix}*) #(vi
9949   eval PKG_CONFIG="$PKG_CONFIG"
9950   case ".$PKG_CONFIG" in #(vi
9951   .NONE/*)
9952     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9953     ;;
9954   esac
9955   ;; #(vi
9956 .no|.NONE/*)
9957   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9958   ;;
9959 *)
9960   { { echo "$as_me:9960: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9961 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9962    { (exit 1); exit 1; }; }
9963   ;;
9964 esac
9965
9966 fi
9967
9968 echo "$as_me:9968: checking for X" >&5
9969 echo $ECHO_N "checking for X... $ECHO_C" >&6
9970
9971 # Check whether --with-x or --without-x was given.
9972 if test "${with_x+set}" = set; then
9973   withval="$with_x"
9974
9975 fi;
9976 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9977 if test "x$with_x" = xno; then
9978   # The user explicitly disabled X.
9979   have_x=disabled
9980 else
9981   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9982     # Both variables are already set.
9983     have_x=yes
9984   else
9985     if test "${ac_cv_have_x+set}" = set; then
9986   echo $ECHO_N "(cached) $ECHO_C" >&6
9987 else
9988   # One or both of the vars are not set, and there is no cached value.
9989 ac_x_includes=no ac_x_libraries=no
9990 rm -fr conftest.dir
9991 if mkdir conftest.dir; then
9992   cd conftest.dir
9993   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9994   cat >Imakefile <<'EOF'
9995 acfindx:
9996         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9997 EOF
9998   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9999     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10000     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10001     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10002     for ac_extension in a so sl dylib dll; do
10003       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10004          test -f $ac_im_libdir/libX11.$ac_extension; then
10005         ac_im_usrlibdir=$ac_im_libdir; break
10006       fi
10007     done
10008     # Screen out bogus values from the imake configuration.  They are
10009     # bogus both because they are the default anyway, and because
10010     # using them would break gcc on systems where it needs fixed includes.
10011     case $ac_im_incroot in
10012         /usr/include) ;;
10013         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10014     esac
10015     case $ac_im_usrlibdir in
10016         /usr/lib | /lib) ;;
10017         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10018     esac
10019   fi
10020   cd ..
10021   rm -fr conftest.dir
10022 fi
10023
10024 # Standard set of common directories for X headers.
10025 # Check X11 before X11Rn because it is often a symlink to the current release.
10026 ac_x_header_dirs='
10027 /usr/X11/include
10028 /usr/X11R6/include
10029 /usr/X11R5/include
10030 /usr/X11R4/include
10031
10032 /usr/include/X11
10033 /usr/include/X11R6
10034 /usr/include/X11R5
10035 /usr/include/X11R4
10036
10037 /usr/local/X11/include
10038 /usr/local/X11R6/include
10039 /usr/local/X11R5/include
10040 /usr/local/X11R4/include
10041
10042 /usr/local/include/X11
10043 /usr/local/include/X11R6
10044 /usr/local/include/X11R5
10045 /usr/local/include/X11R4
10046
10047 /usr/X386/include
10048 /usr/x386/include
10049 /usr/XFree86/include/X11
10050
10051 /usr/include
10052 /usr/local/include
10053 /usr/unsupported/include
10054 /usr/athena/include
10055 /usr/local/x11r5/include
10056 /usr/lpp/Xamples/include
10057
10058 /usr/openwin/include
10059 /usr/openwin/share/include'
10060
10061 if test "$ac_x_includes" = no; then
10062   # Guess where to find include files, by looking for Intrinsic.h.
10063   # First, try using that file with no special directory specified.
10064   cat >conftest.$ac_ext <<_ACEOF
10065 #line 10065 "configure"
10066 #include "confdefs.h"
10067 #include <X11/Intrinsic.h>
10068 _ACEOF
10069 if { (eval echo "$as_me:10069: \"$ac_cpp conftest.$ac_ext\"") >&5
10070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10071   ac_status=$?
10072   egrep -v '^ *\+' conftest.er1 >conftest.err
10073   rm -f conftest.er1
10074   cat conftest.err >&5
10075   echo "$as_me:10075: \$? = $ac_status" >&5
10076   (exit $ac_status); } >/dev/null; then
10077   if test -s conftest.err; then
10078     ac_cpp_err=$ac_c_preproc_warn_flag
10079   else
10080     ac_cpp_err=
10081   fi
10082 else
10083   ac_cpp_err=yes
10084 fi
10085 if test -z "$ac_cpp_err"; then
10086   # We can compile using X headers with no special include directory.
10087 ac_x_includes=
10088 else
10089   echo "$as_me: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   for ac_dir in $ac_x_header_dirs; do
10092   if test -r "$ac_dir/X11/Intrinsic.h"; then
10093     ac_x_includes=$ac_dir
10094     break
10095   fi
10096 done
10097 fi
10098 rm -f conftest.err conftest.$ac_ext
10099 fi # $ac_x_includes = no
10100
10101 if test "$ac_x_libraries" = no; then
10102   # Check for the libraries.
10103   # See if we find them without any special options.
10104   # Don't add to $LIBS permanently.
10105   ac_save_LIBS=$LIBS
10106   LIBS="-lXt $LIBS"
10107   cat >conftest.$ac_ext <<_ACEOF
10108 #line 10108 "configure"
10109 #include "confdefs.h"
10110 #include <X11/Intrinsic.h>
10111 int
10112 main ()
10113 {
10114 XtMalloc (0)
10115   ;
10116   return 0;
10117 }
10118 _ACEOF
10119 rm -f conftest.$ac_objext conftest$ac_exeext
10120 if { (eval echo "$as_me:10120: \"$ac_link\"") >&5
10121   (eval $ac_link) 2>&5
10122   ac_status=$?
10123   echo "$as_me:10123: \$? = $ac_status" >&5
10124   (exit $ac_status); } &&
10125          { ac_try='test -s conftest$ac_exeext'
10126   { (eval echo "$as_me:10126: \"$ac_try\"") >&5
10127   (eval $ac_try) 2>&5
10128   ac_status=$?
10129   echo "$as_me:10129: \$? = $ac_status" >&5
10130   (exit $ac_status); }; }; then
10131   LIBS=$ac_save_LIBS
10132 # We can link X programs with no special library path.
10133 ac_x_libraries=
10134 else
10135   echo "$as_me: failed program was:" >&5
10136 cat conftest.$ac_ext >&5
10137 LIBS=$ac_save_LIBS
10138 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10139 do
10140   # Don't even attempt the hair of trying to link an X program!
10141   for ac_extension in a so sl dylib dll; do
10142     if test -r $ac_dir/libXt.$ac_extension; then
10143       ac_x_libraries=$ac_dir
10144       break 2
10145     fi
10146   done
10147 done
10148 fi
10149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10150 fi # $ac_x_libraries = no
10151
10152 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10153   # Didn't find X anywhere.  Cache the known absence of X.
10154   ac_cv_have_x="have_x=no"
10155 else
10156   # Record where we found X for the cache.
10157   ac_cv_have_x="have_x=yes \
10158                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10159 fi
10160 fi
10161
10162   fi
10163   eval "$ac_cv_have_x"
10164 fi # $with_x != no
10165
10166 if test "$have_x" != yes; then
10167   echo "$as_me:10167: result: $have_x" >&5
10168 echo "${ECHO_T}$have_x" >&6
10169   no_x=yes
10170 else
10171   # If each of the values was on the command line, it overrides each guess.
10172   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10173   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10174   # Update the cache value to reflect the command line values.
10175   ac_cv_have_x="have_x=yes \
10176                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10177   echo "$as_me:10177: result: libraries $x_libraries, headers $x_includes" >&5
10178 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10179 fi
10180
10181 if test "$no_x" = yes; then
10182   # Not all programs may use this symbol, but it does not hurt to define it.
10183
10184 cat >>confdefs.h <<\EOF
10185 #define X_DISPLAY_MISSING 1
10186 EOF
10187
10188   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10189 else
10190   if test -n "$x_includes"; then
10191     X_CFLAGS="$X_CFLAGS -I$x_includes"
10192   fi
10193
10194   # It would also be nice to do this for all -L options, not just this one.
10195   if test -n "$x_libraries"; then
10196     X_LIBS="$X_LIBS -L$x_libraries"
10197     # For Solaris; some versions of Sun CC require a space after -R and
10198     # others require no space.  Words are not sufficient . . . .
10199     case `(uname -sr) 2>/dev/null` in
10200     "SunOS 5"*)
10201       echo "$as_me:10201: checking whether -R must be followed by a space" >&5
10202 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10203       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10204       cat >conftest.$ac_ext <<_ACEOF
10205 #line 10205 "configure"
10206 #include "confdefs.h"
10207
10208 int
10209 main ()
10210 {
10211
10212   ;
10213   return 0;
10214 }
10215 _ACEOF
10216 rm -f conftest.$ac_objext conftest$ac_exeext
10217 if { (eval echo "$as_me:10217: \"$ac_link\"") >&5
10218   (eval $ac_link) 2>&5
10219   ac_status=$?
10220   echo "$as_me:10220: \$? = $ac_status" >&5
10221   (exit $ac_status); } &&
10222          { ac_try='test -s conftest$ac_exeext'
10223   { (eval echo "$as_me:10223: \"$ac_try\"") >&5
10224   (eval $ac_try) 2>&5
10225   ac_status=$?
10226   echo "$as_me:10226: \$? = $ac_status" >&5
10227   (exit $ac_status); }; }; then
10228   ac_R_nospace=yes
10229 else
10230   echo "$as_me: failed program was:" >&5
10231 cat conftest.$ac_ext >&5
10232 ac_R_nospace=no
10233 fi
10234 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10235       if test $ac_R_nospace = yes; then
10236         echo "$as_me:10236: result: no" >&5
10237 echo "${ECHO_T}no" >&6
10238         X_LIBS="$X_LIBS -R$x_libraries"
10239       else
10240         LIBS="$ac_xsave_LIBS -R $x_libraries"
10241         cat >conftest.$ac_ext <<_ACEOF
10242 #line 10242 "configure"
10243 #include "confdefs.h"
10244
10245 int
10246 main ()
10247 {
10248
10249   ;
10250   return 0;
10251 }
10252 _ACEOF
10253 rm -f conftest.$ac_objext conftest$ac_exeext
10254 if { (eval echo "$as_me:10254: \"$ac_link\"") >&5
10255   (eval $ac_link) 2>&5
10256   ac_status=$?
10257   echo "$as_me:10257: \$? = $ac_status" >&5
10258   (exit $ac_status); } &&
10259          { ac_try='test -s conftest$ac_exeext'
10260   { (eval echo "$as_me:10260: \"$ac_try\"") >&5
10261   (eval $ac_try) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); }; }; then
10265   ac_R_space=yes
10266 else
10267   echo "$as_me: failed program was:" >&5
10268 cat conftest.$ac_ext >&5
10269 ac_R_space=no
10270 fi
10271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10272         if test $ac_R_space = yes; then
10273           echo "$as_me:10273: result: yes" >&5
10274 echo "${ECHO_T}yes" >&6
10275           X_LIBS="$X_LIBS -R $x_libraries"
10276         else
10277           echo "$as_me:10277: result: neither works" >&5
10278 echo "${ECHO_T}neither works" >&6
10279         fi
10280       fi
10281       LIBS=$ac_xsave_LIBS
10282     esac
10283   fi
10284
10285   # Check for system-dependent libraries X programs must link with.
10286   # Do this before checking for the system-independent R6 libraries
10287   # (-lICE), since we may need -lsocket or whatever for X linking.
10288
10289   if test "$ISC" = yes; then
10290     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10291   else
10292     # Martyn Johnson says this is needed for Ultrix, if the X
10293     # libraries were built with DECnet support.  And Karl Berry says
10294     # the Alpha needs dnet_stub (dnet does not exist).
10295     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10296     cat >conftest.$ac_ext <<_ACEOF
10297 #line 10297 "configure"
10298 #include "confdefs.h"
10299
10300 /* Override any gcc2 internal prototype to avoid an error.  */
10301 #ifdef __cplusplus
10302 extern "C"
10303 #endif
10304 /* We use char because int might match the return type of a gcc2
10305    builtin and then its argument prototype would still apply.  */
10306 char XOpenDisplay ();
10307 int
10308 main ()
10309 {
10310 XOpenDisplay ();
10311   ;
10312   return 0;
10313 }
10314 _ACEOF
10315 rm -f conftest.$ac_objext conftest$ac_exeext
10316 if { (eval echo "$as_me:10316: \"$ac_link\"") >&5
10317   (eval $ac_link) 2>&5
10318   ac_status=$?
10319   echo "$as_me:10319: \$? = $ac_status" >&5
10320   (exit $ac_status); } &&
10321          { ac_try='test -s conftest$ac_exeext'
10322   { (eval echo "$as_me:10322: \"$ac_try\"") >&5
10323   (eval $ac_try) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit $ac_status); }; }; then
10327   :
10328 else
10329   echo "$as_me: failed program was:" >&5
10330 cat conftest.$ac_ext >&5
10331 echo "$as_me:10331: checking for dnet_ntoa in -ldnet" >&5
10332 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10333 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10334   echo $ECHO_N "(cached) $ECHO_C" >&6
10335 else
10336   ac_check_lib_save_LIBS=$LIBS
10337 LIBS="-ldnet  $LIBS"
10338 cat >conftest.$ac_ext <<_ACEOF
10339 #line 10339 "configure"
10340 #include "confdefs.h"
10341
10342 /* Override any gcc2 internal prototype to avoid an error.  */
10343 #ifdef __cplusplus
10344 extern "C"
10345 #endif
10346 /* We use char because int might match the return type of a gcc2
10347    builtin and then its argument prototype would still apply.  */
10348 char dnet_ntoa ();
10349 int
10350 main ()
10351 {
10352 dnet_ntoa ();
10353   ;
10354   return 0;
10355 }
10356 _ACEOF
10357 rm -f conftest.$ac_objext conftest$ac_exeext
10358 if { (eval echo "$as_me:10358: \"$ac_link\"") >&5
10359   (eval $ac_link) 2>&5
10360   ac_status=$?
10361   echo "$as_me:10361: \$? = $ac_status" >&5
10362   (exit $ac_status); } &&
10363          { ac_try='test -s conftest$ac_exeext'
10364   { (eval echo "$as_me:10364: \"$ac_try\"") >&5
10365   (eval $ac_try) 2>&5
10366   ac_status=$?
10367   echo "$as_me:10367: \$? = $ac_status" >&5
10368   (exit $ac_status); }; }; then
10369   ac_cv_lib_dnet_dnet_ntoa=yes
10370 else
10371   echo "$as_me: failed program was:" >&5
10372 cat conftest.$ac_ext >&5
10373 ac_cv_lib_dnet_dnet_ntoa=no
10374 fi
10375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10376 LIBS=$ac_check_lib_save_LIBS
10377 fi
10378 echo "$as_me:10378: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10379 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10380 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10381   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10382 fi
10383
10384     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10385       echo "$as_me:10385: checking for dnet_ntoa in -ldnet_stub" >&5
10386 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10387 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10388   echo $ECHO_N "(cached) $ECHO_C" >&6
10389 else
10390   ac_check_lib_save_LIBS=$LIBS
10391 LIBS="-ldnet_stub  $LIBS"
10392 cat >conftest.$ac_ext <<_ACEOF
10393 #line 10393 "configure"
10394 #include "confdefs.h"
10395
10396 /* Override any gcc2 internal prototype to avoid an error.  */
10397 #ifdef __cplusplus
10398 extern "C"
10399 #endif
10400 /* We use char because int might match the return type of a gcc2
10401    builtin and then its argument prototype would still apply.  */
10402 char dnet_ntoa ();
10403 int
10404 main ()
10405 {
10406 dnet_ntoa ();
10407   ;
10408   return 0;
10409 }
10410 _ACEOF
10411 rm -f conftest.$ac_objext conftest$ac_exeext
10412 if { (eval echo "$as_me:10412: \"$ac_link\"") >&5
10413   (eval $ac_link) 2>&5
10414   ac_status=$?
10415   echo "$as_me:10415: \$? = $ac_status" >&5
10416   (exit $ac_status); } &&
10417          { ac_try='test -s conftest$ac_exeext'
10418   { (eval echo "$as_me:10418: \"$ac_try\"") >&5
10419   (eval $ac_try) 2>&5
10420   ac_status=$?
10421   echo "$as_me:10421: \$? = $ac_status" >&5
10422   (exit $ac_status); }; }; then
10423   ac_cv_lib_dnet_stub_dnet_ntoa=yes
10424 else
10425   echo "$as_me: failed program was:" >&5
10426 cat conftest.$ac_ext >&5
10427 ac_cv_lib_dnet_stub_dnet_ntoa=no
10428 fi
10429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10430 LIBS=$ac_check_lib_save_LIBS
10431 fi
10432 echo "$as_me:10432: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10433 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10434 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10435   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10436 fi
10437
10438     fi
10439 fi
10440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10441     LIBS="$ac_xsave_LIBS"
10442
10443     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10444     # to get the SysV transport functions.
10445     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10446     # needs -lnsl.
10447     # The nsl library prevents programs from opening the X display
10448     # on Irix 5.2, according to T.E. Dickey.
10449     # The functions gethostbyname, getservbyname, and inet_addr are
10450     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10451     echo "$as_me:10451: checking for gethostbyname" >&5
10452 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10453 if test "${ac_cv_func_gethostbyname+set}" = set; then
10454   echo $ECHO_N "(cached) $ECHO_C" >&6
10455 else
10456   cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459 /* System header to define __stub macros and hopefully few prototypes,
10460     which can conflict with char gethostbyname (); below.  */
10461 #include <assert.h>
10462 /* Override any gcc2 internal prototype to avoid an error.  */
10463 #ifdef __cplusplus
10464 extern "C"
10465 #endif
10466 /* We use char because int might match the return type of a gcc2
10467    builtin and then its argument prototype would still apply.  */
10468 char gethostbyname ();
10469 char (*f) ();
10470
10471 int
10472 main ()
10473 {
10474 /* The GNU C library defines this for functions which it implements
10475     to always fail with ENOSYS.  Some functions are actually named
10476     something starting with __ and the normal name is an alias.  */
10477 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10478 choke me
10479 #else
10480 f = gethostbyname;
10481 #endif
10482
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f conftest.$ac_objext conftest$ac_exeext
10488 if { (eval echo "$as_me:10488: \"$ac_link\"") >&5
10489   (eval $ac_link) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -s conftest$ac_exeext'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); }; }; then
10499   ac_cv_func_gethostbyname=yes
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat conftest.$ac_ext >&5
10503 ac_cv_func_gethostbyname=no
10504 fi
10505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10506 fi
10507 echo "$as_me:10507: result: $ac_cv_func_gethostbyname" >&5
10508 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10509
10510     if test $ac_cv_func_gethostbyname = no; then
10511       echo "$as_me:10511: checking for gethostbyname in -lnsl" >&5
10512 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10513 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10514   echo $ECHO_N "(cached) $ECHO_C" >&6
10515 else
10516   ac_check_lib_save_LIBS=$LIBS
10517 LIBS="-lnsl  $LIBS"
10518 cat >conftest.$ac_ext <<_ACEOF
10519 #line 10519 "configure"
10520 #include "confdefs.h"
10521
10522 /* Override any gcc2 internal prototype to avoid an error.  */
10523 #ifdef __cplusplus
10524 extern "C"
10525 #endif
10526 /* We use char because int might match the return type of a gcc2
10527    builtin and then its argument prototype would still apply.  */
10528 char gethostbyname ();
10529 int
10530 main ()
10531 {
10532 gethostbyname ();
10533   ;
10534   return 0;
10535 }
10536 _ACEOF
10537 rm -f conftest.$ac_objext conftest$ac_exeext
10538 if { (eval echo "$as_me:10538: \"$ac_link\"") >&5
10539   (eval $ac_link) 2>&5
10540   ac_status=$?
10541   echo "$as_me:10541: \$? = $ac_status" >&5
10542   (exit $ac_status); } &&
10543          { ac_try='test -s conftest$ac_exeext'
10544   { (eval echo "$as_me:10544: \"$ac_try\"") >&5
10545   (eval $ac_try) 2>&5
10546   ac_status=$?
10547   echo "$as_me:10547: \$? = $ac_status" >&5
10548   (exit $ac_status); }; }; then
10549   ac_cv_lib_nsl_gethostbyname=yes
10550 else
10551   echo "$as_me: failed program was:" >&5
10552 cat conftest.$ac_ext >&5
10553 ac_cv_lib_nsl_gethostbyname=no
10554 fi
10555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10556 LIBS=$ac_check_lib_save_LIBS
10557 fi
10558 echo "$as_me:10558: result: $ac_cv_lib_nsl_gethostbyname" >&5
10559 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10560 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10561   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10562 fi
10563
10564       if test $ac_cv_lib_nsl_gethostbyname = no; then
10565         echo "$as_me:10565: checking for gethostbyname in -lbsd" >&5
10566 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10567 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10568   echo $ECHO_N "(cached) $ECHO_C" >&6
10569 else
10570   ac_check_lib_save_LIBS=$LIBS
10571 LIBS="-lbsd  $LIBS"
10572 cat >conftest.$ac_ext <<_ACEOF
10573 #line 10573 "configure"
10574 #include "confdefs.h"
10575
10576 /* Override any gcc2 internal prototype to avoid an error.  */
10577 #ifdef __cplusplus
10578 extern "C"
10579 #endif
10580 /* We use char because int might match the return type of a gcc2
10581    builtin and then its argument prototype would still apply.  */
10582 char gethostbyname ();
10583 int
10584 main ()
10585 {
10586 gethostbyname ();
10587   ;
10588   return 0;
10589 }
10590 _ACEOF
10591 rm -f conftest.$ac_objext conftest$ac_exeext
10592 if { (eval echo "$as_me:10592: \"$ac_link\"") >&5
10593   (eval $ac_link) 2>&5
10594   ac_status=$?
10595   echo "$as_me:10595: \$? = $ac_status" >&5
10596   (exit $ac_status); } &&
10597          { ac_try='test -s conftest$ac_exeext'
10598   { (eval echo "$as_me:10598: \"$ac_try\"") >&5
10599   (eval $ac_try) 2>&5
10600   ac_status=$?
10601   echo "$as_me:10601: \$? = $ac_status" >&5
10602   (exit $ac_status); }; }; then
10603   ac_cv_lib_bsd_gethostbyname=yes
10604 else
10605   echo "$as_me: failed program was:" >&5
10606 cat conftest.$ac_ext >&5
10607 ac_cv_lib_bsd_gethostbyname=no
10608 fi
10609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10610 LIBS=$ac_check_lib_save_LIBS
10611 fi
10612 echo "$as_me:10612: result: $ac_cv_lib_bsd_gethostbyname" >&5
10613 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10614 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10615   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10616 fi
10617
10618       fi
10619     fi
10620
10621     # lieder@skyler.mavd.honeywell.com says without -lsocket,
10622     # socket/setsockopt and other routines are undefined under SCO ODT
10623     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
10624     # on later versions), says Simon Leinen: it contains gethostby*
10625     # variants that don't use the nameserver (or something).  -lsocket
10626     # must be given before -lnsl if both are needed.  We assume that
10627     # if connect needs -lnsl, so does gethostbyname.
10628     echo "$as_me:10628: checking for connect" >&5
10629 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10630 if test "${ac_cv_func_connect+set}" = set; then
10631   echo $ECHO_N "(cached) $ECHO_C" >&6
10632 else
10633   cat >conftest.$ac_ext <<_ACEOF
10634 #line 10634 "configure"
10635 #include "confdefs.h"
10636 /* System header to define __stub macros and hopefully few prototypes,
10637     which can conflict with char connect (); below.  */
10638 #include <assert.h>
10639 /* Override any gcc2 internal prototype to avoid an error.  */
10640 #ifdef __cplusplus
10641 extern "C"
10642 #endif
10643 /* We use char because int might match the return type of a gcc2
10644    builtin and then its argument prototype would still apply.  */
10645 char connect ();
10646 char (*f) ();
10647
10648 int
10649 main ()
10650 {
10651 /* The GNU C library defines this for functions which it implements
10652     to always fail with ENOSYS.  Some functions are actually named
10653     something starting with __ and the normal name is an alias.  */
10654 #if defined (__stub_connect) || defined (__stub___connect)
10655 choke me
10656 #else
10657 f = connect;
10658 #endif
10659
10660   ;
10661   return 0;
10662 }
10663 _ACEOF
10664 rm -f conftest.$ac_objext conftest$ac_exeext
10665 if { (eval echo "$as_me:10665: \"$ac_link\"") >&5
10666   (eval $ac_link) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); } &&
10670          { ac_try='test -s conftest$ac_exeext'
10671   { (eval echo "$as_me:10671: \"$ac_try\"") >&5
10672   (eval $ac_try) 2>&5
10673   ac_status=$?
10674   echo "$as_me:10674: \$? = $ac_status" >&5
10675   (exit $ac_status); }; }; then
10676   ac_cv_func_connect=yes
10677 else
10678   echo "$as_me: failed program was:" >&5
10679 cat conftest.$ac_ext >&5
10680 ac_cv_func_connect=no
10681 fi
10682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10683 fi
10684 echo "$as_me:10684: result: $ac_cv_func_connect" >&5
10685 echo "${ECHO_T}$ac_cv_func_connect" >&6
10686
10687     if test $ac_cv_func_connect = no; then
10688       echo "$as_me:10688: checking for connect in -lsocket" >&5
10689 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10690 if test "${ac_cv_lib_socket_connect+set}" = set; then
10691   echo $ECHO_N "(cached) $ECHO_C" >&6
10692 else
10693   ac_check_lib_save_LIBS=$LIBS
10694 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10695 cat >conftest.$ac_ext <<_ACEOF
10696 #line 10696 "configure"
10697 #include "confdefs.h"
10698
10699 /* Override any gcc2 internal prototype to avoid an error.  */
10700 #ifdef __cplusplus
10701 extern "C"
10702 #endif
10703 /* We use char because int might match the return type of a gcc2
10704    builtin and then its argument prototype would still apply.  */
10705 char connect ();
10706 int
10707 main ()
10708 {
10709 connect ();
10710   ;
10711   return 0;
10712 }
10713 _ACEOF
10714 rm -f conftest.$ac_objext conftest$ac_exeext
10715 if { (eval echo "$as_me:10715: \"$ac_link\"") >&5
10716   (eval $ac_link) 2>&5
10717   ac_status=$?
10718   echo "$as_me:10718: \$? = $ac_status" >&5
10719   (exit $ac_status); } &&
10720          { ac_try='test -s conftest$ac_exeext'
10721   { (eval echo "$as_me:10721: \"$ac_try\"") >&5
10722   (eval $ac_try) 2>&5
10723   ac_status=$?
10724   echo "$as_me:10724: \$? = $ac_status" >&5
10725   (exit $ac_status); }; }; then
10726   ac_cv_lib_socket_connect=yes
10727 else
10728   echo "$as_me: failed program was:" >&5
10729 cat conftest.$ac_ext >&5
10730 ac_cv_lib_socket_connect=no
10731 fi
10732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10733 LIBS=$ac_check_lib_save_LIBS
10734 fi
10735 echo "$as_me:10735: result: $ac_cv_lib_socket_connect" >&5
10736 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10737 if test $ac_cv_lib_socket_connect = yes; then
10738   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10739 fi
10740
10741     fi
10742
10743     # Guillermo Gomez says -lposix is necessary on A/UX.
10744     echo "$as_me:10744: checking for remove" >&5
10745 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10746 if test "${ac_cv_func_remove+set}" = set; then
10747   echo $ECHO_N "(cached) $ECHO_C" >&6
10748 else
10749   cat >conftest.$ac_ext <<_ACEOF
10750 #line 10750 "configure"
10751 #include "confdefs.h"
10752 /* System header to define __stub macros and hopefully few prototypes,
10753     which can conflict with char remove (); below.  */
10754 #include <assert.h>
10755 /* Override any gcc2 internal prototype to avoid an error.  */
10756 #ifdef __cplusplus
10757 extern "C"
10758 #endif
10759 /* We use char because int might match the return type of a gcc2
10760    builtin and then its argument prototype would still apply.  */
10761 char remove ();
10762 char (*f) ();
10763
10764 int
10765 main ()
10766 {
10767 /* The GNU C library defines this for functions which it implements
10768     to always fail with ENOSYS.  Some functions are actually named
10769     something starting with __ and the normal name is an alias.  */
10770 #if defined (__stub_remove) || defined (__stub___remove)
10771 choke me
10772 #else
10773 f = remove;
10774 #endif
10775
10776   ;
10777   return 0;
10778 }
10779 _ACEOF
10780 rm -f conftest.$ac_objext conftest$ac_exeext
10781 if { (eval echo "$as_me:10781: \"$ac_link\"") >&5
10782   (eval $ac_link) 2>&5
10783   ac_status=$?
10784   echo "$as_me:10784: \$? = $ac_status" >&5
10785   (exit $ac_status); } &&
10786          { ac_try='test -s conftest$ac_exeext'
10787   { (eval echo "$as_me:10787: \"$ac_try\"") >&5
10788   (eval $ac_try) 2>&5
10789   ac_status=$?
10790   echo "$as_me:10790: \$? = $ac_status" >&5
10791   (exit $ac_status); }; }; then
10792   ac_cv_func_remove=yes
10793 else
10794   echo "$as_me: failed program was:" >&5
10795 cat conftest.$ac_ext >&5
10796 ac_cv_func_remove=no
10797 fi
10798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10799 fi
10800 echo "$as_me:10800: result: $ac_cv_func_remove" >&5
10801 echo "${ECHO_T}$ac_cv_func_remove" >&6
10802
10803     if test $ac_cv_func_remove = no; then
10804       echo "$as_me:10804: checking for remove in -lposix" >&5
10805 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10806 if test "${ac_cv_lib_posix_remove+set}" = set; then
10807   echo $ECHO_N "(cached) $ECHO_C" >&6
10808 else
10809   ac_check_lib_save_LIBS=$LIBS
10810 LIBS="-lposix  $LIBS"
10811 cat >conftest.$ac_ext <<_ACEOF
10812 #line 10812 "configure"
10813 #include "confdefs.h"
10814
10815 /* Override any gcc2 internal prototype to avoid an error.  */
10816 #ifdef __cplusplus
10817 extern "C"
10818 #endif
10819 /* We use char because int might match the return type of a gcc2
10820    builtin and then its argument prototype would still apply.  */
10821 char remove ();
10822 int
10823 main ()
10824 {
10825 remove ();
10826   ;
10827   return 0;
10828 }
10829 _ACEOF
10830 rm -f conftest.$ac_objext conftest$ac_exeext
10831 if { (eval echo "$as_me:10831: \"$ac_link\"") >&5
10832   (eval $ac_link) 2>&5
10833   ac_status=$?
10834   echo "$as_me:10834: \$? = $ac_status" >&5
10835   (exit $ac_status); } &&
10836          { ac_try='test -s conftest$ac_exeext'
10837   { (eval echo "$as_me:10837: \"$ac_try\"") >&5
10838   (eval $ac_try) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); }; }; then
10842   ac_cv_lib_posix_remove=yes
10843 else
10844   echo "$as_me: failed program was:" >&5
10845 cat conftest.$ac_ext >&5
10846 ac_cv_lib_posix_remove=no
10847 fi
10848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10849 LIBS=$ac_check_lib_save_LIBS
10850 fi
10851 echo "$as_me:10851: result: $ac_cv_lib_posix_remove" >&5
10852 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10853 if test $ac_cv_lib_posix_remove = yes; then
10854   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10855 fi
10856
10857     fi
10858
10859     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10860     echo "$as_me:10860: checking for shmat" >&5
10861 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10862 if test "${ac_cv_func_shmat+set}" = set; then
10863   echo $ECHO_N "(cached) $ECHO_C" >&6
10864 else
10865   cat >conftest.$ac_ext <<_ACEOF
10866 #line 10866 "configure"
10867 #include "confdefs.h"
10868 /* System header to define __stub macros and hopefully few prototypes,
10869     which can conflict with char shmat (); below.  */
10870 #include <assert.h>
10871 /* Override any gcc2 internal prototype to avoid an error.  */
10872 #ifdef __cplusplus
10873 extern "C"
10874 #endif
10875 /* We use char because int might match the return type of a gcc2
10876    builtin and then its argument prototype would still apply.  */
10877 char shmat ();
10878 char (*f) ();
10879
10880 int
10881 main ()
10882 {
10883 /* The GNU C library defines this for functions which it implements
10884     to always fail with ENOSYS.  Some functions are actually named
10885     something starting with __ and the normal name is an alias.  */
10886 #if defined (__stub_shmat) || defined (__stub___shmat)
10887 choke me
10888 #else
10889 f = shmat;
10890 #endif
10891
10892   ;
10893   return 0;
10894 }
10895 _ACEOF
10896 rm -f conftest.$ac_objext conftest$ac_exeext
10897 if { (eval echo "$as_me:10897: \"$ac_link\"") >&5
10898   (eval $ac_link) 2>&5
10899   ac_status=$?
10900   echo "$as_me:10900: \$? = $ac_status" >&5
10901   (exit $ac_status); } &&
10902          { ac_try='test -s conftest$ac_exeext'
10903   { (eval echo "$as_me:10903: \"$ac_try\"") >&5
10904   (eval $ac_try) 2>&5
10905   ac_status=$?
10906   echo "$as_me:10906: \$? = $ac_status" >&5
10907   (exit $ac_status); }; }; then
10908   ac_cv_func_shmat=yes
10909 else
10910   echo "$as_me: failed program was:" >&5
10911 cat conftest.$ac_ext >&5
10912 ac_cv_func_shmat=no
10913 fi
10914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10915 fi
10916 echo "$as_me:10916: result: $ac_cv_func_shmat" >&5
10917 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10918
10919     if test $ac_cv_func_shmat = no; then
10920       echo "$as_me:10920: checking for shmat in -lipc" >&5
10921 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10922 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10923   echo $ECHO_N "(cached) $ECHO_C" >&6
10924 else
10925   ac_check_lib_save_LIBS=$LIBS
10926 LIBS="-lipc  $LIBS"
10927 cat >conftest.$ac_ext <<_ACEOF
10928 #line 10928 "configure"
10929 #include "confdefs.h"
10930
10931 /* Override any gcc2 internal prototype to avoid an error.  */
10932 #ifdef __cplusplus
10933 extern "C"
10934 #endif
10935 /* We use char because int might match the return type of a gcc2
10936    builtin and then its argument prototype would still apply.  */
10937 char shmat ();
10938 int
10939 main ()
10940 {
10941 shmat ();
10942   ;
10943   return 0;
10944 }
10945 _ACEOF
10946 rm -f conftest.$ac_objext conftest$ac_exeext
10947 if { (eval echo "$as_me:10947: \"$ac_link\"") >&5
10948   (eval $ac_link) 2>&5
10949   ac_status=$?
10950   echo "$as_me:10950: \$? = $ac_status" >&5
10951   (exit $ac_status); } &&
10952          { ac_try='test -s conftest$ac_exeext'
10953   { (eval echo "$as_me:10953: \"$ac_try\"") >&5
10954   (eval $ac_try) 2>&5
10955   ac_status=$?
10956   echo "$as_me:10956: \$? = $ac_status" >&5
10957   (exit $ac_status); }; }; then
10958   ac_cv_lib_ipc_shmat=yes
10959 else
10960   echo "$as_me: failed program was:" >&5
10961 cat conftest.$ac_ext >&5
10962 ac_cv_lib_ipc_shmat=no
10963 fi
10964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10965 LIBS=$ac_check_lib_save_LIBS
10966 fi
10967 echo "$as_me:10967: result: $ac_cv_lib_ipc_shmat" >&5
10968 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10969 if test $ac_cv_lib_ipc_shmat = yes; then
10970   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10971 fi
10972
10973     fi
10974   fi
10975
10976   # Check for libraries that X11R6 Xt/Xaw programs need.
10977   ac_save_LDFLAGS=$LDFLAGS
10978   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10979   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10980   # check for ICE first), but we must link in the order -lSM -lICE or
10981   # we get undefined symbols.  So assume we have SM if we have ICE.
10982   # These have to be linked with before -lX11, unlike the other
10983   # libraries we check for below, so use a different variable.
10984   # John Interrante, Karl Berry
10985   echo "$as_me:10985: checking for IceConnectionNumber in -lICE" >&5
10986 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10987 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10988   echo $ECHO_N "(cached) $ECHO_C" >&6
10989 else
10990   ac_check_lib_save_LIBS=$LIBS
10991 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10992 cat >conftest.$ac_ext <<_ACEOF
10993 #line 10993 "configure"
10994 #include "confdefs.h"
10995
10996 /* Override any gcc2 internal prototype to avoid an error.  */
10997 #ifdef __cplusplus
10998 extern "C"
10999 #endif
11000 /* We use char because int might match the return type of a gcc2
11001    builtin and then its argument prototype would still apply.  */
11002 char IceConnectionNumber ();
11003 int
11004 main ()
11005 {
11006 IceConnectionNumber ();
11007   ;
11008   return 0;
11009 }
11010 _ACEOF
11011 rm -f conftest.$ac_objext conftest$ac_exeext
11012 if { (eval echo "$as_me:11012: \"$ac_link\"") >&5
11013   (eval $ac_link) 2>&5
11014   ac_status=$?
11015   echo "$as_me:11015: \$? = $ac_status" >&5
11016   (exit $ac_status); } &&
11017          { ac_try='test -s conftest$ac_exeext'
11018   { (eval echo "$as_me:11018: \"$ac_try\"") >&5
11019   (eval $ac_try) 2>&5
11020   ac_status=$?
11021   echo "$as_me:11021: \$? = $ac_status" >&5
11022   (exit $ac_status); }; }; then
11023   ac_cv_lib_ICE_IceConnectionNumber=yes
11024 else
11025   echo "$as_me: failed program was:" >&5
11026 cat conftest.$ac_ext >&5
11027 ac_cv_lib_ICE_IceConnectionNumber=no
11028 fi
11029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11030 LIBS=$ac_check_lib_save_LIBS
11031 fi
11032 echo "$as_me:11032: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11033 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11034 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11035   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11036 fi
11037
11038   LDFLAGS=$ac_save_LDFLAGS
11039
11040 fi
11041
11042 cf_x_athena=${cf_x_athena:-Xaw}
11043
11044 echo "$as_me:11044: checking if you want to link with Xaw 3d library" >&5
11045 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11046 withval=
11047
11048 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11049 if test "${with_Xaw3d+set}" = set; then
11050   withval="$with_Xaw3d"
11051
11052 fi;
11053 if test "$withval" = yes ; then
11054         cf_x_athena=Xaw3d
11055         echo "$as_me:11055: result: yes" >&5
11056 echo "${ECHO_T}yes" >&6
11057 else
11058         echo "$as_me:11058: result: no" >&5
11059 echo "${ECHO_T}no" >&6
11060 fi
11061
11062 echo "$as_me:11062: checking if you want to link with neXT Athena library" >&5
11063 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11064 withval=
11065
11066 # Check whether --with-neXtaw or --without-neXtaw was given.
11067 if test "${with_neXtaw+set}" = set; then
11068   withval="$with_neXtaw"
11069
11070 fi;
11071 if test "$withval" = yes ; then
11072         cf_x_athena=neXtaw
11073         echo "$as_me:11073: result: yes" >&5
11074 echo "${ECHO_T}yes" >&6
11075 else
11076         echo "$as_me:11076: result: no" >&5
11077 echo "${ECHO_T}no" >&6
11078 fi
11079
11080 echo "$as_me:11080: checking if you want to link with Athena-Plus library" >&5
11081 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11082 withval=
11083
11084 # Check whether --with-XawPlus or --without-XawPlus was given.
11085 if test "${with_XawPlus+set}" = set; then
11086   withval="$with_XawPlus"
11087
11088 fi;
11089 if test "$withval" = yes ; then
11090         cf_x_athena=XawPlus
11091         echo "$as_me:11091: result: yes" >&5
11092 echo "${ECHO_T}yes" >&6
11093 else
11094         echo "$as_me:11094: result: no" >&5
11095 echo "${ECHO_T}no" >&6
11096 fi
11097
11098 cf_x_athena_lib=""
11099
11100 if test "$PKG_CONFIG" != none ; then
11101         cf_athena_list=
11102         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11103         for cf_athena_pkg in \
11104                 $cf_athena_list \
11105                 ${cf_x_athena} \
11106                 ${cf_x_athena}-devel \
11107                 lib${cf_x_athena} \
11108                 lib${cf_x_athena}-devel
11109         do
11110
11111 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11112         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
11113
11114 echo "${as_me:-configure}:11114: testing found package $cf_athena_pkg ..." 1>&5
11115
11116         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11117         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
11118         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11119
11120 echo "${as_me:-configure}:11120: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11121
11122         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11123
11124 echo "${as_me:-configure}:11124: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11125
11126 cf_fix_cppflags=no
11127 cf_new_cflags=
11128 cf_new_cppflags=
11129 cf_new_extra_cppflags=
11130
11131 for cf_add_cflags in $cf_pkgconfig_incs
11132 do
11133 case $cf_fix_cppflags in
11134 no)
11135         case $cf_add_cflags in #(vi
11136         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11137                 case $cf_add_cflags in
11138                 -D*)
11139                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11140
11141                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11142                                 && test -z "${cf_tst_cflags}" \
11143                                 && cf_fix_cppflags=yes
11144
11145                         if test $cf_fix_cppflags = yes ; then
11146                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11147                                 continue
11148                         elif test "${cf_tst_cflags}" = "\"'" ; then
11149                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11150                                 continue
11151                         fi
11152                         ;;
11153                 esac
11154                 case "$CPPFLAGS" in
11155                 *$cf_add_cflags) #(vi
11156                         ;;
11157                 *) #(vi
11158                         case $cf_add_cflags in #(vi
11159                         -D*)
11160                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11161
11162 CPPFLAGS=`echo "$CPPFLAGS" | \
11163         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11164                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11165
11166                                 ;;
11167                         esac
11168                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11169                         ;;
11170                 esac
11171                 ;;
11172         *)
11173                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11174                 ;;
11175         esac
11176         ;;
11177 yes)
11178         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11179
11180         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11181
11182         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11183                 && test -z "${cf_tst_cflags}" \
11184                 && cf_fix_cppflags=no
11185         ;;
11186 esac
11187 done
11188
11189 if test -n "$cf_new_cflags" ; then
11190
11191         CFLAGS="$CFLAGS $cf_new_cflags"
11192 fi
11193
11194 if test -n "$cf_new_cppflags" ; then
11195
11196         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11197 fi
11198
11199 if test -n "$cf_new_extra_cppflags" ; then
11200
11201         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11202 fi
11203
11204         LIBS="$cf_pkgconfig_libs $LIBS"
11205
11206                         cf_x_athena_lib="$cf_pkgconfig_libs"
11207
11208 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11209
11210                         cat >>confdefs.h <<EOF
11211 #define $cf_x_athena_LIBS 1
11212 EOF
11213
11214 echo "$as_me:11214: checking for usable $cf_x_athena/Xmu package" >&5
11215 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11216 if test "${cf_cv_xaw_compat+set}" = set; then
11217   echo $ECHO_N "(cached) $ECHO_C" >&6
11218 else
11219
11220 cat >conftest.$ac_ext <<_ACEOF
11221 #line 11221 "configure"
11222 #include "confdefs.h"
11223
11224 #include <X11/Xmu/CharSet.h>
11225
11226 int
11227 main ()
11228 {
11229
11230 int check = XmuCompareISOLatin1("big", "small")
11231
11232   ;
11233   return 0;
11234 }
11235 _ACEOF
11236 rm -f conftest.$ac_objext conftest$ac_exeext
11237 if { (eval echo "$as_me:11237: \"$ac_link\"") >&5
11238   (eval $ac_link) 2>&5
11239   ac_status=$?
11240   echo "$as_me:11240: \$? = $ac_status" >&5
11241   (exit $ac_status); } &&
11242          { ac_try='test -s conftest$ac_exeext'
11243   { (eval echo "$as_me:11243: \"$ac_try\"") >&5
11244   (eval $ac_try) 2>&5
11245   ac_status=$?
11246   echo "$as_me:11246: \$? = $ac_status" >&5
11247   (exit $ac_status); }; }; then
11248   cf_cv_xaw_compat=yes
11249 else
11250   echo "$as_me: failed program was:" >&5
11251 cat conftest.$ac_ext >&5
11252 cf_cv_xaw_compat=no
11253 fi
11254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11255 fi
11256 echo "$as_me:11256: result: $cf_cv_xaw_compat" >&5
11257 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11258
11259                         if test "$cf_cv_xaw_compat" = no
11260                         then
11261                                 # workaround for broken ".pc" files...
11262                                 case "$cf_x_athena_lib" in #(vi
11263                                 *-lXmu*) #(vi
11264                                         ;;
11265                                 *)
11266                                         test -n "$verbose" && echo "    work around broken package" 1>&6
11267
11268 echo "${as_me:-configure}:11268: testing work around broken package ..." 1>&5
11269
11270 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11271         test -n "$verbose" && echo "    found package xmu" 1>&6
11272
11273 echo "${as_me:-configure}:11273: testing found package xmu ..." 1>&5
11274
11275         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11276         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
11277         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11278
11279 echo "${as_me:-configure}:11279: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11280
11281         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11282
11283 echo "${as_me:-configure}:11283: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11284
11285 cf_fix_cppflags=no
11286 cf_new_cflags=
11287 cf_new_cppflags=
11288 cf_new_extra_cppflags=
11289
11290 for cf_add_cflags in $cf_pkgconfig_incs
11291 do
11292 case $cf_fix_cppflags in
11293 no)
11294         case $cf_add_cflags in #(vi
11295         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11296                 case $cf_add_cflags in
11297                 -D*)
11298                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11299
11300                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11301                                 && test -z "${cf_tst_cflags}" \
11302                                 && cf_fix_cppflags=yes
11303
11304                         if test $cf_fix_cppflags = yes ; then
11305                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11306                                 continue
11307                         elif test "${cf_tst_cflags}" = "\"'" ; then
11308                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11309                                 continue
11310                         fi
11311                         ;;
11312                 esac
11313                 case "$CPPFLAGS" in
11314                 *$cf_add_cflags) #(vi
11315                         ;;
11316                 *) #(vi
11317                         case $cf_add_cflags in #(vi
11318                         -D*)
11319                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11320
11321 CPPFLAGS=`echo "$CPPFLAGS" | \
11322         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11323                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11324
11325                                 ;;
11326                         esac
11327                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11328                         ;;
11329                 esac
11330                 ;;
11331         *)
11332                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11333                 ;;
11334         esac
11335         ;;
11336 yes)
11337         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11338
11339         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11340
11341         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11342                 && test -z "${cf_tst_cflags}" \
11343                 && cf_fix_cppflags=no
11344         ;;
11345 esac
11346 done
11347
11348 if test -n "$cf_new_cflags" ; then
11349
11350         CFLAGS="$CFLAGS $cf_new_cflags"
11351 fi
11352
11353 if test -n "$cf_new_cppflags" ; then
11354
11355         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11356 fi
11357
11358 if test -n "$cf_new_extra_cppflags" ; then
11359
11360         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11361 fi
11362
11363         LIBS="$cf_pkgconfig_libs $LIBS"
11364         :
11365 else
11366
11367 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11368
11369 echo "${as_me:-configure}:11369: testing ...before $LIBS ..." 1>&5
11370
11371 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/  / /g'`
11372 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11373
11374 echo "${as_me:-configure}:11374: testing ...after  $LIBS ..." 1>&5
11375
11376 fi
11377
11378                                         ;;
11379                                 esac
11380                         fi
11381
11382                         break
11383 else
11384         :
11385 fi
11386
11387         done
11388 fi
11389
11390 if test -z "$cf_x_athena_lib" ; then
11391
11392 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11393         test -n "$verbose" && echo "    found package Xext" 1>&6
11394
11395 echo "${as_me:-configure}:11395: testing found package Xext ..." 1>&5
11396
11397         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11398         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
11399         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11400
11401 echo "${as_me:-configure}:11401: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11402
11403         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11404
11405 echo "${as_me:-configure}:11405: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11406
11407 cf_fix_cppflags=no
11408 cf_new_cflags=
11409 cf_new_cppflags=
11410 cf_new_extra_cppflags=
11411
11412 for cf_add_cflags in $cf_pkgconfig_incs
11413 do
11414 case $cf_fix_cppflags in
11415 no)
11416         case $cf_add_cflags in #(vi
11417         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11418                 case $cf_add_cflags in
11419                 -D*)
11420                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11421
11422                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11423                                 && test -z "${cf_tst_cflags}" \
11424                                 && cf_fix_cppflags=yes
11425
11426                         if test $cf_fix_cppflags = yes ; then
11427                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11428                                 continue
11429                         elif test "${cf_tst_cflags}" = "\"'" ; then
11430                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11431                                 continue
11432                         fi
11433                         ;;
11434                 esac
11435                 case "$CPPFLAGS" in
11436                 *$cf_add_cflags) #(vi
11437                         ;;
11438                 *) #(vi
11439                         case $cf_add_cflags in #(vi
11440                         -D*)
11441                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11442
11443 CPPFLAGS=`echo "$CPPFLAGS" | \
11444         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11445                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11446
11447                                 ;;
11448                         esac
11449                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11450                         ;;
11451                 esac
11452                 ;;
11453         *)
11454                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11455                 ;;
11456         esac
11457         ;;
11458 yes)
11459         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11460
11461         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11462
11463         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11464                 && test -z "${cf_tst_cflags}" \
11465                 && cf_fix_cppflags=no
11466         ;;
11467 esac
11468 done
11469
11470 if test -n "$cf_new_cflags" ; then
11471
11472         CFLAGS="$CFLAGS $cf_new_cflags"
11473 fi
11474
11475 if test -n "$cf_new_cppflags" ; then
11476
11477         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11478 fi
11479
11480 if test -n "$cf_new_extra_cppflags" ; then
11481
11482         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11483 fi
11484
11485         LIBS="$cf_pkgconfig_libs $LIBS"
11486         :
11487 else
11488
11489         echo "$as_me:11489: checking for XextCreateExtension in -lXext" >&5
11490 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11491 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11492   echo $ECHO_N "(cached) $ECHO_C" >&6
11493 else
11494   ac_check_lib_save_LIBS=$LIBS
11495 LIBS="-lXext  $LIBS"
11496 cat >conftest.$ac_ext <<_ACEOF
11497 #line 11497 "configure"
11498 #include "confdefs.h"
11499
11500 /* Override any gcc2 internal prototype to avoid an error.  */
11501 #ifdef __cplusplus
11502 extern "C"
11503 #endif
11504 /* We use char because int might match the return type of a gcc2
11505    builtin and then its argument prototype would still apply.  */
11506 char XextCreateExtension ();
11507 int
11508 main ()
11509 {
11510 XextCreateExtension ();
11511   ;
11512   return 0;
11513 }
11514 _ACEOF
11515 rm -f conftest.$ac_objext conftest$ac_exeext
11516 if { (eval echo "$as_me:11516: \"$ac_link\"") >&5
11517   (eval $ac_link) 2>&5
11518   ac_status=$?
11519   echo "$as_me:11519: \$? = $ac_status" >&5
11520   (exit $ac_status); } &&
11521          { ac_try='test -s conftest$ac_exeext'
11522   { (eval echo "$as_me:11522: \"$ac_try\"") >&5
11523   (eval $ac_try) 2>&5
11524   ac_status=$?
11525   echo "$as_me:11525: \$? = $ac_status" >&5
11526   (exit $ac_status); }; }; then
11527   ac_cv_lib_Xext_XextCreateExtension=yes
11528 else
11529   echo "$as_me: failed program was:" >&5
11530 cat conftest.$ac_ext >&5
11531 ac_cv_lib_Xext_XextCreateExtension=no
11532 fi
11533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11534 LIBS=$ac_check_lib_save_LIBS
11535 fi
11536 echo "$as_me:11536: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11537 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11538 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11539   LIBS="-lXext $LIBS"
11540 fi
11541
11542 fi
11543
11544 cf_have_X_LIBS=no
11545
11546 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11547         test -n "$verbose" && echo "    found package xt" 1>&6
11548
11549 echo "${as_me:-configure}:11549: testing found package xt ..." 1>&5
11550
11551         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11552         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11553         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11554
11555 echo "${as_me:-configure}:11555: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11556
11557         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
11558
11559 echo "${as_me:-configure}:11559: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11560
11561 cf_fix_cppflags=no
11562 cf_new_cflags=
11563 cf_new_cppflags=
11564 cf_new_extra_cppflags=
11565
11566 for cf_add_cflags in $cf_pkgconfig_incs
11567 do
11568 case $cf_fix_cppflags in
11569 no)
11570         case $cf_add_cflags in #(vi
11571         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11572                 case $cf_add_cflags in
11573                 -D*)
11574                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11575
11576                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11577                                 && test -z "${cf_tst_cflags}" \
11578                                 && cf_fix_cppflags=yes
11579
11580                         if test $cf_fix_cppflags = yes ; then
11581                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11582                                 continue
11583                         elif test "${cf_tst_cflags}" = "\"'" ; then
11584                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11585                                 continue
11586                         fi
11587                         ;;
11588                 esac
11589                 case "$CPPFLAGS" in
11590                 *$cf_add_cflags) #(vi
11591                         ;;
11592                 *) #(vi
11593                         case $cf_add_cflags in #(vi
11594                         -D*)
11595                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11596
11597 CPPFLAGS=`echo "$CPPFLAGS" | \
11598         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11599                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11600
11601                                 ;;
11602                         esac
11603                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11604                         ;;
11605                 esac
11606                 ;;
11607         *)
11608                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11609                 ;;
11610         esac
11611         ;;
11612 yes)
11613         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11614
11615         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11616
11617         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11618                 && test -z "${cf_tst_cflags}" \
11619                 && cf_fix_cppflags=no
11620         ;;
11621 esac
11622 done
11623
11624 if test -n "$cf_new_cflags" ; then
11625
11626         CFLAGS="$CFLAGS $cf_new_cflags"
11627 fi
11628
11629 if test -n "$cf_new_cppflags" ; then
11630
11631         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11632 fi
11633
11634 if test -n "$cf_new_extra_cppflags" ; then
11635
11636         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11637 fi
11638
11639         LIBS="$cf_pkgconfig_libs $LIBS"
11640
11641         case "x$LIBS" in #(vi
11642         *-lX11*) #(vi
11643                 ;;
11644         *)
11645 # we have an "xt" package, but it may omit Xt's dependency on X11
11646 echo "$as_me:11646: checking for usable X dependency" >&5
11647 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11648 if test "${cf_cv_xt_x11_compat+set}" = set; then
11649   echo $ECHO_N "(cached) $ECHO_C" >&6
11650 else
11651
11652 cat >conftest.$ac_ext <<_ACEOF
11653 #line 11653 "configure"
11654 #include "confdefs.h"
11655
11656 #include <X11/Xlib.h>
11657
11658 int
11659 main ()
11660 {
11661
11662         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11663         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11664         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11665         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11666
11667   ;
11668   return 0;
11669 }
11670 _ACEOF
11671 rm -f conftest.$ac_objext conftest$ac_exeext
11672 if { (eval echo "$as_me:11672: \"$ac_link\"") >&5
11673   (eval $ac_link) 2>&5
11674   ac_status=$?
11675   echo "$as_me:11675: \$? = $ac_status" >&5
11676   (exit $ac_status); } &&
11677          { ac_try='test -s conftest$ac_exeext'
11678   { (eval echo "$as_me:11678: \"$ac_try\"") >&5
11679   (eval $ac_try) 2>&5
11680   ac_status=$?
11681   echo "$as_me:11681: \$? = $ac_status" >&5
11682   (exit $ac_status); }; }; then
11683   cf_cv_xt_x11_compat=yes
11684 else
11685   echo "$as_me: failed program was:" >&5
11686 cat conftest.$ac_ext >&5
11687 cf_cv_xt_x11_compat=no
11688 fi
11689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11690 fi
11691 echo "$as_me:11691: result: $cf_cv_xt_x11_compat" >&5
11692 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11693                 if test "$cf_cv_xt_x11_compat" = no
11694                 then
11695                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11696
11697 echo "${as_me:-configure}:11697: testing work around broken X11 dependency ..." 1>&5
11698
11699                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11700
11701 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11702         test -n "$verbose" && echo "    found package x11" 1>&6
11703
11704 echo "${as_me:-configure}:11704: testing found package x11 ..." 1>&5
11705
11706         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11707         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11708         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11709
11710 echo "${as_me:-configure}:11710: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11711
11712         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11713
11714 echo "${as_me:-configure}:11714: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11715
11716 cf_fix_cppflags=no
11717 cf_new_cflags=
11718 cf_new_cppflags=
11719 cf_new_extra_cppflags=
11720
11721 for cf_add_cflags in $cf_pkgconfig_incs
11722 do
11723 case $cf_fix_cppflags in
11724 no)
11725         case $cf_add_cflags in #(vi
11726         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11727                 case $cf_add_cflags in
11728                 -D*)
11729                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11730
11731                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11732                                 && test -z "${cf_tst_cflags}" \
11733                                 && cf_fix_cppflags=yes
11734
11735                         if test $cf_fix_cppflags = yes ; then
11736                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11737                                 continue
11738                         elif test "${cf_tst_cflags}" = "\"'" ; then
11739                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11740                                 continue
11741                         fi
11742                         ;;
11743                 esac
11744                 case "$CPPFLAGS" in
11745                 *$cf_add_cflags) #(vi
11746                         ;;
11747                 *) #(vi
11748                         case $cf_add_cflags in #(vi
11749                         -D*)
11750                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11751
11752 CPPFLAGS=`echo "$CPPFLAGS" | \
11753         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11754                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11755
11756                                 ;;
11757                         esac
11758                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11759                         ;;
11760                 esac
11761                 ;;
11762         *)
11763                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11764                 ;;
11765         esac
11766         ;;
11767 yes)
11768         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11769
11770         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11771
11772         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11773                 && test -z "${cf_tst_cflags}" \
11774                 && cf_fix_cppflags=no
11775         ;;
11776 esac
11777 done
11778
11779 if test -n "$cf_new_cflags" ; then
11780
11781         CFLAGS="$CFLAGS $cf_new_cflags"
11782 fi
11783
11784 if test -n "$cf_new_cppflags" ; then
11785
11786         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11787 fi
11788
11789 if test -n "$cf_new_extra_cppflags" ; then
11790
11791         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11792 fi
11793
11794         LIBS="$cf_pkgconfig_libs $LIBS"
11795         :
11796 else
11797
11798 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11799
11800 echo "${as_me:-configure}:11800: testing ...before $LIBS ..." 1>&5
11801
11802 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/  / /g'`
11803 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11804
11805 echo "${as_me:-configure}:11805: testing ...after  $LIBS ..." 1>&5
11806
11807 fi
11808
11809                 fi
11810                 ;;
11811         esac
11812
11813 echo "$as_me:11813: checking for usable X Toolkit package" >&5
11814 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11815 if test "${cf_cv_xt_ice_compat+set}" = set; then
11816   echo $ECHO_N "(cached) $ECHO_C" >&6
11817 else
11818
11819 cat >conftest.$ac_ext <<_ACEOF
11820 #line 11820 "configure"
11821 #include "confdefs.h"
11822
11823 #include <X11/Shell.h>
11824
11825 int
11826 main ()
11827 {
11828 int num = IceConnectionNumber(0)
11829
11830   ;
11831   return 0;
11832 }
11833 _ACEOF
11834 rm -f conftest.$ac_objext conftest$ac_exeext
11835 if { (eval echo "$as_me:11835: \"$ac_link\"") >&5
11836   (eval $ac_link) 2>&5
11837   ac_status=$?
11838   echo "$as_me:11838: \$? = $ac_status" >&5
11839   (exit $ac_status); } &&
11840          { ac_try='test -s conftest$ac_exeext'
11841   { (eval echo "$as_me:11841: \"$ac_try\"") >&5
11842   (eval $ac_try) 2>&5
11843   ac_status=$?
11844   echo "$as_me:11844: \$? = $ac_status" >&5
11845   (exit $ac_status); }; }; then
11846   cf_cv_xt_ice_compat=yes
11847 else
11848   echo "$as_me: failed program was:" >&5
11849 cat conftest.$ac_ext >&5
11850 cf_cv_xt_ice_compat=no
11851 fi
11852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11853 fi
11854 echo "$as_me:11854: result: $cf_cv_xt_ice_compat" >&5
11855 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11856
11857         if test "$cf_cv_xt_ice_compat" = no
11858         then
11859                 # workaround for broken ".pc" files used for X Toolkit.
11860                 case "x$X_PRE_LIBS" in #(vi
11861                 *-lICE*)
11862                         case "x$LIBS" in #(vi
11863                         *-lICE*) #(vi
11864                                 ;;
11865                         *)
11866                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11867
11868 echo "${as_me:-configure}:11868: testing work around broken ICE dependency ..." 1>&5
11869
11870 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11871         test -n "$verbose" && echo "    found package ice" 1>&6
11872
11873 echo "${as_me:-configure}:11873: testing found package ice ..." 1>&5
11874
11875         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11876         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11877         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11878
11879 echo "${as_me:-configure}:11879: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11880
11881         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11882
11883 echo "${as_me:-configure}:11883: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11884
11885 cf_fix_cppflags=no
11886 cf_new_cflags=
11887 cf_new_cppflags=
11888 cf_new_extra_cppflags=
11889
11890 for cf_add_cflags in $cf_pkgconfig_incs
11891 do
11892 case $cf_fix_cppflags in
11893 no)
11894         case $cf_add_cflags in #(vi
11895         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11896                 case $cf_add_cflags in
11897                 -D*)
11898                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11899
11900                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11901                                 && test -z "${cf_tst_cflags}" \
11902                                 && cf_fix_cppflags=yes
11903
11904                         if test $cf_fix_cppflags = yes ; then
11905                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11906                                 continue
11907                         elif test "${cf_tst_cflags}" = "\"'" ; then
11908                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11909                                 continue
11910                         fi
11911                         ;;
11912                 esac
11913                 case "$CPPFLAGS" in
11914                 *$cf_add_cflags) #(vi
11915                         ;;
11916                 *) #(vi
11917                         case $cf_add_cflags in #(vi
11918                         -D*)
11919                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11920
11921 CPPFLAGS=`echo "$CPPFLAGS" | \
11922         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11923                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11924
11925                                 ;;
11926                         esac
11927                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11928                         ;;
11929                 esac
11930                 ;;
11931         *)
11932                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11933                 ;;
11934         esac
11935         ;;
11936 yes)
11937         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11938
11939         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11940
11941         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11942                 && test -z "${cf_tst_cflags}" \
11943                 && cf_fix_cppflags=no
11944         ;;
11945 esac
11946 done
11947
11948 if test -n "$cf_new_cflags" ; then
11949
11950         CFLAGS="$CFLAGS $cf_new_cflags"
11951 fi
11952
11953 if test -n "$cf_new_cppflags" ; then
11954
11955         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11956 fi
11957
11958 if test -n "$cf_new_extra_cppflags" ; then
11959
11960         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11961 fi
11962
11963         LIBS="$cf_pkgconfig_libs $LIBS"
11964
11965 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11966         test -n "$verbose" && echo "    found package sm" 1>&6
11967
11968 echo "${as_me:-configure}:11968: testing found package sm ..." 1>&5
11969
11970         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11971         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11972         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11973
11974 echo "${as_me:-configure}:11974: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11975
11976         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11977
11978 echo "${as_me:-configure}:11978: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11979
11980 cf_fix_cppflags=no
11981 cf_new_cflags=
11982 cf_new_cppflags=
11983 cf_new_extra_cppflags=
11984
11985 for cf_add_cflags in $cf_pkgconfig_incs
11986 do
11987 case $cf_fix_cppflags in
11988 no)
11989         case $cf_add_cflags in #(vi
11990         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11991                 case $cf_add_cflags in
11992                 -D*)
11993                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11994
11995                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11996                                 && test -z "${cf_tst_cflags}" \
11997                                 && cf_fix_cppflags=yes
11998
11999                         if test $cf_fix_cppflags = yes ; then
12000                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12001                                 continue
12002                         elif test "${cf_tst_cflags}" = "\"'" ; then
12003                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12004                                 continue
12005                         fi
12006                         ;;
12007                 esac
12008                 case "$CPPFLAGS" in
12009                 *$cf_add_cflags) #(vi
12010                         ;;
12011                 *) #(vi
12012                         case $cf_add_cflags in #(vi
12013                         -D*)
12014                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12015
12016 CPPFLAGS=`echo "$CPPFLAGS" | \
12017         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12018                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12019
12020                                 ;;
12021                         esac
12022                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12023                         ;;
12024                 esac
12025                 ;;
12026         *)
12027                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12028                 ;;
12029         esac
12030         ;;
12031 yes)
12032         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12033
12034         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12035
12036         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12037                 && test -z "${cf_tst_cflags}" \
12038                 && cf_fix_cppflags=no
12039         ;;
12040 esac
12041 done
12042
12043 if test -n "$cf_new_cflags" ; then
12044
12045         CFLAGS="$CFLAGS $cf_new_cflags"
12046 fi
12047
12048 if test -n "$cf_new_cppflags" ; then
12049
12050         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12051 fi
12052
12053 if test -n "$cf_new_extra_cppflags" ; then
12054
12055         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12056 fi
12057
12058         LIBS="$cf_pkgconfig_libs $LIBS"
12059         :
12060 else
12061         :
12062 fi
12063
12064 else
12065
12066 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
12067
12068 echo "${as_me:-configure}:12068: testing ...before $LIBS ..." 1>&5
12069
12070 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/  / /g'`
12071 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
12072
12073 echo "${as_me:-configure}:12073: testing ...after  $LIBS ..." 1>&5
12074
12075 fi
12076
12077                                 ;;
12078                         esac
12079                         ;;
12080                 esac
12081         fi
12082
12083         cf_have_X_LIBS=yes
12084
12085 else
12086
12087         LDFLAGS="$X_LIBS $LDFLAGS"
12088
12089 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12090
12091 echo "${as_me:-configure}:12091: testing checking additions to CFLAGS ..." 1>&5
12092
12093 cf_check_cflags="$CFLAGS"
12094 cf_check_cppflags="$CPPFLAGS"
12095
12096 cf_fix_cppflags=no
12097 cf_new_cflags=
12098 cf_new_cppflags=
12099 cf_new_extra_cppflags=
12100
12101 for cf_add_cflags in $X_CFLAGS
12102 do
12103 case $cf_fix_cppflags in
12104 no)
12105         case $cf_add_cflags in #(vi
12106         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12107                 case $cf_add_cflags in
12108                 -D*)
12109                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12110
12111                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12112                                 && test -z "${cf_tst_cflags}" \
12113                                 && cf_fix_cppflags=yes
12114
12115                         if test $cf_fix_cppflags = yes ; then
12116                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12117                                 continue
12118                         elif test "${cf_tst_cflags}" = "\"'" ; then
12119                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12120                                 continue
12121                         fi
12122                         ;;
12123                 esac
12124                 case "$CPPFLAGS" in
12125                 *$cf_add_cflags) #(vi
12126                         ;;
12127                 *) #(vi
12128                         case $cf_add_cflags in #(vi
12129                         -D*)
12130                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12131
12132 CPPFLAGS=`echo "$CPPFLAGS" | \
12133         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12134                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12135
12136                                 ;;
12137                         esac
12138                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12139                         ;;
12140                 esac
12141                 ;;
12142         *)
12143                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12144                 ;;
12145         esac
12146         ;;
12147 yes)
12148         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12149
12150         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12151
12152         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12153                 && test -z "${cf_tst_cflags}" \
12154                 && cf_fix_cppflags=no
12155         ;;
12156 esac
12157 done
12158
12159 if test -n "$cf_new_cflags" ; then
12160         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12161
12162 echo "${as_me:-configure}:12162: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12163
12164         CFLAGS="$CFLAGS $cf_new_cflags"
12165 fi
12166
12167 if test -n "$cf_new_cppflags" ; then
12168         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12169
12170 echo "${as_me:-configure}:12170: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12171
12172         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12173 fi
12174
12175 if test -n "$cf_new_extra_cppflags" ; then
12176         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12177
12178 echo "${as_me:-configure}:12178: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12179
12180         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12181 fi
12182
12183 if test "$cf_check_cflags" != "$CFLAGS" ; then
12184 cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187 #include <stdio.h>
12188 int
12189 main ()
12190 {
12191 printf("Hello world");
12192   ;
12193   return 0;
12194 }
12195 _ACEOF
12196 rm -f conftest.$ac_objext conftest$ac_exeext
12197 if { (eval echo "$as_me:12197: \"$ac_link\"") >&5
12198   (eval $ac_link) 2>&5
12199   ac_status=$?
12200   echo "$as_me:12200: \$? = $ac_status" >&5
12201   (exit $ac_status); } &&
12202          { ac_try='test -s conftest$ac_exeext'
12203   { (eval echo "$as_me:12203: \"$ac_try\"") >&5
12204   (eval $ac_try) 2>&5
12205   ac_status=$?
12206   echo "$as_me:12206: \$? = $ac_status" >&5
12207   (exit $ac_status); }; }; then
12208   :
12209 else
12210   echo "$as_me: failed program was:" >&5
12211 cat conftest.$ac_ext >&5
12212 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12213
12214 echo "${as_me:-configure}:12214: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12215
12216          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12217                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12218
12219 echo "${as_me:-configure}:12219: testing but keeping change to \$CPPFLAGS ..." 1>&5
12220
12221          fi
12222          CFLAGS="$cf_check_flags"
12223 fi
12224 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12225 fi
12226
12227         echo "$as_me:12227: checking for XOpenDisplay" >&5
12228 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12229 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12230   echo $ECHO_N "(cached) $ECHO_C" >&6
12231 else
12232   cat >conftest.$ac_ext <<_ACEOF
12233 #line 12233 "configure"
12234 #include "confdefs.h"
12235 /* System header to define __stub macros and hopefully few prototypes,
12236     which can conflict with char XOpenDisplay (); below.  */
12237 #include <assert.h>
12238 /* Override any gcc2 internal prototype to avoid an error.  */
12239 #ifdef __cplusplus
12240 extern "C"
12241 #endif
12242 /* We use char because int might match the return type of a gcc2
12243    builtin and then its argument prototype would still apply.  */
12244 char XOpenDisplay ();
12245 char (*f) ();
12246
12247 int
12248 main ()
12249 {
12250 /* The GNU C library defines this for functions which it implements
12251     to always fail with ENOSYS.  Some functions are actually named
12252     something starting with __ and the normal name is an alias.  */
12253 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12254 choke me
12255 #else
12256 f = XOpenDisplay;
12257 #endif
12258
12259   ;
12260   return 0;
12261 }
12262 _ACEOF
12263 rm -f conftest.$ac_objext conftest$ac_exeext
12264 if { (eval echo "$as_me:12264: \"$ac_link\"") >&5
12265   (eval $ac_link) 2>&5
12266   ac_status=$?
12267   echo "$as_me:12267: \$? = $ac_status" >&5
12268   (exit $ac_status); } &&
12269          { ac_try='test -s conftest$ac_exeext'
12270   { (eval echo "$as_me:12270: \"$ac_try\"") >&5
12271   (eval $ac_try) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit $ac_status); }; }; then
12275   ac_cv_func_XOpenDisplay=yes
12276 else
12277   echo "$as_me: failed program was:" >&5
12278 cat conftest.$ac_ext >&5
12279 ac_cv_func_XOpenDisplay=no
12280 fi
12281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12282 fi
12283 echo "$as_me:12283: result: $ac_cv_func_XOpenDisplay" >&5
12284 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12285 if test $ac_cv_func_XOpenDisplay = yes; then
12286   :
12287 else
12288
12289         echo "$as_me:12289: checking for XOpenDisplay in -lX11" >&5
12290 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12291 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12292   echo $ECHO_N "(cached) $ECHO_C" >&6
12293 else
12294   ac_check_lib_save_LIBS=$LIBS
12295 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12296 cat >conftest.$ac_ext <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12299
12300 /* Override any gcc2 internal prototype to avoid an error.  */
12301 #ifdef __cplusplus
12302 extern "C"
12303 #endif
12304 /* We use char because int might match the return type of a gcc2
12305    builtin and then its argument prototype would still apply.  */
12306 char XOpenDisplay ();
12307 int
12308 main ()
12309 {
12310 XOpenDisplay ();
12311   ;
12312   return 0;
12313 }
12314 _ACEOF
12315 rm -f conftest.$ac_objext conftest$ac_exeext
12316 if { (eval echo "$as_me:12316: \"$ac_link\"") >&5
12317   (eval $ac_link) 2>&5
12318   ac_status=$?
12319   echo "$as_me:12319: \$? = $ac_status" >&5
12320   (exit $ac_status); } &&
12321          { ac_try='test -s conftest$ac_exeext'
12322   { (eval echo "$as_me:12322: \"$ac_try\"") >&5
12323   (eval $ac_try) 2>&5
12324   ac_status=$?
12325   echo "$as_me:12325: \$? = $ac_status" >&5
12326   (exit $ac_status); }; }; then
12327   ac_cv_lib_X11_XOpenDisplay=yes
12328 else
12329   echo "$as_me: failed program was:" >&5
12330 cat conftest.$ac_ext >&5
12331 ac_cv_lib_X11_XOpenDisplay=no
12332 fi
12333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12334 LIBS=$ac_check_lib_save_LIBS
12335 fi
12336 echo "$as_me:12336: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12337 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12338 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12339   LIBS="-lX11 $LIBS"
12340 fi
12341
12342 fi
12343
12344         echo "$as_me:12344: checking for XtAppInitialize" >&5
12345 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12346 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12347   echo $ECHO_N "(cached) $ECHO_C" >&6
12348 else
12349   cat >conftest.$ac_ext <<_ACEOF
12350 #line 12350 "configure"
12351 #include "confdefs.h"
12352 /* System header to define __stub macros and hopefully few prototypes,
12353     which can conflict with char XtAppInitialize (); below.  */
12354 #include <assert.h>
12355 /* Override any gcc2 internal prototype to avoid an error.  */
12356 #ifdef __cplusplus
12357 extern "C"
12358 #endif
12359 /* We use char because int might match the return type of a gcc2
12360    builtin and then its argument prototype would still apply.  */
12361 char XtAppInitialize ();
12362 char (*f) ();
12363
12364 int
12365 main ()
12366 {
12367 /* The GNU C library defines this for functions which it implements
12368     to always fail with ENOSYS.  Some functions are actually named
12369     something starting with __ and the normal name is an alias.  */
12370 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12371 choke me
12372 #else
12373 f = XtAppInitialize;
12374 #endif
12375
12376   ;
12377   return 0;
12378 }
12379 _ACEOF
12380 rm -f conftest.$ac_objext conftest$ac_exeext
12381 if { (eval echo "$as_me:12381: \"$ac_link\"") >&5
12382   (eval $ac_link) 2>&5
12383   ac_status=$?
12384   echo "$as_me:12384: \$? = $ac_status" >&5
12385   (exit $ac_status); } &&
12386          { ac_try='test -s conftest$ac_exeext'
12387   { (eval echo "$as_me:12387: \"$ac_try\"") >&5
12388   (eval $ac_try) 2>&5
12389   ac_status=$?
12390   echo "$as_me:12390: \$? = $ac_status" >&5
12391   (exit $ac_status); }; }; then
12392   ac_cv_func_XtAppInitialize=yes
12393 else
12394   echo "$as_me: failed program was:" >&5
12395 cat conftest.$ac_ext >&5
12396 ac_cv_func_XtAppInitialize=no
12397 fi
12398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12399 fi
12400 echo "$as_me:12400: result: $ac_cv_func_XtAppInitialize" >&5
12401 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12402 if test $ac_cv_func_XtAppInitialize = yes; then
12403   :
12404 else
12405
12406         echo "$as_me:12406: checking for XtAppInitialize in -lXt" >&5
12407 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12408 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12409   echo $ECHO_N "(cached) $ECHO_C" >&6
12410 else
12411   ac_check_lib_save_LIBS=$LIBS
12412 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12413 cat >conftest.$ac_ext <<_ACEOF
12414 #line 12414 "configure"
12415 #include "confdefs.h"
12416
12417 /* Override any gcc2 internal prototype to avoid an error.  */
12418 #ifdef __cplusplus
12419 extern "C"
12420 #endif
12421 /* We use char because int might match the return type of a gcc2
12422    builtin and then its argument prototype would still apply.  */
12423 char XtAppInitialize ();
12424 int
12425 main ()
12426 {
12427 XtAppInitialize ();
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f conftest.$ac_objext conftest$ac_exeext
12433 if { (eval echo "$as_me:12433: \"$ac_link\"") >&5
12434   (eval $ac_link) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); } &&
12438          { ac_try='test -s conftest$ac_exeext'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit $ac_status); }; }; then
12444   ac_cv_lib_Xt_XtAppInitialize=yes
12445 else
12446   echo "$as_me: failed program was:" >&5
12447 cat conftest.$ac_ext >&5
12448 ac_cv_lib_Xt_XtAppInitialize=no
12449 fi
12450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12451 LIBS=$ac_check_lib_save_LIBS
12452 fi
12453 echo "$as_me:12453: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12454 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12455 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12456   cat >>confdefs.h <<\EOF
12457 #define HAVE_LIBXT 1
12458 EOF
12459
12460                  cf_have_X_LIBS=Xt
12461                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12462 fi
12463
12464 fi
12465
12466 fi
12467
12468 if test $cf_have_X_LIBS = no ; then
12469         { echo "$as_me:12469: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12470 test program.  You will have to check and add the proper libraries by hand
12471 to makefile." >&5
12472 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12473 test program.  You will have to check and add the proper libraries by hand
12474 to makefile." >&2;}
12475 fi
12476
12477 cf_x_athena_root=$cf_x_athena
12478 cf_x_athena_inc=""
12479
12480 for cf_path in default \
12481         /usr/contrib/X11R6 \
12482         /usr/contrib/X11R5 \
12483         /usr/lib/X11R5 \
12484         /usr/local
12485 do
12486         if test -z "$cf_x_athena_inc" ; then
12487                 cf_save="$CPPFLAGS"
12488                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12489                 if test $cf_path != default ; then
12490                         CPPFLAGS="$cf_save -I$cf_path/include"
12491                         echo "$as_me:12491: checking for $cf_test in $cf_path" >&5
12492 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12493                 else
12494                         echo "$as_me:12494: checking for $cf_test" >&5
12495 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12496                 fi
12497                 cat >conftest.$ac_ext <<_ACEOF
12498 #line 12498 "configure"
12499 #include "confdefs.h"
12500
12501 #include <X11/Intrinsic.h>
12502 #include <$cf_test>
12503 int
12504 main ()
12505 {
12506
12507   ;
12508   return 0;
12509 }
12510 _ACEOF
12511 rm -f conftest.$ac_objext
12512 if { (eval echo "$as_me:12512: \"$ac_compile\"") >&5
12513   (eval $ac_compile) 2>&5
12514   ac_status=$?
12515   echo "$as_me:12515: \$? = $ac_status" >&5
12516   (exit $ac_status); } &&
12517          { ac_try='test -s conftest.$ac_objext'
12518   { (eval echo "$as_me:12518: \"$ac_try\"") >&5
12519   (eval $ac_try) 2>&5
12520   ac_status=$?
12521   echo "$as_me:12521: \$? = $ac_status" >&5
12522   (exit $ac_status); }; }; then
12523   cf_result=yes
12524 else
12525   echo "$as_me: failed program was:" >&5
12526 cat conftest.$ac_ext >&5
12527 cf_result=no
12528 fi
12529 rm -f conftest.$ac_objext conftest.$ac_ext
12530                 echo "$as_me:12530: result: $cf_result" >&5
12531 echo "${ECHO_T}$cf_result" >&6
12532                 if test "$cf_result" = yes ; then
12533                         cf_x_athena_inc=$cf_path
12534                         break
12535                 else
12536                         CPPFLAGS="$cf_save"
12537                 fi
12538         fi
12539 done
12540
12541 if test -z "$cf_x_athena_inc" ; then
12542         { echo "$as_me:12542: WARNING: Unable to successfully find Athena header files with test program" >&5
12543 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12544 elif test "$cf_x_athena_inc" != default ; then
12545         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12546 fi
12547
12548 cf_x_athena_root=$cf_x_athena
12549 cf_x_athena_lib=""
12550
12551 for cf_path in default \
12552         /usr/contrib/X11R6 \
12553         /usr/contrib/X11R5 \
12554         /usr/lib/X11R5 \
12555         /usr/local
12556 do
12557         for cf_lib in \
12558                 ${cf_x_athena_root} \
12559                 ${cf_x_athena_root}7 \
12560                 ${cf_x_athena_root}6
12561         do
12562         for cf_libs in \
12563                 "-l$cf_lib -lXmu" \
12564                 "-l$cf_lib -lXpm -lXmu" \
12565                 "-l${cf_lib}_s -lXmu_s"
12566         do
12567                 if test -z "$cf_x_athena_lib" ; then
12568                         cf_save="$LIBS"
12569                         cf_test=XawSimpleMenuAddGlobalActions
12570                         if test $cf_path != default ; then
12571                                 LIBS="-L$cf_path/lib $cf_libs $LIBS"
12572                                 echo "$as_me:12572: checking for $cf_libs in $cf_path" >&5
12573 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12574                         else
12575                                 LIBS="$cf_libs $LIBS"
12576                                 echo "$as_me:12576: checking for $cf_test in $cf_libs" >&5
12577 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12578                         fi
12579                         cat >conftest.$ac_ext <<_ACEOF
12580 #line 12580 "configure"
12581 #include "confdefs.h"
12582
12583 #include <X11/Intrinsic.h>
12584 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12585
12586 int
12587 main ()
12588 {
12589
12590 $cf_test((XtAppContext) 0)
12591   ;
12592   return 0;
12593 }
12594 _ACEOF
12595 rm -f conftest.$ac_objext conftest$ac_exeext
12596 if { (eval echo "$as_me:12596: \"$ac_link\"") >&5
12597   (eval $ac_link) 2>&5
12598   ac_status=$?
12599   echo "$as_me:12599: \$? = $ac_status" >&5
12600   (exit $ac_status); } &&
12601          { ac_try='test -s conftest$ac_exeext'
12602   { (eval echo "$as_me:12602: \"$ac_try\"") >&5
12603   (eval $ac_try) 2>&5
12604   ac_status=$?
12605   echo "$as_me:12605: \$? = $ac_status" >&5
12606   (exit $ac_status); }; }; then
12607   cf_result=yes
12608 else
12609   echo "$as_me: failed program was:" >&5
12610 cat conftest.$ac_ext >&5
12611 cf_result=no
12612 fi
12613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12614                         echo "$as_me:12614: result: $cf_result" >&5
12615 echo "${ECHO_T}$cf_result" >&6
12616                         if test "$cf_result" = yes ; then
12617                                 cf_x_athena_lib="$cf_libs"
12618                                 break
12619                         fi
12620                         LIBS="$cf_save"
12621                 fi
12622         done # cf_libs
12623                 test -n "$cf_x_athena_lib" && break
12624         done # cf_lib
12625 done
12626
12627 if test -z "$cf_x_athena_lib" ; then
12628         { { echo "$as_me:12628: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12629 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12630    { (exit 1); exit 1; }; }
12631 fi
12632
12633 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12634
12635 cat >>confdefs.h <<EOF
12636 #define $cf_x_athena_LIBS 1
12637 EOF
12638
12639 fi
12640
12641 for ac_prog in xcurses-config
12642 do
12643   # Extract the first word of "$ac_prog", so it can be a program name with args.
12644 set dummy $ac_prog; ac_word=$2
12645 echo "$as_me:12645: checking for $ac_word" >&5
12646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12647 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
12648   echo $ECHO_N "(cached) $ECHO_C" >&6
12649 else
12650   case $XCURSES_CONFIG in
12651   [\\/]* | ?:[\\/]*)
12652   ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
12653   ;;
12654   *)
12655   ac_save_IFS=$IFS; IFS=$ac_path_separator
12656 ac_dummy="$PATH"
12657 for ac_dir in $ac_dummy; do
12658   IFS=$ac_save_IFS
12659   test -z "$ac_dir" && ac_dir=.
12660   if $as_executable_p "$ac_dir/$ac_word"; then
12661    ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
12662    echo "$as_me:12662: found $ac_dir/$ac_word" >&5
12663    break
12664 fi
12665 done
12666
12667   ;;
12668 esac
12669 fi
12670 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
12671
12672 if test -n "$XCURSES_CONFIG"; then
12673   echo "$as_me:12673: result: $XCURSES_CONFIG" >&5
12674 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12675 else
12676   echo "$as_me:12676: result: no" >&5
12677 echo "${ECHO_T}no" >&6
12678 fi
12679
12680   test -n "$XCURSES_CONFIG" && break
12681 done
12682 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
12683
12684 if test "$XCURSES_CONFIG" != none ; then
12685
12686 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12687 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12688
12689 cf_cv_lib_XCurses=yes
12690
12691 else
12692
12693 LDFLAGS="$LDFLAGS $X_LIBS"
12694
12695 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12696
12697 echo "${as_me:-configure}:12697: testing checking additions to CFLAGS ..." 1>&5
12698
12699 cf_check_cflags="$CFLAGS"
12700 cf_check_cppflags="$CPPFLAGS"
12701
12702 cf_fix_cppflags=no
12703 cf_new_cflags=
12704 cf_new_cppflags=
12705 cf_new_extra_cppflags=
12706
12707 for cf_add_cflags in $X_CFLAGS
12708 do
12709 case $cf_fix_cppflags in
12710 no)
12711         case $cf_add_cflags in #(vi
12712         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12713                 case $cf_add_cflags in
12714                 -D*)
12715                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12716
12717                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12718                                 && test -z "${cf_tst_cflags}" \
12719                                 && cf_fix_cppflags=yes
12720
12721                         if test $cf_fix_cppflags = yes ; then
12722                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12723                                 continue
12724                         elif test "${cf_tst_cflags}" = "\"'" ; then
12725                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12726                                 continue
12727                         fi
12728                         ;;
12729                 esac
12730                 case "$CPPFLAGS" in
12731                 *$cf_add_cflags) #(vi
12732                         ;;
12733                 *) #(vi
12734                         case $cf_add_cflags in #(vi
12735                         -D*)
12736                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12737
12738 CPPFLAGS=`echo "$CPPFLAGS" | \
12739         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12740                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12741
12742                                 ;;
12743                         esac
12744                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12745                         ;;
12746                 esac
12747                 ;;
12748         *)
12749                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12750                 ;;
12751         esac
12752         ;;
12753 yes)
12754         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12755
12756         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12757
12758         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12759                 && test -z "${cf_tst_cflags}" \
12760                 && cf_fix_cppflags=no
12761         ;;
12762 esac
12763 done
12764
12765 if test -n "$cf_new_cflags" ; then
12766         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12767
12768 echo "${as_me:-configure}:12768: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12769
12770         CFLAGS="$CFLAGS $cf_new_cflags"
12771 fi
12772
12773 if test -n "$cf_new_cppflags" ; then
12774         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12775
12776 echo "${as_me:-configure}:12776: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12777
12778         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12779 fi
12780
12781 if test -n "$cf_new_extra_cppflags" ; then
12782         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12783
12784 echo "${as_me:-configure}:12784: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12785
12786         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12787 fi
12788
12789 if test "$cf_check_cflags" != "$CFLAGS" ; then
12790 cat >conftest.$ac_ext <<_ACEOF
12791 #line 12791 "configure"
12792 #include "confdefs.h"
12793 #include <stdio.h>
12794 int
12795 main ()
12796 {
12797 printf("Hello world");
12798   ;
12799   return 0;
12800 }
12801 _ACEOF
12802 rm -f conftest.$ac_objext conftest$ac_exeext
12803 if { (eval echo "$as_me:12803: \"$ac_link\"") >&5
12804   (eval $ac_link) 2>&5
12805   ac_status=$?
12806   echo "$as_me:12806: \$? = $ac_status" >&5
12807   (exit $ac_status); } &&
12808          { ac_try='test -s conftest$ac_exeext'
12809   { (eval echo "$as_me:12809: \"$ac_try\"") >&5
12810   (eval $ac_try) 2>&5
12811   ac_status=$?
12812   echo "$as_me:12812: \$? = $ac_status" >&5
12813   (exit $ac_status); }; }; then
12814   :
12815 else
12816   echo "$as_me: failed program was:" >&5
12817 cat conftest.$ac_ext >&5
12818 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12819
12820 echo "${as_me:-configure}:12820: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12821
12822          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12823                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12824
12825 echo "${as_me:-configure}:12825: testing but keeping change to \$CPPFLAGS ..." 1>&5
12826
12827          fi
12828          CFLAGS="$cf_check_flags"
12829 fi
12830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12831 fi
12832
12833 echo "$as_me:12833: checking for XOpenDisplay in -lX11" >&5
12834 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12835 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12836   echo $ECHO_N "(cached) $ECHO_C" >&6
12837 else
12838   ac_check_lib_save_LIBS=$LIBS
12839 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12840 cat >conftest.$ac_ext <<_ACEOF
12841 #line 12841 "configure"
12842 #include "confdefs.h"
12843
12844 /* Override any gcc2 internal prototype to avoid an error.  */
12845 #ifdef __cplusplus
12846 extern "C"
12847 #endif
12848 /* We use char because int might match the return type of a gcc2
12849    builtin and then its argument prototype would still apply.  */
12850 char XOpenDisplay ();
12851 int
12852 main ()
12853 {
12854 XOpenDisplay ();
12855   ;
12856   return 0;
12857 }
12858 _ACEOF
12859 rm -f conftest.$ac_objext conftest$ac_exeext
12860 if { (eval echo "$as_me:12860: \"$ac_link\"") >&5
12861   (eval $ac_link) 2>&5
12862   ac_status=$?
12863   echo "$as_me:12863: \$? = $ac_status" >&5
12864   (exit $ac_status); } &&
12865          { ac_try='test -s conftest$ac_exeext'
12866   { (eval echo "$as_me:12866: \"$ac_try\"") >&5
12867   (eval $ac_try) 2>&5
12868   ac_status=$?
12869   echo "$as_me:12869: \$? = $ac_status" >&5
12870   (exit $ac_status); }; }; then
12871   ac_cv_lib_X11_XOpenDisplay=yes
12872 else
12873   echo "$as_me: failed program was:" >&5
12874 cat conftest.$ac_ext >&5
12875 ac_cv_lib_X11_XOpenDisplay=no
12876 fi
12877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12878 LIBS=$ac_check_lib_save_LIBS
12879 fi
12880 echo "$as_me:12880: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12881 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12882 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12883   LIBS="-lX11 $LIBS"
12884 fi
12885
12886 echo "$as_me:12886: checking for XCurses library" >&5
12887 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12888 if test "${cf_cv_lib_XCurses+set}" = set; then
12889   echo $ECHO_N "(cached) $ECHO_C" >&6
12890 else
12891
12892 LIBS="-lXCurses $LIBS"
12893 cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896
12897 #include <xcurses.h>
12898 char *XCursesProgramName = "test";
12899
12900 int
12901 main ()
12902 {
12903 XCursesExit();
12904   ;
12905   return 0;
12906 }
12907 _ACEOF
12908 rm -f conftest.$ac_objext conftest$ac_exeext
12909 if { (eval echo "$as_me:12909: \"$ac_link\"") >&5
12910   (eval $ac_link) 2>&5
12911   ac_status=$?
12912   echo "$as_me:12912: \$? = $ac_status" >&5
12913   (exit $ac_status); } &&
12914          { ac_try='test -s conftest$ac_exeext'
12915   { (eval echo "$as_me:12915: \"$ac_try\"") >&5
12916   (eval $ac_try) 2>&5
12917   ac_status=$?
12918   echo "$as_me:12918: \$? = $ac_status" >&5
12919   (exit $ac_status); }; }; then
12920   cf_cv_lib_XCurses=yes
12921 else
12922   echo "$as_me: failed program was:" >&5
12923 cat conftest.$ac_ext >&5
12924 cf_cv_lib_XCurses=no
12925 fi
12926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12927
12928 fi
12929 echo "$as_me:12929: result: $cf_cv_lib_XCurses" >&5
12930 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12931
12932 fi
12933
12934 if test $cf_cv_lib_XCurses = yes ; then
12935         cat >>confdefs.h <<\EOF
12936 #define UNIX 1
12937 EOF
12938
12939         cat >>confdefs.h <<\EOF
12940 #define XCURSES 1
12941 EOF
12942
12943         echo "$as_me:12943: checking for xcurses.h" >&5
12944 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12945 if test "${ac_cv_header_xcurses_h+set}" = set; then
12946   echo $ECHO_N "(cached) $ECHO_C" >&6
12947 else
12948   cat >conftest.$ac_ext <<_ACEOF
12949 #line 12949 "configure"
12950 #include "confdefs.h"
12951 #include <xcurses.h>
12952 _ACEOF
12953 if { (eval echo "$as_me:12953: \"$ac_cpp conftest.$ac_ext\"") >&5
12954   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12955   ac_status=$?
12956   egrep -v '^ *\+' conftest.er1 >conftest.err
12957   rm -f conftest.er1
12958   cat conftest.err >&5
12959   echo "$as_me:12959: \$? = $ac_status" >&5
12960   (exit $ac_status); } >/dev/null; then
12961   if test -s conftest.err; then
12962     ac_cpp_err=$ac_c_preproc_warn_flag
12963   else
12964     ac_cpp_err=
12965   fi
12966 else
12967   ac_cpp_err=yes
12968 fi
12969 if test -z "$ac_cpp_err"; then
12970   ac_cv_header_xcurses_h=yes
12971 else
12972   echo "$as_me: failed program was:" >&5
12973   cat conftest.$ac_ext >&5
12974   ac_cv_header_xcurses_h=no
12975 fi
12976 rm -f conftest.err conftest.$ac_ext
12977 fi
12978 echo "$as_me:12978: result: $ac_cv_header_xcurses_h" >&5
12979 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12980 if test $ac_cv_header_xcurses_h = yes; then
12981   cat >>confdefs.h <<\EOF
12982 #define HAVE_XCURSES 1
12983 EOF
12984
12985 fi
12986
12987 else
12988         { { echo "$as_me:12988: error: Cannot link with XCurses" >&5
12989 echo "$as_me: error: Cannot link with XCurses" >&2;}
12990    { (exit 1); exit 1; }; }
12991 fi
12992
12993         ;;
12994 esac
12995
12996 case $cf_cv_screen in #(vi
12997 pdcurses) #(vi
12998         ;;
12999 *)
13000         # look for curses-related libraries
13001
13002 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13003 echo "$as_me:13003: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13004 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13005 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13006   echo $ECHO_N "(cached) $ECHO_C" >&6
13007 else
13008   ac_check_lib_save_LIBS=$LIBS
13009 LIBS="-lpanel$cf_cv_libtype  $LIBS"
13010 cat >conftest.$ac_ext <<_ACEOF
13011 #line 13011 "configure"
13012 #include "confdefs.h"
13013
13014 /* Override any gcc2 internal prototype to avoid an error.  */
13015 #ifdef __cplusplus
13016 extern "C"
13017 #endif
13018 /* We use char because int might match the return type of a gcc2
13019    builtin and then its argument prototype would still apply.  */
13020 char new_panel ();
13021 int
13022 main ()
13023 {
13024 new_panel ();
13025   ;
13026   return 0;
13027 }
13028 _ACEOF
13029 rm -f conftest.$ac_objext conftest$ac_exeext
13030 if { (eval echo "$as_me:13030: \"$ac_link\"") >&5
13031   (eval $ac_link) 2>&5
13032   ac_status=$?
13033   echo "$as_me:13033: \$? = $ac_status" >&5
13034   (exit $ac_status); } &&
13035          { ac_try='test -s conftest$ac_exeext'
13036   { (eval echo "$as_me:13036: \"$ac_try\"") >&5
13037   (eval $ac_try) 2>&5
13038   ac_status=$?
13039   echo "$as_me:13039: \$? = $ac_status" >&5
13040   (exit $ac_status); }; }; then
13041   eval "$as_ac_Lib=yes"
13042 else
13043   echo "$as_me: failed program was:" >&5
13044 cat conftest.$ac_ext >&5
13045 eval "$as_ac_Lib=no"
13046 fi
13047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13048 LIBS=$ac_check_lib_save_LIBS
13049 fi
13050 echo "$as_me:13050: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13051 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13052 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13053   cat >>confdefs.h <<EOF
13054 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
13055 EOF
13056
13057   LIBS="-lpanel$cf_cv_libtype $LIBS"
13058
13059 fi
13060
13061 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13062 echo "$as_me:13062: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13063 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13064 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13065   echo $ECHO_N "(cached) $ECHO_C" >&6
13066 else
13067   ac_check_lib_save_LIBS=$LIBS
13068 LIBS="-lmenu$cf_cv_libtype  $LIBS"
13069 cat >conftest.$ac_ext <<_ACEOF
13070 #line 13070 "configure"
13071 #include "confdefs.h"
13072
13073 /* Override any gcc2 internal prototype to avoid an error.  */
13074 #ifdef __cplusplus
13075 extern "C"
13076 #endif
13077 /* We use char because int might match the return type of a gcc2
13078    builtin and then its argument prototype would still apply.  */
13079 char menu_driver ();
13080 int
13081 main ()
13082 {
13083 menu_driver ();
13084   ;
13085   return 0;
13086 }
13087 _ACEOF
13088 rm -f conftest.$ac_objext conftest$ac_exeext
13089 if { (eval echo "$as_me:13089: \"$ac_link\"") >&5
13090   (eval $ac_link) 2>&5
13091   ac_status=$?
13092   echo "$as_me:13092: \$? = $ac_status" >&5
13093   (exit $ac_status); } &&
13094          { ac_try='test -s conftest$ac_exeext'
13095   { (eval echo "$as_me:13095: \"$ac_try\"") >&5
13096   (eval $ac_try) 2>&5
13097   ac_status=$?
13098   echo "$as_me:13098: \$? = $ac_status" >&5
13099   (exit $ac_status); }; }; then
13100   eval "$as_ac_Lib=yes"
13101 else
13102   echo "$as_me: failed program was:" >&5
13103 cat conftest.$ac_ext >&5
13104 eval "$as_ac_Lib=no"
13105 fi
13106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13107 LIBS=$ac_check_lib_save_LIBS
13108 fi
13109 echo "$as_me:13109: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13110 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13111 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13112   cat >>confdefs.h <<EOF
13113 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
13114 EOF
13115
13116   LIBS="-lmenu$cf_cv_libtype $LIBS"
13117
13118 fi
13119
13120 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13121 echo "$as_me:13121: checking for form_driver in -lform$cf_cv_libtype" >&5
13122 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13123 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13124   echo $ECHO_N "(cached) $ECHO_C" >&6
13125 else
13126   ac_check_lib_save_LIBS=$LIBS
13127 LIBS="-lform$cf_cv_libtype  $LIBS"
13128 cat >conftest.$ac_ext <<_ACEOF
13129 #line 13129 "configure"
13130 #include "confdefs.h"
13131
13132 /* Override any gcc2 internal prototype to avoid an error.  */
13133 #ifdef __cplusplus
13134 extern "C"
13135 #endif
13136 /* We use char because int might match the return type of a gcc2
13137    builtin and then its argument prototype would still apply.  */
13138 char form_driver ();
13139 int
13140 main ()
13141 {
13142 form_driver ();
13143   ;
13144   return 0;
13145 }
13146 _ACEOF
13147 rm -f conftest.$ac_objext conftest$ac_exeext
13148 if { (eval echo "$as_me:13148: \"$ac_link\"") >&5
13149   (eval $ac_link) 2>&5
13150   ac_status=$?
13151   echo "$as_me:13151: \$? = $ac_status" >&5
13152   (exit $ac_status); } &&
13153          { ac_try='test -s conftest$ac_exeext'
13154   { (eval echo "$as_me:13154: \"$ac_try\"") >&5
13155   (eval $ac_try) 2>&5
13156   ac_status=$?
13157   echo "$as_me:13157: \$? = $ac_status" >&5
13158   (exit $ac_status); }; }; then
13159   eval "$as_ac_Lib=yes"
13160 else
13161   echo "$as_me: failed program was:" >&5
13162 cat conftest.$ac_ext >&5
13163 eval "$as_ac_Lib=no"
13164 fi
13165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13166 LIBS=$ac_check_lib_save_LIBS
13167 fi
13168 echo "$as_me:13168: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13169 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13170 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13171   cat >>confdefs.h <<EOF
13172 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
13173 EOF
13174
13175   LIBS="-lform$cf_cv_libtype $LIBS"
13176
13177 fi
13178
13179         # look for curses-related headers
13180
13181 for ac_header in \
13182                 nc_alloc.h \
13183                 nomacros.h \
13184                 form.h \
13185                 menu.h \
13186                 panel.h \
13187                 term_entry.h \
13188
13189 do
13190 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13191 echo "$as_me:13191: checking for $ac_header" >&5
13192 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13193 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13194   echo $ECHO_N "(cached) $ECHO_C" >&6
13195 else
13196   cat >conftest.$ac_ext <<_ACEOF
13197 #line 13197 "configure"
13198 #include "confdefs.h"
13199 #include <$ac_header>
13200 _ACEOF
13201 if { (eval echo "$as_me:13201: \"$ac_cpp conftest.$ac_ext\"") >&5
13202   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13203   ac_status=$?
13204   egrep -v '^ *\+' conftest.er1 >conftest.err
13205   rm -f conftest.er1
13206   cat conftest.err >&5
13207   echo "$as_me:13207: \$? = $ac_status" >&5
13208   (exit $ac_status); } >/dev/null; then
13209   if test -s conftest.err; then
13210     ac_cpp_err=$ac_c_preproc_warn_flag
13211   else
13212     ac_cpp_err=
13213   fi
13214 else
13215   ac_cpp_err=yes
13216 fi
13217 if test -z "$ac_cpp_err"; then
13218   eval "$as_ac_Header=yes"
13219 else
13220   echo "$as_me: failed program was:" >&5
13221   cat conftest.$ac_ext >&5
13222   eval "$as_ac_Header=no"
13223 fi
13224 rm -f conftest.err conftest.$ac_ext
13225 fi
13226 echo "$as_me:13226: result: `eval echo '${'$as_ac_Header'}'`" >&5
13227 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13228 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13229   cat >>confdefs.h <<EOF
13230 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13231 EOF
13232
13233 fi
13234 done
13235
13236         ;;
13237 esac
13238
13239 echo "$as_me:13239: checking return type of signal handlers" >&5
13240 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13241 if test "${ac_cv_type_signal+set}" = set; then
13242   echo $ECHO_N "(cached) $ECHO_C" >&6
13243 else
13244   cat >conftest.$ac_ext <<_ACEOF
13245 #line 13245 "configure"
13246 #include "confdefs.h"
13247 #include <sys/types.h>
13248 #include <signal.h>
13249 #ifdef signal
13250 # undef signal
13251 #endif
13252 #ifdef __cplusplus
13253 extern "C" void (*signal (int, void (*)(int)))(int);
13254 #else
13255 void (*signal ()) ();
13256 #endif
13257
13258 int
13259 main ()
13260 {
13261 int i;
13262   ;
13263   return 0;
13264 }
13265 _ACEOF
13266 rm -f conftest.$ac_objext
13267 if { (eval echo "$as_me:13267: \"$ac_compile\"") >&5
13268   (eval $ac_compile) 2>&5
13269   ac_status=$?
13270   echo "$as_me:13270: \$? = $ac_status" >&5
13271   (exit $ac_status); } &&
13272          { ac_try='test -s conftest.$ac_objext'
13273   { (eval echo "$as_me:13273: \"$ac_try\"") >&5
13274   (eval $ac_try) 2>&5
13275   ac_status=$?
13276   echo "$as_me:13276: \$? = $ac_status" >&5
13277   (exit $ac_status); }; }; then
13278   ac_cv_type_signal=void
13279 else
13280   echo "$as_me: failed program was:" >&5
13281 cat conftest.$ac_ext >&5
13282 ac_cv_type_signal=int
13283 fi
13284 rm -f conftest.$ac_objext conftest.$ac_ext
13285 fi
13286 echo "$as_me:13286: result: $ac_cv_type_signal" >&5
13287 echo "${ECHO_T}$ac_cv_type_signal" >&6
13288
13289 cat >>confdefs.h <<EOF
13290 #define RETSIGTYPE $ac_cv_type_signal
13291 EOF
13292
13293 echo "$as_me:13293: checking for ANSI C header files" >&5
13294 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13295 if test "${ac_cv_header_stdc+set}" = set; then
13296   echo $ECHO_N "(cached) $ECHO_C" >&6
13297 else
13298   cat >conftest.$ac_ext <<_ACEOF
13299 #line 13299 "configure"
13300 #include "confdefs.h"
13301 #include <stdlib.h>
13302 #include <stdarg.h>
13303 #include <string.h>
13304 #include <float.h>
13305
13306 _ACEOF
13307 if { (eval echo "$as_me:13307: \"$ac_cpp conftest.$ac_ext\"") >&5
13308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13309   ac_status=$?
13310   egrep -v '^ *\+' conftest.er1 >conftest.err
13311   rm -f conftest.er1
13312   cat conftest.err >&5
13313   echo "$as_me:13313: \$? = $ac_status" >&5
13314   (exit $ac_status); } >/dev/null; then
13315   if test -s conftest.err; then
13316     ac_cpp_err=$ac_c_preproc_warn_flag
13317   else
13318     ac_cpp_err=
13319   fi
13320 else
13321   ac_cpp_err=yes
13322 fi
13323 if test -z "$ac_cpp_err"; then
13324   ac_cv_header_stdc=yes
13325 else
13326   echo "$as_me: failed program was:" >&5
13327   cat conftest.$ac_ext >&5
13328   ac_cv_header_stdc=no
13329 fi
13330 rm -f conftest.err conftest.$ac_ext
13331
13332 if test $ac_cv_header_stdc = yes; then
13333   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13334   cat >conftest.$ac_ext <<_ACEOF
13335 #line 13335 "configure"
13336 #include "confdefs.h"
13337 #include <string.h>
13338
13339 _ACEOF
13340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13341   egrep "memchr" >/dev/null 2>&1; then
13342   :
13343 else
13344   ac_cv_header_stdc=no
13345 fi
13346 rm -rf conftest*
13347
13348 fi
13349
13350 if test $ac_cv_header_stdc = yes; then
13351   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13352   cat >conftest.$ac_ext <<_ACEOF
13353 #line 13353 "configure"
13354 #include "confdefs.h"
13355 #include <stdlib.h>
13356
13357 _ACEOF
13358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13359   egrep "free" >/dev/null 2>&1; then
13360   :
13361 else
13362   ac_cv_header_stdc=no
13363 fi
13364 rm -rf conftest*
13365
13366 fi
13367
13368 if test $ac_cv_header_stdc = yes; then
13369   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13370   if test "$cross_compiling" = yes; then
13371   :
13372 else
13373   cat >conftest.$ac_ext <<_ACEOF
13374 #line 13374 "configure"
13375 #include "confdefs.h"
13376 #include <ctype.h>
13377 #if ((' ' & 0x0FF) == 0x020)
13378 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13379 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13380 #else
13381 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13382                      || ('j' <= (c) && (c) <= 'r') \
13383                      || ('s' <= (c) && (c) <= 'z'))
13384 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13385 #endif
13386
13387 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13388 int
13389 main ()
13390 {
13391   int i;
13392   for (i = 0; i < 256; i++)
13393     if (XOR (islower (i), ISLOWER (i))
13394         || toupper (i) != TOUPPER (i))
13395       $ac_main_return(2);
13396   $ac_main_return (0);
13397 }
13398 _ACEOF
13399 rm -f conftest$ac_exeext
13400 if { (eval echo "$as_me:13400: \"$ac_link\"") >&5
13401   (eval $ac_link) 2>&5
13402   ac_status=$?
13403   echo "$as_me:13403: \$? = $ac_status" >&5
13404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13405   { (eval echo "$as_me:13405: \"$ac_try\"") >&5
13406   (eval $ac_try) 2>&5
13407   ac_status=$?
13408   echo "$as_me:13408: \$? = $ac_status" >&5
13409   (exit $ac_status); }; }; then
13410   :
13411 else
13412   echo "$as_me: program exited with status $ac_status" >&5
13413 echo "$as_me: failed program was:" >&5
13414 cat conftest.$ac_ext >&5
13415 ac_cv_header_stdc=no
13416 fi
13417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13418 fi
13419 fi
13420 fi
13421 echo "$as_me:13421: result: $ac_cv_header_stdc" >&5
13422 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13423 if test $ac_cv_header_stdc = yes; then
13424
13425 cat >>confdefs.h <<\EOF
13426 #define STDC_HEADERS 1
13427 EOF
13428
13429 fi
13430
13431 echo "$as_me:13431: checking whether time.h and sys/time.h may both be included" >&5
13432 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13433 if test "${ac_cv_header_time+set}" = set; then
13434   echo $ECHO_N "(cached) $ECHO_C" >&6
13435 else
13436   cat >conftest.$ac_ext <<_ACEOF
13437 #line 13437 "configure"
13438 #include "confdefs.h"
13439 #include <sys/types.h>
13440 #include <sys/time.h>
13441 #include <time.h>
13442
13443 int
13444 main ()
13445 {
13446 if ((struct tm *) 0)
13447 return 0;
13448   ;
13449   return 0;
13450 }
13451 _ACEOF
13452 rm -f conftest.$ac_objext
13453 if { (eval echo "$as_me:13453: \"$ac_compile\"") >&5
13454   (eval $ac_compile) 2>&5
13455   ac_status=$?
13456   echo "$as_me:13456: \$? = $ac_status" >&5
13457   (exit $ac_status); } &&
13458          { ac_try='test -s conftest.$ac_objext'
13459   { (eval echo "$as_me:13459: \"$ac_try\"") >&5
13460   (eval $ac_try) 2>&5
13461   ac_status=$?
13462   echo "$as_me:13462: \$? = $ac_status" >&5
13463   (exit $ac_status); }; }; then
13464   ac_cv_header_time=yes
13465 else
13466   echo "$as_me: failed program was:" >&5
13467 cat conftest.$ac_ext >&5
13468 ac_cv_header_time=no
13469 fi
13470 rm -f conftest.$ac_objext conftest.$ac_ext
13471 fi
13472 echo "$as_me:13472: result: $ac_cv_header_time" >&5
13473 echo "${ECHO_T}$ac_cv_header_time" >&6
13474 if test $ac_cv_header_time = yes; then
13475
13476 cat >>confdefs.h <<\EOF
13477 #define TIME_WITH_SYS_TIME 1
13478 EOF
13479
13480 fi
13481
13482 for ac_header in \
13483 getopt.h \
13484 locale.h \
13485 math.h \
13486 stdarg.h \
13487 sys/ioctl.h \
13488 sys/select.h \
13489 sys/time.h \
13490 termios.h \
13491 unistd.h \
13492
13493 do
13494 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13495 echo "$as_me:13495: checking for $ac_header" >&5
13496 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13498   echo $ECHO_N "(cached) $ECHO_C" >&6
13499 else
13500   cat >conftest.$ac_ext <<_ACEOF
13501 #line 13501 "configure"
13502 #include "confdefs.h"
13503 #include <$ac_header>
13504 _ACEOF
13505 if { (eval echo "$as_me:13505: \"$ac_cpp conftest.$ac_ext\"") >&5
13506   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13507   ac_status=$?
13508   egrep -v '^ *\+' conftest.er1 >conftest.err
13509   rm -f conftest.er1
13510   cat conftest.err >&5
13511   echo "$as_me:13511: \$? = $ac_status" >&5
13512   (exit $ac_status); } >/dev/null; then
13513   if test -s conftest.err; then
13514     ac_cpp_err=$ac_c_preproc_warn_flag
13515   else
13516     ac_cpp_err=
13517   fi
13518 else
13519   ac_cpp_err=yes
13520 fi
13521 if test -z "$ac_cpp_err"; then
13522   eval "$as_ac_Header=yes"
13523 else
13524   echo "$as_me: failed program was:" >&5
13525   cat conftest.$ac_ext >&5
13526   eval "$as_ac_Header=no"
13527 fi
13528 rm -f conftest.err conftest.$ac_ext
13529 fi
13530 echo "$as_me:13530: result: `eval echo '${'$as_ac_Header'}'`" >&5
13531 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13532 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13533   cat >>confdefs.h <<EOF
13534 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13535 EOF
13536
13537 fi
13538 done
13539
13540 for ac_header in unistd.h getopt.h
13541 do
13542 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13543 echo "$as_me:13543: checking for $ac_header" >&5
13544 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13545 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13546   echo $ECHO_N "(cached) $ECHO_C" >&6
13547 else
13548   cat >conftest.$ac_ext <<_ACEOF
13549 #line 13549 "configure"
13550 #include "confdefs.h"
13551 #include <$ac_header>
13552 _ACEOF
13553 if { (eval echo "$as_me:13553: \"$ac_cpp conftest.$ac_ext\"") >&5
13554   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13555   ac_status=$?
13556   egrep -v '^ *\+' conftest.er1 >conftest.err
13557   rm -f conftest.er1
13558   cat conftest.err >&5
13559   echo "$as_me:13559: \$? = $ac_status" >&5
13560   (exit $ac_status); } >/dev/null; then
13561   if test -s conftest.err; then
13562     ac_cpp_err=$ac_c_preproc_warn_flag
13563   else
13564     ac_cpp_err=
13565   fi
13566 else
13567   ac_cpp_err=yes
13568 fi
13569 if test -z "$ac_cpp_err"; then
13570   eval "$as_ac_Header=yes"
13571 else
13572   echo "$as_me: failed program was:" >&5
13573   cat conftest.$ac_ext >&5
13574   eval "$as_ac_Header=no"
13575 fi
13576 rm -f conftest.err conftest.$ac_ext
13577 fi
13578 echo "$as_me:13578: result: `eval echo '${'$as_ac_Header'}'`" >&5
13579 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13580 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13581   cat >>confdefs.h <<EOF
13582 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13583 EOF
13584
13585 fi
13586 done
13587
13588 echo "$as_me:13588: checking for header declaring getopt variables" >&5
13589 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13590 if test "${cf_cv_getopt_header+set}" = set; then
13591   echo $ECHO_N "(cached) $ECHO_C" >&6
13592 else
13593
13594 cf_cv_getopt_header=none
13595 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13596 do
13597 cat >conftest.$ac_ext <<_ACEOF
13598 #line 13598 "configure"
13599 #include "confdefs.h"
13600
13601 #include <$cf_header>
13602 int
13603 main ()
13604 {
13605 int x = optind; char *y = optarg
13606   ;
13607   return 0;
13608 }
13609 _ACEOF
13610 rm -f conftest.$ac_objext
13611 if { (eval echo "$as_me:13611: \"$ac_compile\"") >&5
13612   (eval $ac_compile) 2>&5
13613   ac_status=$?
13614   echo "$as_me:13614: \$? = $ac_status" >&5
13615   (exit $ac_status); } &&
13616          { ac_try='test -s conftest.$ac_objext'
13617   { (eval echo "$as_me:13617: \"$ac_try\"") >&5
13618   (eval $ac_try) 2>&5
13619   ac_status=$?
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit $ac_status); }; }; then
13622   cf_cv_getopt_header=$cf_header
13623  break
13624 else
13625   echo "$as_me: failed program was:" >&5
13626 cat conftest.$ac_ext >&5
13627 fi
13628 rm -f conftest.$ac_objext conftest.$ac_ext
13629 done
13630
13631 fi
13632 echo "$as_me:13632: result: $cf_cv_getopt_header" >&5
13633 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13634 if test $cf_cv_getopt_header != none ; then
13635         cat >>confdefs.h <<\EOF
13636 #define HAVE_GETOPT_HEADER 1
13637 EOF
13638
13639 fi
13640
13641 for ac_func in \
13642 gettimeofday \
13643 strdup \
13644
13645 do
13646 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13647 echo "$as_me:13647: checking for $ac_func" >&5
13648 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13649 if eval "test \"\${$as_ac_var+set}\" = set"; then
13650   echo $ECHO_N "(cached) $ECHO_C" >&6
13651 else
13652   cat >conftest.$ac_ext <<_ACEOF
13653 #line 13653 "configure"
13654 #include "confdefs.h"
13655 /* System header to define __stub macros and hopefully few prototypes,
13656     which can conflict with char $ac_func (); below.  */
13657 #include <assert.h>
13658 /* Override any gcc2 internal prototype to avoid an error.  */
13659 #ifdef __cplusplus
13660 extern "C"
13661 #endif
13662 /* We use char because int might match the return type of a gcc2
13663    builtin and then its argument prototype would still apply.  */
13664 char $ac_func ();
13665 char (*f) ();
13666
13667 int
13668 main ()
13669 {
13670 /* The GNU C library defines this for functions which it implements
13671     to always fail with ENOSYS.  Some functions are actually named
13672     something starting with __ and the normal name is an alias.  */
13673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13674 choke me
13675 #else
13676 f = $ac_func;
13677 #endif
13678
13679   ;
13680   return 0;
13681 }
13682 _ACEOF
13683 rm -f conftest.$ac_objext conftest$ac_exeext
13684 if { (eval echo "$as_me:13684: \"$ac_link\"") >&5
13685   (eval $ac_link) 2>&5
13686   ac_status=$?
13687   echo "$as_me:13687: \$? = $ac_status" >&5
13688   (exit $ac_status); } &&
13689          { ac_try='test -s conftest$ac_exeext'
13690   { (eval echo "$as_me:13690: \"$ac_try\"") >&5
13691   (eval $ac_try) 2>&5
13692   ac_status=$?
13693   echo "$as_me:13693: \$? = $ac_status" >&5
13694   (exit $ac_status); }; }; then
13695   eval "$as_ac_var=yes"
13696 else
13697   echo "$as_me: failed program was:" >&5
13698 cat conftest.$ac_ext >&5
13699 eval "$as_ac_var=no"
13700 fi
13701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13702 fi
13703 echo "$as_me:13703: result: `eval echo '${'$as_ac_var'}'`" >&5
13704 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13705 if test `eval echo '${'$as_ac_var'}'` = yes; then
13706   cat >>confdefs.h <<EOF
13707 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13708 EOF
13709
13710 fi
13711 done
13712
13713 if test "$cf_enable_widec" = yes; then
13714
13715 for ac_func in \
13716 mblen \
13717 mbrlen \
13718 mbrtowc \
13719 mbsrtowcs \
13720 mbstowcs \
13721 mbtowc \
13722 wcsrtombs \
13723 wcstombs \
13724
13725 do
13726 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13727 echo "$as_me:13727: checking for $ac_func" >&5
13728 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13729 if eval "test \"\${$as_ac_var+set}\" = set"; then
13730   echo $ECHO_N "(cached) $ECHO_C" >&6
13731 else
13732   cat >conftest.$ac_ext <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13735 /* System header to define __stub macros and hopefully few prototypes,
13736     which can conflict with char $ac_func (); below.  */
13737 #include <assert.h>
13738 /* Override any gcc2 internal prototype to avoid an error.  */
13739 #ifdef __cplusplus
13740 extern "C"
13741 #endif
13742 /* We use char because int might match the return type of a gcc2
13743    builtin and then its argument prototype would still apply.  */
13744 char $ac_func ();
13745 char (*f) ();
13746
13747 int
13748 main ()
13749 {
13750 /* The GNU C library defines this for functions which it implements
13751     to always fail with ENOSYS.  Some functions are actually named
13752     something starting with __ and the normal name is an alias.  */
13753 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13754 choke me
13755 #else
13756 f = $ac_func;
13757 #endif
13758
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 rm -f conftest.$ac_objext conftest$ac_exeext
13764 if { (eval echo "$as_me:13764: \"$ac_link\"") >&5
13765   (eval $ac_link) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } &&
13769          { ac_try='test -s conftest$ac_exeext'
13770   { (eval echo "$as_me:13770: \"$ac_try\"") >&5
13771   (eval $ac_try) 2>&5
13772   ac_status=$?
13773   echo "$as_me:13773: \$? = $ac_status" >&5
13774   (exit $ac_status); }; }; then
13775   eval "$as_ac_var=yes"
13776 else
13777   echo "$as_me: failed program was:" >&5
13778 cat conftest.$ac_ext >&5
13779 eval "$as_ac_var=no"
13780 fi
13781 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13782 fi
13783 echo "$as_me:13783: result: `eval echo '${'$as_ac_var'}'`" >&5
13784 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13785 if test `eval echo '${'$as_ac_var'}'` = yes; then
13786   cat >>confdefs.h <<EOF
13787 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13788 EOF
13789
13790 fi
13791 done
13792
13793 fi
13794
13795 echo "$as_me:13795: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13796 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13797 if test "${cf_cv_need_xopen_extension+set}" = set; then
13798   echo $ECHO_N "(cached) $ECHO_C" >&6
13799 else
13800
13801 cat >conftest.$ac_ext <<_ACEOF
13802 #line 13802 "configure"
13803 #include "confdefs.h"
13804
13805 #include <stdlib.h>
13806 #include <${cf_cv_ncurses_header:-curses.h}>
13807 int
13808 main ()
13809 {
13810
13811 #if defined(NCURSES_VERSION_PATCH)
13812 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13813         make an error
13814 #endif
13815 #endif
13816         long x = winnstr(stdscr, "", 0);
13817         int x1, y1;
13818         getbegyx(stdscr, y1, x1)
13819   ;
13820   return 0;
13821 }
13822 _ACEOF
13823 rm -f conftest.$ac_objext conftest$ac_exeext
13824 if { (eval echo "$as_me:13824: \"$ac_link\"") >&5
13825   (eval $ac_link) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); } &&
13829          { ac_try='test -s conftest$ac_exeext'
13830   { (eval echo "$as_me:13830: \"$ac_try\"") >&5
13831   (eval $ac_try) 2>&5
13832   ac_status=$?
13833   echo "$as_me:13833: \$? = $ac_status" >&5
13834   (exit $ac_status); }; }; then
13835   cf_cv_need_xopen_extension=no
13836 else
13837   echo "$as_me: failed program was:" >&5
13838 cat conftest.$ac_ext >&5
13839 cat >conftest.$ac_ext <<_ACEOF
13840 #line 13840 "configure"
13841 #include "confdefs.h"
13842
13843 #define _XOPEN_SOURCE_EXTENDED
13844 #include <stdlib.h>
13845 #include <${cf_cv_ncurses_header:-curses.h}>
13846 int
13847 main ()
13848 {
13849
13850 #ifdef NCURSES_VERSION
13851         cchar_t check;
13852         int check2 = curs_set((int)sizeof(check));
13853 #endif
13854         long x = winnstr(stdscr, "", 0);
13855         int x1, y1;
13856         getbegyx(stdscr, y1, x1)
13857   ;
13858   return 0;
13859 }
13860 _ACEOF
13861 rm -f conftest.$ac_objext conftest$ac_exeext
13862 if { (eval echo "$as_me:13862: \"$ac_link\"") >&5
13863   (eval $ac_link) 2>&5
13864   ac_status=$?
13865   echo "$as_me:13865: \$? = $ac_status" >&5
13866   (exit $ac_status); } &&
13867          { ac_try='test -s conftest$ac_exeext'
13868   { (eval echo "$as_me:13868: \"$ac_try\"") >&5
13869   (eval $ac_try) 2>&5
13870   ac_status=$?
13871   echo "$as_me:13871: \$? = $ac_status" >&5
13872   (exit $ac_status); }; }; then
13873   cf_cv_need_xopen_extension=yes
13874 else
13875   echo "$as_me: failed program was:" >&5
13876 cat conftest.$ac_ext >&5
13877 cf_cv_need_xopen_extension=unknown
13878 fi
13879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13880 fi
13881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13882 fi
13883 echo "$as_me:13883: result: $cf_cv_need_xopen_extension" >&5
13884 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13885 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13886
13887 echo "$as_me:13887: checking for term.h" >&5
13888 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13889 if test "${cf_cv_term_header+set}" = set; then
13890   echo $ECHO_N "(cached) $ECHO_C" >&6
13891 else
13892
13893 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13894 # for <term.h> if we do not find the variant.
13895
13896 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13897
13898 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13899 */*)
13900         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13901         cf_header_list="$cf_header_item $cf_header_list"
13902         ;;
13903 esac
13904
13905 for cf_header in $cf_header_list
13906 do
13907         cat >conftest.$ac_ext <<_ACEOF
13908 #line 13908 "configure"
13909 #include "confdefs.h"
13910
13911 #include <${cf_cv_ncurses_header:-curses.h}>
13912 #include <${cf_header}>
13913 int
13914 main ()
13915 {
13916 WINDOW *x
13917   ;
13918   return 0;
13919 }
13920 _ACEOF
13921 rm -f conftest.$ac_objext
13922 if { (eval echo "$as_me:13922: \"$ac_compile\"") >&5
13923   (eval $ac_compile) 2>&5
13924   ac_status=$?
13925   echo "$as_me:13925: \$? = $ac_status" >&5
13926   (exit $ac_status); } &&
13927          { ac_try='test -s conftest.$ac_objext'
13928   { (eval echo "$as_me:13928: \"$ac_try\"") >&5
13929   (eval $ac_try) 2>&5
13930   ac_status=$?
13931   echo "$as_me:13931: \$? = $ac_status" >&5
13932   (exit $ac_status); }; }; then
13933   cf_cv_term_header=$cf_header
13934          break
13935 else
13936   echo "$as_me: failed program was:" >&5
13937 cat conftest.$ac_ext >&5
13938 cf_cv_term_header=no
13939 fi
13940 rm -f conftest.$ac_objext conftest.$ac_ext
13941 done
13942
13943 case $cf_cv_term_header in #(vi
13944 no)
13945         # If curses is ncurses, some packagers still mess it up by trying to make
13946         # us use GNU termcap.  This handles the most common case.
13947         for cf_header in ncurses/term.h ncursesw/term.h
13948         do
13949                 cat >conftest.$ac_ext <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13952
13953 #include <${cf_cv_ncurses_header:-curses.h}>
13954 #ifdef NCURSES_VERSION
13955 #include <${cf_header}>
13956 #else
13957 make an error
13958 #endif
13959 int
13960 main ()
13961 {
13962 WINDOW *x
13963   ;
13964   return 0;
13965 }
13966 _ACEOF
13967 rm -f conftest.$ac_objext
13968 if { (eval echo "$as_me:13968: \"$ac_compile\"") >&5
13969   (eval $ac_compile) 2>&5
13970   ac_status=$?
13971   echo "$as_me:13971: \$? = $ac_status" >&5
13972   (exit $ac_status); } &&
13973          { ac_try='test -s conftest.$ac_objext'
13974   { (eval echo "$as_me:13974: \"$ac_try\"") >&5
13975   (eval $ac_try) 2>&5
13976   ac_status=$?
13977   echo "$as_me:13977: \$? = $ac_status" >&5
13978   (exit $ac_status); }; }; then
13979   cf_cv_term_header=$cf_header
13980                          break
13981 else
13982   echo "$as_me: failed program was:" >&5
13983 cat conftest.$ac_ext >&5
13984 cf_cv_term_header=no
13985 fi
13986 rm -f conftest.$ac_objext conftest.$ac_ext
13987         done
13988         ;;
13989 esac
13990
13991 fi
13992 echo "$as_me:13992: result: $cf_cv_term_header" >&5
13993 echo "${ECHO_T}$cf_cv_term_header" >&6
13994
13995 case $cf_cv_term_header in #(vi
13996 term.h) #(vi
13997         cat >>confdefs.h <<\EOF
13998 #define HAVE_TERM_H 1
13999 EOF
14000
14001         ;;
14002 ncurses/term.h) #(vi
14003         cat >>confdefs.h <<\EOF
14004 #define HAVE_NCURSES_TERM_H 1
14005 EOF
14006
14007         ;;
14008 ncursesw/term.h)
14009         cat >>confdefs.h <<\EOF
14010 #define HAVE_NCURSESW_TERM_H 1
14011 EOF
14012
14013         ;;
14014 esac
14015
14016 echo "$as_me:14016: checking for unctrl.h" >&5
14017 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14018 if test "${cf_cv_unctrl_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/unctrl.h>, but always look
14023 # for <unctrl.h> if we do not find the variant.
14024
14025 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.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%/.*%/%'`unctrl.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_unctrl_header=$cf_header
14063          break
14064 else
14065   echo "$as_me: failed program was:" >&5
14066 cat conftest.$ac_ext >&5
14067 cf_cv_unctrl_header=no
14068 fi
14069 rm -f conftest.$ac_objext conftest.$ac_ext
14070 done
14071
14072 case $cf_cv_unctrl_header in #(vi
14073 no)
14074         { echo "$as_me:14074: WARNING: unctrl.h header not found" >&5
14075 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14076         ;;
14077 esac
14078
14079 fi
14080 echo "$as_me:14080: result: $cf_cv_unctrl_header" >&5
14081 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14082
14083 case $cf_cv_unctrl_header in #(vi
14084 unctrl.h) #(vi
14085         cat >>confdefs.h <<\EOF
14086 #define HAVE_UNCTRL_H 1
14087 EOF
14088
14089         ;;
14090 ncurses/unctrl.h) #(vi
14091         cat >>confdefs.h <<\EOF
14092 #define HAVE_NCURSES_UNCTRL_H 1
14093 EOF
14094
14095         ;;
14096 ncursesw/unctrl.h)
14097         cat >>confdefs.h <<\EOF
14098 #define HAVE_NCURSESW_UNCTRL_H 1
14099 EOF
14100
14101         ;;
14102 esac
14103
14104 for cf_func in \
14105 assume_default_colors \
14106 chgat \
14107 color_set \
14108 filter \
14109 getbegx \
14110 getcurx \
14111 getmaxx \
14112 getnstr \
14113 getparx \
14114 getwin \
14115 mvvline \
14116 mvwvline \
14117 napms \
14118 putwin \
14119 resize_term \
14120 resizeterm \
14121 ripoffline \
14122 scr_dump \
14123 setupterm \
14124 slk_color \
14125 slk_init \
14126 termattrs \
14127 tgetent \
14128 tigetnum \
14129 tigetstr \
14130 typeahead \
14131 use_default_colors \
14132 use_screen \
14133 use_window \
14134 vsscanf \
14135 vw_printw \
14136 wchgat \
14137 winsstr \
14138 wresize \
14139 wsyncdown \
14140
14141 do
14142
14143 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14144
14145         echo "$as_me:14145: checking for ${cf_func}" >&5
14146 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14147
14148 echo "${as_me:-configure}:14148: testing ${cf_func} ..." 1>&5
14149
14150         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14151   echo $ECHO_N "(cached) $ECHO_C" >&6
14152 else
14153
14154                 eval cf_result='$ac_cv_func_'$cf_func
14155                 if test ".$cf_result" != ".no"; then
14156                         cat >conftest.$ac_ext <<_ACEOF
14157 #line 14157 "configure"
14158 #include "confdefs.h"
14159
14160 #ifdef HAVE_XCURSES
14161 #include <xcurses.h>
14162 char * XCursesProgramName = "test";
14163 #else
14164 #include <${cf_cv_ncurses_header:-curses.h}>
14165 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14166 #include <ncursesw/term.h>
14167 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14168 #include <ncurses/term.h>
14169 #elif defined(HAVE_TERM_H)
14170 #include <term.h>
14171 #endif
14172 #endif
14173
14174 int
14175 main ()
14176 {
14177
14178 #ifndef ${cf_func}
14179 long foo = (long)(&${cf_func});
14180 if (foo + 1234 > 5678)
14181         ${cf_cv_main_return:-return}(foo);
14182 #endif
14183
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f conftest.$ac_objext conftest$ac_exeext
14189 if { (eval echo "$as_me:14189: \"$ac_link\"") >&5
14190   (eval $ac_link) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit $ac_status); } &&
14194          { ac_try='test -s conftest$ac_exeext'
14195   { (eval echo "$as_me:14195: \"$ac_try\"") >&5
14196   (eval $ac_try) 2>&5
14197   ac_status=$?
14198   echo "$as_me:14198: \$? = $ac_status" >&5
14199   (exit $ac_status); }; }; then
14200   cf_result=yes
14201 else
14202   echo "$as_me: failed program was:" >&5
14203 cat conftest.$ac_ext >&5
14204 cf_result=no
14205 fi
14206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14207                 fi
14208                 eval 'cf_cv_func_'$cf_func'=$cf_result'
14209
14210 fi
14211
14212         # use the computed/retrieved cache-value:
14213         eval 'cf_result=$cf_cv_func_'$cf_func
14214         echo "$as_me:14214: result: $cf_result" >&5
14215 echo "${ECHO_T}$cf_result" >&6
14216         if test $cf_result != no; then
14217                 cat >>confdefs.h <<EOF
14218 #define HAVE_${cf_tr_func} 1
14219 EOF
14220
14221         fi
14222 done
14223
14224 for cf_func in tputs
14225 do
14226
14227 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14228
14229         echo "$as_me:14229: checking for ${cf_func}" >&5
14230 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14231
14232 echo "${as_me:-configure}:14232: testing ${cf_func} ..." 1>&5
14233
14234         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14235   echo $ECHO_N "(cached) $ECHO_C" >&6
14236 else
14237
14238                 eval cf_result='$ac_cv_func_'$cf_func
14239                 if test ".$cf_result" != ".no"; then
14240                         cat >conftest.$ac_ext <<_ACEOF
14241 #line 14241 "configure"
14242 #include "confdefs.h"
14243
14244 #ifdef HAVE_XCURSES
14245 #include <xcurses.h>
14246 char * XCursesProgramName = "test";
14247 #else
14248 #include <${cf_cv_ncurses_header:-curses.h}>
14249 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14250 #include <ncursesw/term.h>
14251 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14252 #include <ncurses/term.h>
14253 #elif defined(HAVE_TERM_H)
14254 #include <term.h>
14255 #endif
14256 #endif
14257
14258 int
14259 main ()
14260 {
14261
14262 #ifndef ${cf_func}
14263 long foo = (long)(&${cf_func});
14264 if (foo + 1234 > 5678)
14265         ${cf_cv_main_return:-return}(foo);
14266 #endif
14267
14268   ;
14269   return 0;
14270 }
14271 _ACEOF
14272 rm -f conftest.$ac_objext conftest$ac_exeext
14273 if { (eval echo "$as_me:14273: \"$ac_link\"") >&5
14274   (eval $ac_link) 2>&5
14275   ac_status=$?
14276   echo "$as_me:14276: \$? = $ac_status" >&5
14277   (exit $ac_status); } &&
14278          { ac_try='test -s conftest$ac_exeext'
14279   { (eval echo "$as_me:14279: \"$ac_try\"") >&5
14280   (eval $ac_try) 2>&5
14281   ac_status=$?
14282   echo "$as_me:14282: \$? = $ac_status" >&5
14283   (exit $ac_status); }; }; then
14284   cf_result=yes
14285 else
14286   echo "$as_me: failed program was:" >&5
14287 cat conftest.$ac_ext >&5
14288 cf_result=no
14289 fi
14290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14291                 fi
14292                 eval 'cf_cv_func_'$cf_func'=$cf_result'
14293
14294 fi
14295
14296         # use the computed/retrieved cache-value:
14297         eval 'cf_result=$cf_cv_func_'$cf_func
14298         echo "$as_me:14298: result: $cf_result" >&5
14299 echo "${ECHO_T}$cf_result" >&6
14300         if test $cf_result != no; then
14301                 cat >>confdefs.h <<EOF
14302 #define HAVE_${cf_tr_func} 1
14303 EOF
14304
14305         fi
14306 done
14307
14308 if test x$cf_cv_func_tputs = xyes
14309 then
14310         cf_done=no
14311         for cf_arg in int char
14312         do
14313                 for cf_ret in int void
14314                 do
14315                         if test $cf_ret = void
14316                         then
14317                                 cf_return="/* nothing */"
14318                         else
14319                                 cf_return="return value"
14320                         fi
14321                         cat >conftest.$ac_ext <<_ACEOF
14322 #line 14322 "configure"
14323 #include "confdefs.h"
14324
14325 #include <${cf_cv_ncurses_header:-curses.h}>
14326 #include <$cf_cv_term_header>
14327
14328 static $cf_ret outc($cf_arg value) { $cf_return; }
14329
14330 int
14331 main ()
14332 {
14333
14334         tputs("hello", 0, outc);
14335         ${cf_cv_main_return:-return}(0);
14336
14337   ;
14338   return 0;
14339 }
14340 _ACEOF
14341 rm -f conftest.$ac_objext
14342 if { (eval echo "$as_me:14342: \"$ac_compile\"") >&5
14343   (eval $ac_compile) 2>&5
14344   ac_status=$?
14345   echo "$as_me:14345: \$? = $ac_status" >&5
14346   (exit $ac_status); } &&
14347          { ac_try='test -s conftest.$ac_objext'
14348   { (eval echo "$as_me:14348: \"$ac_try\"") >&5
14349   (eval $ac_try) 2>&5
14350   ac_status=$?
14351   echo "$as_me:14351: \$? = $ac_status" >&5
14352   (exit $ac_status); }; }; then
14353
14354                 test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
14355
14356 echo "${as_me:-configure}:14356: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14357
14358                 cat >>confdefs.h <<EOF
14359 #define TPUTS_ARG               $cf_arg
14360 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14361 #define TPUTS_RETURN(value)     $cf_return
14362 EOF
14363                 cf_done=yes
14364                 break
14365
14366 else
14367   echo "$as_me: failed program was:" >&5
14368 cat conftest.$ac_ext >&5
14369 fi
14370 rm -f conftest.$ac_objext conftest.$ac_ext
14371                 done
14372                 test $cf_done = yes && break
14373         done
14374 fi
14375
14376 echo "$as_me:14376: checking for ncurses extended functions" >&5
14377 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14378 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14379   echo $ECHO_N "(cached) $ECHO_C" >&6
14380 else
14381
14382 cat >conftest.$ac_ext <<_ACEOF
14383 #line 14383 "configure"
14384 #include "confdefs.h"
14385
14386 #include <${cf_cv_ncurses_header:-curses.h}>
14387 int
14388 main ()
14389 {
14390
14391 int x = NCURSES_EXT_FUNCS
14392
14393   ;
14394   return 0;
14395 }
14396 _ACEOF
14397 rm -f conftest.$ac_objext
14398 if { (eval echo "$as_me:14398: \"$ac_compile\"") >&5
14399   (eval $ac_compile) 2>&5
14400   ac_status=$?
14401   echo "$as_me:14401: \$? = $ac_status" >&5
14402   (exit $ac_status); } &&
14403          { ac_try='test -s conftest.$ac_objext'
14404   { (eval echo "$as_me:14404: \"$ac_try\"") >&5
14405   (eval $ac_try) 2>&5
14406   ac_status=$?
14407   echo "$as_me:14407: \$? = $ac_status" >&5
14408   (exit $ac_status); }; }; then
14409   cf_cv_ncurses_ext_funcs=defined
14410 else
14411   echo "$as_me: failed program was:" >&5
14412 cat conftest.$ac_ext >&5
14413
14414 cat >conftest.$ac_ext <<_ACEOF
14415 #line 14415 "configure"
14416 #include "confdefs.h"
14417
14418 #include <${cf_cv_ncurses_header:-curses.h}>
14419 int
14420 main ()
14421 {
14422
14423         (void) assume_default_colors (0, 0);
14424         (void) curses_version ();
14425         (void) define_key (0, 0);
14426         (void) is_term_resized (0, 0);
14427         (void) key_defined (0);
14428         (void) keybound (0, 0);
14429         (void) keyok (0, 0);
14430         (void) resize_term (0, 0);
14431         (void) resizeterm (0, 0);
14432         (void) use_default_colors ();
14433         (void) use_extended_names (0);
14434         (void) wresize (0, 0, 0);
14435   ;
14436   return 0;
14437 }
14438 _ACEOF
14439 rm -f conftest.$ac_objext conftest$ac_exeext
14440 if { (eval echo "$as_me:14440: \"$ac_link\"") >&5
14441   (eval $ac_link) 2>&5
14442   ac_status=$?
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } &&
14445          { ac_try='test -s conftest$ac_exeext'
14446   { (eval echo "$as_me:14446: \"$ac_try\"") >&5
14447   (eval $ac_try) 2>&5
14448   ac_status=$?
14449   echo "$as_me:14449: \$? = $ac_status" >&5
14450   (exit $ac_status); }; }; then
14451   cf_cv_ncurses_ext_funcs=yes
14452 else
14453   echo "$as_me: failed program was:" >&5
14454 cat conftest.$ac_ext >&5
14455 cf_cv_ncurses_ext_funcs=no
14456 fi
14457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14458
14459 fi
14460 rm -f conftest.$ac_objext conftest.$ac_ext
14461
14462 fi
14463 echo "$as_me:14463: result: $cf_cv_ncurses_ext_funcs" >&5
14464 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14465 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
14466 #define NCURSES_EXT_FUNCS 1
14467 EOF
14468
14469 if test "$cf_enable_widec" = yes
14470 then
14471         # workaround for systems with ncurses before 20111029, due to change of
14472         # feature test macro from _XPG5 to _XOPEN_SOURCE
14473         if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14474         then
14475                 cf_define_xpg5=no
14476                 echo "$as_me:14476: checking if _XPG5 should be defined to enable wide-characters" >&5
14477 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14478
14479                 cat >conftest.$ac_ext <<_ACEOF
14480 #line 14480 "configure"
14481 #include "confdefs.h"
14482
14483 #include <${cf_cv_ncurses_header:-curses.h}>
14484 int
14485 main ()
14486 {
14487 int x = _XPG5
14488   ;
14489   return 0;
14490 }
14491 _ACEOF
14492 rm -f conftest.$ac_objext
14493 if { (eval echo "$as_me:14493: \"$ac_compile\"") >&5
14494   (eval $ac_compile) 2>&5
14495   ac_status=$?
14496   echo "$as_me:14496: \$? = $ac_status" >&5
14497   (exit $ac_status); } &&
14498          { ac_try='test -s conftest.$ac_objext'
14499   { (eval echo "$as_me:14499: \"$ac_try\"") >&5
14500   (eval $ac_try) 2>&5
14501   ac_status=$?
14502   echo "$as_me:14502: \$? = $ac_status" >&5
14503   (exit $ac_status); }; }; then
14504   :
14505 else
14506   echo "$as_me: failed program was:" >&5
14507 cat conftest.$ac_ext >&5
14508 cf_save_cppflags="$CPPFLAGS"
14509                          CPPFLAGS="$CPPFLAGS -D_XPG5"
14510                          cat >conftest.$ac_ext <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14513
14514 #include <${cf_cv_ncurses_header:-curses.h}>
14515 int
14516 main ()
14517 {
14518 int x = _XPG5
14519   ;
14520   return 0;
14521 }
14522 _ACEOF
14523 rm -f conftest.$ac_objext
14524 if { (eval echo "$as_me:14524: \"$ac_compile\"") >&5
14525   (eval $ac_compile) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit $ac_status); } &&
14529          { ac_try='test -s conftest.$ac_objext'
14530   { (eval echo "$as_me:14530: \"$ac_try\"") >&5
14531   (eval $ac_try) 2>&5
14532   ac_status=$?
14533   echo "$as_me:14533: \$? = $ac_status" >&5
14534   (exit $ac_status); }; }; then
14535   cf_define_xpg5=yes
14536 else
14537   echo "$as_me: failed program was:" >&5
14538 cat conftest.$ac_ext >&5
14539 fi
14540 rm -f conftest.$ac_objext conftest.$ac_ext
14541                          CPPFLAGS="$cf_save_cppflags"
14542 fi
14543 rm -f conftest.$ac_objext conftest.$ac_ext
14544                 echo "$as_me:14544: result: $cf_define_xpg5" >&5
14545 echo "${ECHO_T}$cf_define_xpg5" >&6
14546
14547                 if test "$cf_define_xpg5" = yes
14548                 then
14549                         CPPFLAGS="$CPPFLAGS -D_XPG5"
14550                 fi
14551         fi
14552
14553         echo "$as_me:14553: checking for wide-character functions" >&5
14554 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14555 if test "${cf_cv_widechar_funcs+set}" = set; then
14556   echo $ECHO_N "(cached) $ECHO_C" >&6
14557 else
14558
14559         cat >conftest.$ac_ext <<_ACEOF
14560 #line 14560 "configure"
14561 #include "confdefs.h"
14562
14563 #include <${cf_cv_ncurses_header:-curses.h}>
14564 int
14565 main ()
14566 {
14567
14568                 static wchar_t src_wchar[2];
14569                 static cchar_t dst_cchar;
14570                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14571
14572   ;
14573   return 0;
14574 }
14575 _ACEOF
14576 rm -f conftest.$ac_objext conftest$ac_exeext
14577 if { (eval echo "$as_me:14577: \"$ac_link\"") >&5
14578   (eval $ac_link) 2>&5
14579   ac_status=$?
14580   echo "$as_me:14580: \$? = $ac_status" >&5
14581   (exit $ac_status); } &&
14582          { ac_try='test -s conftest$ac_exeext'
14583   { (eval echo "$as_me:14583: \"$ac_try\"") >&5
14584   (eval $ac_try) 2>&5
14585   ac_status=$?
14586   echo "$as_me:14586: \$? = $ac_status" >&5
14587   (exit $ac_status); }; }; then
14588   cf_cv_widechar_funcs=yes
14589 else
14590   echo "$as_me: failed program was:" >&5
14591 cat conftest.$ac_ext >&5
14592 cf_cv_widechar_funcs=no
14593 fi
14594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14595
14596 fi
14597 echo "$as_me:14597: result: $cf_cv_widechar_funcs" >&5
14598 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14599         if test "$cf_cv_widechar_funcs" != no ; then
14600                 cat >>confdefs.h <<\EOF
14601 #define USE_WIDEC_SUPPORT 1
14602 EOF
14603
14604         else
14605                 cat >>confdefs.h <<\EOF
14606 #define USE_WIDEC_SUPPORT 0
14607 EOF
14608
14609         fi
14610 else
14611         cat >>confdefs.h <<\EOF
14612 #define USE_WIDEC_SUPPORT 0
14613 EOF
14614
14615 fi
14616
14617 echo "$as_me:14617: checking if sys/time.h works with sys/select.h" >&5
14618 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14619 if test "${cf_cv_sys_time_select+set}" = set; then
14620   echo $ECHO_N "(cached) $ECHO_C" >&6
14621 else
14622
14623 cat >conftest.$ac_ext <<_ACEOF
14624 #line 14624 "configure"
14625 #include "confdefs.h"
14626
14627 #include <sys/types.h>
14628 #ifdef HAVE_SYS_TIME_H
14629 #include <sys/time.h>
14630 #endif
14631 #ifdef HAVE_SYS_SELECT_H
14632 #include <sys/select.h>
14633 #endif
14634
14635 int
14636 main ()
14637 {
14638
14639   ;
14640   return 0;
14641 }
14642 _ACEOF
14643 rm -f conftest.$ac_objext
14644 if { (eval echo "$as_me:14644: \"$ac_compile\"") >&5
14645   (eval $ac_compile) 2>&5
14646   ac_status=$?
14647   echo "$as_me:14647: \$? = $ac_status" >&5
14648   (exit $ac_status); } &&
14649          { ac_try='test -s conftest.$ac_objext'
14650   { (eval echo "$as_me:14650: \"$ac_try\"") >&5
14651   (eval $ac_try) 2>&5
14652   ac_status=$?
14653   echo "$as_me:14653: \$? = $ac_status" >&5
14654   (exit $ac_status); }; }; then
14655   cf_cv_sys_time_select=yes
14656 else
14657   echo "$as_me: failed program was:" >&5
14658 cat conftest.$ac_ext >&5
14659 cf_cv_sys_time_select=no
14660 fi
14661 rm -f conftest.$ac_objext conftest.$ac_ext
14662
14663 fi
14664
14665 echo "$as_me:14665: result: $cf_cv_sys_time_select" >&5
14666 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14667 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14668 #define HAVE_SYS_TIME_SELECT 1
14669 EOF
14670
14671 echo "$as_me:14671: checking for function curses_version" >&5
14672 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14673 if test "${cf_cv_func_curses_version+set}" = set; then
14674   echo $ECHO_N "(cached) $ECHO_C" >&6
14675 else
14676
14677 if test "$cross_compiling" = yes; then
14678   cf_cv_func_curses_version=unknown
14679 else
14680   cat >conftest.$ac_ext <<_ACEOF
14681 #line 14681 "configure"
14682 #include "confdefs.h"
14683
14684 #include <${cf_cv_ncurses_header:-curses.h}>
14685 int main()
14686 {
14687         char temp[1024];
14688         sprintf(temp, "%s\n", curses_version());
14689         ${cf_cv_main_return:-return}(0);
14690 }
14691
14692 _ACEOF
14693 rm -f conftest$ac_exeext
14694 if { (eval echo "$as_me:14694: \"$ac_link\"") >&5
14695   (eval $ac_link) 2>&5
14696   ac_status=$?
14697   echo "$as_me:14697: \$? = $ac_status" >&5
14698   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14699   { (eval echo "$as_me:14699: \"$ac_try\"") >&5
14700   (eval $ac_try) 2>&5
14701   ac_status=$?
14702   echo "$as_me:14702: \$? = $ac_status" >&5
14703   (exit $ac_status); }; }; then
14704   cf_cv_func_curses_version=yes
14705
14706 else
14707   echo "$as_me: program exited with status $ac_status" >&5
14708 echo "$as_me: failed program was:" >&5
14709 cat conftest.$ac_ext >&5
14710 cf_cv_func_curses_version=no
14711
14712 fi
14713 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14714 fi
14715 rm -f core
14716 fi
14717 echo "$as_me:14717: result: $cf_cv_func_curses_version" >&5
14718 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14719 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14720 #define HAVE_CURSES_VERSION 1
14721 EOF
14722
14723 echo "$as_me:14723: checking for ncurses wrap-prefix" >&5
14724 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14725
14726 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14727 if test "${with_ncurses_wrap_prefix+set}" = set; then
14728   withval="$with_ncurses_wrap_prefix"
14729   NCURSES_WRAP_PREFIX=$withval
14730 else
14731   NCURSES_WRAP_PREFIX=_nc_
14732 fi;
14733 echo "$as_me:14733: result: $NCURSES_WRAP_PREFIX" >&5
14734 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14735
14736 echo "$as_me:14736: checking for alternate character set array" >&5
14737 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14738 if test "${cf_cv_curses_acs_map+set}" = set; then
14739   echo $ECHO_N "(cached) $ECHO_C" >&6
14740 else
14741
14742 cf_cv_curses_acs_map=unknown
14743 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14744 do
14745 cat >conftest.$ac_ext <<_ACEOF
14746 #line 14746 "configure"
14747 #include "confdefs.h"
14748
14749 #include <${cf_cv_ncurses_header:-curses.h}>
14750
14751 int
14752 main ()
14753 {
14754
14755 $name['k'] = ACS_PLUS
14756
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 rm -f conftest.$ac_objext conftest$ac_exeext
14762 if { (eval echo "$as_me:14762: \"$ac_link\"") >&5
14763   (eval $ac_link) 2>&5
14764   ac_status=$?
14765   echo "$as_me:14765: \$? = $ac_status" >&5
14766   (exit $ac_status); } &&
14767          { ac_try='test -s conftest$ac_exeext'
14768   { (eval echo "$as_me:14768: \"$ac_try\"") >&5
14769   (eval $ac_try) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit $ac_status); }; }; then
14773   cf_cv_curses_acs_map=$name; break
14774 else
14775   echo "$as_me: failed program was:" >&5
14776 cat conftest.$ac_ext >&5
14777 fi
14778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14779 done
14780
14781 fi
14782 echo "$as_me:14782: result: $cf_cv_curses_acs_map" >&5
14783 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14784
14785 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14786 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14787 EOF
14788
14789 if test "$cf_enable_widec" = yes; then
14790
14791 echo "$as_me:14791: checking for wide alternate character set array" >&5
14792 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14793 if test "${cf_cv_curses_wacs_map+set}" = set; then
14794   echo $ECHO_N "(cached) $ECHO_C" >&6
14795 else
14796
14797         cf_cv_curses_wacs_map=unknown
14798         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14799         do
14800         cat >conftest.$ac_ext <<_ACEOF
14801 #line 14801 "configure"
14802 #include "confdefs.h"
14803
14804 #ifndef _XOPEN_SOURCE_EXTENDED
14805 #define _XOPEN_SOURCE_EXTENDED
14806 #endif
14807 #include <${cf_cv_ncurses_header:-curses.h}>
14808 int
14809 main ()
14810 {
14811 void *foo = &($name['k'])
14812   ;
14813   return 0;
14814 }
14815 _ACEOF
14816 rm -f conftest.$ac_objext conftest$ac_exeext
14817 if { (eval echo "$as_me:14817: \"$ac_link\"") >&5
14818   (eval $ac_link) 2>&5
14819   ac_status=$?
14820   echo "$as_me:14820: \$? = $ac_status" >&5
14821   (exit $ac_status); } &&
14822          { ac_try='test -s conftest$ac_exeext'
14823   { (eval echo "$as_me:14823: \"$ac_try\"") >&5
14824   (eval $ac_try) 2>&5
14825   ac_status=$?
14826   echo "$as_me:14826: \$? = $ac_status" >&5
14827   (exit $ac_status); }; }; then
14828   cf_cv_curses_wacs_map=$name
14829          break
14830 else
14831   echo "$as_me: failed program was:" >&5
14832 cat conftest.$ac_ext >&5
14833 fi
14834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14835         done
14836 fi
14837 echo "$as_me:14837: result: $cf_cv_curses_wacs_map" >&5
14838 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14839
14840 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14841 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14842 EOF
14843
14844 echo "$as_me:14844: checking for wide alternate character constants" >&5
14845 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14846 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14847   echo $ECHO_N "(cached) $ECHO_C" >&6
14848 else
14849
14850 cf_cv_curses_wacs_symbols=no
14851 if test "$cf_cv_curses_wacs_map" != unknown
14852 then
14853         cat >conftest.$ac_ext <<_ACEOF
14854 #line 14854 "configure"
14855 #include "confdefs.h"
14856
14857 #ifndef _XOPEN_SOURCE_EXTENDED
14858 #define _XOPEN_SOURCE_EXTENDED
14859 #endif
14860 #include <${cf_cv_ncurses_header:-curses.h}>
14861 int
14862 main ()
14863 {
14864 cchar_t *foo = WACS_PLUS;
14865          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14866   ;
14867   return 0;
14868 }
14869 _ACEOF
14870 rm -f conftest.$ac_objext conftest$ac_exeext
14871 if { (eval echo "$as_me:14871: \"$ac_link\"") >&5
14872   (eval $ac_link) 2>&5
14873   ac_status=$?
14874   echo "$as_me:14874: \$? = $ac_status" >&5
14875   (exit $ac_status); } &&
14876          { ac_try='test -s conftest$ac_exeext'
14877   { (eval echo "$as_me:14877: \"$ac_try\"") >&5
14878   (eval $ac_try) 2>&5
14879   ac_status=$?
14880   echo "$as_me:14880: \$? = $ac_status" >&5
14881   (exit $ac_status); }; }; then
14882   cf_cv_curses_wacs_symbols=yes
14883 else
14884   echo "$as_me: failed program was:" >&5
14885 cat conftest.$ac_ext >&5
14886 fi
14887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14888 else
14889         cat >conftest.$ac_ext <<_ACEOF
14890 #line 14890 "configure"
14891 #include "confdefs.h"
14892
14893 #ifndef _XOPEN_SOURCE_EXTENDED
14894 #define _XOPEN_SOURCE_EXTENDED
14895 #endif
14896 #include <${cf_cv_ncurses_header:-curses.h}>
14897 int
14898 main ()
14899 {
14900 cchar_t *foo = WACS_PLUS
14901   ;
14902   return 0;
14903 }
14904 _ACEOF
14905 rm -f conftest.$ac_objext conftest$ac_exeext
14906 if { (eval echo "$as_me:14906: \"$ac_link\"") >&5
14907   (eval $ac_link) 2>&5
14908   ac_status=$?
14909   echo "$as_me:14909: \$? = $ac_status" >&5
14910   (exit $ac_status); } &&
14911          { ac_try='test -s conftest$ac_exeext'
14912   { (eval echo "$as_me:14912: \"$ac_try\"") >&5
14913   (eval $ac_try) 2>&5
14914   ac_status=$?
14915   echo "$as_me:14915: \$? = $ac_status" >&5
14916   (exit $ac_status); }; }; then
14917   cf_cv_curses_wacs_symbols=yes
14918 else
14919   echo "$as_me: failed program was:" >&5
14920 cat conftest.$ac_ext >&5
14921 fi
14922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14923 fi
14924
14925 fi
14926 echo "$as_me:14926: result: $cf_cv_curses_wacs_symbols" >&5
14927 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14928
14929 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
14930 #define CURSES_WACS_SYMBOLS 1
14931 EOF
14932
14933 fi
14934
14935 echo "$as_me:14935: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14936 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14937 cat >conftest.$ac_ext <<_ACEOF
14938 #line 14938 "configure"
14939 #include "confdefs.h"
14940
14941 #ifndef _XOPEN_SOURCE_EXTENDED
14942 #define _XOPEN_SOURCE_EXTENDED
14943 #endif
14944 #include <${cf_cv_ncurses_header:-curses.h}>
14945 int
14946 main ()
14947 {
14948
14949 attr_t foo
14950
14951   ;
14952   return 0;
14953 }
14954 _ACEOF
14955 rm -f conftest.$ac_objext
14956 if { (eval echo "$as_me:14956: \"$ac_compile\"") >&5
14957   (eval $ac_compile) 2>&5
14958   ac_status=$?
14959   echo "$as_me:14959: \$? = $ac_status" >&5
14960   (exit $ac_status); } &&
14961          { ac_try='test -s conftest.$ac_objext'
14962   { (eval echo "$as_me:14962: \"$ac_try\"") >&5
14963   (eval $ac_try) 2>&5
14964   ac_status=$?
14965   echo "$as_me:14965: \$? = $ac_status" >&5
14966   (exit $ac_status); }; }; then
14967   cf_result=yes
14968 else
14969   echo "$as_me: failed program was:" >&5
14970 cat conftest.$ac_ext >&5
14971 cf_result=no
14972 fi
14973 rm -f conftest.$ac_objext conftest.$ac_ext
14974 echo "$as_me:14974: result: $cf_result" >&5
14975 echo "${ECHO_T}$cf_result" >&6
14976 if test $cf_result = yes ; then
14977
14978 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14979
14980         cat >>confdefs.h <<EOF
14981 #define $cf_result 1
14982 EOF
14983
14984 else
14985         cat >>confdefs.h <<EOF
14986 #define attr_t long
14987 EOF
14988
14989 fi
14990
14991 if test "$cf_enable_widec" = yes; then
14992
14993 # This is needed on Tru64 5.0 to declare mbstate_t
14994 echo "$as_me:14994: checking if we must include wchar.h to declare mbstate_t" >&5
14995 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14996 if test "${cf_cv_mbstate_t+set}" = set; then
14997   echo $ECHO_N "(cached) $ECHO_C" >&6
14998 else
14999
15000 cat >conftest.$ac_ext <<_ACEOF
15001 #line 15001 "configure"
15002 #include "confdefs.h"
15003
15004 #include <stdlib.h>
15005 #include <stdarg.h>
15006 #include <stdio.h>
15007 #ifdef HAVE_LIBUTF8_H
15008 #include <libutf8.h>
15009 #endif
15010 int
15011 main ()
15012 {
15013 mbstate_t state
15014   ;
15015   return 0;
15016 }
15017 _ACEOF
15018 rm -f conftest.$ac_objext
15019 if { (eval echo "$as_me:15019: \"$ac_compile\"") >&5
15020   (eval $ac_compile) 2>&5
15021   ac_status=$?
15022   echo "$as_me:15022: \$? = $ac_status" >&5
15023   (exit $ac_status); } &&
15024          { ac_try='test -s conftest.$ac_objext'
15025   { (eval echo "$as_me:15025: \"$ac_try\"") >&5
15026   (eval $ac_try) 2>&5
15027   ac_status=$?
15028   echo "$as_me:15028: \$? = $ac_status" >&5
15029   (exit $ac_status); }; }; then
15030   cf_cv_mbstate_t=no
15031 else
15032   echo "$as_me: failed program was:" >&5
15033 cat conftest.$ac_ext >&5
15034 cat >conftest.$ac_ext <<_ACEOF
15035 #line 15035 "configure"
15036 #include "confdefs.h"
15037
15038 #include <stdlib.h>
15039 #include <stdarg.h>
15040 #include <stdio.h>
15041 #include <wchar.h>
15042 #ifdef HAVE_LIBUTF8_H
15043 #include <libutf8.h>
15044 #endif
15045 int
15046 main ()
15047 {
15048 mbstate_t value
15049   ;
15050   return 0;
15051 }
15052 _ACEOF
15053 rm -f conftest.$ac_objext
15054 if { (eval echo "$as_me:15054: \"$ac_compile\"") >&5
15055   (eval $ac_compile) 2>&5
15056   ac_status=$?
15057   echo "$as_me:15057: \$? = $ac_status" >&5
15058   (exit $ac_status); } &&
15059          { ac_try='test -s conftest.$ac_objext'
15060   { (eval echo "$as_me:15060: \"$ac_try\"") >&5
15061   (eval $ac_try) 2>&5
15062   ac_status=$?
15063   echo "$as_me:15063: \$? = $ac_status" >&5
15064   (exit $ac_status); }; }; then
15065   cf_cv_mbstate_t=yes
15066 else
15067   echo "$as_me: failed program was:" >&5
15068 cat conftest.$ac_ext >&5
15069 cf_cv_mbstate_t=unknown
15070 fi
15071 rm -f conftest.$ac_objext conftest.$ac_ext
15072 fi
15073 rm -f conftest.$ac_objext conftest.$ac_ext
15074 fi
15075 echo "$as_me:15075: result: $cf_cv_mbstate_t" >&5
15076 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15077
15078 if test "$cf_cv_mbstate_t" = yes ; then
15079         cat >>confdefs.h <<\EOF
15080 #define NEED_WCHAR_H 1
15081 EOF
15082
15083         NEED_WCHAR_H=1
15084 fi
15085
15086 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15087 if test "$cf_cv_mbstate_t" = unknown ; then
15088         NCURSES_MBSTATE_T=1
15089 fi
15090
15091 # if we find mbstate_t in either place, use substitution to provide a fallback.
15092 if test "$cf_cv_mbstate_t" != unknown ; then
15093         NCURSES_OK_MBSTATE_T=1
15094 fi
15095
15096 # This is needed on Tru64 5.0 to declare wchar_t
15097 echo "$as_me:15097: checking if we must include wchar.h to declare wchar_t" >&5
15098 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15099 if test "${cf_cv_wchar_t+set}" = set; then
15100   echo $ECHO_N "(cached) $ECHO_C" >&6
15101 else
15102
15103 cat >conftest.$ac_ext <<_ACEOF
15104 #line 15104 "configure"
15105 #include "confdefs.h"
15106
15107 #include <stdlib.h>
15108 #include <stdarg.h>
15109 #include <stdio.h>
15110 #ifdef HAVE_LIBUTF8_H
15111 #include <libutf8.h>
15112 #endif
15113 int
15114 main ()
15115 {
15116 wchar_t state
15117   ;
15118   return 0;
15119 }
15120 _ACEOF
15121 rm -f conftest.$ac_objext
15122 if { (eval echo "$as_me:15122: \"$ac_compile\"") >&5
15123   (eval $ac_compile) 2>&5
15124   ac_status=$?
15125   echo "$as_me:15125: \$? = $ac_status" >&5
15126   (exit $ac_status); } &&
15127          { ac_try='test -s conftest.$ac_objext'
15128   { (eval echo "$as_me:15128: \"$ac_try\"") >&5
15129   (eval $ac_try) 2>&5
15130   ac_status=$?
15131   echo "$as_me:15131: \$? = $ac_status" >&5
15132   (exit $ac_status); }; }; then
15133   cf_cv_wchar_t=no
15134 else
15135   echo "$as_me: failed program was:" >&5
15136 cat conftest.$ac_ext >&5
15137 cat >conftest.$ac_ext <<_ACEOF
15138 #line 15138 "configure"
15139 #include "confdefs.h"
15140
15141 #include <stdlib.h>
15142 #include <stdarg.h>
15143 #include <stdio.h>
15144 #include <wchar.h>
15145 #ifdef HAVE_LIBUTF8_H
15146 #include <libutf8.h>
15147 #endif
15148 int
15149 main ()
15150 {
15151 wchar_t value
15152   ;
15153   return 0;
15154 }
15155 _ACEOF
15156 rm -f conftest.$ac_objext
15157 if { (eval echo "$as_me:15157: \"$ac_compile\"") >&5
15158   (eval $ac_compile) 2>&5
15159   ac_status=$?
15160   echo "$as_me:15160: \$? = $ac_status" >&5
15161   (exit $ac_status); } &&
15162          { ac_try='test -s conftest.$ac_objext'
15163   { (eval echo "$as_me:15163: \"$ac_try\"") >&5
15164   (eval $ac_try) 2>&5
15165   ac_status=$?
15166   echo "$as_me:15166: \$? = $ac_status" >&5
15167   (exit $ac_status); }; }; then
15168   cf_cv_wchar_t=yes
15169 else
15170   echo "$as_me: failed program was:" >&5
15171 cat conftest.$ac_ext >&5
15172 cf_cv_wchar_t=unknown
15173 fi
15174 rm -f conftest.$ac_objext conftest.$ac_ext
15175 fi
15176 rm -f conftest.$ac_objext conftest.$ac_ext
15177 fi
15178 echo "$as_me:15178: result: $cf_cv_wchar_t" >&5
15179 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15180
15181 if test "$cf_cv_wchar_t" = yes ; then
15182         cat >>confdefs.h <<\EOF
15183 #define NEED_WCHAR_H 1
15184 EOF
15185
15186         NEED_WCHAR_H=1
15187 fi
15188
15189 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15190 if test "$cf_cv_wchar_t" = unknown ; then
15191         NCURSES_WCHAR_T=1
15192 fi
15193
15194 # if we find wchar_t in either place, use substitution to provide a fallback.
15195 if test "$cf_cv_wchar_t" != unknown ; then
15196         NCURSES_OK_WCHAR_T=1
15197 fi
15198
15199 # This is needed on Tru64 5.0 to declare wint_t
15200 echo "$as_me:15200: checking if we must include wchar.h to declare wint_t" >&5
15201 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15202 if test "${cf_cv_wint_t+set}" = set; then
15203   echo $ECHO_N "(cached) $ECHO_C" >&6
15204 else
15205
15206 cat >conftest.$ac_ext <<_ACEOF
15207 #line 15207 "configure"
15208 #include "confdefs.h"
15209
15210 #include <stdlib.h>
15211 #include <stdarg.h>
15212 #include <stdio.h>
15213 #ifdef HAVE_LIBUTF8_H
15214 #include <libutf8.h>
15215 #endif
15216 int
15217 main ()
15218 {
15219 wint_t state
15220   ;
15221   return 0;
15222 }
15223 _ACEOF
15224 rm -f conftest.$ac_objext
15225 if { (eval echo "$as_me:15225: \"$ac_compile\"") >&5
15226   (eval $ac_compile) 2>&5
15227   ac_status=$?
15228   echo "$as_me:15228: \$? = $ac_status" >&5
15229   (exit $ac_status); } &&
15230          { ac_try='test -s conftest.$ac_objext'
15231   { (eval echo "$as_me:15231: \"$ac_try\"") >&5
15232   (eval $ac_try) 2>&5
15233   ac_status=$?
15234   echo "$as_me:15234: \$? = $ac_status" >&5
15235   (exit $ac_status); }; }; then
15236   cf_cv_wint_t=no
15237 else
15238   echo "$as_me: failed program was:" >&5
15239 cat conftest.$ac_ext >&5
15240 cat >conftest.$ac_ext <<_ACEOF
15241 #line 15241 "configure"
15242 #include "confdefs.h"
15243
15244 #include <stdlib.h>
15245 #include <stdarg.h>
15246 #include <stdio.h>
15247 #include <wchar.h>
15248 #ifdef HAVE_LIBUTF8_H
15249 #include <libutf8.h>
15250 #endif
15251 int
15252 main ()
15253 {
15254 wint_t value
15255   ;
15256   return 0;
15257 }
15258 _ACEOF
15259 rm -f conftest.$ac_objext
15260 if { (eval echo "$as_me:15260: \"$ac_compile\"") >&5
15261   (eval $ac_compile) 2>&5
15262   ac_status=$?
15263   echo "$as_me:15263: \$? = $ac_status" >&5
15264   (exit $ac_status); } &&
15265          { ac_try='test -s conftest.$ac_objext'
15266   { (eval echo "$as_me:15266: \"$ac_try\"") >&5
15267   (eval $ac_try) 2>&5
15268   ac_status=$?
15269   echo "$as_me:15269: \$? = $ac_status" >&5
15270   (exit $ac_status); }; }; then
15271   cf_cv_wint_t=yes
15272 else
15273   echo "$as_me: failed program was:" >&5
15274 cat conftest.$ac_ext >&5
15275 cf_cv_wint_t=unknown
15276 fi
15277 rm -f conftest.$ac_objext conftest.$ac_ext
15278 fi
15279 rm -f conftest.$ac_objext conftest.$ac_ext
15280 fi
15281 echo "$as_me:15281: result: $cf_cv_wint_t" >&5
15282 echo "${ECHO_T}$cf_cv_wint_t" >&6
15283
15284 if test "$cf_cv_wint_t" = yes ; then
15285         cat >>confdefs.h <<\EOF
15286 #define NEED_WCHAR_H 1
15287 EOF
15288
15289         NEED_WCHAR_H=1
15290 fi
15291
15292 # if we do not find wint_t in either place, use substitution to provide a fallback.
15293 if test "$cf_cv_wint_t" = unknown ; then
15294         NCURSES_WINT_T=1
15295 fi
15296
15297 # if we find wint_t in either place, use substitution to provide a fallback.
15298 if test "$cf_cv_wint_t" != unknown ; then
15299         NCURSES_OK_WINT_T=1
15300 fi
15301
15302         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15303
15304 echo "$as_me:15304: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15305 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15306 cat >conftest.$ac_ext <<_ACEOF
15307 #line 15307 "configure"
15308 #include "confdefs.h"
15309
15310 #ifndef _XOPEN_SOURCE_EXTENDED
15311 #define _XOPEN_SOURCE_EXTENDED
15312 #endif
15313 #include <${cf_cv_ncurses_header:-curses.h}>
15314 int
15315 main ()
15316 {
15317
15318 mbstate_t foo
15319
15320   ;
15321   return 0;
15322 }
15323 _ACEOF
15324 rm -f conftest.$ac_objext
15325 if { (eval echo "$as_me:15325: \"$ac_compile\"") >&5
15326   (eval $ac_compile) 2>&5
15327   ac_status=$?
15328   echo "$as_me:15328: \$? = $ac_status" >&5
15329   (exit $ac_status); } &&
15330          { ac_try='test -s conftest.$ac_objext'
15331   { (eval echo "$as_me:15331: \"$ac_try\"") >&5
15332   (eval $ac_try) 2>&5
15333   ac_status=$?
15334   echo "$as_me:15334: \$? = $ac_status" >&5
15335   (exit $ac_status); }; }; then
15336   cf_result=yes
15337 else
15338   echo "$as_me: failed program was:" >&5
15339 cat conftest.$ac_ext >&5
15340 cf_result=no
15341 fi
15342 rm -f conftest.$ac_objext conftest.$ac_ext
15343 echo "$as_me:15343: result: $cf_result" >&5
15344 echo "${ECHO_T}$cf_result" >&6
15345 if test $cf_result = yes ; then
15346
15347 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15348
15349         cat >>confdefs.h <<EOF
15350 #define $cf_result 1
15351 EOF
15352
15353 else
15354         cat >>confdefs.h <<EOF
15355 #define mbstate_t long
15356 EOF
15357
15358 fi
15359
15360         fi
15361
15362         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15363
15364 echo "$as_me:15364: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15365 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15366 cat >conftest.$ac_ext <<_ACEOF
15367 #line 15367 "configure"
15368 #include "confdefs.h"
15369
15370 #ifndef _XOPEN_SOURCE_EXTENDED
15371 #define _XOPEN_SOURCE_EXTENDED
15372 #endif
15373 #include <${cf_cv_ncurses_header:-curses.h}>
15374 int
15375 main ()
15376 {
15377
15378 wchar_t foo
15379
15380   ;
15381   return 0;
15382 }
15383 _ACEOF
15384 rm -f conftest.$ac_objext
15385 if { (eval echo "$as_me:15385: \"$ac_compile\"") >&5
15386   (eval $ac_compile) 2>&5
15387   ac_status=$?
15388   echo "$as_me:15388: \$? = $ac_status" >&5
15389   (exit $ac_status); } &&
15390          { ac_try='test -s conftest.$ac_objext'
15391   { (eval echo "$as_me:15391: \"$ac_try\"") >&5
15392   (eval $ac_try) 2>&5
15393   ac_status=$?
15394   echo "$as_me:15394: \$? = $ac_status" >&5
15395   (exit $ac_status); }; }; then
15396   cf_result=yes
15397 else
15398   echo "$as_me: failed program was:" >&5
15399 cat conftest.$ac_ext >&5
15400 cf_result=no
15401 fi
15402 rm -f conftest.$ac_objext conftest.$ac_ext
15403 echo "$as_me:15403: result: $cf_result" >&5
15404 echo "${ECHO_T}$cf_result" >&6
15405 if test $cf_result = yes ; then
15406
15407 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15408
15409         cat >>confdefs.h <<EOF
15410 #define $cf_result 1
15411 EOF
15412
15413 else
15414         cat >>confdefs.h <<EOF
15415 #define wchar_t long
15416 EOF
15417
15418 fi
15419
15420         fi
15421
15422         if test "$NCURSES_OK_WINT_T" = 0 ; then
15423
15424 echo "$as_me:15424: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15425 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15426 cat >conftest.$ac_ext <<_ACEOF
15427 #line 15427 "configure"
15428 #include "confdefs.h"
15429
15430 #ifndef _XOPEN_SOURCE_EXTENDED
15431 #define _XOPEN_SOURCE_EXTENDED
15432 #endif
15433 #include <${cf_cv_ncurses_header:-curses.h}>
15434 int
15435 main ()
15436 {
15437
15438 wint_t foo
15439
15440   ;
15441   return 0;
15442 }
15443 _ACEOF
15444 rm -f conftest.$ac_objext
15445 if { (eval echo "$as_me:15445: \"$ac_compile\"") >&5
15446   (eval $ac_compile) 2>&5
15447   ac_status=$?
15448   echo "$as_me:15448: \$? = $ac_status" >&5
15449   (exit $ac_status); } &&
15450          { ac_try='test -s conftest.$ac_objext'
15451   { (eval echo "$as_me:15451: \"$ac_try\"") >&5
15452   (eval $ac_try) 2>&5
15453   ac_status=$?
15454   echo "$as_me:15454: \$? = $ac_status" >&5
15455   (exit $ac_status); }; }; then
15456   cf_result=yes
15457 else
15458   echo "$as_me: failed program was:" >&5
15459 cat conftest.$ac_ext >&5
15460 cf_result=no
15461 fi
15462 rm -f conftest.$ac_objext conftest.$ac_ext
15463 echo "$as_me:15463: result: $cf_result" >&5
15464 echo "${ECHO_T}$cf_result" >&6
15465 if test $cf_result = yes ; then
15466
15467 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15468
15469         cat >>confdefs.h <<EOF
15470 #define $cf_result 1
15471 EOF
15472
15473 else
15474         cat >>confdefs.h <<EOF
15475 #define wint_t long
15476 EOF
15477
15478 fi
15479
15480         fi
15481 fi
15482
15483 echo "$as_me:15483: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15484 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15485
15486 cat >conftest.$ac_ext <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489
15490 #ifdef HAVE_XCURSES
15491 #include <xcurses.h>
15492 char * XCursesProgramName = "test";
15493 #else
15494 #include <${cf_cv_ncurses_header:-curses.h}>
15495 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15496 #include <ncursesw/term.h>
15497 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15498 #include <ncurses/term.h>
15499 #elif defined(HAVE_TERM_H)
15500 #include <term.h>
15501 #endif
15502 #endif
15503
15504 int
15505 main ()
15506 {
15507
15508 void *foo = &(boolnames)
15509
15510   ;
15511   return 0;
15512 }
15513 _ACEOF
15514 rm -f conftest.$ac_objext
15515 if { (eval echo "$as_me:15515: \"$ac_compile\"") >&5
15516   (eval $ac_compile) 2>&5
15517   ac_status=$?
15518   echo "$as_me:15518: \$? = $ac_status" >&5
15519   (exit $ac_status); } &&
15520          { ac_try='test -s conftest.$ac_objext'
15521   { (eval echo "$as_me:15521: \"$ac_try\"") >&5
15522   (eval $ac_try) 2>&5
15523   ac_status=$?
15524   echo "$as_me:15524: \$? = $ac_status" >&5
15525   (exit $ac_status); }; }; then
15526   cf_result=yes
15527 else
15528   echo "$as_me: failed program was:" >&5
15529 cat conftest.$ac_ext >&5
15530 cf_result=no
15531 fi
15532 rm -f conftest.$ac_objext conftest.$ac_ext
15533 echo "$as_me:15533: result: $cf_result" >&5
15534 echo "${ECHO_T}$cf_result" >&6
15535
15536 if test $cf_result = yes ; then
15537
15538 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15539
15540         cat >>confdefs.h <<EOF
15541 #define $cf_result 1
15542 EOF
15543
15544 else
15545         echo "$as_me:15545: checking for data boolnames in library" >&5
15546 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15547         # BSD linkers insist on making weak linkage, but resolve at runtime.
15548         if test "$cross_compiling" = yes; then
15549
15550         # cross-compiling
15551         cat >conftest.$ac_ext <<_ACEOF
15552 #line 15552 "configure"
15553 #include "confdefs.h"
15554
15555 #ifdef HAVE_XCURSES
15556 #include <xcurses.h>
15557 char * XCursesProgramName = "test";
15558 #else
15559 #include <${cf_cv_ncurses_header:-curses.h}>
15560 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15561 #include <ncursesw/term.h>
15562 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15563 #include <ncurses/term.h>
15564 #elif defined(HAVE_TERM_H)
15565 #include <term.h>
15566 #endif
15567 #endif
15568
15569 extern char boolnames;
15570 int
15571 main ()
15572 {
15573
15574         do {
15575                 void *foo = &(boolnames);
15576                 ${cf_cv_main_return:-return}(foo == 0);
15577         } while (0)
15578
15579   ;
15580   return 0;
15581 }
15582 _ACEOF
15583 rm -f conftest.$ac_objext conftest$ac_exeext
15584 if { (eval echo "$as_me:15584: \"$ac_link\"") >&5
15585   (eval $ac_link) 2>&5
15586   ac_status=$?
15587   echo "$as_me:15587: \$? = $ac_status" >&5
15588   (exit $ac_status); } &&
15589          { ac_try='test -s conftest$ac_exeext'
15590   { (eval echo "$as_me:15590: \"$ac_try\"") >&5
15591   (eval $ac_try) 2>&5
15592   ac_status=$?
15593   echo "$as_me:15593: \$? = $ac_status" >&5
15594   (exit $ac_status); }; }; then
15595   cf_result=yes
15596 else
15597   echo "$as_me: failed program was:" >&5
15598 cat conftest.$ac_ext >&5
15599 cf_result=no
15600 fi
15601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15602
15603 else
15604   cat >conftest.$ac_ext <<_ACEOF
15605 #line 15605 "configure"
15606 #include "confdefs.h"
15607
15608 #ifdef HAVE_XCURSES
15609 #include <xcurses.h>
15610 char * XCursesProgramName = "test";
15611 #else
15612 #include <${cf_cv_ncurses_header:-curses.h}>
15613 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15614 #include <ncursesw/term.h>
15615 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15616 #include <ncurses/term.h>
15617 #elif defined(HAVE_TERM_H)
15618 #include <term.h>
15619 #endif
15620 #endif
15621
15622 extern char boolnames;
15623 int main(void)
15624 {
15625         void *foo = &(boolnames);
15626         ${cf_cv_main_return:-return}(foo == 0);
15627 }
15628 _ACEOF
15629 rm -f conftest$ac_exeext
15630 if { (eval echo "$as_me:15630: \"$ac_link\"") >&5
15631   (eval $ac_link) 2>&5
15632   ac_status=$?
15633   echo "$as_me:15633: \$? = $ac_status" >&5
15634   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15635   { (eval echo "$as_me:15635: \"$ac_try\"") >&5
15636   (eval $ac_try) 2>&5
15637   ac_status=$?
15638   echo "$as_me:15638: \$? = $ac_status" >&5
15639   (exit $ac_status); }; }; then
15640   cf_result=yes
15641 else
15642   echo "$as_me: program exited with status $ac_status" >&5
15643 echo "$as_me: failed program was:" >&5
15644 cat conftest.$ac_ext >&5
15645 cf_result=no
15646 fi
15647 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15648 fi
15649         echo "$as_me:15649: result: $cf_result" >&5
15650 echo "${ECHO_T}$cf_result" >&6
15651         if test $cf_result = yes ; then
15652
15653 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15654
15655                 cat >>confdefs.h <<EOF
15656 #define $cf_result 1
15657 EOF
15658
15659         fi
15660 fi
15661
15662 echo "$as_me:15662: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15663 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15664
15665 cat >conftest.$ac_ext <<_ACEOF
15666 #line 15666 "configure"
15667 #include "confdefs.h"
15668
15669 #ifdef HAVE_XCURSES
15670 #include <xcurses.h>
15671 char * XCursesProgramName = "test";
15672 #else
15673 #include <${cf_cv_ncurses_header:-curses.h}>
15674 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15675 #include <ncursesw/term.h>
15676 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15677 #include <ncurses/term.h>
15678 #elif defined(HAVE_TERM_H)
15679 #include <term.h>
15680 #endif
15681 #endif
15682
15683 int
15684 main ()
15685 {
15686
15687 void *foo = &(boolfnames)
15688
15689   ;
15690   return 0;
15691 }
15692 _ACEOF
15693 rm -f conftest.$ac_objext
15694 if { (eval echo "$as_me:15694: \"$ac_compile\"") >&5
15695   (eval $ac_compile) 2>&5
15696   ac_status=$?
15697   echo "$as_me:15697: \$? = $ac_status" >&5
15698   (exit $ac_status); } &&
15699          { ac_try='test -s conftest.$ac_objext'
15700   { (eval echo "$as_me:15700: \"$ac_try\"") >&5
15701   (eval $ac_try) 2>&5
15702   ac_status=$?
15703   echo "$as_me:15703: \$? = $ac_status" >&5
15704   (exit $ac_status); }; }; then
15705   cf_result=yes
15706 else
15707   echo "$as_me: failed program was:" >&5
15708 cat conftest.$ac_ext >&5
15709 cf_result=no
15710 fi
15711 rm -f conftest.$ac_objext conftest.$ac_ext
15712 echo "$as_me:15712: result: $cf_result" >&5
15713 echo "${ECHO_T}$cf_result" >&6
15714
15715 if test $cf_result = yes ; then
15716
15717 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15718
15719         cat >>confdefs.h <<EOF
15720 #define $cf_result 1
15721 EOF
15722
15723 else
15724         echo "$as_me:15724: checking for data boolfnames in library" >&5
15725 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15726         # BSD linkers insist on making weak linkage, but resolve at runtime.
15727         if test "$cross_compiling" = yes; then
15728
15729         # cross-compiling
15730         cat >conftest.$ac_ext <<_ACEOF
15731 #line 15731 "configure"
15732 #include "confdefs.h"
15733
15734 #ifdef HAVE_XCURSES
15735 #include <xcurses.h>
15736 char * XCursesProgramName = "test";
15737 #else
15738 #include <${cf_cv_ncurses_header:-curses.h}>
15739 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15740 #include <ncursesw/term.h>
15741 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15742 #include <ncurses/term.h>
15743 #elif defined(HAVE_TERM_H)
15744 #include <term.h>
15745 #endif
15746 #endif
15747
15748 extern char boolfnames;
15749 int
15750 main ()
15751 {
15752
15753         do {
15754                 void *foo = &(boolfnames);
15755                 ${cf_cv_main_return:-return}(foo == 0);
15756         } while (0)
15757
15758   ;
15759   return 0;
15760 }
15761 _ACEOF
15762 rm -f conftest.$ac_objext conftest$ac_exeext
15763 if { (eval echo "$as_me:15763: \"$ac_link\"") >&5
15764   (eval $ac_link) 2>&5
15765   ac_status=$?
15766   echo "$as_me:15766: \$? = $ac_status" >&5
15767   (exit $ac_status); } &&
15768          { ac_try='test -s conftest$ac_exeext'
15769   { (eval echo "$as_me:15769: \"$ac_try\"") >&5
15770   (eval $ac_try) 2>&5
15771   ac_status=$?
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit $ac_status); }; }; then
15774   cf_result=yes
15775 else
15776   echo "$as_me: failed program was:" >&5
15777 cat conftest.$ac_ext >&5
15778 cf_result=no
15779 fi
15780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15781
15782 else
15783   cat >conftest.$ac_ext <<_ACEOF
15784 #line 15784 "configure"
15785 #include "confdefs.h"
15786
15787 #ifdef HAVE_XCURSES
15788 #include <xcurses.h>
15789 char * XCursesProgramName = "test";
15790 #else
15791 #include <${cf_cv_ncurses_header:-curses.h}>
15792 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15793 #include <ncursesw/term.h>
15794 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15795 #include <ncurses/term.h>
15796 #elif defined(HAVE_TERM_H)
15797 #include <term.h>
15798 #endif
15799 #endif
15800
15801 extern char boolfnames;
15802 int main(void)
15803 {
15804         void *foo = &(boolfnames);
15805         ${cf_cv_main_return:-return}(foo == 0);
15806 }
15807 _ACEOF
15808 rm -f conftest$ac_exeext
15809 if { (eval echo "$as_me:15809: \"$ac_link\"") >&5
15810   (eval $ac_link) 2>&5
15811   ac_status=$?
15812   echo "$as_me:15812: \$? = $ac_status" >&5
15813   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15814   { (eval echo "$as_me:15814: \"$ac_try\"") >&5
15815   (eval $ac_try) 2>&5
15816   ac_status=$?
15817   echo "$as_me:15817: \$? = $ac_status" >&5
15818   (exit $ac_status); }; }; then
15819   cf_result=yes
15820 else
15821   echo "$as_me: program exited with status $ac_status" >&5
15822 echo "$as_me: failed program was:" >&5
15823 cat conftest.$ac_ext >&5
15824 cf_result=no
15825 fi
15826 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15827 fi
15828         echo "$as_me:15828: result: $cf_result" >&5
15829 echo "${ECHO_T}$cf_result" >&6
15830         if test $cf_result = yes ; then
15831
15832 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15833
15834                 cat >>confdefs.h <<EOF
15835 #define $cf_result 1
15836 EOF
15837
15838         fi
15839 fi
15840
15841 LD_RPATH_OPT=
15842 echo "$as_me:15842: checking for an rpath option" >&5
15843 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
15844 case $cf_cv_system_name in #(vi
15845 irix*) #(vi
15846         if test "$GCC" = yes; then
15847                 LD_RPATH_OPT="-Wl,-rpath,"
15848         else
15849                 LD_RPATH_OPT="-rpath "
15850         fi
15851         ;;
15852 linux*|gnu*|k*bsd*-gnu) #(vi
15853         LD_RPATH_OPT="-Wl,-rpath,"
15854         ;;
15855 openbsd[2-9].*|mirbsd*) #(vi
15856         LD_RPATH_OPT="-Wl,-rpath,"
15857         ;;
15858 dragonfly*|freebsd*) #(vi
15859         LD_RPATH_OPT="-rpath "
15860         ;;
15861 netbsd*) #(vi
15862         LD_RPATH_OPT="-Wl,-rpath,"
15863         ;;
15864 osf*|mls+*) #(vi
15865         LD_RPATH_OPT="-rpath "
15866         ;;
15867 solaris2*) #(vi
15868         LD_RPATH_OPT="-R"
15869         ;;
15870 *)
15871         ;;
15872 esac
15873 echo "$as_me:15873: result: $LD_RPATH_OPT" >&5
15874 echo "${ECHO_T}$LD_RPATH_OPT" >&6
15875
15876 case "x$LD_RPATH_OPT" in #(vi
15877 x-R*)
15878         echo "$as_me:15878: checking if we need a space after rpath option" >&5
15879 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
15880         cf_save_LIBS="$LIBS"
15881         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
15882         cat >conftest.$ac_ext <<_ACEOF
15883 #line 15883 "configure"
15884 #include "confdefs.h"
15885
15886 int
15887 main ()
15888 {
15889
15890   ;
15891   return 0;
15892 }
15893 _ACEOF
15894 rm -f conftest.$ac_objext conftest$ac_exeext
15895 if { (eval echo "$as_me:15895: \"$ac_link\"") >&5
15896   (eval $ac_link) 2>&5
15897   ac_status=$?
15898   echo "$as_me:15898: \$? = $ac_status" >&5
15899   (exit $ac_status); } &&
15900          { ac_try='test -s conftest$ac_exeext'
15901   { (eval echo "$as_me:15901: \"$ac_try\"") >&5
15902   (eval $ac_try) 2>&5
15903   ac_status=$?
15904   echo "$as_me:15904: \$? = $ac_status" >&5
15905   (exit $ac_status); }; }; then
15906   cf_rpath_space=no
15907 else
15908   echo "$as_me: failed program was:" >&5
15909 cat conftest.$ac_ext >&5
15910 cf_rpath_space=yes
15911 fi
15912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15913         LIBS="$cf_save_LIBS"
15914         echo "$as_me:15914: result: $cf_rpath_space" >&5
15915 echo "${ECHO_T}$cf_rpath_space" >&6
15916         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
15917         ;;
15918 esac
15919
15920 echo "$as_me:15920: checking if rpath-hack should be disabled" >&5
15921 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
15922
15923 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
15924 if test "${enable_rpath_hack+set}" = set; then
15925   enableval="$enable_rpath_hack"
15926   test "$enableval" != no && enableval=yes
15927   if test "$enableval" != "yes" ; then
15928     cf_disable_rpath_hack=yes
15929   else
15930     cf_disable_rpath_hack=no
15931   fi
15932 else
15933   enableval=yes
15934   cf_disable_rpath_hack=no
15935
15936 fi;
15937 echo "$as_me:15937: result: $cf_disable_rpath_hack" >&5
15938 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
15939 if test "$cf_disable_rpath_hack" = no ; then
15940
15941 echo "$as_me:15941: checking for updated LDFLAGS" >&5
15942 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
15943 if test -n "$LD_RPATH_OPT" ; then
15944         echo "$as_me:15944: result: maybe" >&5
15945 echo "${ECHO_T}maybe" >&6
15946
15947         for ac_prog in ldd
15948 do
15949   # Extract the first word of "$ac_prog", so it can be a program name with args.
15950 set dummy $ac_prog; ac_word=$2
15951 echo "$as_me:15951: checking for $ac_word" >&5
15952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15953 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
15954   echo $ECHO_N "(cached) $ECHO_C" >&6
15955 else
15956   if test -n "$cf_ldd_prog"; then
15957   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
15958 else
15959   ac_save_IFS=$IFS; IFS=$ac_path_separator
15960 ac_dummy="$PATH"
15961 for ac_dir in $ac_dummy; do
15962   IFS=$ac_save_IFS
15963   test -z "$ac_dir" && ac_dir=.
15964   $as_executable_p "$ac_dir/$ac_word" || continue
15965 ac_cv_prog_cf_ldd_prog="$ac_prog"
15966 echo "$as_me:15966: found $ac_dir/$ac_word" >&5
15967 break
15968 done
15969
15970 fi
15971 fi
15972 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
15973 if test -n "$cf_ldd_prog"; then
15974   echo "$as_me:15974: result: $cf_ldd_prog" >&5
15975 echo "${ECHO_T}$cf_ldd_prog" >&6
15976 else
15977   echo "$as_me:15977: result: no" >&5
15978 echo "${ECHO_T}no" >&6
15979 fi
15980
15981   test -n "$cf_ldd_prog" && break
15982 done
15983 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
15984
15985         cf_rpath_list="/usr/lib /lib"
15986         if test "$cf_ldd_prog" != no
15987         then
15988                 cf_rpath_oops=
15989
15990 cat >conftest.$ac_ext <<_ACEOF
15991 #line 15991 "configure"
15992 #include "confdefs.h"
15993 #include <stdio.h>
15994 int
15995 main ()
15996 {
15997 printf("Hello");
15998   ;
15999   return 0;
16000 }
16001 _ACEOF
16002 rm -f conftest.$ac_objext conftest$ac_exeext
16003 if { (eval echo "$as_me:16003: \"$ac_link\"") >&5
16004   (eval $ac_link) 2>&5
16005   ac_status=$?
16006   echo "$as_me:16006: \$? = $ac_status" >&5
16007   (exit $ac_status); } &&
16008          { ac_try='test -s conftest$ac_exeext'
16009   { (eval echo "$as_me:16009: \"$ac_try\"") >&5
16010   (eval $ac_try) 2>&5
16011   ac_status=$?
16012   echo "$as_me:16012: \$? = $ac_status" >&5
16013   (exit $ac_status); }; }; then
16014   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
16015                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
16016 else
16017   echo "$as_me: failed program was:" >&5
16018 cat conftest.$ac_ext >&5
16019 fi
16020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16021
16022                 # If we passed the link-test, but get a "not found" on a given library,
16023                 # this could be due to inept reconfiguration of gcc to make it only
16024                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
16025                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
16026                 # /usr/local libraries.
16027                 if test -n "$cf_rpath_oops"
16028                 then
16029                         for cf_rpath_src in $cf_rpath_oops
16030                         do
16031                                 for cf_rpath_dir in \
16032                                         /usr/local \
16033                                         /usr/pkg \
16034                                         /opt/sfw
16035                                 do
16036                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
16037                                         then
16038                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16039
16040 echo "${as_me:-configure}:16040: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16041
16042                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16043                                                 break
16044                                         fi
16045                                 done
16046                         done
16047                 fi
16048         fi
16049
16050         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16051
16052 echo "${as_me:-configure}:16052: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16053
16054 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16055
16056 echo "${as_me:-configure}:16056: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16057
16058 cf_rpath_dst=
16059 for cf_rpath_src in $LDFLAGS
16060 do
16061         case $cf_rpath_src in #(vi
16062         -L*) #(vi
16063
16064                 # check if this refers to a directory which we will ignore
16065                 cf_rpath_skip=no
16066                 if test -n "$cf_rpath_list"
16067                 then
16068                         for cf_rpath_item in $cf_rpath_list
16069                         do
16070                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16071                                 then
16072                                         cf_rpath_skip=yes
16073                                         break
16074                                 fi
16075                         done
16076                 fi
16077
16078                 if test "$cf_rpath_skip" = no
16079                 then
16080                         # transform the option
16081                         if test "$LD_RPATH_OPT" = "-R " ; then
16082                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16083                         else
16084                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16085                         fi
16086
16087                         # if we have not already added this, add it now
16088                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16089                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16090                         then
16091                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16092
16093 echo "${as_me:-configure}:16093: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16094
16095                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16096                         fi
16097                 fi
16098                 ;;
16099         esac
16100         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16101 done
16102 LDFLAGS=$cf_rpath_dst
16103
16104 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16105
16106 echo "${as_me:-configure}:16106: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16107
16108 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
16109
16110 echo "${as_me:-configure}:16110: testing ...checking LIBS $LIBS ..." 1>&5
16111
16112 cf_rpath_dst=
16113 for cf_rpath_src in $LIBS
16114 do
16115         case $cf_rpath_src in #(vi
16116         -L*) #(vi
16117
16118                 # check if this refers to a directory which we will ignore
16119                 cf_rpath_skip=no
16120                 if test -n "$cf_rpath_list"
16121                 then
16122                         for cf_rpath_item in $cf_rpath_list
16123                         do
16124                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16125                                 then
16126                                         cf_rpath_skip=yes
16127                                         break
16128                                 fi
16129                         done
16130                 fi
16131
16132                 if test "$cf_rpath_skip" = no
16133                 then
16134                         # transform the option
16135                         if test "$LD_RPATH_OPT" = "-R " ; then
16136                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16137                         else
16138                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16139                         fi
16140
16141                         # if we have not already added this, add it now
16142                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16143                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16144                         then
16145                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16146
16147 echo "${as_me:-configure}:16147: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16148
16149                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16150                         fi
16151                 fi
16152                 ;;
16153         esac
16154         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16155 done
16156 LIBS=$cf_rpath_dst
16157
16158 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
16159
16160 echo "${as_me:-configure}:16160: testing ...checked LIBS $LIBS ..." 1>&5
16161
16162         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16163
16164 echo "${as_me:-configure}:16164: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16165
16166 fi
16167
16168 fi
16169
16170 TEST_ARGS="$LIBS"
16171 LIBS=
16172
16173 ac_config_files="$ac_config_files Makefile"
16174 ac_config_commands="$ac_config_commands default"
16175 cat >confcache <<\_ACEOF
16176 # This file is a shell script that caches the results of configure
16177 # tests run on this system so they can be shared between configure
16178 # scripts and configure runs, see configure's option --config-cache.
16179 # It is not useful on other systems.  If it contains results you don't
16180 # want to keep, you may remove or edit it.
16181 #
16182 # config.status only pays attention to the cache file if you give it
16183 # the --recheck option to rerun configure.
16184 #
16185 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16186 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16187 # following values.
16188
16189 _ACEOF
16190
16191 # The following way of writing the cache mishandles newlines in values,
16192 # but we know of no workaround that is simple, portable, and efficient.
16193 # So, don't put newlines in cache variables' values.
16194 # Ultrix sh set writes to stderr and can't be redirected directly,
16195 # and sets the high bit in the cache file unless we assign to the vars.
16196 {
16197   (set) 2>&1 |
16198     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16199     *ac_space=\ *)
16200       # `set' does not quote correctly, so add quotes (double-quote
16201       # substitution turns \\\\ into \\, and sed turns \\ into \).
16202       sed -n \
16203         "s/'/'\\\\''/g;
16204           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16205       ;;
16206     *)
16207       # `set' quotes correctly as required by POSIX, so do not add quotes.
16208       sed -n \
16209         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16210       ;;
16211     esac;
16212 } |
16213   sed '
16214      t clear
16215      : clear
16216      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16217      t end
16218      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16219      : end' >>confcache
16220 if cmp -s $cache_file confcache; then :; else
16221   if test -w $cache_file; then
16222     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16223     cat confcache >$cache_file
16224   else
16225     echo "not updating unwritable cache $cache_file"
16226   fi
16227 fi
16228 rm -f confcache
16229
16230 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16231 # Let make expand exec_prefix.
16232 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16233
16234 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16235 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16236 # trailing colons and then remove the whole line if VPATH becomes empty
16237 # (actually we leave an empty line to preserve line numbers).
16238 if test "x$srcdir" = x.; then
16239   ac_vpsub='/^[         ]*VPATH[        ]*=/{
16240 s/:*\$(srcdir):*/:/;
16241 s/:*\${srcdir}:*/:/;
16242 s/:*@srcdir@:*/:/;
16243 s/^\([^=]*=[    ]*\):*/\1/;
16244 s/:*$//;
16245 s/^[^=]*=[      ]*$//;
16246 }'
16247 fi
16248
16249 DEFS=-DHAVE_CONFIG_H
16250
16251 : ${CONFIG_STATUS=./config.status}
16252 ac_clean_files_save=$ac_clean_files
16253 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16254 { echo "$as_me:16254: creating $CONFIG_STATUS" >&5
16255 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16256 cat >$CONFIG_STATUS <<_ACEOF
16257 #! $SHELL
16258 # Generated automatically by configure.
16259 # Run this file to recreate the current configuration.
16260 # Compiler output produced by configure, useful for debugging
16261 # configure, is in config.log if it exists.
16262
16263 debug=false
16264 SHELL=\${CONFIG_SHELL-$SHELL}
16265 ac_cs_invocation="\$0 \$@"
16266
16267 _ACEOF
16268
16269 cat >>$CONFIG_STATUS <<\_ACEOF
16270 # Be Bourne compatible
16271 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16272   emulate sh
16273   NULLCMD=:
16274 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16275   set -o posix
16276 fi
16277
16278 # Name of the executable.
16279 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16280
16281 if expr a : '\(a\)' >/dev/null 2>&1; then
16282   as_expr=expr
16283 else
16284   as_expr=false
16285 fi
16286
16287 rm -f conf$$ conf$$.exe conf$$.file
16288 echo >conf$$.file
16289 if ln -s conf$$.file conf$$ 2>/dev/null; then
16290   # We could just check for DJGPP; but this test a) works b) is more generic
16291   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16292   if test -f conf$$.exe; then
16293     # Don't use ln at all; we don't have any links
16294     as_ln_s='cp -p'
16295   else
16296     as_ln_s='ln -s'
16297   fi
16298 elif ln conf$$.file conf$$ 2>/dev/null; then
16299   as_ln_s=ln
16300 else
16301   as_ln_s='cp -p'
16302 fi
16303 rm -f conf$$ conf$$.exe conf$$.file
16304
16305 as_executable_p="test -f"
16306
16307 # Support unset when possible.
16308 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16309   as_unset=unset
16310 else
16311   as_unset=false
16312 fi
16313
16314 # NLS nuisances.
16315 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16316 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16317 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16318 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16319 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16320 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16321 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16322 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16323
16324 # IFS
16325 # We need space, tab and new line, in precisely that order.
16326 as_nl='
16327 '
16328 IFS="   $as_nl"
16329
16330 # CDPATH.
16331 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16332
16333 exec 6>&1
16334
16335 _ACEOF
16336
16337 # Files that config.status was made for.
16338 if test -n "$ac_config_files"; then
16339   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16340 fi
16341
16342 if test -n "$ac_config_headers"; then
16343   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16344 fi
16345
16346 if test -n "$ac_config_links"; then
16347   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16348 fi
16349
16350 if test -n "$ac_config_commands"; then
16351   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16352 fi
16353
16354 cat >>$CONFIG_STATUS <<\EOF
16355
16356 ac_cs_usage="\
16357 \`$as_me' instantiates files from templates according to the
16358 current configuration.
16359
16360 Usage: $0 [OPTIONS] [FILE]...
16361
16362   -h, --help       print this help, then exit
16363   -V, --version    print version number, then exit
16364   -d, --debug      don't remove temporary files
16365       --recheck    update $as_me by reconfiguring in the same conditions
16366   --file=FILE[:TEMPLATE]
16367                    instantiate the configuration file FILE
16368   --header=FILE[:TEMPLATE]
16369                    instantiate the configuration header FILE
16370
16371 Configuration files:
16372 $config_files
16373
16374 Configuration headers:
16375 $config_headers
16376
16377 Configuration commands:
16378 $config_commands
16379
16380 Report bugs to <dickey@invisible-island.net>."
16381 EOF
16382
16383 cat >>$CONFIG_STATUS <<EOF
16384 ac_cs_version="\\
16385 config.status
16386 configured by $0, generated by GNU Autoconf 2.52.20101002,
16387   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16388
16389 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16390 Free Software Foundation, Inc.
16391 This config.status script is free software; the Free Software Foundation
16392 gives unlimited permission to copy, distribute and modify it."
16393 srcdir=$srcdir
16394 INSTALL="$INSTALL"
16395 EOF
16396
16397 cat >>$CONFIG_STATUS <<\EOF
16398 # If no file are specified by the user, then we need to provide default
16399 # value.  By we need to know if files were specified by the user.
16400 ac_need_defaults=:
16401 while test $# != 0
16402 do
16403   case $1 in
16404   --*=*)
16405     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16406     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16407     shift
16408     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16409     shift
16410     ;;
16411   -*);;
16412   *) # This is not an option, so the user has probably given explicit
16413      # arguments.
16414      ac_need_defaults=false;;
16415   esac
16416
16417   case $1 in
16418   # Handling of the options.
16419 EOF
16420 cat >>$CONFIG_STATUS <<EOF
16421   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16422     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16423     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16424 EOF
16425 cat >>$CONFIG_STATUS <<\EOF
16426   --version | --vers* | -V )
16427     echo "$ac_cs_version"; exit 0 ;;
16428   --he | --h)
16429     # Conflict between --help and --header
16430     { { echo "$as_me:16430: error: ambiguous option: $1
16431 Try \`$0 --help' for more information." >&5
16432 echo "$as_me: error: ambiguous option: $1
16433 Try \`$0 --help' for more information." >&2;}
16434    { (exit 1); exit 1; }; };;
16435   --help | --hel | -h )
16436     echo "$ac_cs_usage"; exit 0 ;;
16437   --debug | --d* | -d )
16438     debug=: ;;
16439   --file | --fil | --fi | --f )
16440     shift
16441     CONFIG_FILES="$CONFIG_FILES $1"
16442     ac_need_defaults=false;;
16443   --header | --heade | --head | --hea )
16444     shift
16445     CONFIG_HEADERS="$CONFIG_HEADERS $1"
16446     ac_need_defaults=false;;
16447
16448   # This is an error.
16449   -*) { { echo "$as_me:16449: error: unrecognized option: $1
16450 Try \`$0 --help' for more information." >&5
16451 echo "$as_me: error: unrecognized option: $1
16452 Try \`$0 --help' for more information." >&2;}
16453    { (exit 1); exit 1; }; } ;;
16454
16455   *) ac_config_targets="$ac_config_targets $1" ;;
16456
16457   esac
16458   shift
16459 done
16460
16461 exec 5>>config.log
16462 cat >&5 << _ACEOF
16463
16464 ## ----------------------- ##
16465 ## Running config.status.  ##
16466 ## ----------------------- ##
16467
16468 This file was extended by $as_me 2.52.20101002, executed with
16469   CONFIG_FILES    = $CONFIG_FILES
16470   CONFIG_HEADERS  = $CONFIG_HEADERS
16471   CONFIG_LINKS    = $CONFIG_LINKS
16472   CONFIG_COMMANDS = $CONFIG_COMMANDS
16473   > $ac_cs_invocation
16474 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16475
16476 _ACEOF
16477 EOF
16478
16479 cat >>$CONFIG_STATUS <<EOF
16480 #
16481 # INIT-COMMANDS section.
16482 #
16483
16484 AWK="$AWK"
16485 ECHO_LD="$ECHO_LD"
16486
16487 EOF
16488
16489 cat >>$CONFIG_STATUS <<\EOF
16490 for ac_config_target in $ac_config_targets
16491 do
16492   case "$ac_config_target" in
16493   # Handling of arguments.
16494   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16495   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16496   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
16497   *) { { echo "$as_me:16497: error: invalid argument: $ac_config_target" >&5
16498 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16499    { (exit 1); exit 1; }; };;
16500   esac
16501 done
16502
16503 # If the user did not use the arguments to specify the items to instantiate,
16504 # then the envvar interface is used.  Set only those that are not.
16505 # We use the long form for the default assignment because of an extremely
16506 # bizarre bug on SunOS 4.1.3.
16507 if $ac_need_defaults; then
16508   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16509   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16510   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16511 fi
16512
16513 # Create a temporary directory, and hook for its removal unless debugging.
16514 $debug ||
16515 {
16516   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16517   trap '{ (exit 1); exit 1; }' 1 2 13 15
16518 }
16519
16520 # Create a (secure) tmp directory for tmp files.
16521 : ${TMPDIR=/tmp}
16522 {
16523   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16524   test -n "$tmp" && test -d "$tmp"
16525 }  ||
16526 {
16527   tmp=$TMPDIR/cs$$-$RANDOM
16528   (umask 077 && mkdir $tmp)
16529 } ||
16530 {
16531    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16532    { (exit 1); exit 1; }
16533 }
16534
16535 EOF
16536
16537 cat >>$CONFIG_STATUS <<EOF
16538
16539 #
16540 # CONFIG_FILES section.
16541 #
16542
16543 # No need to generate the scripts if there are no CONFIG_FILES.
16544 # This happens for instance when ./config.status config.h
16545 if test -n "\$CONFIG_FILES"; then
16546   # Protect against being on the right side of a sed subst in config.status.
16547   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16548    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16549 s,@SHELL@,$SHELL,;t t
16550 s,@exec_prefix@,$exec_prefix,;t t
16551 s,@prefix@,$prefix,;t t
16552 s,@program_transform_name@,$program_transform_name,;t t
16553 s,@bindir@,$bindir,;t t
16554 s,@sbindir@,$sbindir,;t t
16555 s,@libexecdir@,$libexecdir,;t t
16556 s,@datadir@,$datadir,;t t
16557 s,@sysconfdir@,$sysconfdir,;t t
16558 s,@sharedstatedir@,$sharedstatedir,;t t
16559 s,@localstatedir@,$localstatedir,;t t
16560 s,@libdir@,$libdir,;t t
16561 s,@includedir@,$includedir,;t t
16562 s,@oldincludedir@,$oldincludedir,;t t
16563 s,@infodir@,$infodir,;t t
16564 s,@mandir@,$mandir,;t t
16565 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16566 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16567 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16568 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16569 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16570 s,@build_alias@,$build_alias,;t t
16571 s,@host_alias@,$host_alias,;t t
16572 s,@target_alias@,$target_alias,;t t
16573 s,@ECHO_C@,$ECHO_C,;t t
16574 s,@ECHO_N@,$ECHO_N,;t t
16575 s,@ECHO_T@,$ECHO_T,;t t
16576 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16577 s,@DEFS@,$DEFS,;t t
16578 s,@LIBS@,$LIBS,;t t
16579 s,@build@,$build,;t t
16580 s,@build_cpu@,$build_cpu,;t t
16581 s,@build_vendor@,$build_vendor,;t t
16582 s,@build_os@,$build_os,;t t
16583 s,@host@,$host,;t t
16584 s,@host_cpu@,$host_cpu,;t t
16585 s,@host_vendor@,$host_vendor,;t t
16586 s,@host_os@,$host_os,;t t
16587 s,@SET_MAKE@,$SET_MAKE,;t t
16588 s,@CC@,$CC,;t t
16589 s,@CFLAGS@,$CFLAGS,;t t
16590 s,@LDFLAGS@,$LDFLAGS,;t t
16591 s,@CPPFLAGS@,$CPPFLAGS,;t t
16592 s,@ac_ct_CC@,$ac_ct_CC,;t t
16593 s,@EXEEXT@,$EXEEXT,;t t
16594 s,@OBJEXT@,$OBJEXT,;t t
16595 s,@CPP@,$CPP,;t t
16596 s,@AWK@,$AWK,;t t
16597 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16598 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16599 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16600 s,@LINT@,$LINT,;t t
16601 s,@LINT_OPTS@,$LINT_OPTS,;t t
16602 s,@CTAGS@,$CTAGS,;t t
16603 s,@ETAGS@,$ETAGS,;t t
16604 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16605 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16606 s,@MATH_LIB@,$MATH_LIB,;t t
16607 s,@top_builddir@,$top_builddir,;t t
16608 s,@CC_G_OPT@,$CC_G_OPT,;t t
16609 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16610 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16611 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16612 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16613 s,@LD@,$LD,;t t
16614 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16615 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16616 s,@LD_MODEL@,$LD_MODEL,;t t
16617 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16618 s,@LIBTOOL@,$LIBTOOL,;t t
16619 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16620 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16621 s,@LIB_LINK@,$LIB_LINK,;t t
16622 s,@LINK_TESTS@,$LINK_TESTS,;t t
16623 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16624 s,@PTHREAD@,$PTHREAD,;t t
16625 s,@TEST_ARGS@,$TEST_ARGS,;t t
16626 s,@TEST_DEPS@,$TEST_DEPS,;t t
16627 s,@TEST_LIBS@,$TEST_LIBS,;t t
16628 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
16629 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16630 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16631 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16632 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16633 s,@ECHO_LT@,$ECHO_LT,;t t
16634 s,@ECHO_LD@,$ECHO_LD,;t t
16635 s,@RULE_CC@,$RULE_CC,;t t
16636 s,@SHOW_CC@,$SHOW_CC,;t t
16637 s,@ECHO_CC@,$ECHO_CC,;t t
16638 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16639 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16640 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16641 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16642 s,@X_CFLAGS@,$X_CFLAGS,;t t
16643 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
16644 s,@X_LIBS@,$X_LIBS,;t t
16645 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
16646 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
16647 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16648 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16649 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16650 CEOF
16651
16652 EOF
16653
16654   cat >>$CONFIG_STATUS <<\EOF
16655   # Split the substitutions into bite-sized pieces for seds with
16656   # small command number limits, like on Digital OSF/1 and HP-UX.
16657   ac_max_sed_lines=48
16658   ac_sed_frag=1 # Number of current file.
16659   ac_beg=1 # First line for current file.
16660   ac_end=$ac_max_sed_lines # Line after last line for current file.
16661   ac_more_lines=:
16662   ac_sed_cmds=
16663   while $ac_more_lines; do
16664     if test $ac_beg -gt 1; then
16665       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16666     else
16667       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16668     fi
16669     if test ! -s $tmp/subs.frag; then
16670       ac_more_lines=false
16671     else
16672       # The purpose of the label and of the branching condition is to
16673       # speed up the sed processing (if there are no `@' at all, there
16674       # is no need to browse any of the substitutions).
16675       # These are the two extra sed commands mentioned above.
16676       (echo ':t
16677   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16678       if test -z "$ac_sed_cmds"; then
16679         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16680       else
16681         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16682       fi
16683       ac_sed_frag=`expr $ac_sed_frag + 1`
16684       ac_beg=$ac_end
16685       ac_end=`expr $ac_end + $ac_max_sed_lines`
16686     fi
16687   done
16688   if test -z "$ac_sed_cmds"; then
16689     ac_sed_cmds=cat
16690   fi
16691 fi # test -n "$CONFIG_FILES"
16692
16693 EOF
16694 cat >>$CONFIG_STATUS <<\EOF
16695 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16696   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16697   case $ac_file in
16698   - | *:- | *:-:* ) # input from stdin
16699         cat >$tmp/stdin
16700         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16701         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16702   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16703         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16704   * )   ac_file_in=$ac_file.in ;;
16705   esac
16706
16707   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16708   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16709          X"$ac_file" : 'X\(//\)[^/]' \| \
16710          X"$ac_file" : 'X\(//\)$' \| \
16711          X"$ac_file" : 'X\(/\)' \| \
16712          .     : '\(.\)' 2>/dev/null ||
16713 echo X"$ac_file" |
16714     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16715           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16716           /^X\(\/\/\)$/{ s//\1/; q; }
16717           /^X\(\/\).*/{ s//\1/; q; }
16718           s/.*/./; q'`
16719   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16720     { case "$ac_dir" in
16721   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16722   *)                      as_incr_dir=.;;
16723 esac
16724 as_dummy="$ac_dir"
16725 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16726   case $as_mkdir_dir in
16727     # Skip DOS drivespec
16728     ?:) as_incr_dir=$as_mkdir_dir ;;
16729     *)
16730       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16731       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16732     ;;
16733   esac
16734 done; }
16735
16736     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16737     # A "../" for each directory in $ac_dir_suffix.
16738     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16739   else
16740     ac_dir_suffix= ac_dots=
16741   fi
16742
16743   case $srcdir in
16744   .)  ac_srcdir=.
16745       if test -z "$ac_dots"; then
16746          ac_top_srcdir=.
16747       else
16748          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16749       fi ;;
16750   [\\/]* | ?:[\\/]* )
16751       ac_srcdir=$srcdir$ac_dir_suffix;
16752       ac_top_srcdir=$srcdir ;;
16753   *) # Relative path.
16754     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16755     ac_top_srcdir=$ac_dots$srcdir ;;
16756   esac
16757
16758   case $INSTALL in
16759   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16760   *) ac_INSTALL=$ac_dots$INSTALL ;;
16761   esac
16762
16763   if test x"$ac_file" != x-; then
16764     { echo "$as_me:16764: creating $ac_file" >&5
16765 echo "$as_me: creating $ac_file" >&6;}
16766     rm -f "$ac_file"
16767   fi
16768   # Let's still pretend it is `configure' which instantiates (i.e., don't
16769   # use $as_me), people would be surprised to read:
16770   #    /* config.h.  Generated automatically by config.status.  */
16771   configure_input="Generated automatically from `echo $ac_file_in |
16772                                                  sed 's,.*/,,'` by configure."
16773
16774   # First look for the input files in the build tree, otherwise in the
16775   # src tree.
16776   ac_file_inputs=`IFS=:
16777     for f in $ac_file_in; do
16778       case $f in
16779       -) echo $tmp/stdin ;;
16780       [\\/$]*)
16781          # Absolute (can't be DOS-style, as IFS=:)
16782          test -f "$f" || { { echo "$as_me:16782: error: cannot find input file: $f" >&5
16783 echo "$as_me: error: cannot find input file: $f" >&2;}
16784    { (exit 1); exit 1; }; }
16785          echo $f;;
16786       *) # Relative
16787          if test -f "$f"; then
16788            # Build tree
16789            echo $f
16790          elif test -f "$srcdir/$f"; then
16791            # Source tree
16792            echo $srcdir/$f
16793          else
16794            # /dev/null tree
16795            { { echo "$as_me:16795: error: cannot find input file: $f" >&5
16796 echo "$as_me: error: cannot find input file: $f" >&2;}
16797    { (exit 1); exit 1; }; }
16798          fi;;
16799       esac
16800     done` || { (exit 1); exit 1; }
16801 EOF
16802 cat >>$CONFIG_STATUS <<EOF
16803   sed "$ac_vpsub
16804 $extrasub
16805 EOF
16806 cat >>$CONFIG_STATUS <<\EOF
16807 :t
16808 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16809 s,@configure_input@,$configure_input,;t t
16810 s,@srcdir@,$ac_srcdir,;t t
16811 s,@top_srcdir@,$ac_top_srcdir,;t t
16812 s,@INSTALL@,$ac_INSTALL,;t t
16813 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16814   rm -f $tmp/stdin
16815   if test x"$ac_file" != x-; then
16816     mv $tmp/out $ac_file
16817   else
16818     cat $tmp/out
16819     rm -f $tmp/out
16820   fi
16821
16822 done
16823 EOF
16824 cat >>$CONFIG_STATUS <<\EOF
16825
16826 #
16827 # CONFIG_HEADER section.
16828 #
16829
16830 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16831 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16832 #
16833 # ac_d sets the value in "#define NAME VALUE" lines.
16834 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16835 ac_dB='[        ].*$,\1#\2'
16836 ac_dC=' '
16837 ac_dD=',;t'
16838 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16839 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16840 ac_iB='\([      ]\),\1#\2define\3'
16841 ac_iC=' '
16842 ac_iD='\4,;t'
16843 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16844 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16845 ac_uB='$,\1#\2define\3'
16846 ac_uC=' '
16847 ac_uD=',;t'
16848
16849 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16850   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16851   case $ac_file in
16852   - | *:- | *:-:* ) # input from stdin
16853         cat >$tmp/stdin
16854         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16855         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16856   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16857         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16858   * )   ac_file_in=$ac_file.in ;;
16859   esac
16860
16861   test x"$ac_file" != x- && { echo "$as_me:16861: creating $ac_file" >&5
16862 echo "$as_me: creating $ac_file" >&6;}
16863
16864   # First look for the input files in the build tree, otherwise in the
16865   # src tree.
16866   ac_file_inputs=`IFS=:
16867     for f in $ac_file_in; do
16868       case $f in
16869       -) echo $tmp/stdin ;;
16870       [\\/$]*)
16871          # Absolute (can't be DOS-style, as IFS=:)
16872          test -f "$f" || { { echo "$as_me:16872: error: cannot find input file: $f" >&5
16873 echo "$as_me: error: cannot find input file: $f" >&2;}
16874    { (exit 1); exit 1; }; }
16875          echo $f;;
16876       *) # Relative
16877          if test -f "$f"; then
16878            # Build tree
16879            echo $f
16880          elif test -f "$srcdir/$f"; then
16881            # Source tree
16882            echo $srcdir/$f
16883          else
16884            # /dev/null tree
16885            { { echo "$as_me:16885: error: cannot find input file: $f" >&5
16886 echo "$as_me: error: cannot find input file: $f" >&2;}
16887    { (exit 1); exit 1; }; }
16888          fi;;
16889       esac
16890     done` || { (exit 1); exit 1; }
16891   # Remove the trailing spaces.
16892   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16893
16894 EOF
16895
16896 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16897 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16898 # be either 'cat' or 'sort'.
16899 cat confdefs.h | uniq >conftest.vals
16900
16901 # Break up conftest.vals because some shells have a limit on
16902 # the size of here documents, and old seds have small limits too.
16903
16904 rm -f conftest.tail
16905 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16906 while grep . conftest.vals >/dev/null
16907 do
16908   # Write chunks of a limited-size here document to conftest.frag.
16909   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16910   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16911   echo 'CEOF' >> $CONFIG_STATUS
16912   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16913   rm -f conftest.vals
16914   mv conftest.tail conftest.vals
16915 done
16916 rm -f conftest.vals
16917
16918 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16919 # marker @DEFS@.
16920 echo '  cat >> conftest.edit <<CEOF
16921 /@DEFS@/r conftest.frag
16922 /@DEFS@/d
16923 CEOF
16924 sed -f conftest.edit $tmp/in > $tmp/out
16925 rm -f $tmp/in
16926 mv $tmp/out $tmp/in
16927 rm -f conftest.edit conftest.frag
16928 ' >> $CONFIG_STATUS
16929
16930 cat >>$CONFIG_STATUS <<\EOF
16931   # Let's still pretend it is `configure' which instantiates (i.e., don't
16932   # use $as_me), people would be surprised to read:
16933   #    /* config.h.  Generated automatically by config.status.  */
16934   if test x"$ac_file" = x-; then
16935     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16936   else
16937     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16938   fi
16939   cat $tmp/in >>$tmp/config.h
16940   rm -f $tmp/in
16941   if test x"$ac_file" != x-; then
16942     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16943       { echo "$as_me:16943: $ac_file is unchanged" >&5
16944 echo "$as_me: $ac_file is unchanged" >&6;}
16945     else
16946       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16947          X"$ac_file" : 'X\(//\)[^/]' \| \
16948          X"$ac_file" : 'X\(//\)$' \| \
16949          X"$ac_file" : 'X\(/\)' \| \
16950          .     : '\(.\)' 2>/dev/null ||
16951 echo X"$ac_file" |
16952     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16953           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16954           /^X\(\/\/\)$/{ s//\1/; q; }
16955           /^X\(\/\).*/{ s//\1/; q; }
16956           s/.*/./; q'`
16957       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16958         { case "$ac_dir" in
16959   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16960   *)                      as_incr_dir=.;;
16961 esac
16962 as_dummy="$ac_dir"
16963 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16964   case $as_mkdir_dir in
16965     # Skip DOS drivespec
16966     ?:) as_incr_dir=$as_mkdir_dir ;;
16967     *)
16968       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16969       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16970     ;;
16971   esac
16972 done; }
16973
16974       fi
16975       rm -f $ac_file
16976       mv $tmp/config.h $ac_file
16977     fi
16978   else
16979     cat $tmp/config.h
16980     rm -f $tmp/config.h
16981   fi
16982 done
16983 EOF
16984 cat >>$CONFIG_STATUS <<\EOF
16985 #
16986 # CONFIG_COMMANDS section.
16987 #
16988 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16989   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16990   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16991
16992   case $ac_dest in
16993     default )
16994
16995 for cf_dir in .
16996 do
16997         if test ! -d $srcdir/$cf_dir; then
16998                 continue
16999         elif test -f $srcdir/$cf_dir/programs; then
17000                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17001         fi
17002 done
17003
17004         cat >>Makefile <<TEST_EOF
17005
17006 # These rules are generated so we do not rely on suffix rules, which do not
17007 # work consistently for different make-programs (the '\$(MODEL)/' confuses
17008 # some, and the '\$x' confuses others).
17009 TEST_EOF
17010
17011 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
17012 for N in $LIST
17013 do
17014         cat >>Makefile <<TEST_EOF
17015
17016 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
17017         \$(srcdir)/test.priv.h \\
17018         ncurses_cfg.h
17019         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
17020 TEST_EOF
17021 done
17022
17023 if test -f ../config.guess && test -f ../config.sub
17024 then
17025         cat >>Makefile <<TEST_EOF
17026
17027 # if we used CF_INHERIT for getting these files, we can remove them
17028 distclean::
17029         rm -f config.guess config.sub
17030 TEST_EOF
17031 fi
17032  ;;
17033   esac
17034 done
17035 EOF
17036
17037 cat >>$CONFIG_STATUS <<\EOF
17038
17039 { (exit 0); exit 0; }
17040 EOF
17041 chmod +x $CONFIG_STATUS
17042 ac_clean_files=$ac_clean_files_save
17043
17044 # configure is writing to config.log, and then calls config.status.
17045 # config.status does its own redirection, appending to config.log.
17046 # Unfortunately, on DOS this fails, as config.log is still kept open
17047 # by configure, so config.status won't be able to write to it; its
17048 # output is simply discarded.  So we exec the FD to /dev/null,
17049 # effectively closing config.log, so it can be properly (re)opened and
17050 # appended to by config.status.  When coming back to configure, we
17051 # need to make the FD available again.
17052 if test "$no_create" != yes; then
17053   ac_cs_success=:
17054   exec 5>/dev/null
17055   $SHELL $CONFIG_STATUS || ac_cs_success=false
17056   exec 5>>config.log
17057   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17058   # would make configure fail if this is the last instruction.
17059   $ac_cs_success || { (exit 1); exit 1; }
17060 fi
17061