]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.9 - patch 20140719
[ncurses.git] / test / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20121002.
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 datarootdir='${prefix}/share'
138 datadir='${datarootdir}'
139 sysconfdir='${prefix}/etc'
140 sharedstatedir='${prefix}/com'
141 localstatedir='${prefix}/var'
142 libdir='${exec_prefix}/lib'
143 includedir='${prefix}/include'
144 oldincludedir='/usr/include'
145 infodir='${datarootdir}/info'
146 mandir='${datarootdir}/man'
147
148 # Identity of this package.
149 PACKAGE_NAME=
150 PACKAGE_TARNAME=
151 PACKAGE_VERSION=
152 PACKAGE_STRING=
153 PACKAGE_BUGREPORT=
154
155 ac_prev=
156 for ac_option
157 do
158   # If the previous option needs an argument, assign it.
159   if test -n "$ac_prev"; then
160     eval "$ac_prev=\$ac_option"
161     ac_prev=
162     continue
163   fi
164
165   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167   # Accept the important Cygnus configure options, so we can diagnose typos.
168
169   case $ac_option in
170
171   -bindir | --bindir | --bindi | --bind | --bin | --bi)
172     ac_prev=bindir ;;
173   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174     bindir=$ac_optarg ;;
175
176   -build | --build | --buil | --bui | --bu)
177     ac_prev=build_alias ;;
178   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179     build_alias=$ac_optarg ;;
180
181   -cache-file | --cache-file | --cache-fil | --cache-fi \
182   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183     ac_prev=cache_file ;;
184   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186     cache_file=$ac_optarg ;;
187
188   --config-cache | -C)
189     cache_file=config.cache ;;
190
191   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192     ac_prev=datadir ;;
193   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194   | --da=*)
195     datadir=$ac_optarg ;;
196
197   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
198   | --dataroo | --dataro | --datar)
199     ac_prev=datarootdir ;;
200   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
201   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
202     datarootdir=$ac_optarg ;;
203
204   -disable-* | --disable-*)
205     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
206     # Reject names that are not valid shell variable names.
207     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
208       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
209    { (exit 1); exit 1; }; }
210     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
211     eval "enable_$ac_feature=no" ;;
212
213   -enable-* | --enable-*)
214     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
215     # Reject names that are not valid shell variable names.
216     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
217       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
218    { (exit 1); exit 1; }; }
219     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
220     case $ac_option in
221       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
222       *) ac_optarg=yes ;;
223     esac
224     eval "enable_$ac_feature='$ac_optarg'" ;;
225
226   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
227   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
228   | --exec | --exe | --ex)
229     ac_prev=exec_prefix ;;
230   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
231   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
232   | --exec=* | --exe=* | --ex=*)
233     exec_prefix=$ac_optarg ;;
234
235   -gas | --gas | --ga | --g)
236     # Obsolete; use --with-gas.
237     with_gas=yes ;;
238
239   -help | --help | --hel | --he | -h)
240     ac_init_help=long ;;
241   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
242     ac_init_help=recursive ;;
243   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
244     ac_init_help=short ;;
245
246   -host | --host | --hos | --ho)
247     ac_prev=host_alias ;;
248   -host=* | --host=* | --hos=* | --ho=*)
249     host_alias=$ac_optarg ;;
250
251   -includedir | --includedir | --includedi | --included | --include \
252   | --includ | --inclu | --incl | --inc)
253     ac_prev=includedir ;;
254   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
255   | --includ=* | --inclu=* | --incl=* | --inc=*)
256     includedir=$ac_optarg ;;
257
258   -infodir | --infodir | --infodi | --infod | --info | --inf)
259     ac_prev=infodir ;;
260   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
261     infodir=$ac_optarg ;;
262
263   -libdir | --libdir | --libdi | --libd)
264     ac_prev=libdir ;;
265   -libdir=* | --libdir=* | --libdi=* | --libd=*)
266     libdir=$ac_optarg ;;
267
268   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
269   | --libexe | --libex | --libe)
270     ac_prev=libexecdir ;;
271   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
272   | --libexe=* | --libex=* | --libe=*)
273     libexecdir=$ac_optarg ;;
274
275   -localstatedir | --localstatedir | --localstatedi | --localstated \
276   | --localstate | --localstat | --localsta | --localst \
277   | --locals | --local | --loca | --loc | --lo)
278     ac_prev=localstatedir ;;
279   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
280   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
281   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
282     localstatedir=$ac_optarg ;;
283
284   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
285     ac_prev=mandir ;;
286   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
287     mandir=$ac_optarg ;;
288
289   -nfp | --nfp | --nf)
290     # Obsolete; use --without-fp.
291     with_fp=no ;;
292
293   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
294   | --no-cr | --no-c)
295     no_create=yes ;;
296
297   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
298   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
299     no_recursion=yes ;;
300
301   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
302   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
303   | --oldin | --oldi | --old | --ol | --o)
304     ac_prev=oldincludedir ;;
305   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
306   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
307   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
308     oldincludedir=$ac_optarg ;;
309
310   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
311     ac_prev=prefix ;;
312   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
313     prefix=$ac_optarg ;;
314
315   -program-prefix | --program-prefix | --program-prefi | --program-pref \
316   | --program-pre | --program-pr | --program-p)
317     ac_prev=program_prefix ;;
318   -program-prefix=* | --program-prefix=* | --program-prefi=* \
319   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
320     program_prefix=$ac_optarg ;;
321
322   -program-suffix | --program-suffix | --program-suffi | --program-suff \
323   | --program-suf | --program-su | --program-s)
324     ac_prev=program_suffix ;;
325   -program-suffix=* | --program-suffix=* | --program-suffi=* \
326   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
327     program_suffix=$ac_optarg ;;
328
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     ac_prev=program_transform_name ;;
337   -program-transform-name=* | --program-transform-name=* \
338   | --program-transform-nam=* | --program-transform-na=* \
339   | --program-transform-n=* | --program-transform-=* \
340   | --program-transform=* | --program-transfor=* \
341   | --program-transfo=* | --program-transf=* \
342   | --program-trans=* | --program-tran=* \
343   | --progr-tra=* | --program-tr=* | --program-t=*)
344     program_transform_name=$ac_optarg ;;
345
346   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
347   | -silent | --silent | --silen | --sile | --sil)
348     silent=yes ;;
349
350   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
351     ac_prev=sbindir ;;
352   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
353   | --sbi=* | --sb=*)
354     sbindir=$ac_optarg ;;
355
356   -sharedstatedir | --sharedstatedir | --sharedstatedi \
357   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
358   | --sharedst | --shareds | --shared | --share | --shar \
359   | --sha | --sh)
360     ac_prev=sharedstatedir ;;
361   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
362   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
363   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
364   | --sha=* | --sh=*)
365     sharedstatedir=$ac_optarg ;;
366
367   -site | --site | --sit)
368     ac_prev=site ;;
369   -site=* | --site=* | --sit=*)
370     site=$ac_optarg ;;
371
372   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
373     ac_prev=srcdir ;;
374   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
375     srcdir=$ac_optarg ;;
376
377   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
378   | --syscon | --sysco | --sysc | --sys | --sy)
379     ac_prev=sysconfdir ;;
380   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
381   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
382     sysconfdir=$ac_optarg ;;
383
384   -target | --target | --targe | --targ | --tar | --ta | --t)
385     ac_prev=target_alias ;;
386   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
387     target_alias=$ac_optarg ;;
388
389   -v | -verbose | --verbose | --verbos | --verbo | --verb)
390     verbose=yes ;;
391
392   -version | --version | --versio | --versi | --vers | -V)
393     ac_init_version=: ;;
394
395   -with-* | --with-*)
396     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
397     # Reject names that are not valid shell variable names.
398     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399       { echo "$as_me: error: invalid package name: $ac_package" >&2
400    { (exit 1); exit 1; }; }
401     ac_package=`echo $ac_package| sed 's/-/_/g'`
402     case $ac_option in
403       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
404       *) ac_optarg=yes ;;
405     esac
406     eval "with_$ac_package='$ac_optarg'" ;;
407
408   -without-* | --without-*)
409     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
410     # Reject names that are not valid shell variable names.
411     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
412       { echo "$as_me: error: invalid package name: $ac_package" >&2
413    { (exit 1); exit 1; }; }
414     ac_package=`echo $ac_package | sed 's/-/_/g'`
415     eval "with_$ac_package=no" ;;
416
417   --x)
418     # Obsolete; use --with-x.
419     with_x=yes ;;
420
421   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422   | --x-incl | --x-inc | --x-in | --x-i)
423     ac_prev=x_includes ;;
424   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426     x_includes=$ac_optarg ;;
427
428   -x-libraries | --x-libraries | --x-librarie | --x-librari \
429   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430     ac_prev=x_libraries ;;
431   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433     x_libraries=$ac_optarg ;;
434
435   -*) { echo "$as_me: error: unrecognized option: $ac_option
436 Try \`$0 --help' for more information." >&2
437    { (exit 1); exit 1; }; }
438     ;;
439
440   *=*)
441     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
442     # Reject names that are not valid shell variable names.
443     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
444       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
445    { (exit 1); exit 1; }; }
446     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
447     eval "$ac_envvar='$ac_optarg'"
448     export $ac_envvar ;;
449
450   *)
451     # FIXME: should be removed in autoconf 3.0.
452     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
453     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
454       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
455     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
456     ;;
457
458   esac
459 done
460
461 if test -n "$ac_prev"; then
462   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
463   { echo "$as_me: error: missing argument to $ac_option" >&2
464    { (exit 1); exit 1; }; }
465 fi
466
467 # Be sure to have absolute paths.
468 for ac_var in exec_prefix prefix
469 do
470   eval ac_val=$`echo $ac_var`
471   case $ac_val in
472     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
473     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
474    { (exit 1); exit 1; }; };;
475   esac
476 done
477
478 # Be sure to have absolute paths.
479 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
480               localstatedir libdir includedir oldincludedir infodir mandir
481 do
482   eval ac_val=$`echo $ac_var`
483   case $ac_val in
484     [\\/$]* | ?:[\\/]* ) ;;
485     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486    { (exit 1); exit 1; }; };;
487   esac
488 done
489
490 # There might be people who depend on the old broken behavior: `$host'
491 # used to hold the argument of --host etc.
492 build=$build_alias
493 host=$host_alias
494 target=$target_alias
495
496 # FIXME: should be removed in autoconf 3.0.
497 if test "x$host_alias" != x; then
498   if test "x$build_alias" = x; then
499     cross_compiling=maybe
500     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
501     If a cross compiler is detected then cross compile mode will be used." >&2
502   elif test "x$build_alias" != "x$host_alias"; then
503     cross_compiling=yes
504   fi
505 fi
506
507 ac_tool_prefix=
508 test -n "$host_alias" && ac_tool_prefix=$host_alias-
509
510 test "$silent" = yes && exec 6>/dev/null
511
512 # Find the source files, if location was not specified.
513 if test -z "$srcdir"; then
514   ac_srcdir_defaulted=yes
515   # Try the directory containing this script, then its parent.
516   ac_prog=$0
517   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
518   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519   srcdir=$ac_confdir
520   if test ! -r $srcdir/$ac_unique_file; then
521     srcdir=..
522   fi
523 else
524   ac_srcdir_defaulted=no
525 fi
526 if test ! -r $srcdir/$ac_unique_file; then
527   if test "$ac_srcdir_defaulted" = yes; then
528     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
529    { (exit 1); exit 1; }; }
530   else
531     { echo "$as_me: error: cannot find sources in $srcdir" >&2
532    { (exit 1); exit 1; }; }
533   fi
534 fi
535 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
536 ac_env_build_alias_set=${build_alias+set}
537 ac_env_build_alias_value=$build_alias
538 ac_cv_env_build_alias_set=${build_alias+set}
539 ac_cv_env_build_alias_value=$build_alias
540 ac_env_host_alias_set=${host_alias+set}
541 ac_env_host_alias_value=$host_alias
542 ac_cv_env_host_alias_set=${host_alias+set}
543 ac_cv_env_host_alias_value=$host_alias
544 ac_env_target_alias_set=${target_alias+set}
545 ac_env_target_alias_value=$target_alias
546 ac_cv_env_target_alias_set=${target_alias+set}
547 ac_cv_env_target_alias_value=$target_alias
548 ac_env_CC_set=${CC+set}
549 ac_env_CC_value=$CC
550 ac_cv_env_CC_set=${CC+set}
551 ac_cv_env_CC_value=$CC
552 ac_env_CFLAGS_set=${CFLAGS+set}
553 ac_env_CFLAGS_value=$CFLAGS
554 ac_cv_env_CFLAGS_set=${CFLAGS+set}
555 ac_cv_env_CFLAGS_value=$CFLAGS
556 ac_env_LDFLAGS_set=${LDFLAGS+set}
557 ac_env_LDFLAGS_value=$LDFLAGS
558 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
559 ac_cv_env_LDFLAGS_value=$LDFLAGS
560 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
561 ac_env_CPPFLAGS_value=$CPPFLAGS
562 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
563 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
564 ac_env_CPP_set=${CPP+set}
565 ac_env_CPP_value=$CPP
566 ac_cv_env_CPP_set=${CPP+set}
567 ac_cv_env_CPP_value=$CPP
568
569 #
570 # Report the --help message.
571 #
572 if test "$ac_init_help" = "long"; then
573   # Omit some internal or obsolete options to make the list less imposing.
574   # This message is too long to be a string in the A/UX 3.1 sh.
575   cat <<EOF
576 \`configure' configures this package to adapt to many kinds of systems.
577
578 Usage: $0 [OPTION]... [VAR=VALUE]...
579
580 To assign environment variables (e.g., CC, CFLAGS...), specify them as
581 VAR=VALUE.  See below for descriptions of some of the useful variables.
582
583 Defaults for the options are specified in brackets.
584
585 Configuration:
586   -h, --help              display this help and exit
587       --help=short        display options specific to this package
588       --help=recursive    display the short help of all the included packages
589   -V, --version           display version information and exit
590   -q, --quiet, --silent   do not print \`checking...' messages
591       --cache-file=FILE   cache test results in FILE [disabled]
592   -C, --config-cache      alias for \`--cache-file=config.cache'
593   -n, --no-create         do not create output files
594       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
595
596 EOF
597
598   cat <<EOF
599 Installation directories:
600   --prefix=PREFIX         install architecture-independent files in PREFIX
601                           [$ac_default_prefix]
602   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
603                           [PREFIX]
604
605 By default, \`make install' will install all the files in
606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
608 for instance \`--prefix=\$HOME'.
609
610 For better control, use the options below.
611
612 Fine tuning of the installation directories:
613   --bindir=DIR            user executables [EPREFIX/bin]
614   --sbindir=DIR           system admin executables [EPREFIX/sbin]
615   --libexecdir=DIR        program executables [EPREFIX/libexec]
616   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
617   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
618   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
619   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
620   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
621   --libdir=DIR            object code libraries [EPREFIX/lib]
622   --includedir=DIR        C header files [PREFIX/include]
623   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
624   --infodir=DIR           info documentation [DATAROOTDIR/info]
625   --mandir=DIR            man documentation [DATAROOTDIR/man]
626 EOF
627
628   cat <<\EOF
629
630 Program names:
631   --program-prefix=PREFIX            prepend PREFIX to installed program names
632   --program-suffix=SUFFIX            append SUFFIX to installed program names
633   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
634
635 X features:
636   --x-includes=DIR    X include files are in DIR
637   --x-libraries=DIR   X library files are in DIR
638
639 System types:
640   --build=BUILD           configure for building on BUILD [guessed]
641   --host=HOST       build programs to run on HOST [BUILD]
642 EOF
643 fi
644
645 if test -n "$ac_init_help"; then
646
647   cat <<\EOF
648
649 Optional Packages:
650   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
651   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
652
653 Optional Features:
654   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
655   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
656
657 General Options:
658   --with-pkg-config{=path} enable/disable use of pkg-config
659   --disable-echo          do not display "compiling" commands
660 Curses Version-dependent Options:
661   --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
662   --disable-widec         disable checks for wide-character functions
663   --with-curses-dir=DIR   directory in which (n)curses is installed
664   --with-ncursesw         use wide ncurses-libraries
665   --with-ncurses          use ncurses-libraries
666   --with-pdcurses         compile/link with pdcurses X11 library
667   --with-curses-colr      compile/link with HPUX 10.x color-curses
668   --with-curses-5lib      compile/link with SunOS 5lib curses
669   --with-Xaw3d            link with Xaw 3d library
670   --with-Xaw3dxft         link with Xaw 3d xft library
671   --with-neXtaw           link with neXT Athena library
672   --with-XawPlus          link with Athena-Plus library
673   --with-x                use the X Window System
674 Testing/development Options:
675   --enable-warnings       test: turn on gcc compiler warnings
676   --with-dmalloc          test: use Gray Watson's dmalloc library
677   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
678   --with-valgrind         test: use valgrind
679   --disable-leaks         test: free permanent memory, analyze leaks
680   --disable-rpath-hack    don't add rpath options for additional libraries
681
682 Some influential environment variables:
683   CC          C compiler command
684   CFLAGS      C compiler flags
685   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
686               nonstandard directory <lib dir>
687   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
688               headers in a nonstandard directory <include dir>
689   CPP         C preprocessor
690
691 Use these variables to override the choices made by `configure' or to help
692 it to find libraries and programs with nonstandard names/locations.
693
694 EOF
695 fi
696
697 if test "$ac_init_help" = "recursive"; then
698   # If there are subdirs, report their specific --help.
699   ac_popdir=`pwd`
700   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
701     cd $ac_subdir
702     # A "../" for each directory in /$ac_subdir.
703     ac_dots=`echo $ac_subdir |
704              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
705
706     case $srcdir in
707     .) # No --srcdir option.  We are building in place.
708       ac_sub_srcdir=$srcdir ;;
709     [\\/]* | ?:[\\/]* ) # Absolute path.
710       ac_sub_srcdir=$srcdir/$ac_subdir ;;
711     *) # Relative path.
712       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
713     esac
714
715     # Check for guested configure; otherwise get Cygnus style configure.
716     if test -f $ac_sub_srcdir/configure.gnu; then
717       echo
718       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
719     elif test -f $ac_sub_srcdir/configure; then
720       echo
721       $SHELL $ac_sub_srcdir/configure  --help=recursive
722     elif test -f $ac_sub_srcdir/configure.ac ||
723            test -f $ac_sub_srcdir/configure.in; then
724       echo
725       $ac_configure --help
726     else
727       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
728     fi
729     cd $ac_popdir
730   done
731 fi
732
733 test -n "$ac_init_help" && exit 0
734 if $ac_init_version; then
735   cat <<\EOF
736
737 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
738 Free Software Foundation, Inc.
739 This configure script is free software; the Free Software Foundation
740 gives unlimited permission to copy, distribute and modify it.
741 EOF
742   exit 0
743 fi
744 exec 5>config.log
745 cat >&5 <<EOF
746 This file contains any messages produced by compilers while
747 running configure, to aid debugging if configure makes a mistake.
748
749 It was created by $as_me, which was
750 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
751
752   $ $0 $@
753
754 EOF
755 {
756 cat <<_ASUNAME
757 ## ---------- ##
758 ## Platform.  ##
759 ## ---------- ##
760
761 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
762 uname -m = `(uname -m) 2>/dev/null || echo unknown`
763 uname -r = `(uname -r) 2>/dev/null || echo unknown`
764 uname -s = `(uname -s) 2>/dev/null || echo unknown`
765 uname -v = `(uname -v) 2>/dev/null || echo unknown`
766
767 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
768 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
769
770 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
771 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
772 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
773 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
774 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
775 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
776 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
777
778 PATH = $PATH
779
780 _ASUNAME
781 } >&5
782
783 cat >&5 <<EOF
784 ## ------------ ##
785 ## Core tests.  ##
786 ## ------------ ##
787
788 EOF
789
790 # Keep a trace of the command line.
791 # Strip out --no-create and --no-recursion so they do not pile up.
792 # Also quote any args containing shell meta-characters.
793 ac_configure_args=
794 ac_sep=
795 for ac_arg
796 do
797   case $ac_arg in
798   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
799   | --no-cr | --no-c) ;;
800   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
801   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
802   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
803     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
804     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
805     ac_sep=" " ;;
806   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
807      ac_sep=" " ;;
808   esac
809   # Get rid of the leading space.
810 done
811
812 # When interrupted or exit'd, cleanup temporary files, and complete
813 # config.log.  We remove comments because anyway the quotes in there
814 # would cause problems or look ugly.
815 trap 'exit_status=$?
816   # Save into config.log some information that might help in debugging.
817   echo >&5
818   echo "## ----------------- ##" >&5
819   echo "## Cache variables.  ##" >&5
820   echo "## ----------------- ##" >&5
821   echo >&5
822   # The following way of writing the cache mishandles newlines in values,
823 {
824   (set) 2>&1 |
825     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
826     *ac_space=\ *)
827       sed -n \
828         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
829           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
830       ;;
831     *)
832       sed -n \
833         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
834       ;;
835     esac;
836 } >&5
837   sed "/^$/d" confdefs.h >conftest.log
838   if test -s conftest.log; then
839     echo >&5
840     echo "## ------------ ##" >&5
841     echo "## confdefs.h.  ##" >&5
842     echo "## ------------ ##" >&5
843     echo >&5
844     cat conftest.log >&5
845   fi
846   (echo; echo) >&5
847   test "$ac_signal" != 0 &&
848     echo "$as_me: caught signal $ac_signal" >&5
849   echo "$as_me: exit $exit_status" >&5
850   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
851     exit $exit_status
852      ' 0
853 for ac_signal in 1 2 13 15; do
854   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
855 done
856 ac_signal=0
857
858 # confdefs.h avoids OS command line length limits that DEFS can exceed.
859 rm -rf conftest* confdefs.h
860 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
861 echo >confdefs.h
862
863 # Let the site file select an alternate cache file if it wants to.
864 # Prefer explicitly selected file to automatically selected ones.
865 if test -z "$CONFIG_SITE"; then
866   if test "x$prefix" != xNONE; then
867     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
868   else
869     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
870   fi
871 fi
872 for ac_site_file in $CONFIG_SITE; do
873   if test -r "$ac_site_file"; then
874     { echo "$as_me:874: loading site script $ac_site_file" >&5
875 echo "$as_me: loading site script $ac_site_file" >&6;}
876     cat "$ac_site_file" >&5
877     . "$ac_site_file"
878   fi
879 done
880
881 if test -r "$cache_file"; then
882   # Some versions of bash will fail to source /dev/null (special
883   # files actually), so we avoid doing that.
884   if test -f "$cache_file"; then
885     { echo "$as_me:885: loading cache $cache_file" >&5
886 echo "$as_me: loading cache $cache_file" >&6;}
887     case $cache_file in
888       [\\/]* | ?:[\\/]* ) . $cache_file;;
889       *)                      . ./$cache_file;;
890     esac
891   fi
892 else
893   { echo "$as_me:893: creating cache $cache_file" >&5
894 echo "$as_me: creating cache $cache_file" >&6;}
895   >$cache_file
896 fi
897
898 # Check that the precious variables saved in the cache have kept the same
899 # value.
900 ac_cache_corrupted=false
901 for ac_var in `(set) 2>&1 |
902                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
903   eval ac_old_set=\$ac_cv_env_${ac_var}_set
904   eval ac_new_set=\$ac_env_${ac_var}_set
905   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
906   eval ac_new_val="\$ac_env_${ac_var}_value"
907   case $ac_old_set,$ac_new_set in
908     set,)
909       { echo "$as_me:909: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
910 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
911       ac_cache_corrupted=: ;;
912     ,set)
913       { echo "$as_me:913: error: \`$ac_var' was not set in the previous run" >&5
914 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
915       ac_cache_corrupted=: ;;
916     ,);;
917     *)
918       if test "x$ac_old_val" != "x$ac_new_val"; then
919         { echo "$as_me:919: error: \`$ac_var' has changed since the previous run:" >&5
920 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
921         { echo "$as_me:921:   former value:  $ac_old_val" >&5
922 echo "$as_me:   former value:  $ac_old_val" >&2;}
923         { echo "$as_me:923:   current value: $ac_new_val" >&5
924 echo "$as_me:   current value: $ac_new_val" >&2;}
925         ac_cache_corrupted=:
926       fi;;
927   esac
928   # Pass precious variables to config.status.  It doesn't matter if
929   # we pass some twice (in addition to the command line arguments).
930   if test "$ac_new_set" = set; then
931     case $ac_new_val in
932     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
933       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
934       ac_configure_args="$ac_configure_args '$ac_arg'"
935       ;;
936     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
937        ;;
938     esac
939   fi
940 done
941 if $ac_cache_corrupted; then
942   { echo "$as_me:942: error: changes in the environment can compromise the build" >&5
943 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
944   { { echo "$as_me:944: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
945 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
946    { (exit 1); exit 1; }; }
947 fi
948
949 ac_ext=c
950 ac_cpp='$CPP $CPPFLAGS'
951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
953 ac_compiler_gnu=$ac_cv_c_compiler_gnu
954 ac_main_return=return
955
956 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
957   *c*,-n*) ECHO_N= ECHO_C='
958 ' ECHO_T='      ' ;;
959   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
960   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
961 esac
962 echo "#! $SHELL" >conftest.sh
963 echo  "exit 0"   >>conftest.sh
964 chmod +x conftest.sh
965 if { (echo "$as_me:965: PATH=\".;.\"; conftest.sh") >&5
966   (PATH=".;."; conftest.sh) 2>&5
967   ac_status=$?
968   echo "$as_me:968: \$? = $ac_status" >&5
969   (exit $ac_status); }; then
970   ac_path_separator=';'
971 else
972   ac_path_separator=:
973 fi
974 PATH_SEPARATOR="$ac_path_separator"
975 rm -f conftest.sh
976
977 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
978
979 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
980
981 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
982
983 ac_aux_dir=
984 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
985   if test -f $ac_dir/install-sh; then
986     ac_aux_dir=$ac_dir
987     ac_install_sh="$ac_aux_dir/install-sh -c"
988     break
989   elif test -f $ac_dir/install.sh; then
990     ac_aux_dir=$ac_dir
991     ac_install_sh="$ac_aux_dir/install.sh -c"
992     break
993   elif test -f $ac_dir/shtool; then
994     ac_aux_dir=$ac_dir
995     ac_install_sh="$ac_aux_dir/shtool install -c"
996     break
997   fi
998 done
999 if test -z "$ac_aux_dir"; then
1000   { { echo "$as_me:1000: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1001 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1002    { (exit 1); exit 1; }; }
1003 fi
1004 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1005 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1006 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1007
1008 # Make sure we can run config.sub.
1009 $ac_config_sub sun4 >/dev/null 2>&1 ||
1010   { { echo "$as_me:1010: error: cannot run $ac_config_sub" >&5
1011 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1012    { (exit 1); exit 1; }; }
1013
1014 echo "$as_me:1014: checking build system type" >&5
1015 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1016 if test "${ac_cv_build+set}" = set; then
1017   echo $ECHO_N "(cached) $ECHO_C" >&6
1018 else
1019   ac_cv_build_alias=$build_alias
1020 test -z "$ac_cv_build_alias" &&
1021   ac_cv_build_alias=`$ac_config_guess`
1022 test -z "$ac_cv_build_alias" &&
1023   { { echo "$as_me:1023: error: cannot guess build type; you must specify one" >&5
1024 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1025    { (exit 1); exit 1; }; }
1026 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1027   { { echo "$as_me:1027: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1028 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1029    { (exit 1); exit 1; }; }
1030
1031 fi
1032 echo "$as_me:1032: result: $ac_cv_build" >&5
1033 echo "${ECHO_T}$ac_cv_build" >&6
1034 build=$ac_cv_build
1035 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1036 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1037 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1038
1039 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1040         echo "$as_me:1040: checking host system type" >&5
1041 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1042 if test "${ac_cv_host+set}" = set; then
1043   echo $ECHO_N "(cached) $ECHO_C" >&6
1044 else
1045   ac_cv_host_alias=$host_alias
1046 test -z "$ac_cv_host_alias" &&
1047   ac_cv_host_alias=$ac_cv_build_alias
1048 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1049   { { echo "$as_me:1049: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1050 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1051    { (exit 1); exit 1; }; }
1052
1053 fi
1054 echo "$as_me:1054: result: $ac_cv_host" >&5
1055 echo "${ECHO_T}$ac_cv_host" >&6
1056 host=$ac_cv_host
1057 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1058 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1059 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1060
1061         system_name="$host_os"
1062 else
1063         system_name="`(uname -s -r) 2>/dev/null`"
1064         if test -z "$system_name" ; then
1065                 system_name="`(hostname) 2>/dev/null`"
1066         fi
1067 fi
1068 test -n "$system_name" &&
1069 cat >>confdefs.h <<EOF
1070 #define SYSTEM_NAME "$system_name"
1071 EOF
1072
1073 if test "${cf_cv_system_name+set}" = set; then
1074   echo $ECHO_N "(cached) $ECHO_C" >&6
1075 else
1076   cf_cv_system_name="$system_name"
1077 fi
1078
1079 test -z "$system_name" && system_name="$cf_cv_system_name"
1080 test -n "$cf_cv_system_name" && echo "$as_me:1080: result: Configuring for $cf_cv_system_name" >&5
1081 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1082
1083 if test ".$system_name" != ".$cf_cv_system_name" ; then
1084         echo "$as_me:1084: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1085 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1086         { { echo "$as_me:1086: error: \"Please remove config.cache and try again.\"" >&5
1087 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1088    { (exit 1); exit 1; }; }
1089 fi
1090
1091 test "$program_prefix" != NONE &&
1092   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1093 # Use a double $ so make ignores it.
1094 test "$program_suffix" != NONE &&
1095   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1096 # Double any \ or $.  echo might interpret backslashes.
1097 # By default was `s,x,x', remove it if useless.
1098 cat <<\_ACEOF >conftest.sed
1099 s/[\\$]/&&/g;s/;s,x,x,$//
1100 _ACEOF
1101 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1102 rm conftest.sed
1103
1104 echo "$as_me:1104: checking whether ${MAKE-make} sets \${MAKE}" >&5
1105 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1106 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1107 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1108   echo $ECHO_N "(cached) $ECHO_C" >&6
1109 else
1110   cat >conftest.make <<\EOF
1111 all:
1112         @echo 'ac_maketemp="${MAKE}"'
1113 EOF
1114 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1115 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1116 if test -n "$ac_maketemp"; then
1117   eval ac_cv_prog_make_${ac_make}_set=yes
1118 else
1119   eval ac_cv_prog_make_${ac_make}_set=no
1120 fi
1121 rm -f conftest.make
1122 fi
1123 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1124   echo "$as_me:1124: result: yes" >&5
1125 echo "${ECHO_T}yes" >&6
1126   SET_MAKE=
1127 else
1128   echo "$as_me:1128: result: no" >&5
1129 echo "${ECHO_T}no" >&6
1130   SET_MAKE="MAKE=${MAKE-make}"
1131 fi
1132
1133 ac_ext=c
1134 ac_cpp='$CPP $CPPFLAGS'
1135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1138 ac_main_return=return
1139 if test -n "$ac_tool_prefix"; then
1140   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1141 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1142 echo "$as_me:1142: checking for $ac_word" >&5
1143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1144 if test "${ac_cv_prog_CC+set}" = set; then
1145   echo $ECHO_N "(cached) $ECHO_C" >&6
1146 else
1147   if test -n "$CC"; then
1148   ac_cv_prog_CC="$CC" # Let the user override the test.
1149 else
1150   ac_save_IFS=$IFS; IFS=$ac_path_separator
1151 ac_dummy="$PATH"
1152 for ac_dir in $ac_dummy; do
1153   IFS=$ac_save_IFS
1154   test -z "$ac_dir" && ac_dir=.
1155   $as_executable_p "$ac_dir/$ac_word" || continue
1156 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1157 echo "$as_me:1157: found $ac_dir/$ac_word" >&5
1158 break
1159 done
1160
1161 fi
1162 fi
1163 CC=$ac_cv_prog_CC
1164 if test -n "$CC"; then
1165   echo "$as_me:1165: result: $CC" >&5
1166 echo "${ECHO_T}$CC" >&6
1167 else
1168   echo "$as_me:1168: result: no" >&5
1169 echo "${ECHO_T}no" >&6
1170 fi
1171
1172 fi
1173 if test -z "$ac_cv_prog_CC"; then
1174   ac_ct_CC=$CC
1175   # Extract the first word of "gcc", so it can be a program name with args.
1176 set dummy gcc; ac_word=$2
1177 echo "$as_me:1177: checking for $ac_word" >&5
1178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1179 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1180   echo $ECHO_N "(cached) $ECHO_C" >&6
1181 else
1182   if test -n "$ac_ct_CC"; then
1183   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1184 else
1185   ac_save_IFS=$IFS; IFS=$ac_path_separator
1186 ac_dummy="$PATH"
1187 for ac_dir in $ac_dummy; do
1188   IFS=$ac_save_IFS
1189   test -z "$ac_dir" && ac_dir=.
1190   $as_executable_p "$ac_dir/$ac_word" || continue
1191 ac_cv_prog_ac_ct_CC="gcc"
1192 echo "$as_me:1192: found $ac_dir/$ac_word" >&5
1193 break
1194 done
1195
1196 fi
1197 fi
1198 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1199 if test -n "$ac_ct_CC"; then
1200   echo "$as_me:1200: result: $ac_ct_CC" >&5
1201 echo "${ECHO_T}$ac_ct_CC" >&6
1202 else
1203   echo "$as_me:1203: result: no" >&5
1204 echo "${ECHO_T}no" >&6
1205 fi
1206
1207   CC=$ac_ct_CC
1208 else
1209   CC="$ac_cv_prog_CC"
1210 fi
1211
1212 if test -z "$CC"; then
1213   if test -n "$ac_tool_prefix"; then
1214   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1215 set dummy ${ac_tool_prefix}cc; ac_word=$2
1216 echo "$as_me:1216: checking for $ac_word" >&5
1217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1218 if test "${ac_cv_prog_CC+set}" = set; then
1219   echo $ECHO_N "(cached) $ECHO_C" >&6
1220 else
1221   if test -n "$CC"; then
1222   ac_cv_prog_CC="$CC" # Let the user override the test.
1223 else
1224   ac_save_IFS=$IFS; IFS=$ac_path_separator
1225 ac_dummy="$PATH"
1226 for ac_dir in $ac_dummy; do
1227   IFS=$ac_save_IFS
1228   test -z "$ac_dir" && ac_dir=.
1229   $as_executable_p "$ac_dir/$ac_word" || continue
1230 ac_cv_prog_CC="${ac_tool_prefix}cc"
1231 echo "$as_me:1231: found $ac_dir/$ac_word" >&5
1232 break
1233 done
1234
1235 fi
1236 fi
1237 CC=$ac_cv_prog_CC
1238 if test -n "$CC"; then
1239   echo "$as_me:1239: result: $CC" >&5
1240 echo "${ECHO_T}$CC" >&6
1241 else
1242   echo "$as_me:1242: result: no" >&5
1243 echo "${ECHO_T}no" >&6
1244 fi
1245
1246 fi
1247 if test -z "$ac_cv_prog_CC"; then
1248   ac_ct_CC=$CC
1249   # Extract the first word of "cc", so it can be a program name with args.
1250 set dummy cc; ac_word=$2
1251 echo "$as_me:1251: checking for $ac_word" >&5
1252 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1253 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1254   echo $ECHO_N "(cached) $ECHO_C" >&6
1255 else
1256   if test -n "$ac_ct_CC"; then
1257   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1258 else
1259   ac_save_IFS=$IFS; IFS=$ac_path_separator
1260 ac_dummy="$PATH"
1261 for ac_dir in $ac_dummy; do
1262   IFS=$ac_save_IFS
1263   test -z "$ac_dir" && ac_dir=.
1264   $as_executable_p "$ac_dir/$ac_word" || continue
1265 ac_cv_prog_ac_ct_CC="cc"
1266 echo "$as_me:1266: found $ac_dir/$ac_word" >&5
1267 break
1268 done
1269
1270 fi
1271 fi
1272 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1273 if test -n "$ac_ct_CC"; then
1274   echo "$as_me:1274: result: $ac_ct_CC" >&5
1275 echo "${ECHO_T}$ac_ct_CC" >&6
1276 else
1277   echo "$as_me:1277: result: no" >&5
1278 echo "${ECHO_T}no" >&6
1279 fi
1280
1281   CC=$ac_ct_CC
1282 else
1283   CC="$ac_cv_prog_CC"
1284 fi
1285
1286 fi
1287 if test -z "$CC"; then
1288   # Extract the first word of "cc", so it can be a program name with args.
1289 set dummy cc; ac_word=$2
1290 echo "$as_me:1290: checking for $ac_word" >&5
1291 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1292 if test "${ac_cv_prog_CC+set}" = set; then
1293   echo $ECHO_N "(cached) $ECHO_C" >&6
1294 else
1295   if test -n "$CC"; then
1296   ac_cv_prog_CC="$CC" # Let the user override the test.
1297 else
1298   ac_prog_rejected=no
1299   ac_save_IFS=$IFS; IFS=$ac_path_separator
1300 ac_dummy="$PATH"
1301 for ac_dir in $ac_dummy; do
1302   IFS=$ac_save_IFS
1303   test -z "$ac_dir" && ac_dir=.
1304   $as_executable_p "$ac_dir/$ac_word" || continue
1305 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1306   ac_prog_rejected=yes
1307   continue
1308 fi
1309 ac_cv_prog_CC="cc"
1310 echo "$as_me:1310: found $ac_dir/$ac_word" >&5
1311 break
1312 done
1313
1314 if test $ac_prog_rejected = yes; then
1315   # We found a bogon in the path, so make sure we never use it.
1316   set dummy $ac_cv_prog_CC
1317   shift
1318   if test $# != 0; then
1319     # We chose a different compiler from the bogus one.
1320     # However, it has the same basename, so the bogon will be chosen
1321     # first if we set CC to just the basename; use the full file name.
1322     shift
1323     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1324     shift
1325     ac_cv_prog_CC="$@"
1326   fi
1327 fi
1328 fi
1329 fi
1330 CC=$ac_cv_prog_CC
1331 if test -n "$CC"; then
1332   echo "$as_me:1332: result: $CC" >&5
1333 echo "${ECHO_T}$CC" >&6
1334 else
1335   echo "$as_me:1335: result: no" >&5
1336 echo "${ECHO_T}no" >&6
1337 fi
1338
1339 fi
1340 if test -z "$CC"; then
1341   if test -n "$ac_tool_prefix"; then
1342   for ac_prog in cl
1343   do
1344     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1345 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1346 echo "$as_me:1346: checking for $ac_word" >&5
1347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1348 if test "${ac_cv_prog_CC+set}" = set; then
1349   echo $ECHO_N "(cached) $ECHO_C" >&6
1350 else
1351   if test -n "$CC"; then
1352   ac_cv_prog_CC="$CC" # Let the user override the test.
1353 else
1354   ac_save_IFS=$IFS; IFS=$ac_path_separator
1355 ac_dummy="$PATH"
1356 for ac_dir in $ac_dummy; do
1357   IFS=$ac_save_IFS
1358   test -z "$ac_dir" && ac_dir=.
1359   $as_executable_p "$ac_dir/$ac_word" || continue
1360 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1361 echo "$as_me:1361: found $ac_dir/$ac_word" >&5
1362 break
1363 done
1364
1365 fi
1366 fi
1367 CC=$ac_cv_prog_CC
1368 if test -n "$CC"; then
1369   echo "$as_me:1369: result: $CC" >&5
1370 echo "${ECHO_T}$CC" >&6
1371 else
1372   echo "$as_me:1372: result: no" >&5
1373 echo "${ECHO_T}no" >&6
1374 fi
1375
1376     test -n "$CC" && break
1377   done
1378 fi
1379 if test -z "$CC"; then
1380   ac_ct_CC=$CC
1381   for ac_prog in cl
1382 do
1383   # Extract the first word of "$ac_prog", so it can be a program name with args.
1384 set dummy $ac_prog; ac_word=$2
1385 echo "$as_me:1385: checking for $ac_word" >&5
1386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1387 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1388   echo $ECHO_N "(cached) $ECHO_C" >&6
1389 else
1390   if test -n "$ac_ct_CC"; then
1391   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1392 else
1393   ac_save_IFS=$IFS; IFS=$ac_path_separator
1394 ac_dummy="$PATH"
1395 for ac_dir in $ac_dummy; do
1396   IFS=$ac_save_IFS
1397   test -z "$ac_dir" && ac_dir=.
1398   $as_executable_p "$ac_dir/$ac_word" || continue
1399 ac_cv_prog_ac_ct_CC="$ac_prog"
1400 echo "$as_me:1400: found $ac_dir/$ac_word" >&5
1401 break
1402 done
1403
1404 fi
1405 fi
1406 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1407 if test -n "$ac_ct_CC"; then
1408   echo "$as_me:1408: result: $ac_ct_CC" >&5
1409 echo "${ECHO_T}$ac_ct_CC" >&6
1410 else
1411   echo "$as_me:1411: result: no" >&5
1412 echo "${ECHO_T}no" >&6
1413 fi
1414
1415   test -n "$ac_ct_CC" && break
1416 done
1417
1418   CC=$ac_ct_CC
1419 fi
1420
1421 fi
1422
1423 test -z "$CC" && { { echo "$as_me:1423: error: no acceptable cc found in \$PATH" >&5
1424 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1425    { (exit 1); exit 1; }; }
1426
1427 # Provide some information about the compiler.
1428 echo "$as_me:1428:" \
1429      "checking for C compiler version" >&5
1430 ac_compiler=`set X $ac_compile; echo $2`
1431 { (eval echo "$as_me:1431: \"$ac_compiler --version </dev/null >&5\"") >&5
1432   (eval $ac_compiler --version </dev/null >&5) 2>&5
1433   ac_status=$?
1434   echo "$as_me:1434: \$? = $ac_status" >&5
1435   (exit $ac_status); }
1436 { (eval echo "$as_me:1436: \"$ac_compiler -v </dev/null >&5\"") >&5
1437   (eval $ac_compiler -v </dev/null >&5) 2>&5
1438   ac_status=$?
1439   echo "$as_me:1439: \$? = $ac_status" >&5
1440   (exit $ac_status); }
1441 { (eval echo "$as_me:1441: \"$ac_compiler -V </dev/null >&5\"") >&5
1442   (eval $ac_compiler -V </dev/null >&5) 2>&5
1443   ac_status=$?
1444   echo "$as_me:1444: \$? = $ac_status" >&5
1445   (exit $ac_status); }
1446
1447 cat >conftest.$ac_ext <<_ACEOF
1448 #line 1448 "configure"
1449 #include "confdefs.h"
1450
1451 int
1452 main ()
1453 {
1454
1455   ;
1456   return 0;
1457 }
1458 _ACEOF
1459 ac_clean_files_save=$ac_clean_files
1460 ac_clean_files="$ac_clean_files a.out a.exe"
1461 # Try to create an executable without -o first, disregard a.out.
1462 # It will help us diagnose broken compilers, and finding out an intuition
1463 # of exeext.
1464 echo "$as_me:1464: checking for C compiler default output" >&5
1465 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1466 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1467 if { (eval echo "$as_me:1467: \"$ac_link_default\"") >&5
1468   (eval $ac_link_default) 2>&5
1469   ac_status=$?
1470   echo "$as_me:1470: \$? = $ac_status" >&5
1471   (exit $ac_status); }; then
1472   # Find the output, starting from the most likely.  This scheme is
1473 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1474 # resort.
1475 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1476                 ls a.out conftest 2>/dev/null;
1477                 ls a.* conftest.* 2>/dev/null`; do
1478   case $ac_file in
1479     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1480     a.out ) # We found the default executable, but exeext='' is most
1481             # certainly right.
1482             break;;
1483     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1484           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1485           export ac_cv_exeext
1486           break;;
1487     * ) break;;
1488   esac
1489 done
1490 else
1491   echo "$as_me: failed program was:" >&5
1492 cat conftest.$ac_ext >&5
1493 { { echo "$as_me:1493: error: C compiler cannot create executables" >&5
1494 echo "$as_me: error: C compiler cannot create executables" >&2;}
1495    { (exit 77); exit 77; }; }
1496 fi
1497
1498 ac_exeext=$ac_cv_exeext
1499 echo "$as_me:1499: result: $ac_file" >&5
1500 echo "${ECHO_T}$ac_file" >&6
1501
1502 # Check the compiler produces executables we can run.  If not, either
1503 # the compiler is broken, or we cross compile.
1504 echo "$as_me:1504: checking whether the C compiler works" >&5
1505 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1506 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1507 # If not cross compiling, check that we can run a simple program.
1508 if test "$cross_compiling" != yes; then
1509   if { ac_try='./$ac_file'
1510   { (eval echo "$as_me:1510: \"$ac_try\"") >&5
1511   (eval $ac_try) 2>&5
1512   ac_status=$?
1513   echo "$as_me:1513: \$? = $ac_status" >&5
1514   (exit $ac_status); }; }; then
1515     cross_compiling=no
1516   else
1517     if test "$cross_compiling" = maybe; then
1518         cross_compiling=yes
1519     else
1520         { { echo "$as_me:1520: error: cannot run C compiled programs.
1521 If you meant to cross compile, use \`--host'." >&5
1522 echo "$as_me: error: cannot run C compiled programs.
1523 If you meant to cross compile, use \`--host'." >&2;}
1524    { (exit 1); exit 1; }; }
1525     fi
1526   fi
1527 fi
1528 echo "$as_me:1528: result: yes" >&5
1529 echo "${ECHO_T}yes" >&6
1530
1531 rm -f a.out a.exe conftest$ac_cv_exeext
1532 ac_clean_files=$ac_clean_files_save
1533 # Check the compiler produces executables we can run.  If not, either
1534 # the compiler is broken, or we cross compile.
1535 echo "$as_me:1535: checking whether we are cross compiling" >&5
1536 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1537 echo "$as_me:1537: result: $cross_compiling" >&5
1538 echo "${ECHO_T}$cross_compiling" >&6
1539
1540 echo "$as_me:1540: checking for executable suffix" >&5
1541 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1542 if { (eval echo "$as_me:1542: \"$ac_link\"") >&5
1543   (eval $ac_link) 2>&5
1544   ac_status=$?
1545   echo "$as_me:1545: \$? = $ac_status" >&5
1546   (exit $ac_status); }; then
1547   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1548 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1549 # work properly (i.e., refer to `conftest.exe'), while it won't with
1550 # `rm'.
1551 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1552   case $ac_file in
1553     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1554     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1555           export ac_cv_exeext
1556           break;;
1557     * ) break;;
1558   esac
1559 done
1560 else
1561   { { echo "$as_me:1561: error: cannot compute EXEEXT: cannot compile and link" >&5
1562 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1563    { (exit 1); exit 1; }; }
1564 fi
1565
1566 rm -f conftest$ac_cv_exeext
1567 echo "$as_me:1567: result: $ac_cv_exeext" >&5
1568 echo "${ECHO_T}$ac_cv_exeext" >&6
1569
1570 rm -f conftest.$ac_ext
1571 EXEEXT=$ac_cv_exeext
1572 ac_exeext=$EXEEXT
1573 echo "$as_me:1573: checking for object suffix" >&5
1574 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1575 if test "${ac_cv_objext+set}" = set; then
1576   echo $ECHO_N "(cached) $ECHO_C" >&6
1577 else
1578   cat >conftest.$ac_ext <<_ACEOF
1579 #line 1579 "configure"
1580 #include "confdefs.h"
1581
1582 int
1583 main ()
1584 {
1585
1586   ;
1587   return 0;
1588 }
1589 _ACEOF
1590 rm -f conftest.o conftest.obj
1591 if { (eval echo "$as_me:1591: \"$ac_compile\"") >&5
1592   (eval $ac_compile) 2>&5
1593   ac_status=$?
1594   echo "$as_me:1594: \$? = $ac_status" >&5
1595   (exit $ac_status); }; then
1596   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1597   case $ac_file in
1598     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1599     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1600        break;;
1601   esac
1602 done
1603 else
1604   echo "$as_me: failed program was:" >&5
1605 cat conftest.$ac_ext >&5
1606 { { echo "$as_me:1606: error: cannot compute OBJEXT: cannot compile" >&5
1607 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1608    { (exit 1); exit 1; }; }
1609 fi
1610
1611 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1612 fi
1613 echo "$as_me:1613: result: $ac_cv_objext" >&5
1614 echo "${ECHO_T}$ac_cv_objext" >&6
1615 OBJEXT=$ac_cv_objext
1616 ac_objext=$OBJEXT
1617 echo "$as_me:1617: checking whether we are using the GNU C compiler" >&5
1618 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1619 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   cat >conftest.$ac_ext <<_ACEOF
1623 #line 1623 "configure"
1624 #include "confdefs.h"
1625
1626 int
1627 main ()
1628 {
1629 #ifndef __GNUC__
1630        choke me
1631 #endif
1632
1633   ;
1634   return 0;
1635 }
1636 _ACEOF
1637 rm -f conftest.$ac_objext
1638 if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
1639   (eval $ac_compile) 2>&5
1640   ac_status=$?
1641   echo "$as_me:1641: \$? = $ac_status" >&5
1642   (exit $ac_status); } &&
1643          { ac_try='test -s conftest.$ac_objext'
1644   { (eval echo "$as_me:1644: \"$ac_try\"") >&5
1645   (eval $ac_try) 2>&5
1646   ac_status=$?
1647   echo "$as_me:1647: \$? = $ac_status" >&5
1648   (exit $ac_status); }; }; then
1649   ac_compiler_gnu=yes
1650 else
1651   echo "$as_me: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
1653 ac_compiler_gnu=no
1654 fi
1655 rm -f conftest.$ac_objext conftest.$ac_ext
1656 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1657
1658 fi
1659 echo "$as_me:1659: result: $ac_cv_c_compiler_gnu" >&5
1660 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1661 GCC=`test $ac_compiler_gnu = yes && echo yes`
1662 ac_test_CFLAGS=${CFLAGS+set}
1663 ac_save_CFLAGS=$CFLAGS
1664 CFLAGS="-g"
1665 echo "$as_me:1665: checking whether $CC accepts -g" >&5
1666 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1667 if test "${ac_cv_prog_cc_g+set}" = set; then
1668   echo $ECHO_N "(cached) $ECHO_C" >&6
1669 else
1670   cat >conftest.$ac_ext <<_ACEOF
1671 #line 1671 "configure"
1672 #include "confdefs.h"
1673
1674 int
1675 main ()
1676 {
1677
1678   ;
1679   return 0;
1680 }
1681 _ACEOF
1682 rm -f conftest.$ac_objext
1683 if { (eval echo "$as_me:1683: \"$ac_compile\"") >&5
1684   (eval $ac_compile) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); } &&
1688          { ac_try='test -s conftest.$ac_objext'
1689   { (eval echo "$as_me:1689: \"$ac_try\"") >&5
1690   (eval $ac_try) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }; }; then
1694   ac_cv_prog_cc_g=yes
1695 else
1696   echo "$as_me: failed program was:" >&5
1697 cat conftest.$ac_ext >&5
1698 ac_cv_prog_cc_g=no
1699 fi
1700 rm -f conftest.$ac_objext conftest.$ac_ext
1701 fi
1702 echo "$as_me:1702: result: $ac_cv_prog_cc_g" >&5
1703 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1704 if test "$ac_test_CFLAGS" = set; then
1705   CFLAGS=$ac_save_CFLAGS
1706 elif test $ac_cv_prog_cc_g = yes; then
1707   if test "$GCC" = yes; then
1708     CFLAGS="-g -O2"
1709   else
1710     CFLAGS="-g"
1711   fi
1712 else
1713   if test "$GCC" = yes; then
1714     CFLAGS="-O2"
1715   else
1716     CFLAGS=
1717   fi
1718 fi
1719 # Some people use a C++ compiler to compile C.  Since we use `exit',
1720 # in C++ we need to declare it.  In case someone uses the same compiler
1721 # for both compiling C and C++ we need to have the C++ compiler decide
1722 # the declaration of exit, since it's the most demanding environment.
1723 cat >conftest.$ac_ext <<_ACEOF
1724 #ifndef __cplusplus
1725   choke me
1726 #endif
1727 _ACEOF
1728 rm -f conftest.$ac_objext
1729 if { (eval echo "$as_me:1729: \"$ac_compile\"") >&5
1730   (eval $ac_compile) 2>&5
1731   ac_status=$?
1732   echo "$as_me:1732: \$? = $ac_status" >&5
1733   (exit $ac_status); } &&
1734          { ac_try='test -s conftest.$ac_objext'
1735   { (eval echo "$as_me:1735: \"$ac_try\"") >&5
1736   (eval $ac_try) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; }; then
1740   for ac_declaration in \
1741    ''\
1742    '#include <stdlib.h>' \
1743    'extern "C" void std::exit (int) throw (); using std::exit;' \
1744    'extern "C" void std::exit (int); using std::exit;' \
1745    'extern "C" void exit (int) throw ();' \
1746    'extern "C" void exit (int);' \
1747    'void exit (int);'
1748 do
1749   cat >conftest.$ac_ext <<_ACEOF
1750 #line 1750 "configure"
1751 #include "confdefs.h"
1752 #include <stdlib.h>
1753 $ac_declaration
1754 int
1755 main ()
1756 {
1757 exit (42);
1758   ;
1759   return 0;
1760 }
1761 _ACEOF
1762 rm -f conftest.$ac_objext
1763 if { (eval echo "$as_me:1763: \"$ac_compile\"") >&5
1764   (eval $ac_compile) 2>&5
1765   ac_status=$?
1766   echo "$as_me:1766: \$? = $ac_status" >&5
1767   (exit $ac_status); } &&
1768          { ac_try='test -s conftest.$ac_objext'
1769   { (eval echo "$as_me:1769: \"$ac_try\"") >&5
1770   (eval $ac_try) 2>&5
1771   ac_status=$?
1772   echo "$as_me:1772: \$? = $ac_status" >&5
1773   (exit $ac_status); }; }; then
1774   :
1775 else
1776   echo "$as_me: failed program was:" >&5
1777 cat conftest.$ac_ext >&5
1778 continue
1779 fi
1780 rm -f conftest.$ac_objext conftest.$ac_ext
1781   cat >conftest.$ac_ext <<_ACEOF
1782 #line 1782 "configure"
1783 #include "confdefs.h"
1784 $ac_declaration
1785 int
1786 main ()
1787 {
1788 exit (42);
1789   ;
1790   return 0;
1791 }
1792 _ACEOF
1793 rm -f conftest.$ac_objext
1794 if { (eval echo "$as_me:1794: \"$ac_compile\"") >&5
1795   (eval $ac_compile) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); } &&
1799          { ac_try='test -s conftest.$ac_objext'
1800   { (eval echo "$as_me:1800: \"$ac_try\"") >&5
1801   (eval $ac_try) 2>&5
1802   ac_status=$?
1803   echo "$as_me:1803: \$? = $ac_status" >&5
1804   (exit $ac_status); }; }; then
1805   break
1806 else
1807   echo "$as_me: failed program was:" >&5
1808 cat conftest.$ac_ext >&5
1809 fi
1810 rm -f conftest.$ac_objext conftest.$ac_ext
1811 done
1812 rm -rf conftest*
1813 if test -n "$ac_declaration"; then
1814   echo '#ifdef __cplusplus' >>confdefs.h
1815   echo $ac_declaration      >>confdefs.h
1816   echo '#endif'             >>confdefs.h
1817 fi
1818
1819 else
1820   echo "$as_me: failed program was:" >&5
1821 cat conftest.$ac_ext >&5
1822 fi
1823 rm -f conftest.$ac_objext conftest.$ac_ext
1824 ac_ext=c
1825 ac_cpp='$CPP $CPPFLAGS'
1826 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1827 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1828 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1829 ac_main_return=return
1830
1831 GCC_VERSION=none
1832 if test "$GCC" = yes ; then
1833         echo "$as_me:1833: checking version of $CC" >&5
1834 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1835         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1836         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1837         echo "$as_me:1837: result: $GCC_VERSION" >&5
1838 echo "${ECHO_T}$GCC_VERSION" >&6
1839 fi
1840
1841 echo "$as_me:1841: checking for $CC option to accept ANSI C" >&5
1842 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1843 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1844   echo $ECHO_N "(cached) $ECHO_C" >&6
1845 else
1846   ac_cv_prog_cc_stdc=no
1847 ac_save_CC=$CC
1848 cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851 #include <stdarg.h>
1852 #include <stdio.h>
1853 #include <sys/types.h>
1854 #include <sys/stat.h>
1855 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1856 struct buf { int x; };
1857 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1858 static char *e (p, i)
1859      char **p;
1860      int i;
1861 {
1862   return p[i];
1863 }
1864 static char *f (char * (*g) (char **, int), char **p, ...)
1865 {
1866   char *s;
1867   va_list v;
1868   va_start (v,p);
1869   s = g (p, va_arg (v,int));
1870   va_end (v);
1871   return s;
1872 }
1873 int test (int i, double x);
1874 struct s1 {int (*f) (int a);};
1875 struct s2 {int (*f) (double a);};
1876 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1877 int argc;
1878 char **argv;
1879 int
1880 main ()
1881 {
1882 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1883   ;
1884   return 0;
1885 }
1886 _ACEOF
1887 # Don't try gcc -ansi; that turns off useful extensions and
1888 # breaks some systems' header files.
1889 # AIX                   -qlanglvl=ansi
1890 # Ultrix and OSF/1      -std1
1891 # HP-UX 10.20 and later -Ae
1892 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1893 # SVR4                  -Xc -D__EXTENSIONS__
1894 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1895 do
1896   CC="$ac_save_CC $ac_arg"
1897   rm -f conftest.$ac_objext
1898 if { (eval echo "$as_me:1898: \"$ac_compile\"") >&5
1899   (eval $ac_compile) 2>&5
1900   ac_status=$?
1901   echo "$as_me:1901: \$? = $ac_status" >&5
1902   (exit $ac_status); } &&
1903          { ac_try='test -s conftest.$ac_objext'
1904   { (eval echo "$as_me:1904: \"$ac_try\"") >&5
1905   (eval $ac_try) 2>&5
1906   ac_status=$?
1907   echo "$as_me:1907: \$? = $ac_status" >&5
1908   (exit $ac_status); }; }; then
1909   ac_cv_prog_cc_stdc=$ac_arg
1910 break
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 fi
1915 rm -f conftest.$ac_objext
1916 done
1917 rm -f conftest.$ac_ext conftest.$ac_objext
1918 CC=$ac_save_CC
1919
1920 fi
1921
1922 case "x$ac_cv_prog_cc_stdc" in
1923   x|xno)
1924     echo "$as_me:1924: result: none needed" >&5
1925 echo "${ECHO_T}none needed" >&6 ;;
1926   *)
1927     echo "$as_me:1927: result: $ac_cv_prog_cc_stdc" >&5
1928 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1929     CC="$CC $ac_cv_prog_cc_stdc" ;;
1930 esac
1931
1932 # This should have been defined by AC_PROG_CC
1933 : ${CC:=cc}
1934
1935 echo "$as_me:1935: checking \$CC variable" >&5
1936 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1937 case "$CC" in #(vi
1938 *[\ \   ]-[IUD]*)
1939         echo "$as_me:1939: result: broken" >&5
1940 echo "${ECHO_T}broken" >&6
1941         { echo "$as_me:1941: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1942 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1943         # humor him...
1944         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
1945         CC=`echo "$CC" | sed -e 's/[    ].*//'`
1946
1947 cf_fix_cppflags=no
1948 cf_new_cflags=
1949 cf_new_cppflags=
1950 cf_new_extra_cppflags=
1951
1952 for cf_add_cflags in $cf_flags
1953 do
1954 case $cf_fix_cppflags in
1955 no)
1956         case $cf_add_cflags in #(vi
1957         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1958                 case $cf_add_cflags in
1959                 -D*)
1960                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1961
1962                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1963                                 && test -z "${cf_tst_cflags}" \
1964                                 && cf_fix_cppflags=yes
1965
1966                         if test $cf_fix_cppflags = yes ; then
1967                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1968                                 continue
1969                         elif test "${cf_tst_cflags}" = "\"'" ; then
1970                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1971                                 continue
1972                         fi
1973                         ;;
1974                 esac
1975                 case "$CPPFLAGS" in
1976                 *$cf_add_cflags) #(vi
1977                         ;;
1978                 *) #(vi
1979                         case $cf_add_cflags in #(vi
1980                         -D*)
1981                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1982
1983 CPPFLAGS=`echo "$CPPFLAGS" | \
1984         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
1985                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
1986
1987                                 ;;
1988                         esac
1989                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1990                         ;;
1991                 esac
1992                 ;;
1993         *)
1994                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1995                 ;;
1996         esac
1997         ;;
1998 yes)
1999         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2000
2001         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2002
2003         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2004                 && test -z "${cf_tst_cflags}" \
2005                 && cf_fix_cppflags=no
2006         ;;
2007 esac
2008 done
2009
2010 if test -n "$cf_new_cflags" ; then
2011
2012         CFLAGS="$CFLAGS $cf_new_cflags"
2013 fi
2014
2015 if test -n "$cf_new_cppflags" ; then
2016
2017         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2018 fi
2019
2020 if test -n "$cf_new_extra_cppflags" ; then
2021
2022         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2023 fi
2024
2025         ;;
2026 *)
2027         echo "$as_me:2027: result: ok" >&5
2028 echo "${ECHO_T}ok" >&6
2029         ;;
2030 esac
2031
2032 ac_ext=c
2033 ac_cpp='$CPP $CPPFLAGS'
2034 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2035 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2036 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2037 ac_main_return=return
2038 echo "$as_me:2038: checking how to run the C preprocessor" >&5
2039 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2040 # On Suns, sometimes $CPP names a directory.
2041 if test -n "$CPP" && test -d "$CPP"; then
2042   CPP=
2043 fi
2044 if test -z "$CPP"; then
2045   if test "${ac_cv_prog_CPP+set}" = set; then
2046   echo $ECHO_N "(cached) $ECHO_C" >&6
2047 else
2048       # Double quotes because CPP needs to be expanded
2049     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2050     do
2051       ac_preproc_ok=false
2052 for ac_c_preproc_warn_flag in '' yes
2053 do
2054   # Use a header file that comes with gcc, so configuring glibc
2055   # with a fresh cross-compiler works.
2056   # On the NeXT, cc -E runs the code through the compiler's parser,
2057   # not just through cpp. "Syntax error" is here to catch this case.
2058   cat >conftest.$ac_ext <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2061 #include <assert.h>
2062                      Syntax error
2063 _ACEOF
2064 if { (eval echo "$as_me:2064: \"$ac_cpp conftest.$ac_ext\"") >&5
2065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2066   ac_status=$?
2067   egrep -v '^ *\+' conftest.er1 >conftest.err
2068   rm -f conftest.er1
2069   cat conftest.err >&5
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } >/dev/null; then
2072   if test -s conftest.err; then
2073     ac_cpp_err=$ac_c_preproc_warn_flag
2074   else
2075     ac_cpp_err=
2076   fi
2077 else
2078   ac_cpp_err=yes
2079 fi
2080 if test -z "$ac_cpp_err"; then
2081   :
2082 else
2083   echo "$as_me: failed program was:" >&5
2084   cat conftest.$ac_ext >&5
2085   # Broken: fails on valid input.
2086 continue
2087 fi
2088 rm -f conftest.err conftest.$ac_ext
2089
2090   # OK, works on sane cases.  Now check whether non-existent headers
2091   # can be detected and how.
2092   cat >conftest.$ac_ext <<_ACEOF
2093 #line 2093 "configure"
2094 #include "confdefs.h"
2095 #include <ac_nonexistent.h>
2096 _ACEOF
2097 if { (eval echo "$as_me:2097: \"$ac_cpp conftest.$ac_ext\"") >&5
2098   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2099   ac_status=$?
2100   egrep -v '^ *\+' conftest.er1 >conftest.err
2101   rm -f conftest.er1
2102   cat conftest.err >&5
2103   echo "$as_me:2103: \$? = $ac_status" >&5
2104   (exit $ac_status); } >/dev/null; then
2105   if test -s conftest.err; then
2106     ac_cpp_err=$ac_c_preproc_warn_flag
2107   else
2108     ac_cpp_err=
2109   fi
2110 else
2111   ac_cpp_err=yes
2112 fi
2113 if test -z "$ac_cpp_err"; then
2114   # Broken: success on invalid input.
2115 continue
2116 else
2117   echo "$as_me: failed program was:" >&5
2118   cat conftest.$ac_ext >&5
2119   # Passes both tests.
2120 ac_preproc_ok=:
2121 break
2122 fi
2123 rm -f conftest.err conftest.$ac_ext
2124
2125 done
2126 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2127 rm -f conftest.err conftest.$ac_ext
2128 if $ac_preproc_ok; then
2129   break
2130 fi
2131
2132     done
2133     ac_cv_prog_CPP=$CPP
2134
2135 fi
2136   CPP=$ac_cv_prog_CPP
2137 else
2138   ac_cv_prog_CPP=$CPP
2139 fi
2140 echo "$as_me:2140: result: $CPP" >&5
2141 echo "${ECHO_T}$CPP" >&6
2142 ac_preproc_ok=false
2143 for ac_c_preproc_warn_flag in '' yes
2144 do
2145   # Use a header file that comes with gcc, so configuring glibc
2146   # with a fresh cross-compiler works.
2147   # On the NeXT, cc -E runs the code through the compiler's parser,
2148   # not just through cpp. "Syntax error" is here to catch this case.
2149   cat >conftest.$ac_ext <<_ACEOF
2150 #line 2150 "configure"
2151 #include "confdefs.h"
2152 #include <assert.h>
2153                      Syntax error
2154 _ACEOF
2155 if { (eval echo "$as_me:2155: \"$ac_cpp conftest.$ac_ext\"") >&5
2156   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2157   ac_status=$?
2158   egrep -v '^ *\+' conftest.er1 >conftest.err
2159   rm -f conftest.er1
2160   cat conftest.err >&5
2161   echo "$as_me:2161: \$? = $ac_status" >&5
2162   (exit $ac_status); } >/dev/null; then
2163   if test -s conftest.err; then
2164     ac_cpp_err=$ac_c_preproc_warn_flag
2165   else
2166     ac_cpp_err=
2167   fi
2168 else
2169   ac_cpp_err=yes
2170 fi
2171 if test -z "$ac_cpp_err"; then
2172   :
2173 else
2174   echo "$as_me: failed program was:" >&5
2175   cat conftest.$ac_ext >&5
2176   # Broken: fails on valid input.
2177 continue
2178 fi
2179 rm -f conftest.err conftest.$ac_ext
2180
2181   # OK, works on sane cases.  Now check whether non-existent headers
2182   # can be detected and how.
2183   cat >conftest.$ac_ext <<_ACEOF
2184 #line 2184 "configure"
2185 #include "confdefs.h"
2186 #include <ac_nonexistent.h>
2187 _ACEOF
2188 if { (eval echo "$as_me:2188: \"$ac_cpp conftest.$ac_ext\"") >&5
2189   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2190   ac_status=$?
2191   egrep -v '^ *\+' conftest.er1 >conftest.err
2192   rm -f conftest.er1
2193   cat conftest.err >&5
2194   echo "$as_me:2194: \$? = $ac_status" >&5
2195   (exit $ac_status); } >/dev/null; then
2196   if test -s conftest.err; then
2197     ac_cpp_err=$ac_c_preproc_warn_flag
2198   else
2199     ac_cpp_err=
2200   fi
2201 else
2202   ac_cpp_err=yes
2203 fi
2204 if test -z "$ac_cpp_err"; then
2205   # Broken: success on invalid input.
2206 continue
2207 else
2208   echo "$as_me: failed program was:" >&5
2209   cat conftest.$ac_ext >&5
2210   # Passes both tests.
2211 ac_preproc_ok=:
2212 break
2213 fi
2214 rm -f conftest.err conftest.$ac_ext
2215
2216 done
2217 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2218 rm -f conftest.err conftest.$ac_ext
2219 if $ac_preproc_ok; then
2220   :
2221 else
2222   { { echo "$as_me:2222: error: C preprocessor \"$CPP\" fails sanity check" >&5
2223 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2224    { (exit 1); exit 1; }; }
2225 fi
2226
2227 ac_ext=c
2228 ac_cpp='$CPP $CPPFLAGS'
2229 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2230 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2231 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2232 ac_main_return=return
2233
2234 for ac_prog in mawk gawk nawk awk
2235 do
2236   # Extract the first word of "$ac_prog", so it can be a program name with args.
2237 set dummy $ac_prog; ac_word=$2
2238 echo "$as_me:2238: checking for $ac_word" >&5
2239 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2240 if test "${ac_cv_prog_AWK+set}" = set; then
2241   echo $ECHO_N "(cached) $ECHO_C" >&6
2242 else
2243   if test -n "$AWK"; then
2244   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2245 else
2246   ac_save_IFS=$IFS; IFS=$ac_path_separator
2247 ac_dummy="$PATH"
2248 for ac_dir in $ac_dummy; do
2249   IFS=$ac_save_IFS
2250   test -z "$ac_dir" && ac_dir=.
2251   $as_executable_p "$ac_dir/$ac_word" || continue
2252 ac_cv_prog_AWK="$ac_prog"
2253 echo "$as_me:2253: found $ac_dir/$ac_word" >&5
2254 break
2255 done
2256
2257 fi
2258 fi
2259 AWK=$ac_cv_prog_AWK
2260 if test -n "$AWK"; then
2261   echo "$as_me:2261: result: $AWK" >&5
2262 echo "${ECHO_T}$AWK" >&6
2263 else
2264   echo "$as_me:2264: result: no" >&5
2265 echo "${ECHO_T}no" >&6
2266 fi
2267
2268   test -n "$AWK" && break
2269 done
2270
2271 # Find a good install program.  We prefer a C program (faster),
2272 # so one script is as good as another.  But avoid the broken or
2273 # incompatible versions:
2274 # SysV /etc/install, /usr/sbin/install
2275 # SunOS /usr/etc/install
2276 # IRIX /sbin/install
2277 # AIX /bin/install
2278 # AmigaOS /C/install, which installs bootblocks on floppy discs
2279 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2280 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2281 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2282 # ./install, which can be erroneously created by make from ./install.sh.
2283 echo "$as_me:2283: checking for a BSD compatible install" >&5
2284 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2285 if test -z "$INSTALL"; then
2286 if test "${ac_cv_path_install+set}" = set; then
2287   echo $ECHO_N "(cached) $ECHO_C" >&6
2288 else
2289     ac_save_IFS=$IFS; IFS=$ac_path_separator
2290   for ac_dir in $PATH; do
2291     IFS=$ac_save_IFS
2292     # Account for people who put trailing slashes in PATH elements.
2293     case $ac_dir/ in
2294     / | ./ | .// | /cC/* \
2295     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2296     | /usr/ucb/* ) ;;
2297     *)
2298       # OSF1 and SCO ODT 3.0 have their own names for install.
2299       # Don't use installbsd from OSF since it installs stuff as root
2300       # by default.
2301       for ac_prog in ginstall scoinst install; do
2302         if $as_executable_p "$ac_dir/$ac_prog"; then
2303           if test $ac_prog = install &&
2304             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2305             # AIX install.  It has an incompatible calling convention.
2306             :
2307           elif test $ac_prog = install &&
2308             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2309             # program-specific install script used by HP pwplus--don't use.
2310             :
2311           else
2312             ac_cv_path_install="$ac_dir/$ac_prog -c"
2313             break 2
2314           fi
2315         fi
2316       done
2317       ;;
2318     esac
2319   done
2320
2321 fi
2322   if test "${ac_cv_path_install+set}" = set; then
2323     INSTALL=$ac_cv_path_install
2324   else
2325     # As a last resort, use the slow shell script.  We don't cache a
2326     # path for INSTALL within a source directory, because that will
2327     # break other packages using the cache if that directory is
2328     # removed, or if the path is relative.
2329     INSTALL=$ac_install_sh
2330   fi
2331 fi
2332 echo "$as_me:2332: result: $INSTALL" >&5
2333 echo "${ECHO_T}$INSTALL" >&6
2334
2335 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2336 # It thinks the first close brace ends the variable substitution.
2337 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2338
2339 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2340
2341 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2342
2343 case $INSTALL in
2344 /*)
2345   ;;
2346 *)
2347   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2348   test -z "$cf_dir" && cf_dir=.
2349   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2350   ;;
2351 esac
2352
2353 for ac_prog in tdlint lint alint splint lclint
2354 do
2355   # Extract the first word of "$ac_prog", so it can be a program name with args.
2356 set dummy $ac_prog; ac_word=$2
2357 echo "$as_me:2357: checking for $ac_word" >&5
2358 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2359 if test "${ac_cv_prog_LINT+set}" = set; then
2360   echo $ECHO_N "(cached) $ECHO_C" >&6
2361 else
2362   if test -n "$LINT"; then
2363   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2364 else
2365   ac_save_IFS=$IFS; IFS=$ac_path_separator
2366 ac_dummy="$PATH"
2367 for ac_dir in $ac_dummy; do
2368   IFS=$ac_save_IFS
2369   test -z "$ac_dir" && ac_dir=.
2370   $as_executable_p "$ac_dir/$ac_word" || continue
2371 ac_cv_prog_LINT="$ac_prog"
2372 echo "$as_me:2372: found $ac_dir/$ac_word" >&5
2373 break
2374 done
2375
2376 fi
2377 fi
2378 LINT=$ac_cv_prog_LINT
2379 if test -n "$LINT"; then
2380   echo "$as_me:2380: result: $LINT" >&5
2381 echo "${ECHO_T}$LINT" >&6
2382 else
2383   echo "$as_me:2383: result: no" >&5
2384 echo "${ECHO_T}no" >&6
2385 fi
2386
2387   test -n "$LINT" && break
2388 done
2389
2390 echo "$as_me:2390: checking if filesystem supports mixed-case filenames" >&5
2391 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2392 if test "${cf_cv_mixedcase+set}" = set; then
2393   echo $ECHO_N "(cached) $ECHO_C" >&6
2394 else
2395
2396 if test "$cross_compiling" = yes ; then
2397         case $target_alias in #(vi
2398         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
2399                 cf_cv_mixedcase=no
2400                 ;;
2401         *)
2402                 cf_cv_mixedcase=yes
2403                 ;;
2404         esac
2405 else
2406         rm -f conftest CONFTEST
2407         echo test >conftest
2408         if test -f CONFTEST ; then
2409                 cf_cv_mixedcase=no
2410         else
2411                 cf_cv_mixedcase=yes
2412         fi
2413         rm -f conftest CONFTEST
2414 fi
2415
2416 fi
2417 echo "$as_me:2417: result: $cf_cv_mixedcase" >&5
2418 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2419 test "$cf_cv_mixedcase" = yes &&
2420 cat >>confdefs.h <<\EOF
2421 #define MIXEDCASE_FILENAMES 1
2422 EOF
2423
2424 for ac_prog in exctags ctags
2425 do
2426   # Extract the first word of "$ac_prog", so it can be a program name with args.
2427 set dummy $ac_prog; ac_word=$2
2428 echo "$as_me:2428: checking for $ac_word" >&5
2429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2430 if test "${ac_cv_prog_CTAGS+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433   if test -n "$CTAGS"; then
2434   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2435 else
2436   ac_save_IFS=$IFS; IFS=$ac_path_separator
2437 ac_dummy="$PATH"
2438 for ac_dir in $ac_dummy; do
2439   IFS=$ac_save_IFS
2440   test -z "$ac_dir" && ac_dir=.
2441   $as_executable_p "$ac_dir/$ac_word" || continue
2442 ac_cv_prog_CTAGS="$ac_prog"
2443 echo "$as_me:2443: found $ac_dir/$ac_word" >&5
2444 break
2445 done
2446
2447 fi
2448 fi
2449 CTAGS=$ac_cv_prog_CTAGS
2450 if test -n "$CTAGS"; then
2451   echo "$as_me:2451: result: $CTAGS" >&5
2452 echo "${ECHO_T}$CTAGS" >&6
2453 else
2454   echo "$as_me:2454: result: no" >&5
2455 echo "${ECHO_T}no" >&6
2456 fi
2457
2458   test -n "$CTAGS" && break
2459 done
2460
2461 for ac_prog in exetags etags
2462 do
2463   # Extract the first word of "$ac_prog", so it can be a program name with args.
2464 set dummy $ac_prog; ac_word=$2
2465 echo "$as_me:2465: checking for $ac_word" >&5
2466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2467 if test "${ac_cv_prog_ETAGS+set}" = set; then
2468   echo $ECHO_N "(cached) $ECHO_C" >&6
2469 else
2470   if test -n "$ETAGS"; then
2471   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2472 else
2473   ac_save_IFS=$IFS; IFS=$ac_path_separator
2474 ac_dummy="$PATH"
2475 for ac_dir in $ac_dummy; do
2476   IFS=$ac_save_IFS
2477   test -z "$ac_dir" && ac_dir=.
2478   $as_executable_p "$ac_dir/$ac_word" || continue
2479 ac_cv_prog_ETAGS="$ac_prog"
2480 echo "$as_me:2480: found $ac_dir/$ac_word" >&5
2481 break
2482 done
2483
2484 fi
2485 fi
2486 ETAGS=$ac_cv_prog_ETAGS
2487 if test -n "$ETAGS"; then
2488   echo "$as_me:2488: result: $ETAGS" >&5
2489 echo "${ECHO_T}$ETAGS" >&6
2490 else
2491   echo "$as_me:2491: result: no" >&5
2492 echo "${ECHO_T}no" >&6
2493 fi
2494
2495   test -n "$ETAGS" && break
2496 done
2497
2498 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2499 set dummy ${CTAGS:-ctags}; ac_word=$2
2500 echo "$as_me:2500: checking for $ac_word" >&5
2501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2502 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2503   echo $ECHO_N "(cached) $ECHO_C" >&6
2504 else
2505   if test -n "$MAKE_LOWER_TAGS"; then
2506   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2507 else
2508   ac_save_IFS=$IFS; IFS=$ac_path_separator
2509 ac_dummy="$PATH"
2510 for ac_dir in $ac_dummy; do
2511   IFS=$ac_save_IFS
2512   test -z "$ac_dir" && ac_dir=.
2513   $as_executable_p "$ac_dir/$ac_word" || continue
2514 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2515 echo "$as_me:2515: found $ac_dir/$ac_word" >&5
2516 break
2517 done
2518
2519   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2520 fi
2521 fi
2522 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2523 if test -n "$MAKE_LOWER_TAGS"; then
2524   echo "$as_me:2524: result: $MAKE_LOWER_TAGS" >&5
2525 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2526 else
2527   echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2529 fi
2530
2531 if test "$cf_cv_mixedcase" = yes ; then
2532         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2533 set dummy ${ETAGS:-etags}; ac_word=$2
2534 echo "$as_me:2534: checking for $ac_word" >&5
2535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2536 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2537   echo $ECHO_N "(cached) $ECHO_C" >&6
2538 else
2539   if test -n "$MAKE_UPPER_TAGS"; then
2540   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2541 else
2542   ac_save_IFS=$IFS; IFS=$ac_path_separator
2543 ac_dummy="$PATH"
2544 for ac_dir in $ac_dummy; do
2545   IFS=$ac_save_IFS
2546   test -z "$ac_dir" && ac_dir=.
2547   $as_executable_p "$ac_dir/$ac_word" || continue
2548 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2549 echo "$as_me:2549: found $ac_dir/$ac_word" >&5
2550 break
2551 done
2552
2553   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2554 fi
2555 fi
2556 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2557 if test -n "$MAKE_UPPER_TAGS"; then
2558   echo "$as_me:2558: result: $MAKE_UPPER_TAGS" >&5
2559 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2560 else
2561   echo "$as_me:2561: result: no" >&5
2562 echo "${ECHO_T}no" >&6
2563 fi
2564
2565 else
2566         MAKE_UPPER_TAGS=no
2567 fi
2568
2569 if test "$MAKE_UPPER_TAGS" = yes ; then
2570         MAKE_UPPER_TAGS=
2571 else
2572         MAKE_UPPER_TAGS="#"
2573 fi
2574
2575 if test "$MAKE_LOWER_TAGS" = yes ; then
2576         MAKE_LOWER_TAGS=
2577 else
2578         MAKE_LOWER_TAGS="#"
2579 fi
2580
2581 echo "$as_me:2581: checking if -lm needed for math functions" >&5
2582 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2583 if test "${cf_cv_need_libm+set}" = set; then
2584   echo $ECHO_N "(cached) $ECHO_C" >&6
2585 else
2586
2587         cat >conftest.$ac_ext <<_ACEOF
2588 #line 2588 "configure"
2589 #include "confdefs.h"
2590
2591         #include <stdio.h>
2592         #include <math.h>
2593
2594 int
2595 main ()
2596 {
2597 double x = rand(); printf("result = %g\n", pow(sin(x),x))
2598   ;
2599   return 0;
2600 }
2601 _ACEOF
2602 rm -f conftest.$ac_objext conftest$ac_exeext
2603 if { (eval echo "$as_me:2603: \"$ac_link\"") >&5
2604   (eval $ac_link) 2>&5
2605   ac_status=$?
2606   echo "$as_me:2606: \$? = $ac_status" >&5
2607   (exit $ac_status); } &&
2608          { ac_try='test -s conftest$ac_exeext'
2609   { (eval echo "$as_me:2609: \"$ac_try\"") >&5
2610   (eval $ac_try) 2>&5
2611   ac_status=$?
2612   echo "$as_me:2612: \$? = $ac_status" >&5
2613   (exit $ac_status); }; }; then
2614   cf_cv_need_libm=no
2615 else
2616   echo "$as_me: failed program was:" >&5
2617 cat conftest.$ac_ext >&5
2618 cf_cv_need_libm=yes
2619 fi
2620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2621 fi
2622 echo "$as_me:2622: result: $cf_cv_need_libm" >&5
2623 echo "${ECHO_T}$cf_cv_need_libm" >&6
2624 if test "$cf_cv_need_libm" = yes
2625 then
2626 MATH_LIB=-lm
2627 fi
2628
2629 top_builddir=`pwd`
2630
2631 CC_G_OPT="-g"
2632 CC_SHARED_OPTS=unknown
2633 CPPFLAGS="$CPPFLAGS"
2634 DFT_DEP_SUFFIX=""
2635 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2636 DFT_UPR_MODEL="NORMAL"
2637 LD="ld"
2638 LDFLAGS_SHARED=""
2639 LDFLAGS_STATIC=""
2640 LD_MODEL=""
2641 LD_SHARED_OPTS=""
2642 LIBTOOL=""
2643 LIB_CLEAN=""
2644 LIB_COMPILE=""
2645 LIB_LINK='${CC}'
2646 LINK_TESTS=""
2647 LOCAL_LDFLAGS=""
2648 PTHREAD="-lm"
2649 TEST_ARGS=""
2650 TEST_DEPS=""
2651 TEST_LIBS=""
2652 TINFO_LDFLAGS=''
2653 TINFO_LIBS='$(LIBS_CURSES)'
2654 cf_cv_abi_version=""
2655 cf_cv_rel_version=""
2656 includesubdir=""
2657
2658 cf_cv_screen=curses
2659 cf_cv_libtype=
2660
2661 if test "$GCC" = yes
2662 then
2663 cat > conftest.i <<EOF
2664 #ifndef GCC_PRINTF
2665 #define GCC_PRINTF 0
2666 #endif
2667 #ifndef GCC_SCANF
2668 #define GCC_SCANF 0
2669 #endif
2670 #ifndef GCC_NORETURN
2671 #define GCC_NORETURN /* nothing */
2672 #endif
2673 #ifndef GCC_UNUSED
2674 #define GCC_UNUSED /* nothing */
2675 #endif
2676 EOF
2677 if test "$GCC" = yes
2678 then
2679         { echo "$as_me:2679: checking for $CC __attribute__ directives..." >&5
2680 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2681 cat > conftest.$ac_ext <<EOF
2682 #line 2682 "${as_me:-configure}"
2683 #include "confdefs.h"
2684 #include "conftest.h"
2685 #include "conftest.i"
2686 #if     GCC_PRINTF
2687 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2688 #else
2689 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2690 #endif
2691 #if     GCC_SCANF
2692 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
2693 #else
2694 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
2695 #endif
2696 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2697 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2698 extern void foo(void) GCC_NORETURN;
2699 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2700 EOF
2701         cf_printf_attribute=no
2702         cf_scanf_attribute=no
2703         for cf_attribute in scanf printf unused noreturn
2704         do
2705
2706 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2707
2708                 cf_directive="__attribute__(($cf_attribute))"
2709                 echo "checking for $CC $cf_directive" 1>&5
2710
2711                 case $cf_attribute in #(vi
2712                 printf) #(vi
2713                         cf_printf_attribute=yes
2714                         cat >conftest.h <<EOF
2715 #define GCC_$cf_ATTRIBUTE 1
2716 EOF
2717                         ;;
2718                 scanf) #(vi
2719                         cf_scanf_attribute=yes
2720                         cat >conftest.h <<EOF
2721 #define GCC_$cf_ATTRIBUTE 1
2722 EOF
2723                         ;;
2724                 *) #(vi
2725                         cat >conftest.h <<EOF
2726 #define GCC_$cf_ATTRIBUTE $cf_directive
2727 EOF
2728                         ;;
2729                 esac
2730
2731                 if { (eval echo "$as_me:2731: \"$ac_compile\"") >&5
2732   (eval $ac_compile) 2>&5
2733   ac_status=$?
2734   echo "$as_me:2734: \$? = $ac_status" >&5
2735   (exit $ac_status); }; then
2736                         test -n "$verbose" && echo "$as_me:2736: result: ... $cf_attribute" >&5
2737 echo "${ECHO_T}... $cf_attribute" >&6
2738                         cat conftest.h >>confdefs.h
2739                         case $cf_attribute in #(vi
2740                         noreturn) #(vi
2741
2742 cat >>confdefs.h <<EOF
2743 #define GCC_NORETURN $cf_directive
2744 EOF
2745
2746                                 ;;
2747                         printf) #(vi
2748                                 cf_value='/* nothing */'
2749                                 if test "$cf_printf_attribute" != no ; then
2750                                         cf_value='__attribute__((format(printf,fmt,var)))'
2751
2752 cat >>confdefs.h <<\EOF
2753 #define GCC_PRINTF 1
2754 EOF
2755
2756                                 fi
2757
2758 cat >>confdefs.h <<EOF
2759 #define GCC_PRINTFLIKE(fmt,var) $cf_value
2760 EOF
2761
2762                                 ;;
2763                         scanf) #(vi
2764                                 cf_value='/* nothing */'
2765                                 if test "$cf_scanf_attribute" != no ; then
2766                                         cf_value='__attribute__((format(scanf,fmt,var)))'
2767
2768 cat >>confdefs.h <<\EOF
2769 #define GCC_SCANF 1
2770 EOF
2771
2772                                 fi
2773
2774 cat >>confdefs.h <<EOF
2775 #define GCC_SCANFLIKE(fmt,var) $cf_value
2776 EOF
2777
2778                                 ;;
2779                         unused) #(vi
2780
2781 cat >>confdefs.h <<EOF
2782 #define GCC_UNUSED $cf_directive
2783 EOF
2784
2785                                 ;;
2786                         esac
2787                 fi
2788         done
2789 else
2790         fgrep define conftest.i >>confdefs.h
2791 fi
2792 rm -rf conftest*
2793 fi
2794
2795 cf_XOPEN_SOURCE=500
2796 cf_POSIX_C_SOURCE=199506L
2797 cf_xopen_source=
2798
2799 case $host_os in #(vi
2800 aix[4-7]*) #(vi
2801         cf_xopen_source="-D_ALL_SOURCE"
2802         ;;
2803 cygwin|msys) #(vi
2804         cf_XOPEN_SOURCE=600
2805         ;;
2806 darwin[0-8].*) #(vi
2807         cf_xopen_source="-D_APPLE_C_SOURCE"
2808         ;;
2809 darwin*) #(vi
2810         cf_xopen_source="-D_DARWIN_C_SOURCE"
2811         cf_XOPEN_SOURCE=
2812         ;;
2813 freebsd*|dragonfly*) #(vi
2814         # 5.x headers associate
2815         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2816         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2817         cf_POSIX_C_SOURCE=200112L
2818         cf_XOPEN_SOURCE=600
2819         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2820         ;;
2821 hpux11*) #(vi
2822         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2823         ;;
2824 hpux*) #(vi
2825         cf_xopen_source="-D_HPUX_SOURCE"
2826         ;;
2827 irix[56].*) #(vi
2828         cf_xopen_source="-D_SGI_SOURCE"
2829         cf_XOPEN_SOURCE=
2830         ;;
2831 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2832
2833 echo "$as_me:2833: checking if we must define _GNU_SOURCE" >&5
2834 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2835 if test "${cf_cv_gnu_source+set}" = set; then
2836   echo $ECHO_N "(cached) $ECHO_C" >&6
2837 else
2838
2839 cat >conftest.$ac_ext <<_ACEOF
2840 #line 2840 "configure"
2841 #include "confdefs.h"
2842 #include <sys/types.h>
2843 int
2844 main ()
2845 {
2846
2847 #ifndef _XOPEN_SOURCE
2848 make an error
2849 #endif
2850   ;
2851   return 0;
2852 }
2853 _ACEOF
2854 rm -f conftest.$ac_objext
2855 if { (eval echo "$as_me:2855: \"$ac_compile\"") >&5
2856   (eval $ac_compile) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); } &&
2860          { ac_try='test -s conftest.$ac_objext'
2861   { (eval echo "$as_me:2861: \"$ac_try\"") >&5
2862   (eval $ac_try) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }; }; then
2866   cf_cv_gnu_source=no
2867 else
2868   echo "$as_me: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 cf_save="$CPPFLAGS"
2871          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2872          cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875 #include <sys/types.h>
2876 int
2877 main ()
2878 {
2879
2880 #ifdef _XOPEN_SOURCE
2881 make an error
2882 #endif
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:2888: \"$ac_compile\"") >&5
2889   (eval $ac_compile) 2>&5
2890   ac_status=$?
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -s conftest.$ac_objext'
2894   { (eval echo "$as_me:2894: \"$ac_try\"") >&5
2895   (eval $ac_try) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); }; }; then
2899   cf_cv_gnu_source=no
2900 else
2901   echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 cf_cv_gnu_source=yes
2904 fi
2905 rm -f conftest.$ac_objext conftest.$ac_ext
2906         CPPFLAGS="$cf_save"
2907
2908 fi
2909 rm -f conftest.$ac_objext conftest.$ac_ext
2910
2911 fi
2912 echo "$as_me:2912: result: $cf_cv_gnu_source" >&5
2913 echo "${ECHO_T}$cf_cv_gnu_source" >&6
2914 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2915
2916         ;;
2917 mirbsd*) #(vi
2918         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2919         cf_XOPEN_SOURCE=
2920
2921 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2922
2923 cf_save_CFLAGS="$CFLAGS"
2924 cf_save_CPPFLAGS="$CPPFLAGS"
2925
2926 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2927         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
2928                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
2929
2930 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2931         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
2932                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
2933
2934 echo "$as_me:2934: checking if we should define _POSIX_C_SOURCE" >&5
2935 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2936 if test "${cf_cv_posix_c_source+set}" = set; then
2937   echo $ECHO_N "(cached) $ECHO_C" >&6
2938 else
2939
2940 echo "${as_me:-configure}:2940: testing if the symbol is already defined go no further ..." 1>&5
2941
2942         cat >conftest.$ac_ext <<_ACEOF
2943 #line 2943 "configure"
2944 #include "confdefs.h"
2945 #include <sys/types.h>
2946 int
2947 main ()
2948 {
2949
2950 #ifndef _POSIX_C_SOURCE
2951 make an error
2952 #endif
2953   ;
2954   return 0;
2955 }
2956 _ACEOF
2957 rm -f conftest.$ac_objext
2958 if { (eval echo "$as_me:2958: \"$ac_compile\"") >&5
2959   (eval $ac_compile) 2>&5
2960   ac_status=$?
2961   echo "$as_me:2961: \$? = $ac_status" >&5
2962   (exit $ac_status); } &&
2963          { ac_try='test -s conftest.$ac_objext'
2964   { (eval echo "$as_me:2964: \"$ac_try\"") >&5
2965   (eval $ac_try) 2>&5
2966   ac_status=$?
2967   echo "$as_me:2967: \$? = $ac_status" >&5
2968   (exit $ac_status); }; }; then
2969   cf_cv_posix_c_source=no
2970 else
2971   echo "$as_me: failed program was:" >&5
2972 cat conftest.$ac_ext >&5
2973 cf_want_posix_source=no
2974          case .$cf_POSIX_C_SOURCE in #(vi
2975          .[12]??*) #(vi
2976                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2977                 ;;
2978          .2) #(vi
2979                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2980                 cf_want_posix_source=yes
2981                 ;;
2982          .*)
2983                 cf_want_posix_source=yes
2984                 ;;
2985          esac
2986          if test "$cf_want_posix_source" = yes ; then
2987                 cat >conftest.$ac_ext <<_ACEOF
2988 #line 2988 "configure"
2989 #include "confdefs.h"
2990 #include <sys/types.h>
2991 int
2992 main ()
2993 {
2994
2995 #ifdef _POSIX_SOURCE
2996 make an error
2997 #endif
2998   ;
2999   return 0;
3000 }
3001 _ACEOF
3002 rm -f conftest.$ac_objext
3003 if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5
3004   (eval $ac_compile) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); } &&
3008          { ac_try='test -s conftest.$ac_objext'
3009   { (eval echo "$as_me:3009: \"$ac_try\"") >&5
3010   (eval $ac_try) 2>&5
3011   ac_status=$?
3012   echo "$as_me:3012: \$? = $ac_status" >&5
3013   (exit $ac_status); }; }; then
3014   :
3015 else
3016   echo "$as_me: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3019 fi
3020 rm -f conftest.$ac_objext conftest.$ac_ext
3021          fi
3022
3023 echo "${as_me:-configure}:3023: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3024
3025          CFLAGS="$cf_trim_CFLAGS"
3026          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3027
3028 echo "${as_me:-configure}:3028: testing if the second compile does not leave our definition intact error ..." 1>&5
3029
3030          cat >conftest.$ac_ext <<_ACEOF
3031 #line 3031 "configure"
3032 #include "confdefs.h"
3033 #include <sys/types.h>
3034 int
3035 main ()
3036 {
3037
3038 #ifndef _POSIX_C_SOURCE
3039 make an error
3040 #endif
3041   ;
3042   return 0;
3043 }
3044 _ACEOF
3045 rm -f conftest.$ac_objext
3046 if { (eval echo "$as_me:3046: \"$ac_compile\"") >&5
3047   (eval $ac_compile) 2>&5
3048   ac_status=$?
3049   echo "$as_me:3049: \$? = $ac_status" >&5
3050   (exit $ac_status); } &&
3051          { ac_try='test -s conftest.$ac_objext'
3052   { (eval echo "$as_me:3052: \"$ac_try\"") >&5
3053   (eval $ac_try) 2>&5
3054   ac_status=$?
3055   echo "$as_me:3055: \$? = $ac_status" >&5
3056   (exit $ac_status); }; }; then
3057   :
3058 else
3059   echo "$as_me: failed program was:" >&5
3060 cat conftest.$ac_ext >&5
3061 cf_cv_posix_c_source=no
3062 fi
3063 rm -f conftest.$ac_objext conftest.$ac_ext
3064          CFLAGS="$cf_save_CFLAGS"
3065          CPPFLAGS="$cf_save_CPPFLAGS"
3066
3067 fi
3068 rm -f conftest.$ac_objext conftest.$ac_ext
3069
3070 fi
3071 echo "$as_me:3071: result: $cf_cv_posix_c_source" >&5
3072 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3073
3074 if test "$cf_cv_posix_c_source" != no ; then
3075         CFLAGS="$cf_trim_CFLAGS"
3076         CPPFLAGS="$cf_trim_CPPFLAGS"
3077
3078 cf_fix_cppflags=no
3079 cf_new_cflags=
3080 cf_new_cppflags=
3081 cf_new_extra_cppflags=
3082
3083 for cf_add_cflags in $cf_cv_posix_c_source
3084 do
3085 case $cf_fix_cppflags in
3086 no)
3087         case $cf_add_cflags in #(vi
3088         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3089                 case $cf_add_cflags in
3090                 -D*)
3091                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3092
3093                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3094                                 && test -z "${cf_tst_cflags}" \
3095                                 && cf_fix_cppflags=yes
3096
3097                         if test $cf_fix_cppflags = yes ; then
3098                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3099                                 continue
3100                         elif test "${cf_tst_cflags}" = "\"'" ; then
3101                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3102                                 continue
3103                         fi
3104                         ;;
3105                 esac
3106                 case "$CPPFLAGS" in
3107                 *$cf_add_cflags) #(vi
3108                         ;;
3109                 *) #(vi
3110                         case $cf_add_cflags in #(vi
3111                         -D*)
3112                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3113
3114 CPPFLAGS=`echo "$CPPFLAGS" | \
3115         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3116                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3117
3118                                 ;;
3119                         esac
3120                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3121                         ;;
3122                 esac
3123                 ;;
3124         *)
3125                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3126                 ;;
3127         esac
3128         ;;
3129 yes)
3130         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3131
3132         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3133
3134         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3135                 && test -z "${cf_tst_cflags}" \
3136                 && cf_fix_cppflags=no
3137         ;;
3138 esac
3139 done
3140
3141 if test -n "$cf_new_cflags" ; then
3142
3143         CFLAGS="$CFLAGS $cf_new_cflags"
3144 fi
3145
3146 if test -n "$cf_new_cppflags" ; then
3147
3148         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3149 fi
3150
3151 if test -n "$cf_new_extra_cppflags" ; then
3152
3153         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3154 fi
3155
3156 fi
3157
3158         ;;
3159 netbsd*) #(vi
3160         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3161         ;;
3162 openbsd[4-9]*) #(vi
3163         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3164         cf_xopen_source="-D_BSD_SOURCE"
3165         cf_XOPEN_SOURCE=600
3166         ;;
3167 openbsd*) #(vi
3168         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3169         ;;
3170 osf[45]*) #(vi
3171         cf_xopen_source="-D_OSF_SOURCE"
3172         ;;
3173 nto-qnx*) #(vi
3174         cf_xopen_source="-D_QNX_SOURCE"
3175         ;;
3176 sco*) #(vi
3177         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3178         ;;
3179 solaris2.*) #(vi
3180         cf_xopen_source="-D__EXTENSIONS__"
3181         cf_cv_xopen_source=broken
3182         ;;
3183 *)
3184
3185 echo "$as_me:3185: checking if we should define _XOPEN_SOURCE" >&5
3186 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3187 if test "${cf_cv_xopen_source+set}" = set; then
3188   echo $ECHO_N "(cached) $ECHO_C" >&6
3189 else
3190
3191         cat >conftest.$ac_ext <<_ACEOF
3192 #line 3192 "configure"
3193 #include "confdefs.h"
3194
3195 #include <stdlib.h>
3196 #include <string.h>
3197 #include <sys/types.h>
3198
3199 int
3200 main ()
3201 {
3202
3203 #ifndef _XOPEN_SOURCE
3204 make an error
3205 #endif
3206   ;
3207   return 0;
3208 }
3209 _ACEOF
3210 rm -f conftest.$ac_objext
3211 if { (eval echo "$as_me:3211: \"$ac_compile\"") >&5
3212   (eval $ac_compile) 2>&5
3213   ac_status=$?
3214   echo "$as_me:3214: \$? = $ac_status" >&5
3215   (exit $ac_status); } &&
3216          { ac_try='test -s conftest.$ac_objext'
3217   { (eval echo "$as_me:3217: \"$ac_try\"") >&5
3218   (eval $ac_try) 2>&5
3219   ac_status=$?
3220   echo "$as_me:3220: \$? = $ac_status" >&5
3221   (exit $ac_status); }; }; then
3222   cf_cv_xopen_source=no
3223 else
3224   echo "$as_me: failed program was:" >&5
3225 cat conftest.$ac_ext >&5
3226 cf_save="$CPPFLAGS"
3227          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3228          cat >conftest.$ac_ext <<_ACEOF
3229 #line 3229 "configure"
3230 #include "confdefs.h"
3231
3232 #include <stdlib.h>
3233 #include <string.h>
3234 #include <sys/types.h>
3235
3236 int
3237 main ()
3238 {
3239
3240 #ifdef _XOPEN_SOURCE
3241 make an error
3242 #endif
3243   ;
3244   return 0;
3245 }
3246 _ACEOF
3247 rm -f conftest.$ac_objext
3248 if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
3249   (eval $ac_compile) 2>&5
3250   ac_status=$?
3251   echo "$as_me:3251: \$? = $ac_status" >&5
3252   (exit $ac_status); } &&
3253          { ac_try='test -s conftest.$ac_objext'
3254   { (eval echo "$as_me:3254: \"$ac_try\"") >&5
3255   (eval $ac_try) 2>&5
3256   ac_status=$?
3257   echo "$as_me:3257: \$? = $ac_status" >&5
3258   (exit $ac_status); }; }; then
3259   cf_cv_xopen_source=no
3260 else
3261   echo "$as_me: failed program was:" >&5
3262 cat conftest.$ac_ext >&5
3263 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3264 fi
3265 rm -f conftest.$ac_objext conftest.$ac_ext
3266         CPPFLAGS="$cf_save"
3267
3268 fi
3269 rm -f conftest.$ac_objext conftest.$ac_ext
3270
3271 fi
3272 echo "$as_me:3272: result: $cf_cv_xopen_source" >&5
3273 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3274
3275 if test "$cf_cv_xopen_source" != no ; then
3276
3277 CFLAGS=`echo "$CFLAGS" | \
3278         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3279                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3280
3281 CPPFLAGS=`echo "$CPPFLAGS" | \
3282         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3283                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3284
3285         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3286
3287 cf_fix_cppflags=no
3288 cf_new_cflags=
3289 cf_new_cppflags=
3290 cf_new_extra_cppflags=
3291
3292 for cf_add_cflags in $cf_temp_xopen_source
3293 do
3294 case $cf_fix_cppflags in
3295 no)
3296         case $cf_add_cflags in #(vi
3297         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3298                 case $cf_add_cflags in
3299                 -D*)
3300                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3301
3302                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3303                                 && test -z "${cf_tst_cflags}" \
3304                                 && cf_fix_cppflags=yes
3305
3306                         if test $cf_fix_cppflags = yes ; then
3307                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3308                                 continue
3309                         elif test "${cf_tst_cflags}" = "\"'" ; then
3310                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3311                                 continue
3312                         fi
3313                         ;;
3314                 esac
3315                 case "$CPPFLAGS" in
3316                 *$cf_add_cflags) #(vi
3317                         ;;
3318                 *) #(vi
3319                         case $cf_add_cflags in #(vi
3320                         -D*)
3321                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3322
3323 CPPFLAGS=`echo "$CPPFLAGS" | \
3324         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3325                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3326
3327                                 ;;
3328                         esac
3329                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3330                         ;;
3331                 esac
3332                 ;;
3333         *)
3334                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3335                 ;;
3336         esac
3337         ;;
3338 yes)
3339         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3340
3341         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3342
3343         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3344                 && test -z "${cf_tst_cflags}" \
3345                 && cf_fix_cppflags=no
3346         ;;
3347 esac
3348 done
3349
3350 if test -n "$cf_new_cflags" ; then
3351
3352         CFLAGS="$CFLAGS $cf_new_cflags"
3353 fi
3354
3355 if test -n "$cf_new_cppflags" ; then
3356
3357         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3358 fi
3359
3360 if test -n "$cf_new_extra_cppflags" ; then
3361
3362         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3363 fi
3364
3365 fi
3366
3367 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3368
3369 cf_save_CFLAGS="$CFLAGS"
3370 cf_save_CPPFLAGS="$CPPFLAGS"
3371
3372 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3373         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3374                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3375
3376 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3377         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3378                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3379
3380 echo "$as_me:3380: checking if we should define _POSIX_C_SOURCE" >&5
3381 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3382 if test "${cf_cv_posix_c_source+set}" = set; then
3383   echo $ECHO_N "(cached) $ECHO_C" >&6
3384 else
3385
3386 echo "${as_me:-configure}:3386: testing if the symbol is already defined go no further ..." 1>&5
3387
3388         cat >conftest.$ac_ext <<_ACEOF
3389 #line 3389 "configure"
3390 #include "confdefs.h"
3391 #include <sys/types.h>
3392 int
3393 main ()
3394 {
3395
3396 #ifndef _POSIX_C_SOURCE
3397 make an error
3398 #endif
3399   ;
3400   return 0;
3401 }
3402 _ACEOF
3403 rm -f conftest.$ac_objext
3404 if { (eval echo "$as_me:3404: \"$ac_compile\"") >&5
3405   (eval $ac_compile) 2>&5
3406   ac_status=$?
3407   echo "$as_me:3407: \$? = $ac_status" >&5
3408   (exit $ac_status); } &&
3409          { ac_try='test -s conftest.$ac_objext'
3410   { (eval echo "$as_me:3410: \"$ac_try\"") >&5
3411   (eval $ac_try) 2>&5
3412   ac_status=$?
3413   echo "$as_me:3413: \$? = $ac_status" >&5
3414   (exit $ac_status); }; }; then
3415   cf_cv_posix_c_source=no
3416 else
3417   echo "$as_me: failed program was:" >&5
3418 cat conftest.$ac_ext >&5
3419 cf_want_posix_source=no
3420          case .$cf_POSIX_C_SOURCE in #(vi
3421          .[12]??*) #(vi
3422                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3423                 ;;
3424          .2) #(vi
3425                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3426                 cf_want_posix_source=yes
3427                 ;;
3428          .*)
3429                 cf_want_posix_source=yes
3430                 ;;
3431          esac
3432          if test "$cf_want_posix_source" = yes ; then
3433                 cat >conftest.$ac_ext <<_ACEOF
3434 #line 3434 "configure"
3435 #include "confdefs.h"
3436 #include <sys/types.h>
3437 int
3438 main ()
3439 {
3440
3441 #ifdef _POSIX_SOURCE
3442 make an error
3443 #endif
3444   ;
3445   return 0;
3446 }
3447 _ACEOF
3448 rm -f conftest.$ac_objext
3449 if { (eval echo "$as_me:3449: \"$ac_compile\"") >&5
3450   (eval $ac_compile) 2>&5
3451   ac_status=$?
3452   echo "$as_me:3452: \$? = $ac_status" >&5
3453   (exit $ac_status); } &&
3454          { ac_try='test -s conftest.$ac_objext'
3455   { (eval echo "$as_me:3455: \"$ac_try\"") >&5
3456   (eval $ac_try) 2>&5
3457   ac_status=$?
3458   echo "$as_me:3458: \$? = $ac_status" >&5
3459   (exit $ac_status); }; }; then
3460   :
3461 else
3462   echo "$as_me: failed program was:" >&5
3463 cat conftest.$ac_ext >&5
3464 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3465 fi
3466 rm -f conftest.$ac_objext conftest.$ac_ext
3467          fi
3468
3469 echo "${as_me:-configure}:3469: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3470
3471          CFLAGS="$cf_trim_CFLAGS"
3472          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3473
3474 echo "${as_me:-configure}:3474: testing if the second compile does not leave our definition intact error ..." 1>&5
3475
3476          cat >conftest.$ac_ext <<_ACEOF
3477 #line 3477 "configure"
3478 #include "confdefs.h"
3479 #include <sys/types.h>
3480 int
3481 main ()
3482 {
3483
3484 #ifndef _POSIX_C_SOURCE
3485 make an error
3486 #endif
3487   ;
3488   return 0;
3489 }
3490 _ACEOF
3491 rm -f conftest.$ac_objext
3492 if { (eval echo "$as_me:3492: \"$ac_compile\"") >&5
3493   (eval $ac_compile) 2>&5
3494   ac_status=$?
3495   echo "$as_me:3495: \$? = $ac_status" >&5
3496   (exit $ac_status); } &&
3497          { ac_try='test -s conftest.$ac_objext'
3498   { (eval echo "$as_me:3498: \"$ac_try\"") >&5
3499   (eval $ac_try) 2>&5
3500   ac_status=$?
3501   echo "$as_me:3501: \$? = $ac_status" >&5
3502   (exit $ac_status); }; }; then
3503   :
3504 else
3505   echo "$as_me: failed program was:" >&5
3506 cat conftest.$ac_ext >&5
3507 cf_cv_posix_c_source=no
3508 fi
3509 rm -f conftest.$ac_objext conftest.$ac_ext
3510          CFLAGS="$cf_save_CFLAGS"
3511          CPPFLAGS="$cf_save_CPPFLAGS"
3512
3513 fi
3514 rm -f conftest.$ac_objext conftest.$ac_ext
3515
3516 fi
3517 echo "$as_me:3517: result: $cf_cv_posix_c_source" >&5
3518 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3519
3520 if test "$cf_cv_posix_c_source" != no ; then
3521         CFLAGS="$cf_trim_CFLAGS"
3522         CPPFLAGS="$cf_trim_CPPFLAGS"
3523
3524 cf_fix_cppflags=no
3525 cf_new_cflags=
3526 cf_new_cppflags=
3527 cf_new_extra_cppflags=
3528
3529 for cf_add_cflags in $cf_cv_posix_c_source
3530 do
3531 case $cf_fix_cppflags in
3532 no)
3533         case $cf_add_cflags in #(vi
3534         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3535                 case $cf_add_cflags in
3536                 -D*)
3537                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3538
3539                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3540                                 && test -z "${cf_tst_cflags}" \
3541                                 && cf_fix_cppflags=yes
3542
3543                         if test $cf_fix_cppflags = yes ; then
3544                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3545                                 continue
3546                         elif test "${cf_tst_cflags}" = "\"'" ; then
3547                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3548                                 continue
3549                         fi
3550                         ;;
3551                 esac
3552                 case "$CPPFLAGS" in
3553                 *$cf_add_cflags) #(vi
3554                         ;;
3555                 *) #(vi
3556                         case $cf_add_cflags in #(vi
3557                         -D*)
3558                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3559
3560 CPPFLAGS=`echo "$CPPFLAGS" | \
3561         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3562                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3563
3564                                 ;;
3565                         esac
3566                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3567                         ;;
3568                 esac
3569                 ;;
3570         *)
3571                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3572                 ;;
3573         esac
3574         ;;
3575 yes)
3576         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3577
3578         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3579
3580         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3581                 && test -z "${cf_tst_cflags}" \
3582                 && cf_fix_cppflags=no
3583         ;;
3584 esac
3585 done
3586
3587 if test -n "$cf_new_cflags" ; then
3588
3589         CFLAGS="$CFLAGS $cf_new_cflags"
3590 fi
3591
3592 if test -n "$cf_new_cppflags" ; then
3593
3594         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3595 fi
3596
3597 if test -n "$cf_new_extra_cppflags" ; then
3598
3599         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3600 fi
3601
3602 fi
3603
3604         ;;
3605 esac
3606
3607 if test -n "$cf_xopen_source" ; then
3608
3609 cf_fix_cppflags=no
3610 cf_new_cflags=
3611 cf_new_cppflags=
3612 cf_new_extra_cppflags=
3613
3614 for cf_add_cflags in $cf_xopen_source
3615 do
3616 case $cf_fix_cppflags in
3617 no)
3618         case $cf_add_cflags in #(vi
3619         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3620                 case $cf_add_cflags in
3621                 -D*)
3622                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3623
3624                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3625                                 && test -z "${cf_tst_cflags}" \
3626                                 && cf_fix_cppflags=yes
3627
3628                         if test $cf_fix_cppflags = yes ; then
3629                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3630                                 continue
3631                         elif test "${cf_tst_cflags}" = "\"'" ; then
3632                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3633                                 continue
3634                         fi
3635                         ;;
3636                 esac
3637                 case "$CPPFLAGS" in
3638                 *$cf_add_cflags) #(vi
3639                         ;;
3640                 *) #(vi
3641                         case $cf_add_cflags in #(vi
3642                         -D*)
3643                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3644
3645 CPPFLAGS=`echo "$CPPFLAGS" | \
3646         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3647                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3648
3649                                 ;;
3650                         esac
3651                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3652                         ;;
3653                 esac
3654                 ;;
3655         *)
3656                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3657                 ;;
3658         esac
3659         ;;
3660 yes)
3661         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3662
3663         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3664
3665         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3666                 && test -z "${cf_tst_cflags}" \
3667                 && cf_fix_cppflags=no
3668         ;;
3669 esac
3670 done
3671
3672 if test -n "$cf_new_cflags" ; then
3673
3674         CFLAGS="$CFLAGS $cf_new_cflags"
3675 fi
3676
3677 if test -n "$cf_new_cppflags" ; then
3678
3679         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3680 fi
3681
3682 if test -n "$cf_new_extra_cppflags" ; then
3683
3684         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3685 fi
3686
3687 fi
3688
3689 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3690         echo "$as_me:3690: checking if _XOPEN_SOURCE really is set" >&5
3691 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3692         cat >conftest.$ac_ext <<_ACEOF
3693 #line 3693 "configure"
3694 #include "confdefs.h"
3695 #include <stdlib.h>
3696 int
3697 main ()
3698 {
3699
3700 #ifndef _XOPEN_SOURCE
3701 make an error
3702 #endif
3703   ;
3704   return 0;
3705 }
3706 _ACEOF
3707 rm -f conftest.$ac_objext
3708 if { (eval echo "$as_me:3708: \"$ac_compile\"") >&5
3709   (eval $ac_compile) 2>&5
3710   ac_status=$?
3711   echo "$as_me:3711: \$? = $ac_status" >&5
3712   (exit $ac_status); } &&
3713          { ac_try='test -s conftest.$ac_objext'
3714   { (eval echo "$as_me:3714: \"$ac_try\"") >&5
3715   (eval $ac_try) 2>&5
3716   ac_status=$?
3717   echo "$as_me:3717: \$? = $ac_status" >&5
3718   (exit $ac_status); }; }; then
3719   cf_XOPEN_SOURCE_set=yes
3720 else
3721   echo "$as_me: failed program was:" >&5
3722 cat conftest.$ac_ext >&5
3723 cf_XOPEN_SOURCE_set=no
3724 fi
3725 rm -f conftest.$ac_objext conftest.$ac_ext
3726         echo "$as_me:3726: result: $cf_XOPEN_SOURCE_set" >&5
3727 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3728         if test $cf_XOPEN_SOURCE_set = yes
3729         then
3730                 cat >conftest.$ac_ext <<_ACEOF
3731 #line 3731 "configure"
3732 #include "confdefs.h"
3733 #include <stdlib.h>
3734 int
3735 main ()
3736 {
3737
3738 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3739 make an error
3740 #endif
3741   ;
3742   return 0;
3743 }
3744 _ACEOF
3745 rm -f conftest.$ac_objext
3746 if { (eval echo "$as_me:3746: \"$ac_compile\"") >&5
3747   (eval $ac_compile) 2>&5
3748   ac_status=$?
3749   echo "$as_me:3749: \$? = $ac_status" >&5
3750   (exit $ac_status); } &&
3751          { ac_try='test -s conftest.$ac_objext'
3752   { (eval echo "$as_me:3752: \"$ac_try\"") >&5
3753   (eval $ac_try) 2>&5
3754   ac_status=$?
3755   echo "$as_me:3755: \$? = $ac_status" >&5
3756   (exit $ac_status); }; }; then
3757   cf_XOPEN_SOURCE_set_ok=yes
3758 else
3759   echo "$as_me: failed program was:" >&5
3760 cat conftest.$ac_ext >&5
3761 cf_XOPEN_SOURCE_set_ok=no
3762 fi
3763 rm -f conftest.$ac_objext conftest.$ac_ext
3764                 if test $cf_XOPEN_SOURCE_set_ok = no
3765                 then
3766                         { echo "$as_me:3766: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3767 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3768                 fi
3769         else
3770
3771 echo "$as_me:3771: checking if we should define _XOPEN_SOURCE" >&5
3772 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3773 if test "${cf_cv_xopen_source+set}" = set; then
3774   echo $ECHO_N "(cached) $ECHO_C" >&6
3775 else
3776
3777         cat >conftest.$ac_ext <<_ACEOF
3778 #line 3778 "configure"
3779 #include "confdefs.h"
3780
3781 #include <stdlib.h>
3782 #include <string.h>
3783 #include <sys/types.h>
3784
3785 int
3786 main ()
3787 {
3788
3789 #ifndef _XOPEN_SOURCE
3790 make an error
3791 #endif
3792   ;
3793   return 0;
3794 }
3795 _ACEOF
3796 rm -f conftest.$ac_objext
3797 if { (eval echo "$as_me:3797: \"$ac_compile\"") >&5
3798   (eval $ac_compile) 2>&5
3799   ac_status=$?
3800   echo "$as_me:3800: \$? = $ac_status" >&5
3801   (exit $ac_status); } &&
3802          { ac_try='test -s conftest.$ac_objext'
3803   { (eval echo "$as_me:3803: \"$ac_try\"") >&5
3804   (eval $ac_try) 2>&5
3805   ac_status=$?
3806   echo "$as_me:3806: \$? = $ac_status" >&5
3807   (exit $ac_status); }; }; then
3808   cf_cv_xopen_source=no
3809 else
3810   echo "$as_me: failed program was:" >&5
3811 cat conftest.$ac_ext >&5
3812 cf_save="$CPPFLAGS"
3813          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3814          cat >conftest.$ac_ext <<_ACEOF
3815 #line 3815 "configure"
3816 #include "confdefs.h"
3817
3818 #include <stdlib.h>
3819 #include <string.h>
3820 #include <sys/types.h>
3821
3822 int
3823 main ()
3824 {
3825
3826 #ifdef _XOPEN_SOURCE
3827 make an error
3828 #endif
3829   ;
3830   return 0;
3831 }
3832 _ACEOF
3833 rm -f conftest.$ac_objext
3834 if { (eval echo "$as_me:3834: \"$ac_compile\"") >&5
3835   (eval $ac_compile) 2>&5
3836   ac_status=$?
3837   echo "$as_me:3837: \$? = $ac_status" >&5
3838   (exit $ac_status); } &&
3839          { ac_try='test -s conftest.$ac_objext'
3840   { (eval echo "$as_me:3840: \"$ac_try\"") >&5
3841   (eval $ac_try) 2>&5
3842   ac_status=$?
3843   echo "$as_me:3843: \$? = $ac_status" >&5
3844   (exit $ac_status); }; }; then
3845   cf_cv_xopen_source=no
3846 else
3847   echo "$as_me: failed program was:" >&5
3848 cat conftest.$ac_ext >&5
3849 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3850 fi
3851 rm -f conftest.$ac_objext conftest.$ac_ext
3852         CPPFLAGS="$cf_save"
3853
3854 fi
3855 rm -f conftest.$ac_objext conftest.$ac_ext
3856
3857 fi
3858 echo "$as_me:3858: result: $cf_cv_xopen_source" >&5
3859 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3860
3861 if test "$cf_cv_xopen_source" != no ; then
3862
3863 CFLAGS=`echo "$CFLAGS" | \
3864         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3865                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3866
3867 CPPFLAGS=`echo "$CPPFLAGS" | \
3868         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
3869                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
3870
3871         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3872
3873 cf_fix_cppflags=no
3874 cf_new_cflags=
3875 cf_new_cppflags=
3876 cf_new_extra_cppflags=
3877
3878 for cf_add_cflags in $cf_temp_xopen_source
3879 do
3880 case $cf_fix_cppflags in
3881 no)
3882         case $cf_add_cflags in #(vi
3883         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3884                 case $cf_add_cflags in
3885                 -D*)
3886                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3887
3888                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3889                                 && test -z "${cf_tst_cflags}" \
3890                                 && cf_fix_cppflags=yes
3891
3892                         if test $cf_fix_cppflags = yes ; then
3893                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3894                                 continue
3895                         elif test "${cf_tst_cflags}" = "\"'" ; then
3896                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3897                                 continue
3898                         fi
3899                         ;;
3900                 esac
3901                 case "$CPPFLAGS" in
3902                 *$cf_add_cflags) #(vi
3903                         ;;
3904                 *) #(vi
3905                         case $cf_add_cflags in #(vi
3906                         -D*)
3907                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3908
3909 CPPFLAGS=`echo "$CPPFLAGS" | \
3910         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3911                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3912
3913                                 ;;
3914                         esac
3915                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3916                         ;;
3917                 esac
3918                 ;;
3919         *)
3920                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3921                 ;;
3922         esac
3923         ;;
3924 yes)
3925         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3926
3927         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3928
3929         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3930                 && test -z "${cf_tst_cflags}" \
3931                 && cf_fix_cppflags=no
3932         ;;
3933 esac
3934 done
3935
3936 if test -n "$cf_new_cflags" ; then
3937
3938         CFLAGS="$CFLAGS $cf_new_cflags"
3939 fi
3940
3941 if test -n "$cf_new_cppflags" ; then
3942
3943         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3944 fi
3945
3946 if test -n "$cf_new_extra_cppflags" ; then
3947
3948         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3949 fi
3950
3951 fi
3952
3953         fi
3954 fi
3955
3956 echo "$as_me:3956: checking for signal global datatype" >&5
3957 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3958 if test "${cf_cv_sig_atomic_t+set}" = set; then
3959   echo $ECHO_N "(cached) $ECHO_C" >&6
3960 else
3961
3962         for cf_type in \
3963                 "volatile sig_atomic_t" \
3964                 "sig_atomic_t" \
3965                 "int"
3966         do
3967         cat >conftest.$ac_ext <<_ACEOF
3968 #line 3968 "configure"
3969 #include "confdefs.h"
3970
3971 #include <sys/types.h>
3972 #include <signal.h>
3973 #include <stdio.h>
3974
3975 extern $cf_type x;
3976 $cf_type x;
3977 static void handler(int sig)
3978 {
3979         x = 5;
3980 }
3981 int
3982 main ()
3983 {
3984 signal(SIGINT, handler);
3985                  x = 1
3986   ;
3987   return 0;
3988 }
3989 _ACEOF
3990 rm -f conftest.$ac_objext
3991 if { (eval echo "$as_me:3991: \"$ac_compile\"") >&5
3992   (eval $ac_compile) 2>&5
3993   ac_status=$?
3994   echo "$as_me:3994: \$? = $ac_status" >&5
3995   (exit $ac_status); } &&
3996          { ac_try='test -s conftest.$ac_objext'
3997   { (eval echo "$as_me:3997: \"$ac_try\"") >&5
3998   (eval $ac_try) 2>&5
3999   ac_status=$?
4000   echo "$as_me:4000: \$? = $ac_status" >&5
4001   (exit $ac_status); }; }; then
4002   cf_cv_sig_atomic_t=$cf_type
4003 else
4004   echo "$as_me: failed program was:" >&5
4005 cat conftest.$ac_ext >&5
4006 cf_cv_sig_atomic_t=no
4007 fi
4008 rm -f conftest.$ac_objext conftest.$ac_ext
4009                 test "$cf_cv_sig_atomic_t" != no && break
4010         done
4011
4012 fi
4013
4014 echo "$as_me:4014: result: $cf_cv_sig_atomic_t" >&5
4015 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4016 test "$cf_cv_sig_atomic_t" != no &&
4017 cat >>confdefs.h <<EOF
4018 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4019 EOF
4020
4021 echo "$as_me:4021: checking if you want to use pkg-config" >&5
4022 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4023
4024 # Check whether --with-pkg-config or --without-pkg-config was given.
4025 if test "${with_pkg_config+set}" = set; then
4026   withval="$with_pkg_config"
4027   cf_pkg_config=$withval
4028 else
4029   cf_pkg_config=yes
4030 fi;
4031 echo "$as_me:4031: result: $cf_pkg_config" >&5
4032 echo "${ECHO_T}$cf_pkg_config" >&6
4033
4034 case $cf_pkg_config in #(vi
4035 no) #(vi
4036         PKG_CONFIG=none
4037         ;;
4038 yes) #(vi
4039
4040 if test -n "$ac_tool_prefix"; then
4041   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4042 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4043 echo "$as_me:4043: checking for $ac_word" >&5
4044 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4045 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4046   echo $ECHO_N "(cached) $ECHO_C" >&6
4047 else
4048   case $PKG_CONFIG in
4049   [\\/]* | ?:[\\/]*)
4050   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4051   ;;
4052   *)
4053   ac_save_IFS=$IFS; IFS=$ac_path_separator
4054 ac_dummy="$PATH"
4055 for ac_dir in $ac_dummy; do
4056   IFS=$ac_save_IFS
4057   test -z "$ac_dir" && ac_dir=.
4058   if $as_executable_p "$ac_dir/$ac_word"; then
4059    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4060    echo "$as_me:4060: found $ac_dir/$ac_word" >&5
4061    break
4062 fi
4063 done
4064
4065   ;;
4066 esac
4067 fi
4068 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4069
4070 if test -n "$PKG_CONFIG"; then
4071   echo "$as_me:4071: result: $PKG_CONFIG" >&5
4072 echo "${ECHO_T}$PKG_CONFIG" >&6
4073 else
4074   echo "$as_me:4074: result: no" >&5
4075 echo "${ECHO_T}no" >&6
4076 fi
4077
4078 fi
4079 if test -z "$ac_cv_path_PKG_CONFIG"; then
4080   ac_pt_PKG_CONFIG=$PKG_CONFIG
4081   # Extract the first word of "pkg-config", so it can be a program name with args.
4082 set dummy pkg-config; ac_word=$2
4083 echo "$as_me:4083: checking for $ac_word" >&5
4084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4085 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4086   echo $ECHO_N "(cached) $ECHO_C" >&6
4087 else
4088   case $ac_pt_PKG_CONFIG in
4089   [\\/]* | ?:[\\/]*)
4090   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4091   ;;
4092   *)
4093   ac_save_IFS=$IFS; IFS=$ac_path_separator
4094 ac_dummy="$PATH"
4095 for ac_dir in $ac_dummy; do
4096   IFS=$ac_save_IFS
4097   test -z "$ac_dir" && ac_dir=.
4098   if $as_executable_p "$ac_dir/$ac_word"; then
4099    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4100    echo "$as_me:4100: found $ac_dir/$ac_word" >&5
4101    break
4102 fi
4103 done
4104
4105   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4106   ;;
4107 esac
4108 fi
4109 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4110
4111 if test -n "$ac_pt_PKG_CONFIG"; then
4112   echo "$as_me:4112: result: $ac_pt_PKG_CONFIG" >&5
4113 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4114 else
4115   echo "$as_me:4115: result: no" >&5
4116 echo "${ECHO_T}no" >&6
4117 fi
4118
4119   PKG_CONFIG=$ac_pt_PKG_CONFIG
4120 else
4121   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4122 fi
4123
4124         ;;
4125 *)
4126         PKG_CONFIG=$withval
4127         ;;
4128 esac
4129
4130 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4131 if test "$PKG_CONFIG" != none ; then
4132
4133 if test "x$prefix" != xNONE; then
4134   cf_path_syntax="$prefix"
4135 else
4136   cf_path_syntax="$ac_default_prefix"
4137 fi
4138
4139 case ".$PKG_CONFIG" in #(vi
4140 .\$\(*\)*|.\'*\'*) #(vi
4141   ;;
4142 ..|./*|.\\*) #(vi
4143   ;;
4144 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4145   ;;
4146 .\${*prefix}*|.\${*dir}*) #(vi
4147   eval PKG_CONFIG="$PKG_CONFIG"
4148   case ".$PKG_CONFIG" in #(vi
4149   .NONE/*)
4150     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4151     ;;
4152   esac
4153   ;; #(vi
4154 .no|.NONE/*)
4155   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
4156   ;;
4157 *)
4158   { { echo "$as_me:4158: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4159 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4160    { (exit 1); exit 1; }; }
4161   ;;
4162 esac
4163
4164 fi
4165
4166 echo "$as_me:4166: checking if you want to see long compiling messages" >&5
4167 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4168
4169 # Check whether --enable-echo or --disable-echo was given.
4170 if test "${enable_echo+set}" = set; then
4171   enableval="$enable_echo"
4172   test "$enableval" != no && enableval=yes
4173   if test "$enableval" != "yes" ; then
4174
4175     ECHO_LT='--silent'
4176     ECHO_LD='@echo linking $@;'
4177     RULE_CC='@echo compiling $<'
4178     SHOW_CC='@echo compiling $@'
4179     ECHO_CC='@'
4180
4181   else
4182
4183     ECHO_LT=''
4184     ECHO_LD=''
4185     RULE_CC=''
4186     SHOW_CC=''
4187     ECHO_CC=''
4188
4189   fi
4190 else
4191   enableval=yes
4192
4193     ECHO_LT=''
4194     ECHO_LD=''
4195     RULE_CC=''
4196     SHOW_CC=''
4197     ECHO_CC=''
4198
4199 fi;
4200 echo "$as_me:4200: result: $enableval" >&5
4201 echo "${ECHO_T}$enableval" >&6
4202
4203 echo "$as_me:4203: checking for ncurses wrap-prefix" >&5
4204 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
4205
4206 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
4207 if test "${with_ncurses_wrap_prefix+set}" = set; then
4208   withval="$with_ncurses_wrap_prefix"
4209   NCURSES_WRAP_PREFIX=$withval
4210 else
4211   NCURSES_WRAP_PREFIX=_nc_
4212 fi;
4213 echo "$as_me:4213: result: $NCURSES_WRAP_PREFIX" >&5
4214 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
4215
4216 echo "$as_me:4216: checking if you want to check for wide-character functions" >&5
4217 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4218
4219 # Check whether --enable-widec or --disable-widec was given.
4220 if test "${enable_widec+set}" = set; then
4221   enableval="$enable_widec"
4222   test "$enableval" != no && enableval=yes
4223   if test "$enableval" != "yes" ; then
4224     cf_enable_widec=no
4225   else
4226     cf_enable_widec=yes
4227   fi
4228 else
4229   enableval=yes
4230   cf_enable_widec=yes
4231
4232 fi;
4233 echo "$as_me:4233: result: $cf_enable_widec" >&5
4234 echo "${ECHO_T}$cf_enable_widec" >&6
4235
4236 echo "$as_me:4236: checking for specific curses-directory" >&5
4237 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4238
4239 # Check whether --with-curses-dir or --without-curses-dir was given.
4240 if test "${with_curses_dir+set}" = set; then
4241   withval="$with_curses_dir"
4242   cf_cv_curses_dir=$withval
4243 else
4244   cf_cv_curses_dir=no
4245 fi;
4246 echo "$as_me:4246: result: $cf_cv_curses_dir" >&5
4247 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4248
4249 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4250 then
4251
4252 if test "x$prefix" != xNONE; then
4253   cf_path_syntax="$prefix"
4254 else
4255   cf_path_syntax="$ac_default_prefix"
4256 fi
4257
4258 case ".$withval" in #(vi
4259 .\$\(*\)*|.\'*\'*) #(vi
4260   ;;
4261 ..|./*|.\\*) #(vi
4262   ;;
4263 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4264   ;;
4265 .\${*prefix}*|.\${*dir}*) #(vi
4266   eval withval="$withval"
4267   case ".$withval" in #(vi
4268   .NONE/*)
4269     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4270     ;;
4271   esac
4272   ;; #(vi
4273 .no|.NONE/*)
4274   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4275   ;;
4276 *)
4277   { { echo "$as_me:4277: error: expected a pathname, not \"$withval\"" >&5
4278 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4279    { (exit 1); exit 1; }; }
4280   ;;
4281 esac
4282
4283         if test -d "$cf_cv_curses_dir"
4284         then
4285
4286 if test -n "$cf_cv_curses_dir/include" ; then
4287   for cf_add_incdir in $cf_cv_curses_dir/include
4288   do
4289         while test $cf_add_incdir != /usr/include
4290         do
4291           if test -d $cf_add_incdir
4292           then
4293                 cf_have_incdir=no
4294                 if test -n "$CFLAGS$CPPFLAGS" ; then
4295                   # a loop is needed to ensure we can add subdirs of existing dirs
4296                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4297                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4298                           cf_have_incdir=yes; break
4299                         fi
4300                   done
4301                 fi
4302
4303                 if test "$cf_have_incdir" = no ; then
4304                   if test "$cf_add_incdir" = /usr/local/include ; then
4305                         if test "$GCC" = yes
4306                         then
4307                           cf_save_CPPFLAGS=$CPPFLAGS
4308                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4309                           cat >conftest.$ac_ext <<_ACEOF
4310 #line 4310 "configure"
4311 #include "confdefs.h"
4312 #include <stdio.h>
4313 int
4314 main ()
4315 {
4316 printf("Hello")
4317   ;
4318   return 0;
4319 }
4320 _ACEOF
4321 rm -f conftest.$ac_objext
4322 if { (eval echo "$as_me:4322: \"$ac_compile\"") >&5
4323   (eval $ac_compile) 2>&5
4324   ac_status=$?
4325   echo "$as_me:4325: \$? = $ac_status" >&5
4326   (exit $ac_status); } &&
4327          { ac_try='test -s conftest.$ac_objext'
4328   { (eval echo "$as_me:4328: \"$ac_try\"") >&5
4329   (eval $ac_try) 2>&5
4330   ac_status=$?
4331   echo "$as_me:4331: \$? = $ac_status" >&5
4332   (exit $ac_status); }; }; then
4333   :
4334 else
4335   echo "$as_me: failed program was:" >&5
4336 cat conftest.$ac_ext >&5
4337 cf_have_incdir=yes
4338 fi
4339 rm -f conftest.$ac_objext conftest.$ac_ext
4340                           CPPFLAGS=$cf_save_CPPFLAGS
4341                         fi
4342                   fi
4343                 fi
4344
4345                 if test "$cf_have_incdir" = no ; then
4346                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
4347
4348 echo "${as_me:-configure}:4348: testing adding $cf_add_incdir to include-path ..." 1>&5
4349
4350                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4351
4352                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4353                   test "$cf_top_incdir" = "$cf_add_incdir" && break
4354                   cf_add_incdir="$cf_top_incdir"
4355                 else
4356                   break
4357                 fi
4358           fi
4359         done
4360   done
4361 fi
4362
4363 if test -n "$cf_cv_curses_dir/lib" ; then
4364   for cf_add_libdir in $cf_cv_curses_dir/lib
4365   do
4366     if test $cf_add_libdir = /usr/lib ; then
4367       :
4368     elif test -d $cf_add_libdir
4369     then
4370       cf_have_libdir=no
4371       if test -n "$LDFLAGS$LIBS" ; then
4372         # a loop is needed to ensure we can add subdirs of existing dirs
4373         for cf_test_libdir in $LDFLAGS $LIBS ; do
4374           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4375             cf_have_libdir=yes; break
4376           fi
4377         done
4378       fi
4379       if test "$cf_have_libdir" = no ; then
4380         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
4381
4382 echo "${as_me:-configure}:4382: testing adding $cf_add_libdir to library-path ..." 1>&5
4383
4384         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4385       fi
4386     fi
4387   done
4388 fi
4389
4390         fi
4391 fi
4392
4393 cf_cv_screen=curses
4394
4395 echo "$as_me:4395: checking for specified curses library type" >&5
4396 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
4397
4398 # Check whether --with-ncursesw or --without-ncursesw was given.
4399 if test "${with_ncursesw+set}" = set; then
4400   withval="$with_ncursesw"
4401   cf_cv_screen=ncursesw
4402 else
4403
4404 # Check whether --with-ncurses or --without-ncurses was given.
4405 if test "${with_ncurses+set}" = set; then
4406   withval="$with_ncurses"
4407   cf_cv_screen=ncurses
4408 else
4409
4410 # Check whether --with-pdcurses or --without-pdcurses was given.
4411 if test "${with_pdcurses+set}" = set; then
4412   withval="$with_pdcurses"
4413   cf_cv_screen=pdcurses
4414 else
4415
4416 # Check whether --with-curses-colr or --without-curses-colr was given.
4417 if test "${with_curses_colr+set}" = set; then
4418   withval="$with_curses_colr"
4419   cf_cv_screen=curses_colr
4420 else
4421
4422 # Check whether --with-curses-5lib or --without-curses-5lib was given.
4423 if test "${with_curses_5lib+set}" = set; then
4424   withval="$with_curses_5lib"
4425   cf_cv_screen=curses_5lib
4426 fi;
4427 fi;
4428 fi;
4429 fi;
4430 fi;
4431
4432 echo "$as_me:4432: result: $cf_cv_screen" >&5
4433 echo "${ECHO_T}$cf_cv_screen" >&6
4434
4435 case $cf_cv_screen in #(vi
4436 curses|curses_*) #(vi
4437
4438 echo "$as_me:4438: checking for extra include directories" >&5
4439 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
4440 if test "${cf_cv_curses_incdir+set}" = set; then
4441   echo $ECHO_N "(cached) $ECHO_C" >&6
4442 else
4443
4444 cf_cv_curses_incdir=no
4445 case $host_os in #(vi
4446 hpux10.*) #(vi
4447         if test "x$cf_cv_screen" = "xcurses_colr"
4448         then
4449                 test -d /usr/include/curses_colr && \
4450                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
4451         fi
4452         ;;
4453 sunos3*|sunos4*)
4454         if test "x$cf_cv_screen" = "xcurses_5lib"
4455         then
4456                 test -d /usr/5lib && \
4457                 test -d /usr/5include && \
4458                 cf_cv_curses_incdir="-I/usr/5include"
4459         fi
4460         ;;
4461 esac
4462
4463 fi
4464 echo "$as_me:4464: result: $cf_cv_curses_incdir" >&5
4465 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
4466 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
4467
4468 echo "$as_me:4468: checking if we have identified curses headers" >&5
4469 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4470 if test "${cf_cv_ncurses_header+set}" = set; then
4471   echo $ECHO_N "(cached) $ECHO_C" >&6
4472 else
4473
4474 cf_cv_ncurses_header=none
4475 for cf_header in  \
4476         ncurses.h \
4477         curses.h ncurses/ncurses.h ncurses/curses.h
4478 do
4479 cat >conftest.$ac_ext <<_ACEOF
4480 #line 4480 "configure"
4481 #include "confdefs.h"
4482 #include <${cf_header}>
4483 int
4484 main ()
4485 {
4486 initscr(); tgoto("?", 0,0)
4487   ;
4488   return 0;
4489 }
4490 _ACEOF
4491 rm -f conftest.$ac_objext
4492 if { (eval echo "$as_me:4492: \"$ac_compile\"") >&5
4493   (eval $ac_compile) 2>&5
4494   ac_status=$?
4495   echo "$as_me:4495: \$? = $ac_status" >&5
4496   (exit $ac_status); } &&
4497          { ac_try='test -s conftest.$ac_objext'
4498   { (eval echo "$as_me:4498: \"$ac_try\"") >&5
4499   (eval $ac_try) 2>&5
4500   ac_status=$?
4501   echo "$as_me:4501: \$? = $ac_status" >&5
4502   (exit $ac_status); }; }; then
4503   cf_cv_ncurses_header=$cf_header; break
4504 else
4505   echo "$as_me: failed program was:" >&5
4506 cat conftest.$ac_ext >&5
4507 fi
4508 rm -f conftest.$ac_objext conftest.$ac_ext
4509 done
4510
4511 fi
4512 echo "$as_me:4512: result: $cf_cv_ncurses_header" >&5
4513 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4514
4515 if test "$cf_cv_ncurses_header" = none ; then
4516         { { echo "$as_me:4516: error: No curses header-files found" >&5
4517 echo "$as_me: error: No curses header-files found" >&2;}
4518    { (exit 1); exit 1; }; }
4519 fi
4520
4521 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4522
4523 for ac_header in $cf_cv_ncurses_header
4524 do
4525 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4526 echo "$as_me:4526: checking for $ac_header" >&5
4527 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4528 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4529   echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531   cat >conftest.$ac_ext <<_ACEOF
4532 #line 4532 "configure"
4533 #include "confdefs.h"
4534 #include <$ac_header>
4535 _ACEOF
4536 if { (eval echo "$as_me:4536: \"$ac_cpp conftest.$ac_ext\"") >&5
4537   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4538   ac_status=$?
4539   egrep -v '^ *\+' conftest.er1 >conftest.err
4540   rm -f conftest.er1
4541   cat conftest.err >&5
4542   echo "$as_me:4542: \$? = $ac_status" >&5
4543   (exit $ac_status); } >/dev/null; then
4544   if test -s conftest.err; then
4545     ac_cpp_err=$ac_c_preproc_warn_flag
4546   else
4547     ac_cpp_err=
4548   fi
4549 else
4550   ac_cpp_err=yes
4551 fi
4552 if test -z "$ac_cpp_err"; then
4553   eval "$as_ac_Header=yes"
4554 else
4555   echo "$as_me: failed program was:" >&5
4556   cat conftest.$ac_ext >&5
4557   eval "$as_ac_Header=no"
4558 fi
4559 rm -f conftest.err conftest.$ac_ext
4560 fi
4561 echo "$as_me:4561: result: `eval echo '${'$as_ac_Header'}'`" >&5
4562 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4563 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4564   cat >>confdefs.h <<EOF
4565 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4566 EOF
4567
4568 fi
4569 done
4570
4571 echo "$as_me:4571: checking for terminfo header" >&5
4572 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4573 if test "${cf_cv_term_header+set}" = set; then
4574   echo $ECHO_N "(cached) $ECHO_C" >&6
4575 else
4576
4577 case ${cf_cv_ncurses_header} in #(vi
4578 */ncurses.h|*/ncursesw.h) #(vi
4579         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4580         ;;
4581 *)
4582         cf_term_header=term.h
4583         ;;
4584 esac
4585
4586 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4587 do
4588 cat >conftest.$ac_ext <<_ACEOF
4589 #line 4589 "configure"
4590 #include "confdefs.h"
4591 #include <stdio.h>
4592 #include <${cf_cv_ncurses_header:-curses.h}>
4593 #include <$cf_test>
4594
4595 int
4596 main ()
4597 {
4598 int x = auto_left_margin
4599   ;
4600   return 0;
4601 }
4602 _ACEOF
4603 rm -f conftest.$ac_objext
4604 if { (eval echo "$as_me:4604: \"$ac_compile\"") >&5
4605   (eval $ac_compile) 2>&5
4606   ac_status=$?
4607   echo "$as_me:4607: \$? = $ac_status" >&5
4608   (exit $ac_status); } &&
4609          { ac_try='test -s conftest.$ac_objext'
4610   { (eval echo "$as_me:4610: \"$ac_try\"") >&5
4611   (eval $ac_try) 2>&5
4612   ac_status=$?
4613   echo "$as_me:4613: \$? = $ac_status" >&5
4614   (exit $ac_status); }; }; then
4615
4616         cf_cv_term_header="$cf_test"
4617 else
4618   echo "$as_me: failed program was:" >&5
4619 cat conftest.$ac_ext >&5
4620
4621         cf_cv_term_header=unknown
4622
4623 fi
4624 rm -f conftest.$ac_objext conftest.$ac_ext
4625         test "$cf_cv_term_header" != unknown && break
4626 done
4627
4628 fi
4629 echo "$as_me:4629: result: $cf_cv_term_header" >&5
4630 echo "${ECHO_T}$cf_cv_term_header" >&6
4631
4632 # Set definitions to allow ifdef'ing to accommodate subdirectories
4633
4634 case $cf_cv_term_header in # (vi
4635 *term.h)
4636
4637 cat >>confdefs.h <<\EOF
4638 #define HAVE_TERM_H 1
4639 EOF
4640
4641         ;;
4642 esac
4643
4644 case $cf_cv_term_header in # (vi
4645 ncurses/term.h) #(vi
4646
4647 cat >>confdefs.h <<\EOF
4648 #define HAVE_NCURSES_TERM_H 1
4649 EOF
4650
4651         ;;
4652 ncursesw/term.h)
4653
4654 cat >>confdefs.h <<\EOF
4655 #define HAVE_NCURSESW_TERM_H 1
4656 EOF
4657
4658         ;;
4659 esac
4660
4661 echo "$as_me:4661: checking for ncurses version" >&5
4662 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4663 if test "${cf_cv_ncurses_version+set}" = set; then
4664   echo $ECHO_N "(cached) $ECHO_C" >&6
4665 else
4666
4667         cf_cv_ncurses_version=no
4668         cf_tempfile=out$$
4669         rm -f $cf_tempfile
4670         if test "$cross_compiling" = yes; then
4671
4672         # This will not work if the preprocessor splits the line after the
4673         # Autoconf token.  The 'unproto' program does that.
4674         cat > conftest.$ac_ext <<EOF
4675 #include <${cf_cv_ncurses_header:-curses.h}>
4676 #undef Autoconf
4677 #ifdef NCURSES_VERSION
4678 Autoconf NCURSES_VERSION
4679 #else
4680 #ifdef __NCURSES_H
4681 Autoconf "old"
4682 #endif
4683 ;
4684 #endif
4685 EOF
4686         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4687         { (eval echo "$as_me:4687: \"$cf_try\"") >&5
4688   (eval $cf_try) 2>&5
4689   ac_status=$?
4690   echo "$as_me:4690: \$? = $ac_status" >&5
4691   (exit $ac_status); }
4692         if test -f conftest.out ; then
4693                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4694                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4695                 rm -f conftest.out
4696         fi
4697
4698 else
4699   cat >conftest.$ac_ext <<_ACEOF
4700 #line 4700 "configure"
4701 #include "confdefs.h"
4702
4703 #include <${cf_cv_ncurses_header:-curses.h}>
4704 #include <stdio.h>
4705 int main()
4706 {
4707         FILE *fp = fopen("$cf_tempfile", "w");
4708 #ifdef NCURSES_VERSION
4709 # ifdef NCURSES_VERSION_PATCH
4710         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4711 # else
4712         fprintf(fp, "%s\n", NCURSES_VERSION);
4713 # endif
4714 #else
4715 # ifdef __NCURSES_H
4716         fprintf(fp, "old\n");
4717 # else
4718         make an error
4719 # endif
4720 #endif
4721         ${cf_cv_main_return:-return}(0);
4722 }
4723 _ACEOF
4724 rm -f conftest$ac_exeext
4725 if { (eval echo "$as_me:4725: \"$ac_link\"") >&5
4726   (eval $ac_link) 2>&5
4727   ac_status=$?
4728   echo "$as_me:4728: \$? = $ac_status" >&5
4729   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4730   { (eval echo "$as_me:4730: \"$ac_try\"") >&5
4731   (eval $ac_try) 2>&5
4732   ac_status=$?
4733   echo "$as_me:4733: \$? = $ac_status" >&5
4734   (exit $ac_status); }; }; then
4735
4736         cf_cv_ncurses_version=`cat $cf_tempfile`
4737 else
4738   echo "$as_me: program exited with status $ac_status" >&5
4739 echo "$as_me: failed program was:" >&5
4740 cat conftest.$ac_ext >&5
4741 fi
4742 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4743 fi
4744         rm -f $cf_tempfile
4745
4746 fi
4747 echo "$as_me:4747: result: $cf_cv_ncurses_version" >&5
4748 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4749 test "$cf_cv_ncurses_version" = no ||
4750 cat >>confdefs.h <<\EOF
4751 #define NCURSES 1
4752 EOF
4753
4754 echo "$as_me:4754: checking if we have identified curses libraries" >&5
4755 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
4756 cat >conftest.$ac_ext <<_ACEOF
4757 #line 4757 "configure"
4758 #include "confdefs.h"
4759 #include <${cf_cv_ncurses_header:-curses.h}>
4760 int
4761 main ()
4762 {
4763 initscr(); tgoto("?", 0,0)
4764   ;
4765   return 0;
4766 }
4767 _ACEOF
4768 rm -f conftest.$ac_objext conftest$ac_exeext
4769 if { (eval echo "$as_me:4769: \"$ac_link\"") >&5
4770   (eval $ac_link) 2>&5
4771   ac_status=$?
4772   echo "$as_me:4772: \$? = $ac_status" >&5
4773   (exit $ac_status); } &&
4774          { ac_try='test -s conftest$ac_exeext'
4775   { (eval echo "$as_me:4775: \"$ac_try\"") >&5
4776   (eval $ac_try) 2>&5
4777   ac_status=$?
4778   echo "$as_me:4778: \$? = $ac_status" >&5
4779   (exit $ac_status); }; }; then
4780   cf_result=yes
4781 else
4782   echo "$as_me: failed program was:" >&5
4783 cat conftest.$ac_ext >&5
4784 cf_result=no
4785 fi
4786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4787 echo "$as_me:4787: result: $cf_result" >&5
4788 echo "${ECHO_T}$cf_result" >&6
4789
4790 if test "$cf_result" = no ; then
4791 case $host_os in #(vi
4792 freebsd*) #(vi
4793     echo "$as_me:4793: checking for tgoto in -lmytinfo" >&5
4794 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4795 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4796   echo $ECHO_N "(cached) $ECHO_C" >&6
4797 else
4798   ac_check_lib_save_LIBS=$LIBS
4799 LIBS="-lmytinfo  $LIBS"
4800 cat >conftest.$ac_ext <<_ACEOF
4801 #line 4801 "configure"
4802 #include "confdefs.h"
4803
4804 /* Override any gcc2 internal prototype to avoid an error.  */
4805 #ifdef __cplusplus
4806 extern "C"
4807 #endif
4808 /* We use char because int might match the return type of a gcc2
4809    builtin and then its argument prototype would still apply.  */
4810 char tgoto ();
4811 int
4812 main ()
4813 {
4814 tgoto ();
4815   ;
4816   return 0;
4817 }
4818 _ACEOF
4819 rm -f conftest.$ac_objext conftest$ac_exeext
4820 if { (eval echo "$as_me:4820: \"$ac_link\"") >&5
4821   (eval $ac_link) 2>&5
4822   ac_status=$?
4823   echo "$as_me:4823: \$? = $ac_status" >&5
4824   (exit $ac_status); } &&
4825          { ac_try='test -s conftest$ac_exeext'
4826   { (eval echo "$as_me:4826: \"$ac_try\"") >&5
4827   (eval $ac_try) 2>&5
4828   ac_status=$?
4829   echo "$as_me:4829: \$? = $ac_status" >&5
4830   (exit $ac_status); }; }; then
4831   ac_cv_lib_mytinfo_tgoto=yes
4832 else
4833   echo "$as_me: failed program was:" >&5
4834 cat conftest.$ac_ext >&5
4835 ac_cv_lib_mytinfo_tgoto=no
4836 fi
4837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4838 LIBS=$ac_check_lib_save_LIBS
4839 fi
4840 echo "$as_me:4840: result: $ac_cv_lib_mytinfo_tgoto" >&5
4841 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4842 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4843
4844 cf_add_libs="-lmytinfo"
4845 # Filter out duplicates - this happens with badly-designed ".pc" files...
4846 for cf_add_1lib in $LIBS
4847 do
4848         for cf_add_2lib in $cf_add_libs
4849         do
4850                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4851                 then
4852                         cf_add_1lib=
4853                         break
4854                 fi
4855         done
4856         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4857 done
4858 LIBS="$cf_add_libs"
4859
4860 fi
4861
4862     ;;
4863 hpux10.*) #(vi
4864         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
4865         # next (1998), and xcurses "newer" (2000).  There is no header file for
4866         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
4867         # term.h) for cur_colr
4868         if test "x$cf_cv_screen" = "xcurses_colr"
4869         then
4870                 echo "$as_me:4870: checking for initscr in -lcur_colr" >&5
4871 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
4872 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
4873   echo $ECHO_N "(cached) $ECHO_C" >&6
4874 else
4875   ac_check_lib_save_LIBS=$LIBS
4876 LIBS="-lcur_colr  $LIBS"
4877 cat >conftest.$ac_ext <<_ACEOF
4878 #line 4878 "configure"
4879 #include "confdefs.h"
4880
4881 /* Override any gcc2 internal prototype to avoid an error.  */
4882 #ifdef __cplusplus
4883 extern "C"
4884 #endif
4885 /* We use char because int might match the return type of a gcc2
4886    builtin and then its argument prototype would still apply.  */
4887 char initscr ();
4888 int
4889 main ()
4890 {
4891 initscr ();
4892   ;
4893   return 0;
4894 }
4895 _ACEOF
4896 rm -f conftest.$ac_objext conftest$ac_exeext
4897 if { (eval echo "$as_me:4897: \"$ac_link\"") >&5
4898   (eval $ac_link) 2>&5
4899   ac_status=$?
4900   echo "$as_me:4900: \$? = $ac_status" >&5
4901   (exit $ac_status); } &&
4902          { ac_try='test -s conftest$ac_exeext'
4903   { (eval echo "$as_me:4903: \"$ac_try\"") >&5
4904   (eval $ac_try) 2>&5
4905   ac_status=$?
4906   echo "$as_me:4906: \$? = $ac_status" >&5
4907   (exit $ac_status); }; }; then
4908   ac_cv_lib_cur_colr_initscr=yes
4909 else
4910   echo "$as_me: failed program was:" >&5
4911 cat conftest.$ac_ext >&5
4912 ac_cv_lib_cur_colr_initscr=no
4913 fi
4914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4915 LIBS=$ac_check_lib_save_LIBS
4916 fi
4917 echo "$as_me:4917: result: $ac_cv_lib_cur_colr_initscr" >&5
4918 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
4919 if test $ac_cv_lib_cur_colr_initscr = yes; then
4920
4921 cf_add_libs="-lcur_colr"
4922 # Filter out duplicates - this happens with badly-designed ".pc" files...
4923 for cf_add_1lib in $LIBS
4924 do
4925         for cf_add_2lib in $cf_add_libs
4926         do
4927                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4928                 then
4929                         cf_add_1lib=
4930                         break
4931                 fi
4932         done
4933         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4934 done
4935 LIBS="$cf_add_libs"
4936
4937                         ac_cv_func_initscr=yes
4938
4939 else
4940
4941                 echo "$as_me:4941: checking for initscr in -lHcurses" >&5
4942 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
4943 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
4944   echo $ECHO_N "(cached) $ECHO_C" >&6
4945 else
4946   ac_check_lib_save_LIBS=$LIBS
4947 LIBS="-lHcurses  $LIBS"
4948 cat >conftest.$ac_ext <<_ACEOF
4949 #line 4949 "configure"
4950 #include "confdefs.h"
4951
4952 /* Override any gcc2 internal prototype to avoid an error.  */
4953 #ifdef __cplusplus
4954 extern "C"
4955 #endif
4956 /* We use char because int might match the return type of a gcc2
4957    builtin and then its argument prototype would still apply.  */
4958 char initscr ();
4959 int
4960 main ()
4961 {
4962 initscr ();
4963   ;
4964   return 0;
4965 }
4966 _ACEOF
4967 rm -f conftest.$ac_objext conftest$ac_exeext
4968 if { (eval echo "$as_me:4968: \"$ac_link\"") >&5
4969   (eval $ac_link) 2>&5
4970   ac_status=$?
4971   echo "$as_me:4971: \$? = $ac_status" >&5
4972   (exit $ac_status); } &&
4973          { ac_try='test -s conftest$ac_exeext'
4974   { (eval echo "$as_me:4974: \"$ac_try\"") >&5
4975   (eval $ac_try) 2>&5
4976   ac_status=$?
4977   echo "$as_me:4977: \$? = $ac_status" >&5
4978   (exit $ac_status); }; }; then
4979   ac_cv_lib_Hcurses_initscr=yes
4980 else
4981   echo "$as_me: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4983 ac_cv_lib_Hcurses_initscr=no
4984 fi
4985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4986 LIBS=$ac_check_lib_save_LIBS
4987 fi
4988 echo "$as_me:4988: result: $ac_cv_lib_Hcurses_initscr" >&5
4989 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
4990 if test $ac_cv_lib_Hcurses_initscr = yes; then
4991
4992                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
4993
4994 cf_add_libs="-lHcurses"
4995 # Filter out duplicates - this happens with badly-designed ".pc" files...
4996 for cf_add_1lib in $LIBS
4997 do
4998         for cf_add_2lib in $cf_add_libs
4999         do
5000                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5001                 then
5002                         cf_add_1lib=
5003                         break
5004                 fi
5005         done
5006         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5007 done
5008 LIBS="$cf_add_libs"
5009
5010                         CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5011                         ac_cv_func_initscr=yes
5012
5013 fi
5014
5015 fi
5016
5017         fi
5018         ;;
5019 linux*)
5020         case `arch 2>/dev/null` in
5021         x86_64)
5022                 if test -d /lib64
5023                 then
5024
5025 if test -n "/lib64" ; then
5026   for cf_add_libdir in /lib64
5027   do
5028     if test $cf_add_libdir = /usr/lib ; then
5029       :
5030     elif test -d $cf_add_libdir
5031     then
5032       cf_have_libdir=no
5033       if test -n "$LDFLAGS$LIBS" ; then
5034         # a loop is needed to ensure we can add subdirs of existing dirs
5035         for cf_test_libdir in $LDFLAGS $LIBS ; do
5036           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5037             cf_have_libdir=yes; break
5038           fi
5039         done
5040       fi
5041       if test "$cf_have_libdir" = no ; then
5042         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5043
5044 echo "${as_me:-configure}:5044: testing adding $cf_add_libdir to library-path ..." 1>&5
5045
5046         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5047       fi
5048     fi
5049   done
5050 fi
5051
5052                 else
5053
5054 if test -n "/lib" ; then
5055   for cf_add_libdir in /lib
5056   do
5057     if test $cf_add_libdir = /usr/lib ; then
5058       :
5059     elif test -d $cf_add_libdir
5060     then
5061       cf_have_libdir=no
5062       if test -n "$LDFLAGS$LIBS" ; then
5063         # a loop is needed to ensure we can add subdirs of existing dirs
5064         for cf_test_libdir in $LDFLAGS $LIBS ; do
5065           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5066             cf_have_libdir=yes; break
5067           fi
5068         done
5069       fi
5070       if test "$cf_have_libdir" = no ; then
5071         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5072
5073 echo "${as_me:-configure}:5073: testing adding $cf_add_libdir to library-path ..." 1>&5
5074
5075         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5076       fi
5077     fi
5078   done
5079 fi
5080
5081                 fi
5082                 ;;
5083         *)
5084
5085 if test -n "/lib" ; then
5086   for cf_add_libdir in /lib
5087   do
5088     if test $cf_add_libdir = /usr/lib ; then
5089       :
5090     elif test -d $cf_add_libdir
5091     then
5092       cf_have_libdir=no
5093       if test -n "$LDFLAGS$LIBS" ; then
5094         # a loop is needed to ensure we can add subdirs of existing dirs
5095         for cf_test_libdir in $LDFLAGS $LIBS ; do
5096           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5097             cf_have_libdir=yes; break
5098           fi
5099         done
5100       fi
5101       if test "$cf_have_libdir" = no ; then
5102         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5103
5104 echo "${as_me:-configure}:5104: testing adding $cf_add_libdir to library-path ..." 1>&5
5105
5106         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5107       fi
5108     fi
5109   done
5110 fi
5111
5112                 ;;
5113         esac
5114         ;;
5115 sunos3*|sunos4*)
5116         if test "x$cf_cv_screen" = "xcurses_5lib"
5117         then
5118                 if test -d /usr/5lib ; then
5119
5120 if test -n "/usr/5lib" ; then
5121   for cf_add_libdir in /usr/5lib
5122   do
5123     if test $cf_add_libdir = /usr/lib ; then
5124       :
5125     elif test -d $cf_add_libdir
5126     then
5127       cf_have_libdir=no
5128       if test -n "$LDFLAGS$LIBS" ; then
5129         # a loop is needed to ensure we can add subdirs of existing dirs
5130         for cf_test_libdir in $LDFLAGS $LIBS ; do
5131           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5132             cf_have_libdir=yes; break
5133           fi
5134         done
5135       fi
5136       if test "$cf_have_libdir" = no ; then
5137         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
5138
5139 echo "${as_me:-configure}:5139: testing adding $cf_add_libdir to library-path ..." 1>&5
5140
5141         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5142       fi
5143     fi
5144   done
5145 fi
5146
5147 cf_add_libs="-lcurses -ltermcap"
5148 # Filter out duplicates - this happens with badly-designed ".pc" files...
5149 for cf_add_1lib in $LIBS
5150 do
5151         for cf_add_2lib in $cf_add_libs
5152         do
5153                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5154                 then
5155                         cf_add_1lib=
5156                         break
5157                 fi
5158         done
5159         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5160 done
5161 LIBS="$cf_add_libs"
5162
5163                 fi
5164     fi
5165     ac_cv_func_initscr=yes
5166     ;;
5167 esac
5168
5169 if test ".$ac_cv_func_initscr" != .yes ; then
5170         cf_save_LIBS="$LIBS"
5171
5172         if test ".${cf_cv_ncurses_version:-no}" != .no
5173         then
5174                 cf_check_list="ncurses curses cursesX"
5175         else
5176                 cf_check_list="cursesX curses ncurses"
5177         fi
5178
5179         # Check for library containing tgoto.  Do this before curses library
5180         # because it may be needed to link the test-case for initscr.
5181         if test "x$cf_term_lib" = x
5182         then
5183                 echo "$as_me:5183: checking for tgoto" >&5
5184 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5185 if test "${ac_cv_func_tgoto+set}" = set; then
5186   echo $ECHO_N "(cached) $ECHO_C" >&6
5187 else
5188   cat >conftest.$ac_ext <<_ACEOF
5189 #line 5189 "configure"
5190 #include "confdefs.h"
5191 /* System header to define __stub macros and hopefully few prototypes,
5192     which can conflict with char tgoto (); below.  */
5193 #include <assert.h>
5194 /* Override any gcc2 internal prototype to avoid an error.  */
5195 #ifdef __cplusplus
5196 extern "C"
5197 #endif
5198 /* We use char because int might match the return type of a gcc2
5199    builtin and then its argument prototype would still apply.  */
5200 char tgoto ();
5201 char (*f) ();
5202
5203 int
5204 main ()
5205 {
5206 /* The GNU C library defines this for functions which it implements
5207     to always fail with ENOSYS.  Some functions are actually named
5208     something starting with __ and the normal name is an alias.  */
5209 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5210 choke me
5211 #else
5212 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5213 #endif
5214
5215   ;
5216   return 0;
5217 }
5218 _ACEOF
5219 rm -f conftest.$ac_objext conftest$ac_exeext
5220 if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
5221   (eval $ac_link) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); } &&
5225          { ac_try='test -s conftest$ac_exeext'
5226   { (eval echo "$as_me:5226: \"$ac_try\"") >&5
5227   (eval $ac_try) 2>&5
5228   ac_status=$?
5229   echo "$as_me:5229: \$? = $ac_status" >&5
5230   (exit $ac_status); }; }; then
5231   ac_cv_func_tgoto=yes
5232 else
5233   echo "$as_me: failed program was:" >&5
5234 cat conftest.$ac_ext >&5
5235 ac_cv_func_tgoto=no
5236 fi
5237 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5238 fi
5239 echo "$as_me:5239: result: $ac_cv_func_tgoto" >&5
5240 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5241 if test $ac_cv_func_tgoto = yes; then
5242   cf_term_lib=predefined
5243 else
5244
5245                         for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
5246                         do
5247                                 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5248 echo "$as_me:5248: checking for tgoto in -l$cf_term_lib" >&5
5249 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5250 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5251   echo $ECHO_N "(cached) $ECHO_C" >&6
5252 else
5253   ac_check_lib_save_LIBS=$LIBS
5254 LIBS="-l$cf_term_lib  $LIBS"
5255 cat >conftest.$ac_ext <<_ACEOF
5256 #line 5256 "configure"
5257 #include "confdefs.h"
5258
5259 /* Override any gcc2 internal prototype to avoid an error.  */
5260 #ifdef __cplusplus
5261 extern "C"
5262 #endif
5263 /* We use char because int might match the return type of a gcc2
5264    builtin and then its argument prototype would still apply.  */
5265 char tgoto ();
5266 int
5267 main ()
5268 {
5269 tgoto ();
5270   ;
5271   return 0;
5272 }
5273 _ACEOF
5274 rm -f conftest.$ac_objext conftest$ac_exeext
5275 if { (eval echo "$as_me:5275: \"$ac_link\"") >&5
5276   (eval $ac_link) 2>&5
5277   ac_status=$?
5278   echo "$as_me:5278: \$? = $ac_status" >&5
5279   (exit $ac_status); } &&
5280          { ac_try='test -s conftest$ac_exeext'
5281   { (eval echo "$as_me:5281: \"$ac_try\"") >&5
5282   (eval $ac_try) 2>&5
5283   ac_status=$?
5284   echo "$as_me:5284: \$? = $ac_status" >&5
5285   (exit $ac_status); }; }; then
5286   eval "$as_ac_Lib=yes"
5287 else
5288   echo "$as_me: failed program was:" >&5
5289 cat conftest.$ac_ext >&5
5290 eval "$as_ac_Lib=no"
5291 fi
5292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5293 LIBS=$ac_check_lib_save_LIBS
5294 fi
5295 echo "$as_me:5295: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5296 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5297 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5298   break
5299 fi
5300
5301                         done
5302
5303 fi
5304
5305         fi
5306
5307         # Check for library containing initscr
5308         test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5309         if test "x$cf_curs_lib" = x
5310         then
5311                 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5312                 do
5313                         as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5314 echo "$as_me:5314: checking for initscr in -l$cf_curs_lib" >&5
5315 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5316 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5317   echo $ECHO_N "(cached) $ECHO_C" >&6
5318 else
5319   ac_check_lib_save_LIBS=$LIBS
5320 LIBS="-l$cf_curs_lib  $LIBS"
5321 cat >conftest.$ac_ext <<_ACEOF
5322 #line 5322 "configure"
5323 #include "confdefs.h"
5324
5325 /* Override any gcc2 internal prototype to avoid an error.  */
5326 #ifdef __cplusplus
5327 extern "C"
5328 #endif
5329 /* We use char because int might match the return type of a gcc2
5330    builtin and then its argument prototype would still apply.  */
5331 char initscr ();
5332 int
5333 main ()
5334 {
5335 initscr ();
5336   ;
5337   return 0;
5338 }
5339 _ACEOF
5340 rm -f conftest.$ac_objext conftest$ac_exeext
5341 if { (eval echo "$as_me:5341: \"$ac_link\"") >&5
5342   (eval $ac_link) 2>&5
5343   ac_status=$?
5344   echo "$as_me:5344: \$? = $ac_status" >&5
5345   (exit $ac_status); } &&
5346          { ac_try='test -s conftest$ac_exeext'
5347   { (eval echo "$as_me:5347: \"$ac_try\"") >&5
5348   (eval $ac_try) 2>&5
5349   ac_status=$?
5350   echo "$as_me:5350: \$? = $ac_status" >&5
5351   (exit $ac_status); }; }; then
5352   eval "$as_ac_Lib=yes"
5353 else
5354   echo "$as_me: failed program was:" >&5
5355 cat conftest.$ac_ext >&5
5356 eval "$as_ac_Lib=no"
5357 fi
5358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5359 LIBS=$ac_check_lib_save_LIBS
5360 fi
5361 echo "$as_me:5361: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5362 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5363 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5364   break
5365 fi
5366
5367                 done
5368         fi
5369         test $cf_curs_lib = unknown && { { echo "$as_me:5369: error: no curses library found" >&5
5370 echo "$as_me: error: no curses library found" >&2;}
5371    { (exit 1); exit 1; }; }
5372
5373         LIBS="-l$cf_curs_lib $cf_save_LIBS"
5374         if test "$cf_term_lib" = unknown ; then
5375                 echo "$as_me:5375: checking if we can link with $cf_curs_lib library" >&5
5376 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
5377                 cat >conftest.$ac_ext <<_ACEOF
5378 #line 5378 "configure"
5379 #include "confdefs.h"
5380 #include <${cf_cv_ncurses_header:-curses.h}>
5381 int
5382 main ()
5383 {
5384 initscr()
5385   ;
5386   return 0;
5387 }
5388 _ACEOF
5389 rm -f conftest.$ac_objext conftest$ac_exeext
5390 if { (eval echo "$as_me:5390: \"$ac_link\"") >&5
5391   (eval $ac_link) 2>&5
5392   ac_status=$?
5393   echo "$as_me:5393: \$? = $ac_status" >&5
5394   (exit $ac_status); } &&
5395          { ac_try='test -s conftest$ac_exeext'
5396   { (eval echo "$as_me:5396: \"$ac_try\"") >&5
5397   (eval $ac_try) 2>&5
5398   ac_status=$?
5399   echo "$as_me:5399: \$? = $ac_status" >&5
5400   (exit $ac_status); }; }; then
5401   cf_result=yes
5402 else
5403   echo "$as_me: failed program was:" >&5
5404 cat conftest.$ac_ext >&5
5405 cf_result=no
5406 fi
5407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5408                 echo "$as_me:5408: result: $cf_result" >&5
5409 echo "${ECHO_T}$cf_result" >&6
5410                 test $cf_result = no && { { echo "$as_me:5410: error: Cannot link curses library" >&5
5411 echo "$as_me: error: Cannot link curses library" >&2;}
5412    { (exit 1); exit 1; }; }
5413         elif test "$cf_curs_lib" = "$cf_term_lib" ; then
5414                 :
5415         elif test "$cf_term_lib" != predefined ; then
5416                 echo "$as_me:5416: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
5417 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
5418                 cat >conftest.$ac_ext <<_ACEOF
5419 #line 5419 "configure"
5420 #include "confdefs.h"
5421 #include <${cf_cv_ncurses_header:-curses.h}>
5422 int
5423 main ()
5424 {
5425 initscr(); tgoto((char *)0, 0, 0);
5426   ;
5427   return 0;
5428 }
5429 _ACEOF
5430 rm -f conftest.$ac_objext conftest$ac_exeext
5431 if { (eval echo "$as_me:5431: \"$ac_link\"") >&5
5432   (eval $ac_link) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } &&
5436          { ac_try='test -s conftest$ac_exeext'
5437   { (eval echo "$as_me:5437: \"$ac_try\"") >&5
5438   (eval $ac_try) 2>&5
5439   ac_status=$?
5440   echo "$as_me:5440: \$? = $ac_status" >&5
5441   (exit $ac_status); }; }; then
5442   cf_result=no
5443 else
5444   echo "$as_me: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446
5447                         LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
5448                         cat >conftest.$ac_ext <<_ACEOF
5449 #line 5449 "configure"
5450 #include "confdefs.h"
5451 #include <${cf_cv_ncurses_header:-curses.h}>
5452 int
5453 main ()
5454 {
5455 initscr()
5456   ;
5457   return 0;
5458 }
5459 _ACEOF
5460 rm -f conftest.$ac_objext conftest$ac_exeext
5461 if { (eval echo "$as_me:5461: \"$ac_link\"") >&5
5462   (eval $ac_link) 2>&5
5463   ac_status=$?
5464   echo "$as_me:5464: \$? = $ac_status" >&5
5465   (exit $ac_status); } &&
5466          { ac_try='test -s conftest$ac_exeext'
5467   { (eval echo "$as_me:5467: \"$ac_try\"") >&5
5468   (eval $ac_try) 2>&5
5469   ac_status=$?
5470   echo "$as_me:5470: \$? = $ac_status" >&5
5471   (exit $ac_status); }; }; then
5472   cf_result=yes
5473 else
5474   echo "$as_me: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5476 cf_result=error
5477 fi
5478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5479
5480 fi
5481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5482                 echo "$as_me:5482: result: $cf_result" >&5
5483 echo "${ECHO_T}$cf_result" >&6
5484         fi
5485 fi
5486 fi
5487
5488         ;;
5489 ncurses) #(vi
5490
5491 cf_ncuconfig_root=ncurses
5492
5493 echo "Looking for ${cf_ncuconfig_root}-config"
5494
5495 if test -n "$ac_tool_prefix"; then
5496   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5497   do
5498     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5499 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5500 echo "$as_me:5500: checking for $ac_word" >&5
5501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5502 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5503   echo $ECHO_N "(cached) $ECHO_C" >&6
5504 else
5505   if test -n "$NCURSES_CONFIG"; then
5506   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5507 else
5508   ac_save_IFS=$IFS; IFS=$ac_path_separator
5509 ac_dummy="$PATH"
5510 for ac_dir in $ac_dummy; do
5511   IFS=$ac_save_IFS
5512   test -z "$ac_dir" && ac_dir=.
5513   $as_executable_p "$ac_dir/$ac_word" || continue
5514 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5515 echo "$as_me:5515: found $ac_dir/$ac_word" >&5
5516 break
5517 done
5518
5519 fi
5520 fi
5521 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5522 if test -n "$NCURSES_CONFIG"; then
5523   echo "$as_me:5523: result: $NCURSES_CONFIG" >&5
5524 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5525 else
5526   echo "$as_me:5526: result: no" >&5
5527 echo "${ECHO_T}no" >&6
5528 fi
5529
5530     test -n "$NCURSES_CONFIG" && break
5531   done
5532 fi
5533 if test -z "$NCURSES_CONFIG"; then
5534   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5535   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5536 do
5537   # Extract the first word of "$ac_prog", so it can be a program name with args.
5538 set dummy $ac_prog; ac_word=$2
5539 echo "$as_me:5539: checking for $ac_word" >&5
5540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5541 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5542   echo $ECHO_N "(cached) $ECHO_C" >&6
5543 else
5544   if test -n "$ac_ct_NCURSES_CONFIG"; then
5545   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5546 else
5547   ac_save_IFS=$IFS; IFS=$ac_path_separator
5548 ac_dummy="$PATH"
5549 for ac_dir in $ac_dummy; do
5550   IFS=$ac_save_IFS
5551   test -z "$ac_dir" && ac_dir=.
5552   $as_executable_p "$ac_dir/$ac_word" || continue
5553 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5554 echo "$as_me:5554: found $ac_dir/$ac_word" >&5
5555 break
5556 done
5557
5558 fi
5559 fi
5560 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5561 if test -n "$ac_ct_NCURSES_CONFIG"; then
5562   echo "$as_me:5562: result: $ac_ct_NCURSES_CONFIG" >&5
5563 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5564 else
5565   echo "$as_me:5565: result: no" >&5
5566 echo "${ECHO_T}no" >&6
5567 fi
5568
5569   test -n "$ac_ct_NCURSES_CONFIG" && break
5570 done
5571 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5572
5573   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5574 fi
5575
5576 if test "$NCURSES_CONFIG" != none ; then
5577
5578 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5579
5580 cf_add_libs="`$NCURSES_CONFIG --libs`"
5581 # Filter out duplicates - this happens with badly-designed ".pc" files...
5582 for cf_add_1lib in $LIBS
5583 do
5584         for cf_add_2lib in $cf_add_libs
5585         do
5586                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5587                 then
5588                         cf_add_1lib=
5589                         break
5590                 fi
5591         done
5592         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5593 done
5594 LIBS="$cf_add_libs"
5595
5596 # even with config script, some packages use no-override for curses.h
5597
5598 echo "$as_me:5598: checking if we have identified curses headers" >&5
5599 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5600 if test "${cf_cv_ncurses_header+set}" = set; then
5601   echo $ECHO_N "(cached) $ECHO_C" >&6
5602 else
5603
5604 cf_cv_ncurses_header=none
5605 for cf_header in  \
5606     ncurses/ncurses.h \
5607         ncurses/curses.h \
5608         ncurses.h \
5609         curses.h
5610 do
5611 cat >conftest.$ac_ext <<_ACEOF
5612 #line 5612 "configure"
5613 #include "confdefs.h"
5614 #include <${cf_header}>
5615 int
5616 main ()
5617 {
5618 initscr(); tgoto("?", 0,0)
5619   ;
5620   return 0;
5621 }
5622 _ACEOF
5623 rm -f conftest.$ac_objext
5624 if { (eval echo "$as_me:5624: \"$ac_compile\"") >&5
5625   (eval $ac_compile) 2>&5
5626   ac_status=$?
5627   echo "$as_me:5627: \$? = $ac_status" >&5
5628   (exit $ac_status); } &&
5629          { ac_try='test -s conftest.$ac_objext'
5630   { (eval echo "$as_me:5630: \"$ac_try\"") >&5
5631   (eval $ac_try) 2>&5
5632   ac_status=$?
5633   echo "$as_me:5633: \$? = $ac_status" >&5
5634   (exit $ac_status); }; }; then
5635   cf_cv_ncurses_header=$cf_header; break
5636 else
5637   echo "$as_me: failed program was:" >&5
5638 cat conftest.$ac_ext >&5
5639 fi
5640 rm -f conftest.$ac_objext conftest.$ac_ext
5641 done
5642
5643 fi
5644 echo "$as_me:5644: result: $cf_cv_ncurses_header" >&5
5645 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5646
5647 if test "$cf_cv_ncurses_header" = none ; then
5648         { { echo "$as_me:5648: error: No curses header-files found" >&5
5649 echo "$as_me: error: No curses header-files found" >&2;}
5650    { (exit 1); exit 1; }; }
5651 fi
5652
5653 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5654
5655 for ac_header in $cf_cv_ncurses_header
5656 do
5657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5658 echo "$as_me:5658: checking for $ac_header" >&5
5659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5661   echo $ECHO_N "(cached) $ECHO_C" >&6
5662 else
5663   cat >conftest.$ac_ext <<_ACEOF
5664 #line 5664 "configure"
5665 #include "confdefs.h"
5666 #include <$ac_header>
5667 _ACEOF
5668 if { (eval echo "$as_me:5668: \"$ac_cpp conftest.$ac_ext\"") >&5
5669   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5670   ac_status=$?
5671   egrep -v '^ *\+' conftest.er1 >conftest.err
5672   rm -f conftest.er1
5673   cat conftest.err >&5
5674   echo "$as_me:5674: \$? = $ac_status" >&5
5675   (exit $ac_status); } >/dev/null; then
5676   if test -s conftest.err; then
5677     ac_cpp_err=$ac_c_preproc_warn_flag
5678   else
5679     ac_cpp_err=
5680   fi
5681 else
5682   ac_cpp_err=yes
5683 fi
5684 if test -z "$ac_cpp_err"; then
5685   eval "$as_ac_Header=yes"
5686 else
5687   echo "$as_me: failed program was:" >&5
5688   cat conftest.$ac_ext >&5
5689   eval "$as_ac_Header=no"
5690 fi
5691 rm -f conftest.err conftest.$ac_ext
5692 fi
5693 echo "$as_me:5693: result: `eval echo '${'$as_ac_Header'}'`" >&5
5694 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5695 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5696   cat >>confdefs.h <<EOF
5697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5698 EOF
5699
5700 fi
5701 done
5702
5703 cat >>confdefs.h <<\EOF
5704 #define NCURSES 1
5705 EOF
5706
5707 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5708
5709 cat >>confdefs.h <<EOF
5710 #define $cf_nculib_ROOT 1
5711 EOF
5712
5713 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5714
5715 else
5716
5717 cf_ncuhdr_root=ncurses
5718
5719 test -n "$cf_cv_curses_dir" && \
5720 test "$cf_cv_curses_dir" != "no" && { \
5721
5722 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5723   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5724   do
5725         while test $cf_add_incdir != /usr/include
5726         do
5727           if test -d $cf_add_incdir
5728           then
5729                 cf_have_incdir=no
5730                 if test -n "$CFLAGS$CPPFLAGS" ; then
5731                   # a loop is needed to ensure we can add subdirs of existing dirs
5732                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5733                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5734                           cf_have_incdir=yes; break
5735                         fi
5736                   done
5737                 fi
5738
5739                 if test "$cf_have_incdir" = no ; then
5740                   if test "$cf_add_incdir" = /usr/local/include ; then
5741                         if test "$GCC" = yes
5742                         then
5743                           cf_save_CPPFLAGS=$CPPFLAGS
5744                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5745                           cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748 #include <stdio.h>
5749 int
5750 main ()
5751 {
5752 printf("Hello")
5753   ;
5754   return 0;
5755 }
5756 _ACEOF
5757 rm -f conftest.$ac_objext
5758 if { (eval echo "$as_me:5758: \"$ac_compile\"") >&5
5759   (eval $ac_compile) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); } &&
5763          { ac_try='test -s conftest.$ac_objext'
5764   { (eval echo "$as_me:5764: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   :
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 cf_have_incdir=yes
5774 fi
5775 rm -f conftest.$ac_objext conftest.$ac_ext
5776                           CPPFLAGS=$cf_save_CPPFLAGS
5777                         fi
5778                   fi
5779                 fi
5780
5781                 if test "$cf_have_incdir" = no ; then
5782                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
5783
5784 echo "${as_me:-configure}:5784: testing adding $cf_add_incdir to include-path ..." 1>&5
5785
5786                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5787
5788                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5789                   test "$cf_top_incdir" = "$cf_add_incdir" && break
5790                   cf_add_incdir="$cf_top_incdir"
5791                 else
5792                   break
5793                 fi
5794           fi
5795         done
5796   done
5797 fi
5798
5799 }
5800
5801 echo "$as_me:5801: checking for $cf_ncuhdr_root header in include-path" >&5
5802 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5803 if test "${cf_cv_ncurses_h+set}" = set; then
5804   echo $ECHO_N "(cached) $ECHO_C" >&6
5805 else
5806
5807         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5808         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5809         for cf_header in $cf_header_list
5810         do
5811
5812         cat >conftest.$ac_ext <<_ACEOF
5813 #line 5813 "configure"
5814 #include "confdefs.h"
5815
5816 #include <$cf_header>
5817 int
5818 main ()
5819 {
5820
5821 #ifdef NCURSES_VERSION
5822
5823 printf("%s\n", NCURSES_VERSION);
5824 #else
5825 #ifdef __NCURSES_H
5826 printf("old\n");
5827 #else
5828         make an error
5829 #endif
5830 #endif
5831
5832   ;
5833   return 0;
5834 }
5835 _ACEOF
5836 rm -f conftest.$ac_objext
5837 if { (eval echo "$as_me:5837: \"$ac_compile\"") >&5
5838   (eval $ac_compile) 2>&5
5839   ac_status=$?
5840   echo "$as_me:5840: \$? = $ac_status" >&5
5841   (exit $ac_status); } &&
5842          { ac_try='test -s conftest.$ac_objext'
5843   { (eval echo "$as_me:5843: \"$ac_try\"") >&5
5844   (eval $ac_try) 2>&5
5845   ac_status=$?
5846   echo "$as_me:5846: \$? = $ac_status" >&5
5847   (exit $ac_status); }; }; then
5848   cf_cv_ncurses_h=$cf_header
5849
5850 else
5851   echo "$as_me: failed program was:" >&5
5852 cat conftest.$ac_ext >&5
5853 cf_cv_ncurses_h=no
5854 fi
5855 rm -f conftest.$ac_objext conftest.$ac_ext
5856
5857                 test "$cf_cv_ncurses_h" != no && break
5858         done
5859
5860 fi
5861 echo "$as_me:5861: result: $cf_cv_ncurses_h" >&5
5862 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5863
5864 if test "$cf_cv_ncurses_h" != no ; then
5865         cf_cv_ncurses_header=$cf_cv_ncurses_h
5866 else
5867
5868 echo "$as_me:5868: checking for $cf_ncuhdr_root include-path" >&5
5869 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5870 if test "${cf_cv_ncurses_h2+set}" = set; then
5871   echo $ECHO_N "(cached) $ECHO_C" >&6
5872 else
5873
5874         test -n "$verbose" && echo
5875
5876 cf_search=
5877
5878 # collect the current set of include-directories from compiler flags
5879 cf_header_path_list=""
5880 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5881         for cf_header_path in $CPPFLAGS $CFLAGS
5882         do
5883                 case $cf_header_path in #(vi
5884                 -I*)
5885                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5886
5887 test "x$cf_header_path" != "xNONE" && \
5888 test -d "$cf_header_path" && \
5889  {
5890         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
5891         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
5892         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5893         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5894         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5895         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"
5896 }
5897
5898                         cf_header_path_list="$cf_header_path_list $cf_search"
5899                         ;;
5900                 esac
5901         done
5902 fi
5903
5904 # add the variations for the package we are looking for
5905
5906 cf_search=
5907
5908 test "x/usr" != "x$prefix" && \
5909 test -d "/usr" && \
5910 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
5911         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
5912         test -d /usr/include &&          cf_search="$cf_search /usr/include"
5913         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5914         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5915         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5916         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5917 }
5918
5919 test "x$prefix" != "xNONE" && \
5920 test -d "$prefix" && \
5921  {
5922         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
5923         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
5924         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5925         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5926         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5927         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5928 }
5929
5930 test "x/usr/local" != "x$prefix" && \
5931 test -d "/usr/local" && \
5932 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
5933         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
5934         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
5935         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5936         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5937         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5938         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5939 }
5940
5941 test "x/opt" != "x$prefix" && \
5942 test -d "/opt" && \
5943 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
5944         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
5945         test -d /opt/include &&          cf_search="$cf_search /opt/include"
5946         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5947         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5948         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5949         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5950 }
5951
5952 test "x$HOME" != "x$prefix" && \
5953 test -d "$HOME" && \
5954 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
5955         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
5956         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
5957         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5958         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5959         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5960         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5961 }
5962
5963 test "$includedir" != NONE && \
5964 test "$includedir" != "/usr/include" && \
5965 test -d "$includedir" && {
5966         test -d $includedir &&    cf_search="$cf_search $includedir"
5967         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5968 }
5969
5970 test "$oldincludedir" != NONE && \
5971 test "$oldincludedir" != "/usr/include" && \
5972 test -d "$oldincludedir" && {
5973         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
5974         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5975 }
5976
5977 cf_search="$cf_search $cf_header_path_list"
5978
5979         test -n "$verbose" && echo search path $cf_search
5980         cf_save2_CPPFLAGS="$CPPFLAGS"
5981         for cf_incdir in $cf_search
5982         do
5983
5984 if test -n "$cf_incdir" ; then
5985   for cf_add_incdir in $cf_incdir
5986   do
5987         while test $cf_add_incdir != /usr/include
5988         do
5989           if test -d $cf_add_incdir
5990           then
5991                 cf_have_incdir=no
5992                 if test -n "$CFLAGS$CPPFLAGS" ; then
5993                   # a loop is needed to ensure we can add subdirs of existing dirs
5994                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5995                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5996                           cf_have_incdir=yes; break
5997                         fi
5998                   done
5999                 fi
6000
6001                 if test "$cf_have_incdir" = no ; then
6002                   if test "$cf_add_incdir" = /usr/local/include ; then
6003                         if test "$GCC" = yes
6004                         then
6005                           cf_save_CPPFLAGS=$CPPFLAGS
6006                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6007                           cat >conftest.$ac_ext <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010 #include <stdio.h>
6011 int
6012 main ()
6013 {
6014 printf("Hello")
6015   ;
6016   return 0;
6017 }
6018 _ACEOF
6019 rm -f conftest.$ac_objext
6020 if { (eval echo "$as_me:6020: \"$ac_compile\"") >&5
6021   (eval $ac_compile) 2>&5
6022   ac_status=$?
6023   echo "$as_me:6023: \$? = $ac_status" >&5
6024   (exit $ac_status); } &&
6025          { ac_try='test -s conftest.$ac_objext'
6026   { (eval echo "$as_me:6026: \"$ac_try\"") >&5
6027   (eval $ac_try) 2>&5
6028   ac_status=$?
6029   echo "$as_me:6029: \$? = $ac_status" >&5
6030   (exit $ac_status); }; }; then
6031   :
6032 else
6033   echo "$as_me: failed program was:" >&5
6034 cat conftest.$ac_ext >&5
6035 cf_have_incdir=yes
6036 fi
6037 rm -f conftest.$ac_objext conftest.$ac_ext
6038                           CPPFLAGS=$cf_save_CPPFLAGS
6039                         fi
6040                   fi
6041                 fi
6042
6043                 if test "$cf_have_incdir" = no ; then
6044                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6045
6046 echo "${as_me:-configure}:6046: testing adding $cf_add_incdir to include-path ..." 1>&5
6047
6048                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6049
6050                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6051                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6052                   cf_add_incdir="$cf_top_incdir"
6053                 else
6054                   break
6055                 fi
6056           fi
6057         done
6058   done
6059 fi
6060
6061                 for cf_header in \
6062                         ncurses.h \
6063                         curses.h
6064                 do
6065
6066         cat >conftest.$ac_ext <<_ACEOF
6067 #line 6067 "configure"
6068 #include "confdefs.h"
6069
6070 #include <$cf_header>
6071 int
6072 main ()
6073 {
6074
6075 #ifdef NCURSES_VERSION
6076
6077 printf("%s\n", NCURSES_VERSION);
6078 #else
6079 #ifdef __NCURSES_H
6080 printf("old\n");
6081 #else
6082         make an error
6083 #endif
6084 #endif
6085
6086   ;
6087   return 0;
6088 }
6089 _ACEOF
6090 rm -f conftest.$ac_objext
6091 if { (eval echo "$as_me:6091: \"$ac_compile\"") >&5
6092   (eval $ac_compile) 2>&5
6093   ac_status=$?
6094   echo "$as_me:6094: \$? = $ac_status" >&5
6095   (exit $ac_status); } &&
6096          { ac_try='test -s conftest.$ac_objext'
6097   { (eval echo "$as_me:6097: \"$ac_try\"") >&5
6098   (eval $ac_try) 2>&5
6099   ac_status=$?
6100   echo "$as_me:6100: \$? = $ac_status" >&5
6101   (exit $ac_status); }; }; then
6102   cf_cv_ncurses_h2=$cf_header
6103
6104 else
6105   echo "$as_me: failed program was:" >&5
6106 cat conftest.$ac_ext >&5
6107 cf_cv_ncurses_h2=no
6108 fi
6109 rm -f conftest.$ac_objext conftest.$ac_ext
6110
6111                         if test "$cf_cv_ncurses_h2" != no ; then
6112                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6113                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
6114                                 break
6115                         fi
6116                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
6117                 done
6118                 CPPFLAGS="$cf_save2_CPPFLAGS"
6119                 test "$cf_cv_ncurses_h2" != no && break
6120         done
6121         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6121: error: not found" >&5
6122 echo "$as_me: error: not found" >&2;}
6123    { (exit 1); exit 1; }; }
6124
6125 fi
6126 echo "$as_me:6126: result: $cf_cv_ncurses_h2" >&5
6127 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6128
6129         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6130         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6131         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6132                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6133         fi
6134
6135 if test -n "$cf_1st_incdir" ; then
6136   for cf_add_incdir in $cf_1st_incdir
6137   do
6138         while test $cf_add_incdir != /usr/include
6139         do
6140           if test -d $cf_add_incdir
6141           then
6142                 cf_have_incdir=no
6143                 if test -n "$CFLAGS$CPPFLAGS" ; then
6144                   # a loop is needed to ensure we can add subdirs of existing dirs
6145                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6146                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6147                           cf_have_incdir=yes; break
6148                         fi
6149                   done
6150                 fi
6151
6152                 if test "$cf_have_incdir" = no ; then
6153                   if test "$cf_add_incdir" = /usr/local/include ; then
6154                         if test "$GCC" = yes
6155                         then
6156                           cf_save_CPPFLAGS=$CPPFLAGS
6157                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6158                           cat >conftest.$ac_ext <<_ACEOF
6159 #line 6159 "configure"
6160 #include "confdefs.h"
6161 #include <stdio.h>
6162 int
6163 main ()
6164 {
6165 printf("Hello")
6166   ;
6167   return 0;
6168 }
6169 _ACEOF
6170 rm -f conftest.$ac_objext
6171 if { (eval echo "$as_me:6171: \"$ac_compile\"") >&5
6172   (eval $ac_compile) 2>&5
6173   ac_status=$?
6174   echo "$as_me:6174: \$? = $ac_status" >&5
6175   (exit $ac_status); } &&
6176          { ac_try='test -s conftest.$ac_objext'
6177   { (eval echo "$as_me:6177: \"$ac_try\"") >&5
6178   (eval $ac_try) 2>&5
6179   ac_status=$?
6180   echo "$as_me:6180: \$? = $ac_status" >&5
6181   (exit $ac_status); }; }; then
6182   :
6183 else
6184   echo "$as_me: failed program was:" >&5
6185 cat conftest.$ac_ext >&5
6186 cf_have_incdir=yes
6187 fi
6188 rm -f conftest.$ac_objext conftest.$ac_ext
6189                           CPPFLAGS=$cf_save_CPPFLAGS
6190                         fi
6191                   fi
6192                 fi
6193
6194                 if test "$cf_have_incdir" = no ; then
6195                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
6196
6197 echo "${as_me:-configure}:6197: testing adding $cf_add_incdir to include-path ..." 1>&5
6198
6199                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6200
6201                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6202                   test "$cf_top_incdir" = "$cf_add_incdir" && break
6203                   cf_add_incdir="$cf_top_incdir"
6204                 else
6205                   break
6206                 fi
6207           fi
6208         done
6209   done
6210 fi
6211
6212 fi
6213
6214 # Set definitions to allow ifdef'ing for ncurses.h
6215
6216 case $cf_cv_ncurses_header in # (vi
6217 *ncurses.h)
6218
6219 cat >>confdefs.h <<\EOF
6220 #define HAVE_NCURSES_H 1
6221 EOF
6222
6223         ;;
6224 esac
6225
6226 case $cf_cv_ncurses_header in # (vi
6227 ncurses/curses.h|ncurses/ncurses.h)
6228
6229 cat >>confdefs.h <<\EOF
6230 #define HAVE_NCURSES_NCURSES_H 1
6231 EOF
6232
6233         ;;
6234 ncursesw/curses.h|ncursesw/ncurses.h)
6235
6236 cat >>confdefs.h <<\EOF
6237 #define HAVE_NCURSESW_NCURSES_H 1
6238 EOF
6239
6240         ;;
6241 esac
6242
6243 echo "$as_me:6243: checking for terminfo header" >&5
6244 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6245 if test "${cf_cv_term_header+set}" = set; then
6246   echo $ECHO_N "(cached) $ECHO_C" >&6
6247 else
6248
6249 case ${cf_cv_ncurses_header} in #(vi
6250 */ncurses.h|*/ncursesw.h) #(vi
6251         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6252         ;;
6253 *)
6254         cf_term_header=term.h
6255         ;;
6256 esac
6257
6258 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6259 do
6260 cat >conftest.$ac_ext <<_ACEOF
6261 #line 6261 "configure"
6262 #include "confdefs.h"
6263 #include <stdio.h>
6264 #include <${cf_cv_ncurses_header:-curses.h}>
6265 #include <$cf_test>
6266
6267 int
6268 main ()
6269 {
6270 int x = auto_left_margin
6271   ;
6272   return 0;
6273 }
6274 _ACEOF
6275 rm -f conftest.$ac_objext
6276 if { (eval echo "$as_me:6276: \"$ac_compile\"") >&5
6277   (eval $ac_compile) 2>&5
6278   ac_status=$?
6279   echo "$as_me:6279: \$? = $ac_status" >&5
6280   (exit $ac_status); } &&
6281          { ac_try='test -s conftest.$ac_objext'
6282   { (eval echo "$as_me:6282: \"$ac_try\"") >&5
6283   (eval $ac_try) 2>&5
6284   ac_status=$?
6285   echo "$as_me:6285: \$? = $ac_status" >&5
6286   (exit $ac_status); }; }; then
6287
6288         cf_cv_term_header="$cf_test"
6289 else
6290   echo "$as_me: failed program was:" >&5
6291 cat conftest.$ac_ext >&5
6292
6293         cf_cv_term_header=unknown
6294
6295 fi
6296 rm -f conftest.$ac_objext conftest.$ac_ext
6297         test "$cf_cv_term_header" != unknown && break
6298 done
6299
6300 fi
6301 echo "$as_me:6301: result: $cf_cv_term_header" >&5
6302 echo "${ECHO_T}$cf_cv_term_header" >&6
6303
6304 # Set definitions to allow ifdef'ing to accommodate subdirectories
6305
6306 case $cf_cv_term_header in # (vi
6307 *term.h)
6308
6309 cat >>confdefs.h <<\EOF
6310 #define HAVE_TERM_H 1
6311 EOF
6312
6313         ;;
6314 esac
6315
6316 case $cf_cv_term_header in # (vi
6317 ncurses/term.h) #(vi
6318
6319 cat >>confdefs.h <<\EOF
6320 #define HAVE_NCURSES_TERM_H 1
6321 EOF
6322
6323         ;;
6324 ncursesw/term.h)
6325
6326 cat >>confdefs.h <<\EOF
6327 #define HAVE_NCURSESW_TERM_H 1
6328 EOF
6329
6330         ;;
6331 esac
6332
6333 # some applications need this, but should check for NCURSES_VERSION
6334
6335 cat >>confdefs.h <<\EOF
6336 #define NCURSES 1
6337 EOF
6338
6339 echo "$as_me:6339: checking for ncurses version" >&5
6340 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6341 if test "${cf_cv_ncurses_version+set}" = set; then
6342   echo $ECHO_N "(cached) $ECHO_C" >&6
6343 else
6344
6345         cf_cv_ncurses_version=no
6346         cf_tempfile=out$$
6347         rm -f $cf_tempfile
6348         if test "$cross_compiling" = yes; then
6349
6350         # This will not work if the preprocessor splits the line after the
6351         # Autoconf token.  The 'unproto' program does that.
6352         cat > conftest.$ac_ext <<EOF
6353 #include <${cf_cv_ncurses_header:-curses.h}>
6354 #undef Autoconf
6355 #ifdef NCURSES_VERSION
6356 Autoconf NCURSES_VERSION
6357 #else
6358 #ifdef __NCURSES_H
6359 Autoconf "old"
6360 #endif
6361 ;
6362 #endif
6363 EOF
6364         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6365         { (eval echo "$as_me:6365: \"$cf_try\"") >&5
6366   (eval $cf_try) 2>&5
6367   ac_status=$?
6368   echo "$as_me:6368: \$? = $ac_status" >&5
6369   (exit $ac_status); }
6370         if test -f conftest.out ; then
6371                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6372                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6373                 rm -f conftest.out
6374         fi
6375
6376 else
6377   cat >conftest.$ac_ext <<_ACEOF
6378 #line 6378 "configure"
6379 #include "confdefs.h"
6380
6381 #include <${cf_cv_ncurses_header:-curses.h}>
6382 #include <stdio.h>
6383 int main()
6384 {
6385         FILE *fp = fopen("$cf_tempfile", "w");
6386 #ifdef NCURSES_VERSION
6387 # ifdef NCURSES_VERSION_PATCH
6388         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6389 # else
6390         fprintf(fp, "%s\n", NCURSES_VERSION);
6391 # endif
6392 #else
6393 # ifdef __NCURSES_H
6394         fprintf(fp, "old\n");
6395 # else
6396         make an error
6397 # endif
6398 #endif
6399         ${cf_cv_main_return:-return}(0);
6400 }
6401 _ACEOF
6402 rm -f conftest$ac_exeext
6403 if { (eval echo "$as_me:6403: \"$ac_link\"") >&5
6404   (eval $ac_link) 2>&5
6405   ac_status=$?
6406   echo "$as_me:6406: \$? = $ac_status" >&5
6407   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6408   { (eval echo "$as_me:6408: \"$ac_try\"") >&5
6409   (eval $ac_try) 2>&5
6410   ac_status=$?
6411   echo "$as_me:6411: \$? = $ac_status" >&5
6412   (exit $ac_status); }; }; then
6413
6414         cf_cv_ncurses_version=`cat $cf_tempfile`
6415 else
6416   echo "$as_me: program exited with status $ac_status" >&5
6417 echo "$as_me: failed program was:" >&5
6418 cat conftest.$ac_ext >&5
6419 fi
6420 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6421 fi
6422         rm -f $cf_tempfile
6423
6424 fi
6425 echo "$as_me:6425: result: $cf_cv_ncurses_version" >&5
6426 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6427 test "$cf_cv_ncurses_version" = no ||
6428 cat >>confdefs.h <<\EOF
6429 #define NCURSES 1
6430 EOF
6431
6432 cf_nculib_root=ncurses
6433         # This works, except for the special case where we find gpm, but
6434         # ncurses is in a nonstandard location via $LIBS, and we really want
6435         # to link gpm.
6436 cf_ncurses_LIBS=""
6437 cf_ncurses_SAVE="$LIBS"
6438 echo "$as_me:6438: checking for Gpm_Open in -lgpm" >&5
6439 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6440 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6441   echo $ECHO_N "(cached) $ECHO_C" >&6
6442 else
6443   ac_check_lib_save_LIBS=$LIBS
6444 LIBS="-lgpm  $LIBS"
6445 cat >conftest.$ac_ext <<_ACEOF
6446 #line 6446 "configure"
6447 #include "confdefs.h"
6448
6449 /* Override any gcc2 internal prototype to avoid an error.  */
6450 #ifdef __cplusplus
6451 extern "C"
6452 #endif
6453 /* We use char because int might match the return type of a gcc2
6454    builtin and then its argument prototype would still apply.  */
6455 char Gpm_Open ();
6456 int
6457 main ()
6458 {
6459 Gpm_Open ();
6460   ;
6461   return 0;
6462 }
6463 _ACEOF
6464 rm -f conftest.$ac_objext conftest$ac_exeext
6465 if { (eval echo "$as_me:6465: \"$ac_link\"") >&5
6466   (eval $ac_link) 2>&5
6467   ac_status=$?
6468   echo "$as_me:6468: \$? = $ac_status" >&5
6469   (exit $ac_status); } &&
6470          { ac_try='test -s conftest$ac_exeext'
6471   { (eval echo "$as_me:6471: \"$ac_try\"") >&5
6472   (eval $ac_try) 2>&5
6473   ac_status=$?
6474   echo "$as_me:6474: \$? = $ac_status" >&5
6475   (exit $ac_status); }; }; then
6476   ac_cv_lib_gpm_Gpm_Open=yes
6477 else
6478   echo "$as_me: failed program was:" >&5
6479 cat conftest.$ac_ext >&5
6480 ac_cv_lib_gpm_Gpm_Open=no
6481 fi
6482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6483 LIBS=$ac_check_lib_save_LIBS
6484 fi
6485 echo "$as_me:6485: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6486 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6487 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6488   echo "$as_me:6488: checking for initscr in -lgpm" >&5
6489 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6490 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6491   echo $ECHO_N "(cached) $ECHO_C" >&6
6492 else
6493   ac_check_lib_save_LIBS=$LIBS
6494 LIBS="-lgpm  $LIBS"
6495 cat >conftest.$ac_ext <<_ACEOF
6496 #line 6496 "configure"
6497 #include "confdefs.h"
6498
6499 /* Override any gcc2 internal prototype to avoid an error.  */
6500 #ifdef __cplusplus
6501 extern "C"
6502 #endif
6503 /* We use char because int might match the return type of a gcc2
6504    builtin and then its argument prototype would still apply.  */
6505 char initscr ();
6506 int
6507 main ()
6508 {
6509 initscr ();
6510   ;
6511   return 0;
6512 }
6513 _ACEOF
6514 rm -f conftest.$ac_objext conftest$ac_exeext
6515 if { (eval echo "$as_me:6515: \"$ac_link\"") >&5
6516   (eval $ac_link) 2>&5
6517   ac_status=$?
6518   echo "$as_me:6518: \$? = $ac_status" >&5
6519   (exit $ac_status); } &&
6520          { ac_try='test -s conftest$ac_exeext'
6521   { (eval echo "$as_me:6521: \"$ac_try\"") >&5
6522   (eval $ac_try) 2>&5
6523   ac_status=$?
6524   echo "$as_me:6524: \$? = $ac_status" >&5
6525   (exit $ac_status); }; }; then
6526   ac_cv_lib_gpm_initscr=yes
6527 else
6528   echo "$as_me: failed program was:" >&5
6529 cat conftest.$ac_ext >&5
6530 ac_cv_lib_gpm_initscr=no
6531 fi
6532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6533 LIBS=$ac_check_lib_save_LIBS
6534 fi
6535 echo "$as_me:6535: result: $ac_cv_lib_gpm_initscr" >&5
6536 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6537 if test $ac_cv_lib_gpm_initscr = yes; then
6538   LIBS="$cf_ncurses_SAVE"
6539 else
6540   cf_ncurses_LIBS="-lgpm"
6541 fi
6542
6543 fi
6544
6545 case $host_os in #(vi
6546 freebsd*)
6547         # This is only necessary if you are linking against an obsolete
6548         # version of ncurses (but it should do no harm, since it's static).
6549         if test "$cf_nculib_root" = ncurses ; then
6550                 echo "$as_me:6550: checking for tgoto in -lmytinfo" >&5
6551 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6552 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6553   echo $ECHO_N "(cached) $ECHO_C" >&6
6554 else
6555   ac_check_lib_save_LIBS=$LIBS
6556 LIBS="-lmytinfo  $LIBS"
6557 cat >conftest.$ac_ext <<_ACEOF
6558 #line 6558 "configure"
6559 #include "confdefs.h"
6560
6561 /* Override any gcc2 internal prototype to avoid an error.  */
6562 #ifdef __cplusplus
6563 extern "C"
6564 #endif
6565 /* We use char because int might match the return type of a gcc2
6566    builtin and then its argument prototype would still apply.  */
6567 char tgoto ();
6568 int
6569 main ()
6570 {
6571 tgoto ();
6572   ;
6573   return 0;
6574 }
6575 _ACEOF
6576 rm -f conftest.$ac_objext conftest$ac_exeext
6577 if { (eval echo "$as_me:6577: \"$ac_link\"") >&5
6578   (eval $ac_link) 2>&5
6579   ac_status=$?
6580   echo "$as_me:6580: \$? = $ac_status" >&5
6581   (exit $ac_status); } &&
6582          { ac_try='test -s conftest$ac_exeext'
6583   { (eval echo "$as_me:6583: \"$ac_try\"") >&5
6584   (eval $ac_try) 2>&5
6585   ac_status=$?
6586   echo "$as_me:6586: \$? = $ac_status" >&5
6587   (exit $ac_status); }; }; then
6588   ac_cv_lib_mytinfo_tgoto=yes
6589 else
6590   echo "$as_me: failed program was:" >&5
6591 cat conftest.$ac_ext >&5
6592 ac_cv_lib_mytinfo_tgoto=no
6593 fi
6594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6595 LIBS=$ac_check_lib_save_LIBS
6596 fi
6597 echo "$as_me:6597: result: $ac_cv_lib_mytinfo_tgoto" >&5
6598 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6599 if test $ac_cv_lib_mytinfo_tgoto = yes; then
6600   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6601 fi
6602
6603         fi
6604         ;;
6605 esac
6606
6607 cf_add_libs="$cf_ncurses_LIBS"
6608 # Filter out duplicates - this happens with badly-designed ".pc" files...
6609 for cf_add_1lib in $LIBS
6610 do
6611         for cf_add_2lib in $cf_add_libs
6612         do
6613                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6614                 then
6615                         cf_add_1lib=
6616                         break
6617                 fi
6618         done
6619         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6620 done
6621 LIBS="$cf_add_libs"
6622
6623 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6624 then
6625
6626 cf_add_libs="-l$cf_nculib_root"
6627 # Filter out duplicates - this happens with badly-designed ".pc" files...
6628 for cf_add_1lib in $LIBS
6629 do
6630         for cf_add_2lib in $cf_add_libs
6631         do
6632                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6633                 then
6634                         cf_add_1lib=
6635                         break
6636                 fi
6637         done
6638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6639 done
6640 LIBS="$cf_add_libs"
6641
6642 else
6643
6644         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6645         cf_libdir=""
6646         echo "$as_me:6646: checking for initscr" >&5
6647 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6648 if test "${ac_cv_func_initscr+set}" = set; then
6649   echo $ECHO_N "(cached) $ECHO_C" >&6
6650 else
6651   cat >conftest.$ac_ext <<_ACEOF
6652 #line 6652 "configure"
6653 #include "confdefs.h"
6654 /* System header to define __stub macros and hopefully few prototypes,
6655     which can conflict with char initscr (); below.  */
6656 #include <assert.h>
6657 /* Override any gcc2 internal prototype to avoid an error.  */
6658 #ifdef __cplusplus
6659 extern "C"
6660 #endif
6661 /* We use char because int might match the return type of a gcc2
6662    builtin and then its argument prototype would still apply.  */
6663 char initscr ();
6664 char (*f) ();
6665
6666 int
6667 main ()
6668 {
6669 /* The GNU C library defines this for functions which it implements
6670     to always fail with ENOSYS.  Some functions are actually named
6671     something starting with __ and the normal name is an alias.  */
6672 #if defined (__stub_initscr) || defined (__stub___initscr)
6673 choke me
6674 #else
6675 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6676 #endif
6677
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 rm -f conftest.$ac_objext conftest$ac_exeext
6683 if { (eval echo "$as_me:6683: \"$ac_link\"") >&5
6684   (eval $ac_link) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } &&
6688          { ac_try='test -s conftest$ac_exeext'
6689   { (eval echo "$as_me:6689: \"$ac_try\"") >&5
6690   (eval $ac_try) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); }; }; then
6694   ac_cv_func_initscr=yes
6695 else
6696   echo "$as_me: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6698 ac_cv_func_initscr=no
6699 fi
6700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6701 fi
6702 echo "$as_me:6702: result: $ac_cv_func_initscr" >&5
6703 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6704 if test $ac_cv_func_initscr = yes; then
6705   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6706 else
6707
6708                 cf_save_LIBS="$LIBS"
6709                 echo "$as_me:6709: checking for initscr in -l$cf_nculib_root" >&5
6710 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6711                 LIBS="-l$cf_nculib_root $LIBS"
6712                 cat >conftest.$ac_ext <<_ACEOF
6713 #line 6713 "configure"
6714 #include "confdefs.h"
6715 #include <${cf_cv_ncurses_header:-curses.h}>
6716 int
6717 main ()
6718 {
6719 initscr()
6720   ;
6721   return 0;
6722 }
6723 _ACEOF
6724 rm -f conftest.$ac_objext conftest$ac_exeext
6725 if { (eval echo "$as_me:6725: \"$ac_link\"") >&5
6726   (eval $ac_link) 2>&5
6727   ac_status=$?
6728   echo "$as_me:6728: \$? = $ac_status" >&5
6729   (exit $ac_status); } &&
6730          { ac_try='test -s conftest$ac_exeext'
6731   { (eval echo "$as_me:6731: \"$ac_try\"") >&5
6732   (eval $ac_try) 2>&5
6733   ac_status=$?
6734   echo "$as_me:6734: \$? = $ac_status" >&5
6735   (exit $ac_status); }; }; then
6736   echo "$as_me:6736: result: yes" >&5
6737 echo "${ECHO_T}yes" >&6
6738                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6739
6740 else
6741   echo "$as_me: failed program was:" >&5
6742 cat conftest.$ac_ext >&5
6743 echo "$as_me:6743: result: no" >&5
6744 echo "${ECHO_T}no" >&6
6745
6746 cf_search=
6747 cf_library_path_list=""
6748 if test -n "${LDFLAGS}${LIBS}" ; then
6749         for cf_library_path in $LDFLAGS $LIBS
6750         do
6751                 case $cf_library_path in #(vi
6752                 -L*)
6753                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6754
6755 test "x$cf_library_path" != "xNONE" && \
6756 test -d "$cf_library_path" && \
6757  {
6758         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
6759         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
6760         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6761         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6762         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6763         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"
6764 }
6765
6766                         cf_library_path_list="$cf_library_path_list $cf_search"
6767                         ;;
6768                 esac
6769         done
6770 fi
6771
6772 cf_search=
6773
6774 test "x/usr" != "x$prefix" && \
6775 test -d "/usr" && \
6776 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
6777         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
6778         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
6779         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
6780         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6781         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
6782         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6783 }
6784
6785 test "x$prefix" != "xNONE" && \
6786 test -d "$prefix" && \
6787  {
6788         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
6789         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
6790         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6791         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6792         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6793         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6794 }
6795
6796 test "x/usr/local" != "x$prefix" && \
6797 test -d "/usr/local" && \
6798 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
6799         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
6800         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
6801         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6802         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6803         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6804         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6805 }
6806
6807 test "x/opt" != "x$prefix" && \
6808 test -d "/opt" && \
6809 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
6810         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
6811         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
6812         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
6813         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6814         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
6815         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6816 }
6817
6818 test "x$HOME" != "x$prefix" && \
6819 test -d "$HOME" && \
6820 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
6821         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
6822         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
6823         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6824         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6825         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6826         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6827 }
6828
6829 cf_search="$cf_library_path_list $cf_search"
6830
6831                         for cf_libdir in $cf_search
6832                         do
6833                                 echo "$as_me:6833: checking for -l$cf_nculib_root in $cf_libdir" >&5
6834 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6835                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6836                                 cat >conftest.$ac_ext <<_ACEOF
6837 #line 6837 "configure"
6838 #include "confdefs.h"
6839 #include <${cf_cv_ncurses_header:-curses.h}>
6840 int
6841 main ()
6842 {
6843 initscr()
6844   ;
6845   return 0;
6846 }
6847 _ACEOF
6848 rm -f conftest.$ac_objext conftest$ac_exeext
6849 if { (eval echo "$as_me:6849: \"$ac_link\"") >&5
6850   (eval $ac_link) 2>&5
6851   ac_status=$?
6852   echo "$as_me:6852: \$? = $ac_status" >&5
6853   (exit $ac_status); } &&
6854          { ac_try='test -s conftest$ac_exeext'
6855   { (eval echo "$as_me:6855: \"$ac_try\"") >&5
6856   (eval $ac_try) 2>&5
6857   ac_status=$?
6858   echo "$as_me:6858: \$? = $ac_status" >&5
6859   (exit $ac_status); }; }; then
6860   echo "$as_me:6860: result: yes" >&5
6861 echo "${ECHO_T}yes" >&6
6862                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6863                                          break
6864 else
6865   echo "$as_me: failed program was:" >&5
6866 cat conftest.$ac_ext >&5
6867 echo "$as_me:6867: result: no" >&5
6868 echo "${ECHO_T}no" >&6
6869                                          LIBS="$cf_save_LIBS"
6870 fi
6871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6872                         done
6873
6874 fi
6875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6876
6877 fi
6878
6879 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6880
6881 if test $cf_found_library = no ; then
6882         { { echo "$as_me:6882: error: Cannot link $cf_nculib_root library" >&5
6883 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6884    { (exit 1); exit 1; }; }
6885 fi
6886
6887 fi
6888
6889 if test -n "$cf_ncurses_LIBS" ; then
6890         echo "$as_me:6890: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6891 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6892         cf_ncurses_SAVE="$LIBS"
6893         for p in $cf_ncurses_LIBS ; do
6894                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6895                 if test "$q" != "$LIBS" ; then
6896                         LIBS="$q"
6897                 fi
6898         done
6899         cat >conftest.$ac_ext <<_ACEOF
6900 #line 6900 "configure"
6901 #include "confdefs.h"
6902 #include <${cf_cv_ncurses_header:-curses.h}>
6903 int
6904 main ()
6905 {
6906 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6907   ;
6908   return 0;
6909 }
6910 _ACEOF
6911 rm -f conftest.$ac_objext conftest$ac_exeext
6912 if { (eval echo "$as_me:6912: \"$ac_link\"") >&5
6913   (eval $ac_link) 2>&5
6914   ac_status=$?
6915   echo "$as_me:6915: \$? = $ac_status" >&5
6916   (exit $ac_status); } &&
6917          { ac_try='test -s conftest$ac_exeext'
6918   { (eval echo "$as_me:6918: \"$ac_try\"") >&5
6919   (eval $ac_try) 2>&5
6920   ac_status=$?
6921   echo "$as_me:6921: \$? = $ac_status" >&5
6922   (exit $ac_status); }; }; then
6923   echo "$as_me:6923: result: yes" >&5
6924 echo "${ECHO_T}yes" >&6
6925 else
6926   echo "$as_me: failed program was:" >&5
6927 cat conftest.$ac_ext >&5
6928 echo "$as_me:6928: result: no" >&5
6929 echo "${ECHO_T}no" >&6
6930                  LIBS="$cf_ncurses_SAVE"
6931 fi
6932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6933 fi
6934
6935 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6936
6937 cat >>confdefs.h <<EOF
6938 #define $cf_nculib_ROOT 1
6939 EOF
6940
6941 fi
6942
6943         ;;
6944 ncursesw) #(vi
6945
6946 echo "$as_me:6946: checking for multibyte character support" >&5
6947 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6948 if test "${cf_cv_utf8_lib+set}" = set; then
6949   echo $ECHO_N "(cached) $ECHO_C" >&6
6950 else
6951
6952         cf_save_LIBS="$LIBS"
6953         cat >conftest.$ac_ext <<_ACEOF
6954 #line 6954 "configure"
6955 #include "confdefs.h"
6956
6957 #include <stdlib.h>
6958 int
6959 main ()
6960 {
6961 putwc(0,0);
6962   ;
6963   return 0;
6964 }
6965 _ACEOF
6966 rm -f conftest.$ac_objext conftest$ac_exeext
6967 if { (eval echo "$as_me:6967: \"$ac_link\"") >&5
6968   (eval $ac_link) 2>&5
6969   ac_status=$?
6970   echo "$as_me:6970: \$? = $ac_status" >&5
6971   (exit $ac_status); } &&
6972          { ac_try='test -s conftest$ac_exeext'
6973   { (eval echo "$as_me:6973: \"$ac_try\"") >&5
6974   (eval $ac_try) 2>&5
6975   ac_status=$?
6976   echo "$as_me:6976: \$? = $ac_status" >&5
6977   (exit $ac_status); }; }; then
6978   cf_cv_utf8_lib=yes
6979 else
6980   echo "$as_me: failed program was:" >&5
6981 cat conftest.$ac_ext >&5
6982
6983 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6984 # will be set on completion of the AC_TRY_LINK below.
6985 cf_cv_header_path_utf8=
6986 cf_cv_library_path_utf8=
6987
6988 echo "${as_me:-configure}:6988: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6989
6990 cf_save_LIBS="$LIBS"
6991
6992 cat >conftest.$ac_ext <<_ACEOF
6993 #line 6993 "configure"
6994 #include "confdefs.h"
6995
6996 #include <libutf8.h>
6997 int
6998 main ()
6999 {
7000 putwc(0,0);
7001   ;
7002   return 0;
7003 }
7004 _ACEOF
7005 rm -f conftest.$ac_objext conftest$ac_exeext
7006 if { (eval echo "$as_me:7006: \"$ac_link\"") >&5
7007   (eval $ac_link) 2>&5
7008   ac_status=$?
7009   echo "$as_me:7009: \$? = $ac_status" >&5
7010   (exit $ac_status); } &&
7011          { ac_try='test -s conftest$ac_exeext'
7012   { (eval echo "$as_me:7012: \"$ac_try\"") >&5
7013   (eval $ac_try) 2>&5
7014   ac_status=$?
7015   echo "$as_me:7015: \$? = $ac_status" >&5
7016   (exit $ac_status); }; }; then
7017
7018         cf_cv_find_linkage_utf8=yes
7019         cf_cv_header_path_utf8=/usr/include
7020         cf_cv_library_path_utf8=/usr/lib
7021
7022 else
7023   echo "$as_me: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025
7026 LIBS="-lutf8  $cf_save_LIBS"
7027
7028 cat >conftest.$ac_ext <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7031
7032 #include <libutf8.h>
7033 int
7034 main ()
7035 {
7036 putwc(0,0);
7037   ;
7038   return 0;
7039 }
7040 _ACEOF
7041 rm -f conftest.$ac_objext conftest$ac_exeext
7042 if { (eval echo "$as_me:7042: \"$ac_link\"") >&5
7043   (eval $ac_link) 2>&5
7044   ac_status=$?
7045   echo "$as_me:7045: \$? = $ac_status" >&5
7046   (exit $ac_status); } &&
7047          { ac_try='test -s conftest$ac_exeext'
7048   { (eval echo "$as_me:7048: \"$ac_try\"") >&5
7049   (eval $ac_try) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit $ac_status); }; }; then
7053
7054         cf_cv_find_linkage_utf8=yes
7055         cf_cv_header_path_utf8=/usr/include
7056         cf_cv_library_path_utf8=/usr/lib
7057         cf_cv_library_file_utf8="-lutf8"
7058
7059 else
7060   echo "$as_me: failed program was:" >&5
7061 cat conftest.$ac_ext >&5
7062
7063         cf_cv_find_linkage_utf8=no
7064         LIBS="$cf_save_LIBS"
7065
7066     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7067
7068 echo "${as_me:-configure}:7068: testing find linkage for utf8 library ..." 1>&5
7069
7070 echo "${as_me:-configure}:7070: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7071
7072     cf_save_CPPFLAGS="$CPPFLAGS"
7073     cf_test_CPPFLAGS="$CPPFLAGS"
7074
7075 cf_search=
7076
7077 # collect the current set of include-directories from compiler flags
7078 cf_header_path_list=""
7079 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7080         for cf_header_path in $CPPFLAGS $CFLAGS
7081         do
7082                 case $cf_header_path in #(vi
7083                 -I*)
7084                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7085
7086 test "x$cf_header_path" != "xNONE" && \
7087 test -d "$cf_header_path" && \
7088  {
7089         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7090         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7091         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7092         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7093         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7094         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7095 }
7096
7097                         cf_header_path_list="$cf_header_path_list $cf_search"
7098                         ;;
7099                 esac
7100         done
7101 fi
7102
7103 # add the variations for the package we are looking for
7104
7105 cf_search=
7106
7107 test "x/usr" != "x$prefix" && \
7108 test -d "/usr" && \
7109 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7110         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7111         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7112         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7113         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7114         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7115         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7116 }
7117
7118 test "x$prefix" != "xNONE" && \
7119 test -d "$prefix" && \
7120  {
7121         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7122         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7123         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7124         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7125         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7126         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7127 }
7128
7129 test "x/usr/local" != "x$prefix" && \
7130 test -d "/usr/local" && \
7131 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7132         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7133         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7134         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7135         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7136         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7137         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7138 }
7139
7140 test "x/opt" != "x$prefix" && \
7141 test -d "/opt" && \
7142 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
7143         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7144         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7145         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7146         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7147         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7148         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7149 }
7150
7151 test "x$HOME" != "x$prefix" && \
7152 test -d "$HOME" && \
7153 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
7154         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7155         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7156         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7157         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7158         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7159         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7160 }
7161
7162 test "$includedir" != NONE && \
7163 test "$includedir" != "/usr/include" && \
7164 test -d "$includedir" && {
7165         test -d $includedir &&    cf_search="$cf_search $includedir"
7166         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7167 }
7168
7169 test "$oldincludedir" != NONE && \
7170 test "$oldincludedir" != "/usr/include" && \
7171 test -d "$oldincludedir" && {
7172         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7173         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7174 }
7175
7176 cf_search="$cf_search $cf_header_path_list"
7177
7178     for cf_cv_header_path_utf8 in $cf_search
7179     do
7180       if test -d $cf_cv_header_path_utf8 ; then
7181         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7182
7183 echo "${as_me:-configure}:7183: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7184
7185         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7186         cat >conftest.$ac_ext <<_ACEOF
7187 #line 7187 "configure"
7188 #include "confdefs.h"
7189
7190 #include <libutf8.h>
7191 int
7192 main ()
7193 {
7194 putwc(0,0);
7195   ;
7196   return 0;
7197 }
7198 _ACEOF
7199 rm -f conftest.$ac_objext
7200 if { (eval echo "$as_me:7200: \"$ac_compile\"") >&5
7201   (eval $ac_compile) 2>&5
7202   ac_status=$?
7203   echo "$as_me:7203: \$? = $ac_status" >&5
7204   (exit $ac_status); } &&
7205          { ac_try='test -s conftest.$ac_objext'
7206   { (eval echo "$as_me:7206: \"$ac_try\"") >&5
7207   (eval $ac_try) 2>&5
7208   ac_status=$?
7209   echo "$as_me:7209: \$? = $ac_status" >&5
7210   (exit $ac_status); }; }; then
7211
7212             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7213
7214 echo "${as_me:-configure}:7214: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7215
7216             cf_cv_find_linkage_utf8=maybe
7217             cf_test_CPPFLAGS="$CPPFLAGS"
7218             break
7219 else
7220   echo "$as_me: failed program was:" >&5
7221 cat conftest.$ac_ext >&5
7222
7223             CPPFLAGS="$cf_save_CPPFLAGS"
7224
7225 fi
7226 rm -f conftest.$ac_objext conftest.$ac_ext
7227       fi
7228     done
7229
7230     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7231
7232 echo "${as_me:-configure}:7232: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7233
7234       cf_save_LIBS="$LIBS"
7235       cf_save_LDFLAGS="$LDFLAGS"
7236
7237       if test "$cf_cv_find_linkage_utf8" != yes ; then
7238
7239 cf_search=
7240 cf_library_path_list=""
7241 if test -n "${LDFLAGS}${LIBS}" ; then
7242         for cf_library_path in $LDFLAGS $LIBS
7243         do
7244                 case $cf_library_path in #(vi
7245                 -L*)
7246                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7247
7248 test "x$cf_library_path" != "xNONE" && \
7249 test -d "$cf_library_path" && \
7250  {
7251         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7252         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7253         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7254         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7255         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7256         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7257 }
7258
7259                         cf_library_path_list="$cf_library_path_list $cf_search"
7260                         ;;
7261                 esac
7262         done
7263 fi
7264
7265 cf_search=
7266
7267 test "x/usr" != "x$prefix" && \
7268 test -d "/usr" && \
7269 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7270         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7271         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7272         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7273         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7274         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7275         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7276 }
7277
7278 test "x$prefix" != "xNONE" && \
7279 test -d "$prefix" && \
7280  {
7281         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7282         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7283         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7284         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7285         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7286         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7287 }
7288
7289 test "x/usr/local" != "x$prefix" && \
7290 test -d "/usr/local" && \
7291 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7292         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7293         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7294         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7295         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7296         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7297         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7298 }
7299
7300 test "x/opt" != "x$prefix" && \
7301 test -d "/opt" && \
7302 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
7303         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7304         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7305         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7306         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7307         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7308         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7309 }
7310
7311 test "x$HOME" != "x$prefix" && \
7312 test -d "$HOME" && \
7313 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
7314         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7315         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7316         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7317         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7318         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7319         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7320 }
7321
7322 cf_search="$cf_library_path_list $cf_search"
7323
7324         for cf_cv_library_path_utf8 in $cf_search
7325         do
7326           if test -d $cf_cv_library_path_utf8 ; then
7327             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7328
7329 echo "${as_me:-configure}:7329: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7330
7331             CPPFLAGS="$cf_test_CPPFLAGS"
7332             LIBS="-lutf8  $cf_save_LIBS"
7333             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7334             cat >conftest.$ac_ext <<_ACEOF
7335 #line 7335 "configure"
7336 #include "confdefs.h"
7337
7338 #include <libutf8.h>
7339 int
7340 main ()
7341 {
7342 putwc(0,0);
7343   ;
7344   return 0;
7345 }
7346 _ACEOF
7347 rm -f conftest.$ac_objext conftest$ac_exeext
7348 if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
7349   (eval $ac_link) 2>&5
7350   ac_status=$?
7351   echo "$as_me:7351: \$? = $ac_status" >&5
7352   (exit $ac_status); } &&
7353          { ac_try='test -s conftest$ac_exeext'
7354   { (eval echo "$as_me:7354: \"$ac_try\"") >&5
7355   (eval $ac_try) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit $ac_status); }; }; then
7359
7360                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7361
7362 echo "${as_me:-configure}:7362: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7363
7364                 cf_cv_find_linkage_utf8=yes
7365                 cf_cv_library_file_utf8="-lutf8"
7366                 break
7367 else
7368   echo "$as_me: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370
7371                 CPPFLAGS="$cf_save_CPPFLAGS"
7372                 LIBS="$cf_save_LIBS"
7373                 LDFLAGS="$cf_save_LDFLAGS"
7374
7375 fi
7376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7377           fi
7378         done
7379         CPPFLAGS="$cf_save_CPPFLAGS"
7380         LDFLAGS="$cf_save_LDFLAGS"
7381       fi
7382
7383     else
7384       cf_cv_find_linkage_utf8=no
7385     fi
7386
7387 fi
7388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7389
7390 fi
7391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7392
7393 LIBS="$cf_save_LIBS"
7394
7395 if test "$cf_cv_find_linkage_utf8" = yes ; then
7396 cf_cv_utf8_lib=add-on
7397 else
7398 cf_cv_utf8_lib=no
7399 fi
7400
7401 fi
7402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7403 fi
7404 echo "$as_me:7404: result: $cf_cv_utf8_lib" >&5
7405 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7406
7407 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7408 # ncurses/ncursesw:
7409 if test "$cf_cv_utf8_lib" = "add-on" ; then
7410
7411 cat >>confdefs.h <<\EOF
7412 #define HAVE_LIBUTF8_H 1
7413 EOF
7414
7415 if test -n "$cf_cv_header_path_utf8" ; then
7416   for cf_add_incdir in $cf_cv_header_path_utf8
7417   do
7418         while test $cf_add_incdir != /usr/include
7419         do
7420           if test -d $cf_add_incdir
7421           then
7422                 cf_have_incdir=no
7423                 if test -n "$CFLAGS$CPPFLAGS" ; then
7424                   # a loop is needed to ensure we can add subdirs of existing dirs
7425                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7426                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7427                           cf_have_incdir=yes; break
7428                         fi
7429                   done
7430                 fi
7431
7432                 if test "$cf_have_incdir" = no ; then
7433                   if test "$cf_add_incdir" = /usr/local/include ; then
7434                         if test "$GCC" = yes
7435                         then
7436                           cf_save_CPPFLAGS=$CPPFLAGS
7437                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7438                           cat >conftest.$ac_ext <<_ACEOF
7439 #line 7439 "configure"
7440 #include "confdefs.h"
7441 #include <stdio.h>
7442 int
7443 main ()
7444 {
7445 printf("Hello")
7446   ;
7447   return 0;
7448 }
7449 _ACEOF
7450 rm -f conftest.$ac_objext
7451 if { (eval echo "$as_me:7451: \"$ac_compile\"") >&5
7452   (eval $ac_compile) 2>&5
7453   ac_status=$?
7454   echo "$as_me:7454: \$? = $ac_status" >&5
7455   (exit $ac_status); } &&
7456          { ac_try='test -s conftest.$ac_objext'
7457   { (eval echo "$as_me:7457: \"$ac_try\"") >&5
7458   (eval $ac_try) 2>&5
7459   ac_status=$?
7460   echo "$as_me:7460: \$? = $ac_status" >&5
7461   (exit $ac_status); }; }; then
7462   :
7463 else
7464   echo "$as_me: failed program was:" >&5
7465 cat conftest.$ac_ext >&5
7466 cf_have_incdir=yes
7467 fi
7468 rm -f conftest.$ac_objext conftest.$ac_ext
7469                           CPPFLAGS=$cf_save_CPPFLAGS
7470                         fi
7471                   fi
7472                 fi
7473
7474                 if test "$cf_have_incdir" = no ; then
7475                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7476
7477 echo "${as_me:-configure}:7477: testing adding $cf_add_incdir to include-path ..." 1>&5
7478
7479                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7480
7481                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7482                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7483                   cf_add_incdir="$cf_top_incdir"
7484                 else
7485                   break
7486                 fi
7487           fi
7488         done
7489   done
7490 fi
7491
7492 if test -n "$cf_cv_library_path_utf8" ; then
7493   for cf_add_libdir in $cf_cv_library_path_utf8
7494   do
7495     if test $cf_add_libdir = /usr/lib ; then
7496       :
7497     elif test -d $cf_add_libdir
7498     then
7499       cf_have_libdir=no
7500       if test -n "$LDFLAGS$LIBS" ; then
7501         # a loop is needed to ensure we can add subdirs of existing dirs
7502         for cf_test_libdir in $LDFLAGS $LIBS ; do
7503           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7504             cf_have_libdir=yes; break
7505           fi
7506         done
7507       fi
7508       if test "$cf_have_libdir" = no ; then
7509         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7510
7511 echo "${as_me:-configure}:7511: testing adding $cf_add_libdir to library-path ..." 1>&5
7512
7513         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7514       fi
7515     fi
7516   done
7517 fi
7518
7519 cf_add_libs="$cf_cv_library_file_utf8"
7520 # Filter out duplicates - this happens with badly-designed ".pc" files...
7521 for cf_add_1lib in $LIBS
7522 do
7523         for cf_add_2lib in $cf_add_libs
7524         do
7525                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7526                 then
7527                         cf_add_1lib=
7528                         break
7529                 fi
7530         done
7531         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7532 done
7533 LIBS="$cf_add_libs"
7534
7535 fi
7536
7537 cf_ncuconfig_root=ncursesw
7538
7539 echo "Looking for ${cf_ncuconfig_root}-config"
7540
7541 if test -n "$ac_tool_prefix"; then
7542   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7543   do
7544     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7545 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7546 echo "$as_me:7546: checking for $ac_word" >&5
7547 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7548 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7549   echo $ECHO_N "(cached) $ECHO_C" >&6
7550 else
7551   if test -n "$NCURSES_CONFIG"; then
7552   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7553 else
7554   ac_save_IFS=$IFS; IFS=$ac_path_separator
7555 ac_dummy="$PATH"
7556 for ac_dir in $ac_dummy; do
7557   IFS=$ac_save_IFS
7558   test -z "$ac_dir" && ac_dir=.
7559   $as_executable_p "$ac_dir/$ac_word" || continue
7560 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7561 echo "$as_me:7561: found $ac_dir/$ac_word" >&5
7562 break
7563 done
7564
7565 fi
7566 fi
7567 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7568 if test -n "$NCURSES_CONFIG"; then
7569   echo "$as_me:7569: result: $NCURSES_CONFIG" >&5
7570 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7571 else
7572   echo "$as_me:7572: result: no" >&5
7573 echo "${ECHO_T}no" >&6
7574 fi
7575
7576     test -n "$NCURSES_CONFIG" && break
7577   done
7578 fi
7579 if test -z "$NCURSES_CONFIG"; then
7580   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7581   for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7582 do
7583   # Extract the first word of "$ac_prog", so it can be a program name with args.
7584 set dummy $ac_prog; ac_word=$2
7585 echo "$as_me:7585: checking for $ac_word" >&5
7586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7587 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7588   echo $ECHO_N "(cached) $ECHO_C" >&6
7589 else
7590   if test -n "$ac_ct_NCURSES_CONFIG"; then
7591   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7592 else
7593   ac_save_IFS=$IFS; IFS=$ac_path_separator
7594 ac_dummy="$PATH"
7595 for ac_dir in $ac_dummy; do
7596   IFS=$ac_save_IFS
7597   test -z "$ac_dir" && ac_dir=.
7598   $as_executable_p "$ac_dir/$ac_word" || continue
7599 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7600 echo "$as_me:7600: found $ac_dir/$ac_word" >&5
7601 break
7602 done
7603
7604 fi
7605 fi
7606 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7607 if test -n "$ac_ct_NCURSES_CONFIG"; then
7608   echo "$as_me:7608: result: $ac_ct_NCURSES_CONFIG" >&5
7609 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7610 else
7611   echo "$as_me:7611: result: no" >&5
7612 echo "${ECHO_T}no" >&6
7613 fi
7614
7615   test -n "$ac_ct_NCURSES_CONFIG" && break
7616 done
7617 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7618
7619   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7620 fi
7621
7622 if test "$NCURSES_CONFIG" != none ; then
7623
7624 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7625
7626 cf_add_libs="`$NCURSES_CONFIG --libs`"
7627 # Filter out duplicates - this happens with badly-designed ".pc" files...
7628 for cf_add_1lib in $LIBS
7629 do
7630         for cf_add_2lib in $cf_add_libs
7631         do
7632                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7633                 then
7634                         cf_add_1lib=
7635                         break
7636                 fi
7637         done
7638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7639 done
7640 LIBS="$cf_add_libs"
7641
7642 # even with config script, some packages use no-override for curses.h
7643
7644 echo "$as_me:7644: checking if we have identified curses headers" >&5
7645 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7646 if test "${cf_cv_ncurses_header+set}" = set; then
7647   echo $ECHO_N "(cached) $ECHO_C" >&6
7648 else
7649
7650 cf_cv_ncurses_header=none
7651 for cf_header in  \
7652     ncursesw/ncurses.h \
7653         ncursesw/curses.h \
7654         ncurses.h \
7655         curses.h
7656 do
7657 cat >conftest.$ac_ext <<_ACEOF
7658 #line 7658 "configure"
7659 #include "confdefs.h"
7660 #include <${cf_header}>
7661 int
7662 main ()
7663 {
7664 initscr(); tgoto("?", 0,0)
7665   ;
7666   return 0;
7667 }
7668 _ACEOF
7669 rm -f conftest.$ac_objext
7670 if { (eval echo "$as_me:7670: \"$ac_compile\"") >&5
7671   (eval $ac_compile) 2>&5
7672   ac_status=$?
7673   echo "$as_me:7673: \$? = $ac_status" >&5
7674   (exit $ac_status); } &&
7675          { ac_try='test -s conftest.$ac_objext'
7676   { (eval echo "$as_me:7676: \"$ac_try\"") >&5
7677   (eval $ac_try) 2>&5
7678   ac_status=$?
7679   echo "$as_me:7679: \$? = $ac_status" >&5
7680   (exit $ac_status); }; }; then
7681   cf_cv_ncurses_header=$cf_header; break
7682 else
7683   echo "$as_me: failed program was:" >&5
7684 cat conftest.$ac_ext >&5
7685 fi
7686 rm -f conftest.$ac_objext conftest.$ac_ext
7687 done
7688
7689 fi
7690 echo "$as_me:7690: result: $cf_cv_ncurses_header" >&5
7691 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7692
7693 if test "$cf_cv_ncurses_header" = none ; then
7694         { { echo "$as_me:7694: error: No curses header-files found" >&5
7695 echo "$as_me: error: No curses header-files found" >&2;}
7696    { (exit 1); exit 1; }; }
7697 fi
7698
7699 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7700
7701 for ac_header in $cf_cv_ncurses_header
7702 do
7703 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7704 echo "$as_me:7704: checking for $ac_header" >&5
7705 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7706 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7707   echo $ECHO_N "(cached) $ECHO_C" >&6
7708 else
7709   cat >conftest.$ac_ext <<_ACEOF
7710 #line 7710 "configure"
7711 #include "confdefs.h"
7712 #include <$ac_header>
7713 _ACEOF
7714 if { (eval echo "$as_me:7714: \"$ac_cpp conftest.$ac_ext\"") >&5
7715   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7716   ac_status=$?
7717   egrep -v '^ *\+' conftest.er1 >conftest.err
7718   rm -f conftest.er1
7719   cat conftest.err >&5
7720   echo "$as_me:7720: \$? = $ac_status" >&5
7721   (exit $ac_status); } >/dev/null; then
7722   if test -s conftest.err; then
7723     ac_cpp_err=$ac_c_preproc_warn_flag
7724   else
7725     ac_cpp_err=
7726   fi
7727 else
7728   ac_cpp_err=yes
7729 fi
7730 if test -z "$ac_cpp_err"; then
7731   eval "$as_ac_Header=yes"
7732 else
7733   echo "$as_me: failed program was:" >&5
7734   cat conftest.$ac_ext >&5
7735   eval "$as_ac_Header=no"
7736 fi
7737 rm -f conftest.err conftest.$ac_ext
7738 fi
7739 echo "$as_me:7739: result: `eval echo '${'$as_ac_Header'}'`" >&5
7740 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7741 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7742   cat >>confdefs.h <<EOF
7743 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7744 EOF
7745
7746 fi
7747 done
7748
7749 cat >>confdefs.h <<\EOF
7750 #define NCURSES 1
7751 EOF
7752
7753 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7754
7755 cat >>confdefs.h <<EOF
7756 #define $cf_nculib_ROOT 1
7757 EOF
7758
7759 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7760
7761 else
7762
7763 cf_ncuhdr_root=ncursesw
7764
7765 test -n "$cf_cv_curses_dir" && \
7766 test "$cf_cv_curses_dir" != "no" && { \
7767
7768 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7769   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7770   do
7771         while test $cf_add_incdir != /usr/include
7772         do
7773           if test -d $cf_add_incdir
7774           then
7775                 cf_have_incdir=no
7776                 if test -n "$CFLAGS$CPPFLAGS" ; then
7777                   # a loop is needed to ensure we can add subdirs of existing dirs
7778                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7779                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7780                           cf_have_incdir=yes; break
7781                         fi
7782                   done
7783                 fi
7784
7785                 if test "$cf_have_incdir" = no ; then
7786                   if test "$cf_add_incdir" = /usr/local/include ; then
7787                         if test "$GCC" = yes
7788                         then
7789                           cf_save_CPPFLAGS=$CPPFLAGS
7790                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7791                           cat >conftest.$ac_ext <<_ACEOF
7792 #line 7792 "configure"
7793 #include "confdefs.h"
7794 #include <stdio.h>
7795 int
7796 main ()
7797 {
7798 printf("Hello")
7799   ;
7800   return 0;
7801 }
7802 _ACEOF
7803 rm -f conftest.$ac_objext
7804 if { (eval echo "$as_me:7804: \"$ac_compile\"") >&5
7805   (eval $ac_compile) 2>&5
7806   ac_status=$?
7807   echo "$as_me:7807: \$? = $ac_status" >&5
7808   (exit $ac_status); } &&
7809          { ac_try='test -s conftest.$ac_objext'
7810   { (eval echo "$as_me:7810: \"$ac_try\"") >&5
7811   (eval $ac_try) 2>&5
7812   ac_status=$?
7813   echo "$as_me:7813: \$? = $ac_status" >&5
7814   (exit $ac_status); }; }; then
7815   :
7816 else
7817   echo "$as_me: failed program was:" >&5
7818 cat conftest.$ac_ext >&5
7819 cf_have_incdir=yes
7820 fi
7821 rm -f conftest.$ac_objext conftest.$ac_ext
7822                           CPPFLAGS=$cf_save_CPPFLAGS
7823                         fi
7824                   fi
7825                 fi
7826
7827                 if test "$cf_have_incdir" = no ; then
7828                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7829
7830 echo "${as_me:-configure}:7830: testing adding $cf_add_incdir to include-path ..." 1>&5
7831
7832                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7833
7834                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7835                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7836                   cf_add_incdir="$cf_top_incdir"
7837                 else
7838                   break
7839                 fi
7840           fi
7841         done
7842   done
7843 fi
7844
7845 }
7846
7847 echo "$as_me:7847: checking for $cf_ncuhdr_root header in include-path" >&5
7848 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7849 if test "${cf_cv_ncurses_h+set}" = set; then
7850   echo $ECHO_N "(cached) $ECHO_C" >&6
7851 else
7852
7853         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7854         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7855         for cf_header in $cf_header_list
7856         do
7857
7858         cat >conftest.$ac_ext <<_ACEOF
7859 #line 7859 "configure"
7860 #include "confdefs.h"
7861
7862 #define _XOPEN_SOURCE_EXTENDED
7863 #undef  HAVE_LIBUTF8_H  /* in case we used CF_UTF8_LIB */
7864 #define HAVE_LIBUTF8_H  /* to force ncurses' header file to use cchar_t */
7865
7866 #include <$cf_header>
7867 int
7868 main ()
7869 {
7870
7871 #ifdef NCURSES_VERSION
7872
7873 #ifndef WACS_BSSB
7874         make an error
7875 #endif
7876
7877 printf("%s\n", NCURSES_VERSION);
7878 #else
7879 #ifdef __NCURSES_H
7880 printf("old\n");
7881 #else
7882         make an error
7883 #endif
7884 #endif
7885
7886   ;
7887   return 0;
7888 }
7889 _ACEOF
7890 rm -f conftest.$ac_objext
7891 if { (eval echo "$as_me:7891: \"$ac_compile\"") >&5
7892   (eval $ac_compile) 2>&5
7893   ac_status=$?
7894   echo "$as_me:7894: \$? = $ac_status" >&5
7895   (exit $ac_status); } &&
7896          { ac_try='test -s conftest.$ac_objext'
7897   { (eval echo "$as_me:7897: \"$ac_try\"") >&5
7898   (eval $ac_try) 2>&5
7899   ac_status=$?
7900   echo "$as_me:7900: \$? = $ac_status" >&5
7901   (exit $ac_status); }; }; then
7902   cf_cv_ncurses_h=$cf_header
7903
7904 else
7905   echo "$as_me: failed program was:" >&5
7906 cat conftest.$ac_ext >&5
7907 cf_cv_ncurses_h=no
7908 fi
7909 rm -f conftest.$ac_objext conftest.$ac_ext
7910
7911                 test "$cf_cv_ncurses_h" != no && break
7912         done
7913
7914 fi
7915 echo "$as_me:7915: result: $cf_cv_ncurses_h" >&5
7916 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7917
7918 if test "$cf_cv_ncurses_h" != no ; then
7919         cf_cv_ncurses_header=$cf_cv_ncurses_h
7920 else
7921
7922 echo "$as_me:7922: checking for $cf_ncuhdr_root include-path" >&5
7923 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7924 if test "${cf_cv_ncurses_h2+set}" = set; then
7925   echo $ECHO_N "(cached) $ECHO_C" >&6
7926 else
7927
7928         test -n "$verbose" && echo
7929
7930 cf_search=
7931
7932 # collect the current set of include-directories from compiler flags
7933 cf_header_path_list=""
7934 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7935         for cf_header_path in $CPPFLAGS $CFLAGS
7936         do
7937                 case $cf_header_path in #(vi
7938                 -I*)
7939                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7940
7941 test "x$cf_header_path" != "xNONE" && \
7942 test -d "$cf_header_path" && \
7943  {
7944         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7945         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7946         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7947         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7948         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7949         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"
7950 }
7951
7952                         cf_header_path_list="$cf_header_path_list $cf_search"
7953                         ;;
7954                 esac
7955         done
7956 fi
7957
7958 # add the variations for the package we are looking for
7959
7960 cf_search=
7961
7962 test "x/usr" != "x$prefix" && \
7963 test -d "/usr" && \
7964 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
7965         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7966         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7967         test -d /usr/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
7968         test -d /usr/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
7969         test -d /usr/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
7970         test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7971 }
7972
7973 test "x$prefix" != "xNONE" && \
7974 test -d "$prefix" && \
7975  {
7976         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7977         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7978         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7979         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7980         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7981         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7982 }
7983
7984 test "x/usr/local" != "x$prefix" && \
7985 test -d "/usr/local" && \
7986 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
7987         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7988         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7989         test -d /usr/local/include/$cf_ncuhdr_root &&       cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
7990         test -d /usr/local/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
7991         test -d /usr/local/$cf_ncuhdr_root/include &&       cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
7992         test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7993 }
7994
7995 test "x/opt" != "x$prefix" && \
7996 test -d "/opt" && \
7997 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
7998         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7999         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8000         test -d /opt/include/$cf_ncuhdr_root &&       cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8001         test -d /opt/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8002         test -d /opt/$cf_ncuhdr_root/include &&       cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8003         test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8004 }
8005
8006 test "x$HOME" != "x$prefix" && \
8007 test -d "$HOME" && \
8008 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
8009         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8010         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8011         test -d $HOME/include/$cf_ncuhdr_root &&       cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8012         test -d $HOME/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8013         test -d $HOME/$cf_ncuhdr_root/include &&       cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8014         test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8015 }
8016
8017 test "$includedir" != NONE && \
8018 test "$includedir" != "/usr/include" && \
8019 test -d "$includedir" && {
8020         test -d $includedir &&    cf_search="$cf_search $includedir"
8021         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8022 }
8023
8024 test "$oldincludedir" != NONE && \
8025 test "$oldincludedir" != "/usr/include" && \
8026 test -d "$oldincludedir" && {
8027         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8028         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8029 }
8030
8031 cf_search="$cf_search $cf_header_path_list"
8032
8033         test -n "$verbose" && echo search path $cf_search
8034         cf_save2_CPPFLAGS="$CPPFLAGS"
8035         for cf_incdir in $cf_search
8036         do
8037
8038 if test -n "$cf_incdir" ; then
8039   for cf_add_incdir in $cf_incdir
8040   do
8041         while test $cf_add_incdir != /usr/include
8042         do
8043           if test -d $cf_add_incdir
8044           then
8045                 cf_have_incdir=no
8046                 if test -n "$CFLAGS$CPPFLAGS" ; then
8047                   # a loop is needed to ensure we can add subdirs of existing dirs
8048                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8049                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8050                           cf_have_incdir=yes; break
8051                         fi
8052                   done
8053                 fi
8054
8055                 if test "$cf_have_incdir" = no ; then
8056                   if test "$cf_add_incdir" = /usr/local/include ; then
8057                         if test "$GCC" = yes
8058                         then
8059                           cf_save_CPPFLAGS=$CPPFLAGS
8060                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8061                           cat >conftest.$ac_ext <<_ACEOF
8062 #line 8062 "configure"
8063 #include "confdefs.h"
8064 #include <stdio.h>
8065 int
8066 main ()
8067 {
8068 printf("Hello")
8069   ;
8070   return 0;
8071 }
8072 _ACEOF
8073 rm -f conftest.$ac_objext
8074 if { (eval echo "$as_me:8074: \"$ac_compile\"") >&5
8075   (eval $ac_compile) 2>&5
8076   ac_status=$?
8077   echo "$as_me:8077: \$? = $ac_status" >&5
8078   (exit $ac_status); } &&
8079          { ac_try='test -s conftest.$ac_objext'
8080   { (eval echo "$as_me:8080: \"$ac_try\"") >&5
8081   (eval $ac_try) 2>&5
8082   ac_status=$?
8083   echo "$as_me:8083: \$? = $ac_status" >&5
8084   (exit $ac_status); }; }; then
8085   :
8086 else
8087   echo "$as_me: failed program was:" >&5
8088 cat conftest.$ac_ext >&5
8089 cf_have_incdir=yes
8090 fi
8091 rm -f conftest.$ac_objext conftest.$ac_ext
8092                           CPPFLAGS=$cf_save_CPPFLAGS
8093                         fi
8094                   fi
8095                 fi
8096
8097                 if test "$cf_have_incdir" = no ; then
8098                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8099
8100 echo "${as_me:-configure}:8100: testing adding $cf_add_incdir to include-path ..." 1>&5
8101
8102                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8103
8104                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8105                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8106                   cf_add_incdir="$cf_top_incdir"
8107                 else
8108                   break
8109                 fi
8110           fi
8111         done
8112   done
8113 fi
8114
8115                 for cf_header in \
8116                         ncurses.h \
8117                         curses.h
8118                 do
8119
8120         cat >conftest.$ac_ext <<_ACEOF
8121 #line 8121 "configure"
8122 #include "confdefs.h"
8123
8124 #include <$cf_header>
8125 int
8126 main ()
8127 {
8128
8129 #ifdef NCURSES_VERSION
8130
8131 printf("%s\n", NCURSES_VERSION);
8132 #else
8133 #ifdef __NCURSES_H
8134 printf("old\n");
8135 #else
8136         make an error
8137 #endif
8138 #endif
8139
8140   ;
8141   return 0;
8142 }
8143 _ACEOF
8144 rm -f conftest.$ac_objext
8145 if { (eval echo "$as_me:8145: \"$ac_compile\"") >&5
8146   (eval $ac_compile) 2>&5
8147   ac_status=$?
8148   echo "$as_me:8148: \$? = $ac_status" >&5
8149   (exit $ac_status); } &&
8150          { ac_try='test -s conftest.$ac_objext'
8151   { (eval echo "$as_me:8151: \"$ac_try\"") >&5
8152   (eval $ac_try) 2>&5
8153   ac_status=$?
8154   echo "$as_me:8154: \$? = $ac_status" >&5
8155   (exit $ac_status); }; }; then
8156   cf_cv_ncurses_h2=$cf_header
8157
8158 else
8159   echo "$as_me: failed program was:" >&5
8160 cat conftest.$ac_ext >&5
8161 cf_cv_ncurses_h2=no
8162 fi
8163 rm -f conftest.$ac_objext conftest.$ac_ext
8164
8165                         if test "$cf_cv_ncurses_h2" != no ; then
8166                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8167                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
8168                                 break
8169                         fi
8170                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
8171                 done
8172                 CPPFLAGS="$cf_save2_CPPFLAGS"
8173                 test "$cf_cv_ncurses_h2" != no && break
8174         done
8175         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8175: error: not found" >&5
8176 echo "$as_me: error: not found" >&2;}
8177    { (exit 1); exit 1; }; }
8178
8179 fi
8180 echo "$as_me:8180: result: $cf_cv_ncurses_h2" >&5
8181 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8182
8183         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8184         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8185         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8186                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8187         fi
8188
8189 if test -n "$cf_1st_incdir" ; then
8190   for cf_add_incdir in $cf_1st_incdir
8191   do
8192         while test $cf_add_incdir != /usr/include
8193         do
8194           if test -d $cf_add_incdir
8195           then
8196                 cf_have_incdir=no
8197                 if test -n "$CFLAGS$CPPFLAGS" ; then
8198                   # a loop is needed to ensure we can add subdirs of existing dirs
8199                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8200                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8201                           cf_have_incdir=yes; break
8202                         fi
8203                   done
8204                 fi
8205
8206                 if test "$cf_have_incdir" = no ; then
8207                   if test "$cf_add_incdir" = /usr/local/include ; then
8208                         if test "$GCC" = yes
8209                         then
8210                           cf_save_CPPFLAGS=$CPPFLAGS
8211                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8212                           cat >conftest.$ac_ext <<_ACEOF
8213 #line 8213 "configure"
8214 #include "confdefs.h"
8215 #include <stdio.h>
8216 int
8217 main ()
8218 {
8219 printf("Hello")
8220   ;
8221   return 0;
8222 }
8223 _ACEOF
8224 rm -f conftest.$ac_objext
8225 if { (eval echo "$as_me:8225: \"$ac_compile\"") >&5
8226   (eval $ac_compile) 2>&5
8227   ac_status=$?
8228   echo "$as_me:8228: \$? = $ac_status" >&5
8229   (exit $ac_status); } &&
8230          { ac_try='test -s conftest.$ac_objext'
8231   { (eval echo "$as_me:8231: \"$ac_try\"") >&5
8232   (eval $ac_try) 2>&5
8233   ac_status=$?
8234   echo "$as_me:8234: \$? = $ac_status" >&5
8235   (exit $ac_status); }; }; then
8236   :
8237 else
8238   echo "$as_me: failed program was:" >&5
8239 cat conftest.$ac_ext >&5
8240 cf_have_incdir=yes
8241 fi
8242 rm -f conftest.$ac_objext conftest.$ac_ext
8243                           CPPFLAGS=$cf_save_CPPFLAGS
8244                         fi
8245                   fi
8246                 fi
8247
8248                 if test "$cf_have_incdir" = no ; then
8249                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8250
8251 echo "${as_me:-configure}:8251: testing adding $cf_add_incdir to include-path ..." 1>&5
8252
8253                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8254
8255                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8256                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8257                   cf_add_incdir="$cf_top_incdir"
8258                 else
8259                   break
8260                 fi
8261           fi
8262         done
8263   done
8264 fi
8265
8266 fi
8267
8268 # Set definitions to allow ifdef'ing for ncurses.h
8269
8270 case $cf_cv_ncurses_header in # (vi
8271 *ncurses.h)
8272
8273 cat >>confdefs.h <<\EOF
8274 #define HAVE_NCURSES_H 1
8275 EOF
8276
8277         ;;
8278 esac
8279
8280 case $cf_cv_ncurses_header in # (vi
8281 ncurses/curses.h|ncurses/ncurses.h)
8282
8283 cat >>confdefs.h <<\EOF
8284 #define HAVE_NCURSES_NCURSES_H 1
8285 EOF
8286
8287         ;;
8288 ncursesw/curses.h|ncursesw/ncurses.h)
8289
8290 cat >>confdefs.h <<\EOF
8291 #define HAVE_NCURSESW_NCURSES_H 1
8292 EOF
8293
8294         ;;
8295 esac
8296
8297 echo "$as_me:8297: checking for terminfo header" >&5
8298 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8299 if test "${cf_cv_term_header+set}" = set; then
8300   echo $ECHO_N "(cached) $ECHO_C" >&6
8301 else
8302
8303 case ${cf_cv_ncurses_header} in #(vi
8304 */ncurses.h|*/ncursesw.h) #(vi
8305         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8306         ;;
8307 *)
8308         cf_term_header=term.h
8309         ;;
8310 esac
8311
8312 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8313 do
8314 cat >conftest.$ac_ext <<_ACEOF
8315 #line 8315 "configure"
8316 #include "confdefs.h"
8317 #include <stdio.h>
8318 #include <${cf_cv_ncurses_header:-curses.h}>
8319 #include <$cf_test>
8320
8321 int
8322 main ()
8323 {
8324 int x = auto_left_margin
8325   ;
8326   return 0;
8327 }
8328 _ACEOF
8329 rm -f conftest.$ac_objext
8330 if { (eval echo "$as_me:8330: \"$ac_compile\"") >&5
8331   (eval $ac_compile) 2>&5
8332   ac_status=$?
8333   echo "$as_me:8333: \$? = $ac_status" >&5
8334   (exit $ac_status); } &&
8335          { ac_try='test -s conftest.$ac_objext'
8336   { (eval echo "$as_me:8336: \"$ac_try\"") >&5
8337   (eval $ac_try) 2>&5
8338   ac_status=$?
8339   echo "$as_me:8339: \$? = $ac_status" >&5
8340   (exit $ac_status); }; }; then
8341
8342         cf_cv_term_header="$cf_test"
8343 else
8344   echo "$as_me: failed program was:" >&5
8345 cat conftest.$ac_ext >&5
8346
8347         cf_cv_term_header=unknown
8348
8349 fi
8350 rm -f conftest.$ac_objext conftest.$ac_ext
8351         test "$cf_cv_term_header" != unknown && break
8352 done
8353
8354 fi
8355 echo "$as_me:8355: result: $cf_cv_term_header" >&5
8356 echo "${ECHO_T}$cf_cv_term_header" >&6
8357
8358 # Set definitions to allow ifdef'ing to accommodate subdirectories
8359
8360 case $cf_cv_term_header in # (vi
8361 *term.h)
8362
8363 cat >>confdefs.h <<\EOF
8364 #define HAVE_TERM_H 1
8365 EOF
8366
8367         ;;
8368 esac
8369
8370 case $cf_cv_term_header in # (vi
8371 ncurses/term.h) #(vi
8372
8373 cat >>confdefs.h <<\EOF
8374 #define HAVE_NCURSES_TERM_H 1
8375 EOF
8376
8377         ;;
8378 ncursesw/term.h)
8379
8380 cat >>confdefs.h <<\EOF
8381 #define HAVE_NCURSESW_TERM_H 1
8382 EOF
8383
8384         ;;
8385 esac
8386
8387 # some applications need this, but should check for NCURSES_VERSION
8388
8389 cat >>confdefs.h <<\EOF
8390 #define NCURSES 1
8391 EOF
8392
8393 echo "$as_me:8393: checking for ncurses version" >&5
8394 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8395 if test "${cf_cv_ncurses_version+set}" = set; then
8396   echo $ECHO_N "(cached) $ECHO_C" >&6
8397 else
8398
8399         cf_cv_ncurses_version=no
8400         cf_tempfile=out$$
8401         rm -f $cf_tempfile
8402         if test "$cross_compiling" = yes; then
8403
8404         # This will not work if the preprocessor splits the line after the
8405         # Autoconf token.  The 'unproto' program does that.
8406         cat > conftest.$ac_ext <<EOF
8407 #include <${cf_cv_ncurses_header:-curses.h}>
8408 #undef Autoconf
8409 #ifdef NCURSES_VERSION
8410 Autoconf NCURSES_VERSION
8411 #else
8412 #ifdef __NCURSES_H
8413 Autoconf "old"
8414 #endif
8415 ;
8416 #endif
8417 EOF
8418         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8419         { (eval echo "$as_me:8419: \"$cf_try\"") >&5
8420   (eval $cf_try) 2>&5
8421   ac_status=$?
8422   echo "$as_me:8422: \$? = $ac_status" >&5
8423   (exit $ac_status); }
8424         if test -f conftest.out ; then
8425                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8426                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8427                 rm -f conftest.out
8428         fi
8429
8430 else
8431   cat >conftest.$ac_ext <<_ACEOF
8432 #line 8432 "configure"
8433 #include "confdefs.h"
8434
8435 #include <${cf_cv_ncurses_header:-curses.h}>
8436 #include <stdio.h>
8437 int main()
8438 {
8439         FILE *fp = fopen("$cf_tempfile", "w");
8440 #ifdef NCURSES_VERSION
8441 # ifdef NCURSES_VERSION_PATCH
8442         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8443 # else
8444         fprintf(fp, "%s\n", NCURSES_VERSION);
8445 # endif
8446 #else
8447 # ifdef __NCURSES_H
8448         fprintf(fp, "old\n");
8449 # else
8450         make an error
8451 # endif
8452 #endif
8453         ${cf_cv_main_return:-return}(0);
8454 }
8455 _ACEOF
8456 rm -f conftest$ac_exeext
8457 if { (eval echo "$as_me:8457: \"$ac_link\"") >&5
8458   (eval $ac_link) 2>&5
8459   ac_status=$?
8460   echo "$as_me:8460: \$? = $ac_status" >&5
8461   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8462   { (eval echo "$as_me:8462: \"$ac_try\"") >&5
8463   (eval $ac_try) 2>&5
8464   ac_status=$?
8465   echo "$as_me:8465: \$? = $ac_status" >&5
8466   (exit $ac_status); }; }; then
8467
8468         cf_cv_ncurses_version=`cat $cf_tempfile`
8469 else
8470   echo "$as_me: program exited with status $ac_status" >&5
8471 echo "$as_me: failed program was:" >&5
8472 cat conftest.$ac_ext >&5
8473 fi
8474 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8475 fi
8476         rm -f $cf_tempfile
8477
8478 fi
8479 echo "$as_me:8479: result: $cf_cv_ncurses_version" >&5
8480 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8481 test "$cf_cv_ncurses_version" = no ||
8482 cat >>confdefs.h <<\EOF
8483 #define NCURSES 1
8484 EOF
8485
8486 cf_nculib_root=ncursesw
8487         # This works, except for the special case where we find gpm, but
8488         # ncurses is in a nonstandard location via $LIBS, and we really want
8489         # to link gpm.
8490 cf_ncurses_LIBS=""
8491 cf_ncurses_SAVE="$LIBS"
8492 echo "$as_me:8492: checking for Gpm_Open in -lgpm" >&5
8493 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8494 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8495   echo $ECHO_N "(cached) $ECHO_C" >&6
8496 else
8497   ac_check_lib_save_LIBS=$LIBS
8498 LIBS="-lgpm  $LIBS"
8499 cat >conftest.$ac_ext <<_ACEOF
8500 #line 8500 "configure"
8501 #include "confdefs.h"
8502
8503 /* Override any gcc2 internal prototype to avoid an error.  */
8504 #ifdef __cplusplus
8505 extern "C"
8506 #endif
8507 /* We use char because int might match the return type of a gcc2
8508    builtin and then its argument prototype would still apply.  */
8509 char Gpm_Open ();
8510 int
8511 main ()
8512 {
8513 Gpm_Open ();
8514   ;
8515   return 0;
8516 }
8517 _ACEOF
8518 rm -f conftest.$ac_objext conftest$ac_exeext
8519 if { (eval echo "$as_me:8519: \"$ac_link\"") >&5
8520   (eval $ac_link) 2>&5
8521   ac_status=$?
8522   echo "$as_me:8522: \$? = $ac_status" >&5
8523   (exit $ac_status); } &&
8524          { ac_try='test -s conftest$ac_exeext'
8525   { (eval echo "$as_me:8525: \"$ac_try\"") >&5
8526   (eval $ac_try) 2>&5
8527   ac_status=$?
8528   echo "$as_me:8528: \$? = $ac_status" >&5
8529   (exit $ac_status); }; }; then
8530   ac_cv_lib_gpm_Gpm_Open=yes
8531 else
8532   echo "$as_me: failed program was:" >&5
8533 cat conftest.$ac_ext >&5
8534 ac_cv_lib_gpm_Gpm_Open=no
8535 fi
8536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8537 LIBS=$ac_check_lib_save_LIBS
8538 fi
8539 echo "$as_me:8539: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8540 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8541 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8542   echo "$as_me:8542: checking for initscr in -lgpm" >&5
8543 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8544 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8545   echo $ECHO_N "(cached) $ECHO_C" >&6
8546 else
8547   ac_check_lib_save_LIBS=$LIBS
8548 LIBS="-lgpm  $LIBS"
8549 cat >conftest.$ac_ext <<_ACEOF
8550 #line 8550 "configure"
8551 #include "confdefs.h"
8552
8553 /* Override any gcc2 internal prototype to avoid an error.  */
8554 #ifdef __cplusplus
8555 extern "C"
8556 #endif
8557 /* We use char because int might match the return type of a gcc2
8558    builtin and then its argument prototype would still apply.  */
8559 char initscr ();
8560 int
8561 main ()
8562 {
8563 initscr ();
8564   ;
8565   return 0;
8566 }
8567 _ACEOF
8568 rm -f conftest.$ac_objext conftest$ac_exeext
8569 if { (eval echo "$as_me:8569: \"$ac_link\"") >&5
8570   (eval $ac_link) 2>&5
8571   ac_status=$?
8572   echo "$as_me:8572: \$? = $ac_status" >&5
8573   (exit $ac_status); } &&
8574          { ac_try='test -s conftest$ac_exeext'
8575   { (eval echo "$as_me:8575: \"$ac_try\"") >&5
8576   (eval $ac_try) 2>&5
8577   ac_status=$?
8578   echo "$as_me:8578: \$? = $ac_status" >&5
8579   (exit $ac_status); }; }; then
8580   ac_cv_lib_gpm_initscr=yes
8581 else
8582   echo "$as_me: failed program was:" >&5
8583 cat conftest.$ac_ext >&5
8584 ac_cv_lib_gpm_initscr=no
8585 fi
8586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8587 LIBS=$ac_check_lib_save_LIBS
8588 fi
8589 echo "$as_me:8589: result: $ac_cv_lib_gpm_initscr" >&5
8590 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8591 if test $ac_cv_lib_gpm_initscr = yes; then
8592   LIBS="$cf_ncurses_SAVE"
8593 else
8594   cf_ncurses_LIBS="-lgpm"
8595 fi
8596
8597 fi
8598
8599 case $host_os in #(vi
8600 freebsd*)
8601         # This is only necessary if you are linking against an obsolete
8602         # version of ncurses (but it should do no harm, since it's static).
8603         if test "$cf_nculib_root" = ncurses ; then
8604                 echo "$as_me:8604: checking for tgoto in -lmytinfo" >&5
8605 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8606 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8607   echo $ECHO_N "(cached) $ECHO_C" >&6
8608 else
8609   ac_check_lib_save_LIBS=$LIBS
8610 LIBS="-lmytinfo  $LIBS"
8611 cat >conftest.$ac_ext <<_ACEOF
8612 #line 8612 "configure"
8613 #include "confdefs.h"
8614
8615 /* Override any gcc2 internal prototype to avoid an error.  */
8616 #ifdef __cplusplus
8617 extern "C"
8618 #endif
8619 /* We use char because int might match the return type of a gcc2
8620    builtin and then its argument prototype would still apply.  */
8621 char tgoto ();
8622 int
8623 main ()
8624 {
8625 tgoto ();
8626   ;
8627   return 0;
8628 }
8629 _ACEOF
8630 rm -f conftest.$ac_objext conftest$ac_exeext
8631 if { (eval echo "$as_me:8631: \"$ac_link\"") >&5
8632   (eval $ac_link) 2>&5
8633   ac_status=$?
8634   echo "$as_me:8634: \$? = $ac_status" >&5
8635   (exit $ac_status); } &&
8636          { ac_try='test -s conftest$ac_exeext'
8637   { (eval echo "$as_me:8637: \"$ac_try\"") >&5
8638   (eval $ac_try) 2>&5
8639   ac_status=$?
8640   echo "$as_me:8640: \$? = $ac_status" >&5
8641   (exit $ac_status); }; }; then
8642   ac_cv_lib_mytinfo_tgoto=yes
8643 else
8644   echo "$as_me: failed program was:" >&5
8645 cat conftest.$ac_ext >&5
8646 ac_cv_lib_mytinfo_tgoto=no
8647 fi
8648 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8649 LIBS=$ac_check_lib_save_LIBS
8650 fi
8651 echo "$as_me:8651: result: $ac_cv_lib_mytinfo_tgoto" >&5
8652 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8653 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8654   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8655 fi
8656
8657         fi
8658         ;;
8659 esac
8660
8661 cf_add_libs="$cf_ncurses_LIBS"
8662 # Filter out duplicates - this happens with badly-designed ".pc" files...
8663 for cf_add_1lib in $LIBS
8664 do
8665         for cf_add_2lib in $cf_add_libs
8666         do
8667                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8668                 then
8669                         cf_add_1lib=
8670                         break
8671                 fi
8672         done
8673         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8674 done
8675 LIBS="$cf_add_libs"
8676
8677 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8678 then
8679
8680 cf_add_libs="-l$cf_nculib_root"
8681 # Filter out duplicates - this happens with badly-designed ".pc" files...
8682 for cf_add_1lib in $LIBS
8683 do
8684         for cf_add_2lib in $cf_add_libs
8685         do
8686                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8687                 then
8688                         cf_add_1lib=
8689                         break
8690                 fi
8691         done
8692         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8693 done
8694 LIBS="$cf_add_libs"
8695
8696 else
8697
8698         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8699         cf_libdir=""
8700         echo "$as_me:8700: checking for initscr" >&5
8701 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8702 if test "${ac_cv_func_initscr+set}" = set; then
8703   echo $ECHO_N "(cached) $ECHO_C" >&6
8704 else
8705   cat >conftest.$ac_ext <<_ACEOF
8706 #line 8706 "configure"
8707 #include "confdefs.h"
8708 /* System header to define __stub macros and hopefully few prototypes,
8709     which can conflict with char initscr (); below.  */
8710 #include <assert.h>
8711 /* Override any gcc2 internal prototype to avoid an error.  */
8712 #ifdef __cplusplus
8713 extern "C"
8714 #endif
8715 /* We use char because int might match the return type of a gcc2
8716    builtin and then its argument prototype would still apply.  */
8717 char initscr ();
8718 char (*f) ();
8719
8720 int
8721 main ()
8722 {
8723 /* The GNU C library defines this for functions which it implements
8724     to always fail with ENOSYS.  Some functions are actually named
8725     something starting with __ and the normal name is an alias.  */
8726 #if defined (__stub_initscr) || defined (__stub___initscr)
8727 choke me
8728 #else
8729 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8730 #endif
8731
8732   ;
8733   return 0;
8734 }
8735 _ACEOF
8736 rm -f conftest.$ac_objext conftest$ac_exeext
8737 if { (eval echo "$as_me:8737: \"$ac_link\"") >&5
8738   (eval $ac_link) 2>&5
8739   ac_status=$?
8740   echo "$as_me:8740: \$? = $ac_status" >&5
8741   (exit $ac_status); } &&
8742          { ac_try='test -s conftest$ac_exeext'
8743   { (eval echo "$as_me:8743: \"$ac_try\"") >&5
8744   (eval $ac_try) 2>&5
8745   ac_status=$?
8746   echo "$as_me:8746: \$? = $ac_status" >&5
8747   (exit $ac_status); }; }; then
8748   ac_cv_func_initscr=yes
8749 else
8750   echo "$as_me: failed program was:" >&5
8751 cat conftest.$ac_ext >&5
8752 ac_cv_func_initscr=no
8753 fi
8754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8755 fi
8756 echo "$as_me:8756: result: $ac_cv_func_initscr" >&5
8757 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8758 if test $ac_cv_func_initscr = yes; then
8759   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8760 else
8761
8762                 cf_save_LIBS="$LIBS"
8763                 echo "$as_me:8763: checking for initscr in -l$cf_nculib_root" >&5
8764 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8765                 LIBS="-l$cf_nculib_root $LIBS"
8766                 cat >conftest.$ac_ext <<_ACEOF
8767 #line 8767 "configure"
8768 #include "confdefs.h"
8769 #include <${cf_cv_ncurses_header:-curses.h}>
8770 int
8771 main ()
8772 {
8773 initscr()
8774   ;
8775   return 0;
8776 }
8777 _ACEOF
8778 rm -f conftest.$ac_objext conftest$ac_exeext
8779 if { (eval echo "$as_me:8779: \"$ac_link\"") >&5
8780   (eval $ac_link) 2>&5
8781   ac_status=$?
8782   echo "$as_me:8782: \$? = $ac_status" >&5
8783   (exit $ac_status); } &&
8784          { ac_try='test -s conftest$ac_exeext'
8785   { (eval echo "$as_me:8785: \"$ac_try\"") >&5
8786   (eval $ac_try) 2>&5
8787   ac_status=$?
8788   echo "$as_me:8788: \$? = $ac_status" >&5
8789   (exit $ac_status); }; }; then
8790   echo "$as_me:8790: result: yes" >&5
8791 echo "${ECHO_T}yes" >&6
8792                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8793
8794 else
8795   echo "$as_me: failed program was:" >&5
8796 cat conftest.$ac_ext >&5
8797 echo "$as_me:8797: result: no" >&5
8798 echo "${ECHO_T}no" >&6
8799
8800 cf_search=
8801 cf_library_path_list=""
8802 if test -n "${LDFLAGS}${LIBS}" ; then
8803         for cf_library_path in $LDFLAGS $LIBS
8804         do
8805                 case $cf_library_path in #(vi
8806                 -L*)
8807                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8808
8809 test "x$cf_library_path" != "xNONE" && \
8810 test -d "$cf_library_path" && \
8811  {
8812         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8813         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8814         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8815         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8816         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8817         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"
8818 }
8819
8820                         cf_library_path_list="$cf_library_path_list $cf_search"
8821                         ;;
8822                 esac
8823         done
8824 fi
8825
8826 cf_search=
8827
8828 test "x/usr" != "x$prefix" && \
8829 test -d "/usr" && \
8830 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
8831         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8832         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8833         test -d /usr/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/lib/$cf_nculib_root"
8834         test -d /usr/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
8835         test -d /usr/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/$cf_nculib_root/lib"
8836         test -d /usr/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
8837 }
8838
8839 test "x$prefix" != "xNONE" && \
8840 test -d "$prefix" && \
8841  {
8842         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8843         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8844         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8845         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8846         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8847         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8848 }
8849
8850 test "x/usr/local" != "x$prefix" && \
8851 test -d "/usr/local" && \
8852 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
8853         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8854         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8855         test -d /usr/local/lib/$cf_nculib_root &&       cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
8856         test -d /usr/local/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
8857         test -d /usr/local/$cf_nculib_root/lib &&       cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
8858         test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
8859 }
8860
8861 test "x/opt" != "x$prefix" && \
8862 test -d "/opt" && \
8863 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
8864         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8865         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8866         test -d /opt/lib/$cf_nculib_root &&       cf_search="$cf_search /opt/lib/$cf_nculib_root"
8867         test -d /opt/lib/$cf_nculib_root/lib &&    cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
8868         test -d /opt/$cf_nculib_root/lib &&       cf_search="$cf_search /opt/$cf_nculib_root/lib"
8869         test -d /opt/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
8870 }
8871
8872 test "x$HOME" != "x$prefix" && \
8873 test -d "$HOME" && \
8874 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
8875         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8876         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8877         test -d $HOME/lib/$cf_nculib_root &&       cf_search="$cf_search $HOME/lib/$cf_nculib_root"
8878         test -d $HOME/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
8879         test -d $HOME/$cf_nculib_root/lib &&       cf_search="$cf_search $HOME/$cf_nculib_root/lib"
8880         test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
8881 }
8882
8883 cf_search="$cf_library_path_list $cf_search"
8884
8885                         for cf_libdir in $cf_search
8886                         do
8887                                 echo "$as_me:8887: checking for -l$cf_nculib_root in $cf_libdir" >&5
8888 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8889                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8890                                 cat >conftest.$ac_ext <<_ACEOF
8891 #line 8891 "configure"
8892 #include "confdefs.h"
8893 #include <${cf_cv_ncurses_header:-curses.h}>
8894 int
8895 main ()
8896 {
8897 initscr()
8898   ;
8899   return 0;
8900 }
8901 _ACEOF
8902 rm -f conftest.$ac_objext conftest$ac_exeext
8903 if { (eval echo "$as_me:8903: \"$ac_link\"") >&5
8904   (eval $ac_link) 2>&5
8905   ac_status=$?
8906   echo "$as_me:8906: \$? = $ac_status" >&5
8907   (exit $ac_status); } &&
8908          { ac_try='test -s conftest$ac_exeext'
8909   { (eval echo "$as_me:8909: \"$ac_try\"") >&5
8910   (eval $ac_try) 2>&5
8911   ac_status=$?
8912   echo "$as_me:8912: \$? = $ac_status" >&5
8913   (exit $ac_status); }; }; then
8914   echo "$as_me:8914: result: yes" >&5
8915 echo "${ECHO_T}yes" >&6
8916                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8917                                          break
8918 else
8919   echo "$as_me: failed program was:" >&5
8920 cat conftest.$ac_ext >&5
8921 echo "$as_me:8921: result: no" >&5
8922 echo "${ECHO_T}no" >&6
8923                                          LIBS="$cf_save_LIBS"
8924 fi
8925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8926                         done
8927
8928 fi
8929 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8930
8931 fi
8932
8933 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8934
8935 if test $cf_found_library = no ; then
8936         { { echo "$as_me:8936: error: Cannot link $cf_nculib_root library" >&5
8937 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8938    { (exit 1); exit 1; }; }
8939 fi
8940
8941 fi
8942
8943 if test -n "$cf_ncurses_LIBS" ; then
8944         echo "$as_me:8944: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8945 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8946         cf_ncurses_SAVE="$LIBS"
8947         for p in $cf_ncurses_LIBS ; do
8948                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8949                 if test "$q" != "$LIBS" ; then
8950                         LIBS="$q"
8951                 fi
8952         done
8953         cat >conftest.$ac_ext <<_ACEOF
8954 #line 8954 "configure"
8955 #include "confdefs.h"
8956 #include <${cf_cv_ncurses_header:-curses.h}>
8957 int
8958 main ()
8959 {
8960 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8961   ;
8962   return 0;
8963 }
8964 _ACEOF
8965 rm -f conftest.$ac_objext conftest$ac_exeext
8966 if { (eval echo "$as_me:8966: \"$ac_link\"") >&5
8967   (eval $ac_link) 2>&5
8968   ac_status=$?
8969   echo "$as_me:8969: \$? = $ac_status" >&5
8970   (exit $ac_status); } &&
8971          { ac_try='test -s conftest$ac_exeext'
8972   { (eval echo "$as_me:8972: \"$ac_try\"") >&5
8973   (eval $ac_try) 2>&5
8974   ac_status=$?
8975   echo "$as_me:8975: \$? = $ac_status" >&5
8976   (exit $ac_status); }; }; then
8977   echo "$as_me:8977: result: yes" >&5
8978 echo "${ECHO_T}yes" >&6
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 cat conftest.$ac_ext >&5
8982 echo "$as_me:8982: result: no" >&5
8983 echo "${ECHO_T}no" >&6
8984                  LIBS="$cf_ncurses_SAVE"
8985 fi
8986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8987 fi
8988
8989 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8990
8991 cat >>confdefs.h <<EOF
8992 #define $cf_nculib_ROOT 1
8993 EOF
8994
8995 fi
8996
8997         ;;
8998 pdcurses)
8999         echo "$as_me:8999: checking for X" >&5
9000 echo $ECHO_N "checking for X... $ECHO_C" >&6
9001
9002 # Check whether --with-x or --without-x was given.
9003 if test "${with_x+set}" = set; then
9004   withval="$with_x"
9005
9006 fi;
9007 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9008 if test "x$with_x" = xno; then
9009   # The user explicitly disabled X.
9010   have_x=disabled
9011 else
9012   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9013     # Both variables are already set.
9014     have_x=yes
9015   else
9016     if test "${ac_cv_have_x+set}" = set; then
9017   echo $ECHO_N "(cached) $ECHO_C" >&6
9018 else
9019   # One or both of the vars are not set, and there is no cached value.
9020 ac_x_includes=no ac_x_libraries=no
9021 rm -fr conftest.dir
9022 if mkdir conftest.dir; then
9023   cd conftest.dir
9024   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9025   cat >Imakefile <<'EOF'
9026 acfindx:
9027         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9028 EOF
9029   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9030     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9031     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9032     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9033     for ac_extension in a so sl dylib dll; do
9034       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9035          test -f $ac_im_libdir/libX11.$ac_extension; then
9036         ac_im_usrlibdir=$ac_im_libdir; break
9037       fi
9038     done
9039     # Screen out bogus values from the imake configuration.  They are
9040     # bogus both because they are the default anyway, and because
9041     # using them would break gcc on systems where it needs fixed includes.
9042     case $ac_im_incroot in
9043         /usr/include) ;;
9044         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9045     esac
9046     case $ac_im_usrlibdir in
9047         /usr/lib | /lib) ;;
9048         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9049     esac
9050   fi
9051   cd ..
9052   rm -fr conftest.dir
9053 fi
9054
9055 # Standard set of common directories for X headers.
9056 # Check X11 before X11Rn because it is often a symlink to the current release.
9057 ac_x_header_dirs='
9058 /usr/X11/include
9059 /usr/X11R6/include
9060 /usr/X11R5/include
9061 /usr/X11R4/include
9062
9063 /usr/include/X11
9064 /usr/include/X11R6
9065 /usr/include/X11R5
9066 /usr/include/X11R4
9067
9068 /usr/local/X11/include
9069 /usr/local/X11R6/include
9070 /usr/local/X11R5/include
9071 /usr/local/X11R4/include
9072
9073 /usr/local/include/X11
9074 /usr/local/include/X11R6
9075 /usr/local/include/X11R5
9076 /usr/local/include/X11R4
9077
9078 /usr/X386/include
9079 /usr/x386/include
9080 /usr/XFree86/include/X11
9081
9082 /usr/include
9083 /usr/local/include
9084 /usr/unsupported/include
9085 /usr/athena/include
9086 /usr/local/x11r5/include
9087 /usr/lpp/Xamples/include
9088
9089 /usr/openwin/include
9090 /usr/openwin/share/include'
9091
9092 if test "$ac_x_includes" = no; then
9093   # Guess where to find include files, by looking for Intrinsic.h.
9094   # First, try using that file with no special directory specified.
9095   cat >conftest.$ac_ext <<_ACEOF
9096 #line 9096 "configure"
9097 #include "confdefs.h"
9098 #include <X11/Intrinsic.h>
9099 _ACEOF
9100 if { (eval echo "$as_me:9100: \"$ac_cpp conftest.$ac_ext\"") >&5
9101   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9102   ac_status=$?
9103   egrep -v '^ *\+' conftest.er1 >conftest.err
9104   rm -f conftest.er1
9105   cat conftest.err >&5
9106   echo "$as_me:9106: \$? = $ac_status" >&5
9107   (exit $ac_status); } >/dev/null; then
9108   if test -s conftest.err; then
9109     ac_cpp_err=$ac_c_preproc_warn_flag
9110   else
9111     ac_cpp_err=
9112   fi
9113 else
9114   ac_cpp_err=yes
9115 fi
9116 if test -z "$ac_cpp_err"; then
9117   # We can compile using X headers with no special include directory.
9118 ac_x_includes=
9119 else
9120   echo "$as_me: failed program was:" >&5
9121   cat conftest.$ac_ext >&5
9122   for ac_dir in $ac_x_header_dirs; do
9123   if test -r "$ac_dir/X11/Intrinsic.h"; then
9124     ac_x_includes=$ac_dir
9125     break
9126   fi
9127 done
9128 fi
9129 rm -f conftest.err conftest.$ac_ext
9130 fi # $ac_x_includes = no
9131
9132 if test "$ac_x_libraries" = no; then
9133   # Check for the libraries.
9134   # See if we find them without any special options.
9135   # Don't add to $LIBS permanently.
9136   ac_save_LIBS=$LIBS
9137   LIBS="-lXt $LIBS"
9138   cat >conftest.$ac_ext <<_ACEOF
9139 #line 9139 "configure"
9140 #include "confdefs.h"
9141 #include <X11/Intrinsic.h>
9142 int
9143 main ()
9144 {
9145 XtMalloc (0)
9146   ;
9147   return 0;
9148 }
9149 _ACEOF
9150 rm -f conftest.$ac_objext conftest$ac_exeext
9151 if { (eval echo "$as_me:9151: \"$ac_link\"") >&5
9152   (eval $ac_link) 2>&5
9153   ac_status=$?
9154   echo "$as_me:9154: \$? = $ac_status" >&5
9155   (exit $ac_status); } &&
9156          { ac_try='test -s conftest$ac_exeext'
9157   { (eval echo "$as_me:9157: \"$ac_try\"") >&5
9158   (eval $ac_try) 2>&5
9159   ac_status=$?
9160   echo "$as_me:9160: \$? = $ac_status" >&5
9161   (exit $ac_status); }; }; then
9162   LIBS=$ac_save_LIBS
9163 # We can link X programs with no special library path.
9164 ac_x_libraries=
9165 else
9166   echo "$as_me: failed program was:" >&5
9167 cat conftest.$ac_ext >&5
9168 LIBS=$ac_save_LIBS
9169 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9170 do
9171   # Don't even attempt the hair of trying to link an X program!
9172   for ac_extension in a so sl dylib dll; do
9173     if test -r $ac_dir/libXt.$ac_extension; then
9174       ac_x_libraries=$ac_dir
9175       break 2
9176     fi
9177   done
9178 done
9179 fi
9180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9181 fi # $ac_x_libraries = no
9182
9183 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9184   # Didn't find X anywhere.  Cache the known absence of X.
9185   ac_cv_have_x="have_x=no"
9186 else
9187   # Record where we found X for the cache.
9188   ac_cv_have_x="have_x=yes \
9189                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9190 fi
9191 fi
9192
9193   fi
9194   eval "$ac_cv_have_x"
9195 fi # $with_x != no
9196
9197 if test "$have_x" != yes; then
9198   echo "$as_me:9198: result: $have_x" >&5
9199 echo "${ECHO_T}$have_x" >&6
9200   no_x=yes
9201 else
9202   # If each of the values was on the command line, it overrides each guess.
9203   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9204   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9205   # Update the cache value to reflect the command line values.
9206   ac_cv_have_x="have_x=yes \
9207                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9208   echo "$as_me:9208: result: libraries $x_libraries, headers $x_includes" >&5
9209 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9210 fi
9211
9212 if test "$no_x" = yes; then
9213   # Not all programs may use this symbol, but it does not hurt to define it.
9214
9215 cat >>confdefs.h <<\EOF
9216 #define X_DISPLAY_MISSING 1
9217 EOF
9218
9219   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9220 else
9221   if test -n "$x_includes"; then
9222     X_CFLAGS="$X_CFLAGS -I$x_includes"
9223   fi
9224
9225   # It would also be nice to do this for all -L options, not just this one.
9226   if test -n "$x_libraries"; then
9227     X_LIBS="$X_LIBS -L$x_libraries"
9228     # For Solaris; some versions of Sun CC require a space after -R and
9229     # others require no space.  Words are not sufficient . . . .
9230     case `(uname -sr) 2>/dev/null` in
9231     "SunOS 5"*)
9232       echo "$as_me:9232: checking whether -R must be followed by a space" >&5
9233 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9234       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9235       cat >conftest.$ac_ext <<_ACEOF
9236 #line 9236 "configure"
9237 #include "confdefs.h"
9238
9239 int
9240 main ()
9241 {
9242
9243   ;
9244   return 0;
9245 }
9246 _ACEOF
9247 rm -f conftest.$ac_objext conftest$ac_exeext
9248 if { (eval echo "$as_me:9248: \"$ac_link\"") >&5
9249   (eval $ac_link) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); } &&
9253          { ac_try='test -s conftest$ac_exeext'
9254   { (eval echo "$as_me:9254: \"$ac_try\"") >&5
9255   (eval $ac_try) 2>&5
9256   ac_status=$?
9257   echo "$as_me:9257: \$? = $ac_status" >&5
9258   (exit $ac_status); }; }; then
9259   ac_R_nospace=yes
9260 else
9261   echo "$as_me: failed program was:" >&5
9262 cat conftest.$ac_ext >&5
9263 ac_R_nospace=no
9264 fi
9265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9266       if test $ac_R_nospace = yes; then
9267         echo "$as_me:9267: result: no" >&5
9268 echo "${ECHO_T}no" >&6
9269         X_LIBS="$X_LIBS -R$x_libraries"
9270       else
9271         LIBS="$ac_xsave_LIBS -R $x_libraries"
9272         cat >conftest.$ac_ext <<_ACEOF
9273 #line 9273 "configure"
9274 #include "confdefs.h"
9275
9276 int
9277 main ()
9278 {
9279
9280   ;
9281   return 0;
9282 }
9283 _ACEOF
9284 rm -f conftest.$ac_objext conftest$ac_exeext
9285 if { (eval echo "$as_me:9285: \"$ac_link\"") >&5
9286   (eval $ac_link) 2>&5
9287   ac_status=$?
9288   echo "$as_me:9288: \$? = $ac_status" >&5
9289   (exit $ac_status); } &&
9290          { ac_try='test -s conftest$ac_exeext'
9291   { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9292   (eval $ac_try) 2>&5
9293   ac_status=$?
9294   echo "$as_me:9294: \$? = $ac_status" >&5
9295   (exit $ac_status); }; }; then
9296   ac_R_space=yes
9297 else
9298   echo "$as_me: failed program was:" >&5
9299 cat conftest.$ac_ext >&5
9300 ac_R_space=no
9301 fi
9302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9303         if test $ac_R_space = yes; then
9304           echo "$as_me:9304: result: yes" >&5
9305 echo "${ECHO_T}yes" >&6
9306           X_LIBS="$X_LIBS -R $x_libraries"
9307         else
9308           echo "$as_me:9308: result: neither works" >&5
9309 echo "${ECHO_T}neither works" >&6
9310         fi
9311       fi
9312       LIBS=$ac_xsave_LIBS
9313     esac
9314   fi
9315
9316   # Check for system-dependent libraries X programs must link with.
9317   # Do this before checking for the system-independent R6 libraries
9318   # (-lICE), since we may need -lsocket or whatever for X linking.
9319
9320   if test "$ISC" = yes; then
9321     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9322   else
9323     # Martyn Johnson says this is needed for Ultrix, if the X
9324     # libraries were built with DECnet support.  And Karl Berry says
9325     # the Alpha needs dnet_stub (dnet does not exist).
9326     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
9327     cat >conftest.$ac_ext <<_ACEOF
9328 #line 9328 "configure"
9329 #include "confdefs.h"
9330
9331 /* Override any gcc2 internal prototype to avoid an error.  */
9332 #ifdef __cplusplus
9333 extern "C"
9334 #endif
9335 /* We use char because int might match the return type of a gcc2
9336    builtin and then its argument prototype would still apply.  */
9337 char XOpenDisplay ();
9338 int
9339 main ()
9340 {
9341 XOpenDisplay ();
9342   ;
9343   return 0;
9344 }
9345 _ACEOF
9346 rm -f conftest.$ac_objext conftest$ac_exeext
9347 if { (eval echo "$as_me:9347: \"$ac_link\"") >&5
9348   (eval $ac_link) 2>&5
9349   ac_status=$?
9350   echo "$as_me:9350: \$? = $ac_status" >&5
9351   (exit $ac_status); } &&
9352          { ac_try='test -s conftest$ac_exeext'
9353   { (eval echo "$as_me:9353: \"$ac_try\"") >&5
9354   (eval $ac_try) 2>&5
9355   ac_status=$?
9356   echo "$as_me:9356: \$? = $ac_status" >&5
9357   (exit $ac_status); }; }; then
9358   :
9359 else
9360   echo "$as_me: failed program was:" >&5
9361 cat conftest.$ac_ext >&5
9362 echo "$as_me:9362: checking for dnet_ntoa in -ldnet" >&5
9363 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
9364 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9365   echo $ECHO_N "(cached) $ECHO_C" >&6
9366 else
9367   ac_check_lib_save_LIBS=$LIBS
9368 LIBS="-ldnet  $LIBS"
9369 cat >conftest.$ac_ext <<_ACEOF
9370 #line 9370 "configure"
9371 #include "confdefs.h"
9372
9373 /* Override any gcc2 internal prototype to avoid an error.  */
9374 #ifdef __cplusplus
9375 extern "C"
9376 #endif
9377 /* We use char because int might match the return type of a gcc2
9378    builtin and then its argument prototype would still apply.  */
9379 char dnet_ntoa ();
9380 int
9381 main ()
9382 {
9383 dnet_ntoa ();
9384   ;
9385   return 0;
9386 }
9387 _ACEOF
9388 rm -f conftest.$ac_objext conftest$ac_exeext
9389 if { (eval echo "$as_me:9389: \"$ac_link\"") >&5
9390   (eval $ac_link) 2>&5
9391   ac_status=$?
9392   echo "$as_me:9392: \$? = $ac_status" >&5
9393   (exit $ac_status); } &&
9394          { ac_try='test -s conftest$ac_exeext'
9395   { (eval echo "$as_me:9395: \"$ac_try\"") >&5
9396   (eval $ac_try) 2>&5
9397   ac_status=$?
9398   echo "$as_me:9398: \$? = $ac_status" >&5
9399   (exit $ac_status); }; }; then
9400   ac_cv_lib_dnet_dnet_ntoa=yes
9401 else
9402   echo "$as_me: failed program was:" >&5
9403 cat conftest.$ac_ext >&5
9404 ac_cv_lib_dnet_dnet_ntoa=no
9405 fi
9406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9407 LIBS=$ac_check_lib_save_LIBS
9408 fi
9409 echo "$as_me:9409: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9410 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
9411 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
9412   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
9413 fi
9414
9415     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
9416       echo "$as_me:9416: checking for dnet_ntoa in -ldnet_stub" >&5
9417 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
9418 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
9419   echo $ECHO_N "(cached) $ECHO_C" >&6
9420 else
9421   ac_check_lib_save_LIBS=$LIBS
9422 LIBS="-ldnet_stub  $LIBS"
9423 cat >conftest.$ac_ext <<_ACEOF
9424 #line 9424 "configure"
9425 #include "confdefs.h"
9426
9427 /* Override any gcc2 internal prototype to avoid an error.  */
9428 #ifdef __cplusplus
9429 extern "C"
9430 #endif
9431 /* We use char because int might match the return type of a gcc2
9432    builtin and then its argument prototype would still apply.  */
9433 char dnet_ntoa ();
9434 int
9435 main ()
9436 {
9437 dnet_ntoa ();
9438   ;
9439   return 0;
9440 }
9441 _ACEOF
9442 rm -f conftest.$ac_objext conftest$ac_exeext
9443 if { (eval echo "$as_me:9443: \"$ac_link\"") >&5
9444   (eval $ac_link) 2>&5
9445   ac_status=$?
9446   echo "$as_me:9446: \$? = $ac_status" >&5
9447   (exit $ac_status); } &&
9448          { ac_try='test -s conftest$ac_exeext'
9449   { (eval echo "$as_me:9449: \"$ac_try\"") >&5
9450   (eval $ac_try) 2>&5
9451   ac_status=$?
9452   echo "$as_me:9452: \$? = $ac_status" >&5
9453   (exit $ac_status); }; }; then
9454   ac_cv_lib_dnet_stub_dnet_ntoa=yes
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 cat conftest.$ac_ext >&5
9458 ac_cv_lib_dnet_stub_dnet_ntoa=no
9459 fi
9460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9461 LIBS=$ac_check_lib_save_LIBS
9462 fi
9463 echo "$as_me:9463: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9464 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9465 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
9466   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9467 fi
9468
9469     fi
9470 fi
9471 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9472     LIBS="$ac_xsave_LIBS"
9473
9474     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9475     # to get the SysV transport functions.
9476     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9477     # needs -lnsl.
9478     # The nsl library prevents programs from opening the X display
9479     # on Irix 5.2, according to T.E. Dickey.
9480     # The functions gethostbyname, getservbyname, and inet_addr are
9481     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9482     echo "$as_me:9482: checking for gethostbyname" >&5
9483 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9484 if test "${ac_cv_func_gethostbyname+set}" = set; then
9485   echo $ECHO_N "(cached) $ECHO_C" >&6
9486 else
9487   cat >conftest.$ac_ext <<_ACEOF
9488 #line 9488 "configure"
9489 #include "confdefs.h"
9490 /* System header to define __stub macros and hopefully few prototypes,
9491     which can conflict with char gethostbyname (); below.  */
9492 #include <assert.h>
9493 /* Override any gcc2 internal prototype to avoid an error.  */
9494 #ifdef __cplusplus
9495 extern "C"
9496 #endif
9497 /* We use char because int might match the return type of a gcc2
9498    builtin and then its argument prototype would still apply.  */
9499 char gethostbyname ();
9500 char (*f) ();
9501
9502 int
9503 main ()
9504 {
9505 /* The GNU C library defines this for functions which it implements
9506     to always fail with ENOSYS.  Some functions are actually named
9507     something starting with __ and the normal name is an alias.  */
9508 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9509 choke me
9510 #else
9511 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9512 #endif
9513
9514   ;
9515   return 0;
9516 }
9517 _ACEOF
9518 rm -f conftest.$ac_objext conftest$ac_exeext
9519 if { (eval echo "$as_me:9519: \"$ac_link\"") >&5
9520   (eval $ac_link) 2>&5
9521   ac_status=$?
9522   echo "$as_me:9522: \$? = $ac_status" >&5
9523   (exit $ac_status); } &&
9524          { ac_try='test -s conftest$ac_exeext'
9525   { (eval echo "$as_me:9525: \"$ac_try\"") >&5
9526   (eval $ac_try) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); }; }; then
9530   ac_cv_func_gethostbyname=yes
9531 else
9532   echo "$as_me: failed program was:" >&5
9533 cat conftest.$ac_ext >&5
9534 ac_cv_func_gethostbyname=no
9535 fi
9536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9537 fi
9538 echo "$as_me:9538: result: $ac_cv_func_gethostbyname" >&5
9539 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9540
9541     if test $ac_cv_func_gethostbyname = no; then
9542       echo "$as_me:9542: checking for gethostbyname in -lnsl" >&5
9543 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9544 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9545   echo $ECHO_N "(cached) $ECHO_C" >&6
9546 else
9547   ac_check_lib_save_LIBS=$LIBS
9548 LIBS="-lnsl  $LIBS"
9549 cat >conftest.$ac_ext <<_ACEOF
9550 #line 9550 "configure"
9551 #include "confdefs.h"
9552
9553 /* Override any gcc2 internal prototype to avoid an error.  */
9554 #ifdef __cplusplus
9555 extern "C"
9556 #endif
9557 /* We use char because int might match the return type of a gcc2
9558    builtin and then its argument prototype would still apply.  */
9559 char gethostbyname ();
9560 int
9561 main ()
9562 {
9563 gethostbyname ();
9564   ;
9565   return 0;
9566 }
9567 _ACEOF
9568 rm -f conftest.$ac_objext conftest$ac_exeext
9569 if { (eval echo "$as_me:9569: \"$ac_link\"") >&5
9570   (eval $ac_link) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit $ac_status); } &&
9574          { ac_try='test -s conftest$ac_exeext'
9575   { (eval echo "$as_me:9575: \"$ac_try\"") >&5
9576   (eval $ac_try) 2>&5
9577   ac_status=$?
9578   echo "$as_me:9578: \$? = $ac_status" >&5
9579   (exit $ac_status); }; }; then
9580   ac_cv_lib_nsl_gethostbyname=yes
9581 else
9582   echo "$as_me: failed program was:" >&5
9583 cat conftest.$ac_ext >&5
9584 ac_cv_lib_nsl_gethostbyname=no
9585 fi
9586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9587 LIBS=$ac_check_lib_save_LIBS
9588 fi
9589 echo "$as_me:9589: result: $ac_cv_lib_nsl_gethostbyname" >&5
9590 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9591 if test $ac_cv_lib_nsl_gethostbyname = yes; then
9592   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9593 fi
9594
9595       if test $ac_cv_lib_nsl_gethostbyname = no; then
9596         echo "$as_me:9596: checking for gethostbyname in -lbsd" >&5
9597 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9598 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9599   echo $ECHO_N "(cached) $ECHO_C" >&6
9600 else
9601   ac_check_lib_save_LIBS=$LIBS
9602 LIBS="-lbsd  $LIBS"
9603 cat >conftest.$ac_ext <<_ACEOF
9604 #line 9604 "configure"
9605 #include "confdefs.h"
9606
9607 /* Override any gcc2 internal prototype to avoid an error.  */
9608 #ifdef __cplusplus
9609 extern "C"
9610 #endif
9611 /* We use char because int might match the return type of a gcc2
9612    builtin and then its argument prototype would still apply.  */
9613 char gethostbyname ();
9614 int
9615 main ()
9616 {
9617 gethostbyname ();
9618   ;
9619   return 0;
9620 }
9621 _ACEOF
9622 rm -f conftest.$ac_objext conftest$ac_exeext
9623 if { (eval echo "$as_me:9623: \"$ac_link\"") >&5
9624   (eval $ac_link) 2>&5
9625   ac_status=$?
9626   echo "$as_me:9626: \$? = $ac_status" >&5
9627   (exit $ac_status); } &&
9628          { ac_try='test -s conftest$ac_exeext'
9629   { (eval echo "$as_me:9629: \"$ac_try\"") >&5
9630   (eval $ac_try) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit $ac_status); }; }; then
9634   ac_cv_lib_bsd_gethostbyname=yes
9635 else
9636   echo "$as_me: failed program was:" >&5
9637 cat conftest.$ac_ext >&5
9638 ac_cv_lib_bsd_gethostbyname=no
9639 fi
9640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9641 LIBS=$ac_check_lib_save_LIBS
9642 fi
9643 echo "$as_me:9643: result: $ac_cv_lib_bsd_gethostbyname" >&5
9644 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9645 if test $ac_cv_lib_bsd_gethostbyname = yes; then
9646   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9647 fi
9648
9649       fi
9650     fi
9651
9652     # lieder@skyler.mavd.honeywell.com says without -lsocket,
9653     # socket/setsockopt and other routines are undefined under SCO ODT
9654     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
9655     # on later versions), says Simon Leinen: it contains gethostby*
9656     # variants that don't use the nameserver (or something).  -lsocket
9657     # must be given before -lnsl if both are needed.  We assume that
9658     # if connect needs -lnsl, so does gethostbyname.
9659     echo "$as_me:9659: checking for connect" >&5
9660 echo $ECHO_N "checking for connect... $ECHO_C" >&6
9661 if test "${ac_cv_func_connect+set}" = set; then
9662   echo $ECHO_N "(cached) $ECHO_C" >&6
9663 else
9664   cat >conftest.$ac_ext <<_ACEOF
9665 #line 9665 "configure"
9666 #include "confdefs.h"
9667 /* System header to define __stub macros and hopefully few prototypes,
9668     which can conflict with char connect (); below.  */
9669 #include <assert.h>
9670 /* Override any gcc2 internal prototype to avoid an error.  */
9671 #ifdef __cplusplus
9672 extern "C"
9673 #endif
9674 /* We use char because int might match the return type of a gcc2
9675    builtin and then its argument prototype would still apply.  */
9676 char connect ();
9677 char (*f) ();
9678
9679 int
9680 main ()
9681 {
9682 /* The GNU C library defines this for functions which it implements
9683     to always fail with ENOSYS.  Some functions are actually named
9684     something starting with __ and the normal name is an alias.  */
9685 #if defined (__stub_connect) || defined (__stub___connect)
9686 choke me
9687 #else
9688 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9689 #endif
9690
9691   ;
9692   return 0;
9693 }
9694 _ACEOF
9695 rm -f conftest.$ac_objext conftest$ac_exeext
9696 if { (eval echo "$as_me:9696: \"$ac_link\"") >&5
9697   (eval $ac_link) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -s conftest$ac_exeext'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); }; }; then
9707   ac_cv_func_connect=yes
9708 else
9709   echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 ac_cv_func_connect=no
9712 fi
9713 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9714 fi
9715 echo "$as_me:9715: result: $ac_cv_func_connect" >&5
9716 echo "${ECHO_T}$ac_cv_func_connect" >&6
9717
9718     if test $ac_cv_func_connect = no; then
9719       echo "$as_me:9719: checking for connect in -lsocket" >&5
9720 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9721 if test "${ac_cv_lib_socket_connect+set}" = set; then
9722   echo $ECHO_N "(cached) $ECHO_C" >&6
9723 else
9724   ac_check_lib_save_LIBS=$LIBS
9725 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9726 cat >conftest.$ac_ext <<_ACEOF
9727 #line 9727 "configure"
9728 #include "confdefs.h"
9729
9730 /* Override any gcc2 internal prototype to avoid an error.  */
9731 #ifdef __cplusplus
9732 extern "C"
9733 #endif
9734 /* We use char because int might match the return type of a gcc2
9735    builtin and then its argument prototype would still apply.  */
9736 char connect ();
9737 int
9738 main ()
9739 {
9740 connect ();
9741   ;
9742   return 0;
9743 }
9744 _ACEOF
9745 rm -f conftest.$ac_objext conftest$ac_exeext
9746 if { (eval echo "$as_me:9746: \"$ac_link\"") >&5
9747   (eval $ac_link) 2>&5
9748   ac_status=$?
9749   echo "$as_me:9749: \$? = $ac_status" >&5
9750   (exit $ac_status); } &&
9751          { ac_try='test -s conftest$ac_exeext'
9752   { (eval echo "$as_me:9752: \"$ac_try\"") >&5
9753   (eval $ac_try) 2>&5
9754   ac_status=$?
9755   echo "$as_me:9755: \$? = $ac_status" >&5
9756   (exit $ac_status); }; }; then
9757   ac_cv_lib_socket_connect=yes
9758 else
9759   echo "$as_me: failed program was:" >&5
9760 cat conftest.$ac_ext >&5
9761 ac_cv_lib_socket_connect=no
9762 fi
9763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9764 LIBS=$ac_check_lib_save_LIBS
9765 fi
9766 echo "$as_me:9766: result: $ac_cv_lib_socket_connect" >&5
9767 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9768 if test $ac_cv_lib_socket_connect = yes; then
9769   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9770 fi
9771
9772     fi
9773
9774     # Guillermo Gomez says -lposix is necessary on A/UX.
9775     echo "$as_me:9775: checking for remove" >&5
9776 echo $ECHO_N "checking for remove... $ECHO_C" >&6
9777 if test "${ac_cv_func_remove+set}" = set; then
9778   echo $ECHO_N "(cached) $ECHO_C" >&6
9779 else
9780   cat >conftest.$ac_ext <<_ACEOF
9781 #line 9781 "configure"
9782 #include "confdefs.h"
9783 /* System header to define __stub macros and hopefully few prototypes,
9784     which can conflict with char remove (); below.  */
9785 #include <assert.h>
9786 /* Override any gcc2 internal prototype to avoid an error.  */
9787 #ifdef __cplusplus
9788 extern "C"
9789 #endif
9790 /* We use char because int might match the return type of a gcc2
9791    builtin and then its argument prototype would still apply.  */
9792 char remove ();
9793 char (*f) ();
9794
9795 int
9796 main ()
9797 {
9798 /* The GNU C library defines this for functions which it implements
9799     to always fail with ENOSYS.  Some functions are actually named
9800     something starting with __ and the normal name is an alias.  */
9801 #if defined (__stub_remove) || defined (__stub___remove)
9802 choke me
9803 #else
9804 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9805 #endif
9806
9807   ;
9808   return 0;
9809 }
9810 _ACEOF
9811 rm -f conftest.$ac_objext conftest$ac_exeext
9812 if { (eval echo "$as_me:9812: \"$ac_link\"") >&5
9813   (eval $ac_link) 2>&5
9814   ac_status=$?
9815   echo "$as_me:9815: \$? = $ac_status" >&5
9816   (exit $ac_status); } &&
9817          { ac_try='test -s conftest$ac_exeext'
9818   { (eval echo "$as_me:9818: \"$ac_try\"") >&5
9819   (eval $ac_try) 2>&5
9820   ac_status=$?
9821   echo "$as_me:9821: \$? = $ac_status" >&5
9822   (exit $ac_status); }; }; then
9823   ac_cv_func_remove=yes
9824 else
9825   echo "$as_me: failed program was:" >&5
9826 cat conftest.$ac_ext >&5
9827 ac_cv_func_remove=no
9828 fi
9829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9830 fi
9831 echo "$as_me:9831: result: $ac_cv_func_remove" >&5
9832 echo "${ECHO_T}$ac_cv_func_remove" >&6
9833
9834     if test $ac_cv_func_remove = no; then
9835       echo "$as_me:9835: checking for remove in -lposix" >&5
9836 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9837 if test "${ac_cv_lib_posix_remove+set}" = set; then
9838   echo $ECHO_N "(cached) $ECHO_C" >&6
9839 else
9840   ac_check_lib_save_LIBS=$LIBS
9841 LIBS="-lposix  $LIBS"
9842 cat >conftest.$ac_ext <<_ACEOF
9843 #line 9843 "configure"
9844 #include "confdefs.h"
9845
9846 /* Override any gcc2 internal prototype to avoid an error.  */
9847 #ifdef __cplusplus
9848 extern "C"
9849 #endif
9850 /* We use char because int might match the return type of a gcc2
9851    builtin and then its argument prototype would still apply.  */
9852 char remove ();
9853 int
9854 main ()
9855 {
9856 remove ();
9857   ;
9858   return 0;
9859 }
9860 _ACEOF
9861 rm -f conftest.$ac_objext conftest$ac_exeext
9862 if { (eval echo "$as_me:9862: \"$ac_link\"") >&5
9863   (eval $ac_link) 2>&5
9864   ac_status=$?
9865   echo "$as_me:9865: \$? = $ac_status" >&5
9866   (exit $ac_status); } &&
9867          { ac_try='test -s conftest$ac_exeext'
9868   { (eval echo "$as_me:9868: \"$ac_try\"") >&5
9869   (eval $ac_try) 2>&5
9870   ac_status=$?
9871   echo "$as_me:9871: \$? = $ac_status" >&5
9872   (exit $ac_status); }; }; then
9873   ac_cv_lib_posix_remove=yes
9874 else
9875   echo "$as_me: failed program was:" >&5
9876 cat conftest.$ac_ext >&5
9877 ac_cv_lib_posix_remove=no
9878 fi
9879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9880 LIBS=$ac_check_lib_save_LIBS
9881 fi
9882 echo "$as_me:9882: result: $ac_cv_lib_posix_remove" >&5
9883 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9884 if test $ac_cv_lib_posix_remove = yes; then
9885   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9886 fi
9887
9888     fi
9889
9890     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9891     echo "$as_me:9891: checking for shmat" >&5
9892 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9893 if test "${ac_cv_func_shmat+set}" = set; then
9894   echo $ECHO_N "(cached) $ECHO_C" >&6
9895 else
9896   cat >conftest.$ac_ext <<_ACEOF
9897 #line 9897 "configure"
9898 #include "confdefs.h"
9899 /* System header to define __stub macros and hopefully few prototypes,
9900     which can conflict with char shmat (); below.  */
9901 #include <assert.h>
9902 /* Override any gcc2 internal prototype to avoid an error.  */
9903 #ifdef __cplusplus
9904 extern "C"
9905 #endif
9906 /* We use char because int might match the return type of a gcc2
9907    builtin and then its argument prototype would still apply.  */
9908 char shmat ();
9909 char (*f) ();
9910
9911 int
9912 main ()
9913 {
9914 /* The GNU C library defines this for functions which it implements
9915     to always fail with ENOSYS.  Some functions are actually named
9916     something starting with __ and the normal name is an alias.  */
9917 #if defined (__stub_shmat) || defined (__stub___shmat)
9918 choke me
9919 #else
9920 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9921 #endif
9922
9923   ;
9924   return 0;
9925 }
9926 _ACEOF
9927 rm -f conftest.$ac_objext conftest$ac_exeext
9928 if { (eval echo "$as_me:9928: \"$ac_link\"") >&5
9929   (eval $ac_link) 2>&5
9930   ac_status=$?
9931   echo "$as_me:9931: \$? = $ac_status" >&5
9932   (exit $ac_status); } &&
9933          { ac_try='test -s conftest$ac_exeext'
9934   { (eval echo "$as_me:9934: \"$ac_try\"") >&5
9935   (eval $ac_try) 2>&5
9936   ac_status=$?
9937   echo "$as_me:9937: \$? = $ac_status" >&5
9938   (exit $ac_status); }; }; then
9939   ac_cv_func_shmat=yes
9940 else
9941   echo "$as_me: failed program was:" >&5
9942 cat conftest.$ac_ext >&5
9943 ac_cv_func_shmat=no
9944 fi
9945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9946 fi
9947 echo "$as_me:9947: result: $ac_cv_func_shmat" >&5
9948 echo "${ECHO_T}$ac_cv_func_shmat" >&6
9949
9950     if test $ac_cv_func_shmat = no; then
9951       echo "$as_me:9951: checking for shmat in -lipc" >&5
9952 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9953 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9954   echo $ECHO_N "(cached) $ECHO_C" >&6
9955 else
9956   ac_check_lib_save_LIBS=$LIBS
9957 LIBS="-lipc  $LIBS"
9958 cat >conftest.$ac_ext <<_ACEOF
9959 #line 9959 "configure"
9960 #include "confdefs.h"
9961
9962 /* Override any gcc2 internal prototype to avoid an error.  */
9963 #ifdef __cplusplus
9964 extern "C"
9965 #endif
9966 /* We use char because int might match the return type of a gcc2
9967    builtin and then its argument prototype would still apply.  */
9968 char shmat ();
9969 int
9970 main ()
9971 {
9972 shmat ();
9973   ;
9974   return 0;
9975 }
9976 _ACEOF
9977 rm -f conftest.$ac_objext conftest$ac_exeext
9978 if { (eval echo "$as_me:9978: \"$ac_link\"") >&5
9979   (eval $ac_link) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit $ac_status); } &&
9983          { ac_try='test -s conftest$ac_exeext'
9984   { (eval echo "$as_me:9984: \"$ac_try\"") >&5
9985   (eval $ac_try) 2>&5
9986   ac_status=$?
9987   echo "$as_me:9987: \$? = $ac_status" >&5
9988   (exit $ac_status); }; }; then
9989   ac_cv_lib_ipc_shmat=yes
9990 else
9991   echo "$as_me: failed program was:" >&5
9992 cat conftest.$ac_ext >&5
9993 ac_cv_lib_ipc_shmat=no
9994 fi
9995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9996 LIBS=$ac_check_lib_save_LIBS
9997 fi
9998 echo "$as_me:9998: result: $ac_cv_lib_ipc_shmat" >&5
9999 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10000 if test $ac_cv_lib_ipc_shmat = yes; then
10001   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10002 fi
10003
10004     fi
10005   fi
10006
10007   # Check for libraries that X11R6 Xt/Xaw programs need.
10008   ac_save_LDFLAGS=$LDFLAGS
10009   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10010   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10011   # check for ICE first), but we must link in the order -lSM -lICE or
10012   # we get undefined symbols.  So assume we have SM if we have ICE.
10013   # These have to be linked with before -lX11, unlike the other
10014   # libraries we check for below, so use a different variable.
10015   # John Interrante, Karl Berry
10016   echo "$as_me:10016: checking for IceConnectionNumber in -lICE" >&5
10017 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10018 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10019   echo $ECHO_N "(cached) $ECHO_C" >&6
10020 else
10021   ac_check_lib_save_LIBS=$LIBS
10022 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10023 cat >conftest.$ac_ext <<_ACEOF
10024 #line 10024 "configure"
10025 #include "confdefs.h"
10026
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 #ifdef __cplusplus
10029 extern "C"
10030 #endif
10031 /* We use char because int might match the return type of a gcc2
10032    builtin and then its argument prototype would still apply.  */
10033 char IceConnectionNumber ();
10034 int
10035 main ()
10036 {
10037 IceConnectionNumber ();
10038   ;
10039   return 0;
10040 }
10041 _ACEOF
10042 rm -f conftest.$ac_objext conftest$ac_exeext
10043 if { (eval echo "$as_me:10043: \"$ac_link\"") >&5
10044   (eval $ac_link) 2>&5
10045   ac_status=$?
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); } &&
10048          { ac_try='test -s conftest$ac_exeext'
10049   { (eval echo "$as_me:10049: \"$ac_try\"") >&5
10050   (eval $ac_try) 2>&5
10051   ac_status=$?
10052   echo "$as_me:10052: \$? = $ac_status" >&5
10053   (exit $ac_status); }; }; then
10054   ac_cv_lib_ICE_IceConnectionNumber=yes
10055 else
10056   echo "$as_me: failed program was:" >&5
10057 cat conftest.$ac_ext >&5
10058 ac_cv_lib_ICE_IceConnectionNumber=no
10059 fi
10060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10061 LIBS=$ac_check_lib_save_LIBS
10062 fi
10063 echo "$as_me:10063: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10064 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10065 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10066   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10067 fi
10068
10069   LDFLAGS=$ac_save_LDFLAGS
10070
10071 fi
10072
10073 cf_x_athena=${cf_x_athena:-Xaw}
10074
10075 echo "$as_me:10075: checking if you want to link with Xaw 3d library" >&5
10076 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10077 withval=
10078
10079 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10080 if test "${with_Xaw3d+set}" = set; then
10081   withval="$with_Xaw3d"
10082
10083 fi;
10084 if test "$withval" = yes ; then
10085         cf_x_athena=Xaw3d
10086         echo "$as_me:10086: result: yes" >&5
10087 echo "${ECHO_T}yes" >&6
10088 else
10089         echo "$as_me:10089: result: no" >&5
10090 echo "${ECHO_T}no" >&6
10091 fi
10092
10093 echo "$as_me:10093: checking if you want to link with Xaw 3d xft library" >&5
10094 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10095 withval=
10096
10097 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10098 if test "${with_Xaw3dxft+set}" = set; then
10099   withval="$with_Xaw3dxft"
10100
10101 fi;
10102 if test "$withval" = yes ; then
10103         cf_x_athena=Xaw3dxft
10104         echo "$as_me:10104: result: yes" >&5
10105 echo "${ECHO_T}yes" >&6
10106 else
10107         echo "$as_me:10107: result: no" >&5
10108 echo "${ECHO_T}no" >&6
10109 fi
10110
10111 echo "$as_me:10111: checking if you want to link with neXT Athena library" >&5
10112 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10113 withval=
10114
10115 # Check whether --with-neXtaw or --without-neXtaw was given.
10116 if test "${with_neXtaw+set}" = set; then
10117   withval="$with_neXtaw"
10118
10119 fi;
10120 if test "$withval" = yes ; then
10121         cf_x_athena=neXtaw
10122         echo "$as_me:10122: result: yes" >&5
10123 echo "${ECHO_T}yes" >&6
10124 else
10125         echo "$as_me:10125: result: no" >&5
10126 echo "${ECHO_T}no" >&6
10127 fi
10128
10129 echo "$as_me:10129: checking if you want to link with Athena-Plus library" >&5
10130 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10131 withval=
10132
10133 # Check whether --with-XawPlus or --without-XawPlus was given.
10134 if test "${with_XawPlus+set}" = set; then
10135   withval="$with_XawPlus"
10136
10137 fi;
10138 if test "$withval" = yes ; then
10139         cf_x_athena=XawPlus
10140         echo "$as_me:10140: result: yes" >&5
10141 echo "${ECHO_T}yes" >&6
10142 else
10143         echo "$as_me:10143: result: no" >&5
10144 echo "${ECHO_T}no" >&6
10145 fi
10146
10147 cf_x_athena_lib=""
10148
10149 if test "$PKG_CONFIG" != none ; then
10150         cf_athena_list=
10151         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10152         for cf_athena_pkg in \
10153                 $cf_athena_list \
10154                 ${cf_x_athena} \
10155                 ${cf_x_athena}-devel \
10156                 lib${cf_x_athena} \
10157                 lib${cf_x_athena}-devel
10158         do
10159
10160 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10161         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
10162
10163 echo "${as_me:-configure}:10163: testing found package $cf_athena_pkg ..." 1>&5
10164
10165         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10166         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10167         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10168
10169 echo "${as_me:-configure}:10169: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10170
10171         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10172
10173 echo "${as_me:-configure}:10173: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10174
10175 cf_fix_cppflags=no
10176 cf_new_cflags=
10177 cf_new_cppflags=
10178 cf_new_extra_cppflags=
10179
10180 for cf_add_cflags in $cf_pkgconfig_incs
10181 do
10182 case $cf_fix_cppflags in
10183 no)
10184         case $cf_add_cflags in #(vi
10185         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10186                 case $cf_add_cflags in
10187                 -D*)
10188                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10189
10190                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10191                                 && test -z "${cf_tst_cflags}" \
10192                                 && cf_fix_cppflags=yes
10193
10194                         if test $cf_fix_cppflags = yes ; then
10195                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10196                                 continue
10197                         elif test "${cf_tst_cflags}" = "\"'" ; then
10198                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10199                                 continue
10200                         fi
10201                         ;;
10202                 esac
10203                 case "$CPPFLAGS" in
10204                 *$cf_add_cflags) #(vi
10205                         ;;
10206                 *) #(vi
10207                         case $cf_add_cflags in #(vi
10208                         -D*)
10209                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10210
10211 CPPFLAGS=`echo "$CPPFLAGS" | \
10212         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10213                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10214
10215                                 ;;
10216                         esac
10217                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10218                         ;;
10219                 esac
10220                 ;;
10221         *)
10222                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10223                 ;;
10224         esac
10225         ;;
10226 yes)
10227         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10228
10229         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10230
10231         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10232                 && test -z "${cf_tst_cflags}" \
10233                 && cf_fix_cppflags=no
10234         ;;
10235 esac
10236 done
10237
10238 if test -n "$cf_new_cflags" ; then
10239
10240         CFLAGS="$CFLAGS $cf_new_cflags"
10241 fi
10242
10243 if test -n "$cf_new_cppflags" ; then
10244
10245         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10246 fi
10247
10248 if test -n "$cf_new_extra_cppflags" ; then
10249
10250         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10251 fi
10252
10253 cf_add_libs="$cf_pkgconfig_libs"
10254 # Filter out duplicates - this happens with badly-designed ".pc" files...
10255 for cf_add_1lib in $LIBS
10256 do
10257         for cf_add_2lib in $cf_add_libs
10258         do
10259                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10260                 then
10261                         cf_add_1lib=
10262                         break
10263                 fi
10264         done
10265         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10266 done
10267 LIBS="$cf_add_libs"
10268
10269                         cf_x_athena_lib="$cf_pkgconfig_libs"
10270
10271 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10272
10273                         cat >>confdefs.h <<EOF
10274 #define $cf_x_athena_LIBS 1
10275 EOF
10276
10277         for cf_trim_lib in Xmu Xt X11
10278         do
10279                 case "$LIBS" in
10280                 *-l$cf_trim_lib\ *-l$cf_trim_lib*)
10281                         LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10282                         test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
10283
10284 echo "${as_me:-configure}:10284: testing ..trimmed $LIBS ..." 1>&5
10285
10286                         ;;
10287                 esac
10288         done
10289
10290 echo "$as_me:10290: checking for usable $cf_x_athena/Xmu package" >&5
10291 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10292 if test "${cf_cv_xaw_compat+set}" = set; then
10293   echo $ECHO_N "(cached) $ECHO_C" >&6
10294 else
10295
10296 cat >conftest.$ac_ext <<_ACEOF
10297 #line 10297 "configure"
10298 #include "confdefs.h"
10299
10300 #include <X11/Xmu/CharSet.h>
10301
10302 int
10303 main ()
10304 {
10305
10306 int check = XmuCompareISOLatin1("big", "small")
10307
10308   ;
10309   return 0;
10310 }
10311 _ACEOF
10312 rm -f conftest.$ac_objext conftest$ac_exeext
10313 if { (eval echo "$as_me:10313: \"$ac_link\"") >&5
10314   (eval $ac_link) 2>&5
10315   ac_status=$?
10316   echo "$as_me:10316: \$? = $ac_status" >&5
10317   (exit $ac_status); } &&
10318          { ac_try='test -s conftest$ac_exeext'
10319   { (eval echo "$as_me:10319: \"$ac_try\"") >&5
10320   (eval $ac_try) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); }; }; then
10324   cf_cv_xaw_compat=yes
10325 else
10326   echo "$as_me: failed program was:" >&5
10327 cat conftest.$ac_ext >&5
10328 cf_cv_xaw_compat=no
10329 fi
10330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10331 fi
10332 echo "$as_me:10332: result: $cf_cv_xaw_compat" >&5
10333 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10334
10335                         if test "$cf_cv_xaw_compat" = no
10336                         then
10337                                 # workaround for broken ".pc" files...
10338                                 case "$cf_x_athena_lib" in #(vi
10339                                 *-lXmu*) #(vi
10340                                         ;;
10341                                 *)
10342                                         test -n "$verbose" && echo "    work around broken package" 1>&6
10343
10344 echo "${as_me:-configure}:10344: testing work around broken package ..." 1>&5
10345
10346                                         cf_save_xmu="$LIBS"
10347                                         cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
10348
10349 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10350         test -n "$verbose" && echo "    found package xmu" 1>&6
10351
10352 echo "${as_me:-configure}:10352: testing found package xmu ..." 1>&5
10353
10354         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10355         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10356         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10357
10358 echo "${as_me:-configure}:10358: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10359
10360         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10361
10362 echo "${as_me:-configure}:10362: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10363
10364 cf_fix_cppflags=no
10365 cf_new_cflags=
10366 cf_new_cppflags=
10367 cf_new_extra_cppflags=
10368
10369 for cf_add_cflags in $cf_pkgconfig_incs
10370 do
10371 case $cf_fix_cppflags in
10372 no)
10373         case $cf_add_cflags in #(vi
10374         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10375                 case $cf_add_cflags in
10376                 -D*)
10377                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10378
10379                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10380                                 && test -z "${cf_tst_cflags}" \
10381                                 && cf_fix_cppflags=yes
10382
10383                         if test $cf_fix_cppflags = yes ; then
10384                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10385                                 continue
10386                         elif test "${cf_tst_cflags}" = "\"'" ; then
10387                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10388                                 continue
10389                         fi
10390                         ;;
10391                 esac
10392                 case "$CPPFLAGS" in
10393                 *$cf_add_cflags) #(vi
10394                         ;;
10395                 *) #(vi
10396                         case $cf_add_cflags in #(vi
10397                         -D*)
10398                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10399
10400 CPPFLAGS=`echo "$CPPFLAGS" | \
10401         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10402                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10403
10404                                 ;;
10405                         esac
10406                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10407                         ;;
10408                 esac
10409                 ;;
10410         *)
10411                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10412                 ;;
10413         esac
10414         ;;
10415 yes)
10416         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10417
10418         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10419
10420         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10421                 && test -z "${cf_tst_cflags}" \
10422                 && cf_fix_cppflags=no
10423         ;;
10424 esac
10425 done
10426
10427 if test -n "$cf_new_cflags" ; then
10428
10429         CFLAGS="$CFLAGS $cf_new_cflags"
10430 fi
10431
10432 if test -n "$cf_new_cppflags" ; then
10433
10434         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10435 fi
10436
10437 if test -n "$cf_new_extra_cppflags" ; then
10438
10439         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10440 fi
10441
10442 cf_add_libs="$cf_pkgconfig_libs"
10443 # Filter out duplicates - this happens with badly-designed ".pc" files...
10444 for cf_add_1lib in $LIBS
10445 do
10446         for cf_add_2lib in $cf_add_libs
10447         do
10448                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10449                 then
10450                         cf_add_1lib=
10451                         break
10452                 fi
10453         done
10454         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10455 done
10456 LIBS="$cf_add_libs"
10457
10458                                                         LIBS="$cf_save_xmu"
10459
10460 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10461
10462 echo "${as_me:-configure}:10462: testing ...before $LIBS ..." 1>&5
10463
10464 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
10465 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10466
10467 echo "${as_me:-configure}:10467: testing ...after  $LIBS ..." 1>&5
10468
10469 else
10470         cf_pkgconfig_incs=
10471         cf_pkgconfig_libs=
10472
10473 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
10474
10475 echo "${as_me:-configure}:10475: testing ...before $LIBS ..." 1>&5
10476
10477 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
10478 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
10479
10480 echo "${as_me:-configure}:10480: testing ...after  $LIBS ..." 1>&5
10481
10482 fi
10483
10484         for cf_trim_lib in Xmu Xt X11
10485         do
10486                 case "$LIBS" in
10487                 *-l$cf_trim_lib\ *-l$cf_trim_lib*)
10488                         LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10489                         test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
10490
10491 echo "${as_me:-configure}:10491: testing ..trimmed $LIBS ..." 1>&5
10492
10493                         ;;
10494                 esac
10495         done
10496
10497                                         ;;
10498                                 esac
10499                         fi
10500
10501                         break
10502 else
10503         cf_pkgconfig_incs=
10504         cf_pkgconfig_libs=
10505         :
10506 fi
10507
10508         done
10509 fi
10510
10511 if test -z "$cf_x_athena_lib" ; then
10512
10513 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
10514         test -n "$verbose" && echo "    found package Xext" 1>&6
10515
10516 echo "${as_me:-configure}:10516: testing found package Xext ..." 1>&5
10517
10518         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
10519         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
10520         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
10521
10522 echo "${as_me:-configure}:10522: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10523
10524         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
10525
10526 echo "${as_me:-configure}:10526: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
10527
10528 cf_fix_cppflags=no
10529 cf_new_cflags=
10530 cf_new_cppflags=
10531 cf_new_extra_cppflags=
10532
10533 for cf_add_cflags in $cf_pkgconfig_incs
10534 do
10535 case $cf_fix_cppflags in
10536 no)
10537         case $cf_add_cflags in #(vi
10538         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10539                 case $cf_add_cflags in
10540                 -D*)
10541                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10542
10543                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10544                                 && test -z "${cf_tst_cflags}" \
10545                                 && cf_fix_cppflags=yes
10546
10547                         if test $cf_fix_cppflags = yes ; then
10548                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10549                                 continue
10550                         elif test "${cf_tst_cflags}" = "\"'" ; then
10551                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10552                                 continue
10553                         fi
10554                         ;;
10555                 esac
10556                 case "$CPPFLAGS" in
10557                 *$cf_add_cflags) #(vi
10558                         ;;
10559                 *) #(vi
10560                         case $cf_add_cflags in #(vi
10561                         -D*)
10562                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10563
10564 CPPFLAGS=`echo "$CPPFLAGS" | \
10565         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10566                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10567
10568                                 ;;
10569                         esac
10570                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10571                         ;;
10572                 esac
10573                 ;;
10574         *)
10575                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10576                 ;;
10577         esac
10578         ;;
10579 yes)
10580         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10581
10582         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10583
10584         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10585                 && test -z "${cf_tst_cflags}" \
10586                 && cf_fix_cppflags=no
10587         ;;
10588 esac
10589 done
10590
10591 if test -n "$cf_new_cflags" ; then
10592
10593         CFLAGS="$CFLAGS $cf_new_cflags"
10594 fi
10595
10596 if test -n "$cf_new_cppflags" ; then
10597
10598         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10599 fi
10600
10601 if test -n "$cf_new_extra_cppflags" ; then
10602
10603         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10604 fi
10605
10606 cf_add_libs="$cf_pkgconfig_libs"
10607 # Filter out duplicates - this happens with badly-designed ".pc" files...
10608 for cf_add_1lib in $LIBS
10609 do
10610         for cf_add_2lib in $cf_add_libs
10611         do
10612                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10613                 then
10614                         cf_add_1lib=
10615                         break
10616                 fi
10617         done
10618         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10619 done
10620 LIBS="$cf_add_libs"
10621
10622         :
10623 else
10624         cf_pkgconfig_incs=
10625         cf_pkgconfig_libs=
10626
10627         echo "$as_me:10627: checking for XextCreateExtension in -lXext" >&5
10628 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
10629 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
10630   echo $ECHO_N "(cached) $ECHO_C" >&6
10631 else
10632   ac_check_lib_save_LIBS=$LIBS
10633 LIBS="-lXext  $LIBS"
10634 cat >conftest.$ac_ext <<_ACEOF
10635 #line 10635 "configure"
10636 #include "confdefs.h"
10637
10638 /* Override any gcc2 internal prototype to avoid an error.  */
10639 #ifdef __cplusplus
10640 extern "C"
10641 #endif
10642 /* We use char because int might match the return type of a gcc2
10643    builtin and then its argument prototype would still apply.  */
10644 char XextCreateExtension ();
10645 int
10646 main ()
10647 {
10648 XextCreateExtension ();
10649   ;
10650   return 0;
10651 }
10652 _ACEOF
10653 rm -f conftest.$ac_objext conftest$ac_exeext
10654 if { (eval echo "$as_me:10654: \"$ac_link\"") >&5
10655   (eval $ac_link) 2>&5
10656   ac_status=$?
10657   echo "$as_me:10657: \$? = $ac_status" >&5
10658   (exit $ac_status); } &&
10659          { ac_try='test -s conftest$ac_exeext'
10660   { (eval echo "$as_me:10660: \"$ac_try\"") >&5
10661   (eval $ac_try) 2>&5
10662   ac_status=$?
10663   echo "$as_me:10663: \$? = $ac_status" >&5
10664   (exit $ac_status); }; }; then
10665   ac_cv_lib_Xext_XextCreateExtension=yes
10666 else
10667   echo "$as_me: failed program was:" >&5
10668 cat conftest.$ac_ext >&5
10669 ac_cv_lib_Xext_XextCreateExtension=no
10670 fi
10671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10672 LIBS=$ac_check_lib_save_LIBS
10673 fi
10674 echo "$as_me:10674: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
10675 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
10676 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
10677
10678 cf_add_libs="-lXext"
10679 # Filter out duplicates - this happens with badly-designed ".pc" files...
10680 for cf_add_1lib in $LIBS
10681 do
10682         for cf_add_2lib in $cf_add_libs
10683         do
10684                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10685                 then
10686                         cf_add_1lib=
10687                         break
10688                 fi
10689         done
10690         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10691 done
10692 LIBS="$cf_add_libs"
10693
10694 fi
10695
10696 fi
10697
10698 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
10699 # in some cases has installed dummy files in the former, other cases replaced
10700 # it with a link to the new location).  This complicates the configure script.
10701 # Check for that pitfall, and recover using pkg-config
10702 #
10703 # If none of these are set, the configuration is almost certainly broken.
10704 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10705 then
10706
10707 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
10708         test -n "$verbose" && echo "    found package x11" 1>&6
10709
10710 echo "${as_me:-configure}:10710: testing found package x11 ..." 1>&5
10711
10712         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
10713         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
10714         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10715
10716 echo "${as_me:-configure}:10716: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10717
10718         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10719
10720 echo "${as_me:-configure}:10720: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10721
10722 cf_fix_cppflags=no
10723 cf_new_cflags=
10724 cf_new_cppflags=
10725 cf_new_extra_cppflags=
10726
10727 for cf_add_cflags in $cf_pkgconfig_incs
10728 do
10729 case $cf_fix_cppflags in
10730 no)
10731         case $cf_add_cflags in #(vi
10732         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10733                 case $cf_add_cflags in
10734                 -D*)
10735                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10736
10737                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10738                                 && test -z "${cf_tst_cflags}" \
10739                                 && cf_fix_cppflags=yes
10740
10741                         if test $cf_fix_cppflags = yes ; then
10742                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10743                                 continue
10744                         elif test "${cf_tst_cflags}" = "\"'" ; then
10745                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10746                                 continue
10747                         fi
10748                         ;;
10749                 esac
10750                 case "$CPPFLAGS" in
10751                 *$cf_add_cflags) #(vi
10752                         ;;
10753                 *) #(vi
10754                         case $cf_add_cflags in #(vi
10755                         -D*)
10756                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10757
10758 CPPFLAGS=`echo "$CPPFLAGS" | \
10759         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10760                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10761
10762                                 ;;
10763                         esac
10764                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10765                         ;;
10766                 esac
10767                 ;;
10768         *)
10769                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10770                 ;;
10771         esac
10772         ;;
10773 yes)
10774         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10775
10776         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10777
10778         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10779                 && test -z "${cf_tst_cflags}" \
10780                 && cf_fix_cppflags=no
10781         ;;
10782 esac
10783 done
10784
10785 if test -n "$cf_new_cflags" ; then
10786
10787         CFLAGS="$CFLAGS $cf_new_cflags"
10788 fi
10789
10790 if test -n "$cf_new_cppflags" ; then
10791
10792         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10793 fi
10794
10795 if test -n "$cf_new_extra_cppflags" ; then
10796
10797         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10798 fi
10799
10800 cf_add_libs="$cf_pkgconfig_libs"
10801 # Filter out duplicates - this happens with badly-designed ".pc" files...
10802 for cf_add_1lib in $LIBS
10803 do
10804         for cf_add_2lib in $cf_add_libs
10805         do
10806                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10807                 then
10808                         cf_add_1lib=
10809                         break
10810                 fi
10811         done
10812         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10813 done
10814 LIBS="$cf_add_libs"
10815
10816         :
10817 else
10818         cf_pkgconfig_incs=
10819         cf_pkgconfig_libs=
10820         { echo "$as_me:10820: WARNING: unable to find X11 library" >&5
10821 echo "$as_me: WARNING: unable to find X11 library" >&2;}
10822 fi
10823
10824 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10825         test -n "$verbose" && echo "    found package ice" 1>&6
10826
10827 echo "${as_me:-configure}:10827: testing found package ice ..." 1>&5
10828
10829         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10830         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
10831         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10832
10833 echo "${as_me:-configure}:10833: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10834
10835         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
10836
10837 echo "${as_me:-configure}:10837: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10838
10839 cf_fix_cppflags=no
10840 cf_new_cflags=
10841 cf_new_cppflags=
10842 cf_new_extra_cppflags=
10843
10844 for cf_add_cflags in $cf_pkgconfig_incs
10845 do
10846 case $cf_fix_cppflags in
10847 no)
10848         case $cf_add_cflags in #(vi
10849         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10850                 case $cf_add_cflags in
10851                 -D*)
10852                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10853
10854                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10855                                 && test -z "${cf_tst_cflags}" \
10856                                 && cf_fix_cppflags=yes
10857
10858                         if test $cf_fix_cppflags = yes ; then
10859                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10860                                 continue
10861                         elif test "${cf_tst_cflags}" = "\"'" ; then
10862                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10863                                 continue
10864                         fi
10865                         ;;
10866                 esac
10867                 case "$CPPFLAGS" in
10868                 *$cf_add_cflags) #(vi
10869                         ;;
10870                 *) #(vi
10871                         case $cf_add_cflags in #(vi
10872                         -D*)
10873                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10874
10875 CPPFLAGS=`echo "$CPPFLAGS" | \
10876         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10877                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10878
10879                                 ;;
10880                         esac
10881                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10882                         ;;
10883                 esac
10884                 ;;
10885         *)
10886                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10887                 ;;
10888         esac
10889         ;;
10890 yes)
10891         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10892
10893         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10894
10895         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10896                 && test -z "${cf_tst_cflags}" \
10897                 && cf_fix_cppflags=no
10898         ;;
10899 esac
10900 done
10901
10902 if test -n "$cf_new_cflags" ; then
10903
10904         CFLAGS="$CFLAGS $cf_new_cflags"
10905 fi
10906
10907 if test -n "$cf_new_cppflags" ; then
10908
10909         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10910 fi
10911
10912 if test -n "$cf_new_extra_cppflags" ; then
10913
10914         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10915 fi
10916
10917 cf_add_libs="$cf_pkgconfig_libs"
10918 # Filter out duplicates - this happens with badly-designed ".pc" files...
10919 for cf_add_1lib in $LIBS
10920 do
10921         for cf_add_2lib in $cf_add_libs
10922         do
10923                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10924                 then
10925                         cf_add_1lib=
10926                         break
10927                 fi
10928         done
10929         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10930 done
10931 LIBS="$cf_add_libs"
10932
10933         :
10934 else
10935         cf_pkgconfig_incs=
10936         cf_pkgconfig_libs=
10937         { echo "$as_me:10937: WARNING: unable to find ICE library" >&5
10938 echo "$as_me: WARNING: unable to find ICE library" >&2;}
10939 fi
10940
10941 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
10942         test -n "$verbose" && echo "    found package sm" 1>&6
10943
10944 echo "${as_me:-configure}:10944: testing found package sm ..." 1>&5
10945
10946         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
10947         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
10948         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10949
10950 echo "${as_me:-configure}:10950: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10951
10952         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
10953
10954 echo "${as_me:-configure}:10954: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10955
10956 cf_fix_cppflags=no
10957 cf_new_cflags=
10958 cf_new_cppflags=
10959 cf_new_extra_cppflags=
10960
10961 for cf_add_cflags in $cf_pkgconfig_incs
10962 do
10963 case $cf_fix_cppflags in
10964 no)
10965         case $cf_add_cflags in #(vi
10966         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10967                 case $cf_add_cflags in
10968                 -D*)
10969                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10970
10971                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10972                                 && test -z "${cf_tst_cflags}" \
10973                                 && cf_fix_cppflags=yes
10974
10975                         if test $cf_fix_cppflags = yes ; then
10976                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10977                                 continue
10978                         elif test "${cf_tst_cflags}" = "\"'" ; then
10979                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10980                                 continue
10981                         fi
10982                         ;;
10983                 esac
10984                 case "$CPPFLAGS" in
10985                 *$cf_add_cflags) #(vi
10986                         ;;
10987                 *) #(vi
10988                         case $cf_add_cflags in #(vi
10989                         -D*)
10990                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10991
10992 CPPFLAGS=`echo "$CPPFLAGS" | \
10993         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10994                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10995
10996                                 ;;
10997                         esac
10998                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10999                         ;;
11000                 esac
11001                 ;;
11002         *)
11003                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11004                 ;;
11005         esac
11006         ;;
11007 yes)
11008         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11009
11010         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11011
11012         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11013                 && test -z "${cf_tst_cflags}" \
11014                 && cf_fix_cppflags=no
11015         ;;
11016 esac
11017 done
11018
11019 if test -n "$cf_new_cflags" ; then
11020
11021         CFLAGS="$CFLAGS $cf_new_cflags"
11022 fi
11023
11024 if test -n "$cf_new_cppflags" ; then
11025
11026         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11027 fi
11028
11029 if test -n "$cf_new_extra_cppflags" ; then
11030
11031         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11032 fi
11033
11034 cf_add_libs="$cf_pkgconfig_libs"
11035 # Filter out duplicates - this happens with badly-designed ".pc" files...
11036 for cf_add_1lib in $LIBS
11037 do
11038         for cf_add_2lib in $cf_add_libs
11039         do
11040                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11041                 then
11042                         cf_add_1lib=
11043                         break
11044                 fi
11045         done
11046         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11047 done
11048 LIBS="$cf_add_libs"
11049
11050         :
11051 else
11052         cf_pkgconfig_incs=
11053         cf_pkgconfig_libs=
11054         { echo "$as_me:11054: WARNING: unable to find SM library" >&5
11055 echo "$as_me: WARNING: unable to find SM library" >&2;}
11056 fi
11057
11058 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11059         test -n "$verbose" && echo "    found package xt" 1>&6
11060
11061 echo "${as_me:-configure}:11061: testing found package xt ..." 1>&5
11062
11063         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11064         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11065         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11066
11067 echo "${as_me:-configure}:11067: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11068
11069         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
11070
11071 echo "${as_me:-configure}:11071: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11072
11073 cf_fix_cppflags=no
11074 cf_new_cflags=
11075 cf_new_cppflags=
11076 cf_new_extra_cppflags=
11077
11078 for cf_add_cflags in $cf_pkgconfig_incs
11079 do
11080 case $cf_fix_cppflags in
11081 no)
11082         case $cf_add_cflags in #(vi
11083         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11084                 case $cf_add_cflags in
11085                 -D*)
11086                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11087
11088                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11089                                 && test -z "${cf_tst_cflags}" \
11090                                 && cf_fix_cppflags=yes
11091
11092                         if test $cf_fix_cppflags = yes ; then
11093                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11094                                 continue
11095                         elif test "${cf_tst_cflags}" = "\"'" ; then
11096                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11097                                 continue
11098                         fi
11099                         ;;
11100                 esac
11101                 case "$CPPFLAGS" in
11102                 *$cf_add_cflags) #(vi
11103                         ;;
11104                 *) #(vi
11105                         case $cf_add_cflags in #(vi
11106                         -D*)
11107                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11108
11109 CPPFLAGS=`echo "$CPPFLAGS" | \
11110         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11111                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11112
11113                                 ;;
11114                         esac
11115                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11116                         ;;
11117                 esac
11118                 ;;
11119         *)
11120                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11121                 ;;
11122         esac
11123         ;;
11124 yes)
11125         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11126
11127         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11128
11129         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11130                 && test -z "${cf_tst_cflags}" \
11131                 && cf_fix_cppflags=no
11132         ;;
11133 esac
11134 done
11135
11136 if test -n "$cf_new_cflags" ; then
11137
11138         CFLAGS="$CFLAGS $cf_new_cflags"
11139 fi
11140
11141 if test -n "$cf_new_cppflags" ; then
11142
11143         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11144 fi
11145
11146 if test -n "$cf_new_extra_cppflags" ; then
11147
11148         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11149 fi
11150
11151 cf_add_libs="$cf_pkgconfig_libs"
11152 # Filter out duplicates - this happens with badly-designed ".pc" files...
11153 for cf_add_1lib in $LIBS
11154 do
11155         for cf_add_2lib in $cf_add_libs
11156         do
11157                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11158                 then
11159                         cf_add_1lib=
11160                         break
11161                 fi
11162         done
11163         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11164 done
11165 LIBS="$cf_add_libs"
11166
11167         :
11168 else
11169         cf_pkgconfig_incs=
11170         cf_pkgconfig_libs=
11171         { echo "$as_me:11171: WARNING: unable to find Xt library" >&5
11172 echo "$as_me: WARNING: unable to find Xt library" >&2;}
11173 fi
11174
11175 fi
11176
11177 cf_have_X_LIBS=no
11178
11179 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11180         test -n "$verbose" && echo "    found package xt" 1>&6
11181
11182 echo "${as_me:-configure}:11182: testing found package xt ..." 1>&5
11183
11184         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11185         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11186         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11187
11188 echo "${as_me:-configure}:11188: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11189
11190         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
11191
11192 echo "${as_me:-configure}:11192: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11193
11194 cf_fix_cppflags=no
11195 cf_new_cflags=
11196 cf_new_cppflags=
11197 cf_new_extra_cppflags=
11198
11199 for cf_add_cflags in $cf_pkgconfig_incs
11200 do
11201 case $cf_fix_cppflags in
11202 no)
11203         case $cf_add_cflags in #(vi
11204         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11205                 case $cf_add_cflags in
11206                 -D*)
11207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11208
11209                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11210                                 && test -z "${cf_tst_cflags}" \
11211                                 && cf_fix_cppflags=yes
11212
11213                         if test $cf_fix_cppflags = yes ; then
11214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11215                                 continue
11216                         elif test "${cf_tst_cflags}" = "\"'" ; then
11217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11218                                 continue
11219                         fi
11220                         ;;
11221                 esac
11222                 case "$CPPFLAGS" in
11223                 *$cf_add_cflags) #(vi
11224                         ;;
11225                 *) #(vi
11226                         case $cf_add_cflags in #(vi
11227                         -D*)
11228                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11229
11230 CPPFLAGS=`echo "$CPPFLAGS" | \
11231         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11232                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11233
11234                                 ;;
11235                         esac
11236                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11237                         ;;
11238                 esac
11239                 ;;
11240         *)
11241                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11242                 ;;
11243         esac
11244         ;;
11245 yes)
11246         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11247
11248         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11249
11250         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11251                 && test -z "${cf_tst_cflags}" \
11252                 && cf_fix_cppflags=no
11253         ;;
11254 esac
11255 done
11256
11257 if test -n "$cf_new_cflags" ; then
11258
11259         CFLAGS="$CFLAGS $cf_new_cflags"
11260 fi
11261
11262 if test -n "$cf_new_cppflags" ; then
11263
11264         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11265 fi
11266
11267 if test -n "$cf_new_extra_cppflags" ; then
11268
11269         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11270 fi
11271
11272 cf_add_libs="$cf_pkgconfig_libs"
11273 # Filter out duplicates - this happens with badly-designed ".pc" files...
11274 for cf_add_1lib in $LIBS
11275 do
11276         for cf_add_2lib in $cf_add_libs
11277         do
11278                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11279                 then
11280                         cf_add_1lib=
11281                         break
11282                 fi
11283         done
11284         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11285 done
11286 LIBS="$cf_add_libs"
11287
11288         case "x$LIBS" in #(vi
11289         *-lX11*) #(vi
11290                 ;;
11291         *)
11292 # we have an "xt" package, but it may omit Xt's dependency on X11
11293 echo "$as_me:11293: checking for usable X dependency" >&5
11294 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11295 if test "${cf_cv_xt_x11_compat+set}" = set; then
11296   echo $ECHO_N "(cached) $ECHO_C" >&6
11297 else
11298
11299 cat >conftest.$ac_ext <<_ACEOF
11300 #line 11300 "configure"
11301 #include "confdefs.h"
11302
11303 #include <X11/Xlib.h>
11304
11305 int
11306 main ()
11307 {
11308
11309         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11310         int rc2 = XClearWindow((Display*) 0, (Window) 0);
11311         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11312         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11313
11314   ;
11315   return 0;
11316 }
11317 _ACEOF
11318 rm -f conftest.$ac_objext conftest$ac_exeext
11319 if { (eval echo "$as_me:11319: \"$ac_link\"") >&5
11320   (eval $ac_link) 2>&5
11321   ac_status=$?
11322   echo "$as_me:11322: \$? = $ac_status" >&5
11323   (exit $ac_status); } &&
11324          { ac_try='test -s conftest$ac_exeext'
11325   { (eval echo "$as_me:11325: \"$ac_try\"") >&5
11326   (eval $ac_try) 2>&5
11327   ac_status=$?
11328   echo "$as_me:11328: \$? = $ac_status" >&5
11329   (exit $ac_status); }; }; then
11330   cf_cv_xt_x11_compat=yes
11331 else
11332   echo "$as_me: failed program was:" >&5
11333 cat conftest.$ac_ext >&5
11334 cf_cv_xt_x11_compat=no
11335 fi
11336 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11337 fi
11338 echo "$as_me:11338: result: $cf_cv_xt_x11_compat" >&5
11339 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11340                 if test "$cf_cv_xt_x11_compat" = no
11341                 then
11342                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
11343
11344 echo "${as_me:-configure}:11344: testing work around broken X11 dependency ..." 1>&5
11345
11346                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11347
11348 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11349         test -n "$verbose" && echo "    found package x11" 1>&6
11350
11351 echo "${as_me:-configure}:11351: testing found package x11 ..." 1>&5
11352
11353         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11354         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11355         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11356
11357 echo "${as_me:-configure}:11357: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11358
11359         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11360
11361 echo "${as_me:-configure}:11361: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11362
11363 cf_fix_cppflags=no
11364 cf_new_cflags=
11365 cf_new_cppflags=
11366 cf_new_extra_cppflags=
11367
11368 for cf_add_cflags in $cf_pkgconfig_incs
11369 do
11370 case $cf_fix_cppflags in
11371 no)
11372         case $cf_add_cflags in #(vi
11373         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11374                 case $cf_add_cflags in
11375                 -D*)
11376                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11377
11378                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11379                                 && test -z "${cf_tst_cflags}" \
11380                                 && cf_fix_cppflags=yes
11381
11382                         if test $cf_fix_cppflags = yes ; then
11383                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11384                                 continue
11385                         elif test "${cf_tst_cflags}" = "\"'" ; then
11386                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11387                                 continue
11388                         fi
11389                         ;;
11390                 esac
11391                 case "$CPPFLAGS" in
11392                 *$cf_add_cflags) #(vi
11393                         ;;
11394                 *) #(vi
11395                         case $cf_add_cflags in #(vi
11396                         -D*)
11397                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11398
11399 CPPFLAGS=`echo "$CPPFLAGS" | \
11400         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11401                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11402
11403                                 ;;
11404                         esac
11405                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11406                         ;;
11407                 esac
11408                 ;;
11409         *)
11410                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11411                 ;;
11412         esac
11413         ;;
11414 yes)
11415         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11416
11417         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11418
11419         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11420                 && test -z "${cf_tst_cflags}" \
11421                 && cf_fix_cppflags=no
11422         ;;
11423 esac
11424 done
11425
11426 if test -n "$cf_new_cflags" ; then
11427
11428         CFLAGS="$CFLAGS $cf_new_cflags"
11429 fi
11430
11431 if test -n "$cf_new_cppflags" ; then
11432
11433         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11434 fi
11435
11436 if test -n "$cf_new_extra_cppflags" ; then
11437
11438         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11439 fi
11440
11441 cf_add_libs="$cf_pkgconfig_libs"
11442 # Filter out duplicates - this happens with badly-designed ".pc" files...
11443 for cf_add_1lib in $LIBS
11444 do
11445         for cf_add_2lib in $cf_add_libs
11446         do
11447                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11448                 then
11449                         cf_add_1lib=
11450                         break
11451                 fi
11452         done
11453         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11454 done
11455 LIBS="$cf_add_libs"
11456
11457         :
11458 else
11459         cf_pkgconfig_incs=
11460         cf_pkgconfig_libs=
11461
11462 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11463
11464 echo "${as_me:-configure}:11464: testing ...before $LIBS ..." 1>&5
11465
11466 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
11467 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11468
11469 echo "${as_me:-configure}:11469: testing ...after  $LIBS ..." 1>&5
11470
11471 fi
11472
11473                 fi
11474                 ;;
11475         esac
11476
11477 echo "$as_me:11477: checking for usable X Toolkit package" >&5
11478 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11479 if test "${cf_cv_xt_ice_compat+set}" = set; then
11480   echo $ECHO_N "(cached) $ECHO_C" >&6
11481 else
11482
11483 cat >conftest.$ac_ext <<_ACEOF
11484 #line 11484 "configure"
11485 #include "confdefs.h"
11486
11487 #include <X11/Shell.h>
11488
11489 int
11490 main ()
11491 {
11492 int num = IceConnectionNumber(0)
11493
11494   ;
11495   return 0;
11496 }
11497 _ACEOF
11498 rm -f conftest.$ac_objext conftest$ac_exeext
11499 if { (eval echo "$as_me:11499: \"$ac_link\"") >&5
11500   (eval $ac_link) 2>&5
11501   ac_status=$?
11502   echo "$as_me:11502: \$? = $ac_status" >&5
11503   (exit $ac_status); } &&
11504          { ac_try='test -s conftest$ac_exeext'
11505   { (eval echo "$as_me:11505: \"$ac_try\"") >&5
11506   (eval $ac_try) 2>&5
11507   ac_status=$?
11508   echo "$as_me:11508: \$? = $ac_status" >&5
11509   (exit $ac_status); }; }; then
11510   cf_cv_xt_ice_compat=yes
11511 else
11512   echo "$as_me: failed program was:" >&5
11513 cat conftest.$ac_ext >&5
11514 cf_cv_xt_ice_compat=no
11515 fi
11516 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11517 fi
11518 echo "$as_me:11518: result: $cf_cv_xt_ice_compat" >&5
11519 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11520
11521         if test "$cf_cv_xt_ice_compat" = no
11522         then
11523                 # workaround for broken ".pc" files used for X Toolkit.
11524                 case "x$X_PRE_LIBS" in #(vi
11525                 *-lICE*)
11526                         case "x$LIBS" in #(vi
11527                         *-lICE*) #(vi
11528                                 ;;
11529                         *)
11530                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
11531
11532 echo "${as_me:-configure}:11532: testing work around broken ICE dependency ..." 1>&5
11533
11534 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11535         test -n "$verbose" && echo "    found package ice" 1>&6
11536
11537 echo "${as_me:-configure}:11537: testing found package ice ..." 1>&5
11538
11539         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11540         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11541         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11542
11543 echo "${as_me:-configure}:11543: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11544
11545         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
11546
11547 echo "${as_me:-configure}:11547: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11548
11549 cf_fix_cppflags=no
11550 cf_new_cflags=
11551 cf_new_cppflags=
11552 cf_new_extra_cppflags=
11553
11554 for cf_add_cflags in $cf_pkgconfig_incs
11555 do
11556 case $cf_fix_cppflags in
11557 no)
11558         case $cf_add_cflags in #(vi
11559         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11560                 case $cf_add_cflags in
11561                 -D*)
11562                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11563
11564                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11565                                 && test -z "${cf_tst_cflags}" \
11566                                 && cf_fix_cppflags=yes
11567
11568                         if test $cf_fix_cppflags = yes ; then
11569                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11570                                 continue
11571                         elif test "${cf_tst_cflags}" = "\"'" ; then
11572                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11573                                 continue
11574                         fi
11575                         ;;
11576                 esac
11577                 case "$CPPFLAGS" in
11578                 *$cf_add_cflags) #(vi
11579                         ;;
11580                 *) #(vi
11581                         case $cf_add_cflags in #(vi
11582                         -D*)
11583                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11584
11585 CPPFLAGS=`echo "$CPPFLAGS" | \
11586         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11587                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11588
11589                                 ;;
11590                         esac
11591                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11592                         ;;
11593                 esac
11594                 ;;
11595         *)
11596                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11597                 ;;
11598         esac
11599         ;;
11600 yes)
11601         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11602
11603         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11604
11605         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11606                 && test -z "${cf_tst_cflags}" \
11607                 && cf_fix_cppflags=no
11608         ;;
11609 esac
11610 done
11611
11612 if test -n "$cf_new_cflags" ; then
11613
11614         CFLAGS="$CFLAGS $cf_new_cflags"
11615 fi
11616
11617 if test -n "$cf_new_cppflags" ; then
11618
11619         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11620 fi
11621
11622 if test -n "$cf_new_extra_cppflags" ; then
11623
11624         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11625 fi
11626
11627 cf_add_libs="$cf_pkgconfig_libs"
11628 # Filter out duplicates - this happens with badly-designed ".pc" files...
11629 for cf_add_1lib in $LIBS
11630 do
11631         for cf_add_2lib in $cf_add_libs
11632         do
11633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11634                 then
11635                         cf_add_1lib=
11636                         break
11637                 fi
11638         done
11639         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11640 done
11641 LIBS="$cf_add_libs"
11642
11643 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11644         test -n "$verbose" && echo "    found package sm" 1>&6
11645
11646 echo "${as_me:-configure}:11646: testing found package sm ..." 1>&5
11647
11648         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11649         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11650         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11651
11652 echo "${as_me:-configure}:11652: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11653
11654         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
11655
11656 echo "${as_me:-configure}:11656: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11657
11658 cf_fix_cppflags=no
11659 cf_new_cflags=
11660 cf_new_cppflags=
11661 cf_new_extra_cppflags=
11662
11663 for cf_add_cflags in $cf_pkgconfig_incs
11664 do
11665 case $cf_fix_cppflags in
11666 no)
11667         case $cf_add_cflags in #(vi
11668         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11669                 case $cf_add_cflags in
11670                 -D*)
11671                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11672
11673                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11674                                 && test -z "${cf_tst_cflags}" \
11675                                 && cf_fix_cppflags=yes
11676
11677                         if test $cf_fix_cppflags = yes ; then
11678                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11679                                 continue
11680                         elif test "${cf_tst_cflags}" = "\"'" ; then
11681                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11682                                 continue
11683                         fi
11684                         ;;
11685                 esac
11686                 case "$CPPFLAGS" in
11687                 *$cf_add_cflags) #(vi
11688                         ;;
11689                 *) #(vi
11690                         case $cf_add_cflags in #(vi
11691                         -D*)
11692                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11693
11694 CPPFLAGS=`echo "$CPPFLAGS" | \
11695         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11696                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11697
11698                                 ;;
11699                         esac
11700                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11701                         ;;
11702                 esac
11703                 ;;
11704         *)
11705                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11706                 ;;
11707         esac
11708         ;;
11709 yes)
11710         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11711
11712         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11713
11714         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11715                 && test -z "${cf_tst_cflags}" \
11716                 && cf_fix_cppflags=no
11717         ;;
11718 esac
11719 done
11720
11721 if test -n "$cf_new_cflags" ; then
11722
11723         CFLAGS="$CFLAGS $cf_new_cflags"
11724 fi
11725
11726 if test -n "$cf_new_cppflags" ; then
11727
11728         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11729 fi
11730
11731 if test -n "$cf_new_extra_cppflags" ; then
11732
11733         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11734 fi
11735
11736 cf_add_libs="$cf_pkgconfig_libs"
11737 # Filter out duplicates - this happens with badly-designed ".pc" files...
11738 for cf_add_1lib in $LIBS
11739 do
11740         for cf_add_2lib in $cf_add_libs
11741         do
11742                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11743                 then
11744                         cf_add_1lib=
11745                         break
11746                 fi
11747         done
11748         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11749 done
11750 LIBS="$cf_add_libs"
11751
11752         :
11753 else
11754         cf_pkgconfig_incs=
11755         cf_pkgconfig_libs=
11756         :
11757 fi
11758
11759 else
11760         cf_pkgconfig_incs=
11761         cf_pkgconfig_libs=
11762
11763 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
11764
11765 echo "${as_me:-configure}:11765: testing ...before $LIBS ..." 1>&5
11766
11767 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
11768 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
11769
11770 echo "${as_me:-configure}:11770: testing ...after  $LIBS ..." 1>&5
11771
11772 fi
11773
11774                                 ;;
11775                         esac
11776                         ;;
11777                 esac
11778         fi
11779
11780         cf_have_X_LIBS=yes
11781
11782 else
11783         cf_pkgconfig_incs=
11784         cf_pkgconfig_libs=
11785
11786         LDFLAGS="$X_LIBS $LDFLAGS"
11787
11788 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
11789
11790 echo "${as_me:-configure}:11790: testing checking additions to CFLAGS ..." 1>&5
11791
11792 cf_check_cflags="$CFLAGS"
11793 cf_check_cppflags="$CPPFLAGS"
11794
11795 cf_fix_cppflags=no
11796 cf_new_cflags=
11797 cf_new_cppflags=
11798 cf_new_extra_cppflags=
11799
11800 for cf_add_cflags in $X_CFLAGS
11801 do
11802 case $cf_fix_cppflags in
11803 no)
11804         case $cf_add_cflags in #(vi
11805         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11806                 case $cf_add_cflags in
11807                 -D*)
11808                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11809
11810                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11811                                 && test -z "${cf_tst_cflags}" \
11812                                 && cf_fix_cppflags=yes
11813
11814                         if test $cf_fix_cppflags = yes ; then
11815                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11816                                 continue
11817                         elif test "${cf_tst_cflags}" = "\"'" ; then
11818                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11819                                 continue
11820                         fi
11821                         ;;
11822                 esac
11823                 case "$CPPFLAGS" in
11824                 *$cf_add_cflags) #(vi
11825                         ;;
11826                 *) #(vi
11827                         case $cf_add_cflags in #(vi
11828                         -D*)
11829                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11830
11831 CPPFLAGS=`echo "$CPPFLAGS" | \
11832         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11833                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11834
11835                                 ;;
11836                         esac
11837                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11838                         ;;
11839                 esac
11840                 ;;
11841         *)
11842                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11843                 ;;
11844         esac
11845         ;;
11846 yes)
11847         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11848
11849         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11850
11851         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11852                 && test -z "${cf_tst_cflags}" \
11853                 && cf_fix_cppflags=no
11854         ;;
11855 esac
11856 done
11857
11858 if test -n "$cf_new_cflags" ; then
11859         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11860
11861 echo "${as_me:-configure}:11861: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11862
11863         CFLAGS="$CFLAGS $cf_new_cflags"
11864 fi
11865
11866 if test -n "$cf_new_cppflags" ; then
11867         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11868
11869 echo "${as_me:-configure}:11869: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11870
11871         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11872 fi
11873
11874 if test -n "$cf_new_extra_cppflags" ; then
11875         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11876
11877 echo "${as_me:-configure}:11877: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11878
11879         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11880 fi
11881
11882 if test "$cf_check_cflags" != "$CFLAGS" ; then
11883 cat >conftest.$ac_ext <<_ACEOF
11884 #line 11884 "configure"
11885 #include "confdefs.h"
11886 #include <stdio.h>
11887 int
11888 main ()
11889 {
11890 printf("Hello world");
11891   ;
11892   return 0;
11893 }
11894 _ACEOF
11895 rm -f conftest.$ac_objext conftest$ac_exeext
11896 if { (eval echo "$as_me:11896: \"$ac_link\"") >&5
11897   (eval $ac_link) 2>&5
11898   ac_status=$?
11899   echo "$as_me:11899: \$? = $ac_status" >&5
11900   (exit $ac_status); } &&
11901          { ac_try='test -s conftest$ac_exeext'
11902   { (eval echo "$as_me:11902: \"$ac_try\"") >&5
11903   (eval $ac_try) 2>&5
11904   ac_status=$?
11905   echo "$as_me:11905: \$? = $ac_status" >&5
11906   (exit $ac_status); }; }; then
11907   :
11908 else
11909   echo "$as_me: failed program was:" >&5
11910 cat conftest.$ac_ext >&5
11911 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11912
11913 echo "${as_me:-configure}:11913: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11914
11915          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11916                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
11917
11918 echo "${as_me:-configure}:11918: testing but keeping change to \$CPPFLAGS ..." 1>&5
11919
11920          fi
11921          CFLAGS="$cf_check_flags"
11922 fi
11923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11924 fi
11925
11926         echo "$as_me:11926: checking for XOpenDisplay" >&5
11927 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11928 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11929   echo $ECHO_N "(cached) $ECHO_C" >&6
11930 else
11931   cat >conftest.$ac_ext <<_ACEOF
11932 #line 11932 "configure"
11933 #include "confdefs.h"
11934 /* System header to define __stub macros and hopefully few prototypes,
11935     which can conflict with char XOpenDisplay (); below.  */
11936 #include <assert.h>
11937 /* Override any gcc2 internal prototype to avoid an error.  */
11938 #ifdef __cplusplus
11939 extern "C"
11940 #endif
11941 /* We use char because int might match the return type of a gcc2
11942    builtin and then its argument prototype would still apply.  */
11943 char XOpenDisplay ();
11944 char (*f) ();
11945
11946 int
11947 main ()
11948 {
11949 /* The GNU C library defines this for functions which it implements
11950     to always fail with ENOSYS.  Some functions are actually named
11951     something starting with __ and the normal name is an alias.  */
11952 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11953 choke me
11954 #else
11955 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11956 #endif
11957
11958   ;
11959   return 0;
11960 }
11961 _ACEOF
11962 rm -f conftest.$ac_objext conftest$ac_exeext
11963 if { (eval echo "$as_me:11963: \"$ac_link\"") >&5
11964   (eval $ac_link) 2>&5
11965   ac_status=$?
11966   echo "$as_me:11966: \$? = $ac_status" >&5
11967   (exit $ac_status); } &&
11968          { ac_try='test -s conftest$ac_exeext'
11969   { (eval echo "$as_me:11969: \"$ac_try\"") >&5
11970   (eval $ac_try) 2>&5
11971   ac_status=$?
11972   echo "$as_me:11972: \$? = $ac_status" >&5
11973   (exit $ac_status); }; }; then
11974   ac_cv_func_XOpenDisplay=yes
11975 else
11976   echo "$as_me: failed program was:" >&5
11977 cat conftest.$ac_ext >&5
11978 ac_cv_func_XOpenDisplay=no
11979 fi
11980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11981 fi
11982 echo "$as_me:11982: result: $ac_cv_func_XOpenDisplay" >&5
11983 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11984 if test $ac_cv_func_XOpenDisplay = yes; then
11985   :
11986 else
11987
11988         echo "$as_me:11988: checking for XOpenDisplay in -lX11" >&5
11989 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11990 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11991   echo $ECHO_N "(cached) $ECHO_C" >&6
11992 else
11993   ac_check_lib_save_LIBS=$LIBS
11994 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
11995 cat >conftest.$ac_ext <<_ACEOF
11996 #line 11996 "configure"
11997 #include "confdefs.h"
11998
11999 /* Override any gcc2 internal prototype to avoid an error.  */
12000 #ifdef __cplusplus
12001 extern "C"
12002 #endif
12003 /* We use char because int might match the return type of a gcc2
12004    builtin and then its argument prototype would still apply.  */
12005 char XOpenDisplay ();
12006 int
12007 main ()
12008 {
12009 XOpenDisplay ();
12010   ;
12011   return 0;
12012 }
12013 _ACEOF
12014 rm -f conftest.$ac_objext conftest$ac_exeext
12015 if { (eval echo "$as_me:12015: \"$ac_link\"") >&5
12016   (eval $ac_link) 2>&5
12017   ac_status=$?
12018   echo "$as_me:12018: \$? = $ac_status" >&5
12019   (exit $ac_status); } &&
12020          { ac_try='test -s conftest$ac_exeext'
12021   { (eval echo "$as_me:12021: \"$ac_try\"") >&5
12022   (eval $ac_try) 2>&5
12023   ac_status=$?
12024   echo "$as_me:12024: \$? = $ac_status" >&5
12025   (exit $ac_status); }; }; then
12026   ac_cv_lib_X11_XOpenDisplay=yes
12027 else
12028   echo "$as_me: failed program was:" >&5
12029 cat conftest.$ac_ext >&5
12030 ac_cv_lib_X11_XOpenDisplay=no
12031 fi
12032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12033 LIBS=$ac_check_lib_save_LIBS
12034 fi
12035 echo "$as_me:12035: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12036 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12037 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12038
12039 cf_add_libs="-lX11"
12040 # Filter out duplicates - this happens with badly-designed ".pc" files...
12041 for cf_add_1lib in $LIBS
12042 do
12043         for cf_add_2lib in $cf_add_libs
12044         do
12045                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12046                 then
12047                         cf_add_1lib=
12048                         break
12049                 fi
12050         done
12051         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12052 done
12053 LIBS="$cf_add_libs"
12054
12055 fi
12056
12057 fi
12058
12059         echo "$as_me:12059: checking for XtAppInitialize" >&5
12060 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12061 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12062   echo $ECHO_N "(cached) $ECHO_C" >&6
12063 else
12064   cat >conftest.$ac_ext <<_ACEOF
12065 #line 12065 "configure"
12066 #include "confdefs.h"
12067 /* System header to define __stub macros and hopefully few prototypes,
12068     which can conflict with char XtAppInitialize (); below.  */
12069 #include <assert.h>
12070 /* Override any gcc2 internal prototype to avoid an error.  */
12071 #ifdef __cplusplus
12072 extern "C"
12073 #endif
12074 /* We use char because int might match the return type of a gcc2
12075    builtin and then its argument prototype would still apply.  */
12076 char XtAppInitialize ();
12077 char (*f) ();
12078
12079 int
12080 main ()
12081 {
12082 /* The GNU C library defines this for functions which it implements
12083     to always fail with ENOSYS.  Some functions are actually named
12084     something starting with __ and the normal name is an alias.  */
12085 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12086 choke me
12087 #else
12088 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12089 #endif
12090
12091   ;
12092   return 0;
12093 }
12094 _ACEOF
12095 rm -f conftest.$ac_objext conftest$ac_exeext
12096 if { (eval echo "$as_me:12096: \"$ac_link\"") >&5
12097   (eval $ac_link) 2>&5
12098   ac_status=$?
12099   echo "$as_me:12099: \$? = $ac_status" >&5
12100   (exit $ac_status); } &&
12101          { ac_try='test -s conftest$ac_exeext'
12102   { (eval echo "$as_me:12102: \"$ac_try\"") >&5
12103   (eval $ac_try) 2>&5
12104   ac_status=$?
12105   echo "$as_me:12105: \$? = $ac_status" >&5
12106   (exit $ac_status); }; }; then
12107   ac_cv_func_XtAppInitialize=yes
12108 else
12109   echo "$as_me: failed program was:" >&5
12110 cat conftest.$ac_ext >&5
12111 ac_cv_func_XtAppInitialize=no
12112 fi
12113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12114 fi
12115 echo "$as_me:12115: result: $ac_cv_func_XtAppInitialize" >&5
12116 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12117 if test $ac_cv_func_XtAppInitialize = yes; then
12118   :
12119 else
12120
12121         echo "$as_me:12121: checking for XtAppInitialize in -lXt" >&5
12122 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12123 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12124   echo $ECHO_N "(cached) $ECHO_C" >&6
12125 else
12126   ac_check_lib_save_LIBS=$LIBS
12127 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12128 cat >conftest.$ac_ext <<_ACEOF
12129 #line 12129 "configure"
12130 #include "confdefs.h"
12131
12132 /* Override any gcc2 internal prototype to avoid an error.  */
12133 #ifdef __cplusplus
12134 extern "C"
12135 #endif
12136 /* We use char because int might match the return type of a gcc2
12137    builtin and then its argument prototype would still apply.  */
12138 char XtAppInitialize ();
12139 int
12140 main ()
12141 {
12142 XtAppInitialize ();
12143   ;
12144   return 0;
12145 }
12146 _ACEOF
12147 rm -f conftest.$ac_objext conftest$ac_exeext
12148 if { (eval echo "$as_me:12148: \"$ac_link\"") >&5
12149   (eval $ac_link) 2>&5
12150   ac_status=$?
12151   echo "$as_me:12151: \$? = $ac_status" >&5
12152   (exit $ac_status); } &&
12153          { ac_try='test -s conftest$ac_exeext'
12154   { (eval echo "$as_me:12154: \"$ac_try\"") >&5
12155   (eval $ac_try) 2>&5
12156   ac_status=$?
12157   echo "$as_me:12157: \$? = $ac_status" >&5
12158   (exit $ac_status); }; }; then
12159   ac_cv_lib_Xt_XtAppInitialize=yes
12160 else
12161   echo "$as_me: failed program was:" >&5
12162 cat conftest.$ac_ext >&5
12163 ac_cv_lib_Xt_XtAppInitialize=no
12164 fi
12165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12166 LIBS=$ac_check_lib_save_LIBS
12167 fi
12168 echo "$as_me:12168: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12169 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12170 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12171
12172 cat >>confdefs.h <<\EOF
12173 #define HAVE_LIBXT 1
12174 EOF
12175
12176                  cf_have_X_LIBS=Xt
12177                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12178 fi
12179
12180 fi
12181
12182 fi
12183
12184 if test $cf_have_X_LIBS = no ; then
12185         { echo "$as_me:12185: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12186 test program.  You will have to check and add the proper libraries by hand
12187 to makefile." >&5
12188 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12189 test program.  You will have to check and add the proper libraries by hand
12190 to makefile." >&2;}
12191 fi
12192
12193 cf_x_athena_root=$cf_x_athena
12194 cf_x_athena_inc=""
12195
12196 for cf_path in default \
12197         /usr/contrib/X11R6 \
12198         /usr/contrib/X11R5 \
12199         /usr/lib/X11R5 \
12200         /usr/local
12201 do
12202         if test -z "$cf_x_athena_inc" ; then
12203                 cf_save="$CPPFLAGS"
12204                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12205                 if test $cf_path != default ; then
12206                         CPPFLAGS="$cf_save -I$cf_path/include"
12207                         echo "$as_me:12207: checking for $cf_test in $cf_path" >&5
12208 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12209                 else
12210                         echo "$as_me:12210: checking for $cf_test" >&5
12211 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12212                 fi
12213                 cat >conftest.$ac_ext <<_ACEOF
12214 #line 12214 "configure"
12215 #include "confdefs.h"
12216
12217 #include <X11/Intrinsic.h>
12218 #include <$cf_test>
12219 int
12220 main ()
12221 {
12222
12223   ;
12224   return 0;
12225 }
12226 _ACEOF
12227 rm -f conftest.$ac_objext
12228 if { (eval echo "$as_me:12228: \"$ac_compile\"") >&5
12229   (eval $ac_compile) 2>&5
12230   ac_status=$?
12231   echo "$as_me:12231: \$? = $ac_status" >&5
12232   (exit $ac_status); } &&
12233          { ac_try='test -s conftest.$ac_objext'
12234   { (eval echo "$as_me:12234: \"$ac_try\"") >&5
12235   (eval $ac_try) 2>&5
12236   ac_status=$?
12237   echo "$as_me:12237: \$? = $ac_status" >&5
12238   (exit $ac_status); }; }; then
12239   cf_result=yes
12240 else
12241   echo "$as_me: failed program was:" >&5
12242 cat conftest.$ac_ext >&5
12243 cf_result=no
12244 fi
12245 rm -f conftest.$ac_objext conftest.$ac_ext
12246                 echo "$as_me:12246: result: $cf_result" >&5
12247 echo "${ECHO_T}$cf_result" >&6
12248                 if test "$cf_result" = yes ; then
12249                         cf_x_athena_inc=$cf_path
12250                         break
12251                 else
12252                         CPPFLAGS="$cf_save"
12253                 fi
12254         fi
12255 done
12256
12257 if test -z "$cf_x_athena_inc" ; then
12258         { echo "$as_me:12258: WARNING: Unable to successfully find Athena header files with test program" >&5
12259 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12260 elif test "$cf_x_athena_inc" != default ; then
12261         CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12262 fi
12263
12264 cf_x_athena_root=$cf_x_athena
12265 cf_x_athena_lib=""
12266
12267 for cf_path in default \
12268         /usr/contrib/X11R6 \
12269         /usr/contrib/X11R5 \
12270         /usr/lib/X11R5 \
12271         /usr/local
12272 do
12273         for cf_lib in \
12274                 ${cf_x_athena_root} \
12275                 ${cf_x_athena_root}7 \
12276                 ${cf_x_athena_root}6
12277         do
12278         for cf_libs in \
12279                 "-l$cf_lib -lXmu" \
12280                 "-l$cf_lib -lXpm -lXmu" \
12281                 "-l${cf_lib}_s -lXmu_s"
12282         do
12283                 if test -z "$cf_x_athena_lib" ; then
12284                         cf_save="$LIBS"
12285                         cf_test=XawSimpleMenuAddGlobalActions
12286                         if test $cf_path != default ; then
12287
12288 cf_add_libs="-L$cf_path/lib $cf_libs"
12289 # Filter out duplicates - this happens with badly-designed ".pc" files...
12290 for cf_add_1lib in $LIBS
12291 do
12292         for cf_add_2lib in $cf_add_libs
12293         do
12294                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12295                 then
12296                         cf_add_1lib=
12297                         break
12298                 fi
12299         done
12300         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12301 done
12302 LIBS="$cf_add_libs"
12303
12304                                 echo "$as_me:12304: checking for $cf_libs in $cf_path" >&5
12305 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12306                         else
12307
12308 cf_add_libs="$cf_libs"
12309 # Filter out duplicates - this happens with badly-designed ".pc" files...
12310 for cf_add_1lib in $LIBS
12311 do
12312         for cf_add_2lib in $cf_add_libs
12313         do
12314                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12315                 then
12316                         cf_add_1lib=
12317                         break
12318                 fi
12319         done
12320         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12321 done
12322 LIBS="$cf_add_libs"
12323
12324                                 echo "$as_me:12324: checking for $cf_test in $cf_libs" >&5
12325 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12326                         fi
12327                         cat >conftest.$ac_ext <<_ACEOF
12328 #line 12328 "configure"
12329 #include "confdefs.h"
12330
12331 #include <X11/Intrinsic.h>
12332 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12333
12334 int
12335 main ()
12336 {
12337
12338 $cf_test((XtAppContext) 0)
12339   ;
12340   return 0;
12341 }
12342 _ACEOF
12343 rm -f conftest.$ac_objext conftest$ac_exeext
12344 if { (eval echo "$as_me:12344: \"$ac_link\"") >&5
12345   (eval $ac_link) 2>&5
12346   ac_status=$?
12347   echo "$as_me:12347: \$? = $ac_status" >&5
12348   (exit $ac_status); } &&
12349          { ac_try='test -s conftest$ac_exeext'
12350   { (eval echo "$as_me:12350: \"$ac_try\"") >&5
12351   (eval $ac_try) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); }; }; then
12355   cf_result=yes
12356 else
12357   echo "$as_me: failed program was:" >&5
12358 cat conftest.$ac_ext >&5
12359 cf_result=no
12360 fi
12361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12362                         echo "$as_me:12362: result: $cf_result" >&5
12363 echo "${ECHO_T}$cf_result" >&6
12364                         if test "$cf_result" = yes ; then
12365                                 cf_x_athena_lib="$cf_libs"
12366                                 break
12367                         fi
12368                         LIBS="$cf_save"
12369                 fi
12370         done # cf_libs
12371                 test -n "$cf_x_athena_lib" && break
12372         done # cf_lib
12373 done
12374
12375 if test -z "$cf_x_athena_lib" ; then
12376         { { echo "$as_me:12376: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12377 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12378    { (exit 1); exit 1; }; }
12379 fi
12380
12381 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12382
12383 cat >>confdefs.h <<EOF
12384 #define $cf_x_athena_LIBS 1
12385 EOF
12386
12387 fi
12388
12389 if test -n "$ac_tool_prefix"; then
12390   for ac_prog in xcurses-config
12391   do
12392     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12393 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12394 echo "$as_me:12394: checking for $ac_word" >&5
12395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12396 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12397   echo $ECHO_N "(cached) $ECHO_C" >&6
12398 else
12399   if test -n "$XCURSES_CONFIG"; then
12400   ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12401 else
12402   ac_save_IFS=$IFS; IFS=$ac_path_separator
12403 ac_dummy="$PATH"
12404 for ac_dir in $ac_dummy; do
12405   IFS=$ac_save_IFS
12406   test -z "$ac_dir" && ac_dir=.
12407   $as_executable_p "$ac_dir/$ac_word" || continue
12408 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12409 echo "$as_me:12409: found $ac_dir/$ac_word" >&5
12410 break
12411 done
12412
12413 fi
12414 fi
12415 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12416 if test -n "$XCURSES_CONFIG"; then
12417   echo "$as_me:12417: result: $XCURSES_CONFIG" >&5
12418 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12419 else
12420   echo "$as_me:12420: result: no" >&5
12421 echo "${ECHO_T}no" >&6
12422 fi
12423
12424     test -n "$XCURSES_CONFIG" && break
12425   done
12426 fi
12427 if test -z "$XCURSES_CONFIG"; then
12428   ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12429   for ac_prog in xcurses-config
12430 do
12431   # Extract the first word of "$ac_prog", so it can be a program name with args.
12432 set dummy $ac_prog; ac_word=$2
12433 echo "$as_me:12433: checking for $ac_word" >&5
12434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12435 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438   if test -n "$ac_ct_XCURSES_CONFIG"; then
12439   ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12440 else
12441   ac_save_IFS=$IFS; IFS=$ac_path_separator
12442 ac_dummy="$PATH"
12443 for ac_dir in $ac_dummy; do
12444   IFS=$ac_save_IFS
12445   test -z "$ac_dir" && ac_dir=.
12446   $as_executable_p "$ac_dir/$ac_word" || continue
12447 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12448 echo "$as_me:12448: found $ac_dir/$ac_word" >&5
12449 break
12450 done
12451
12452 fi
12453 fi
12454 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12455 if test -n "$ac_ct_XCURSES_CONFIG"; then
12456   echo "$as_me:12456: result: $ac_ct_XCURSES_CONFIG" >&5
12457 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12458 else
12459   echo "$as_me:12459: result: no" >&5
12460 echo "${ECHO_T}no" >&6
12461 fi
12462
12463   test -n "$ac_ct_XCURSES_CONFIG" && break
12464 done
12465 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12466
12467   XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12468 fi
12469
12470 if test "$XCURSES_CONFIG" != none ; then
12471
12472 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12473
12474 cf_add_libs="`$XCURSES_CONFIG --libs`"
12475 # Filter out duplicates - this happens with badly-designed ".pc" files...
12476 for cf_add_1lib in $LIBS
12477 do
12478         for cf_add_2lib in $cf_add_libs
12479         do
12480                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12481                 then
12482                         cf_add_1lib=
12483                         break
12484                 fi
12485         done
12486         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12487 done
12488 LIBS="$cf_add_libs"
12489
12490 cf_cv_lib_XCurses=yes
12491
12492 else
12493
12494 LDFLAGS="$LDFLAGS $X_LIBS"
12495
12496 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
12497
12498 echo "${as_me:-configure}:12498: testing checking additions to CFLAGS ..." 1>&5
12499
12500 cf_check_cflags="$CFLAGS"
12501 cf_check_cppflags="$CPPFLAGS"
12502
12503 cf_fix_cppflags=no
12504 cf_new_cflags=
12505 cf_new_cppflags=
12506 cf_new_extra_cppflags=
12507
12508 for cf_add_cflags in $X_CFLAGS
12509 do
12510 case $cf_fix_cppflags in
12511 no)
12512         case $cf_add_cflags in #(vi
12513         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12514                 case $cf_add_cflags in
12515                 -D*)
12516                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12517
12518                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12519                                 && test -z "${cf_tst_cflags}" \
12520                                 && cf_fix_cppflags=yes
12521
12522                         if test $cf_fix_cppflags = yes ; then
12523                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12524                                 continue
12525                         elif test "${cf_tst_cflags}" = "\"'" ; then
12526                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12527                                 continue
12528                         fi
12529                         ;;
12530                 esac
12531                 case "$CPPFLAGS" in
12532                 *$cf_add_cflags) #(vi
12533                         ;;
12534                 *) #(vi
12535                         case $cf_add_cflags in #(vi
12536                         -D*)
12537                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12538
12539 CPPFLAGS=`echo "$CPPFLAGS" | \
12540         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12541                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12542
12543                                 ;;
12544                         esac
12545                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12546                         ;;
12547                 esac
12548                 ;;
12549         *)
12550                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12551                 ;;
12552         esac
12553         ;;
12554 yes)
12555         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12556
12557         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12558
12559         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12560                 && test -z "${cf_tst_cflags}" \
12561                 && cf_fix_cppflags=no
12562         ;;
12563 esac
12564 done
12565
12566 if test -n "$cf_new_cflags" ; then
12567         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12568
12569 echo "${as_me:-configure}:12569: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12570
12571         CFLAGS="$CFLAGS $cf_new_cflags"
12572 fi
12573
12574 if test -n "$cf_new_cppflags" ; then
12575         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12576
12577 echo "${as_me:-configure}:12577: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12578
12579         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12580 fi
12581
12582 if test -n "$cf_new_extra_cppflags" ; then
12583         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12584
12585 echo "${as_me:-configure}:12585: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12586
12587         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12588 fi
12589
12590 if test "$cf_check_cflags" != "$CFLAGS" ; then
12591 cat >conftest.$ac_ext <<_ACEOF
12592 #line 12592 "configure"
12593 #include "confdefs.h"
12594 #include <stdio.h>
12595 int
12596 main ()
12597 {
12598 printf("Hello world");
12599   ;
12600   return 0;
12601 }
12602 _ACEOF
12603 rm -f conftest.$ac_objext conftest$ac_exeext
12604 if { (eval echo "$as_me:12604: \"$ac_link\"") >&5
12605   (eval $ac_link) 2>&5
12606   ac_status=$?
12607   echo "$as_me:12607: \$? = $ac_status" >&5
12608   (exit $ac_status); } &&
12609          { ac_try='test -s conftest$ac_exeext'
12610   { (eval echo "$as_me:12610: \"$ac_try\"") >&5
12611   (eval $ac_try) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit $ac_status); }; }; then
12615   :
12616 else
12617   echo "$as_me: failed program was:" >&5
12618 cat conftest.$ac_ext >&5
12619 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12620
12621 echo "${as_me:-configure}:12621: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12622
12623          if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12624                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
12625
12626 echo "${as_me:-configure}:12626: testing but keeping change to \$CPPFLAGS ..." 1>&5
12627
12628          fi
12629          CFLAGS="$cf_check_flags"
12630 fi
12631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12632 fi
12633
12634 echo "$as_me:12634: checking for XOpenDisplay in -lX11" >&5
12635 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12636 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12637   echo $ECHO_N "(cached) $ECHO_C" >&6
12638 else
12639   ac_check_lib_save_LIBS=$LIBS
12640 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12641 cat >conftest.$ac_ext <<_ACEOF
12642 #line 12642 "configure"
12643 #include "confdefs.h"
12644
12645 /* Override any gcc2 internal prototype to avoid an error.  */
12646 #ifdef __cplusplus
12647 extern "C"
12648 #endif
12649 /* We use char because int might match the return type of a gcc2
12650    builtin and then its argument prototype would still apply.  */
12651 char XOpenDisplay ();
12652 int
12653 main ()
12654 {
12655 XOpenDisplay ();
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f conftest.$ac_objext conftest$ac_exeext
12661 if { (eval echo "$as_me:12661: \"$ac_link\"") >&5
12662   (eval $ac_link) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit $ac_status); } &&
12666          { ac_try='test -s conftest$ac_exeext'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); }; }; then
12672   ac_cv_lib_X11_XOpenDisplay=yes
12673 else
12674   echo "$as_me: failed program was:" >&5
12675 cat conftest.$ac_ext >&5
12676 ac_cv_lib_X11_XOpenDisplay=no
12677 fi
12678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12679 LIBS=$ac_check_lib_save_LIBS
12680 fi
12681 echo "$as_me:12681: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12682 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12683 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12684
12685 cf_add_libs="-lX11"
12686 # Filter out duplicates - this happens with badly-designed ".pc" files...
12687 for cf_add_1lib in $LIBS
12688 do
12689         for cf_add_2lib in $cf_add_libs
12690         do
12691                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12692                 then
12693                         cf_add_1lib=
12694                         break
12695                 fi
12696         done
12697         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12698 done
12699 LIBS="$cf_add_libs"
12700
12701 fi
12702
12703 echo "$as_me:12703: checking for XCurses library" >&5
12704 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12705 if test "${cf_cv_lib_XCurses+set}" = set; then
12706   echo $ECHO_N "(cached) $ECHO_C" >&6
12707 else
12708
12709 cf_add_libs="-lXCurses"
12710 # Filter out duplicates - this happens with badly-designed ".pc" files...
12711 for cf_add_1lib in $LIBS
12712 do
12713         for cf_add_2lib in $cf_add_libs
12714         do
12715                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12716                 then
12717                         cf_add_1lib=
12718                         break
12719                 fi
12720         done
12721         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12722 done
12723 LIBS="$cf_add_libs"
12724
12725 cat >conftest.$ac_ext <<_ACEOF
12726 #line 12726 "configure"
12727 #include "confdefs.h"
12728
12729 #include <xcurses.h>
12730 char *XCursesProgramName = "test";
12731
12732 int
12733 main ()
12734 {
12735 XCursesExit();
12736   ;
12737   return 0;
12738 }
12739 _ACEOF
12740 rm -f conftest.$ac_objext conftest$ac_exeext
12741 if { (eval echo "$as_me:12741: \"$ac_link\"") >&5
12742   (eval $ac_link) 2>&5
12743   ac_status=$?
12744   echo "$as_me:12744: \$? = $ac_status" >&5
12745   (exit $ac_status); } &&
12746          { ac_try='test -s conftest$ac_exeext'
12747   { (eval echo "$as_me:12747: \"$ac_try\"") >&5
12748   (eval $ac_try) 2>&5
12749   ac_status=$?
12750   echo "$as_me:12750: \$? = $ac_status" >&5
12751   (exit $ac_status); }; }; then
12752   cf_cv_lib_XCurses=yes
12753 else
12754   echo "$as_me: failed program was:" >&5
12755 cat conftest.$ac_ext >&5
12756 cf_cv_lib_XCurses=no
12757 fi
12758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12759
12760 fi
12761 echo "$as_me:12761: result: $cf_cv_lib_XCurses" >&5
12762 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12763
12764 fi
12765
12766 if test $cf_cv_lib_XCurses = yes ; then
12767
12768 cat >>confdefs.h <<\EOF
12769 #define UNIX 1
12770 EOF
12771
12772 cat >>confdefs.h <<\EOF
12773 #define XCURSES 1
12774 EOF
12775
12776         echo "$as_me:12776: checking for xcurses.h" >&5
12777 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12778 if test "${ac_cv_header_xcurses_h+set}" = set; then
12779   echo $ECHO_N "(cached) $ECHO_C" >&6
12780 else
12781   cat >conftest.$ac_ext <<_ACEOF
12782 #line 12782 "configure"
12783 #include "confdefs.h"
12784 #include <xcurses.h>
12785 _ACEOF
12786 if { (eval echo "$as_me:12786: \"$ac_cpp conftest.$ac_ext\"") >&5
12787   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12788   ac_status=$?
12789   egrep -v '^ *\+' conftest.er1 >conftest.err
12790   rm -f conftest.er1
12791   cat conftest.err >&5
12792   echo "$as_me:12792: \$? = $ac_status" >&5
12793   (exit $ac_status); } >/dev/null; then
12794   if test -s conftest.err; then
12795     ac_cpp_err=$ac_c_preproc_warn_flag
12796   else
12797     ac_cpp_err=
12798   fi
12799 else
12800   ac_cpp_err=yes
12801 fi
12802 if test -z "$ac_cpp_err"; then
12803   ac_cv_header_xcurses_h=yes
12804 else
12805   echo "$as_me: failed program was:" >&5
12806   cat conftest.$ac_ext >&5
12807   ac_cv_header_xcurses_h=no
12808 fi
12809 rm -f conftest.err conftest.$ac_ext
12810 fi
12811 echo "$as_me:12811: result: $ac_cv_header_xcurses_h" >&5
12812 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12813 if test $ac_cv_header_xcurses_h = yes; then
12814
12815 cat >>confdefs.h <<\EOF
12816 #define HAVE_XCURSES 1
12817 EOF
12818
12819 fi
12820
12821 else
12822         { { echo "$as_me:12822: error: Cannot link with XCurses" >&5
12823 echo "$as_me: error: Cannot link with XCurses" >&2;}
12824    { (exit 1); exit 1; }; }
12825 fi
12826
12827         ;;
12828 esac
12829
12830 case $cf_cv_screen in
12831 curses|curses_*)
12832
12833 echo "$as_me:12833: checking for NetBSD form.h" >&5
12834 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
12835 if test "${cf_cv_netbsd_form_h+set}" = set; then
12836   echo $ECHO_N "(cached) $ECHO_C" >&6
12837 else
12838
12839 cat >conftest.$ac_ext <<_ACEOF
12840 #line 12840 "configure"
12841 #include "confdefs.h"
12842
12843 #include <${cf_cv_ncurses_header:-curses.h}>
12844 #include <form.h>
12845
12846 int
12847 main ()
12848 {
12849
12850         FORM *form;
12851         int y = current_field(form)->cursor_ypos;
12852         int x = current_field(form)->cursor_xpos;
12853
12854   ;
12855   return 0;
12856 }
12857 _ACEOF
12858 rm -f conftest.$ac_objext
12859 if { (eval echo "$as_me:12859: \"$ac_compile\"") >&5
12860   (eval $ac_compile) 2>&5
12861   ac_status=$?
12862   echo "$as_me:12862: \$? = $ac_status" >&5
12863   (exit $ac_status); } &&
12864          { ac_try='test -s conftest.$ac_objext'
12865   { (eval echo "$as_me:12865: \"$ac_try\"") >&5
12866   (eval $ac_try) 2>&5
12867   ac_status=$?
12868   echo "$as_me:12868: \$? = $ac_status" >&5
12869   (exit $ac_status); }; }; then
12870   cf_cv_netbsd_form_h=yes
12871
12872 else
12873   echo "$as_me: failed program was:" >&5
12874 cat conftest.$ac_ext >&5
12875 cf_cv_netbsd_form_h=no
12876 fi
12877 rm -f conftest.$ac_objext conftest.$ac_ext
12878
12879 fi
12880 echo "$as_me:12880: result: $cf_cv_netbsd_form_h" >&5
12881 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
12882
12883 test "$cf_cv_netbsd_form_h" = yes &&
12884 cat >>confdefs.h <<\EOF
12885 #define HAVE_NETBSD_FORM_H 1
12886 EOF
12887
12888 echo "$as_me:12888: checking for NetBSD menu.h" >&5
12889 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
12890 if test "${cf_cv_netbsd_menu_h+set}" = set; then
12891   echo $ECHO_N "(cached) $ECHO_C" >&6
12892 else
12893
12894 cat >conftest.$ac_ext <<_ACEOF
12895 #line 12895 "configure"
12896 #include "confdefs.h"
12897
12898 #include <${cf_cv_ncurses_header:-curses.h}>
12899 #include <menu.h>
12900
12901 int
12902 main ()
12903 {
12904
12905         MENU *menu;
12906         int y = menu->max_item_width;
12907
12908   ;
12909   return 0;
12910 }
12911 _ACEOF
12912 rm -f conftest.$ac_objext
12913 if { (eval echo "$as_me:12913: \"$ac_compile\"") >&5
12914   (eval $ac_compile) 2>&5
12915   ac_status=$?
12916   echo "$as_me:12916: \$? = $ac_status" >&5
12917   (exit $ac_status); } &&
12918          { ac_try='test -s conftest.$ac_objext'
12919   { (eval echo "$as_me:12919: \"$ac_try\"") >&5
12920   (eval $ac_try) 2>&5
12921   ac_status=$?
12922   echo "$as_me:12922: \$? = $ac_status" >&5
12923   (exit $ac_status); }; }; then
12924   cf_cv_netbsd_menu_h=yes
12925
12926 else
12927   echo "$as_me: failed program was:" >&5
12928 cat conftest.$ac_ext >&5
12929 cf_cv_netbsd_menu_h=no
12930 fi
12931 rm -f conftest.$ac_objext conftest.$ac_ext
12932
12933 fi
12934 echo "$as_me:12934: result: $cf_cv_netbsd_menu_h" >&5
12935 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
12936
12937 test "$cf_cv_netbsd_menu_h" = yes &&
12938 cat >>confdefs.h <<\EOF
12939 #define HAVE_NETBSD_MENU_H 1
12940 EOF
12941
12942         ;;
12943 ncursesw)
12944         cf_cv_libtype=w
12945         ;;
12946 esac
12947
12948 case $cf_cv_screen in #(vi
12949 pdcurses) #(vi
12950         ;;
12951 *)
12952         # look for curses-related libraries
12953         : ${cf_panel_lib:=panel}
12954         : ${cf_menu_lib:=menu}
12955         : ${cf_form_lib:=form}
12956
12957 as_ac_Lib=`echo "ac_cv_lib_$cf_panel_lib$cf_cv_libtype''_new_panel" | $as_tr_sh`
12958 echo "$as_me:12958: checking for new_panel in -l$cf_panel_lib$cf_cv_libtype" >&5
12959 echo $ECHO_N "checking for new_panel in -l$cf_panel_lib$cf_cv_libtype... $ECHO_C" >&6
12960 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12961   echo $ECHO_N "(cached) $ECHO_C" >&6
12962 else
12963   ac_check_lib_save_LIBS=$LIBS
12964 LIBS="-l$cf_panel_lib$cf_cv_libtype  $LIBS"
12965 cat >conftest.$ac_ext <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12968
12969 /* Override any gcc2 internal prototype to avoid an error.  */
12970 #ifdef __cplusplus
12971 extern "C"
12972 #endif
12973 /* We use char because int might match the return type of a gcc2
12974    builtin and then its argument prototype would still apply.  */
12975 char new_panel ();
12976 int
12977 main ()
12978 {
12979 new_panel ();
12980   ;
12981   return 0;
12982 }
12983 _ACEOF
12984 rm -f conftest.$ac_objext conftest$ac_exeext
12985 if { (eval echo "$as_me:12985: \"$ac_link\"") >&5
12986   (eval $ac_link) 2>&5
12987   ac_status=$?
12988   echo "$as_me:12988: \$? = $ac_status" >&5
12989   (exit $ac_status); } &&
12990          { ac_try='test -s conftest$ac_exeext'
12991   { (eval echo "$as_me:12991: \"$ac_try\"") >&5
12992   (eval $ac_try) 2>&5
12993   ac_status=$?
12994   echo "$as_me:12994: \$? = $ac_status" >&5
12995   (exit $ac_status); }; }; then
12996   eval "$as_ac_Lib=yes"
12997 else
12998   echo "$as_me: failed program was:" >&5
12999 cat conftest.$ac_ext >&5
13000 eval "$as_ac_Lib=no"
13001 fi
13002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13003 LIBS=$ac_check_lib_save_LIBS
13004 fi
13005 echo "$as_me:13005: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13006 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13007 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13008   cat >>confdefs.h <<EOF
13009 #define `echo "HAVE_LIB$cf_panel_lib$cf_cv_libtype" | $as_tr_cpp` 1
13010 EOF
13011
13012   LIBS="-l$cf_panel_lib$cf_cv_libtype $LIBS"
13013
13014 fi
13015
13016 as_ac_Lib=`echo "ac_cv_lib_$cf_menu_lib$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13017 echo "$as_me:13017: checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype" >&5
13018 echo $ECHO_N "checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype... $ECHO_C" >&6
13019 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13020   echo $ECHO_N "(cached) $ECHO_C" >&6
13021 else
13022   ac_check_lib_save_LIBS=$LIBS
13023 LIBS="-l$cf_menu_lib$cf_cv_libtype  $LIBS"
13024 cat >conftest.$ac_ext <<_ACEOF
13025 #line 13025 "configure"
13026 #include "confdefs.h"
13027
13028 /* Override any gcc2 internal prototype to avoid an error.  */
13029 #ifdef __cplusplus
13030 extern "C"
13031 #endif
13032 /* We use char because int might match the return type of a gcc2
13033    builtin and then its argument prototype would still apply.  */
13034 char menu_driver ();
13035 int
13036 main ()
13037 {
13038 menu_driver ();
13039   ;
13040   return 0;
13041 }
13042 _ACEOF
13043 rm -f conftest.$ac_objext conftest$ac_exeext
13044 if { (eval echo "$as_me:13044: \"$ac_link\"") >&5
13045   (eval $ac_link) 2>&5
13046   ac_status=$?
13047   echo "$as_me:13047: \$? = $ac_status" >&5
13048   (exit $ac_status); } &&
13049          { ac_try='test -s conftest$ac_exeext'
13050   { (eval echo "$as_me:13050: \"$ac_try\"") >&5
13051   (eval $ac_try) 2>&5
13052   ac_status=$?
13053   echo "$as_me:13053: \$? = $ac_status" >&5
13054   (exit $ac_status); }; }; then
13055   eval "$as_ac_Lib=yes"
13056 else
13057   echo "$as_me: failed program was:" >&5
13058 cat conftest.$ac_ext >&5
13059 eval "$as_ac_Lib=no"
13060 fi
13061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13062 LIBS=$ac_check_lib_save_LIBS
13063 fi
13064 echo "$as_me:13064: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13065 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13066 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13067   cat >>confdefs.h <<EOF
13068 #define `echo "HAVE_LIB$cf_menu_lib$cf_cv_libtype" | $as_tr_cpp` 1
13069 EOF
13070
13071   LIBS="-l$cf_menu_lib$cf_cv_libtype $LIBS"
13072
13073 fi
13074
13075 as_ac_Lib=`echo "ac_cv_lib_$cf_form_lib$cf_cv_libtype''_form_driver" | $as_tr_sh`
13076 echo "$as_me:13076: checking for form_driver in -l$cf_form_lib$cf_cv_libtype" >&5
13077 echo $ECHO_N "checking for form_driver in -l$cf_form_lib$cf_cv_libtype... $ECHO_C" >&6
13078 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13079   echo $ECHO_N "(cached) $ECHO_C" >&6
13080 else
13081   ac_check_lib_save_LIBS=$LIBS
13082 LIBS="-l$cf_form_lib$cf_cv_libtype  $LIBS"
13083 cat >conftest.$ac_ext <<_ACEOF
13084 #line 13084 "configure"
13085 #include "confdefs.h"
13086
13087 /* Override any gcc2 internal prototype to avoid an error.  */
13088 #ifdef __cplusplus
13089 extern "C"
13090 #endif
13091 /* We use char because int might match the return type of a gcc2
13092    builtin and then its argument prototype would still apply.  */
13093 char form_driver ();
13094 int
13095 main ()
13096 {
13097 form_driver ();
13098   ;
13099   return 0;
13100 }
13101 _ACEOF
13102 rm -f conftest.$ac_objext conftest$ac_exeext
13103 if { (eval echo "$as_me:13103: \"$ac_link\"") >&5
13104   (eval $ac_link) 2>&5
13105   ac_status=$?
13106   echo "$as_me:13106: \$? = $ac_status" >&5
13107   (exit $ac_status); } &&
13108          { ac_try='test -s conftest$ac_exeext'
13109   { (eval echo "$as_me:13109: \"$ac_try\"") >&5
13110   (eval $ac_try) 2>&5
13111   ac_status=$?
13112   echo "$as_me:13112: \$? = $ac_status" >&5
13113   (exit $ac_status); }; }; then
13114   eval "$as_ac_Lib=yes"
13115 else
13116   echo "$as_me: failed program was:" >&5
13117 cat conftest.$ac_ext >&5
13118 eval "$as_ac_Lib=no"
13119 fi
13120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13121 LIBS=$ac_check_lib_save_LIBS
13122 fi
13123 echo "$as_me:13123: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13124 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13125 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13126   cat >>confdefs.h <<EOF
13127 #define `echo "HAVE_LIB$cf_form_lib$cf_cv_libtype" | $as_tr_cpp` 1
13128 EOF
13129
13130   LIBS="-l$cf_form_lib$cf_cv_libtype $LIBS"
13131
13132 fi
13133
13134         # look for curses-related headers
13135
13136 for ac_header in \
13137                 nc_alloc.h \
13138                 nomacros.h \
13139                 form.h \
13140                 menu.h \
13141                 panel.h \
13142                 term_entry.h \
13143
13144 do
13145 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13146 echo "$as_me:13146: checking for $ac_header" >&5
13147 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13149   echo $ECHO_N "(cached) $ECHO_C" >&6
13150 else
13151   cat >conftest.$ac_ext <<_ACEOF
13152 #line 13152 "configure"
13153 #include "confdefs.h"
13154 #include <$ac_header>
13155 _ACEOF
13156 if { (eval echo "$as_me:13156: \"$ac_cpp conftest.$ac_ext\"") >&5
13157   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13158   ac_status=$?
13159   egrep -v '^ *\+' conftest.er1 >conftest.err
13160   rm -f conftest.er1
13161   cat conftest.err >&5
13162   echo "$as_me:13162: \$? = $ac_status" >&5
13163   (exit $ac_status); } >/dev/null; then
13164   if test -s conftest.err; then
13165     ac_cpp_err=$ac_c_preproc_warn_flag
13166   else
13167     ac_cpp_err=
13168   fi
13169 else
13170   ac_cpp_err=yes
13171 fi
13172 if test -z "$ac_cpp_err"; then
13173   eval "$as_ac_Header=yes"
13174 else
13175   echo "$as_me: failed program was:" >&5
13176   cat conftest.$ac_ext >&5
13177   eval "$as_ac_Header=no"
13178 fi
13179 rm -f conftest.err conftest.$ac_ext
13180 fi
13181 echo "$as_me:13181: result: `eval echo '${'$as_ac_Header'}'`" >&5
13182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13183 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13184   cat >>confdefs.h <<EOF
13185 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13186 EOF
13187
13188 fi
13189 done
13190
13191         ;;
13192 esac
13193
13194 echo "$as_me:13194: checking for ANSI C header files" >&5
13195 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13196 if test "${ac_cv_header_stdc+set}" = set; then
13197   echo $ECHO_N "(cached) $ECHO_C" >&6
13198 else
13199   cat >conftest.$ac_ext <<_ACEOF
13200 #line 13200 "configure"
13201 #include "confdefs.h"
13202 #include <stdlib.h>
13203 #include <stdarg.h>
13204 #include <string.h>
13205 #include <float.h>
13206
13207 _ACEOF
13208 if { (eval echo "$as_me:13208: \"$ac_cpp conftest.$ac_ext\"") >&5
13209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13210   ac_status=$?
13211   egrep -v '^ *\+' conftest.er1 >conftest.err
13212   rm -f conftest.er1
13213   cat conftest.err >&5
13214   echo "$as_me:13214: \$? = $ac_status" >&5
13215   (exit $ac_status); } >/dev/null; then
13216   if test -s conftest.err; then
13217     ac_cpp_err=$ac_c_preproc_warn_flag
13218   else
13219     ac_cpp_err=
13220   fi
13221 else
13222   ac_cpp_err=yes
13223 fi
13224 if test -z "$ac_cpp_err"; then
13225   ac_cv_header_stdc=yes
13226 else
13227   echo "$as_me: failed program was:" >&5
13228   cat conftest.$ac_ext >&5
13229   ac_cv_header_stdc=no
13230 fi
13231 rm -f conftest.err conftest.$ac_ext
13232
13233 if test $ac_cv_header_stdc = yes; then
13234   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13235   cat >conftest.$ac_ext <<_ACEOF
13236 #line 13236 "configure"
13237 #include "confdefs.h"
13238 #include <string.h>
13239
13240 _ACEOF
13241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13242   egrep "memchr" >/dev/null 2>&1; then
13243   :
13244 else
13245   ac_cv_header_stdc=no
13246 fi
13247 rm -rf conftest*
13248
13249 fi
13250
13251 if test $ac_cv_header_stdc = yes; then
13252   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13253   cat >conftest.$ac_ext <<_ACEOF
13254 #line 13254 "configure"
13255 #include "confdefs.h"
13256 #include <stdlib.h>
13257
13258 _ACEOF
13259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13260   egrep "free" >/dev/null 2>&1; then
13261   :
13262 else
13263   ac_cv_header_stdc=no
13264 fi
13265 rm -rf conftest*
13266
13267 fi
13268
13269 if test $ac_cv_header_stdc = yes; then
13270   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13271   if test "$cross_compiling" = yes; then
13272   :
13273 else
13274   cat >conftest.$ac_ext <<_ACEOF
13275 #line 13275 "configure"
13276 #include "confdefs.h"
13277 #include <ctype.h>
13278 #if ((' ' & 0x0FF) == 0x020)
13279 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13280 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13281 #else
13282 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13283                      || ('j' <= (c) && (c) <= 'r') \
13284                      || ('s' <= (c) && (c) <= 'z'))
13285 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13286 #endif
13287
13288 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13289 int
13290 main ()
13291 {
13292   int i;
13293   for (i = 0; i < 256; i++)
13294     if (XOR (islower (i), ISLOWER (i))
13295         || toupper (i) != TOUPPER (i))
13296       $ac_main_return(2);
13297   $ac_main_return (0);
13298 }
13299 _ACEOF
13300 rm -f conftest$ac_exeext
13301 if { (eval echo "$as_me:13301: \"$ac_link\"") >&5
13302   (eval $ac_link) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13306   { (eval echo "$as_me:13306: \"$ac_try\"") >&5
13307   (eval $ac_try) 2>&5
13308   ac_status=$?
13309   echo "$as_me:13309: \$? = $ac_status" >&5
13310   (exit $ac_status); }; }; then
13311   :
13312 else
13313   echo "$as_me: program exited with status $ac_status" >&5
13314 echo "$as_me: failed program was:" >&5
13315 cat conftest.$ac_ext >&5
13316 ac_cv_header_stdc=no
13317 fi
13318 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13319 fi
13320 fi
13321 fi
13322 echo "$as_me:13322: result: $ac_cv_header_stdc" >&5
13323 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13324 if test $ac_cv_header_stdc = yes; then
13325
13326 cat >>confdefs.h <<\EOF
13327 #define STDC_HEADERS 1
13328 EOF
13329
13330 fi
13331
13332 echo "$as_me:13332: checking whether time.h and sys/time.h may both be included" >&5
13333 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13334 if test "${ac_cv_header_time+set}" = set; then
13335   echo $ECHO_N "(cached) $ECHO_C" >&6
13336 else
13337   cat >conftest.$ac_ext <<_ACEOF
13338 #line 13338 "configure"
13339 #include "confdefs.h"
13340 #include <sys/types.h>
13341 #include <sys/time.h>
13342 #include <time.h>
13343
13344 int
13345 main ()
13346 {
13347 if ((struct tm *) 0)
13348 return 0;
13349   ;
13350   return 0;
13351 }
13352 _ACEOF
13353 rm -f conftest.$ac_objext
13354 if { (eval echo "$as_me:13354: \"$ac_compile\"") >&5
13355   (eval $ac_compile) 2>&5
13356   ac_status=$?
13357   echo "$as_me:13357: \$? = $ac_status" >&5
13358   (exit $ac_status); } &&
13359          { ac_try='test -s conftest.$ac_objext'
13360   { (eval echo "$as_me:13360: \"$ac_try\"") >&5
13361   (eval $ac_try) 2>&5
13362   ac_status=$?
13363   echo "$as_me:13363: \$? = $ac_status" >&5
13364   (exit $ac_status); }; }; then
13365   ac_cv_header_time=yes
13366 else
13367   echo "$as_me: failed program was:" >&5
13368 cat conftest.$ac_ext >&5
13369 ac_cv_header_time=no
13370 fi
13371 rm -f conftest.$ac_objext conftest.$ac_ext
13372 fi
13373 echo "$as_me:13373: result: $ac_cv_header_time" >&5
13374 echo "${ECHO_T}$ac_cv_header_time" >&6
13375 if test $ac_cv_header_time = yes; then
13376
13377 cat >>confdefs.h <<\EOF
13378 #define TIME_WITH_SYS_TIME 1
13379 EOF
13380
13381 fi
13382
13383 for ac_header in \
13384 getopt.h \
13385 locale.h \
13386 math.h \
13387 stdarg.h \
13388 sys/ioctl.h \
13389 sys/select.h \
13390 sys/time.h \
13391 termios.h \
13392 unistd.h \
13393
13394 do
13395 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13396 echo "$as_me:13396: checking for $ac_header" >&5
13397 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13398 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13399   echo $ECHO_N "(cached) $ECHO_C" >&6
13400 else
13401   cat >conftest.$ac_ext <<_ACEOF
13402 #line 13402 "configure"
13403 #include "confdefs.h"
13404 #include <$ac_header>
13405 _ACEOF
13406 if { (eval echo "$as_me:13406: \"$ac_cpp conftest.$ac_ext\"") >&5
13407   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13408   ac_status=$?
13409   egrep -v '^ *\+' conftest.er1 >conftest.err
13410   rm -f conftest.er1
13411   cat conftest.err >&5
13412   echo "$as_me:13412: \$? = $ac_status" >&5
13413   (exit $ac_status); } >/dev/null; then
13414   if test -s conftest.err; then
13415     ac_cpp_err=$ac_c_preproc_warn_flag
13416   else
13417     ac_cpp_err=
13418   fi
13419 else
13420   ac_cpp_err=yes
13421 fi
13422 if test -z "$ac_cpp_err"; then
13423   eval "$as_ac_Header=yes"
13424 else
13425   echo "$as_me: failed program was:" >&5
13426   cat conftest.$ac_ext >&5
13427   eval "$as_ac_Header=no"
13428 fi
13429 rm -f conftest.err conftest.$ac_ext
13430 fi
13431 echo "$as_me:13431: result: `eval echo '${'$as_ac_Header'}'`" >&5
13432 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13433 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13434   cat >>confdefs.h <<EOF
13435 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13436 EOF
13437
13438 fi
13439 done
13440
13441 for ac_header in unistd.h getopt.h
13442 do
13443 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13444 echo "$as_me:13444: checking for $ac_header" >&5
13445 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13446 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13447   echo $ECHO_N "(cached) $ECHO_C" >&6
13448 else
13449   cat >conftest.$ac_ext <<_ACEOF
13450 #line 13450 "configure"
13451 #include "confdefs.h"
13452 #include <$ac_header>
13453 _ACEOF
13454 if { (eval echo "$as_me:13454: \"$ac_cpp conftest.$ac_ext\"") >&5
13455   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13456   ac_status=$?
13457   egrep -v '^ *\+' conftest.er1 >conftest.err
13458   rm -f conftest.er1
13459   cat conftest.err >&5
13460   echo "$as_me:13460: \$? = $ac_status" >&5
13461   (exit $ac_status); } >/dev/null; then
13462   if test -s conftest.err; then
13463     ac_cpp_err=$ac_c_preproc_warn_flag
13464   else
13465     ac_cpp_err=
13466   fi
13467 else
13468   ac_cpp_err=yes
13469 fi
13470 if test -z "$ac_cpp_err"; then
13471   eval "$as_ac_Header=yes"
13472 else
13473   echo "$as_me: failed program was:" >&5
13474   cat conftest.$ac_ext >&5
13475   eval "$as_ac_Header=no"
13476 fi
13477 rm -f conftest.err conftest.$ac_ext
13478 fi
13479 echo "$as_me:13479: result: `eval echo '${'$as_ac_Header'}'`" >&5
13480 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13481 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13482   cat >>confdefs.h <<EOF
13483 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13484 EOF
13485
13486 fi
13487 done
13488
13489 echo "$as_me:13489: checking for header declaring getopt variables" >&5
13490 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13491 if test "${cf_cv_getopt_header+set}" = set; then
13492   echo $ECHO_N "(cached) $ECHO_C" >&6
13493 else
13494
13495 cf_cv_getopt_header=none
13496 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13497 do
13498 cat >conftest.$ac_ext <<_ACEOF
13499 #line 13499 "configure"
13500 #include "confdefs.h"
13501
13502 #include <$cf_header>
13503 int
13504 main ()
13505 {
13506 int x = optind; char *y = optarg
13507   ;
13508   return 0;
13509 }
13510 _ACEOF
13511 rm -f conftest.$ac_objext
13512 if { (eval echo "$as_me:13512: \"$ac_compile\"") >&5
13513   (eval $ac_compile) 2>&5
13514   ac_status=$?
13515   echo "$as_me:13515: \$? = $ac_status" >&5
13516   (exit $ac_status); } &&
13517          { ac_try='test -s conftest.$ac_objext'
13518   { (eval echo "$as_me:13518: \"$ac_try\"") >&5
13519   (eval $ac_try) 2>&5
13520   ac_status=$?
13521   echo "$as_me:13521: \$? = $ac_status" >&5
13522   (exit $ac_status); }; }; then
13523   cf_cv_getopt_header=$cf_header
13524  break
13525 else
13526   echo "$as_me: failed program was:" >&5
13527 cat conftest.$ac_ext >&5
13528 fi
13529 rm -f conftest.$ac_objext conftest.$ac_ext
13530 done
13531
13532 fi
13533 echo "$as_me:13533: result: $cf_cv_getopt_header" >&5
13534 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13535 if test $cf_cv_getopt_header != none ; then
13536
13537 cat >>confdefs.h <<\EOF
13538 #define HAVE_GETOPT_HEADER 1
13539 EOF
13540
13541 fi
13542
13543 for ac_func in \
13544 gettimeofday \
13545
13546 do
13547 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13548 echo "$as_me:13548: checking for $ac_func" >&5
13549 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13550 if eval "test \"\${$as_ac_var+set}\" = set"; then
13551   echo $ECHO_N "(cached) $ECHO_C" >&6
13552 else
13553   cat >conftest.$ac_ext <<_ACEOF
13554 #line 13554 "configure"
13555 #include "confdefs.h"
13556 /* System header to define __stub macros and hopefully few prototypes,
13557     which can conflict with char $ac_func (); below.  */
13558 #include <assert.h>
13559 /* Override any gcc2 internal prototype to avoid an error.  */
13560 #ifdef __cplusplus
13561 extern "C"
13562 #endif
13563 /* We use char because int might match the return type of a gcc2
13564    builtin and then its argument prototype would still apply.  */
13565 char $ac_func ();
13566 char (*f) ();
13567
13568 int
13569 main ()
13570 {
13571 /* The GNU C library defines this for functions which it implements
13572     to always fail with ENOSYS.  Some functions are actually named
13573     something starting with __ and the normal name is an alias.  */
13574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13575 choke me
13576 #else
13577 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13578 #endif
13579
13580   ;
13581   return 0;
13582 }
13583 _ACEOF
13584 rm -f conftest.$ac_objext conftest$ac_exeext
13585 if { (eval echo "$as_me:13585: \"$ac_link\"") >&5
13586   (eval $ac_link) 2>&5
13587   ac_status=$?
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit $ac_status); } &&
13590          { ac_try='test -s conftest$ac_exeext'
13591   { (eval echo "$as_me:13591: \"$ac_try\"") >&5
13592   (eval $ac_try) 2>&5
13593   ac_status=$?
13594   echo "$as_me:13594: \$? = $ac_status" >&5
13595   (exit $ac_status); }; }; then
13596   eval "$as_ac_var=yes"
13597 else
13598   echo "$as_me: failed program was:" >&5
13599 cat conftest.$ac_ext >&5
13600 eval "$as_ac_var=no"
13601 fi
13602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13603 fi
13604 echo "$as_me:13604: result: `eval echo '${'$as_ac_var'}'`" >&5
13605 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13606 if test `eval echo '${'$as_ac_var'}'` = yes; then
13607   cat >>confdefs.h <<EOF
13608 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13609 EOF
13610
13611 fi
13612 done
13613
13614 if test "$cf_enable_widec" = yes; then
13615
13616 for ac_func in \
13617 mblen \
13618 mbrlen \
13619 mbrtowc \
13620 mbsrtowcs \
13621 mbstowcs \
13622 mbtowc \
13623 wcsrtombs \
13624 wcstombs \
13625
13626 do
13627 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13628 echo "$as_me:13628: checking for $ac_func" >&5
13629 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13630 if eval "test \"\${$as_ac_var+set}\" = set"; then
13631   echo $ECHO_N "(cached) $ECHO_C" >&6
13632 else
13633   cat >conftest.$ac_ext <<_ACEOF
13634 #line 13634 "configure"
13635 #include "confdefs.h"
13636 /* System header to define __stub macros and hopefully few prototypes,
13637     which can conflict with char $ac_func (); below.  */
13638 #include <assert.h>
13639 /* Override any gcc2 internal prototype to avoid an error.  */
13640 #ifdef __cplusplus
13641 extern "C"
13642 #endif
13643 /* We use char because int might match the return type of a gcc2
13644    builtin and then its argument prototype would still apply.  */
13645 char $ac_func ();
13646 char (*f) ();
13647
13648 int
13649 main ()
13650 {
13651 /* The GNU C library defines this for functions which it implements
13652     to always fail with ENOSYS.  Some functions are actually named
13653     something starting with __ and the normal name is an alias.  */
13654 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13655 choke me
13656 #else
13657 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13658 #endif
13659
13660   ;
13661   return 0;
13662 }
13663 _ACEOF
13664 rm -f conftest.$ac_objext conftest$ac_exeext
13665 if { (eval echo "$as_me:13665: \"$ac_link\"") >&5
13666   (eval $ac_link) 2>&5
13667   ac_status=$?
13668   echo "$as_me:13668: \$? = $ac_status" >&5
13669   (exit $ac_status); } &&
13670          { ac_try='test -s conftest$ac_exeext'
13671   { (eval echo "$as_me:13671: \"$ac_try\"") >&5
13672   (eval $ac_try) 2>&5
13673   ac_status=$?
13674   echo "$as_me:13674: \$? = $ac_status" >&5
13675   (exit $ac_status); }; }; then
13676   eval "$as_ac_var=yes"
13677 else
13678   echo "$as_me: failed program was:" >&5
13679 cat conftest.$ac_ext >&5
13680 eval "$as_ac_var=no"
13681 fi
13682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13683 fi
13684 echo "$as_me:13684: result: `eval echo '${'$as_ac_var'}'`" >&5
13685 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13686 if test `eval echo '${'$as_ac_var'}'` = yes; then
13687   cat >>confdefs.h <<EOF
13688 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13689 EOF
13690
13691 fi
13692 done
13693
13694 fi
13695
13696 echo "$as_me:13696: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13697 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13698 if test "${cf_cv_need_xopen_extension+set}" = set; then
13699   echo $ECHO_N "(cached) $ECHO_C" >&6
13700 else
13701
13702 cat >conftest.$ac_ext <<_ACEOF
13703 #line 13703 "configure"
13704 #include "confdefs.h"
13705
13706 #include <stdlib.h>
13707 #include <${cf_cv_ncurses_header:-curses.h}>
13708 int
13709 main ()
13710 {
13711
13712 #if defined(NCURSES_VERSION_PATCH)
13713 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13714         make an error
13715 #endif
13716 #endif
13717         long x = winnstr(stdscr, "", 0);
13718         int x1, y1;
13719         getbegyx(stdscr, y1, x1)
13720   ;
13721   return 0;
13722 }
13723 _ACEOF
13724 rm -f conftest.$ac_objext conftest$ac_exeext
13725 if { (eval echo "$as_me:13725: \"$ac_link\"") >&5
13726   (eval $ac_link) 2>&5
13727   ac_status=$?
13728   echo "$as_me:13728: \$? = $ac_status" >&5
13729   (exit $ac_status); } &&
13730          { ac_try='test -s conftest$ac_exeext'
13731   { (eval echo "$as_me:13731: \"$ac_try\"") >&5
13732   (eval $ac_try) 2>&5
13733   ac_status=$?
13734   echo "$as_me:13734: \$? = $ac_status" >&5
13735   (exit $ac_status); }; }; then
13736   cf_cv_need_xopen_extension=no
13737 else
13738   echo "$as_me: failed program was:" >&5
13739 cat conftest.$ac_ext >&5
13740 cat >conftest.$ac_ext <<_ACEOF
13741 #line 13741 "configure"
13742 #include "confdefs.h"
13743
13744 #define _XOPEN_SOURCE_EXTENDED
13745 #include <stdlib.h>
13746 #include <${cf_cv_ncurses_header:-curses.h}>
13747 int
13748 main ()
13749 {
13750
13751 #ifdef NCURSES_VERSION
13752         cchar_t check;
13753         int check2 = curs_set((int)sizeof(check));
13754 #endif
13755         long x = winnstr(stdscr, "", 0);
13756         int x1, y1;
13757         getbegyx(stdscr, y1, x1)
13758   ;
13759   return 0;
13760 }
13761 _ACEOF
13762 rm -f conftest.$ac_objext conftest$ac_exeext
13763 if { (eval echo "$as_me:13763: \"$ac_link\"") >&5
13764   (eval $ac_link) 2>&5
13765   ac_status=$?
13766   echo "$as_me:13766: \$? = $ac_status" >&5
13767   (exit $ac_status); } &&
13768          { ac_try='test -s conftest$ac_exeext'
13769   { (eval echo "$as_me:13769: \"$ac_try\"") >&5
13770   (eval $ac_try) 2>&5
13771   ac_status=$?
13772   echo "$as_me:13772: \$? = $ac_status" >&5
13773   (exit $ac_status); }; }; then
13774   cf_cv_need_xopen_extension=yes
13775 else
13776   echo "$as_me: failed program was:" >&5
13777 cat conftest.$ac_ext >&5
13778 cf_cv_need_xopen_extension=unknown
13779 fi
13780 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13781 fi
13782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13783 fi
13784 echo "$as_me:13784: result: $cf_cv_need_xopen_extension" >&5
13785 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13786 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13787
13788 echo "$as_me:13788: checking for term.h" >&5
13789 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13790 if test "${cf_cv_term_header+set}" = set; then
13791   echo $ECHO_N "(cached) $ECHO_C" >&6
13792 else
13793
13794 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13795 # for <term.h> if we do not find the variant.
13796
13797 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13798
13799 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13800 */*)
13801         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13802         cf_header_list="$cf_header_item $cf_header_list"
13803         ;;
13804 esac
13805
13806 for cf_header in $cf_header_list
13807 do
13808         cat >conftest.$ac_ext <<_ACEOF
13809 #line 13809 "configure"
13810 #include "confdefs.h"
13811
13812 #include <${cf_cv_ncurses_header:-curses.h}>
13813 #include <${cf_header}>
13814 int
13815 main ()
13816 {
13817 WINDOW *x
13818   ;
13819   return 0;
13820 }
13821 _ACEOF
13822 rm -f conftest.$ac_objext
13823 if { (eval echo "$as_me:13823: \"$ac_compile\"") >&5
13824   (eval $ac_compile) 2>&5
13825   ac_status=$?
13826   echo "$as_me:13826: \$? = $ac_status" >&5
13827   (exit $ac_status); } &&
13828          { ac_try='test -s conftest.$ac_objext'
13829   { (eval echo "$as_me:13829: \"$ac_try\"") >&5
13830   (eval $ac_try) 2>&5
13831   ac_status=$?
13832   echo "$as_me:13832: \$? = $ac_status" >&5
13833   (exit $ac_status); }; }; then
13834   cf_cv_term_header=$cf_header
13835          break
13836 else
13837   echo "$as_me: failed program was:" >&5
13838 cat conftest.$ac_ext >&5
13839 cf_cv_term_header=no
13840 fi
13841 rm -f conftest.$ac_objext conftest.$ac_ext
13842 done
13843
13844 case $cf_cv_term_header in #(vi
13845 no)
13846         # If curses is ncurses, some packagers still mess it up by trying to make
13847         # us use GNU termcap.  This handles the most common case.
13848         for cf_header in ncurses/term.h ncursesw/term.h
13849         do
13850                 cat >conftest.$ac_ext <<_ACEOF
13851 #line 13851 "configure"
13852 #include "confdefs.h"
13853
13854 #include <${cf_cv_ncurses_header:-curses.h}>
13855 #ifdef NCURSES_VERSION
13856 #include <${cf_header}>
13857 #else
13858 make an error
13859 #endif
13860 int
13861 main ()
13862 {
13863 WINDOW *x
13864   ;
13865   return 0;
13866 }
13867 _ACEOF
13868 rm -f conftest.$ac_objext
13869 if { (eval echo "$as_me:13869: \"$ac_compile\"") >&5
13870   (eval $ac_compile) 2>&5
13871   ac_status=$?
13872   echo "$as_me:13872: \$? = $ac_status" >&5
13873   (exit $ac_status); } &&
13874          { ac_try='test -s conftest.$ac_objext'
13875   { (eval echo "$as_me:13875: \"$ac_try\"") >&5
13876   (eval $ac_try) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); }; }; then
13880   cf_cv_term_header=$cf_header
13881                          break
13882 else
13883   echo "$as_me: failed program was:" >&5
13884 cat conftest.$ac_ext >&5
13885 cf_cv_term_header=no
13886 fi
13887 rm -f conftest.$ac_objext conftest.$ac_ext
13888         done
13889         ;;
13890 esac
13891
13892 fi
13893 echo "$as_me:13893: result: $cf_cv_term_header" >&5
13894 echo "${ECHO_T}$cf_cv_term_header" >&6
13895
13896 case $cf_cv_term_header in #(vi
13897 term.h) #(vi
13898
13899 cat >>confdefs.h <<\EOF
13900 #define HAVE_TERM_H 1
13901 EOF
13902
13903         ;;
13904 ncurses/term.h) #(vi
13905
13906 cat >>confdefs.h <<\EOF
13907 #define HAVE_NCURSES_TERM_H 1
13908 EOF
13909
13910         ;;
13911 ncursesw/term.h)
13912
13913 cat >>confdefs.h <<\EOF
13914 #define HAVE_NCURSESW_TERM_H 1
13915 EOF
13916
13917         ;;
13918 esac
13919
13920 echo "$as_me:13920: checking for unctrl.h" >&5
13921 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13922 if test "${cf_cv_unctrl_header+set}" = set; then
13923   echo $ECHO_N "(cached) $ECHO_C" >&6
13924 else
13925
13926 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13927 # for <unctrl.h> if we do not find the variant.
13928
13929 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13930
13931 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13932 */*)
13933         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13934         cf_header_list="$cf_header_item $cf_header_list"
13935         ;;
13936 esac
13937
13938 for cf_header in $cf_header_list
13939 do
13940         cat >conftest.$ac_ext <<_ACEOF
13941 #line 13941 "configure"
13942 #include "confdefs.h"
13943
13944 #include <${cf_cv_ncurses_header:-curses.h}>
13945 #include <${cf_header}>
13946 int
13947 main ()
13948 {
13949 WINDOW *x
13950   ;
13951   return 0;
13952 }
13953 _ACEOF
13954 rm -f conftest.$ac_objext
13955 if { (eval echo "$as_me:13955: \"$ac_compile\"") >&5
13956   (eval $ac_compile) 2>&5
13957   ac_status=$?
13958   echo "$as_me:13958: \$? = $ac_status" >&5
13959   (exit $ac_status); } &&
13960          { ac_try='test -s conftest.$ac_objext'
13961   { (eval echo "$as_me:13961: \"$ac_try\"") >&5
13962   (eval $ac_try) 2>&5
13963   ac_status=$?
13964   echo "$as_me:13964: \$? = $ac_status" >&5
13965   (exit $ac_status); }; }; then
13966   cf_cv_unctrl_header=$cf_header
13967          break
13968 else
13969   echo "$as_me: failed program was:" >&5
13970 cat conftest.$ac_ext >&5
13971 cf_cv_unctrl_header=no
13972 fi
13973 rm -f conftest.$ac_objext conftest.$ac_ext
13974 done
13975
13976 fi
13977 echo "$as_me:13977: result: $cf_cv_unctrl_header" >&5
13978 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13979
13980 case $cf_cv_unctrl_header in #(vi
13981 no)
13982         { echo "$as_me:13982: WARNING: unctrl.h header not found" >&5
13983 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13984         ;;
13985 esac
13986
13987 case $cf_cv_unctrl_header in #(vi
13988 unctrl.h) #(vi
13989
13990 cat >>confdefs.h <<\EOF
13991 #define HAVE_UNCTRL_H 1
13992 EOF
13993
13994         ;;
13995 ncurses/unctrl.h) #(vi
13996
13997 cat >>confdefs.h <<\EOF
13998 #define HAVE_NCURSES_UNCTRL_H 1
13999 EOF
14000
14001         ;;
14002 ncursesw/unctrl.h)
14003
14004 cat >>confdefs.h <<\EOF
14005 #define HAVE_NCURSESW_UNCTRL_H 1
14006 EOF
14007
14008         ;;
14009 esac
14010
14011 for cf_func in \
14012 assume_default_colors \
14013 chgat \
14014 color_set \
14015 use_env \
14016 filter \
14017 getbegx \
14018 getcurx \
14019 getmaxx \
14020 getnstr \
14021 getparx \
14022 getwin \
14023 mvvline \
14024 mvwvline \
14025 napms \
14026 putwin \
14027 resize_term \
14028 resizeterm \
14029 ripoffline \
14030 scr_dump \
14031 setupterm \
14032 slk_color \
14033 slk_init \
14034 termattrs \
14035 tgetent \
14036 tigetnum \
14037 tigetstr \
14038 typeahead \
14039 use_default_colors \
14040 use_screen \
14041 use_window \
14042 vsscanf \
14043 vw_printw \
14044 wchgat \
14045 winsstr \
14046 wresize \
14047 wsyncdown \
14048
14049 do
14050
14051 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14052
14053         echo "$as_me:14053: checking for ${cf_func}" >&5
14054 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14055
14056 echo "${as_me:-configure}:14056: testing ${cf_func} ..." 1>&5
14057
14058         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14059   echo $ECHO_N "(cached) $ECHO_C" >&6
14060 else
14061
14062                 eval cf_result='$ac_cv_func_'$cf_func
14063                 if test ".$cf_result" != ".no"; then
14064                         cat >conftest.$ac_ext <<_ACEOF
14065 #line 14065 "configure"
14066 #include "confdefs.h"
14067
14068 #ifdef HAVE_XCURSES
14069 #include <xcurses.h>
14070 char * XCursesProgramName = "test";
14071 #else
14072 #include <${cf_cv_ncurses_header:-curses.h}>
14073 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14074 #include <ncursesw/term.h>
14075 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14076 #include <ncurses/term.h>
14077 #elif defined(HAVE_TERM_H)
14078 #include <term.h>
14079 #endif
14080 #endif
14081
14082 int
14083 main ()
14084 {
14085
14086 #ifndef ${cf_func}
14087 long foo = (long)(&${cf_func});
14088 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14089 if (foo + 1234 > 5678)
14090         ${cf_cv_main_return:-return}(foo);
14091 #endif
14092
14093   ;
14094   return 0;
14095 }
14096 _ACEOF
14097 rm -f conftest.$ac_objext conftest$ac_exeext
14098 if { (eval echo "$as_me:14098: \"$ac_link\"") >&5
14099   (eval $ac_link) 2>&5
14100   ac_status=$?
14101   echo "$as_me:14101: \$? = $ac_status" >&5
14102   (exit $ac_status); } &&
14103          { ac_try='test -s conftest$ac_exeext'
14104   { (eval echo "$as_me:14104: \"$ac_try\"") >&5
14105   (eval $ac_try) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); }; }; then
14109   cf_result=yes
14110 else
14111   echo "$as_me: failed program was:" >&5
14112 cat conftest.$ac_ext >&5
14113 cf_result=no
14114 fi
14115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14116                 fi
14117                 eval 'cf_cv_func_'$cf_func'=$cf_result'
14118
14119 fi
14120
14121         # use the computed/retrieved cache-value:
14122         eval 'cf_result=$cf_cv_func_'$cf_func
14123         echo "$as_me:14123: result: $cf_result" >&5
14124 echo "${ECHO_T}$cf_result" >&6
14125         if test $cf_result != no; then
14126                 cat >>confdefs.h <<EOF
14127 #define HAVE_${cf_tr_func} 1
14128 EOF
14129
14130         fi
14131 done
14132
14133 for cf_func in tputs
14134 do
14135
14136 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14137
14138         echo "$as_me:14138: checking for ${cf_func}" >&5
14139 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14140
14141 echo "${as_me:-configure}:14141: testing ${cf_func} ..." 1>&5
14142
14143         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14144   echo $ECHO_N "(cached) $ECHO_C" >&6
14145 else
14146
14147                 eval cf_result='$ac_cv_func_'$cf_func
14148                 if test ".$cf_result" != ".no"; then
14149                         cat >conftest.$ac_ext <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152
14153 #ifdef HAVE_XCURSES
14154 #include <xcurses.h>
14155 char * XCursesProgramName = "test";
14156 #else
14157 #include <${cf_cv_ncurses_header:-curses.h}>
14158 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14159 #include <ncursesw/term.h>
14160 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14161 #include <ncurses/term.h>
14162 #elif defined(HAVE_TERM_H)
14163 #include <term.h>
14164 #endif
14165 #endif
14166
14167 int
14168 main ()
14169 {
14170
14171 #ifndef ${cf_func}
14172 long foo = (long)(&${cf_func});
14173 fprintf(stderr, "testing linkage of $cf_func:%p\n", foo);
14174 if (foo + 1234 > 5678)
14175         ${cf_cv_main_return:-return}(foo);
14176 #endif
14177
14178   ;
14179   return 0;
14180 }
14181 _ACEOF
14182 rm -f conftest.$ac_objext conftest$ac_exeext
14183 if { (eval echo "$as_me:14183: \"$ac_link\"") >&5
14184   (eval $ac_link) 2>&5
14185   ac_status=$?
14186   echo "$as_me:14186: \$? = $ac_status" >&5
14187   (exit $ac_status); } &&
14188          { ac_try='test -s conftest$ac_exeext'
14189   { (eval echo "$as_me:14189: \"$ac_try\"") >&5
14190   (eval $ac_try) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit $ac_status); }; }; then
14194   cf_result=yes
14195 else
14196   echo "$as_me: failed program was:" >&5
14197 cat conftest.$ac_ext >&5
14198 cf_result=no
14199 fi
14200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14201                 fi
14202                 eval 'cf_cv_func_'$cf_func'=$cf_result'
14203
14204 fi
14205
14206         # use the computed/retrieved cache-value:
14207         eval 'cf_result=$cf_cv_func_'$cf_func
14208         echo "$as_me:14208: result: $cf_result" >&5
14209 echo "${ECHO_T}$cf_result" >&6
14210         if test $cf_result != no; then
14211                 cat >>confdefs.h <<EOF
14212 #define HAVE_${cf_tr_func} 1
14213 EOF
14214
14215         fi
14216 done
14217
14218 if test x$cf_cv_func_tputs = xyes
14219 then
14220         cf_done=no
14221         for cf_arg in int char
14222         do
14223                 for cf_ret in int void
14224                 do
14225                         if test $cf_ret = void
14226                         then
14227                                 cf_return="/* nothing */"
14228                         else
14229                                 cf_return="return value"
14230                         fi
14231                         cat >conftest.$ac_ext <<_ACEOF
14232 #line 14232 "configure"
14233 #include "confdefs.h"
14234
14235 #include <${cf_cv_ncurses_header:-curses.h}>
14236 #include <$cf_cv_term_header>
14237
14238 static $cf_ret outc($cf_arg value) { $cf_return; }
14239
14240 int
14241 main ()
14242 {
14243
14244         tputs("hello", 0, outc);
14245         ${cf_cv_main_return:-return}(0);
14246
14247   ;
14248   return 0;
14249 }
14250 _ACEOF
14251 rm -f conftest.$ac_objext
14252 if { (eval echo "$as_me:14252: \"$ac_compile\"") >&5
14253   (eval $ac_compile) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit $ac_status); } &&
14257          { ac_try='test -s conftest.$ac_objext'
14258   { (eval echo "$as_me:14258: \"$ac_try\"") >&5
14259   (eval $ac_try) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); }; }; then
14263
14264                 test -n "$verbose" && echo "    prototype $cf_ret func($cf_arg value)" 1>&6
14265
14266 echo "${as_me:-configure}:14266: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14267
14268                 cat >>confdefs.h <<EOF
14269 #define TPUTS_ARG               $cf_arg
14270 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14271 #define TPUTS_RETURN(value)     $cf_return
14272 EOF
14273                 cf_done=yes
14274                 break
14275
14276 else
14277   echo "$as_me: failed program was:" >&5
14278 cat conftest.$ac_ext >&5
14279 fi
14280 rm -f conftest.$ac_objext conftest.$ac_ext
14281                 done
14282                 test $cf_done = yes && break
14283         done
14284 fi
14285
14286 echo "$as_me:14286: checking for ncurses extended functions" >&5
14287 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14288 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14289   echo $ECHO_N "(cached) $ECHO_C" >&6
14290 else
14291
14292 cat >conftest.$ac_ext <<_ACEOF
14293 #line 14293 "configure"
14294 #include "confdefs.h"
14295
14296 #include <${cf_cv_ncurses_header:-curses.h}>
14297 int
14298 main ()
14299 {
14300
14301 int x = NCURSES_EXT_FUNCS
14302
14303   ;
14304   return 0;
14305 }
14306 _ACEOF
14307 rm -f conftest.$ac_objext
14308 if { (eval echo "$as_me:14308: \"$ac_compile\"") >&5
14309   (eval $ac_compile) 2>&5
14310   ac_status=$?
14311   echo "$as_me:14311: \$? = $ac_status" >&5
14312   (exit $ac_status); } &&
14313          { ac_try='test -s conftest.$ac_objext'
14314   { (eval echo "$as_me:14314: \"$ac_try\"") >&5
14315   (eval $ac_try) 2>&5
14316   ac_status=$?
14317   echo "$as_me:14317: \$? = $ac_status" >&5
14318   (exit $ac_status); }; }; then
14319   cf_cv_ncurses_ext_funcs=defined
14320 else
14321   echo "$as_me: failed program was:" >&5
14322 cat conftest.$ac_ext >&5
14323
14324 cat >conftest.$ac_ext <<_ACEOF
14325 #line 14325 "configure"
14326 #include "confdefs.h"
14327
14328 #include <${cf_cv_ncurses_header:-curses.h}>
14329 int
14330 main ()
14331 {
14332
14333         (void) assume_default_colors (0, 0);
14334         (void) curses_version ();
14335         (void) define_key (0, 0);
14336         (void) is_term_resized (0, 0);
14337         (void) key_defined (0);
14338         (void) keybound (0, 0);
14339         (void) keyok (0, 0);
14340         (void) resize_term (0, 0);
14341         (void) resizeterm (0, 0);
14342         (void) use_default_colors ();
14343         (void) use_extended_names (0);
14344         (void) wresize (0, 0, 0);
14345   ;
14346   return 0;
14347 }
14348 _ACEOF
14349 rm -f conftest.$ac_objext conftest$ac_exeext
14350 if { (eval echo "$as_me:14350: \"$ac_link\"") >&5
14351   (eval $ac_link) 2>&5
14352   ac_status=$?
14353   echo "$as_me:14353: \$? = $ac_status" >&5
14354   (exit $ac_status); } &&
14355          { ac_try='test -s conftest$ac_exeext'
14356   { (eval echo "$as_me:14356: \"$ac_try\"") >&5
14357   (eval $ac_try) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); }; }; then
14361   cf_cv_ncurses_ext_funcs=yes
14362 else
14363   echo "$as_me: failed program was:" >&5
14364 cat conftest.$ac_ext >&5
14365 cf_cv_ncurses_ext_funcs=no
14366 fi
14367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14368
14369 fi
14370 rm -f conftest.$ac_objext conftest.$ac_ext
14371
14372 fi
14373 echo "$as_me:14373: result: $cf_cv_ncurses_ext_funcs" >&5
14374 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14375 test "$cf_cv_ncurses_ext_funcs" = yes &&
14376 cat >>confdefs.h <<\EOF
14377 #define NCURSES_EXT_FUNCS 1
14378 EOF
14379
14380 if test "$cf_enable_widec" = yes
14381 then
14382         # workaround for systems with ncurses before 20111029, due to change of
14383         # feature test macro from _XPG5 to _XOPEN_SOURCE
14384         if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14385         then
14386                 cf_define_xpg5=no
14387                 echo "$as_me:14387: checking if _XPG5 should be defined to enable wide-characters" >&5
14388 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14389
14390                 cat >conftest.$ac_ext <<_ACEOF
14391 #line 14391 "configure"
14392 #include "confdefs.h"
14393
14394 #include <${cf_cv_ncurses_header:-curses.h}>
14395 int
14396 main ()
14397 {
14398 int x = _XPG5
14399   ;
14400   return 0;
14401 }
14402 _ACEOF
14403 rm -f conftest.$ac_objext
14404 if { (eval echo "$as_me:14404: \"$ac_compile\"") >&5
14405   (eval $ac_compile) 2>&5
14406   ac_status=$?
14407   echo "$as_me:14407: \$? = $ac_status" >&5
14408   (exit $ac_status); } &&
14409          { ac_try='test -s conftest.$ac_objext'
14410   { (eval echo "$as_me:14410: \"$ac_try\"") >&5
14411   (eval $ac_try) 2>&5
14412   ac_status=$?
14413   echo "$as_me:14413: \$? = $ac_status" >&5
14414   (exit $ac_status); }; }; then
14415   :
14416 else
14417   echo "$as_me: failed program was:" >&5
14418 cat conftest.$ac_ext >&5
14419 cf_save_cppflags="$CPPFLAGS"
14420                          CPPFLAGS="$CPPFLAGS -D_XPG5"
14421                          cat >conftest.$ac_ext <<_ACEOF
14422 #line 14422 "configure"
14423 #include "confdefs.h"
14424
14425 #include <${cf_cv_ncurses_header:-curses.h}>
14426 int
14427 main ()
14428 {
14429 int x = _XPG5
14430   ;
14431   return 0;
14432 }
14433 _ACEOF
14434 rm -f conftest.$ac_objext
14435 if { (eval echo "$as_me:14435: \"$ac_compile\"") >&5
14436   (eval $ac_compile) 2>&5
14437   ac_status=$?
14438   echo "$as_me:14438: \$? = $ac_status" >&5
14439   (exit $ac_status); } &&
14440          { ac_try='test -s conftest.$ac_objext'
14441   { (eval echo "$as_me:14441: \"$ac_try\"") >&5
14442   (eval $ac_try) 2>&5
14443   ac_status=$?
14444   echo "$as_me:14444: \$? = $ac_status" >&5
14445   (exit $ac_status); }; }; then
14446   cf_define_xpg5=yes
14447 else
14448   echo "$as_me: failed program was:" >&5
14449 cat conftest.$ac_ext >&5
14450 fi
14451 rm -f conftest.$ac_objext conftest.$ac_ext
14452                          CPPFLAGS="$cf_save_cppflags"
14453 fi
14454 rm -f conftest.$ac_objext conftest.$ac_ext
14455                 echo "$as_me:14455: result: $cf_define_xpg5" >&5
14456 echo "${ECHO_T}$cf_define_xpg5" >&6
14457
14458                 if test "$cf_define_xpg5" = yes
14459                 then
14460                         CPPFLAGS="$CPPFLAGS -D_XPG5"
14461                 fi
14462         fi
14463
14464         echo "$as_me:14464: checking for wide-character functions" >&5
14465 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14466 if test "${cf_cv_widechar_funcs+set}" = set; then
14467   echo $ECHO_N "(cached) $ECHO_C" >&6
14468 else
14469
14470         cat >conftest.$ac_ext <<_ACEOF
14471 #line 14471 "configure"
14472 #include "confdefs.h"
14473
14474 #include <${cf_cv_ncurses_header:-curses.h}>
14475 int
14476 main ()
14477 {
14478
14479                 static wchar_t src_wchar[2];
14480                 static cchar_t dst_cchar;
14481                 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14482
14483   ;
14484   return 0;
14485 }
14486 _ACEOF
14487 rm -f conftest.$ac_objext conftest$ac_exeext
14488 if { (eval echo "$as_me:14488: \"$ac_link\"") >&5
14489   (eval $ac_link) 2>&5
14490   ac_status=$?
14491   echo "$as_me:14491: \$? = $ac_status" >&5
14492   (exit $ac_status); } &&
14493          { ac_try='test -s conftest$ac_exeext'
14494   { (eval echo "$as_me:14494: \"$ac_try\"") >&5
14495   (eval $ac_try) 2>&5
14496   ac_status=$?
14497   echo "$as_me:14497: \$? = $ac_status" >&5
14498   (exit $ac_status); }; }; then
14499   cf_cv_widechar_funcs=yes
14500 else
14501   echo "$as_me: failed program was:" >&5
14502 cat conftest.$ac_ext >&5
14503 cf_cv_widechar_funcs=no
14504 fi
14505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14506
14507 fi
14508 echo "$as_me:14508: result: $cf_cv_widechar_funcs" >&5
14509 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14510         if test "$cf_cv_widechar_funcs" != no ; then
14511
14512 cat >>confdefs.h <<\EOF
14513 #define USE_WIDEC_SUPPORT 1
14514 EOF
14515
14516         else
14517                 cat >>confdefs.h <<\EOF
14518 #define USE_WIDEC_SUPPORT 0
14519 EOF
14520
14521         fi
14522 else
14523         cat >>confdefs.h <<\EOF
14524 #define USE_WIDEC_SUPPORT 0
14525 EOF
14526
14527 fi
14528
14529 echo "$as_me:14529: checking if sys/time.h works with sys/select.h" >&5
14530 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14531 if test "${cf_cv_sys_time_select+set}" = set; then
14532   echo $ECHO_N "(cached) $ECHO_C" >&6
14533 else
14534
14535 cat >conftest.$ac_ext <<_ACEOF
14536 #line 14536 "configure"
14537 #include "confdefs.h"
14538
14539 #include <sys/types.h>
14540 #ifdef HAVE_SYS_TIME_H
14541 #include <sys/time.h>
14542 #endif
14543 #ifdef HAVE_SYS_SELECT_H
14544 #include <sys/select.h>
14545 #endif
14546
14547 int
14548 main ()
14549 {
14550
14551   ;
14552   return 0;
14553 }
14554 _ACEOF
14555 rm -f conftest.$ac_objext
14556 if { (eval echo "$as_me:14556: \"$ac_compile\"") >&5
14557   (eval $ac_compile) 2>&5
14558   ac_status=$?
14559   echo "$as_me:14559: \$? = $ac_status" >&5
14560   (exit $ac_status); } &&
14561          { ac_try='test -s conftest.$ac_objext'
14562   { (eval echo "$as_me:14562: \"$ac_try\"") >&5
14563   (eval $ac_try) 2>&5
14564   ac_status=$?
14565   echo "$as_me:14565: \$? = $ac_status" >&5
14566   (exit $ac_status); }; }; then
14567   cf_cv_sys_time_select=yes
14568 else
14569   echo "$as_me: failed program was:" >&5
14570 cat conftest.$ac_ext >&5
14571 cf_cv_sys_time_select=no
14572 fi
14573 rm -f conftest.$ac_objext conftest.$ac_ext
14574
14575 fi
14576
14577 echo "$as_me:14577: result: $cf_cv_sys_time_select" >&5
14578 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14579 test "$cf_cv_sys_time_select" = yes &&
14580 cat >>confdefs.h <<\EOF
14581 #define HAVE_SYS_TIME_SELECT 1
14582 EOF
14583
14584 echo "$as_me:14584: checking for function curses_version" >&5
14585 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14586 if test "${cf_cv_func_curses_version+set}" = set; then
14587   echo $ECHO_N "(cached) $ECHO_C" >&6
14588 else
14589
14590 if test "$cross_compiling" = yes; then
14591   cf_cv_func_curses_version=unknown
14592 else
14593   cat >conftest.$ac_ext <<_ACEOF
14594 #line 14594 "configure"
14595 #include "confdefs.h"
14596
14597 #include <${cf_cv_ncurses_header:-curses.h}>
14598 int main()
14599 {
14600         char temp[1024];
14601         sprintf(temp, "%s\n", curses_version());
14602         ${cf_cv_main_return:-return}(0);
14603 }
14604
14605 _ACEOF
14606 rm -f conftest$ac_exeext
14607 if { (eval echo "$as_me:14607: \"$ac_link\"") >&5
14608   (eval $ac_link) 2>&5
14609   ac_status=$?
14610   echo "$as_me:14610: \$? = $ac_status" >&5
14611   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14612   { (eval echo "$as_me:14612: \"$ac_try\"") >&5
14613   (eval $ac_try) 2>&5
14614   ac_status=$?
14615   echo "$as_me:14615: \$? = $ac_status" >&5
14616   (exit $ac_status); }; }; then
14617   cf_cv_func_curses_version=yes
14618
14619 else
14620   echo "$as_me: program exited with status $ac_status" >&5
14621 echo "$as_me: failed program was:" >&5
14622 cat conftest.$ac_ext >&5
14623 cf_cv_func_curses_version=no
14624
14625 fi
14626 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14627 fi
14628 rm -f core
14629 fi
14630 echo "$as_me:14630: result: $cf_cv_func_curses_version" >&5
14631 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14632 test "$cf_cv_func_curses_version" = yes &&
14633 cat >>confdefs.h <<\EOF
14634 #define HAVE_CURSES_VERSION 1
14635 EOF
14636
14637 echo "$as_me:14637: checking for alternate character set array" >&5
14638 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14639 if test "${cf_cv_curses_acs_map+set}" = set; then
14640   echo $ECHO_N "(cached) $ECHO_C" >&6
14641 else
14642
14643 cf_cv_curses_acs_map=unknown
14644 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14645 do
14646 cat >conftest.$ac_ext <<_ACEOF
14647 #line 14647 "configure"
14648 #include "confdefs.h"
14649
14650 #include <${cf_cv_ncurses_header:-curses.h}>
14651
14652 int
14653 main ()
14654 {
14655
14656 $name['k'] = ACS_PLUS
14657
14658   ;
14659   return 0;
14660 }
14661 _ACEOF
14662 rm -f conftest.$ac_objext conftest$ac_exeext
14663 if { (eval echo "$as_me:14663: \"$ac_link\"") >&5
14664   (eval $ac_link) 2>&5
14665   ac_status=$?
14666   echo "$as_me:14666: \$? = $ac_status" >&5
14667   (exit $ac_status); } &&
14668          { ac_try='test -s conftest$ac_exeext'
14669   { (eval echo "$as_me:14669: \"$ac_try\"") >&5
14670   (eval $ac_try) 2>&5
14671   ac_status=$?
14672   echo "$as_me:14672: \$? = $ac_status" >&5
14673   (exit $ac_status); }; }; then
14674   cf_cv_curses_acs_map=$name; break
14675 else
14676   echo "$as_me: failed program was:" >&5
14677 cat conftest.$ac_ext >&5
14678 fi
14679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14680 done
14681
14682 fi
14683 echo "$as_me:14683: result: $cf_cv_curses_acs_map" >&5
14684 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14685
14686 test "$cf_cv_curses_acs_map" != unknown &&
14687 cat >>confdefs.h <<EOF
14688 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14689 EOF
14690
14691 if test "$cf_enable_widec" = yes; then
14692
14693 echo "$as_me:14693: checking for wide alternate character set array" >&5
14694 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14695 if test "${cf_cv_curses_wacs_map+set}" = set; then
14696   echo $ECHO_N "(cached) $ECHO_C" >&6
14697 else
14698
14699         cf_cv_curses_wacs_map=unknown
14700         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14701         do
14702         cat >conftest.$ac_ext <<_ACEOF
14703 #line 14703 "configure"
14704 #include "confdefs.h"
14705
14706 #ifndef _XOPEN_SOURCE_EXTENDED
14707 #define _XOPEN_SOURCE_EXTENDED
14708 #endif
14709 #include <${cf_cv_ncurses_header:-curses.h}>
14710 int
14711 main ()
14712 {
14713 void *foo = &($name['k'])
14714   ;
14715   return 0;
14716 }
14717 _ACEOF
14718 rm -f conftest.$ac_objext conftest$ac_exeext
14719 if { (eval echo "$as_me:14719: \"$ac_link\"") >&5
14720   (eval $ac_link) 2>&5
14721   ac_status=$?
14722   echo "$as_me:14722: \$? = $ac_status" >&5
14723   (exit $ac_status); } &&
14724          { ac_try='test -s conftest$ac_exeext'
14725   { (eval echo "$as_me:14725: \"$ac_try\"") >&5
14726   (eval $ac_try) 2>&5
14727   ac_status=$?
14728   echo "$as_me:14728: \$? = $ac_status" >&5
14729   (exit $ac_status); }; }; then
14730   cf_cv_curses_wacs_map=$name
14731          break
14732 else
14733   echo "$as_me: failed program was:" >&5
14734 cat conftest.$ac_ext >&5
14735 fi
14736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14737         done
14738 fi
14739 echo "$as_me:14739: result: $cf_cv_curses_wacs_map" >&5
14740 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14741
14742 test "$cf_cv_curses_wacs_map" != unknown &&
14743 cat >>confdefs.h <<EOF
14744 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14745 EOF
14746
14747 echo "$as_me:14747: checking for wide alternate character constants" >&5
14748 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14749 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14750   echo $ECHO_N "(cached) $ECHO_C" >&6
14751 else
14752
14753 cf_cv_curses_wacs_symbols=no
14754 if test "$cf_cv_curses_wacs_map" != unknown
14755 then
14756         cat >conftest.$ac_ext <<_ACEOF
14757 #line 14757 "configure"
14758 #include "confdefs.h"
14759
14760 #ifndef _XOPEN_SOURCE_EXTENDED
14761 #define _XOPEN_SOURCE_EXTENDED
14762 #endif
14763 #include <${cf_cv_ncurses_header:-curses.h}>
14764 int
14765 main ()
14766 {
14767 cchar_t *foo = WACS_PLUS;
14768          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14769   ;
14770   return 0;
14771 }
14772 _ACEOF
14773 rm -f conftest.$ac_objext conftest$ac_exeext
14774 if { (eval echo "$as_me:14774: \"$ac_link\"") >&5
14775   (eval $ac_link) 2>&5
14776   ac_status=$?
14777   echo "$as_me:14777: \$? = $ac_status" >&5
14778   (exit $ac_status); } &&
14779          { ac_try='test -s conftest$ac_exeext'
14780   { (eval echo "$as_me:14780: \"$ac_try\"") >&5
14781   (eval $ac_try) 2>&5
14782   ac_status=$?
14783   echo "$as_me:14783: \$? = $ac_status" >&5
14784   (exit $ac_status); }; }; then
14785   cf_cv_curses_wacs_symbols=yes
14786 else
14787   echo "$as_me: failed program was:" >&5
14788 cat conftest.$ac_ext >&5
14789 fi
14790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14791 else
14792         cat >conftest.$ac_ext <<_ACEOF
14793 #line 14793 "configure"
14794 #include "confdefs.h"
14795
14796 #ifndef _XOPEN_SOURCE_EXTENDED
14797 #define _XOPEN_SOURCE_EXTENDED
14798 #endif
14799 #include <${cf_cv_ncurses_header:-curses.h}>
14800 int
14801 main ()
14802 {
14803 cchar_t *foo = WACS_PLUS
14804   ;
14805   return 0;
14806 }
14807 _ACEOF
14808 rm -f conftest.$ac_objext conftest$ac_exeext
14809 if { (eval echo "$as_me:14809: \"$ac_link\"") >&5
14810   (eval $ac_link) 2>&5
14811   ac_status=$?
14812   echo "$as_me:14812: \$? = $ac_status" >&5
14813   (exit $ac_status); } &&
14814          { ac_try='test -s conftest$ac_exeext'
14815   { (eval echo "$as_me:14815: \"$ac_try\"") >&5
14816   (eval $ac_try) 2>&5
14817   ac_status=$?
14818   echo "$as_me:14818: \$? = $ac_status" >&5
14819   (exit $ac_status); }; }; then
14820   cf_cv_curses_wacs_symbols=yes
14821 else
14822   echo "$as_me: failed program was:" >&5
14823 cat conftest.$ac_ext >&5
14824 fi
14825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14826 fi
14827
14828 fi
14829 echo "$as_me:14829: result: $cf_cv_curses_wacs_symbols" >&5
14830 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14831
14832 test "$cf_cv_curses_wacs_symbols" != no &&
14833 cat >>confdefs.h <<\EOF
14834 #define CURSES_WACS_SYMBOLS 1
14835 EOF
14836
14837 fi
14838
14839 echo "$as_me:14839: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14840 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14841 cat >conftest.$ac_ext <<_ACEOF
14842 #line 14842 "configure"
14843 #include "confdefs.h"
14844
14845 #ifndef _XOPEN_SOURCE_EXTENDED
14846 #define _XOPEN_SOURCE_EXTENDED
14847 #endif
14848 #include <${cf_cv_ncurses_header:-curses.h}>
14849 int
14850 main ()
14851 {
14852
14853 attr_t foo
14854
14855   ;
14856   return 0;
14857 }
14858 _ACEOF
14859 rm -f conftest.$ac_objext
14860 if { (eval echo "$as_me:14860: \"$ac_compile\"") >&5
14861   (eval $ac_compile) 2>&5
14862   ac_status=$?
14863   echo "$as_me:14863: \$? = $ac_status" >&5
14864   (exit $ac_status); } &&
14865          { ac_try='test -s conftest.$ac_objext'
14866   { (eval echo "$as_me:14866: \"$ac_try\"") >&5
14867   (eval $ac_try) 2>&5
14868   ac_status=$?
14869   echo "$as_me:14869: \$? = $ac_status" >&5
14870   (exit $ac_status); }; }; then
14871   cf_result=yes
14872 else
14873   echo "$as_me: failed program was:" >&5
14874 cat conftest.$ac_ext >&5
14875 cf_result=no
14876 fi
14877 rm -f conftest.$ac_objext conftest.$ac_ext
14878 echo "$as_me:14878: result: $cf_result" >&5
14879 echo "${ECHO_T}$cf_result" >&6
14880 if test $cf_result = yes ; then
14881
14882 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14883
14884 cat >>confdefs.h <<EOF
14885 #define $cf_result 1
14886 EOF
14887
14888 else
14889
14890 cat >>confdefs.h <<EOF
14891 #define attr_t long
14892 EOF
14893
14894 fi
14895
14896 if test "$cf_enable_widec" = yes; then
14897
14898 # This is needed on Tru64 5.0 to declare mbstate_t
14899 echo "$as_me:14899: checking if we must include wchar.h to declare mbstate_t" >&5
14900 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14901 if test "${cf_cv_mbstate_t+set}" = set; then
14902   echo $ECHO_N "(cached) $ECHO_C" >&6
14903 else
14904
14905 cat >conftest.$ac_ext <<_ACEOF
14906 #line 14906 "configure"
14907 #include "confdefs.h"
14908
14909 #include <stdlib.h>
14910 #include <stdarg.h>
14911 #include <stdio.h>
14912 #ifdef HAVE_LIBUTF8_H
14913 #include <libutf8.h>
14914 #endif
14915 int
14916 main ()
14917 {
14918 mbstate_t state
14919   ;
14920   return 0;
14921 }
14922 _ACEOF
14923 rm -f conftest.$ac_objext
14924 if { (eval echo "$as_me:14924: \"$ac_compile\"") >&5
14925   (eval $ac_compile) 2>&5
14926   ac_status=$?
14927   echo "$as_me:14927: \$? = $ac_status" >&5
14928   (exit $ac_status); } &&
14929          { ac_try='test -s conftest.$ac_objext'
14930   { (eval echo "$as_me:14930: \"$ac_try\"") >&5
14931   (eval $ac_try) 2>&5
14932   ac_status=$?
14933   echo "$as_me:14933: \$? = $ac_status" >&5
14934   (exit $ac_status); }; }; then
14935   cf_cv_mbstate_t=no
14936 else
14937   echo "$as_me: failed program was:" >&5
14938 cat conftest.$ac_ext >&5
14939 cat >conftest.$ac_ext <<_ACEOF
14940 #line 14940 "configure"
14941 #include "confdefs.h"
14942
14943 #include <stdlib.h>
14944 #include <stdarg.h>
14945 #include <stdio.h>
14946 #include <wchar.h>
14947 #ifdef HAVE_LIBUTF8_H
14948 #include <libutf8.h>
14949 #endif
14950 int
14951 main ()
14952 {
14953 mbstate_t value
14954   ;
14955   return 0;
14956 }
14957 _ACEOF
14958 rm -f conftest.$ac_objext
14959 if { (eval echo "$as_me:14959: \"$ac_compile\"") >&5
14960   (eval $ac_compile) 2>&5
14961   ac_status=$?
14962   echo "$as_me:14962: \$? = $ac_status" >&5
14963   (exit $ac_status); } &&
14964          { ac_try='test -s conftest.$ac_objext'
14965   { (eval echo "$as_me:14965: \"$ac_try\"") >&5
14966   (eval $ac_try) 2>&5
14967   ac_status=$?
14968   echo "$as_me:14968: \$? = $ac_status" >&5
14969   (exit $ac_status); }; }; then
14970   cf_cv_mbstate_t=yes
14971 else
14972   echo "$as_me: failed program was:" >&5
14973 cat conftest.$ac_ext >&5
14974 cf_cv_mbstate_t=unknown
14975 fi
14976 rm -f conftest.$ac_objext conftest.$ac_ext
14977 fi
14978 rm -f conftest.$ac_objext conftest.$ac_ext
14979 fi
14980 echo "$as_me:14980: result: $cf_cv_mbstate_t" >&5
14981 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14982
14983 if test "$cf_cv_mbstate_t" = yes ; then
14984
14985 cat >>confdefs.h <<\EOF
14986 #define NEED_WCHAR_H 1
14987 EOF
14988
14989         NEED_WCHAR_H=1
14990 fi
14991
14992 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
14993 if test "$cf_cv_mbstate_t" = unknown ; then
14994         NCURSES_MBSTATE_T=1
14995 fi
14996
14997 # if we find mbstate_t in either place, use substitution to provide a fallback.
14998 if test "$cf_cv_mbstate_t" != unknown ; then
14999         NCURSES_OK_MBSTATE_T=1
15000 fi
15001
15002 # This is needed on Tru64 5.0 to declare wchar_t
15003 echo "$as_me:15003: checking if we must include wchar.h to declare wchar_t" >&5
15004 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15005 if test "${cf_cv_wchar_t+set}" = set; then
15006   echo $ECHO_N "(cached) $ECHO_C" >&6
15007 else
15008
15009 cat >conftest.$ac_ext <<_ACEOF
15010 #line 15010 "configure"
15011 #include "confdefs.h"
15012
15013 #include <stdlib.h>
15014 #include <stdarg.h>
15015 #include <stdio.h>
15016 #ifdef HAVE_LIBUTF8_H
15017 #include <libutf8.h>
15018 #endif
15019 int
15020 main ()
15021 {
15022 wchar_t state
15023   ;
15024   return 0;
15025 }
15026 _ACEOF
15027 rm -f conftest.$ac_objext
15028 if { (eval echo "$as_me:15028: \"$ac_compile\"") >&5
15029   (eval $ac_compile) 2>&5
15030   ac_status=$?
15031   echo "$as_me:15031: \$? = $ac_status" >&5
15032   (exit $ac_status); } &&
15033          { ac_try='test -s conftest.$ac_objext'
15034   { (eval echo "$as_me:15034: \"$ac_try\"") >&5
15035   (eval $ac_try) 2>&5
15036   ac_status=$?
15037   echo "$as_me:15037: \$? = $ac_status" >&5
15038   (exit $ac_status); }; }; then
15039   cf_cv_wchar_t=no
15040 else
15041   echo "$as_me: failed program was:" >&5
15042 cat conftest.$ac_ext >&5
15043 cat >conftest.$ac_ext <<_ACEOF
15044 #line 15044 "configure"
15045 #include "confdefs.h"
15046
15047 #include <stdlib.h>
15048 #include <stdarg.h>
15049 #include <stdio.h>
15050 #include <wchar.h>
15051 #ifdef HAVE_LIBUTF8_H
15052 #include <libutf8.h>
15053 #endif
15054 int
15055 main ()
15056 {
15057 wchar_t value
15058   ;
15059   return 0;
15060 }
15061 _ACEOF
15062 rm -f conftest.$ac_objext
15063 if { (eval echo "$as_me:15063: \"$ac_compile\"") >&5
15064   (eval $ac_compile) 2>&5
15065   ac_status=$?
15066   echo "$as_me:15066: \$? = $ac_status" >&5
15067   (exit $ac_status); } &&
15068          { ac_try='test -s conftest.$ac_objext'
15069   { (eval echo "$as_me:15069: \"$ac_try\"") >&5
15070   (eval $ac_try) 2>&5
15071   ac_status=$?
15072   echo "$as_me:15072: \$? = $ac_status" >&5
15073   (exit $ac_status); }; }; then
15074   cf_cv_wchar_t=yes
15075 else
15076   echo "$as_me: failed program was:" >&5
15077 cat conftest.$ac_ext >&5
15078 cf_cv_wchar_t=unknown
15079 fi
15080 rm -f conftest.$ac_objext conftest.$ac_ext
15081 fi
15082 rm -f conftest.$ac_objext conftest.$ac_ext
15083 fi
15084 echo "$as_me:15084: result: $cf_cv_wchar_t" >&5
15085 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15086
15087 if test "$cf_cv_wchar_t" = yes ; then
15088
15089 cat >>confdefs.h <<\EOF
15090 #define NEED_WCHAR_H 1
15091 EOF
15092
15093         NEED_WCHAR_H=1
15094 fi
15095
15096 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15097 if test "$cf_cv_wchar_t" = unknown ; then
15098         NCURSES_WCHAR_T=1
15099 fi
15100
15101 # if we find wchar_t in either place, use substitution to provide a fallback.
15102 if test "$cf_cv_wchar_t" != unknown ; then
15103         NCURSES_OK_WCHAR_T=1
15104 fi
15105
15106 # This is needed on Tru64 5.0 to declare wint_t
15107 echo "$as_me:15107: checking if we must include wchar.h to declare wint_t" >&5
15108 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15109 if test "${cf_cv_wint_t+set}" = set; then
15110   echo $ECHO_N "(cached) $ECHO_C" >&6
15111 else
15112
15113 cat >conftest.$ac_ext <<_ACEOF
15114 #line 15114 "configure"
15115 #include "confdefs.h"
15116
15117 #include <stdlib.h>
15118 #include <stdarg.h>
15119 #include <stdio.h>
15120 #ifdef HAVE_LIBUTF8_H
15121 #include <libutf8.h>
15122 #endif
15123 int
15124 main ()
15125 {
15126 wint_t state
15127   ;
15128   return 0;
15129 }
15130 _ACEOF
15131 rm -f conftest.$ac_objext
15132 if { (eval echo "$as_me:15132: \"$ac_compile\"") >&5
15133   (eval $ac_compile) 2>&5
15134   ac_status=$?
15135   echo "$as_me:15135: \$? = $ac_status" >&5
15136   (exit $ac_status); } &&
15137          { ac_try='test -s conftest.$ac_objext'
15138   { (eval echo "$as_me:15138: \"$ac_try\"") >&5
15139   (eval $ac_try) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); }; }; then
15143   cf_cv_wint_t=no
15144 else
15145   echo "$as_me: failed program was:" >&5
15146 cat conftest.$ac_ext >&5
15147 cat >conftest.$ac_ext <<_ACEOF
15148 #line 15148 "configure"
15149 #include "confdefs.h"
15150
15151 #include <stdlib.h>
15152 #include <stdarg.h>
15153 #include <stdio.h>
15154 #include <wchar.h>
15155 #ifdef HAVE_LIBUTF8_H
15156 #include <libutf8.h>
15157 #endif
15158 int
15159 main ()
15160 {
15161 wint_t value
15162   ;
15163   return 0;
15164 }
15165 _ACEOF
15166 rm -f conftest.$ac_objext
15167 if { (eval echo "$as_me:15167: \"$ac_compile\"") >&5
15168   (eval $ac_compile) 2>&5
15169   ac_status=$?
15170   echo "$as_me:15170: \$? = $ac_status" >&5
15171   (exit $ac_status); } &&
15172          { ac_try='test -s conftest.$ac_objext'
15173   { (eval echo "$as_me:15173: \"$ac_try\"") >&5
15174   (eval $ac_try) 2>&5
15175   ac_status=$?
15176   echo "$as_me:15176: \$? = $ac_status" >&5
15177   (exit $ac_status); }; }; then
15178   cf_cv_wint_t=yes
15179 else
15180   echo "$as_me: failed program was:" >&5
15181 cat conftest.$ac_ext >&5
15182 cf_cv_wint_t=unknown
15183 fi
15184 rm -f conftest.$ac_objext conftest.$ac_ext
15185 fi
15186 rm -f conftest.$ac_objext conftest.$ac_ext
15187 fi
15188 echo "$as_me:15188: result: $cf_cv_wint_t" >&5
15189 echo "${ECHO_T}$cf_cv_wint_t" >&6
15190
15191 if test "$cf_cv_wint_t" = yes ; then
15192
15193 cat >>confdefs.h <<\EOF
15194 #define NEED_WCHAR_H 1
15195 EOF
15196
15197         NEED_WCHAR_H=1
15198 fi
15199
15200 # if we do not find wint_t in either place, use substitution to provide a fallback.
15201 if test "$cf_cv_wint_t" = unknown ; then
15202         NCURSES_WINT_T=1
15203 fi
15204
15205 # if we find wint_t in either place, use substitution to provide a fallback.
15206 if test "$cf_cv_wint_t" != unknown ; then
15207         NCURSES_OK_WINT_T=1
15208 fi
15209
15210         if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15211
15212 echo "$as_me:15212: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15213 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15214 cat >conftest.$ac_ext <<_ACEOF
15215 #line 15215 "configure"
15216 #include "confdefs.h"
15217
15218 #ifndef _XOPEN_SOURCE_EXTENDED
15219 #define _XOPEN_SOURCE_EXTENDED
15220 #endif
15221 #include <${cf_cv_ncurses_header:-curses.h}>
15222 int
15223 main ()
15224 {
15225
15226 mbstate_t foo
15227
15228   ;
15229   return 0;
15230 }
15231 _ACEOF
15232 rm -f conftest.$ac_objext
15233 if { (eval echo "$as_me:15233: \"$ac_compile\"") >&5
15234   (eval $ac_compile) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); } &&
15238          { ac_try='test -s conftest.$ac_objext'
15239   { (eval echo "$as_me:15239: \"$ac_try\"") >&5
15240   (eval $ac_try) 2>&5
15241   ac_status=$?
15242   echo "$as_me:15242: \$? = $ac_status" >&5
15243   (exit $ac_status); }; }; then
15244   cf_result=yes
15245 else
15246   echo "$as_me: failed program was:" >&5
15247 cat conftest.$ac_ext >&5
15248 cf_result=no
15249 fi
15250 rm -f conftest.$ac_objext conftest.$ac_ext
15251 echo "$as_me:15251: result: $cf_result" >&5
15252 echo "${ECHO_T}$cf_result" >&6
15253 if test $cf_result = yes ; then
15254
15255 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15256
15257 cat >>confdefs.h <<EOF
15258 #define $cf_result 1
15259 EOF
15260
15261 else
15262
15263 cat >>confdefs.h <<EOF
15264 #define mbstate_t long
15265 EOF
15266
15267 fi
15268
15269         fi
15270
15271         if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15272
15273 echo "$as_me:15273: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15274 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15275 cat >conftest.$ac_ext <<_ACEOF
15276 #line 15276 "configure"
15277 #include "confdefs.h"
15278
15279 #ifndef _XOPEN_SOURCE_EXTENDED
15280 #define _XOPEN_SOURCE_EXTENDED
15281 #endif
15282 #include <${cf_cv_ncurses_header:-curses.h}>
15283 int
15284 main ()
15285 {
15286
15287 wchar_t foo
15288
15289   ;
15290   return 0;
15291 }
15292 _ACEOF
15293 rm -f conftest.$ac_objext
15294 if { (eval echo "$as_me:15294: \"$ac_compile\"") >&5
15295   (eval $ac_compile) 2>&5
15296   ac_status=$?
15297   echo "$as_me:15297: \$? = $ac_status" >&5
15298   (exit $ac_status); } &&
15299          { ac_try='test -s conftest.$ac_objext'
15300   { (eval echo "$as_me:15300: \"$ac_try\"") >&5
15301   (eval $ac_try) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); }; }; then
15305   cf_result=yes
15306 else
15307   echo "$as_me: failed program was:" >&5
15308 cat conftest.$ac_ext >&5
15309 cf_result=no
15310 fi
15311 rm -f conftest.$ac_objext conftest.$ac_ext
15312 echo "$as_me:15312: result: $cf_result" >&5
15313 echo "${ECHO_T}$cf_result" >&6
15314 if test $cf_result = yes ; then
15315
15316 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15317
15318 cat >>confdefs.h <<EOF
15319 #define $cf_result 1
15320 EOF
15321
15322 else
15323
15324 cat >>confdefs.h <<EOF
15325 #define wchar_t long
15326 EOF
15327
15328 fi
15329
15330         fi
15331
15332         if test "$NCURSES_OK_WINT_T" = 0 ; then
15333
15334 echo "$as_me:15334: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15335 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15336 cat >conftest.$ac_ext <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15339
15340 #ifndef _XOPEN_SOURCE_EXTENDED
15341 #define _XOPEN_SOURCE_EXTENDED
15342 #endif
15343 #include <${cf_cv_ncurses_header:-curses.h}>
15344 int
15345 main ()
15346 {
15347
15348 wint_t foo
15349
15350   ;
15351   return 0;
15352 }
15353 _ACEOF
15354 rm -f conftest.$ac_objext
15355 if { (eval echo "$as_me:15355: \"$ac_compile\"") >&5
15356   (eval $ac_compile) 2>&5
15357   ac_status=$?
15358   echo "$as_me:15358: \$? = $ac_status" >&5
15359   (exit $ac_status); } &&
15360          { ac_try='test -s conftest.$ac_objext'
15361   { (eval echo "$as_me:15361: \"$ac_try\"") >&5
15362   (eval $ac_try) 2>&5
15363   ac_status=$?
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit $ac_status); }; }; then
15366   cf_result=yes
15367 else
15368   echo "$as_me: failed program was:" >&5
15369 cat conftest.$ac_ext >&5
15370 cf_result=no
15371 fi
15372 rm -f conftest.$ac_objext conftest.$ac_ext
15373 echo "$as_me:15373: result: $cf_result" >&5
15374 echo "${ECHO_T}$cf_result" >&6
15375 if test $cf_result = yes ; then
15376
15377 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15378
15379 cat >>confdefs.h <<EOF
15380 #define $cf_result 1
15381 EOF
15382
15383 else
15384
15385 cat >>confdefs.h <<EOF
15386 #define wint_t long
15387 EOF
15388
15389 fi
15390
15391         fi
15392 fi
15393
15394 echo "$as_me:15394: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15395 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15396
15397 cat >conftest.$ac_ext <<_ACEOF
15398 #line 15398 "configure"
15399 #include "confdefs.h"
15400
15401 #ifdef HAVE_XCURSES
15402 #include <xcurses.h>
15403 char * XCursesProgramName = "test";
15404 #else
15405 #include <${cf_cv_ncurses_header:-curses.h}>
15406 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15407 #include <ncursesw/term.h>
15408 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15409 #include <ncurses/term.h>
15410 #elif defined(HAVE_TERM_H)
15411 #include <term.h>
15412 #endif
15413 #endif
15414
15415 int
15416 main ()
15417 {
15418
15419 void *foo = &(boolnames)
15420
15421   ;
15422   return 0;
15423 }
15424 _ACEOF
15425 rm -f conftest.$ac_objext
15426 if { (eval echo "$as_me:15426: \"$ac_compile\"") >&5
15427   (eval $ac_compile) 2>&5
15428   ac_status=$?
15429   echo "$as_me:15429: \$? = $ac_status" >&5
15430   (exit $ac_status); } &&
15431          { ac_try='test -s conftest.$ac_objext'
15432   { (eval echo "$as_me:15432: \"$ac_try\"") >&5
15433   (eval $ac_try) 2>&5
15434   ac_status=$?
15435   echo "$as_me:15435: \$? = $ac_status" >&5
15436   (exit $ac_status); }; }; then
15437   cf_result=yes
15438 else
15439   echo "$as_me: failed program was:" >&5
15440 cat conftest.$ac_ext >&5
15441 cf_result=no
15442 fi
15443 rm -f conftest.$ac_objext conftest.$ac_ext
15444 echo "$as_me:15444: result: $cf_result" >&5
15445 echo "${ECHO_T}$cf_result" >&6
15446
15447 if test $cf_result = yes ; then
15448
15449 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15450
15451         cat >>confdefs.h <<EOF
15452 #define $cf_result 1
15453 EOF
15454
15455 else
15456         echo "$as_me:15456: checking for data boolnames in library" >&5
15457 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15458         # BSD linkers insist on making weak linkage, but resolve at runtime.
15459         if test "$cross_compiling" = yes; then
15460
15461         # cross-compiling
15462         cat >conftest.$ac_ext <<_ACEOF
15463 #line 15463 "configure"
15464 #include "confdefs.h"
15465
15466 #ifdef HAVE_XCURSES
15467 #include <xcurses.h>
15468 char * XCursesProgramName = "test";
15469 #else
15470 #include <${cf_cv_ncurses_header:-curses.h}>
15471 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15472 #include <ncursesw/term.h>
15473 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15474 #include <ncurses/term.h>
15475 #elif defined(HAVE_TERM_H)
15476 #include <term.h>
15477 #endif
15478 #endif
15479
15480 extern char boolnames;
15481 int
15482 main ()
15483 {
15484
15485         do {
15486                 void *foo = &(boolnames);
15487                 fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15488                 ${cf_cv_main_return:-return}(foo == 0);
15489         } while (0)
15490
15491   ;
15492   return 0;
15493 }
15494 _ACEOF
15495 rm -f conftest.$ac_objext conftest$ac_exeext
15496 if { (eval echo "$as_me:15496: \"$ac_link\"") >&5
15497   (eval $ac_link) 2>&5
15498   ac_status=$?
15499   echo "$as_me:15499: \$? = $ac_status" >&5
15500   (exit $ac_status); } &&
15501          { ac_try='test -s conftest$ac_exeext'
15502   { (eval echo "$as_me:15502: \"$ac_try\"") >&5
15503   (eval $ac_try) 2>&5
15504   ac_status=$?
15505   echo "$as_me:15505: \$? = $ac_status" >&5
15506   (exit $ac_status); }; }; then
15507   cf_result=yes
15508 else
15509   echo "$as_me: failed program was:" >&5
15510 cat conftest.$ac_ext >&5
15511 cf_result=no
15512 fi
15513 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15514
15515 else
15516   cat >conftest.$ac_ext <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519
15520 #ifdef HAVE_XCURSES
15521 #include <xcurses.h>
15522 char * XCursesProgramName = "test";
15523 #else
15524 #include <${cf_cv_ncurses_header:-curses.h}>
15525 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15526 #include <ncursesw/term.h>
15527 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15528 #include <ncurses/term.h>
15529 #elif defined(HAVE_TERM_H)
15530 #include <term.h>
15531 #endif
15532 #endif
15533
15534 extern char boolnames;
15535 int main(void)
15536 {
15537         void *foo = &(boolnames);
15538         fprintf(stderr, "testing linkage of boolnames:%p\n", foo);
15539         ${cf_cv_main_return:-return}(foo == 0);
15540 }
15541 _ACEOF
15542 rm -f conftest$ac_exeext
15543 if { (eval echo "$as_me:15543: \"$ac_link\"") >&5
15544   (eval $ac_link) 2>&5
15545   ac_status=$?
15546   echo "$as_me:15546: \$? = $ac_status" >&5
15547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15548   { (eval echo "$as_me:15548: \"$ac_try\"") >&5
15549   (eval $ac_try) 2>&5
15550   ac_status=$?
15551   echo "$as_me:15551: \$? = $ac_status" >&5
15552   (exit $ac_status); }; }; then
15553   cf_result=yes
15554 else
15555   echo "$as_me: program exited with status $ac_status" >&5
15556 echo "$as_me: failed program was:" >&5
15557 cat conftest.$ac_ext >&5
15558 cf_result=no
15559 fi
15560 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15561 fi
15562         echo "$as_me:15562: result: $cf_result" >&5
15563 echo "${ECHO_T}$cf_result" >&6
15564         if test $cf_result = yes ; then
15565
15566 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15567
15568                 cat >>confdefs.h <<EOF
15569 #define $cf_result 1
15570 EOF
15571
15572         fi
15573 fi
15574
15575 echo "$as_me:15575: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15576 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15577
15578 cat >conftest.$ac_ext <<_ACEOF
15579 #line 15579 "configure"
15580 #include "confdefs.h"
15581
15582 #ifdef HAVE_XCURSES
15583 #include <xcurses.h>
15584 char * XCursesProgramName = "test";
15585 #else
15586 #include <${cf_cv_ncurses_header:-curses.h}>
15587 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15588 #include <ncursesw/term.h>
15589 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15590 #include <ncurses/term.h>
15591 #elif defined(HAVE_TERM_H)
15592 #include <term.h>
15593 #endif
15594 #endif
15595
15596 int
15597 main ()
15598 {
15599
15600 void *foo = &(boolfnames)
15601
15602   ;
15603   return 0;
15604 }
15605 _ACEOF
15606 rm -f conftest.$ac_objext
15607 if { (eval echo "$as_me:15607: \"$ac_compile\"") >&5
15608   (eval $ac_compile) 2>&5
15609   ac_status=$?
15610   echo "$as_me:15610: \$? = $ac_status" >&5
15611   (exit $ac_status); } &&
15612          { ac_try='test -s conftest.$ac_objext'
15613   { (eval echo "$as_me:15613: \"$ac_try\"") >&5
15614   (eval $ac_try) 2>&5
15615   ac_status=$?
15616   echo "$as_me:15616: \$? = $ac_status" >&5
15617   (exit $ac_status); }; }; then
15618   cf_result=yes
15619 else
15620   echo "$as_me: failed program was:" >&5
15621 cat conftest.$ac_ext >&5
15622 cf_result=no
15623 fi
15624 rm -f conftest.$ac_objext conftest.$ac_ext
15625 echo "$as_me:15625: result: $cf_result" >&5
15626 echo "${ECHO_T}$cf_result" >&6
15627
15628 if test $cf_result = yes ; then
15629
15630 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15631
15632         cat >>confdefs.h <<EOF
15633 #define $cf_result 1
15634 EOF
15635
15636 else
15637         echo "$as_me:15637: checking for data boolfnames in library" >&5
15638 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15639         # BSD linkers insist on making weak linkage, but resolve at runtime.
15640         if test "$cross_compiling" = yes; then
15641
15642         # cross-compiling
15643         cat >conftest.$ac_ext <<_ACEOF
15644 #line 15644 "configure"
15645 #include "confdefs.h"
15646
15647 #ifdef HAVE_XCURSES
15648 #include <xcurses.h>
15649 char * XCursesProgramName = "test";
15650 #else
15651 #include <${cf_cv_ncurses_header:-curses.h}>
15652 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15653 #include <ncursesw/term.h>
15654 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15655 #include <ncurses/term.h>
15656 #elif defined(HAVE_TERM_H)
15657 #include <term.h>
15658 #endif
15659 #endif
15660
15661 extern char boolfnames;
15662 int
15663 main ()
15664 {
15665
15666         do {
15667                 void *foo = &(boolfnames);
15668                 fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
15669                 ${cf_cv_main_return:-return}(foo == 0);
15670         } while (0)
15671
15672   ;
15673   return 0;
15674 }
15675 _ACEOF
15676 rm -f conftest.$ac_objext conftest$ac_exeext
15677 if { (eval echo "$as_me:15677: \"$ac_link\"") >&5
15678   (eval $ac_link) 2>&5
15679   ac_status=$?
15680   echo "$as_me:15680: \$? = $ac_status" >&5
15681   (exit $ac_status); } &&
15682          { ac_try='test -s conftest$ac_exeext'
15683   { (eval echo "$as_me:15683: \"$ac_try\"") >&5
15684   (eval $ac_try) 2>&5
15685   ac_status=$?
15686   echo "$as_me:15686: \$? = $ac_status" >&5
15687   (exit $ac_status); }; }; then
15688   cf_result=yes
15689 else
15690   echo "$as_me: failed program was:" >&5
15691 cat conftest.$ac_ext >&5
15692 cf_result=no
15693 fi
15694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15695
15696 else
15697   cat >conftest.$ac_ext <<_ACEOF
15698 #line 15698 "configure"
15699 #include "confdefs.h"
15700
15701 #ifdef HAVE_XCURSES
15702 #include <xcurses.h>
15703 char * XCursesProgramName = "test";
15704 #else
15705 #include <${cf_cv_ncurses_header:-curses.h}>
15706 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15707 #include <ncursesw/term.h>
15708 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15709 #include <ncurses/term.h>
15710 #elif defined(HAVE_TERM_H)
15711 #include <term.h>
15712 #endif
15713 #endif
15714
15715 extern char boolfnames;
15716 int main(void)
15717 {
15718         void *foo = &(boolfnames);
15719         fprintf(stderr, "testing linkage of boolfnames:%p\n", foo);
15720         ${cf_cv_main_return:-return}(foo == 0);
15721 }
15722 _ACEOF
15723 rm -f conftest$ac_exeext
15724 if { (eval echo "$as_me:15724: \"$ac_link\"") >&5
15725   (eval $ac_link) 2>&5
15726   ac_status=$?
15727   echo "$as_me:15727: \$? = $ac_status" >&5
15728   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15729   { (eval echo "$as_me:15729: \"$ac_try\"") >&5
15730   (eval $ac_try) 2>&5
15731   ac_status=$?
15732   echo "$as_me:15732: \$? = $ac_status" >&5
15733   (exit $ac_status); }; }; then
15734   cf_result=yes
15735 else
15736   echo "$as_me: program exited with status $ac_status" >&5
15737 echo "$as_me: failed program was:" >&5
15738 cat conftest.$ac_ext >&5
15739 cf_result=no
15740 fi
15741 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15742 fi
15743         echo "$as_me:15743: result: $cf_result" >&5
15744 echo "${ECHO_T}$cf_result" >&6
15745         if test $cf_result = yes ; then
15746
15747 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15748
15749                 cat >>confdefs.h <<EOF
15750 #define $cf_result 1
15751 EOF
15752
15753         fi
15754 fi
15755
15756 if ( test "$GCC" = yes || test "$GXX" = yes )
15757 then
15758 echo "$as_me:15758: checking if you want to turn on gcc warnings" >&5
15759 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15760
15761 # Check whether --enable-warnings or --disable-warnings was given.
15762 if test "${enable_warnings+set}" = set; then
15763   enableval="$enable_warnings"
15764   test "$enableval" != yes && enableval=no
15765   if test "$enableval" != "no" ; then
15766     with_warnings=yes
15767   else
15768     with_warnings=no
15769   fi
15770 else
15771   enableval=no
15772   with_warnings=no
15773
15774 fi;
15775 echo "$as_me:15775: result: $with_warnings" >&5
15776 echo "${ECHO_T}$with_warnings" >&6
15777 if test "$with_warnings" = "yes"
15778 then
15779
15780 if test "$GCC" = yes
15781 then
15782 cat > conftest.i <<EOF
15783 #ifndef GCC_PRINTF
15784 #define GCC_PRINTF 0
15785 #endif
15786 #ifndef GCC_SCANF
15787 #define GCC_SCANF 0
15788 #endif
15789 #ifndef GCC_NORETURN
15790 #define GCC_NORETURN /* nothing */
15791 #endif
15792 #ifndef GCC_UNUSED
15793 #define GCC_UNUSED /* nothing */
15794 #endif
15795 EOF
15796 if test "$GCC" = yes
15797 then
15798         { echo "$as_me:15798: checking for $CC __attribute__ directives..." >&5
15799 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15800 cat > conftest.$ac_ext <<EOF
15801 #line 15801 "${as_me:-configure}"
15802 #include "confdefs.h"
15803 #include "conftest.h"
15804 #include "conftest.i"
15805 #if     GCC_PRINTF
15806 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15807 #else
15808 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15809 #endif
15810 #if     GCC_SCANF
15811 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15812 #else
15813 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15814 #endif
15815 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15816 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15817 extern void foo(void) GCC_NORETURN;
15818 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15819 EOF
15820         cf_printf_attribute=no
15821         cf_scanf_attribute=no
15822         for cf_attribute in scanf printf unused noreturn
15823         do
15824
15825 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15826
15827                 cf_directive="__attribute__(($cf_attribute))"
15828                 echo "checking for $CC $cf_directive" 1>&5
15829
15830                 case $cf_attribute in #(vi
15831                 printf) #(vi
15832                         cf_printf_attribute=yes
15833                         cat >conftest.h <<EOF
15834 #define GCC_$cf_ATTRIBUTE 1
15835 EOF
15836                         ;;
15837                 scanf) #(vi
15838                         cf_scanf_attribute=yes
15839                         cat >conftest.h <<EOF
15840 #define GCC_$cf_ATTRIBUTE 1
15841 EOF
15842                         ;;
15843                 *) #(vi
15844                         cat >conftest.h <<EOF
15845 #define GCC_$cf_ATTRIBUTE $cf_directive
15846 EOF
15847                         ;;
15848                 esac
15849
15850                 if { (eval echo "$as_me:15850: \"$ac_compile\"") >&5
15851   (eval $ac_compile) 2>&5
15852   ac_status=$?
15853   echo "$as_me:15853: \$? = $ac_status" >&5
15854   (exit $ac_status); }; then
15855                         test -n "$verbose" && echo "$as_me:15855: result: ... $cf_attribute" >&5
15856 echo "${ECHO_T}... $cf_attribute" >&6
15857                         cat conftest.h >>confdefs.h
15858                         case $cf_attribute in #(vi
15859                         noreturn) #(vi
15860
15861 cat >>confdefs.h <<EOF
15862 #define GCC_NORETURN $cf_directive
15863 EOF
15864
15865                                 ;;
15866                         printf) #(vi
15867                                 cf_value='/* nothing */'
15868                                 if test "$cf_printf_attribute" != no ; then
15869                                         cf_value='__attribute__((format(printf,fmt,var)))'
15870
15871 cat >>confdefs.h <<\EOF
15872 #define GCC_PRINTF 1
15873 EOF
15874
15875                                 fi
15876
15877 cat >>confdefs.h <<EOF
15878 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15879 EOF
15880
15881                                 ;;
15882                         scanf) #(vi
15883                                 cf_value='/* nothing */'
15884                                 if test "$cf_scanf_attribute" != no ; then
15885                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15886
15887 cat >>confdefs.h <<\EOF
15888 #define GCC_SCANF 1
15889 EOF
15890
15891                                 fi
15892
15893 cat >>confdefs.h <<EOF
15894 #define GCC_SCANFLIKE(fmt,var) $cf_value
15895 EOF
15896
15897                                 ;;
15898                         unused) #(vi
15899
15900 cat >>confdefs.h <<EOF
15901 #define GCC_UNUSED $cf_directive
15902 EOF
15903
15904                                 ;;
15905                         esac
15906                 fi
15907         done
15908 else
15909         fgrep define conftest.i >>confdefs.h
15910 fi
15911 rm -rf conftest*
15912 fi
15913
15914 INTEL_COMPILER=no
15915
15916 if test "$GCC" = yes ; then
15917         case $host_os in
15918         linux*|gnu*)
15919                 echo "$as_me:15919: checking if this is really Intel C compiler" >&5
15920 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
15921                 cf_save_CFLAGS="$CFLAGS"
15922                 CFLAGS="$CFLAGS -no-gcc"
15923                 cat >conftest.$ac_ext <<_ACEOF
15924 #line 15924 "configure"
15925 #include "confdefs.h"
15926
15927 int
15928 main ()
15929 {
15930
15931 #ifdef __INTEL_COMPILER
15932 #else
15933 make an error
15934 #endif
15935
15936   ;
15937   return 0;
15938 }
15939 _ACEOF
15940 rm -f conftest.$ac_objext
15941 if { (eval echo "$as_me:15941: \"$ac_compile\"") >&5
15942   (eval $ac_compile) 2>&5
15943   ac_status=$?
15944   echo "$as_me:15944: \$? = $ac_status" >&5
15945   (exit $ac_status); } &&
15946          { ac_try='test -s conftest.$ac_objext'
15947   { (eval echo "$as_me:15947: \"$ac_try\"") >&5
15948   (eval $ac_try) 2>&5
15949   ac_status=$?
15950   echo "$as_me:15950: \$? = $ac_status" >&5
15951   (exit $ac_status); }; }; then
15952   INTEL_COMPILER=yes
15953 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15954
15955 else
15956   echo "$as_me: failed program was:" >&5
15957 cat conftest.$ac_ext >&5
15958 fi
15959 rm -f conftest.$ac_objext conftest.$ac_ext
15960                 CFLAGS="$cf_save_CFLAGS"
15961                 echo "$as_me:15961: result: $INTEL_COMPILER" >&5
15962 echo "${ECHO_T}$INTEL_COMPILER" >&6
15963                 ;;
15964         esac
15965 fi
15966
15967 CLANG_COMPILER=no
15968
15969 if test "$GCC" = yes ; then
15970         echo "$as_me:15970: checking if this is really Clang C compiler" >&5
15971 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
15972         cf_save_CFLAGS="$CFLAGS"
15973         CFLAGS="$CFLAGS -Qunused-arguments"
15974         cat >conftest.$ac_ext <<_ACEOF
15975 #line 15975 "configure"
15976 #include "confdefs.h"
15977
15978 int
15979 main ()
15980 {
15981
15982 #ifdef __clang__
15983 #else
15984 make an error
15985 #endif
15986
15987   ;
15988   return 0;
15989 }
15990 _ACEOF
15991 rm -f conftest.$ac_objext
15992 if { (eval echo "$as_me:15992: \"$ac_compile\"") >&5
15993   (eval $ac_compile) 2>&5
15994   ac_status=$?
15995   echo "$as_me:15995: \$? = $ac_status" >&5
15996   (exit $ac_status); } &&
15997          { ac_try='test -s conftest.$ac_objext'
15998   { (eval echo "$as_me:15998: \"$ac_try\"") >&5
15999   (eval $ac_try) 2>&5
16000   ac_status=$?
16001   echo "$as_me:16001: \$? = $ac_status" >&5
16002   (exit $ac_status); }; }; then
16003   CLANG_COMPILER=yes
16004 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16005
16006 else
16007   echo "$as_me: failed program was:" >&5
16008 cat conftest.$ac_ext >&5
16009 fi
16010 rm -f conftest.$ac_objext conftest.$ac_ext
16011         CFLAGS="$cf_save_CFLAGS"
16012         echo "$as_me:16012: result: $CLANG_COMPILER" >&5
16013 echo "${ECHO_T}$CLANG_COMPILER" >&6
16014 fi
16015
16016 cat > conftest.$ac_ext <<EOF
16017 #line 16017 "${as_me:-configure}"
16018 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16019 EOF
16020
16021 if test "$INTEL_COMPILER" = yes
16022 then
16023 # The "-wdXXX" options suppress warnings:
16024 # remark #1419: external declaration in primary source file
16025 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16026 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16027 # remark #193: zero used for undefined preprocessing identifier
16028 # remark #593: variable "curs_sb_left_arrow" was set but never used
16029 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16030 # remark #869: parameter "tw" was never referenced
16031 # remark #981: operands are evaluated in unspecified order
16032 # warning #279: controlling expression is constant
16033
16034         { echo "$as_me:16034: checking for $CC warning options..." >&5
16035 echo "$as_me: checking for $CC warning options..." >&6;}
16036         cf_save_CFLAGS="$CFLAGS"
16037         EXTRA_CFLAGS="-Wall"
16038         for cf_opt in \
16039                 wd1419 \
16040                 wd1683 \
16041                 wd1684 \
16042                 wd193 \
16043                 wd593 \
16044                 wd279 \
16045                 wd810 \
16046                 wd869 \
16047                 wd981
16048         do
16049                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16050                 if { (eval echo "$as_me:16050: \"$ac_compile\"") >&5
16051   (eval $ac_compile) 2>&5
16052   ac_status=$?
16053   echo "$as_me:16053: \$? = $ac_status" >&5
16054   (exit $ac_status); }; then
16055                         test -n "$verbose" && echo "$as_me:16055: result: ... -$cf_opt" >&5
16056 echo "${ECHO_T}... -$cf_opt" >&6
16057                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16058                 fi
16059         done
16060         CFLAGS="$cf_save_CFLAGS"
16061
16062 elif test "$GCC" = yes
16063 then
16064         { echo "$as_me:16064: checking for $CC warning options..." >&5
16065 echo "$as_me: checking for $CC warning options..." >&6;}
16066         cf_save_CFLAGS="$CFLAGS"
16067         EXTRA_CFLAGS=
16068         cf_warn_CONST=""
16069         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16070         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16071         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16072         for cf_opt in W Wall \
16073                 Wbad-function-cast \
16074                 Wcast-align \
16075                 Wcast-qual \
16076                 Wdeclaration-after-statement \
16077                 Wextra \
16078                 Winline \
16079                 Wmissing-declarations \
16080                 Wmissing-prototypes \
16081                 Wnested-externs \
16082                 Wpointer-arith \
16083                 Wshadow \
16084                 Wstrict-prototypes \
16085                 Wundef $cf_gcc_warnings $cf_warn_CONST
16086         do
16087                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16088                 if { (eval echo "$as_me:16088: \"$ac_compile\"") >&5
16089   (eval $ac_compile) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit $ac_status); }; then
16093                         test -n "$verbose" && echo "$as_me:16093: result: ... -$cf_opt" >&5
16094 echo "${ECHO_T}... -$cf_opt" >&6
16095                         case $cf_opt in #(vi
16096                         Wcast-qual) #(vi
16097                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
16098                                 ;;
16099                         Winline) #(vi
16100                                 case $GCC_VERSION in
16101                                 [34].*)
16102                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16103
16104 echo "${as_me:-configure}:16104: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16105
16106                                         continue;;
16107                                 esac
16108                                 ;;
16109                         Wpointer-arith) #(vi
16110                                 case $GCC_VERSION in
16111                                 [12].*)
16112                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16113
16114 echo "${as_me:-configure}:16114: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16115
16116                                         continue;;
16117                                 esac
16118                                 ;;
16119                         esac
16120                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16121                 fi
16122         done
16123         CFLAGS="$cf_save_CFLAGS"
16124 fi
16125 rm -rf conftest*
16126
16127 fi
16128 fi
16129
16130 echo "$as_me:16130: checking if you want to use dmalloc for testing" >&5
16131 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16132
16133 # Check whether --with-dmalloc or --without-dmalloc was given.
16134 if test "${with_dmalloc+set}" = set; then
16135   withval="$with_dmalloc"
16136
16137 cat >>confdefs.h <<EOF
16138 #define USE_DMALLOC 1
16139 EOF
16140
16141         : ${with_cflags:=-g}
16142         : ${with_no_leaks:=yes}
16143          with_dmalloc=yes
16144 else
16145   with_dmalloc=
16146 fi;
16147 echo "$as_me:16147: result: ${with_dmalloc:-no}" >&5
16148 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16149
16150 case .$with_cflags in #(vi
16151 .*-g*)
16152         case .$CFLAGS in #(vi
16153         .*-g*) #(vi
16154                 ;;
16155         *)
16156
16157 cf_fix_cppflags=no
16158 cf_new_cflags=
16159 cf_new_cppflags=
16160 cf_new_extra_cppflags=
16161
16162 for cf_add_cflags in -g
16163 do
16164 case $cf_fix_cppflags in
16165 no)
16166         case $cf_add_cflags in #(vi
16167         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16168                 case $cf_add_cflags in
16169                 -D*)
16170                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16171
16172                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16173                                 && test -z "${cf_tst_cflags}" \
16174                                 && cf_fix_cppflags=yes
16175
16176                         if test $cf_fix_cppflags = yes ; then
16177                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16178                                 continue
16179                         elif test "${cf_tst_cflags}" = "\"'" ; then
16180                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16181                                 continue
16182                         fi
16183                         ;;
16184                 esac
16185                 case "$CPPFLAGS" in
16186                 *$cf_add_cflags) #(vi
16187                         ;;
16188                 *) #(vi
16189                         case $cf_add_cflags in #(vi
16190                         -D*)
16191                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16192
16193 CPPFLAGS=`echo "$CPPFLAGS" | \
16194         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16195                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16196
16197                                 ;;
16198                         esac
16199                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16200                         ;;
16201                 esac
16202                 ;;
16203         *)
16204                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16205                 ;;
16206         esac
16207         ;;
16208 yes)
16209         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16210
16211         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16212
16213         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16214                 && test -z "${cf_tst_cflags}" \
16215                 && cf_fix_cppflags=no
16216         ;;
16217 esac
16218 done
16219
16220 if test -n "$cf_new_cflags" ; then
16221
16222         CFLAGS="$CFLAGS $cf_new_cflags"
16223 fi
16224
16225 if test -n "$cf_new_cppflags" ; then
16226
16227         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16228 fi
16229
16230 if test -n "$cf_new_extra_cppflags" ; then
16231
16232         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16233 fi
16234
16235                 ;;
16236         esac
16237         ;;
16238 esac
16239
16240 if test "$with_dmalloc" = yes ; then
16241         echo "$as_me:16241: checking for dmalloc.h" >&5
16242 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16243 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16244   echo $ECHO_N "(cached) $ECHO_C" >&6
16245 else
16246   cat >conftest.$ac_ext <<_ACEOF
16247 #line 16247 "configure"
16248 #include "confdefs.h"
16249 #include <dmalloc.h>
16250 _ACEOF
16251 if { (eval echo "$as_me:16251: \"$ac_cpp conftest.$ac_ext\"") >&5
16252   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16253   ac_status=$?
16254   egrep -v '^ *\+' conftest.er1 >conftest.err
16255   rm -f conftest.er1
16256   cat conftest.err >&5
16257   echo "$as_me:16257: \$? = $ac_status" >&5
16258   (exit $ac_status); } >/dev/null; then
16259   if test -s conftest.err; then
16260     ac_cpp_err=$ac_c_preproc_warn_flag
16261   else
16262     ac_cpp_err=
16263   fi
16264 else
16265   ac_cpp_err=yes
16266 fi
16267 if test -z "$ac_cpp_err"; then
16268   ac_cv_header_dmalloc_h=yes
16269 else
16270   echo "$as_me: failed program was:" >&5
16271   cat conftest.$ac_ext >&5
16272   ac_cv_header_dmalloc_h=no
16273 fi
16274 rm -f conftest.err conftest.$ac_ext
16275 fi
16276 echo "$as_me:16276: result: $ac_cv_header_dmalloc_h" >&5
16277 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16278 if test $ac_cv_header_dmalloc_h = yes; then
16279
16280 echo "$as_me:16280: checking for dmalloc_debug in -ldmalloc" >&5
16281 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16282 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16283   echo $ECHO_N "(cached) $ECHO_C" >&6
16284 else
16285   ac_check_lib_save_LIBS=$LIBS
16286 LIBS="-ldmalloc  $LIBS"
16287 cat >conftest.$ac_ext <<_ACEOF
16288 #line 16288 "configure"
16289 #include "confdefs.h"
16290
16291 /* Override any gcc2 internal prototype to avoid an error.  */
16292 #ifdef __cplusplus
16293 extern "C"
16294 #endif
16295 /* We use char because int might match the return type of a gcc2
16296    builtin and then its argument prototype would still apply.  */
16297 char dmalloc_debug ();
16298 int
16299 main ()
16300 {
16301 dmalloc_debug ();
16302   ;
16303   return 0;
16304 }
16305 _ACEOF
16306 rm -f conftest.$ac_objext conftest$ac_exeext
16307 if { (eval echo "$as_me:16307: \"$ac_link\"") >&5
16308   (eval $ac_link) 2>&5
16309   ac_status=$?
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); } &&
16312          { ac_try='test -s conftest$ac_exeext'
16313   { (eval echo "$as_me:16313: \"$ac_try\"") >&5
16314   (eval $ac_try) 2>&5
16315   ac_status=$?
16316   echo "$as_me:16316: \$? = $ac_status" >&5
16317   (exit $ac_status); }; }; then
16318   ac_cv_lib_dmalloc_dmalloc_debug=yes
16319 else
16320   echo "$as_me: failed program was:" >&5
16321 cat conftest.$ac_ext >&5
16322 ac_cv_lib_dmalloc_dmalloc_debug=no
16323 fi
16324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16325 LIBS=$ac_check_lib_save_LIBS
16326 fi
16327 echo "$as_me:16327: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16328 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16329 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16330   cat >>confdefs.h <<EOF
16331 #define HAVE_LIBDMALLOC 1
16332 EOF
16333
16334   LIBS="-ldmalloc $LIBS"
16335
16336 fi
16337
16338 fi
16339
16340 fi
16341
16342 echo "$as_me:16342: checking if you want to use dbmalloc for testing" >&5
16343 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16344
16345 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16346 if test "${with_dbmalloc+set}" = set; then
16347   withval="$with_dbmalloc"
16348
16349 cat >>confdefs.h <<EOF
16350 #define USE_DBMALLOC 1
16351 EOF
16352
16353         : ${with_cflags:=-g}
16354         : ${with_no_leaks:=yes}
16355          with_dbmalloc=yes
16356 else
16357   with_dbmalloc=
16358 fi;
16359 echo "$as_me:16359: result: ${with_dbmalloc:-no}" >&5
16360 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16361
16362 case .$with_cflags in #(vi
16363 .*-g*)
16364         case .$CFLAGS in #(vi
16365         .*-g*) #(vi
16366                 ;;
16367         *)
16368
16369 cf_fix_cppflags=no
16370 cf_new_cflags=
16371 cf_new_cppflags=
16372 cf_new_extra_cppflags=
16373
16374 for cf_add_cflags in -g
16375 do
16376 case $cf_fix_cppflags in
16377 no)
16378         case $cf_add_cflags in #(vi
16379         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16380                 case $cf_add_cflags in
16381                 -D*)
16382                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16383
16384                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16385                                 && test -z "${cf_tst_cflags}" \
16386                                 && cf_fix_cppflags=yes
16387
16388                         if test $cf_fix_cppflags = yes ; then
16389                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16390                                 continue
16391                         elif test "${cf_tst_cflags}" = "\"'" ; then
16392                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16393                                 continue
16394                         fi
16395                         ;;
16396                 esac
16397                 case "$CPPFLAGS" in
16398                 *$cf_add_cflags) #(vi
16399                         ;;
16400                 *) #(vi
16401                         case $cf_add_cflags in #(vi
16402                         -D*)
16403                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16404
16405 CPPFLAGS=`echo "$CPPFLAGS" | \
16406         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16407                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16408
16409                                 ;;
16410                         esac
16411                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16412                         ;;
16413                 esac
16414                 ;;
16415         *)
16416                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16417                 ;;
16418         esac
16419         ;;
16420 yes)
16421         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16422
16423         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16424
16425         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16426                 && test -z "${cf_tst_cflags}" \
16427                 && cf_fix_cppflags=no
16428         ;;
16429 esac
16430 done
16431
16432 if test -n "$cf_new_cflags" ; then
16433
16434         CFLAGS="$CFLAGS $cf_new_cflags"
16435 fi
16436
16437 if test -n "$cf_new_cppflags" ; then
16438
16439         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16440 fi
16441
16442 if test -n "$cf_new_extra_cppflags" ; then
16443
16444         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16445 fi
16446
16447                 ;;
16448         esac
16449         ;;
16450 esac
16451
16452 if test "$with_dbmalloc" = yes ; then
16453         echo "$as_me:16453: checking for dbmalloc.h" >&5
16454 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16455 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16456   echo $ECHO_N "(cached) $ECHO_C" >&6
16457 else
16458   cat >conftest.$ac_ext <<_ACEOF
16459 #line 16459 "configure"
16460 #include "confdefs.h"
16461 #include <dbmalloc.h>
16462 _ACEOF
16463 if { (eval echo "$as_me:16463: \"$ac_cpp conftest.$ac_ext\"") >&5
16464   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16465   ac_status=$?
16466   egrep -v '^ *\+' conftest.er1 >conftest.err
16467   rm -f conftest.er1
16468   cat conftest.err >&5
16469   echo "$as_me:16469: \$? = $ac_status" >&5
16470   (exit $ac_status); } >/dev/null; then
16471   if test -s conftest.err; then
16472     ac_cpp_err=$ac_c_preproc_warn_flag
16473   else
16474     ac_cpp_err=
16475   fi
16476 else
16477   ac_cpp_err=yes
16478 fi
16479 if test -z "$ac_cpp_err"; then
16480   ac_cv_header_dbmalloc_h=yes
16481 else
16482   echo "$as_me: failed program was:" >&5
16483   cat conftest.$ac_ext >&5
16484   ac_cv_header_dbmalloc_h=no
16485 fi
16486 rm -f conftest.err conftest.$ac_ext
16487 fi
16488 echo "$as_me:16488: result: $ac_cv_header_dbmalloc_h" >&5
16489 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16490 if test $ac_cv_header_dbmalloc_h = yes; then
16491
16492 echo "$as_me:16492: checking for debug_malloc in -ldbmalloc" >&5
16493 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16494 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16495   echo $ECHO_N "(cached) $ECHO_C" >&6
16496 else
16497   ac_check_lib_save_LIBS=$LIBS
16498 LIBS="-ldbmalloc  $LIBS"
16499 cat >conftest.$ac_ext <<_ACEOF
16500 #line 16500 "configure"
16501 #include "confdefs.h"
16502
16503 /* Override any gcc2 internal prototype to avoid an error.  */
16504 #ifdef __cplusplus
16505 extern "C"
16506 #endif
16507 /* We use char because int might match the return type of a gcc2
16508    builtin and then its argument prototype would still apply.  */
16509 char debug_malloc ();
16510 int
16511 main ()
16512 {
16513 debug_malloc ();
16514   ;
16515   return 0;
16516 }
16517 _ACEOF
16518 rm -f conftest.$ac_objext conftest$ac_exeext
16519 if { (eval echo "$as_me:16519: \"$ac_link\"") >&5
16520   (eval $ac_link) 2>&5
16521   ac_status=$?
16522   echo "$as_me:16522: \$? = $ac_status" >&5
16523   (exit $ac_status); } &&
16524          { ac_try='test -s conftest$ac_exeext'
16525   { (eval echo "$as_me:16525: \"$ac_try\"") >&5
16526   (eval $ac_try) 2>&5
16527   ac_status=$?
16528   echo "$as_me:16528: \$? = $ac_status" >&5
16529   (exit $ac_status); }; }; then
16530   ac_cv_lib_dbmalloc_debug_malloc=yes
16531 else
16532   echo "$as_me: failed program was:" >&5
16533 cat conftest.$ac_ext >&5
16534 ac_cv_lib_dbmalloc_debug_malloc=no
16535 fi
16536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16537 LIBS=$ac_check_lib_save_LIBS
16538 fi
16539 echo "$as_me:16539: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16540 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16541 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16542   cat >>confdefs.h <<EOF
16543 #define HAVE_LIBDBMALLOC 1
16544 EOF
16545
16546   LIBS="-ldbmalloc $LIBS"
16547
16548 fi
16549
16550 fi
16551
16552 fi
16553
16554 echo "$as_me:16554: checking if you want to use valgrind for testing" >&5
16555 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16556
16557 # Check whether --with-valgrind or --without-valgrind was given.
16558 if test "${with_valgrind+set}" = set; then
16559   withval="$with_valgrind"
16560
16561 cat >>confdefs.h <<EOF
16562 #define USE_VALGRIND 1
16563 EOF
16564
16565         : ${with_cflags:=-g}
16566         : ${with_no_leaks:=yes}
16567          with_valgrind=yes
16568 else
16569   with_valgrind=
16570 fi;
16571 echo "$as_me:16571: result: ${with_valgrind:-no}" >&5
16572 echo "${ECHO_T}${with_valgrind:-no}" >&6
16573
16574 case .$with_cflags in #(vi
16575 .*-g*)
16576         case .$CFLAGS in #(vi
16577         .*-g*) #(vi
16578                 ;;
16579         *)
16580
16581 cf_fix_cppflags=no
16582 cf_new_cflags=
16583 cf_new_cppflags=
16584 cf_new_extra_cppflags=
16585
16586 for cf_add_cflags in -g
16587 do
16588 case $cf_fix_cppflags in
16589 no)
16590         case $cf_add_cflags in #(vi
16591         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
16592                 case $cf_add_cflags in
16593                 -D*)
16594                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16595
16596                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16597                                 && test -z "${cf_tst_cflags}" \
16598                                 && cf_fix_cppflags=yes
16599
16600                         if test $cf_fix_cppflags = yes ; then
16601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16602                                 continue
16603                         elif test "${cf_tst_cflags}" = "\"'" ; then
16604                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16605                                 continue
16606                         fi
16607                         ;;
16608                 esac
16609                 case "$CPPFLAGS" in
16610                 *$cf_add_cflags) #(vi
16611                         ;;
16612                 *) #(vi
16613                         case $cf_add_cflags in #(vi
16614                         -D*)
16615                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16616
16617 CPPFLAGS=`echo "$CPPFLAGS" | \
16618         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16619                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16620
16621                                 ;;
16622                         esac
16623                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16624                         ;;
16625                 esac
16626                 ;;
16627         *)
16628                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16629                 ;;
16630         esac
16631         ;;
16632 yes)
16633         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16634
16635         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16636
16637         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
16638                 && test -z "${cf_tst_cflags}" \
16639                 && cf_fix_cppflags=no
16640         ;;
16641 esac
16642 done
16643
16644 if test -n "$cf_new_cflags" ; then
16645
16646         CFLAGS="$CFLAGS $cf_new_cflags"
16647 fi
16648
16649 if test -n "$cf_new_cppflags" ; then
16650
16651         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16652 fi
16653
16654 if test -n "$cf_new_extra_cppflags" ; then
16655
16656         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16657 fi
16658
16659                 ;;
16660         esac
16661         ;;
16662 esac
16663
16664 echo "$as_me:16664: checking if you want to perform memory-leak testing" >&5
16665 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16666
16667 # Check whether --enable-leaks or --disable-leaks was given.
16668 if test "${enable_leaks+set}" = set; then
16669   enableval="$enable_leaks"
16670   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16671 else
16672   : ${with_no_leaks:=no}
16673 fi;
16674 echo "$as_me:16674: result: $with_no_leaks" >&5
16675 echo "${ECHO_T}$with_no_leaks" >&6
16676
16677 if test "$with_no_leaks" = yes ; then
16678
16679 cat >>confdefs.h <<\EOF
16680 #define NO_LEAKS 1
16681 EOF
16682
16683 cat >>confdefs.h <<\EOF
16684 #define YY_NO_LEAKS 1
16685 EOF
16686
16687 fi
16688
16689 LD_RPATH_OPT=
16690 echo "$as_me:16690: checking for an rpath option" >&5
16691 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
16692 case $cf_cv_system_name in #(vi
16693 irix*) #(vi
16694         if test "$GCC" = yes; then
16695                 LD_RPATH_OPT="-Wl,-rpath,"
16696         else
16697                 LD_RPATH_OPT="-rpath "
16698         fi
16699         ;;
16700 linux*|gnu*|k*bsd*-gnu) #(vi
16701         LD_RPATH_OPT="-Wl,-rpath,"
16702         ;;
16703 openbsd[2-9].*|mirbsd*) #(vi
16704         LD_RPATH_OPT="-Wl,-rpath,"
16705         ;;
16706 dragonfly*|freebsd*) #(vi
16707         LD_RPATH_OPT="-rpath "
16708         ;;
16709 netbsd*) #(vi
16710         LD_RPATH_OPT="-Wl,-rpath,"
16711         ;;
16712 osf*|mls+*) #(vi
16713         LD_RPATH_OPT="-rpath "
16714         ;;
16715 solaris2*) #(vi
16716         LD_RPATH_OPT="-R"
16717         ;;
16718 *)
16719         ;;
16720 esac
16721 echo "$as_me:16721: result: $LD_RPATH_OPT" >&5
16722 echo "${ECHO_T}$LD_RPATH_OPT" >&6
16723
16724 case "x$LD_RPATH_OPT" in #(vi
16725 x-R*)
16726         echo "$as_me:16726: checking if we need a space after rpath option" >&5
16727 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
16728         cf_save_LIBS="$LIBS"
16729
16730 cf_add_libs="${LD_RPATH_OPT}$libdir"
16731 # Filter out duplicates - this happens with badly-designed ".pc" files...
16732 for cf_add_1lib in $LIBS
16733 do
16734         for cf_add_2lib in $cf_add_libs
16735         do
16736                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16737                 then
16738                         cf_add_1lib=
16739                         break
16740                 fi
16741         done
16742         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16743 done
16744 LIBS="$cf_add_libs"
16745
16746         cat >conftest.$ac_ext <<_ACEOF
16747 #line 16747 "configure"
16748 #include "confdefs.h"
16749
16750 int
16751 main ()
16752 {
16753
16754   ;
16755   return 0;
16756 }
16757 _ACEOF
16758 rm -f conftest.$ac_objext conftest$ac_exeext
16759 if { (eval echo "$as_me:16759: \"$ac_link\"") >&5
16760   (eval $ac_link) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); } &&
16764          { ac_try='test -s conftest$ac_exeext'
16765   { (eval echo "$as_me:16765: \"$ac_try\"") >&5
16766   (eval $ac_try) 2>&5
16767   ac_status=$?
16768   echo "$as_me:16768: \$? = $ac_status" >&5
16769   (exit $ac_status); }; }; then
16770   cf_rpath_space=no
16771 else
16772   echo "$as_me: failed program was:" >&5
16773 cat conftest.$ac_ext >&5
16774 cf_rpath_space=yes
16775 fi
16776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16777         LIBS="$cf_save_LIBS"
16778         echo "$as_me:16778: result: $cf_rpath_space" >&5
16779 echo "${ECHO_T}$cf_rpath_space" >&6
16780         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
16781         ;;
16782 esac
16783
16784 echo "$as_me:16784: checking if rpath-hack should be disabled" >&5
16785 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
16786
16787 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
16788 if test "${enable_rpath_hack+set}" = set; then
16789   enableval="$enable_rpath_hack"
16790   test "$enableval" != no && enableval=yes
16791   if test "$enableval" != "yes" ; then
16792     cf_disable_rpath_hack=yes
16793   else
16794     cf_disable_rpath_hack=no
16795   fi
16796 else
16797   enableval=yes
16798   cf_disable_rpath_hack=no
16799
16800 fi;
16801 echo "$as_me:16801: result: $cf_disable_rpath_hack" >&5
16802 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
16803 if test "$cf_disable_rpath_hack" = no ; then
16804
16805 echo "$as_me:16805: checking for updated LDFLAGS" >&5
16806 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16807 if test -n "$LD_RPATH_OPT" ; then
16808         echo "$as_me:16808: result: maybe" >&5
16809 echo "${ECHO_T}maybe" >&6
16810
16811         for ac_prog in ldd
16812 do
16813   # Extract the first word of "$ac_prog", so it can be a program name with args.
16814 set dummy $ac_prog; ac_word=$2
16815 echo "$as_me:16815: checking for $ac_word" >&5
16816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16817 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
16818   echo $ECHO_N "(cached) $ECHO_C" >&6
16819 else
16820   if test -n "$cf_ldd_prog"; then
16821   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
16822 else
16823   ac_save_IFS=$IFS; IFS=$ac_path_separator
16824 ac_dummy="$PATH"
16825 for ac_dir in $ac_dummy; do
16826   IFS=$ac_save_IFS
16827   test -z "$ac_dir" && ac_dir=.
16828   $as_executable_p "$ac_dir/$ac_word" || continue
16829 ac_cv_prog_cf_ldd_prog="$ac_prog"
16830 echo "$as_me:16830: found $ac_dir/$ac_word" >&5
16831 break
16832 done
16833
16834 fi
16835 fi
16836 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
16837 if test -n "$cf_ldd_prog"; then
16838   echo "$as_me:16838: result: $cf_ldd_prog" >&5
16839 echo "${ECHO_T}$cf_ldd_prog" >&6
16840 else
16841   echo "$as_me:16841: result: no" >&5
16842 echo "${ECHO_T}no" >&6
16843 fi
16844
16845   test -n "$cf_ldd_prog" && break
16846 done
16847 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
16848
16849         cf_rpath_list="/usr/lib /lib"
16850         if test "$cf_ldd_prog" != no
16851         then
16852                 cf_rpath_oops=
16853
16854 cat >conftest.$ac_ext <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16857 #include <stdio.h>
16858 int
16859 main ()
16860 {
16861 printf("Hello");
16862   ;
16863   return 0;
16864 }
16865 _ACEOF
16866 rm -f conftest.$ac_objext conftest$ac_exeext
16867 if { (eval echo "$as_me:16867: \"$ac_link\"") >&5
16868   (eval $ac_link) 2>&5
16869   ac_status=$?
16870   echo "$as_me:16870: \$? = $ac_status" >&5
16871   (exit $ac_status); } &&
16872          { ac_try='test -s conftest$ac_exeext'
16873   { (eval echo "$as_me:16873: \"$ac_try\"") >&5
16874   (eval $ac_try) 2>&5
16875   ac_status=$?
16876   echo "$as_me:16876: \$? = $ac_status" >&5
16877   (exit $ac_status); }; }; then
16878   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
16879                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
16880 else
16881   echo "$as_me: failed program was:" >&5
16882 cat conftest.$ac_ext >&5
16883 fi
16884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16885
16886                 # If we passed the link-test, but get a "not found" on a given library,
16887                 # this could be due to inept reconfiguration of gcc to make it only
16888                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
16889                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
16890                 # /usr/local libraries.
16891                 if test -n "$cf_rpath_oops"
16892                 then
16893                         for cf_rpath_src in $cf_rpath_oops
16894                         do
16895                                 for cf_rpath_dir in \
16896                                         /usr/local \
16897                                         /usr/pkg \
16898                                         /opt/sfw
16899                                 do
16900                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
16901                                         then
16902                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16903
16904 echo "${as_me:-configure}:16904: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16905
16906                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16907                                                 break
16908                                         fi
16909                                 done
16910                         done
16911                 fi
16912         fi
16913
16914         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16915
16916 echo "${as_me:-configure}:16916: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16917
16918 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
16919
16920 echo "${as_me:-configure}:16920: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16921
16922 cf_rpath_dst=
16923 for cf_rpath_src in $LDFLAGS
16924 do
16925         case $cf_rpath_src in #(vi
16926         -L*) #(vi
16927
16928                 # check if this refers to a directory which we will ignore
16929                 cf_rpath_skip=no
16930                 if test -n "$cf_rpath_list"
16931                 then
16932                         for cf_rpath_item in $cf_rpath_list
16933                         do
16934                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16935                                 then
16936                                         cf_rpath_skip=yes
16937                                         break
16938                                 fi
16939                         done
16940                 fi
16941
16942                 if test "$cf_rpath_skip" = no
16943                 then
16944                         # transform the option
16945                         if test "$LD_RPATH_OPT" = "-R " ; then
16946                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16947                         else
16948                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16949                         fi
16950
16951                         # if we have not already added this, add it now
16952                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16953                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16954                         then
16955                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16956
16957 echo "${as_me:-configure}:16957: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16958
16959                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16960                         fi
16961                 fi
16962                 ;;
16963         esac
16964         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16965 done
16966 LDFLAGS=$cf_rpath_dst
16967
16968 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
16969
16970 echo "${as_me:-configure}:16970: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16971
16972 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
16973
16974 echo "${as_me:-configure}:16974: testing ...checking LIBS $LIBS ..." 1>&5
16975
16976 cf_rpath_dst=
16977 for cf_rpath_src in $LIBS
16978 do
16979         case $cf_rpath_src in #(vi
16980         -L*) #(vi
16981
16982                 # check if this refers to a directory which we will ignore
16983                 cf_rpath_skip=no
16984                 if test -n "$cf_rpath_list"
16985                 then
16986                         for cf_rpath_item in $cf_rpath_list
16987                         do
16988                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16989                                 then
16990                                         cf_rpath_skip=yes
16991                                         break
16992                                 fi
16993                         done
16994                 fi
16995
16996                 if test "$cf_rpath_skip" = no
16997                 then
16998                         # transform the option
16999                         if test "$LD_RPATH_OPT" = "-R " ; then
17000                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
17001                         else
17002                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
17003                         fi
17004
17005                         # if we have not already added this, add it now
17006                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
17007                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
17008                         then
17009                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
17010
17011 echo "${as_me:-configure}:17011: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
17012
17013                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17014                         fi
17015                 fi
17016                 ;;
17017         esac
17018         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17019 done
17020 LIBS=$cf_rpath_dst
17021
17022 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
17023
17024 echo "${as_me:-configure}:17024: testing ...checked LIBS $LIBS ..." 1>&5
17025
17026         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17027
17028 echo "${as_me:-configure}:17028: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17029
17030 else
17031         echo "$as_me:17031: result: no" >&5
17032 echo "${ECHO_T}no" >&6
17033 fi
17034
17035 fi
17036
17037 TEST_ARGS="$LIBS"
17038 LIBS=
17039
17040 ac_config_files="$ac_config_files Makefile"
17041 ac_config_commands="$ac_config_commands default"
17042 cat >confcache <<\_ACEOF
17043 # This file is a shell script that caches the results of configure
17044 # tests run on this system so they can be shared between configure
17045 # scripts and configure runs, see configure's option --config-cache.
17046 # It is not useful on other systems.  If it contains results you don't
17047 # want to keep, you may remove or edit it.
17048 #
17049 # config.status only pays attention to the cache file if you give it
17050 # the --recheck option to rerun configure.
17051 #
17052 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17053 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17054 # following values.
17055
17056 _ACEOF
17057
17058 # The following way of writing the cache mishandles newlines in values,
17059 # but we know of no workaround that is simple, portable, and efficient.
17060 # So, don't put newlines in cache variables' values.
17061 # Ultrix sh set writes to stderr and can't be redirected directly,
17062 # and sets the high bit in the cache file unless we assign to the vars.
17063 {
17064   (set) 2>&1 |
17065     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17066     *ac_space=\ *)
17067       # `set' does not quote correctly, so add quotes (double-quote
17068       # substitution turns \\\\ into \\, and sed turns \\ into \).
17069       sed -n \
17070         "s/'/'\\\\''/g;
17071           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17072       ;;
17073     *)
17074       # `set' quotes correctly as required by POSIX, so do not add quotes.
17075       sed -n \
17076         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17077       ;;
17078     esac;
17079 } |
17080   sed '
17081      t clear
17082      : clear
17083      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17084      t end
17085      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17086      : end' >>confcache
17087 if cmp -s $cache_file confcache; then :; else
17088   if test -w $cache_file; then
17089     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17090     cat confcache >$cache_file
17091   else
17092     echo "not updating unwritable cache $cache_file"
17093   fi
17094 fi
17095 rm -f confcache
17096
17097 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17098 # Let make expand exec_prefix.
17099 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17100
17101 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17102 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17103 # trailing colons and then remove the whole line if VPATH becomes empty
17104 # (actually we leave an empty line to preserve line numbers).
17105 if test "x$srcdir" = x.; then
17106   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17107 s/:*\$(srcdir):*/:/;
17108 s/:*\${srcdir}:*/:/;
17109 s/:*@srcdir@:*/:/;
17110 s/^\([^=]*=[    ]*\):*/\1/;
17111 s/:*$//;
17112 s/^[^=]*=[      ]*$//;
17113 }'
17114 fi
17115
17116 DEFS=-DHAVE_CONFIG_H
17117
17118 : ${CONFIG_STATUS=./config.status}
17119 ac_clean_files_save=$ac_clean_files
17120 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17121 { echo "$as_me:17121: creating $CONFIG_STATUS" >&5
17122 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17123 cat >$CONFIG_STATUS <<_ACEOF
17124 #! $SHELL
17125 # Generated automatically by configure.
17126 # Run this file to recreate the current configuration.
17127 # Compiler output produced by configure, useful for debugging
17128 # configure, is in config.log if it exists.
17129
17130 debug=false
17131 SHELL=\${CONFIG_SHELL-$SHELL}
17132 ac_cs_invocation="\$0 \$@"
17133
17134 _ACEOF
17135
17136 cat >>$CONFIG_STATUS <<\_ACEOF
17137 # Be Bourne compatible
17138 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17139   emulate sh
17140   NULLCMD=:
17141 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17142   set -o posix
17143 fi
17144
17145 # Name of the executable.
17146 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17147
17148 if expr a : '\(a\)' >/dev/null 2>&1; then
17149   as_expr=expr
17150 else
17151   as_expr=false
17152 fi
17153
17154 rm -f conf$$ conf$$.exe conf$$.file
17155 echo >conf$$.file
17156 if ln -s conf$$.file conf$$ 2>/dev/null; then
17157   # We could just check for DJGPP; but this test a) works b) is more generic
17158   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17159   if test -f conf$$.exe; then
17160     # Don't use ln at all; we don't have any links
17161     as_ln_s='cp -p'
17162   else
17163     as_ln_s='ln -s'
17164   fi
17165 elif ln conf$$.file conf$$ 2>/dev/null; then
17166   as_ln_s=ln
17167 else
17168   as_ln_s='cp -p'
17169 fi
17170 rm -f conf$$ conf$$.exe conf$$.file
17171
17172 as_executable_p="test -f"
17173
17174 # Support unset when possible.
17175 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17176   as_unset=unset
17177 else
17178   as_unset=false
17179 fi
17180
17181 # NLS nuisances.
17182 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17183 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17184 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17185 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17186 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17187 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17188 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17189 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17190
17191 # IFS
17192 # We need space, tab and new line, in precisely that order.
17193 as_nl='
17194 '
17195 IFS="   $as_nl"
17196
17197 # CDPATH.
17198 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17199
17200 exec 6>&1
17201
17202 _ACEOF
17203
17204 # Files that config.status was made for.
17205 if test -n "$ac_config_files"; then
17206   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17207 fi
17208
17209 if test -n "$ac_config_headers"; then
17210   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17211 fi
17212
17213 if test -n "$ac_config_links"; then
17214   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17215 fi
17216
17217 if test -n "$ac_config_commands"; then
17218   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17219 fi
17220
17221 cat >>$CONFIG_STATUS <<\EOF
17222
17223 ac_cs_usage="\
17224 \`$as_me' instantiates files from templates according to the
17225 current configuration.
17226
17227 Usage: $0 [OPTIONS] [FILE]...
17228
17229   -h, --help       print this help, then exit
17230   -V, --version    print version number, then exit
17231   -d, --debug      don't remove temporary files
17232       --recheck    update $as_me by reconfiguring in the same conditions
17233   --file=FILE[:TEMPLATE]
17234                    instantiate the configuration file FILE
17235   --header=FILE[:TEMPLATE]
17236                    instantiate the configuration header FILE
17237
17238 Configuration files:
17239 $config_files
17240
17241 Configuration headers:
17242 $config_headers
17243
17244 Configuration commands:
17245 $config_commands
17246
17247 Report bugs to <dickey@invisible-island.net>."
17248 EOF
17249
17250 cat >>$CONFIG_STATUS <<EOF
17251 ac_cs_version="\\
17252 config.status
17253 configured by $0, generated by GNU Autoconf 2.52.20121002,
17254   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17255
17256 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17257 Free Software Foundation, Inc.
17258 This config.status script is free software; the Free Software Foundation
17259 gives unlimited permission to copy, distribute and modify it."
17260 srcdir=$srcdir
17261 INSTALL="$INSTALL"
17262 EOF
17263
17264 cat >>$CONFIG_STATUS <<\EOF
17265 # If no file are specified by the user, then we need to provide default
17266 # value.  By we need to know if files were specified by the user.
17267 ac_need_defaults=:
17268 while test $# != 0
17269 do
17270   case $1 in
17271   --*=*)
17272     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17273     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17274     shift
17275     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17276     shift
17277     ;;
17278   -*);;
17279   *) # This is not an option, so the user has probably given explicit
17280      # arguments.
17281      ac_need_defaults=false;;
17282   esac
17283
17284   case $1 in
17285   # Handling of the options.
17286 EOF
17287 cat >>$CONFIG_STATUS <<EOF
17288   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17289     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17290     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17291 EOF
17292 cat >>$CONFIG_STATUS <<\EOF
17293   --version | --vers* | -V )
17294     echo "$ac_cs_version"; exit 0 ;;
17295   --he | --h)
17296     # Conflict between --help and --header
17297     { { echo "$as_me:17297: error: ambiguous option: $1
17298 Try \`$0 --help' for more information." >&5
17299 echo "$as_me: error: ambiguous option: $1
17300 Try \`$0 --help' for more information." >&2;}
17301    { (exit 1); exit 1; }; };;
17302   --help | --hel | -h )
17303     echo "$ac_cs_usage"; exit 0 ;;
17304   --debug | --d* | -d )
17305     debug=: ;;
17306   --file | --fil | --fi | --f )
17307     shift
17308     CONFIG_FILES="$CONFIG_FILES $1"
17309     ac_need_defaults=false;;
17310   --header | --heade | --head | --hea )
17311     shift
17312     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17313     ac_need_defaults=false;;
17314
17315   # This is an error.
17316   -*) { { echo "$as_me:17316: error: unrecognized option: $1
17317 Try \`$0 --help' for more information." >&5
17318 echo "$as_me: error: unrecognized option: $1
17319 Try \`$0 --help' for more information." >&2;}
17320    { (exit 1); exit 1; }; } ;;
17321
17322   *) ac_config_targets="$ac_config_targets $1" ;;
17323
17324   esac
17325   shift
17326 done
17327
17328 exec 5>>config.log
17329 cat >&5 << _ACEOF
17330
17331 ## ----------------------- ##
17332 ## Running config.status.  ##
17333 ## ----------------------- ##
17334
17335 This file was extended by $as_me 2.52.20121002, executed with
17336   CONFIG_FILES    = $CONFIG_FILES
17337   CONFIG_HEADERS  = $CONFIG_HEADERS
17338   CONFIG_LINKS    = $CONFIG_LINKS
17339   CONFIG_COMMANDS = $CONFIG_COMMANDS
17340   > $ac_cs_invocation
17341 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17342
17343 _ACEOF
17344 EOF
17345
17346 cat >>$CONFIG_STATUS <<EOF
17347 #
17348 # INIT-COMMANDS section.
17349 #
17350
17351 AWK="$AWK"
17352 ECHO_CC="$ECHO_CC"
17353 ECHO_LD="$ECHO_LD"
17354 SHOW_CC="$SHOW_LD"
17355
17356 EOF
17357
17358 cat >>$CONFIG_STATUS <<\EOF
17359 for ac_config_target in $ac_config_targets
17360 do
17361   case "$ac_config_target" in
17362   # Handling of arguments.
17363   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17364   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17365   "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
17366   *) { { echo "$as_me:17366: error: invalid argument: $ac_config_target" >&5
17367 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17368    { (exit 1); exit 1; }; };;
17369   esac
17370 done
17371
17372 # If the user did not use the arguments to specify the items to instantiate,
17373 # then the envvar interface is used.  Set only those that are not.
17374 # We use the long form for the default assignment because of an extremely
17375 # bizarre bug on SunOS 4.1.3.
17376 if $ac_need_defaults; then
17377   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17378   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17379   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17380 fi
17381
17382 # Create a temporary directory, and hook for its removal unless debugging.
17383 $debug ||
17384 {
17385   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17386   trap '{ (exit 1); exit 1; }' 1 2 13 15
17387 }
17388
17389 # Create a (secure) tmp directory for tmp files.
17390 : ${TMPDIR=/tmp}
17391 {
17392   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17393   test -n "$tmp" && test -d "$tmp"
17394 }  ||
17395 {
17396   tmp=$TMPDIR/cs$$-$RANDOM
17397   (umask 077 && mkdir $tmp)
17398 } ||
17399 {
17400    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17401    { (exit 1); exit 1; }
17402 }
17403
17404 EOF
17405
17406 cat >>$CONFIG_STATUS <<EOF
17407
17408 #
17409 # CONFIG_FILES section.
17410 #
17411
17412 # No need to generate the scripts if there are no CONFIG_FILES.
17413 # This happens for instance when ./config.status config.h
17414 if test -n "\$CONFIG_FILES"; then
17415   # Protect against being on the right side of a sed subst in config.status.
17416   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17417    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17418 s,@SHELL@,$SHELL,;t t
17419 s,@exec_prefix@,$exec_prefix,;t t
17420 s,@prefix@,$prefix,;t t
17421 s,@program_transform_name@,$program_transform_name,;t t
17422 s,@bindir@,$bindir,;t t
17423 s,@sbindir@,$sbindir,;t t
17424 s,@libexecdir@,$libexecdir,;t t
17425 s,@datarootdir@,$datarootdir,;t t
17426 s,@datadir@,$datadir,;t t
17427 s,@sysconfdir@,$sysconfdir,;t t
17428 s,@sharedstatedir@,$sharedstatedir,;t t
17429 s,@localstatedir@,$localstatedir,;t t
17430 s,@libdir@,$libdir,;t t
17431 s,@includedir@,$includedir,;t t
17432 s,@oldincludedir@,$oldincludedir,;t t
17433 s,@infodir@,$infodir,;t t
17434 s,@mandir@,$mandir,;t t
17435 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17436 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17437 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17438 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17439 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17440 s,@build_alias@,$build_alias,;t t
17441 s,@host_alias@,$host_alias,;t t
17442 s,@target_alias@,$target_alias,;t t
17443 s,@ECHO_C@,$ECHO_C,;t t
17444 s,@ECHO_N@,$ECHO_N,;t t
17445 s,@ECHO_T@,$ECHO_T,;t t
17446 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17447 s,@DEFS@,$DEFS,;t t
17448 s,@LIBS@,$LIBS,;t t
17449 s,@build@,$build,;t t
17450 s,@build_cpu@,$build_cpu,;t t
17451 s,@build_vendor@,$build_vendor,;t t
17452 s,@build_os@,$build_os,;t t
17453 s,@host@,$host,;t t
17454 s,@host_cpu@,$host_cpu,;t t
17455 s,@host_vendor@,$host_vendor,;t t
17456 s,@host_os@,$host_os,;t t
17457 s,@SET_MAKE@,$SET_MAKE,;t t
17458 s,@CC@,$CC,;t t
17459 s,@CFLAGS@,$CFLAGS,;t t
17460 s,@LDFLAGS@,$LDFLAGS,;t t
17461 s,@CPPFLAGS@,$CPPFLAGS,;t t
17462 s,@ac_ct_CC@,$ac_ct_CC,;t t
17463 s,@EXEEXT@,$EXEEXT,;t t
17464 s,@OBJEXT@,$OBJEXT,;t t
17465 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17466 s,@CPP@,$CPP,;t t
17467 s,@AWK@,$AWK,;t t
17468 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17469 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17470 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17471 s,@LINT@,$LINT,;t t
17472 s,@LINT_OPTS@,$LINT_OPTS,;t t
17473 s,@CTAGS@,$CTAGS,;t t
17474 s,@ETAGS@,$ETAGS,;t t
17475 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17476 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17477 s,@MATH_LIB@,$MATH_LIB,;t t
17478 s,@top_builddir@,$top_builddir,;t t
17479 s,@CC_G_OPT@,$CC_G_OPT,;t t
17480 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17481 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17482 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17483 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17484 s,@LD@,$LD,;t t
17485 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17486 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17487 s,@LD_MODEL@,$LD_MODEL,;t t
17488 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17489 s,@LIBTOOL@,$LIBTOOL,;t t
17490 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17491 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17492 s,@LIB_LINK@,$LIB_LINK,;t t
17493 s,@LINK_TESTS@,$LINK_TESTS,;t t
17494 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17495 s,@PTHREAD@,$PTHREAD,;t t
17496 s,@TEST_ARGS@,$TEST_ARGS,;t t
17497 s,@TEST_DEPS@,$TEST_DEPS,;t t
17498 s,@TEST_LIBS@,$TEST_LIBS,;t t
17499 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
17500 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
17501 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17502 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17503 s,@includesubdir@,$includesubdir,;t t
17504 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17505 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17506 s,@ECHO_LT@,$ECHO_LT,;t t
17507 s,@ECHO_LD@,$ECHO_LD,;t t
17508 s,@RULE_CC@,$RULE_CC,;t t
17509 s,@SHOW_CC@,$SHOW_CC,;t t
17510 s,@ECHO_CC@,$ECHO_CC,;t t
17511 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17512 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17513 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17514 s,@X_CFLAGS@,$X_CFLAGS,;t t
17515 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
17516 s,@X_LIBS@,$X_LIBS,;t t
17517 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
17518 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
17519 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
17520 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17521 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
17522 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17523 CEOF
17524
17525 EOF
17526
17527   cat >>$CONFIG_STATUS <<\EOF
17528   # Split the substitutions into bite-sized pieces for seds with
17529   # small command number limits, like on Digital OSF/1 and HP-UX.
17530   ac_max_sed_lines=48
17531   ac_sed_frag=1 # Number of current file.
17532   ac_beg=1 # First line for current file.
17533   ac_end=$ac_max_sed_lines # Line after last line for current file.
17534   ac_more_lines=:
17535   ac_sed_cmds=
17536   while $ac_more_lines; do
17537     if test $ac_beg -gt 1; then
17538       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17539     else
17540       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17541     fi
17542     if test ! -s $tmp/subs.frag; then
17543       ac_more_lines=false
17544     else
17545       # The purpose of the label and of the branching condition is to
17546       # speed up the sed processing (if there are no `@' at all, there
17547       # is no need to browse any of the substitutions).
17548       # These are the two extra sed commands mentioned above.
17549       (echo ':t
17550   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17551       if test -z "$ac_sed_cmds"; then
17552         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17553       else
17554         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17555       fi
17556       ac_sed_frag=`expr $ac_sed_frag + 1`
17557       ac_beg=$ac_end
17558       ac_end=`expr $ac_end + $ac_max_sed_lines`
17559     fi
17560   done
17561   if test -z "$ac_sed_cmds"; then
17562     ac_sed_cmds=cat
17563   fi
17564 fi # test -n "$CONFIG_FILES"
17565
17566 EOF
17567 cat >>$CONFIG_STATUS <<\EOF
17568 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17569   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17570   case $ac_file in
17571   - | *:- | *:-:* ) # input from stdin
17572         cat >$tmp/stdin
17573         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17574         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17575   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17576         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17577   * )   ac_file_in=$ac_file.in ;;
17578   esac
17579
17580   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17581   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17582          X"$ac_file" : 'X\(//\)[^/]' \| \
17583          X"$ac_file" : 'X\(//\)$' \| \
17584          X"$ac_file" : 'X\(/\)' \| \
17585          .     : '\(.\)' 2>/dev/null ||
17586 echo X"$ac_file" |
17587     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17588           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17589           /^X\(\/\/\)$/{ s//\1/; q; }
17590           /^X\(\/\).*/{ s//\1/; q; }
17591           s/.*/./; q'`
17592   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17593     { case "$ac_dir" in
17594   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17595   *)                      as_incr_dir=.;;
17596 esac
17597 as_dummy="$ac_dir"
17598 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17599   case $as_mkdir_dir in
17600     # Skip DOS drivespec
17601     ?:) as_incr_dir=$as_mkdir_dir ;;
17602     *)
17603       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17604       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17605     ;;
17606   esac
17607 done; }
17608
17609     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17610     # A "../" for each directory in $ac_dir_suffix.
17611     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17612   else
17613     ac_dir_suffix= ac_dots=
17614   fi
17615
17616   case $srcdir in
17617   .)  ac_srcdir=.
17618       if test -z "$ac_dots"; then
17619          ac_top_srcdir=.
17620       else
17621          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17622       fi ;;
17623   [\\/]* | ?:[\\/]* )
17624       ac_srcdir=$srcdir$ac_dir_suffix;
17625       ac_top_srcdir=$srcdir ;;
17626   *) # Relative path.
17627     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17628     ac_top_srcdir=$ac_dots$srcdir ;;
17629   esac
17630
17631   case $INSTALL in
17632   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17633   *) ac_INSTALL=$ac_dots$INSTALL ;;
17634   esac
17635
17636   if test x"$ac_file" != x-; then
17637     { echo "$as_me:17637: creating $ac_file" >&5
17638 echo "$as_me: creating $ac_file" >&6;}
17639     rm -f "$ac_file"
17640   fi
17641   # Let's still pretend it is `configure' which instantiates (i.e., don't
17642   # use $as_me), people would be surprised to read:
17643   #    /* config.h.  Generated automatically by config.status.  */
17644   configure_input="Generated automatically from `echo $ac_file_in |
17645                                                  sed 's,.*/,,'` by configure."
17646
17647   # First look for the input files in the build tree, otherwise in the
17648   # src tree.
17649   ac_file_inputs=`IFS=:
17650     for f in $ac_file_in; do
17651       case $f in
17652       -) echo $tmp/stdin ;;
17653       [\\/$]*)
17654          # Absolute (can't be DOS-style, as IFS=:)
17655          test -f "$f" || { { echo "$as_me:17655: error: cannot find input file: $f" >&5
17656 echo "$as_me: error: cannot find input file: $f" >&2;}
17657    { (exit 1); exit 1; }; }
17658          echo $f;;
17659       *) # Relative
17660          if test -f "$f"; then
17661            # Build tree
17662            echo $f
17663          elif test -f "$srcdir/$f"; then
17664            # Source tree
17665            echo $srcdir/$f
17666          else
17667            # /dev/null tree
17668            { { echo "$as_me:17668: error: cannot find input file: $f" >&5
17669 echo "$as_me: error: cannot find input file: $f" >&2;}
17670    { (exit 1); exit 1; }; }
17671          fi;;
17672       esac
17673     done` || { (exit 1); exit 1; }
17674 EOF
17675 cat >>$CONFIG_STATUS <<\EOF
17676   ac_warn_datarootdir=no
17677   if test x"$ac_file" != x-; then
17678     for ac_item in $ac_file_inputs
17679     do
17680       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
17681       if test -n "$ac_seen"; then
17682         ac_used=`grep '@datarootdir@' $ac_item`
17683         if test -z "$ac_used"; then
17684           { echo "$as_me:17684: WARNING: datarootdir was used implicitly but not set:
17685 $ac_seen" >&5
17686 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
17687 $ac_seen" >&2;}
17688           ac_warn_datarootdir=yes
17689         fi
17690       fi
17691       ac_seen=`grep '${datarootdir}' $ac_item`
17692       if test -n "$ac_seen"; then
17693         { echo "$as_me:17693: WARNING: datarootdir was used explicitly but not set:
17694 $ac_seen" >&5
17695 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
17696 $ac_seen" >&2;}
17697         ac_warn_datarootdir=yes
17698       fi
17699     done
17700   fi
17701
17702 if test "x$ac_warn_datarootdir" = xyes; then
17703   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
17704 fi
17705
17706 EOF
17707 cat >>$CONFIG_STATUS <<EOF
17708   sed "$ac_vpsub
17709 $extrasub
17710 EOF
17711 cat >>$CONFIG_STATUS <<\EOF
17712 :t
17713 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17714 s,@configure_input@,$configure_input,;t t
17715 s,@srcdir@,$ac_srcdir,;t t
17716 s,@top_srcdir@,$ac_top_srcdir,;t t
17717 s,@INSTALL@,$ac_INSTALL,;t t
17718 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17719   rm -f $tmp/stdin
17720   if test x"$ac_file" != x-; then
17721     cp $tmp/out $ac_file
17722
17723     for ac_name in prefix exec_prefix datarootdir
17724     do
17725         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
17726         if test -n "$ac_seen"; then
17727             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
17728             if test -z "$ac_init"; then
17729               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
17730               { echo "$as_me:17730: WARNING: Variable $ac_name is used but was not set:
17731 $ac_seen" >&5
17732 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
17733 $ac_seen" >&2;}
17734             fi
17735         fi
17736     done
17737     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
17738     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17739     if test -s $tmp/out; then
17740       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17741       { echo "$as_me:17741: WARNING: Some variables may not be substituted:
17742 $ac_seen" >&5
17743 echo "$as_me: WARNING: Some variables may not be substituted:
17744 $ac_seen" >&2;}
17745     fi
17746   else
17747     cat $tmp/out
17748   fi
17749   rm -f $tmp/out
17750
17751 done
17752 EOF
17753 cat >>$CONFIG_STATUS <<\EOF
17754
17755 #
17756 # CONFIG_HEADER section.
17757 #
17758
17759 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17760 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17761 #
17762 # ac_d sets the value in "#define NAME VALUE" lines.
17763 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
17764 ac_dB='[        ].*$,\1#\2'
17765 ac_dC=' '
17766 ac_dD=',;t'
17767 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17768 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17769 ac_iB='\([      ]\),\1#\2define\3'
17770 ac_iC=' '
17771 ac_iD='\4,;t'
17772 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17773 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
17774 ac_uB='$,\1#\2define\3'
17775 ac_uC=' '
17776 ac_uD=',;t'
17777
17778 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17779   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17780   case $ac_file in
17781   - | *:- | *:-:* ) # input from stdin
17782         cat >$tmp/stdin
17783         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17784         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17785   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17786         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17787   * )   ac_file_in=$ac_file.in ;;
17788   esac
17789
17790   test x"$ac_file" != x- && { echo "$as_me:17790: creating $ac_file" >&5
17791 echo "$as_me: creating $ac_file" >&6;}
17792
17793   # First look for the input files in the build tree, otherwise in the
17794   # src tree.
17795   ac_file_inputs=`IFS=:
17796     for f in $ac_file_in; do
17797       case $f in
17798       -) echo $tmp/stdin ;;
17799       [\\/$]*)
17800          # Absolute (can't be DOS-style, as IFS=:)
17801          test -f "$f" || { { echo "$as_me:17801: error: cannot find input file: $f" >&5
17802 echo "$as_me: error: cannot find input file: $f" >&2;}
17803    { (exit 1); exit 1; }; }
17804          echo $f;;
17805       *) # Relative
17806          if test -f "$f"; then
17807            # Build tree
17808            echo $f
17809          elif test -f "$srcdir/$f"; then
17810            # Source tree
17811            echo $srcdir/$f
17812          else
17813            # /dev/null tree
17814            { { echo "$as_me:17814: error: cannot find input file: $f" >&5
17815 echo "$as_me: error: cannot find input file: $f" >&2;}
17816    { (exit 1); exit 1; }; }
17817          fi;;
17818       esac
17819     done` || { (exit 1); exit 1; }
17820   # Remove the trailing spaces.
17821   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
17822
17823 EOF
17824
17825 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
17826 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
17827 # be either 'cat' or 'sort'.
17828 cat confdefs.h | uniq >conftest.vals
17829
17830 # Break up conftest.vals because some shells have a limit on
17831 # the size of here documents, and old seds have small limits too.
17832
17833 rm -f conftest.tail
17834 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
17835 while grep . conftest.vals >/dev/null
17836 do
17837   # Write chunks of a limited-size here document to conftest.frag.
17838   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17839   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17840   echo 'CEOF' >> $CONFIG_STATUS
17841   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17842   rm -f conftest.vals
17843   mv conftest.tail conftest.vals
17844 done
17845 rm -f conftest.vals
17846
17847 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17848 # marker @DEFS@.
17849 echo '  cat >> conftest.edit <<CEOF
17850 /@DEFS@/r conftest.frag
17851 /@DEFS@/d
17852 CEOF
17853 sed -f conftest.edit $tmp/in > $tmp/out
17854 rm -f $tmp/in
17855 mv $tmp/out $tmp/in
17856 rm -f conftest.edit conftest.frag
17857 ' >> $CONFIG_STATUS
17858
17859 cat >>$CONFIG_STATUS <<\EOF
17860   # Let's still pretend it is `configure' which instantiates (i.e., don't
17861   # use $as_me), people would be surprised to read:
17862   #    /* config.h.  Generated automatically by config.status.  */
17863   if test x"$ac_file" = x-; then
17864     echo "/* Generated automatically by configure.  */" >$tmp/config.h
17865   else
17866     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
17867   fi
17868   cat $tmp/in >>$tmp/config.h
17869   rm -f $tmp/in
17870   if test x"$ac_file" != x-; then
17871     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17872       { echo "$as_me:17872: $ac_file is unchanged" >&5
17873 echo "$as_me: $ac_file is unchanged" >&6;}
17874     else
17875       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17876          X"$ac_file" : 'X\(//\)[^/]' \| \
17877          X"$ac_file" : 'X\(//\)$' \| \
17878          X"$ac_file" : 'X\(/\)' \| \
17879          .     : '\(.\)' 2>/dev/null ||
17880 echo X"$ac_file" |
17881     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17882           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17883           /^X\(\/\/\)$/{ s//\1/; q; }
17884           /^X\(\/\).*/{ s//\1/; q; }
17885           s/.*/./; q'`
17886       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17887         { case "$ac_dir" in
17888   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17889   *)                      as_incr_dir=.;;
17890 esac
17891 as_dummy="$ac_dir"
17892 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17893   case $as_mkdir_dir in
17894     # Skip DOS drivespec
17895     ?:) as_incr_dir=$as_mkdir_dir ;;
17896     *)
17897       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17898       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17899     ;;
17900   esac
17901 done; }
17902
17903       fi
17904       rm -f $ac_file
17905       mv $tmp/config.h $ac_file
17906     fi
17907   else
17908     cat $tmp/config.h
17909     rm -f $tmp/config.h
17910   fi
17911 done
17912 EOF
17913 cat >>$CONFIG_STATUS <<\EOF
17914 #
17915 # CONFIG_COMMANDS section.
17916 #
17917 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17918   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17919   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17920
17921   case $ac_dest in
17922     default )
17923
17924 for cf_dir in .
17925 do
17926         if test ! -d $srcdir/$cf_dir; then
17927                 continue
17928         elif test -f $srcdir/$cf_dir/programs; then
17929                 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17930         fi
17931 done
17932
17933         cat >>Makefile <<TEST_EOF
17934
17935 # These rules are generated so we do not rely on suffix rules, which do not
17936 # work consistently for different make-programs (the '\$(MODEL)/' confuses
17937 # some, and the '\$x' confuses others).
17938 TEST_EOF
17939
17940 LIST=`sed -e 's/[       ].*//' -e '/^[#@]/d' $srcdir/modules`
17941 for N in $LIST
17942 do
17943         cat >>Makefile <<TEST_EOF
17944
17945 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
17946         \$(srcdir)/test.priv.h \\
17947         ncurses_cfg.h
17948         $SHOW_CC
17949         $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
17950 TEST_EOF
17951 done
17952
17953 if test -f ../config.guess && test -f ../config.sub
17954 then
17955         cat >>Makefile <<TEST_EOF
17956
17957 # if we used CF_INHERIT for getting these files, we can remove them
17958 distclean::
17959         rm -f config.guess config.sub
17960 TEST_EOF
17961 fi
17962  ;;
17963   esac
17964 done
17965 EOF
17966
17967 cat >>$CONFIG_STATUS <<\EOF
17968
17969 { (exit 0); exit 0; }
17970 EOF
17971 chmod +x $CONFIG_STATUS
17972 ac_clean_files=$ac_clean_files_save
17973
17974 # configure is writing to config.log, and then calls config.status.
17975 # config.status does its own redirection, appending to config.log.
17976 # Unfortunately, on DOS this fails, as config.log is still kept open
17977 # by configure, so config.status won't be able to write to it; its
17978 # output is simply discarded.  So we exec the FD to /dev/null,
17979 # effectively closing config.log, so it can be properly (re)opened and
17980 # appended to by config.status.  When coming back to configure, we
17981 # need to make the FD available again.
17982 if test "$no_create" != yes; then
17983   ac_cs_success=:
17984   exec 5>/dev/null
17985   $SHELL $CONFIG_STATUS || ac_cs_success=false
17986   exec 5>>config.log
17987   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17988   # would make configure fail if this is the last instruction.
17989   $ac_cs_success || { (exit 1); exit 1; }
17990 fi
17991