]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/dialog/configure
THIS BRANCH IS OBSOLETE, PLEASE READ:
[FreeBSD/FreeBSD.git] / contrib / dialog / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20170501.
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="dialog.h"
108 # Factoring default headers for most tests.
109 ac_includes_default="\
110 #include <stdio.h>
111 #if HAVE_SYS_TYPES_H
112 # include <sys/types.h>
113 #endif
114 #if HAVE_SYS_STAT_H
115 # include <sys/stat.h>
116 #endif
117 #if STDC_HEADERS
118 # include <stdlib.h>
119 # include <stddef.h>
120 #else
121 # if HAVE_STDLIB_H
122 #  include <stdlib.h>
123 # endif
124 #endif
125 #if HAVE_STRING_H
126 # if !STDC_HEADERS && HAVE_MEMORY_H
127 #  include <memory.h>
128 # endif
129 # include <string.h>
130 #endif
131 #if HAVE_STRINGS_H
132 # include <strings.h>
133 #endif
134 #if HAVE_INTTYPES_H
135 # include <inttypes.h>
136 #else
137 # if HAVE_STDINT_H
138 #  include <stdint.h>
139 # endif
140 #endif
141 #if HAVE_UNISTD_H
142 # include <unistd.h>
143 #endif"
144
145 # Initialize some variables set by options.
146 ac_init_help=
147 ac_init_version=false
148 # The variables have the same names as the options, with
149 # dashes changed to underlines.
150 cache_file=/dev/null
151 exec_prefix=NONE
152 no_create=
153 no_recursion=
154 prefix=NONE
155 program_prefix=NONE
156 program_suffix=NONE
157 program_transform_name=s,x,x,
158 silent=
159 site=
160 srcdir=
161 verbose=
162 x_includes=NONE
163 x_libraries=NONE
164
165 # Installation directory options.
166 # These are left unexpanded so users can "make install exec_prefix=/foo"
167 # and all the variables that are supposed to be based on exec_prefix
168 # by default will actually change.
169 # Use braces instead of parens because sh, perl, etc. also accept them.
170 bindir='${exec_prefix}/bin'
171 sbindir='${exec_prefix}/sbin'
172 libexecdir='${exec_prefix}/libexec'
173 datarootdir='${prefix}/share'
174 datadir='${datarootdir}'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${datarootdir}/info'
182 mandir='${datarootdir}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
234   | --dataroo | --dataro | --datar)
235     ac_prev=datarootdir ;;
236   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
237   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
238     datarootdir=$ac_optarg ;;
239
240   -disable-* | --disable-*)
241     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
242     # Reject names that are not valid shell variable names.
243     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
244       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
245    { (exit 1); exit 1; }; }
246     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
247     eval "enable_$ac_feature=no" ;;
248
249   -enable-* | --enable-*)
250     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
251     # Reject names that are not valid shell variable names.
252     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
253       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
254    { (exit 1); exit 1; }; }
255     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
256     case $ac_option in
257       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
258       *) ac_optarg=yes ;;
259     esac
260     eval "enable_$ac_feature='$ac_optarg'" ;;
261
262   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
263   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
264   | --exec | --exe | --ex)
265     ac_prev=exec_prefix ;;
266   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
267   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
268   | --exec=* | --exe=* | --ex=*)
269     exec_prefix=$ac_optarg ;;
270
271   -gas | --gas | --ga | --g)
272     # Obsolete; use --with-gas.
273     with_gas=yes ;;
274
275   -help | --help | --hel | --he | -h)
276     ac_init_help=long ;;
277   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
278     ac_init_help=recursive ;;
279   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
280     ac_init_help=short ;;
281
282   -host | --host | --hos | --ho)
283     ac_prev=host_alias ;;
284   -host=* | --host=* | --hos=* | --ho=*)
285     host_alias=$ac_optarg ;;
286
287   -includedir | --includedir | --includedi | --included | --include \
288   | --includ | --inclu | --incl | --inc)
289     ac_prev=includedir ;;
290   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291   | --includ=* | --inclu=* | --incl=* | --inc=*)
292     includedir=$ac_optarg ;;
293
294   -infodir | --infodir | --infodi | --infod | --info | --inf)
295     ac_prev=infodir ;;
296   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297     infodir=$ac_optarg ;;
298
299   -libdir | --libdir | --libdi | --libd)
300     ac_prev=libdir ;;
301   -libdir=* | --libdir=* | --libdi=* | --libd=*)
302     libdir=$ac_optarg ;;
303
304   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305   | --libexe | --libex | --libe)
306     ac_prev=libexecdir ;;
307   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308   | --libexe=* | --libex=* | --libe=*)
309     libexecdir=$ac_optarg ;;
310
311   -localstatedir | --localstatedir | --localstatedi | --localstated \
312   | --localstate | --localstat | --localsta | --localst \
313   | --locals | --local | --loca | --loc | --lo)
314     ac_prev=localstatedir ;;
315   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318     localstatedir=$ac_optarg ;;
319
320   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321     ac_prev=mandir ;;
322   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323     mandir=$ac_optarg ;;
324
325   -nfp | --nfp | --nf)
326     # Obsolete; use --without-fp.
327     with_fp=no ;;
328
329   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330   | --no-cr | --no-c)
331     no_create=yes ;;
332
333   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335     no_recursion=yes ;;
336
337   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339   | --oldin | --oldi | --old | --ol | --o)
340     ac_prev=oldincludedir ;;
341   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344     oldincludedir=$ac_optarg ;;
345
346   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347     ac_prev=prefix ;;
348   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349     prefix=$ac_optarg ;;
350
351   -program-prefix | --program-prefix | --program-prefi | --program-pref \
352   | --program-pre | --program-pr | --program-p)
353     ac_prev=program_prefix ;;
354   -program-prefix=* | --program-prefix=* | --program-prefi=* \
355   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356     program_prefix=$ac_optarg ;;
357
358   -program-suffix | --program-suffix | --program-suffi | --program-suff \
359   | --program-suf | --program-su | --program-s)
360     ac_prev=program_suffix ;;
361   -program-suffix=* | --program-suffix=* | --program-suffi=* \
362   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363     program_suffix=$ac_optarg ;;
364
365   -program-transform-name | --program-transform-name \
366   | --program-transform-nam | --program-transform-na \
367   | --program-transform-n | --program-transform- \
368   | --program-transform | --program-transfor \
369   | --program-transfo | --program-transf \
370   | --program-trans | --program-tran \
371   | --progr-tra | --program-tr | --program-t)
372     ac_prev=program_transform_name ;;
373   -program-transform-name=* | --program-transform-name=* \
374   | --program-transform-nam=* | --program-transform-na=* \
375   | --program-transform-n=* | --program-transform-=* \
376   | --program-transform=* | --program-transfor=* \
377   | --program-transfo=* | --program-transf=* \
378   | --program-trans=* | --program-tran=* \
379   | --progr-tra=* | --program-tr=* | --program-t=*)
380     program_transform_name=$ac_optarg ;;
381
382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383   | -silent | --silent | --silen | --sile | --sil)
384     silent=yes ;;
385
386   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387     ac_prev=sbindir ;;
388   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389   | --sbi=* | --sb=*)
390     sbindir=$ac_optarg ;;
391
392   -sharedstatedir | --sharedstatedir | --sharedstatedi \
393   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394   | --sharedst | --shareds | --shared | --share | --shar \
395   | --sha | --sh)
396     ac_prev=sharedstatedir ;;
397   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400   | --sha=* | --sh=*)
401     sharedstatedir=$ac_optarg ;;
402
403   -site | --site | --sit)
404     ac_prev=site ;;
405   -site=* | --site=* | --sit=*)
406     site=$ac_optarg ;;
407
408   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409     ac_prev=srcdir ;;
410   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411     srcdir=$ac_optarg ;;
412
413   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414   | --syscon | --sysco | --sysc | --sys | --sy)
415     ac_prev=sysconfdir ;;
416   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418     sysconfdir=$ac_optarg ;;
419
420   -target | --target | --targe | --targ | --tar | --ta | --t)
421     ac_prev=target_alias ;;
422   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423     target_alias=$ac_optarg ;;
424
425   -v | -verbose | --verbose | --verbos | --verbo | --verb)
426     verbose=yes ;;
427
428   -version | --version | --versio | --versi | --vers | -V)
429     ac_init_version=: ;;
430
431   -with-* | --with-*)
432     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
433     # Reject names that are not valid shell variable names.
434     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
435       { echo "$as_me: error: invalid package name: $ac_package" >&2
436    { (exit 1); exit 1; }; }
437     ac_package=`echo $ac_package| sed 's/-/_/g'`
438     case $ac_option in
439       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
440       *) ac_optarg=yes ;;
441     esac
442     eval "with_$ac_package='$ac_optarg'" ;;
443
444   -without-* | --without-*)
445     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo $ac_package | sed 's/-/_/g'`
451     eval "with_$ac_package=no" ;;
452
453   --x)
454     # Obsolete; use --with-x.
455     with_x=yes ;;
456
457   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458   | --x-incl | --x-inc | --x-in | --x-i)
459     ac_prev=x_includes ;;
460   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462     x_includes=$ac_optarg ;;
463
464   -x-libraries | --x-libraries | --x-librarie | --x-librari \
465   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466     ac_prev=x_libraries ;;
467   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469     x_libraries=$ac_optarg ;;
470
471   -*) { echo "$as_me: error: unrecognized option: $ac_option
472 Try \`$0 --help' for more information." >&2
473    { (exit 1); exit 1; }; }
474     ;;
475
476   *=*)
477     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
478     # Reject names that are not valid shell variable names.
479     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
480       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
481    { (exit 1); exit 1; }; }
482     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
483     eval "$ac_envvar='$ac_optarg'"
484     export $ac_envvar ;;
485
486   *)
487     # FIXME: should be removed in autoconf 3.0.
488     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
489     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
490       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
491     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
492     ;;
493
494   esac
495 done
496
497 if test -n "$ac_prev"; then
498   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
499   { echo "$as_me: error: missing argument to $ac_option" >&2
500    { (exit 1); exit 1; }; }
501 fi
502
503 # Be sure to have absolute paths.
504 for ac_var in exec_prefix prefix
505 do
506   eval ac_val=$`echo $ac_var`
507   case $ac_val in
508     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
509     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
510    { (exit 1); exit 1; }; };;
511   esac
512 done
513
514 # Be sure to have absolute paths.
515 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
516               localstatedir libdir includedir oldincludedir infodir mandir
517 do
518   eval ac_val=$`echo $ac_var`
519   case $ac_val in
520     [\\/$]* | ?:[\\/]* ) ;;
521     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522    { (exit 1); exit 1; }; };;
523   esac
524 done
525
526 # There might be people who depend on the old broken behavior: `$host'
527 # used to hold the argument of --host etc.
528 build=$build_alias
529 host=$host_alias
530 target=$target_alias
531
532 # FIXME: should be removed in autoconf 3.0.
533 if test "x$host_alias" != x; then
534   if test "x$build_alias" = x; then
535     cross_compiling=maybe
536     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
537     If a cross compiler is detected then cross compile mode will be used." >&2
538   elif test "x$build_alias" != "x$host_alias"; then
539     cross_compiling=yes
540   fi
541 fi
542
543 ac_tool_prefix=
544 test -n "$host_alias" && ac_tool_prefix=$host_alias-
545
546 test "$silent" = yes && exec 6>/dev/null
547
548 # Find the source files, if location was not specified.
549 if test -z "$srcdir"; then
550   ac_srcdir_defaulted=yes
551   # Try the directory containing this script, then its parent.
552   ac_prog=$0
553   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
554   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
555   srcdir=$ac_confdir
556   if test ! -r $srcdir/$ac_unique_file; then
557     srcdir=..
558   fi
559 else
560   ac_srcdir_defaulted=no
561 fi
562 if test ! -r $srcdir/$ac_unique_file; then
563   if test "$ac_srcdir_defaulted" = yes; then
564     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
565    { (exit 1); exit 1; }; }
566   else
567     { echo "$as_me: error: cannot find sources in $srcdir" >&2
568    { (exit 1); exit 1; }; }
569   fi
570 fi
571 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
572 ac_env_build_alias_set=${build_alias+set}
573 ac_env_build_alias_value=$build_alias
574 ac_cv_env_build_alias_set=${build_alias+set}
575 ac_cv_env_build_alias_value=$build_alias
576 ac_env_host_alias_set=${host_alias+set}
577 ac_env_host_alias_value=$host_alias
578 ac_cv_env_host_alias_set=${host_alias+set}
579 ac_cv_env_host_alias_value=$host_alias
580 ac_env_target_alias_set=${target_alias+set}
581 ac_env_target_alias_value=$target_alias
582 ac_cv_env_target_alias_set=${target_alias+set}
583 ac_cv_env_target_alias_value=$target_alias
584 ac_env_CC_set=${CC+set}
585 ac_env_CC_value=$CC
586 ac_cv_env_CC_set=${CC+set}
587 ac_cv_env_CC_value=$CC
588 ac_env_CFLAGS_set=${CFLAGS+set}
589 ac_env_CFLAGS_value=$CFLAGS
590 ac_cv_env_CFLAGS_set=${CFLAGS+set}
591 ac_cv_env_CFLAGS_value=$CFLAGS
592 ac_env_LDFLAGS_set=${LDFLAGS+set}
593 ac_env_LDFLAGS_value=$LDFLAGS
594 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
595 ac_cv_env_LDFLAGS_value=$LDFLAGS
596 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
597 ac_env_CPPFLAGS_value=$CPPFLAGS
598 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
599 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
600 ac_env_CPP_set=${CPP+set}
601 ac_env_CPP_value=$CPP
602 ac_cv_env_CPP_set=${CPP+set}
603 ac_cv_env_CPP_value=$CPP
604
605 #
606 # Report the --help message.
607 #
608 if test "$ac_init_help" = "long"; then
609   # Omit some internal or obsolete options to make the list less imposing.
610   # This message is too long to be a string in the A/UX 3.1 sh.
611   cat <<EOF
612 \`configure' configures this package to adapt to many kinds of systems.
613
614 Usage: $0 [OPTION]... [VAR=VALUE]...
615
616 To assign environment variables (e.g., CC, CFLAGS...), specify them as
617 VAR=VALUE.  See below for descriptions of some of the useful variables.
618
619 Defaults for the options are specified in brackets.
620
621 Configuration:
622   -h, --help              display this help and exit
623       --help=short        display options specific to this package
624       --help=recursive    display the short help of all the included packages
625   -V, --version           display version information and exit
626   -q, --quiet, --silent   do not print \`checking...' messages
627       --cache-file=FILE   cache test results in FILE [disabled]
628   -C, --config-cache      alias for \`--cache-file=config.cache'
629   -n, --no-create         do not create output files
630       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
631
632 EOF
633
634   cat <<EOF
635 Installation directories:
636   --prefix=PREFIX         install architecture-independent files in PREFIX
637                           [$ac_default_prefix]
638   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
639                           [PREFIX]
640
641 By default, \`make install' will install all the files in
642 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
643 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
644 for instance \`--prefix=\$HOME'.
645
646 For better control, use the options below.
647
648 Fine tuning of the installation directories:
649   --bindir=DIR            user executables [EPREFIX/bin]
650   --sbindir=DIR           system admin executables [EPREFIX/sbin]
651   --libexecdir=DIR        program executables [EPREFIX/libexec]
652   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
653   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
654   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
655   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
656   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
657   --libdir=DIR            object code libraries [EPREFIX/lib]
658   --includedir=DIR        C header files [PREFIX/include]
659   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
660   --infodir=DIR           info documentation [DATAROOTDIR/info]
661   --mandir=DIR            man documentation [DATAROOTDIR/man]
662 EOF
663
664   cat <<\EOF
665
666 Program names:
667   --program-prefix=PREFIX            prepend PREFIX to installed program names
668   --program-suffix=SUFFIX            append SUFFIX to installed program names
669   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
670
671 X features:
672   --x-includes=DIR    X include files are in DIR
673   --x-libraries=DIR   X library files are in DIR
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678 EOF
679 fi
680
681 if test -n "$ac_init_help"; then
682
683   cat <<\EOF
684
685 Optional Features:
686   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
687   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
688
689 Optional Packages:
690   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
691   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
692
693   --disable-echo          do not display "compiling" commands
694   --disable-largefile     omit support for large files
695   --with-install-prefix=XXX sets DESTDIR, useful for packaging
696   --with-warnings         test: turn on gcc warnings
697   --with-pkg-config{=path} enable/disable use of pkg-config
698   --with-package=XXX      rename dialog to XXX, library to libXXX.a, etc
699   --enable-header-subdir  install dlg_XXX headers to subdirectory
700   --with-man2html=XXX     use XXX rather than groff
701   --with-libiconv-prefix=DIR
702                           search for libiconv in DIR/include and DIR/lib
703   --enable-nls            use Native Language Support
704   --with-included-gettext use the GNU gettext library included here
705   --with-textdomain=PKG   NLS text-domain (default is package name)
706   --disable-included-msgs use included messages, for i18n support
707   --with-dmalloc          test: use Gray Watson's dmalloc library
708   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
709   --with-purify           test: use Purify
710   --with-valgrind         test: use valgrind
711   --with-no-leaks         test: free permanent memory, analyze leaks
712   --disable-trace         do not support --trace option
713   --with-rel-version=XXX  override derived release version
714   --with-abi-version=XXX  override derived ABI version
715   --disable-libtool-version  enable to use libtool's incompatible naming scheme
716   --with-libtool          generate libraries with libtool
717   --with-libtool-opts=XXX specify additional libtool options
718   --with-export-syms=XXX  limit exported symbols using libtool
719   --with-shared           generate shared-libraries
720   --with-shlib-version=X  Specify rel or abi version for shared libs
721   --with-versioned-syms=X markup versioned symbols using ld
722   --with-curses-dir=DIR   directory in which (n)curses is installed
723   --enable-rpath          use rpath option when generating shared libraries
724   --with-screen=XXX       use specified curses-libraries
725   --with-ncursesw         use wide ncurses-libraries
726   --with-ncurses          use ncurses-libraries
727   --with-pdcurses         compile/link with pdcurses X11 library
728   --with-curses-colr      compile/link with HPUX 10.x color-curses
729   --with-curses-5lib      compile/link with SunOS 5lib curses
730   --with-Xaw3d            link with Xaw 3d library
731   --with-Xaw3dxft         link with Xaw 3d xft library
732   --with-neXtaw           link with neXT Athena library
733   --with-XawPlus          link with Athena-Plus library
734   --with-x                use the X Window System
735   --disable-extras        do not include extra dialogs
736   --disable-rc-file       do not include config-file support
737   --disable-Xdialog       do not include Xdialog-style dialogs (1.1)
738   --disable-Xdialog2      do not include extra Xdialog-style dialogs (1.2)
739   --disable-whiptail      do not map extra whiptail options
740   --disable-form          do not include the form dialog
741   --disable-gauge         do not include the gauge dialogs
742   --disable-tailbox       do not include the tailbox dialog
743   --disable-mixedform     do not include the mixedform dialog
744   --disable-mixedgauge    do not include the mixedgauge dialog
745   --enable-widec          enable wide-curses features
746   --disable-rpath-hack    don't add rpath options for additional libraries
747
748 Some influential environment variables:
749   CC          C compiler command
750   CFLAGS      C compiler flags
751   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
752               nonstandard directory <lib dir>
753   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
754               headers in a nonstandard directory <include dir>
755   CPP         C preprocessor
756
757 Use these variables to override the choices made by `configure' or to help
758 it to find libraries and programs with nonstandard names/locations.
759
760 EOF
761 fi
762
763 if test "$ac_init_help" = "recursive"; then
764   # If there are subdirs, report their specific --help.
765   ac_popdir=`pwd`
766   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
767     cd $ac_subdir
768     # A "../" for each directory in /$ac_subdir.
769     ac_dots=`echo $ac_subdir |
770              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
771
772     case $srcdir in
773     .) # No --srcdir option.  We are building in place.
774       ac_sub_srcdir=$srcdir ;;
775     [\\/]* | ?:[\\/]* ) # Absolute path.
776       ac_sub_srcdir=$srcdir/$ac_subdir ;;
777     *) # Relative path.
778       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
779     esac
780
781     # Check for guested configure; otherwise get Cygnus style configure.
782     if test -f $ac_sub_srcdir/configure.gnu; then
783       echo
784       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
785     elif test -f $ac_sub_srcdir/configure; then
786       echo
787       $SHELL $ac_sub_srcdir/configure  --help=recursive
788     elif test -f $ac_sub_srcdir/configure.ac ||
789            test -f $ac_sub_srcdir/configure.in; then
790       echo
791       $ac_configure --help
792     else
793       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
794     fi
795     cd $ac_popdir
796   done
797 fi
798
799 test -n "$ac_init_help" && exit 0
800 if $ac_init_version; then
801   cat <<\EOF
802
803 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
804 Free Software Foundation, Inc.
805 This configure script is free software; the Free Software Foundation
806 gives unlimited permission to copy, distribute and modify it.
807 EOF
808   exit 0
809 fi
810 exec 5>config.log
811 cat >&5 <<EOF
812 This file contains any messages produced by compilers while
813 running configure, to aid debugging if configure makes a mistake.
814
815 It was created by $as_me, which was
816 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
817
818   $ $0 $@
819
820 EOF
821 {
822 cat <<_ASUNAME
823 ## ---------- ##
824 ## Platform.  ##
825 ## ---------- ##
826
827 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
828 uname -m = `(uname -m) 2>/dev/null || echo unknown`
829 uname -r = `(uname -r) 2>/dev/null || echo unknown`
830 uname -s = `(uname -s) 2>/dev/null || echo unknown`
831 uname -v = `(uname -v) 2>/dev/null || echo unknown`
832
833 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
834 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
835
836 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
837 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
838 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
839 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
840 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
841 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
842 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
843
844 PATH = $PATH
845
846 _ASUNAME
847 } >&5
848
849 cat >&5 <<EOF
850 ## ------------ ##
851 ## Core tests.  ##
852 ## ------------ ##
853
854 EOF
855
856 # Keep a trace of the command line.
857 # Strip out --no-create and --no-recursion so they do not pile up.
858 # Also quote any args containing shell meta-characters.
859 ac_configure_args=
860 ac_sep=
861 for ac_arg
862 do
863   case $ac_arg in
864   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
865   | --no-cr | --no-c) ;;
866   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
867   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
868   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
869     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
870     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
871     ac_sep=" " ;;
872   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
873      ac_sep=" " ;;
874   esac
875   # Get rid of the leading space.
876 done
877
878 # When interrupted or exit'd, cleanup temporary files, and complete
879 # config.log.  We remove comments because anyway the quotes in there
880 # would cause problems or look ugly.
881 trap 'exit_status=$?
882   # Save into config.log some information that might help in debugging.
883   echo >&5
884   echo "## ----------------- ##" >&5
885   echo "## Cache variables.  ##" >&5
886   echo "## ----------------- ##" >&5
887   echo >&5
888   # The following way of writing the cache mishandles newlines in values,
889 {
890   (set) 2>&1 |
891     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
892     *ac_space=\ *)
893       sed -n \
894         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
895           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
896       ;;
897     *)
898       sed -n \
899         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
900       ;;
901     esac;
902 } >&5
903   sed "/^$/d" confdefs.h >conftest.log
904   if test -s conftest.log; then
905     echo >&5
906     echo "## ------------ ##" >&5
907     echo "## confdefs.h.  ##" >&5
908     echo "## ------------ ##" >&5
909     echo >&5
910     cat conftest.log >&5
911   fi
912   (echo; echo) >&5
913   test "$ac_signal" != 0 &&
914     echo "$as_me: caught signal $ac_signal" >&5
915   echo "$as_me: exit $exit_status" >&5
916   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
917     exit $exit_status
918      ' 0
919 for ac_signal in 1 2 13 15; do
920   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
921 done
922 ac_signal=0
923
924 # confdefs.h avoids OS command line length limits that DEFS can exceed.
925 rm -rf conftest* confdefs.h
926 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
927 echo >confdefs.h
928
929 # Let the site file select an alternate cache file if it wants to.
930 # Prefer explicitly selected file to automatically selected ones.
931 if test -z "$CONFIG_SITE"; then
932   if test "x$prefix" != xNONE; then
933     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
934   else
935     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
936   fi
937 fi
938 for ac_site_file in $CONFIG_SITE; do
939   if test -r "$ac_site_file"; then
940     { echo "$as_me:940: loading site script $ac_site_file" >&5
941 echo "$as_me: loading site script $ac_site_file" >&6;}
942     cat "$ac_site_file" >&5
943     . "$ac_site_file"
944   fi
945 done
946
947 if test -r "$cache_file"; then
948   # Some versions of bash will fail to source /dev/null (special
949   # files actually), so we avoid doing that.
950   if test -f "$cache_file"; then
951     { echo "$as_me:951: loading cache $cache_file" >&5
952 echo "$as_me: loading cache $cache_file" >&6;}
953     case $cache_file in
954       [\\/]* | ?:[\\/]* ) . $cache_file;;
955       *)                      . ./$cache_file;;
956     esac
957   fi
958 else
959   { echo "$as_me:959: creating cache $cache_file" >&5
960 echo "$as_me: creating cache $cache_file" >&6;}
961   >$cache_file
962 fi
963
964 # Check that the precious variables saved in the cache have kept the same
965 # value.
966 ac_cache_corrupted=false
967 for ac_var in `(set) 2>&1 |
968                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
969   eval ac_old_set=\$ac_cv_env_${ac_var}_set
970   eval ac_new_set=\$ac_env_${ac_var}_set
971   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
972   eval ac_new_val="\$ac_env_${ac_var}_value"
973   case $ac_old_set,$ac_new_set in
974     set,)
975       { echo "$as_me:975: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
976 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
977       ac_cache_corrupted=: ;;
978     ,set)
979       { echo "$as_me:979: error: \`$ac_var' was not set in the previous run" >&5
980 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
981       ac_cache_corrupted=: ;;
982     ,);;
983     *)
984       if test "x$ac_old_val" != "x$ac_new_val"; then
985         { echo "$as_me:985: error: \`$ac_var' has changed since the previous run:" >&5
986 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
987         { echo "$as_me:987:   former value:  $ac_old_val" >&5
988 echo "$as_me:   former value:  $ac_old_val" >&2;}
989         { echo "$as_me:989:   current value: $ac_new_val" >&5
990 echo "$as_me:   current value: $ac_new_val" >&2;}
991         ac_cache_corrupted=:
992       fi;;
993   esac
994   # Pass precious variables to config.status.  It doesn't matter if
995   # we pass some twice (in addition to the command line arguments).
996   if test "$ac_new_set" = set; then
997     case $ac_new_val in
998     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
999       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1000       ac_configure_args="$ac_configure_args '$ac_arg'"
1001       ;;
1002     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1003        ;;
1004     esac
1005   fi
1006 done
1007 if $ac_cache_corrupted; then
1008   { echo "$as_me:1008: error: changes in the environment can compromise the build" >&5
1009 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1010   { { echo "$as_me:1010: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1011 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1012    { (exit 1); exit 1; }; }
1013 fi
1014
1015 ac_ext=c
1016 ac_cpp='$CPP $CPPFLAGS'
1017 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1018 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1020 ac_main_return=return
1021
1022 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1023   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1024                    ECHO_T='     ' ;;
1025   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1026   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1027 esac
1028 echo "#! $SHELL" >conftest.sh
1029 echo  "exit 0"   >>conftest.sh
1030 chmod +x conftest.sh
1031 if { (echo "$as_me:1031: PATH=\".;.\"; conftest.sh") >&5
1032   (PATH=".;."; conftest.sh) 2>&5
1033   ac_status=$?
1034   echo "$as_me:1034: \$? = $ac_status" >&5
1035   (exit $ac_status); }; then
1036   ac_path_separator=';'
1037 else
1038   ac_path_separator=:
1039 fi
1040 PATH_SEPARATOR="$ac_path_separator"
1041 rm -f conftest.sh
1042
1043 ac_config_headers="$ac_config_headers dlg_config.h:config.hin"
1044
1045 test "$program_prefix" != NONE &&
1046   program_transform_name="s,^,$program_prefix,;$program_transform_name"
1047 # Use a double $ so make ignores it.
1048 test "$program_suffix" != NONE &&
1049   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1050 # Double any \ or $.  echo might interpret backslashes.
1051 # By default was `s,x,x', remove it if useless.
1052 cat <<\_ACEOF >conftest.sed
1053 s/[\\$]/&&/g;s/;s,x,x,$//
1054 _ACEOF
1055 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1056 rm conftest.sed
1057
1058 DESTDIR=
1059
1060 ac_ext=c
1061 ac_cpp='$CPP $CPPFLAGS'
1062 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1063 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1064 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1065 ac_main_return=return
1066 if test -n "$ac_tool_prefix"; then
1067   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1068 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1069 echo "$as_me:1069: checking for $ac_word" >&5
1070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1071 if test "${ac_cv_prog_CC+set}" = set; then
1072   echo $ECHO_N "(cached) $ECHO_C" >&6
1073 else
1074   if test -n "$CC"; then
1075   ac_cv_prog_CC="$CC" # Let the user override the test.
1076 else
1077   ac_save_IFS=$IFS; IFS=$ac_path_separator
1078 ac_dummy="$PATH"
1079 for ac_dir in $ac_dummy; do
1080   IFS=$ac_save_IFS
1081   test -z "$ac_dir" && ac_dir=.
1082   $as_executable_p "$ac_dir/$ac_word" || continue
1083 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1084 echo "$as_me:1084: found $ac_dir/$ac_word" >&5
1085 break
1086 done
1087
1088 fi
1089 fi
1090 CC=$ac_cv_prog_CC
1091 if test -n "$CC"; then
1092   echo "$as_me:1092: result: $CC" >&5
1093 echo "${ECHO_T}$CC" >&6
1094 else
1095   echo "$as_me:1095: result: no" >&5
1096 echo "${ECHO_T}no" >&6
1097 fi
1098
1099 fi
1100 if test -z "$ac_cv_prog_CC"; then
1101   ac_ct_CC=$CC
1102   # Extract the first word of "gcc", so it can be a program name with args.
1103 set dummy gcc; ac_word=$2
1104 echo "$as_me:1104: checking for $ac_word" >&5
1105 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1106 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1107   echo $ECHO_N "(cached) $ECHO_C" >&6
1108 else
1109   if test -n "$ac_ct_CC"; then
1110   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1111 else
1112   ac_save_IFS=$IFS; IFS=$ac_path_separator
1113 ac_dummy="$PATH"
1114 for ac_dir in $ac_dummy; do
1115   IFS=$ac_save_IFS
1116   test -z "$ac_dir" && ac_dir=.
1117   $as_executable_p "$ac_dir/$ac_word" || continue
1118 ac_cv_prog_ac_ct_CC="gcc"
1119 echo "$as_me:1119: found $ac_dir/$ac_word" >&5
1120 break
1121 done
1122
1123 fi
1124 fi
1125 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1126 if test -n "$ac_ct_CC"; then
1127   echo "$as_me:1127: result: $ac_ct_CC" >&5
1128 echo "${ECHO_T}$ac_ct_CC" >&6
1129 else
1130   echo "$as_me:1130: result: no" >&5
1131 echo "${ECHO_T}no" >&6
1132 fi
1133
1134   CC=$ac_ct_CC
1135 else
1136   CC="$ac_cv_prog_CC"
1137 fi
1138
1139 if test -z "$CC"; then
1140   if test -n "$ac_tool_prefix"; then
1141   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1142 set dummy ${ac_tool_prefix}cc; ac_word=$2
1143 echo "$as_me:1143: checking for $ac_word" >&5
1144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1145 if test "${ac_cv_prog_CC+set}" = set; then
1146   echo $ECHO_N "(cached) $ECHO_C" >&6
1147 else
1148   if test -n "$CC"; then
1149   ac_cv_prog_CC="$CC" # Let the user override the test.
1150 else
1151   ac_save_IFS=$IFS; IFS=$ac_path_separator
1152 ac_dummy="$PATH"
1153 for ac_dir in $ac_dummy; do
1154   IFS=$ac_save_IFS
1155   test -z "$ac_dir" && ac_dir=.
1156   $as_executable_p "$ac_dir/$ac_word" || continue
1157 ac_cv_prog_CC="${ac_tool_prefix}cc"
1158 echo "$as_me:1158: found $ac_dir/$ac_word" >&5
1159 break
1160 done
1161
1162 fi
1163 fi
1164 CC=$ac_cv_prog_CC
1165 if test -n "$CC"; then
1166   echo "$as_me:1166: result: $CC" >&5
1167 echo "${ECHO_T}$CC" >&6
1168 else
1169   echo "$as_me:1169: result: no" >&5
1170 echo "${ECHO_T}no" >&6
1171 fi
1172
1173 fi
1174 if test -z "$ac_cv_prog_CC"; then
1175   ac_ct_CC=$CC
1176   # Extract the first word of "cc", so it can be a program name with args.
1177 set dummy cc; ac_word=$2
1178 echo "$as_me:1178: checking for $ac_word" >&5
1179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1180 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1181   echo $ECHO_N "(cached) $ECHO_C" >&6
1182 else
1183   if test -n "$ac_ct_CC"; then
1184   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1185 else
1186   ac_save_IFS=$IFS; IFS=$ac_path_separator
1187 ac_dummy="$PATH"
1188 for ac_dir in $ac_dummy; do
1189   IFS=$ac_save_IFS
1190   test -z "$ac_dir" && ac_dir=.
1191   $as_executable_p "$ac_dir/$ac_word" || continue
1192 ac_cv_prog_ac_ct_CC="cc"
1193 echo "$as_me:1193: found $ac_dir/$ac_word" >&5
1194 break
1195 done
1196
1197 fi
1198 fi
1199 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1200 if test -n "$ac_ct_CC"; then
1201   echo "$as_me:1201: result: $ac_ct_CC" >&5
1202 echo "${ECHO_T}$ac_ct_CC" >&6
1203 else
1204   echo "$as_me:1204: result: no" >&5
1205 echo "${ECHO_T}no" >&6
1206 fi
1207
1208   CC=$ac_ct_CC
1209 else
1210   CC="$ac_cv_prog_CC"
1211 fi
1212
1213 fi
1214 if test -z "$CC"; then
1215   # Extract the first word of "cc", so it can be a program name with args.
1216 set dummy cc; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_CC+set}" = set; then
1220   echo $ECHO_N "(cached) $ECHO_C" >&6
1221 else
1222   if test -n "$CC"; then
1223   ac_cv_prog_CC="$CC" # Let the user override the test.
1224 else
1225   ac_prog_rejected=no
1226   ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 ac_dummy="$PATH"
1228 for ac_dir in $ac_dummy; do
1229   IFS=$ac_save_IFS
1230   test -z "$ac_dir" && ac_dir=.
1231   $as_executable_p "$ac_dir/$ac_word" || continue
1232 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1233   ac_prog_rejected=yes
1234   continue
1235 fi
1236 ac_cv_prog_CC="cc"
1237 echo "$as_me:1237: found $ac_dir/$ac_word" >&5
1238 break
1239 done
1240
1241 if test $ac_prog_rejected = yes; then
1242   # We found a bogon in the path, so make sure we never use it.
1243   set dummy $ac_cv_prog_CC
1244   shift
1245   if test $# != 0; then
1246     # We chose a different compiler from the bogus one.
1247     # However, it has the same basename, so the bogon will be chosen
1248     # first if we set CC to just the basename; use the full file name.
1249     shift
1250     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1251     shift
1252     ac_cv_prog_CC="$@"
1253   fi
1254 fi
1255 fi
1256 fi
1257 CC=$ac_cv_prog_CC
1258 if test -n "$CC"; then
1259   echo "$as_me:1259: result: $CC" >&5
1260 echo "${ECHO_T}$CC" >&6
1261 else
1262   echo "$as_me:1262: result: no" >&5
1263 echo "${ECHO_T}no" >&6
1264 fi
1265
1266 fi
1267 if test -z "$CC"; then
1268   if test -n "$ac_tool_prefix"; then
1269   for ac_prog in cl
1270   do
1271     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1272 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1273 echo "$as_me:1273: checking for $ac_word" >&5
1274 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1275 if test "${ac_cv_prog_CC+set}" = set; then
1276   echo $ECHO_N "(cached) $ECHO_C" >&6
1277 else
1278   if test -n "$CC"; then
1279   ac_cv_prog_CC="$CC" # Let the user override the test.
1280 else
1281   ac_save_IFS=$IFS; IFS=$ac_path_separator
1282 ac_dummy="$PATH"
1283 for ac_dir in $ac_dummy; do
1284   IFS=$ac_save_IFS
1285   test -z "$ac_dir" && ac_dir=.
1286   $as_executable_p "$ac_dir/$ac_word" || continue
1287 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1288 echo "$as_me:1288: found $ac_dir/$ac_word" >&5
1289 break
1290 done
1291
1292 fi
1293 fi
1294 CC=$ac_cv_prog_CC
1295 if test -n "$CC"; then
1296   echo "$as_me:1296: result: $CC" >&5
1297 echo "${ECHO_T}$CC" >&6
1298 else
1299   echo "$as_me:1299: result: no" >&5
1300 echo "${ECHO_T}no" >&6
1301 fi
1302
1303     test -n "$CC" && break
1304   done
1305 fi
1306 if test -z "$CC"; then
1307   ac_ct_CC=$CC
1308   for ac_prog in cl
1309 do
1310   # Extract the first word of "$ac_prog", so it can be a program name with args.
1311 set dummy $ac_prog; ac_word=$2
1312 echo "$as_me:1312: checking for $ac_word" >&5
1313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1314 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1315   echo $ECHO_N "(cached) $ECHO_C" >&6
1316 else
1317   if test -n "$ac_ct_CC"; then
1318   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1319 else
1320   ac_save_IFS=$IFS; IFS=$ac_path_separator
1321 ac_dummy="$PATH"
1322 for ac_dir in $ac_dummy; do
1323   IFS=$ac_save_IFS
1324   test -z "$ac_dir" && ac_dir=.
1325   $as_executable_p "$ac_dir/$ac_word" || continue
1326 ac_cv_prog_ac_ct_CC="$ac_prog"
1327 echo "$as_me:1327: found $ac_dir/$ac_word" >&5
1328 break
1329 done
1330
1331 fi
1332 fi
1333 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1334 if test -n "$ac_ct_CC"; then
1335   echo "$as_me:1335: result: $ac_ct_CC" >&5
1336 echo "${ECHO_T}$ac_ct_CC" >&6
1337 else
1338   echo "$as_me:1338: result: no" >&5
1339 echo "${ECHO_T}no" >&6
1340 fi
1341
1342   test -n "$ac_ct_CC" && break
1343 done
1344
1345   CC=$ac_ct_CC
1346 fi
1347
1348 fi
1349
1350 test -z "$CC" && { { echo "$as_me:1350: error: no acceptable cc found in \$PATH" >&5
1351 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1352    { (exit 1); exit 1; }; }
1353
1354 # Provide some information about the compiler.
1355 echo "$as_me:1355:" \
1356      "checking for C compiler version" >&5
1357 ac_compiler=`set X $ac_compile; echo $2`
1358 { (eval echo "$as_me:1358: \"$ac_compiler --version </dev/null >&5\"") >&5
1359   (eval $ac_compiler --version </dev/null >&5) 2>&5
1360   ac_status=$?
1361   echo "$as_me:1361: \$? = $ac_status" >&5
1362   (exit $ac_status); }
1363 { (eval echo "$as_me:1363: \"$ac_compiler -v </dev/null >&5\"") >&5
1364   (eval $ac_compiler -v </dev/null >&5) 2>&5
1365   ac_status=$?
1366   echo "$as_me:1366: \$? = $ac_status" >&5
1367   (exit $ac_status); }
1368 { (eval echo "$as_me:1368: \"$ac_compiler -V </dev/null >&5\"") >&5
1369   (eval $ac_compiler -V </dev/null >&5) 2>&5
1370   ac_status=$?
1371   echo "$as_me:1371: \$? = $ac_status" >&5
1372   (exit $ac_status); }
1373
1374 cat >conftest.$ac_ext <<_ACEOF
1375 #line 1375 "configure"
1376 #include "confdefs.h"
1377
1378 int
1379 main (void)
1380 {
1381
1382   ;
1383   return 0;
1384 }
1385 _ACEOF
1386 ac_clean_files_save=$ac_clean_files
1387 ac_clean_files="$ac_clean_files a.out a.exe"
1388 # Try to create an executable without -o first, disregard a.out.
1389 # It will help us diagnose broken compilers, and finding out an intuition
1390 # of exeext.
1391 echo "$as_me:1391: checking for C compiler default output" >&5
1392 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1393 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1394 if { (eval echo "$as_me:1394: \"$ac_link_default\"") >&5
1395   (eval $ac_link_default) 2>&5
1396   ac_status=$?
1397   echo "$as_me:1397: \$? = $ac_status" >&5
1398   (exit $ac_status); }; then
1399   # Find the output, starting from the most likely.  This scheme is
1400 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1401 # resort.
1402 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1403                 ls a.out conftest 2>/dev/null;
1404                 ls a.* conftest.* 2>/dev/null`; do
1405   case $ac_file in
1406     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1407     a.out ) # We found the default executable, but exeext='' is most
1408             # certainly right.
1409             break;;
1410     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1411           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1412           export ac_cv_exeext
1413           break;;
1414     * ) break;;
1415   esac
1416 done
1417 else
1418   echo "$as_me: failed program was:" >&5
1419 cat conftest.$ac_ext >&5
1420 { { echo "$as_me:1420: error: C compiler cannot create executables" >&5
1421 echo "$as_me: error: C compiler cannot create executables" >&2;}
1422    { (exit 77); exit 77; }; }
1423 fi
1424
1425 ac_exeext=$ac_cv_exeext
1426 echo "$as_me:1426: result: $ac_file" >&5
1427 echo "${ECHO_T}$ac_file" >&6
1428
1429 # Check the compiler produces executables we can run.  If not, either
1430 # the compiler is broken, or we cross compile.
1431 echo "$as_me:1431: checking whether the C compiler works" >&5
1432 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1433 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1434 # If not cross compiling, check that we can run a simple program.
1435 if test "$cross_compiling" != yes; then
1436   if { ac_try='./$ac_file'
1437   { (eval echo "$as_me:1437: \"$ac_try\"") >&5
1438   (eval $ac_try) 2>&5
1439   ac_status=$?
1440   echo "$as_me:1440: \$? = $ac_status" >&5
1441   (exit $ac_status); }; }; then
1442     cross_compiling=no
1443   else
1444     if test "$cross_compiling" = maybe; then
1445         cross_compiling=yes
1446     else
1447         { { echo "$as_me:1447: error: cannot run C compiled programs.
1448 If you meant to cross compile, use \`--host'." >&5
1449 echo "$as_me: error: cannot run C compiled programs.
1450 If you meant to cross compile, use \`--host'." >&2;}
1451    { (exit 1); exit 1; }; }
1452     fi
1453   fi
1454 fi
1455 echo "$as_me:1455: result: yes" >&5
1456 echo "${ECHO_T}yes" >&6
1457
1458 rm -f a.out a.exe conftest$ac_cv_exeext
1459 ac_clean_files=$ac_clean_files_save
1460 # Check the compiler produces executables we can run.  If not, either
1461 # the compiler is broken, or we cross compile.
1462 echo "$as_me:1462: checking whether we are cross compiling" >&5
1463 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1464 echo "$as_me:1464: result: $cross_compiling" >&5
1465 echo "${ECHO_T}$cross_compiling" >&6
1466
1467 echo "$as_me:1467: checking for executable suffix" >&5
1468 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1469 if { (eval echo "$as_me:1469: \"$ac_link\"") >&5
1470   (eval $ac_link) 2>&5
1471   ac_status=$?
1472   echo "$as_me:1472: \$? = $ac_status" >&5
1473   (exit $ac_status); }; then
1474   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1475 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1476 # work properly (i.e., refer to `conftest.exe'), while it won't with
1477 # `rm'.
1478 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1479   case $ac_file in
1480     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1481     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1482           export ac_cv_exeext
1483           break;;
1484     * ) break;;
1485   esac
1486 done
1487 else
1488   { { echo "$as_me:1488: error: cannot compute EXEEXT: cannot compile and link" >&5
1489 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1490    { (exit 1); exit 1; }; }
1491 fi
1492
1493 rm -f conftest$ac_cv_exeext
1494 echo "$as_me:1494: result: $ac_cv_exeext" >&5
1495 echo "${ECHO_T}$ac_cv_exeext" >&6
1496
1497 rm -f conftest.$ac_ext
1498 EXEEXT=$ac_cv_exeext
1499 ac_exeext=$EXEEXT
1500 echo "$as_me:1500: checking for object suffix" >&5
1501 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1502 if test "${ac_cv_objext+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   cat >conftest.$ac_ext <<_ACEOF
1506 #line 1506 "configure"
1507 #include "confdefs.h"
1508
1509 int
1510 main (void)
1511 {
1512
1513   ;
1514   return 0;
1515 }
1516 _ACEOF
1517 rm -f conftest.o conftest.obj
1518 if { (eval echo "$as_me:1518: \"$ac_compile\"") >&5
1519   (eval $ac_compile) 2>&5
1520   ac_status=$?
1521   echo "$as_me:1521: \$? = $ac_status" >&5
1522   (exit $ac_status); }; then
1523   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1524   case $ac_file in
1525     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1526     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1527        break;;
1528   esac
1529 done
1530 else
1531   echo "$as_me: failed program was:" >&5
1532 cat conftest.$ac_ext >&5
1533 { { echo "$as_me:1533: error: cannot compute OBJEXT: cannot compile" >&5
1534 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1535    { (exit 1); exit 1; }; }
1536 fi
1537
1538 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1539 fi
1540 echo "$as_me:1540: result: $ac_cv_objext" >&5
1541 echo "${ECHO_T}$ac_cv_objext" >&6
1542 OBJEXT=$ac_cv_objext
1543 ac_objext=$OBJEXT
1544 echo "$as_me:1544: checking whether we are using the GNU C compiler" >&5
1545 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1546 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1547   echo $ECHO_N "(cached) $ECHO_C" >&6
1548 else
1549   cat >conftest.$ac_ext <<_ACEOF
1550 #line 1550 "configure"
1551 #include "confdefs.h"
1552
1553 int
1554 main (void)
1555 {
1556 #ifndef __GNUC__
1557        choke me
1558 #endif
1559
1560   ;
1561   return 0;
1562 }
1563 _ACEOF
1564 rm -f conftest.$ac_objext
1565 if { (eval echo "$as_me:1565: \"$ac_compile\"") >&5
1566   (eval $ac_compile) 2>&5
1567   ac_status=$?
1568   echo "$as_me:1568: \$? = $ac_status" >&5
1569   (exit $ac_status); } &&
1570          { ac_try='test -s conftest.$ac_objext'
1571   { (eval echo "$as_me:1571: \"$ac_try\"") >&5
1572   (eval $ac_try) 2>&5
1573   ac_status=$?
1574   echo "$as_me:1574: \$? = $ac_status" >&5
1575   (exit $ac_status); }; }; then
1576   ac_compiler_gnu=yes
1577 else
1578   echo "$as_me: failed program was:" >&5
1579 cat conftest.$ac_ext >&5
1580 ac_compiler_gnu=no
1581 fi
1582 rm -f conftest.$ac_objext conftest.$ac_ext
1583 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1584
1585 fi
1586 echo "$as_me:1586: result: $ac_cv_c_compiler_gnu" >&5
1587 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1588 GCC=`test $ac_compiler_gnu = yes && echo yes`
1589 ac_test_CFLAGS=${CFLAGS+set}
1590 ac_save_CFLAGS=$CFLAGS
1591 CFLAGS="-g"
1592 echo "$as_me:1592: checking whether $CC accepts -g" >&5
1593 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1594 if test "${ac_cv_prog_cc_g+set}" = set; then
1595   echo $ECHO_N "(cached) $ECHO_C" >&6
1596 else
1597   cat >conftest.$ac_ext <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1600
1601 int
1602 main (void)
1603 {
1604
1605   ;
1606   return 0;
1607 }
1608 _ACEOF
1609 rm -f conftest.$ac_objext
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611   (eval $ac_compile) 2>&5
1612   ac_status=$?
1613   echo "$as_me:1613: \$? = $ac_status" >&5
1614   (exit $ac_status); } &&
1615          { ac_try='test -s conftest.$ac_objext'
1616   { (eval echo "$as_me:1616: \"$ac_try\"") >&5
1617   (eval $ac_try) 2>&5
1618   ac_status=$?
1619   echo "$as_me:1619: \$? = $ac_status" >&5
1620   (exit $ac_status); }; }; then
1621   ac_cv_prog_cc_g=yes
1622 else
1623   echo "$as_me: failed program was:" >&5
1624 cat conftest.$ac_ext >&5
1625 ac_cv_prog_cc_g=no
1626 fi
1627 rm -f conftest.$ac_objext conftest.$ac_ext
1628 fi
1629 echo "$as_me:1629: result: $ac_cv_prog_cc_g" >&5
1630 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1631 if test "$ac_test_CFLAGS" = set; then
1632   CFLAGS=$ac_save_CFLAGS
1633 elif test $ac_cv_prog_cc_g = yes; then
1634   if test "$GCC" = yes; then
1635     CFLAGS="-g -O2"
1636   else
1637     CFLAGS="-g"
1638   fi
1639 else
1640   if test "$GCC" = yes; then
1641     CFLAGS="-O2"
1642   else
1643     CFLAGS=
1644   fi
1645 fi
1646 # Some people use a C++ compiler to compile C.  Since we use `exit',
1647 # in C++ we need to declare it.  In case someone uses the same compiler
1648 # for both compiling C and C++ we need to have the C++ compiler decide
1649 # the declaration of exit, since it's the most demanding environment.
1650 cat >conftest.$ac_ext <<_ACEOF
1651 #ifndef __cplusplus
1652   choke me
1653 #endif
1654 _ACEOF
1655 rm -f conftest.$ac_objext
1656 if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
1657   (eval $ac_compile) 2>&5
1658   ac_status=$?
1659   echo "$as_me:1659: \$? = $ac_status" >&5
1660   (exit $ac_status); } &&
1661          { ac_try='test -s conftest.$ac_objext'
1662   { (eval echo "$as_me:1662: \"$ac_try\"") >&5
1663   (eval $ac_try) 2>&5
1664   ac_status=$?
1665   echo "$as_me:1665: \$? = $ac_status" >&5
1666   (exit $ac_status); }; }; then
1667   for ac_declaration in \
1668    ''\
1669    '#include <stdlib.h>' \
1670    'extern "C" void std::exit (int) throw (); using std::exit;' \
1671    'extern "C" void std::exit (int); using std::exit;' \
1672    'extern "C" void exit (int) throw ();' \
1673    'extern "C" void exit (int);' \
1674    'void exit (int);'
1675 do
1676   cat >conftest.$ac_ext <<_ACEOF
1677 #line 1677 "configure"
1678 #include "confdefs.h"
1679 #include <stdlib.h>
1680 $ac_declaration
1681 int
1682 main (void)
1683 {
1684 exit (42);
1685   ;
1686   return 0;
1687 }
1688 _ACEOF
1689 rm -f conftest.$ac_objext
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691   (eval $ac_compile) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); } &&
1695          { ac_try='test -s conftest.$ac_objext'
1696   { (eval echo "$as_me:1696: \"$ac_try\"") >&5
1697   (eval $ac_try) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }; }; then
1701   :
1702 else
1703   echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1705 continue
1706 fi
1707 rm -f conftest.$ac_objext conftest.$ac_ext
1708   cat >conftest.$ac_ext <<_ACEOF
1709 #line 1709 "configure"
1710 #include "confdefs.h"
1711 $ac_declaration
1712 int
1713 main (void)
1714 {
1715 exit (42);
1716   ;
1717   return 0;
1718 }
1719 _ACEOF
1720 rm -f conftest.$ac_objext
1721 if { (eval echo "$as_me:1721: \"$ac_compile\"") >&5
1722   (eval $ac_compile) 2>&5
1723   ac_status=$?
1724   echo "$as_me:1724: \$? = $ac_status" >&5
1725   (exit $ac_status); } &&
1726          { ac_try='test -s conftest.$ac_objext'
1727   { (eval echo "$as_me:1727: \"$ac_try\"") >&5
1728   (eval $ac_try) 2>&5
1729   ac_status=$?
1730   echo "$as_me:1730: \$? = $ac_status" >&5
1731   (exit $ac_status); }; }; then
1732   break
1733 else
1734   echo "$as_me: failed program was:" >&5
1735 cat conftest.$ac_ext >&5
1736 fi
1737 rm -f conftest.$ac_objext conftest.$ac_ext
1738 done
1739 rm -rf conftest*
1740 if test -n "$ac_declaration"; then
1741   echo '#ifdef __cplusplus' >>confdefs.h
1742   echo $ac_declaration      >>confdefs.h
1743   echo '#endif'             >>confdefs.h
1744 fi
1745
1746 else
1747   echo "$as_me: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1749 fi
1750 rm -f conftest.$ac_objext conftest.$ac_ext
1751 ac_ext=c
1752 ac_cpp='$CPP $CPPFLAGS'
1753 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1754 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1756 ac_main_return=return
1757
1758 GCC_VERSION=none
1759 if test "$GCC" = yes ; then
1760         echo "$as_me:1760: checking version of $CC" >&5
1761 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1762         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.].*//'`"
1763         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1764         echo "$as_me:1764: result: $GCC_VERSION" >&5
1765 echo "${ECHO_T}$GCC_VERSION" >&6
1766 fi
1767
1768 echo "$as_me:1768: checking for $CC option to accept ANSI C" >&5
1769 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1770 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1771   echo $ECHO_N "(cached) $ECHO_C" >&6
1772 else
1773   ac_cv_prog_cc_stdc=no
1774 ac_save_CC=$CC
1775 cat >conftest.$ac_ext <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778 #include <stdarg.h>
1779 #include <stdio.h>
1780 #include <sys/types.h>
1781 #include <sys/stat.h>
1782 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1783 struct buf { int x; };
1784 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1785 static char *e (p, i)
1786      char **p;
1787      int i;
1788 {
1789   return p[i];
1790 }
1791 static char *f (char * (*g) (char **, int), char **p, ...)
1792 {
1793   char *s;
1794   va_list v;
1795   va_start (v,p);
1796   s = g (p, va_arg (v,int));
1797   va_end (v);
1798   return s;
1799 }
1800 int test (int i, double x);
1801 struct s1 {int (*f) (int a);};
1802 struct s2 {int (*f) (double a);};
1803 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1804 int argc;
1805 char **argv;
1806 int
1807 main (void)
1808 {
1809 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1810   ;
1811   return 0;
1812 }
1813 _ACEOF
1814 # Don't try gcc -ansi; that turns off useful extensions and
1815 # breaks some systems' header files.
1816 # AIX                   -qlanglvl=ansi
1817 # Ultrix and OSF/1      -std1
1818 # HP-UX 10.20 and later -Ae
1819 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1820 # SVR4                  -Xc -D__EXTENSIONS__
1821 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1822 do
1823   CC="$ac_save_CC $ac_arg"
1824   rm -f conftest.$ac_objext
1825 if { (eval echo "$as_me:1825: \"$ac_compile\"") >&5
1826   (eval $ac_compile) 2>&5
1827   ac_status=$?
1828   echo "$as_me:1828: \$? = $ac_status" >&5
1829   (exit $ac_status); } &&
1830          { ac_try='test -s conftest.$ac_objext'
1831   { (eval echo "$as_me:1831: \"$ac_try\"") >&5
1832   (eval $ac_try) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); }; }; then
1836   ac_cv_prog_cc_stdc=$ac_arg
1837 break
1838 else
1839   echo "$as_me: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
1841 fi
1842 rm -f conftest.$ac_objext
1843 done
1844 rm -f conftest.$ac_ext conftest.$ac_objext
1845 CC=$ac_save_CC
1846
1847 fi
1848
1849 case "x$ac_cv_prog_cc_stdc" in
1850   x|xno)
1851     echo "$as_me:1851: result: none needed" >&5
1852 echo "${ECHO_T}none needed" >&6 ;;
1853   *)
1854     echo "$as_me:1854: result: $ac_cv_prog_cc_stdc" >&5
1855 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1856     CC="$CC $ac_cv_prog_cc_stdc" ;;
1857 esac
1858
1859 # This should have been defined by AC_PROG_CC
1860 : ${CC:=cc}
1861
1862 echo "$as_me:1862: checking \$CC variable" >&5
1863 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1864 case "$CC" in
1865 (*[\ \  ]-*)
1866         echo "$as_me:1866: result: broken" >&5
1867 echo "${ECHO_T}broken" >&6
1868         { echo "$as_me:1868: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1869 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1870         # humor him...
1871         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1872         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1873         CC="$cf_prog"
1874         for cf_arg in $cf_flags
1875         do
1876                 case "x$cf_arg" in
1877                 (x-[IUDfgOW]*)
1878
1879 cf_fix_cppflags=no
1880 cf_new_cflags=
1881 cf_new_cppflags=
1882 cf_new_extra_cppflags=
1883
1884 for cf_add_cflags in $cf_arg
1885 do
1886 case $cf_fix_cppflags in
1887 (no)
1888         case $cf_add_cflags in
1889         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1890                 case $cf_add_cflags in
1891                 (-D*)
1892                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1893
1894                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1895                                 && test -z "${cf_tst_cflags}" \
1896                                 && cf_fix_cppflags=yes
1897
1898                         if test $cf_fix_cppflags = yes ; then
1899
1900         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1901         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1902
1903                                 continue
1904                         elif test "${cf_tst_cflags}" = "\"'" ; then
1905
1906         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1907         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1908
1909                                 continue
1910                         fi
1911                         ;;
1912                 esac
1913                 case "$CPPFLAGS" in
1914                 (*$cf_add_cflags)
1915                         ;;
1916                 (*)
1917                         case $cf_add_cflags in
1918                         (-D*)
1919                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1920
1921 CPPFLAGS=`echo "$CPPFLAGS" | \
1922         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
1923                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
1924
1925                                 ;;
1926                         esac
1927
1928         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1929         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1930
1931                         ;;
1932                 esac
1933                 ;;
1934         (*)
1935
1936         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1937         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1938
1939                 ;;
1940         esac
1941         ;;
1942 (yes)
1943
1944         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1945         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1946
1947         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1948
1949         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1950                 && test -z "${cf_tst_cflags}" \
1951                 && cf_fix_cppflags=no
1952         ;;
1953 esac
1954 done
1955
1956 if test -n "$cf_new_cflags" ; then
1957
1958         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1959         CFLAGS="${CFLAGS}$cf_new_cflags"
1960
1961 fi
1962
1963 if test -n "$cf_new_cppflags" ; then
1964
1965         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1966         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1967
1968 fi
1969
1970 if test -n "$cf_new_extra_cppflags" ; then
1971
1972         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1973         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1974
1975 fi
1976
1977                         ;;
1978                 (*)
1979                         CC="$CC $cf_arg"
1980                         ;;
1981                 esac
1982         done
1983         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
1984
1985 echo "${as_me:-configure}:1985: testing resulting CC: '$CC' ..." 1>&5
1986
1987         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
1988
1989 echo "${as_me:-configure}:1989: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
1990
1991         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
1992
1993 echo "${as_me:-configure}:1993: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
1994
1995         ;;
1996 (*)
1997         echo "$as_me:1997: result: ok" >&5
1998 echo "${ECHO_T}ok" >&6
1999         ;;
2000 esac
2001
2002 ac_ext=c
2003 ac_cpp='$CPP $CPPFLAGS'
2004 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2005 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2006 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2007 ac_main_return=return
2008 echo "$as_me:2008: checking how to run the C preprocessor" >&5
2009 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2010 # On Suns, sometimes $CPP names a directory.
2011 if test -n "$CPP" && test -d "$CPP"; then
2012   CPP=
2013 fi
2014 if test -z "$CPP"; then
2015   if test "${ac_cv_prog_CPP+set}" = set; then
2016   echo $ECHO_N "(cached) $ECHO_C" >&6
2017 else
2018       # Double quotes because CPP needs to be expanded
2019     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2020     do
2021       ac_preproc_ok=false
2022 for ac_c_preproc_warn_flag in '' yes
2023 do
2024   # Use a header file that comes with gcc, so configuring glibc
2025   # with a fresh cross-compiler works.
2026   # On the NeXT, cc -E runs the code through the compiler's parser,
2027   # not just through cpp. "Syntax error" is here to catch this case.
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 #include <assert.h>
2032                      Syntax error
2033 _ACEOF
2034 if { (eval echo "$as_me:2034: \"$ac_cpp conftest.$ac_ext\"") >&5
2035   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2036   ac_status=$?
2037   egrep -v '^ *\+' conftest.er1 >conftest.err
2038   rm -f conftest.er1
2039   cat conftest.err >&5
2040   echo "$as_me:2040: \$? = $ac_status" >&5
2041   (exit $ac_status); } >/dev/null; then
2042   if test -s conftest.err; then
2043     ac_cpp_err=$ac_c_preproc_warn_flag
2044   else
2045     ac_cpp_err=
2046   fi
2047 else
2048   ac_cpp_err=yes
2049 fi
2050 if test -z "$ac_cpp_err"; then
2051   :
2052 else
2053   echo "$as_me: failed program was:" >&5
2054   cat conftest.$ac_ext >&5
2055   # Broken: fails on valid input.
2056 continue
2057 fi
2058 rm -f conftest.err conftest.$ac_ext
2059
2060   # OK, works on sane cases.  Now check whether non-existent headers
2061   # can be detected and how.
2062   cat >conftest.$ac_ext <<_ACEOF
2063 #line 2063 "configure"
2064 #include "confdefs.h"
2065 #include <ac_nonexistent.h>
2066 _ACEOF
2067 if { (eval echo "$as_me:2067: \"$ac_cpp conftest.$ac_ext\"") >&5
2068   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2069   ac_status=$?
2070   egrep -v '^ *\+' conftest.er1 >conftest.err
2071   rm -f conftest.er1
2072   cat conftest.err >&5
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit $ac_status); } >/dev/null; then
2075   if test -s conftest.err; then
2076     ac_cpp_err=$ac_c_preproc_warn_flag
2077   else
2078     ac_cpp_err=
2079   fi
2080 else
2081   ac_cpp_err=yes
2082 fi
2083 if test -z "$ac_cpp_err"; then
2084   # Broken: success on invalid input.
2085 continue
2086 else
2087   echo "$as_me: failed program was:" >&5
2088   cat conftest.$ac_ext >&5
2089   # Passes both tests.
2090 ac_preproc_ok=:
2091 break
2092 fi
2093 rm -f conftest.err conftest.$ac_ext
2094
2095 done
2096 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2097 rm -f conftest.err conftest.$ac_ext
2098 if $ac_preproc_ok; then
2099   break
2100 fi
2101
2102     done
2103     ac_cv_prog_CPP=$CPP
2104
2105 fi
2106   CPP=$ac_cv_prog_CPP
2107 else
2108   ac_cv_prog_CPP=$CPP
2109 fi
2110 echo "$as_me:2110: result: $CPP" >&5
2111 echo "${ECHO_T}$CPP" >&6
2112 ac_preproc_ok=false
2113 for ac_c_preproc_warn_flag in '' yes
2114 do
2115   # Use a header file that comes with gcc, so configuring glibc
2116   # with a fresh cross-compiler works.
2117   # On the NeXT, cc -E runs the code through the compiler's parser,
2118   # not just through cpp. "Syntax error" is here to catch this case.
2119   cat >conftest.$ac_ext <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122 #include <assert.h>
2123                      Syntax error
2124 _ACEOF
2125 if { (eval echo "$as_me:2125: \"$ac_cpp conftest.$ac_ext\"") >&5
2126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2127   ac_status=$?
2128   egrep -v '^ *\+' conftest.er1 >conftest.err
2129   rm -f conftest.er1
2130   cat conftest.err >&5
2131   echo "$as_me:2131: \$? = $ac_status" >&5
2132   (exit $ac_status); } >/dev/null; then
2133   if test -s conftest.err; then
2134     ac_cpp_err=$ac_c_preproc_warn_flag
2135   else
2136     ac_cpp_err=
2137   fi
2138 else
2139   ac_cpp_err=yes
2140 fi
2141 if test -z "$ac_cpp_err"; then
2142   :
2143 else
2144   echo "$as_me: failed program was:" >&5
2145   cat conftest.$ac_ext >&5
2146   # Broken: fails on valid input.
2147 continue
2148 fi
2149 rm -f conftest.err conftest.$ac_ext
2150
2151   # OK, works on sane cases.  Now check whether non-existent headers
2152   # can be detected and how.
2153   cat >conftest.$ac_ext <<_ACEOF
2154 #line 2154 "configure"
2155 #include "confdefs.h"
2156 #include <ac_nonexistent.h>
2157 _ACEOF
2158 if { (eval echo "$as_me:2158: \"$ac_cpp conftest.$ac_ext\"") >&5
2159   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2160   ac_status=$?
2161   egrep -v '^ *\+' conftest.er1 >conftest.err
2162   rm -f conftest.er1
2163   cat conftest.err >&5
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit $ac_status); } >/dev/null; then
2166   if test -s conftest.err; then
2167     ac_cpp_err=$ac_c_preproc_warn_flag
2168   else
2169     ac_cpp_err=
2170   fi
2171 else
2172   ac_cpp_err=yes
2173 fi
2174 if test -z "$ac_cpp_err"; then
2175   # Broken: success on invalid input.
2176 continue
2177 else
2178   echo "$as_me: failed program was:" >&5
2179   cat conftest.$ac_ext >&5
2180   # Passes both tests.
2181 ac_preproc_ok=:
2182 break
2183 fi
2184 rm -f conftest.err conftest.$ac_ext
2185
2186 done
2187 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2188 rm -f conftest.err conftest.$ac_ext
2189 if $ac_preproc_ok; then
2190   :
2191 else
2192   { { echo "$as_me:2192: error: C preprocessor \"$CPP\" fails sanity check" >&5
2193 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2194    { (exit 1); exit 1; }; }
2195 fi
2196
2197 ac_ext=c
2198 ac_cpp='$CPP $CPPFLAGS'
2199 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2200 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2201 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2202 ac_main_return=return
2203
2204 echo "$as_me:2204: checking whether ${MAKE-make} sets \${MAKE}" >&5
2205 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2206 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2207 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2208   echo $ECHO_N "(cached) $ECHO_C" >&6
2209 else
2210   cat >conftest.make <<\EOF
2211 all:
2212         @echo 'ac_maketemp="${MAKE}"'
2213 EOF
2214 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2215 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2216 if test -n "$ac_maketemp"; then
2217   eval ac_cv_prog_make_${ac_make}_set=yes
2218 else
2219   eval ac_cv_prog_make_${ac_make}_set=no
2220 fi
2221 rm -f conftest.make
2222 fi
2223 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2224   echo "$as_me:2224: result: yes" >&5
2225 echo "${ECHO_T}yes" >&6
2226   SET_MAKE=
2227 else
2228   echo "$as_me:2228: result: no" >&5
2229 echo "${ECHO_T}no" >&6
2230   SET_MAKE="MAKE=${MAKE-make}"
2231 fi
2232
2233 if test -n "$ac_tool_prefix"; then
2234   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2235 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2236 echo "$as_me:2236: checking for $ac_word" >&5
2237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2238 if test "${ac_cv_prog_RANLIB+set}" = set; then
2239   echo $ECHO_N "(cached) $ECHO_C" >&6
2240 else
2241   if test -n "$RANLIB"; then
2242   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2243 else
2244   ac_save_IFS=$IFS; IFS=$ac_path_separator
2245 ac_dummy="$PATH"
2246 for ac_dir in $ac_dummy; do
2247   IFS=$ac_save_IFS
2248   test -z "$ac_dir" && ac_dir=.
2249   $as_executable_p "$ac_dir/$ac_word" || continue
2250 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2251 echo "$as_me:2251: found $ac_dir/$ac_word" >&5
2252 break
2253 done
2254
2255 fi
2256 fi
2257 RANLIB=$ac_cv_prog_RANLIB
2258 if test -n "$RANLIB"; then
2259   echo "$as_me:2259: result: $RANLIB" >&5
2260 echo "${ECHO_T}$RANLIB" >&6
2261 else
2262   echo "$as_me:2262: result: no" >&5
2263 echo "${ECHO_T}no" >&6
2264 fi
2265
2266 fi
2267 if test -z "$ac_cv_prog_RANLIB"; then
2268   ac_ct_RANLIB=$RANLIB
2269   # Extract the first word of "ranlib", so it can be a program name with args.
2270 set dummy ranlib; ac_word=$2
2271 echo "$as_me:2271: checking for $ac_word" >&5
2272 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2273 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
2274   echo $ECHO_N "(cached) $ECHO_C" >&6
2275 else
2276   if test -n "$ac_ct_RANLIB"; then
2277   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
2278 else
2279   ac_save_IFS=$IFS; IFS=$ac_path_separator
2280 ac_dummy="$PATH"
2281 for ac_dir in $ac_dummy; do
2282   IFS=$ac_save_IFS
2283   test -z "$ac_dir" && ac_dir=.
2284   $as_executable_p "$ac_dir/$ac_word" || continue
2285 ac_cv_prog_ac_ct_RANLIB="ranlib"
2286 echo "$as_me:2286: found $ac_dir/$ac_word" >&5
2287 break
2288 done
2289
2290   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
2291 fi
2292 fi
2293 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
2294 if test -n "$ac_ct_RANLIB"; then
2295   echo "$as_me:2295: result: $ac_ct_RANLIB" >&5
2296 echo "${ECHO_T}$ac_ct_RANLIB" >&6
2297 else
2298   echo "$as_me:2298: result: no" >&5
2299 echo "${ECHO_T}no" >&6
2300 fi
2301
2302   RANLIB=$ac_ct_RANLIB
2303 else
2304   RANLIB="$ac_cv_prog_RANLIB"
2305 fi
2306
2307 ac_aux_dir=
2308 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2309   if test -f $ac_dir/install-sh; then
2310     ac_aux_dir=$ac_dir
2311     ac_install_sh="$ac_aux_dir/install-sh -c"
2312     break
2313   elif test -f $ac_dir/install.sh; then
2314     ac_aux_dir=$ac_dir
2315     ac_install_sh="$ac_aux_dir/install.sh -c"
2316     break
2317   elif test -f $ac_dir/shtool; then
2318     ac_aux_dir=$ac_dir
2319     ac_install_sh="$ac_aux_dir/shtool install -c"
2320     break
2321   fi
2322 done
2323 if test -z "$ac_aux_dir"; then
2324   { { echo "$as_me:2324: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
2325 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
2326    { (exit 1); exit 1; }; }
2327 fi
2328 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
2329 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
2330 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
2331
2332 # Find a good install program.  We prefer a C program (faster),
2333 # so one script is as good as another.  But avoid the broken or
2334 # incompatible versions:
2335 # SysV /etc/install, /usr/sbin/install
2336 # SunOS /usr/etc/install
2337 # IRIX /sbin/install
2338 # AIX /bin/install
2339 # AmigaOS /C/install, which installs bootblocks on floppy discs
2340 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2341 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2342 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2343 # ./install, which can be erroneously created by make from ./install.sh.
2344 echo "$as_me:2344: checking for a BSD compatible install" >&5
2345 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2346 if test -z "$INSTALL"; then
2347 if test "${ac_cv_path_install+set}" = set; then
2348   echo $ECHO_N "(cached) $ECHO_C" >&6
2349 else
2350     ac_save_IFS=$IFS; IFS=$ac_path_separator
2351   for ac_dir in $PATH; do
2352     IFS=$ac_save_IFS
2353     # Account for people who put trailing slashes in PATH elements.
2354     case $ac_dir/ in
2355     / | ./ | .// | /cC/* \
2356     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2357     | /usr/ucb/* ) ;;
2358     *)
2359       # OSF1 and SCO ODT 3.0 have their own names for install.
2360       # Don't use installbsd from OSF since it installs stuff as root
2361       # by default.
2362       for ac_prog in ginstall scoinst install; do
2363         if $as_executable_p "$ac_dir/$ac_prog"; then
2364           if test $ac_prog = install &&
2365             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2366             # AIX install.  It has an incompatible calling convention.
2367             :
2368           elif test $ac_prog = install &&
2369             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2370             # program-specific install script used by HP pwplus--don't use.
2371             :
2372           else
2373             ac_cv_path_install="$ac_dir/$ac_prog -c"
2374             break 2
2375           fi
2376         fi
2377       done
2378       ;;
2379     esac
2380   done
2381
2382 fi
2383   if test "${ac_cv_path_install+set}" = set; then
2384     INSTALL=$ac_cv_path_install
2385   else
2386     # As a last resort, use the slow shell script.  We don't cache a
2387     # path for INSTALL within a source directory, because that will
2388     # break other packages using the cache if that directory is
2389     # removed, or if the path is relative.
2390     INSTALL=$ac_install_sh
2391   fi
2392 fi
2393 echo "$as_me:2393: result: $INSTALL" >&5
2394 echo "${ECHO_T}$INSTALL" >&6
2395
2396 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2397 # It thinks the first close brace ends the variable substitution.
2398 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2399
2400 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2401
2402 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2403
2404 echo "$as_me:2404: checking whether ln -s works" >&5
2405 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2406 LN_S=$as_ln_s
2407 if test "$LN_S" = "ln -s"; then
2408   echo "$as_me:2408: result: yes" >&5
2409 echo "${ECHO_T}yes" >&6
2410 else
2411   echo "$as_me:2411: result: no, using $LN_S" >&5
2412 echo "${ECHO_T}no, using $LN_S" >&6
2413 fi
2414
2415 echo "$as_me:2415: checking if $LN_S -f options work" >&5
2416 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2417
2418 rm -f conf$$.src conf$$dst
2419 echo >conf$$.dst
2420 echo first >conf$$.src
2421 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2422         cf_prog_ln_sf=yes
2423 else
2424         cf_prog_ln_sf=no
2425 fi
2426 rm -f conf$$.dst conf$$src
2427 echo "$as_me:2427: result: $cf_prog_ln_sf" >&5
2428 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2429
2430 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2431
2432 for ac_prog in lint cppcheck splint
2433 do
2434   # Extract the first word of "$ac_prog", so it can be a program name with args.
2435 set dummy $ac_prog; ac_word=$2
2436 echo "$as_me:2436: checking for $ac_word" >&5
2437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2438 if test "${ac_cv_prog_LINT+set}" = set; then
2439   echo $ECHO_N "(cached) $ECHO_C" >&6
2440 else
2441   if test -n "$LINT"; then
2442   ac_cv_prog_LINT="$LINT" # Let the user override the test.
2443 else
2444   ac_save_IFS=$IFS; IFS=$ac_path_separator
2445 ac_dummy="$PATH"
2446 for ac_dir in $ac_dummy; do
2447   IFS=$ac_save_IFS
2448   test -z "$ac_dir" && ac_dir=.
2449   $as_executable_p "$ac_dir/$ac_word" || continue
2450 ac_cv_prog_LINT="$ac_prog"
2451 echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452 break
2453 done
2454
2455 fi
2456 fi
2457 LINT=$ac_cv_prog_LINT
2458 if test -n "$LINT"; then
2459   echo "$as_me:2459: result: $LINT" >&5
2460 echo "${ECHO_T}$LINT" >&6
2461 else
2462   echo "$as_me:2462: result: no" >&5
2463 echo "${ECHO_T}no" >&6
2464 fi
2465
2466   test -n "$LINT" && break
2467 done
2468
2469 # Extract the first word of "groff", so it can be a program name with args.
2470 set dummy groff; ac_word=$2
2471 echo "$as_me:2471: checking for $ac_word" >&5
2472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2473 if test "${ac_cv_path_GROFF_PATH+set}" = set; then
2474   echo $ECHO_N "(cached) $ECHO_C" >&6
2475 else
2476   case $GROFF_PATH in
2477   [\\/]* | ?:[\\/]*)
2478   ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
2479   ;;
2480   *)
2481   ac_save_IFS=$IFS; IFS=$ac_path_separator
2482 ac_dummy="$PATH"
2483 for ac_dir in $ac_dummy; do
2484   IFS=$ac_save_IFS
2485   test -z "$ac_dir" && ac_dir=.
2486   if $as_executable_p "$ac_dir/$ac_word"; then
2487    ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
2488    echo "$as_me:2488: found $ac_dir/$ac_word" >&5
2489    break
2490 fi
2491 done
2492
2493   test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
2494   ;;
2495 esac
2496 fi
2497 GROFF_PATH=$ac_cv_path_GROFF_PATH
2498
2499 if test -n "$GROFF_PATH"; then
2500   echo "$as_me:2500: result: $GROFF_PATH" >&5
2501 echo "${ECHO_T}$GROFF_PATH" >&6
2502 else
2503   echo "$as_me:2503: result: no" >&5
2504 echo "${ECHO_T}no" >&6
2505 fi
2506
2507 for ac_prog in nroff mandoc
2508 do
2509   # Extract the first word of "$ac_prog", so it can be a program name with args.
2510 set dummy $ac_prog; ac_word=$2
2511 echo "$as_me:2511: checking for $ac_word" >&5
2512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2513 if test "${ac_cv_path_NROFF_PATH+set}" = set; then
2514   echo $ECHO_N "(cached) $ECHO_C" >&6
2515 else
2516   case $NROFF_PATH in
2517   [\\/]* | ?:[\\/]*)
2518   ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
2519   ;;
2520   *)
2521   ac_save_IFS=$IFS; IFS=$ac_path_separator
2522 ac_dummy="$PATH"
2523 for ac_dir in $ac_dummy; do
2524   IFS=$ac_save_IFS
2525   test -z "$ac_dir" && ac_dir=.
2526   if $as_executable_p "$ac_dir/$ac_word"; then
2527    ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
2528    echo "$as_me:2528: found $ac_dir/$ac_word" >&5
2529    break
2530 fi
2531 done
2532
2533   ;;
2534 esac
2535 fi
2536 NROFF_PATH=$ac_cv_path_NROFF_PATH
2537
2538 if test -n "$NROFF_PATH"; then
2539   echo "$as_me:2539: result: $NROFF_PATH" >&5
2540 echo "${ECHO_T}$NROFF_PATH" >&6
2541 else
2542   echo "$as_me:2542: result: no" >&5
2543 echo "${ECHO_T}no" >&6
2544 fi
2545
2546   test -n "$NROFF_PATH" && break
2547 done
2548 test -n "$NROFF_PATH" || NROFF_PATH="no"
2549
2550 # Extract the first word of "tbl", so it can be a program name with args.
2551 set dummy tbl; ac_word=$2
2552 echo "$as_me:2552: checking for $ac_word" >&5
2553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2554 if test "${ac_cv_path_TBL_PATH+set}" = set; then
2555   echo $ECHO_N "(cached) $ECHO_C" >&6
2556 else
2557   case $TBL_PATH in
2558   [\\/]* | ?:[\\/]*)
2559   ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
2560   ;;
2561   *)
2562   ac_save_IFS=$IFS; IFS=$ac_path_separator
2563 ac_dummy="$PATH"
2564 for ac_dir in $ac_dummy; do
2565   IFS=$ac_save_IFS
2566   test -z "$ac_dir" && ac_dir=.
2567   if $as_executable_p "$ac_dir/$ac_word"; then
2568    ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
2569    echo "$as_me:2569: found $ac_dir/$ac_word" >&5
2570    break
2571 fi
2572 done
2573
2574   test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
2575   ;;
2576 esac
2577 fi
2578 TBL_PATH=$ac_cv_path_TBL_PATH
2579
2580 if test -n "$TBL_PATH"; then
2581   echo "$as_me:2581: result: $TBL_PATH" >&5
2582 echo "${ECHO_T}$TBL_PATH" >&6
2583 else
2584   echo "$as_me:2584: result: no" >&5
2585 echo "${ECHO_T}no" >&6
2586 fi
2587
2588 if test "x$GROFF_PATH" = xno
2589 then
2590         NROFF_NOTE=
2591         GROFF_NOTE="#"
2592 else
2593         NROFF_NOTE="#"
2594         GROFF_NOTE=
2595 fi
2596
2597 test -z "$GROFF_NOTE" && NROFF_NOTE=
2598
2599 if test -n "$ac_tool_prefix"; then
2600   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2601 set dummy ${ac_tool_prefix}ar; ac_word=$2
2602 echo "$as_me:2602: checking for $ac_word" >&5
2603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2604 if test "${ac_cv_prog_AR+set}" = set; then
2605   echo $ECHO_N "(cached) $ECHO_C" >&6
2606 else
2607   if test -n "$AR"; then
2608   ac_cv_prog_AR="$AR" # Let the user override the test.
2609 else
2610   ac_save_IFS=$IFS; IFS=$ac_path_separator
2611 ac_dummy="$PATH"
2612 for ac_dir in $ac_dummy; do
2613   IFS=$ac_save_IFS
2614   test -z "$ac_dir" && ac_dir=.
2615   $as_executable_p "$ac_dir/$ac_word" || continue
2616 ac_cv_prog_AR="${ac_tool_prefix}ar"
2617 echo "$as_me:2617: found $ac_dir/$ac_word" >&5
2618 break
2619 done
2620
2621 fi
2622 fi
2623 AR=$ac_cv_prog_AR
2624 if test -n "$AR"; then
2625   echo "$as_me:2625: result: $AR" >&5
2626 echo "${ECHO_T}$AR" >&6
2627 else
2628   echo "$as_me:2628: result: no" >&5
2629 echo "${ECHO_T}no" >&6
2630 fi
2631
2632 fi
2633 if test -z "$ac_cv_prog_AR"; then
2634   ac_ct_AR=$AR
2635   # Extract the first word of "ar", so it can be a program name with args.
2636 set dummy ar; ac_word=$2
2637 echo "$as_me:2637: checking for $ac_word" >&5
2638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2639 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
2640   echo $ECHO_N "(cached) $ECHO_C" >&6
2641 else
2642   if test -n "$ac_ct_AR"; then
2643   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
2644 else
2645   ac_save_IFS=$IFS; IFS=$ac_path_separator
2646 ac_dummy="$PATH"
2647 for ac_dir in $ac_dummy; do
2648   IFS=$ac_save_IFS
2649   test -z "$ac_dir" && ac_dir=.
2650   $as_executable_p "$ac_dir/$ac_word" || continue
2651 ac_cv_prog_ac_ct_AR="ar"
2652 echo "$as_me:2652: found $ac_dir/$ac_word" >&5
2653 break
2654 done
2655
2656   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
2657 fi
2658 fi
2659 ac_ct_AR=$ac_cv_prog_ac_ct_AR
2660 if test -n "$ac_ct_AR"; then
2661   echo "$as_me:2661: result: $ac_ct_AR" >&5
2662 echo "${ECHO_T}$ac_ct_AR" >&6
2663 else
2664   echo "$as_me:2664: result: no" >&5
2665 echo "${ECHO_T}no" >&6
2666 fi
2667
2668   AR=$ac_ct_AR
2669 else
2670   AR="$ac_cv_prog_AR"
2671 fi
2672
2673 echo "$as_me:2673: checking for options to update archives" >&5
2674 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
2675 if test "${cf_cv_ar_flags+set}" = set; then
2676   echo $ECHO_N "(cached) $ECHO_C" >&6
2677 else
2678
2679         cf_cv_ar_flags=unknown
2680         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
2681         do
2682
2683                 # check if $ARFLAGS already contains this choice
2684                 if test "x$ARFLAGS" != "x" ; then
2685                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
2686                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
2687                                 cf_cv_ar_flags=
2688                                 break
2689                         fi
2690                 fi
2691
2692                 rm -f conftest.$ac_cv_objext
2693                 rm -f conftest.a
2694
2695                 cat >conftest.$ac_ext <<EOF
2696 #line 2696 "configure"
2697 int     testdata[3] = { 123, 456, 789 };
2698 EOF
2699                 if { (eval echo "$as_me:2699: \"$ac_compile\"") >&5
2700   (eval $ac_compile) 2>&5
2701   ac_status=$?
2702   echo "$as_me:2702: \$? = $ac_status" >&5
2703   (exit $ac_status); } ; then
2704                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
2705                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
2706                         if test -f conftest.a ; then
2707                                 cf_cv_ar_flags=$cf_ar_flags
2708                                 break
2709                         fi
2710                 else
2711                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
2712
2713 echo "${as_me:-configure}:2713: testing cannot compile test-program ..." 1>&5
2714
2715                         break
2716                 fi
2717         done
2718         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
2719
2720 fi
2721 echo "$as_me:2721: result: $cf_cv_ar_flags" >&5
2722 echo "${ECHO_T}$cf_cv_ar_flags" >&6
2723
2724 if test -n "$ARFLAGS" ; then
2725         if test -n "$cf_cv_ar_flags" ; then
2726                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
2727         fi
2728 else
2729         ARFLAGS=$cf_cv_ar_flags
2730 fi
2731
2732 echo "$as_me:2732: checking for makeflags variable" >&5
2733 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2734 if test "${cf_cv_makeflags+set}" = set; then
2735   echo $ECHO_N "(cached) $ECHO_C" >&6
2736 else
2737
2738         cf_cv_makeflags=''
2739         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2740         do
2741                 cat >cf_makeflags.tmp <<CF_EOF
2742 SHELL = $SHELL
2743 all :
2744         @ echo '.$cf_option'
2745 CF_EOF
2746                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
2747                 case "$cf_result" in
2748                 (.*k|.*kw)
2749                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2750                         case "$cf_result" in
2751                         (.*CC=*)        cf_cv_makeflags=
2752                                 ;;
2753                         (*)     cf_cv_makeflags=$cf_option
2754                                 ;;
2755                         esac
2756                         break
2757                         ;;
2758                 (.-)
2759                         ;;
2760                 (*)
2761
2762 echo "${as_me:-configure}:2762: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
2763
2764                         ;;
2765                 esac
2766         done
2767         rm -f cf_makeflags.tmp
2768
2769 fi
2770 echo "$as_me:2770: result: $cf_cv_makeflags" >&5
2771 echo "${ECHO_T}$cf_cv_makeflags" >&6
2772
2773 echo "$as_me:2773: checking if filesystem supports mixed-case filenames" >&5
2774 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2775 if test "${cf_cv_mixedcase+set}" = set; then
2776   echo $ECHO_N "(cached) $ECHO_C" >&6
2777 else
2778
2779 if test "$cross_compiling" = yes ; then
2780         case $target_alias in
2781         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2782                 cf_cv_mixedcase=no
2783                 ;;
2784         (*)
2785                 cf_cv_mixedcase=yes
2786                 ;;
2787         esac
2788 else
2789         rm -f conftest CONFTEST
2790         echo test >conftest
2791         if test -f CONFTEST ; then
2792                 cf_cv_mixedcase=no
2793         else
2794                 cf_cv_mixedcase=yes
2795         fi
2796         rm -f conftest CONFTEST
2797 fi
2798
2799 fi
2800 echo "$as_me:2800: result: $cf_cv_mixedcase" >&5
2801 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2802 test "$cf_cv_mixedcase" = yes &&
2803 cat >>confdefs.h <<\EOF
2804 #define MIXEDCASE_FILENAMES 1
2805 EOF
2806
2807 for ac_prog in exctags ctags
2808 do
2809   # Extract the first word of "$ac_prog", so it can be a program name with args.
2810 set dummy $ac_prog; ac_word=$2
2811 echo "$as_me:2811: checking for $ac_word" >&5
2812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813 if test "${ac_cv_prog_CTAGS+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   if test -n "$CTAGS"; then
2817   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2818 else
2819   ac_save_IFS=$IFS; IFS=$ac_path_separator
2820 ac_dummy="$PATH"
2821 for ac_dir in $ac_dummy; do
2822   IFS=$ac_save_IFS
2823   test -z "$ac_dir" && ac_dir=.
2824   $as_executable_p "$ac_dir/$ac_word" || continue
2825 ac_cv_prog_CTAGS="$ac_prog"
2826 echo "$as_me:2826: found $ac_dir/$ac_word" >&5
2827 break
2828 done
2829
2830 fi
2831 fi
2832 CTAGS=$ac_cv_prog_CTAGS
2833 if test -n "$CTAGS"; then
2834   echo "$as_me:2834: result: $CTAGS" >&5
2835 echo "${ECHO_T}$CTAGS" >&6
2836 else
2837   echo "$as_me:2837: result: no" >&5
2838 echo "${ECHO_T}no" >&6
2839 fi
2840
2841   test -n "$CTAGS" && break
2842 done
2843
2844 for ac_prog in exetags etags
2845 do
2846   # Extract the first word of "$ac_prog", so it can be a program name with args.
2847 set dummy $ac_prog; ac_word=$2
2848 echo "$as_me:2848: checking for $ac_word" >&5
2849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2850 if test "${ac_cv_prog_ETAGS+set}" = set; then
2851   echo $ECHO_N "(cached) $ECHO_C" >&6
2852 else
2853   if test -n "$ETAGS"; then
2854   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2855 else
2856   ac_save_IFS=$IFS; IFS=$ac_path_separator
2857 ac_dummy="$PATH"
2858 for ac_dir in $ac_dummy; do
2859   IFS=$ac_save_IFS
2860   test -z "$ac_dir" && ac_dir=.
2861   $as_executable_p "$ac_dir/$ac_word" || continue
2862 ac_cv_prog_ETAGS="$ac_prog"
2863 echo "$as_me:2863: found $ac_dir/$ac_word" >&5
2864 break
2865 done
2866
2867 fi
2868 fi
2869 ETAGS=$ac_cv_prog_ETAGS
2870 if test -n "$ETAGS"; then
2871   echo "$as_me:2871: result: $ETAGS" >&5
2872 echo "${ECHO_T}$ETAGS" >&6
2873 else
2874   echo "$as_me:2874: result: no" >&5
2875 echo "${ECHO_T}no" >&6
2876 fi
2877
2878   test -n "$ETAGS" && break
2879 done
2880
2881 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2882 set dummy ${CTAGS:-ctags}; ac_word=$2
2883 echo "$as_me:2883: checking for $ac_word" >&5
2884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2885 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2886   echo $ECHO_N "(cached) $ECHO_C" >&6
2887 else
2888   if test -n "$MAKE_LOWER_TAGS"; then
2889   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2890 else
2891   ac_save_IFS=$IFS; IFS=$ac_path_separator
2892 ac_dummy="$PATH"
2893 for ac_dir in $ac_dummy; do
2894   IFS=$ac_save_IFS
2895   test -z "$ac_dir" && ac_dir=.
2896   $as_executable_p "$ac_dir/$ac_word" || continue
2897 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2898 echo "$as_me:2898: found $ac_dir/$ac_word" >&5
2899 break
2900 done
2901
2902   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2903 fi
2904 fi
2905 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2906 if test -n "$MAKE_LOWER_TAGS"; then
2907   echo "$as_me:2907: result: $MAKE_LOWER_TAGS" >&5
2908 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2909 else
2910   echo "$as_me:2910: result: no" >&5
2911 echo "${ECHO_T}no" >&6
2912 fi
2913
2914 if test "$cf_cv_mixedcase" = yes ; then
2915         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2916 set dummy ${ETAGS:-etags}; ac_word=$2
2917 echo "$as_me:2917: checking for $ac_word" >&5
2918 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2919 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2920   echo $ECHO_N "(cached) $ECHO_C" >&6
2921 else
2922   if test -n "$MAKE_UPPER_TAGS"; then
2923   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2924 else
2925   ac_save_IFS=$IFS; IFS=$ac_path_separator
2926 ac_dummy="$PATH"
2927 for ac_dir in $ac_dummy; do
2928   IFS=$ac_save_IFS
2929   test -z "$ac_dir" && ac_dir=.
2930   $as_executable_p "$ac_dir/$ac_word" || continue
2931 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2932 echo "$as_me:2932: found $ac_dir/$ac_word" >&5
2933 break
2934 done
2935
2936   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2937 fi
2938 fi
2939 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2940 if test -n "$MAKE_UPPER_TAGS"; then
2941   echo "$as_me:2941: result: $MAKE_UPPER_TAGS" >&5
2942 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2943 else
2944   echo "$as_me:2944: result: no" >&5
2945 echo "${ECHO_T}no" >&6
2946 fi
2947
2948 else
2949         MAKE_UPPER_TAGS=no
2950 fi
2951
2952 if test "$MAKE_UPPER_TAGS" = yes ; then
2953         MAKE_UPPER_TAGS=
2954 else
2955         MAKE_UPPER_TAGS="#"
2956 fi
2957
2958 if test "$MAKE_LOWER_TAGS" = yes ; then
2959         MAKE_LOWER_TAGS=
2960 else
2961         MAKE_LOWER_TAGS="#"
2962 fi
2963
2964 echo "$as_me:2964: checking if you want to see long compiling messages" >&5
2965 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
2966
2967 # Check whether --enable-echo or --disable-echo was given.
2968 if test "${enable_echo+set}" = set; then
2969   enableval="$enable_echo"
2970   test "$enableval" != no && enableval=yes
2971         if test "$enableval" != "yes" ; then
2972
2973         ECHO_LT='--silent'
2974         ECHO_LD='@echo linking $@;'
2975         RULE_CC='@echo compiling $<'
2976         SHOW_CC='@echo compiling $@'
2977         ECHO_CC='@'
2978
2979         else
2980
2981         ECHO_LT=''
2982         ECHO_LD=''
2983         RULE_CC=''
2984         SHOW_CC=''
2985         ECHO_CC=''
2986
2987         fi
2988 else
2989   enableval=yes
2990
2991         ECHO_LT=''
2992         ECHO_LD=''
2993         RULE_CC=''
2994         SHOW_CC=''
2995         ECHO_CC=''
2996
2997 fi;
2998 echo "$as_me:2998: result: $enableval" >&5
2999 echo "${ECHO_T}$enableval" >&6
3000
3001 # Make sure we can run config.sub.
3002 $ac_config_sub sun4 >/dev/null 2>&1 ||
3003   { { echo "$as_me:3003: error: cannot run $ac_config_sub" >&5
3004 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
3005    { (exit 1); exit 1; }; }
3006
3007 echo "$as_me:3007: checking build system type" >&5
3008 echo $ECHO_N "checking build system type... $ECHO_C" >&6
3009 if test "${ac_cv_build+set}" = set; then
3010   echo $ECHO_N "(cached) $ECHO_C" >&6
3011 else
3012   ac_cv_build_alias=$build_alias
3013 test -z "$ac_cv_build_alias" &&
3014   ac_cv_build_alias=`$ac_config_guess`
3015 test -z "$ac_cv_build_alias" &&
3016   { { echo "$as_me:3016: error: cannot guess build type; you must specify one" >&5
3017 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3018    { (exit 1); exit 1; }; }
3019 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
3020   { { echo "$as_me:3020: error: $ac_config_sub $ac_cv_build_alias failed." >&5
3021 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
3022    { (exit 1); exit 1; }; }
3023
3024 fi
3025 echo "$as_me:3025: result: $ac_cv_build" >&5
3026 echo "${ECHO_T}$ac_cv_build" >&6
3027 build=$ac_cv_build
3028 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3029 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3030 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3031
3032 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
3033         echo "$as_me:3033: checking host system type" >&5
3034 echo $ECHO_N "checking host system type... $ECHO_C" >&6
3035 if test "${ac_cv_host+set}" = set; then
3036   echo $ECHO_N "(cached) $ECHO_C" >&6
3037 else
3038   ac_cv_host_alias=$host_alias
3039 test -z "$ac_cv_host_alias" &&
3040   ac_cv_host_alias=$ac_cv_build_alias
3041 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
3042   { { echo "$as_me:3042: error: $ac_config_sub $ac_cv_host_alias failed" >&5
3043 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
3044    { (exit 1); exit 1; }; }
3045
3046 fi
3047 echo "$as_me:3047: result: $ac_cv_host" >&5
3048 echo "${ECHO_T}$ac_cv_host" >&6
3049 host=$ac_cv_host
3050 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3051 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3052 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3053
3054         system_name="$host_os"
3055 else
3056         system_name="`(uname -s -r) 2>/dev/null`"
3057         if test -z "$system_name" ; then
3058                 system_name="`(hostname) 2>/dev/null`"
3059         fi
3060 fi
3061 test -n "$system_name" &&
3062 cat >>confdefs.h <<EOF
3063 #define SYSTEM_NAME "$system_name"
3064 EOF
3065
3066 if test "${cf_cv_system_name+set}" = set; then
3067   echo $ECHO_N "(cached) $ECHO_C" >&6
3068 else
3069   cf_cv_system_name="$system_name"
3070 fi
3071
3072 test -z "$system_name" && system_name="$cf_cv_system_name"
3073 test -n "$cf_cv_system_name" && echo "$as_me:3073: result: Configuring for $cf_cv_system_name" >&5
3074 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
3075
3076 if test ".$system_name" != ".$cf_cv_system_name" ; then
3077         echo "$as_me:3077: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
3078 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
3079         { { echo "$as_me:3079: error: \"Please remove config.cache and try again.\"" >&5
3080 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
3081    { (exit 1); exit 1; }; }
3082 fi
3083
3084 case $cf_cv_system_name in
3085 (os2*)
3086         CFLAGS="$CFLAGS -Zmt"
3087
3088         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3089         CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
3090
3091         CXXFLAGS="$CXXFLAGS -Zmt"
3092         # autoconf's macro sets -Zexe and suffix both, which conflict:w
3093         LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
3094         ac_cv_exeext=.exe
3095         ;;
3096 esac
3097
3098 PROG_EXT="$EXEEXT"
3099
3100 test -n "$PROG_EXT" &&
3101 cat >>confdefs.h <<EOF
3102 #define PROG_EXT "$PROG_EXT"
3103 EOF
3104
3105         echo "$as_me:3105: checking for PATH separator" >&5
3106 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3107         case $cf_cv_system_name in
3108         (os2*)  PATH_SEPARATOR=';'  ;;
3109         (*)     ${PATH_SEPARATOR:=':'}  ;;
3110         esac
3111
3112         echo "$as_me:3112: result: $PATH_SEPARATOR" >&5
3113 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3114
3115         case $cf_cv_system_name in
3116         (OS/2*|os2*)
3117                 if test "$DFT_LWR_MODEL" = libtool; then
3118                         LIB_PREFIX='lib'
3119                 else
3120                         LIB_PREFIX=''
3121                 fi
3122                 ;;
3123         (*)     LIB_PREFIX='lib'
3124                 ;;
3125         esac
3126
3127 cf_XOPEN_SOURCE=500
3128 cf_POSIX_C_SOURCE=199506L
3129 cf_xopen_source=
3130
3131 case $host_os in
3132 (aix[4-7]*)
3133         cf_xopen_source="-D_ALL_SOURCE"
3134         ;;
3135 (msys)
3136         cf_XOPEN_SOURCE=600
3137         ;;
3138 (darwin[0-8].*)
3139         cf_xopen_source="-D_APPLE_C_SOURCE"
3140         ;;
3141 (darwin*)
3142         cf_xopen_source="-D_DARWIN_C_SOURCE"
3143         cf_XOPEN_SOURCE=
3144         ;;
3145 (freebsd*|dragonfly*)
3146         # 5.x headers associate
3147         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3148         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3149         cf_POSIX_C_SOURCE=200112L
3150         cf_XOPEN_SOURCE=600
3151         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3152         ;;
3153 (hpux11*)
3154         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3155         ;;
3156 (hpux*)
3157         cf_xopen_source="-D_HPUX_SOURCE"
3158         ;;
3159 (irix[56].*)
3160         cf_xopen_source="-D_SGI_SOURCE"
3161         cf_XOPEN_SOURCE=
3162         ;;
3163 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3164
3165 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3166
3167 echo "$as_me:3167: checking if this is the GNU C library" >&5
3168 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3169 if test "${cf_cv_gnu_library+set}" = set; then
3170   echo $ECHO_N "(cached) $ECHO_C" >&6
3171 else
3172
3173 cat >conftest.$ac_ext <<_ACEOF
3174 #line 3174 "configure"
3175 #include "confdefs.h"
3176 #include <sys/types.h>
3177 int
3178 main (void)
3179 {
3180
3181         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3182                 return 0;
3183         #else
3184         #       error not GNU C library
3185         #endif
3186   ;
3187   return 0;
3188 }
3189 _ACEOF
3190 rm -f conftest.$ac_objext
3191 if { (eval echo "$as_me:3191: \"$ac_compile\"") >&5
3192   (eval $ac_compile) 2>&5
3193   ac_status=$?
3194   echo "$as_me:3194: \$? = $ac_status" >&5
3195   (exit $ac_status); } &&
3196          { ac_try='test -s conftest.$ac_objext'
3197   { (eval echo "$as_me:3197: \"$ac_try\"") >&5
3198   (eval $ac_try) 2>&5
3199   ac_status=$?
3200   echo "$as_me:3200: \$? = $ac_status" >&5
3201   (exit $ac_status); }; }; then
3202   cf_cv_gnu_library=yes
3203 else
3204   echo "$as_me: failed program was:" >&5
3205 cat conftest.$ac_ext >&5
3206 cf_cv_gnu_library=no
3207 fi
3208 rm -f conftest.$ac_objext conftest.$ac_ext
3209
3210 fi
3211 echo "$as_me:3211: result: $cf_cv_gnu_library" >&5
3212 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3213
3214 if test x$cf_cv_gnu_library = xyes; then
3215
3216         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3217         # was changed to help a little...
3218         echo "$as_me:3218: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3219 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3220 if test "${cf_cv_gnu_library_219+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223
3224                 cf_save="$CPPFLAGS"
3225
3226         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3227         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3228
3229                 cat >conftest.$ac_ext <<_ACEOF
3230 #line 3230 "configure"
3231 #include "confdefs.h"
3232 #include <sys/types.h>
3233 int
3234 main (void)
3235 {
3236
3237                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3238                                 return 0;
3239                         #else
3240                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3241                         #endif
3242   ;
3243   return 0;
3244 }
3245 _ACEOF
3246 rm -f conftest.$ac_objext
3247 if { (eval echo "$as_me:3247: \"$ac_compile\"") >&5
3248   (eval $ac_compile) 2>&5
3249   ac_status=$?
3250   echo "$as_me:3250: \$? = $ac_status" >&5
3251   (exit $ac_status); } &&
3252          { ac_try='test -s conftest.$ac_objext'
3253   { (eval echo "$as_me:3253: \"$ac_try\"") >&5
3254   (eval $ac_try) 2>&5
3255   ac_status=$?
3256   echo "$as_me:3256: \$? = $ac_status" >&5
3257   (exit $ac_status); }; }; then
3258   cf_cv_gnu_library_219=yes
3259 else
3260   echo "$as_me: failed program was:" >&5
3261 cat conftest.$ac_ext >&5
3262 cf_cv_gnu_library_219=no
3263 fi
3264 rm -f conftest.$ac_objext conftest.$ac_ext
3265                 CPPFLAGS="$cf_save"
3266
3267 fi
3268 echo "$as_me:3268: result: $cf_cv_gnu_library_219" >&5
3269 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3270
3271         if test "x$cf_cv_gnu_library_219" = xyes; then
3272                 cf_save="$CPPFLAGS"
3273                 echo "$as_me:3273: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3274 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3275 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3276   echo $ECHO_N "(cached) $ECHO_C" >&6
3277 else
3278
3279 cf_fix_cppflags=no
3280 cf_new_cflags=
3281 cf_new_cppflags=
3282 cf_new_extra_cppflags=
3283
3284 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3285 do
3286 case $cf_fix_cppflags in
3287 (no)
3288         case $cf_add_cflags in
3289         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3290                 case $cf_add_cflags in
3291                 (-D*)
3292                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3293
3294                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3295                                 && test -z "${cf_tst_cflags}" \
3296                                 && cf_fix_cppflags=yes
3297
3298                         if test $cf_fix_cppflags = yes ; then
3299
3300         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3301         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3302
3303                                 continue
3304                         elif test "${cf_tst_cflags}" = "\"'" ; then
3305
3306         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3307         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3308
3309                                 continue
3310                         fi
3311                         ;;
3312                 esac
3313                 case "$CPPFLAGS" in
3314                 (*$cf_add_cflags)
3315                         ;;
3316                 (*)
3317                         case $cf_add_cflags in
3318                         (-D*)
3319                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3320
3321 CPPFLAGS=`echo "$CPPFLAGS" | \
3322         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3323                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3324
3325                                 ;;
3326                         esac
3327
3328         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3329         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3330
3331                         ;;
3332                 esac
3333                 ;;
3334         (*)
3335
3336         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3337         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3338
3339                 ;;
3340         esac
3341         ;;
3342 (yes)
3343
3344         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3345         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3346
3347         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3348
3349         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3350                 && test -z "${cf_tst_cflags}" \
3351                 && cf_fix_cppflags=no
3352         ;;
3353 esac
3354 done
3355
3356 if test -n "$cf_new_cflags" ; then
3357
3358         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3359         CFLAGS="${CFLAGS}$cf_new_cflags"
3360
3361 fi
3362
3363 if test -n "$cf_new_cppflags" ; then
3364
3365         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3366         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3367
3368 fi
3369
3370 if test -n "$cf_new_extra_cppflags" ; then
3371
3372         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3373         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3374
3375 fi
3376
3377                         cat >conftest.$ac_ext <<_ACEOF
3378 #line 3378 "configure"
3379 #include "confdefs.h"
3380
3381                                 #include <limits.h>
3382                                 #include <sys/types.h>
3383
3384 int
3385 main (void)
3386 {
3387
3388                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3389                                         return 0;
3390                                 #else
3391                                 #       error GNU C library is too old
3392                                 #endif
3393   ;
3394   return 0;
3395 }
3396 _ACEOF
3397 rm -f conftest.$ac_objext
3398 if { (eval echo "$as_me:3398: \"$ac_compile\"") >&5
3399   (eval $ac_compile) 2>&5
3400   ac_status=$?
3401   echo "$as_me:3401: \$? = $ac_status" >&5
3402   (exit $ac_status); } &&
3403          { ac_try='test -s conftest.$ac_objext'
3404   { (eval echo "$as_me:3404: \"$ac_try\"") >&5
3405   (eval $ac_try) 2>&5
3406   ac_status=$?
3407   echo "$as_me:3407: \$? = $ac_status" >&5
3408   (exit $ac_status); }; }; then
3409   cf_cv_gnu_dftsrc_219=yes
3410 else
3411   echo "$as_me: failed program was:" >&5
3412 cat conftest.$ac_ext >&5
3413 cf_cv_gnu_dftsrc_219=no
3414 fi
3415 rm -f conftest.$ac_objext conftest.$ac_ext
3416
3417 fi
3418 echo "$as_me:3418: result: $cf_cv_gnu_dftsrc_219" >&5
3419 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3420                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3421         else
3422                 cf_cv_gnu_dftsrc_219=maybe
3423         fi
3424
3425         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3426
3427                 echo "$as_me:3427: checking if we must define _GNU_SOURCE" >&5
3428 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3429 if test "${cf_cv_gnu_source+set}" = set; then
3430   echo $ECHO_N "(cached) $ECHO_C" >&6
3431 else
3432
3433                 cat >conftest.$ac_ext <<_ACEOF
3434 #line 3434 "configure"
3435 #include "confdefs.h"
3436 #include <sys/types.h>
3437 int
3438 main (void)
3439 {
3440
3441                         #ifndef _XOPEN_SOURCE
3442                         #error  expected _XOPEN_SOURCE to be defined
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   cf_cv_gnu_source=no
3461 else
3462   echo "$as_me: failed program was:" >&5
3463 cat conftest.$ac_ext >&5
3464 cf_save="$CPPFLAGS"
3465
3466 cf_fix_cppflags=no
3467 cf_new_cflags=
3468 cf_new_cppflags=
3469 cf_new_extra_cppflags=
3470
3471 for cf_add_cflags in -D_GNU_SOURCE
3472 do
3473 case $cf_fix_cppflags in
3474 (no)
3475         case $cf_add_cflags in
3476         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3477                 case $cf_add_cflags in
3478                 (-D*)
3479                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3480
3481                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3482                                 && test -z "${cf_tst_cflags}" \
3483                                 && cf_fix_cppflags=yes
3484
3485                         if test $cf_fix_cppflags = yes ; then
3486
3487         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3488         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3489
3490                                 continue
3491                         elif test "${cf_tst_cflags}" = "\"'" ; then
3492
3493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3495
3496                                 continue
3497                         fi
3498                         ;;
3499                 esac
3500                 case "$CPPFLAGS" in
3501                 (*$cf_add_cflags)
3502                         ;;
3503                 (*)
3504                         case $cf_add_cflags in
3505                         (-D*)
3506                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3507
3508 CPPFLAGS=`echo "$CPPFLAGS" | \
3509         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3510                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3511
3512                                 ;;
3513                         esac
3514
3515         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3516         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3517
3518                         ;;
3519                 esac
3520                 ;;
3521         (*)
3522
3523         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3524         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3525
3526                 ;;
3527         esac
3528         ;;
3529 (yes)
3530
3531         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3532         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3533
3534         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3535
3536         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3537                 && test -z "${cf_tst_cflags}" \
3538                 && cf_fix_cppflags=no
3539         ;;
3540 esac
3541 done
3542
3543 if test -n "$cf_new_cflags" ; then
3544
3545         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3546         CFLAGS="${CFLAGS}$cf_new_cflags"
3547
3548 fi
3549
3550 if test -n "$cf_new_cppflags" ; then
3551
3552         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3553         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3554
3555 fi
3556
3557 if test -n "$cf_new_extra_cppflags" ; then
3558
3559         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3560         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3561
3562 fi
3563
3564                          cat >conftest.$ac_ext <<_ACEOF
3565 #line 3565 "configure"
3566 #include "confdefs.h"
3567 #include <sys/types.h>
3568 int
3569 main (void)
3570 {
3571
3572                                 #ifdef _XOPEN_SOURCE
3573                                 #error  expected _XOPEN_SOURCE to be undefined
3574                                 #endif
3575   ;
3576   return 0;
3577 }
3578 _ACEOF
3579 rm -f conftest.$ac_objext
3580 if { (eval echo "$as_me:3580: \"$ac_compile\"") >&5
3581   (eval $ac_compile) 2>&5
3582   ac_status=$?
3583   echo "$as_me:3583: \$? = $ac_status" >&5
3584   (exit $ac_status); } &&
3585          { ac_try='test -s conftest.$ac_objext'
3586   { (eval echo "$as_me:3586: \"$ac_try\"") >&5
3587   (eval $ac_try) 2>&5
3588   ac_status=$?
3589   echo "$as_me:3589: \$? = $ac_status" >&5
3590   (exit $ac_status); }; }; then
3591   cf_cv_gnu_source=no
3592 else
3593   echo "$as_me: failed program was:" >&5
3594 cat conftest.$ac_ext >&5
3595 cf_cv_gnu_source=yes
3596 fi
3597 rm -f conftest.$ac_objext conftest.$ac_ext
3598                         CPPFLAGS="$cf_save"
3599
3600 fi
3601 rm -f conftest.$ac_objext conftest.$ac_ext
3602
3603 fi
3604 echo "$as_me:3604: result: $cf_cv_gnu_source" >&5
3605 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3606
3607                 if test "$cf_cv_gnu_source" = yes
3608                 then
3609                 echo "$as_me:3609: checking if we should also define _DEFAULT_SOURCE" >&5
3610 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3611 if test "${cf_cv_default_source+set}" = set; then
3612   echo $ECHO_N "(cached) $ECHO_C" >&6
3613 else
3614
3615         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3616         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3617
3618                         cat >conftest.$ac_ext <<_ACEOF
3619 #line 3619 "configure"
3620 #include "confdefs.h"
3621 #include <sys/types.h>
3622 int
3623 main (void)
3624 {
3625
3626                                 #ifdef _DEFAULT_SOURCE
3627                                 #error  expected _DEFAULT_SOURCE to be undefined
3628                                 #endif
3629   ;
3630   return 0;
3631 }
3632 _ACEOF
3633 rm -f conftest.$ac_objext
3634 if { (eval echo "$as_me:3634: \"$ac_compile\"") >&5
3635   (eval $ac_compile) 2>&5
3636   ac_status=$?
3637   echo "$as_me:3637: \$? = $ac_status" >&5
3638   (exit $ac_status); } &&
3639          { ac_try='test -s conftest.$ac_objext'
3640   { (eval echo "$as_me:3640: \"$ac_try\"") >&5
3641   (eval $ac_try) 2>&5
3642   ac_status=$?
3643   echo "$as_me:3643: \$? = $ac_status" >&5
3644   (exit $ac_status); }; }; then
3645   cf_cv_default_source=no
3646 else
3647   echo "$as_me: failed program was:" >&5
3648 cat conftest.$ac_ext >&5
3649 cf_cv_default_source=yes
3650 fi
3651 rm -f conftest.$ac_objext conftest.$ac_ext
3652
3653 fi
3654 echo "$as_me:3654: result: $cf_cv_default_source" >&5
3655 echo "${ECHO_T}$cf_cv_default_source" >&6
3656                         if test "$cf_cv_default_source" = yes
3657                         then
3658
3659         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3660         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3661
3662                         fi
3663                 fi
3664         fi
3665
3666 fi
3667
3668         ;;
3669 (minix*)
3670         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3671         ;;
3672 (mirbsd*)
3673         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3674         cf_XOPEN_SOURCE=
3675
3676 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3677
3678 cf_save_CFLAGS="$CFLAGS"
3679 cf_save_CPPFLAGS="$CPPFLAGS"
3680
3681 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3682         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3683                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3684
3685 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3686         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
3687                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
3688
3689 echo "$as_me:3689: checking if we should define _POSIX_C_SOURCE" >&5
3690 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3691 if test "${cf_cv_posix_c_source+set}" = set; then
3692   echo $ECHO_N "(cached) $ECHO_C" >&6
3693 else
3694
3695 echo "${as_me:-configure}:3695: testing if the symbol is already defined go no further ..." 1>&5
3696
3697         cat >conftest.$ac_ext <<_ACEOF
3698 #line 3698 "configure"
3699 #include "confdefs.h"
3700 #include <sys/types.h>
3701 int
3702 main (void)
3703 {
3704
3705 #ifndef _POSIX_C_SOURCE
3706 make an error
3707 #endif
3708   ;
3709   return 0;
3710 }
3711 _ACEOF
3712 rm -f conftest.$ac_objext
3713 if { (eval echo "$as_me:3713: \"$ac_compile\"") >&5
3714   (eval $ac_compile) 2>&5
3715   ac_status=$?
3716   echo "$as_me:3716: \$? = $ac_status" >&5
3717   (exit $ac_status); } &&
3718          { ac_try='test -s conftest.$ac_objext'
3719   { (eval echo "$as_me:3719: \"$ac_try\"") >&5
3720   (eval $ac_try) 2>&5
3721   ac_status=$?
3722   echo "$as_me:3722: \$? = $ac_status" >&5
3723   (exit $ac_status); }; }; then
3724   cf_cv_posix_c_source=no
3725 else
3726   echo "$as_me: failed program was:" >&5
3727 cat conftest.$ac_ext >&5
3728 cf_want_posix_source=no
3729          case .$cf_POSIX_C_SOURCE in
3730          (.[12]??*)
3731                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3732                 ;;
3733          (.2)
3734                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3735                 cf_want_posix_source=yes
3736                 ;;
3737          (.*)
3738                 cf_want_posix_source=yes
3739                 ;;
3740          esac
3741          if test "$cf_want_posix_source" = yes ; then
3742                 cat >conftest.$ac_ext <<_ACEOF
3743 #line 3743 "configure"
3744 #include "confdefs.h"
3745 #include <sys/types.h>
3746 int
3747 main (void)
3748 {
3749
3750 #ifdef _POSIX_SOURCE
3751 make an error
3752 #endif
3753   ;
3754   return 0;
3755 }
3756 _ACEOF
3757 rm -f conftest.$ac_objext
3758 if { (eval echo "$as_me:3758: \"$ac_compile\"") >&5
3759   (eval $ac_compile) 2>&5
3760   ac_status=$?
3761   echo "$as_me:3761: \$? = $ac_status" >&5
3762   (exit $ac_status); } &&
3763          { ac_try='test -s conftest.$ac_objext'
3764   { (eval echo "$as_me:3764: \"$ac_try\"") >&5
3765   (eval $ac_try) 2>&5
3766   ac_status=$?
3767   echo "$as_me:3767: \$? = $ac_status" >&5
3768   (exit $ac_status); }; }; then
3769   :
3770 else
3771   echo "$as_me: failed program was:" >&5
3772 cat conftest.$ac_ext >&5
3773 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3774 fi
3775 rm -f conftest.$ac_objext conftest.$ac_ext
3776          fi
3777
3778 echo "${as_me:-configure}:3778: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3779
3780          CFLAGS="$cf_trim_CFLAGS"
3781          CPPFLAGS="$cf_trim_CPPFLAGS"
3782
3783         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3784         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3785
3786 echo "${as_me:-configure}:3786: testing if the second compile does not leave our definition intact error ..." 1>&5
3787
3788          cat >conftest.$ac_ext <<_ACEOF
3789 #line 3789 "configure"
3790 #include "confdefs.h"
3791 #include <sys/types.h>
3792 int
3793 main (void)
3794 {
3795
3796 #ifndef _POSIX_C_SOURCE
3797 make an error
3798 #endif
3799   ;
3800   return 0;
3801 }
3802 _ACEOF
3803 rm -f conftest.$ac_objext
3804 if { (eval echo "$as_me:3804: \"$ac_compile\"") >&5
3805   (eval $ac_compile) 2>&5
3806   ac_status=$?
3807   echo "$as_me:3807: \$? = $ac_status" >&5
3808   (exit $ac_status); } &&
3809          { ac_try='test -s conftest.$ac_objext'
3810   { (eval echo "$as_me:3810: \"$ac_try\"") >&5
3811   (eval $ac_try) 2>&5
3812   ac_status=$?
3813   echo "$as_me:3813: \$? = $ac_status" >&5
3814   (exit $ac_status); }; }; then
3815   :
3816 else
3817   echo "$as_me: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 cf_cv_posix_c_source=no
3820 fi
3821 rm -f conftest.$ac_objext conftest.$ac_ext
3822          CFLAGS="$cf_save_CFLAGS"
3823          CPPFLAGS="$cf_save_CPPFLAGS"
3824
3825 fi
3826 rm -f conftest.$ac_objext conftest.$ac_ext
3827
3828 fi
3829 echo "$as_me:3829: result: $cf_cv_posix_c_source" >&5
3830 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3831
3832 if test "$cf_cv_posix_c_source" != no ; then
3833         CFLAGS="$cf_trim_CFLAGS"
3834         CPPFLAGS="$cf_trim_CPPFLAGS"
3835
3836 cf_fix_cppflags=no
3837 cf_new_cflags=
3838 cf_new_cppflags=
3839 cf_new_extra_cppflags=
3840
3841 for cf_add_cflags in $cf_cv_posix_c_source
3842 do
3843 case $cf_fix_cppflags in
3844 (no)
3845         case $cf_add_cflags in
3846         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3847                 case $cf_add_cflags in
3848                 (-D*)
3849                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3850
3851                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3852                                 && test -z "${cf_tst_cflags}" \
3853                                 && cf_fix_cppflags=yes
3854
3855                         if test $cf_fix_cppflags = yes ; then
3856
3857         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3858         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3859
3860                                 continue
3861                         elif test "${cf_tst_cflags}" = "\"'" ; then
3862
3863         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3864         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3865
3866                                 continue
3867                         fi
3868                         ;;
3869                 esac
3870                 case "$CPPFLAGS" in
3871                 (*$cf_add_cflags)
3872                         ;;
3873                 (*)
3874                         case $cf_add_cflags in
3875                         (-D*)
3876                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3877
3878 CPPFLAGS=`echo "$CPPFLAGS" | \
3879         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3880                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3881
3882                                 ;;
3883                         esac
3884
3885         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3886         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3887
3888                         ;;
3889                 esac
3890                 ;;
3891         (*)
3892
3893         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3894         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3895
3896                 ;;
3897         esac
3898         ;;
3899 (yes)
3900
3901         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3902         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3903
3904         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3905
3906         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3907                 && test -z "${cf_tst_cflags}" \
3908                 && cf_fix_cppflags=no
3909         ;;
3910 esac
3911 done
3912
3913 if test -n "$cf_new_cflags" ; then
3914
3915         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3916         CFLAGS="${CFLAGS}$cf_new_cflags"
3917
3918 fi
3919
3920 if test -n "$cf_new_cppflags" ; then
3921
3922         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3923         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3924
3925 fi
3926
3927 if test -n "$cf_new_extra_cppflags" ; then
3928
3929         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3930         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3931
3932 fi
3933
3934 fi
3935
3936         ;;
3937 (netbsd*)
3938         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3939         ;;
3940 (openbsd[4-9]*)
3941         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3942         cf_xopen_source="-D_BSD_SOURCE"
3943         cf_XOPEN_SOURCE=600
3944         ;;
3945 (openbsd*)
3946         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3947         ;;
3948 (osf[45]*)
3949         cf_xopen_source="-D_OSF_SOURCE"
3950         ;;
3951 (nto-qnx*)
3952         cf_xopen_source="-D_QNX_SOURCE"
3953         ;;
3954 (sco*)
3955         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3956         ;;
3957 (solaris2.*)
3958         cf_xopen_source="-D__EXTENSIONS__"
3959         cf_cv_xopen_source=broken
3960         ;;
3961 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3962         cf_XOPEN_SOURCE=
3963         cf_POSIX_C_SOURCE=
3964         ;;
3965 (*)
3966
3967 echo "$as_me:3967: checking if we should define _XOPEN_SOURCE" >&5
3968 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3969 if test "${cf_cv_xopen_source+set}" = set; then
3970   echo $ECHO_N "(cached) $ECHO_C" >&6
3971 else
3972
3973         cat >conftest.$ac_ext <<_ACEOF
3974 #line 3974 "configure"
3975 #include "confdefs.h"
3976
3977 #include <stdlib.h>
3978 #include <string.h>
3979 #include <sys/types.h>
3980
3981 int
3982 main (void)
3983 {
3984
3985 #ifndef _XOPEN_SOURCE
3986 make an error
3987 #endif
3988   ;
3989   return 0;
3990 }
3991 _ACEOF
3992 rm -f conftest.$ac_objext
3993 if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
3994   (eval $ac_compile) 2>&5
3995   ac_status=$?
3996   echo "$as_me:3996: \$? = $ac_status" >&5
3997   (exit $ac_status); } &&
3998          { ac_try='test -s conftest.$ac_objext'
3999   { (eval echo "$as_me:3999: \"$ac_try\"") >&5
4000   (eval $ac_try) 2>&5
4001   ac_status=$?
4002   echo "$as_me:4002: \$? = $ac_status" >&5
4003   (exit $ac_status); }; }; then
4004   cf_cv_xopen_source=no
4005 else
4006   echo "$as_me: failed program was:" >&5
4007 cat conftest.$ac_ext >&5
4008 cf_save="$CPPFLAGS"
4009
4010         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4011         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4012
4013          cat >conftest.$ac_ext <<_ACEOF
4014 #line 4014 "configure"
4015 #include "confdefs.h"
4016
4017 #include <stdlib.h>
4018 #include <string.h>
4019 #include <sys/types.h>
4020
4021 int
4022 main (void)
4023 {
4024
4025 #ifdef _XOPEN_SOURCE
4026 make an error
4027 #endif
4028   ;
4029   return 0;
4030 }
4031 _ACEOF
4032 rm -f conftest.$ac_objext
4033 if { (eval echo "$as_me:4033: \"$ac_compile\"") >&5
4034   (eval $ac_compile) 2>&5
4035   ac_status=$?
4036   echo "$as_me:4036: \$? = $ac_status" >&5
4037   (exit $ac_status); } &&
4038          { ac_try='test -s conftest.$ac_objext'
4039   { (eval echo "$as_me:4039: \"$ac_try\"") >&5
4040   (eval $ac_try) 2>&5
4041   ac_status=$?
4042   echo "$as_me:4042: \$? = $ac_status" >&5
4043   (exit $ac_status); }; }; then
4044   cf_cv_xopen_source=no
4045 else
4046   echo "$as_me: failed program was:" >&5
4047 cat conftest.$ac_ext >&5
4048 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4049 fi
4050 rm -f conftest.$ac_objext conftest.$ac_ext
4051         CPPFLAGS="$cf_save"
4052
4053 fi
4054 rm -f conftest.$ac_objext conftest.$ac_ext
4055
4056 fi
4057 echo "$as_me:4057: result: $cf_cv_xopen_source" >&5
4058 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4059
4060 if test "$cf_cv_xopen_source" != no ; then
4061
4062 CFLAGS=`echo "$CFLAGS" | \
4063         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
4064                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
4065
4066 CPPFLAGS=`echo "$CPPFLAGS" | \
4067         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
4068                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
4069
4070         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4071
4072 cf_fix_cppflags=no
4073 cf_new_cflags=
4074 cf_new_cppflags=
4075 cf_new_extra_cppflags=
4076
4077 for cf_add_cflags in $cf_temp_xopen_source
4078 do
4079 case $cf_fix_cppflags in
4080 (no)
4081         case $cf_add_cflags in
4082         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4083                 case $cf_add_cflags in
4084                 (-D*)
4085                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4086
4087                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4088                                 && test -z "${cf_tst_cflags}" \
4089                                 && cf_fix_cppflags=yes
4090
4091                         if test $cf_fix_cppflags = yes ; then
4092
4093         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4094         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4095
4096                                 continue
4097                         elif test "${cf_tst_cflags}" = "\"'" ; then
4098
4099         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4100         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4101
4102                                 continue
4103                         fi
4104                         ;;
4105                 esac
4106                 case "$CPPFLAGS" in
4107                 (*$cf_add_cflags)
4108                         ;;
4109                 (*)
4110                         case $cf_add_cflags in
4111                         (-D*)
4112                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4113
4114 CPPFLAGS=`echo "$CPPFLAGS" | \
4115         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4116                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4117
4118                                 ;;
4119                         esac
4120
4121         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4122         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4123
4124                         ;;
4125                 esac
4126                 ;;
4127         (*)
4128
4129         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4130         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4131
4132                 ;;
4133         esac
4134         ;;
4135 (yes)
4136
4137         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4138         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4139
4140         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4141
4142         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4143                 && test -z "${cf_tst_cflags}" \
4144                 && cf_fix_cppflags=no
4145         ;;
4146 esac
4147 done
4148
4149 if test -n "$cf_new_cflags" ; then
4150
4151         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4152         CFLAGS="${CFLAGS}$cf_new_cflags"
4153
4154 fi
4155
4156 if test -n "$cf_new_cppflags" ; then
4157
4158         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4159         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4160
4161 fi
4162
4163 if test -n "$cf_new_extra_cppflags" ; then
4164
4165         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4166         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4167
4168 fi
4169
4170 fi
4171
4172 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4173
4174 cf_save_CFLAGS="$CFLAGS"
4175 cf_save_CPPFLAGS="$CPPFLAGS"
4176
4177 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4178         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
4179                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
4180
4181 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4182         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
4183                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
4184
4185 echo "$as_me:4185: checking if we should define _POSIX_C_SOURCE" >&5
4186 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4187 if test "${cf_cv_posix_c_source+set}" = set; then
4188   echo $ECHO_N "(cached) $ECHO_C" >&6
4189 else
4190
4191 echo "${as_me:-configure}:4191: testing if the symbol is already defined go no further ..." 1>&5
4192
4193         cat >conftest.$ac_ext <<_ACEOF
4194 #line 4194 "configure"
4195 #include "confdefs.h"
4196 #include <sys/types.h>
4197 int
4198 main (void)
4199 {
4200
4201 #ifndef _POSIX_C_SOURCE
4202 make an error
4203 #endif
4204   ;
4205   return 0;
4206 }
4207 _ACEOF
4208 rm -f conftest.$ac_objext
4209 if { (eval echo "$as_me:4209: \"$ac_compile\"") >&5
4210   (eval $ac_compile) 2>&5
4211   ac_status=$?
4212   echo "$as_me:4212: \$? = $ac_status" >&5
4213   (exit $ac_status); } &&
4214          { ac_try='test -s conftest.$ac_objext'
4215   { (eval echo "$as_me:4215: \"$ac_try\"") >&5
4216   (eval $ac_try) 2>&5
4217   ac_status=$?
4218   echo "$as_me:4218: \$? = $ac_status" >&5
4219   (exit $ac_status); }; }; then
4220   cf_cv_posix_c_source=no
4221 else
4222   echo "$as_me: failed program was:" >&5
4223 cat conftest.$ac_ext >&5
4224 cf_want_posix_source=no
4225          case .$cf_POSIX_C_SOURCE in
4226          (.[12]??*)
4227                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4228                 ;;
4229          (.2)
4230                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4231                 cf_want_posix_source=yes
4232                 ;;
4233          (.*)
4234                 cf_want_posix_source=yes
4235                 ;;
4236          esac
4237          if test "$cf_want_posix_source" = yes ; then
4238                 cat >conftest.$ac_ext <<_ACEOF
4239 #line 4239 "configure"
4240 #include "confdefs.h"
4241 #include <sys/types.h>
4242 int
4243 main (void)
4244 {
4245
4246 #ifdef _POSIX_SOURCE
4247 make an error
4248 #endif
4249   ;
4250   return 0;
4251 }
4252 _ACEOF
4253 rm -f conftest.$ac_objext
4254 if { (eval echo "$as_me:4254: \"$ac_compile\"") >&5
4255   (eval $ac_compile) 2>&5
4256   ac_status=$?
4257   echo "$as_me:4257: \$? = $ac_status" >&5
4258   (exit $ac_status); } &&
4259          { ac_try='test -s conftest.$ac_objext'
4260   { (eval echo "$as_me:4260: \"$ac_try\"") >&5
4261   (eval $ac_try) 2>&5
4262   ac_status=$?
4263   echo "$as_me:4263: \$? = $ac_status" >&5
4264   (exit $ac_status); }; }; then
4265   :
4266 else
4267   echo "$as_me: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4269 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4270 fi
4271 rm -f conftest.$ac_objext conftest.$ac_ext
4272          fi
4273
4274 echo "${as_me:-configure}:4274: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4275
4276          CFLAGS="$cf_trim_CFLAGS"
4277          CPPFLAGS="$cf_trim_CPPFLAGS"
4278
4279         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4280         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4281
4282 echo "${as_me:-configure}:4282: testing if the second compile does not leave our definition intact error ..." 1>&5
4283
4284          cat >conftest.$ac_ext <<_ACEOF
4285 #line 4285 "configure"
4286 #include "confdefs.h"
4287 #include <sys/types.h>
4288 int
4289 main (void)
4290 {
4291
4292 #ifndef _POSIX_C_SOURCE
4293 make an error
4294 #endif
4295   ;
4296   return 0;
4297 }
4298 _ACEOF
4299 rm -f conftest.$ac_objext
4300 if { (eval echo "$as_me:4300: \"$ac_compile\"") >&5
4301   (eval $ac_compile) 2>&5
4302   ac_status=$?
4303   echo "$as_me:4303: \$? = $ac_status" >&5
4304   (exit $ac_status); } &&
4305          { ac_try='test -s conftest.$ac_objext'
4306   { (eval echo "$as_me:4306: \"$ac_try\"") >&5
4307   (eval $ac_try) 2>&5
4308   ac_status=$?
4309   echo "$as_me:4309: \$? = $ac_status" >&5
4310   (exit $ac_status); }; }; then
4311   :
4312 else
4313   echo "$as_me: failed program was:" >&5
4314 cat conftest.$ac_ext >&5
4315 cf_cv_posix_c_source=no
4316 fi
4317 rm -f conftest.$ac_objext conftest.$ac_ext
4318          CFLAGS="$cf_save_CFLAGS"
4319          CPPFLAGS="$cf_save_CPPFLAGS"
4320
4321 fi
4322 rm -f conftest.$ac_objext conftest.$ac_ext
4323
4324 fi
4325 echo "$as_me:4325: result: $cf_cv_posix_c_source" >&5
4326 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4327
4328 if test "$cf_cv_posix_c_source" != no ; then
4329         CFLAGS="$cf_trim_CFLAGS"
4330         CPPFLAGS="$cf_trim_CPPFLAGS"
4331
4332 cf_fix_cppflags=no
4333 cf_new_cflags=
4334 cf_new_cppflags=
4335 cf_new_extra_cppflags=
4336
4337 for cf_add_cflags in $cf_cv_posix_c_source
4338 do
4339 case $cf_fix_cppflags in
4340 (no)
4341         case $cf_add_cflags in
4342         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4343                 case $cf_add_cflags in
4344                 (-D*)
4345                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4346
4347                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4348                                 && test -z "${cf_tst_cflags}" \
4349                                 && cf_fix_cppflags=yes
4350
4351                         if test $cf_fix_cppflags = yes ; then
4352
4353         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4354         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4355
4356                                 continue
4357                         elif test "${cf_tst_cflags}" = "\"'" ; then
4358
4359         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4360         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4361
4362                                 continue
4363                         fi
4364                         ;;
4365                 esac
4366                 case "$CPPFLAGS" in
4367                 (*$cf_add_cflags)
4368                         ;;
4369                 (*)
4370                         case $cf_add_cflags in
4371                         (-D*)
4372                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4373
4374 CPPFLAGS=`echo "$CPPFLAGS" | \
4375         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4376                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4377
4378                                 ;;
4379                         esac
4380
4381         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4382         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4383
4384                         ;;
4385                 esac
4386                 ;;
4387         (*)
4388
4389         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4390         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4391
4392                 ;;
4393         esac
4394         ;;
4395 (yes)
4396
4397         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4398         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4399
4400         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4401
4402         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4403                 && test -z "${cf_tst_cflags}" \
4404                 && cf_fix_cppflags=no
4405         ;;
4406 esac
4407 done
4408
4409 if test -n "$cf_new_cflags" ; then
4410
4411         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4412         CFLAGS="${CFLAGS}$cf_new_cflags"
4413
4414 fi
4415
4416 if test -n "$cf_new_cppflags" ; then
4417
4418         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4419         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4420
4421 fi
4422
4423 if test -n "$cf_new_extra_cppflags" ; then
4424
4425         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4426         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4427
4428 fi
4429
4430 fi
4431
4432         ;;
4433 esac
4434
4435 if test -n "$cf_xopen_source" ; then
4436
4437 cf_fix_cppflags=no
4438 cf_new_cflags=
4439 cf_new_cppflags=
4440 cf_new_extra_cppflags=
4441
4442 for cf_add_cflags in $cf_xopen_source
4443 do
4444 case $cf_fix_cppflags in
4445 (no)
4446         case $cf_add_cflags in
4447         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4448                 case $cf_add_cflags in
4449                 (-D*)
4450                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4451
4452                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4453                                 && test -z "${cf_tst_cflags}" \
4454                                 && cf_fix_cppflags=yes
4455
4456                         if test $cf_fix_cppflags = yes ; then
4457
4458         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4459         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4460
4461                                 continue
4462                         elif test "${cf_tst_cflags}" = "\"'" ; then
4463
4464         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4465         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4466
4467                                 continue
4468                         fi
4469                         ;;
4470                 esac
4471                 case "$CPPFLAGS" in
4472                 (*$cf_add_cflags)
4473                         ;;
4474                 (*)
4475                         case $cf_add_cflags in
4476                         (-D*)
4477                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4478
4479 CPPFLAGS=`echo "$CPPFLAGS" | \
4480         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4481                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4482
4483                                 ;;
4484                         esac
4485
4486         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4487         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4488
4489                         ;;
4490                 esac
4491                 ;;
4492         (*)
4493
4494         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4495         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4496
4497                 ;;
4498         esac
4499         ;;
4500 (yes)
4501
4502         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4503         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4504
4505         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4506
4507         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4508                 && test -z "${cf_tst_cflags}" \
4509                 && cf_fix_cppflags=no
4510         ;;
4511 esac
4512 done
4513
4514 if test -n "$cf_new_cflags" ; then
4515         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
4516
4517 echo "${as_me:-configure}:4517: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4518
4519         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4520         CFLAGS="${CFLAGS}$cf_new_cflags"
4521
4522 fi
4523
4524 if test -n "$cf_new_cppflags" ; then
4525         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4526
4527 echo "${as_me:-configure}:4527: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4528
4529         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4530         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4531
4532 fi
4533
4534 if test -n "$cf_new_extra_cppflags" ; then
4535         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4536
4537 echo "${as_me:-configure}:4537: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4538
4539         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4540         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4541
4542 fi
4543
4544 fi
4545
4546 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4547         echo "$as_me:4547: checking if _XOPEN_SOURCE really is set" >&5
4548 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4549         cat >conftest.$ac_ext <<_ACEOF
4550 #line 4550 "configure"
4551 #include "confdefs.h"
4552 #include <stdlib.h>
4553 int
4554 main (void)
4555 {
4556
4557 #ifndef _XOPEN_SOURCE
4558 make an error
4559 #endif
4560   ;
4561   return 0;
4562 }
4563 _ACEOF
4564 rm -f conftest.$ac_objext
4565 if { (eval echo "$as_me:4565: \"$ac_compile\"") >&5
4566   (eval $ac_compile) 2>&5
4567   ac_status=$?
4568   echo "$as_me:4568: \$? = $ac_status" >&5
4569   (exit $ac_status); } &&
4570          { ac_try='test -s conftest.$ac_objext'
4571   { (eval echo "$as_me:4571: \"$ac_try\"") >&5
4572   (eval $ac_try) 2>&5
4573   ac_status=$?
4574   echo "$as_me:4574: \$? = $ac_status" >&5
4575   (exit $ac_status); }; }; then
4576   cf_XOPEN_SOURCE_set=yes
4577 else
4578   echo "$as_me: failed program was:" >&5
4579 cat conftest.$ac_ext >&5
4580 cf_XOPEN_SOURCE_set=no
4581 fi
4582 rm -f conftest.$ac_objext conftest.$ac_ext
4583         echo "$as_me:4583: result: $cf_XOPEN_SOURCE_set" >&5
4584 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4585         if test $cf_XOPEN_SOURCE_set = yes
4586         then
4587                 cat >conftest.$ac_ext <<_ACEOF
4588 #line 4588 "configure"
4589 #include "confdefs.h"
4590 #include <stdlib.h>
4591 int
4592 main (void)
4593 {
4594
4595 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4596 make an error
4597 #endif
4598   ;
4599   return 0;
4600 }
4601 _ACEOF
4602 rm -f conftest.$ac_objext
4603 if { (eval echo "$as_me:4603: \"$ac_compile\"") >&5
4604   (eval $ac_compile) 2>&5
4605   ac_status=$?
4606   echo "$as_me:4606: \$? = $ac_status" >&5
4607   (exit $ac_status); } &&
4608          { ac_try='test -s conftest.$ac_objext'
4609   { (eval echo "$as_me:4609: \"$ac_try\"") >&5
4610   (eval $ac_try) 2>&5
4611   ac_status=$?
4612   echo "$as_me:4612: \$? = $ac_status" >&5
4613   (exit $ac_status); }; }; then
4614   cf_XOPEN_SOURCE_set_ok=yes
4615 else
4616   echo "$as_me: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4618 cf_XOPEN_SOURCE_set_ok=no
4619 fi
4620 rm -f conftest.$ac_objext conftest.$ac_ext
4621                 if test $cf_XOPEN_SOURCE_set_ok = no
4622                 then
4623                         { echo "$as_me:4623: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4624 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4625                 fi
4626         else
4627
4628 echo "$as_me:4628: checking if we should define _XOPEN_SOURCE" >&5
4629 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4630 if test "${cf_cv_xopen_source+set}" = set; then
4631   echo $ECHO_N "(cached) $ECHO_C" >&6
4632 else
4633
4634         cat >conftest.$ac_ext <<_ACEOF
4635 #line 4635 "configure"
4636 #include "confdefs.h"
4637
4638 #include <stdlib.h>
4639 #include <string.h>
4640 #include <sys/types.h>
4641
4642 int
4643 main (void)
4644 {
4645
4646 #ifndef _XOPEN_SOURCE
4647 make an error
4648 #endif
4649   ;
4650   return 0;
4651 }
4652 _ACEOF
4653 rm -f conftest.$ac_objext
4654 if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
4655   (eval $ac_compile) 2>&5
4656   ac_status=$?
4657   echo "$as_me:4657: \$? = $ac_status" >&5
4658   (exit $ac_status); } &&
4659          { ac_try='test -s conftest.$ac_objext'
4660   { (eval echo "$as_me:4660: \"$ac_try\"") >&5
4661   (eval $ac_try) 2>&5
4662   ac_status=$?
4663   echo "$as_me:4663: \$? = $ac_status" >&5
4664   (exit $ac_status); }; }; then
4665   cf_cv_xopen_source=no
4666 else
4667   echo "$as_me: failed program was:" >&5
4668 cat conftest.$ac_ext >&5
4669 cf_save="$CPPFLAGS"
4670
4671         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4672         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4673
4674          cat >conftest.$ac_ext <<_ACEOF
4675 #line 4675 "configure"
4676 #include "confdefs.h"
4677
4678 #include <stdlib.h>
4679 #include <string.h>
4680 #include <sys/types.h>
4681
4682 int
4683 main (void)
4684 {
4685
4686 #ifdef _XOPEN_SOURCE
4687 make an error
4688 #endif
4689   ;
4690   return 0;
4691 }
4692 _ACEOF
4693 rm -f conftest.$ac_objext
4694 if { (eval echo "$as_me:4694: \"$ac_compile\"") >&5
4695   (eval $ac_compile) 2>&5
4696   ac_status=$?
4697   echo "$as_me:4697: \$? = $ac_status" >&5
4698   (exit $ac_status); } &&
4699          { ac_try='test -s conftest.$ac_objext'
4700   { (eval echo "$as_me:4700: \"$ac_try\"") >&5
4701   (eval $ac_try) 2>&5
4702   ac_status=$?
4703   echo "$as_me:4703: \$? = $ac_status" >&5
4704   (exit $ac_status); }; }; then
4705   cf_cv_xopen_source=no
4706 else
4707   echo "$as_me: failed program was:" >&5
4708 cat conftest.$ac_ext >&5
4709 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4710 fi
4711 rm -f conftest.$ac_objext conftest.$ac_ext
4712         CPPFLAGS="$cf_save"
4713
4714 fi
4715 rm -f conftest.$ac_objext conftest.$ac_ext
4716
4717 fi
4718 echo "$as_me:4718: result: $cf_cv_xopen_source" >&5
4719 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4720
4721 if test "$cf_cv_xopen_source" != no ; then
4722
4723 CFLAGS=`echo "$CFLAGS" | \
4724         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
4725                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
4726
4727 CPPFLAGS=`echo "$CPPFLAGS" | \
4728         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
4729                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
4730
4731         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4732
4733 cf_fix_cppflags=no
4734 cf_new_cflags=
4735 cf_new_cppflags=
4736 cf_new_extra_cppflags=
4737
4738 for cf_add_cflags in $cf_temp_xopen_source
4739 do
4740 case $cf_fix_cppflags in
4741 (no)
4742         case $cf_add_cflags in
4743         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4744                 case $cf_add_cflags in
4745                 (-D*)
4746                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4747
4748                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4749                                 && test -z "${cf_tst_cflags}" \
4750                                 && cf_fix_cppflags=yes
4751
4752                         if test $cf_fix_cppflags = yes ; then
4753
4754         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4755         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4756
4757                                 continue
4758                         elif test "${cf_tst_cflags}" = "\"'" ; then
4759
4760         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4761         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4762
4763                                 continue
4764                         fi
4765                         ;;
4766                 esac
4767                 case "$CPPFLAGS" in
4768                 (*$cf_add_cflags)
4769                         ;;
4770                 (*)
4771                         case $cf_add_cflags in
4772                         (-D*)
4773                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4774
4775 CPPFLAGS=`echo "$CPPFLAGS" | \
4776         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
4777                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
4778
4779                                 ;;
4780                         esac
4781
4782         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4783         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4784
4785                         ;;
4786                 esac
4787                 ;;
4788         (*)
4789
4790         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4791         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4792
4793                 ;;
4794         esac
4795         ;;
4796 (yes)
4797
4798         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4799         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4800
4801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4802
4803         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4804                 && test -z "${cf_tst_cflags}" \
4805                 && cf_fix_cppflags=no
4806         ;;
4807 esac
4808 done
4809
4810 if test -n "$cf_new_cflags" ; then
4811
4812         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4813         CFLAGS="${CFLAGS}$cf_new_cflags"
4814
4815 fi
4816
4817 if test -n "$cf_new_cppflags" ; then
4818
4819         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4820         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4821
4822 fi
4823
4824 if test -n "$cf_new_extra_cppflags" ; then
4825
4826         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4827         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4828
4829 fi
4830
4831 fi
4832
4833         fi
4834 fi
4835
4836 # Check whether --enable-largefile or --disable-largefile was given.
4837 if test "${enable_largefile+set}" = set; then
4838   enableval="$enable_largefile"
4839
4840 fi;
4841 if test "$enable_largefile" != no; then
4842
4843   echo "$as_me:4843: checking for special C compiler options needed for large files" >&5
4844 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
4845 if test "${ac_cv_sys_largefile_CC+set}" = set; then
4846   echo $ECHO_N "(cached) $ECHO_C" >&6
4847 else
4848   ac_cv_sys_largefile_CC=no
4849      if test "$GCC" != yes; then
4850        ac_save_CC=$CC
4851        while :; do
4852          # IRIX 6.2 and later do not support large files by default,
4853          # so use the C compiler's -n32 option if that helps.
4854          cat >conftest.$ac_ext <<_ACEOF
4855 #line 4855 "configure"
4856 #include "confdefs.h"
4857 #include <sys/types.h>
4858  /* Check that off_t can represent 2**63 - 1 correctly.
4859     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4860     since some C++ compilers masquerading as C compilers
4861     incorrectly reject 9223372036854775807.  */
4862 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4863   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4864                        && LARGE_OFF_T % 2147483647 == 1)
4865                       ? 1 : -1];
4866 int
4867 main (void)
4868 {
4869
4870   ;
4871   return 0;
4872 }
4873 _ACEOF
4874          rm -f conftest.$ac_objext
4875 if { (eval echo "$as_me:4875: \"$ac_compile\"") >&5
4876   (eval $ac_compile) 2>&5
4877   ac_status=$?
4878   echo "$as_me:4878: \$? = $ac_status" >&5
4879   (exit $ac_status); } &&
4880          { ac_try='test -s conftest.$ac_objext'
4881   { (eval echo "$as_me:4881: \"$ac_try\"") >&5
4882   (eval $ac_try) 2>&5
4883   ac_status=$?
4884   echo "$as_me:4884: \$? = $ac_status" >&5
4885   (exit $ac_status); }; }; then
4886   break
4887 else
4888   echo "$as_me: failed program was:" >&5
4889 cat conftest.$ac_ext >&5
4890 fi
4891 rm -f conftest.$ac_objext
4892          CC="$CC -n32"
4893          rm -f conftest.$ac_objext
4894 if { (eval echo "$as_me:4894: \"$ac_compile\"") >&5
4895   (eval $ac_compile) 2>&5
4896   ac_status=$?
4897   echo "$as_me:4897: \$? = $ac_status" >&5
4898   (exit $ac_status); } &&
4899          { ac_try='test -s conftest.$ac_objext'
4900   { (eval echo "$as_me:4900: \"$ac_try\"") >&5
4901   (eval $ac_try) 2>&5
4902   ac_status=$?
4903   echo "$as_me:4903: \$? = $ac_status" >&5
4904   (exit $ac_status); }; }; then
4905   ac_cv_sys_largefile_CC=' -n32'; break
4906 else
4907   echo "$as_me: failed program was:" >&5
4908 cat conftest.$ac_ext >&5
4909 fi
4910 rm -f conftest.$ac_objext
4911          break
4912        done
4913        CC=$ac_save_CC
4914        rm -f conftest.$ac_ext
4915     fi
4916 fi
4917 echo "$as_me:4917: result: $ac_cv_sys_largefile_CC" >&5
4918 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
4919   if test "$ac_cv_sys_largefile_CC" != no; then
4920     CC=$CC$ac_cv_sys_largefile_CC
4921   fi
4922
4923   echo "$as_me:4923: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4924 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
4925 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
4926   echo $ECHO_N "(cached) $ECHO_C" >&6
4927 else
4928   while :; do
4929   ac_cv_sys_file_offset_bits=no
4930   cat >conftest.$ac_ext <<_ACEOF
4931 #line 4931 "configure"
4932 #include "confdefs.h"
4933 #include <sys/types.h>
4934  /* Check that off_t can represent 2**63 - 1 correctly.
4935     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4936     since some C++ compilers masquerading as C compilers
4937     incorrectly reject 9223372036854775807.  */
4938 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4939   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4940                        && LARGE_OFF_T % 2147483647 == 1)
4941                       ? 1 : -1];
4942 int
4943 main (void)
4944 {
4945
4946   ;
4947   return 0;
4948 }
4949 _ACEOF
4950 rm -f conftest.$ac_objext
4951 if { (eval echo "$as_me:4951: \"$ac_compile\"") >&5
4952   (eval $ac_compile) 2>&5
4953   ac_status=$?
4954   echo "$as_me:4954: \$? = $ac_status" >&5
4955   (exit $ac_status); } &&
4956          { ac_try='test -s conftest.$ac_objext'
4957   { (eval echo "$as_me:4957: \"$ac_try\"") >&5
4958   (eval $ac_try) 2>&5
4959   ac_status=$?
4960   echo "$as_me:4960: \$? = $ac_status" >&5
4961   (exit $ac_status); }; }; then
4962   break
4963 else
4964   echo "$as_me: failed program was:" >&5
4965 cat conftest.$ac_ext >&5
4966 fi
4967 rm -f conftest.$ac_objext conftest.$ac_ext
4968   cat >conftest.$ac_ext <<_ACEOF
4969 #line 4969 "configure"
4970 #include "confdefs.h"
4971 #define _FILE_OFFSET_BITS 64
4972 #include <sys/types.h>
4973  /* Check that off_t can represent 2**63 - 1 correctly.
4974     We can't simply define LARGE_OFF_T to be 9223372036854775807,
4975     since some C++ compilers masquerading as C compilers
4976     incorrectly reject 9223372036854775807.  */
4977 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4978   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4979                        && LARGE_OFF_T % 2147483647 == 1)
4980                       ? 1 : -1];
4981 int
4982 main (void)
4983 {
4984
4985   ;
4986   return 0;
4987 }
4988 _ACEOF
4989 rm -f conftest.$ac_objext
4990 if { (eval echo "$as_me:4990: \"$ac_compile\"") >&5
4991   (eval $ac_compile) 2>&5
4992   ac_status=$?
4993   echo "$as_me:4993: \$? = $ac_status" >&5
4994   (exit $ac_status); } &&
4995          { ac_try='test -s conftest.$ac_objext'
4996   { (eval echo "$as_me:4996: \"$ac_try\"") >&5
4997   (eval $ac_try) 2>&5
4998   ac_status=$?
4999   echo "$as_me:4999: \$? = $ac_status" >&5
5000   (exit $ac_status); }; }; then
5001   ac_cv_sys_file_offset_bits=64; break
5002 else
5003   echo "$as_me: failed program was:" >&5
5004 cat conftest.$ac_ext >&5
5005 fi
5006 rm -f conftest.$ac_objext conftest.$ac_ext
5007   break
5008 done
5009 fi
5010 echo "$as_me:5010: result: $ac_cv_sys_file_offset_bits" >&5
5011 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
5012 if test "$ac_cv_sys_file_offset_bits" != no; then
5013
5014 cat >>confdefs.h <<EOF
5015 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5016 EOF
5017
5018 fi
5019 rm -rf conftest*
5020   echo "$as_me:5020: checking for _LARGE_FILES value needed for large files" >&5
5021 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
5022 if test "${ac_cv_sys_large_files+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025   while :; do
5026   ac_cv_sys_large_files=no
5027   cat >conftest.$ac_ext <<_ACEOF
5028 #line 5028 "configure"
5029 #include "confdefs.h"
5030 #include <sys/types.h>
5031  /* Check that off_t can represent 2**63 - 1 correctly.
5032     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5033     since some C++ compilers masquerading as C compilers
5034     incorrectly reject 9223372036854775807.  */
5035 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5036   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5037                        && LARGE_OFF_T % 2147483647 == 1)
5038                       ? 1 : -1];
5039 int
5040 main (void)
5041 {
5042
5043   ;
5044   return 0;
5045 }
5046 _ACEOF
5047 rm -f conftest.$ac_objext
5048 if { (eval echo "$as_me:5048: \"$ac_compile\"") >&5
5049   (eval $ac_compile) 2>&5
5050   ac_status=$?
5051   echo "$as_me:5051: \$? = $ac_status" >&5
5052   (exit $ac_status); } &&
5053          { ac_try='test -s conftest.$ac_objext'
5054   { (eval echo "$as_me:5054: \"$ac_try\"") >&5
5055   (eval $ac_try) 2>&5
5056   ac_status=$?
5057   echo "$as_me:5057: \$? = $ac_status" >&5
5058   (exit $ac_status); }; }; then
5059   break
5060 else
5061   echo "$as_me: failed program was:" >&5
5062 cat conftest.$ac_ext >&5
5063 fi
5064 rm -f conftest.$ac_objext conftest.$ac_ext
5065   cat >conftest.$ac_ext <<_ACEOF
5066 #line 5066 "configure"
5067 #include "confdefs.h"
5068 #define _LARGE_FILES 1
5069 #include <sys/types.h>
5070  /* Check that off_t can represent 2**63 - 1 correctly.
5071     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5072     since some C++ compilers masquerading as C compilers
5073     incorrectly reject 9223372036854775807.  */
5074 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5075   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5076                        && LARGE_OFF_T % 2147483647 == 1)
5077                       ? 1 : -1];
5078 int
5079 main (void)
5080 {
5081
5082   ;
5083   return 0;
5084 }
5085 _ACEOF
5086 rm -f conftest.$ac_objext
5087 if { (eval echo "$as_me:5087: \"$ac_compile\"") >&5
5088   (eval $ac_compile) 2>&5
5089   ac_status=$?
5090   echo "$as_me:5090: \$? = $ac_status" >&5
5091   (exit $ac_status); } &&
5092          { ac_try='test -s conftest.$ac_objext'
5093   { (eval echo "$as_me:5093: \"$ac_try\"") >&5
5094   (eval $ac_try) 2>&5
5095   ac_status=$?
5096   echo "$as_me:5096: \$? = $ac_status" >&5
5097   (exit $ac_status); }; }; then
5098   ac_cv_sys_large_files=1; break
5099 else
5100   echo "$as_me: failed program was:" >&5
5101 cat conftest.$ac_ext >&5
5102 fi
5103 rm -f conftest.$ac_objext conftest.$ac_ext
5104   break
5105 done
5106 fi
5107 echo "$as_me:5107: result: $ac_cv_sys_large_files" >&5
5108 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
5109 if test "$ac_cv_sys_large_files" != no; then
5110
5111 cat >>confdefs.h <<EOF
5112 #define _LARGE_FILES $ac_cv_sys_large_files
5113 EOF
5114
5115 fi
5116 rm -rf conftest*
5117 fi
5118
5119         if test "$enable_largefile" != no ; then
5120         echo "$as_me:5120: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5121 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
5122 if test "${ac_cv_sys_largefile_source+set}" = set; then
5123   echo $ECHO_N "(cached) $ECHO_C" >&6
5124 else
5125   while :; do
5126   ac_cv_sys_largefile_source=no
5127   cat >conftest.$ac_ext <<_ACEOF
5128 #line 5128 "configure"
5129 #include "confdefs.h"
5130 #include <stdio.h>
5131 int
5132 main (void)
5133 {
5134 return !fseeko;
5135   ;
5136   return 0;
5137 }
5138 _ACEOF
5139 rm -f conftest.$ac_objext
5140 if { (eval echo "$as_me:5140: \"$ac_compile\"") >&5
5141   (eval $ac_compile) 2>&5
5142   ac_status=$?
5143   echo "$as_me:5143: \$? = $ac_status" >&5
5144   (exit $ac_status); } &&
5145          { ac_try='test -s conftest.$ac_objext'
5146   { (eval echo "$as_me:5146: \"$ac_try\"") >&5
5147   (eval $ac_try) 2>&5
5148   ac_status=$?
5149   echo "$as_me:5149: \$? = $ac_status" >&5
5150   (exit $ac_status); }; }; then
5151   break
5152 else
5153   echo "$as_me: failed program was:" >&5
5154 cat conftest.$ac_ext >&5
5155 fi
5156 rm -f conftest.$ac_objext conftest.$ac_ext
5157   cat >conftest.$ac_ext <<_ACEOF
5158 #line 5158 "configure"
5159 #include "confdefs.h"
5160 #define _LARGEFILE_SOURCE 1
5161 #include <stdio.h>
5162 int
5163 main (void)
5164 {
5165 return !fseeko;
5166   ;
5167   return 0;
5168 }
5169 _ACEOF
5170 rm -f conftest.$ac_objext
5171 if { (eval echo "$as_me:5171: \"$ac_compile\"") >&5
5172   (eval $ac_compile) 2>&5
5173   ac_status=$?
5174   echo "$as_me:5174: \$? = $ac_status" >&5
5175   (exit $ac_status); } &&
5176          { ac_try='test -s conftest.$ac_objext'
5177   { (eval echo "$as_me:5177: \"$ac_try\"") >&5
5178   (eval $ac_try) 2>&5
5179   ac_status=$?
5180   echo "$as_me:5180: \$? = $ac_status" >&5
5181   (exit $ac_status); }; }; then
5182   ac_cv_sys_largefile_source=1; break
5183 else
5184   echo "$as_me: failed program was:" >&5
5185 cat conftest.$ac_ext >&5
5186 fi
5187 rm -f conftest.$ac_objext conftest.$ac_ext
5188   break
5189 done
5190 fi
5191 echo "$as_me:5191: result: $ac_cv_sys_largefile_source" >&5
5192 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
5193 if test "$ac_cv_sys_largefile_source" != no; then
5194
5195 cat >>confdefs.h <<EOF
5196 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5197 EOF
5198
5199 fi
5200 rm -rf conftest*
5201
5202 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5203 # in glibc 2.1.3, but that breaks too many other things.
5204 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5205 echo "$as_me:5205: checking for fseeko" >&5
5206 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
5207 if test "${ac_cv_func_fseeko+set}" = set; then
5208   echo $ECHO_N "(cached) $ECHO_C" >&6
5209 else
5210   cat >conftest.$ac_ext <<_ACEOF
5211 #line 5211 "configure"
5212 #include "confdefs.h"
5213 #include <stdio.h>
5214 int
5215 main (void)
5216 {
5217 return fseeko && fseeko (stdin, 0, 0);
5218   ;
5219   return 0;
5220 }
5221 _ACEOF
5222 rm -f conftest.$ac_objext conftest$ac_exeext
5223 if { (eval echo "$as_me:5223: \"$ac_link\"") >&5
5224   (eval $ac_link) 2>&5
5225   ac_status=$?
5226   echo "$as_me:5226: \$? = $ac_status" >&5
5227   (exit $ac_status); } &&
5228          { ac_try='test -s conftest$ac_exeext'
5229   { (eval echo "$as_me:5229: \"$ac_try\"") >&5
5230   (eval $ac_try) 2>&5
5231   ac_status=$?
5232   echo "$as_me:5232: \$? = $ac_status" >&5
5233   (exit $ac_status); }; }; then
5234   ac_cv_func_fseeko=yes
5235 else
5236   echo "$as_me: failed program was:" >&5
5237 cat conftest.$ac_ext >&5
5238 ac_cv_func_fseeko=no
5239 fi
5240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5241 fi
5242 echo "$as_me:5242: result: $ac_cv_func_fseeko" >&5
5243 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
5244 if test $ac_cv_func_fseeko = yes; then
5245
5246 cat >>confdefs.h <<\EOF
5247 #define HAVE_FSEEKO 1
5248 EOF
5249
5250 fi
5251
5252         # Normally we would collect these definitions in the config.h,
5253         # but (like _XOPEN_SOURCE), some environments rely on having these
5254         # defined before any of the system headers are included.  Another
5255         # case comes up with C++, e.g., on AIX the compiler compiles the
5256         # header files by themselves before looking at the body files it is
5257         # told to compile.  For ncurses, those header files do not include
5258         # the config.h
5259         if test "$ac_cv_sys_large_files" != no
5260         then
5261
5262         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5263         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
5264
5265         fi
5266         if test "$ac_cv_sys_largefile_source" != no
5267         then
5268
5269         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5270         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
5271
5272         fi
5273         if test "$ac_cv_sys_file_offset_bits" != no
5274         then
5275
5276         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5277         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
5278
5279         fi
5280
5281         echo "$as_me:5281: checking whether to use struct dirent64" >&5
5282 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
5283 if test "${cf_cv_struct_dirent64+set}" = set; then
5284   echo $ECHO_N "(cached) $ECHO_C" >&6
5285 else
5286
5287                 cat >conftest.$ac_ext <<_ACEOF
5288 #line 5288 "configure"
5289 #include "confdefs.h"
5290
5291 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
5292 #include <sys/types.h>
5293 #include <dirent.h>
5294
5295 int
5296 main (void)
5297 {
5298
5299                 /* if transitional largefile support is setup, this is true */
5300                 extern struct dirent64 * readdir(DIR *);
5301                 struct dirent64 *x = readdir((DIR *)0);
5302                 struct dirent *y = readdir((DIR *)0);
5303                 int z = x - y;
5304
5305   ;
5306   return 0;
5307 }
5308 _ACEOF
5309 rm -f conftest.$ac_objext
5310 if { (eval echo "$as_me:5310: \"$ac_compile\"") >&5
5311   (eval $ac_compile) 2>&5
5312   ac_status=$?
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); } &&
5315          { ac_try='test -s conftest.$ac_objext'
5316   { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5317   (eval $ac_try) 2>&5
5318   ac_status=$?
5319   echo "$as_me:5319: \$? = $ac_status" >&5
5320   (exit $ac_status); }; }; then
5321   cf_cv_struct_dirent64=yes
5322 else
5323   echo "$as_me: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 cf_cv_struct_dirent64=no
5326 fi
5327 rm -f conftest.$ac_objext conftest.$ac_ext
5328
5329 fi
5330 echo "$as_me:5330: result: $cf_cv_struct_dirent64" >&5
5331 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
5332         test "$cf_cv_struct_dirent64" = yes &&
5333 cat >>confdefs.h <<\EOF
5334 #define HAVE_STRUCT_DIRENT64 1
5335 EOF
5336
5337         fi
5338
5339 echo "$as_me:5339: checking for install-prefix" >&5
5340 echo $ECHO_N "checking for install-prefix... $ECHO_C" >&6
5341
5342 # Check whether --with-install-prefix or --without-install-prefix was given.
5343 if test "${with_install_prefix+set}" = set; then
5344   withval="$with_install_prefix"
5345   cf_opt_with_install_prefix=$withval
5346 else
5347   cf_opt_with_install_prefix=${DESTDIR:-no}
5348 fi;
5349 echo "$as_me:5349: result: $cf_opt_with_install_prefix" >&5
5350 echo "${ECHO_T}$cf_opt_with_install_prefix" >&6
5351 if test "$cf_opt_with_install_prefix" != no ; then
5352
5353 if test "x$prefix" != xNONE; then
5354         cf_path_syntax="$prefix"
5355 else
5356         cf_path_syntax="$ac_default_prefix"
5357 fi
5358
5359 case ".$cf_opt_with_install_prefix" in
5360 (.\$\(*\)*|.\'*\'*)
5361         ;;
5362 (..|./*|.\\*)
5363         ;;
5364 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5365         ;;
5366 (.\${*prefix}*|.\${*dir}*)
5367         eval cf_opt_with_install_prefix="$cf_opt_with_install_prefix"
5368         case ".$cf_opt_with_install_prefix" in
5369         (.NONE/*)
5370                 cf_opt_with_install_prefix=`echo $cf_opt_with_install_prefix | sed -e s%NONE%$cf_path_syntax%`
5371                 ;;
5372         esac
5373         ;;
5374 (.no|.NONE/*)
5375         cf_opt_with_install_prefix=`echo $cf_opt_with_install_prefix | sed -e s%NONE%$cf_path_syntax%`
5376         ;;
5377 (*)
5378         { { echo "$as_me:5378: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&5
5379 echo "$as_me: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&2;}
5380    { (exit 1); exit 1; }; }
5381         ;;
5382 esac
5383
5384         DESTDIR=$cf_opt_with_install_prefix
5385 fi
5386
5387 if ( test "$GCC" = yes || test "$GXX" = yes )
5388 then
5389 echo "$as_me:5389: checking if you want to check for gcc warnings" >&5
5390 echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
5391
5392 # Check whether --with-warnings or --without-warnings was given.
5393 if test "${with_warnings+set}" = set; then
5394   withval="$with_warnings"
5395   cf_opt_with_warnings=$withval
5396 else
5397   cf_opt_with_warnings=no
5398 fi;
5399 echo "$as_me:5399: result: $cf_opt_with_warnings" >&5
5400 echo "${ECHO_T}$cf_opt_with_warnings" >&6
5401 if test "$cf_opt_with_warnings" != no ; then
5402
5403 if test "$GCC" = yes
5404 then
5405 cat > conftest.i <<EOF
5406 #ifndef GCC_PRINTF
5407 #define GCC_PRINTF 0
5408 #endif
5409 #ifndef GCC_SCANF
5410 #define GCC_SCANF 0
5411 #endif
5412 #ifndef GCC_NORETURN
5413 #define GCC_NORETURN /* nothing */
5414 #endif
5415 #ifndef GCC_UNUSED
5416 #define GCC_UNUSED /* nothing */
5417 #endif
5418 EOF
5419 if test "$GCC" = yes
5420 then
5421         { echo "$as_me:5421: checking for $CC __attribute__ directives..." >&5
5422 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
5423 cat > conftest.$ac_ext <<EOF
5424 #line 5424 "${as_me:-configure}"
5425 #include "confdefs.h"
5426 #include "conftest.h"
5427 #include "conftest.i"
5428 #if     GCC_PRINTF
5429 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
5430 #else
5431 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
5432 #endif
5433 #if     GCC_SCANF
5434 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
5435 #else
5436 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
5437 #endif
5438 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
5439 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
5440 extern void foo(void) GCC_NORETURN;
5441 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
5442 EOF
5443         cf_printf_attribute=no
5444         cf_scanf_attribute=no
5445         for cf_attribute in scanf printf unused noreturn
5446         do
5447
5448 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5449
5450                 cf_directive="__attribute__(($cf_attribute))"
5451                 echo "checking for $CC $cf_directive" 1>&5
5452
5453                 case $cf_attribute in
5454                 (printf)
5455                         cf_printf_attribute=yes
5456                         cat >conftest.h <<EOF
5457 #define GCC_$cf_ATTRIBUTE 1
5458 EOF
5459                         ;;
5460                 (scanf)
5461                         cf_scanf_attribute=yes
5462                         cat >conftest.h <<EOF
5463 #define GCC_$cf_ATTRIBUTE 1
5464 EOF
5465                         ;;
5466                 (*)
5467                         cat >conftest.h <<EOF
5468 #define GCC_$cf_ATTRIBUTE $cf_directive
5469 EOF
5470                         ;;
5471                 esac
5472
5473                 if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
5474   (eval $ac_compile) 2>&5
5475   ac_status=$?
5476   echo "$as_me:5476: \$? = $ac_status" >&5
5477   (exit $ac_status); }; then
5478                         test -n "$verbose" && echo "$as_me:5478: result: ... $cf_attribute" >&5
5479 echo "${ECHO_T}... $cf_attribute" >&6
5480                         cat conftest.h >>confdefs.h
5481                         case $cf_attribute in
5482                         (noreturn)
5483
5484 cat >>confdefs.h <<EOF
5485 #define GCC_NORETURN $cf_directive
5486 EOF
5487
5488                                 ;;
5489                         (printf)
5490                                 cf_value='/* nothing */'
5491                                 if test "$cf_printf_attribute" != no ; then
5492                                         cf_value='__attribute__((format(printf,fmt,var)))'
5493
5494 cat >>confdefs.h <<\EOF
5495 #define GCC_PRINTF 1
5496 EOF
5497
5498                                 fi
5499
5500 cat >>confdefs.h <<EOF
5501 #define GCC_PRINTFLIKE(fmt,var) $cf_value
5502 EOF
5503
5504                                 ;;
5505                         (scanf)
5506                                 cf_value='/* nothing */'
5507                                 if test "$cf_scanf_attribute" != no ; then
5508                                         cf_value='__attribute__((format(scanf,fmt,var)))'
5509
5510 cat >>confdefs.h <<\EOF
5511 #define GCC_SCANF 1
5512 EOF
5513
5514                                 fi
5515
5516 cat >>confdefs.h <<EOF
5517 #define GCC_SCANFLIKE(fmt,var) $cf_value
5518 EOF
5519
5520                                 ;;
5521                         (unused)
5522
5523 cat >>confdefs.h <<EOF
5524 #define GCC_UNUSED $cf_directive
5525 EOF
5526
5527                                 ;;
5528                         esac
5529                 fi
5530         done
5531 else
5532         fgrep define conftest.i >>confdefs.h
5533 fi
5534 rm -rf conftest*
5535 fi
5536
5537 INTEL_COMPILER=no
5538
5539 if test "$GCC" = yes ; then
5540         case $host_os in
5541         (linux*|gnu*)
5542                 echo "$as_me:5542: checking if this is really Intel C compiler" >&5
5543 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
5544                 cf_save_CFLAGS="$CFLAGS"
5545                 CFLAGS="$CFLAGS -no-gcc"
5546                 cat >conftest.$ac_ext <<_ACEOF
5547 #line 5547 "configure"
5548 #include "confdefs.h"
5549
5550 int
5551 main (void)
5552 {
5553
5554 #ifdef __INTEL_COMPILER
5555 #else
5556 make an error
5557 #endif
5558
5559   ;
5560   return 0;
5561 }
5562 _ACEOF
5563 rm -f conftest.$ac_objext
5564 if { (eval echo "$as_me:5564: \"$ac_compile\"") >&5
5565   (eval $ac_compile) 2>&5
5566   ac_status=$?
5567   echo "$as_me:5567: \$? = $ac_status" >&5
5568   (exit $ac_status); } &&
5569          { ac_try='test -s conftest.$ac_objext'
5570   { (eval echo "$as_me:5570: \"$ac_try\"") >&5
5571   (eval $ac_try) 2>&5
5572   ac_status=$?
5573   echo "$as_me:5573: \$? = $ac_status" >&5
5574   (exit $ac_status); }; }; then
5575   INTEL_COMPILER=yes
5576 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
5577
5578 else
5579   echo "$as_me: failed program was:" >&5
5580 cat conftest.$ac_ext >&5
5581 fi
5582 rm -f conftest.$ac_objext conftest.$ac_ext
5583                 CFLAGS="$cf_save_CFLAGS"
5584                 echo "$as_me:5584: result: $INTEL_COMPILER" >&5
5585 echo "${ECHO_T}$INTEL_COMPILER" >&6
5586                 ;;
5587         esac
5588 fi
5589
5590 CLANG_COMPILER=no
5591
5592 if test "$GCC" = yes ; then
5593         echo "$as_me:5593: checking if this is really Clang C compiler" >&5
5594 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
5595         cf_save_CFLAGS="$CFLAGS"
5596         CFLAGS="$CFLAGS -Qunused-arguments"
5597         cat >conftest.$ac_ext <<_ACEOF
5598 #line 5598 "configure"
5599 #include "confdefs.h"
5600
5601 int
5602 main (void)
5603 {
5604
5605 #ifdef __clang__
5606 #else
5607 make an error
5608 #endif
5609
5610   ;
5611   return 0;
5612 }
5613 _ACEOF
5614 rm -f conftest.$ac_objext
5615 if { (eval echo "$as_me:5615: \"$ac_compile\"") >&5
5616   (eval $ac_compile) 2>&5
5617   ac_status=$?
5618   echo "$as_me:5618: \$? = $ac_status" >&5
5619   (exit $ac_status); } &&
5620          { ac_try='test -s conftest.$ac_objext'
5621   { (eval echo "$as_me:5621: \"$ac_try\"") >&5
5622   (eval $ac_try) 2>&5
5623   ac_status=$?
5624   echo "$as_me:5624: \$? = $ac_status" >&5
5625   (exit $ac_status); }; }; then
5626   CLANG_COMPILER=yes
5627 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
5628
5629 else
5630   echo "$as_me: failed program was:" >&5
5631 cat conftest.$ac_ext >&5
5632 fi
5633 rm -f conftest.$ac_objext conftest.$ac_ext
5634         CFLAGS="$cf_save_CFLAGS"
5635         echo "$as_me:5635: result: $CLANG_COMPILER" >&5
5636 echo "${ECHO_T}$CLANG_COMPILER" >&6
5637 fi
5638
5639 cat > conftest.$ac_ext <<EOF
5640 #line 5640 "${as_me:-configure}"
5641 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
5642 EOF
5643
5644 if test "$INTEL_COMPILER" = yes
5645 then
5646 # The "-wdXXX" options suppress warnings:
5647 # remark #1419: external declaration in primary source file
5648 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
5649 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
5650 # remark #193: zero used for undefined preprocessing identifier
5651 # remark #593: variable "curs_sb_left_arrow" was set but never used
5652 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
5653 # remark #869: parameter "tw" was never referenced
5654 # remark #981: operands are evaluated in unspecified order
5655 # warning #279: controlling expression is constant
5656
5657         { echo "$as_me:5657: checking for $CC warning options..." >&5
5658 echo "$as_me: checking for $CC warning options..." >&6;}
5659         cf_save_CFLAGS="$CFLAGS"
5660         EXTRA_CFLAGS="-Wall"
5661         for cf_opt in \
5662                 wd1419 \
5663                 wd1683 \
5664                 wd1684 \
5665                 wd193 \
5666                 wd593 \
5667                 wd279 \
5668                 wd810 \
5669                 wd869 \
5670                 wd981
5671         do
5672                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5673                 if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674   (eval $ac_compile) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); }; then
5678                         test -n "$verbose" && echo "$as_me:5678: result: ... -$cf_opt" >&5
5679 echo "${ECHO_T}... -$cf_opt" >&6
5680                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5681                 fi
5682         done
5683         CFLAGS="$cf_save_CFLAGS"
5684
5685 elif test "$GCC" = yes
5686 then
5687         { echo "$as_me:5687: checking for $CC warning options..." >&5
5688 echo "$as_me: checking for $CC warning options..." >&6;}
5689         cf_save_CFLAGS="$CFLAGS"
5690         EXTRA_CFLAGS=
5691         cf_warn_CONST=""
5692         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
5693         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
5694         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
5695         for cf_opt in W Wall \
5696                 Wbad-function-cast \
5697                 Wcast-align \
5698                 Wcast-qual \
5699                 Wdeclaration-after-statement \
5700                 Wextra \
5701                 Winline \
5702                 Wmissing-declarations \
5703                 Wmissing-prototypes \
5704                 Wnested-externs \
5705                 Wpointer-arith \
5706                 Wshadow \
5707                 Wstrict-prototypes \
5708                 Wundef $cf_gcc_warnings $cf_warn_CONST
5709         do
5710                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5711                 if { (eval echo "$as_me:5711: \"$ac_compile\"") >&5
5712   (eval $ac_compile) 2>&5
5713   ac_status=$?
5714   echo "$as_me:5714: \$? = $ac_status" >&5
5715   (exit $ac_status); }; then
5716                         test -n "$verbose" && echo "$as_me:5716: result: ... -$cf_opt" >&5
5717 echo "${ECHO_T}... -$cf_opt" >&6
5718                         case $cf_opt in
5719                         (Wcast-qual)
5720
5721         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5722         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
5723
5724                                 ;;
5725                         (Winline)
5726                                 case $GCC_VERSION in
5727                                 ([34].*)
5728                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
5729
5730 echo "${as_me:-configure}:5730: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5731
5732                                         continue;;
5733                                 esac
5734                                 ;;
5735                         (Wpointer-arith)
5736                                 case $GCC_VERSION in
5737                                 ([12].*)
5738                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
5739
5740 echo "${as_me:-configure}:5740: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5741
5742                                         continue;;
5743                                 esac
5744                                 ;;
5745                         esac
5746                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5747                 fi
5748         done
5749         CFLAGS="$cf_save_CFLAGS"
5750 fi
5751 rm -rf conftest*
5752
5753 fi
5754 fi
5755
5756 echo "$as_me:5756: checking if you want to use pkg-config" >&5
5757 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5758
5759 # Check whether --with-pkg-config or --without-pkg-config was given.
5760 if test "${with_pkg_config+set}" = set; then
5761   withval="$with_pkg_config"
5762   cf_pkg_config=$withval
5763 else
5764   cf_pkg_config=yes
5765 fi;
5766 echo "$as_me:5766: result: $cf_pkg_config" >&5
5767 echo "${ECHO_T}$cf_pkg_config" >&6
5768
5769 case $cf_pkg_config in
5770 (no)
5771         PKG_CONFIG=none
5772         ;;
5773 (yes)
5774
5775 if test -n "$ac_tool_prefix"; then
5776   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5777 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5778 echo "$as_me:5778: checking for $ac_word" >&5
5779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5780 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5781   echo $ECHO_N "(cached) $ECHO_C" >&6
5782 else
5783   case $PKG_CONFIG in
5784   [\\/]* | ?:[\\/]*)
5785   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5786   ;;
5787   *)
5788   ac_save_IFS=$IFS; IFS=$ac_path_separator
5789 ac_dummy="$PATH"
5790 for ac_dir in $ac_dummy; do
5791   IFS=$ac_save_IFS
5792   test -z "$ac_dir" && ac_dir=.
5793   if $as_executable_p "$ac_dir/$ac_word"; then
5794    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5795    echo "$as_me:5795: found $ac_dir/$ac_word" >&5
5796    break
5797 fi
5798 done
5799
5800   ;;
5801 esac
5802 fi
5803 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5804
5805 if test -n "$PKG_CONFIG"; then
5806   echo "$as_me:5806: result: $PKG_CONFIG" >&5
5807 echo "${ECHO_T}$PKG_CONFIG" >&6
5808 else
5809   echo "$as_me:5809: result: no" >&5
5810 echo "${ECHO_T}no" >&6
5811 fi
5812
5813 fi
5814 if test -z "$ac_cv_path_PKG_CONFIG"; then
5815   ac_pt_PKG_CONFIG=$PKG_CONFIG
5816   # Extract the first word of "pkg-config", so it can be a program name with args.
5817 set dummy pkg-config; ac_word=$2
5818 echo "$as_me:5818: checking for $ac_word" >&5
5819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5820 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5821   echo $ECHO_N "(cached) $ECHO_C" >&6
5822 else
5823   case $ac_pt_PKG_CONFIG in
5824   [\\/]* | ?:[\\/]*)
5825   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5826   ;;
5827   *)
5828   ac_save_IFS=$IFS; IFS=$ac_path_separator
5829 ac_dummy="$PATH"
5830 for ac_dir in $ac_dummy; do
5831   IFS=$ac_save_IFS
5832   test -z "$ac_dir" && ac_dir=.
5833   if $as_executable_p "$ac_dir/$ac_word"; then
5834    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5835    echo "$as_me:5835: found $ac_dir/$ac_word" >&5
5836    break
5837 fi
5838 done
5839
5840   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5841   ;;
5842 esac
5843 fi
5844 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5845
5846 if test -n "$ac_pt_PKG_CONFIG"; then
5847   echo "$as_me:5847: result: $ac_pt_PKG_CONFIG" >&5
5848 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5849 else
5850   echo "$as_me:5850: result: no" >&5
5851 echo "${ECHO_T}no" >&6
5852 fi
5853
5854   PKG_CONFIG=$ac_pt_PKG_CONFIG
5855 else
5856   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5857 fi
5858
5859         ;;
5860 (*)
5861         PKG_CONFIG=$withval
5862         ;;
5863 esac
5864
5865 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5866 if test "$PKG_CONFIG" != none ; then
5867
5868 if test "x$prefix" != xNONE; then
5869         cf_path_syntax="$prefix"
5870 else
5871         cf_path_syntax="$ac_default_prefix"
5872 fi
5873
5874 case ".$PKG_CONFIG" in
5875 (.\$\(*\)*|.\'*\'*)
5876         ;;
5877 (..|./*|.\\*)
5878         ;;
5879 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5880         ;;
5881 (.\${*prefix}*|.\${*dir}*)
5882         eval PKG_CONFIG="$PKG_CONFIG"
5883         case ".$PKG_CONFIG" in
5884         (.NONE/*)
5885                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5886                 ;;
5887         esac
5888         ;;
5889 (.no|.NONE/*)
5890         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
5891         ;;
5892 (*)
5893         { { echo "$as_me:5893: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5894 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5895    { (exit 1); exit 1; }; }
5896         ;;
5897 esac
5898
5899 elif test "x$cf_pkg_config" != xno ; then
5900         { echo "$as_me:5900: WARNING: pkg-config is not installed" >&5
5901 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5902 fi
5903
5904 echo "$as_me:5904: checking for this package's name" >&5
5905 echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
5906
5907 # Check whether --with-package or --without-package was given.
5908 if test "${with_package+set}" = set; then
5909   withval="$with_package"
5910   PACKAGE=$withval
5911 else
5912   PACKAGE=dialog
5913 fi;
5914 echo "$as_me:5914: result: $PACKAGE" >&5
5915 echo "${ECHO_T}$PACKAGE" >&6
5916
5917 if test -f $srcdir/VERSION ; then
5918         echo "$as_me:5918: checking for package version" >&5
5919 echo $ECHO_N "checking for package version... $ECHO_C" >&6
5920
5921         # if there are not enough fields, cut returns the last one...
5922         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
5923         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
5924         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
5925
5926         # this is how CF_BUNDLED_INTL uses $VERSION:
5927         VERSION="$cf_field1"
5928
5929         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
5930         test -z "$VERSION_MAJOR" && { { echo "$as_me:5930: error: missing major-version" >&5
5931 echo "$as_me: error: missing major-version" >&2;}
5932    { (exit 1); exit 1; }; }
5933
5934         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
5935         test -z "$VERSION_MINOR" && { { echo "$as_me:5935: error: missing minor-version" >&5
5936 echo "$as_me: error: missing minor-version" >&2;}
5937    { (exit 1); exit 1; }; }
5938
5939         echo "$as_me:5939: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
5940 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
5941
5942         echo "$as_me:5942: checking for package patch date" >&5
5943 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
5944         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
5945         case .$VERSION_PATCH in
5946         (.)
5947                 { { echo "$as_me:5947: error: missing patch-date $VERSION_PATCH" >&5
5948 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
5949    { (exit 1); exit 1; }; }
5950                 ;;
5951         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
5952                 ;;
5953         (*)
5954                 { { echo "$as_me:5954: error: illegal patch-date $VERSION_PATCH" >&5
5955 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
5956    { (exit 1); exit 1; }; }
5957                 ;;
5958         esac
5959         echo "$as_me:5959: result: $VERSION_PATCH" >&5
5960 echo "${ECHO_T}$VERSION_PATCH" >&6
5961 else
5962         { { echo "$as_me:5962: error: did not find $srcdir/VERSION" >&5
5963 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
5964    { (exit 1); exit 1; }; }
5965 fi
5966
5967 # show the actual data that we have for versions:
5968 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
5969
5970 echo "${as_me:-configure}:5970: testing ABI VERSION $VERSION ..." 1>&5
5971
5972 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
5973
5974 echo "${as_me:-configure}:5974: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
5975
5976 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
5977
5978 echo "${as_me:-configure}:5978: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
5979
5980 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
5981
5982 echo "${as_me:-configure}:5982: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
5983
5984         cf_PACKAGE=dialog
5985         PACKAGE=$PACKAGE
5986
5987 cat >>confdefs.h <<EOF
5988 #define PACKAGE "$PACKAGE"
5989 EOF
5990
5991 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5992
5993         cat >>confdefs.h <<EOF
5994 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
5995 EOF
5996
5997         cat >>confdefs.h <<EOF
5998 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
5999 EOF
6000
6001 CFG_ROOTNAME=$PACKAGE
6002 HDR_ROOTNAME=$PACKAGE
6003 LIB_ROOTNAME=$PACKAGE
6004
6005 echo "$as_me:6005: checking if we should install dlg_XXX headers to subdirectory" >&5
6006 echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
6007
6008 # Check whether --enable-header-subdir or --disable-header-subdir was given.
6009 if test "${enable_header_subdir+set}" = set; then
6010   enableval="$enable_header_subdir"
6011   SUB_INC=$enableval
6012 else
6013   SUB_INC=no
6014 fi;
6015 echo "$as_me:6015: result: $SUB_INC" >&5
6016 echo "${ECHO_T}$SUB_INC" >&6
6017
6018 case "x${with_man2html}" in
6019 (xno)
6020         cf_man2html=no
6021         ;;
6022 (x|xyes)
6023         # Extract the first word of "man2html", so it can be a program name with args.
6024 set dummy man2html; ac_word=$2
6025 echo "$as_me:6025: checking for $ac_word" >&5
6026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6027 if test "${ac_cv_path_cf_man2html+set}" = set; then
6028   echo $ECHO_N "(cached) $ECHO_C" >&6
6029 else
6030   case $cf_man2html in
6031   [\\/]* | ?:[\\/]*)
6032   ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
6033   ;;
6034   *)
6035   ac_save_IFS=$IFS; IFS=$ac_path_separator
6036 ac_dummy="$PATH"
6037 for ac_dir in $ac_dummy; do
6038   IFS=$ac_save_IFS
6039   test -z "$ac_dir" && ac_dir=.
6040   if $as_executable_p "$ac_dir/$ac_word"; then
6041    ac_cv_path_cf_man2html="$ac_dir/$ac_word"
6042    echo "$as_me:6042: found $ac_dir/$ac_word" >&5
6043    break
6044 fi
6045 done
6046
6047   test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
6048   ;;
6049 esac
6050 fi
6051 cf_man2html=$ac_cv_path_cf_man2html
6052
6053 if test -n "$cf_man2html"; then
6054   echo "$as_me:6054: result: $cf_man2html" >&5
6055 echo "${ECHO_T}$cf_man2html" >&6
6056 else
6057   echo "$as_me:6057: result: no" >&5
6058 echo "${ECHO_T}no" >&6
6059 fi
6060
6061         case "x$cf_man2html" in
6062         (x/*)
6063                 echo "$as_me:6063: checking for the modified Earl Hood script" >&5
6064 echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
6065                 if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
6066                 then
6067                         cf_man2html_ok=yes
6068                 else
6069                         cf_man2html=no
6070                         cf_man2html_ok=no
6071                 fi
6072                 echo "$as_me:6072: result: $cf_man2html_ok" >&5
6073 echo "${ECHO_T}$cf_man2html_ok" >&6
6074                 ;;
6075         (*)
6076                 cf_man2html=no
6077                 ;;
6078         esac
6079 esac
6080
6081 echo "$as_me:6081: checking for program to convert manpage to html" >&5
6082 echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
6083
6084 # Check whether --with-man2html or --without-man2html was given.
6085 if test "${with_man2html+set}" = set; then
6086   withval="$with_man2html"
6087   cf_man2html=$withval
6088 else
6089   cf_man2html=$cf_man2html
6090 fi;
6091
6092 cf_with_groff=no
6093
6094 case $cf_man2html in
6095 (yes)
6096         echo "$as_me:6096: result: man2html" >&5
6097 echo "${ECHO_T}man2html" >&6
6098         # Extract the first word of "man2html", so it can be a program name with args.
6099 set dummy man2html; ac_word=$2
6100 echo "$as_me:6100: checking for $ac_word" >&5
6101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6102 if test "${ac_cv_path_cf_man2html+set}" = set; then
6103   echo $ECHO_N "(cached) $ECHO_C" >&6
6104 else
6105   case $cf_man2html in
6106   [\\/]* | ?:[\\/]*)
6107   ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
6108   ;;
6109   *)
6110   ac_save_IFS=$IFS; IFS=$ac_path_separator
6111 ac_dummy="$PATH"
6112 for ac_dir in $ac_dummy; do
6113   IFS=$ac_save_IFS
6114   test -z "$ac_dir" && ac_dir=.
6115   if $as_executable_p "$ac_dir/$ac_word"; then
6116    ac_cv_path_cf_man2html="$ac_dir/$ac_word"
6117    echo "$as_me:6117: found $ac_dir/$ac_word" >&5
6118    break
6119 fi
6120 done
6121
6122   test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
6123   ;;
6124 esac
6125 fi
6126 cf_man2html=$ac_cv_path_cf_man2html
6127
6128 if test -n "$cf_man2html"; then
6129   echo "$as_me:6129: result: $cf_man2html" >&5
6130 echo "${ECHO_T}$cf_man2html" >&6
6131 else
6132   echo "$as_me:6132: result: no" >&5
6133 echo "${ECHO_T}no" >&6
6134 fi
6135
6136         ;;
6137 (no|groff|*/groff*)
6138         cf_with_groff=yes
6139         cf_man2html=$GROFF_PATH
6140         echo "$as_me:6140: result: $cf_man2html" >&5
6141 echo "${ECHO_T}$cf_man2html" >&6
6142         ;;
6143 (*)
6144         echo "$as_me:6144: result: $cf_man2html" >&5
6145 echo "${ECHO_T}$cf_man2html" >&6
6146         ;;
6147 esac
6148
6149 MAN2HTML_TEMP="man2html.tmp"
6150         cat >$MAN2HTML_TEMP <<CF_EOF
6151 #!$SHELL
6152 # Temporary script generated by CF_WITH_MAN2HTML
6153 # Convert inputs to html, sending result to standard output.
6154 #
6155 # Parameters:
6156 # \${1} = rootname of file to convert
6157 # \${2} = suffix of file to convert, e.g., "1"
6158 # \${3} = macros to use, e.g., "man"
6159 #
6160 ROOT=\$1
6161 TYPE=\$2
6162 MACS=\$3
6163
6164 unset LANG
6165 unset LC_ALL
6166 unset LC_CTYPE
6167 unset LANGUAGE
6168 GROFF_NO_SGR=stupid
6169 export GROFF_NO_SGR
6170
6171 CF_EOF
6172
6173 if test "x$cf_with_groff" = xyes
6174 then
6175         MAN2HTML_NOTE="$GROFF_NOTE"
6176         MAN2HTML_PATH="$GROFF_PATH"
6177         cat >>$MAN2HTML_TEMP <<CF_EOF
6178 $SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
6179 CF_EOF
6180 else
6181         MAN2HTML_NOTE=""
6182
6183 if test "x$prefix" != xNONE; then
6184         cf_path_syntax="$prefix"
6185 else
6186         cf_path_syntax="$ac_default_prefix"
6187 fi
6188
6189 case ".$cf_man2html" in
6190 (.\$\(*\)*|.\'*\'*)
6191         ;;
6192 (..|./*|.\\*)
6193         ;;
6194 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6195         ;;
6196 (.\${*prefix}*|.\${*dir}*)
6197         eval cf_man2html="$cf_man2html"
6198         case ".$cf_man2html" in
6199         (.NONE/*)
6200                 cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
6201                 ;;
6202         esac
6203         ;;
6204 (.no|.NONE/*)
6205         cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
6206         ;;
6207 (*)
6208         { { echo "$as_me:6208: error: expected a pathname, not \"$cf_man2html\"" >&5
6209 echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
6210    { (exit 1); exit 1; }; }
6211         ;;
6212 esac
6213
6214         MAN2HTML_PATH="$cf_man2html"
6215         echo "$as_me:6215: checking for $cf_man2html top/bottom margins" >&5
6216 echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
6217
6218         # for this example, expect 3 lines of content, the remainder is head/foot
6219         cat >conftest.in <<CF_EOF
6220 .TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
6221 .SH SECTION
6222 MARKER
6223 CF_EOF
6224
6225         LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
6226
6227         cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
6228         cf_man2html_top=`expr $cf_man2html_1st - 2`
6229         cf_man2html_bot=`wc -l conftest.out |sed -e 's/[^0-9]//g'`
6230         cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
6231         cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
6232
6233         echo "$as_me:6233: result: $cf_man2html_top_bot" >&5
6234 echo "${ECHO_T}$cf_man2html_top_bot" >&6
6235
6236         echo "$as_me:6236: checking for pagesize to use" >&5
6237 echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
6238         for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
6239         do
6240         cat >>conftest.in <<CF_EOF
6241 .nf
6242 0
6243 1
6244 2
6245 3
6246 4
6247 5
6248 6
6249 7
6250 8
6251 9
6252 CF_EOF
6253         done
6254
6255         LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
6256         cf_man2html_page=`fgrep -n HEAD1 conftest.out |tail -n 1 |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
6257         test -z "$cf_man2html_page" && cf_man2html_page=99999
6258         test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
6259
6260         rm -rf conftest*
6261         echo "$as_me:6261: result: $cf_man2html_page" >&5
6262 echo "${ECHO_T}$cf_man2html_page" >&6
6263
6264         cat >>$MAN2HTML_TEMP <<CF_EOF
6265 : \${MAN2HTML_PATH=$MAN2HTML_PATH}
6266 MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
6267 case \${TYPE} in
6268 (ms)
6269         $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
6270         ;;
6271 (*)
6272         $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
6273         ;;
6274 esac
6275 CF_EOF
6276 fi
6277
6278 chmod 700 $MAN2HTML_TEMP
6279
6280 EXTRAOBJS=""
6281
6282 echo "$as_me:6282: checking for ANSI C header files" >&5
6283 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6284 if test "${ac_cv_header_stdc+set}" = set; then
6285   echo $ECHO_N "(cached) $ECHO_C" >&6
6286 else
6287   cat >conftest.$ac_ext <<_ACEOF
6288 #line 6288 "configure"
6289 #include "confdefs.h"
6290 #include <stdlib.h>
6291 #include <stdarg.h>
6292 #include <string.h>
6293 #include <float.h>
6294
6295 _ACEOF
6296 if { (eval echo "$as_me:6296: \"$ac_cpp conftest.$ac_ext\"") >&5
6297   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6298   ac_status=$?
6299   egrep -v '^ *\+' conftest.er1 >conftest.err
6300   rm -f conftest.er1
6301   cat conftest.err >&5
6302   echo "$as_me:6302: \$? = $ac_status" >&5
6303   (exit $ac_status); } >/dev/null; then
6304   if test -s conftest.err; then
6305     ac_cpp_err=$ac_c_preproc_warn_flag
6306   else
6307     ac_cpp_err=
6308   fi
6309 else
6310   ac_cpp_err=yes
6311 fi
6312 if test -z "$ac_cpp_err"; then
6313   ac_cv_header_stdc=yes
6314 else
6315   echo "$as_me: failed program was:" >&5
6316   cat conftest.$ac_ext >&5
6317   ac_cv_header_stdc=no
6318 fi
6319 rm -f conftest.err conftest.$ac_ext
6320
6321 if test $ac_cv_header_stdc = yes; then
6322   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6323   cat >conftest.$ac_ext <<_ACEOF
6324 #line 6324 "configure"
6325 #include "confdefs.h"
6326 #include <string.h>
6327
6328 _ACEOF
6329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6330   egrep "memchr" >/dev/null 2>&1; then
6331   :
6332 else
6333   ac_cv_header_stdc=no
6334 fi
6335 rm -rf conftest*
6336
6337 fi
6338
6339 if test $ac_cv_header_stdc = yes; then
6340   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6341   cat >conftest.$ac_ext <<_ACEOF
6342 #line 6342 "configure"
6343 #include "confdefs.h"
6344 #include <stdlib.h>
6345
6346 _ACEOF
6347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6348   egrep "free" >/dev/null 2>&1; then
6349   :
6350 else
6351   ac_cv_header_stdc=no
6352 fi
6353 rm -rf conftest*
6354
6355 fi
6356
6357 if test $ac_cv_header_stdc = yes; then
6358   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6359   if test "$cross_compiling" = yes; then
6360   :
6361 else
6362   cat >conftest.$ac_ext <<_ACEOF
6363 #line 6363 "configure"
6364 #include "confdefs.h"
6365 #include <ctype.h>
6366 #if ((' ' & 0x0FF) == 0x020)
6367 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6368 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6369 #else
6370 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6371                      || ('j' <= (c) && (c) <= 'r') \
6372                      || ('s' <= (c) && (c) <= 'z'))
6373 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6374 #endif
6375
6376 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6377 int
6378 main (void)
6379 {
6380   int i;
6381   for (i = 0; i < 256; i++)
6382     if (XOR (islower (i), ISLOWER (i))
6383         || toupper (i) != TOUPPER (i))
6384       $ac_main_return(2);
6385   $ac_main_return (0);
6386 }
6387 _ACEOF
6388 rm -f conftest$ac_exeext
6389 if { (eval echo "$as_me:6389: \"$ac_link\"") >&5
6390   (eval $ac_link) 2>&5
6391   ac_status=$?
6392   echo "$as_me:6392: \$? = $ac_status" >&5
6393   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6394   { (eval echo "$as_me:6394: \"$ac_try\"") >&5
6395   (eval $ac_try) 2>&5
6396   ac_status=$?
6397   echo "$as_me:6397: \$? = $ac_status" >&5
6398   (exit $ac_status); }; }; then
6399   :
6400 else
6401   echo "$as_me: program exited with status $ac_status" >&5
6402 echo "$as_me: failed program was:" >&5
6403 cat conftest.$ac_ext >&5
6404 ac_cv_header_stdc=no
6405 fi
6406 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6407 fi
6408 fi
6409 fi
6410 echo "$as_me:6410: result: $ac_cv_header_stdc" >&5
6411 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6412 if test $ac_cv_header_stdc = yes; then
6413
6414 cat >>confdefs.h <<\EOF
6415 #define STDC_HEADERS 1
6416 EOF
6417
6418 fi
6419
6420 echo "$as_me:6420: checking for inline" >&5
6421 echo $ECHO_N "checking for inline... $ECHO_C" >&6
6422 if test "${ac_cv_c_inline+set}" = set; then
6423   echo $ECHO_N "(cached) $ECHO_C" >&6
6424 else
6425   ac_cv_c_inline=no
6426 for ac_kw in inline __inline__ __inline; do
6427   cat >conftest.$ac_ext <<_ACEOF
6428 #line 6428 "configure"
6429 #include "confdefs.h"
6430 #ifndef __cplusplus
6431 static $ac_kw int static_foo () {return 0; }
6432 $ac_kw int foo () {return 0; }
6433 #endif
6434
6435 _ACEOF
6436 rm -f conftest.$ac_objext
6437 if { (eval echo "$as_me:6437: \"$ac_compile\"") >&5
6438   (eval $ac_compile) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); } &&
6442          { ac_try='test -s conftest.$ac_objext'
6443   { (eval echo "$as_me:6443: \"$ac_try\"") >&5
6444   (eval $ac_try) 2>&5
6445   ac_status=$?
6446   echo "$as_me:6446: \$? = $ac_status" >&5
6447   (exit $ac_status); }; }; then
6448   ac_cv_c_inline=$ac_kw; break
6449 else
6450   echo "$as_me: failed program was:" >&5
6451 cat conftest.$ac_ext >&5
6452 fi
6453 rm -f conftest.$ac_objext conftest.$ac_ext
6454 done
6455
6456 fi
6457 echo "$as_me:6457: result: $ac_cv_c_inline" >&5
6458 echo "${ECHO_T}$ac_cv_c_inline" >&6
6459 case $ac_cv_c_inline in
6460   inline | yes) ;;
6461   no)
6462 cat >>confdefs.h <<\EOF
6463 #define inline
6464 EOF
6465  ;;
6466   *)  cat >>confdefs.h <<EOF
6467 #define inline $ac_cv_c_inline
6468 EOF
6469  ;;
6470 esac
6471
6472 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6473
6474 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6475                   inttypes.h stdint.h unistd.h
6476 do
6477 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6478 echo "$as_me:6478: checking for $ac_header" >&5
6479 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6480 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6481   echo $ECHO_N "(cached) $ECHO_C" >&6
6482 else
6483   cat >conftest.$ac_ext <<_ACEOF
6484 #line 6484 "configure"
6485 #include "confdefs.h"
6486 $ac_includes_default
6487 #include <$ac_header>
6488 _ACEOF
6489 rm -f conftest.$ac_objext
6490 if { (eval echo "$as_me:6490: \"$ac_compile\"") >&5
6491   (eval $ac_compile) 2>&5
6492   ac_status=$?
6493   echo "$as_me:6493: \$? = $ac_status" >&5
6494   (exit $ac_status); } &&
6495          { ac_try='test -s conftest.$ac_objext'
6496   { (eval echo "$as_me:6496: \"$ac_try\"") >&5
6497   (eval $ac_try) 2>&5
6498   ac_status=$?
6499   echo "$as_me:6499: \$? = $ac_status" >&5
6500   (exit $ac_status); }; }; then
6501   eval "$as_ac_Header=yes"
6502 else
6503   echo "$as_me: failed program was:" >&5
6504 cat conftest.$ac_ext >&5
6505 eval "$as_ac_Header=no"
6506 fi
6507 rm -f conftest.$ac_objext conftest.$ac_ext
6508 fi
6509 echo "$as_me:6509: result: `eval echo '${'$as_ac_Header'}'`" >&5
6510 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6511 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6512   cat >>confdefs.h <<EOF
6513 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6514 EOF
6515
6516 fi
6517 done
6518
6519 echo "$as_me:6519: checking for off_t" >&5
6520 echo $ECHO_N "checking for off_t... $ECHO_C" >&6
6521 if test "${ac_cv_type_off_t+set}" = set; then
6522   echo $ECHO_N "(cached) $ECHO_C" >&6
6523 else
6524   cat >conftest.$ac_ext <<_ACEOF
6525 #line 6525 "configure"
6526 #include "confdefs.h"
6527 $ac_includes_default
6528 int
6529 main (void)
6530 {
6531 if ((off_t *) 0)
6532   return 0;
6533 if (sizeof (off_t))
6534   return 0;
6535   ;
6536   return 0;
6537 }
6538 _ACEOF
6539 rm -f conftest.$ac_objext
6540 if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5
6541   (eval $ac_compile) 2>&5
6542   ac_status=$?
6543   echo "$as_me:6543: \$? = $ac_status" >&5
6544   (exit $ac_status); } &&
6545          { ac_try='test -s conftest.$ac_objext'
6546   { (eval echo "$as_me:6546: \"$ac_try\"") >&5
6547   (eval $ac_try) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); }; }; then
6551   ac_cv_type_off_t=yes
6552 else
6553   echo "$as_me: failed program was:" >&5
6554 cat conftest.$ac_ext >&5
6555 ac_cv_type_off_t=no
6556 fi
6557 rm -f conftest.$ac_objext conftest.$ac_ext
6558 fi
6559 echo "$as_me:6559: result: $ac_cv_type_off_t" >&5
6560 echo "${ECHO_T}$ac_cv_type_off_t" >&6
6561 if test $ac_cv_type_off_t = yes; then
6562   :
6563 else
6564
6565 cat >>confdefs.h <<EOF
6566 #define off_t long
6567 EOF
6568
6569 fi
6570
6571 echo "$as_me:6571: checking for size_t" >&5
6572 echo $ECHO_N "checking for size_t... $ECHO_C" >&6
6573 if test "${ac_cv_type_size_t+set}" = set; then
6574   echo $ECHO_N "(cached) $ECHO_C" >&6
6575 else
6576   cat >conftest.$ac_ext <<_ACEOF
6577 #line 6577 "configure"
6578 #include "confdefs.h"
6579 $ac_includes_default
6580 int
6581 main (void)
6582 {
6583 if ((size_t *) 0)
6584   return 0;
6585 if (sizeof (size_t))
6586   return 0;
6587   ;
6588   return 0;
6589 }
6590 _ACEOF
6591 rm -f conftest.$ac_objext
6592 if { (eval echo "$as_me:6592: \"$ac_compile\"") >&5
6593   (eval $ac_compile) 2>&5
6594   ac_status=$?
6595   echo "$as_me:6595: \$? = $ac_status" >&5
6596   (exit $ac_status); } &&
6597          { ac_try='test -s conftest.$ac_objext'
6598   { (eval echo "$as_me:6598: \"$ac_try\"") >&5
6599   (eval $ac_try) 2>&5
6600   ac_status=$?
6601   echo "$as_me:6601: \$? = $ac_status" >&5
6602   (exit $ac_status); }; }; then
6603   ac_cv_type_size_t=yes
6604 else
6605   echo "$as_me: failed program was:" >&5
6606 cat conftest.$ac_ext >&5
6607 ac_cv_type_size_t=no
6608 fi
6609 rm -f conftest.$ac_objext conftest.$ac_ext
6610 fi
6611 echo "$as_me:6611: result: $ac_cv_type_size_t" >&5
6612 echo "${ECHO_T}$ac_cv_type_size_t" >&6
6613 if test $ac_cv_type_size_t = yes; then
6614   :
6615 else
6616
6617 cat >>confdefs.h <<EOF
6618 #define size_t unsigned
6619 EOF
6620
6621 fi
6622
6623 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6624 # for constant arguments.  Useless!
6625 echo "$as_me:6625: checking for working alloca.h" >&5
6626 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
6627 if test "${ac_cv_working_alloca_h+set}" = set; then
6628   echo $ECHO_N "(cached) $ECHO_C" >&6
6629 else
6630   cat >conftest.$ac_ext <<_ACEOF
6631 #line 6631 "configure"
6632 #include "confdefs.h"
6633 #include <alloca.h>
6634 int
6635 main (void)
6636 {
6637 char *p = (char *) alloca (2 * sizeof (int));
6638   ;
6639   return 0;
6640 }
6641 _ACEOF
6642 rm -f conftest.$ac_objext conftest$ac_exeext
6643 if { (eval echo "$as_me:6643: \"$ac_link\"") >&5
6644   (eval $ac_link) 2>&5
6645   ac_status=$?
6646   echo "$as_me:6646: \$? = $ac_status" >&5
6647   (exit $ac_status); } &&
6648          { ac_try='test -s conftest$ac_exeext'
6649   { (eval echo "$as_me:6649: \"$ac_try\"") >&5
6650   (eval $ac_try) 2>&5
6651   ac_status=$?
6652   echo "$as_me:6652: \$? = $ac_status" >&5
6653   (exit $ac_status); }; }; then
6654   ac_cv_working_alloca_h=yes
6655 else
6656   echo "$as_me: failed program was:" >&5
6657 cat conftest.$ac_ext >&5
6658 ac_cv_working_alloca_h=no
6659 fi
6660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661 fi
6662 echo "$as_me:6662: result: $ac_cv_working_alloca_h" >&5
6663 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
6664 if test $ac_cv_working_alloca_h = yes; then
6665
6666 cat >>confdefs.h <<\EOF
6667 #define HAVE_ALLOCA_H 1
6668 EOF
6669
6670 fi
6671
6672 echo "$as_me:6672: checking for alloca" >&5
6673 echo $ECHO_N "checking for alloca... $ECHO_C" >&6
6674 if test "${ac_cv_func_alloca_works+set}" = set; then
6675   echo $ECHO_N "(cached) $ECHO_C" >&6
6676 else
6677   cat >conftest.$ac_ext <<_ACEOF
6678 #line 6678 "configure"
6679 #include "confdefs.h"
6680 #ifdef __GNUC__
6681 # define alloca __builtin_alloca
6682 #else
6683 # ifdef _MSC_VER
6684 #  include <malloc.h>
6685 #  define alloca _alloca
6686 # else
6687 #  if HAVE_ALLOCA_H
6688 #   include <alloca.h>
6689 #  else
6690 #   ifdef _AIX
6691  #pragma alloca
6692 #   else
6693 #    ifndef alloca /* predefined by HP cc +Olibcalls */
6694 char *alloca ();
6695 #    endif
6696 #   endif
6697 #  endif
6698 # endif
6699 #endif
6700
6701 int
6702 main (void)
6703 {
6704 char *p = (char *) alloca (1);
6705   ;
6706   return 0;
6707 }
6708 _ACEOF
6709 rm -f conftest.$ac_objext conftest$ac_exeext
6710 if { (eval echo "$as_me:6710: \"$ac_link\"") >&5
6711   (eval $ac_link) 2>&5
6712   ac_status=$?
6713   echo "$as_me:6713: \$? = $ac_status" >&5
6714   (exit $ac_status); } &&
6715          { ac_try='test -s conftest$ac_exeext'
6716   { (eval echo "$as_me:6716: \"$ac_try\"") >&5
6717   (eval $ac_try) 2>&5
6718   ac_status=$?
6719   echo "$as_me:6719: \$? = $ac_status" >&5
6720   (exit $ac_status); }; }; then
6721   ac_cv_func_alloca_works=yes
6722 else
6723   echo "$as_me: failed program was:" >&5
6724 cat conftest.$ac_ext >&5
6725 ac_cv_func_alloca_works=no
6726 fi
6727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6728 fi
6729 echo "$as_me:6729: result: $ac_cv_func_alloca_works" >&5
6730 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
6731
6732 if test $ac_cv_func_alloca_works = yes; then
6733
6734 cat >>confdefs.h <<\EOF
6735 #define HAVE_ALLOCA 1
6736 EOF
6737
6738 else
6739   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6740 # that cause trouble.  Some versions do not even contain alloca or
6741 # contain a buggy version.  If you still want to use their alloca,
6742 # use ar to extract alloca.o from them instead of compiling alloca.c.
6743
6744 ALLOCA=alloca.$ac_objext
6745
6746 cat >>confdefs.h <<\EOF
6747 #define C_ALLOCA 1
6748 EOF
6749
6750 echo "$as_me:6750: checking whether \`alloca.c' needs Cray hooks" >&5
6751 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
6752 if test "${ac_cv_os_cray+set}" = set; then
6753   echo $ECHO_N "(cached) $ECHO_C" >&6
6754 else
6755   cat >conftest.$ac_ext <<_ACEOF
6756 #line 6756 "configure"
6757 #include "confdefs.h"
6758 #if defined(CRAY) && ! defined(CRAY2)
6759 webecray
6760 #else
6761 wenotbecray
6762 #endif
6763
6764 _ACEOF
6765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6766   egrep "webecray" >/dev/null 2>&1; then
6767   ac_cv_os_cray=yes
6768 else
6769   ac_cv_os_cray=no
6770 fi
6771 rm -rf conftest*
6772
6773 fi
6774 echo "$as_me:6774: result: $ac_cv_os_cray" >&5
6775 echo "${ECHO_T}$ac_cv_os_cray" >&6
6776 if test $ac_cv_os_cray = yes; then
6777   for ac_func in _getb67 GETB67 getb67; do
6778     as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6779 echo "$as_me:6779: checking for $ac_func" >&5
6780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6781 if eval "test \"\${$as_ac_var+set}\" = set"; then
6782   echo $ECHO_N "(cached) $ECHO_C" >&6
6783 else
6784   cat >conftest.$ac_ext <<_ACEOF
6785 #line 6785 "configure"
6786 #include "confdefs.h"
6787 /* System header to define __stub macros and hopefully few prototypes,
6788     which can conflict with char $ac_func (); below.  */
6789 #include <assert.h>
6790 /* Override any gcc2 internal prototype to avoid an error.  */
6791 #ifdef __cplusplus
6792 extern "C"
6793 #endif
6794 /* We use char because int might match the return type of a gcc2
6795    builtin and then its argument prototype would still apply.  */
6796 char $ac_func ();
6797 char (*f) ();
6798
6799 int
6800 main (void)
6801 {
6802 /* The GNU C library defines this for functions which it implements
6803     to always fail with ENOSYS.  Some functions are actually named
6804     something starting with __ and the normal name is an alias.  */
6805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6806 choke me
6807 #else
6808 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6809 #endif
6810
6811   ;
6812   return 0;
6813 }
6814 _ACEOF
6815 rm -f conftest.$ac_objext conftest$ac_exeext
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817   (eval $ac_link) 2>&5
6818   ac_status=$?
6819   echo "$as_me:6819: \$? = $ac_status" >&5
6820   (exit $ac_status); } &&
6821          { ac_try='test -s conftest$ac_exeext'
6822   { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6823   (eval $ac_try) 2>&5
6824   ac_status=$?
6825   echo "$as_me:6825: \$? = $ac_status" >&5
6826   (exit $ac_status); }; }; then
6827   eval "$as_ac_var=yes"
6828 else
6829   echo "$as_me: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 eval "$as_ac_var=no"
6832 fi
6833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6834 fi
6835 echo "$as_me:6835: result: `eval echo '${'$as_ac_var'}'`" >&5
6836 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6837 if test `eval echo '${'$as_ac_var'}'` = yes; then
6838
6839 cat >>confdefs.h <<EOF
6840 #define CRAY_STACKSEG_END $ac_func
6841 EOF
6842
6843     break
6844 fi
6845
6846   done
6847 fi
6848
6849 echo "$as_me:6849: checking stack direction for C alloca" >&5
6850 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
6851 if test "${ac_cv_c_stack_direction+set}" = set; then
6852   echo $ECHO_N "(cached) $ECHO_C" >&6
6853 else
6854   if test "$cross_compiling" = yes; then
6855   ac_cv_c_stack_direction=0
6856 else
6857   cat >conftest.$ac_ext <<_ACEOF
6858 #line 6858 "configure"
6859 #include "confdefs.h"
6860 int
6861 find_stack_direction (void)
6862 {
6863   static char *addr = 0;
6864   auto char dummy;
6865   if (addr == 0)
6866     {
6867       addr = &dummy;
6868       return find_stack_direction ();
6869     }
6870   else
6871     return (&dummy > addr) ? 1 : -1;
6872 }
6873
6874 int
6875 main (void)
6876 {
6877   $ac_main_return (find_stack_direction () < 0);
6878 }
6879 _ACEOF
6880 rm -f conftest$ac_exeext
6881 if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
6882   (eval $ac_link) 2>&5
6883   ac_status=$?
6884   echo "$as_me:6884: \$? = $ac_status" >&5
6885   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6886   { (eval echo "$as_me:6886: \"$ac_try\"") >&5
6887   (eval $ac_try) 2>&5
6888   ac_status=$?
6889   echo "$as_me:6889: \$? = $ac_status" >&5
6890   (exit $ac_status); }; }; then
6891   ac_cv_c_stack_direction=1
6892 else
6893   echo "$as_me: program exited with status $ac_status" >&5
6894 echo "$as_me: failed program was:" >&5
6895 cat conftest.$ac_ext >&5
6896 ac_cv_c_stack_direction=-1
6897 fi
6898 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6899 fi
6900 fi
6901 echo "$as_me:6901: result: $ac_cv_c_stack_direction" >&5
6902 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
6903
6904 cat >>confdefs.h <<EOF
6905 #define STACK_DIRECTION $ac_cv_c_stack_direction
6906 EOF
6907
6908 fi
6909
6910 for ac_header in stdlib.h unistd.h
6911 do
6912 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6913 echo "$as_me:6913: checking for $ac_header" >&5
6914 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6915 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6916   echo $ECHO_N "(cached) $ECHO_C" >&6
6917 else
6918   cat >conftest.$ac_ext <<_ACEOF
6919 #line 6919 "configure"
6920 #include "confdefs.h"
6921 #include <$ac_header>
6922 _ACEOF
6923 if { (eval echo "$as_me:6923: \"$ac_cpp conftest.$ac_ext\"") >&5
6924   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6925   ac_status=$?
6926   egrep -v '^ *\+' conftest.er1 >conftest.err
6927   rm -f conftest.er1
6928   cat conftest.err >&5
6929   echo "$as_me:6929: \$? = $ac_status" >&5
6930   (exit $ac_status); } >/dev/null; then
6931   if test -s conftest.err; then
6932     ac_cpp_err=$ac_c_preproc_warn_flag
6933   else
6934     ac_cpp_err=
6935   fi
6936 else
6937   ac_cpp_err=yes
6938 fi
6939 if test -z "$ac_cpp_err"; then
6940   eval "$as_ac_Header=yes"
6941 else
6942   echo "$as_me: failed program was:" >&5
6943   cat conftest.$ac_ext >&5
6944   eval "$as_ac_Header=no"
6945 fi
6946 rm -f conftest.err conftest.$ac_ext
6947 fi
6948 echo "$as_me:6948: result: `eval echo '${'$as_ac_Header'}'`" >&5
6949 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6950 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6951   cat >>confdefs.h <<EOF
6952 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6953 EOF
6954
6955 fi
6956 done
6957
6958 for ac_func in getpagesize
6959 do
6960 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6961 echo "$as_me:6961: checking for $ac_func" >&5
6962 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6963 if eval "test \"\${$as_ac_var+set}\" = set"; then
6964   echo $ECHO_N "(cached) $ECHO_C" >&6
6965 else
6966   cat >conftest.$ac_ext <<_ACEOF
6967 #line 6967 "configure"
6968 #include "confdefs.h"
6969 /* System header to define __stub macros and hopefully few prototypes,
6970     which can conflict with char $ac_func (); below.  */
6971 #include <assert.h>
6972 /* Override any gcc2 internal prototype to avoid an error.  */
6973 #ifdef __cplusplus
6974 extern "C"
6975 #endif
6976 /* We use char because int might match the return type of a gcc2
6977    builtin and then its argument prototype would still apply.  */
6978 char $ac_func ();
6979 char (*f) ();
6980
6981 int
6982 main (void)
6983 {
6984 /* The GNU C library defines this for functions which it implements
6985     to always fail with ENOSYS.  Some functions are actually named
6986     something starting with __ and the normal name is an alias.  */
6987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6988 choke me
6989 #else
6990 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6991 #endif
6992
6993   ;
6994   return 0;
6995 }
6996 _ACEOF
6997 rm -f conftest.$ac_objext conftest$ac_exeext
6998 if { (eval echo "$as_me:6998: \"$ac_link\"") >&5
6999   (eval $ac_link) 2>&5
7000   ac_status=$?
7001   echo "$as_me:7001: \$? = $ac_status" >&5
7002   (exit $ac_status); } &&
7003          { ac_try='test -s conftest$ac_exeext'
7004   { (eval echo "$as_me:7004: \"$ac_try\"") >&5
7005   (eval $ac_try) 2>&5
7006   ac_status=$?
7007   echo "$as_me:7007: \$? = $ac_status" >&5
7008   (exit $ac_status); }; }; then
7009   eval "$as_ac_var=yes"
7010 else
7011   echo "$as_me: failed program was:" >&5
7012 cat conftest.$ac_ext >&5
7013 eval "$as_ac_var=no"
7014 fi
7015 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7016 fi
7017 echo "$as_me:7017: result: `eval echo '${'$as_ac_var'}'`" >&5
7018 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7019 if test `eval echo '${'$as_ac_var'}'` = yes; then
7020   cat >>confdefs.h <<EOF
7021 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7022 EOF
7023
7024 fi
7025 done
7026
7027 echo "$as_me:7027: checking for working mmap" >&5
7028 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
7029 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
7030   echo $ECHO_N "(cached) $ECHO_C" >&6
7031 else
7032   if test "$cross_compiling" = yes; then
7033   ac_cv_func_mmap_fixed_mapped=no
7034 else
7035   cat >conftest.$ac_ext <<_ACEOF
7036 #line 7036 "configure"
7037 #include "confdefs.h"
7038 $ac_includes_default
7039 /* Thanks to Mike Haertel and Jim Avera for this test.
7040    Here is a matrix of mmap possibilities:
7041         mmap private not fixed
7042         mmap private fixed at somewhere currently unmapped
7043         mmap private fixed at somewhere already mapped
7044         mmap shared not fixed
7045         mmap shared fixed at somewhere currently unmapped
7046         mmap shared fixed at somewhere already mapped
7047    For private mappings, we should verify that changes cannot be read()
7048    back from the file, nor mmap's back from the file at a different
7049    address.  (There have been systems where private was not correctly
7050    implemented like the infamous i386 svr4.0, and systems where the
7051    VM page cache was not coherent with the file system buffer cache
7052    like early versions of FreeBSD and possibly contemporary NetBSD.)
7053    For shared mappings, we should conversely verify that changes get
7054    propogated back to all the places they're supposed to be.
7055
7056    Grep wants private fixed already mapped.
7057    The main things grep needs to know about mmap are:
7058    * does it exist and is it safe to write into the mmap'd area
7059    * how to use it (BSD variants)  */
7060
7061 #include <fcntl.h>
7062 #include <sys/mman.h>
7063
7064 #if !STDC_HEADERS && !HAVE_STDLIB_H
7065 char *malloc ();
7066 #endif
7067
7068 /* This mess was copied from the GNU getpagesize.h.  */
7069 #if !HAVE_GETPAGESIZE
7070 /* Assume that all systems that can run configure have sys/param.h.  */
7071 # if !HAVE_SYS_PARAM_H
7072 #  define HAVE_SYS_PARAM_H 1
7073 # endif
7074
7075 # ifdef _SC_PAGESIZE
7076 #  define getpagesize() sysconf(_SC_PAGESIZE)
7077 # else /* no _SC_PAGESIZE */
7078 #  if HAVE_SYS_PARAM_H
7079 #   include <sys/param.h>
7080 #   ifdef EXEC_PAGESIZE
7081 #    define getpagesize() EXEC_PAGESIZE
7082 #   else /* no EXEC_PAGESIZE */
7083 #    ifdef NBPG
7084 #     define getpagesize() NBPG * CLSIZE
7085 #     ifndef CLSIZE
7086 #      define CLSIZE 1
7087 #     endif /* no CLSIZE */
7088 #    else /* no NBPG */
7089 #     ifdef NBPC
7090 #      define getpagesize() NBPC
7091 #     else /* no NBPC */
7092 #      ifdef PAGESIZE
7093 #       define getpagesize() PAGESIZE
7094 #      endif /* PAGESIZE */
7095 #     endif /* no NBPC */
7096 #    endif /* no NBPG */
7097 #   endif /* no EXEC_PAGESIZE */
7098 #  else /* no HAVE_SYS_PARAM_H */
7099 #   define getpagesize() 8192   /* punt totally */
7100 #  endif /* no HAVE_SYS_PARAM_H */
7101 # endif /* no _SC_PAGESIZE */
7102
7103 #endif /* no HAVE_GETPAGESIZE */
7104
7105 int
7106 main (void)
7107 {
7108   char *data, *data2, *data3;
7109   int i, pagesize;
7110   int fd;
7111
7112   pagesize = getpagesize ();
7113
7114   /* First, make a file with some known garbage in it. */
7115   data = (char *) malloc (pagesize);
7116   if (!data)
7117     $ac_main_return (1);
7118   for (i = 0; i < pagesize; ++i)
7119     *(data + i) = rand ();
7120   umask (0);
7121   fd = creat ("conftest.mmap", 0600);
7122   if (fd < 0)
7123     $ac_main_return (1);
7124   if (write (fd, data, pagesize) != pagesize)
7125     $ac_main_return (1);
7126   close (fd);
7127
7128   /* Next, try to mmap the file at a fixed address which already has
7129      something else allocated at it.  If we can, also make sure that
7130      we see the same garbage.  */
7131   fd = open ("conftest.mmap", O_RDWR);
7132   if (fd < 0)
7133     $ac_main_return (1);
7134   data2 = (char *) malloc (2 * pagesize);
7135   if (!data2)
7136     $ac_main_return (1);
7137   data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
7138   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7139                      MAP_PRIVATE | MAP_FIXED, fd, 0L))
7140     $ac_main_return (1);
7141   for (i = 0; i < pagesize; ++i)
7142     if (*(data + i) != *(data2 + i))
7143       $ac_main_return (1);
7144
7145   /* Finally, make sure that changes to the mapped area do not
7146      percolate back to the file as seen by read().  (This is a bug on
7147      some variants of i386 svr4.0.)  */
7148   for (i = 0; i < pagesize; ++i)
7149     *(data2 + i) = *(data2 + i) + 1;
7150   data3 = (char *) malloc (pagesize);
7151   if (!data3)
7152     $ac_main_return (1);
7153   if (read (fd, data3, pagesize) != pagesize)
7154     $ac_main_return (1);
7155   for (i = 0; i < pagesize; ++i)
7156     if (*(data + i) != *(data3 + i))
7157       $ac_main_return (1);
7158   close (fd);
7159   $ac_main_return (0);
7160 }
7161 _ACEOF
7162 rm -f conftest$ac_exeext
7163 if { (eval echo "$as_me:7163: \"$ac_link\"") >&5
7164   (eval $ac_link) 2>&5
7165   ac_status=$?
7166   echo "$as_me:7166: \$? = $ac_status" >&5
7167   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7168   { (eval echo "$as_me:7168: \"$ac_try\"") >&5
7169   (eval $ac_try) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); }; }; then
7173   ac_cv_func_mmap_fixed_mapped=yes
7174 else
7175   echo "$as_me: program exited with status $ac_status" >&5
7176 echo "$as_me: failed program was:" >&5
7177 cat conftest.$ac_ext >&5
7178 ac_cv_func_mmap_fixed_mapped=no
7179 fi
7180 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7181 fi
7182 fi
7183 echo "$as_me:7183: result: $ac_cv_func_mmap_fixed_mapped" >&5
7184 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
7185 if test $ac_cv_func_mmap_fixed_mapped = yes; then
7186
7187 cat >>confdefs.h <<\EOF
7188 #define HAVE_MMAP 1
7189 EOF
7190
7191 fi
7192 rm -f conftest.mmap
7193
7194 echo "$as_me:7194: checking whether we are using the GNU C Library 2.1 or newer" >&5
7195 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
7196 if test "${ac_cv_gnu_library_2_1+set}" = set; then
7197   echo $ECHO_N "(cached) $ECHO_C" >&6
7198 else
7199   cat >conftest.$ac_ext <<_ACEOF
7200 #line 7200 "configure"
7201 #include "confdefs.h"
7202
7203 #include <features.h>
7204 #ifdef __GNU_LIBRARY__
7205  #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
7206   Lucky GNU user
7207  #endif
7208 #endif
7209
7210 _ACEOF
7211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7212   egrep "Lucky GNU user" >/dev/null 2>&1; then
7213   ac_cv_gnu_library_2_1=yes
7214 else
7215   ac_cv_gnu_library_2_1=no
7216 fi
7217 rm -rf conftest*
7218
7219 fi
7220 echo "$as_me:7220: result: $ac_cv_gnu_library_2_1" >&5
7221 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
7222
7223         GLIBC21="$ac_cv_gnu_library_2_1"
7224
7225 cf_makefile=makefile
7226
7227 test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
7228
7229 # Allow override of "config.h" definition:
7230 : ${CONFIG_H:=config.h}
7231
7232 if test -z "$PACKAGE" ; then
7233         { { echo "$as_me:7233: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
7234 echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
7235    { (exit 1); exit 1; }; }
7236 fi
7237
7238 if test -z "$VERSION" ; then
7239 if test -f $srcdir/VERSION ; then
7240         VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
7241 else
7242         VERSION=unknown
7243 fi
7244 fi
7245
7246 for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
7247 stdlib.h string.h unistd.h sys/param.h
7248 do
7249 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7250 echo "$as_me:7250: checking for $ac_header" >&5
7251 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7252 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7253   echo $ECHO_N "(cached) $ECHO_C" >&6
7254 else
7255   cat >conftest.$ac_ext <<_ACEOF
7256 #line 7256 "configure"
7257 #include "confdefs.h"
7258 #include <$ac_header>
7259 _ACEOF
7260 if { (eval echo "$as_me:7260: \"$ac_cpp conftest.$ac_ext\"") >&5
7261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7262   ac_status=$?
7263   egrep -v '^ *\+' conftest.er1 >conftest.err
7264   rm -f conftest.er1
7265   cat conftest.err >&5
7266   echo "$as_me:7266: \$? = $ac_status" >&5
7267   (exit $ac_status); } >/dev/null; then
7268   if test -s conftest.err; then
7269     ac_cpp_err=$ac_c_preproc_warn_flag
7270   else
7271     ac_cpp_err=
7272   fi
7273 else
7274   ac_cpp_err=yes
7275 fi
7276 if test -z "$ac_cpp_err"; then
7277   eval "$as_ac_Header=yes"
7278 else
7279   echo "$as_me: failed program was:" >&5
7280   cat conftest.$ac_ext >&5
7281   eval "$as_ac_Header=no"
7282 fi
7283 rm -f conftest.err conftest.$ac_ext
7284 fi
7285 echo "$as_me:7285: result: `eval echo '${'$as_ac_Header'}'`" >&5
7286 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7287 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7288   cat >>confdefs.h <<EOF
7289 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7290 EOF
7291
7292 fi
7293 done
7294
7295 for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
7296 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
7297 strdup strtoul tsearch __argz_count __argz_stringify __argz_next
7298 do
7299 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7300 echo "$as_me:7300: checking for $ac_func" >&5
7301 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7302 if eval "test \"\${$as_ac_var+set}\" = set"; then
7303   echo $ECHO_N "(cached) $ECHO_C" >&6
7304 else
7305   cat >conftest.$ac_ext <<_ACEOF
7306 #line 7306 "configure"
7307 #include "confdefs.h"
7308 /* System header to define __stub macros and hopefully few prototypes,
7309     which can conflict with char $ac_func (); below.  */
7310 #include <assert.h>
7311 /* Override any gcc2 internal prototype to avoid an error.  */
7312 #ifdef __cplusplus
7313 extern "C"
7314 #endif
7315 /* We use char because int might match the return type of a gcc2
7316    builtin and then its argument prototype would still apply.  */
7317 char $ac_func ();
7318 char (*f) ();
7319
7320 int
7321 main (void)
7322 {
7323 /* The GNU C library defines this for functions which it implements
7324     to always fail with ENOSYS.  Some functions are actually named
7325     something starting with __ and the normal name is an alias.  */
7326 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7327 choke me
7328 #else
7329 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7330 #endif
7331
7332   ;
7333   return 0;
7334 }
7335 _ACEOF
7336 rm -f conftest.$ac_objext conftest$ac_exeext
7337 if { (eval echo "$as_me:7337: \"$ac_link\"") >&5
7338   (eval $ac_link) 2>&5
7339   ac_status=$?
7340   echo "$as_me:7340: \$? = $ac_status" >&5
7341   (exit $ac_status); } &&
7342          { ac_try='test -s conftest$ac_exeext'
7343   { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344   (eval $ac_try) 2>&5
7345   ac_status=$?
7346   echo "$as_me:7346: \$? = $ac_status" >&5
7347   (exit $ac_status); }; }; then
7348   eval "$as_ac_var=yes"
7349 else
7350   echo "$as_me: failed program was:" >&5
7351 cat conftest.$ac_ext >&5
7352 eval "$as_ac_var=no"
7353 fi
7354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7355 fi
7356 echo "$as_me:7356: result: `eval echo '${'$as_ac_var'}'`" >&5
7357 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7358 if test `eval echo '${'$as_ac_var'}'` = yes; then
7359   cat >>confdefs.h <<EOF
7360 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7361 EOF
7362
7363 fi
7364 done
7365
7366 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
7367 if test "${with_libiconv_prefix+set}" = set; then
7368   withval="$with_libiconv_prefix"
7369
7370 case "$withval" in
7371 (no)
7372         ;;
7373 (yes)
7374         ;;
7375 (*)
7376
7377 for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
7378         if test -d $cf_searchpath/include; then
7379
7380 if test -n "$cf_searchpath/include" ; then
7381   for cf_add_incdir in $cf_searchpath/include
7382   do
7383         while test $cf_add_incdir != /usr/include
7384         do
7385           if test -d $cf_add_incdir
7386           then
7387                 cf_have_incdir=no
7388                 if test -n "$CFLAGS$CPPFLAGS" ; then
7389                   # a loop is needed to ensure we can add subdirs of existing dirs
7390                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7391                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7392                           cf_have_incdir=yes; break
7393                         fi
7394                   done
7395                 fi
7396
7397                 if test "$cf_have_incdir" = no ; then
7398                   if test "$cf_add_incdir" = /usr/local/include ; then
7399                         if test "$GCC" = yes
7400                         then
7401                           cf_save_CPPFLAGS=$CPPFLAGS
7402
7403         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7404         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7405
7406                           cat >conftest.$ac_ext <<_ACEOF
7407 #line 7407 "configure"
7408 #include "confdefs.h"
7409 #include <stdio.h>
7410 int
7411 main (void)
7412 {
7413 printf("Hello")
7414   ;
7415   return 0;
7416 }
7417 _ACEOF
7418 rm -f conftest.$ac_objext
7419 if { (eval echo "$as_me:7419: \"$ac_compile\"") >&5
7420   (eval $ac_compile) 2>&5
7421   ac_status=$?
7422   echo "$as_me:7422: \$? = $ac_status" >&5
7423   (exit $ac_status); } &&
7424          { ac_try='test -s conftest.$ac_objext'
7425   { (eval echo "$as_me:7425: \"$ac_try\"") >&5
7426   (eval $ac_try) 2>&5
7427   ac_status=$?
7428   echo "$as_me:7428: \$? = $ac_status" >&5
7429   (exit $ac_status); }; }; then
7430   :
7431 else
7432   echo "$as_me: failed program was:" >&5
7433 cat conftest.$ac_ext >&5
7434 cf_have_incdir=yes
7435 fi
7436 rm -f conftest.$ac_objext conftest.$ac_ext
7437                           CPPFLAGS=$cf_save_CPPFLAGS
7438                         fi
7439                   fi
7440                 fi
7441
7442                 if test "$cf_have_incdir" = no ; then
7443                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7444
7445 echo "${as_me:-configure}:7445: testing adding $cf_add_incdir to include-path ..." 1>&5
7446
7447                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7448
7449                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7450                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7451                   cf_add_incdir="$cf_top_incdir"
7452                 else
7453                   break
7454                 fi
7455           else
7456                 break
7457           fi
7458         done
7459   done
7460 fi
7461
7462         elif test -d $cf_searchpath/../include ; then
7463
7464 if test -n "$cf_searchpath/../include" ; then
7465   for cf_add_incdir in $cf_searchpath/../include
7466   do
7467         while test $cf_add_incdir != /usr/include
7468         do
7469           if test -d $cf_add_incdir
7470           then
7471                 cf_have_incdir=no
7472                 if test -n "$CFLAGS$CPPFLAGS" ; then
7473                   # a loop is needed to ensure we can add subdirs of existing dirs
7474                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7475                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7476                           cf_have_incdir=yes; break
7477                         fi
7478                   done
7479                 fi
7480
7481                 if test "$cf_have_incdir" = no ; then
7482                   if test "$cf_add_incdir" = /usr/local/include ; then
7483                         if test "$GCC" = yes
7484                         then
7485                           cf_save_CPPFLAGS=$CPPFLAGS
7486
7487         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7488         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7489
7490                           cat >conftest.$ac_ext <<_ACEOF
7491 #line 7491 "configure"
7492 #include "confdefs.h"
7493 #include <stdio.h>
7494 int
7495 main (void)
7496 {
7497 printf("Hello")
7498   ;
7499   return 0;
7500 }
7501 _ACEOF
7502 rm -f conftest.$ac_objext
7503 if { (eval echo "$as_me:7503: \"$ac_compile\"") >&5
7504   (eval $ac_compile) 2>&5
7505   ac_status=$?
7506   echo "$as_me:7506: \$? = $ac_status" >&5
7507   (exit $ac_status); } &&
7508          { ac_try='test -s conftest.$ac_objext'
7509   { (eval echo "$as_me:7509: \"$ac_try\"") >&5
7510   (eval $ac_try) 2>&5
7511   ac_status=$?
7512   echo "$as_me:7512: \$? = $ac_status" >&5
7513   (exit $ac_status); }; }; then
7514   :
7515 else
7516   echo "$as_me: failed program was:" >&5
7517 cat conftest.$ac_ext >&5
7518 cf_have_incdir=yes
7519 fi
7520 rm -f conftest.$ac_objext conftest.$ac_ext
7521                           CPPFLAGS=$cf_save_CPPFLAGS
7522                         fi
7523                   fi
7524                 fi
7525
7526                 if test "$cf_have_incdir" = no ; then
7527                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7528
7529 echo "${as_me:-configure}:7529: testing adding $cf_add_incdir to include-path ..." 1>&5
7530
7531                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7532
7533                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7534                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7535                   cf_add_incdir="$cf_top_incdir"
7536                 else
7537                   break
7538                 fi
7539           else
7540                 break
7541           fi
7542         done
7543   done
7544 fi
7545
7546         else
7547 { { echo "$as_me:7547: error: cannot find libiconv under $withval" >&5
7548 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
7549    { (exit 1); exit 1; }; }
7550         fi
7551         if test -d $cf_searchpath/lib; then
7552
7553 if test -n "$cf_searchpath/lib" ; then
7554         for cf_add_libdir in $cf_searchpath/lib
7555         do
7556                 if test $cf_add_libdir = /usr/lib ; then
7557                         :
7558                 elif test -d $cf_add_libdir
7559                 then
7560                         cf_have_libdir=no
7561                         if test -n "$LDFLAGS$LIBS" ; then
7562                                 # a loop is needed to ensure we can add subdirs of existing dirs
7563                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
7564                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7565                                                 cf_have_libdir=yes; break
7566                                         fi
7567                                 done
7568                         fi
7569                         if test "$cf_have_libdir" = no ; then
7570                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7571
7572 echo "${as_me:-configure}:7572: testing adding $cf_add_libdir to library-path ..." 1>&5
7573
7574                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7575                         fi
7576                 fi
7577         done
7578 fi
7579
7580         elif test -d $cf_searchpath ; then
7581
7582 if test -n "$cf_searchpath" ; then
7583         for cf_add_libdir in $cf_searchpath
7584         do
7585                 if test $cf_add_libdir = /usr/lib ; then
7586                         :
7587                 elif test -d $cf_add_libdir
7588                 then
7589                         cf_have_libdir=no
7590                         if test -n "$LDFLAGS$LIBS" ; then
7591                                 # a loop is needed to ensure we can add subdirs of existing dirs
7592                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
7593                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7594                                                 cf_have_libdir=yes; break
7595                                         fi
7596                                 done
7597                         fi
7598                         if test "$cf_have_libdir" = no ; then
7599                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7600
7601 echo "${as_me:-configure}:7601: testing adding $cf_add_libdir to library-path ..." 1>&5
7602
7603                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7604                         fi
7605                 fi
7606         done
7607 fi
7608
7609         else
7610 { { echo "$as_me:7610: error: cannot find libiconv under $withval" >&5
7611 echo "$as_me: error: cannot find libiconv under $withval" >&2;}
7612    { (exit 1); exit 1; }; }
7613         fi
7614 done
7615
7616         ;;
7617 esac
7618
7619 fi;
7620
7621   echo "$as_me:7621: checking for iconv" >&5
7622 echo $ECHO_N "checking for iconv... $ECHO_C" >&6
7623 if test "${am_cv_func_iconv+set}" = set; then
7624   echo $ECHO_N "(cached) $ECHO_C" >&6
7625 else
7626
7627 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7628 # will be set on completion of the AC_TRY_LINK below.
7629 cf_cv_header_path_iconv=
7630 cf_cv_library_path_iconv=
7631
7632 echo "${as_me:-configure}:7632: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
7633
7634 cf_save_LIBS="$LIBS"
7635
7636 cat >conftest.$ac_ext <<_ACEOF
7637 #line 7637 "configure"
7638 #include "confdefs.h"
7639
7640 #include <stdlib.h>
7641 #include <iconv.h>
7642
7643 int
7644 main (void)
7645 {
7646
7647         iconv_t cd = iconv_open("","");
7648         iconv(cd,NULL,NULL,NULL,NULL);
7649         iconv_close(cd);
7650
7651   ;
7652   return 0;
7653 }
7654 _ACEOF
7655 rm -f conftest.$ac_objext conftest$ac_exeext
7656 if { (eval echo "$as_me:7656: \"$ac_link\"") >&5
7657   (eval $ac_link) 2>&5
7658   ac_status=$?
7659   echo "$as_me:7659: \$? = $ac_status" >&5
7660   (exit $ac_status); } &&
7661          { ac_try='test -s conftest$ac_exeext'
7662   { (eval echo "$as_me:7662: \"$ac_try\"") >&5
7663   (eval $ac_try) 2>&5
7664   ac_status=$?
7665   echo "$as_me:7665: \$? = $ac_status" >&5
7666   (exit $ac_status); }; }; then
7667
7668         cf_cv_find_linkage_iconv=yes
7669         cf_cv_header_path_iconv=/usr/include
7670         cf_cv_library_path_iconv=/usr/lib
7671
7672 else
7673   echo "$as_me: failed program was:" >&5
7674 cat conftest.$ac_ext >&5
7675
7676 LIBS="-liconv  $cf_save_LIBS"
7677
7678 cat >conftest.$ac_ext <<_ACEOF
7679 #line 7679 "configure"
7680 #include "confdefs.h"
7681
7682 #include <stdlib.h>
7683 #include <iconv.h>
7684
7685 int
7686 main (void)
7687 {
7688
7689         iconv_t cd = iconv_open("","");
7690         iconv(cd,NULL,NULL,NULL,NULL);
7691         iconv_close(cd);
7692
7693   ;
7694   return 0;
7695 }
7696 _ACEOF
7697 rm -f conftest.$ac_objext conftest$ac_exeext
7698 if { (eval echo "$as_me:7698: \"$ac_link\"") >&5
7699   (eval $ac_link) 2>&5
7700   ac_status=$?
7701   echo "$as_me:7701: \$? = $ac_status" >&5
7702   (exit $ac_status); } &&
7703          { ac_try='test -s conftest$ac_exeext'
7704   { (eval echo "$as_me:7704: \"$ac_try\"") >&5
7705   (eval $ac_try) 2>&5
7706   ac_status=$?
7707   echo "$as_me:7707: \$? = $ac_status" >&5
7708   (exit $ac_status); }; }; then
7709
7710         cf_cv_find_linkage_iconv=yes
7711         cf_cv_header_path_iconv=/usr/include
7712         cf_cv_library_path_iconv=/usr/lib
7713         cf_cv_library_file_iconv="-liconv"
7714
7715 else
7716   echo "$as_me: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7718
7719         cf_cv_find_linkage_iconv=no
7720         LIBS="$cf_save_LIBS"
7721
7722         test -n "$verbose" && echo "    find linkage for iconv library" 1>&6
7723
7724 echo "${as_me:-configure}:7724: testing find linkage for iconv library ..." 1>&5
7725
7726 echo "${as_me:-configure}:7726: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
7727
7728         cf_save_CPPFLAGS="$CPPFLAGS"
7729         cf_test_CPPFLAGS="$CPPFLAGS"
7730
7731 cf_search=
7732
7733 # collect the current set of include-directories from compiler flags
7734 cf_header_path_list=""
7735 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7736         for cf_header_path in $CPPFLAGS $CFLAGS
7737         do
7738                 case $cf_header_path in
7739                 (-I*)
7740                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7741
7742 test "x$cf_header_path" != "xNONE" && \
7743 test -d "$cf_header_path" && \
7744  {
7745         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7746         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7747         test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
7748         test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
7749         test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
7750         test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
7751 }
7752
7753                         cf_header_path_list="$cf_header_path_list $cf_search"
7754                         ;;
7755                 esac
7756         done
7757 fi
7758
7759 # add the variations for the package we are looking for
7760
7761 cf_search=
7762
7763 test "x$prefix" != "xNONE" && \
7764 test -d "$prefix" && \
7765  {
7766         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7767         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7768         test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
7769         test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
7770         test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
7771         test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
7772 }
7773
7774 for cf_subdir_prefix in \
7775         /usr \
7776         /usr/local \
7777         /usr/pkg \
7778         /opt \
7779         /opt/local \
7780         $HOME
7781 do
7782
7783 test "x$cf_subdir_prefix" != "x$prefix" && \
7784 test -d "$cf_subdir_prefix" && \
7785 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7786         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
7787         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
7788         test -d $cf_subdir_prefix/include/iconv &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
7789         test -d $cf_subdir_prefix/include/iconv/include &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
7790         test -d $cf_subdir_prefix/iconv/include &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
7791         test -d $cf_subdir_prefix/iconv/include/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
7792 }
7793
7794 done
7795
7796 test "$includedir" != NONE && \
7797 test "$includedir" != "/usr/include" && \
7798 test -d "$includedir" && {
7799         test -d $includedir &&    cf_search="$cf_search $includedir"
7800         test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
7801 }
7802
7803 test "$oldincludedir" != NONE && \
7804 test "$oldincludedir" != "/usr/include" && \
7805 test -d "$oldincludedir" && {
7806         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7807         test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
7808 }
7809
7810 cf_search="$cf_search $cf_header_path_list"
7811
7812         for cf_cv_header_path_iconv in $cf_search
7813         do
7814                 if test -d $cf_cv_header_path_iconv ; then
7815                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_iconv" 1>&6
7816
7817 echo "${as_me:-configure}:7817: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
7818
7819                         CPPFLAGS="$cf_save_CPPFLAGS"
7820
7821         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7822         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
7823
7824                         cat >conftest.$ac_ext <<_ACEOF
7825 #line 7825 "configure"
7826 #include "confdefs.h"
7827
7828 #include <stdlib.h>
7829 #include <iconv.h>
7830
7831 int
7832 main (void)
7833 {
7834
7835         iconv_t cd = iconv_open("","");
7836         iconv(cd,NULL,NULL,NULL,NULL);
7837         iconv_close(cd);
7838
7839   ;
7840   return 0;
7841 }
7842 _ACEOF
7843 rm -f conftest.$ac_objext
7844 if { (eval echo "$as_me:7844: \"$ac_compile\"") >&5
7845   (eval $ac_compile) 2>&5
7846   ac_status=$?
7847   echo "$as_me:7847: \$? = $ac_status" >&5
7848   (exit $ac_status); } &&
7849          { ac_try='test -s conftest.$ac_objext'
7850   { (eval echo "$as_me:7850: \"$ac_try\"") >&5
7851   (eval $ac_try) 2>&5
7852   ac_status=$?
7853   echo "$as_me:7853: \$? = $ac_status" >&5
7854   (exit $ac_status); }; }; then
7855
7856                                 test -n "$verbose" && echo "    ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
7857
7858 echo "${as_me:-configure}:7858: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
7859
7860                                 cf_cv_find_linkage_iconv=maybe
7861                                 cf_test_CPPFLAGS="$CPPFLAGS"
7862                                 break
7863 else
7864   echo "$as_me: failed program was:" >&5
7865 cat conftest.$ac_ext >&5
7866
7867                                 CPPFLAGS="$cf_save_CPPFLAGS"
7868
7869 fi
7870 rm -f conftest.$ac_objext conftest.$ac_ext
7871                 fi
7872         done
7873
7874         if test "$cf_cv_find_linkage_iconv" = maybe ; then
7875
7876 echo "${as_me:-configure}:7876: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
7877
7878                 cf_save_LIBS="$LIBS"
7879                 cf_save_LDFLAGS="$LDFLAGS"
7880
7881                 if test "$cf_cv_find_linkage_iconv" != yes ; then
7882
7883 cf_search=
7884 cf_library_path_list=""
7885 if test -n "${LDFLAGS}${LIBS}" ; then
7886         for cf_library_path in $LDFLAGS $LIBS
7887         do
7888                 case $cf_library_path in
7889                 (-L*)
7890                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7891
7892 test "x$cf_library_path" != "xNONE" && \
7893 test -d "$cf_library_path" && \
7894  {
7895         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7896         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7897         test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
7898         test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
7899         test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
7900         test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
7901 }
7902
7903                         cf_library_path_list="$cf_library_path_list $cf_search"
7904                         ;;
7905                 esac
7906         done
7907 fi
7908
7909 cf_search=
7910
7911 test "x$prefix" != "xNONE" && \
7912 test -d "$prefix" && \
7913  {
7914         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7915         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7916         test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
7917         test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
7918         test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
7919         test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
7920 }
7921
7922 for cf_subdir_prefix in \
7923         /usr \
7924         /usr/local \
7925         /usr/pkg \
7926         /opt \
7927         /opt/local \
7928         $HOME
7929 do
7930
7931 test "x$cf_subdir_prefix" != "x$prefix" && \
7932 test -d "$cf_subdir_prefix" && \
7933 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7934         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
7935         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
7936         test -d $cf_subdir_prefix/lib/iconv &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
7937         test -d $cf_subdir_prefix/lib/iconv/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
7938         test -d $cf_subdir_prefix/iconv/lib &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
7939         test -d $cf_subdir_prefix/iconv/lib/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
7940 }
7941
7942 done
7943
7944 cf_search="$cf_library_path_list $cf_search"
7945
7946                         for cf_cv_library_path_iconv in $cf_search
7947                         do
7948                                 if test -d $cf_cv_library_path_iconv ; then
7949                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_iconv" 1>&6
7950
7951 echo "${as_me:-configure}:7951: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
7952
7953                                         CPPFLAGS="$cf_test_CPPFLAGS"
7954                                         LIBS="-liconv  $cf_save_LIBS"
7955                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
7956                                         cat >conftest.$ac_ext <<_ACEOF
7957 #line 7957 "configure"
7958 #include "confdefs.h"
7959
7960 #include <stdlib.h>
7961 #include <iconv.h>
7962
7963 int
7964 main (void)
7965 {
7966
7967         iconv_t cd = iconv_open("","");
7968         iconv(cd,NULL,NULL,NULL,NULL);
7969         iconv_close(cd);
7970
7971   ;
7972   return 0;
7973 }
7974 _ACEOF
7975 rm -f conftest.$ac_objext conftest$ac_exeext
7976 if { (eval echo "$as_me:7976: \"$ac_link\"") >&5
7977   (eval $ac_link) 2>&5
7978   ac_status=$?
7979   echo "$as_me:7979: \$? = $ac_status" >&5
7980   (exit $ac_status); } &&
7981          { ac_try='test -s conftest$ac_exeext'
7982   { (eval echo "$as_me:7982: \"$ac_try\"") >&5
7983   (eval $ac_try) 2>&5
7984   ac_status=$?
7985   echo "$as_me:7985: \$? = $ac_status" >&5
7986   (exit $ac_status); }; }; then
7987
7988                                         test -n "$verbose" && echo "    ... found iconv library in $cf_cv_library_path_iconv" 1>&6
7989
7990 echo "${as_me:-configure}:7990: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
7991
7992                                         cf_cv_find_linkage_iconv=yes
7993                                         cf_cv_library_file_iconv="-liconv"
7994                                         break
7995 else
7996   echo "$as_me: failed program was:" >&5
7997 cat conftest.$ac_ext >&5
7998
7999                                         CPPFLAGS="$cf_save_CPPFLAGS"
8000                                         LIBS="$cf_save_LIBS"
8001                                         LDFLAGS="$cf_save_LDFLAGS"
8002
8003 fi
8004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8005                                 fi
8006                         done
8007                         CPPFLAGS="$cf_save_CPPFLAGS"
8008                         LDFLAGS="$cf_save_LDFLAGS"
8009                 fi
8010
8011         else
8012                 cf_cv_find_linkage_iconv=no
8013         fi
8014
8015 fi
8016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8017
8018 fi
8019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8020
8021 LIBS="$cf_save_LIBS"
8022
8023 if test "$cf_cv_find_linkage_iconv" = yes ; then
8024 am_cv_func_iconv=yes
8025 else
8026 am_cv_func_iconv="no, consider installing GNU libiconv"
8027 fi
8028
8029 fi
8030 echo "$as_me:8030: result: $am_cv_func_iconv" >&5
8031 echo "${ECHO_T}$am_cv_func_iconv" >&6
8032
8033   if test "$am_cv_func_iconv" = yes; then
8034
8035 cat >>confdefs.h <<\EOF
8036 #define HAVE_ICONV 1
8037 EOF
8038
8039     echo "$as_me:8039: checking if the declaration of iconv() needs const." >&5
8040 echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
8041 if test "${am_cv_proto_iconv_const+set}" = set; then
8042   echo $ECHO_N "(cached) $ECHO_C" >&6
8043 else
8044
8045       cat >conftest.$ac_ext <<_ACEOF
8046 #line 8046 "configure"
8047 #include "confdefs.h"
8048
8049 #include <stdlib.h>
8050 #include <iconv.h>
8051
8052 extern
8053 #ifdef __cplusplus
8054 "C"
8055 #endif
8056 #if defined(__STDC__) || defined(__cplusplus)
8057 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8058 #else
8059 size_t iconv();
8060 #endif
8061
8062 int
8063 main (void)
8064 {
8065
8066   ;
8067   return 0;
8068 }
8069 _ACEOF
8070 rm -f conftest.$ac_objext
8071 if { (eval echo "$as_me:8071: \"$ac_compile\"") >&5
8072   (eval $ac_compile) 2>&5
8073   ac_status=$?
8074   echo "$as_me:8074: \$? = $ac_status" >&5
8075   (exit $ac_status); } &&
8076          { ac_try='test -s conftest.$ac_objext'
8077   { (eval echo "$as_me:8077: \"$ac_try\"") >&5
8078   (eval $ac_try) 2>&5
8079   ac_status=$?
8080   echo "$as_me:8080: \$? = $ac_status" >&5
8081   (exit $ac_status); }; }; then
8082   am_cv_proto_iconv_const=no
8083 else
8084   echo "$as_me: failed program was:" >&5
8085 cat conftest.$ac_ext >&5
8086 am_cv_proto_iconv_const=yes
8087 fi
8088 rm -f conftest.$ac_objext conftest.$ac_ext
8089 fi
8090 echo "$as_me:8090: result: $am_cv_proto_iconv_const" >&5
8091 echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
8092
8093     if test "$am_cv_proto_iconv_const" = yes ; then
8094       am_cv_proto_iconv_arg1="const"
8095     else
8096       am_cv_proto_iconv_arg1=""
8097     fi
8098
8099 cat >>confdefs.h <<EOF
8100 #define ICONV_CONST $am_cv_proto_iconv_arg1
8101 EOF
8102
8103   fi
8104
8105   LIBICONV=
8106   if test "$cf_cv_find_linkage_iconv" = yes; then
8107
8108 if test -n "$cf_cv_header_path_iconv" ; then
8109   for cf_add_incdir in $cf_cv_header_path_iconv
8110   do
8111         while test $cf_add_incdir != /usr/include
8112         do
8113           if test -d $cf_add_incdir
8114           then
8115                 cf_have_incdir=no
8116                 if test -n "$CFLAGS$CPPFLAGS" ; then
8117                   # a loop is needed to ensure we can add subdirs of existing dirs
8118                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8119                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8120                           cf_have_incdir=yes; break
8121                         fi
8122                   done
8123                 fi
8124
8125                 if test "$cf_have_incdir" = no ; then
8126                   if test "$cf_add_incdir" = /usr/local/include ; then
8127                         if test "$GCC" = yes
8128                         then
8129                           cf_save_CPPFLAGS=$CPPFLAGS
8130
8131         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8132         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8133
8134                           cat >conftest.$ac_ext <<_ACEOF
8135 #line 8135 "configure"
8136 #include "confdefs.h"
8137 #include <stdio.h>
8138 int
8139 main (void)
8140 {
8141 printf("Hello")
8142   ;
8143   return 0;
8144 }
8145 _ACEOF
8146 rm -f conftest.$ac_objext
8147 if { (eval echo "$as_me:8147: \"$ac_compile\"") >&5
8148   (eval $ac_compile) 2>&5
8149   ac_status=$?
8150   echo "$as_me:8150: \$? = $ac_status" >&5
8151   (exit $ac_status); } &&
8152          { ac_try='test -s conftest.$ac_objext'
8153   { (eval echo "$as_me:8153: \"$ac_try\"") >&5
8154   (eval $ac_try) 2>&5
8155   ac_status=$?
8156   echo "$as_me:8156: \$? = $ac_status" >&5
8157   (exit $ac_status); }; }; then
8158   :
8159 else
8160   echo "$as_me: failed program was:" >&5
8161 cat conftest.$ac_ext >&5
8162 cf_have_incdir=yes
8163 fi
8164 rm -f conftest.$ac_objext conftest.$ac_ext
8165                           CPPFLAGS=$cf_save_CPPFLAGS
8166                         fi
8167                   fi
8168                 fi
8169
8170                 if test "$cf_have_incdir" = no ; then
8171                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8172
8173 echo "${as_me:-configure}:8173: testing adding $cf_add_incdir to include-path ..." 1>&5
8174
8175                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8176
8177                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8178                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8179                   cf_add_incdir="$cf_top_incdir"
8180                 else
8181                   break
8182                 fi
8183           else
8184                 break
8185           fi
8186         done
8187   done
8188 fi
8189
8190     if test -n "$cf_cv_library_file_iconv" ; then
8191       LIBICONV="-liconv"
8192
8193 if test -n "$cf_cv_library_path_iconv" ; then
8194         for cf_add_libdir in $cf_cv_library_path_iconv
8195         do
8196                 if test $cf_add_libdir = /usr/lib ; then
8197                         :
8198                 elif test -d $cf_add_libdir
8199                 then
8200                         cf_have_libdir=no
8201                         if test -n "$LDFLAGS$LIBS" ; then
8202                                 # a loop is needed to ensure we can add subdirs of existing dirs
8203                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
8204                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8205                                                 cf_have_libdir=yes; break
8206                                         fi
8207                                 done
8208                         fi
8209                         if test "$cf_have_libdir" = no ; then
8210                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8211
8212 echo "${as_me:-configure}:8212: testing adding $cf_add_libdir to library-path ..." 1>&5
8213
8214                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8215                         fi
8216                 fi
8217         done
8218 fi
8219
8220     fi
8221   fi
8222
8223 echo "$as_me:8223: checking for nl_langinfo and CODESET" >&5
8224 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8225 if test "${am_cv_langinfo_codeset+set}" = set; then
8226   echo $ECHO_N "(cached) $ECHO_C" >&6
8227 else
8228   cat >conftest.$ac_ext <<_ACEOF
8229 #line 8229 "configure"
8230 #include "confdefs.h"
8231 #include <langinfo.h>
8232 int
8233 main (void)
8234 {
8235 char* cs = nl_langinfo(CODESET);
8236   ;
8237   return 0;
8238 }
8239 _ACEOF
8240 rm -f conftest.$ac_objext conftest$ac_exeext
8241 if { (eval echo "$as_me:8241: \"$ac_link\"") >&5
8242   (eval $ac_link) 2>&5
8243   ac_status=$?
8244   echo "$as_me:8244: \$? = $ac_status" >&5
8245   (exit $ac_status); } &&
8246          { ac_try='test -s conftest$ac_exeext'
8247   { (eval echo "$as_me:8247: \"$ac_try\"") >&5
8248   (eval $ac_try) 2>&5
8249   ac_status=$?
8250   echo "$as_me:8250: \$? = $ac_status" >&5
8251   (exit $ac_status); }; }; then
8252   am_cv_langinfo_codeset=yes
8253 else
8254   echo "$as_me: failed program was:" >&5
8255 cat conftest.$ac_ext >&5
8256 am_cv_langinfo_codeset=no
8257 fi
8258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8259
8260 fi
8261 echo "$as_me:8261: result: $am_cv_langinfo_codeset" >&5
8262 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8263         if test $am_cv_langinfo_codeset = yes; then
8264
8265 cat >>confdefs.h <<\EOF
8266 #define HAVE_LANGINFO_CODESET 1
8267 EOF
8268
8269         fi
8270
8271    if test $ac_cv_header_locale_h = yes; then
8272         echo "$as_me:8272: checking for LC_MESSAGES" >&5
8273 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
8274 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
8275   echo $ECHO_N "(cached) $ECHO_C" >&6
8276 else
8277   cat >conftest.$ac_ext <<_ACEOF
8278 #line 8278 "configure"
8279 #include "confdefs.h"
8280 #include <locale.h>
8281 int
8282 main (void)
8283 {
8284 return LC_MESSAGES
8285   ;
8286   return 0;
8287 }
8288 _ACEOF
8289 rm -f conftest.$ac_objext conftest$ac_exeext
8290 if { (eval echo "$as_me:8290: \"$ac_link\"") >&5
8291   (eval $ac_link) 2>&5
8292   ac_status=$?
8293   echo "$as_me:8293: \$? = $ac_status" >&5
8294   (exit $ac_status); } &&
8295          { ac_try='test -s conftest$ac_exeext'
8296   { (eval echo "$as_me:8296: \"$ac_try\"") >&5
8297   (eval $ac_try) 2>&5
8298   ac_status=$?
8299   echo "$as_me:8299: \$? = $ac_status" >&5
8300   (exit $ac_status); }; }; then
8301   am_cv_val_LC_MESSAGES=yes
8302 else
8303   echo "$as_me: failed program was:" >&5
8304 cat conftest.$ac_ext >&5
8305 am_cv_val_LC_MESSAGES=no
8306 fi
8307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8308 fi
8309 echo "$as_me:8309: result: $am_cv_val_LC_MESSAGES" >&5
8310 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
8311         if test $am_cv_val_LC_MESSAGES = yes; then
8312
8313 cat >>confdefs.h <<\EOF
8314 #define HAVE_LC_MESSAGES 1
8315 EOF
8316
8317         fi
8318 fi
8319    echo "$as_me:8319: checking whether NLS is requested" >&5
8320 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
8321
8322 # Check whether --enable-nls or --disable-nls was given.
8323 if test "${enable_nls+set}" = set; then
8324   enableval="$enable_nls"
8325   USE_NLS=$enableval
8326 else
8327   USE_NLS=no
8328 fi;
8329   echo "$as_me:8329: result: $USE_NLS" >&5
8330 echo "${ECHO_T}$USE_NLS" >&6
8331
8332   BUILD_INCLUDED_LIBINTL=no
8333   USE_INCLUDED_LIBINTL=no
8334   INTLLIBS=
8335
8336     if test "$USE_NLS" = "yes"; then
8337         POSUB=po
8338
8339 cat >>confdefs.h <<\EOF
8340 #define ENABLE_NLS 1
8341 EOF
8342
8343     echo "$as_me:8343: checking whether included gettext is requested" >&5
8344 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
8345
8346 # Check whether --with-included-gettext or --without-included-gettext was given.
8347 if test "${with_included_gettext+set}" = set; then
8348   withval="$with_included_gettext"
8349   nls_cv_force_use_gnu_gettext=$withval
8350 else
8351   nls_cv_force_use_gnu_gettext=no
8352 fi;
8353     echo "$as_me:8353: result: $nls_cv_force_use_gnu_gettext" >&5
8354 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
8355
8356     nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
8357     if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
8358                         CATOBJEXT=NONE
8359
8360                                           cf_save_msgfmt_path="$MSGFMT"
8361       cf_save_xgettext_path="$XGETTEXT"
8362
8363             # Extract the first word of "msgfmt", so it can be a program name with args.
8364
8365 set dummy msgfmt; ac_word=$2
8366 echo "$as_me:8366: checking for $ac_word" >&5
8367 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8368 if test "${ac_cv_path_MSGFMT+set}" = set; then
8369   echo $ECHO_N "(cached) $ECHO_C" >&6
8370 else
8371   case "$MSGFMT" in
8372   ([\\/]*|?:[\\/]*)
8373   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
8374   ;;
8375   (*)
8376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8377   for ac_dir in $PATH; do
8378     test -z "$ac_dir" && ac_dir=.
8379     if test -f $ac_dir/$ac_word$ac_exeext; then
8380       if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
8381         ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
8382         break
8383       fi
8384     fi
8385   done
8386   IFS="$ac_save_ifs"
8387   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
8388   ;;
8389 esac
8390 fi
8391 MSGFMT="$ac_cv_path_MSGFMT"
8392 if test "$MSGFMT" != ":"; then
8393   echo "$as_me:8393: result: $MSGFMT" >&5
8394 echo "${ECHO_T}$MSGFMT" >&6
8395 else
8396   echo "$as_me:8396: result: no" >&5
8397 echo "${ECHO_T}no" >&6
8398 fi
8399
8400       # Extract the first word of "gmsgfmt", so it can be a program name with args.
8401 set dummy gmsgfmt; ac_word=$2
8402 echo "$as_me:8402: checking for $ac_word" >&5
8403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8404 if test "${ac_cv_path_GMSGFMT+set}" = set; then
8405   echo $ECHO_N "(cached) $ECHO_C" >&6
8406 else
8407   case $GMSGFMT in
8408   [\\/]* | ?:[\\/]*)
8409   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
8410   ;;
8411   *)
8412   ac_save_IFS=$IFS; IFS=$ac_path_separator
8413 ac_dummy="$PATH"
8414 for ac_dir in $ac_dummy; do
8415   IFS=$ac_save_IFS
8416   test -z "$ac_dir" && ac_dir=.
8417   if $as_executable_p "$ac_dir/$ac_word"; then
8418    ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
8419    echo "$as_me:8419: found $ac_dir/$ac_word" >&5
8420    break
8421 fi
8422 done
8423
8424   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
8425   ;;
8426 esac
8427 fi
8428 GMSGFMT=$ac_cv_path_GMSGFMT
8429
8430 if test -n "$GMSGFMT"; then
8431   echo "$as_me:8431: result: $GMSGFMT" >&5
8432 echo "${ECHO_T}$GMSGFMT" >&6
8433 else
8434   echo "$as_me:8434: result: no" >&5
8435 echo "${ECHO_T}no" >&6
8436 fi
8437
8438             # Extract the first word of "xgettext", so it can be a program name with args.
8439
8440 set dummy xgettext; ac_word=$2
8441 echo "$as_me:8441: checking for $ac_word" >&5
8442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8443 if test "${ac_cv_path_XGETTEXT+set}" = set; then
8444   echo $ECHO_N "(cached) $ECHO_C" >&6
8445 else
8446   case "$XGETTEXT" in
8447   ([\\/]*|?:[\\/]*)
8448   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
8449   ;;
8450   (*)
8451   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8452   for ac_dir in $PATH; do
8453     test -z "$ac_dir" && ac_dir=.
8454     if test -f $ac_dir/$ac_word$ac_exeext; then
8455       if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
8456         ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
8457         break
8458       fi
8459     fi
8460   done
8461   IFS="$ac_save_ifs"
8462   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
8463   ;;
8464 esac
8465 fi
8466 XGETTEXT="$ac_cv_path_XGETTEXT"
8467 if test "$XGETTEXT" != ":"; then
8468   echo "$as_me:8468: result: $XGETTEXT" >&5
8469 echo "${ECHO_T}$XGETTEXT" >&6
8470 else
8471   echo "$as_me:8471: result: no" >&5
8472 echo "${ECHO_T}no" >&6
8473 fi
8474
8475       cf_save_OPTS_1="$CPPFLAGS"
8476       if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
8477          test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
8478
8479 cf_fix_cppflags=no
8480 cf_new_cflags=
8481 cf_new_cppflags=
8482 cf_new_extra_cppflags=
8483
8484 for cf_add_cflags in -DIGNORE_MSGFMT_HACK
8485 do
8486 case $cf_fix_cppflags in
8487 (no)
8488         case $cf_add_cflags in
8489         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8490                 case $cf_add_cflags in
8491                 (-D*)
8492                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8493
8494                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8495                                 && test -z "${cf_tst_cflags}" \
8496                                 && cf_fix_cppflags=yes
8497
8498                         if test $cf_fix_cppflags = yes ; then
8499
8500         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8501         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8502
8503                                 continue
8504                         elif test "${cf_tst_cflags}" = "\"'" ; then
8505
8506         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8507         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8508
8509                                 continue
8510                         fi
8511                         ;;
8512                 esac
8513                 case "$CPPFLAGS" in
8514                 (*$cf_add_cflags)
8515                         ;;
8516                 (*)
8517                         case $cf_add_cflags in
8518                         (-D*)
8519                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8520
8521 CPPFLAGS=`echo "$CPPFLAGS" | \
8522         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8523                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8524
8525                                 ;;
8526                         esac
8527
8528         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8529         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8530
8531                         ;;
8532                 esac
8533                 ;;
8534         (*)
8535
8536         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8537         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8538
8539                 ;;
8540         esac
8541         ;;
8542 (yes)
8543
8544         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8545         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8546
8547         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8548
8549         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8550                 && test -z "${cf_tst_cflags}" \
8551                 && cf_fix_cppflags=no
8552         ;;
8553 esac
8554 done
8555
8556 if test -n "$cf_new_cflags" ; then
8557
8558         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8559         CFLAGS="${CFLAGS}$cf_new_cflags"
8560
8561 fi
8562
8563 if test -n "$cf_new_cppflags" ; then
8564
8565         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8566         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8567
8568 fi
8569
8570 if test -n "$cf_new_extra_cppflags" ; then
8571
8572         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8573         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8574
8575 fi
8576
8577       fi
8578
8579       cf_save_LIBS_1="$LIBS"
8580
8581 cf_add_libs="$LIBICONV"
8582 # Filter out duplicates - this happens with badly-designed ".pc" files...
8583 for cf_add_1lib in $LIBS
8584 do
8585         for cf_add_2lib in $cf_add_libs
8586         do
8587                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8588                 then
8589                         cf_add_1lib=
8590                         break
8591                 fi
8592         done
8593         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8594 done
8595 LIBS="$cf_add_libs"
8596
8597 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8598 # will be set on completion of the AC_TRY_LINK below.
8599 cf_cv_header_path_intl=
8600 cf_cv_library_path_intl=
8601
8602 echo "${as_me:-configure}:8602: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
8603
8604 cf_save_LIBS="$LIBS"
8605
8606 cat >conftest.$ac_ext <<_ACEOF
8607 #line 8607 "configure"
8608 #include "confdefs.h"
8609
8610 #include <libintl.h>
8611 extern int _nl_msg_cat_cntr;
8612
8613 int
8614 main (void)
8615 {
8616
8617         bindtextdomain ("", "");
8618         return (int) gettext ("")
8619
8620 #ifndef IGNORE_MSGFMT_HACK
8621                          + _nl_msg_cat_cntr
8622 #endif
8623
8624   ;
8625   return 0;
8626 }
8627 _ACEOF
8628 rm -f conftest.$ac_objext conftest$ac_exeext
8629 if { (eval echo "$as_me:8629: \"$ac_link\"") >&5
8630   (eval $ac_link) 2>&5
8631   ac_status=$?
8632   echo "$as_me:8632: \$? = $ac_status" >&5
8633   (exit $ac_status); } &&
8634          { ac_try='test -s conftest$ac_exeext'
8635   { (eval echo "$as_me:8635: \"$ac_try\"") >&5
8636   (eval $ac_try) 2>&5
8637   ac_status=$?
8638   echo "$as_me:8638: \$? = $ac_status" >&5
8639   (exit $ac_status); }; }; then
8640
8641         cf_cv_find_linkage_intl=yes
8642         cf_cv_header_path_intl=/usr/include
8643         cf_cv_library_path_intl=/usr/lib
8644
8645 else
8646   echo "$as_me: failed program was:" >&5
8647 cat conftest.$ac_ext >&5
8648
8649 LIBS="-lintl  $cf_save_LIBS"
8650
8651 cat >conftest.$ac_ext <<_ACEOF
8652 #line 8652 "configure"
8653 #include "confdefs.h"
8654
8655 #include <libintl.h>
8656 extern int _nl_msg_cat_cntr;
8657
8658 int
8659 main (void)
8660 {
8661
8662         bindtextdomain ("", "");
8663         return (int) gettext ("")
8664
8665 #ifndef IGNORE_MSGFMT_HACK
8666                          + _nl_msg_cat_cntr
8667 #endif
8668
8669   ;
8670   return 0;
8671 }
8672 _ACEOF
8673 rm -f conftest.$ac_objext conftest$ac_exeext
8674 if { (eval echo "$as_me:8674: \"$ac_link\"") >&5
8675   (eval $ac_link) 2>&5
8676   ac_status=$?
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); } &&
8679          { ac_try='test -s conftest$ac_exeext'
8680   { (eval echo "$as_me:8680: \"$ac_try\"") >&5
8681   (eval $ac_try) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); }; }; then
8685
8686         cf_cv_find_linkage_intl=yes
8687         cf_cv_header_path_intl=/usr/include
8688         cf_cv_library_path_intl=/usr/lib
8689         cf_cv_library_file_intl="-lintl"
8690
8691 else
8692   echo "$as_me: failed program was:" >&5
8693 cat conftest.$ac_ext >&5
8694
8695         cf_cv_find_linkage_intl=no
8696         LIBS="$cf_save_LIBS"
8697
8698         test -n "$verbose" && echo "    find linkage for intl library" 1>&6
8699
8700 echo "${as_me:-configure}:8700: testing find linkage for intl library ..." 1>&5
8701
8702 echo "${as_me:-configure}:8702: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
8703
8704         cf_save_CPPFLAGS="$CPPFLAGS"
8705         cf_test_CPPFLAGS="$CPPFLAGS"
8706
8707 cf_search=
8708
8709 # collect the current set of include-directories from compiler flags
8710 cf_header_path_list=""
8711 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8712         for cf_header_path in $CPPFLAGS $CFLAGS
8713         do
8714                 case $cf_header_path in
8715                 (-I*)
8716                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8717
8718 test "x$cf_header_path" != "xNONE" && \
8719 test -d "$cf_header_path" && \
8720  {
8721         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8722         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8723         test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
8724         test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
8725         test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
8726         test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
8727 }
8728
8729                         cf_header_path_list="$cf_header_path_list $cf_search"
8730                         ;;
8731                 esac
8732         done
8733 fi
8734
8735 # add the variations for the package we are looking for
8736
8737 cf_search=
8738
8739 test "x$prefix" != "xNONE" && \
8740 test -d "$prefix" && \
8741  {
8742         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8743         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8744         test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
8745         test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
8746         test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
8747         test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
8748 }
8749
8750 for cf_subdir_prefix in \
8751         /usr \
8752         /usr/local \
8753         /usr/pkg \
8754         /opt \
8755         /opt/local \
8756         $HOME
8757 do
8758
8759 test "x$cf_subdir_prefix" != "x$prefix" && \
8760 test -d "$cf_subdir_prefix" && \
8761 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8762         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
8763         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
8764         test -d $cf_subdir_prefix/include/intl &&       cf_search="$cf_search $cf_subdir_prefix/include/intl"
8765         test -d $cf_subdir_prefix/include/intl/include &&    cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
8766         test -d $cf_subdir_prefix/intl/include &&       cf_search="$cf_search $cf_subdir_prefix/intl/include"
8767         test -d $cf_subdir_prefix/intl/include/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
8768 }
8769
8770 done
8771
8772 test "$includedir" != NONE && \
8773 test "$includedir" != "/usr/include" && \
8774 test -d "$includedir" && {
8775         test -d $includedir &&    cf_search="$cf_search $includedir"
8776         test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
8777 }
8778
8779 test "$oldincludedir" != NONE && \
8780 test "$oldincludedir" != "/usr/include" && \
8781 test -d "$oldincludedir" && {
8782         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8783         test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
8784 }
8785
8786 cf_search="$cf_search $cf_header_path_list"
8787
8788         for cf_cv_header_path_intl in $cf_search
8789         do
8790                 if test -d $cf_cv_header_path_intl ; then
8791                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_intl" 1>&6
8792
8793 echo "${as_me:-configure}:8793: testing ... testing $cf_cv_header_path_intl ..." 1>&5
8794
8795                         CPPFLAGS="$cf_save_CPPFLAGS"
8796
8797         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8798         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
8799
8800                         cat >conftest.$ac_ext <<_ACEOF
8801 #line 8801 "configure"
8802 #include "confdefs.h"
8803
8804 #include <libintl.h>
8805 extern int _nl_msg_cat_cntr;
8806
8807 int
8808 main (void)
8809 {
8810
8811         bindtextdomain ("", "");
8812         return (int) gettext ("")
8813
8814 #ifndef IGNORE_MSGFMT_HACK
8815                          + _nl_msg_cat_cntr
8816 #endif
8817
8818   ;
8819   return 0;
8820 }
8821 _ACEOF
8822 rm -f conftest.$ac_objext
8823 if { (eval echo "$as_me:8823: \"$ac_compile\"") >&5
8824   (eval $ac_compile) 2>&5
8825   ac_status=$?
8826   echo "$as_me:8826: \$? = $ac_status" >&5
8827   (exit $ac_status); } &&
8828          { ac_try='test -s conftest.$ac_objext'
8829   { (eval echo "$as_me:8829: \"$ac_try\"") >&5
8830   (eval $ac_try) 2>&5
8831   ac_status=$?
8832   echo "$as_me:8832: \$? = $ac_status" >&5
8833   (exit $ac_status); }; }; then
8834
8835                                 test -n "$verbose" && echo "    ... found intl headers in $cf_cv_header_path_intl" 1>&6
8836
8837 echo "${as_me:-configure}:8837: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
8838
8839                                 cf_cv_find_linkage_intl=maybe
8840                                 cf_test_CPPFLAGS="$CPPFLAGS"
8841                                 break
8842 else
8843   echo "$as_me: failed program was:" >&5
8844 cat conftest.$ac_ext >&5
8845
8846                                 CPPFLAGS="$cf_save_CPPFLAGS"
8847
8848 fi
8849 rm -f conftest.$ac_objext conftest.$ac_ext
8850                 fi
8851         done
8852
8853         if test "$cf_cv_find_linkage_intl" = maybe ; then
8854
8855 echo "${as_me:-configure}:8855: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
8856
8857                 cf_save_LIBS="$LIBS"
8858                 cf_save_LDFLAGS="$LDFLAGS"
8859
8860                 if test "$cf_cv_find_linkage_intl" != yes ; then
8861
8862 cf_search=
8863 cf_library_path_list=""
8864 if test -n "${LDFLAGS}${LIBS}" ; then
8865         for cf_library_path in $LDFLAGS $LIBS
8866         do
8867                 case $cf_library_path in
8868                 (-L*)
8869                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8870
8871 test "x$cf_library_path" != "xNONE" && \
8872 test -d "$cf_library_path" && \
8873  {
8874         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8875         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8876         test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
8877         test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
8878         test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
8879         test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
8880 }
8881
8882                         cf_library_path_list="$cf_library_path_list $cf_search"
8883                         ;;
8884                 esac
8885         done
8886 fi
8887
8888 cf_search=
8889
8890 test "x$prefix" != "xNONE" && \
8891 test -d "$prefix" && \
8892  {
8893         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8894         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8895         test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
8896         test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
8897         test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
8898         test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
8899 }
8900
8901 for cf_subdir_prefix in \
8902         /usr \
8903         /usr/local \
8904         /usr/pkg \
8905         /opt \
8906         /opt/local \
8907         $HOME
8908 do
8909
8910 test "x$cf_subdir_prefix" != "x$prefix" && \
8911 test -d "$cf_subdir_prefix" && \
8912 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8913         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
8914         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
8915         test -d $cf_subdir_prefix/lib/intl &&       cf_search="$cf_search $cf_subdir_prefix/lib/intl"
8916         test -d $cf_subdir_prefix/lib/intl/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
8917         test -d $cf_subdir_prefix/intl/lib &&       cf_search="$cf_search $cf_subdir_prefix/intl/lib"
8918         test -d $cf_subdir_prefix/intl/lib/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
8919 }
8920
8921 done
8922
8923 cf_search="$cf_library_path_list $cf_search"
8924
8925                         for cf_cv_library_path_intl in $cf_search
8926                         do
8927                                 if test -d $cf_cv_library_path_intl ; then
8928                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_intl" 1>&6
8929
8930 echo "${as_me:-configure}:8930: testing ... testing $cf_cv_library_path_intl ..." 1>&5
8931
8932                                         CPPFLAGS="$cf_test_CPPFLAGS"
8933                                         LIBS="-lintl  $cf_save_LIBS"
8934                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
8935                                         cat >conftest.$ac_ext <<_ACEOF
8936 #line 8936 "configure"
8937 #include "confdefs.h"
8938
8939 #include <libintl.h>
8940 extern int _nl_msg_cat_cntr;
8941
8942 int
8943 main (void)
8944 {
8945
8946         bindtextdomain ("", "");
8947         return (int) gettext ("")
8948
8949 #ifndef IGNORE_MSGFMT_HACK
8950                          + _nl_msg_cat_cntr
8951 #endif
8952
8953   ;
8954   return 0;
8955 }
8956 _ACEOF
8957 rm -f conftest.$ac_objext conftest$ac_exeext
8958 if { (eval echo "$as_me:8958: \"$ac_link\"") >&5
8959   (eval $ac_link) 2>&5
8960   ac_status=$?
8961   echo "$as_me:8961: \$? = $ac_status" >&5
8962   (exit $ac_status); } &&
8963          { ac_try='test -s conftest$ac_exeext'
8964   { (eval echo "$as_me:8964: \"$ac_try\"") >&5
8965   (eval $ac_try) 2>&5
8966   ac_status=$?
8967   echo "$as_me:8967: \$? = $ac_status" >&5
8968   (exit $ac_status); }; }; then
8969
8970                                         test -n "$verbose" && echo "    ... found intl library in $cf_cv_library_path_intl" 1>&6
8971
8972 echo "${as_me:-configure}:8972: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
8973
8974                                         cf_cv_find_linkage_intl=yes
8975                                         cf_cv_library_file_intl="-lintl"
8976                                         break
8977 else
8978   echo "$as_me: failed program was:" >&5
8979 cat conftest.$ac_ext >&5
8980
8981                                         CPPFLAGS="$cf_save_CPPFLAGS"
8982                                         LIBS="$cf_save_LIBS"
8983                                         LDFLAGS="$cf_save_LDFLAGS"
8984
8985 fi
8986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8987                                 fi
8988                         done
8989                         CPPFLAGS="$cf_save_CPPFLAGS"
8990                         LDFLAGS="$cf_save_LDFLAGS"
8991                 fi
8992
8993         else
8994                 cf_cv_find_linkage_intl=no
8995         fi
8996
8997 fi
8998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8999
9000 fi
9001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9002
9003 LIBS="$cf_save_LIBS"
9004
9005 if test "$cf_cv_find_linkage_intl" = yes ; then
9006 cf_cv_func_gettext=yes
9007 else
9008 cf_cv_func_gettext=no
9009 fi
9010
9011       echo "$as_me:9011: checking for libintl.h and gettext()" >&5
9012 echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
9013       echo "$as_me:9013: result: $cf_cv_func_gettext" >&5
9014 echo "${ECHO_T}$cf_cv_func_gettext" >&6
9015
9016       LIBS="$cf_save_LIBS_1"
9017       CPPFLAGS="$cf_save_OPTS_1"
9018
9019       if test "$cf_cv_func_gettext" = yes ; then
9020
9021 cat >>confdefs.h <<\EOF
9022 #define HAVE_LIBINTL_H 1
9023 EOF
9024
9025                                         if test "$PACKAGE" != gettext; then
9026
9027 cat >>confdefs.h <<\EOF
9028 #define HAVE_GETTEXT 1
9029 EOF
9030
9031 if test -n "$cf_cv_header_path_intl" ; then
9032   for cf_add_incdir in $cf_cv_header_path_intl
9033   do
9034         while test $cf_add_incdir != /usr/include
9035         do
9036           if test -d $cf_add_incdir
9037           then
9038                 cf_have_incdir=no
9039                 if test -n "$CFLAGS$CPPFLAGS" ; then
9040                   # a loop is needed to ensure we can add subdirs of existing dirs
9041                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9042                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9043                           cf_have_incdir=yes; break
9044                         fi
9045                   done
9046                 fi
9047
9048                 if test "$cf_have_incdir" = no ; then
9049                   if test "$cf_add_incdir" = /usr/local/include ; then
9050                         if test "$GCC" = yes
9051                         then
9052                           cf_save_CPPFLAGS=$CPPFLAGS
9053
9054         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9055         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9056
9057                           cat >conftest.$ac_ext <<_ACEOF
9058 #line 9058 "configure"
9059 #include "confdefs.h"
9060 #include <stdio.h>
9061 int
9062 main (void)
9063 {
9064 printf("Hello")
9065   ;
9066   return 0;
9067 }
9068 _ACEOF
9069 rm -f conftest.$ac_objext
9070 if { (eval echo "$as_me:9070: \"$ac_compile\"") >&5
9071   (eval $ac_compile) 2>&5
9072   ac_status=$?
9073   echo "$as_me:9073: \$? = $ac_status" >&5
9074   (exit $ac_status); } &&
9075          { ac_try='test -s conftest.$ac_objext'
9076   { (eval echo "$as_me:9076: \"$ac_try\"") >&5
9077   (eval $ac_try) 2>&5
9078   ac_status=$?
9079   echo "$as_me:9079: \$? = $ac_status" >&5
9080   (exit $ac_status); }; }; then
9081   :
9082 else
9083   echo "$as_me: failed program was:" >&5
9084 cat conftest.$ac_ext >&5
9085 cf_have_incdir=yes
9086 fi
9087 rm -f conftest.$ac_objext conftest.$ac_ext
9088                           CPPFLAGS=$cf_save_CPPFLAGS
9089                         fi
9090                   fi
9091                 fi
9092
9093                 if test "$cf_have_incdir" = no ; then
9094                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9095
9096 echo "${as_me:-configure}:9096: testing adding $cf_add_incdir to include-path ..." 1>&5
9097
9098                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9099
9100                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9101                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9102                   cf_add_incdir="$cf_top_incdir"
9103                 else
9104                   break
9105                 fi
9106           else
9107                 break
9108           fi
9109         done
9110   done
9111 fi
9112
9113           if test -n "$cf_cv_library_file_intl" ; then
9114                                                 INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
9115
9116 if test -n "$cf_cv_library_path_intl" ; then
9117         for cf_add_libdir in $cf_cv_library_path_intl
9118         do
9119                 if test $cf_add_libdir = /usr/lib ; then
9120                         :
9121                 elif test -d $cf_add_libdir
9122                 then
9123                         cf_have_libdir=no
9124                         if test -n "$LDFLAGS$LIBS" ; then
9125                                 # a loop is needed to ensure we can add subdirs of existing dirs
9126                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9127                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9128                                                 cf_have_libdir=yes; break
9129                                         fi
9130                                 done
9131                         fi
9132                         if test "$cf_have_libdir" = no ; then
9133                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9134
9135 echo "${as_me:-configure}:9135: testing adding $cf_add_libdir to library-path ..." 1>&5
9136
9137                                 INTLLIBS="-L$cf_add_libdir $INTLLIBS"
9138                         fi
9139                 fi
9140         done
9141 fi
9142
9143           fi
9144
9145           gt_save_LIBS="$LIBS"
9146           LIBS="$LIBS $INTLLIBS"
9147
9148 for ac_func in dcgettext
9149 do
9150 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9151 echo "$as_me:9151: checking for $ac_func" >&5
9152 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9153 if eval "test \"\${$as_ac_var+set}\" = set"; then
9154   echo $ECHO_N "(cached) $ECHO_C" >&6
9155 else
9156   cat >conftest.$ac_ext <<_ACEOF
9157 #line 9157 "configure"
9158 #include "confdefs.h"
9159 /* System header to define __stub macros and hopefully few prototypes,
9160     which can conflict with char $ac_func (); below.  */
9161 #include <assert.h>
9162 /* Override any gcc2 internal prototype to avoid an error.  */
9163 #ifdef __cplusplus
9164 extern "C"
9165 #endif
9166 /* We use char because int might match the return type of a gcc2
9167    builtin and then its argument prototype would still apply.  */
9168 char $ac_func ();
9169 char (*f) ();
9170
9171 int
9172 main (void)
9173 {
9174 /* The GNU C library defines this for functions which it implements
9175     to always fail with ENOSYS.  Some functions are actually named
9176     something starting with __ and the normal name is an alias.  */
9177 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9178 choke me
9179 #else
9180 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9181 #endif
9182
9183   ;
9184   return 0;
9185 }
9186 _ACEOF
9187 rm -f conftest.$ac_objext conftest$ac_exeext
9188 if { (eval echo "$as_me:9188: \"$ac_link\"") >&5
9189   (eval $ac_link) 2>&5
9190   ac_status=$?
9191   echo "$as_me:9191: \$? = $ac_status" >&5
9192   (exit $ac_status); } &&
9193          { ac_try='test -s conftest$ac_exeext'
9194   { (eval echo "$as_me:9194: \"$ac_try\"") >&5
9195   (eval $ac_try) 2>&5
9196   ac_status=$?
9197   echo "$as_me:9197: \$? = $ac_status" >&5
9198   (exit $ac_status); }; }; then
9199   eval "$as_ac_var=yes"
9200 else
9201   echo "$as_me: failed program was:" >&5
9202 cat conftest.$ac_ext >&5
9203 eval "$as_ac_var=no"
9204 fi
9205 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9206 fi
9207 echo "$as_me:9207: result: `eval echo '${'$as_ac_var'}'`" >&5
9208 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9209 if test `eval echo '${'$as_ac_var'}'` = yes; then
9210   cat >>confdefs.h <<EOF
9211 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9212 EOF
9213
9214 fi
9215 done
9216
9217           LIBS="$gt_save_LIBS"
9218
9219           CATOBJEXT=.gmo
9220         fi
9221       elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
9222         { echo "$as_me:9222: WARNING: disabling NLS feature" >&5
9223 echo "$as_me: WARNING: disabling NLS feature" >&2;}
9224         sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
9225         mv confdefs.tmp confdefs.h
9226         ALL_LINGUAS=
9227         CATOBJEXT=.ignored
9228         MSGFMT=":"
9229         GMSGFMT=":"
9230         XGETTEXT=":"
9231         POSUB=
9232         BUILD_INCLUDED_LIBINTL=no
9233         USE_INCLUDED_LIBINTL=no
9234         USE_NLS=no
9235         nls_cv_use_gnu_gettext=no
9236       fi
9237
9238       if test "$CATOBJEXT" = "NONE"; then
9239                         nls_cv_use_gnu_gettext=maybe
9240       fi
9241     fi
9242
9243     if test "$nls_cv_use_gnu_gettext" != "no"; then
9244       CATOBJEXT=.gmo
9245       if test -f $srcdir/intl/libintl.h ; then
9246                 INTLOBJS="\$(GETTOBJS)"
9247         BUILD_INCLUDED_LIBINTL=yes
9248         USE_INCLUDED_LIBINTL=yes
9249         INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
9250         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
9251       elif test "$nls_cv_use_gnu_gettext" = "yes"; then
9252         nls_cv_use_gnu_gettext=no
9253         { echo "$as_me:9253: WARNING: no NLS library is packaged with this application" >&5
9254 echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
9255       fi
9256     fi
9257
9258         if test "$GMSGFMT" != ":"; then
9259       if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
9260         : ;
9261       else
9262         { echo "$as_me:9262: WARNING: found msgfmt program is not GNU msgfmt" >&5
9263 echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
9264       fi
9265     fi
9266
9267         if test "$XGETTEXT" != ":"; then
9268       if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
9269         : ;
9270       else
9271         { echo "$as_me:9271: WARNING: found xgettext program is not GNU xgettext" >&5
9272 echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
9273       fi
9274     fi
9275   fi
9276
9277   if test "$XGETTEXT" != ":"; then
9278     ac_config_commands="$ac_config_commands default-1"
9279
9280             if test "$PACKAGE" = gettext; then
9281       BUILD_INCLUDED_LIBINTL=yes
9282     fi
9283
9284                                             if test "$nls_cv_use_gnu_gettext" = "yes"; then
9285       for ac_prog in bison
9286 do
9287   # Extract the first word of "$ac_prog", so it can be a program name with args.
9288 set dummy $ac_prog; ac_word=$2
9289 echo "$as_me:9289: checking for $ac_word" >&5
9290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9291 if test "${ac_cv_prog_INTLBISON+set}" = set; then
9292   echo $ECHO_N "(cached) $ECHO_C" >&6
9293 else
9294   if test -n "$INTLBISON"; then
9295   ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
9296 else
9297   ac_save_IFS=$IFS; IFS=$ac_path_separator
9298 ac_dummy="$PATH"
9299 for ac_dir in $ac_dummy; do
9300   IFS=$ac_save_IFS
9301   test -z "$ac_dir" && ac_dir=.
9302   $as_executable_p "$ac_dir/$ac_word" || continue
9303 ac_cv_prog_INTLBISON="$ac_prog"
9304 echo "$as_me:9304: found $ac_dir/$ac_word" >&5
9305 break
9306 done
9307
9308 fi
9309 fi
9310 INTLBISON=$ac_cv_prog_INTLBISON
9311 if test -n "$INTLBISON"; then
9312   echo "$as_me:9312: result: $INTLBISON" >&5
9313 echo "${ECHO_T}$INTLBISON" >&6
9314 else
9315   echo "$as_me:9315: result: no" >&5
9316 echo "${ECHO_T}no" >&6
9317 fi
9318
9319   test -n "$INTLBISON" && break
9320 done
9321
9322       if test -z "$INTLBISON"; then
9323         ac_verc_fail=yes
9324       else
9325                 echo "$as_me:9325: checking version of bison" >&5
9326 echo $ECHO_N "checking version of bison... $ECHO_C" >&6
9327         ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
9328         case $ac_prog_version in
9329           ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
9330           (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
9331              ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
9332           (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
9333         esac
9334       echo "$as_me:9334: result: $ac_prog_version" >&5
9335 echo "${ECHO_T}$ac_prog_version" >&6
9336       fi
9337       if test $ac_verc_fail = yes; then
9338         INTLBISON=:
9339       fi
9340     fi
9341
9342                 for lang in $ALL_LINGUAS; do
9343       GMOFILES="$GMOFILES $lang.gmo"
9344       POFILES="$POFILES $lang.po"
9345     done
9346   fi
9347
9348     nls_cv_header_intl=
9349   nls_cv_header_libgt=
9350
9351     DATADIRNAME=share
9352
9353     INSTOBJEXT=.mo
9354
9355     GENCAT=gencat
9356
9357    if test "x$CATOBJEXT" != "x"; then
9358      if test "x$ALL_LINGUAS" = "x"; then
9359        LINGUAS=
9360      else
9361        echo "$as_me:9361: checking for catalogs to be installed" >&5
9362 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
9363        NEW_LINGUAS=
9364        for presentlang in $ALL_LINGUAS; do
9365          useit=no
9366          for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
9367            # Use the presentlang catalog if desiredlang is
9368            #   a. equal to presentlang, or
9369            #   b. a variant of presentlang (because in this case,
9370            #      presentlang can be used as a fallback for messages
9371            #      which are not translated in the desiredlang catalog).
9372            case "$desiredlang" in
9373              ("$presentlang"*) useit=yes;;
9374            esac
9375          done
9376          if test $useit = yes; then
9377            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
9378          fi
9379        done
9380        LINGUAS=$NEW_LINGUAS
9381        echo "$as_me:9381: result: $LINGUAS" >&5
9382 echo "${ECHO_T}$LINGUAS" >&6
9383      fi
9384
9385           if test -n "$LINGUAS"; then
9386        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
9387      fi
9388    fi
9389
9390       INTL_LIBTOOL_SUFFIX_PREFIX=
9391
9392 if test "$USE_NLS" = yes ; then
9393
9394 # Check whether --with-textdomain or --without-textdomain was given.
9395 if test "${with_textdomain+set}" = set; then
9396   withval="$with_textdomain"
9397   NLS_TEXTDOMAIN=$withval
9398 else
9399   NLS_TEXTDOMAIN=$PACKAGE
9400 fi;
9401
9402 cat >>confdefs.h <<EOF
9403 #define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
9404 EOF
9405
9406 fi
9407
9408 INTLDIR_MAKE=
9409 MSG_DIR_MAKE=
9410 SUB_MAKEFILE=
9411
9412 cf_makefile=makefile
9413
9414 use_our_messages=no
9415 if test "$USE_NLS" = yes ; then
9416 if test -d $srcdir/po ; then
9417 echo "$as_me:9417: checking if we should use included message-library" >&5
9418 echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
9419
9420 # Check whether --enable-included-msgs or --disable-included-msgs was given.
9421 if test "${enable_included_msgs+set}" = set; then
9422   enableval="$enable_included_msgs"
9423   use_our_messages=$enableval
9424 else
9425   use_our_messages=yes
9426 fi;
9427 fi
9428 echo "$as_me:9428: result: $use_our_messages" >&5
9429 echo "${ECHO_T}$use_our_messages" >&6
9430 fi
9431
9432 MSG_DIR_MAKE="#"
9433 if test "$use_our_messages" = yes
9434 then
9435         SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
9436         MSG_DIR_MAKE=
9437 fi
9438
9439 if test "$USE_INCLUDED_LIBINTL" = yes ; then
9440         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
9441                 :
9442         elif test "$nls_cv_use_gnu_gettext" = yes ; then
9443                 :
9444         else
9445                 INTLDIR_MAKE="#"
9446         fi
9447         if test -z "$INTLDIR_MAKE"; then
9448
9449 cat >>confdefs.h <<\EOF
9450 #define HAVE_LIBGETTEXT_H 1
9451 EOF
9452
9453                 for cf_makefile in \
9454                         $srcdir/intl/Makefile.in \
9455                         $srcdir/intl/makefile.in
9456                 do
9457                         if test -f "$cf_makefile" ; then
9458                                 SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
9459                                 break
9460                         fi
9461                 done
9462         fi
9463 else
9464         INTLDIR_MAKE="#"
9465         if test "$USE_NLS" = yes ; then
9466
9467 for ac_header in libintl.h
9468 do
9469 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9470 echo "$as_me:9470: checking for $ac_header" >&5
9471 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9472 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9473   echo $ECHO_N "(cached) $ECHO_C" >&6
9474 else
9475   cat >conftest.$ac_ext <<_ACEOF
9476 #line 9476 "configure"
9477 #include "confdefs.h"
9478 #include <$ac_header>
9479 _ACEOF
9480 if { (eval echo "$as_me:9480: \"$ac_cpp conftest.$ac_ext\"") >&5
9481   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9482   ac_status=$?
9483   egrep -v '^ *\+' conftest.er1 >conftest.err
9484   rm -f conftest.er1
9485   cat conftest.err >&5
9486   echo "$as_me:9486: \$? = $ac_status" >&5
9487   (exit $ac_status); } >/dev/null; then
9488   if test -s conftest.err; then
9489     ac_cpp_err=$ac_c_preproc_warn_flag
9490   else
9491     ac_cpp_err=
9492   fi
9493 else
9494   ac_cpp_err=yes
9495 fi
9496 if test -z "$ac_cpp_err"; then
9497   eval "$as_ac_Header=yes"
9498 else
9499   echo "$as_me: failed program was:" >&5
9500   cat conftest.$ac_ext >&5
9501   eval "$as_ac_Header=no"
9502 fi
9503 rm -f conftest.err conftest.$ac_ext
9504 fi
9505 echo "$as_me:9505: result: `eval echo '${'$as_ac_Header'}'`" >&5
9506 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9507 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9508   cat >>confdefs.h <<EOF
9509 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9510 EOF
9511
9512 fi
9513 done
9514
9515         fi
9516 fi
9517
9518 if test -z "$INTLDIR_MAKE" ; then
9519
9520         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9521         CPPFLAGS="${CPPFLAGS}-I../intl"
9522
9523 fi
9524
9525 if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
9526         GT_YES="#"
9527         GT_NO=
9528 else
9529         GT_YES=
9530         GT_NO="#"
9531 fi
9532
9533 if test "$USE_INCLUDED_LIBINTL" = yes ; then
9534         if test "$nls_cv_force_use_gnu_gettext" = yes ; then
9535
9536 cat >>confdefs.h <<\EOF
9537 #define HAVE_GETTEXT 1
9538 EOF
9539
9540         elif test "$nls_cv_use_gnu_gettext" = yes ; then
9541
9542 cat >>confdefs.h <<\EOF
9543 #define HAVE_GETTEXT 1
9544 EOF
9545
9546         fi
9547         if test -n "$nls_cv_header_intl" ; then
9548
9549 cat >>confdefs.h <<\EOF
9550 #define HAVE_LIBINTL_H 1
9551 EOF
9552
9553         fi
9554 fi
9555
9556 echo "$as_me:9556: checking if -lm needed for math functions" >&5
9557 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
9558 if test "${cf_cv_need_libm+set}" = set; then
9559   echo $ECHO_N "(cached) $ECHO_C" >&6
9560 else
9561
9562         cat >conftest.$ac_ext <<_ACEOF
9563 #line 9563 "configure"
9564 #include "confdefs.h"
9565
9566         #include <stdio.h>
9567         #include <stdlib.h>
9568         #include <math.h>
9569
9570 int
9571 main (void)
9572 {
9573 double x = rand(); printf("result = %g\n", sqrt(x))
9574   ;
9575   return 0;
9576 }
9577 _ACEOF
9578 rm -f conftest.$ac_objext conftest$ac_exeext
9579 if { (eval echo "$as_me:9579: \"$ac_link\"") >&5
9580   (eval $ac_link) 2>&5
9581   ac_status=$?
9582   echo "$as_me:9582: \$? = $ac_status" >&5
9583   (exit $ac_status); } &&
9584          { ac_try='test -s conftest$ac_exeext'
9585   { (eval echo "$as_me:9585: \"$ac_try\"") >&5
9586   (eval $ac_try) 2>&5
9587   ac_status=$?
9588   echo "$as_me:9588: \$? = $ac_status" >&5
9589   (exit $ac_status); }; }; then
9590   cf_cv_need_libm=no
9591 else
9592   echo "$as_me: failed program was:" >&5
9593 cat conftest.$ac_ext >&5
9594 cf_cv_need_libm=yes
9595 fi
9596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9597 fi
9598 echo "$as_me:9598: result: $cf_cv_need_libm" >&5
9599 echo "${ECHO_T}$cf_cv_need_libm" >&6
9600 if test "$cf_cv_need_libm" = yes
9601 then
9602
9603 cf_add_libs="-lm"
9604 # Filter out duplicates - this happens with badly-designed ".pc" files...
9605 for cf_add_1lib in $LIBS
9606 do
9607         for cf_add_2lib in $cf_add_libs
9608         do
9609                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9610                 then
9611                         cf_add_1lib=
9612                         break
9613                 fi
9614         done
9615         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9616 done
9617 LIBS="$cf_add_libs"
9618
9619 fi
9620
9621 echo "$as_me:9621: checking if you want to use dmalloc for testing" >&5
9622 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9623
9624 # Check whether --with-dmalloc or --without-dmalloc was given.
9625 if test "${with_dmalloc+set}" = set; then
9626   withval="$with_dmalloc"
9627
9628 cat >>confdefs.h <<EOF
9629 #define USE_DMALLOC 1
9630 EOF
9631
9632         : ${with_cflags:=-g}
9633         : ${with_no_leaks:=yes}
9634          with_dmalloc=yes
9635 else
9636   with_dmalloc=
9637 fi;
9638 echo "$as_me:9638: result: ${with_dmalloc:-no}" >&5
9639 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9640
9641 case .$with_cflags in
9642 (.*-g*)
9643         case .$CFLAGS in
9644         (.*-g*)
9645                 ;;
9646         (*)
9647
9648 cf_fix_cppflags=no
9649 cf_new_cflags=
9650 cf_new_cppflags=
9651 cf_new_extra_cppflags=
9652
9653 for cf_add_cflags in -g
9654 do
9655 case $cf_fix_cppflags in
9656 (no)
9657         case $cf_add_cflags in
9658         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9659                 case $cf_add_cflags in
9660                 (-D*)
9661                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9662
9663                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9664                                 && test -z "${cf_tst_cflags}" \
9665                                 && cf_fix_cppflags=yes
9666
9667                         if test $cf_fix_cppflags = yes ; then
9668
9669         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9670         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9671
9672                                 continue
9673                         elif test "${cf_tst_cflags}" = "\"'" ; then
9674
9675         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9676         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9677
9678                                 continue
9679                         fi
9680                         ;;
9681                 esac
9682                 case "$CPPFLAGS" in
9683                 (*$cf_add_cflags)
9684                         ;;
9685                 (*)
9686                         case $cf_add_cflags in
9687                         (-D*)
9688                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9689
9690 CPPFLAGS=`echo "$CPPFLAGS" | \
9691         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9692                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9693
9694                                 ;;
9695                         esac
9696
9697         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9698         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9699
9700                         ;;
9701                 esac
9702                 ;;
9703         (*)
9704
9705         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9706         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9707
9708                 ;;
9709         esac
9710         ;;
9711 (yes)
9712
9713         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9714         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9715
9716         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9717
9718         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9719                 && test -z "${cf_tst_cflags}" \
9720                 && cf_fix_cppflags=no
9721         ;;
9722 esac
9723 done
9724
9725 if test -n "$cf_new_cflags" ; then
9726
9727         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9728         CFLAGS="${CFLAGS}$cf_new_cflags"
9729
9730 fi
9731
9732 if test -n "$cf_new_cppflags" ; then
9733
9734         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9735         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9736
9737 fi
9738
9739 if test -n "$cf_new_extra_cppflags" ; then
9740
9741         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9742         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9743
9744 fi
9745
9746                 ;;
9747         esac
9748         ;;
9749 esac
9750
9751 if test "$with_dmalloc" = yes ; then
9752         echo "$as_me:9752: checking for dmalloc.h" >&5
9753 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9754 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9755   echo $ECHO_N "(cached) $ECHO_C" >&6
9756 else
9757   cat >conftest.$ac_ext <<_ACEOF
9758 #line 9758 "configure"
9759 #include "confdefs.h"
9760 #include <dmalloc.h>
9761 _ACEOF
9762 if { (eval echo "$as_me:9762: \"$ac_cpp conftest.$ac_ext\"") >&5
9763   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9764   ac_status=$?
9765   egrep -v '^ *\+' conftest.er1 >conftest.err
9766   rm -f conftest.er1
9767   cat conftest.err >&5
9768   echo "$as_me:9768: \$? = $ac_status" >&5
9769   (exit $ac_status); } >/dev/null; then
9770   if test -s conftest.err; then
9771     ac_cpp_err=$ac_c_preproc_warn_flag
9772   else
9773     ac_cpp_err=
9774   fi
9775 else
9776   ac_cpp_err=yes
9777 fi
9778 if test -z "$ac_cpp_err"; then
9779   ac_cv_header_dmalloc_h=yes
9780 else
9781   echo "$as_me: failed program was:" >&5
9782   cat conftest.$ac_ext >&5
9783   ac_cv_header_dmalloc_h=no
9784 fi
9785 rm -f conftest.err conftest.$ac_ext
9786 fi
9787 echo "$as_me:9787: result: $ac_cv_header_dmalloc_h" >&5
9788 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9789 if test $ac_cv_header_dmalloc_h = yes; then
9790
9791 echo "$as_me:9791: checking for dmalloc_debug in -ldmalloc" >&5
9792 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9793 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9794   echo $ECHO_N "(cached) $ECHO_C" >&6
9795 else
9796   ac_check_lib_save_LIBS=$LIBS
9797 LIBS="-ldmalloc  $LIBS"
9798 cat >conftest.$ac_ext <<_ACEOF
9799 #line 9799 "configure"
9800 #include "confdefs.h"
9801
9802 /* Override any gcc2 internal prototype to avoid an error.  */
9803 #ifdef __cplusplus
9804 extern "C"
9805 #endif
9806 /* We use char because int might match the return type of a gcc2
9807    builtin and then its argument prototype would still apply.  */
9808 char dmalloc_debug ();
9809 int
9810 main (void)
9811 {
9812 dmalloc_debug ();
9813   ;
9814   return 0;
9815 }
9816 _ACEOF
9817 rm -f conftest.$ac_objext conftest$ac_exeext
9818 if { (eval echo "$as_me:9818: \"$ac_link\"") >&5
9819   (eval $ac_link) 2>&5
9820   ac_status=$?
9821   echo "$as_me:9821: \$? = $ac_status" >&5
9822   (exit $ac_status); } &&
9823          { ac_try='test -s conftest$ac_exeext'
9824   { (eval echo "$as_me:9824: \"$ac_try\"") >&5
9825   (eval $ac_try) 2>&5
9826   ac_status=$?
9827   echo "$as_me:9827: \$? = $ac_status" >&5
9828   (exit $ac_status); }; }; then
9829   ac_cv_lib_dmalloc_dmalloc_debug=yes
9830 else
9831   echo "$as_me: failed program was:" >&5
9832 cat conftest.$ac_ext >&5
9833 ac_cv_lib_dmalloc_dmalloc_debug=no
9834 fi
9835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9836 LIBS=$ac_check_lib_save_LIBS
9837 fi
9838 echo "$as_me:9838: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9839 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9840 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9841   cat >>confdefs.h <<EOF
9842 #define HAVE_LIBDMALLOC 1
9843 EOF
9844
9845   LIBS="-ldmalloc $LIBS"
9846
9847 fi
9848
9849 fi
9850
9851 fi
9852
9853 echo "$as_me:9853: checking if you want to use dbmalloc for testing" >&5
9854 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9855
9856 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9857 if test "${with_dbmalloc+set}" = set; then
9858   withval="$with_dbmalloc"
9859
9860 cat >>confdefs.h <<EOF
9861 #define USE_DBMALLOC 1
9862 EOF
9863
9864         : ${with_cflags:=-g}
9865         : ${with_no_leaks:=yes}
9866          with_dbmalloc=yes
9867 else
9868   with_dbmalloc=
9869 fi;
9870 echo "$as_me:9870: result: ${with_dbmalloc:-no}" >&5
9871 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9872
9873 case .$with_cflags in
9874 (.*-g*)
9875         case .$CFLAGS in
9876         (.*-g*)
9877                 ;;
9878         (*)
9879
9880 cf_fix_cppflags=no
9881 cf_new_cflags=
9882 cf_new_cppflags=
9883 cf_new_extra_cppflags=
9884
9885 for cf_add_cflags in -g
9886 do
9887 case $cf_fix_cppflags in
9888 (no)
9889         case $cf_add_cflags in
9890         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9891                 case $cf_add_cflags in
9892                 (-D*)
9893                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9894
9895                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9896                                 && test -z "${cf_tst_cflags}" \
9897                                 && cf_fix_cppflags=yes
9898
9899                         if test $cf_fix_cppflags = yes ; then
9900
9901         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9902         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9903
9904                                 continue
9905                         elif test "${cf_tst_cflags}" = "\"'" ; then
9906
9907         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9908         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9909
9910                                 continue
9911                         fi
9912                         ;;
9913                 esac
9914                 case "$CPPFLAGS" in
9915                 (*$cf_add_cflags)
9916                         ;;
9917                 (*)
9918                         case $cf_add_cflags in
9919                         (-D*)
9920                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9921
9922 CPPFLAGS=`echo "$CPPFLAGS" | \
9923         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9924                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9925
9926                                 ;;
9927                         esac
9928
9929         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9930         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9931
9932                         ;;
9933                 esac
9934                 ;;
9935         (*)
9936
9937         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9938         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9939
9940                 ;;
9941         esac
9942         ;;
9943 (yes)
9944
9945         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9946         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9947
9948         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9949
9950         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9951                 && test -z "${cf_tst_cflags}" \
9952                 && cf_fix_cppflags=no
9953         ;;
9954 esac
9955 done
9956
9957 if test -n "$cf_new_cflags" ; then
9958
9959         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9960         CFLAGS="${CFLAGS}$cf_new_cflags"
9961
9962 fi
9963
9964 if test -n "$cf_new_cppflags" ; then
9965
9966         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9967         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9968
9969 fi
9970
9971 if test -n "$cf_new_extra_cppflags" ; then
9972
9973         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9974         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9975
9976 fi
9977
9978                 ;;
9979         esac
9980         ;;
9981 esac
9982
9983 if test "$with_dbmalloc" = yes ; then
9984         echo "$as_me:9984: checking for dbmalloc.h" >&5
9985 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9986 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9987   echo $ECHO_N "(cached) $ECHO_C" >&6
9988 else
9989   cat >conftest.$ac_ext <<_ACEOF
9990 #line 9990 "configure"
9991 #include "confdefs.h"
9992 #include <dbmalloc.h>
9993 _ACEOF
9994 if { (eval echo "$as_me:9994: \"$ac_cpp conftest.$ac_ext\"") >&5
9995   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9996   ac_status=$?
9997   egrep -v '^ *\+' conftest.er1 >conftest.err
9998   rm -f conftest.er1
9999   cat conftest.err >&5
10000   echo "$as_me:10000: \$? = $ac_status" >&5
10001   (exit $ac_status); } >/dev/null; then
10002   if test -s conftest.err; then
10003     ac_cpp_err=$ac_c_preproc_warn_flag
10004   else
10005     ac_cpp_err=
10006   fi
10007 else
10008   ac_cpp_err=yes
10009 fi
10010 if test -z "$ac_cpp_err"; then
10011   ac_cv_header_dbmalloc_h=yes
10012 else
10013   echo "$as_me: failed program was:" >&5
10014   cat conftest.$ac_ext >&5
10015   ac_cv_header_dbmalloc_h=no
10016 fi
10017 rm -f conftest.err conftest.$ac_ext
10018 fi
10019 echo "$as_me:10019: result: $ac_cv_header_dbmalloc_h" >&5
10020 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
10021 if test $ac_cv_header_dbmalloc_h = yes; then
10022
10023 echo "$as_me:10023: checking for debug_malloc in -ldbmalloc" >&5
10024 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
10025 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
10026   echo $ECHO_N "(cached) $ECHO_C" >&6
10027 else
10028   ac_check_lib_save_LIBS=$LIBS
10029 LIBS="-ldbmalloc  $LIBS"
10030 cat >conftest.$ac_ext <<_ACEOF
10031 #line 10031 "configure"
10032 #include "confdefs.h"
10033
10034 /* Override any gcc2 internal prototype to avoid an error.  */
10035 #ifdef __cplusplus
10036 extern "C"
10037 #endif
10038 /* We use char because int might match the return type of a gcc2
10039    builtin and then its argument prototype would still apply.  */
10040 char debug_malloc ();
10041 int
10042 main (void)
10043 {
10044 debug_malloc ();
10045   ;
10046   return 0;
10047 }
10048 _ACEOF
10049 rm -f conftest.$ac_objext conftest$ac_exeext
10050 if { (eval echo "$as_me:10050: \"$ac_link\"") >&5
10051   (eval $ac_link) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit $ac_status); } &&
10055          { ac_try='test -s conftest$ac_exeext'
10056   { (eval echo "$as_me:10056: \"$ac_try\"") >&5
10057   (eval $ac_try) 2>&5
10058   ac_status=$?
10059   echo "$as_me:10059: \$? = $ac_status" >&5
10060   (exit $ac_status); }; }; then
10061   ac_cv_lib_dbmalloc_debug_malloc=yes
10062 else
10063   echo "$as_me: failed program was:" >&5
10064 cat conftest.$ac_ext >&5
10065 ac_cv_lib_dbmalloc_debug_malloc=no
10066 fi
10067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10068 LIBS=$ac_check_lib_save_LIBS
10069 fi
10070 echo "$as_me:10070: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
10071 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
10072 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
10073   cat >>confdefs.h <<EOF
10074 #define HAVE_LIBDBMALLOC 1
10075 EOF
10076
10077   LIBS="-ldbmalloc $LIBS"
10078
10079 fi
10080
10081 fi
10082
10083 fi
10084
10085 echo "$as_me:10085: checking if you want to use purify for testing" >&5
10086 echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
10087
10088 # Check whether --with-purify or --without-purify was given.
10089 if test "${with_purify+set}" = set; then
10090   withval="$with_purify"
10091
10092 cat >>confdefs.h <<EOF
10093 #define USE_PURIFY 1
10094 EOF
10095
10096         : ${with_cflags:=-g}
10097         : ${with_no_leaks:=yes}
10098          with_purify=yes
10099 else
10100   with_purify=
10101 fi;
10102 echo "$as_me:10102: result: ${with_purify:-no}" >&5
10103 echo "${ECHO_T}${with_purify:-no}" >&6
10104
10105 case .$with_cflags in
10106 (.*-g*)
10107         case .$CFLAGS in
10108         (.*-g*)
10109                 ;;
10110         (*)
10111
10112 cf_fix_cppflags=no
10113 cf_new_cflags=
10114 cf_new_cppflags=
10115 cf_new_extra_cppflags=
10116
10117 for cf_add_cflags in -g
10118 do
10119 case $cf_fix_cppflags in
10120 (no)
10121         case $cf_add_cflags in
10122         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10123                 case $cf_add_cflags in
10124                 (-D*)
10125                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10126
10127                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10128                                 && test -z "${cf_tst_cflags}" \
10129                                 && cf_fix_cppflags=yes
10130
10131                         if test $cf_fix_cppflags = yes ; then
10132
10133         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10134         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10135
10136                                 continue
10137                         elif test "${cf_tst_cflags}" = "\"'" ; then
10138
10139         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10140         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10141
10142                                 continue
10143                         fi
10144                         ;;
10145                 esac
10146                 case "$CPPFLAGS" in
10147                 (*$cf_add_cflags)
10148                         ;;
10149                 (*)
10150                         case $cf_add_cflags in
10151                         (-D*)
10152                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10153
10154 CPPFLAGS=`echo "$CPPFLAGS" | \
10155         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10156                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10157
10158                                 ;;
10159                         esac
10160
10161         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10162         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10163
10164                         ;;
10165                 esac
10166                 ;;
10167         (*)
10168
10169         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10170         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10171
10172                 ;;
10173         esac
10174         ;;
10175 (yes)
10176
10177         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10178         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10179
10180         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10181
10182         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10183                 && test -z "${cf_tst_cflags}" \
10184                 && cf_fix_cppflags=no
10185         ;;
10186 esac
10187 done
10188
10189 if test -n "$cf_new_cflags" ; then
10190
10191         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10192         CFLAGS="${CFLAGS}$cf_new_cflags"
10193
10194 fi
10195
10196 if test -n "$cf_new_cppflags" ; then
10197
10198         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10199         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10200
10201 fi
10202
10203 if test -n "$cf_new_extra_cppflags" ; then
10204
10205         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10206         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10207
10208 fi
10209
10210                 ;;
10211         esac
10212         ;;
10213 esac
10214
10215 echo "$as_me:10215: checking if you want to use valgrind for testing" >&5
10216 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
10217
10218 # Check whether --with-valgrind or --without-valgrind was given.
10219 if test "${with_valgrind+set}" = set; then
10220   withval="$with_valgrind"
10221
10222 cat >>confdefs.h <<EOF
10223 #define USE_VALGRIND 1
10224 EOF
10225
10226         : ${with_cflags:=-g}
10227         : ${with_no_leaks:=yes}
10228          with_valgrind=yes
10229 else
10230   with_valgrind=
10231 fi;
10232 echo "$as_me:10232: result: ${with_valgrind:-no}" >&5
10233 echo "${ECHO_T}${with_valgrind:-no}" >&6
10234
10235 case .$with_cflags in
10236 (.*-g*)
10237         case .$CFLAGS in
10238         (.*-g*)
10239                 ;;
10240         (*)
10241
10242 cf_fix_cppflags=no
10243 cf_new_cflags=
10244 cf_new_cppflags=
10245 cf_new_extra_cppflags=
10246
10247 for cf_add_cflags in -g
10248 do
10249 case $cf_fix_cppflags in
10250 (no)
10251         case $cf_add_cflags in
10252         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10253                 case $cf_add_cflags in
10254                 (-D*)
10255                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10256
10257                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10258                                 && test -z "${cf_tst_cflags}" \
10259                                 && cf_fix_cppflags=yes
10260
10261                         if test $cf_fix_cppflags = yes ; then
10262
10263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10265
10266                                 continue
10267                         elif test "${cf_tst_cflags}" = "\"'" ; then
10268
10269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10271
10272                                 continue
10273                         fi
10274                         ;;
10275                 esac
10276                 case "$CPPFLAGS" in
10277                 (*$cf_add_cflags)
10278                         ;;
10279                 (*)
10280                         case $cf_add_cflags in
10281                         (-D*)
10282                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10283
10284 CPPFLAGS=`echo "$CPPFLAGS" | \
10285         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10286                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10287
10288                                 ;;
10289                         esac
10290
10291         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10292         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10293
10294                         ;;
10295                 esac
10296                 ;;
10297         (*)
10298
10299         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10300         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10301
10302                 ;;
10303         esac
10304         ;;
10305 (yes)
10306
10307         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10308         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10309
10310         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10311
10312         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10313                 && test -z "${cf_tst_cflags}" \
10314                 && cf_fix_cppflags=no
10315         ;;
10316 esac
10317 done
10318
10319 if test -n "$cf_new_cflags" ; then
10320
10321         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10322         CFLAGS="${CFLAGS}$cf_new_cflags"
10323
10324 fi
10325
10326 if test -n "$cf_new_cppflags" ; then
10327
10328         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10329         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10330
10331 fi
10332
10333 if test -n "$cf_new_extra_cppflags" ; then
10334
10335         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10336         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10337
10338 fi
10339
10340                 ;;
10341         esac
10342         ;;
10343 esac
10344
10345 echo "$as_me:10345: checking if you want to perform memory-leak testing" >&5
10346 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10347
10348 # Check whether --with-no-leaks or --without-no-leaks was given.
10349 if test "${with_no_leaks+set}" = set; then
10350   withval="$with_no_leaks"
10351
10352 cat >>confdefs.h <<\EOF
10353 #define NO_LEAKS 1
10354 EOF
10355
10356          cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
10357          case ${cf_doalloc} in
10358          (*yes*) ;;
10359          (*)
10360 cat >>confdefs.h <<\EOF
10361 #define DOALLOC 10000
10362 EOF
10363  ;;
10364          esac
10365          with_no_leaks=yes
10366 else
10367   with_no_leaks=
10368 fi;
10369 echo "$as_me:10369: result: $with_no_leaks" >&5
10370 echo "${ECHO_T}$with_no_leaks" >&6
10371
10372 echo "$as_me:10372: checking if you want --trace option" >&5
10373 echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
10374
10375 # Check whether --enable-trace or --disable-trace was given.
10376 if test "${enable_trace+set}" = set; then
10377   enableval="$enable_trace"
10378
10379 else
10380   enableval=yes
10381 fi;
10382 echo "$as_me:10382: result: $enableval" >&5
10383 echo "${ECHO_T}$enableval" >&6
10384 if test "$enableval" != no ; then
10385 EXTRAOBJS="$EXTRAOBJS trace\$o"
10386
10387 cat >>confdefs.h <<\EOF
10388 #define HAVE_DLG_TRACE 1
10389 EOF
10390
10391 else
10392         :
10393 fi
10394
10395 LD_RPATH_OPT=
10396 echo "$as_me:10396: checking for an rpath option" >&5
10397 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10398 case $cf_cv_system_name in
10399 (irix*)
10400         if test "$GCC" = yes; then
10401                 LD_RPATH_OPT="-Wl,-rpath,"
10402         else
10403                 LD_RPATH_OPT="-rpath "
10404         fi
10405         ;;
10406 (linux*|gnu*|k*bsd*-gnu|freebsd*)
10407         LD_RPATH_OPT="-Wl,-rpath,"
10408         ;;
10409 (openbsd[2-9].*|mirbsd*)
10410         LD_RPATH_OPT="-Wl,-rpath,"
10411         ;;
10412 (dragonfly*)
10413         LD_RPATH_OPT="-rpath "
10414         ;;
10415 (netbsd*)
10416         LD_RPATH_OPT="-Wl,-rpath,"
10417         ;;
10418 (osf*|mls+*)
10419         LD_RPATH_OPT="-rpath "
10420         ;;
10421 (solaris2*)
10422         LD_RPATH_OPT="-R"
10423         ;;
10424 (*)
10425         ;;
10426 esac
10427 echo "$as_me:10427: result: $LD_RPATH_OPT" >&5
10428 echo "${ECHO_T}$LD_RPATH_OPT" >&6
10429
10430 case "x$LD_RPATH_OPT" in
10431 (x-R*)
10432         echo "$as_me:10432: checking if we need a space after rpath option" >&5
10433 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10434         cf_save_LIBS="$LIBS"
10435
10436 cf_add_libs="${LD_RPATH_OPT}$libdir"
10437 # Filter out duplicates - this happens with badly-designed ".pc" files...
10438 for cf_add_1lib in $LIBS
10439 do
10440         for cf_add_2lib in $cf_add_libs
10441         do
10442                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10443                 then
10444                         cf_add_1lib=
10445                         break
10446                 fi
10447         done
10448         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10449 done
10450 LIBS="$cf_add_libs"
10451
10452         cat >conftest.$ac_ext <<_ACEOF
10453 #line 10453 "configure"
10454 #include "confdefs.h"
10455
10456 int
10457 main (void)
10458 {
10459
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 rm -f conftest.$ac_objext conftest$ac_exeext
10465 if { (eval echo "$as_me:10465: \"$ac_link\"") >&5
10466   (eval $ac_link) 2>&5
10467   ac_status=$?
10468   echo "$as_me:10468: \$? = $ac_status" >&5
10469   (exit $ac_status); } &&
10470          { ac_try='test -s conftest$ac_exeext'
10471   { (eval echo "$as_me:10471: \"$ac_try\"") >&5
10472   (eval $ac_try) 2>&5
10473   ac_status=$?
10474   echo "$as_me:10474: \$? = $ac_status" >&5
10475   (exit $ac_status); }; }; then
10476   cf_rpath_space=no
10477 else
10478   echo "$as_me: failed program was:" >&5
10479 cat conftest.$ac_ext >&5
10480 cf_rpath_space=yes
10481 fi
10482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10483         LIBS="$cf_save_LIBS"
10484         echo "$as_me:10484: result: $cf_rpath_space" >&5
10485 echo "${ECHO_T}$cf_rpath_space" >&6
10486         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
10487         ;;
10488 esac
10489
10490 REL_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}
10491 ABI_VERSION=`echo "$VERSION" |sed -e 's/:/./g'`
10492 cf_cv_rel_version=$REL_VERSION
10493
10494 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
10495
10496 # Check whether --with-rel-version or --without-rel-version was given.
10497 if test "${with_rel_version+set}" = set; then
10498   withval="$with_rel_version"
10499   { echo "$as_me:10499: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
10500 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
10501  cf_cv_rel_version=$withval
10502 fi;
10503
10504  DIALOG_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
10505  DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
10506
10507 if test -n "$DIALOG_MAJOR" ; then
10508   case $DIALOG_MAJOR in
10509   ([0-9]*)
10510         ;;
10511   (*)
10512         { { echo "$as_me:10512: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
10513 echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
10514    { (exit 1); exit 1; }; }
10515         ;;
10516   esac
10517 else
10518   { { echo "$as_me:10518: error: Release major-version value is empty" >&5
10519 echo "$as_me: error: Release major-version value is empty" >&2;}
10520    { (exit 1); exit 1; }; }
10521 fi
10522
10523 if test -n "$DIALOG_MINOR" ; then
10524   case $DIALOG_MINOR in
10525   ([0-9]*)
10526         ;;
10527   (*)
10528         { { echo "$as_me:10528: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
10529 echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
10530    { (exit 1); exit 1; }; }
10531         ;;
10532   esac
10533 else
10534   { { echo "$as_me:10534: error: Release minor-version value is empty" >&5
10535 echo "$as_me: error: Release minor-version value is empty" >&2;}
10536    { (exit 1); exit 1; }; }
10537 fi
10538
10539 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
10540
10541 # Check whether --with-abi-version or --without-abi-version was given.
10542 if test "${with_abi_version+set}" = set; then
10543   withval="$with_abi_version"
10544
10545         if test "x$cf_cv_abi_version" != "x$withval"
10546         then
10547                 { echo "$as_me:10547: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
10548 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
10549                 case $cf_cv_rel_version in
10550                 (5.*)
10551                         cf_cv_rel_version=$withval.0
10552                         ;;
10553                 (6.*)
10554                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
10555                         ;;
10556                 esac
10557         fi
10558         cf_cv_abi_version=$withval
10559 fi;
10560
10561 if test -n "$cf_cv_abi_version" ; then
10562   case $cf_cv_abi_version in
10563   ([0-9]*)
10564         ;;
10565   (*)
10566         { { echo "$as_me:10566: error: ABI version is not a number: $cf_cv_abi_version" >&5
10567 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
10568    { (exit 1); exit 1; }; }
10569         ;;
10570   esac
10571 else
10572   { { echo "$as_me:10572: error: ABI version value is empty" >&5
10573 echo "$as_me: error: ABI version value is empty" >&2;}
10574    { (exit 1); exit 1; }; }
10575 fi
10576
10577 LIB_MODEL=static
10578 DFT_LWR_MODEL=$LIB_MODEL
10579 LIBTOOL_MAKE="#"
10580
10581 # use to comment-out makefile lines
10582 MAKE_NORMAL=
10583 MAKE_STATIC=
10584 MAKE_SHARED="#"
10585 MAKE_DLLS="#"
10586
10587 shlibdir=$libdir
10588
10589 echo "$as_me:10589: checking if libtool -version-number should be used" >&5
10590 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
10591
10592 # Check whether --enable-libtool-version or --disable-libtool-version was given.
10593 if test "${enable_libtool_version+set}" = set; then
10594   enableval="$enable_libtool_version"
10595   test "$enableval" != no && enableval=yes
10596         if test "$enableval" != "yes" ; then
10597     cf_libtool_version=no
10598         else
10599                 cf_libtool_version=yes
10600         fi
10601 else
10602   enableval=yes
10603         cf_libtool_version=yes
10604
10605 fi;
10606 echo "$as_me:10606: result: $cf_libtool_version" >&5
10607 echo "${ECHO_T}$cf_libtool_version" >&6
10608
10609 if test "$cf_libtool_version" = yes ; then
10610         LIBTOOL_VERSION="-version-number"
10611 else
10612         LIBTOOL_VERSION="-version-info"
10613         case "x$VERSION" in
10614         (x)
10615                 { echo "$as_me:10615: WARNING: VERSION was not set" >&5
10616 echo "$as_me: WARNING: VERSION was not set" >&2;}
10617                 ;;
10618         (x*.*.*)
10619                 ABI_VERSION="$VERSION"
10620                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
10621
10622 echo "${as_me:-configure}:10622: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
10623
10624                 ;;
10625         (x*:*:*)
10626                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
10627                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
10628
10629 echo "${as_me:-configure}:10629: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
10630
10631                 ;;
10632         (*)
10633                 { echo "$as_me:10633: WARNING: unexpected VERSION value: $VERSION" >&5
10634 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
10635                 ;;
10636         esac
10637 fi
10638
10639 LIBTOOL=
10640
10641 # common library maintenance symbols that are convenient for libtool scripts:
10642 LIB_CREATE='${AR} -cr'
10643 LIB_OBJECT='${OBJECTS}'
10644 LIB_SUFFIX=.a
10645 LIB_PREP="$RANLIB"
10646
10647 # symbols used to prop libtool up to enable it to determine what it should be
10648 # doing:
10649 LIB_CLEAN=
10650 LIB_COMPILE=
10651 LIB_LINK='${CC}'
10652 LIB_INSTALL=
10653 LIB_UNINSTALL=
10654
10655 echo "$as_me:10655: checking if you want to build libraries with libtool" >&5
10656 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
10657
10658 # Check whether --with-libtool or --without-libtool was given.
10659 if test "${with_libtool+set}" = set; then
10660   withval="$with_libtool"
10661   with_libtool=$withval
10662 else
10663   with_libtool=no
10664 fi;
10665 echo "$as_me:10665: result: $with_libtool" >&5
10666 echo "${ECHO_T}$with_libtool" >&6
10667 if test "$with_libtool" != "no"; then
10668
10669         if test "$with_libtool" != "yes" ; then
10670
10671 if test "x$prefix" != xNONE; then
10672         cf_path_syntax="$prefix"
10673 else
10674         cf_path_syntax="$ac_default_prefix"
10675 fi
10676
10677 case ".$with_libtool" in
10678 (.\$\(*\)*|.\'*\'*)
10679         ;;
10680 (..|./*|.\\*)
10681         ;;
10682 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
10683         ;;
10684 (.\${*prefix}*|.\${*dir}*)
10685         eval with_libtool="$with_libtool"
10686         case ".$with_libtool" in
10687         (.NONE/*)
10688                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
10689                 ;;
10690         esac
10691         ;;
10692 (.no|.NONE/*)
10693         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
10694         ;;
10695 (*)
10696         { { echo "$as_me:10696: error: expected a pathname, not \"$with_libtool\"" >&5
10697 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
10698    { (exit 1); exit 1; }; }
10699         ;;
10700 esac
10701
10702                 LIBTOOL=$with_libtool
10703         else
10704                 if test -n "$ac_tool_prefix"; then
10705   for ac_prog in libtool glibtool
10706   do
10707     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10708 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10709 echo "$as_me:10709: checking for $ac_word" >&5
10710 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10711 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
10712   echo $ECHO_N "(cached) $ECHO_C" >&6
10713 else
10714   if test -n "$LIBTOOL"; then
10715   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
10716 else
10717   ac_save_IFS=$IFS; IFS=$ac_path_separator
10718 ac_dummy="$PATH"
10719 for ac_dir in $ac_dummy; do
10720   IFS=$ac_save_IFS
10721   test -z "$ac_dir" && ac_dir=.
10722   $as_executable_p "$ac_dir/$ac_word" || continue
10723 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
10724 echo "$as_me:10724: found $ac_dir/$ac_word" >&5
10725 break
10726 done
10727
10728 fi
10729 fi
10730 LIBTOOL=$ac_cv_prog_LIBTOOL
10731 if test -n "$LIBTOOL"; then
10732   echo "$as_me:10732: result: $LIBTOOL" >&5
10733 echo "${ECHO_T}$LIBTOOL" >&6
10734 else
10735   echo "$as_me:10735: result: no" >&5
10736 echo "${ECHO_T}no" >&6
10737 fi
10738
10739     test -n "$LIBTOOL" && break
10740   done
10741 fi
10742 if test -z "$LIBTOOL"; then
10743   ac_ct_LIBTOOL=$LIBTOOL
10744   for ac_prog in libtool glibtool
10745 do
10746   # Extract the first word of "$ac_prog", so it can be a program name with args.
10747 set dummy $ac_prog; ac_word=$2
10748 echo "$as_me:10748: checking for $ac_word" >&5
10749 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10750 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
10751   echo $ECHO_N "(cached) $ECHO_C" >&6
10752 else
10753   if test -n "$ac_ct_LIBTOOL"; then
10754   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
10755 else
10756   ac_save_IFS=$IFS; IFS=$ac_path_separator
10757 ac_dummy="$PATH"
10758 for ac_dir in $ac_dummy; do
10759   IFS=$ac_save_IFS
10760   test -z "$ac_dir" && ac_dir=.
10761   $as_executable_p "$ac_dir/$ac_word" || continue
10762 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
10763 echo "$as_me:10763: found $ac_dir/$ac_word" >&5
10764 break
10765 done
10766
10767 fi
10768 fi
10769 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
10770 if test -n "$ac_ct_LIBTOOL"; then
10771   echo "$as_me:10771: result: $ac_ct_LIBTOOL" >&5
10772 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
10773 else
10774   echo "$as_me:10774: result: no" >&5
10775 echo "${ECHO_T}no" >&6
10776 fi
10777
10778   test -n "$ac_ct_LIBTOOL" && break
10779 done
10780 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
10781
10782   LIBTOOL=$ac_ct_LIBTOOL
10783 fi
10784
10785 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10786 then
10787         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
10788 else
10789         cf_cv_libtool_version=
10790 fi
10791 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
10792
10793                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
10794                 then
10795
10796 unset ac_cv_prog_ac_ct_LIBTOOL
10797 unset ac_ct_LIBTOOL
10798 unset LIBTOOL
10799
10800                         if test -n "$ac_tool_prefix"; then
10801   for ac_prog in glibtool
10802   do
10803     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10804 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10805 echo "$as_me:10805: checking for $ac_word" >&5
10806 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10807 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
10808   echo $ECHO_N "(cached) $ECHO_C" >&6
10809 else
10810   if test -n "$LIBTOOL"; then
10811   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
10812 else
10813   ac_save_IFS=$IFS; IFS=$ac_path_separator
10814 ac_dummy="$PATH"
10815 for ac_dir in $ac_dummy; do
10816   IFS=$ac_save_IFS
10817   test -z "$ac_dir" && ac_dir=.
10818   $as_executable_p "$ac_dir/$ac_word" || continue
10819 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
10820 echo "$as_me:10820: found $ac_dir/$ac_word" >&5
10821 break
10822 done
10823
10824 fi
10825 fi
10826 LIBTOOL=$ac_cv_prog_LIBTOOL
10827 if test -n "$LIBTOOL"; then
10828   echo "$as_me:10828: result: $LIBTOOL" >&5
10829 echo "${ECHO_T}$LIBTOOL" >&6
10830 else
10831   echo "$as_me:10831: result: no" >&5
10832 echo "${ECHO_T}no" >&6
10833 fi
10834
10835     test -n "$LIBTOOL" && break
10836   done
10837 fi
10838 if test -z "$LIBTOOL"; then
10839   ac_ct_LIBTOOL=$LIBTOOL
10840   for ac_prog in glibtool
10841 do
10842   # Extract the first word of "$ac_prog", so it can be a program name with args.
10843 set dummy $ac_prog; ac_word=$2
10844 echo "$as_me:10844: checking for $ac_word" >&5
10845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10846 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
10847   echo $ECHO_N "(cached) $ECHO_C" >&6
10848 else
10849   if test -n "$ac_ct_LIBTOOL"; then
10850   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
10851 else
10852   ac_save_IFS=$IFS; IFS=$ac_path_separator
10853 ac_dummy="$PATH"
10854 for ac_dir in $ac_dummy; do
10855   IFS=$ac_save_IFS
10856   test -z "$ac_dir" && ac_dir=.
10857   $as_executable_p "$ac_dir/$ac_word" || continue
10858 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
10859 echo "$as_me:10859: found $ac_dir/$ac_word" >&5
10860 break
10861 done
10862
10863 fi
10864 fi
10865 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
10866 if test -n "$ac_ct_LIBTOOL"; then
10867   echo "$as_me:10867: result: $ac_ct_LIBTOOL" >&5
10868 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
10869 else
10870   echo "$as_me:10870: result: no" >&5
10871 echo "${ECHO_T}no" >&6
10872 fi
10873
10874   test -n "$ac_ct_LIBTOOL" && break
10875 done
10876 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
10877
10878   LIBTOOL=$ac_ct_LIBTOOL
10879 fi
10880
10881 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10882 then
10883         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
10884 else
10885         cf_cv_libtool_version=
10886 fi
10887 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
10888
10889                 fi
10890         fi
10891         if test -z "$LIBTOOL" ; then
10892                 { { echo "$as_me:10892: error: Cannot find libtool" >&5
10893 echo "$as_me: error: Cannot find libtool" >&2;}
10894    { (exit 1); exit 1; }; }
10895         fi
10896         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
10897         LIB_OBJECT='${OBJECTS:.o=.lo}'
10898         LIB_SUFFIX=.la
10899         LIB_CLEAN='${LIBTOOL} --mode=clean'
10900         LIB_COMPILE='${LIBTOOL} --mode=compile'
10901         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
10902         LIB_INSTALL='${LIBTOOL} --mode=install'
10903         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
10904         LIB_PREP=:
10905
10906 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10907 then
10908         echo "$as_me:10908: checking version of $LIBTOOL" >&5
10909 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
10910
10911 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
10912 then
10913         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
10914 else
10915         cf_cv_libtool_version=
10916 fi
10917 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
10918
10919         echo "$as_me:10919: result: $cf_cv_libtool_version" >&5
10920 echo "${ECHO_T}$cf_cv_libtool_version" >&6
10921         if test -z "$cf_cv_libtool_version" ; then
10922                 { { echo "$as_me:10922: error: This is not GNU libtool" >&5
10923 echo "$as_me: error: This is not GNU libtool" >&2;}
10924    { (exit 1); exit 1; }; }
10925         fi
10926 else
10927         { { echo "$as_me:10927: error: GNU libtool has not been found" >&5
10928 echo "$as_me: error: GNU libtool has not been found" >&2;}
10929    { (exit 1); exit 1; }; }
10930 fi
10931
10932         # special hack to add -no-undefined (which libtool should do for itself)
10933         LT_UNDEF=
10934         case "$cf_cv_system_name" in
10935         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
10936                 LT_UNDEF=-no-undefined
10937                 ;;
10938         esac
10939
10940         # special hack to add --tag option for C++ compiler
10941         case $cf_cv_libtool_version in
10942         (1.[5-9]*|[2-9].[0-9.a-z]*)
10943                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
10944                 LIBTOOL="$LIBTOOL --tag=CC"
10945                 ;;
10946         (*)
10947                 LIBTOOL_CXX="$LIBTOOL"
10948                 ;;
10949         esac
10950 else
10951         LIBTOOL=""
10952         LIBTOOL_CXX=""
10953 fi
10954
10955 test -z "$LIBTOOL" && ECHO_LT=
10956
10957 LIB_CREATE="$LIB_CREATE \$@"
10958
10959 if test "$with_libtool" = "yes" ; then
10960         OBJEXT="lo"
10961         LIB_MODEL=libtool
10962         DFT_LWR_MODEL=$LIB_MODEL
10963         LIBTOOL_MAKE=
10964
10965 echo "$as_me:10965: checking for additional libtool options" >&5
10966 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
10967
10968 # Check whether --with-libtool-opts or --without-libtool-opts was given.
10969 if test "${with_libtool_opts+set}" = set; then
10970   withval="$with_libtool_opts"
10971   with_libtool_opts=$withval
10972 else
10973   with_libtool_opts=no
10974 fi;
10975 echo "$as_me:10975: result: $with_libtool_opts" >&5
10976 echo "${ECHO_T}$with_libtool_opts" >&6
10977
10978 case .$with_libtool_opts in
10979 (.yes|.no|.)
10980         ;;
10981 (*)
10982         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
10983         ;;
10984 esac
10985
10986 echo "$as_me:10986: checking if exported-symbols file should be used" >&5
10987 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
10988
10989 # Check whether --with-export-syms or --without-export-syms was given.
10990 if test "${with_export_syms+set}" = set; then
10991   withval="$with_export_syms"
10992   with_export_syms=$withval
10993 else
10994   with_export_syms=no
10995 fi;
10996 if test "x$with_export_syms" = xyes
10997 then
10998         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
10999
11000 fi
11001 echo "$as_me:11001: result: $with_export_syms" >&5
11002 echo "${ECHO_T}$with_export_syms" >&6
11003 if test "x$with_export_syms" != xno
11004 then
11005         EXPORT_SYMS="-export-symbols $with_export_syms"
11006
11007 fi
11008
11009         MAKE_NORMAL="#"
11010         MAKE_STATIC="#"
11011         MAKE_SHARED=
11012 else
11013         echo "$as_me:11013: checking if you want to build shared libraries" >&5
11014 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
11015
11016 # Check whether --with-shared or --without-shared was given.
11017 if test "${with_shared+set}" = set; then
11018   withval="$with_shared"
11019   with_shared=$withval
11020 else
11021   with_shared=no
11022 fi;
11023         echo "$as_me:11023: result: $with_shared" >&5
11024 echo "${ECHO_T}$with_shared" >&6
11025         if test "$with_shared" = "yes" ; then
11026                 LIB_MODEL=shared
11027                 DFT_LWR_MODEL=$LIB_MODEL
11028
11029         RM_SHARED_OPTS=
11030         LOCAL_LDFLAGS=
11031         LOCAL_LDFLAGS2=
11032         LD_SHARED_OPTS=
11033         INSTALL_LIB="-m 644"
11034         : ${rel_builddir:=.}
11035
11036         shlibdir=$libdir
11037
11038         MAKE_DLLS="#"
11039
11040         cf_cv_do_symlinks=no
11041         cf_ld_rpath_opt=
11042         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11043
11044         echo "$as_me:11044: checking if release/abi version should be used for shared libs" >&5
11045 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11046
11047 # Check whether --with-shlib-version or --without-shlib-version was given.
11048 if test "${with_shlib_version+set}" = set; then
11049   withval="$with_shlib_version"
11050   test -z "$withval" && withval=auto
11051         case $withval in
11052         (yes)
11053                 cf_cv_shlib_version=auto
11054                 ;;
11055         (rel|abi|auto)
11056                 cf_cv_shlib_version=$withval
11057                 ;;
11058         (*)
11059                 echo "$as_me:11059: result: $withval" >&5
11060 echo "${ECHO_T}$withval" >&6
11061                 { { echo "$as_me:11061: error: option value must be one of: rel, abi, or auto" >&5
11062 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11063    { (exit 1); exit 1; }; }
11064                 ;;
11065         esac
11066
11067 else
11068   cf_cv_shlib_version=auto
11069 fi;
11070         echo "$as_me:11070: result: $cf_cv_shlib_version" >&5
11071 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11072
11073         cf_cv_rm_so_locs=no
11074         cf_try_cflags=
11075
11076         # Some less-capable ports of gcc support only -fpic
11077         CC_SHARED_OPTS=
11078
11079         cf_try_fPIC=no
11080         if test "$GCC" = yes
11081         then
11082                 cf_try_fPIC=yes
11083         else
11084                 case $cf_cv_system_name in
11085                 (*linux*)       # e.g., PGI compiler
11086                         cf_try_fPIC=yes
11087                         ;;
11088                 esac
11089         fi
11090
11091         if test "$cf_try_fPIC" = yes
11092         then
11093                 echo "$as_me:11093: checking which $CC option to use" >&5
11094 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11095                 cf_save_CFLAGS="$CFLAGS"
11096                 for CC_SHARED_OPTS in -fPIC -fpic ''
11097                 do
11098                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11099                         cat >conftest.$ac_ext <<_ACEOF
11100 #line 11100 "configure"
11101 #include "confdefs.h"
11102 #include <stdio.h>
11103 int
11104 main (void)
11105 {
11106 int x = 1
11107   ;
11108   return 0;
11109 }
11110 _ACEOF
11111 rm -f conftest.$ac_objext
11112 if { (eval echo "$as_me:11112: \"$ac_compile\"") >&5
11113   (eval $ac_compile) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); } &&
11117          { ac_try='test -s conftest.$ac_objext'
11118   { (eval echo "$as_me:11118: \"$ac_try\"") >&5
11119   (eval $ac_try) 2>&5
11120   ac_status=$?
11121   echo "$as_me:11121: \$? = $ac_status" >&5
11122   (exit $ac_status); }; }; then
11123   break
11124 else
11125   echo "$as_me: failed program was:" >&5
11126 cat conftest.$ac_ext >&5
11127 fi
11128 rm -f conftest.$ac_objext conftest.$ac_ext
11129                 done
11130                 echo "$as_me:11130: result: $CC_SHARED_OPTS" >&5
11131 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11132                 CFLAGS="$cf_save_CFLAGS"
11133         fi
11134
11135         cf_cv_shlib_version_infix=no
11136
11137         case $cf_cv_system_name in
11138         (aix4.3-9*|aix[5-7]*)
11139                 if test "$GCC" = yes; then
11140                         CC_SHARED_OPTS='-Wl,-brtl'
11141                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11142                 else
11143                         CC_SHARED_OPTS='-brtl'
11144                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11145                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11146                 fi
11147                 ;;
11148         (beos*)
11149                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11150                 ;;
11151         (cygwin*)
11152                 CC_SHARED_OPTS=
11153                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11154                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11155                 cf_cv_shlib_version=cygdll
11156                 cf_cv_shlib_version_infix=cygdll
11157                 shlibdir=$bindir
11158                 MAKE_DLLS=
11159                 cat >mk_shared_lib.sh <<-CF_EOF
11160                 #!$SHELL
11161                 SHARED_LIB=\$1
11162                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11163                 shift
11164                 cat <<-EOF
11165                 Linking shared library
11166                 ** SHARED_LIB \$SHARED_LIB
11167                 ** IMPORT_LIB \$IMPORT_LIB
11168 EOF
11169                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11170 CF_EOF
11171                 chmod +x mk_shared_lib.sh
11172                 ;;
11173         (msys*)
11174                 CC_SHARED_OPTS=
11175                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11176                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11177                 cf_cv_shlib_version=msysdll
11178                 cf_cv_shlib_version_infix=msysdll
11179                 shlibdir=$bindir
11180                 MAKE_DLLS=
11181                 cat >mk_shared_lib.sh <<-CF_EOF
11182                 #!$SHELL
11183                 SHARED_LIB=\$1
11184                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11185                 shift
11186                 cat <<-EOF
11187                 Linking shared library
11188                 ** SHARED_LIB \$SHARED_LIB
11189                 ** IMPORT_LIB \$IMPORT_LIB
11190 EOF
11191                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11192 CF_EOF
11193                 chmod +x mk_shared_lib.sh
11194                 ;;
11195         (darwin*)
11196                 cf_try_cflags="no-cpp-precomp"
11197                 CC_SHARED_OPTS="-dynamic"
11198                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11199                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11200                 cf_cv_shlib_version_infix=yes
11201                 echo "$as_me:11201: checking if ld -search_paths_first works" >&5
11202 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11203 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11204   echo $ECHO_N "(cached) $ECHO_C" >&6
11205 else
11206
11207                         cf_save_LDFLAGS=$LDFLAGS
11208                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11209                         cat >conftest.$ac_ext <<_ACEOF
11210 #line 11210 "configure"
11211 #include "confdefs.h"
11212
11213 int
11214 main (void)
11215 {
11216 int i;
11217   ;
11218   return 0;
11219 }
11220 _ACEOF
11221 rm -f conftest.$ac_objext conftest$ac_exeext
11222 if { (eval echo "$as_me:11222: \"$ac_link\"") >&5
11223   (eval $ac_link) 2>&5
11224   ac_status=$?
11225   echo "$as_me:11225: \$? = $ac_status" >&5
11226   (exit $ac_status); } &&
11227          { ac_try='test -s conftest$ac_exeext'
11228   { (eval echo "$as_me:11228: \"$ac_try\"") >&5
11229   (eval $ac_try) 2>&5
11230   ac_status=$?
11231   echo "$as_me:11231: \$? = $ac_status" >&5
11232   (exit $ac_status); }; }; then
11233   cf_cv_ldflags_search_paths_first=yes
11234 else
11235   echo "$as_me: failed program was:" >&5
11236 cat conftest.$ac_ext >&5
11237 cf_cv_ldflags_search_paths_first=no
11238 fi
11239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11240                                 LDFLAGS=$cf_save_LDFLAGS
11241 fi
11242 echo "$as_me:11242: result: $cf_cv_ldflags_search_paths_first" >&5
11243 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11244                 if test $cf_cv_ldflags_search_paths_first = yes; then
11245                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11246                 fi
11247                 ;;
11248         (hpux[7-8]*)
11249                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11250                 if test "$GCC" != yes; then
11251                         CC_SHARED_OPTS='+Z'
11252                 fi
11253                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11254                 INSTALL_LIB="-m 555"
11255                 ;;
11256         (hpux*)
11257                 # (tested with gcc 2.7.2 -- I don't have c89)
11258                 if test "$GCC" = yes; then
11259                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11260                 else
11261                         CC_SHARED_OPTS='+Z'
11262                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
11263                 fi
11264                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11265                 # HP-UX shared libraries must be executable, and should be
11266                 # readonly to exploit a quirk in the memory manager.
11267                 INSTALL_LIB="-m 555"
11268                 ;;
11269         (interix*)
11270                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11271                 if test "$cf_cv_shlib_version" = rel; then
11272                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11273                 else
11274                         cf_shared_soname='`basename $@`'
11275                 fi
11276                 CC_SHARED_OPTS=
11277                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11278                 ;;
11279         (irix*)
11280                 if test "$cf_cv_enable_rpath" = yes ; then
11281                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11282                 fi
11283                 # tested with IRIX 5.2 and 'cc'.
11284                 if test "$GCC" != yes; then
11285                         CC_SHARED_OPTS='-KPIC'
11286                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11287                 else
11288                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11289                 fi
11290                 cf_cv_rm_so_locs=yes
11291                 ;;
11292         (linux*|gnu*|k*bsd*-gnu)
11293                 if test "$DFT_LWR_MODEL" = "shared" ; then
11294                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11295                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11296                 fi
11297                 if test "$cf_cv_enable_rpath" = yes ; then
11298                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11299                 fi
11300
11301         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11302         if test "$cf_cv_shlib_version" = rel; then
11303                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11304         else
11305                 cf_cv_shared_soname='`basename $@`'
11306         fi
11307
11308                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11309                 ;;
11310         (mingw*)
11311                 cf_cv_shlib_version=mingw
11312                 cf_cv_shlib_version_infix=mingw
11313                 shlibdir=$bindir
11314                 MAKE_DLLS=
11315                 if test "$DFT_LWR_MODEL" = "shared" ; then
11316                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11317                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11318                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11319                 fi
11320                 CC_SHARED_OPTS=
11321                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11322                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11323                 cat >mk_shared_lib.sh <<-CF_EOF
11324                 #!$SHELL
11325                 SHARED_LIB=\$1
11326                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11327                 shift
11328                 cat <<-EOF
11329                 Linking shared library
11330                 ** SHARED_LIB \$SHARED_LIB
11331                 ** IMPORT_LIB \$IMPORT_LIB
11332 EOF
11333                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11334 CF_EOF
11335                 chmod +x mk_shared_lib.sh
11336                 ;;
11337         (openbsd[2-9].*|mirbsd*)
11338                 if test "$DFT_LWR_MODEL" = "shared" ; then
11339                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11340                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11341                 fi
11342                 if test "$cf_cv_enable_rpath" = yes ; then
11343                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11344                 fi
11345                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11346
11347         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11348         if test "$cf_cv_shlib_version" = rel; then
11349                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11350         else
11351                 cf_cv_shared_soname='`basename $@`'
11352         fi
11353
11354                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11355                 ;;
11356         (nto-qnx*|openbsd*|freebsd[12].*)
11357                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11358                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11359                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11360                 ;;
11361         (dragonfly*|freebsd*)
11362                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11363                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11364                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11365                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11366                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11367                 fi
11368
11369         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11370         if test "$cf_cv_shlib_version" = rel; then
11371                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11372         else
11373                 cf_cv_shared_soname='`basename $@`'
11374         fi
11375
11376                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11377                 ;;
11378         (netbsd*)
11379                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11380                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11381                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11382                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11383                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11384                         if test "$cf_cv_shlib_version" = auto; then
11385                         if test -f /usr/libexec/ld.elf_so; then
11386                                 cf_cv_shlib_version=abi
11387                         else
11388                                 cf_cv_shlib_version=rel
11389                         fi
11390                         fi
11391
11392         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11393         if test "$cf_cv_shlib_version" = rel; then
11394                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11395         else
11396                 cf_cv_shared_soname='`basename $@`'
11397         fi
11398
11399                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11400                 else
11401                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
11402                 fi
11403                 ;;
11404         (osf*|mls+*)
11405                 # tested with OSF/1 V3.2 and 'cc'
11406                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11407                 # link with shared libs).
11408                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11409                 case $host_os in
11410                 (osf4*)
11411                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11412                         ;;
11413                 esac
11414                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11415                 if test "$DFT_LWR_MODEL" = "shared" ; then
11416                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11417                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11418                 fi
11419                 cf_cv_rm_so_locs=yes
11420                 ;;
11421         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
11422                 # tested with osr5.0.5
11423                 if test "$GCC" != yes; then
11424                         CC_SHARED_OPTS='-belf -KPIC'
11425                 fi
11426                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11427                 if test "$cf_cv_enable_rpath" = yes ; then
11428                         # only way is to set LD_RUN_PATH but no switch for it
11429                         RUN_PATH=$libdir
11430                 fi
11431                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11432                 LINK_PROGS='LD_RUN_PATH=${libdir}'
11433                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11434                 ;;
11435         (sunos4*)
11436                 # tested with SunOS 4.1.1 and gcc 2.7.0
11437                 if test "$GCC" != yes; then
11438                         CC_SHARED_OPTS='-KPIC'
11439                 fi
11440                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11441                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11442                 ;;
11443         (solaris2*)
11444                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11445                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11446                 if test "$DFT_LWR_MODEL" = "shared" ; then
11447                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11448                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11449                 fi
11450                 if test "$cf_cv_enable_rpath" = yes ; then
11451                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11452                 fi
11453
11454         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11455         if test "$cf_cv_shlib_version" = rel; then
11456                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11457         else
11458                 cf_cv_shared_soname='`basename $@`'
11459         fi
11460
11461                 if test "$GCC" != yes; then
11462                         cf_save_CFLAGS="$CFLAGS"
11463                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11464                         do
11465                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11466                                 cat >conftest.$ac_ext <<_ACEOF
11467 #line 11467 "configure"
11468 #include "confdefs.h"
11469 #include <stdio.h>
11470 int
11471 main (void)
11472 {
11473 printf("Hello\n");
11474   ;
11475   return 0;
11476 }
11477 _ACEOF
11478 rm -f conftest.$ac_objext
11479 if { (eval echo "$as_me:11479: \"$ac_compile\"") >&5
11480   (eval $ac_compile) 2>&5
11481   ac_status=$?
11482   echo "$as_me:11482: \$? = $ac_status" >&5
11483   (exit $ac_status); } &&
11484          { ac_try='test -s conftest.$ac_objext'
11485   { (eval echo "$as_me:11485: \"$ac_try\"") >&5
11486   (eval $ac_try) 2>&5
11487   ac_status=$?
11488   echo "$as_me:11488: \$? = $ac_status" >&5
11489   (exit $ac_status); }; }; then
11490   break
11491 else
11492   echo "$as_me: failed program was:" >&5
11493 cat conftest.$ac_ext >&5
11494 fi
11495 rm -f conftest.$ac_objext conftest.$ac_ext
11496                         done
11497                         CFLAGS="$cf_save_CFLAGS"
11498                         CC_SHARED_OPTS=$cf_shared_opts
11499                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11500                 else
11501                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11502                 fi
11503                 ;;
11504         (sysv5uw7*|unix_sv*)
11505                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11506                 if test "$GCC" != yes; then
11507                         CC_SHARED_OPTS='-KPIC'
11508                 fi
11509                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11510                 ;;
11511         (*)
11512                 CC_SHARED_OPTS='unknown'
11513                 MK_SHARED_LIB='echo unknown'
11514                 ;;
11515         esac
11516
11517         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11518         case "$cf_cv_shlib_version" in
11519         (rel|abi)
11520                 case "$MK_SHARED_LIB" in
11521                 (*'-o $@')
11522                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11523                         ;;
11524                 (*)
11525                         { echo "$as_me:11525: WARNING: ignored --with-shlib-version" >&5
11526 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11527                         ;;
11528                 esac
11529                 ;;
11530         esac
11531
11532         if test -n "$cf_try_cflags"
11533         then
11534 cat > conftest.$ac_ext <<EOF
11535 #line 11535 "${as_me:-configure}"
11536 #include <stdio.h>
11537 int main(int argc, char *argv[])
11538 {
11539         printf("hello\n");
11540         return (argv[argc-1] == 0) ;
11541 }
11542 EOF
11543                 cf_save_CFLAGS="$CFLAGS"
11544                 for cf_opt in $cf_try_cflags
11545                 do
11546                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
11547                         echo "$as_me:11547: checking if CFLAGS option -$cf_opt works" >&5
11548 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11549                         if { (eval echo "$as_me:11549: \"$ac_compile\"") >&5
11550   (eval $ac_compile) 2>&5
11551   ac_status=$?
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit $ac_status); }; then
11554                                 echo "$as_me:11554: result: yes" >&5
11555 echo "${ECHO_T}yes" >&6
11556                                 cf_save_CFLAGS="$CFLAGS"
11557                         else
11558                                 echo "$as_me:11558: result: no" >&5
11559 echo "${ECHO_T}no" >&6
11560                         fi
11561                 done
11562                 CFLAGS="$cf_save_CFLAGS"
11563         fi
11564
11565         # RPATH_LIST is a colon-separated list of directories
11566         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11567         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11568
11569         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11570
11571         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11572
11573 echo "${as_me:-configure}:11573: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11574
11575         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
11576
11577 echo "${as_me:-configure}:11577: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
11578
11579 echo "$as_me:11579: checking if versioned-symbols file should be used" >&5
11580 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
11581
11582 # Check whether --with-versioned-syms or --without-versioned-syms was given.
11583 if test "${with_versioned_syms+set}" = set; then
11584   withval="$with_versioned_syms"
11585   with_versioned_syms=$withval
11586 else
11587   with_versioned_syms=no
11588 fi;
11589 if test "x$with_versioned_syms" = xyes
11590 then
11591         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
11592
11593 fi
11594 echo "$as_me:11594: result: $with_versioned_syms" >&5
11595 echo "${ECHO_T}$with_versioned_syms" >&6
11596
11597 RESULTING_SYMS=
11598 VERSIONED_SYMS=
11599 WILDCARD_SYMS=
11600
11601 if test "x$with_versioned_syms" != xno
11602 then
11603         RESULTING_SYMS=$with_versioned_syms
11604         case "x$MK_SHARED_LIB" in
11605         (*-Wl,*)
11606                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
11607                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
11608                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
11609
11610 echo "${as_me:-configure}:11610: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
11611
11612                 ;;
11613         (*-dy\ *)
11614                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
11615                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
11616                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
11617
11618 echo "${as_me:-configure}:11618: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
11619
11620                 ;;
11621         (*)
11622                 { echo "$as_me:11622: WARNING: this system does not support versioned-symbols" >&5
11623 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
11624                 ;;
11625         esac
11626
11627         # Linux ld can selectively override scope, e.g., of symbols beginning with
11628         # "_" by first declaring some as global, and then using a wildcard to
11629         # declare the others as local.  Some other loaders cannot do this.  Check
11630         # by constructing a (very) simple shared library and inspecting its
11631         # symbols.
11632         if test "x$VERSIONED_SYMS" != "x"
11633         then
11634                 echo "$as_me:11634: checking if wildcards can be used to selectively omit symbols" >&5
11635 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
11636                 WILDCARD_SYMS=no
11637
11638                 # make sources
11639                 rm -f conftest.*
11640
11641                 cat >conftest.ver <<EOF
11642 module_1.0 {
11643 global:
11644         globalf1;
11645 local:
11646         localf1;
11647 };
11648 module_2.0 {
11649 global:
11650         globalf2;
11651 local:
11652         localf2;
11653         _*;
11654 } module_1.0;
11655 submodule_1.0 {
11656 global:
11657         subglobalf1;
11658         _ismissing;
11659 local:
11660         sublocalf1;
11661 };
11662 submodule_2.0 {
11663 global:
11664         subglobalf2;
11665 local:
11666         sublocalf2;
11667         _*;
11668 } submodule_1.0;
11669 EOF
11670                 cat >conftest.$ac_ext <<EOF
11671 #line 11671 "configure"
11672 int     _ismissing(void) { return 1; }
11673 int     _localf1(void) { return 1; }
11674 int     _localf2(void) { return 2; }
11675 int     globalf1(void) { return 1; }
11676 int     globalf2(void) { return 2; }
11677 int     _sublocalf1(void) { return 1; }
11678 int     _sublocalf2(void) { return 2; }
11679 int     subglobalf1(void) { return 1; }
11680 int     subglobalf2(void) { return 2; }
11681 EOF
11682                 cat >conftest.mk <<EOF
11683 CC=${CC}
11684 CFLAGS=${CFLAGS}
11685 CPPFLAGS=${CPPFLAGS}
11686 LDFLAGS=${LDFLAGS}
11687 LIBS=${LIBS}
11688 VERSIONED_SYMS=${VERSIONED_SYMS}
11689 RESULTING_SYMS=conftest.ver
11690 MK_SHARED_LIB=${MK_SHARED_LIB}
11691 conftest.so: conftest.$ac_cv_objext
11692                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
11693 EOF
11694
11695                 # compile source, make library
11696                 if make -f conftest.mk 2>&5 >/dev/null
11697                 then
11698                         # test for missing symbol in either Data or Text section
11699                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
11700                         test -n "$cf_missing" && WILDCARD_SYMS=yes
11701                 fi
11702                 echo "$as_me:11702: result: $WILDCARD_SYMS" >&5
11703 echo "${ECHO_T}$WILDCARD_SYMS" >&6
11704                 rm -f conftest.*
11705         fi
11706 fi
11707
11708                 LIB_PREP=:
11709                 LIB_CREATE="$MK_SHARED_LIB"
11710                 CFLAGS="$CFLAGS $CC_SHARED_OPTS"
11711                 MAKE_NORMAL="#"
11712                 MAKE_STATIC="#"
11713                 MAKE_SHARED=
11714         fi
11715 fi
11716
11717 LIB_SUFFIX=
11718
11719         case X$LIB_MODEL in
11720         (Xlibtool)
11721                 DFT_LIB_SUFFIX='.la'
11722                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11723                 ;;
11724         (Xdebug)
11725                 DFT_LIB_SUFFIX='_g.a'
11726                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11727                 ;;
11728         (Xprofile)
11729                 DFT_LIB_SUFFIX='_p.a'
11730                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11731                 ;;
11732         (Xshared)
11733                 case $cf_cv_system_name in
11734                 (aix[5-7]*)
11735                         DFT_LIB_SUFFIX='.so'
11736                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11737                         ;;
11738                 (cygwin*|msys*|mingw*)
11739                         DFT_LIB_SUFFIX='.dll'
11740                         DFT_DEP_SUFFIX='.dll.a'
11741                         ;;
11742                 (darwin*)
11743                         DFT_LIB_SUFFIX='.dylib'
11744                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11745                         ;;
11746                 (hpux*)
11747                         case $target in
11748                         (ia64*)
11749                                 DFT_LIB_SUFFIX='.so'
11750                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11751                                 ;;
11752                         (*)
11753                                 DFT_LIB_SUFFIX='.sl'
11754                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11755                                 ;;
11756                         esac
11757                         ;;
11758                 (*)
11759                         DFT_LIB_SUFFIX='.so'
11760                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11761                         ;;
11762                 esac
11763                 ;;
11764         (*)
11765                 DFT_LIB_SUFFIX='.a'
11766                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
11767                 ;;
11768         esac
11769         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
11770         then
11771                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
11772                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
11773         fi
11774
11775 LIB_SUFFIX=$DFT_LIB_SUFFIX
11776
11777 echo "$as_me:11777: checking for specific curses-directory" >&5
11778 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
11779
11780 # Check whether --with-curses-dir or --without-curses-dir was given.
11781 if test "${with_curses_dir+set}" = set; then
11782   withval="$with_curses_dir"
11783   cf_cv_curses_dir=$withval
11784 else
11785   cf_cv_curses_dir=no
11786 fi;
11787 echo "$as_me:11787: result: $cf_cv_curses_dir" >&5
11788 echo "${ECHO_T}$cf_cv_curses_dir" >&6
11789
11790 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11791 then
11792
11793 if test "x$prefix" != xNONE; then
11794         cf_path_syntax="$prefix"
11795 else
11796         cf_path_syntax="$ac_default_prefix"
11797 fi
11798
11799 case ".$withval" in
11800 (.\$\(*\)*|.\'*\'*)
11801         ;;
11802 (..|./*|.\\*)
11803         ;;
11804 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11805         ;;
11806 (.\${*prefix}*|.\${*dir}*)
11807         eval withval="$withval"
11808         case ".$withval" in
11809         (.NONE/*)
11810                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11811                 ;;
11812         esac
11813         ;;
11814 (.no|.NONE/*)
11815         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11816         ;;
11817 (*)
11818         { { echo "$as_me:11818: error: expected a pathname, not \"$withval\"" >&5
11819 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11820    { (exit 1); exit 1; }; }
11821         ;;
11822 esac
11823
11824         if test -d "$cf_cv_curses_dir"
11825         then
11826
11827 if test -n "$cf_cv_curses_dir/include" ; then
11828   for cf_add_incdir in $cf_cv_curses_dir/include
11829   do
11830         while test $cf_add_incdir != /usr/include
11831         do
11832           if test -d $cf_add_incdir
11833           then
11834                 cf_have_incdir=no
11835                 if test -n "$CFLAGS$CPPFLAGS" ; then
11836                   # a loop is needed to ensure we can add subdirs of existing dirs
11837                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11838                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11839                           cf_have_incdir=yes; break
11840                         fi
11841                   done
11842                 fi
11843
11844                 if test "$cf_have_incdir" = no ; then
11845                   if test "$cf_add_incdir" = /usr/local/include ; then
11846                         if test "$GCC" = yes
11847                         then
11848                           cf_save_CPPFLAGS=$CPPFLAGS
11849
11850         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11851         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11852
11853                           cat >conftest.$ac_ext <<_ACEOF
11854 #line 11854 "configure"
11855 #include "confdefs.h"
11856 #include <stdio.h>
11857 int
11858 main (void)
11859 {
11860 printf("Hello")
11861   ;
11862   return 0;
11863 }
11864 _ACEOF
11865 rm -f conftest.$ac_objext
11866 if { (eval echo "$as_me:11866: \"$ac_compile\"") >&5
11867   (eval $ac_compile) 2>&5
11868   ac_status=$?
11869   echo "$as_me:11869: \$? = $ac_status" >&5
11870   (exit $ac_status); } &&
11871          { ac_try='test -s conftest.$ac_objext'
11872   { (eval echo "$as_me:11872: \"$ac_try\"") >&5
11873   (eval $ac_try) 2>&5
11874   ac_status=$?
11875   echo "$as_me:11875: \$? = $ac_status" >&5
11876   (exit $ac_status); }; }; then
11877   :
11878 else
11879   echo "$as_me: failed program was:" >&5
11880 cat conftest.$ac_ext >&5
11881 cf_have_incdir=yes
11882 fi
11883 rm -f conftest.$ac_objext conftest.$ac_ext
11884                           CPPFLAGS=$cf_save_CPPFLAGS
11885                         fi
11886                   fi
11887                 fi
11888
11889                 if test "$cf_have_incdir" = no ; then
11890                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11891
11892 echo "${as_me:-configure}:11892: testing adding $cf_add_incdir to include-path ..." 1>&5
11893
11894                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11895
11896                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11897                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11898                   cf_add_incdir="$cf_top_incdir"
11899                 else
11900                   break
11901                 fi
11902           else
11903                 break
11904           fi
11905         done
11906   done
11907 fi
11908
11909 if test -n "$cf_cv_curses_dir/lib" ; then
11910         for cf_add_libdir in $cf_cv_curses_dir/lib
11911         do
11912                 if test $cf_add_libdir = /usr/lib ; then
11913                         :
11914                 elif test -d $cf_add_libdir
11915                 then
11916                         cf_have_libdir=no
11917                         if test -n "$LDFLAGS$LIBS" ; then
11918                                 # a loop is needed to ensure we can add subdirs of existing dirs
11919                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11920                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11921                                                 cf_have_libdir=yes; break
11922                                         fi
11923                                 done
11924                         fi
11925                         if test "$cf_have_libdir" = no ; then
11926                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11927
11928 echo "${as_me:-configure}:11928: testing adding $cf_add_libdir to library-path ..." 1>&5
11929
11930                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11931                         fi
11932                 fi
11933         done
11934 fi
11935
11936         fi
11937 fi
11938
11939 echo "$as_me:11939: checking if rpath option should be used" >&5
11940 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
11941
11942 # Check whether --enable-rpath or --disable-rpath was given.
11943 if test "${enable_rpath+set}" = set; then
11944   enableval="$enable_rpath"
11945   cf_cv_enable_rpath=$enableval
11946 else
11947   cf_cv_enable_rpath=no
11948 fi;
11949 echo "$as_me:11949: result: $cf_cv_enable_rpath" >&5
11950 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
11951
11952 echo "$as_me:11952: checking for specific curses-directory" >&5
11953 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
11954
11955 # Check whether --with-curses-dir or --without-curses-dir was given.
11956 if test "${with_curses_dir+set}" = set; then
11957   withval="$with_curses_dir"
11958   cf_cv_curses_dir=$withval
11959 else
11960   cf_cv_curses_dir=no
11961 fi;
11962 echo "$as_me:11962: result: $cf_cv_curses_dir" >&5
11963 echo "${ECHO_T}$cf_cv_curses_dir" >&6
11964
11965 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11966 then
11967
11968 if test "x$prefix" != xNONE; then
11969         cf_path_syntax="$prefix"
11970 else
11971         cf_path_syntax="$ac_default_prefix"
11972 fi
11973
11974 case ".$withval" in
11975 (.\$\(*\)*|.\'*\'*)
11976         ;;
11977 (..|./*|.\\*)
11978         ;;
11979 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11980         ;;
11981 (.\${*prefix}*|.\${*dir}*)
11982         eval withval="$withval"
11983         case ".$withval" in
11984         (.NONE/*)
11985                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11986                 ;;
11987         esac
11988         ;;
11989 (.no|.NONE/*)
11990         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11991         ;;
11992 (*)
11993         { { echo "$as_me:11993: error: expected a pathname, not \"$withval\"" >&5
11994 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11995    { (exit 1); exit 1; }; }
11996         ;;
11997 esac
11998
11999         if test -d "$cf_cv_curses_dir"
12000         then
12001
12002 if test -n "$cf_cv_curses_dir/include" ; then
12003   for cf_add_incdir in $cf_cv_curses_dir/include
12004   do
12005         while test $cf_add_incdir != /usr/include
12006         do
12007           if test -d $cf_add_incdir
12008           then
12009                 cf_have_incdir=no
12010                 if test -n "$CFLAGS$CPPFLAGS" ; then
12011                   # a loop is needed to ensure we can add subdirs of existing dirs
12012                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12013                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12014                           cf_have_incdir=yes; break
12015                         fi
12016                   done
12017                 fi
12018
12019                 if test "$cf_have_incdir" = no ; then
12020                   if test "$cf_add_incdir" = /usr/local/include ; then
12021                         if test "$GCC" = yes
12022                         then
12023                           cf_save_CPPFLAGS=$CPPFLAGS
12024
12025         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12026         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12027
12028                           cat >conftest.$ac_ext <<_ACEOF
12029 #line 12029 "configure"
12030 #include "confdefs.h"
12031 #include <stdio.h>
12032 int
12033 main (void)
12034 {
12035 printf("Hello")
12036   ;
12037   return 0;
12038 }
12039 _ACEOF
12040 rm -f conftest.$ac_objext
12041 if { (eval echo "$as_me:12041: \"$ac_compile\"") >&5
12042   (eval $ac_compile) 2>&5
12043   ac_status=$?
12044   echo "$as_me:12044: \$? = $ac_status" >&5
12045   (exit $ac_status); } &&
12046          { ac_try='test -s conftest.$ac_objext'
12047   { (eval echo "$as_me:12047: \"$ac_try\"") >&5
12048   (eval $ac_try) 2>&5
12049   ac_status=$?
12050   echo "$as_me:12050: \$? = $ac_status" >&5
12051   (exit $ac_status); }; }; then
12052   :
12053 else
12054   echo "$as_me: failed program was:" >&5
12055 cat conftest.$ac_ext >&5
12056 cf_have_incdir=yes
12057 fi
12058 rm -f conftest.$ac_objext conftest.$ac_ext
12059                           CPPFLAGS=$cf_save_CPPFLAGS
12060                         fi
12061                   fi
12062                 fi
12063
12064                 if test "$cf_have_incdir" = no ; then
12065                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12066
12067 echo "${as_me:-configure}:12067: testing adding $cf_add_incdir to include-path ..." 1>&5
12068
12069                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12070
12071                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12072                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12073                   cf_add_incdir="$cf_top_incdir"
12074                 else
12075                   break
12076                 fi
12077           else
12078                 break
12079           fi
12080         done
12081   done
12082 fi
12083
12084 if test -n "$cf_cv_curses_dir/lib" ; then
12085         for cf_add_libdir in $cf_cv_curses_dir/lib
12086         do
12087                 if test $cf_add_libdir = /usr/lib ; then
12088                         :
12089                 elif test -d $cf_add_libdir
12090                 then
12091                         cf_have_libdir=no
12092                         if test -n "$LDFLAGS$LIBS" ; then
12093                                 # a loop is needed to ensure we can add subdirs of existing dirs
12094                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12095                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12096                                                 cf_have_libdir=yes; break
12097                                         fi
12098                                 done
12099                         fi
12100                         if test "$cf_have_libdir" = no ; then
12101                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12102
12103 echo "${as_me:-configure}:12103: testing adding $cf_add_libdir to library-path ..." 1>&5
12104
12105                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12106                         fi
12107                 fi
12108         done
12109 fi
12110
12111         fi
12112 fi
12113
12114 cf_cv_screen=curses
12115
12116 echo "$as_me:12116: checking for specified curses library type" >&5
12117 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
12118
12119 # Check whether --with-screen or --without-screen was given.
12120 if test "${with_screen+set}" = set; then
12121   withval="$with_screen"
12122   cf_cv_screen=$withval
12123 else
12124
12125 # Check whether --with-ncursesw or --without-ncursesw was given.
12126 if test "${with_ncursesw+set}" = set; then
12127   withval="$with_ncursesw"
12128   cf_cv_screen=ncursesw
12129 else
12130
12131 # Check whether --with-ncurses or --without-ncurses was given.
12132 if test "${with_ncurses+set}" = set; then
12133   withval="$with_ncurses"
12134   cf_cv_screen=ncurses
12135 else
12136
12137 # Check whether --with-pdcurses or --without-pdcurses was given.
12138 if test "${with_pdcurses+set}" = set; then
12139   withval="$with_pdcurses"
12140   cf_cv_screen=pdcurses
12141 else
12142
12143 # Check whether --with-curses-colr or --without-curses-colr was given.
12144 if test "${with_curses_colr+set}" = set; then
12145   withval="$with_curses_colr"
12146   cf_cv_screen=curses_colr
12147 else
12148
12149 # Check whether --with-curses-5lib or --without-curses-5lib was given.
12150 if test "${with_curses_5lib+set}" = set; then
12151   withval="$with_curses_5lib"
12152   cf_cv_screen=curses_5lib
12153 fi;
12154 fi;
12155 fi;
12156 fi;
12157 fi;
12158 fi;
12159
12160 echo "$as_me:12160: result: $cf_cv_screen" >&5
12161 echo "${ECHO_T}$cf_cv_screen" >&6
12162
12163 case $cf_cv_screen in
12164 (curses|curses_*)
12165
12166 echo "$as_me:12166: checking for extra include directories" >&5
12167 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
12168 if test "${cf_cv_curses_incdir+set}" = set; then
12169   echo $ECHO_N "(cached) $ECHO_C" >&6
12170 else
12171
12172 cf_cv_curses_incdir=no
12173 case $host_os in
12174 (hpux10.*)
12175         if test "x$cf_cv_screen" = "xcurses_colr"
12176         then
12177                 test -d /usr/include/curses_colr && \
12178                 cf_cv_curses_incdir="-I/usr/include/curses_colr"
12179         fi
12180         ;;
12181 (sunos3*|sunos4*)
12182         if test "x$cf_cv_screen" = "xcurses_5lib"
12183         then
12184                 test -d /usr/5lib && \
12185                 test -d /usr/5include && \
12186                 cf_cv_curses_incdir="-I/usr/5include"
12187         fi
12188         ;;
12189 esac
12190
12191 fi
12192 echo "$as_me:12192: result: $cf_cv_curses_incdir" >&5
12193 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
12194 if test "$cf_cv_curses_incdir" != no
12195 then
12196
12197         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12198         CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
12199
12200 fi
12201
12202 echo "$as_me:12202: checking if we have identified curses headers" >&5
12203 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
12204 if test "${cf_cv_ncurses_header+set}" = set; then
12205   echo $ECHO_N "(cached) $ECHO_C" >&6
12206 else
12207
12208 cf_cv_ncurses_header=none
12209 for cf_header in \
12210         ncurses.h  \
12211         curses.h  ncurses/ncurses.h ncurses/curses.h
12212 do
12213 cat >conftest.$ac_ext <<_ACEOF
12214 #line 12214 "configure"
12215 #include "confdefs.h"
12216 #include <${cf_header}>
12217 int
12218 main (void)
12219 {
12220 initscr(); tgoto("?", 0,0)
12221   ;
12222   return 0;
12223 }
12224 _ACEOF
12225 rm -f conftest.$ac_objext
12226 if { (eval echo "$as_me:12226: \"$ac_compile\"") >&5
12227   (eval $ac_compile) 2>&5
12228   ac_status=$?
12229   echo "$as_me:12229: \$? = $ac_status" >&5
12230   (exit $ac_status); } &&
12231          { ac_try='test -s conftest.$ac_objext'
12232   { (eval echo "$as_me:12232: \"$ac_try\"") >&5
12233   (eval $ac_try) 2>&5
12234   ac_status=$?
12235   echo "$as_me:12235: \$? = $ac_status" >&5
12236   (exit $ac_status); }; }; then
12237   cf_cv_ncurses_header=$cf_header; break
12238 else
12239   echo "$as_me: failed program was:" >&5
12240 cat conftest.$ac_ext >&5
12241 fi
12242 rm -f conftest.$ac_objext conftest.$ac_ext
12243 done
12244
12245 fi
12246 echo "$as_me:12246: result: $cf_cv_ncurses_header" >&5
12247 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
12248
12249 if test "$cf_cv_ncurses_header" = none ; then
12250         { { echo "$as_me:12250: error: No curses header-files found" >&5
12251 echo "$as_me: error: No curses header-files found" >&2;}
12252    { (exit 1); exit 1; }; }
12253 fi
12254
12255 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
12256
12257 for ac_header in $cf_cv_ncurses_header
12258 do
12259 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12260 echo "$as_me:12260: checking for $ac_header" >&5
12261 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12262 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12263   echo $ECHO_N "(cached) $ECHO_C" >&6
12264 else
12265   cat >conftest.$ac_ext <<_ACEOF
12266 #line 12266 "configure"
12267 #include "confdefs.h"
12268 #include <$ac_header>
12269 _ACEOF
12270 if { (eval echo "$as_me:12270: \"$ac_cpp conftest.$ac_ext\"") >&5
12271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12272   ac_status=$?
12273   egrep -v '^ *\+' conftest.er1 >conftest.err
12274   rm -f conftest.er1
12275   cat conftest.err >&5
12276   echo "$as_me:12276: \$? = $ac_status" >&5
12277   (exit $ac_status); } >/dev/null; then
12278   if test -s conftest.err; then
12279     ac_cpp_err=$ac_c_preproc_warn_flag
12280   else
12281     ac_cpp_err=
12282   fi
12283 else
12284   ac_cpp_err=yes
12285 fi
12286 if test -z "$ac_cpp_err"; then
12287   eval "$as_ac_Header=yes"
12288 else
12289   echo "$as_me: failed program was:" >&5
12290   cat conftest.$ac_ext >&5
12291   eval "$as_ac_Header=no"
12292 fi
12293 rm -f conftest.err conftest.$ac_ext
12294 fi
12295 echo "$as_me:12295: result: `eval echo '${'$as_ac_Header'}'`" >&5
12296 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12297 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12298   cat >>confdefs.h <<EOF
12299 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12300 EOF
12301
12302 fi
12303 done
12304
12305 echo "$as_me:12305: checking for terminfo header" >&5
12306 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12307 if test "${cf_cv_term_header+set}" = set; then
12308   echo $ECHO_N "(cached) $ECHO_C" >&6
12309 else
12310
12311 case ${cf_cv_ncurses_header} in
12312 (*/ncurses.h|*/ncursesw.h)
12313         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12314         ;;
12315 (*)
12316         cf_term_header=term.h
12317         ;;
12318 esac
12319
12320 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12321 do
12322 cat >conftest.$ac_ext <<_ACEOF
12323 #line 12323 "configure"
12324 #include "confdefs.h"
12325 #include <stdio.h>
12326 #include <${cf_cv_ncurses_header:-curses.h}>
12327 #include <$cf_test>
12328
12329 int
12330 main (void)
12331 {
12332 int x = auto_left_margin
12333   ;
12334   return 0;
12335 }
12336 _ACEOF
12337 rm -f conftest.$ac_objext
12338 if { (eval echo "$as_me:12338: \"$ac_compile\"") >&5
12339   (eval $ac_compile) 2>&5
12340   ac_status=$?
12341   echo "$as_me:12341: \$? = $ac_status" >&5
12342   (exit $ac_status); } &&
12343          { ac_try='test -s conftest.$ac_objext'
12344   { (eval echo "$as_me:12344: \"$ac_try\"") >&5
12345   (eval $ac_try) 2>&5
12346   ac_status=$?
12347   echo "$as_me:12347: \$? = $ac_status" >&5
12348   (exit $ac_status); }; }; then
12349
12350         cf_cv_term_header="$cf_test"
12351 else
12352   echo "$as_me: failed program was:" >&5
12353 cat conftest.$ac_ext >&5
12354
12355         cf_cv_term_header=unknown
12356
12357 fi
12358 rm -f conftest.$ac_objext conftest.$ac_ext
12359         test "$cf_cv_term_header" != unknown && break
12360 done
12361
12362 fi
12363 echo "$as_me:12363: result: $cf_cv_term_header" >&5
12364 echo "${ECHO_T}$cf_cv_term_header" >&6
12365
12366 # Set definitions to allow ifdef'ing to accommodate subdirectories
12367
12368 case $cf_cv_term_header in
12369 (*term.h)
12370
12371 cat >>confdefs.h <<\EOF
12372 #define HAVE_TERM_H 1
12373 EOF
12374
12375         ;;
12376 esac
12377
12378 case $cf_cv_term_header in
12379 (ncurses/term.h)
12380
12381 cat >>confdefs.h <<\EOF
12382 #define HAVE_NCURSES_TERM_H 1
12383 EOF
12384
12385         ;;
12386 (ncursesw/term.h)
12387
12388 cat >>confdefs.h <<\EOF
12389 #define HAVE_NCURSESW_TERM_H 1
12390 EOF
12391
12392         ;;
12393 esac
12394
12395 echo "$as_me:12395: checking for ncurses version" >&5
12396 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
12397 if test "${cf_cv_ncurses_version+set}" = set; then
12398   echo $ECHO_N "(cached) $ECHO_C" >&6
12399 else
12400
12401         cf_cv_ncurses_version=no
12402         cf_tempfile=out$$
12403         rm -f $cf_tempfile
12404         if test "$cross_compiling" = yes; then
12405
12406         # This will not work if the preprocessor splits the line after the
12407         # Autoconf token.  The 'unproto' program does that.
12408         cat > conftest.$ac_ext <<EOF
12409 #include <${cf_cv_ncurses_header:-curses.h}>
12410 #undef Autoconf
12411 #ifdef NCURSES_VERSION
12412 Autoconf NCURSES_VERSION
12413 #else
12414 #ifdef __NCURSES_H
12415 Autoconf "old"
12416 #endif
12417 ;
12418 #endif
12419 EOF
12420         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
12421         { (eval echo "$as_me:12421: \"$cf_try\"") >&5
12422   (eval $cf_try) 2>&5
12423   ac_status=$?
12424   echo "$as_me:12424: \$? = $ac_status" >&5
12425   (exit $ac_status); }
12426         if test -f conftest.out ; then
12427                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
12428                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
12429                 rm -f conftest.out
12430         fi
12431
12432 else
12433   cat >conftest.$ac_ext <<_ACEOF
12434 #line 12434 "configure"
12435 #include "confdefs.h"
12436
12437 #include <${cf_cv_ncurses_header:-curses.h}>
12438 #include <stdio.h>
12439 int main(void)
12440 {
12441         FILE *fp = fopen("$cf_tempfile", "w");
12442 #ifdef NCURSES_VERSION
12443 # ifdef NCURSES_VERSION_PATCH
12444         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
12445 # else
12446         fprintf(fp, "%s\n", NCURSES_VERSION);
12447 # endif
12448 #else
12449 # ifdef __NCURSES_H
12450         fprintf(fp, "old\n");
12451 # else
12452         make an error
12453 # endif
12454 #endif
12455         ${cf_cv_main_return:-return}(0);
12456 }
12457 _ACEOF
12458 rm -f conftest$ac_exeext
12459 if { (eval echo "$as_me:12459: \"$ac_link\"") >&5
12460   (eval $ac_link) 2>&5
12461   ac_status=$?
12462   echo "$as_me:12462: \$? = $ac_status" >&5
12463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12464   { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465   (eval $ac_try) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); }; }; then
12469
12470         cf_cv_ncurses_version=`cat $cf_tempfile`
12471 else
12472   echo "$as_me: program exited with status $ac_status" >&5
12473 echo "$as_me: failed program was:" >&5
12474 cat conftest.$ac_ext >&5
12475 fi
12476 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12477 fi
12478         rm -f $cf_tempfile
12479
12480 fi
12481 echo "$as_me:12481: result: $cf_cv_ncurses_version" >&5
12482 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12483 test "$cf_cv_ncurses_version" = no ||
12484 cat >>confdefs.h <<\EOF
12485 #define NCURSES 1
12486 EOF
12487
12488 echo "$as_me:12488: checking if we have identified curses libraries" >&5
12489 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
12490 cat >conftest.$ac_ext <<_ACEOF
12491 #line 12491 "configure"
12492 #include "confdefs.h"
12493 #include <${cf_cv_ncurses_header:-curses.h}>
12494 int
12495 main (void)
12496 {
12497 initscr(); tgoto("?", 0,0)
12498   ;
12499   return 0;
12500 }
12501 _ACEOF
12502 rm -f conftest.$ac_objext conftest$ac_exeext
12503 if { (eval echo "$as_me:12503: \"$ac_link\"") >&5
12504   (eval $ac_link) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit $ac_status); } &&
12508          { ac_try='test -s conftest$ac_exeext'
12509   { (eval echo "$as_me:12509: \"$ac_try\"") >&5
12510   (eval $ac_try) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit $ac_status); }; }; then
12514   cf_result=yes
12515 else
12516   echo "$as_me: failed program was:" >&5
12517 cat conftest.$ac_ext >&5
12518 cf_result=no
12519 fi
12520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12521 echo "$as_me:12521: result: $cf_result" >&5
12522 echo "${ECHO_T}$cf_result" >&6
12523
12524 if test "$cf_result" = no ; then
12525 case $host_os in
12526 (freebsd*)
12527         echo "$as_me:12527: checking for tgoto in -lmytinfo" >&5
12528 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12529 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12530   echo $ECHO_N "(cached) $ECHO_C" >&6
12531 else
12532   ac_check_lib_save_LIBS=$LIBS
12533 LIBS="-lmytinfo  $LIBS"
12534 cat >conftest.$ac_ext <<_ACEOF
12535 #line 12535 "configure"
12536 #include "confdefs.h"
12537
12538 /* Override any gcc2 internal prototype to avoid an error.  */
12539 #ifdef __cplusplus
12540 extern "C"
12541 #endif
12542 /* We use char because int might match the return type of a gcc2
12543    builtin and then its argument prototype would still apply.  */
12544 char tgoto ();
12545 int
12546 main (void)
12547 {
12548 tgoto ();
12549   ;
12550   return 0;
12551 }
12552 _ACEOF
12553 rm -f conftest.$ac_objext conftest$ac_exeext
12554 if { (eval echo "$as_me:12554: \"$ac_link\"") >&5
12555   (eval $ac_link) 2>&5
12556   ac_status=$?
12557   echo "$as_me:12557: \$? = $ac_status" >&5
12558   (exit $ac_status); } &&
12559          { ac_try='test -s conftest$ac_exeext'
12560   { (eval echo "$as_me:12560: \"$ac_try\"") >&5
12561   (eval $ac_try) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit $ac_status); }; }; then
12565   ac_cv_lib_mytinfo_tgoto=yes
12566 else
12567   echo "$as_me: failed program was:" >&5
12568 cat conftest.$ac_ext >&5
12569 ac_cv_lib_mytinfo_tgoto=no
12570 fi
12571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12572 LIBS=$ac_check_lib_save_LIBS
12573 fi
12574 echo "$as_me:12574: result: $ac_cv_lib_mytinfo_tgoto" >&5
12575 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12576 if test $ac_cv_lib_mytinfo_tgoto = yes; then
12577
12578 cf_add_libs="-lmytinfo"
12579 # Filter out duplicates - this happens with badly-designed ".pc" files...
12580 for cf_add_1lib in $LIBS
12581 do
12582         for cf_add_2lib in $cf_add_libs
12583         do
12584                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12585                 then
12586                         cf_add_1lib=
12587                         break
12588                 fi
12589         done
12590         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12591 done
12592 LIBS="$cf_add_libs"
12593
12594 fi
12595
12596         ;;
12597 (hpux10.*)
12598         # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
12599         # next (1998), and xcurses "newer" (2000).  There is no header file for
12600         # Hcurses; the subdirectory curses_colr has the headers (curses.h and
12601         # term.h) for cur_colr
12602         if test "x$cf_cv_screen" = "xcurses_colr"
12603         then
12604                 echo "$as_me:12604: checking for initscr in -lcur_colr" >&5
12605 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
12606 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
12607   echo $ECHO_N "(cached) $ECHO_C" >&6
12608 else
12609   ac_check_lib_save_LIBS=$LIBS
12610 LIBS="-lcur_colr  $LIBS"
12611 cat >conftest.$ac_ext <<_ACEOF
12612 #line 12612 "configure"
12613 #include "confdefs.h"
12614
12615 /* Override any gcc2 internal prototype to avoid an error.  */
12616 #ifdef __cplusplus
12617 extern "C"
12618 #endif
12619 /* We use char because int might match the return type of a gcc2
12620    builtin and then its argument prototype would still apply.  */
12621 char initscr ();
12622 int
12623 main (void)
12624 {
12625 initscr ();
12626   ;
12627   return 0;
12628 }
12629 _ACEOF
12630 rm -f conftest.$ac_objext conftest$ac_exeext
12631 if { (eval echo "$as_me:12631: \"$ac_link\"") >&5
12632   (eval $ac_link) 2>&5
12633   ac_status=$?
12634   echo "$as_me:12634: \$? = $ac_status" >&5
12635   (exit $ac_status); } &&
12636          { ac_try='test -s conftest$ac_exeext'
12637   { (eval echo "$as_me:12637: \"$ac_try\"") >&5
12638   (eval $ac_try) 2>&5
12639   ac_status=$?
12640   echo "$as_me:12640: \$? = $ac_status" >&5
12641   (exit $ac_status); }; }; then
12642   ac_cv_lib_cur_colr_initscr=yes
12643 else
12644   echo "$as_me: failed program was:" >&5
12645 cat conftest.$ac_ext >&5
12646 ac_cv_lib_cur_colr_initscr=no
12647 fi
12648 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12649 LIBS=$ac_check_lib_save_LIBS
12650 fi
12651 echo "$as_me:12651: result: $ac_cv_lib_cur_colr_initscr" >&5
12652 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
12653 if test $ac_cv_lib_cur_colr_initscr = yes; then
12654
12655 cf_add_libs="-lcur_colr"
12656 # Filter out duplicates - this happens with badly-designed ".pc" files...
12657 for cf_add_1lib in $LIBS
12658 do
12659         for cf_add_2lib in $cf_add_libs
12660         do
12661                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12662                 then
12663                         cf_add_1lib=
12664                         break
12665                 fi
12666         done
12667         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12668 done
12669 LIBS="$cf_add_libs"
12670
12671                         ac_cv_func_initscr=yes
12672
12673 else
12674
12675                 echo "$as_me:12675: checking for initscr in -lHcurses" >&5
12676 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
12677 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
12678   echo $ECHO_N "(cached) $ECHO_C" >&6
12679 else
12680   ac_check_lib_save_LIBS=$LIBS
12681 LIBS="-lHcurses  $LIBS"
12682 cat >conftest.$ac_ext <<_ACEOF
12683 #line 12683 "configure"
12684 #include "confdefs.h"
12685
12686 /* Override any gcc2 internal prototype to avoid an error.  */
12687 #ifdef __cplusplus
12688 extern "C"
12689 #endif
12690 /* We use char because int might match the return type of a gcc2
12691    builtin and then its argument prototype would still apply.  */
12692 char initscr ();
12693 int
12694 main (void)
12695 {
12696 initscr ();
12697   ;
12698   return 0;
12699 }
12700 _ACEOF
12701 rm -f conftest.$ac_objext conftest$ac_exeext
12702 if { (eval echo "$as_me:12702: \"$ac_link\"") >&5
12703   (eval $ac_link) 2>&5
12704   ac_status=$?
12705   echo "$as_me:12705: \$? = $ac_status" >&5
12706   (exit $ac_status); } &&
12707          { ac_try='test -s conftest$ac_exeext'
12708   { (eval echo "$as_me:12708: \"$ac_try\"") >&5
12709   (eval $ac_try) 2>&5
12710   ac_status=$?
12711   echo "$as_me:12711: \$? = $ac_status" >&5
12712   (exit $ac_status); }; }; then
12713   ac_cv_lib_Hcurses_initscr=yes
12714 else
12715   echo "$as_me: failed program was:" >&5
12716 cat conftest.$ac_ext >&5
12717 ac_cv_lib_Hcurses_initscr=no
12718 fi
12719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12720 LIBS=$ac_check_lib_save_LIBS
12721 fi
12722 echo "$as_me:12722: result: $ac_cv_lib_Hcurses_initscr" >&5
12723 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
12724 if test $ac_cv_lib_Hcurses_initscr = yes; then
12725
12726                         # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
12727
12728 cf_add_libs="-lHcurses"
12729 # Filter out duplicates - this happens with badly-designed ".pc" files...
12730 for cf_add_1lib in $LIBS
12731 do
12732         for cf_add_2lib in $cf_add_libs
12733         do
12734                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12735                 then
12736                         cf_add_1lib=
12737                         break
12738                 fi
12739         done
12740         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12741 done
12742 LIBS="$cf_add_libs"
12743
12744         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12745         CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
12746
12747                         ac_cv_func_initscr=yes
12748
12749 fi
12750
12751 fi
12752
12753         fi
12754         ;;
12755 (linux*)
12756         case `arch 2>/dev/null` in
12757         (x86_64)
12758                 if test -d /lib64
12759                 then
12760
12761 if test -n "/lib64" ; then
12762         for cf_add_libdir in /lib64
12763         do
12764                 if test $cf_add_libdir = /usr/lib ; then
12765                         :
12766                 elif test -d $cf_add_libdir
12767                 then
12768                         cf_have_libdir=no
12769                         if test -n "$LDFLAGS$LIBS" ; then
12770                                 # a loop is needed to ensure we can add subdirs of existing dirs
12771                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12772                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12773                                                 cf_have_libdir=yes; break
12774                                         fi
12775                                 done
12776                         fi
12777                         if test "$cf_have_libdir" = no ; then
12778                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12779
12780 echo "${as_me:-configure}:12780: testing adding $cf_add_libdir to library-path ..." 1>&5
12781
12782                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12783                         fi
12784                 fi
12785         done
12786 fi
12787
12788                 else
12789
12790 if test -n "/lib" ; then
12791         for cf_add_libdir in /lib
12792         do
12793                 if test $cf_add_libdir = /usr/lib ; then
12794                         :
12795                 elif test -d $cf_add_libdir
12796                 then
12797                         cf_have_libdir=no
12798                         if test -n "$LDFLAGS$LIBS" ; then
12799                                 # a loop is needed to ensure we can add subdirs of existing dirs
12800                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12801                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12802                                                 cf_have_libdir=yes; break
12803                                         fi
12804                                 done
12805                         fi
12806                         if test "$cf_have_libdir" = no ; then
12807                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12808
12809 echo "${as_me:-configure}:12809: testing adding $cf_add_libdir to library-path ..." 1>&5
12810
12811                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12812                         fi
12813                 fi
12814         done
12815 fi
12816
12817                 fi
12818                 ;;
12819         (*)
12820
12821 if test -n "/lib" ; then
12822         for cf_add_libdir in /lib
12823         do
12824                 if test $cf_add_libdir = /usr/lib ; then
12825                         :
12826                 elif test -d $cf_add_libdir
12827                 then
12828                         cf_have_libdir=no
12829                         if test -n "$LDFLAGS$LIBS" ; then
12830                                 # a loop is needed to ensure we can add subdirs of existing dirs
12831                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12832                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12833                                                 cf_have_libdir=yes; break
12834                                         fi
12835                                 done
12836                         fi
12837                         if test "$cf_have_libdir" = no ; then
12838                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12839
12840 echo "${as_me:-configure}:12840: testing adding $cf_add_libdir to library-path ..." 1>&5
12841
12842                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12843                         fi
12844                 fi
12845         done
12846 fi
12847
12848                 ;;
12849         esac
12850         ;;
12851 (sunos3*|sunos4*)
12852         if test "x$cf_cv_screen" = "xcurses_5lib"
12853         then
12854                 if test -d /usr/5lib ; then
12855
12856 if test -n "/usr/5lib" ; then
12857         for cf_add_libdir in /usr/5lib
12858         do
12859                 if test $cf_add_libdir = /usr/lib ; then
12860                         :
12861                 elif test -d $cf_add_libdir
12862                 then
12863                         cf_have_libdir=no
12864                         if test -n "$LDFLAGS$LIBS" ; then
12865                                 # a loop is needed to ensure we can add subdirs of existing dirs
12866                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12867                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12868                                                 cf_have_libdir=yes; break
12869                                         fi
12870                                 done
12871                         fi
12872                         if test "$cf_have_libdir" = no ; then
12873                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12874
12875 echo "${as_me:-configure}:12875: testing adding $cf_add_libdir to library-path ..." 1>&5
12876
12877                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12878                         fi
12879                 fi
12880         done
12881 fi
12882
12883 cf_add_libs="-lcurses -ltermcap"
12884 # Filter out duplicates - this happens with badly-designed ".pc" files...
12885 for cf_add_1lib in $LIBS
12886 do
12887         for cf_add_2lib in $cf_add_libs
12888         do
12889                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12890                 then
12891                         cf_add_1lib=
12892                         break
12893                 fi
12894         done
12895         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12896 done
12897 LIBS="$cf_add_libs"
12898
12899                 fi
12900         fi
12901         ac_cv_func_initscr=yes
12902         ;;
12903 esac
12904
12905 if test ".$ac_cv_func_initscr" != .yes ; then
12906         cf_save_LIBS="$LIBS"
12907
12908         if test ".${cf_cv_ncurses_version:-no}" != .no
12909         then
12910                 cf_check_list="ncurses curses cursesX"
12911         else
12912                 cf_check_list="cursesX curses ncurses"
12913         fi
12914
12915         # Check for library containing tgoto.  Do this before curses library
12916         # because it may be needed to link the test-case for initscr.
12917         if test "x$cf_term_lib" = x
12918         then
12919                 echo "$as_me:12919: checking for tgoto" >&5
12920 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
12921 if test "${ac_cv_func_tgoto+set}" = set; then
12922   echo $ECHO_N "(cached) $ECHO_C" >&6
12923 else
12924   cat >conftest.$ac_ext <<_ACEOF
12925 #line 12925 "configure"
12926 #include "confdefs.h"
12927 /* System header to define __stub macros and hopefully few prototypes,
12928     which can conflict with char tgoto (); below.  */
12929 #include <assert.h>
12930 /* Override any gcc2 internal prototype to avoid an error.  */
12931 #ifdef __cplusplus
12932 extern "C"
12933 #endif
12934 /* We use char because int might match the return type of a gcc2
12935    builtin and then its argument prototype would still apply.  */
12936 char tgoto ();
12937 char (*f) ();
12938
12939 int
12940 main (void)
12941 {
12942 /* The GNU C library defines this for functions which it implements
12943     to always fail with ENOSYS.  Some functions are actually named
12944     something starting with __ and the normal name is an alias.  */
12945 #if defined (__stub_tgoto) || defined (__stub___tgoto)
12946 choke me
12947 #else
12948 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12949 #endif
12950
12951   ;
12952   return 0;
12953 }
12954 _ACEOF
12955 rm -f conftest.$ac_objext conftest$ac_exeext
12956 if { (eval echo "$as_me:12956: \"$ac_link\"") >&5
12957   (eval $ac_link) 2>&5
12958   ac_status=$?
12959   echo "$as_me:12959: \$? = $ac_status" >&5
12960   (exit $ac_status); } &&
12961          { ac_try='test -s conftest$ac_exeext'
12962   { (eval echo "$as_me:12962: \"$ac_try\"") >&5
12963   (eval $ac_try) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit $ac_status); }; }; then
12967   ac_cv_func_tgoto=yes
12968 else
12969   echo "$as_me: failed program was:" >&5
12970 cat conftest.$ac_ext >&5
12971 ac_cv_func_tgoto=no
12972 fi
12973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12974 fi
12975 echo "$as_me:12975: result: $ac_cv_func_tgoto" >&5
12976 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
12977 if test $ac_cv_func_tgoto = yes; then
12978   cf_term_lib=predefined
12979 else
12980
12981                         for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
12982                         do
12983                                 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
12984 echo "$as_me:12984: checking for tgoto in -l$cf_term_lib" >&5
12985 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
12986 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12987   echo $ECHO_N "(cached) $ECHO_C" >&6
12988 else
12989   ac_check_lib_save_LIBS=$LIBS
12990 LIBS="-l$cf_term_lib  $LIBS"
12991 cat >conftest.$ac_ext <<_ACEOF
12992 #line 12992 "configure"
12993 #include "confdefs.h"
12994
12995 /* Override any gcc2 internal prototype to avoid an error.  */
12996 #ifdef __cplusplus
12997 extern "C"
12998 #endif
12999 /* We use char because int might match the return type of a gcc2
13000    builtin and then its argument prototype would still apply.  */
13001 char tgoto ();
13002 int
13003 main (void)
13004 {
13005 tgoto ();
13006   ;
13007   return 0;
13008 }
13009 _ACEOF
13010 rm -f conftest.$ac_objext conftest$ac_exeext
13011 if { (eval echo "$as_me:13011: \"$ac_link\"") >&5
13012   (eval $ac_link) 2>&5
13013   ac_status=$?
13014   echo "$as_me:13014: \$? = $ac_status" >&5
13015   (exit $ac_status); } &&
13016          { ac_try='test -s conftest$ac_exeext'
13017   { (eval echo "$as_me:13017: \"$ac_try\"") >&5
13018   (eval $ac_try) 2>&5
13019   ac_status=$?
13020   echo "$as_me:13020: \$? = $ac_status" >&5
13021   (exit $ac_status); }; }; then
13022   eval "$as_ac_Lib=yes"
13023 else
13024   echo "$as_me: failed program was:" >&5
13025 cat conftest.$ac_ext >&5
13026 eval "$as_ac_Lib=no"
13027 fi
13028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13029 LIBS=$ac_check_lib_save_LIBS
13030 fi
13031 echo "$as_me:13031: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13032 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13033 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13034
13035                                         : ${cf_nculib_root:=$cf_term_lib}
13036                                         break
13037
13038 fi
13039
13040                         done
13041
13042 fi
13043
13044         fi
13045
13046         # Check for library containing initscr
13047         test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
13048         if test "x$cf_curs_lib" = x
13049         then
13050                 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
13051                 do
13052                         LIBS="-l$cf_curs_lib $cf_save_LIBS"
13053                         if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
13054                                 echo "$as_me:13054: checking if we can link with $cf_curs_lib library" >&5
13055 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
13056                                 cat >conftest.$ac_ext <<_ACEOF
13057 #line 13057 "configure"
13058 #include "confdefs.h"
13059 #include <${cf_cv_ncurses_header:-curses.h}>
13060 int
13061 main (void)
13062 {
13063 initscr()
13064   ;
13065   return 0;
13066 }
13067 _ACEOF
13068 rm -f conftest.$ac_objext conftest$ac_exeext
13069 if { (eval echo "$as_me:13069: \"$ac_link\"") >&5
13070   (eval $ac_link) 2>&5
13071   ac_status=$?
13072   echo "$as_me:13072: \$? = $ac_status" >&5
13073   (exit $ac_status); } &&
13074          { ac_try='test -s conftest$ac_exeext'
13075   { (eval echo "$as_me:13075: \"$ac_try\"") >&5
13076   (eval $ac_try) 2>&5
13077   ac_status=$?
13078   echo "$as_me:13078: \$? = $ac_status" >&5
13079   (exit $ac_status); }; }; then
13080   cf_result=yes
13081 else
13082   echo "$as_me: failed program was:" >&5
13083 cat conftest.$ac_ext >&5
13084 cf_result=no
13085 fi
13086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13087                                 echo "$as_me:13087: result: $cf_result" >&5
13088 echo "${ECHO_T}$cf_result" >&6
13089                                 test $cf_result = yes && break
13090                         elif test "$cf_curs_lib" = "$cf_term_lib" ; then
13091                                 cf_result=no
13092                         elif test "$cf_term_lib" != predefined ; then
13093                                 echo "$as_me:13093: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
13094 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
13095                                 cat >conftest.$ac_ext <<_ACEOF
13096 #line 13096 "configure"
13097 #include "confdefs.h"
13098 #include <${cf_cv_ncurses_header:-curses.h}>
13099 int
13100 main (void)
13101 {
13102 initscr(); tgoto((char *)0, 0, 0);
13103   ;
13104   return 0;
13105 }
13106 _ACEOF
13107 rm -f conftest.$ac_objext conftest$ac_exeext
13108 if { (eval echo "$as_me:13108: \"$ac_link\"") >&5
13109   (eval $ac_link) 2>&5
13110   ac_status=$?
13111   echo "$as_me:13111: \$? = $ac_status" >&5
13112   (exit $ac_status); } &&
13113          { ac_try='test -s conftest$ac_exeext'
13114   { (eval echo "$as_me:13114: \"$ac_try\"") >&5
13115   (eval $ac_try) 2>&5
13116   ac_status=$?
13117   echo "$as_me:13117: \$? = $ac_status" >&5
13118   (exit $ac_status); }; }; then
13119   cf_result=no
13120 else
13121   echo "$as_me: failed program was:" >&5
13122 cat conftest.$ac_ext >&5
13123
13124                                         LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
13125                                         cat >conftest.$ac_ext <<_ACEOF
13126 #line 13126 "configure"
13127 #include "confdefs.h"
13128 #include <${cf_cv_ncurses_header:-curses.h}>
13129 int
13130 main (void)
13131 {
13132 initscr()
13133   ;
13134   return 0;
13135 }
13136 _ACEOF
13137 rm -f conftest.$ac_objext conftest$ac_exeext
13138 if { (eval echo "$as_me:13138: \"$ac_link\"") >&5
13139   (eval $ac_link) 2>&5
13140   ac_status=$?
13141   echo "$as_me:13141: \$? = $ac_status" >&5
13142   (exit $ac_status); } &&
13143          { ac_try='test -s conftest$ac_exeext'
13144   { (eval echo "$as_me:13144: \"$ac_try\"") >&5
13145   (eval $ac_try) 2>&5
13146   ac_status=$?
13147   echo "$as_me:13147: \$? = $ac_status" >&5
13148   (exit $ac_status); }; }; then
13149   cf_result=yes
13150 else
13151   echo "$as_me: failed program was:" >&5
13152 cat conftest.$ac_ext >&5
13153 cf_result=error
13154 fi
13155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13156
13157 fi
13158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13159                                 echo "$as_me:13159: result: $cf_result" >&5
13160 echo "${ECHO_T}$cf_result" >&6
13161                                 test $cf_result != error && break
13162                         fi
13163                 done
13164         fi
13165         test $cf_curs_lib = unknown && { { echo "$as_me:13165: error: no curses library found" >&5
13166 echo "$as_me: error: no curses library found" >&2;}
13167    { (exit 1); exit 1; }; }
13168 fi
13169 fi
13170
13171         ;;
13172 (ncursesw*)
13173
13174 echo "$as_me:13174: checking for multibyte character support" >&5
13175 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
13176 if test "${cf_cv_utf8_lib+set}" = set; then
13177   echo $ECHO_N "(cached) $ECHO_C" >&6
13178 else
13179
13180         cf_save_LIBS="$LIBS"
13181         cat >conftest.$ac_ext <<_ACEOF
13182 #line 13182 "configure"
13183 #include "confdefs.h"
13184
13185 #include <stdlib.h>
13186 int
13187 main (void)
13188 {
13189 putwc(0,0);
13190   ;
13191   return 0;
13192 }
13193 _ACEOF
13194 rm -f conftest.$ac_objext conftest$ac_exeext
13195 if { (eval echo "$as_me:13195: \"$ac_link\"") >&5
13196   (eval $ac_link) 2>&5
13197   ac_status=$?
13198   echo "$as_me:13198: \$? = $ac_status" >&5
13199   (exit $ac_status); } &&
13200          { ac_try='test -s conftest$ac_exeext'
13201   { (eval echo "$as_me:13201: \"$ac_try\"") >&5
13202   (eval $ac_try) 2>&5
13203   ac_status=$?
13204   echo "$as_me:13204: \$? = $ac_status" >&5
13205   (exit $ac_status); }; }; then
13206   cf_cv_utf8_lib=yes
13207 else
13208   echo "$as_me: failed program was:" >&5
13209 cat conftest.$ac_ext >&5
13210
13211 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13212 # will be set on completion of the AC_TRY_LINK below.
13213 cf_cv_header_path_utf8=
13214 cf_cv_library_path_utf8=
13215
13216 echo "${as_me:-configure}:13216: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13217
13218 cf_save_LIBS="$LIBS"
13219
13220 cat >conftest.$ac_ext <<_ACEOF
13221 #line 13221 "configure"
13222 #include "confdefs.h"
13223
13224 #include <libutf8.h>
13225 int
13226 main (void)
13227 {
13228 putwc(0,0);
13229   ;
13230   return 0;
13231 }
13232 _ACEOF
13233 rm -f conftest.$ac_objext conftest$ac_exeext
13234 if { (eval echo "$as_me:13234: \"$ac_link\"") >&5
13235   (eval $ac_link) 2>&5
13236   ac_status=$?
13237   echo "$as_me:13237: \$? = $ac_status" >&5
13238   (exit $ac_status); } &&
13239          { ac_try='test -s conftest$ac_exeext'
13240   { (eval echo "$as_me:13240: \"$ac_try\"") >&5
13241   (eval $ac_try) 2>&5
13242   ac_status=$?
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); }; }; then
13245
13246         cf_cv_find_linkage_utf8=yes
13247         cf_cv_header_path_utf8=/usr/include
13248         cf_cv_library_path_utf8=/usr/lib
13249
13250 else
13251   echo "$as_me: failed program was:" >&5
13252 cat conftest.$ac_ext >&5
13253
13254 LIBS="-lutf8  $cf_save_LIBS"
13255
13256 cat >conftest.$ac_ext <<_ACEOF
13257 #line 13257 "configure"
13258 #include "confdefs.h"
13259
13260 #include <libutf8.h>
13261 int
13262 main (void)
13263 {
13264 putwc(0,0);
13265   ;
13266   return 0;
13267 }
13268 _ACEOF
13269 rm -f conftest.$ac_objext conftest$ac_exeext
13270 if { (eval echo "$as_me:13270: \"$ac_link\"") >&5
13271   (eval $ac_link) 2>&5
13272   ac_status=$?
13273   echo "$as_me:13273: \$? = $ac_status" >&5
13274   (exit $ac_status); } &&
13275          { ac_try='test -s conftest$ac_exeext'
13276   { (eval echo "$as_me:13276: \"$ac_try\"") >&5
13277   (eval $ac_try) 2>&5
13278   ac_status=$?
13279   echo "$as_me:13279: \$? = $ac_status" >&5
13280   (exit $ac_status); }; }; then
13281
13282         cf_cv_find_linkage_utf8=yes
13283         cf_cv_header_path_utf8=/usr/include
13284         cf_cv_library_path_utf8=/usr/lib
13285         cf_cv_library_file_utf8="-lutf8"
13286
13287 else
13288   echo "$as_me: failed program was:" >&5
13289 cat conftest.$ac_ext >&5
13290
13291         cf_cv_find_linkage_utf8=no
13292         LIBS="$cf_save_LIBS"
13293
13294         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13295
13296 echo "${as_me:-configure}:13296: testing find linkage for utf8 library ..." 1>&5
13297
13298 echo "${as_me:-configure}:13298: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13299
13300         cf_save_CPPFLAGS="$CPPFLAGS"
13301         cf_test_CPPFLAGS="$CPPFLAGS"
13302
13303 cf_search=
13304
13305 # collect the current set of include-directories from compiler flags
13306 cf_header_path_list=""
13307 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13308         for cf_header_path in $CPPFLAGS $CFLAGS
13309         do
13310                 case $cf_header_path in
13311                 (-I*)
13312                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13313
13314 test "x$cf_header_path" != "xNONE" && \
13315 test -d "$cf_header_path" && \
13316  {
13317         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13318         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
13319         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
13320         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13321         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
13322         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13323 }
13324
13325                         cf_header_path_list="$cf_header_path_list $cf_search"
13326                         ;;
13327                 esac
13328         done
13329 fi
13330
13331 # add the variations for the package we are looking for
13332
13333 cf_search=
13334
13335 test "x$prefix" != "xNONE" && \
13336 test -d "$prefix" && \
13337  {
13338         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13339         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
13340         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
13341         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
13342         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
13343         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13344 }
13345
13346 for cf_subdir_prefix in \
13347         /usr \
13348         /usr/local \
13349         /usr/pkg \
13350         /opt \
13351         /opt/local \
13352         $HOME
13353 do
13354
13355 test "x$cf_subdir_prefix" != "x$prefix" && \
13356 test -d "$cf_subdir_prefix" && \
13357 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
13358         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13359         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
13360         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13361         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13362         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13363         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13364 }
13365
13366 done
13367
13368 test "$includedir" != NONE && \
13369 test "$includedir" != "/usr/include" && \
13370 test -d "$includedir" && {
13371         test -d $includedir &&    cf_search="$cf_search $includedir"
13372         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
13373 }
13374
13375 test "$oldincludedir" != NONE && \
13376 test "$oldincludedir" != "/usr/include" && \
13377 test -d "$oldincludedir" && {
13378         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
13379         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
13380 }
13381
13382 cf_search="$cf_search $cf_header_path_list"
13383
13384         for cf_cv_header_path_utf8 in $cf_search
13385         do
13386                 if test -d $cf_cv_header_path_utf8 ; then
13387                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13388
13389 echo "${as_me:-configure}:13389: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13390
13391                         CPPFLAGS="$cf_save_CPPFLAGS"
13392
13393         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13394         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13395
13396                         cat >conftest.$ac_ext <<_ACEOF
13397 #line 13397 "configure"
13398 #include "confdefs.h"
13399
13400 #include <libutf8.h>
13401 int
13402 main (void)
13403 {
13404 putwc(0,0);
13405   ;
13406   return 0;
13407 }
13408 _ACEOF
13409 rm -f conftest.$ac_objext
13410 if { (eval echo "$as_me:13410: \"$ac_compile\"") >&5
13411   (eval $ac_compile) 2>&5
13412   ac_status=$?
13413   echo "$as_me:13413: \$? = $ac_status" >&5
13414   (exit $ac_status); } &&
13415          { ac_try='test -s conftest.$ac_objext'
13416   { (eval echo "$as_me:13416: \"$ac_try\"") >&5
13417   (eval $ac_try) 2>&5
13418   ac_status=$?
13419   echo "$as_me:13419: \$? = $ac_status" >&5
13420   (exit $ac_status); }; }; then
13421
13422                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13423
13424 echo "${as_me:-configure}:13424: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13425
13426                                 cf_cv_find_linkage_utf8=maybe
13427                                 cf_test_CPPFLAGS="$CPPFLAGS"
13428                                 break
13429 else
13430   echo "$as_me: failed program was:" >&5
13431 cat conftest.$ac_ext >&5
13432
13433                                 CPPFLAGS="$cf_save_CPPFLAGS"
13434
13435 fi
13436 rm -f conftest.$ac_objext conftest.$ac_ext
13437                 fi
13438         done
13439
13440         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13441
13442 echo "${as_me:-configure}:13442: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13443
13444                 cf_save_LIBS="$LIBS"
13445                 cf_save_LDFLAGS="$LDFLAGS"
13446
13447                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13448
13449 cf_search=
13450 cf_library_path_list=""
13451 if test -n "${LDFLAGS}${LIBS}" ; then
13452         for cf_library_path in $LDFLAGS $LIBS
13453         do
13454                 case $cf_library_path in
13455                 (-L*)
13456                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13457
13458 test "x$cf_library_path" != "xNONE" && \
13459 test -d "$cf_library_path" && \
13460  {
13461         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13462         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
13463         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13464         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13465         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13466         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13467 }
13468
13469                         cf_library_path_list="$cf_library_path_list $cf_search"
13470                         ;;
13471                 esac
13472         done
13473 fi
13474
13475 cf_search=
13476
13477 test "x$prefix" != "xNONE" && \
13478 test -d "$prefix" && \
13479  {
13480         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13481         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
13482         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
13483         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13484         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
13485         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13486 }
13487
13488 for cf_subdir_prefix in \
13489         /usr \
13490         /usr/local \
13491         /usr/pkg \
13492         /opt \
13493         /opt/local \
13494         $HOME
13495 do
13496
13497 test "x$cf_subdir_prefix" != "x$prefix" && \
13498 test -d "$cf_subdir_prefix" && \
13499 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
13500         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13501         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13502         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13503         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13504         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13505         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13506 }
13507
13508 done
13509
13510 cf_search="$cf_library_path_list $cf_search"
13511
13512                         for cf_cv_library_path_utf8 in $cf_search
13513                         do
13514                                 if test -d $cf_cv_library_path_utf8 ; then
13515                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13516
13517 echo "${as_me:-configure}:13517: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13518
13519                                         CPPFLAGS="$cf_test_CPPFLAGS"
13520                                         LIBS="-lutf8  $cf_save_LIBS"
13521                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13522                                         cat >conftest.$ac_ext <<_ACEOF
13523 #line 13523 "configure"
13524 #include "confdefs.h"
13525
13526 #include <libutf8.h>
13527 int
13528 main (void)
13529 {
13530 putwc(0,0);
13531   ;
13532   return 0;
13533 }
13534 _ACEOF
13535 rm -f conftest.$ac_objext conftest$ac_exeext
13536 if { (eval echo "$as_me:13536: \"$ac_link\"") >&5
13537   (eval $ac_link) 2>&5
13538   ac_status=$?
13539   echo "$as_me:13539: \$? = $ac_status" >&5
13540   (exit $ac_status); } &&
13541          { ac_try='test -s conftest$ac_exeext'
13542   { (eval echo "$as_me:13542: \"$ac_try\"") >&5
13543   (eval $ac_try) 2>&5
13544   ac_status=$?
13545   echo "$as_me:13545: \$? = $ac_status" >&5
13546   (exit $ac_status); }; }; then
13547
13548                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13549
13550 echo "${as_me:-configure}:13550: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13551
13552                                         cf_cv_find_linkage_utf8=yes
13553                                         cf_cv_library_file_utf8="-lutf8"
13554                                         break
13555 else
13556   echo "$as_me: failed program was:" >&5
13557 cat conftest.$ac_ext >&5
13558
13559                                         CPPFLAGS="$cf_save_CPPFLAGS"
13560                                         LIBS="$cf_save_LIBS"
13561                                         LDFLAGS="$cf_save_LDFLAGS"
13562
13563 fi
13564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13565                                 fi
13566                         done
13567                         CPPFLAGS="$cf_save_CPPFLAGS"
13568                         LDFLAGS="$cf_save_LDFLAGS"
13569                 fi
13570
13571         else
13572                 cf_cv_find_linkage_utf8=no
13573         fi
13574
13575 fi
13576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13577
13578 fi
13579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13580
13581 LIBS="$cf_save_LIBS"
13582
13583 if test "$cf_cv_find_linkage_utf8" = yes ; then
13584 cf_cv_utf8_lib=add-on
13585 else
13586 cf_cv_utf8_lib=no
13587 fi
13588
13589 fi
13590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13591 fi
13592 echo "$as_me:13592: result: $cf_cv_utf8_lib" >&5
13593 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13594
13595 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13596 # ncurses/ncursesw:
13597 if test "$cf_cv_utf8_lib" = "add-on" ; then
13598
13599 cat >>confdefs.h <<\EOF
13600 #define HAVE_LIBUTF8_H 1
13601 EOF
13602
13603 if test -n "$cf_cv_header_path_utf8" ; then
13604   for cf_add_incdir in $cf_cv_header_path_utf8
13605   do
13606         while test $cf_add_incdir != /usr/include
13607         do
13608           if test -d $cf_add_incdir
13609           then
13610                 cf_have_incdir=no
13611                 if test -n "$CFLAGS$CPPFLAGS" ; then
13612                   # a loop is needed to ensure we can add subdirs of existing dirs
13613                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13614                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13615                           cf_have_incdir=yes; break
13616                         fi
13617                   done
13618                 fi
13619
13620                 if test "$cf_have_incdir" = no ; then
13621                   if test "$cf_add_incdir" = /usr/local/include ; then
13622                         if test "$GCC" = yes
13623                         then
13624                           cf_save_CPPFLAGS=$CPPFLAGS
13625
13626         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13627         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13628
13629                           cat >conftest.$ac_ext <<_ACEOF
13630 #line 13630 "configure"
13631 #include "confdefs.h"
13632 #include <stdio.h>
13633 int
13634 main (void)
13635 {
13636 printf("Hello")
13637   ;
13638   return 0;
13639 }
13640 _ACEOF
13641 rm -f conftest.$ac_objext
13642 if { (eval echo "$as_me:13642: \"$ac_compile\"") >&5
13643   (eval $ac_compile) 2>&5
13644   ac_status=$?
13645   echo "$as_me:13645: \$? = $ac_status" >&5
13646   (exit $ac_status); } &&
13647          { ac_try='test -s conftest.$ac_objext'
13648   { (eval echo "$as_me:13648: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit $ac_status); }; }; then
13653   :
13654 else
13655   echo "$as_me: failed program was:" >&5
13656 cat conftest.$ac_ext >&5
13657 cf_have_incdir=yes
13658 fi
13659 rm -f conftest.$ac_objext conftest.$ac_ext
13660                           CPPFLAGS=$cf_save_CPPFLAGS
13661                         fi
13662                   fi
13663                 fi
13664
13665                 if test "$cf_have_incdir" = no ; then
13666                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13667
13668 echo "${as_me:-configure}:13668: testing adding $cf_add_incdir to include-path ..." 1>&5
13669
13670                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13671
13672                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13673                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13674                   cf_add_incdir="$cf_top_incdir"
13675                 else
13676                   break
13677                 fi
13678           else
13679                 break
13680           fi
13681         done
13682   done
13683 fi
13684
13685 if test -n "$cf_cv_library_path_utf8" ; then
13686         for cf_add_libdir in $cf_cv_library_path_utf8
13687         do
13688                 if test $cf_add_libdir = /usr/lib ; then
13689                         :
13690                 elif test -d $cf_add_libdir
13691                 then
13692                         cf_have_libdir=no
13693                         if test -n "$LDFLAGS$LIBS" ; then
13694                                 # a loop is needed to ensure we can add subdirs of existing dirs
13695                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13696                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13697                                                 cf_have_libdir=yes; break
13698                                         fi
13699                                 done
13700                         fi
13701                         if test "$cf_have_libdir" = no ; then
13702                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13703
13704 echo "${as_me:-configure}:13704: testing adding $cf_add_libdir to library-path ..." 1>&5
13705
13706                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13707                         fi
13708                 fi
13709         done
13710 fi
13711
13712 cf_add_libs="$cf_cv_library_file_utf8"
13713 # Filter out duplicates - this happens with badly-designed ".pc" files...
13714 for cf_add_1lib in $LIBS
13715 do
13716         for cf_add_2lib in $cf_add_libs
13717         do
13718                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13719                 then
13720                         cf_add_1lib=
13721                         break
13722                 fi
13723         done
13724         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13725 done
13726 LIBS="$cf_add_libs"
13727
13728 fi
13729
13730 cf_ncuconfig_root=$cf_cv_screen
13731 cf_have_ncuconfig=no
13732
13733 if test "x${PKG_CONFIG:=none}" != xnone; then
13734         echo "$as_me:13734: checking pkg-config for $cf_ncuconfig_root" >&5
13735 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
13736         if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
13737                 echo "$as_me:13737: result: yes" >&5
13738 echo "${ECHO_T}yes" >&6
13739
13740                 echo "$as_me:13740: checking if the $cf_ncuconfig_root package files work" >&5
13741 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
13742                 cf_have_ncuconfig=unknown
13743
13744                 cf_save_CPPFLAGS="$CPPFLAGS"
13745                 cf_save_LIBS="$LIBS"
13746
13747 cf_fix_cppflags=no
13748 cf_new_cflags=
13749 cf_new_cppflags=
13750 cf_new_extra_cppflags=
13751
13752 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
13753 do
13754 case $cf_fix_cppflags in
13755 (no)
13756         case $cf_add_cflags in
13757         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13758                 case $cf_add_cflags in
13759                 (-D*)
13760                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13761
13762                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13763                                 && test -z "${cf_tst_cflags}" \
13764                                 && cf_fix_cppflags=yes
13765
13766                         if test $cf_fix_cppflags = yes ; then
13767
13768         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13769         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13770
13771                                 continue
13772                         elif test "${cf_tst_cflags}" = "\"'" ; then
13773
13774         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13775         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13776
13777                                 continue
13778                         fi
13779                         ;;
13780                 esac
13781                 case "$CPPFLAGS" in
13782                 (*$cf_add_cflags)
13783                         ;;
13784                 (*)
13785                         case $cf_add_cflags in
13786                         (-D*)
13787                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13788
13789 CPPFLAGS=`echo "$CPPFLAGS" | \
13790         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13791                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13792
13793                                 ;;
13794                         esac
13795
13796         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13797         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13798
13799                         ;;
13800                 esac
13801                 ;;
13802         (*)
13803
13804         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13805         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13806
13807                 ;;
13808         esac
13809         ;;
13810 (yes)
13811
13812         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13813         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13814
13815         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13816
13817         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13818                 && test -z "${cf_tst_cflags}" \
13819                 && cf_fix_cppflags=no
13820         ;;
13821 esac
13822 done
13823
13824 if test -n "$cf_new_cflags" ; then
13825
13826         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13827         CFLAGS="${CFLAGS}$cf_new_cflags"
13828
13829 fi
13830
13831 if test -n "$cf_new_cppflags" ; then
13832
13833         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13834         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13835
13836 fi
13837
13838 if test -n "$cf_new_extra_cppflags" ; then
13839
13840         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13841         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13842
13843 fi
13844
13845 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
13846 # Filter out duplicates - this happens with badly-designed ".pc" files...
13847 for cf_add_1lib in $LIBS
13848 do
13849         for cf_add_2lib in $cf_add_libs
13850         do
13851                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13852                 then
13853                         cf_add_1lib=
13854                         break
13855                 fi
13856         done
13857         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13858 done
13859 LIBS="$cf_add_libs"
13860
13861                 cat >conftest.$ac_ext <<_ACEOF
13862 #line 13862 "configure"
13863 #include "confdefs.h"
13864 #include <${cf_cv_ncurses_header:-curses.h}>
13865 int
13866 main (void)
13867 {
13868 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
13869   ;
13870   return 0;
13871 }
13872 _ACEOF
13873 rm -f conftest.$ac_objext conftest$ac_exeext
13874 if { (eval echo "$as_me:13874: \"$ac_link\"") >&5
13875   (eval $ac_link) 2>&5
13876   ac_status=$?
13877   echo "$as_me:13877: \$? = $ac_status" >&5
13878   (exit $ac_status); } &&
13879          { ac_try='test -s conftest$ac_exeext'
13880   { (eval echo "$as_me:13880: \"$ac_try\"") >&5
13881   (eval $ac_try) 2>&5
13882   ac_status=$?
13883   echo "$as_me:13883: \$? = $ac_status" >&5
13884   (exit $ac_status); }; }; then
13885   if test "$cross_compiling" = yes; then
13886   cf_have_ncuconfig=maybe
13887 else
13888   cat >conftest.$ac_ext <<_ACEOF
13889 #line 13889 "configure"
13890 #include "confdefs.h"
13891 #include <${cf_cv_ncurses_header:-curses.h}>
13892                                 int main(void)
13893                                 { char *xx = curses_version(); return (xx == 0); }
13894 _ACEOF
13895 rm -f conftest$ac_exeext
13896 if { (eval echo "$as_me:13896: \"$ac_link\"") >&5
13897   (eval $ac_link) 2>&5
13898   ac_status=$?
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13901   { (eval echo "$as_me:13901: \"$ac_try\"") >&5
13902   (eval $ac_try) 2>&5
13903   ac_status=$?
13904   echo "$as_me:13904: \$? = $ac_status" >&5
13905   (exit $ac_status); }; }; then
13906   cf_have_ncuconfig=yes
13907 else
13908   echo "$as_me: program exited with status $ac_status" >&5
13909 echo "$as_me: failed program was:" >&5
13910 cat conftest.$ac_ext >&5
13911 cf_have_ncuconfig=no
13912 fi
13913 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13914 fi
13915 else
13916   echo "$as_me: failed program was:" >&5
13917 cat conftest.$ac_ext >&5
13918 cf_have_ncuconfig=no
13919 fi
13920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13921                 echo "$as_me:13921: result: $cf_have_ncuconfig" >&5
13922 echo "${ECHO_T}$cf_have_ncuconfig" >&6
13923                 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
13924                 if test "$cf_have_ncuconfig" != "yes"
13925                 then
13926                         CPPFLAGS="$cf_save_CPPFLAGS"
13927                         LIBS="$cf_save_LIBS"
13928                         NCURSES_CONFIG_PKG=none
13929                 else
13930
13931 cat >>confdefs.h <<\EOF
13932 #define NCURSES 1
13933 EOF
13934
13935                         NCURSES_CONFIG_PKG=$cf_ncuconfig_root
13936
13937 echo "$as_me:13937: checking for terminfo header" >&5
13938 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
13939 if test "${cf_cv_term_header+set}" = set; then
13940   echo $ECHO_N "(cached) $ECHO_C" >&6
13941 else
13942
13943 case ${cf_cv_ncurses_header} in
13944 (*/ncurses.h|*/ncursesw.h)
13945         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
13946         ;;
13947 (*)
13948         cf_term_header=term.h
13949         ;;
13950 esac
13951
13952 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
13953 do
13954 cat >conftest.$ac_ext <<_ACEOF
13955 #line 13955 "configure"
13956 #include "confdefs.h"
13957 #include <stdio.h>
13958 #include <${cf_cv_ncurses_header:-curses.h}>
13959 #include <$cf_test>
13960
13961 int
13962 main (void)
13963 {
13964 int x = auto_left_margin
13965   ;
13966   return 0;
13967 }
13968 _ACEOF
13969 rm -f conftest.$ac_objext
13970 if { (eval echo "$as_me:13970: \"$ac_compile\"") >&5
13971   (eval $ac_compile) 2>&5
13972   ac_status=$?
13973   echo "$as_me:13973: \$? = $ac_status" >&5
13974   (exit $ac_status); } &&
13975          { ac_try='test -s conftest.$ac_objext'
13976   { (eval echo "$as_me:13976: \"$ac_try\"") >&5
13977   (eval $ac_try) 2>&5
13978   ac_status=$?
13979   echo "$as_me:13979: \$? = $ac_status" >&5
13980   (exit $ac_status); }; }; then
13981
13982         cf_cv_term_header="$cf_test"
13983 else
13984   echo "$as_me: failed program was:" >&5
13985 cat conftest.$ac_ext >&5
13986
13987         cf_cv_term_header=unknown
13988
13989 fi
13990 rm -f conftest.$ac_objext conftest.$ac_ext
13991         test "$cf_cv_term_header" != unknown && break
13992 done
13993
13994 fi
13995 echo "$as_me:13995: result: $cf_cv_term_header" >&5
13996 echo "${ECHO_T}$cf_cv_term_header" >&6
13997
13998 # Set definitions to allow ifdef'ing to accommodate subdirectories
13999
14000 case $cf_cv_term_header in
14001 (*term.h)
14002
14003 cat >>confdefs.h <<\EOF
14004 #define HAVE_TERM_H 1
14005 EOF
14006
14007         ;;
14008 esac
14009
14010 case $cf_cv_term_header in
14011 (ncurses/term.h)
14012
14013 cat >>confdefs.h <<\EOF
14014 #define HAVE_NCURSES_TERM_H 1
14015 EOF
14016
14017         ;;
14018 (ncursesw/term.h)
14019
14020 cat >>confdefs.h <<\EOF
14021 #define HAVE_NCURSESW_TERM_H 1
14022 EOF
14023
14024         ;;
14025 esac
14026
14027                 fi
14028
14029         else
14030                 echo "$as_me:14030: result: no" >&5
14031 echo "${ECHO_T}no" >&6
14032                 NCURSES_CONFIG_PKG=none
14033         fi
14034 else
14035         NCURSES_CONFIG_PKG=none
14036 fi
14037
14038 if test "x$cf_have_ncuconfig" = "xno"; then
14039         cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
14040
14041 if test -n "$ac_tool_prefix"; then
14042   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14043   do
14044     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14045 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14046 echo "$as_me:14046: checking for $ac_word" >&5
14047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14048 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
14049   echo $ECHO_N "(cached) $ECHO_C" >&6
14050 else
14051   if test -n "$NCURSES_CONFIG"; then
14052   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
14053 else
14054   ac_save_IFS=$IFS; IFS=$ac_path_separator
14055 ac_dummy="$PATH"
14056 for ac_dir in $ac_dummy; do
14057   IFS=$ac_save_IFS
14058   test -z "$ac_dir" && ac_dir=.
14059   $as_executable_p "$ac_dir/$ac_word" || continue
14060 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14061 echo "$as_me:14061: found $ac_dir/$ac_word" >&5
14062 break
14063 done
14064
14065 fi
14066 fi
14067 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
14068 if test -n "$NCURSES_CONFIG"; then
14069   echo "$as_me:14069: result: $NCURSES_CONFIG" >&5
14070 echo "${ECHO_T}$NCURSES_CONFIG" >&6
14071 else
14072   echo "$as_me:14072: result: no" >&5
14073 echo "${ECHO_T}no" >&6
14074 fi
14075
14076     test -n "$NCURSES_CONFIG" && break
14077   done
14078 fi
14079 if test -z "$NCURSES_CONFIG"; then
14080   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
14081   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14082 do
14083   # Extract the first word of "$ac_prog", so it can be a program name with args.
14084 set dummy $ac_prog; ac_word=$2
14085 echo "$as_me:14085: checking for $ac_word" >&5
14086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14087 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
14088   echo $ECHO_N "(cached) $ECHO_C" >&6
14089 else
14090   if test -n "$ac_ct_NCURSES_CONFIG"; then
14091   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
14092 else
14093   ac_save_IFS=$IFS; IFS=$ac_path_separator
14094 ac_dummy="$PATH"
14095 for ac_dir in $ac_dummy; do
14096   IFS=$ac_save_IFS
14097   test -z "$ac_dir" && ac_dir=.
14098   $as_executable_p "$ac_dir/$ac_word" || continue
14099 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
14100 echo "$as_me:14100: found $ac_dir/$ac_word" >&5
14101 break
14102 done
14103
14104 fi
14105 fi
14106 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
14107 if test -n "$ac_ct_NCURSES_CONFIG"; then
14108   echo "$as_me:14108: result: $ac_ct_NCURSES_CONFIG" >&5
14109 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
14110 else
14111   echo "$as_me:14111: result: no" >&5
14112 echo "${ECHO_T}no" >&6
14113 fi
14114
14115   test -n "$ac_ct_NCURSES_CONFIG" && break
14116 done
14117 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
14118
14119   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
14120 fi
14121
14122         if test "$NCURSES_CONFIG" != none ; then
14123
14124 cf_fix_cppflags=no
14125 cf_new_cflags=
14126 cf_new_cppflags=
14127 cf_new_extra_cppflags=
14128
14129 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
14130 do
14131 case $cf_fix_cppflags in
14132 (no)
14133         case $cf_add_cflags in
14134         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14135                 case $cf_add_cflags in
14136                 (-D*)
14137                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14138
14139                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14140                                 && test -z "${cf_tst_cflags}" \
14141                                 && cf_fix_cppflags=yes
14142
14143                         if test $cf_fix_cppflags = yes ; then
14144
14145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14147
14148                                 continue
14149                         elif test "${cf_tst_cflags}" = "\"'" ; then
14150
14151         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14152         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14153
14154                                 continue
14155                         fi
14156                         ;;
14157                 esac
14158                 case "$CPPFLAGS" in
14159                 (*$cf_add_cflags)
14160                         ;;
14161                 (*)
14162                         case $cf_add_cflags in
14163                         (-D*)
14164                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14165
14166 CPPFLAGS=`echo "$CPPFLAGS" | \
14167         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14168                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14169
14170                                 ;;
14171                         esac
14172
14173         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14174         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14175
14176                         ;;
14177                 esac
14178                 ;;
14179         (*)
14180
14181         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14182         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14183
14184                 ;;
14185         esac
14186         ;;
14187 (yes)
14188
14189         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14190         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14191
14192         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14193
14194         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14195                 && test -z "${cf_tst_cflags}" \
14196                 && cf_fix_cppflags=no
14197         ;;
14198 esac
14199 done
14200
14201 if test -n "$cf_new_cflags" ; then
14202
14203         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14204         CFLAGS="${CFLAGS}$cf_new_cflags"
14205
14206 fi
14207
14208 if test -n "$cf_new_cppflags" ; then
14209
14210         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14211         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14212
14213 fi
14214
14215 if test -n "$cf_new_extra_cppflags" ; then
14216
14217         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14218         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14219
14220 fi
14221
14222 cf_add_libs="`$NCURSES_CONFIG --libs`"
14223 # Filter out duplicates - this happens with badly-designed ".pc" files...
14224 for cf_add_1lib in $LIBS
14225 do
14226         for cf_add_2lib in $cf_add_libs
14227         do
14228                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14229                 then
14230                         cf_add_1lib=
14231                         break
14232                 fi
14233         done
14234         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14235 done
14236 LIBS="$cf_add_libs"
14237
14238                 # even with config script, some packages use no-override for curses.h
14239
14240 echo "$as_me:14240: checking if we have identified curses headers" >&5
14241 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
14242 if test "${cf_cv_ncurses_header+set}" = set; then
14243   echo $ECHO_N "(cached) $ECHO_C" >&6
14244 else
14245
14246 cf_cv_ncurses_header=none
14247 for cf_header in \
14248         ncurses.h $cf_cv_screen/ncurses.h \
14249         curses.h $cf_cv_screen/curses.h
14250 do
14251 cat >conftest.$ac_ext <<_ACEOF
14252 #line 14252 "configure"
14253 #include "confdefs.h"
14254 #include <${cf_header}>
14255 int
14256 main (void)
14257 {
14258 initscr(); tgoto("?", 0,0)
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f conftest.$ac_objext
14264 if { (eval echo "$as_me:14264: \"$ac_compile\"") >&5
14265   (eval $ac_compile) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit $ac_status); } &&
14269          { ac_try='test -s conftest.$ac_objext'
14270   { (eval echo "$as_me:14270: \"$ac_try\"") >&5
14271   (eval $ac_try) 2>&5
14272   ac_status=$?
14273   echo "$as_me:14273: \$? = $ac_status" >&5
14274   (exit $ac_status); }; }; then
14275   cf_cv_ncurses_header=$cf_header; break
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
14283 fi
14284 echo "$as_me:14284: result: $cf_cv_ncurses_header" >&5
14285 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
14286
14287 if test "$cf_cv_ncurses_header" = none ; then
14288         { { echo "$as_me:14288: error: No curses header-files found" >&5
14289 echo "$as_me: error: No curses header-files found" >&2;}
14290    { (exit 1); exit 1; }; }
14291 fi
14292
14293 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
14294
14295 for ac_header in $cf_cv_ncurses_header
14296 do
14297 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14298 echo "$as_me:14298: checking for $ac_header" >&5
14299 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14300 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303   cat >conftest.$ac_ext <<_ACEOF
14304 #line 14304 "configure"
14305 #include "confdefs.h"
14306 #include <$ac_header>
14307 _ACEOF
14308 if { (eval echo "$as_me:14308: \"$ac_cpp conftest.$ac_ext\"") >&5
14309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14310   ac_status=$?
14311   egrep -v '^ *\+' conftest.er1 >conftest.err
14312   rm -f conftest.er1
14313   cat conftest.err >&5
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit $ac_status); } >/dev/null; then
14316   if test -s conftest.err; then
14317     ac_cpp_err=$ac_c_preproc_warn_flag
14318   else
14319     ac_cpp_err=
14320   fi
14321 else
14322   ac_cpp_err=yes
14323 fi
14324 if test -z "$ac_cpp_err"; then
14325   eval "$as_ac_Header=yes"
14326 else
14327   echo "$as_me: failed program was:" >&5
14328   cat conftest.$ac_ext >&5
14329   eval "$as_ac_Header=no"
14330 fi
14331 rm -f conftest.err conftest.$ac_ext
14332 fi
14333 echo "$as_me:14333: result: `eval echo '${'$as_ac_Header'}'`" >&5
14334 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14335 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14336   cat >>confdefs.h <<EOF
14337 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14338 EOF
14339
14340 fi
14341 done
14342
14343 cat >>confdefs.h <<\EOF
14344 #define NCURSES 1
14345 EOF
14346
14347 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14348
14349                 cat >>confdefs.h <<EOF
14350 #define $cf_nculib_ROOT 1
14351 EOF
14352
14353                                 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
14354
14355         else
14356
14357 cf_ncuhdr_root=$cf_cv_screen
14358
14359 test -n "$cf_cv_curses_dir" && \
14360 test "$cf_cv_curses_dir" != "no" && { \
14361
14362 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
14363   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
14364   do
14365         while test $cf_add_incdir != /usr/include
14366         do
14367           if test -d $cf_add_incdir
14368           then
14369                 cf_have_incdir=no
14370                 if test -n "$CFLAGS$CPPFLAGS" ; then
14371                   # a loop is needed to ensure we can add subdirs of existing dirs
14372                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14373                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14374                           cf_have_incdir=yes; break
14375                         fi
14376                   done
14377                 fi
14378
14379                 if test "$cf_have_incdir" = no ; then
14380                   if test "$cf_add_incdir" = /usr/local/include ; then
14381                         if test "$GCC" = yes
14382                         then
14383                           cf_save_CPPFLAGS=$CPPFLAGS
14384
14385         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14386         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14387
14388                           cat >conftest.$ac_ext <<_ACEOF
14389 #line 14389 "configure"
14390 #include "confdefs.h"
14391 #include <stdio.h>
14392 int
14393 main (void)
14394 {
14395 printf("Hello")
14396   ;
14397   return 0;
14398 }
14399 _ACEOF
14400 rm -f conftest.$ac_objext
14401 if { (eval echo "$as_me:14401: \"$ac_compile\"") >&5
14402   (eval $ac_compile) 2>&5
14403   ac_status=$?
14404   echo "$as_me:14404: \$? = $ac_status" >&5
14405   (exit $ac_status); } &&
14406          { ac_try='test -s conftest.$ac_objext'
14407   { (eval echo "$as_me:14407: \"$ac_try\"") >&5
14408   (eval $ac_try) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit $ac_status); }; }; then
14412   :
14413 else
14414   echo "$as_me: failed program was:" >&5
14415 cat conftest.$ac_ext >&5
14416 cf_have_incdir=yes
14417 fi
14418 rm -f conftest.$ac_objext conftest.$ac_ext
14419                           CPPFLAGS=$cf_save_CPPFLAGS
14420                         fi
14421                   fi
14422                 fi
14423
14424                 if test "$cf_have_incdir" = no ; then
14425                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14426
14427 echo "${as_me:-configure}:14427: testing adding $cf_add_incdir to include-path ..." 1>&5
14428
14429                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14430
14431                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14432                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14433                   cf_add_incdir="$cf_top_incdir"
14434                 else
14435                   break
14436                 fi
14437           else
14438                 break
14439           fi
14440         done
14441   done
14442 fi
14443
14444 }
14445
14446 echo "$as_me:14446: checking for $cf_ncuhdr_root header in include-path" >&5
14447 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
14448 if test "${cf_cv_ncurses_h+set}" = set; then
14449   echo $ECHO_N "(cached) $ECHO_C" >&6
14450 else
14451
14452         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
14453         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
14454         for cf_header in $cf_header_list
14455         do
14456
14457         cat >conftest.$ac_ext <<_ACEOF
14458 #line 14458 "configure"
14459 #include "confdefs.h"
14460
14461 #include <$cf_header>
14462 int
14463 main (void)
14464 {
14465
14466 #ifdef NCURSES_VERSION
14467
14468 printf("%s\n", NCURSES_VERSION);
14469 #else
14470 #ifdef __NCURSES_H
14471 printf("old\n");
14472 #else
14473         make an error
14474 #endif
14475 #endif
14476
14477   ;
14478   return 0;
14479 }
14480 _ACEOF
14481 rm -f conftest.$ac_objext
14482 if { (eval echo "$as_me:14482: \"$ac_compile\"") >&5
14483   (eval $ac_compile) 2>&5
14484   ac_status=$?
14485   echo "$as_me:14485: \$? = $ac_status" >&5
14486   (exit $ac_status); } &&
14487          { ac_try='test -s conftest.$ac_objext'
14488   { (eval echo "$as_me:14488: \"$ac_try\"") >&5
14489   (eval $ac_try) 2>&5
14490   ac_status=$?
14491   echo "$as_me:14491: \$? = $ac_status" >&5
14492   (exit $ac_status); }; }; then
14493   cf_cv_ncurses_h=$cf_header
14494
14495 else
14496   echo "$as_me: failed program was:" >&5
14497 cat conftest.$ac_ext >&5
14498 cf_cv_ncurses_h=no
14499 fi
14500 rm -f conftest.$ac_objext conftest.$ac_ext
14501
14502                 test "$cf_cv_ncurses_h" != no && break
14503         done
14504
14505 fi
14506 echo "$as_me:14506: result: $cf_cv_ncurses_h" >&5
14507 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
14508
14509 if test "$cf_cv_ncurses_h" != no ; then
14510         cf_cv_ncurses_header=$cf_cv_ncurses_h
14511 else
14512
14513 echo "$as_me:14513: checking for $cf_ncuhdr_root include-path" >&5
14514 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
14515 if test "${cf_cv_ncurses_h2+set}" = set; then
14516   echo $ECHO_N "(cached) $ECHO_C" >&6
14517 else
14518
14519         test -n "$verbose" && echo
14520
14521 cf_search=
14522
14523 # collect the current set of include-directories from compiler flags
14524 cf_header_path_list=""
14525 if test -n "${CFLAGS}${CPPFLAGS}" ; then
14526         for cf_header_path in $CPPFLAGS $CFLAGS
14527         do
14528                 case $cf_header_path in
14529                 (-I*)
14530                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
14531
14532 test "x$cf_header_path" != "xNONE" && \
14533 test -d "$cf_header_path" && \
14534  {
14535         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
14536         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
14537         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
14538         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
14539         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
14540         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"
14541 }
14542
14543                         cf_header_path_list="$cf_header_path_list $cf_search"
14544                         ;;
14545                 esac
14546         done
14547 fi
14548
14549 # add the variations for the package we are looking for
14550
14551 cf_search=
14552
14553 test "x$prefix" != "xNONE" && \
14554 test -d "$prefix" && \
14555  {
14556         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
14557         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
14558         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
14559         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
14560         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
14561         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
14562 }
14563
14564 for cf_subdir_prefix in \
14565         /usr \
14566         /usr/local \
14567         /usr/pkg \
14568         /opt \
14569         /opt/local \
14570         $HOME
14571 do
14572
14573 test "x$cf_subdir_prefix" != "x$prefix" && \
14574 test -d "$cf_subdir_prefix" && \
14575 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
14576         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
14577         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
14578         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
14579         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
14580         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
14581         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
14582 }
14583
14584 done
14585
14586 test "$includedir" != NONE && \
14587 test "$includedir" != "/usr/include" && \
14588 test -d "$includedir" && {
14589         test -d $includedir &&    cf_search="$cf_search $includedir"
14590         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
14591 }
14592
14593 test "$oldincludedir" != NONE && \
14594 test "$oldincludedir" != "/usr/include" && \
14595 test -d "$oldincludedir" && {
14596         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
14597         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
14598 }
14599
14600 cf_search="$cf_search $cf_header_path_list"
14601
14602         test -n "$verbose" && echo search path $cf_search
14603         cf_save2_CPPFLAGS="$CPPFLAGS"
14604         for cf_incdir in $cf_search
14605         do
14606
14607 if test -n "$cf_incdir" ; then
14608   for cf_add_incdir in $cf_incdir
14609   do
14610         while test $cf_add_incdir != /usr/include
14611         do
14612           if test -d $cf_add_incdir
14613           then
14614                 cf_have_incdir=no
14615                 if test -n "$CFLAGS$CPPFLAGS" ; then
14616                   # a loop is needed to ensure we can add subdirs of existing dirs
14617                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14618                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14619                           cf_have_incdir=yes; break
14620                         fi
14621                   done
14622                 fi
14623
14624                 if test "$cf_have_incdir" = no ; then
14625                   if test "$cf_add_incdir" = /usr/local/include ; then
14626                         if test "$GCC" = yes
14627                         then
14628                           cf_save_CPPFLAGS=$CPPFLAGS
14629
14630         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14631         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14632
14633                           cat >conftest.$ac_ext <<_ACEOF
14634 #line 14634 "configure"
14635 #include "confdefs.h"
14636 #include <stdio.h>
14637 int
14638 main (void)
14639 {
14640 printf("Hello")
14641   ;
14642   return 0;
14643 }
14644 _ACEOF
14645 rm -f conftest.$ac_objext
14646 if { (eval echo "$as_me:14646: \"$ac_compile\"") >&5
14647   (eval $ac_compile) 2>&5
14648   ac_status=$?
14649   echo "$as_me:14649: \$? = $ac_status" >&5
14650   (exit $ac_status); } &&
14651          { ac_try='test -s conftest.$ac_objext'
14652   { (eval echo "$as_me:14652: \"$ac_try\"") >&5
14653   (eval $ac_try) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit $ac_status); }; }; then
14657   :
14658 else
14659   echo "$as_me: failed program was:" >&5
14660 cat conftest.$ac_ext >&5
14661 cf_have_incdir=yes
14662 fi
14663 rm -f conftest.$ac_objext conftest.$ac_ext
14664                           CPPFLAGS=$cf_save_CPPFLAGS
14665                         fi
14666                   fi
14667                 fi
14668
14669                 if test "$cf_have_incdir" = no ; then
14670                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14671
14672 echo "${as_me:-configure}:14672: testing adding $cf_add_incdir to include-path ..." 1>&5
14673
14674                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14675
14676                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14677                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14678                   cf_add_incdir="$cf_top_incdir"
14679                 else
14680                   break
14681                 fi
14682           else
14683                 break
14684           fi
14685         done
14686   done
14687 fi
14688
14689                 for cf_header in \
14690                         ncurses.h \
14691                         curses.h
14692                 do
14693
14694         cat >conftest.$ac_ext <<_ACEOF
14695 #line 14695 "configure"
14696 #include "confdefs.h"
14697
14698 #include <$cf_header>
14699 int
14700 main (void)
14701 {
14702
14703 #ifdef NCURSES_VERSION
14704
14705 printf("%s\n", NCURSES_VERSION);
14706 #else
14707 #ifdef __NCURSES_H
14708 printf("old\n");
14709 #else
14710         make an error
14711 #endif
14712 #endif
14713
14714   ;
14715   return 0;
14716 }
14717 _ACEOF
14718 rm -f conftest.$ac_objext
14719 if { (eval echo "$as_me:14719: \"$ac_compile\"") >&5
14720   (eval $ac_compile) 2>&5
14721   ac_status=$?
14722   echo "$as_me:14722: \$? = $ac_status" >&5
14723   (exit $ac_status); } &&
14724          { ac_try='test -s conftest.$ac_objext'
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_ncurses_h2=$cf_header
14731
14732 else
14733   echo "$as_me: failed program was:" >&5
14734 cat conftest.$ac_ext >&5
14735 cf_cv_ncurses_h2=no
14736 fi
14737 rm -f conftest.$ac_objext conftest.$ac_ext
14738
14739                         if test "$cf_cv_ncurses_h2" != no ; then
14740                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
14741                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
14742                                 break
14743                         fi
14744                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
14745                 done
14746                 CPPFLAGS="$cf_save2_CPPFLAGS"
14747                 test "$cf_cv_ncurses_h2" != no && break
14748         done
14749         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:14749: error: not found" >&5
14750 echo "$as_me: error: not found" >&2;}
14751    { (exit 1); exit 1; }; }
14752
14753 fi
14754 echo "$as_me:14754: result: $cf_cv_ncurses_h2" >&5
14755 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
14756
14757         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
14758         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
14759         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
14760                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
14761         fi
14762
14763 if test -n "$cf_1st_incdir" ; then
14764   for cf_add_incdir in $cf_1st_incdir
14765   do
14766         while test $cf_add_incdir != /usr/include
14767         do
14768           if test -d $cf_add_incdir
14769           then
14770                 cf_have_incdir=no
14771                 if test -n "$CFLAGS$CPPFLAGS" ; then
14772                   # a loop is needed to ensure we can add subdirs of existing dirs
14773                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14774                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14775                           cf_have_incdir=yes; break
14776                         fi
14777                   done
14778                 fi
14779
14780                 if test "$cf_have_incdir" = no ; then
14781                   if test "$cf_add_incdir" = /usr/local/include ; then
14782                         if test "$GCC" = yes
14783                         then
14784                           cf_save_CPPFLAGS=$CPPFLAGS
14785
14786         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14787         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14788
14789                           cat >conftest.$ac_ext <<_ACEOF
14790 #line 14790 "configure"
14791 #include "confdefs.h"
14792 #include <stdio.h>
14793 int
14794 main (void)
14795 {
14796 printf("Hello")
14797   ;
14798   return 0;
14799 }
14800 _ACEOF
14801 rm -f conftest.$ac_objext
14802 if { (eval echo "$as_me:14802: \"$ac_compile\"") >&5
14803   (eval $ac_compile) 2>&5
14804   ac_status=$?
14805   echo "$as_me:14805: \$? = $ac_status" >&5
14806   (exit $ac_status); } &&
14807          { ac_try='test -s conftest.$ac_objext'
14808   { (eval echo "$as_me:14808: \"$ac_try\"") >&5
14809   (eval $ac_try) 2>&5
14810   ac_status=$?
14811   echo "$as_me:14811: \$? = $ac_status" >&5
14812   (exit $ac_status); }; }; then
14813   :
14814 else
14815   echo "$as_me: failed program was:" >&5
14816 cat conftest.$ac_ext >&5
14817 cf_have_incdir=yes
14818 fi
14819 rm -f conftest.$ac_objext conftest.$ac_ext
14820                           CPPFLAGS=$cf_save_CPPFLAGS
14821                         fi
14822                   fi
14823                 fi
14824
14825                 if test "$cf_have_incdir" = no ; then
14826                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14827
14828 echo "${as_me:-configure}:14828: testing adding $cf_add_incdir to include-path ..." 1>&5
14829
14830                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14831
14832                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14833                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14834                   cf_add_incdir="$cf_top_incdir"
14835                 else
14836                   break
14837                 fi
14838           else
14839                 break
14840           fi
14841         done
14842   done
14843 fi
14844
14845 fi
14846
14847 # Set definitions to allow ifdef'ing for ncurses.h
14848
14849 case $cf_cv_ncurses_header in
14850 (*ncurses.h)
14851
14852 cat >>confdefs.h <<\EOF
14853 #define HAVE_NCURSES_H 1
14854 EOF
14855
14856         ;;
14857 esac
14858
14859 case $cf_cv_ncurses_header in
14860 (ncurses/curses.h|ncurses/ncurses.h)
14861
14862 cat >>confdefs.h <<\EOF
14863 #define HAVE_NCURSES_NCURSES_H 1
14864 EOF
14865
14866         ;;
14867 (ncursesw/curses.h|ncursesw/ncurses.h)
14868
14869 cat >>confdefs.h <<\EOF
14870 #define HAVE_NCURSESW_NCURSES_H 1
14871 EOF
14872
14873         ;;
14874 esac
14875
14876 echo "$as_me:14876: checking for terminfo header" >&5
14877 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
14878 if test "${cf_cv_term_header+set}" = set; then
14879   echo $ECHO_N "(cached) $ECHO_C" >&6
14880 else
14881
14882 case ${cf_cv_ncurses_header} in
14883 (*/ncurses.h|*/ncursesw.h)
14884         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
14885         ;;
14886 (*)
14887         cf_term_header=term.h
14888         ;;
14889 esac
14890
14891 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
14892 do
14893 cat >conftest.$ac_ext <<_ACEOF
14894 #line 14894 "configure"
14895 #include "confdefs.h"
14896 #include <stdio.h>
14897 #include <${cf_cv_ncurses_header:-curses.h}>
14898 #include <$cf_test>
14899
14900 int
14901 main (void)
14902 {
14903 int x = auto_left_margin
14904   ;
14905   return 0;
14906 }
14907 _ACEOF
14908 rm -f conftest.$ac_objext
14909 if { (eval echo "$as_me:14909: \"$ac_compile\"") >&5
14910   (eval $ac_compile) 2>&5
14911   ac_status=$?
14912   echo "$as_me:14912: \$? = $ac_status" >&5
14913   (exit $ac_status); } &&
14914          { ac_try='test -s conftest.$ac_objext'
14915   { (eval echo "$as_me:14915: \"$ac_try\"") >&5
14916   (eval $ac_try) 2>&5
14917   ac_status=$?
14918   echo "$as_me:14918: \$? = $ac_status" >&5
14919   (exit $ac_status); }; }; then
14920
14921         cf_cv_term_header="$cf_test"
14922 else
14923   echo "$as_me: failed program was:" >&5
14924 cat conftest.$ac_ext >&5
14925
14926         cf_cv_term_header=unknown
14927
14928 fi
14929 rm -f conftest.$ac_objext conftest.$ac_ext
14930         test "$cf_cv_term_header" != unknown && break
14931 done
14932
14933 fi
14934 echo "$as_me:14934: result: $cf_cv_term_header" >&5
14935 echo "${ECHO_T}$cf_cv_term_header" >&6
14936
14937 # Set definitions to allow ifdef'ing to accommodate subdirectories
14938
14939 case $cf_cv_term_header in
14940 (*term.h)
14941
14942 cat >>confdefs.h <<\EOF
14943 #define HAVE_TERM_H 1
14944 EOF
14945
14946         ;;
14947 esac
14948
14949 case $cf_cv_term_header in
14950 (ncurses/term.h)
14951
14952 cat >>confdefs.h <<\EOF
14953 #define HAVE_NCURSES_TERM_H 1
14954 EOF
14955
14956         ;;
14957 (ncursesw/term.h)
14958
14959 cat >>confdefs.h <<\EOF
14960 #define HAVE_NCURSESW_TERM_H 1
14961 EOF
14962
14963         ;;
14964 esac
14965
14966 # some applications need this, but should check for NCURSES_VERSION
14967
14968 cat >>confdefs.h <<\EOF
14969 #define NCURSES 1
14970 EOF
14971
14972 echo "$as_me:14972: checking for ncurses version" >&5
14973 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
14974 if test "${cf_cv_ncurses_version+set}" = set; then
14975   echo $ECHO_N "(cached) $ECHO_C" >&6
14976 else
14977
14978         cf_cv_ncurses_version=no
14979         cf_tempfile=out$$
14980         rm -f $cf_tempfile
14981         if test "$cross_compiling" = yes; then
14982
14983         # This will not work if the preprocessor splits the line after the
14984         # Autoconf token.  The 'unproto' program does that.
14985         cat > conftest.$ac_ext <<EOF
14986 #include <${cf_cv_ncurses_header:-curses.h}>
14987 #undef Autoconf
14988 #ifdef NCURSES_VERSION
14989 Autoconf NCURSES_VERSION
14990 #else
14991 #ifdef __NCURSES_H
14992 Autoconf "old"
14993 #endif
14994 ;
14995 #endif
14996 EOF
14997         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
14998         { (eval echo "$as_me:14998: \"$cf_try\"") >&5
14999   (eval $cf_try) 2>&5
15000   ac_status=$?
15001   echo "$as_me:15001: \$? = $ac_status" >&5
15002   (exit $ac_status); }
15003         if test -f conftest.out ; then
15004                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
15005                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
15006                 rm -f conftest.out
15007         fi
15008
15009 else
15010   cat >conftest.$ac_ext <<_ACEOF
15011 #line 15011 "configure"
15012 #include "confdefs.h"
15013
15014 #include <${cf_cv_ncurses_header:-curses.h}>
15015 #include <stdio.h>
15016 int main(void)
15017 {
15018         FILE *fp = fopen("$cf_tempfile", "w");
15019 #ifdef NCURSES_VERSION
15020 # ifdef NCURSES_VERSION_PATCH
15021         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
15022 # else
15023         fprintf(fp, "%s\n", NCURSES_VERSION);
15024 # endif
15025 #else
15026 # ifdef __NCURSES_H
15027         fprintf(fp, "old\n");
15028 # else
15029         make an error
15030 # endif
15031 #endif
15032         ${cf_cv_main_return:-return}(0);
15033 }
15034 _ACEOF
15035 rm -f conftest$ac_exeext
15036 if { (eval echo "$as_me:15036: \"$ac_link\"") >&5
15037   (eval $ac_link) 2>&5
15038   ac_status=$?
15039   echo "$as_me:15039: \$? = $ac_status" >&5
15040   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15041   { (eval echo "$as_me:15041: \"$ac_try\"") >&5
15042   (eval $ac_try) 2>&5
15043   ac_status=$?
15044   echo "$as_me:15044: \$? = $ac_status" >&5
15045   (exit $ac_status); }; }; then
15046
15047         cf_cv_ncurses_version=`cat $cf_tempfile`
15048 else
15049   echo "$as_me: program exited with status $ac_status" >&5
15050 echo "$as_me: failed program was:" >&5
15051 cat conftest.$ac_ext >&5
15052 fi
15053 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15054 fi
15055         rm -f $cf_tempfile
15056
15057 fi
15058 echo "$as_me:15058: result: $cf_cv_ncurses_version" >&5
15059 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
15060 test "$cf_cv_ncurses_version" = no ||
15061 cat >>confdefs.h <<\EOF
15062 #define NCURSES 1
15063 EOF
15064
15065 cf_nculib_root=$cf_cv_screen
15066         # This works, except for the special case where we find gpm, but
15067         # ncurses is in a nonstandard location via $LIBS, and we really want
15068         # to link gpm.
15069 cf_ncurses_LIBS=""
15070 cf_ncurses_SAVE="$LIBS"
15071 echo "$as_me:15071: checking for Gpm_Open in -lgpm" >&5
15072 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
15073 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
15074   echo $ECHO_N "(cached) $ECHO_C" >&6
15075 else
15076   ac_check_lib_save_LIBS=$LIBS
15077 LIBS="-lgpm  $LIBS"
15078 cat >conftest.$ac_ext <<_ACEOF
15079 #line 15079 "configure"
15080 #include "confdefs.h"
15081
15082 /* Override any gcc2 internal prototype to avoid an error.  */
15083 #ifdef __cplusplus
15084 extern "C"
15085 #endif
15086 /* We use char because int might match the return type of a gcc2
15087    builtin and then its argument prototype would still apply.  */
15088 char Gpm_Open ();
15089 int
15090 main (void)
15091 {
15092 Gpm_Open ();
15093   ;
15094   return 0;
15095 }
15096 _ACEOF
15097 rm -f conftest.$ac_objext conftest$ac_exeext
15098 if { (eval echo "$as_me:15098: \"$ac_link\"") >&5
15099   (eval $ac_link) 2>&5
15100   ac_status=$?
15101   echo "$as_me:15101: \$? = $ac_status" >&5
15102   (exit $ac_status); } &&
15103          { ac_try='test -s conftest$ac_exeext'
15104   { (eval echo "$as_me:15104: \"$ac_try\"") >&5
15105   (eval $ac_try) 2>&5
15106   ac_status=$?
15107   echo "$as_me:15107: \$? = $ac_status" >&5
15108   (exit $ac_status); }; }; then
15109   ac_cv_lib_gpm_Gpm_Open=yes
15110 else
15111   echo "$as_me: failed program was:" >&5
15112 cat conftest.$ac_ext >&5
15113 ac_cv_lib_gpm_Gpm_Open=no
15114 fi
15115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15116 LIBS=$ac_check_lib_save_LIBS
15117 fi
15118 echo "$as_me:15118: result: $ac_cv_lib_gpm_Gpm_Open" >&5
15119 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
15120 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
15121   echo "$as_me:15121: checking for initscr in -lgpm" >&5
15122 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
15123 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
15124   echo $ECHO_N "(cached) $ECHO_C" >&6
15125 else
15126   ac_check_lib_save_LIBS=$LIBS
15127 LIBS="-lgpm  $LIBS"
15128 cat >conftest.$ac_ext <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15131
15132 /* Override any gcc2 internal prototype to avoid an error.  */
15133 #ifdef __cplusplus
15134 extern "C"
15135 #endif
15136 /* We use char because int might match the return type of a gcc2
15137    builtin and then its argument prototype would still apply.  */
15138 char initscr ();
15139 int
15140 main (void)
15141 {
15142 initscr ();
15143   ;
15144   return 0;
15145 }
15146 _ACEOF
15147 rm -f conftest.$ac_objext conftest$ac_exeext
15148 if { (eval echo "$as_me:15148: \"$ac_link\"") >&5
15149   (eval $ac_link) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); } &&
15153          { ac_try='test -s conftest$ac_exeext'
15154   { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155   (eval $ac_try) 2>&5
15156   ac_status=$?
15157   echo "$as_me:15157: \$? = $ac_status" >&5
15158   (exit $ac_status); }; }; then
15159   ac_cv_lib_gpm_initscr=yes
15160 else
15161   echo "$as_me: failed program was:" >&5
15162 cat conftest.$ac_ext >&5
15163 ac_cv_lib_gpm_initscr=no
15164 fi
15165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15166 LIBS=$ac_check_lib_save_LIBS
15167 fi
15168 echo "$as_me:15168: result: $ac_cv_lib_gpm_initscr" >&5
15169 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
15170 if test $ac_cv_lib_gpm_initscr = yes; then
15171   LIBS="$cf_ncurses_SAVE"
15172 else
15173   cf_ncurses_LIBS="-lgpm"
15174 fi
15175
15176 fi
15177
15178 case $host_os in
15179 (freebsd*)
15180         # This is only necessary if you are linking against an obsolete
15181         # version of ncurses (but it should do no harm, since it's static).
15182         if test "$cf_nculib_root" = ncurses ; then
15183                 echo "$as_me:15183: checking for tgoto in -lmytinfo" >&5
15184 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
15185 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
15186   echo $ECHO_N "(cached) $ECHO_C" >&6
15187 else
15188   ac_check_lib_save_LIBS=$LIBS
15189 LIBS="-lmytinfo  $LIBS"
15190 cat >conftest.$ac_ext <<_ACEOF
15191 #line 15191 "configure"
15192 #include "confdefs.h"
15193
15194 /* Override any gcc2 internal prototype to avoid an error.  */
15195 #ifdef __cplusplus
15196 extern "C"
15197 #endif
15198 /* We use char because int might match the return type of a gcc2
15199    builtin and then its argument prototype would still apply.  */
15200 char tgoto ();
15201 int
15202 main (void)
15203 {
15204 tgoto ();
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 rm -f conftest.$ac_objext conftest$ac_exeext
15210 if { (eval echo "$as_me:15210: \"$ac_link\"") >&5
15211   (eval $ac_link) 2>&5
15212   ac_status=$?
15213   echo "$as_me:15213: \$? = $ac_status" >&5
15214   (exit $ac_status); } &&
15215          { ac_try='test -s conftest$ac_exeext'
15216   { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217   (eval $ac_try) 2>&5
15218   ac_status=$?
15219   echo "$as_me:15219: \$? = $ac_status" >&5
15220   (exit $ac_status); }; }; then
15221   ac_cv_lib_mytinfo_tgoto=yes
15222 else
15223   echo "$as_me: failed program was:" >&5
15224 cat conftest.$ac_ext >&5
15225 ac_cv_lib_mytinfo_tgoto=no
15226 fi
15227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15228 LIBS=$ac_check_lib_save_LIBS
15229 fi
15230 echo "$as_me:15230: result: $ac_cv_lib_mytinfo_tgoto" >&5
15231 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
15232 if test $ac_cv_lib_mytinfo_tgoto = yes; then
15233   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
15234 fi
15235
15236         fi
15237         ;;
15238 esac
15239
15240 cf_add_libs="$cf_ncurses_LIBS"
15241 # Filter out duplicates - this happens with badly-designed ".pc" files...
15242 for cf_add_1lib in $LIBS
15243 do
15244         for cf_add_2lib in $cf_add_libs
15245         do
15246                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15247                 then
15248                         cf_add_1lib=
15249                         break
15250                 fi
15251         done
15252         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15253 done
15254 LIBS="$cf_add_libs"
15255
15256 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
15257 then
15258
15259 cf_add_libs="-l$cf_nculib_root"
15260 # Filter out duplicates - this happens with badly-designed ".pc" files...
15261 for cf_add_1lib in $LIBS
15262 do
15263         for cf_add_2lib in $cf_add_libs
15264         do
15265                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15266                 then
15267                         cf_add_1lib=
15268                         break
15269                 fi
15270         done
15271         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15272 done
15273 LIBS="$cf_add_libs"
15274
15275 else
15276
15277         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
15278         cf_libdir=""
15279         echo "$as_me:15279: checking for initscr" >&5
15280 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
15281 if test "${ac_cv_func_initscr+set}" = set; then
15282   echo $ECHO_N "(cached) $ECHO_C" >&6
15283 else
15284   cat >conftest.$ac_ext <<_ACEOF
15285 #line 15285 "configure"
15286 #include "confdefs.h"
15287 /* System header to define __stub macros and hopefully few prototypes,
15288     which can conflict with char initscr (); below.  */
15289 #include <assert.h>
15290 /* Override any gcc2 internal prototype to avoid an error.  */
15291 #ifdef __cplusplus
15292 extern "C"
15293 #endif
15294 /* We use char because int might match the return type of a gcc2
15295    builtin and then its argument prototype would still apply.  */
15296 char initscr ();
15297 char (*f) ();
15298
15299 int
15300 main (void)
15301 {
15302 /* The GNU C library defines this for functions which it implements
15303     to always fail with ENOSYS.  Some functions are actually named
15304     something starting with __ and the normal name is an alias.  */
15305 #if defined (__stub_initscr) || defined (__stub___initscr)
15306 choke me
15307 #else
15308 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15309 #endif
15310
15311   ;
15312   return 0;
15313 }
15314 _ACEOF
15315 rm -f conftest.$ac_objext conftest$ac_exeext
15316 if { (eval echo "$as_me:15316: \"$ac_link\"") >&5
15317   (eval $ac_link) 2>&5
15318   ac_status=$?
15319   echo "$as_me:15319: \$? = $ac_status" >&5
15320   (exit $ac_status); } &&
15321          { ac_try='test -s conftest$ac_exeext'
15322   { (eval echo "$as_me:15322: \"$ac_try\"") >&5
15323   (eval $ac_try) 2>&5
15324   ac_status=$?
15325   echo "$as_me:15325: \$? = $ac_status" >&5
15326   (exit $ac_status); }; }; then
15327   ac_cv_func_initscr=yes
15328 else
15329   echo "$as_me: failed program was:" >&5
15330 cat conftest.$ac_ext >&5
15331 ac_cv_func_initscr=no
15332 fi
15333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15334 fi
15335 echo "$as_me:15335: result: $ac_cv_func_initscr" >&5
15336 echo "${ECHO_T}$ac_cv_func_initscr" >&6
15337 if test $ac_cv_func_initscr = yes; then
15338   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15339 else
15340
15341                 cf_save_LIBS="$LIBS"
15342                 echo "$as_me:15342: checking for initscr in -l$cf_nculib_root" >&5
15343 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
15344                 LIBS="-l$cf_nculib_root $LIBS"
15345                 cat >conftest.$ac_ext <<_ACEOF
15346 #line 15346 "configure"
15347 #include "confdefs.h"
15348 #include <${cf_cv_ncurses_header:-curses.h}>
15349 int
15350 main (void)
15351 {
15352 initscr()
15353   ;
15354   return 0;
15355 }
15356 _ACEOF
15357 rm -f conftest.$ac_objext conftest$ac_exeext
15358 if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
15359   (eval $ac_link) 2>&5
15360   ac_status=$?
15361   echo "$as_me:15361: \$? = $ac_status" >&5
15362   (exit $ac_status); } &&
15363          { ac_try='test -s conftest$ac_exeext'
15364   { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365   (eval $ac_try) 2>&5
15366   ac_status=$?
15367   echo "$as_me:15367: \$? = $ac_status" >&5
15368   (exit $ac_status); }; }; then
15369   echo "$as_me:15369: result: yes" >&5
15370 echo "${ECHO_T}yes" >&6
15371                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15372
15373 else
15374   echo "$as_me: failed program was:" >&5
15375 cat conftest.$ac_ext >&5
15376 echo "$as_me:15376: result: no" >&5
15377 echo "${ECHO_T}no" >&6
15378
15379 cf_search=
15380 cf_library_path_list=""
15381 if test -n "${LDFLAGS}${LIBS}" ; then
15382         for cf_library_path in $LDFLAGS $LIBS
15383         do
15384                 case $cf_library_path in
15385                 (-L*)
15386                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
15387
15388 test "x$cf_library_path" != "xNONE" && \
15389 test -d "$cf_library_path" && \
15390  {
15391         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
15392         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
15393         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
15394         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
15395         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
15396         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"
15397 }
15398
15399                         cf_library_path_list="$cf_library_path_list $cf_search"
15400                         ;;
15401                 esac
15402         done
15403 fi
15404
15405 cf_search=
15406
15407 test "x$prefix" != "xNONE" && \
15408 test -d "$prefix" && \
15409  {
15410         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
15411         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
15412         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
15413         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
15414         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
15415         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
15416 }
15417
15418 for cf_subdir_prefix in \
15419         /usr \
15420         /usr/local \
15421         /usr/pkg \
15422         /opt \
15423         /opt/local \
15424         $HOME
15425 do
15426
15427 test "x$cf_subdir_prefix" != "x$prefix" && \
15428 test -d "$cf_subdir_prefix" && \
15429 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
15430         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
15431         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
15432         test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
15433         test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
15434         test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
15435         test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
15436 }
15437
15438 done
15439
15440 cf_search="$cf_library_path_list $cf_search"
15441
15442                         for cf_libdir in $cf_search
15443                         do
15444                                 echo "$as_me:15444: checking for -l$cf_nculib_root in $cf_libdir" >&5
15445 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
15446                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
15447                                 cat >conftest.$ac_ext <<_ACEOF
15448 #line 15448 "configure"
15449 #include "confdefs.h"
15450 #include <${cf_cv_ncurses_header:-curses.h}>
15451 int
15452 main (void)
15453 {
15454 initscr()
15455   ;
15456   return 0;
15457 }
15458 _ACEOF
15459 rm -f conftest.$ac_objext conftest$ac_exeext
15460 if { (eval echo "$as_me:15460: \"$ac_link\"") >&5
15461   (eval $ac_link) 2>&5
15462   ac_status=$?
15463   echo "$as_me:15463: \$? = $ac_status" >&5
15464   (exit $ac_status); } &&
15465          { ac_try='test -s conftest$ac_exeext'
15466   { (eval echo "$as_me:15466: \"$ac_try\"") >&5
15467   (eval $ac_try) 2>&5
15468   ac_status=$?
15469   echo "$as_me:15469: \$? = $ac_status" >&5
15470   (exit $ac_status); }; }; then
15471   echo "$as_me:15471: result: yes" >&5
15472 echo "${ECHO_T}yes" >&6
15473                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15474                                          break
15475 else
15476   echo "$as_me: failed program was:" >&5
15477 cat conftest.$ac_ext >&5
15478 echo "$as_me:15478: result: no" >&5
15479 echo "${ECHO_T}no" >&6
15480                                          LIBS="$cf_save_LIBS"
15481 fi
15482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15483                         done
15484
15485 fi
15486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15487
15488 fi
15489
15490 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
15491
15492 if test $cf_found_library = no ; then
15493         { { echo "$as_me:15493: error: Cannot link $cf_nculib_root library" >&5
15494 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
15495    { (exit 1); exit 1; }; }
15496 fi
15497
15498 fi
15499
15500 if test -n "$cf_ncurses_LIBS" ; then
15501         echo "$as_me:15501: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
15502 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
15503         cf_ncurses_SAVE="$LIBS"
15504         for p in $cf_ncurses_LIBS ; do
15505                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
15506                 if test "$q" != "$LIBS" ; then
15507                         LIBS="$q"
15508                 fi
15509         done
15510         cat >conftest.$ac_ext <<_ACEOF
15511 #line 15511 "configure"
15512 #include "confdefs.h"
15513 #include <${cf_cv_ncurses_header:-curses.h}>
15514 int
15515 main (void)
15516 {
15517 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
15518   ;
15519   return 0;
15520 }
15521 _ACEOF
15522 rm -f conftest.$ac_objext conftest$ac_exeext
15523 if { (eval echo "$as_me:15523: \"$ac_link\"") >&5
15524   (eval $ac_link) 2>&5
15525   ac_status=$?
15526   echo "$as_me:15526: \$? = $ac_status" >&5
15527   (exit $ac_status); } &&
15528          { ac_try='test -s conftest$ac_exeext'
15529   { (eval echo "$as_me:15529: \"$ac_try\"") >&5
15530   (eval $ac_try) 2>&5
15531   ac_status=$?
15532   echo "$as_me:15532: \$? = $ac_status" >&5
15533   (exit $ac_status); }; }; then
15534   echo "$as_me:15534: result: yes" >&5
15535 echo "${ECHO_T}yes" >&6
15536 else
15537   echo "$as_me: failed program was:" >&5
15538 cat conftest.$ac_ext >&5
15539 echo "$as_me:15539: result: no" >&5
15540 echo "${ECHO_T}no" >&6
15541                  LIBS="$cf_ncurses_SAVE"
15542 fi
15543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15544 fi
15545
15546 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15547
15548 cat >>confdefs.h <<EOF
15549 #define $cf_nculib_ROOT 1
15550 EOF
15551
15552         fi
15553 else
15554         NCURSES_CONFIG=none
15555 fi
15556
15557         ;;
15558 (ncurses*)
15559
15560 cf_ncuconfig_root=$cf_cv_screen
15561 cf_have_ncuconfig=no
15562
15563 if test "x${PKG_CONFIG:=none}" != xnone; then
15564         echo "$as_me:15564: checking pkg-config for $cf_ncuconfig_root" >&5
15565 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
15566         if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
15567                 echo "$as_me:15567: result: yes" >&5
15568 echo "${ECHO_T}yes" >&6
15569
15570                 echo "$as_me:15570: checking if the $cf_ncuconfig_root package files work" >&5
15571 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
15572                 cf_have_ncuconfig=unknown
15573
15574                 cf_save_CPPFLAGS="$CPPFLAGS"
15575                 cf_save_LIBS="$LIBS"
15576
15577 cf_fix_cppflags=no
15578 cf_new_cflags=
15579 cf_new_cppflags=
15580 cf_new_extra_cppflags=
15581
15582 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
15583 do
15584 case $cf_fix_cppflags in
15585 (no)
15586         case $cf_add_cflags in
15587         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15588                 case $cf_add_cflags in
15589                 (-D*)
15590                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15591
15592                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15593                                 && test -z "${cf_tst_cflags}" \
15594                                 && cf_fix_cppflags=yes
15595
15596                         if test $cf_fix_cppflags = yes ; then
15597
15598         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15599         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15600
15601                                 continue
15602                         elif test "${cf_tst_cflags}" = "\"'" ; then
15603
15604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15606
15607                                 continue
15608                         fi
15609                         ;;
15610                 esac
15611                 case "$CPPFLAGS" in
15612                 (*$cf_add_cflags)
15613                         ;;
15614                 (*)
15615                         case $cf_add_cflags in
15616                         (-D*)
15617                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15618
15619 CPPFLAGS=`echo "$CPPFLAGS" | \
15620         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15621                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15622
15623                                 ;;
15624                         esac
15625
15626         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15627         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15628
15629                         ;;
15630                 esac
15631                 ;;
15632         (*)
15633
15634         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15635         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15636
15637                 ;;
15638         esac
15639         ;;
15640 (yes)
15641
15642         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15643         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15644
15645         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15646
15647         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15648                 && test -z "${cf_tst_cflags}" \
15649                 && cf_fix_cppflags=no
15650         ;;
15651 esac
15652 done
15653
15654 if test -n "$cf_new_cflags" ; then
15655
15656         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15657         CFLAGS="${CFLAGS}$cf_new_cflags"
15658
15659 fi
15660
15661 if test -n "$cf_new_cppflags" ; then
15662
15663         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15664         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15665
15666 fi
15667
15668 if test -n "$cf_new_extra_cppflags" ; then
15669
15670         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15671         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15672
15673 fi
15674
15675 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
15676 # Filter out duplicates - this happens with badly-designed ".pc" files...
15677 for cf_add_1lib in $LIBS
15678 do
15679         for cf_add_2lib in $cf_add_libs
15680         do
15681                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15682                 then
15683                         cf_add_1lib=
15684                         break
15685                 fi
15686         done
15687         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15688 done
15689 LIBS="$cf_add_libs"
15690
15691                 cat >conftest.$ac_ext <<_ACEOF
15692 #line 15692 "configure"
15693 #include "confdefs.h"
15694 #include <${cf_cv_ncurses_header:-curses.h}>
15695 int
15696 main (void)
15697 {
15698 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
15699   ;
15700   return 0;
15701 }
15702 _ACEOF
15703 rm -f conftest.$ac_objext conftest$ac_exeext
15704 if { (eval echo "$as_me:15704: \"$ac_link\"") >&5
15705   (eval $ac_link) 2>&5
15706   ac_status=$?
15707   echo "$as_me:15707: \$? = $ac_status" >&5
15708   (exit $ac_status); } &&
15709          { ac_try='test -s conftest$ac_exeext'
15710   { (eval echo "$as_me:15710: \"$ac_try\"") >&5
15711   (eval $ac_try) 2>&5
15712   ac_status=$?
15713   echo "$as_me:15713: \$? = $ac_status" >&5
15714   (exit $ac_status); }; }; then
15715   if test "$cross_compiling" = yes; then
15716   cf_have_ncuconfig=maybe
15717 else
15718   cat >conftest.$ac_ext <<_ACEOF
15719 #line 15719 "configure"
15720 #include "confdefs.h"
15721 #include <${cf_cv_ncurses_header:-curses.h}>
15722                                 int main(void)
15723                                 { char *xx = curses_version(); return (xx == 0); }
15724 _ACEOF
15725 rm -f conftest$ac_exeext
15726 if { (eval echo "$as_me:15726: \"$ac_link\"") >&5
15727   (eval $ac_link) 2>&5
15728   ac_status=$?
15729   echo "$as_me:15729: \$? = $ac_status" >&5
15730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15731   { (eval echo "$as_me:15731: \"$ac_try\"") >&5
15732   (eval $ac_try) 2>&5
15733   ac_status=$?
15734   echo "$as_me:15734: \$? = $ac_status" >&5
15735   (exit $ac_status); }; }; then
15736   cf_have_ncuconfig=yes
15737 else
15738   echo "$as_me: program exited with status $ac_status" >&5
15739 echo "$as_me: failed program was:" >&5
15740 cat conftest.$ac_ext >&5
15741 cf_have_ncuconfig=no
15742 fi
15743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15744 fi
15745 else
15746   echo "$as_me: failed program was:" >&5
15747 cat conftest.$ac_ext >&5
15748 cf_have_ncuconfig=no
15749 fi
15750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15751                 echo "$as_me:15751: result: $cf_have_ncuconfig" >&5
15752 echo "${ECHO_T}$cf_have_ncuconfig" >&6
15753                 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
15754                 if test "$cf_have_ncuconfig" != "yes"
15755                 then
15756                         CPPFLAGS="$cf_save_CPPFLAGS"
15757                         LIBS="$cf_save_LIBS"
15758                         NCURSES_CONFIG_PKG=none
15759                 else
15760
15761 cat >>confdefs.h <<\EOF
15762 #define NCURSES 1
15763 EOF
15764
15765                         NCURSES_CONFIG_PKG=$cf_ncuconfig_root
15766
15767 echo "$as_me:15767: checking for terminfo header" >&5
15768 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
15769 if test "${cf_cv_term_header+set}" = set; then
15770   echo $ECHO_N "(cached) $ECHO_C" >&6
15771 else
15772
15773 case ${cf_cv_ncurses_header} in
15774 (*/ncurses.h|*/ncursesw.h)
15775         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
15776         ;;
15777 (*)
15778         cf_term_header=term.h
15779         ;;
15780 esac
15781
15782 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
15783 do
15784 cat >conftest.$ac_ext <<_ACEOF
15785 #line 15785 "configure"
15786 #include "confdefs.h"
15787 #include <stdio.h>
15788 #include <${cf_cv_ncurses_header:-curses.h}>
15789 #include <$cf_test>
15790
15791 int
15792 main (void)
15793 {
15794 int x = auto_left_margin
15795   ;
15796   return 0;
15797 }
15798 _ACEOF
15799 rm -f conftest.$ac_objext
15800 if { (eval echo "$as_me:15800: \"$ac_compile\"") >&5
15801   (eval $ac_compile) 2>&5
15802   ac_status=$?
15803   echo "$as_me:15803: \$? = $ac_status" >&5
15804   (exit $ac_status); } &&
15805          { ac_try='test -s conftest.$ac_objext'
15806   { (eval echo "$as_me:15806: \"$ac_try\"") >&5
15807   (eval $ac_try) 2>&5
15808   ac_status=$?
15809   echo "$as_me:15809: \$? = $ac_status" >&5
15810   (exit $ac_status); }; }; then
15811
15812         cf_cv_term_header="$cf_test"
15813 else
15814   echo "$as_me: failed program was:" >&5
15815 cat conftest.$ac_ext >&5
15816
15817         cf_cv_term_header=unknown
15818
15819 fi
15820 rm -f conftest.$ac_objext conftest.$ac_ext
15821         test "$cf_cv_term_header" != unknown && break
15822 done
15823
15824 fi
15825 echo "$as_me:15825: result: $cf_cv_term_header" >&5
15826 echo "${ECHO_T}$cf_cv_term_header" >&6
15827
15828 # Set definitions to allow ifdef'ing to accommodate subdirectories
15829
15830 case $cf_cv_term_header in
15831 (*term.h)
15832
15833 cat >>confdefs.h <<\EOF
15834 #define HAVE_TERM_H 1
15835 EOF
15836
15837         ;;
15838 esac
15839
15840 case $cf_cv_term_header in
15841 (ncurses/term.h)
15842
15843 cat >>confdefs.h <<\EOF
15844 #define HAVE_NCURSES_TERM_H 1
15845 EOF
15846
15847         ;;
15848 (ncursesw/term.h)
15849
15850 cat >>confdefs.h <<\EOF
15851 #define HAVE_NCURSESW_TERM_H 1
15852 EOF
15853
15854         ;;
15855 esac
15856
15857                 fi
15858
15859         else
15860                 echo "$as_me:15860: result: no" >&5
15861 echo "${ECHO_T}no" >&6
15862                 NCURSES_CONFIG_PKG=none
15863         fi
15864 else
15865         NCURSES_CONFIG_PKG=none
15866 fi
15867
15868 if test "x$cf_have_ncuconfig" = "xno"; then
15869         cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
15870
15871 if test -n "$ac_tool_prefix"; then
15872   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
15873   do
15874     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15875 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15876 echo "$as_me:15876: checking for $ac_word" >&5
15877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15878 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
15879   echo $ECHO_N "(cached) $ECHO_C" >&6
15880 else
15881   if test -n "$NCURSES_CONFIG"; then
15882   ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
15883 else
15884   ac_save_IFS=$IFS; IFS=$ac_path_separator
15885 ac_dummy="$PATH"
15886 for ac_dir in $ac_dummy; do
15887   IFS=$ac_save_IFS
15888   test -z "$ac_dir" && ac_dir=.
15889   $as_executable_p "$ac_dir/$ac_word" || continue
15890 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15891 echo "$as_me:15891: found $ac_dir/$ac_word" >&5
15892 break
15893 done
15894
15895 fi
15896 fi
15897 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
15898 if test -n "$NCURSES_CONFIG"; then
15899   echo "$as_me:15899: result: $NCURSES_CONFIG" >&5
15900 echo "${ECHO_T}$NCURSES_CONFIG" >&6
15901 else
15902   echo "$as_me:15902: result: no" >&5
15903 echo "${ECHO_T}no" >&6
15904 fi
15905
15906     test -n "$NCURSES_CONFIG" && break
15907   done
15908 fi
15909 if test -z "$NCURSES_CONFIG"; then
15910   ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
15911   for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
15912 do
15913   # Extract the first word of "$ac_prog", so it can be a program name with args.
15914 set dummy $ac_prog; ac_word=$2
15915 echo "$as_me:15915: checking for $ac_word" >&5
15916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15917 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
15918   echo $ECHO_N "(cached) $ECHO_C" >&6
15919 else
15920   if test -n "$ac_ct_NCURSES_CONFIG"; then
15921   ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
15922 else
15923   ac_save_IFS=$IFS; IFS=$ac_path_separator
15924 ac_dummy="$PATH"
15925 for ac_dir in $ac_dummy; do
15926   IFS=$ac_save_IFS
15927   test -z "$ac_dir" && ac_dir=.
15928   $as_executable_p "$ac_dir/$ac_word" || continue
15929 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
15930 echo "$as_me:15930: found $ac_dir/$ac_word" >&5
15931 break
15932 done
15933
15934 fi
15935 fi
15936 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
15937 if test -n "$ac_ct_NCURSES_CONFIG"; then
15938   echo "$as_me:15938: result: $ac_ct_NCURSES_CONFIG" >&5
15939 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
15940 else
15941   echo "$as_me:15941: result: no" >&5
15942 echo "${ECHO_T}no" >&6
15943 fi
15944
15945   test -n "$ac_ct_NCURSES_CONFIG" && break
15946 done
15947 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
15948
15949   NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
15950 fi
15951
15952         if test "$NCURSES_CONFIG" != none ; then
15953
15954 cf_fix_cppflags=no
15955 cf_new_cflags=
15956 cf_new_cppflags=
15957 cf_new_extra_cppflags=
15958
15959 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
15960 do
15961 case $cf_fix_cppflags in
15962 (no)
15963         case $cf_add_cflags in
15964         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15965                 case $cf_add_cflags in
15966                 (-D*)
15967                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15968
15969                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15970                                 && test -z "${cf_tst_cflags}" \
15971                                 && cf_fix_cppflags=yes
15972
15973                         if test $cf_fix_cppflags = yes ; then
15974
15975         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15976         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15977
15978                                 continue
15979                         elif test "${cf_tst_cflags}" = "\"'" ; then
15980
15981         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15982         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15983
15984                                 continue
15985                         fi
15986                         ;;
15987                 esac
15988                 case "$CPPFLAGS" in
15989                 (*$cf_add_cflags)
15990                         ;;
15991                 (*)
15992                         case $cf_add_cflags in
15993                         (-D*)
15994                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15995
15996 CPPFLAGS=`echo "$CPPFLAGS" | \
15997         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15998                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15999
16000                                 ;;
16001                         esac
16002
16003         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16004         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16005
16006                         ;;
16007                 esac
16008                 ;;
16009         (*)
16010
16011         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16012         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16013
16014                 ;;
16015         esac
16016         ;;
16017 (yes)
16018
16019         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16020         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16021
16022         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16023
16024         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16025                 && test -z "${cf_tst_cflags}" \
16026                 && cf_fix_cppflags=no
16027         ;;
16028 esac
16029 done
16030
16031 if test -n "$cf_new_cflags" ; then
16032
16033         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16034         CFLAGS="${CFLAGS}$cf_new_cflags"
16035
16036 fi
16037
16038 if test -n "$cf_new_cppflags" ; then
16039
16040         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16041         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16042
16043 fi
16044
16045 if test -n "$cf_new_extra_cppflags" ; then
16046
16047         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16048         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16049
16050 fi
16051
16052 cf_add_libs="`$NCURSES_CONFIG --libs`"
16053 # Filter out duplicates - this happens with badly-designed ".pc" files...
16054 for cf_add_1lib in $LIBS
16055 do
16056         for cf_add_2lib in $cf_add_libs
16057         do
16058                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16059                 then
16060                         cf_add_1lib=
16061                         break
16062                 fi
16063         done
16064         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16065 done
16066 LIBS="$cf_add_libs"
16067
16068                 # even with config script, some packages use no-override for curses.h
16069
16070 echo "$as_me:16070: checking if we have identified curses headers" >&5
16071 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
16072 if test "${cf_cv_ncurses_header+set}" = set; then
16073   echo $ECHO_N "(cached) $ECHO_C" >&6
16074 else
16075
16076 cf_cv_ncurses_header=none
16077 for cf_header in \
16078         ncurses.h $cf_cv_screen/ncurses.h \
16079         curses.h $cf_cv_screen/curses.h
16080 do
16081 cat >conftest.$ac_ext <<_ACEOF
16082 #line 16082 "configure"
16083 #include "confdefs.h"
16084 #include <${cf_header}>
16085 int
16086 main (void)
16087 {
16088 initscr(); tgoto("?", 0,0)
16089   ;
16090   return 0;
16091 }
16092 _ACEOF
16093 rm -f conftest.$ac_objext
16094 if { (eval echo "$as_me:16094: \"$ac_compile\"") >&5
16095   (eval $ac_compile) 2>&5
16096   ac_status=$?
16097   echo "$as_me:16097: \$? = $ac_status" >&5
16098   (exit $ac_status); } &&
16099          { ac_try='test -s conftest.$ac_objext'
16100   { (eval echo "$as_me:16100: \"$ac_try\"") >&5
16101   (eval $ac_try) 2>&5
16102   ac_status=$?
16103   echo "$as_me:16103: \$? = $ac_status" >&5
16104   (exit $ac_status); }; }; then
16105   cf_cv_ncurses_header=$cf_header; break
16106 else
16107   echo "$as_me: failed program was:" >&5
16108 cat conftest.$ac_ext >&5
16109 fi
16110 rm -f conftest.$ac_objext conftest.$ac_ext
16111 done
16112
16113 fi
16114 echo "$as_me:16114: result: $cf_cv_ncurses_header" >&5
16115 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
16116
16117 if test "$cf_cv_ncurses_header" = none ; then
16118         { { echo "$as_me:16118: error: No curses header-files found" >&5
16119 echo "$as_me: error: No curses header-files found" >&2;}
16120    { (exit 1); exit 1; }; }
16121 fi
16122
16123 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
16124
16125 for ac_header in $cf_cv_ncurses_header
16126 do
16127 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16128 echo "$as_me:16128: checking for $ac_header" >&5
16129 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16130 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16131   echo $ECHO_N "(cached) $ECHO_C" >&6
16132 else
16133   cat >conftest.$ac_ext <<_ACEOF
16134 #line 16134 "configure"
16135 #include "confdefs.h"
16136 #include <$ac_header>
16137 _ACEOF
16138 if { (eval echo "$as_me:16138: \"$ac_cpp conftest.$ac_ext\"") >&5
16139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16140   ac_status=$?
16141   egrep -v '^ *\+' conftest.er1 >conftest.err
16142   rm -f conftest.er1
16143   cat conftest.err >&5
16144   echo "$as_me:16144: \$? = $ac_status" >&5
16145   (exit $ac_status); } >/dev/null; then
16146   if test -s conftest.err; then
16147     ac_cpp_err=$ac_c_preproc_warn_flag
16148   else
16149     ac_cpp_err=
16150   fi
16151 else
16152   ac_cpp_err=yes
16153 fi
16154 if test -z "$ac_cpp_err"; then
16155   eval "$as_ac_Header=yes"
16156 else
16157   echo "$as_me: failed program was:" >&5
16158   cat conftest.$ac_ext >&5
16159   eval "$as_ac_Header=no"
16160 fi
16161 rm -f conftest.err conftest.$ac_ext
16162 fi
16163 echo "$as_me:16163: result: `eval echo '${'$as_ac_Header'}'`" >&5
16164 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16165 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16166   cat >>confdefs.h <<EOF
16167 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16168 EOF
16169
16170 fi
16171 done
16172
16173 cat >>confdefs.h <<\EOF
16174 #define NCURSES 1
16175 EOF
16176
16177 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16178
16179                 cat >>confdefs.h <<EOF
16180 #define $cf_nculib_ROOT 1
16181 EOF
16182
16183                                 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
16184
16185         else
16186
16187 cf_ncuhdr_root=$cf_cv_screen
16188
16189 test -n "$cf_cv_curses_dir" && \
16190 test "$cf_cv_curses_dir" != "no" && { \
16191
16192 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
16193   for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
16194   do
16195         while test $cf_add_incdir != /usr/include
16196         do
16197           if test -d $cf_add_incdir
16198           then
16199                 cf_have_incdir=no
16200                 if test -n "$CFLAGS$CPPFLAGS" ; then
16201                   # a loop is needed to ensure we can add subdirs of existing dirs
16202                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16203                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16204                           cf_have_incdir=yes; break
16205                         fi
16206                   done
16207                 fi
16208
16209                 if test "$cf_have_incdir" = no ; then
16210                   if test "$cf_add_incdir" = /usr/local/include ; then
16211                         if test "$GCC" = yes
16212                         then
16213                           cf_save_CPPFLAGS=$CPPFLAGS
16214
16215         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16216         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16217
16218                           cat >conftest.$ac_ext <<_ACEOF
16219 #line 16219 "configure"
16220 #include "confdefs.h"
16221 #include <stdio.h>
16222 int
16223 main (void)
16224 {
16225 printf("Hello")
16226   ;
16227   return 0;
16228 }
16229 _ACEOF
16230 rm -f conftest.$ac_objext
16231 if { (eval echo "$as_me:16231: \"$ac_compile\"") >&5
16232   (eval $ac_compile) 2>&5
16233   ac_status=$?
16234   echo "$as_me:16234: \$? = $ac_status" >&5
16235   (exit $ac_status); } &&
16236          { ac_try='test -s conftest.$ac_objext'
16237   { (eval echo "$as_me:16237: \"$ac_try\"") >&5
16238   (eval $ac_try) 2>&5
16239   ac_status=$?
16240   echo "$as_me:16240: \$? = $ac_status" >&5
16241   (exit $ac_status); }; }; then
16242   :
16243 else
16244   echo "$as_me: failed program was:" >&5
16245 cat conftest.$ac_ext >&5
16246 cf_have_incdir=yes
16247 fi
16248 rm -f conftest.$ac_objext conftest.$ac_ext
16249                           CPPFLAGS=$cf_save_CPPFLAGS
16250                         fi
16251                   fi
16252                 fi
16253
16254                 if test "$cf_have_incdir" = no ; then
16255                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16256
16257 echo "${as_me:-configure}:16257: testing adding $cf_add_incdir to include-path ..." 1>&5
16258
16259                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16260
16261                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16262                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16263                   cf_add_incdir="$cf_top_incdir"
16264                 else
16265                   break
16266                 fi
16267           else
16268                 break
16269           fi
16270         done
16271   done
16272 fi
16273
16274 }
16275
16276 echo "$as_me:16276: checking for $cf_ncuhdr_root header in include-path" >&5
16277 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
16278 if test "${cf_cv_ncurses_h+set}" = set; then
16279   echo $ECHO_N "(cached) $ECHO_C" >&6
16280 else
16281
16282         cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
16283         ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
16284         for cf_header in $cf_header_list
16285         do
16286
16287         cat >conftest.$ac_ext <<_ACEOF
16288 #line 16288 "configure"
16289 #include "confdefs.h"
16290
16291 #include <$cf_header>
16292 int
16293 main (void)
16294 {
16295
16296 #ifdef NCURSES_VERSION
16297
16298 printf("%s\n", NCURSES_VERSION);
16299 #else
16300 #ifdef __NCURSES_H
16301 printf("old\n");
16302 #else
16303         make an error
16304 #endif
16305 #endif
16306
16307   ;
16308   return 0;
16309 }
16310 _ACEOF
16311 rm -f conftest.$ac_objext
16312 if { (eval echo "$as_me:16312: \"$ac_compile\"") >&5
16313   (eval $ac_compile) 2>&5
16314   ac_status=$?
16315   echo "$as_me:16315: \$? = $ac_status" >&5
16316   (exit $ac_status); } &&
16317          { ac_try='test -s conftest.$ac_objext'
16318   { (eval echo "$as_me:16318: \"$ac_try\"") >&5
16319   (eval $ac_try) 2>&5
16320   ac_status=$?
16321   echo "$as_me:16321: \$? = $ac_status" >&5
16322   (exit $ac_status); }; }; then
16323   cf_cv_ncurses_h=$cf_header
16324
16325 else
16326   echo "$as_me: failed program was:" >&5
16327 cat conftest.$ac_ext >&5
16328 cf_cv_ncurses_h=no
16329 fi
16330 rm -f conftest.$ac_objext conftest.$ac_ext
16331
16332                 test "$cf_cv_ncurses_h" != no && break
16333         done
16334
16335 fi
16336 echo "$as_me:16336: result: $cf_cv_ncurses_h" >&5
16337 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
16338
16339 if test "$cf_cv_ncurses_h" != no ; then
16340         cf_cv_ncurses_header=$cf_cv_ncurses_h
16341 else
16342
16343 echo "$as_me:16343: checking for $cf_ncuhdr_root include-path" >&5
16344 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
16345 if test "${cf_cv_ncurses_h2+set}" = set; then
16346   echo $ECHO_N "(cached) $ECHO_C" >&6
16347 else
16348
16349         test -n "$verbose" && echo
16350
16351 cf_search=
16352
16353 # collect the current set of include-directories from compiler flags
16354 cf_header_path_list=""
16355 if test -n "${CFLAGS}${CPPFLAGS}" ; then
16356         for cf_header_path in $CPPFLAGS $CFLAGS
16357         do
16358                 case $cf_header_path in
16359                 (-I*)
16360                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
16361
16362 test "x$cf_header_path" != "xNONE" && \
16363 test -d "$cf_header_path" && \
16364  {
16365         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
16366         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
16367         test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
16368         test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
16369         test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
16370         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"
16371 }
16372
16373                         cf_header_path_list="$cf_header_path_list $cf_search"
16374                         ;;
16375                 esac
16376         done
16377 fi
16378
16379 # add the variations for the package we are looking for
16380
16381 cf_search=
16382
16383 test "x$prefix" != "xNONE" && \
16384 test -d "$prefix" && \
16385  {
16386         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
16387         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
16388         test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
16389         test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
16390         test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
16391         test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
16392 }
16393
16394 for cf_subdir_prefix in \
16395         /usr \
16396         /usr/local \
16397         /usr/pkg \
16398         /opt \
16399         /opt/local \
16400         $HOME
16401 do
16402
16403 test "x$cf_subdir_prefix" != "x$prefix" && \
16404 test -d "$cf_subdir_prefix" && \
16405 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
16406         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
16407         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
16408         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
16409         test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
16410         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
16411         test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
16412 }
16413
16414 done
16415
16416 test "$includedir" != NONE && \
16417 test "$includedir" != "/usr/include" && \
16418 test -d "$includedir" && {
16419         test -d $includedir &&    cf_search="$cf_search $includedir"
16420         test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
16421 }
16422
16423 test "$oldincludedir" != NONE && \
16424 test "$oldincludedir" != "/usr/include" && \
16425 test -d "$oldincludedir" && {
16426         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
16427         test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
16428 }
16429
16430 cf_search="$cf_search $cf_header_path_list"
16431
16432         test -n "$verbose" && echo search path $cf_search
16433         cf_save2_CPPFLAGS="$CPPFLAGS"
16434         for cf_incdir in $cf_search
16435         do
16436
16437 if test -n "$cf_incdir" ; then
16438   for cf_add_incdir in $cf_incdir
16439   do
16440         while test $cf_add_incdir != /usr/include
16441         do
16442           if test -d $cf_add_incdir
16443           then
16444                 cf_have_incdir=no
16445                 if test -n "$CFLAGS$CPPFLAGS" ; then
16446                   # a loop is needed to ensure we can add subdirs of existing dirs
16447                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16448                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16449                           cf_have_incdir=yes; break
16450                         fi
16451                   done
16452                 fi
16453
16454                 if test "$cf_have_incdir" = no ; then
16455                   if test "$cf_add_incdir" = /usr/local/include ; then
16456                         if test "$GCC" = yes
16457                         then
16458                           cf_save_CPPFLAGS=$CPPFLAGS
16459
16460         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16461         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16462
16463                           cat >conftest.$ac_ext <<_ACEOF
16464 #line 16464 "configure"
16465 #include "confdefs.h"
16466 #include <stdio.h>
16467 int
16468 main (void)
16469 {
16470 printf("Hello")
16471   ;
16472   return 0;
16473 }
16474 _ACEOF
16475 rm -f conftest.$ac_objext
16476 if { (eval echo "$as_me:16476: \"$ac_compile\"") >&5
16477   (eval $ac_compile) 2>&5
16478   ac_status=$?
16479   echo "$as_me:16479: \$? = $ac_status" >&5
16480   (exit $ac_status); } &&
16481          { ac_try='test -s conftest.$ac_objext'
16482   { (eval echo "$as_me:16482: \"$ac_try\"") >&5
16483   (eval $ac_try) 2>&5
16484   ac_status=$?
16485   echo "$as_me:16485: \$? = $ac_status" >&5
16486   (exit $ac_status); }; }; then
16487   :
16488 else
16489   echo "$as_me: failed program was:" >&5
16490 cat conftest.$ac_ext >&5
16491 cf_have_incdir=yes
16492 fi
16493 rm -f conftest.$ac_objext conftest.$ac_ext
16494                           CPPFLAGS=$cf_save_CPPFLAGS
16495                         fi
16496                   fi
16497                 fi
16498
16499                 if test "$cf_have_incdir" = no ; then
16500                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16501
16502 echo "${as_me:-configure}:16502: testing adding $cf_add_incdir to include-path ..." 1>&5
16503
16504                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16505
16506                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16507                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16508                   cf_add_incdir="$cf_top_incdir"
16509                 else
16510                   break
16511                 fi
16512           else
16513                 break
16514           fi
16515         done
16516   done
16517 fi
16518
16519                 for cf_header in \
16520                         ncurses.h \
16521                         curses.h
16522                 do
16523
16524         cat >conftest.$ac_ext <<_ACEOF
16525 #line 16525 "configure"
16526 #include "confdefs.h"
16527
16528 #include <$cf_header>
16529 int
16530 main (void)
16531 {
16532
16533 #ifdef NCURSES_VERSION
16534
16535 printf("%s\n", NCURSES_VERSION);
16536 #else
16537 #ifdef __NCURSES_H
16538 printf("old\n");
16539 #else
16540         make an error
16541 #endif
16542 #endif
16543
16544   ;
16545   return 0;
16546 }
16547 _ACEOF
16548 rm -f conftest.$ac_objext
16549 if { (eval echo "$as_me:16549: \"$ac_compile\"") >&5
16550   (eval $ac_compile) 2>&5
16551   ac_status=$?
16552   echo "$as_me:16552: \$? = $ac_status" >&5
16553   (exit $ac_status); } &&
16554          { ac_try='test -s conftest.$ac_objext'
16555   { (eval echo "$as_me:16555: \"$ac_try\"") >&5
16556   (eval $ac_try) 2>&5
16557   ac_status=$?
16558   echo "$as_me:16558: \$? = $ac_status" >&5
16559   (exit $ac_status); }; }; then
16560   cf_cv_ncurses_h2=$cf_header
16561
16562 else
16563   echo "$as_me: failed program was:" >&5
16564 cat conftest.$ac_ext >&5
16565 cf_cv_ncurses_h2=no
16566 fi
16567 rm -f conftest.$ac_objext conftest.$ac_ext
16568
16569                         if test "$cf_cv_ncurses_h2" != no ; then
16570                                 cf_cv_ncurses_h2=$cf_incdir/$cf_header
16571                                 test -n "$verbose" && echo $ac_n "      ... found $ac_c" 1>&6
16572                                 break
16573                         fi
16574                         test -n "$verbose" && echo "    ... tested $cf_incdir/$cf_header" 1>&6
16575                 done
16576                 CPPFLAGS="$cf_save2_CPPFLAGS"
16577                 test "$cf_cv_ncurses_h2" != no && break
16578         done
16579         test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:16579: error: not found" >&5
16580 echo "$as_me: error: not found" >&2;}
16581    { (exit 1); exit 1; }; }
16582
16583 fi
16584 echo "$as_me:16584: result: $cf_cv_ncurses_h2" >&5
16585 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
16586
16587         cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
16588         cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
16589         if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
16590                 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
16591         fi
16592
16593 if test -n "$cf_1st_incdir" ; then
16594   for cf_add_incdir in $cf_1st_incdir
16595   do
16596         while test $cf_add_incdir != /usr/include
16597         do
16598           if test -d $cf_add_incdir
16599           then
16600                 cf_have_incdir=no
16601                 if test -n "$CFLAGS$CPPFLAGS" ; then
16602                   # a loop is needed to ensure we can add subdirs of existing dirs
16603                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16604                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16605                           cf_have_incdir=yes; break
16606                         fi
16607                   done
16608                 fi
16609
16610                 if test "$cf_have_incdir" = no ; then
16611                   if test "$cf_add_incdir" = /usr/local/include ; then
16612                         if test "$GCC" = yes
16613                         then
16614                           cf_save_CPPFLAGS=$CPPFLAGS
16615
16616         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16617         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16618
16619                           cat >conftest.$ac_ext <<_ACEOF
16620 #line 16620 "configure"
16621 #include "confdefs.h"
16622 #include <stdio.h>
16623 int
16624 main (void)
16625 {
16626 printf("Hello")
16627   ;
16628   return 0;
16629 }
16630 _ACEOF
16631 rm -f conftest.$ac_objext
16632 if { (eval echo "$as_me:16632: \"$ac_compile\"") >&5
16633   (eval $ac_compile) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit $ac_status); } &&
16637          { ac_try='test -s conftest.$ac_objext'
16638   { (eval echo "$as_me:16638: \"$ac_try\"") >&5
16639   (eval $ac_try) 2>&5
16640   ac_status=$?
16641   echo "$as_me:16641: \$? = $ac_status" >&5
16642   (exit $ac_status); }; }; then
16643   :
16644 else
16645   echo "$as_me: failed program was:" >&5
16646 cat conftest.$ac_ext >&5
16647 cf_have_incdir=yes
16648 fi
16649 rm -f conftest.$ac_objext conftest.$ac_ext
16650                           CPPFLAGS=$cf_save_CPPFLAGS
16651                         fi
16652                   fi
16653                 fi
16654
16655                 if test "$cf_have_incdir" = no ; then
16656                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16657
16658 echo "${as_me:-configure}:16658: testing adding $cf_add_incdir to include-path ..." 1>&5
16659
16660                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16661
16662                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16663                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16664                   cf_add_incdir="$cf_top_incdir"
16665                 else
16666                   break
16667                 fi
16668           else
16669                 break
16670           fi
16671         done
16672   done
16673 fi
16674
16675 fi
16676
16677 # Set definitions to allow ifdef'ing for ncurses.h
16678
16679 case $cf_cv_ncurses_header in
16680 (*ncurses.h)
16681
16682 cat >>confdefs.h <<\EOF
16683 #define HAVE_NCURSES_H 1
16684 EOF
16685
16686         ;;
16687 esac
16688
16689 case $cf_cv_ncurses_header in
16690 (ncurses/curses.h|ncurses/ncurses.h)
16691
16692 cat >>confdefs.h <<\EOF
16693 #define HAVE_NCURSES_NCURSES_H 1
16694 EOF
16695
16696         ;;
16697 (ncursesw/curses.h|ncursesw/ncurses.h)
16698
16699 cat >>confdefs.h <<\EOF
16700 #define HAVE_NCURSESW_NCURSES_H 1
16701 EOF
16702
16703         ;;
16704 esac
16705
16706 echo "$as_me:16706: checking for terminfo header" >&5
16707 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
16708 if test "${cf_cv_term_header+set}" = set; then
16709   echo $ECHO_N "(cached) $ECHO_C" >&6
16710 else
16711
16712 case ${cf_cv_ncurses_header} in
16713 (*/ncurses.h|*/ncursesw.h)
16714         cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
16715         ;;
16716 (*)
16717         cf_term_header=term.h
16718         ;;
16719 esac
16720
16721 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
16722 do
16723 cat >conftest.$ac_ext <<_ACEOF
16724 #line 16724 "configure"
16725 #include "confdefs.h"
16726 #include <stdio.h>
16727 #include <${cf_cv_ncurses_header:-curses.h}>
16728 #include <$cf_test>
16729
16730 int
16731 main (void)
16732 {
16733 int x = auto_left_margin
16734   ;
16735   return 0;
16736 }
16737 _ACEOF
16738 rm -f conftest.$ac_objext
16739 if { (eval echo "$as_me:16739: \"$ac_compile\"") >&5
16740   (eval $ac_compile) 2>&5
16741   ac_status=$?
16742   echo "$as_me:16742: \$? = $ac_status" >&5
16743   (exit $ac_status); } &&
16744          { ac_try='test -s conftest.$ac_objext'
16745   { (eval echo "$as_me:16745: \"$ac_try\"") >&5
16746   (eval $ac_try) 2>&5
16747   ac_status=$?
16748   echo "$as_me:16748: \$? = $ac_status" >&5
16749   (exit $ac_status); }; }; then
16750
16751         cf_cv_term_header="$cf_test"
16752 else
16753   echo "$as_me: failed program was:" >&5
16754 cat conftest.$ac_ext >&5
16755
16756         cf_cv_term_header=unknown
16757
16758 fi
16759 rm -f conftest.$ac_objext conftest.$ac_ext
16760         test "$cf_cv_term_header" != unknown && break
16761 done
16762
16763 fi
16764 echo "$as_me:16764: result: $cf_cv_term_header" >&5
16765 echo "${ECHO_T}$cf_cv_term_header" >&6
16766
16767 # Set definitions to allow ifdef'ing to accommodate subdirectories
16768
16769 case $cf_cv_term_header in
16770 (*term.h)
16771
16772 cat >>confdefs.h <<\EOF
16773 #define HAVE_TERM_H 1
16774 EOF
16775
16776         ;;
16777 esac
16778
16779 case $cf_cv_term_header in
16780 (ncurses/term.h)
16781
16782 cat >>confdefs.h <<\EOF
16783 #define HAVE_NCURSES_TERM_H 1
16784 EOF
16785
16786         ;;
16787 (ncursesw/term.h)
16788
16789 cat >>confdefs.h <<\EOF
16790 #define HAVE_NCURSESW_TERM_H 1
16791 EOF
16792
16793         ;;
16794 esac
16795
16796 # some applications need this, but should check for NCURSES_VERSION
16797
16798 cat >>confdefs.h <<\EOF
16799 #define NCURSES 1
16800 EOF
16801
16802 echo "$as_me:16802: checking for ncurses version" >&5
16803 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
16804 if test "${cf_cv_ncurses_version+set}" = set; then
16805   echo $ECHO_N "(cached) $ECHO_C" >&6
16806 else
16807
16808         cf_cv_ncurses_version=no
16809         cf_tempfile=out$$
16810         rm -f $cf_tempfile
16811         if test "$cross_compiling" = yes; then
16812
16813         # This will not work if the preprocessor splits the line after the
16814         # Autoconf token.  The 'unproto' program does that.
16815         cat > conftest.$ac_ext <<EOF
16816 #include <${cf_cv_ncurses_header:-curses.h}>
16817 #undef Autoconf
16818 #ifdef NCURSES_VERSION
16819 Autoconf NCURSES_VERSION
16820 #else
16821 #ifdef __NCURSES_H
16822 Autoconf "old"
16823 #endif
16824 ;
16825 #endif
16826 EOF
16827         cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
16828         { (eval echo "$as_me:16828: \"$cf_try\"") >&5
16829   (eval $cf_try) 2>&5
16830   ac_status=$?
16831   echo "$as_me:16831: \$? = $ac_status" >&5
16832   (exit $ac_status); }
16833         if test -f conftest.out ; then
16834                 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
16835                 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
16836                 rm -f conftest.out
16837         fi
16838
16839 else
16840   cat >conftest.$ac_ext <<_ACEOF
16841 #line 16841 "configure"
16842 #include "confdefs.h"
16843
16844 #include <${cf_cv_ncurses_header:-curses.h}>
16845 #include <stdio.h>
16846 int main(void)
16847 {
16848         FILE *fp = fopen("$cf_tempfile", "w");
16849 #ifdef NCURSES_VERSION
16850 # ifdef NCURSES_VERSION_PATCH
16851         fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
16852 # else
16853         fprintf(fp, "%s\n", NCURSES_VERSION);
16854 # endif
16855 #else
16856 # ifdef __NCURSES_H
16857         fprintf(fp, "old\n");
16858 # else
16859         make an error
16860 # endif
16861 #endif
16862         ${cf_cv_main_return:-return}(0);
16863 }
16864 _ACEOF
16865 rm -f conftest$ac_exeext
16866 if { (eval echo "$as_me:16866: \"$ac_link\"") >&5
16867   (eval $ac_link) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16871   { (eval echo "$as_me:16871: \"$ac_try\"") >&5
16872   (eval $ac_try) 2>&5
16873   ac_status=$?
16874   echo "$as_me:16874: \$? = $ac_status" >&5
16875   (exit $ac_status); }; }; then
16876
16877         cf_cv_ncurses_version=`cat $cf_tempfile`
16878 else
16879   echo "$as_me: program exited with status $ac_status" >&5
16880 echo "$as_me: failed program was:" >&5
16881 cat conftest.$ac_ext >&5
16882 fi
16883 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16884 fi
16885         rm -f $cf_tempfile
16886
16887 fi
16888 echo "$as_me:16888: result: $cf_cv_ncurses_version" >&5
16889 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
16890 test "$cf_cv_ncurses_version" = no ||
16891 cat >>confdefs.h <<\EOF
16892 #define NCURSES 1
16893 EOF
16894
16895 cf_nculib_root=$cf_cv_screen
16896         # This works, except for the special case where we find gpm, but
16897         # ncurses is in a nonstandard location via $LIBS, and we really want
16898         # to link gpm.
16899 cf_ncurses_LIBS=""
16900 cf_ncurses_SAVE="$LIBS"
16901 echo "$as_me:16901: checking for Gpm_Open in -lgpm" >&5
16902 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
16903 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
16904   echo $ECHO_N "(cached) $ECHO_C" >&6
16905 else
16906   ac_check_lib_save_LIBS=$LIBS
16907 LIBS="-lgpm  $LIBS"
16908 cat >conftest.$ac_ext <<_ACEOF
16909 #line 16909 "configure"
16910 #include "confdefs.h"
16911
16912 /* Override any gcc2 internal prototype to avoid an error.  */
16913 #ifdef __cplusplus
16914 extern "C"
16915 #endif
16916 /* We use char because int might match the return type of a gcc2
16917    builtin and then its argument prototype would still apply.  */
16918 char Gpm_Open ();
16919 int
16920 main (void)
16921 {
16922 Gpm_Open ();
16923   ;
16924   return 0;
16925 }
16926 _ACEOF
16927 rm -f conftest.$ac_objext conftest$ac_exeext
16928 if { (eval echo "$as_me:16928: \"$ac_link\"") >&5
16929   (eval $ac_link) 2>&5
16930   ac_status=$?
16931   echo "$as_me:16931: \$? = $ac_status" >&5
16932   (exit $ac_status); } &&
16933          { ac_try='test -s conftest$ac_exeext'
16934   { (eval echo "$as_me:16934: \"$ac_try\"") >&5
16935   (eval $ac_try) 2>&5
16936   ac_status=$?
16937   echo "$as_me:16937: \$? = $ac_status" >&5
16938   (exit $ac_status); }; }; then
16939   ac_cv_lib_gpm_Gpm_Open=yes
16940 else
16941   echo "$as_me: failed program was:" >&5
16942 cat conftest.$ac_ext >&5
16943 ac_cv_lib_gpm_Gpm_Open=no
16944 fi
16945 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16946 LIBS=$ac_check_lib_save_LIBS
16947 fi
16948 echo "$as_me:16948: result: $ac_cv_lib_gpm_Gpm_Open" >&5
16949 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
16950 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
16951   echo "$as_me:16951: checking for initscr in -lgpm" >&5
16952 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
16953 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
16954   echo $ECHO_N "(cached) $ECHO_C" >&6
16955 else
16956   ac_check_lib_save_LIBS=$LIBS
16957 LIBS="-lgpm  $LIBS"
16958 cat >conftest.$ac_ext <<_ACEOF
16959 #line 16959 "configure"
16960 #include "confdefs.h"
16961
16962 /* Override any gcc2 internal prototype to avoid an error.  */
16963 #ifdef __cplusplus
16964 extern "C"
16965 #endif
16966 /* We use char because int might match the return type of a gcc2
16967    builtin and then its argument prototype would still apply.  */
16968 char initscr ();
16969 int
16970 main (void)
16971 {
16972 initscr ();
16973   ;
16974   return 0;
16975 }
16976 _ACEOF
16977 rm -f conftest.$ac_objext conftest$ac_exeext
16978 if { (eval echo "$as_me:16978: \"$ac_link\"") >&5
16979   (eval $ac_link) 2>&5
16980   ac_status=$?
16981   echo "$as_me:16981: \$? = $ac_status" >&5
16982   (exit $ac_status); } &&
16983          { ac_try='test -s conftest$ac_exeext'
16984   { (eval echo "$as_me:16984: \"$ac_try\"") >&5
16985   (eval $ac_try) 2>&5
16986   ac_status=$?
16987   echo "$as_me:16987: \$? = $ac_status" >&5
16988   (exit $ac_status); }; }; then
16989   ac_cv_lib_gpm_initscr=yes
16990 else
16991   echo "$as_me: failed program was:" >&5
16992 cat conftest.$ac_ext >&5
16993 ac_cv_lib_gpm_initscr=no
16994 fi
16995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16996 LIBS=$ac_check_lib_save_LIBS
16997 fi
16998 echo "$as_me:16998: result: $ac_cv_lib_gpm_initscr" >&5
16999 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
17000 if test $ac_cv_lib_gpm_initscr = yes; then
17001   LIBS="$cf_ncurses_SAVE"
17002 else
17003   cf_ncurses_LIBS="-lgpm"
17004 fi
17005
17006 fi
17007
17008 case $host_os in
17009 (freebsd*)
17010         # This is only necessary if you are linking against an obsolete
17011         # version of ncurses (but it should do no harm, since it's static).
17012         if test "$cf_nculib_root" = ncurses ; then
17013                 echo "$as_me:17013: checking for tgoto in -lmytinfo" >&5
17014 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
17015 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
17016   echo $ECHO_N "(cached) $ECHO_C" >&6
17017 else
17018   ac_check_lib_save_LIBS=$LIBS
17019 LIBS="-lmytinfo  $LIBS"
17020 cat >conftest.$ac_ext <<_ACEOF
17021 #line 17021 "configure"
17022 #include "confdefs.h"
17023
17024 /* Override any gcc2 internal prototype to avoid an error.  */
17025 #ifdef __cplusplus
17026 extern "C"
17027 #endif
17028 /* We use char because int might match the return type of a gcc2
17029    builtin and then its argument prototype would still apply.  */
17030 char tgoto ();
17031 int
17032 main (void)
17033 {
17034 tgoto ();
17035   ;
17036   return 0;
17037 }
17038 _ACEOF
17039 rm -f conftest.$ac_objext conftest$ac_exeext
17040 if { (eval echo "$as_me:17040: \"$ac_link\"") >&5
17041   (eval $ac_link) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit $ac_status); } &&
17045          { ac_try='test -s conftest$ac_exeext'
17046   { (eval echo "$as_me:17046: \"$ac_try\"") >&5
17047   (eval $ac_try) 2>&5
17048   ac_status=$?
17049   echo "$as_me:17049: \$? = $ac_status" >&5
17050   (exit $ac_status); }; }; then
17051   ac_cv_lib_mytinfo_tgoto=yes
17052 else
17053   echo "$as_me: failed program was:" >&5
17054 cat conftest.$ac_ext >&5
17055 ac_cv_lib_mytinfo_tgoto=no
17056 fi
17057 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17058 LIBS=$ac_check_lib_save_LIBS
17059 fi
17060 echo "$as_me:17060: result: $ac_cv_lib_mytinfo_tgoto" >&5
17061 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
17062 if test $ac_cv_lib_mytinfo_tgoto = yes; then
17063   cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
17064 fi
17065
17066         fi
17067         ;;
17068 esac
17069
17070 cf_add_libs="$cf_ncurses_LIBS"
17071 # Filter out duplicates - this happens with badly-designed ".pc" files...
17072 for cf_add_1lib in $LIBS
17073 do
17074         for cf_add_2lib in $cf_add_libs
17075         do
17076                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17077                 then
17078                         cf_add_1lib=
17079                         break
17080                 fi
17081         done
17082         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17083 done
17084 LIBS="$cf_add_libs"
17085
17086 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
17087 then
17088
17089 cf_add_libs="-l$cf_nculib_root"
17090 # Filter out duplicates - this happens with badly-designed ".pc" files...
17091 for cf_add_1lib in $LIBS
17092 do
17093         for cf_add_2lib in $cf_add_libs
17094         do
17095                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17096                 then
17097                         cf_add_1lib=
17098                         break
17099                 fi
17100         done
17101         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17102 done
17103 LIBS="$cf_add_libs"
17104
17105 else
17106
17107         eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
17108         cf_libdir=""
17109         echo "$as_me:17109: checking for initscr" >&5
17110 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
17111 if test "${ac_cv_func_initscr+set}" = set; then
17112   echo $ECHO_N "(cached) $ECHO_C" >&6
17113 else
17114   cat >conftest.$ac_ext <<_ACEOF
17115 #line 17115 "configure"
17116 #include "confdefs.h"
17117 /* System header to define __stub macros and hopefully few prototypes,
17118     which can conflict with char initscr (); below.  */
17119 #include <assert.h>
17120 /* Override any gcc2 internal prototype to avoid an error.  */
17121 #ifdef __cplusplus
17122 extern "C"
17123 #endif
17124 /* We use char because int might match the return type of a gcc2
17125    builtin and then its argument prototype would still apply.  */
17126 char initscr ();
17127 char (*f) ();
17128
17129 int
17130 main (void)
17131 {
17132 /* The GNU C library defines this for functions which it implements
17133     to always fail with ENOSYS.  Some functions are actually named
17134     something starting with __ and the normal name is an alias.  */
17135 #if defined (__stub_initscr) || defined (__stub___initscr)
17136 choke me
17137 #else
17138 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17139 #endif
17140
17141   ;
17142   return 0;
17143 }
17144 _ACEOF
17145 rm -f conftest.$ac_objext conftest$ac_exeext
17146 if { (eval echo "$as_me:17146: \"$ac_link\"") >&5
17147   (eval $ac_link) 2>&5
17148   ac_status=$?
17149   echo "$as_me:17149: \$? = $ac_status" >&5
17150   (exit $ac_status); } &&
17151          { ac_try='test -s conftest$ac_exeext'
17152   { (eval echo "$as_me:17152: \"$ac_try\"") >&5
17153   (eval $ac_try) 2>&5
17154   ac_status=$?
17155   echo "$as_me:17155: \$? = $ac_status" >&5
17156   (exit $ac_status); }; }; then
17157   ac_cv_func_initscr=yes
17158 else
17159   echo "$as_me: failed program was:" >&5
17160 cat conftest.$ac_ext >&5
17161 ac_cv_func_initscr=no
17162 fi
17163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17164 fi
17165 echo "$as_me:17165: result: $ac_cv_func_initscr" >&5
17166 echo "${ECHO_T}$ac_cv_func_initscr" >&6
17167 if test $ac_cv_func_initscr = yes; then
17168   eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
17169 else
17170
17171                 cf_save_LIBS="$LIBS"
17172                 echo "$as_me:17172: checking for initscr in -l$cf_nculib_root" >&5
17173 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
17174                 LIBS="-l$cf_nculib_root $LIBS"
17175                 cat >conftest.$ac_ext <<_ACEOF
17176 #line 17176 "configure"
17177 #include "confdefs.h"
17178 #include <${cf_cv_ncurses_header:-curses.h}>
17179 int
17180 main (void)
17181 {
17182 initscr()
17183   ;
17184   return 0;
17185 }
17186 _ACEOF
17187 rm -f conftest.$ac_objext conftest$ac_exeext
17188 if { (eval echo "$as_me:17188: \"$ac_link\"") >&5
17189   (eval $ac_link) 2>&5
17190   ac_status=$?
17191   echo "$as_me:17191: \$? = $ac_status" >&5
17192   (exit $ac_status); } &&
17193          { ac_try='test -s conftest$ac_exeext'
17194   { (eval echo "$as_me:17194: \"$ac_try\"") >&5
17195   (eval $ac_try) 2>&5
17196   ac_status=$?
17197   echo "$as_me:17197: \$? = $ac_status" >&5
17198   (exit $ac_status); }; }; then
17199   echo "$as_me:17199: result: yes" >&5
17200 echo "${ECHO_T}yes" >&6
17201                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
17202
17203 else
17204   echo "$as_me: failed program was:" >&5
17205 cat conftest.$ac_ext >&5
17206 echo "$as_me:17206: result: no" >&5
17207 echo "${ECHO_T}no" >&6
17208
17209 cf_search=
17210 cf_library_path_list=""
17211 if test -n "${LDFLAGS}${LIBS}" ; then
17212         for cf_library_path in $LDFLAGS $LIBS
17213         do
17214                 case $cf_library_path in
17215                 (-L*)
17216                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
17217
17218 test "x$cf_library_path" != "xNONE" && \
17219 test -d "$cf_library_path" && \
17220  {
17221         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
17222         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
17223         test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
17224         test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
17225         test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
17226         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"
17227 }
17228
17229                         cf_library_path_list="$cf_library_path_list $cf_search"
17230                         ;;
17231                 esac
17232         done
17233 fi
17234
17235 cf_search=
17236
17237 test "x$prefix" != "xNONE" && \
17238 test -d "$prefix" && \
17239  {
17240         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
17241         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
17242         test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
17243         test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
17244         test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
17245         test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
17246 }
17247
17248 for cf_subdir_prefix in \
17249         /usr \
17250         /usr/local \
17251         /usr/pkg \
17252         /opt \
17253         /opt/local \
17254         $HOME
17255 do
17256
17257 test "x$cf_subdir_prefix" != "x$prefix" && \
17258 test -d "$cf_subdir_prefix" && \
17259 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
17260         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
17261         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
17262         test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
17263         test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
17264         test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
17265         test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
17266 }
17267
17268 done
17269
17270 cf_search="$cf_library_path_list $cf_search"
17271
17272                         for cf_libdir in $cf_search
17273                         do
17274                                 echo "$as_me:17274: checking for -l$cf_nculib_root in $cf_libdir" >&5
17275 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
17276                                 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
17277                                 cat >conftest.$ac_ext <<_ACEOF
17278 #line 17278 "configure"
17279 #include "confdefs.h"
17280 #include <${cf_cv_ncurses_header:-curses.h}>
17281 int
17282 main (void)
17283 {
17284 initscr()
17285   ;
17286   return 0;
17287 }
17288 _ACEOF
17289 rm -f conftest.$ac_objext conftest$ac_exeext
17290 if { (eval echo "$as_me:17290: \"$ac_link\"") >&5
17291   (eval $ac_link) 2>&5
17292   ac_status=$?
17293   echo "$as_me:17293: \$? = $ac_status" >&5
17294   (exit $ac_status); } &&
17295          { ac_try='test -s conftest$ac_exeext'
17296   { (eval echo "$as_me:17296: \"$ac_try\"") >&5
17297   (eval $ac_try) 2>&5
17298   ac_status=$?
17299   echo "$as_me:17299: \$? = $ac_status" >&5
17300   (exit $ac_status); }; }; then
17301   echo "$as_me:17301: result: yes" >&5
17302 echo "${ECHO_T}yes" >&6
17303                                          eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
17304                                          break
17305 else
17306   echo "$as_me: failed program was:" >&5
17307 cat conftest.$ac_ext >&5
17308 echo "$as_me:17308: result: no" >&5
17309 echo "${ECHO_T}no" >&6
17310                                          LIBS="$cf_save_LIBS"
17311 fi
17312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17313                         done
17314
17315 fi
17316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17317
17318 fi
17319
17320 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
17321
17322 if test $cf_found_library = no ; then
17323         { { echo "$as_me:17323: error: Cannot link $cf_nculib_root library" >&5
17324 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
17325    { (exit 1); exit 1; }; }
17326 fi
17327
17328 fi
17329
17330 if test -n "$cf_ncurses_LIBS" ; then
17331         echo "$as_me:17331: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
17332 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
17333         cf_ncurses_SAVE="$LIBS"
17334         for p in $cf_ncurses_LIBS ; do
17335                 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
17336                 if test "$q" != "$LIBS" ; then
17337                         LIBS="$q"
17338                 fi
17339         done
17340         cat >conftest.$ac_ext <<_ACEOF
17341 #line 17341 "configure"
17342 #include "confdefs.h"
17343 #include <${cf_cv_ncurses_header:-curses.h}>
17344 int
17345 main (void)
17346 {
17347 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
17348   ;
17349   return 0;
17350 }
17351 _ACEOF
17352 rm -f conftest.$ac_objext conftest$ac_exeext
17353 if { (eval echo "$as_me:17353: \"$ac_link\"") >&5
17354   (eval $ac_link) 2>&5
17355   ac_status=$?
17356   echo "$as_me:17356: \$? = $ac_status" >&5
17357   (exit $ac_status); } &&
17358          { ac_try='test -s conftest$ac_exeext'
17359   { (eval echo "$as_me:17359: \"$ac_try\"") >&5
17360   (eval $ac_try) 2>&5
17361   ac_status=$?
17362   echo "$as_me:17362: \$? = $ac_status" >&5
17363   (exit $ac_status); }; }; then
17364   echo "$as_me:17364: result: yes" >&5
17365 echo "${ECHO_T}yes" >&6
17366 else
17367   echo "$as_me: failed program was:" >&5
17368 cat conftest.$ac_ext >&5
17369 echo "$as_me:17369: result: no" >&5
17370 echo "${ECHO_T}no" >&6
17371                  LIBS="$cf_ncurses_SAVE"
17372 fi
17373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17374 fi
17375
17376 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17377
17378 cat >>confdefs.h <<EOF
17379 #define $cf_nculib_ROOT 1
17380 EOF
17381
17382         fi
17383 else
17384         NCURSES_CONFIG=none
17385 fi
17386
17387         ;;
17388 (pdcurses)
17389         echo "$as_me:17389: checking for X" >&5
17390 echo $ECHO_N "checking for X... $ECHO_C" >&6
17391
17392 # Check whether --with-x or --without-x was given.
17393 if test "${with_x+set}" = set; then
17394   withval="$with_x"
17395
17396 fi;
17397 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17398 if test "x$with_x" = xno; then
17399   # The user explicitly disabled X.
17400   have_x=disabled
17401 else
17402   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
17403     # Both variables are already set.
17404     have_x=yes
17405   else
17406     if test "${ac_cv_have_x+set}" = set; then
17407   echo $ECHO_N "(cached) $ECHO_C" >&6
17408 else
17409   # One or both of the vars are not set, and there is no cached value.
17410 ac_x_includes=no ac_x_libraries=no
17411 rm -fr conftest.dir
17412 if mkdir conftest.dir; then
17413   cd conftest.dir
17414   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
17415   cat >Imakefile <<'EOF'
17416 acfindx:
17417         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
17418 EOF
17419   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
17420     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
17421     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
17422     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17423     for ac_extension in a so sl dylib dll; do
17424       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
17425          test -f $ac_im_libdir/libX11.$ac_extension; then
17426         ac_im_usrlibdir=$ac_im_libdir; break
17427       fi
17428     done
17429     # Screen out bogus values from the imake configuration.  They are
17430     # bogus both because they are the default anyway, and because
17431     # using them would break gcc on systems where it needs fixed includes.
17432     case $ac_im_incroot in
17433         /usr/include) ;;
17434         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17435     esac
17436     case $ac_im_usrlibdir in
17437         /usr/lib | /lib) ;;
17438         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17439     esac
17440   fi
17441   cd ..
17442   rm -fr conftest.dir
17443 fi
17444
17445 # Standard set of common directories for X headers.
17446 # Check X11 before X11Rn because it is often a symlink to the current release.
17447 ac_x_header_dirs='
17448 /usr/X11/include
17449 /usr/X11R6/include
17450 /usr/X11R5/include
17451 /usr/X11R4/include
17452
17453 /usr/include/X11
17454 /usr/include/X11R6
17455 /usr/include/X11R5
17456 /usr/include/X11R4
17457
17458 /usr/local/X11/include
17459 /usr/local/X11R6/include
17460 /usr/local/X11R5/include
17461 /usr/local/X11R4/include
17462
17463 /usr/local/include/X11
17464 /usr/local/include/X11R6
17465 /usr/local/include/X11R5
17466 /usr/local/include/X11R4
17467
17468 /usr/X386/include
17469 /usr/x386/include
17470 /usr/XFree86/include/X11
17471
17472 /usr/include
17473 /usr/local/include
17474 /usr/unsupported/include
17475 /usr/athena/include
17476 /usr/local/x11r5/include
17477 /usr/lpp/Xamples/include
17478
17479 /usr/openwin/include
17480 /usr/openwin/share/include'
17481
17482 if test "$ac_x_includes" = no; then
17483   # Guess where to find include files, by looking for Intrinsic.h.
17484   # First, try using that file with no special directory specified.
17485   cat >conftest.$ac_ext <<_ACEOF
17486 #line 17486 "configure"
17487 #include "confdefs.h"
17488 #include <X11/Intrinsic.h>
17489 _ACEOF
17490 if { (eval echo "$as_me:17490: \"$ac_cpp conftest.$ac_ext\"") >&5
17491   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17492   ac_status=$?
17493   egrep -v '^ *\+' conftest.er1 >conftest.err
17494   rm -f conftest.er1
17495   cat conftest.err >&5
17496   echo "$as_me:17496: \$? = $ac_status" >&5
17497   (exit $ac_status); } >/dev/null; then
17498   if test -s conftest.err; then
17499     ac_cpp_err=$ac_c_preproc_warn_flag
17500   else
17501     ac_cpp_err=
17502   fi
17503 else
17504   ac_cpp_err=yes
17505 fi
17506 if test -z "$ac_cpp_err"; then
17507   # We can compile using X headers with no special include directory.
17508 ac_x_includes=
17509 else
17510   echo "$as_me: failed program was:" >&5
17511   cat conftest.$ac_ext >&5
17512   for ac_dir in $ac_x_header_dirs; do
17513   if test -r "$ac_dir/X11/Intrinsic.h"; then
17514     ac_x_includes=$ac_dir
17515     break
17516   fi
17517 done
17518 fi
17519 rm -f conftest.err conftest.$ac_ext
17520 fi # $ac_x_includes = no
17521
17522 if test "$ac_x_libraries" = no; then
17523   # Check for the libraries.
17524   # See if we find them without any special options.
17525   # Don't add to $LIBS permanently.
17526   ac_save_LIBS=$LIBS
17527   LIBS="-lXt $LIBS"
17528   cat >conftest.$ac_ext <<_ACEOF
17529 #line 17529 "configure"
17530 #include "confdefs.h"
17531 #include <X11/Intrinsic.h>
17532 int
17533 main (void)
17534 {
17535 XtMalloc (0)
17536   ;
17537   return 0;
17538 }
17539 _ACEOF
17540 rm -f conftest.$ac_objext conftest$ac_exeext
17541 if { (eval echo "$as_me:17541: \"$ac_link\"") >&5
17542   (eval $ac_link) 2>&5
17543   ac_status=$?
17544   echo "$as_me:17544: \$? = $ac_status" >&5
17545   (exit $ac_status); } &&
17546          { ac_try='test -s conftest$ac_exeext'
17547   { (eval echo "$as_me:17547: \"$ac_try\"") >&5
17548   (eval $ac_try) 2>&5
17549   ac_status=$?
17550   echo "$as_me:17550: \$? = $ac_status" >&5
17551   (exit $ac_status); }; }; then
17552   LIBS=$ac_save_LIBS
17553 # We can link X programs with no special library path.
17554 ac_x_libraries=
17555 else
17556   echo "$as_me: failed program was:" >&5
17557 cat conftest.$ac_ext >&5
17558 LIBS=$ac_save_LIBS
17559 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17560 do
17561   # Don't even attempt the hair of trying to link an X program!
17562   for ac_extension in a so sl dylib dll; do
17563     if test -r $ac_dir/libXt.$ac_extension; then
17564       ac_x_libraries=$ac_dir
17565       break 2
17566     fi
17567   done
17568 done
17569 fi
17570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17571 fi # $ac_x_libraries = no
17572
17573 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
17574   # Didn't find X anywhere.  Cache the known absence of X.
17575   ac_cv_have_x="have_x=no"
17576 else
17577   # Record where we found X for the cache.
17578   ac_cv_have_x="have_x=yes \
17579                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
17580 fi
17581 fi
17582
17583   fi
17584   eval "$ac_cv_have_x"
17585 fi # $with_x != no
17586
17587 if test "$have_x" != yes; then
17588   echo "$as_me:17588: result: $have_x" >&5
17589 echo "${ECHO_T}$have_x" >&6
17590   no_x=yes
17591 else
17592   # If each of the values was on the command line, it overrides each guess.
17593   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17594   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17595   # Update the cache value to reflect the command line values.
17596   ac_cv_have_x="have_x=yes \
17597                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
17598   echo "$as_me:17598: result: libraries $x_libraries, headers $x_includes" >&5
17599 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
17600 fi
17601
17602 if test "$no_x" = yes; then
17603   # Not all programs may use this symbol, but it does not hurt to define it.
17604
17605 cat >>confdefs.h <<\EOF
17606 #define X_DISPLAY_MISSING 1
17607 EOF
17608
17609   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
17610 else
17611   if test -n "$x_includes"; then
17612     X_CFLAGS="$X_CFLAGS -I$x_includes"
17613   fi
17614
17615   # It would also be nice to do this for all -L options, not just this one.
17616   if test -n "$x_libraries"; then
17617     X_LIBS="$X_LIBS -L$x_libraries"
17618     # For Solaris; some versions of Sun CC require a space after -R and
17619     # others require no space.  Words are not sufficient . . . .
17620     case `(uname -sr) 2>/dev/null` in
17621     "SunOS 5"*)
17622       echo "$as_me:17622: checking whether -R must be followed by a space" >&5
17623 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
17624       ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
17625       cat >conftest.$ac_ext <<_ACEOF
17626 #line 17626 "configure"
17627 #include "confdefs.h"
17628
17629 int
17630 main (void)
17631 {
17632
17633   ;
17634   return 0;
17635 }
17636 _ACEOF
17637 rm -f conftest.$ac_objext conftest$ac_exeext
17638 if { (eval echo "$as_me:17638: \"$ac_link\"") >&5
17639   (eval $ac_link) 2>&5
17640   ac_status=$?
17641   echo "$as_me:17641: \$? = $ac_status" >&5
17642   (exit $ac_status); } &&
17643          { ac_try='test -s conftest$ac_exeext'
17644   { (eval echo "$as_me:17644: \"$ac_try\"") >&5
17645   (eval $ac_try) 2>&5
17646   ac_status=$?
17647   echo "$as_me:17647: \$? = $ac_status" >&5
17648   (exit $ac_status); }; }; then
17649   ac_R_nospace=yes
17650 else
17651   echo "$as_me: failed program was:" >&5
17652 cat conftest.$ac_ext >&5
17653 ac_R_nospace=no
17654 fi
17655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17656       if test $ac_R_nospace = yes; then
17657         echo "$as_me:17657: result: no" >&5
17658 echo "${ECHO_T}no" >&6
17659         X_LIBS="$X_LIBS -R$x_libraries"
17660       else
17661         LIBS="$ac_xsave_LIBS -R $x_libraries"
17662         cat >conftest.$ac_ext <<_ACEOF
17663 #line 17663 "configure"
17664 #include "confdefs.h"
17665
17666 int
17667 main (void)
17668 {
17669
17670   ;
17671   return 0;
17672 }
17673 _ACEOF
17674 rm -f conftest.$ac_objext conftest$ac_exeext
17675 if { (eval echo "$as_me:17675: \"$ac_link\"") >&5
17676   (eval $ac_link) 2>&5
17677   ac_status=$?
17678   echo "$as_me:17678: \$? = $ac_status" >&5
17679   (exit $ac_status); } &&
17680          { ac_try='test -s conftest$ac_exeext'
17681   { (eval echo "$as_me:17681: \"$ac_try\"") >&5
17682   (eval $ac_try) 2>&5
17683   ac_status=$?
17684   echo "$as_me:17684: \$? = $ac_status" >&5
17685   (exit $ac_status); }; }; then
17686   ac_R_space=yes
17687 else
17688   echo "$as_me: failed program was:" >&5
17689 cat conftest.$ac_ext >&5
17690 ac_R_space=no
17691 fi
17692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17693         if test $ac_R_space = yes; then
17694           echo "$as_me:17694: result: yes" >&5
17695 echo "${ECHO_T}yes" >&6
17696           X_LIBS="$X_LIBS -R $x_libraries"
17697         else
17698           echo "$as_me:17698: result: neither works" >&5
17699 echo "${ECHO_T}neither works" >&6
17700         fi
17701       fi
17702       LIBS=$ac_xsave_LIBS
17703     esac
17704   fi
17705
17706   # Check for system-dependent libraries X programs must link with.
17707   # Do this before checking for the system-independent R6 libraries
17708   # (-lICE), since we may need -lsocket or whatever for X linking.
17709
17710   if test "$ISC" = yes; then
17711     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
17712   else
17713     # Martyn Johnson says this is needed for Ultrix, if the X
17714     # libraries were built with DECnet support.  And Karl Berry says
17715     # the Alpha needs dnet_stub (dnet does not exist).
17716     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
17717     cat >conftest.$ac_ext <<_ACEOF
17718 #line 17718 "configure"
17719 #include "confdefs.h"
17720
17721 /* Override any gcc2 internal prototype to avoid an error.  */
17722 #ifdef __cplusplus
17723 extern "C"
17724 #endif
17725 /* We use char because int might match the return type of a gcc2
17726    builtin and then its argument prototype would still apply.  */
17727 char XOpenDisplay ();
17728 int
17729 main (void)
17730 {
17731 XOpenDisplay ();
17732   ;
17733   return 0;
17734 }
17735 _ACEOF
17736 rm -f conftest.$ac_objext conftest$ac_exeext
17737 if { (eval echo "$as_me:17737: \"$ac_link\"") >&5
17738   (eval $ac_link) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit $ac_status); } &&
17742          { ac_try='test -s conftest$ac_exeext'
17743   { (eval echo "$as_me:17743: \"$ac_try\"") >&5
17744   (eval $ac_try) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit $ac_status); }; }; then
17748   :
17749 else
17750   echo "$as_me: failed program was:" >&5
17751 cat conftest.$ac_ext >&5
17752 echo "$as_me:17752: checking for dnet_ntoa in -ldnet" >&5
17753 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
17754 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
17755   echo $ECHO_N "(cached) $ECHO_C" >&6
17756 else
17757   ac_check_lib_save_LIBS=$LIBS
17758 LIBS="-ldnet  $LIBS"
17759 cat >conftest.$ac_ext <<_ACEOF
17760 #line 17760 "configure"
17761 #include "confdefs.h"
17762
17763 /* Override any gcc2 internal prototype to avoid an error.  */
17764 #ifdef __cplusplus
17765 extern "C"
17766 #endif
17767 /* We use char because int might match the return type of a gcc2
17768    builtin and then its argument prototype would still apply.  */
17769 char dnet_ntoa ();
17770 int
17771 main (void)
17772 {
17773 dnet_ntoa ();
17774   ;
17775   return 0;
17776 }
17777 _ACEOF
17778 rm -f conftest.$ac_objext conftest$ac_exeext
17779 if { (eval echo "$as_me:17779: \"$ac_link\"") >&5
17780   (eval $ac_link) 2>&5
17781   ac_status=$?
17782   echo "$as_me:17782: \$? = $ac_status" >&5
17783   (exit $ac_status); } &&
17784          { ac_try='test -s conftest$ac_exeext'
17785   { (eval echo "$as_me:17785: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit $ac_status); }; }; then
17790   ac_cv_lib_dnet_dnet_ntoa=yes
17791 else
17792   echo "$as_me: failed program was:" >&5
17793 cat conftest.$ac_ext >&5
17794 ac_cv_lib_dnet_dnet_ntoa=no
17795 fi
17796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17797 LIBS=$ac_check_lib_save_LIBS
17798 fi
17799 echo "$as_me:17799: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
17800 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
17801 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
17802   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
17803 fi
17804
17805     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
17806       echo "$as_me:17806: checking for dnet_ntoa in -ldnet_stub" >&5
17807 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
17808 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
17809   echo $ECHO_N "(cached) $ECHO_C" >&6
17810 else
17811   ac_check_lib_save_LIBS=$LIBS
17812 LIBS="-ldnet_stub  $LIBS"
17813 cat >conftest.$ac_ext <<_ACEOF
17814 #line 17814 "configure"
17815 #include "confdefs.h"
17816
17817 /* Override any gcc2 internal prototype to avoid an error.  */
17818 #ifdef __cplusplus
17819 extern "C"
17820 #endif
17821 /* We use char because int might match the return type of a gcc2
17822    builtin and then its argument prototype would still apply.  */
17823 char dnet_ntoa ();
17824 int
17825 main (void)
17826 {
17827 dnet_ntoa ();
17828   ;
17829   return 0;
17830 }
17831 _ACEOF
17832 rm -f conftest.$ac_objext conftest$ac_exeext
17833 if { (eval echo "$as_me:17833: \"$ac_link\"") >&5
17834   (eval $ac_link) 2>&5
17835   ac_status=$?
17836   echo "$as_me:17836: \$? = $ac_status" >&5
17837   (exit $ac_status); } &&
17838          { ac_try='test -s conftest$ac_exeext'
17839   { (eval echo "$as_me:17839: \"$ac_try\"") >&5
17840   (eval $ac_try) 2>&5
17841   ac_status=$?
17842   echo "$as_me:17842: \$? = $ac_status" >&5
17843   (exit $ac_status); }; }; then
17844   ac_cv_lib_dnet_stub_dnet_ntoa=yes
17845 else
17846   echo "$as_me: failed program was:" >&5
17847 cat conftest.$ac_ext >&5
17848 ac_cv_lib_dnet_stub_dnet_ntoa=no
17849 fi
17850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17851 LIBS=$ac_check_lib_save_LIBS
17852 fi
17853 echo "$as_me:17853: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
17854 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
17855 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
17856   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
17857 fi
17858
17859     fi
17860 fi
17861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17862     LIBS="$ac_xsave_LIBS"
17863
17864     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
17865     # to get the SysV transport functions.
17866     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
17867     # needs -lnsl.
17868     # The nsl library prevents programs from opening the X display
17869     # on Irix 5.2, according to T.E. Dickey.
17870     # The functions gethostbyname, getservbyname, and inet_addr are
17871     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
17872     echo "$as_me:17872: checking for gethostbyname" >&5
17873 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
17874 if test "${ac_cv_func_gethostbyname+set}" = set; then
17875   echo $ECHO_N "(cached) $ECHO_C" >&6
17876 else
17877   cat >conftest.$ac_ext <<_ACEOF
17878 #line 17878 "configure"
17879 #include "confdefs.h"
17880 /* System header to define __stub macros and hopefully few prototypes,
17881     which can conflict with char gethostbyname (); below.  */
17882 #include <assert.h>
17883 /* Override any gcc2 internal prototype to avoid an error.  */
17884 #ifdef __cplusplus
17885 extern "C"
17886 #endif
17887 /* We use char because int might match the return type of a gcc2
17888    builtin and then its argument prototype would still apply.  */
17889 char gethostbyname ();
17890 char (*f) ();
17891
17892 int
17893 main (void)
17894 {
17895 /* The GNU C library defines this for functions which it implements
17896     to always fail with ENOSYS.  Some functions are actually named
17897     something starting with __ and the normal name is an alias.  */
17898 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
17899 choke me
17900 #else
17901 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17902 #endif
17903
17904   ;
17905   return 0;
17906 }
17907 _ACEOF
17908 rm -f conftest.$ac_objext conftest$ac_exeext
17909 if { (eval echo "$as_me:17909: \"$ac_link\"") >&5
17910   (eval $ac_link) 2>&5
17911   ac_status=$?
17912   echo "$as_me:17912: \$? = $ac_status" >&5
17913   (exit $ac_status); } &&
17914          { ac_try='test -s conftest$ac_exeext'
17915   { (eval echo "$as_me:17915: \"$ac_try\"") >&5
17916   (eval $ac_try) 2>&5
17917   ac_status=$?
17918   echo "$as_me:17918: \$? = $ac_status" >&5
17919   (exit $ac_status); }; }; then
17920   ac_cv_func_gethostbyname=yes
17921 else
17922   echo "$as_me: failed program was:" >&5
17923 cat conftest.$ac_ext >&5
17924 ac_cv_func_gethostbyname=no
17925 fi
17926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17927 fi
17928 echo "$as_me:17928: result: $ac_cv_func_gethostbyname" >&5
17929 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
17930
17931     if test $ac_cv_func_gethostbyname = no; then
17932       echo "$as_me:17932: checking for gethostbyname in -lnsl" >&5
17933 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
17934 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
17935   echo $ECHO_N "(cached) $ECHO_C" >&6
17936 else
17937   ac_check_lib_save_LIBS=$LIBS
17938 LIBS="-lnsl  $LIBS"
17939 cat >conftest.$ac_ext <<_ACEOF
17940 #line 17940 "configure"
17941 #include "confdefs.h"
17942
17943 /* Override any gcc2 internal prototype to avoid an error.  */
17944 #ifdef __cplusplus
17945 extern "C"
17946 #endif
17947 /* We use char because int might match the return type of a gcc2
17948    builtin and then its argument prototype would still apply.  */
17949 char gethostbyname ();
17950 int
17951 main (void)
17952 {
17953 gethostbyname ();
17954   ;
17955   return 0;
17956 }
17957 _ACEOF
17958 rm -f conftest.$ac_objext conftest$ac_exeext
17959 if { (eval echo "$as_me:17959: \"$ac_link\"") >&5
17960   (eval $ac_link) 2>&5
17961   ac_status=$?
17962   echo "$as_me:17962: \$? = $ac_status" >&5
17963   (exit $ac_status); } &&
17964          { ac_try='test -s conftest$ac_exeext'
17965   { (eval echo "$as_me:17965: \"$ac_try\"") >&5
17966   (eval $ac_try) 2>&5
17967   ac_status=$?
17968   echo "$as_me:17968: \$? = $ac_status" >&5
17969   (exit $ac_status); }; }; then
17970   ac_cv_lib_nsl_gethostbyname=yes
17971 else
17972   echo "$as_me: failed program was:" >&5
17973 cat conftest.$ac_ext >&5
17974 ac_cv_lib_nsl_gethostbyname=no
17975 fi
17976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17977 LIBS=$ac_check_lib_save_LIBS
17978 fi
17979 echo "$as_me:17979: result: $ac_cv_lib_nsl_gethostbyname" >&5
17980 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
17981 if test $ac_cv_lib_nsl_gethostbyname = yes; then
17982   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
17983 fi
17984
17985       if test $ac_cv_lib_nsl_gethostbyname = no; then
17986         echo "$as_me:17986: checking for gethostbyname in -lbsd" >&5
17987 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
17988 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
17989   echo $ECHO_N "(cached) $ECHO_C" >&6
17990 else
17991   ac_check_lib_save_LIBS=$LIBS
17992 LIBS="-lbsd  $LIBS"
17993 cat >conftest.$ac_ext <<_ACEOF
17994 #line 17994 "configure"
17995 #include "confdefs.h"
17996
17997 /* Override any gcc2 internal prototype to avoid an error.  */
17998 #ifdef __cplusplus
17999 extern "C"
18000 #endif
18001 /* We use char because int might match the return type of a gcc2
18002    builtin and then its argument prototype would still apply.  */
18003 char gethostbyname ();
18004 int
18005 main (void)
18006 {
18007 gethostbyname ();
18008   ;
18009   return 0;
18010 }
18011 _ACEOF
18012 rm -f conftest.$ac_objext conftest$ac_exeext
18013 if { (eval echo "$as_me:18013: \"$ac_link\"") >&5
18014   (eval $ac_link) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); } &&
18018          { ac_try='test -s conftest$ac_exeext'
18019   { (eval echo "$as_me:18019: \"$ac_try\"") >&5
18020   (eval $ac_try) 2>&5
18021   ac_status=$?
18022   echo "$as_me:18022: \$? = $ac_status" >&5
18023   (exit $ac_status); }; }; then
18024   ac_cv_lib_bsd_gethostbyname=yes
18025 else
18026   echo "$as_me: failed program was:" >&5
18027 cat conftest.$ac_ext >&5
18028 ac_cv_lib_bsd_gethostbyname=no
18029 fi
18030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18031 LIBS=$ac_check_lib_save_LIBS
18032 fi
18033 echo "$as_me:18033: result: $ac_cv_lib_bsd_gethostbyname" >&5
18034 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
18035 if test $ac_cv_lib_bsd_gethostbyname = yes; then
18036   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
18037 fi
18038
18039       fi
18040     fi
18041
18042     # lieder@skyler.mavd.honeywell.com says without -lsocket,
18043     # socket/setsockopt and other routines are undefined under SCO ODT
18044     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
18045     # on later versions), says Simon Leinen: it contains gethostby*
18046     # variants that don't use the nameserver (or something).  -lsocket
18047     # must be given before -lnsl if both are needed.  We assume that
18048     # if connect needs -lnsl, so does gethostbyname.
18049     echo "$as_me:18049: checking for connect" >&5
18050 echo $ECHO_N "checking for connect... $ECHO_C" >&6
18051 if test "${ac_cv_func_connect+set}" = set; then
18052   echo $ECHO_N "(cached) $ECHO_C" >&6
18053 else
18054   cat >conftest.$ac_ext <<_ACEOF
18055 #line 18055 "configure"
18056 #include "confdefs.h"
18057 /* System header to define __stub macros and hopefully few prototypes,
18058     which can conflict with char connect (); below.  */
18059 #include <assert.h>
18060 /* Override any gcc2 internal prototype to avoid an error.  */
18061 #ifdef __cplusplus
18062 extern "C"
18063 #endif
18064 /* We use char because int might match the return type of a gcc2
18065    builtin and then its argument prototype would still apply.  */
18066 char connect ();
18067 char (*f) ();
18068
18069 int
18070 main (void)
18071 {
18072 /* The GNU C library defines this for functions which it implements
18073     to always fail with ENOSYS.  Some functions are actually named
18074     something starting with __ and the normal name is an alias.  */
18075 #if defined (__stub_connect) || defined (__stub___connect)
18076 choke me
18077 #else
18078 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18079 #endif
18080
18081   ;
18082   return 0;
18083 }
18084 _ACEOF
18085 rm -f conftest.$ac_objext conftest$ac_exeext
18086 if { (eval echo "$as_me:18086: \"$ac_link\"") >&5
18087   (eval $ac_link) 2>&5
18088   ac_status=$?
18089   echo "$as_me:18089: \$? = $ac_status" >&5
18090   (exit $ac_status); } &&
18091          { ac_try='test -s conftest$ac_exeext'
18092   { (eval echo "$as_me:18092: \"$ac_try\"") >&5
18093   (eval $ac_try) 2>&5
18094   ac_status=$?
18095   echo "$as_me:18095: \$? = $ac_status" >&5
18096   (exit $ac_status); }; }; then
18097   ac_cv_func_connect=yes
18098 else
18099   echo "$as_me: failed program was:" >&5
18100 cat conftest.$ac_ext >&5
18101 ac_cv_func_connect=no
18102 fi
18103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18104 fi
18105 echo "$as_me:18105: result: $ac_cv_func_connect" >&5
18106 echo "${ECHO_T}$ac_cv_func_connect" >&6
18107
18108     if test $ac_cv_func_connect = no; then
18109       echo "$as_me:18109: checking for connect in -lsocket" >&5
18110 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
18111 if test "${ac_cv_lib_socket_connect+set}" = set; then
18112   echo $ECHO_N "(cached) $ECHO_C" >&6
18113 else
18114   ac_check_lib_save_LIBS=$LIBS
18115 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
18116 cat >conftest.$ac_ext <<_ACEOF
18117 #line 18117 "configure"
18118 #include "confdefs.h"
18119
18120 /* Override any gcc2 internal prototype to avoid an error.  */
18121 #ifdef __cplusplus
18122 extern "C"
18123 #endif
18124 /* We use char because int might match the return type of a gcc2
18125    builtin and then its argument prototype would still apply.  */
18126 char connect ();
18127 int
18128 main (void)
18129 {
18130 connect ();
18131   ;
18132   return 0;
18133 }
18134 _ACEOF
18135 rm -f conftest.$ac_objext conftest$ac_exeext
18136 if { (eval echo "$as_me:18136: \"$ac_link\"") >&5
18137   (eval $ac_link) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); } &&
18141          { ac_try='test -s conftest$ac_exeext'
18142   { (eval echo "$as_me:18142: \"$ac_try\"") >&5
18143   (eval $ac_try) 2>&5
18144   ac_status=$?
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); }; }; then
18147   ac_cv_lib_socket_connect=yes
18148 else
18149   echo "$as_me: failed program was:" >&5
18150 cat conftest.$ac_ext >&5
18151 ac_cv_lib_socket_connect=no
18152 fi
18153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18154 LIBS=$ac_check_lib_save_LIBS
18155 fi
18156 echo "$as_me:18156: result: $ac_cv_lib_socket_connect" >&5
18157 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
18158 if test $ac_cv_lib_socket_connect = yes; then
18159   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
18160 fi
18161
18162     fi
18163
18164     # Guillermo Gomez says -lposix is necessary on A/UX.
18165     echo "$as_me:18165: checking for remove" >&5
18166 echo $ECHO_N "checking for remove... $ECHO_C" >&6
18167 if test "${ac_cv_func_remove+set}" = set; then
18168   echo $ECHO_N "(cached) $ECHO_C" >&6
18169 else
18170   cat >conftest.$ac_ext <<_ACEOF
18171 #line 18171 "configure"
18172 #include "confdefs.h"
18173 /* System header to define __stub macros and hopefully few prototypes,
18174     which can conflict with char remove (); below.  */
18175 #include <assert.h>
18176 /* Override any gcc2 internal prototype to avoid an error.  */
18177 #ifdef __cplusplus
18178 extern "C"
18179 #endif
18180 /* We use char because int might match the return type of a gcc2
18181    builtin and then its argument prototype would still apply.  */
18182 char remove ();
18183 char (*f) ();
18184
18185 int
18186 main (void)
18187 {
18188 /* The GNU C library defines this for functions which it implements
18189     to always fail with ENOSYS.  Some functions are actually named
18190     something starting with __ and the normal name is an alias.  */
18191 #if defined (__stub_remove) || defined (__stub___remove)
18192 choke me
18193 #else
18194 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18195 #endif
18196
18197   ;
18198   return 0;
18199 }
18200 _ACEOF
18201 rm -f conftest.$ac_objext conftest$ac_exeext
18202 if { (eval echo "$as_me:18202: \"$ac_link\"") >&5
18203   (eval $ac_link) 2>&5
18204   ac_status=$?
18205   echo "$as_me:18205: \$? = $ac_status" >&5
18206   (exit $ac_status); } &&
18207          { ac_try='test -s conftest$ac_exeext'
18208   { (eval echo "$as_me:18208: \"$ac_try\"") >&5
18209   (eval $ac_try) 2>&5
18210   ac_status=$?
18211   echo "$as_me:18211: \$? = $ac_status" >&5
18212   (exit $ac_status); }; }; then
18213   ac_cv_func_remove=yes
18214 else
18215   echo "$as_me: failed program was:" >&5
18216 cat conftest.$ac_ext >&5
18217 ac_cv_func_remove=no
18218 fi
18219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18220 fi
18221 echo "$as_me:18221: result: $ac_cv_func_remove" >&5
18222 echo "${ECHO_T}$ac_cv_func_remove" >&6
18223
18224     if test $ac_cv_func_remove = no; then
18225       echo "$as_me:18225: checking for remove in -lposix" >&5
18226 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
18227 if test "${ac_cv_lib_posix_remove+set}" = set; then
18228   echo $ECHO_N "(cached) $ECHO_C" >&6
18229 else
18230   ac_check_lib_save_LIBS=$LIBS
18231 LIBS="-lposix  $LIBS"
18232 cat >conftest.$ac_ext <<_ACEOF
18233 #line 18233 "configure"
18234 #include "confdefs.h"
18235
18236 /* Override any gcc2 internal prototype to avoid an error.  */
18237 #ifdef __cplusplus
18238 extern "C"
18239 #endif
18240 /* We use char because int might match the return type of a gcc2
18241    builtin and then its argument prototype would still apply.  */
18242 char remove ();
18243 int
18244 main (void)
18245 {
18246 remove ();
18247   ;
18248   return 0;
18249 }
18250 _ACEOF
18251 rm -f conftest.$ac_objext conftest$ac_exeext
18252 if { (eval echo "$as_me:18252: \"$ac_link\"") >&5
18253   (eval $ac_link) 2>&5
18254   ac_status=$?
18255   echo "$as_me:18255: \$? = $ac_status" >&5
18256   (exit $ac_status); } &&
18257          { ac_try='test -s conftest$ac_exeext'
18258   { (eval echo "$as_me:18258: \"$ac_try\"") >&5
18259   (eval $ac_try) 2>&5
18260   ac_status=$?
18261   echo "$as_me:18261: \$? = $ac_status" >&5
18262   (exit $ac_status); }; }; then
18263   ac_cv_lib_posix_remove=yes
18264 else
18265   echo "$as_me: failed program was:" >&5
18266 cat conftest.$ac_ext >&5
18267 ac_cv_lib_posix_remove=no
18268 fi
18269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18270 LIBS=$ac_check_lib_save_LIBS
18271 fi
18272 echo "$as_me:18272: result: $ac_cv_lib_posix_remove" >&5
18273 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
18274 if test $ac_cv_lib_posix_remove = yes; then
18275   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
18276 fi
18277
18278     fi
18279
18280     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
18281     echo "$as_me:18281: checking for shmat" >&5
18282 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
18283 if test "${ac_cv_func_shmat+set}" = set; then
18284   echo $ECHO_N "(cached) $ECHO_C" >&6
18285 else
18286   cat >conftest.$ac_ext <<_ACEOF
18287 #line 18287 "configure"
18288 #include "confdefs.h"
18289 /* System header to define __stub macros and hopefully few prototypes,
18290     which can conflict with char shmat (); below.  */
18291 #include <assert.h>
18292 /* Override any gcc2 internal prototype to avoid an error.  */
18293 #ifdef __cplusplus
18294 extern "C"
18295 #endif
18296 /* We use char because int might match the return type of a gcc2
18297    builtin and then its argument prototype would still apply.  */
18298 char shmat ();
18299 char (*f) ();
18300
18301 int
18302 main (void)
18303 {
18304 /* The GNU C library defines this for functions which it implements
18305     to always fail with ENOSYS.  Some functions are actually named
18306     something starting with __ and the normal name is an alias.  */
18307 #if defined (__stub_shmat) || defined (__stub___shmat)
18308 choke me
18309 #else
18310 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18311 #endif
18312
18313   ;
18314   return 0;
18315 }
18316 _ACEOF
18317 rm -f conftest.$ac_objext conftest$ac_exeext
18318 if { (eval echo "$as_me:18318: \"$ac_link\"") >&5
18319   (eval $ac_link) 2>&5
18320   ac_status=$?
18321   echo "$as_me:18321: \$? = $ac_status" >&5
18322   (exit $ac_status); } &&
18323          { ac_try='test -s conftest$ac_exeext'
18324   { (eval echo "$as_me:18324: \"$ac_try\"") >&5
18325   (eval $ac_try) 2>&5
18326   ac_status=$?
18327   echo "$as_me:18327: \$? = $ac_status" >&5
18328   (exit $ac_status); }; }; then
18329   ac_cv_func_shmat=yes
18330 else
18331   echo "$as_me: failed program was:" >&5
18332 cat conftest.$ac_ext >&5
18333 ac_cv_func_shmat=no
18334 fi
18335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18336 fi
18337 echo "$as_me:18337: result: $ac_cv_func_shmat" >&5
18338 echo "${ECHO_T}$ac_cv_func_shmat" >&6
18339
18340     if test $ac_cv_func_shmat = no; then
18341       echo "$as_me:18341: checking for shmat in -lipc" >&5
18342 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
18343 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
18344   echo $ECHO_N "(cached) $ECHO_C" >&6
18345 else
18346   ac_check_lib_save_LIBS=$LIBS
18347 LIBS="-lipc  $LIBS"
18348 cat >conftest.$ac_ext <<_ACEOF
18349 #line 18349 "configure"
18350 #include "confdefs.h"
18351
18352 /* Override any gcc2 internal prototype to avoid an error.  */
18353 #ifdef __cplusplus
18354 extern "C"
18355 #endif
18356 /* We use char because int might match the return type of a gcc2
18357    builtin and then its argument prototype would still apply.  */
18358 char shmat ();
18359 int
18360 main (void)
18361 {
18362 shmat ();
18363   ;
18364   return 0;
18365 }
18366 _ACEOF
18367 rm -f conftest.$ac_objext conftest$ac_exeext
18368 if { (eval echo "$as_me:18368: \"$ac_link\"") >&5
18369   (eval $ac_link) 2>&5
18370   ac_status=$?
18371   echo "$as_me:18371: \$? = $ac_status" >&5
18372   (exit $ac_status); } &&
18373          { ac_try='test -s conftest$ac_exeext'
18374   { (eval echo "$as_me:18374: \"$ac_try\"") >&5
18375   (eval $ac_try) 2>&5
18376   ac_status=$?
18377   echo "$as_me:18377: \$? = $ac_status" >&5
18378   (exit $ac_status); }; }; then
18379   ac_cv_lib_ipc_shmat=yes
18380 else
18381   echo "$as_me: failed program was:" >&5
18382 cat conftest.$ac_ext >&5
18383 ac_cv_lib_ipc_shmat=no
18384 fi
18385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18386 LIBS=$ac_check_lib_save_LIBS
18387 fi
18388 echo "$as_me:18388: result: $ac_cv_lib_ipc_shmat" >&5
18389 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
18390 if test $ac_cv_lib_ipc_shmat = yes; then
18391   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
18392 fi
18393
18394     fi
18395   fi
18396
18397   # Check for libraries that X11R6 Xt/Xaw programs need.
18398   ac_save_LDFLAGS=$LDFLAGS
18399   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
18400   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
18401   # check for ICE first), but we must link in the order -lSM -lICE or
18402   # we get undefined symbols.  So assume we have SM if we have ICE.
18403   # These have to be linked with before -lX11, unlike the other
18404   # libraries we check for below, so use a different variable.
18405   # John Interrante, Karl Berry
18406   echo "$as_me:18406: checking for IceConnectionNumber in -lICE" >&5
18407 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
18408 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
18409   echo $ECHO_N "(cached) $ECHO_C" >&6
18410 else
18411   ac_check_lib_save_LIBS=$LIBS
18412 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
18413 cat >conftest.$ac_ext <<_ACEOF
18414 #line 18414 "configure"
18415 #include "confdefs.h"
18416
18417 /* Override any gcc2 internal prototype to avoid an error.  */
18418 #ifdef __cplusplus
18419 extern "C"
18420 #endif
18421 /* We use char because int might match the return type of a gcc2
18422    builtin and then its argument prototype would still apply.  */
18423 char IceConnectionNumber ();
18424 int
18425 main (void)
18426 {
18427 IceConnectionNumber ();
18428   ;
18429   return 0;
18430 }
18431 _ACEOF
18432 rm -f conftest.$ac_objext conftest$ac_exeext
18433 if { (eval echo "$as_me:18433: \"$ac_link\"") >&5
18434   (eval $ac_link) 2>&5
18435   ac_status=$?
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit $ac_status); } &&
18438          { ac_try='test -s conftest$ac_exeext'
18439   { (eval echo "$as_me:18439: \"$ac_try\"") >&5
18440   (eval $ac_try) 2>&5
18441   ac_status=$?
18442   echo "$as_me:18442: \$? = $ac_status" >&5
18443   (exit $ac_status); }; }; then
18444   ac_cv_lib_ICE_IceConnectionNumber=yes
18445 else
18446   echo "$as_me: failed program was:" >&5
18447 cat conftest.$ac_ext >&5
18448 ac_cv_lib_ICE_IceConnectionNumber=no
18449 fi
18450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18451 LIBS=$ac_check_lib_save_LIBS
18452 fi
18453 echo "$as_me:18453: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
18454 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
18455 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
18456   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
18457 fi
18458
18459   LDFLAGS=$ac_save_LDFLAGS
18460
18461 fi
18462
18463 cf_x_athena=${cf_x_athena:-Xaw}
18464
18465 echo "$as_me:18465: checking if you want to link with Xaw 3d library" >&5
18466 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
18467 withval=
18468
18469 # Check whether --with-Xaw3d or --without-Xaw3d was given.
18470 if test "${with_Xaw3d+set}" = set; then
18471   withval="$with_Xaw3d"
18472
18473 fi;
18474 if test "$withval" = yes ; then
18475         cf_x_athena=Xaw3d
18476         echo "$as_me:18476: result: yes" >&5
18477 echo "${ECHO_T}yes" >&6
18478 else
18479         echo "$as_me:18479: result: no" >&5
18480 echo "${ECHO_T}no" >&6
18481 fi
18482
18483 echo "$as_me:18483: checking if you want to link with Xaw 3d xft library" >&5
18484 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
18485 withval=
18486
18487 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
18488 if test "${with_Xaw3dxft+set}" = set; then
18489   withval="$with_Xaw3dxft"
18490
18491 fi;
18492 if test "$withval" = yes ; then
18493         cf_x_athena=Xaw3dxft
18494         echo "$as_me:18494: result: yes" >&5
18495 echo "${ECHO_T}yes" >&6
18496 else
18497         echo "$as_me:18497: result: no" >&5
18498 echo "${ECHO_T}no" >&6
18499 fi
18500
18501 echo "$as_me:18501: checking if you want to link with neXT Athena library" >&5
18502 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
18503 withval=
18504
18505 # Check whether --with-neXtaw or --without-neXtaw was given.
18506 if test "${with_neXtaw+set}" = set; then
18507   withval="$with_neXtaw"
18508
18509 fi;
18510 if test "$withval" = yes ; then
18511         cf_x_athena=neXtaw
18512         echo "$as_me:18512: result: yes" >&5
18513 echo "${ECHO_T}yes" >&6
18514 else
18515         echo "$as_me:18515: result: no" >&5
18516 echo "${ECHO_T}no" >&6
18517 fi
18518
18519 echo "$as_me:18519: checking if you want to link with Athena-Plus library" >&5
18520 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
18521 withval=
18522
18523 # Check whether --with-XawPlus or --without-XawPlus was given.
18524 if test "${with_XawPlus+set}" = set; then
18525   withval="$with_XawPlus"
18526
18527 fi;
18528 if test "$withval" = yes ; then
18529         cf_x_athena=XawPlus
18530         echo "$as_me:18530: result: yes" >&5
18531 echo "${ECHO_T}yes" >&6
18532 else
18533         echo "$as_me:18533: result: no" >&5
18534 echo "${ECHO_T}no" >&6
18535 fi
18536
18537 cf_x_athena_lib=""
18538
18539 if test "$PKG_CONFIG" != none ; then
18540         cf_athena_list=
18541         test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
18542         for cf_athena_pkg in \
18543                 $cf_athena_list \
18544                 ${cf_x_athena} \
18545                 ${cf_x_athena}-devel \
18546                 lib${cf_x_athena} \
18547                 lib${cf_x_athena}-devel
18548         do
18549
18550 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
18551         test -n "$verbose" && echo "    found package $cf_athena_pkg" 1>&6
18552
18553 echo "${as_me:-configure}:18553: testing found package $cf_athena_pkg ..." 1>&5
18554
18555         cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
18556         cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
18557         test -n "$verbose" && echo "    package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
18558
18559 echo "${as_me:-configure}:18559: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18560
18561         test -n "$verbose" && echo "    package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
18562
18563 echo "${as_me:-configure}:18563: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
18564
18565 cf_fix_cppflags=no
18566 cf_new_cflags=
18567 cf_new_cppflags=
18568 cf_new_extra_cppflags=
18569
18570 for cf_add_cflags in $cf_pkgconfig_incs
18571 do
18572 case $cf_fix_cppflags in
18573 (no)
18574         case $cf_add_cflags in
18575         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18576                 case $cf_add_cflags in
18577                 (-D*)
18578                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18579
18580                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18581                                 && test -z "${cf_tst_cflags}" \
18582                                 && cf_fix_cppflags=yes
18583
18584                         if test $cf_fix_cppflags = yes ; then
18585
18586         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18587         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18588
18589                                 continue
18590                         elif test "${cf_tst_cflags}" = "\"'" ; then
18591
18592         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18593         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18594
18595                                 continue
18596                         fi
18597                         ;;
18598                 esac
18599                 case "$CPPFLAGS" in
18600                 (*$cf_add_cflags)
18601                         ;;
18602                 (*)
18603                         case $cf_add_cflags in
18604                         (-D*)
18605                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18606
18607 CPPFLAGS=`echo "$CPPFLAGS" | \
18608         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18609                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18610
18611                                 ;;
18612                         esac
18613
18614         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18615         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18616
18617                         ;;
18618                 esac
18619                 ;;
18620         (*)
18621
18622         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18623         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18624
18625                 ;;
18626         esac
18627         ;;
18628 (yes)
18629
18630         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18631         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18632
18633         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18634
18635         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18636                 && test -z "${cf_tst_cflags}" \
18637                 && cf_fix_cppflags=no
18638         ;;
18639 esac
18640 done
18641
18642 if test -n "$cf_new_cflags" ; then
18643
18644         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18645         CFLAGS="${CFLAGS}$cf_new_cflags"
18646
18647 fi
18648
18649 if test -n "$cf_new_cppflags" ; then
18650
18651         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18652         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18653
18654 fi
18655
18656 if test -n "$cf_new_extra_cppflags" ; then
18657
18658         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18659         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18660
18661 fi
18662
18663 cf_add_libs="$cf_pkgconfig_libs"
18664 # Filter out duplicates - this happens with badly-designed ".pc" files...
18665 for cf_add_1lib in $LIBS
18666 do
18667         for cf_add_2lib in $cf_add_libs
18668         do
18669                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18670                 then
18671                         cf_add_1lib=
18672                         break
18673                 fi
18674         done
18675         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18676 done
18677 LIBS="$cf_add_libs"
18678
18679                         cf_x_athena_lib="$cf_pkgconfig_libs"
18680
18681 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18682
18683                         cat >>confdefs.h <<EOF
18684 #define $cf_x_athena_LIBS 1
18685 EOF
18686
18687         for cf_trim_lib in Xmu Xt X11
18688         do
18689                 case "$LIBS" in
18690                 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
18691                         LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
18692                         test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
18693
18694 echo "${as_me:-configure}:18694: testing ..trimmed $LIBS ..." 1>&5
18695
18696                         ;;
18697                 esac
18698         done
18699
18700 echo "$as_me:18700: checking for usable $cf_x_athena/Xmu package" >&5
18701 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
18702 if test "${cf_cv_xaw_compat+set}" = set; then
18703   echo $ECHO_N "(cached) $ECHO_C" >&6
18704 else
18705
18706 cat >conftest.$ac_ext <<_ACEOF
18707 #line 18707 "configure"
18708 #include "confdefs.h"
18709
18710 #include <X11/Xmu/CharSet.h>
18711
18712 int
18713 main (void)
18714 {
18715
18716 int check = XmuCompareISOLatin1("big", "small")
18717
18718   ;
18719   return 0;
18720 }
18721 _ACEOF
18722 rm -f conftest.$ac_objext conftest$ac_exeext
18723 if { (eval echo "$as_me:18723: \"$ac_link\"") >&5
18724   (eval $ac_link) 2>&5
18725   ac_status=$?
18726   echo "$as_me:18726: \$? = $ac_status" >&5
18727   (exit $ac_status); } &&
18728          { ac_try='test -s conftest$ac_exeext'
18729   { (eval echo "$as_me:18729: \"$ac_try\"") >&5
18730   (eval $ac_try) 2>&5
18731   ac_status=$?
18732   echo "$as_me:18732: \$? = $ac_status" >&5
18733   (exit $ac_status); }; }; then
18734   cf_cv_xaw_compat=yes
18735 else
18736   echo "$as_me: failed program was:" >&5
18737 cat conftest.$ac_ext >&5
18738 cf_cv_xaw_compat=no
18739 fi
18740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18741 fi
18742 echo "$as_me:18742: result: $cf_cv_xaw_compat" >&5
18743 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
18744
18745                         if test "$cf_cv_xaw_compat" = no
18746                         then
18747                                 # workaround for broken ".pc" files...
18748                                 case "$cf_x_athena_lib" in
18749                                 (*-lXmu*)
18750                                         ;;
18751                                 (*)
18752                                         test -n "$verbose" && echo "    work around broken package" 1>&6
18753
18754 echo "${as_me:-configure}:18754: testing work around broken package ..." 1>&5
18755
18756                                         cf_save_xmu="$LIBS"
18757                                         cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
18758
18759 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
18760         test -n "$verbose" && echo "    found package xmu" 1>&6
18761
18762 echo "${as_me:-configure}:18762: testing found package xmu ..." 1>&5
18763
18764         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
18765         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
18766         test -n "$verbose" && echo "    package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
18767
18768 echo "${as_me:-configure}:18768: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18769
18770         test -n "$verbose" && echo "    package xmu LIBS: $cf_pkgconfig_libs" 1>&6
18771
18772 echo "${as_me:-configure}:18772: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
18773
18774 cf_fix_cppflags=no
18775 cf_new_cflags=
18776 cf_new_cppflags=
18777 cf_new_extra_cppflags=
18778
18779 for cf_add_cflags in $cf_pkgconfig_incs
18780 do
18781 case $cf_fix_cppflags in
18782 (no)
18783         case $cf_add_cflags in
18784         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18785                 case $cf_add_cflags in
18786                 (-D*)
18787                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18788
18789                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18790                                 && test -z "${cf_tst_cflags}" \
18791                                 && cf_fix_cppflags=yes
18792
18793                         if test $cf_fix_cppflags = yes ; then
18794
18795         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18796         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18797
18798                                 continue
18799                         elif test "${cf_tst_cflags}" = "\"'" ; then
18800
18801         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18802         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18803
18804                                 continue
18805                         fi
18806                         ;;
18807                 esac
18808                 case "$CPPFLAGS" in
18809                 (*$cf_add_cflags)
18810                         ;;
18811                 (*)
18812                         case $cf_add_cflags in
18813                         (-D*)
18814                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18815
18816 CPPFLAGS=`echo "$CPPFLAGS" | \
18817         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18818                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18819
18820                                 ;;
18821                         esac
18822
18823         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18824         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18825
18826                         ;;
18827                 esac
18828                 ;;
18829         (*)
18830
18831         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18832         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18833
18834                 ;;
18835         esac
18836         ;;
18837 (yes)
18838
18839         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18840         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18841
18842         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18843
18844         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18845                 && test -z "${cf_tst_cflags}" \
18846                 && cf_fix_cppflags=no
18847         ;;
18848 esac
18849 done
18850
18851 if test -n "$cf_new_cflags" ; then
18852
18853         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18854         CFLAGS="${CFLAGS}$cf_new_cflags"
18855
18856 fi
18857
18858 if test -n "$cf_new_cppflags" ; then
18859
18860         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18861         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18862
18863 fi
18864
18865 if test -n "$cf_new_extra_cppflags" ; then
18866
18867         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18868         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18869
18870 fi
18871
18872 cf_add_libs="$cf_pkgconfig_libs"
18873 # Filter out duplicates - this happens with badly-designed ".pc" files...
18874 for cf_add_1lib in $LIBS
18875 do
18876         for cf_add_2lib in $cf_add_libs
18877         do
18878                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18879                 then
18880                         cf_add_1lib=
18881                         break
18882                 fi
18883         done
18884         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18885 done
18886 LIBS="$cf_add_libs"
18887
18888                                                         LIBS="$cf_save_xmu"
18889
18890 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
18891
18892 echo "${as_me:-configure}:18892: testing ...before $LIBS ..." 1>&5
18893
18894 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
18895 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
18896
18897 echo "${as_me:-configure}:18897: testing ...after  $LIBS ..." 1>&5
18898
18899 else
18900         cf_pkgconfig_incs=
18901         cf_pkgconfig_libs=
18902
18903 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
18904
18905 echo "${as_me:-configure}:18905: testing ...before $LIBS ..." 1>&5
18906
18907 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
18908 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
18909
18910 echo "${as_me:-configure}:18910: testing ...after  $LIBS ..." 1>&5
18911
18912 fi
18913
18914         for cf_trim_lib in Xmu Xt X11
18915         do
18916                 case "$LIBS" in
18917                 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
18918                         LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
18919                         test -n "$verbose" && echo "    ..trimmed $LIBS" 1>&6
18920
18921 echo "${as_me:-configure}:18921: testing ..trimmed $LIBS ..." 1>&5
18922
18923                         ;;
18924                 esac
18925         done
18926
18927                                         ;;
18928                                 esac
18929                         fi
18930
18931                         break
18932 else
18933         cf_pkgconfig_incs=
18934         cf_pkgconfig_libs=
18935         :
18936 fi
18937
18938         done
18939 fi
18940
18941 if test -z "$cf_x_athena_lib" ; then
18942
18943 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
18944         test -n "$verbose" && echo "    found package Xext" 1>&6
18945
18946 echo "${as_me:-configure}:18946: testing found package Xext ..." 1>&5
18947
18948         cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
18949         cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
18950         test -n "$verbose" && echo "    package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
18951
18952 echo "${as_me:-configure}:18952: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18953
18954         test -n "$verbose" && echo "    package Xext LIBS: $cf_pkgconfig_libs" 1>&6
18955
18956 echo "${as_me:-configure}:18956: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
18957
18958 cf_fix_cppflags=no
18959 cf_new_cflags=
18960 cf_new_cppflags=
18961 cf_new_extra_cppflags=
18962
18963 for cf_add_cflags in $cf_pkgconfig_incs
18964 do
18965 case $cf_fix_cppflags in
18966 (no)
18967         case $cf_add_cflags in
18968         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18969                 case $cf_add_cflags in
18970                 (-D*)
18971                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18972
18973                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18974                                 && test -z "${cf_tst_cflags}" \
18975                                 && cf_fix_cppflags=yes
18976
18977                         if test $cf_fix_cppflags = yes ; then
18978
18979         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18980         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18981
18982                                 continue
18983                         elif test "${cf_tst_cflags}" = "\"'" ; then
18984
18985         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18986         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18987
18988                                 continue
18989                         fi
18990                         ;;
18991                 esac
18992                 case "$CPPFLAGS" in
18993                 (*$cf_add_cflags)
18994                         ;;
18995                 (*)
18996                         case $cf_add_cflags in
18997                         (-D*)
18998                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18999
19000 CPPFLAGS=`echo "$CPPFLAGS" | \
19001         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19002                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19003
19004                                 ;;
19005                         esac
19006
19007         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19008         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19009
19010                         ;;
19011                 esac
19012                 ;;
19013         (*)
19014
19015         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19016         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19017
19018                 ;;
19019         esac
19020         ;;
19021 (yes)
19022
19023         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19024         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19025
19026         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19027
19028         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19029                 && test -z "${cf_tst_cflags}" \
19030                 && cf_fix_cppflags=no
19031         ;;
19032 esac
19033 done
19034
19035 if test -n "$cf_new_cflags" ; then
19036
19037         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19038         CFLAGS="${CFLAGS}$cf_new_cflags"
19039
19040 fi
19041
19042 if test -n "$cf_new_cppflags" ; then
19043
19044         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19045         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19046
19047 fi
19048
19049 if test -n "$cf_new_extra_cppflags" ; then
19050
19051         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19052         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19053
19054 fi
19055
19056 cf_add_libs="$cf_pkgconfig_libs"
19057 # Filter out duplicates - this happens with badly-designed ".pc" files...
19058 for cf_add_1lib in $LIBS
19059 do
19060         for cf_add_2lib in $cf_add_libs
19061         do
19062                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19063                 then
19064                         cf_add_1lib=
19065                         break
19066                 fi
19067         done
19068         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19069 done
19070 LIBS="$cf_add_libs"
19071
19072         :
19073 else
19074         cf_pkgconfig_incs=
19075         cf_pkgconfig_libs=
19076
19077         echo "$as_me:19077: checking for XextCreateExtension in -lXext" >&5
19078 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
19079 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
19080   echo $ECHO_N "(cached) $ECHO_C" >&6
19081 else
19082   ac_check_lib_save_LIBS=$LIBS
19083 LIBS="-lXext  $LIBS"
19084 cat >conftest.$ac_ext <<_ACEOF
19085 #line 19085 "configure"
19086 #include "confdefs.h"
19087
19088 /* Override any gcc2 internal prototype to avoid an error.  */
19089 #ifdef __cplusplus
19090 extern "C"
19091 #endif
19092 /* We use char because int might match the return type of a gcc2
19093    builtin and then its argument prototype would still apply.  */
19094 char XextCreateExtension ();
19095 int
19096 main (void)
19097 {
19098 XextCreateExtension ();
19099   ;
19100   return 0;
19101 }
19102 _ACEOF
19103 rm -f conftest.$ac_objext conftest$ac_exeext
19104 if { (eval echo "$as_me:19104: \"$ac_link\"") >&5
19105   (eval $ac_link) 2>&5
19106   ac_status=$?
19107   echo "$as_me:19107: \$? = $ac_status" >&5
19108   (exit $ac_status); } &&
19109          { ac_try='test -s conftest$ac_exeext'
19110   { (eval echo "$as_me:19110: \"$ac_try\"") >&5
19111   (eval $ac_try) 2>&5
19112   ac_status=$?
19113   echo "$as_me:19113: \$? = $ac_status" >&5
19114   (exit $ac_status); }; }; then
19115   ac_cv_lib_Xext_XextCreateExtension=yes
19116 else
19117   echo "$as_me: failed program was:" >&5
19118 cat conftest.$ac_ext >&5
19119 ac_cv_lib_Xext_XextCreateExtension=no
19120 fi
19121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19122 LIBS=$ac_check_lib_save_LIBS
19123 fi
19124 echo "$as_me:19124: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
19125 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
19126 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
19127
19128 cf_add_libs="-lXext"
19129 # Filter out duplicates - this happens with badly-designed ".pc" files...
19130 for cf_add_1lib in $LIBS
19131 do
19132         for cf_add_2lib in $cf_add_libs
19133         do
19134                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19135                 then
19136                         cf_add_1lib=
19137                         break
19138                 fi
19139         done
19140         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19141 done
19142 LIBS="$cf_add_libs"
19143
19144 fi
19145
19146 fi
19147
19148 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
19149 # in some cases has installed dummy files in the former, other cases replaced
19150 # it with a link to the new location).  This complicates the configure script.
19151 # Check for that pitfall, and recover using pkg-config
19152 #
19153 # If none of these are set, the configuration is almost certainly broken.
19154 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
19155 then
19156
19157 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
19158         test -n "$verbose" && echo "    found package x11" 1>&6
19159
19160 echo "${as_me:-configure}:19160: testing found package x11 ..." 1>&5
19161
19162         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
19163         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
19164         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
19165
19166 echo "${as_me:-configure}:19166: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19167
19168         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
19169
19170 echo "${as_me:-configure}:19170: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
19171
19172 cf_fix_cppflags=no
19173 cf_new_cflags=
19174 cf_new_cppflags=
19175 cf_new_extra_cppflags=
19176
19177 for cf_add_cflags in $cf_pkgconfig_incs
19178 do
19179 case $cf_fix_cppflags in
19180 (no)
19181         case $cf_add_cflags in
19182         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19183                 case $cf_add_cflags in
19184                 (-D*)
19185                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19186
19187                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19188                                 && test -z "${cf_tst_cflags}" \
19189                                 && cf_fix_cppflags=yes
19190
19191                         if test $cf_fix_cppflags = yes ; then
19192
19193         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19194         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19195
19196                                 continue
19197                         elif test "${cf_tst_cflags}" = "\"'" ; then
19198
19199         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19200         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19201
19202                                 continue
19203                         fi
19204                         ;;
19205                 esac
19206                 case "$CPPFLAGS" in
19207                 (*$cf_add_cflags)
19208                         ;;
19209                 (*)
19210                         case $cf_add_cflags in
19211                         (-D*)
19212                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19213
19214 CPPFLAGS=`echo "$CPPFLAGS" | \
19215         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19216                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19217
19218                                 ;;
19219                         esac
19220
19221         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19222         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19223
19224                         ;;
19225                 esac
19226                 ;;
19227         (*)
19228
19229         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19230         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19231
19232                 ;;
19233         esac
19234         ;;
19235 (yes)
19236
19237         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19238         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19239
19240         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19241
19242         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19243                 && test -z "${cf_tst_cflags}" \
19244                 && cf_fix_cppflags=no
19245         ;;
19246 esac
19247 done
19248
19249 if test -n "$cf_new_cflags" ; then
19250
19251         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19252         CFLAGS="${CFLAGS}$cf_new_cflags"
19253
19254 fi
19255
19256 if test -n "$cf_new_cppflags" ; then
19257
19258         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19259         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19260
19261 fi
19262
19263 if test -n "$cf_new_extra_cppflags" ; then
19264
19265         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19266         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19267
19268 fi
19269
19270 cf_add_libs="$cf_pkgconfig_libs"
19271 # Filter out duplicates - this happens with badly-designed ".pc" files...
19272 for cf_add_1lib in $LIBS
19273 do
19274         for cf_add_2lib in $cf_add_libs
19275         do
19276                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19277                 then
19278                         cf_add_1lib=
19279                         break
19280                 fi
19281         done
19282         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19283 done
19284 LIBS="$cf_add_libs"
19285
19286         :
19287 else
19288         cf_pkgconfig_incs=
19289         cf_pkgconfig_libs=
19290         { echo "$as_me:19290: WARNING: unable to find X11 library" >&5
19291 echo "$as_me: WARNING: unable to find X11 library" >&2;}
19292 fi
19293
19294 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
19295         test -n "$verbose" && echo "    found package ice" 1>&6
19296
19297 echo "${as_me:-configure}:19297: testing found package ice ..." 1>&5
19298
19299         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
19300         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
19301         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
19302
19303 echo "${as_me:-configure}:19303: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19304
19305         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
19306
19307 echo "${as_me:-configure}:19307: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
19308
19309 cf_fix_cppflags=no
19310 cf_new_cflags=
19311 cf_new_cppflags=
19312 cf_new_extra_cppflags=
19313
19314 for cf_add_cflags in $cf_pkgconfig_incs
19315 do
19316 case $cf_fix_cppflags in
19317 (no)
19318         case $cf_add_cflags in
19319         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19320                 case $cf_add_cflags in
19321                 (-D*)
19322                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19323
19324                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19325                                 && test -z "${cf_tst_cflags}" \
19326                                 && cf_fix_cppflags=yes
19327
19328                         if test $cf_fix_cppflags = yes ; then
19329
19330         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19331         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19332
19333                                 continue
19334                         elif test "${cf_tst_cflags}" = "\"'" ; then
19335
19336         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19337         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19338
19339                                 continue
19340                         fi
19341                         ;;
19342                 esac
19343                 case "$CPPFLAGS" in
19344                 (*$cf_add_cflags)
19345                         ;;
19346                 (*)
19347                         case $cf_add_cflags in
19348                         (-D*)
19349                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19350
19351 CPPFLAGS=`echo "$CPPFLAGS" | \
19352         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19353                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19354
19355                                 ;;
19356                         esac
19357
19358         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19359         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19360
19361                         ;;
19362                 esac
19363                 ;;
19364         (*)
19365
19366         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19367         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19368
19369                 ;;
19370         esac
19371         ;;
19372 (yes)
19373
19374         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19375         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19376
19377         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19378
19379         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19380                 && test -z "${cf_tst_cflags}" \
19381                 && cf_fix_cppflags=no
19382         ;;
19383 esac
19384 done
19385
19386 if test -n "$cf_new_cflags" ; then
19387
19388         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19389         CFLAGS="${CFLAGS}$cf_new_cflags"
19390
19391 fi
19392
19393 if test -n "$cf_new_cppflags" ; then
19394
19395         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19396         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19397
19398 fi
19399
19400 if test -n "$cf_new_extra_cppflags" ; then
19401
19402         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19403         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19404
19405 fi
19406
19407 cf_add_libs="$cf_pkgconfig_libs"
19408 # Filter out duplicates - this happens with badly-designed ".pc" files...
19409 for cf_add_1lib in $LIBS
19410 do
19411         for cf_add_2lib in $cf_add_libs
19412         do
19413                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19414                 then
19415                         cf_add_1lib=
19416                         break
19417                 fi
19418         done
19419         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19420 done
19421 LIBS="$cf_add_libs"
19422
19423         :
19424 else
19425         cf_pkgconfig_incs=
19426         cf_pkgconfig_libs=
19427         { echo "$as_me:19427: WARNING: unable to find ICE library" >&5
19428 echo "$as_me: WARNING: unable to find ICE library" >&2;}
19429 fi
19430
19431 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
19432         test -n "$verbose" && echo "    found package sm" 1>&6
19433
19434 echo "${as_me:-configure}:19434: testing found package sm ..." 1>&5
19435
19436         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
19437         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
19438         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
19439
19440 echo "${as_me:-configure}:19440: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19441
19442         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
19443
19444 echo "${as_me:-configure}:19444: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
19445
19446 cf_fix_cppflags=no
19447 cf_new_cflags=
19448 cf_new_cppflags=
19449 cf_new_extra_cppflags=
19450
19451 for cf_add_cflags in $cf_pkgconfig_incs
19452 do
19453 case $cf_fix_cppflags in
19454 (no)
19455         case $cf_add_cflags in
19456         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19457                 case $cf_add_cflags in
19458                 (-D*)
19459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19460
19461                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19462                                 && test -z "${cf_tst_cflags}" \
19463                                 && cf_fix_cppflags=yes
19464
19465                         if test $cf_fix_cppflags = yes ; then
19466
19467         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19468         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19469
19470                                 continue
19471                         elif test "${cf_tst_cflags}" = "\"'" ; then
19472
19473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19475
19476                                 continue
19477                         fi
19478                         ;;
19479                 esac
19480                 case "$CPPFLAGS" in
19481                 (*$cf_add_cflags)
19482                         ;;
19483                 (*)
19484                         case $cf_add_cflags in
19485                         (-D*)
19486                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19487
19488 CPPFLAGS=`echo "$CPPFLAGS" | \
19489         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19490                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19491
19492                                 ;;
19493                         esac
19494
19495         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19496         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19497
19498                         ;;
19499                 esac
19500                 ;;
19501         (*)
19502
19503         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19504         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19505
19506                 ;;
19507         esac
19508         ;;
19509 (yes)
19510
19511         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19512         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19513
19514         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19515
19516         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19517                 && test -z "${cf_tst_cflags}" \
19518                 && cf_fix_cppflags=no
19519         ;;
19520 esac
19521 done
19522
19523 if test -n "$cf_new_cflags" ; then
19524
19525         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19526         CFLAGS="${CFLAGS}$cf_new_cflags"
19527
19528 fi
19529
19530 if test -n "$cf_new_cppflags" ; then
19531
19532         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19533         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19534
19535 fi
19536
19537 if test -n "$cf_new_extra_cppflags" ; then
19538
19539         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19540         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19541
19542 fi
19543
19544 cf_add_libs="$cf_pkgconfig_libs"
19545 # Filter out duplicates - this happens with badly-designed ".pc" files...
19546 for cf_add_1lib in $LIBS
19547 do
19548         for cf_add_2lib in $cf_add_libs
19549         do
19550                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19551                 then
19552                         cf_add_1lib=
19553                         break
19554                 fi
19555         done
19556         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19557 done
19558 LIBS="$cf_add_libs"
19559
19560         :
19561 else
19562         cf_pkgconfig_incs=
19563         cf_pkgconfig_libs=
19564         { echo "$as_me:19564: WARNING: unable to find SM library" >&5
19565 echo "$as_me: WARNING: unable to find SM library" >&2;}
19566 fi
19567
19568 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
19569         test -n "$verbose" && echo "    found package xt" 1>&6
19570
19571 echo "${as_me:-configure}:19571: testing found package xt ..." 1>&5
19572
19573         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
19574         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
19575         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
19576
19577 echo "${as_me:-configure}:19577: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19578
19579         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
19580
19581 echo "${as_me:-configure}:19581: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
19582
19583 cf_fix_cppflags=no
19584 cf_new_cflags=
19585 cf_new_cppflags=
19586 cf_new_extra_cppflags=
19587
19588 for cf_add_cflags in $cf_pkgconfig_incs
19589 do
19590 case $cf_fix_cppflags in
19591 (no)
19592         case $cf_add_cflags in
19593         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19594                 case $cf_add_cflags in
19595                 (-D*)
19596                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19597
19598                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19599                                 && test -z "${cf_tst_cflags}" \
19600                                 && cf_fix_cppflags=yes
19601
19602                         if test $cf_fix_cppflags = yes ; then
19603
19604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19606
19607                                 continue
19608                         elif test "${cf_tst_cflags}" = "\"'" ; then
19609
19610         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19611         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19612
19613                                 continue
19614                         fi
19615                         ;;
19616                 esac
19617                 case "$CPPFLAGS" in
19618                 (*$cf_add_cflags)
19619                         ;;
19620                 (*)
19621                         case $cf_add_cflags in
19622                         (-D*)
19623                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19624
19625 CPPFLAGS=`echo "$CPPFLAGS" | \
19626         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19627                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19628
19629                                 ;;
19630                         esac
19631
19632         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19633         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19634
19635                         ;;
19636                 esac
19637                 ;;
19638         (*)
19639
19640         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19641         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19642
19643                 ;;
19644         esac
19645         ;;
19646 (yes)
19647
19648         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19649         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19650
19651         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19652
19653         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19654                 && test -z "${cf_tst_cflags}" \
19655                 && cf_fix_cppflags=no
19656         ;;
19657 esac
19658 done
19659
19660 if test -n "$cf_new_cflags" ; then
19661
19662         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19663         CFLAGS="${CFLAGS}$cf_new_cflags"
19664
19665 fi
19666
19667 if test -n "$cf_new_cppflags" ; then
19668
19669         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19670         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19671
19672 fi
19673
19674 if test -n "$cf_new_extra_cppflags" ; then
19675
19676         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19677         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19678
19679 fi
19680
19681 cf_add_libs="$cf_pkgconfig_libs"
19682 # Filter out duplicates - this happens with badly-designed ".pc" files...
19683 for cf_add_1lib in $LIBS
19684 do
19685         for cf_add_2lib in $cf_add_libs
19686         do
19687                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19688                 then
19689                         cf_add_1lib=
19690                         break
19691                 fi
19692         done
19693         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19694 done
19695 LIBS="$cf_add_libs"
19696
19697         :
19698 else
19699         cf_pkgconfig_incs=
19700         cf_pkgconfig_libs=
19701         { echo "$as_me:19701: WARNING: unable to find Xt library" >&5
19702 echo "$as_me: WARNING: unable to find Xt library" >&2;}
19703 fi
19704
19705 fi
19706
19707 cf_have_X_LIBS=no
19708
19709 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
19710         test -n "$verbose" && echo "    found package xt" 1>&6
19711
19712 echo "${as_me:-configure}:19712: testing found package xt ..." 1>&5
19713
19714         cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
19715         cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
19716         test -n "$verbose" && echo "    package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
19717
19718 echo "${as_me:-configure}:19718: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19719
19720         test -n "$verbose" && echo "    package xt LIBS: $cf_pkgconfig_libs" 1>&6
19721
19722 echo "${as_me:-configure}:19722: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
19723
19724 cf_fix_cppflags=no
19725 cf_new_cflags=
19726 cf_new_cppflags=
19727 cf_new_extra_cppflags=
19728
19729 for cf_add_cflags in $cf_pkgconfig_incs
19730 do
19731 case $cf_fix_cppflags in
19732 (no)
19733         case $cf_add_cflags in
19734         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19735                 case $cf_add_cflags in
19736                 (-D*)
19737                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19738
19739                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19740                                 && test -z "${cf_tst_cflags}" \
19741                                 && cf_fix_cppflags=yes
19742
19743                         if test $cf_fix_cppflags = yes ; then
19744
19745         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19746         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19747
19748                                 continue
19749                         elif test "${cf_tst_cflags}" = "\"'" ; then
19750
19751         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19752         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19753
19754                                 continue
19755                         fi
19756                         ;;
19757                 esac
19758                 case "$CPPFLAGS" in
19759                 (*$cf_add_cflags)
19760                         ;;
19761                 (*)
19762                         case $cf_add_cflags in
19763                         (-D*)
19764                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19765
19766 CPPFLAGS=`echo "$CPPFLAGS" | \
19767         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19768                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19769
19770                                 ;;
19771                         esac
19772
19773         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19774         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19775
19776                         ;;
19777                 esac
19778                 ;;
19779         (*)
19780
19781         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19782         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19783
19784                 ;;
19785         esac
19786         ;;
19787 (yes)
19788
19789         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19790         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19791
19792         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19793
19794         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19795                 && test -z "${cf_tst_cflags}" \
19796                 && cf_fix_cppflags=no
19797         ;;
19798 esac
19799 done
19800
19801 if test -n "$cf_new_cflags" ; then
19802
19803         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19804         CFLAGS="${CFLAGS}$cf_new_cflags"
19805
19806 fi
19807
19808 if test -n "$cf_new_cppflags" ; then
19809
19810         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19811         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19812
19813 fi
19814
19815 if test -n "$cf_new_extra_cppflags" ; then
19816
19817         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19818         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19819
19820 fi
19821
19822 cf_add_libs="$cf_pkgconfig_libs"
19823 # Filter out duplicates - this happens with badly-designed ".pc" files...
19824 for cf_add_1lib in $LIBS
19825 do
19826         for cf_add_2lib in $cf_add_libs
19827         do
19828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19829                 then
19830                         cf_add_1lib=
19831                         break
19832                 fi
19833         done
19834         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19835 done
19836 LIBS="$cf_add_libs"
19837
19838         case "x$LIBS" in
19839         (*-lX11*)
19840                 ;;
19841         (*)
19842 # we have an "xt" package, but it may omit Xt's dependency on X11
19843 echo "$as_me:19843: checking for usable X dependency" >&5
19844 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
19845 if test "${cf_cv_xt_x11_compat+set}" = set; then
19846   echo $ECHO_N "(cached) $ECHO_C" >&6
19847 else
19848
19849 cat >conftest.$ac_ext <<_ACEOF
19850 #line 19850 "configure"
19851 #include "confdefs.h"
19852
19853 #include <X11/Xlib.h>
19854
19855 int
19856 main (void)
19857 {
19858
19859         int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
19860         int rc2 = XClearWindow((Display*) 0, (Window) 0);
19861         int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
19862         int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
19863
19864   ;
19865   return 0;
19866 }
19867 _ACEOF
19868 rm -f conftest.$ac_objext conftest$ac_exeext
19869 if { (eval echo "$as_me:19869: \"$ac_link\"") >&5
19870   (eval $ac_link) 2>&5
19871   ac_status=$?
19872   echo "$as_me:19872: \$? = $ac_status" >&5
19873   (exit $ac_status); } &&
19874          { ac_try='test -s conftest$ac_exeext'
19875   { (eval echo "$as_me:19875: \"$ac_try\"") >&5
19876   (eval $ac_try) 2>&5
19877   ac_status=$?
19878   echo "$as_me:19878: \$? = $ac_status" >&5
19879   (exit $ac_status); }; }; then
19880   cf_cv_xt_x11_compat=yes
19881 else
19882   echo "$as_me: failed program was:" >&5
19883 cat conftest.$ac_ext >&5
19884 cf_cv_xt_x11_compat=no
19885 fi
19886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19887 fi
19888 echo "$as_me:19888: result: $cf_cv_xt_x11_compat" >&5
19889 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
19890                 if test "$cf_cv_xt_x11_compat" = no
19891                 then
19892                         test -n "$verbose" && echo "    work around broken X11 dependency" 1>&6
19893
19894 echo "${as_me:-configure}:19894: testing work around broken X11 dependency ..." 1>&5
19895
19896                         # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
19897
19898 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
19899         test -n "$verbose" && echo "    found package x11" 1>&6
19900
19901 echo "${as_me:-configure}:19901: testing found package x11 ..." 1>&5
19902
19903         cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
19904         cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
19905         test -n "$verbose" && echo "    package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
19906
19907 echo "${as_me:-configure}:19907: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19908
19909         test -n "$verbose" && echo "    package x11 LIBS: $cf_pkgconfig_libs" 1>&6
19910
19911 echo "${as_me:-configure}:19911: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
19912
19913 cf_fix_cppflags=no
19914 cf_new_cflags=
19915 cf_new_cppflags=
19916 cf_new_extra_cppflags=
19917
19918 for cf_add_cflags in $cf_pkgconfig_incs
19919 do
19920 case $cf_fix_cppflags in
19921 (no)
19922         case $cf_add_cflags in
19923         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19924                 case $cf_add_cflags in
19925                 (-D*)
19926                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19927
19928                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19929                                 && test -z "${cf_tst_cflags}" \
19930                                 && cf_fix_cppflags=yes
19931
19932                         if test $cf_fix_cppflags = yes ; then
19933
19934         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19935         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19936
19937                                 continue
19938                         elif test "${cf_tst_cflags}" = "\"'" ; then
19939
19940         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19941         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19942
19943                                 continue
19944                         fi
19945                         ;;
19946                 esac
19947                 case "$CPPFLAGS" in
19948                 (*$cf_add_cflags)
19949                         ;;
19950                 (*)
19951                         case $cf_add_cflags in
19952                         (-D*)
19953                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19954
19955 CPPFLAGS=`echo "$CPPFLAGS" | \
19956         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19957                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19958
19959                                 ;;
19960                         esac
19961
19962         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19963         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19964
19965                         ;;
19966                 esac
19967                 ;;
19968         (*)
19969
19970         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19971         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19972
19973                 ;;
19974         esac
19975         ;;
19976 (yes)
19977
19978         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19979         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19980
19981         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19982
19983         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19984                 && test -z "${cf_tst_cflags}" \
19985                 && cf_fix_cppflags=no
19986         ;;
19987 esac
19988 done
19989
19990 if test -n "$cf_new_cflags" ; then
19991
19992         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19993         CFLAGS="${CFLAGS}$cf_new_cflags"
19994
19995 fi
19996
19997 if test -n "$cf_new_cppflags" ; then
19998
19999         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20000         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20001
20002 fi
20003
20004 if test -n "$cf_new_extra_cppflags" ; then
20005
20006         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20007         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20008
20009 fi
20010
20011 cf_add_libs="$cf_pkgconfig_libs"
20012 # Filter out duplicates - this happens with badly-designed ".pc" files...
20013 for cf_add_1lib in $LIBS
20014 do
20015         for cf_add_2lib in $cf_add_libs
20016         do
20017                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20018                 then
20019                         cf_add_1lib=
20020                         break
20021                 fi
20022         done
20023         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20024 done
20025 LIBS="$cf_add_libs"
20026
20027         :
20028 else
20029         cf_pkgconfig_incs=
20030         cf_pkgconfig_libs=
20031
20032 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
20033
20034 echo "${as_me:-configure}:20034: testing ...before $LIBS ..." 1>&5
20035
20036 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
20037 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
20038
20039 echo "${as_me:-configure}:20039: testing ...after  $LIBS ..." 1>&5
20040
20041 fi
20042
20043                 fi
20044                 ;;
20045         esac
20046
20047 echo "$as_me:20047: checking for usable X Toolkit package" >&5
20048 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
20049 if test "${cf_cv_xt_ice_compat+set}" = set; then
20050   echo $ECHO_N "(cached) $ECHO_C" >&6
20051 else
20052
20053 cat >conftest.$ac_ext <<_ACEOF
20054 #line 20054 "configure"
20055 #include "confdefs.h"
20056
20057 #include <X11/Shell.h>
20058
20059 int
20060 main (void)
20061 {
20062 int num = IceConnectionNumber(0)
20063
20064   ;
20065   return 0;
20066 }
20067 _ACEOF
20068 rm -f conftest.$ac_objext conftest$ac_exeext
20069 if { (eval echo "$as_me:20069: \"$ac_link\"") >&5
20070   (eval $ac_link) 2>&5
20071   ac_status=$?
20072   echo "$as_me:20072: \$? = $ac_status" >&5
20073   (exit $ac_status); } &&
20074          { ac_try='test -s conftest$ac_exeext'
20075   { (eval echo "$as_me:20075: \"$ac_try\"") >&5
20076   (eval $ac_try) 2>&5
20077   ac_status=$?
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit $ac_status); }; }; then
20080   cf_cv_xt_ice_compat=yes
20081 else
20082   echo "$as_me: failed program was:" >&5
20083 cat conftest.$ac_ext >&5
20084 cf_cv_xt_ice_compat=no
20085 fi
20086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20087 fi
20088 echo "$as_me:20088: result: $cf_cv_xt_ice_compat" >&5
20089 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
20090
20091         if test "$cf_cv_xt_ice_compat" = no
20092         then
20093                 # workaround for broken ".pc" files used for X Toolkit.
20094                 case "x$X_PRE_LIBS" in
20095                 (*-lICE*)
20096                         case "x$LIBS" in
20097                         (*-lICE*)
20098                                 ;;
20099                         (*)
20100                                 test -n "$verbose" && echo "    work around broken ICE dependency" 1>&6
20101
20102 echo "${as_me:-configure}:20102: testing work around broken ICE dependency ..." 1>&5
20103
20104 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
20105         test -n "$verbose" && echo "    found package ice" 1>&6
20106
20107 echo "${as_me:-configure}:20107: testing found package ice ..." 1>&5
20108
20109         cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
20110         cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
20111         test -n "$verbose" && echo "    package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
20112
20113 echo "${as_me:-configure}:20113: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20114
20115         test -n "$verbose" && echo "    package ice LIBS: $cf_pkgconfig_libs" 1>&6
20116
20117 echo "${as_me:-configure}:20117: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
20118
20119 cf_fix_cppflags=no
20120 cf_new_cflags=
20121 cf_new_cppflags=
20122 cf_new_extra_cppflags=
20123
20124 for cf_add_cflags in $cf_pkgconfig_incs
20125 do
20126 case $cf_fix_cppflags in
20127 (no)
20128         case $cf_add_cflags in
20129         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20130                 case $cf_add_cflags in
20131                 (-D*)
20132                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20133
20134                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20135                                 && test -z "${cf_tst_cflags}" \
20136                                 && cf_fix_cppflags=yes
20137
20138                         if test $cf_fix_cppflags = yes ; then
20139
20140         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20141         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20142
20143                                 continue
20144                         elif test "${cf_tst_cflags}" = "\"'" ; then
20145
20146         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20147         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20148
20149                                 continue
20150                         fi
20151                         ;;
20152                 esac
20153                 case "$CPPFLAGS" in
20154                 (*$cf_add_cflags)
20155                         ;;
20156                 (*)
20157                         case $cf_add_cflags in
20158                         (-D*)
20159                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20160
20161 CPPFLAGS=`echo "$CPPFLAGS" | \
20162         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20163                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20164
20165                                 ;;
20166                         esac
20167
20168         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20169         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20170
20171                         ;;
20172                 esac
20173                 ;;
20174         (*)
20175
20176         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20177         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20178
20179                 ;;
20180         esac
20181         ;;
20182 (yes)
20183
20184         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20185         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20186
20187         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20188
20189         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20190                 && test -z "${cf_tst_cflags}" \
20191                 && cf_fix_cppflags=no
20192         ;;
20193 esac
20194 done
20195
20196 if test -n "$cf_new_cflags" ; then
20197
20198         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20199         CFLAGS="${CFLAGS}$cf_new_cflags"
20200
20201 fi
20202
20203 if test -n "$cf_new_cppflags" ; then
20204
20205         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20206         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20207
20208 fi
20209
20210 if test -n "$cf_new_extra_cppflags" ; then
20211
20212         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20213         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20214
20215 fi
20216
20217 cf_add_libs="$cf_pkgconfig_libs"
20218 # Filter out duplicates - this happens with badly-designed ".pc" files...
20219 for cf_add_1lib in $LIBS
20220 do
20221         for cf_add_2lib in $cf_add_libs
20222         do
20223                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20224                 then
20225                         cf_add_1lib=
20226                         break
20227                 fi
20228         done
20229         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20230 done
20231 LIBS="$cf_add_libs"
20232
20233 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
20234         test -n "$verbose" && echo "    found package sm" 1>&6
20235
20236 echo "${as_me:-configure}:20236: testing found package sm ..." 1>&5
20237
20238         cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
20239         cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
20240         test -n "$verbose" && echo "    package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
20241
20242 echo "${as_me:-configure}:20242: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20243
20244         test -n "$verbose" && echo "    package sm LIBS: $cf_pkgconfig_libs" 1>&6
20245
20246 echo "${as_me:-configure}:20246: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
20247
20248 cf_fix_cppflags=no
20249 cf_new_cflags=
20250 cf_new_cppflags=
20251 cf_new_extra_cppflags=
20252
20253 for cf_add_cflags in $cf_pkgconfig_incs
20254 do
20255 case $cf_fix_cppflags in
20256 (no)
20257         case $cf_add_cflags in
20258         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20259                 case $cf_add_cflags in
20260                 (-D*)
20261                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20262
20263                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20264                                 && test -z "${cf_tst_cflags}" \
20265                                 && cf_fix_cppflags=yes
20266
20267                         if test $cf_fix_cppflags = yes ; then
20268
20269         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20270         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20271
20272                                 continue
20273                         elif test "${cf_tst_cflags}" = "\"'" ; then
20274
20275         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20276         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20277
20278                                 continue
20279                         fi
20280                         ;;
20281                 esac
20282                 case "$CPPFLAGS" in
20283                 (*$cf_add_cflags)
20284                         ;;
20285                 (*)
20286                         case $cf_add_cflags in
20287                         (-D*)
20288                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20289
20290 CPPFLAGS=`echo "$CPPFLAGS" | \
20291         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20292                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20293
20294                                 ;;
20295                         esac
20296
20297         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20298         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20299
20300                         ;;
20301                 esac
20302                 ;;
20303         (*)
20304
20305         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20306         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20307
20308                 ;;
20309         esac
20310         ;;
20311 (yes)
20312
20313         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20314         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20315
20316         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20317
20318         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20319                 && test -z "${cf_tst_cflags}" \
20320                 && cf_fix_cppflags=no
20321         ;;
20322 esac
20323 done
20324
20325 if test -n "$cf_new_cflags" ; then
20326
20327         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20328         CFLAGS="${CFLAGS}$cf_new_cflags"
20329
20330 fi
20331
20332 if test -n "$cf_new_cppflags" ; then
20333
20334         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20335         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20336
20337 fi
20338
20339 if test -n "$cf_new_extra_cppflags" ; then
20340
20341         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20342         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20343
20344 fi
20345
20346 cf_add_libs="$cf_pkgconfig_libs"
20347 # Filter out duplicates - this happens with badly-designed ".pc" files...
20348 for cf_add_1lib in $LIBS
20349 do
20350         for cf_add_2lib in $cf_add_libs
20351         do
20352                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20353                 then
20354                         cf_add_1lib=
20355                         break
20356                 fi
20357         done
20358         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20359 done
20360 LIBS="$cf_add_libs"
20361
20362         :
20363 else
20364         cf_pkgconfig_incs=
20365         cf_pkgconfig_libs=
20366         :
20367 fi
20368
20369 else
20370         cf_pkgconfig_incs=
20371         cf_pkgconfig_libs=
20372
20373 test -n "$verbose" && echo "    ...before $LIBS" 1>&6
20374
20375 echo "${as_me:-configure}:20375: testing ...before $LIBS ..." 1>&5
20376
20377 LIBS=`echo "$LIBS" | sed -e "s/[        ][      ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
20378 test -n "$verbose" && echo "    ...after  $LIBS" 1>&6
20379
20380 echo "${as_me:-configure}:20380: testing ...after  $LIBS ..." 1>&5
20381
20382 fi
20383
20384                                 ;;
20385                         esac
20386                         ;;
20387                 esac
20388         fi
20389
20390         cf_have_X_LIBS=yes
20391
20392 else
20393         cf_pkgconfig_incs=
20394         cf_pkgconfig_libs=
20395
20396         LDFLAGS="$X_LIBS $LDFLAGS"
20397
20398 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
20399
20400 echo "${as_me:-configure}:20400: testing checking additions to CFLAGS ..." 1>&5
20401
20402 cf_check_cflags="$CFLAGS"
20403 cf_check_cppflags="$CPPFLAGS"
20404
20405 cf_fix_cppflags=no
20406 cf_new_cflags=
20407 cf_new_cppflags=
20408 cf_new_extra_cppflags=
20409
20410 for cf_add_cflags in $X_CFLAGS
20411 do
20412 case $cf_fix_cppflags in
20413 (no)
20414         case $cf_add_cflags in
20415         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20416                 case $cf_add_cflags in
20417                 (-D*)
20418                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20419
20420                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20421                                 && test -z "${cf_tst_cflags}" \
20422                                 && cf_fix_cppflags=yes
20423
20424                         if test $cf_fix_cppflags = yes ; then
20425
20426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20428
20429                                 continue
20430                         elif test "${cf_tst_cflags}" = "\"'" ; then
20431
20432         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20433         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20434
20435                                 continue
20436                         fi
20437                         ;;
20438                 esac
20439                 case "$CPPFLAGS" in
20440                 (*$cf_add_cflags)
20441                         ;;
20442                 (*)
20443                         case $cf_add_cflags in
20444                         (-D*)
20445                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20446
20447 CPPFLAGS=`echo "$CPPFLAGS" | \
20448         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20449                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20450
20451                                 ;;
20452                         esac
20453
20454         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20455         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20456
20457                         ;;
20458                 esac
20459                 ;;
20460         (*)
20461
20462         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20463         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20464
20465                 ;;
20466         esac
20467         ;;
20468 (yes)
20469
20470         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20471         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20472
20473         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20474
20475         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20476                 && test -z "${cf_tst_cflags}" \
20477                 && cf_fix_cppflags=no
20478         ;;
20479 esac
20480 done
20481
20482 if test -n "$cf_new_cflags" ; then
20483         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
20484
20485 echo "${as_me:-configure}:20485: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
20486
20487         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20488         CFLAGS="${CFLAGS}$cf_new_cflags"
20489
20490 fi
20491
20492 if test -n "$cf_new_cppflags" ; then
20493         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
20494
20495 echo "${as_me:-configure}:20495: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
20496
20497         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20498         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20499
20500 fi
20501
20502 if test -n "$cf_new_extra_cppflags" ; then
20503         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
20504
20505 echo "${as_me:-configure}:20505: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
20506
20507         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20508         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20509
20510 fi
20511
20512 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
20513 cat >conftest.$ac_ext <<_ACEOF
20514 #line 20514 "configure"
20515 #include "confdefs.h"
20516 #include <stdio.h>
20517 int
20518 main (void)
20519 {
20520 printf("Hello world");
20521   ;
20522   return 0;
20523 }
20524 _ACEOF
20525 rm -f conftest.$ac_objext conftest$ac_exeext
20526 if { (eval echo "$as_me:20526: \"$ac_link\"") >&5
20527   (eval $ac_link) 2>&5
20528   ac_status=$?
20529   echo "$as_me:20529: \$? = $ac_status" >&5
20530   (exit $ac_status); } &&
20531          { ac_try='test -s conftest$ac_exeext'
20532   { (eval echo "$as_me:20532: \"$ac_try\"") >&5
20533   (eval $ac_try) 2>&5
20534   ac_status=$?
20535   echo "$as_me:20535: \$? = $ac_status" >&5
20536   (exit $ac_status); }; }; then
20537   :
20538 else
20539   echo "$as_me: failed program was:" >&5
20540 cat conftest.$ac_ext >&5
20541 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
20542
20543 echo "${as_me:-configure}:20543: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
20544
20545          if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
20546                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
20547
20548 echo "${as_me:-configure}:20548: testing but keeping change to \$CPPFLAGS ..." 1>&5
20549
20550          fi
20551          CFLAGS="$cf_check_flags"
20552 fi
20553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20554 fi
20555
20556         echo "$as_me:20556: checking for XOpenDisplay" >&5
20557 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
20558 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
20559   echo $ECHO_N "(cached) $ECHO_C" >&6
20560 else
20561   cat >conftest.$ac_ext <<_ACEOF
20562 #line 20562 "configure"
20563 #include "confdefs.h"
20564 /* System header to define __stub macros and hopefully few prototypes,
20565     which can conflict with char XOpenDisplay (); below.  */
20566 #include <assert.h>
20567 /* Override any gcc2 internal prototype to avoid an error.  */
20568 #ifdef __cplusplus
20569 extern "C"
20570 #endif
20571 /* We use char because int might match the return type of a gcc2
20572    builtin and then its argument prototype would still apply.  */
20573 char XOpenDisplay ();
20574 char (*f) ();
20575
20576 int
20577 main (void)
20578 {
20579 /* The GNU C library defines this for functions which it implements
20580     to always fail with ENOSYS.  Some functions are actually named
20581     something starting with __ and the normal name is an alias.  */
20582 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
20583 choke me
20584 #else
20585 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20586 #endif
20587
20588   ;
20589   return 0;
20590 }
20591 _ACEOF
20592 rm -f conftest.$ac_objext conftest$ac_exeext
20593 if { (eval echo "$as_me:20593: \"$ac_link\"") >&5
20594   (eval $ac_link) 2>&5
20595   ac_status=$?
20596   echo "$as_me:20596: \$? = $ac_status" >&5
20597   (exit $ac_status); } &&
20598          { ac_try='test -s conftest$ac_exeext'
20599   { (eval echo "$as_me:20599: \"$ac_try\"") >&5
20600   (eval $ac_try) 2>&5
20601   ac_status=$?
20602   echo "$as_me:20602: \$? = $ac_status" >&5
20603   (exit $ac_status); }; }; then
20604   ac_cv_func_XOpenDisplay=yes
20605 else
20606   echo "$as_me: failed program was:" >&5
20607 cat conftest.$ac_ext >&5
20608 ac_cv_func_XOpenDisplay=no
20609 fi
20610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20611 fi
20612 echo "$as_me:20612: result: $ac_cv_func_XOpenDisplay" >&5
20613 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
20614 if test $ac_cv_func_XOpenDisplay = yes; then
20615   :
20616 else
20617
20618         echo "$as_me:20618: checking for XOpenDisplay in -lX11" >&5
20619 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
20620 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
20621   echo $ECHO_N "(cached) $ECHO_C" >&6
20622 else
20623   ac_check_lib_save_LIBS=$LIBS
20624 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
20625 cat >conftest.$ac_ext <<_ACEOF
20626 #line 20626 "configure"
20627 #include "confdefs.h"
20628
20629 /* Override any gcc2 internal prototype to avoid an error.  */
20630 #ifdef __cplusplus
20631 extern "C"
20632 #endif
20633 /* We use char because int might match the return type of a gcc2
20634    builtin and then its argument prototype would still apply.  */
20635 char XOpenDisplay ();
20636 int
20637 main (void)
20638 {
20639 XOpenDisplay ();
20640   ;
20641   return 0;
20642 }
20643 _ACEOF
20644 rm -f conftest.$ac_objext conftest$ac_exeext
20645 if { (eval echo "$as_me:20645: \"$ac_link\"") >&5
20646   (eval $ac_link) 2>&5
20647   ac_status=$?
20648   echo "$as_me:20648: \$? = $ac_status" >&5
20649   (exit $ac_status); } &&
20650          { ac_try='test -s conftest$ac_exeext'
20651   { (eval echo "$as_me:20651: \"$ac_try\"") >&5
20652   (eval $ac_try) 2>&5
20653   ac_status=$?
20654   echo "$as_me:20654: \$? = $ac_status" >&5
20655   (exit $ac_status); }; }; then
20656   ac_cv_lib_X11_XOpenDisplay=yes
20657 else
20658   echo "$as_me: failed program was:" >&5
20659 cat conftest.$ac_ext >&5
20660 ac_cv_lib_X11_XOpenDisplay=no
20661 fi
20662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20663 LIBS=$ac_check_lib_save_LIBS
20664 fi
20665 echo "$as_me:20665: result: $ac_cv_lib_X11_XOpenDisplay" >&5
20666 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
20667 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
20668
20669 cf_add_libs="-lX11"
20670 # Filter out duplicates - this happens with badly-designed ".pc" files...
20671 for cf_add_1lib in $LIBS
20672 do
20673         for cf_add_2lib in $cf_add_libs
20674         do
20675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20676                 then
20677                         cf_add_1lib=
20678                         break
20679                 fi
20680         done
20681         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20682 done
20683 LIBS="$cf_add_libs"
20684
20685 fi
20686
20687 fi
20688
20689         echo "$as_me:20689: checking for XtAppInitialize" >&5
20690 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
20691 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
20692   echo $ECHO_N "(cached) $ECHO_C" >&6
20693 else
20694   cat >conftest.$ac_ext <<_ACEOF
20695 #line 20695 "configure"
20696 #include "confdefs.h"
20697 /* System header to define __stub macros and hopefully few prototypes,
20698     which can conflict with char XtAppInitialize (); below.  */
20699 #include <assert.h>
20700 /* Override any gcc2 internal prototype to avoid an error.  */
20701 #ifdef __cplusplus
20702 extern "C"
20703 #endif
20704 /* We use char because int might match the return type of a gcc2
20705    builtin and then its argument prototype would still apply.  */
20706 char XtAppInitialize ();
20707 char (*f) ();
20708
20709 int
20710 main (void)
20711 {
20712 /* The GNU C library defines this for functions which it implements
20713     to always fail with ENOSYS.  Some functions are actually named
20714     something starting with __ and the normal name is an alias.  */
20715 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
20716 choke me
20717 #else
20718 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20719 #endif
20720
20721   ;
20722   return 0;
20723 }
20724 _ACEOF
20725 rm -f conftest.$ac_objext conftest$ac_exeext
20726 if { (eval echo "$as_me:20726: \"$ac_link\"") >&5
20727   (eval $ac_link) 2>&5
20728   ac_status=$?
20729   echo "$as_me:20729: \$? = $ac_status" >&5
20730   (exit $ac_status); } &&
20731          { ac_try='test -s conftest$ac_exeext'
20732   { (eval echo "$as_me:20732: \"$ac_try\"") >&5
20733   (eval $ac_try) 2>&5
20734   ac_status=$?
20735   echo "$as_me:20735: \$? = $ac_status" >&5
20736   (exit $ac_status); }; }; then
20737   ac_cv_func_XtAppInitialize=yes
20738 else
20739   echo "$as_me: failed program was:" >&5
20740 cat conftest.$ac_ext >&5
20741 ac_cv_func_XtAppInitialize=no
20742 fi
20743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20744 fi
20745 echo "$as_me:20745: result: $ac_cv_func_XtAppInitialize" >&5
20746 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
20747 if test $ac_cv_func_XtAppInitialize = yes; then
20748   :
20749 else
20750
20751         echo "$as_me:20751: checking for XtAppInitialize in -lXt" >&5
20752 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
20753 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
20754   echo $ECHO_N "(cached) $ECHO_C" >&6
20755 else
20756   ac_check_lib_save_LIBS=$LIBS
20757 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
20758 cat >conftest.$ac_ext <<_ACEOF
20759 #line 20759 "configure"
20760 #include "confdefs.h"
20761
20762 /* Override any gcc2 internal prototype to avoid an error.  */
20763 #ifdef __cplusplus
20764 extern "C"
20765 #endif
20766 /* We use char because int might match the return type of a gcc2
20767    builtin and then its argument prototype would still apply.  */
20768 char XtAppInitialize ();
20769 int
20770 main (void)
20771 {
20772 XtAppInitialize ();
20773   ;
20774   return 0;
20775 }
20776 _ACEOF
20777 rm -f conftest.$ac_objext conftest$ac_exeext
20778 if { (eval echo "$as_me:20778: \"$ac_link\"") >&5
20779   (eval $ac_link) 2>&5
20780   ac_status=$?
20781   echo "$as_me:20781: \$? = $ac_status" >&5
20782   (exit $ac_status); } &&
20783          { ac_try='test -s conftest$ac_exeext'
20784   { (eval echo "$as_me:20784: \"$ac_try\"") >&5
20785   (eval $ac_try) 2>&5
20786   ac_status=$?
20787   echo "$as_me:20787: \$? = $ac_status" >&5
20788   (exit $ac_status); }; }; then
20789   ac_cv_lib_Xt_XtAppInitialize=yes
20790 else
20791   echo "$as_me: failed program was:" >&5
20792 cat conftest.$ac_ext >&5
20793 ac_cv_lib_Xt_XtAppInitialize=no
20794 fi
20795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20796 LIBS=$ac_check_lib_save_LIBS
20797 fi
20798 echo "$as_me:20798: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
20799 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
20800 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
20801
20802 cat >>confdefs.h <<\EOF
20803 #define HAVE_LIBXT 1
20804 EOF
20805
20806                  cf_have_X_LIBS=Xt
20807                  LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
20808 fi
20809
20810 fi
20811
20812 fi
20813
20814 if test $cf_have_X_LIBS = no ; then
20815         { echo "$as_me:20815: WARNING: Unable to successfully link X Toolkit library (-lXt) with
20816 test program.  You will have to check and add the proper libraries by hand
20817 to makefile." >&5
20818 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
20819 test program.  You will have to check and add the proper libraries by hand
20820 to makefile." >&2;}
20821 fi
20822
20823 cf_x_athena_root=$cf_x_athena
20824 cf_x_athena_inc=""
20825
20826 for cf_path in default \
20827         /usr/contrib/X11R6 \
20828         /usr/contrib/X11R5 \
20829         /usr/lib/X11R5 \
20830         /usr/local
20831 do
20832         if test -z "$cf_x_athena_inc" ; then
20833                 cf_save="$CPPFLAGS"
20834                 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
20835                 if test $cf_path != default ; then
20836                         CPPFLAGS="$cf_save"
20837
20838         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20839         CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
20840
20841                         echo "$as_me:20841: checking for $cf_test in $cf_path" >&5
20842 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
20843                 else
20844                         echo "$as_me:20844: checking for $cf_test" >&5
20845 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
20846                 fi
20847                 cat >conftest.$ac_ext <<_ACEOF
20848 #line 20848 "configure"
20849 #include "confdefs.h"
20850
20851 #include <X11/Intrinsic.h>
20852 #include <$cf_test>
20853 int
20854 main (void)
20855 {
20856
20857   ;
20858   return 0;
20859 }
20860 _ACEOF
20861 rm -f conftest.$ac_objext
20862 if { (eval echo "$as_me:20862: \"$ac_compile\"") >&5
20863   (eval $ac_compile) 2>&5
20864   ac_status=$?
20865   echo "$as_me:20865: \$? = $ac_status" >&5
20866   (exit $ac_status); } &&
20867          { ac_try='test -s conftest.$ac_objext'
20868   { (eval echo "$as_me:20868: \"$ac_try\"") >&5
20869   (eval $ac_try) 2>&5
20870   ac_status=$?
20871   echo "$as_me:20871: \$? = $ac_status" >&5
20872   (exit $ac_status); }; }; then
20873   cf_result=yes
20874 else
20875   echo "$as_me: failed program was:" >&5
20876 cat conftest.$ac_ext >&5
20877 cf_result=no
20878 fi
20879 rm -f conftest.$ac_objext conftest.$ac_ext
20880                 echo "$as_me:20880: result: $cf_result" >&5
20881 echo "${ECHO_T}$cf_result" >&6
20882                 if test "$cf_result" = yes ; then
20883                         cf_x_athena_inc=$cf_path
20884                         break
20885                 else
20886                         CPPFLAGS="$cf_save"
20887                 fi
20888         fi
20889 done
20890
20891 if test -z "$cf_x_athena_inc" ; then
20892         { echo "$as_me:20892: WARNING: Unable to successfully find Athena header files with test program" >&5
20893 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
20894 elif test "$cf_x_athena_inc" != default ; then
20895
20896         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20897         CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
20898
20899 fi
20900
20901 cf_x_athena_root=$cf_x_athena
20902 cf_x_athena_lib=""
20903
20904 for cf_path in default \
20905         /usr/contrib/X11R6 \
20906         /usr/contrib/X11R5 \
20907         /usr/lib/X11R5 \
20908         /usr/local
20909 do
20910         for cf_lib in \
20911                 ${cf_x_athena_root} \
20912                 ${cf_x_athena_root}7 \
20913                 ${cf_x_athena_root}6
20914         do
20915         for cf_libs in \
20916                 "-l$cf_lib -lXmu" \
20917                 "-l$cf_lib -lXpm -lXmu" \
20918                 "-l${cf_lib}_s -lXmu_s"
20919         do
20920                 if test -z "$cf_x_athena_lib" ; then
20921                         cf_save="$LIBS"
20922                         cf_test=XawSimpleMenuAddGlobalActions
20923                         if test $cf_path != default ; then
20924
20925 cf_add_libs="-L$cf_path/lib $cf_libs"
20926 # Filter out duplicates - this happens with badly-designed ".pc" files...
20927 for cf_add_1lib in $LIBS
20928 do
20929         for cf_add_2lib in $cf_add_libs
20930         do
20931                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20932                 then
20933                         cf_add_1lib=
20934                         break
20935                 fi
20936         done
20937         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20938 done
20939 LIBS="$cf_add_libs"
20940
20941                                 echo "$as_me:20941: checking for $cf_libs in $cf_path" >&5
20942 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
20943                         else
20944
20945 cf_add_libs="$cf_libs"
20946 # Filter out duplicates - this happens with badly-designed ".pc" files...
20947 for cf_add_1lib in $LIBS
20948 do
20949         for cf_add_2lib in $cf_add_libs
20950         do
20951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20952                 then
20953                         cf_add_1lib=
20954                         break
20955                 fi
20956         done
20957         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20958 done
20959 LIBS="$cf_add_libs"
20960
20961                                 echo "$as_me:20961: checking for $cf_test in $cf_libs" >&5
20962 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
20963                         fi
20964                         cat >conftest.$ac_ext <<_ACEOF
20965 #line 20965 "configure"
20966 #include "confdefs.h"
20967
20968 #include <X11/Intrinsic.h>
20969 #include <X11/$cf_x_athena_root/SimpleMenu.h>
20970
20971 int
20972 main (void)
20973 {
20974
20975 $cf_test((XtAppContext) 0)
20976   ;
20977   return 0;
20978 }
20979 _ACEOF
20980 rm -f conftest.$ac_objext conftest$ac_exeext
20981 if { (eval echo "$as_me:20981: \"$ac_link\"") >&5
20982   (eval $ac_link) 2>&5
20983   ac_status=$?
20984   echo "$as_me:20984: \$? = $ac_status" >&5
20985   (exit $ac_status); } &&
20986          { ac_try='test -s conftest$ac_exeext'
20987   { (eval echo "$as_me:20987: \"$ac_try\"") >&5
20988   (eval $ac_try) 2>&5
20989   ac_status=$?
20990   echo "$as_me:20990: \$? = $ac_status" >&5
20991   (exit $ac_status); }; }; then
20992   cf_result=yes
20993 else
20994   echo "$as_me: failed program was:" >&5
20995 cat conftest.$ac_ext >&5
20996 cf_result=no
20997 fi
20998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20999                         echo "$as_me:20999: result: $cf_result" >&5
21000 echo "${ECHO_T}$cf_result" >&6
21001                         if test "$cf_result" = yes ; then
21002                                 cf_x_athena_lib="$cf_libs"
21003                                 break
21004                         fi
21005                         LIBS="$cf_save"
21006                 fi
21007         done # cf_libs
21008                 test -n "$cf_x_athena_lib" && break
21009         done # cf_lib
21010 done
21011
21012 if test -z "$cf_x_athena_lib" ; then
21013         { { echo "$as_me:21013: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
21014 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
21015    { (exit 1); exit 1; }; }
21016 fi
21017
21018 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21019
21020 cat >>confdefs.h <<EOF
21021 #define $cf_x_athena_LIBS 1
21022 EOF
21023
21024 fi
21025
21026 if test -n "$ac_tool_prefix"; then
21027   for ac_prog in xcurses-config
21028   do
21029     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21030 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21031 echo "$as_me:21031: checking for $ac_word" >&5
21032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21033 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
21034   echo $ECHO_N "(cached) $ECHO_C" >&6
21035 else
21036   if test -n "$XCURSES_CONFIG"; then
21037   ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
21038 else
21039   ac_save_IFS=$IFS; IFS=$ac_path_separator
21040 ac_dummy="$PATH"
21041 for ac_dir in $ac_dummy; do
21042   IFS=$ac_save_IFS
21043   test -z "$ac_dir" && ac_dir=.
21044   $as_executable_p "$ac_dir/$ac_word" || continue
21045 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
21046 echo "$as_me:21046: found $ac_dir/$ac_word" >&5
21047 break
21048 done
21049
21050 fi
21051 fi
21052 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
21053 if test -n "$XCURSES_CONFIG"; then
21054   echo "$as_me:21054: result: $XCURSES_CONFIG" >&5
21055 echo "${ECHO_T}$XCURSES_CONFIG" >&6
21056 else
21057   echo "$as_me:21057: result: no" >&5
21058 echo "${ECHO_T}no" >&6
21059 fi
21060
21061     test -n "$XCURSES_CONFIG" && break
21062   done
21063 fi
21064 if test -z "$XCURSES_CONFIG"; then
21065   ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
21066   for ac_prog in xcurses-config
21067 do
21068   # Extract the first word of "$ac_prog", so it can be a program name with args.
21069 set dummy $ac_prog; ac_word=$2
21070 echo "$as_me:21070: checking for $ac_word" >&5
21071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21072 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
21073   echo $ECHO_N "(cached) $ECHO_C" >&6
21074 else
21075   if test -n "$ac_ct_XCURSES_CONFIG"; then
21076   ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
21077 else
21078   ac_save_IFS=$IFS; IFS=$ac_path_separator
21079 ac_dummy="$PATH"
21080 for ac_dir in $ac_dummy; do
21081   IFS=$ac_save_IFS
21082   test -z "$ac_dir" && ac_dir=.
21083   $as_executable_p "$ac_dir/$ac_word" || continue
21084 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
21085 echo "$as_me:21085: found $ac_dir/$ac_word" >&5
21086 break
21087 done
21088
21089 fi
21090 fi
21091 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
21092 if test -n "$ac_ct_XCURSES_CONFIG"; then
21093   echo "$as_me:21093: result: $ac_ct_XCURSES_CONFIG" >&5
21094 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
21095 else
21096   echo "$as_me:21096: result: no" >&5
21097 echo "${ECHO_T}no" >&6
21098 fi
21099
21100   test -n "$ac_ct_XCURSES_CONFIG" && break
21101 done
21102 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
21103
21104   XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
21105 fi
21106
21107 if test "$XCURSES_CONFIG" != none ; then
21108
21109 cf_fix_cppflags=no
21110 cf_new_cflags=
21111 cf_new_cppflags=
21112 cf_new_extra_cppflags=
21113
21114 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
21115 do
21116 case $cf_fix_cppflags in
21117 (no)
21118         case $cf_add_cflags in
21119         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21120                 case $cf_add_cflags in
21121                 (-D*)
21122                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21123
21124                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21125                                 && test -z "${cf_tst_cflags}" \
21126                                 && cf_fix_cppflags=yes
21127
21128                         if test $cf_fix_cppflags = yes ; then
21129
21130         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21131         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21132
21133                                 continue
21134                         elif test "${cf_tst_cflags}" = "\"'" ; then
21135
21136         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21137         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21138
21139                                 continue
21140                         fi
21141                         ;;
21142                 esac
21143                 case "$CPPFLAGS" in
21144                 (*$cf_add_cflags)
21145                         ;;
21146                 (*)
21147                         case $cf_add_cflags in
21148                         (-D*)
21149                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21150
21151 CPPFLAGS=`echo "$CPPFLAGS" | \
21152         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21153                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21154
21155                                 ;;
21156                         esac
21157
21158         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21159         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21160
21161                         ;;
21162                 esac
21163                 ;;
21164         (*)
21165
21166         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21167         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21168
21169                 ;;
21170         esac
21171         ;;
21172 (yes)
21173
21174         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21175         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21176
21177         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21178
21179         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21180                 && test -z "${cf_tst_cflags}" \
21181                 && cf_fix_cppflags=no
21182         ;;
21183 esac
21184 done
21185
21186 if test -n "$cf_new_cflags" ; then
21187
21188         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21189         CFLAGS="${CFLAGS}$cf_new_cflags"
21190
21191 fi
21192
21193 if test -n "$cf_new_cppflags" ; then
21194
21195         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21196         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21197
21198 fi
21199
21200 if test -n "$cf_new_extra_cppflags" ; then
21201
21202         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21203         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21204
21205 fi
21206
21207 cf_add_libs="`$XCURSES_CONFIG --libs`"
21208 # Filter out duplicates - this happens with badly-designed ".pc" files...
21209 for cf_add_1lib in $LIBS
21210 do
21211         for cf_add_2lib in $cf_add_libs
21212         do
21213                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21214                 then
21215                         cf_add_1lib=
21216                         break
21217                 fi
21218         done
21219         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21220 done
21221 LIBS="$cf_add_libs"
21222
21223 cf_cv_lib_XCurses=yes
21224
21225 else
21226
21227 LDFLAGS="$LDFLAGS $X_LIBS"
21228
21229 test -n "$verbose" && echo "    checking additions to CFLAGS" 1>&6
21230
21231 echo "${as_me:-configure}:21231: testing checking additions to CFLAGS ..." 1>&5
21232
21233 cf_check_cflags="$CFLAGS"
21234 cf_check_cppflags="$CPPFLAGS"
21235
21236 cf_fix_cppflags=no
21237 cf_new_cflags=
21238 cf_new_cppflags=
21239 cf_new_extra_cppflags=
21240
21241 for cf_add_cflags in $X_CFLAGS
21242 do
21243 case $cf_fix_cppflags in
21244 (no)
21245         case $cf_add_cflags in
21246         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21247                 case $cf_add_cflags in
21248                 (-D*)
21249                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21250
21251                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21252                                 && test -z "${cf_tst_cflags}" \
21253                                 && cf_fix_cppflags=yes
21254
21255                         if test $cf_fix_cppflags = yes ; then
21256
21257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21259
21260                                 continue
21261                         elif test "${cf_tst_cflags}" = "\"'" ; then
21262
21263         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21264         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21265
21266                                 continue
21267                         fi
21268                         ;;
21269                 esac
21270                 case "$CPPFLAGS" in
21271                 (*$cf_add_cflags)
21272                         ;;
21273                 (*)
21274                         case $cf_add_cflags in
21275                         (-D*)
21276                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21277
21278 CPPFLAGS=`echo "$CPPFLAGS" | \
21279         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21280                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21281
21282                                 ;;
21283                         esac
21284
21285         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21286         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21287
21288                         ;;
21289                 esac
21290                 ;;
21291         (*)
21292
21293         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21294         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21295
21296                 ;;
21297         esac
21298         ;;
21299 (yes)
21300
21301         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21302         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21303
21304         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21305
21306         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21307                 && test -z "${cf_tst_cflags}" \
21308                 && cf_fix_cppflags=no
21309         ;;
21310 esac
21311 done
21312
21313 if test -n "$cf_new_cflags" ; then
21314         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
21315
21316 echo "${as_me:-configure}:21316: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
21317
21318         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21319         CFLAGS="${CFLAGS}$cf_new_cflags"
21320
21321 fi
21322
21323 if test -n "$cf_new_cppflags" ; then
21324         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
21325
21326 echo "${as_me:-configure}:21326: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
21327
21328         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21329         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21330
21331 fi
21332
21333 if test -n "$cf_new_extra_cppflags" ; then
21334         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
21335
21336 echo "${as_me:-configure}:21336: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
21337
21338         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21339         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21340
21341 fi
21342
21343 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
21344 cat >conftest.$ac_ext <<_ACEOF
21345 #line 21345 "configure"
21346 #include "confdefs.h"
21347 #include <stdio.h>
21348 int
21349 main (void)
21350 {
21351 printf("Hello world");
21352   ;
21353   return 0;
21354 }
21355 _ACEOF
21356 rm -f conftest.$ac_objext conftest$ac_exeext
21357 if { (eval echo "$as_me:21357: \"$ac_link\"") >&5
21358   (eval $ac_link) 2>&5
21359   ac_status=$?
21360   echo "$as_me:21360: \$? = $ac_status" >&5
21361   (exit $ac_status); } &&
21362          { ac_try='test -s conftest$ac_exeext'
21363   { (eval echo "$as_me:21363: \"$ac_try\"") >&5
21364   (eval $ac_try) 2>&5
21365   ac_status=$?
21366   echo "$as_me:21366: \$? = $ac_status" >&5
21367   (exit $ac_status); }; }; then
21368   :
21369 else
21370   echo "$as_me: failed program was:" >&5
21371 cat conftest.$ac_ext >&5
21372 test -n "$verbose" && echo "    test-compile failed.  Undoing change to \$CFLAGS" 1>&6
21373
21374 echo "${as_me:-configure}:21374: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
21375
21376          if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
21377                  test -n "$verbose" && echo "   but keeping change to \$CPPFLAGS" 1>&6
21378
21379 echo "${as_me:-configure}:21379: testing but keeping change to \$CPPFLAGS ..." 1>&5
21380
21381          fi
21382          CFLAGS="$cf_check_flags"
21383 fi
21384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21385 fi
21386
21387 echo "$as_me:21387: checking for XOpenDisplay in -lX11" >&5
21388 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
21389 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
21390   echo $ECHO_N "(cached) $ECHO_C" >&6
21391 else
21392   ac_check_lib_save_LIBS=$LIBS
21393 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
21394 cat >conftest.$ac_ext <<_ACEOF
21395 #line 21395 "configure"
21396 #include "confdefs.h"
21397
21398 /* Override any gcc2 internal prototype to avoid an error.  */
21399 #ifdef __cplusplus
21400 extern "C"
21401 #endif
21402 /* We use char because int might match the return type of a gcc2
21403    builtin and then its argument prototype would still apply.  */
21404 char XOpenDisplay ();
21405 int
21406 main (void)
21407 {
21408 XOpenDisplay ();
21409   ;
21410   return 0;
21411 }
21412 _ACEOF
21413 rm -f conftest.$ac_objext conftest$ac_exeext
21414 if { (eval echo "$as_me:21414: \"$ac_link\"") >&5
21415   (eval $ac_link) 2>&5
21416   ac_status=$?
21417   echo "$as_me:21417: \$? = $ac_status" >&5
21418   (exit $ac_status); } &&
21419          { ac_try='test -s conftest$ac_exeext'
21420   { (eval echo "$as_me:21420: \"$ac_try\"") >&5
21421   (eval $ac_try) 2>&5
21422   ac_status=$?
21423   echo "$as_me:21423: \$? = $ac_status" >&5
21424   (exit $ac_status); }; }; then
21425   ac_cv_lib_X11_XOpenDisplay=yes
21426 else
21427   echo "$as_me: failed program was:" >&5
21428 cat conftest.$ac_ext >&5
21429 ac_cv_lib_X11_XOpenDisplay=no
21430 fi
21431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21432 LIBS=$ac_check_lib_save_LIBS
21433 fi
21434 echo "$as_me:21434: result: $ac_cv_lib_X11_XOpenDisplay" >&5
21435 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
21436 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
21437
21438 cf_add_libs="-lX11"
21439 # Filter out duplicates - this happens with badly-designed ".pc" files...
21440 for cf_add_1lib in $LIBS
21441 do
21442         for cf_add_2lib in $cf_add_libs
21443         do
21444                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21445                 then
21446                         cf_add_1lib=
21447                         break
21448                 fi
21449         done
21450         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21451 done
21452 LIBS="$cf_add_libs"
21453
21454 fi
21455
21456 echo "$as_me:21456: checking for XCurses library" >&5
21457 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
21458 if test "${cf_cv_lib_XCurses+set}" = set; then
21459   echo $ECHO_N "(cached) $ECHO_C" >&6
21460 else
21461
21462 cf_add_libs="-lXCurses"
21463 # Filter out duplicates - this happens with badly-designed ".pc" files...
21464 for cf_add_1lib in $LIBS
21465 do
21466         for cf_add_2lib in $cf_add_libs
21467         do
21468                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21469                 then
21470                         cf_add_1lib=
21471                         break
21472                 fi
21473         done
21474         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21475 done
21476 LIBS="$cf_add_libs"
21477
21478 cat >conftest.$ac_ext <<_ACEOF
21479 #line 21479 "configure"
21480 #include "confdefs.h"
21481
21482 #include <xcurses.h>
21483 char *XCursesProgramName = "test";
21484
21485 int
21486 main (void)
21487 {
21488 XCursesExit();
21489   ;
21490   return 0;
21491 }
21492 _ACEOF
21493 rm -f conftest.$ac_objext conftest$ac_exeext
21494 if { (eval echo "$as_me:21494: \"$ac_link\"") >&5
21495   (eval $ac_link) 2>&5
21496   ac_status=$?
21497   echo "$as_me:21497: \$? = $ac_status" >&5
21498   (exit $ac_status); } &&
21499          { ac_try='test -s conftest$ac_exeext'
21500   { (eval echo "$as_me:21500: \"$ac_try\"") >&5
21501   (eval $ac_try) 2>&5
21502   ac_status=$?
21503   echo "$as_me:21503: \$? = $ac_status" >&5
21504   (exit $ac_status); }; }; then
21505   cf_cv_lib_XCurses=yes
21506 else
21507   echo "$as_me: failed program was:" >&5
21508 cat conftest.$ac_ext >&5
21509 cf_cv_lib_XCurses=no
21510 fi
21511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21512
21513 fi
21514 echo "$as_me:21514: result: $cf_cv_lib_XCurses" >&5
21515 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
21516
21517 fi
21518
21519 if test $cf_cv_lib_XCurses = yes ; then
21520
21521 cat >>confdefs.h <<\EOF
21522 #define UNIX 1
21523 EOF
21524
21525 cat >>confdefs.h <<\EOF
21526 #define XCURSES 1
21527 EOF
21528
21529         echo "$as_me:21529: checking for xcurses.h" >&5
21530 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
21531 if test "${ac_cv_header_xcurses_h+set}" = set; then
21532   echo $ECHO_N "(cached) $ECHO_C" >&6
21533 else
21534   cat >conftest.$ac_ext <<_ACEOF
21535 #line 21535 "configure"
21536 #include "confdefs.h"
21537 #include <xcurses.h>
21538 _ACEOF
21539 if { (eval echo "$as_me:21539: \"$ac_cpp conftest.$ac_ext\"") >&5
21540   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21541   ac_status=$?
21542   egrep -v '^ *\+' conftest.er1 >conftest.err
21543   rm -f conftest.er1
21544   cat conftest.err >&5
21545   echo "$as_me:21545: \$? = $ac_status" >&5
21546   (exit $ac_status); } >/dev/null; then
21547   if test -s conftest.err; then
21548     ac_cpp_err=$ac_c_preproc_warn_flag
21549   else
21550     ac_cpp_err=
21551   fi
21552 else
21553   ac_cpp_err=yes
21554 fi
21555 if test -z "$ac_cpp_err"; then
21556   ac_cv_header_xcurses_h=yes
21557 else
21558   echo "$as_me: failed program was:" >&5
21559   cat conftest.$ac_ext >&5
21560   ac_cv_header_xcurses_h=no
21561 fi
21562 rm -f conftest.err conftest.$ac_ext
21563 fi
21564 echo "$as_me:21564: result: $ac_cv_header_xcurses_h" >&5
21565 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
21566 if test $ac_cv_header_xcurses_h = yes; then
21567
21568 cat >>confdefs.h <<\EOF
21569 #define HAVE_XCURSES 1
21570 EOF
21571
21572 fi
21573
21574 else
21575         { { echo "$as_me:21575: error: Cannot link with XCurses" >&5
21576 echo "$as_me: error: Cannot link with XCurses" >&2;}
21577    { (exit 1); exit 1; }; }
21578 fi
21579
21580         ;;
21581 (*)
21582         { { echo "$as_me:21582: error: unexpected screen-value: $cf_cv_screen" >&5
21583 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
21584    { (exit 1); exit 1; }; }
21585         ;;
21586 esac
21587
21588 : ${cf_nculib_root:=$cf_cv_screen}
21589 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
21590 echo "$as_me:21590: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
21591 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
21592 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
21593   echo $ECHO_N "(cached) $ECHO_C" >&6
21594 else
21595   ac_check_lib_save_LIBS=$LIBS
21596 LIBS="-l$cf_nculib_root  $LIBS"
21597 cat >conftest.$ac_ext <<_ACEOF
21598 #line 21598 "configure"
21599 #include "confdefs.h"
21600
21601 /* Override any gcc2 internal prototype to avoid an error.  */
21602 #ifdef __cplusplus
21603 extern "C"
21604 #endif
21605 /* We use char because int might match the return type of a gcc2
21606    builtin and then its argument prototype would still apply.  */
21607 char _nc_init_pthreads ();
21608 int
21609 main (void)
21610 {
21611 _nc_init_pthreads ();
21612   ;
21613   return 0;
21614 }
21615 _ACEOF
21616 rm -f conftest.$ac_objext conftest$ac_exeext
21617 if { (eval echo "$as_me:21617: \"$ac_link\"") >&5
21618   (eval $ac_link) 2>&5
21619   ac_status=$?
21620   echo "$as_me:21620: \$? = $ac_status" >&5
21621   (exit $ac_status); } &&
21622          { ac_try='test -s conftest$ac_exeext'
21623   { (eval echo "$as_me:21623: \"$ac_try\"") >&5
21624   (eval $ac_try) 2>&5
21625   ac_status=$?
21626   echo "$as_me:21626: \$? = $ac_status" >&5
21627   (exit $ac_status); }; }; then
21628   eval "$as_ac_Lib=yes"
21629 else
21630   echo "$as_me: failed program was:" >&5
21631 cat conftest.$ac_ext >&5
21632 eval "$as_ac_Lib=no"
21633 fi
21634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21635 LIBS=$ac_check_lib_save_LIBS
21636 fi
21637 echo "$as_me:21637: result: `eval echo '${'$as_ac_Lib'}'`" >&5
21638 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
21639 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
21640   cf_cv_ncurses_pthreads=yes
21641 else
21642   cf_cv_ncurses_pthreads=no
21643 fi
21644
21645 if test "$cf_cv_ncurses_pthreads" = yes
21646 then
21647
21648 cf_add_libs="-lpthread"
21649 # Filter out duplicates - this happens with badly-designed ".pc" files...
21650 for cf_add_1lib in $LIBS
21651 do
21652         for cf_add_2lib in $cf_add_libs
21653         do
21654                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21655                 then
21656                         cf_add_1lib=
21657                         break
21658                 fi
21659         done
21660         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21661 done
21662 LIBS="$cf_add_libs"
21663
21664 fi
21665
21666 echo "$as_me:21666: checking if curses supports wide characters" >&5
21667 echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
21668 if test "${cf_cv_widec_curses+set}" = set; then
21669   echo $ECHO_N "(cached) $ECHO_C" >&6
21670 else
21671
21672 cat >conftest.$ac_ext <<_ACEOF
21673 #line 21673 "configure"
21674 #include "confdefs.h"
21675
21676 #include <stdlib.h>
21677 #include <${cf_cv_ncurses_header:-curses.h}>
21678 int
21679 main (void)
21680 {
21681
21682     wchar_t temp[2];
21683     wchar_t wch = 'A';
21684     temp[0] = wch;
21685     waddnwstr(stdscr, temp, 1);
21686
21687   ;
21688   return 0;
21689 }
21690 _ACEOF
21691 rm -f conftest.$ac_objext conftest$ac_exeext
21692 if { (eval echo "$as_me:21692: \"$ac_link\"") >&5
21693   (eval $ac_link) 2>&5
21694   ac_status=$?
21695   echo "$as_me:21695: \$? = $ac_status" >&5
21696   (exit $ac_status); } &&
21697          { ac_try='test -s conftest$ac_exeext'
21698   { (eval echo "$as_me:21698: \"$ac_try\"") >&5
21699   (eval $ac_try) 2>&5
21700   ac_status=$?
21701   echo "$as_me:21701: \$? = $ac_status" >&5
21702   (exit $ac_status); }; }; then
21703   cf_cv_widec_curses=yes
21704 else
21705   echo "$as_me: failed program was:" >&5
21706 cat conftest.$ac_ext >&5
21707 cf_cv_widec_curses=no
21708 fi
21709 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21710
21711 fi
21712 echo "$as_me:21712: result: $cf_cv_widec_curses" >&5
21713 echo "${ECHO_T}$cf_cv_widec_curses" >&6
21714
21715 if test "$cf_cv_widec_curses" = yes ; then
21716
21717 cat >>confdefs.h <<\EOF
21718 #define WIDEC_CURSES 1
21719 EOF
21720
21721         # This is needed on Tru64 5.0 to declare mbstate_t
21722         echo "$as_me:21722: checking if we must include wchar.h to declare mbstate_t" >&5
21723 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
21724 if test "${cf_cv_widec_mbstate+set}" = set; then
21725   echo $ECHO_N "(cached) $ECHO_C" >&6
21726 else
21727
21728         cat >conftest.$ac_ext <<_ACEOF
21729 #line 21729 "configure"
21730 #include "confdefs.h"
21731
21732 #include <stdlib.h>
21733 #include <${cf_cv_ncurses_header:-curses.h}>
21734 int
21735 main (void)
21736 {
21737 mbstate_t state
21738   ;
21739   return 0;
21740 }
21741 _ACEOF
21742 rm -f conftest.$ac_objext
21743 if { (eval echo "$as_me:21743: \"$ac_compile\"") >&5
21744   (eval $ac_compile) 2>&5
21745   ac_status=$?
21746   echo "$as_me:21746: \$? = $ac_status" >&5
21747   (exit $ac_status); } &&
21748          { ac_try='test -s conftest.$ac_objext'
21749   { (eval echo "$as_me:21749: \"$ac_try\"") >&5
21750   (eval $ac_try) 2>&5
21751   ac_status=$?
21752   echo "$as_me:21752: \$? = $ac_status" >&5
21753   (exit $ac_status); }; }; then
21754   cf_cv_widec_mbstate=no
21755 else
21756   echo "$as_me: failed program was:" >&5
21757 cat conftest.$ac_ext >&5
21758 cat >conftest.$ac_ext <<_ACEOF
21759 #line 21759 "configure"
21760 #include "confdefs.h"
21761
21762 #include <stdlib.h>
21763 #include <wchar.h>
21764 #include <${cf_cv_ncurses_header:-curses.h}>
21765 int
21766 main (void)
21767 {
21768 mbstate_t state
21769   ;
21770   return 0;
21771 }
21772 _ACEOF
21773 rm -f conftest.$ac_objext
21774 if { (eval echo "$as_me:21774: \"$ac_compile\"") >&5
21775   (eval $ac_compile) 2>&5
21776   ac_status=$?
21777   echo "$as_me:21777: \$? = $ac_status" >&5
21778   (exit $ac_status); } &&
21779          { ac_try='test -s conftest.$ac_objext'
21780   { (eval echo "$as_me:21780: \"$ac_try\"") >&5
21781   (eval $ac_try) 2>&5
21782   ac_status=$?
21783   echo "$as_me:21783: \$? = $ac_status" >&5
21784   (exit $ac_status); }; }; then
21785   cf_cv_widec_mbstate=yes
21786 else
21787   echo "$as_me: failed program was:" >&5
21788 cat conftest.$ac_ext >&5
21789 cf_cv_widec_mbstate=unknown
21790 fi
21791 rm -f conftest.$ac_objext conftest.$ac_ext
21792 fi
21793 rm -f conftest.$ac_objext conftest.$ac_ext
21794 fi
21795 echo "$as_me:21795: result: $cf_cv_widec_mbstate" >&5
21796 echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
21797
21798 if test "$cf_cv_widec_mbstate" = yes ; then
21799
21800 cat >>confdefs.h <<\EOF
21801 #define NEED_WCHAR_H 1
21802 EOF
21803
21804 fi
21805
21806 if test "$cf_cv_widec_mbstate" != unknown ; then
21807
21808 cat >>confdefs.h <<\EOF
21809 #define HAVE_MBSTATE_T 1
21810 EOF
21811
21812 fi
21813
21814 fi
21815
21816 cf_all_widgets=yes
21817
21818 echo "$as_me:21818: checking if you want extra dialogs" >&5
21819 echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
21820
21821 # Check whether --enable-extras or --disable-extras was given.
21822 if test "${enable_extras+set}" = set; then
21823   enableval="$enable_extras"
21824
21825 else
21826   enableval=yes
21827 fi;
21828 echo "$as_me:21828: result: $enableval" >&5
21829 echo "${ECHO_T}$enableval" >&6
21830 if test "$enableval" != no ; then
21831 cf_all_widgets=yes
21832 else
21833 cf_all_widgets=no
21834 fi
21835
21836 echo "$as_me:21836: checking if you want config-file support" >&5
21837 echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
21838
21839 # Check whether --enable-rc-file or --disable-rc-file was given.
21840 if test "${enable_rc_file+set}" = set; then
21841   enableval="$enable_rc_file"
21842
21843 else
21844   enableval=$cf_all_widgets
21845 fi;
21846 echo "$as_me:21846: result: $enableval" >&5
21847 echo "${ECHO_T}$enableval" >&6
21848 if test "$enableval" != no ; then
21849 EXTRAOBJS="$EXTRAOBJS rc\$o"
21850
21851 cat >>confdefs.h <<\EOF
21852 #define HAVE_RC_FILE 1
21853 EOF
21854
21855 else
21856         :
21857 fi
21858
21859 echo "$as_me:21859: checking if you want Xdialog-style dialogs" >&5
21860 echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
21861
21862 # Check whether --enable-Xdialog or --disable-Xdialog was given.
21863 if test "${enable_Xdialog+set}" = set; then
21864   enableval="$enable_Xdialog"
21865
21866 else
21867   enableval=$cf_all_widgets
21868 fi;
21869 echo "$as_me:21869: result: $enableval" >&5
21870 echo "${ECHO_T}$enableval" >&6
21871 if test "$enableval" != no ; then
21872 EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
21873
21874 cat >>confdefs.h <<\EOF
21875 #define HAVE_XDIALOG 1
21876 EOF
21877
21878 else
21879         :
21880 fi
21881
21882 echo "$as_me:21882: checking if you want extra Xdialog-style dialogs (1.2)" >&5
21883 echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
21884
21885 # Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
21886 if test "${enable_Xdialog2+set}" = set; then
21887   enableval="$enable_Xdialog2"
21888
21889 else
21890   enableval=$cf_all_widgets
21891 fi;
21892 echo "$as_me:21892: result: $enableval" >&5
21893 echo "${ECHO_T}$enableval" >&6
21894 if test "$enableval" != no ; then
21895 EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
21896
21897 cat >>confdefs.h <<\EOF
21898 #define HAVE_XDIALOG2 1
21899 EOF
21900
21901 else
21902         :
21903 fi
21904
21905 echo "$as_me:21905: checking if you want compatibility with whiptail options" >&5
21906 echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
21907
21908 # Check whether --enable-whiptail or --disable-whiptail was given.
21909 if test "${enable_whiptail+set}" = set; then
21910   enableval="$enable_whiptail"
21911
21912 else
21913   enableval=$cf_all_widgets
21914 fi;
21915 echo "$as_me:21915: result: $enableval" >&5
21916 echo "${ECHO_T}$enableval" >&6
21917 if test "$enableval" != no ; then
21918
21919 cat >>confdefs.h <<\EOF
21920 #define HAVE_WHIPTAIL 1
21921 EOF
21922
21923 else
21924         :
21925 fi
21926
21927 echo "$as_me:21927: checking if you want the form dialog" >&5
21928 echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
21929
21930 # Check whether --enable-form or --disable-form was given.
21931 if test "${enable_form+set}" = set; then
21932   enableval="$enable_form"
21933
21934 else
21935   enableval=$cf_all_widgets
21936 fi;
21937 echo "$as_me:21937: result: $enableval" >&5
21938 echo "${ECHO_T}$enableval" >&6
21939 if test "$enableval" != no ; then
21940 EXTRAOBJS="$EXTRAOBJS formbox\$o"
21941
21942 cat >>confdefs.h <<\EOF
21943 #define HAVE_DLG_FORMBOX 1
21944 EOF
21945
21946 else
21947         :
21948 fi
21949
21950 echo "$as_me:21950: checking if you want the gauge dialog" >&5
21951 echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
21952
21953 # Check whether --enable-gauge or --disable-gauge was given.
21954 if test "${enable_gauge+set}" = set; then
21955   enableval="$enable_gauge"
21956
21957 else
21958   enableval=$cf_all_widgets
21959 fi;
21960 echo "$as_me:21960: result: $enableval" >&5
21961 echo "${ECHO_T}$enableval" >&6
21962 if test "$enableval" != no ; then
21963 EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
21964
21965 cat >>confdefs.h <<\EOF
21966 #define HAVE_DLG_GAUGE 1
21967 EOF
21968
21969 else
21970         :
21971 fi
21972
21973 echo "$as_me:21973: checking if you want the tailbox dialog" >&5
21974 echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
21975
21976 # Check whether --enable-tailbox or --disable-tailbox was given.
21977 if test "${enable_tailbox+set}" = set; then
21978   enableval="$enable_tailbox"
21979
21980 else
21981   enableval=$cf_all_widgets
21982 fi;
21983 echo "$as_me:21983: result: $enableval" >&5
21984 echo "${ECHO_T}$enableval" >&6
21985 if test "$enableval" != no ; then
21986 EXTRAOBJS="$EXTRAOBJS tailbox\$o"
21987
21988 cat >>confdefs.h <<\EOF
21989 #define HAVE_DLG_TAILBOX 1
21990 EOF
21991
21992 else
21993         :
21994 fi
21995
21996 echo "$as_me:21996: checking if you want the mixedform dialog" >&5
21997 echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
21998
21999 # Check whether --enable-mixedform or --disable-mixedform was given.
22000 if test "${enable_mixedform+set}" = set; then
22001   enableval="$enable_mixedform"
22002
22003 else
22004   enableval=${enable_form:=$cf_all_widgets}
22005 fi;
22006 echo "$as_me:22006: result: $enableval" >&5
22007 echo "${ECHO_T}$enableval" >&6
22008 if test "$enableval" != no ; then
22009 EXTRAOBJS="$EXTRAOBJS mixedform\$o"
22010
22011 cat >>confdefs.h <<\EOF
22012 #define HAVE_DLG_MIXEDFORM 1
22013 EOF
22014
22015 else
22016         :
22017 fi
22018
22019 echo "$as_me:22019: checking if you want the mixedgauge dialog" >&5
22020 echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
22021
22022 # Check whether --enable-mixedgauge or --disable-mixedgauge was given.
22023 if test "${enable_mixedgauge+set}" = set; then
22024   enableval="$enable_mixedgauge"
22025
22026 else
22027   enableval=$cf_all_widgets
22028 fi;
22029 echo "$as_me:22029: result: $enableval" >&5
22030 echo "${ECHO_T}$enableval" >&6
22031 if test "$enableval" != no ; then
22032 EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
22033
22034 cat >>confdefs.h <<\EOF
22035 #define HAVE_MIXEDGAUGE 1
22036 EOF
22037
22038 else
22039         :
22040 fi
22041
22042 echo "$as_me:22042: checking if you want the wide-curses features" >&5
22043 echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
22044
22045 # Check whether --enable-widec or --disable-widec was given.
22046 if test "${enable_widec+set}" = set; then
22047   enableval="$enable_widec"
22048
22049 else
22050   enableval=$cf_cv_widec_curses
22051 fi;
22052 echo "$as_me:22052: result: $enableval" >&5
22053 echo "${ECHO_T}$enableval" >&6
22054 if test "$enableval" != no ; then
22055
22056 cat >>confdefs.h <<\EOF
22057 #define USE_WIDE_CURSES 1
22058 EOF
22059
22060 else
22061         :
22062 fi
22063
22064 echo "$as_me:22064: checking for ANSI C header files" >&5
22065 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
22066 if test "${ac_cv_header_stdc+set}" = set; then
22067   echo $ECHO_N "(cached) $ECHO_C" >&6
22068 else
22069   cat >conftest.$ac_ext <<_ACEOF
22070 #line 22070 "configure"
22071 #include "confdefs.h"
22072 #include <stdlib.h>
22073 #include <stdarg.h>
22074 #include <string.h>
22075 #include <float.h>
22076
22077 _ACEOF
22078 if { (eval echo "$as_me:22078: \"$ac_cpp conftest.$ac_ext\"") >&5
22079   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22080   ac_status=$?
22081   egrep -v '^ *\+' conftest.er1 >conftest.err
22082   rm -f conftest.er1
22083   cat conftest.err >&5
22084   echo "$as_me:22084: \$? = $ac_status" >&5
22085   (exit $ac_status); } >/dev/null; then
22086   if test -s conftest.err; then
22087     ac_cpp_err=$ac_c_preproc_warn_flag
22088   else
22089     ac_cpp_err=
22090   fi
22091 else
22092   ac_cpp_err=yes
22093 fi
22094 if test -z "$ac_cpp_err"; then
22095   ac_cv_header_stdc=yes
22096 else
22097   echo "$as_me: failed program was:" >&5
22098   cat conftest.$ac_ext >&5
22099   ac_cv_header_stdc=no
22100 fi
22101 rm -f conftest.err conftest.$ac_ext
22102
22103 if test $ac_cv_header_stdc = yes; then
22104   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
22105   cat >conftest.$ac_ext <<_ACEOF
22106 #line 22106 "configure"
22107 #include "confdefs.h"
22108 #include <string.h>
22109
22110 _ACEOF
22111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22112   egrep "memchr" >/dev/null 2>&1; then
22113   :
22114 else
22115   ac_cv_header_stdc=no
22116 fi
22117 rm -rf conftest*
22118
22119 fi
22120
22121 if test $ac_cv_header_stdc = yes; then
22122   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
22123   cat >conftest.$ac_ext <<_ACEOF
22124 #line 22124 "configure"
22125 #include "confdefs.h"
22126 #include <stdlib.h>
22127
22128 _ACEOF
22129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22130   egrep "free" >/dev/null 2>&1; then
22131   :
22132 else
22133   ac_cv_header_stdc=no
22134 fi
22135 rm -rf conftest*
22136
22137 fi
22138
22139 if test $ac_cv_header_stdc = yes; then
22140   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
22141   if test "$cross_compiling" = yes; then
22142   :
22143 else
22144   cat >conftest.$ac_ext <<_ACEOF
22145 #line 22145 "configure"
22146 #include "confdefs.h"
22147 #include <ctype.h>
22148 #if ((' ' & 0x0FF) == 0x020)
22149 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
22150 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
22151 #else
22152 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
22153                      || ('j' <= (c) && (c) <= 'r') \
22154                      || ('s' <= (c) && (c) <= 'z'))
22155 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
22156 #endif
22157
22158 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
22159 int
22160 main (void)
22161 {
22162   int i;
22163   for (i = 0; i < 256; i++)
22164     if (XOR (islower (i), ISLOWER (i))
22165         || toupper (i) != TOUPPER (i))
22166       $ac_main_return(2);
22167   $ac_main_return (0);
22168 }
22169 _ACEOF
22170 rm -f conftest$ac_exeext
22171 if { (eval echo "$as_me:22171: \"$ac_link\"") >&5
22172   (eval $ac_link) 2>&5
22173   ac_status=$?
22174   echo "$as_me:22174: \$? = $ac_status" >&5
22175   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22176   { (eval echo "$as_me:22176: \"$ac_try\"") >&5
22177   (eval $ac_try) 2>&5
22178   ac_status=$?
22179   echo "$as_me:22179: \$? = $ac_status" >&5
22180   (exit $ac_status); }; }; then
22181   :
22182 else
22183   echo "$as_me: program exited with status $ac_status" >&5
22184 echo "$as_me: failed program was:" >&5
22185 cat conftest.$ac_ext >&5
22186 ac_cv_header_stdc=no
22187 fi
22188 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22189 fi
22190 fi
22191 fi
22192 echo "$as_me:22192: result: $ac_cv_header_stdc" >&5
22193 echo "${ECHO_T}$ac_cv_header_stdc" >&6
22194 if test $ac_cv_header_stdc = yes; then
22195
22196 cat >>confdefs.h <<\EOF
22197 #define STDC_HEADERS 1
22198 EOF
22199
22200 fi
22201
22202 echo "$as_me:22202: checking whether time.h and sys/time.h may both be included" >&5
22203 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
22204 if test "${ac_cv_header_time+set}" = set; then
22205   echo $ECHO_N "(cached) $ECHO_C" >&6
22206 else
22207   cat >conftest.$ac_ext <<_ACEOF
22208 #line 22208 "configure"
22209 #include "confdefs.h"
22210 #include <sys/types.h>
22211 #include <sys/time.h>
22212 #include <time.h>
22213
22214 int
22215 main (void)
22216 {
22217 if ((struct tm *) 0)
22218 return 0;
22219   ;
22220   return 0;
22221 }
22222 _ACEOF
22223 rm -f conftest.$ac_objext
22224 if { (eval echo "$as_me:22224: \"$ac_compile\"") >&5
22225   (eval $ac_compile) 2>&5
22226   ac_status=$?
22227   echo "$as_me:22227: \$? = $ac_status" >&5
22228   (exit $ac_status); } &&
22229          { ac_try='test -s conftest.$ac_objext'
22230   { (eval echo "$as_me:22230: \"$ac_try\"") >&5
22231   (eval $ac_try) 2>&5
22232   ac_status=$?
22233   echo "$as_me:22233: \$? = $ac_status" >&5
22234   (exit $ac_status); }; }; then
22235   ac_cv_header_time=yes
22236 else
22237   echo "$as_me: failed program was:" >&5
22238 cat conftest.$ac_ext >&5
22239 ac_cv_header_time=no
22240 fi
22241 rm -f conftest.$ac_objext conftest.$ac_ext
22242 fi
22243 echo "$as_me:22243: result: $ac_cv_header_time" >&5
22244 echo "${ECHO_T}$ac_cv_header_time" >&6
22245 if test $ac_cv_header_time = yes; then
22246
22247 cat >>confdefs.h <<\EOF
22248 #define TIME_WITH_SYS_TIME 1
22249 EOF
22250
22251 fi
22252
22253 ac_header_dirent=no
22254 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
22255   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
22256 echo "$as_me:22256: checking for $ac_hdr that defines DIR" >&5
22257 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
22258 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22259   echo $ECHO_N "(cached) $ECHO_C" >&6
22260 else
22261   cat >conftest.$ac_ext <<_ACEOF
22262 #line 22262 "configure"
22263 #include "confdefs.h"
22264 #include <sys/types.h>
22265 #include <$ac_hdr>
22266
22267 int
22268 main (void)
22269 {
22270 if ((DIR *) 0)
22271 return 0;
22272   ;
22273   return 0;
22274 }
22275 _ACEOF
22276 rm -f conftest.$ac_objext
22277 if { (eval echo "$as_me:22277: \"$ac_compile\"") >&5
22278   (eval $ac_compile) 2>&5
22279   ac_status=$?
22280   echo "$as_me:22280: \$? = $ac_status" >&5
22281   (exit $ac_status); } &&
22282          { ac_try='test -s conftest.$ac_objext'
22283   { (eval echo "$as_me:22283: \"$ac_try\"") >&5
22284   (eval $ac_try) 2>&5
22285   ac_status=$?
22286   echo "$as_me:22286: \$? = $ac_status" >&5
22287   (exit $ac_status); }; }; then
22288   eval "$as_ac_Header=yes"
22289 else
22290   echo "$as_me: failed program was:" >&5
22291 cat conftest.$ac_ext >&5
22292 eval "$as_ac_Header=no"
22293 fi
22294 rm -f conftest.$ac_objext conftest.$ac_ext
22295 fi
22296 echo "$as_me:22296: result: `eval echo '${'$as_ac_Header'}'`" >&5
22297 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22298 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22299   cat >>confdefs.h <<EOF
22300 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
22301 EOF
22302
22303 ac_header_dirent=$ac_hdr; break
22304 fi
22305
22306 done
22307 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
22308 if test $ac_header_dirent = dirent.h; then
22309   echo "$as_me:22309: checking for opendir in -ldir" >&5
22310 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
22311 if test "${ac_cv_lib_dir_opendir+set}" = set; then
22312   echo $ECHO_N "(cached) $ECHO_C" >&6
22313 else
22314   ac_check_lib_save_LIBS=$LIBS
22315 LIBS="-ldir  $LIBS"
22316 cat >conftest.$ac_ext <<_ACEOF
22317 #line 22317 "configure"
22318 #include "confdefs.h"
22319
22320 /* Override any gcc2 internal prototype to avoid an error.  */
22321 #ifdef __cplusplus
22322 extern "C"
22323 #endif
22324 /* We use char because int might match the return type of a gcc2
22325    builtin and then its argument prototype would still apply.  */
22326 char opendir ();
22327 int
22328 main (void)
22329 {
22330 opendir ();
22331   ;
22332   return 0;
22333 }
22334 _ACEOF
22335 rm -f conftest.$ac_objext conftest$ac_exeext
22336 if { (eval echo "$as_me:22336: \"$ac_link\"") >&5
22337   (eval $ac_link) 2>&5
22338   ac_status=$?
22339   echo "$as_me:22339: \$? = $ac_status" >&5
22340   (exit $ac_status); } &&
22341          { ac_try='test -s conftest$ac_exeext'
22342   { (eval echo "$as_me:22342: \"$ac_try\"") >&5
22343   (eval $ac_try) 2>&5
22344   ac_status=$?
22345   echo "$as_me:22345: \$? = $ac_status" >&5
22346   (exit $ac_status); }; }; then
22347   ac_cv_lib_dir_opendir=yes
22348 else
22349   echo "$as_me: failed program was:" >&5
22350 cat conftest.$ac_ext >&5
22351 ac_cv_lib_dir_opendir=no
22352 fi
22353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22354 LIBS=$ac_check_lib_save_LIBS
22355 fi
22356 echo "$as_me:22356: result: $ac_cv_lib_dir_opendir" >&5
22357 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
22358 if test $ac_cv_lib_dir_opendir = yes; then
22359   LIBS="$LIBS -ldir"
22360 fi
22361
22362 else
22363   echo "$as_me:22363: checking for opendir in -lx" >&5
22364 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
22365 if test "${ac_cv_lib_x_opendir+set}" = set; then
22366   echo $ECHO_N "(cached) $ECHO_C" >&6
22367 else
22368   ac_check_lib_save_LIBS=$LIBS
22369 LIBS="-lx  $LIBS"
22370 cat >conftest.$ac_ext <<_ACEOF
22371 #line 22371 "configure"
22372 #include "confdefs.h"
22373
22374 /* Override any gcc2 internal prototype to avoid an error.  */
22375 #ifdef __cplusplus
22376 extern "C"
22377 #endif
22378 /* We use char because int might match the return type of a gcc2
22379    builtin and then its argument prototype would still apply.  */
22380 char opendir ();
22381 int
22382 main (void)
22383 {
22384 opendir ();
22385   ;
22386   return 0;
22387 }
22388 _ACEOF
22389 rm -f conftest.$ac_objext conftest$ac_exeext
22390 if { (eval echo "$as_me:22390: \"$ac_link\"") >&5
22391   (eval $ac_link) 2>&5
22392   ac_status=$?
22393   echo "$as_me:22393: \$? = $ac_status" >&5
22394   (exit $ac_status); } &&
22395          { ac_try='test -s conftest$ac_exeext'
22396   { (eval echo "$as_me:22396: \"$ac_try\"") >&5
22397   (eval $ac_try) 2>&5
22398   ac_status=$?
22399   echo "$as_me:22399: \$? = $ac_status" >&5
22400   (exit $ac_status); }; }; then
22401   ac_cv_lib_x_opendir=yes
22402 else
22403   echo "$as_me: failed program was:" >&5
22404 cat conftest.$ac_ext >&5
22405 ac_cv_lib_x_opendir=no
22406 fi
22407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22408 LIBS=$ac_check_lib_save_LIBS
22409 fi
22410 echo "$as_me:22410: result: $ac_cv_lib_x_opendir" >&5
22411 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
22412 if test $ac_cv_lib_x_opendir = yes; then
22413   LIBS="$LIBS -lx"
22414 fi
22415
22416 fi
22417
22418 for ac_header in search.h stdint.h unistd.h
22419 do
22420 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22421 echo "$as_me:22421: checking for $ac_header" >&5
22422 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22424   echo $ECHO_N "(cached) $ECHO_C" >&6
22425 else
22426   cat >conftest.$ac_ext <<_ACEOF
22427 #line 22427 "configure"
22428 #include "confdefs.h"
22429 #include <$ac_header>
22430 _ACEOF
22431 if { (eval echo "$as_me:22431: \"$ac_cpp conftest.$ac_ext\"") >&5
22432   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22433   ac_status=$?
22434   egrep -v '^ *\+' conftest.er1 >conftest.err
22435   rm -f conftest.er1
22436   cat conftest.err >&5
22437   echo "$as_me:22437: \$? = $ac_status" >&5
22438   (exit $ac_status); } >/dev/null; then
22439   if test -s conftest.err; then
22440     ac_cpp_err=$ac_c_preproc_warn_flag
22441   else
22442     ac_cpp_err=
22443   fi
22444 else
22445   ac_cpp_err=yes
22446 fi
22447 if test -z "$ac_cpp_err"; then
22448   eval "$as_ac_Header=yes"
22449 else
22450   echo "$as_me: failed program was:" >&5
22451   cat conftest.$ac_ext >&5
22452   eval "$as_ac_Header=no"
22453 fi
22454 rm -f conftest.err conftest.$ac_ext
22455 fi
22456 echo "$as_me:22456: result: `eval echo '${'$as_ac_Header'}'`" >&5
22457 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22458 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22459   cat >>confdefs.h <<EOF
22460 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22461 EOF
22462
22463 fi
22464 done
22465
22466 echo "$as_me:22466: checking for term.h" >&5
22467 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
22468 if test "${cf_cv_term_header+set}" = set; then
22469   echo $ECHO_N "(cached) $ECHO_C" >&6
22470 else
22471
22472 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
22473 # for <term.h> if we do not find the variant.
22474
22475 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
22476
22477 case ${cf_cv_ncurses_header:-curses.h} in
22478 (*/*)
22479         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
22480         cf_header_list="$cf_header_item $cf_header_list"
22481         ;;
22482 esac
22483
22484 for cf_header in $cf_header_list
22485 do
22486         cat >conftest.$ac_ext <<_ACEOF
22487 #line 22487 "configure"
22488 #include "confdefs.h"
22489
22490 #include <${cf_cv_ncurses_header:-curses.h}>
22491 #include <${cf_header}>
22492 int
22493 main (void)
22494 {
22495 WINDOW *x
22496   ;
22497   return 0;
22498 }
22499 _ACEOF
22500 rm -f conftest.$ac_objext
22501 if { (eval echo "$as_me:22501: \"$ac_compile\"") >&5
22502   (eval $ac_compile) 2>&5
22503   ac_status=$?
22504   echo "$as_me:22504: \$? = $ac_status" >&5
22505   (exit $ac_status); } &&
22506          { ac_try='test -s conftest.$ac_objext'
22507   { (eval echo "$as_me:22507: \"$ac_try\"") >&5
22508   (eval $ac_try) 2>&5
22509   ac_status=$?
22510   echo "$as_me:22510: \$? = $ac_status" >&5
22511   (exit $ac_status); }; }; then
22512   cf_cv_term_header=$cf_header
22513          break
22514 else
22515   echo "$as_me: failed program was:" >&5
22516 cat conftest.$ac_ext >&5
22517 cf_cv_term_header=no
22518 fi
22519 rm -f conftest.$ac_objext conftest.$ac_ext
22520 done
22521
22522 case $cf_cv_term_header in
22523 (no)
22524         # If curses is ncurses, some packagers still mess it up by trying to make
22525         # us use GNU termcap.  This handles the most common case.
22526         for cf_header in ncurses/term.h ncursesw/term.h
22527         do
22528                 cat >conftest.$ac_ext <<_ACEOF
22529 #line 22529 "configure"
22530 #include "confdefs.h"
22531
22532 #include <${cf_cv_ncurses_header:-curses.h}>
22533 #ifdef NCURSES_VERSION
22534 #include <${cf_header}>
22535 #else
22536 make an error
22537 #endif
22538 int
22539 main (void)
22540 {
22541 WINDOW *x
22542   ;
22543   return 0;
22544 }
22545 _ACEOF
22546 rm -f conftest.$ac_objext
22547 if { (eval echo "$as_me:22547: \"$ac_compile\"") >&5
22548   (eval $ac_compile) 2>&5
22549   ac_status=$?
22550   echo "$as_me:22550: \$? = $ac_status" >&5
22551   (exit $ac_status); } &&
22552          { ac_try='test -s conftest.$ac_objext'
22553   { (eval echo "$as_me:22553: \"$ac_try\"") >&5
22554   (eval $ac_try) 2>&5
22555   ac_status=$?
22556   echo "$as_me:22556: \$? = $ac_status" >&5
22557   (exit $ac_status); }; }; then
22558   cf_cv_term_header=$cf_header
22559                          break
22560 else
22561   echo "$as_me: failed program was:" >&5
22562 cat conftest.$ac_ext >&5
22563 cf_cv_term_header=no
22564 fi
22565 rm -f conftest.$ac_objext conftest.$ac_ext
22566         done
22567         ;;
22568 esac
22569
22570 fi
22571 echo "$as_me:22571: result: $cf_cv_term_header" >&5
22572 echo "${ECHO_T}$cf_cv_term_header" >&6
22573
22574 case $cf_cv_term_header in
22575 (term.h)
22576
22577 cat >>confdefs.h <<\EOF
22578 #define HAVE_TERM_H 1
22579 EOF
22580
22581         ;;
22582 (ncurses/term.h)
22583
22584 cat >>confdefs.h <<\EOF
22585 #define HAVE_NCURSES_TERM_H 1
22586 EOF
22587
22588         ;;
22589 (ncursesw/term.h)
22590
22591 cat >>confdefs.h <<\EOF
22592 #define HAVE_NCURSESW_TERM_H 1
22593 EOF
22594
22595         ;;
22596 esac
22597
22598 echo "$as_me:22598: checking return type of signal handlers" >&5
22599 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
22600 if test "${ac_cv_type_signal+set}" = set; then
22601   echo $ECHO_N "(cached) $ECHO_C" >&6
22602 else
22603   cat >conftest.$ac_ext <<_ACEOF
22604 #line 22604 "configure"
22605 #include "confdefs.h"
22606 #include <sys/types.h>
22607 #include <signal.h>
22608 #ifdef signal
22609 # undef signal
22610 #endif
22611 #ifdef __cplusplus
22612 extern "C" void (*signal (int, void (*)(int)))(int);
22613 #else
22614 void (*signal ()) ();
22615 #endif
22616
22617 int
22618 main (void)
22619 {
22620 int i;
22621   ;
22622   return 0;
22623 }
22624 _ACEOF
22625 rm -f conftest.$ac_objext
22626 if { (eval echo "$as_me:22626: \"$ac_compile\"") >&5
22627   (eval $ac_compile) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit $ac_status); } &&
22631          { ac_try='test -s conftest.$ac_objext'
22632   { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633   (eval $ac_try) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit $ac_status); }; }; then
22637   ac_cv_type_signal=void
22638 else
22639   echo "$as_me: failed program was:" >&5
22640 cat conftest.$ac_ext >&5
22641 ac_cv_type_signal=int
22642 fi
22643 rm -f conftest.$ac_objext conftest.$ac_ext
22644 fi
22645 echo "$as_me:22645: result: $ac_cv_type_signal" >&5
22646 echo "${ECHO_T}$ac_cv_type_signal" >&6
22647
22648 cat >>confdefs.h <<EOF
22649 #define RETSIGTYPE $ac_cv_type_signal
22650 EOF
22651
22652 for ac_func in \
22653 _nc_free_and_exit \
22654 btowc \
22655 mblen \
22656 mbrlen \
22657 mbrtowc \
22658 mbtowc \
22659 strcasecmp \
22660 strftime \
22661 tsearch \
22662 waitpid \
22663 wcsrtombs \
22664 wcstombs \
22665 wctob \
22666 wctomb \
22667 mktime \
22668
22669 do
22670 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22671 echo "$as_me:22671: checking for $ac_func" >&5
22672 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22673 if eval "test \"\${$as_ac_var+set}\" = set"; then
22674   echo $ECHO_N "(cached) $ECHO_C" >&6
22675 else
22676   cat >conftest.$ac_ext <<_ACEOF
22677 #line 22677 "configure"
22678 #include "confdefs.h"
22679 /* System header to define __stub macros and hopefully few prototypes,
22680     which can conflict with char $ac_func (); below.  */
22681 #include <assert.h>
22682 /* Override any gcc2 internal prototype to avoid an error.  */
22683 #ifdef __cplusplus
22684 extern "C"
22685 #endif
22686 /* We use char because int might match the return type of a gcc2
22687    builtin and then its argument prototype would still apply.  */
22688 char $ac_func ();
22689 char (*f) ();
22690
22691 int
22692 main (void)
22693 {
22694 /* The GNU C library defines this for functions which it implements
22695     to always fail with ENOSYS.  Some functions are actually named
22696     something starting with __ and the normal name is an alias.  */
22697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22698 choke me
22699 #else
22700 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
22701 #endif
22702
22703   ;
22704   return 0;
22705 }
22706 _ACEOF
22707 rm -f conftest.$ac_objext conftest$ac_exeext
22708 if { (eval echo "$as_me:22708: \"$ac_link\"") >&5
22709   (eval $ac_link) 2>&5
22710   ac_status=$?
22711   echo "$as_me:22711: \$? = $ac_status" >&5
22712   (exit $ac_status); } &&
22713          { ac_try='test -s conftest$ac_exeext'
22714   { (eval echo "$as_me:22714: \"$ac_try\"") >&5
22715   (eval $ac_try) 2>&5
22716   ac_status=$?
22717   echo "$as_me:22717: \$? = $ac_status" >&5
22718   (exit $ac_status); }; }; then
22719   eval "$as_ac_var=yes"
22720 else
22721   echo "$as_me: failed program was:" >&5
22722 cat conftest.$ac_ext >&5
22723 eval "$as_ac_var=no"
22724 fi
22725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22726 fi
22727 echo "$as_me:22727: result: `eval echo '${'$as_ac_var'}'`" >&5
22728 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22729 if test `eval echo '${'$as_ac_var'}'` = yes; then
22730   cat >>confdefs.h <<EOF
22731 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22732 EOF
22733
22734 fi
22735 done
22736
22737 echo "$as_me:22737: checking definition to turn on extended curses functions" >&5
22738 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
22739 if test "${cf_cv_need_xopen_extension+set}" = set; then
22740   echo $ECHO_N "(cached) $ECHO_C" >&6
22741 else
22742
22743 cf_cv_need_xopen_extension=unknown
22744 cat >conftest.$ac_ext <<_ACEOF
22745 #line 22745 "configure"
22746 #include "confdefs.h"
22747
22748 #include <stdlib.h>
22749 #include <${cf_cv_ncurses_header:-curses.h}>
22750 int
22751 main (void)
22752 {
22753
22754 #if defined(NCURSES_VERSION_PATCH)
22755 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
22756         make an error
22757 #endif
22758 #endif
22759 #ifdef NCURSES_VERSION
22760         cchar_t check;
22761         int check2 = curs_set((int)sizeof(check));
22762 #endif
22763         long x = winnstr(stdscr, "", 0);
22764         int x1, y1;
22765         getbegyx(stdscr, y1, x1)
22766   ;
22767   return 0;
22768 }
22769 _ACEOF
22770 rm -f conftest.$ac_objext conftest$ac_exeext
22771 if { (eval echo "$as_me:22771: \"$ac_link\"") >&5
22772   (eval $ac_link) 2>&5
22773   ac_status=$?
22774   echo "$as_me:22774: \$? = $ac_status" >&5
22775   (exit $ac_status); } &&
22776          { ac_try='test -s conftest$ac_exeext'
22777   { (eval echo "$as_me:22777: \"$ac_try\"") >&5
22778   (eval $ac_try) 2>&5
22779   ac_status=$?
22780   echo "$as_me:22780: \$? = $ac_status" >&5
22781   (exit $ac_status); }; }; then
22782   cf_cv_need_xopen_extension=none
22783 else
22784   echo "$as_me: failed program was:" >&5
22785 cat conftest.$ac_ext >&5
22786
22787         for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
22788         do
22789                 cat >conftest.$ac_ext <<_ACEOF
22790 #line 22790 "configure"
22791 #include "confdefs.h"
22792
22793 #define $cf_try_xopen_extension 1
22794 #include <stdlib.h>
22795 #include <${cf_cv_ncurses_header:-curses.h}>
22796 int
22797 main (void)
22798 {
22799
22800 #ifdef NCURSES_VERSION
22801                 cchar_t check;
22802                 int check2 = curs_set((int)sizeof(check));
22803 #endif
22804                 long x = winnstr(stdscr, "", 0);
22805                 int x1, y1;
22806                 getbegyx(stdscr, y1, x1)
22807   ;
22808   return 0;
22809 }
22810 _ACEOF
22811 rm -f conftest.$ac_objext conftest$ac_exeext
22812 if { (eval echo "$as_me:22812: \"$ac_link\"") >&5
22813   (eval $ac_link) 2>&5
22814   ac_status=$?
22815   echo "$as_me:22815: \$? = $ac_status" >&5
22816   (exit $ac_status); } &&
22817          { ac_try='test -s conftest$ac_exeext'
22818   { (eval echo "$as_me:22818: \"$ac_try\"") >&5
22819   (eval $ac_try) 2>&5
22820   ac_status=$?
22821   echo "$as_me:22821: \$? = $ac_status" >&5
22822   (exit $ac_status); }; }; then
22823   cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
22824 else
22825   echo "$as_me: failed program was:" >&5
22826 cat conftest.$ac_ext >&5
22827 fi
22828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22829         done
22830
22831 fi
22832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22833
22834 fi
22835 echo "$as_me:22835: result: $cf_cv_need_xopen_extension" >&5
22836 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
22837
22838 case $cf_cv_need_xopen_extension in
22839 (*_*)
22840
22841         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22842         CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
22843
22844         ;;
22845 esac
22846
22847 echo "$as_me:22847: checking for unctrl.h" >&5
22848 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
22849 if test "${cf_cv_unctrl_header+set}" = set; then
22850   echo $ECHO_N "(cached) $ECHO_C" >&6
22851 else
22852
22853 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
22854 # for <unctrl.h> if we do not find the variant.
22855
22856 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
22857
22858 case ${cf_cv_ncurses_header:-curses.h} in
22859 (*/*)
22860         cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
22861         cf_header_list="$cf_header_item $cf_header_list"
22862         ;;
22863 esac
22864
22865 for cf_header in $cf_header_list
22866 do
22867         cat >conftest.$ac_ext <<_ACEOF
22868 #line 22868 "configure"
22869 #include "confdefs.h"
22870
22871 #include <${cf_cv_ncurses_header:-curses.h}>
22872 #include <${cf_header}>
22873 int
22874 main (void)
22875 {
22876 WINDOW *x
22877   ;
22878   return 0;
22879 }
22880 _ACEOF
22881 rm -f conftest.$ac_objext
22882 if { (eval echo "$as_me:22882: \"$ac_compile\"") >&5
22883   (eval $ac_compile) 2>&5
22884   ac_status=$?
22885   echo "$as_me:22885: \$? = $ac_status" >&5
22886   (exit $ac_status); } &&
22887          { ac_try='test -s conftest.$ac_objext'
22888   { (eval echo "$as_me:22888: \"$ac_try\"") >&5
22889   (eval $ac_try) 2>&5
22890   ac_status=$?
22891   echo "$as_me:22891: \$? = $ac_status" >&5
22892   (exit $ac_status); }; }; then
22893   cf_cv_unctrl_header=$cf_header
22894          break
22895 else
22896   echo "$as_me: failed program was:" >&5
22897 cat conftest.$ac_ext >&5
22898 cf_cv_unctrl_header=no
22899 fi
22900 rm -f conftest.$ac_objext conftest.$ac_ext
22901 done
22902
22903 fi
22904 echo "$as_me:22904: result: $cf_cv_unctrl_header" >&5
22905 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
22906
22907 case $cf_cv_unctrl_header in
22908 (no)
22909         { echo "$as_me:22909: WARNING: unctrl.h header not found" >&5
22910 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
22911         ;;
22912 esac
22913
22914 case $cf_cv_unctrl_header in
22915 (unctrl.h)
22916
22917 cat >>confdefs.h <<\EOF
22918 #define HAVE_UNCTRL_H 1
22919 EOF
22920
22921         ;;
22922 (ncurses/unctrl.h)
22923
22924 cat >>confdefs.h <<\EOF
22925 #define HAVE_NCURSES_UNCTRL_H 1
22926 EOF
22927
22928         ;;
22929 (ncursesw/unctrl.h)
22930
22931 cat >>confdefs.h <<\EOF
22932 #define HAVE_NCURSESW_UNCTRL_H 1
22933 EOF
22934
22935         ;;
22936 esac
22937
22938 for cf_func in \
22939 flushinp \
22940 getattrs \
22941 getbegx \
22942 getbegy \
22943 getbegyx \
22944 getcurx \
22945 getcury \
22946 getmaxx \
22947 getmaxy \
22948 getmaxyx \
22949 getparx \
22950 getpary \
22951 getparyx \
22952 use_default_colors \
22953 wchgat \
22954 wcursyncup \
22955 wget_wch \
22956 wsyncup \
22957
22958 do
22959
22960 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22961
22962         echo "$as_me:22962: checking for ${cf_func}" >&5
22963 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
22964
22965 echo "${as_me:-configure}:22965: testing ${cf_func} ..." 1>&5
22966
22967         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
22968   echo $ECHO_N "(cached) $ECHO_C" >&6
22969 else
22970
22971                 eval cf_result='$ac_cv_func_'$cf_func
22972                 if test ".$cf_result" != ".no"; then
22973                         cat >conftest.$ac_ext <<_ACEOF
22974 #line 22974 "configure"
22975 #include "confdefs.h"
22976
22977 #ifdef HAVE_XCURSES
22978 #include <xcurses.h>
22979 char * XCursesProgramName = "test";
22980 #else
22981 #include <${cf_cv_ncurses_header:-curses.h}>
22982 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
22983 #include <ncursesw/term.h>
22984 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
22985 #include <ncurses/term.h>
22986 #elif defined(HAVE_TERM_H)
22987 #include <term.h>
22988 #endif
22989 #endif
22990
22991 int
22992 main (void)
22993 {
22994
22995 #ifndef ${cf_func}
22996 long foo = (long)(&${cf_func});
22997 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
22998 if (foo + 1234L > 5678L)
22999         ${cf_cv_main_return:-return}(foo != 0);
23000 #endif
23001
23002   ;
23003   return 0;
23004 }
23005 _ACEOF
23006 rm -f conftest.$ac_objext conftest$ac_exeext
23007 if { (eval echo "$as_me:23007: \"$ac_link\"") >&5
23008   (eval $ac_link) 2>&5
23009   ac_status=$?
23010   echo "$as_me:23010: \$? = $ac_status" >&5
23011   (exit $ac_status); } &&
23012          { ac_try='test -s conftest$ac_exeext'
23013   { (eval echo "$as_me:23013: \"$ac_try\"") >&5
23014   (eval $ac_try) 2>&5
23015   ac_status=$?
23016   echo "$as_me:23016: \$? = $ac_status" >&5
23017   (exit $ac_status); }; }; then
23018   cf_result=yes
23019 else
23020   echo "$as_me: failed program was:" >&5
23021 cat conftest.$ac_ext >&5
23022 cf_result=no
23023 fi
23024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23025                 fi
23026                 eval 'cf_cv_func_'$cf_func'=$cf_result'
23027
23028 fi
23029
23030         # use the computed/retrieved cache-value:
23031         eval 'cf_result=$cf_cv_func_'$cf_func
23032         echo "$as_me:23032: result: $cf_result" >&5
23033 echo "${ECHO_T}$cf_result" >&6
23034         if test $cf_result != no; then
23035                 cat >>confdefs.h <<EOF
23036 #define HAVE_${cf_tr_func} 1
23037 EOF
23038
23039         fi
23040 done
23041
23042 echo "$as_me:23042: checking for start_color" >&5
23043 echo $ECHO_N "checking for start_color... $ECHO_C" >&6
23044 if test "${ac_cv_func_start_color+set}" = set; then
23045   echo $ECHO_N "(cached) $ECHO_C" >&6
23046 else
23047   cat >conftest.$ac_ext <<_ACEOF
23048 #line 23048 "configure"
23049 #include "confdefs.h"
23050 /* System header to define __stub macros and hopefully few prototypes,
23051     which can conflict with char start_color (); below.  */
23052 #include <assert.h>
23053 /* Override any gcc2 internal prototype to avoid an error.  */
23054 #ifdef __cplusplus
23055 extern "C"
23056 #endif
23057 /* We use char because int might match the return type of a gcc2
23058    builtin and then its argument prototype would still apply.  */
23059 char start_color ();
23060 char (*f) ();
23061
23062 int
23063 main (void)
23064 {
23065 /* The GNU C library defines this for functions which it implements
23066     to always fail with ENOSYS.  Some functions are actually named
23067     something starting with __ and the normal name is an alias.  */
23068 #if defined (__stub_start_color) || defined (__stub___start_color)
23069 choke me
23070 #else
23071 f = start_color; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
23072 #endif
23073
23074   ;
23075   return 0;
23076 }
23077 _ACEOF
23078 rm -f conftest.$ac_objext conftest$ac_exeext
23079 if { (eval echo "$as_me:23079: \"$ac_link\"") >&5
23080   (eval $ac_link) 2>&5
23081   ac_status=$?
23082   echo "$as_me:23082: \$? = $ac_status" >&5
23083   (exit $ac_status); } &&
23084          { ac_try='test -s conftest$ac_exeext'
23085   { (eval echo "$as_me:23085: \"$ac_try\"") >&5
23086   (eval $ac_try) 2>&5
23087   ac_status=$?
23088   echo "$as_me:23088: \$? = $ac_status" >&5
23089   (exit $ac_status); }; }; then
23090   ac_cv_func_start_color=yes
23091 else
23092   echo "$as_me: failed program was:" >&5
23093 cat conftest.$ac_ext >&5
23094 ac_cv_func_start_color=no
23095 fi
23096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23097 fi
23098 echo "$as_me:23098: result: $ac_cv_func_start_color" >&5
23099 echo "${ECHO_T}$ac_cv_func_start_color" >&6
23100 if test $ac_cv_func_start_color = yes; then
23101
23102 cat >>confdefs.h <<\EOF
23103 #define HAVE_COLOR 1
23104 EOF
23105
23106 fi
23107
23108 echo "$as_me:23108: checking for chtype typedef" >&5
23109 echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
23110 if test "${cf_cv_chtype_decl+set}" = set; then
23111   echo $ECHO_N "(cached) $ECHO_C" >&6
23112 else
23113
23114         cat >conftest.$ac_ext <<_ACEOF
23115 #line 23115 "configure"
23116 #include "confdefs.h"
23117 #include <${cf_cv_ncurses_header:-curses.h}>
23118 int
23119 main (void)
23120 {
23121 chtype foo
23122   ;
23123   return 0;
23124 }
23125 _ACEOF
23126 rm -f conftest.$ac_objext
23127 if { (eval echo "$as_me:23127: \"$ac_compile\"") >&5
23128   (eval $ac_compile) 2>&5
23129   ac_status=$?
23130   echo "$as_me:23130: \$? = $ac_status" >&5
23131   (exit $ac_status); } &&
23132          { ac_try='test -s conftest.$ac_objext'
23133   { (eval echo "$as_me:23133: \"$ac_try\"") >&5
23134   (eval $ac_try) 2>&5
23135   ac_status=$?
23136   echo "$as_me:23136: \$? = $ac_status" >&5
23137   (exit $ac_status); }; }; then
23138   cf_cv_chtype_decl=yes
23139 else
23140   echo "$as_me: failed program was:" >&5
23141 cat conftest.$ac_ext >&5
23142 cf_cv_chtype_decl=no
23143 fi
23144 rm -f conftest.$ac_objext conftest.$ac_ext
23145 fi
23146 echo "$as_me:23146: result: $cf_cv_chtype_decl" >&5
23147 echo "${ECHO_T}$cf_cv_chtype_decl" >&6
23148 if test $cf_cv_chtype_decl = yes ; then
23149
23150 cat >>confdefs.h <<\EOF
23151 #define HAVE_TYPE_CHTYPE 1
23152 EOF
23153
23154         echo "$as_me:23154: checking if chtype is scalar or struct" >&5
23155 echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
23156 if test "${cf_cv_chtype_type+set}" = set; then
23157   echo $ECHO_N "(cached) $ECHO_C" >&6
23158 else
23159
23160                 cat >conftest.$ac_ext <<_ACEOF
23161 #line 23161 "configure"
23162 #include "confdefs.h"
23163 #include <${cf_cv_ncurses_header:-curses.h}>
23164 int
23165 main (void)
23166 {
23167 chtype foo; long x = foo
23168   ;
23169   return 0;
23170 }
23171 _ACEOF
23172 rm -f conftest.$ac_objext
23173 if { (eval echo "$as_me:23173: \"$ac_compile\"") >&5
23174   (eval $ac_compile) 2>&5
23175   ac_status=$?
23176   echo "$as_me:23176: \$? = $ac_status" >&5
23177   (exit $ac_status); } &&
23178          { ac_try='test -s conftest.$ac_objext'
23179   { (eval echo "$as_me:23179: \"$ac_try\"") >&5
23180   (eval $ac_try) 2>&5
23181   ac_status=$?
23182   echo "$as_me:23182: \$? = $ac_status" >&5
23183   (exit $ac_status); }; }; then
23184   cf_cv_chtype_type=scalar
23185 else
23186   echo "$as_me: failed program was:" >&5
23187 cat conftest.$ac_ext >&5
23188 cf_cv_chtype_type=struct
23189 fi
23190 rm -f conftest.$ac_objext conftest.$ac_ext
23191 fi
23192 echo "$as_me:23192: result: $cf_cv_chtype_type" >&5
23193 echo "${ECHO_T}$cf_cv_chtype_type" >&6
23194         if test $cf_cv_chtype_type = scalar ; then
23195
23196 cat >>confdefs.h <<\EOF
23197 #define TYPE_CHTYPE_IS_SCALAR 1
23198 EOF
23199
23200         fi
23201 fi
23202
23203 echo "$as_me:23203: checking for wide alternate character set array" >&5
23204 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
23205 if test "${cf_cv_curses_wacs_map+set}" = set; then
23206   echo $ECHO_N "(cached) $ECHO_C" >&6
23207 else
23208
23209         cf_cv_curses_wacs_map=unknown
23210         for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
23211         do
23212         cat >conftest.$ac_ext <<_ACEOF
23213 #line 23213 "configure"
23214 #include "confdefs.h"
23215
23216 #ifndef _XOPEN_SOURCE_EXTENDED
23217 #define _XOPEN_SOURCE_EXTENDED
23218 #endif
23219 #include <${cf_cv_ncurses_header:-curses.h}>
23220 int
23221 main (void)
23222 {
23223 void *foo = &($name['k'])
23224   ;
23225   return 0;
23226 }
23227 _ACEOF
23228 rm -f conftest.$ac_objext conftest$ac_exeext
23229 if { (eval echo "$as_me:23229: \"$ac_link\"") >&5
23230   (eval $ac_link) 2>&5
23231   ac_status=$?
23232   echo "$as_me:23232: \$? = $ac_status" >&5
23233   (exit $ac_status); } &&
23234          { ac_try='test -s conftest$ac_exeext'
23235   { (eval echo "$as_me:23235: \"$ac_try\"") >&5
23236   (eval $ac_try) 2>&5
23237   ac_status=$?
23238   echo "$as_me:23238: \$? = $ac_status" >&5
23239   (exit $ac_status); }; }; then
23240   cf_cv_curses_wacs_map=$name
23241          break
23242 else
23243   echo "$as_me: failed program was:" >&5
23244 cat conftest.$ac_ext >&5
23245 fi
23246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23247         done
23248 fi
23249 echo "$as_me:23249: result: $cf_cv_curses_wacs_map" >&5
23250 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
23251
23252 test "$cf_cv_curses_wacs_map" != unknown &&
23253 cat >>confdefs.h <<EOF
23254 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
23255 EOF
23256
23257 echo "$as_me:23257: checking for wide alternate character constants" >&5
23258 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
23259 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
23260   echo $ECHO_N "(cached) $ECHO_C" >&6
23261 else
23262
23263 cf_cv_curses_wacs_symbols=no
23264 if test "$cf_cv_curses_wacs_map" != unknown
23265 then
23266         cat >conftest.$ac_ext <<_ACEOF
23267 #line 23267 "configure"
23268 #include "confdefs.h"
23269
23270 #ifndef _XOPEN_SOURCE_EXTENDED
23271 #define _XOPEN_SOURCE_EXTENDED
23272 #endif
23273 #include <${cf_cv_ncurses_header:-curses.h}>
23274 int
23275 main (void)
23276 {
23277 cchar_t *foo = WACS_PLUS;
23278          $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
23279   ;
23280   return 0;
23281 }
23282 _ACEOF
23283 rm -f conftest.$ac_objext conftest$ac_exeext
23284 if { (eval echo "$as_me:23284: \"$ac_link\"") >&5
23285   (eval $ac_link) 2>&5
23286   ac_status=$?
23287   echo "$as_me:23287: \$? = $ac_status" >&5
23288   (exit $ac_status); } &&
23289          { ac_try='test -s conftest$ac_exeext'
23290   { (eval echo "$as_me:23290: \"$ac_try\"") >&5
23291   (eval $ac_try) 2>&5
23292   ac_status=$?
23293   echo "$as_me:23293: \$? = $ac_status" >&5
23294   (exit $ac_status); }; }; then
23295   cf_cv_curses_wacs_symbols=yes
23296 else
23297   echo "$as_me: failed program was:" >&5
23298 cat conftest.$ac_ext >&5
23299 fi
23300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23301 else
23302         cat >conftest.$ac_ext <<_ACEOF
23303 #line 23303 "configure"
23304 #include "confdefs.h"
23305
23306 #ifndef _XOPEN_SOURCE_EXTENDED
23307 #define _XOPEN_SOURCE_EXTENDED
23308 #endif
23309 #include <${cf_cv_ncurses_header:-curses.h}>
23310 int
23311 main (void)
23312 {
23313 cchar_t *foo = WACS_PLUS
23314   ;
23315   return 0;
23316 }
23317 _ACEOF
23318 rm -f conftest.$ac_objext conftest$ac_exeext
23319 if { (eval echo "$as_me:23319: \"$ac_link\"") >&5
23320   (eval $ac_link) 2>&5
23321   ac_status=$?
23322   echo "$as_me:23322: \$? = $ac_status" >&5
23323   (exit $ac_status); } &&
23324          { ac_try='test -s conftest$ac_exeext'
23325   { (eval echo "$as_me:23325: \"$ac_try\"") >&5
23326   (eval $ac_try) 2>&5
23327   ac_status=$?
23328   echo "$as_me:23328: \$? = $ac_status" >&5
23329   (exit $ac_status); }; }; then
23330   cf_cv_curses_wacs_symbols=yes
23331 else
23332   echo "$as_me: failed program was:" >&5
23333 cat conftest.$ac_ext >&5
23334 fi
23335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23336 fi
23337
23338 fi
23339 echo "$as_me:23339: result: $cf_cv_curses_wacs_symbols" >&5
23340 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
23341
23342 test "$cf_cv_curses_wacs_symbols" != no &&
23343 cat >>confdefs.h <<\EOF
23344 #define CURSES_WACS_SYMBOLS 1
23345 EOF
23346
23347 for cf_func in wgetparent
23348 do
23349
23350 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23351
23352         echo "$as_me:23352: checking for ${cf_func}" >&5
23353 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
23354
23355 echo "${as_me:-configure}:23355: testing ${cf_func} ..." 1>&5
23356
23357         if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
23358   echo $ECHO_N "(cached) $ECHO_C" >&6
23359 else
23360
23361                 eval cf_result='$ac_cv_func_'$cf_func
23362                 if test ".$cf_result" != ".no"; then
23363                         cat >conftest.$ac_ext <<_ACEOF
23364 #line 23364 "configure"
23365 #include "confdefs.h"
23366
23367 #ifdef HAVE_XCURSES
23368 #include <xcurses.h>
23369 char * XCursesProgramName = "test";
23370 #else
23371 #include <${cf_cv_ncurses_header:-curses.h}>
23372 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
23373 #include <ncursesw/term.h>
23374 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
23375 #include <ncurses/term.h>
23376 #elif defined(HAVE_TERM_H)
23377 #include <term.h>
23378 #endif
23379 #endif
23380
23381 int
23382 main (void)
23383 {
23384
23385 #ifndef ${cf_func}
23386 long foo = (long)(&${cf_func});
23387 fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
23388 if (foo + 1234L > 5678L)
23389         ${cf_cv_main_return:-return}(foo != 0);
23390 #endif
23391
23392   ;
23393   return 0;
23394 }
23395 _ACEOF
23396 rm -f conftest.$ac_objext conftest$ac_exeext
23397 if { (eval echo "$as_me:23397: \"$ac_link\"") >&5
23398   (eval $ac_link) 2>&5
23399   ac_status=$?
23400   echo "$as_me:23400: \$? = $ac_status" >&5
23401   (exit $ac_status); } &&
23402          { ac_try='test -s conftest$ac_exeext'
23403   { (eval echo "$as_me:23403: \"$ac_try\"") >&5
23404   (eval $ac_try) 2>&5
23405   ac_status=$?
23406   echo "$as_me:23406: \$? = $ac_status" >&5
23407   (exit $ac_status); }; }; then
23408   cf_result=yes
23409 else
23410   echo "$as_me: failed program was:" >&5
23411 cat conftest.$ac_ext >&5
23412 cf_result=no
23413 fi
23414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23415                 fi
23416                 eval 'cf_cv_func_'$cf_func'=$cf_result'
23417
23418 fi
23419
23420         # use the computed/retrieved cache-value:
23421         eval 'cf_result=$cf_cv_func_'$cf_func
23422         echo "$as_me:23422: result: $cf_result" >&5
23423 echo "${ECHO_T}$cf_result" >&6
23424         if test $cf_result != no; then
23425                 cat >>confdefs.h <<EOF
23426 #define HAVE_${cf_tr_func} 1
23427 EOF
23428
23429         fi
23430 done
23431
23432 if test "x$cf_cv_func_wgetparent" != xyes
23433 then
23434         echo "$as_me:23434: checking if WINDOW has _parent member" >&5
23435 echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
23436         cat >conftest.$ac_ext <<_ACEOF
23437 #line 23437 "configure"
23438 #include "confdefs.h"
23439 #include <${cf_cv_ncurses_header:-curses.h}>
23440 int
23441 main (void)
23442 {
23443 WINDOW *p = stdscr->_parent
23444   ;
23445   return 0;
23446 }
23447 _ACEOF
23448 rm -f conftest.$ac_objext
23449 if { (eval echo "$as_me:23449: \"$ac_compile\"") >&5
23450   (eval $ac_compile) 2>&5
23451   ac_status=$?
23452   echo "$as_me:23452: \$? = $ac_status" >&5
23453   (exit $ac_status); } &&
23454          { ac_try='test -s conftest.$ac_objext'
23455   { (eval echo "$as_me:23455: \"$ac_try\"") >&5
23456   (eval $ac_try) 2>&5
23457   ac_status=$?
23458   echo "$as_me:23458: \$? = $ac_status" >&5
23459   (exit $ac_status); }; }; then
23460   cf_window__parent=yes
23461 else
23462   echo "$as_me: failed program was:" >&5
23463 cat conftest.$ac_ext >&5
23464 cf_window__parent=no
23465 fi
23466 rm -f conftest.$ac_objext conftest.$ac_ext
23467         echo "$as_me:23467: result: $cf_window__parent" >&5
23468 echo "${ECHO_T}$cf_window__parent" >&6
23469         if test "$cf_window__parent" = yes
23470         then
23471
23472 cat >>confdefs.h <<\EOF
23473 #define HAVE_WINDOW__PARENT 1
23474 EOF
23475
23476         fi
23477 fi
23478
23479 for ac_header in sys/wait.h
23480 do
23481 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23482 echo "$as_me:23482: checking for $ac_header" >&5
23483 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23484 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23485   echo $ECHO_N "(cached) $ECHO_C" >&6
23486 else
23487   cat >conftest.$ac_ext <<_ACEOF
23488 #line 23488 "configure"
23489 #include "confdefs.h"
23490 #include <$ac_header>
23491 _ACEOF
23492 if { (eval echo "$as_me:23492: \"$ac_cpp conftest.$ac_ext\"") >&5
23493   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23494   ac_status=$?
23495   egrep -v '^ *\+' conftest.er1 >conftest.err
23496   rm -f conftest.er1
23497   cat conftest.err >&5
23498   echo "$as_me:23498: \$? = $ac_status" >&5
23499   (exit $ac_status); } >/dev/null; then
23500   if test -s conftest.err; then
23501     ac_cpp_err=$ac_c_preproc_warn_flag
23502   else
23503     ac_cpp_err=
23504   fi
23505 else
23506   ac_cpp_err=yes
23507 fi
23508 if test -z "$ac_cpp_err"; then
23509   eval "$as_ac_Header=yes"
23510 else
23511   echo "$as_me: failed program was:" >&5
23512   cat conftest.$ac_ext >&5
23513   eval "$as_ac_Header=no"
23514 fi
23515 rm -f conftest.err conftest.$ac_ext
23516 fi
23517 echo "$as_me:23517: result: `eval echo '${'$as_ac_Header'}'`" >&5
23518 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23519 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23520   cat >>confdefs.h <<EOF
23521 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23522 EOF
23523
23524 fi
23525 done
23526
23527 cf_wait_headers="#include <sys/types.h>
23528 "
23529 if test $ac_cv_header_sys_wait_h = yes; then
23530 cf_wait_headers="$cf_wait_headers
23531 #include <sys/wait.h>
23532 "
23533 else
23534
23535 for ac_header in wait.h
23536 do
23537 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23538 echo "$as_me:23538: checking for $ac_header" >&5
23539 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23540 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23541   echo $ECHO_N "(cached) $ECHO_C" >&6
23542 else
23543   cat >conftest.$ac_ext <<_ACEOF
23544 #line 23544 "configure"
23545 #include "confdefs.h"
23546 #include <$ac_header>
23547 _ACEOF
23548 if { (eval echo "$as_me:23548: \"$ac_cpp conftest.$ac_ext\"") >&5
23549   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23550   ac_status=$?
23551   egrep -v '^ *\+' conftest.er1 >conftest.err
23552   rm -f conftest.er1
23553   cat conftest.err >&5
23554   echo "$as_me:23554: \$? = $ac_status" >&5
23555   (exit $ac_status); } >/dev/null; then
23556   if test -s conftest.err; then
23557     ac_cpp_err=$ac_c_preproc_warn_flag
23558   else
23559     ac_cpp_err=
23560   fi
23561 else
23562   ac_cpp_err=yes
23563 fi
23564 if test -z "$ac_cpp_err"; then
23565   eval "$as_ac_Header=yes"
23566 else
23567   echo "$as_me: failed program was:" >&5
23568   cat conftest.$ac_ext >&5
23569   eval "$as_ac_Header=no"
23570 fi
23571 rm -f conftest.err conftest.$ac_ext
23572 fi
23573 echo "$as_me:23573: result: `eval echo '${'$as_ac_Header'}'`" >&5
23574 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23575 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23576   cat >>confdefs.h <<EOF
23577 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23578 EOF
23579
23580 fi
23581 done
23582
23583 for ac_header in waitstatus.h
23584 do
23585 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23586 echo "$as_me:23586: checking for $ac_header" >&5
23587 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23589   echo $ECHO_N "(cached) $ECHO_C" >&6
23590 else
23591   cat >conftest.$ac_ext <<_ACEOF
23592 #line 23592 "configure"
23593 #include "confdefs.h"
23594 #include <$ac_header>
23595 _ACEOF
23596 if { (eval echo "$as_me:23596: \"$ac_cpp conftest.$ac_ext\"") >&5
23597   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23598   ac_status=$?
23599   egrep -v '^ *\+' conftest.er1 >conftest.err
23600   rm -f conftest.er1
23601   cat conftest.err >&5
23602   echo "$as_me:23602: \$? = $ac_status" >&5
23603   (exit $ac_status); } >/dev/null; then
23604   if test -s conftest.err; then
23605     ac_cpp_err=$ac_c_preproc_warn_flag
23606   else
23607     ac_cpp_err=
23608   fi
23609 else
23610   ac_cpp_err=yes
23611 fi
23612 if test -z "$ac_cpp_err"; then
23613   eval "$as_ac_Header=yes"
23614 else
23615   echo "$as_me: failed program was:" >&5
23616   cat conftest.$ac_ext >&5
23617   eval "$as_ac_Header=no"
23618 fi
23619 rm -f conftest.err conftest.$ac_ext
23620 fi
23621 echo "$as_me:23621: result: `eval echo '${'$as_ac_Header'}'`" >&5
23622 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23623 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23624   cat >>confdefs.h <<EOF
23625 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23626 EOF
23627
23628 fi
23629 done
23630
23631 if test $ac_cv_header_wait_h = yes; then
23632 cf_wait_headers="$cf_wait_headers
23633 #include <wait.h>
23634 "
23635 fi
23636 if test $ac_cv_header_waitstatus_h = yes; then
23637 cf_wait_headers="$cf_wait_headers
23638 #include <waitstatus.h>
23639 "
23640 fi
23641 fi
23642
23643 echo "$as_me:23643: checking for union wait" >&5
23644 echo $ECHO_N "checking for union wait... $ECHO_C" >&6
23645 if test "${cf_cv_type_unionwait+set}" = set; then
23646   echo $ECHO_N "(cached) $ECHO_C" >&6
23647 else
23648
23649         cat >conftest.$ac_ext <<_ACEOF
23650 #line 23650 "configure"
23651 #include "confdefs.h"
23652 $cf_wait_headers
23653 int
23654 main (void)
23655 {
23656 int x;
23657          int y = WEXITSTATUS(x);
23658          int z = WTERMSIG(x);
23659          wait(&x);
23660
23661   ;
23662   return 0;
23663 }
23664 _ACEOF
23665 rm -f conftest.$ac_objext conftest$ac_exeext
23666 if { (eval echo "$as_me:23666: \"$ac_link\"") >&5
23667   (eval $ac_link) 2>&5
23668   ac_status=$?
23669   echo "$as_me:23669: \$? = $ac_status" >&5
23670   (exit $ac_status); } &&
23671          { ac_try='test -s conftest$ac_exeext'
23672   { (eval echo "$as_me:23672: \"$ac_try\"") >&5
23673   (eval $ac_try) 2>&5
23674   ac_status=$?
23675   echo "$as_me:23675: \$? = $ac_status" >&5
23676   (exit $ac_status); }; }; then
23677   cf_cv_type_unionwait=no
23678          echo compiles ok w/o union wait 1>&5
23679
23680 else
23681   echo "$as_me: failed program was:" >&5
23682 cat conftest.$ac_ext >&5
23683
23684         cat >conftest.$ac_ext <<_ACEOF
23685 #line 23685 "configure"
23686 #include "confdefs.h"
23687 $cf_wait_headers
23688 int
23689 main (void)
23690 {
23691 union wait x;
23692 #ifdef WEXITSTATUS
23693          int y = WEXITSTATUS(x);
23694 #endif
23695 #ifdef WTERMSIG
23696          int z = WTERMSIG(x);
23697 #endif
23698          wait(&x);
23699
23700   ;
23701   return 0;
23702 }
23703 _ACEOF
23704 rm -f conftest.$ac_objext conftest$ac_exeext
23705 if { (eval echo "$as_me:23705: \"$ac_link\"") >&5
23706   (eval $ac_link) 2>&5
23707   ac_status=$?
23708   echo "$as_me:23708: \$? = $ac_status" >&5
23709   (exit $ac_status); } &&
23710          { ac_try='test -s conftest$ac_exeext'
23711   { (eval echo "$as_me:23711: \"$ac_try\"") >&5
23712   (eval $ac_try) 2>&5
23713   ac_status=$?
23714   echo "$as_me:23714: \$? = $ac_status" >&5
23715   (exit $ac_status); }; }; then
23716   cf_cv_type_unionwait=yes
23717          echo compiles ok with union wait and possibly macros too 1>&5
23718
23719 else
23720   echo "$as_me: failed program was:" >&5
23721 cat conftest.$ac_ext >&5
23722 cf_cv_type_unionwait=no
23723 fi
23724 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23725 fi
23726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23727 fi
23728
23729 echo "$as_me:23729: result: $cf_cv_type_unionwait" >&5
23730 echo "${ECHO_T}$cf_cv_type_unionwait" >&6
23731 test $cf_cv_type_unionwait = yes &&
23732 cat >>confdefs.h <<\EOF
23733 #define HAVE_TYPE_UNIONWAIT 1
23734 EOF
23735
23736 if test $cf_cv_type_unionwait = yes; then
23737
23738         echo "$as_me:23738: checking if union wait can be used as wait-arg" >&5
23739 echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
23740         if test "${cf_cv_arg_union_wait+set}" = set; then
23741   echo $ECHO_N "(cached) $ECHO_C" >&6
23742 else
23743
23744                 cat >conftest.$ac_ext <<_ACEOF
23745 #line 23745 "configure"
23746 #include "confdefs.h"
23747 $cf_wait_headers
23748 int
23749 main (void)
23750 {
23751 union wait x; wait(&x)
23752   ;
23753   return 0;
23754 }
23755 _ACEOF
23756 rm -f conftest.$ac_objext
23757 if { (eval echo "$as_me:23757: \"$ac_compile\"") >&5
23758   (eval $ac_compile) 2>&5
23759   ac_status=$?
23760   echo "$as_me:23760: \$? = $ac_status" >&5
23761   (exit $ac_status); } &&
23762          { ac_try='test -s conftest.$ac_objext'
23763   { (eval echo "$as_me:23763: \"$ac_try\"") >&5
23764   (eval $ac_try) 2>&5
23765   ac_status=$?
23766   echo "$as_me:23766: \$? = $ac_status" >&5
23767   (exit $ac_status); }; }; then
23768   cf_cv_arg_union_wait=yes
23769 else
23770   echo "$as_me: failed program was:" >&5
23771 cat conftest.$ac_ext >&5
23772 cf_cv_arg_union_wait=no
23773 fi
23774 rm -f conftest.$ac_objext conftest.$ac_ext
23775
23776 fi
23777
23778         echo "$as_me:23778: result: $cf_cv_arg_union_wait" >&5
23779 echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
23780         test $cf_cv_arg_union_wait = yes &&
23781 cat >>confdefs.h <<\EOF
23782 #define WAIT_USES_UNION 1
23783 EOF
23784
23785         echo "$as_me:23785: checking if union wait can be used as waitpid-arg" >&5
23786 echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
23787         if test "${cf_cv_arg_union_waitpid+set}" = set; then
23788   echo $ECHO_N "(cached) $ECHO_C" >&6
23789 else
23790
23791                 cat >conftest.$ac_ext <<_ACEOF
23792 #line 23792 "configure"
23793 #include "confdefs.h"
23794 $cf_wait_headers
23795 int
23796 main (void)
23797 {
23798 union wait x; waitpid(0, &x, 0)
23799   ;
23800   return 0;
23801 }
23802 _ACEOF
23803 rm -f conftest.$ac_objext
23804 if { (eval echo "$as_me:23804: \"$ac_compile\"") >&5
23805   (eval $ac_compile) 2>&5
23806   ac_status=$?
23807   echo "$as_me:23807: \$? = $ac_status" >&5
23808   (exit $ac_status); } &&
23809          { ac_try='test -s conftest.$ac_objext'
23810   { (eval echo "$as_me:23810: \"$ac_try\"") >&5
23811   (eval $ac_try) 2>&5
23812   ac_status=$?
23813   echo "$as_me:23813: \$? = $ac_status" >&5
23814   (exit $ac_status); }; }; then
23815   cf_cv_arg_union_waitpid=yes
23816 else
23817   echo "$as_me: failed program was:" >&5
23818 cat conftest.$ac_ext >&5
23819 cf_cv_arg_union_waitpid=no
23820 fi
23821 rm -f conftest.$ac_objext conftest.$ac_ext
23822
23823 fi
23824
23825         echo "$as_me:23825: result: $cf_cv_arg_union_waitpid" >&5
23826 echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
23827         test $cf_cv_arg_union_waitpid = yes &&
23828 cat >>confdefs.h <<\EOF
23829 #define WAITPID_USES_UNION 1
23830 EOF
23831
23832 fi
23833
23834 echo "$as_me:23834: checking if we must include wchar.h to declare mbstate_t" >&5
23835 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
23836 if test "${cf_cv_mbstate_t+set}" = set; then
23837   echo $ECHO_N "(cached) $ECHO_C" >&6
23838 else
23839
23840 cat >conftest.$ac_ext <<_ACEOF
23841 #line 23841 "configure"
23842 #include "confdefs.h"
23843
23844 #include <stdlib.h>
23845 #include <stdio.h>
23846 #ifdef HAVE_LIBUTF8_H
23847 #include <libutf8.h>
23848 #endif
23849 int
23850 main (void)
23851 {
23852 mbstate_t state
23853   ;
23854   return 0;
23855 }
23856 _ACEOF
23857 rm -f conftest.$ac_objext
23858 if { (eval echo "$as_me:23858: \"$ac_compile\"") >&5
23859   (eval $ac_compile) 2>&5
23860   ac_status=$?
23861   echo "$as_me:23861: \$? = $ac_status" >&5
23862   (exit $ac_status); } &&
23863          { ac_try='test -s conftest.$ac_objext'
23864   { (eval echo "$as_me:23864: \"$ac_try\"") >&5
23865   (eval $ac_try) 2>&5
23866   ac_status=$?
23867   echo "$as_me:23867: \$? = $ac_status" >&5
23868   (exit $ac_status); }; }; then
23869   cf_cv_mbstate_t=no
23870 else
23871   echo "$as_me: failed program was:" >&5
23872 cat conftest.$ac_ext >&5
23873 cat >conftest.$ac_ext <<_ACEOF
23874 #line 23874 "configure"
23875 #include "confdefs.h"
23876
23877 #include <stdlib.h>
23878 #include <stdio.h>
23879 #include <wchar.h>
23880 #ifdef HAVE_LIBUTF8_H
23881 #include <libutf8.h>
23882 #endif
23883 int
23884 main (void)
23885 {
23886 mbstate_t value
23887   ;
23888   return 0;
23889 }
23890 _ACEOF
23891 rm -f conftest.$ac_objext
23892 if { (eval echo "$as_me:23892: \"$ac_compile\"") >&5
23893   (eval $ac_compile) 2>&5
23894   ac_status=$?
23895   echo "$as_me:23895: \$? = $ac_status" >&5
23896   (exit $ac_status); } &&
23897          { ac_try='test -s conftest.$ac_objext'
23898   { (eval echo "$as_me:23898: \"$ac_try\"") >&5
23899   (eval $ac_try) 2>&5
23900   ac_status=$?
23901   echo "$as_me:23901: \$? = $ac_status" >&5
23902   (exit $ac_status); }; }; then
23903   cf_cv_mbstate_t=yes
23904 else
23905   echo "$as_me: failed program was:" >&5
23906 cat conftest.$ac_ext >&5
23907 cf_cv_mbstate_t=unknown
23908 fi
23909 rm -f conftest.$ac_objext conftest.$ac_ext
23910 fi
23911 rm -f conftest.$ac_objext conftest.$ac_ext
23912 fi
23913 echo "$as_me:23913: result: $cf_cv_mbstate_t" >&5
23914 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
23915
23916 if test "$cf_cv_mbstate_t" = yes ; then
23917
23918 cat >>confdefs.h <<\EOF
23919 #define NEED_WCHAR_H 1
23920 EOF
23921
23922 fi
23923
23924 if test "$cf_cv_mbstate_t" != unknown ; then
23925
23926 cat >>confdefs.h <<\EOF
23927 #define HAVE_MBSTATE_T 1
23928 EOF
23929
23930 fi
23931
23932 for ac_header in \
23933 termio.h \
23934 termios.h \
23935 unistd.h \
23936 sys/ioctl.h \
23937 sys/termio.h \
23938
23939 do
23940 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23941 echo "$as_me:23941: checking for $ac_header" >&5
23942 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23943 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23944   echo $ECHO_N "(cached) $ECHO_C" >&6
23945 else
23946   cat >conftest.$ac_ext <<_ACEOF
23947 #line 23947 "configure"
23948 #include "confdefs.h"
23949 #include <$ac_header>
23950 _ACEOF
23951 if { (eval echo "$as_me:23951: \"$ac_cpp conftest.$ac_ext\"") >&5
23952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23953   ac_status=$?
23954   egrep -v '^ *\+' conftest.er1 >conftest.err
23955   rm -f conftest.er1
23956   cat conftest.err >&5
23957   echo "$as_me:23957: \$? = $ac_status" >&5
23958   (exit $ac_status); } >/dev/null; then
23959   if test -s conftest.err; then
23960     ac_cpp_err=$ac_c_preproc_warn_flag
23961   else
23962     ac_cpp_err=
23963   fi
23964 else
23965   ac_cpp_err=yes
23966 fi
23967 if test -z "$ac_cpp_err"; then
23968   eval "$as_ac_Header=yes"
23969 else
23970   echo "$as_me: failed program was:" >&5
23971   cat conftest.$ac_ext >&5
23972   eval "$as_ac_Header=no"
23973 fi
23974 rm -f conftest.err conftest.$ac_ext
23975 fi
23976 echo "$as_me:23976: result: `eval echo '${'$as_ac_Header'}'`" >&5
23977 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23978 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23979   cat >>confdefs.h <<EOF
23980 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23981 EOF
23982
23983 fi
23984 done
23985
23986 if test "$ac_cv_header_termios_h" = yes ; then
23987         case "$CFLAGS $CPPFLAGS" in
23988         (*-D_POSIX_SOURCE*)
23989                 termios_bad=dunno ;;
23990         (*)     termios_bad=maybe ;;
23991         esac
23992         if test "$termios_bad" = maybe ; then
23993         echo "$as_me:23993: checking whether termios.h needs _POSIX_SOURCE" >&5
23994 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
23995         cat >conftest.$ac_ext <<_ACEOF
23996 #line 23996 "configure"
23997 #include "confdefs.h"
23998 #include <termios.h>
23999 int
24000 main (void)
24001 {
24002 struct termios foo; int x = foo.c_iflag
24003   ;
24004   return 0;
24005 }
24006 _ACEOF
24007 rm -f conftest.$ac_objext
24008 if { (eval echo "$as_me:24008: \"$ac_compile\"") >&5
24009   (eval $ac_compile) 2>&5
24010   ac_status=$?
24011   echo "$as_me:24011: \$? = $ac_status" >&5
24012   (exit $ac_status); } &&
24013          { ac_try='test -s conftest.$ac_objext'
24014   { (eval echo "$as_me:24014: \"$ac_try\"") >&5
24015   (eval $ac_try) 2>&5
24016   ac_status=$?
24017   echo "$as_me:24017: \$? = $ac_status" >&5
24018   (exit $ac_status); }; }; then
24019   termios_bad=no
24020 else
24021   echo "$as_me: failed program was:" >&5
24022 cat conftest.$ac_ext >&5
24023
24024                 cat >conftest.$ac_ext <<_ACEOF
24025 #line 24025 "configure"
24026 #include "confdefs.h"
24027
24028 #define _POSIX_SOURCE
24029 #include <termios.h>
24030 int
24031 main (void)
24032 {
24033 struct termios foo; int x = foo.c_iflag
24034   ;
24035   return 0;
24036 }
24037 _ACEOF
24038 rm -f conftest.$ac_objext
24039 if { (eval echo "$as_me:24039: \"$ac_compile\"") >&5
24040   (eval $ac_compile) 2>&5
24041   ac_status=$?
24042   echo "$as_me:24042: \$? = $ac_status" >&5
24043   (exit $ac_status); } &&
24044          { ac_try='test -s conftest.$ac_objext'
24045   { (eval echo "$as_me:24045: \"$ac_try\"") >&5
24046   (eval $ac_try) 2>&5
24047   ac_status=$?
24048   echo "$as_me:24048: \$? = $ac_status" >&5
24049   (exit $ac_status); }; }; then
24050   termios_bad=unknown
24051 else
24052   echo "$as_me: failed program was:" >&5
24053 cat conftest.$ac_ext >&5
24054 termios_bad=yes
24055 cat >>confdefs.h <<\EOF
24056 #define _POSIX_SOURCE 1
24057 EOF
24058
24059 fi
24060 rm -f conftest.$ac_objext conftest.$ac_ext
24061
24062 fi
24063 rm -f conftest.$ac_objext conftest.$ac_ext
24064         echo "$as_me:24064: result: $termios_bad" >&5
24065 echo "${ECHO_T}$termios_bad" >&6
24066         fi
24067 fi
24068
24069 echo "$as_me:24069: checking declaration of size-change" >&5
24070 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
24071 if test "${cf_cv_sizechange+set}" = set; then
24072   echo $ECHO_N "(cached) $ECHO_C" >&6
24073 else
24074
24075         cf_cv_sizechange=unknown
24076         cf_save_CPPFLAGS="$CPPFLAGS"
24077
24078 for cf_opts in "" "NEED_PTEM_H"
24079 do
24080
24081         CPPFLAGS="$cf_save_CPPFLAGS"
24082         if test -n "$cf_opts"
24083         then
24084
24085         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24086         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
24087
24088         fi
24089         cat >conftest.$ac_ext <<_ACEOF
24090 #line 24090 "configure"
24091 #include "confdefs.h"
24092 #include <sys/types.h>
24093 #ifdef HAVE_TERMIOS_H
24094 #include <termios.h>
24095 #else
24096 #ifdef HAVE_TERMIO_H
24097 #include <termio.h>
24098 #endif
24099 #endif
24100
24101 #ifdef NEED_PTEM_H
24102 /* This is a workaround for SCO:  they neglected to define struct winsize in
24103  * termios.h -- it's only in termio.h and ptem.h
24104  */
24105 #include <sys/stream.h>
24106 #include <sys/ptem.h>
24107 #endif
24108
24109 #ifdef HAVE_SYS_IOCTL_H
24110 #include <sys/ioctl.h>
24111 #endif
24112
24113 int
24114 main (void)
24115 {
24116
24117 #ifdef TIOCGSIZE
24118         struct ttysize win;     /* SunOS 3.0... */
24119         int y = win.ts_lines;
24120         int x = win.ts_cols;
24121 #else
24122 #ifdef TIOCGWINSZ
24123         struct winsize win;     /* everything else */
24124         int y = win.ws_row;
24125         int x = win.ws_col;
24126 #else
24127         no TIOCGSIZE or TIOCGWINSZ
24128 #endif /* TIOCGWINSZ */
24129 #endif /* TIOCGSIZE */
24130
24131   ;
24132   return 0;
24133 }
24134 _ACEOF
24135 rm -f conftest.$ac_objext
24136 if { (eval echo "$as_me:24136: \"$ac_compile\"") >&5
24137   (eval $ac_compile) 2>&5
24138   ac_status=$?
24139   echo "$as_me:24139: \$? = $ac_status" >&5
24140   (exit $ac_status); } &&
24141          { ac_try='test -s conftest.$ac_objext'
24142   { (eval echo "$as_me:24142: \"$ac_try\"") >&5
24143   (eval $ac_try) 2>&5
24144   ac_status=$?
24145   echo "$as_me:24145: \$? = $ac_status" >&5
24146   (exit $ac_status); }; }; then
24147   cf_cv_sizechange=yes
24148 else
24149   echo "$as_me: failed program was:" >&5
24150 cat conftest.$ac_ext >&5
24151 cf_cv_sizechange=no
24152 fi
24153 rm -f conftest.$ac_objext conftest.$ac_ext
24154
24155         CPPFLAGS="$cf_save_CPPFLAGS"
24156         if test "$cf_cv_sizechange" = yes ; then
24157                 echo "size-change succeeded ($cf_opts)" >&5
24158                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
24159                 break
24160         fi
24161 done
24162
24163 fi
24164 echo "$as_me:24164: result: $cf_cv_sizechange" >&5
24165 echo "${ECHO_T}$cf_cv_sizechange" >&6
24166 if test "$cf_cv_sizechange" != no ; then
24167
24168 cat >>confdefs.h <<\EOF
24169 #define HAVE_SIZECHANGE 1
24170 EOF
24171
24172         case $cf_cv_sizechange in
24173         (NEED*)
24174                 cat >>confdefs.h <<EOF
24175 #define $cf_cv_sizechange  1
24176 EOF
24177
24178                 ;;
24179         esac
24180 fi
24181
24182 PACKAGE_PREFIX=DLG
24183 PACKAGE_CONFIG=dlg_config.h
24184
24185 EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
24186
24187 cat >conftest.$ac_ext <<_ACEOF
24188 #line 24188 "configure"
24189 #include "confdefs.h"
24190 #include <locale.h>
24191 int
24192 main (void)
24193 {
24194 setlocale(LC_ALL, "")
24195   ;
24196   return 0;
24197 }
24198 _ACEOF
24199 rm -f conftest.$ac_objext conftest$ac_exeext
24200 if { (eval echo "$as_me:24200: \"$ac_link\"") >&5
24201   (eval $ac_link) 2>&5
24202   ac_status=$?
24203   echo "$as_me:24203: \$? = $ac_status" >&5
24204   (exit $ac_status); } &&
24205          { ac_try='test -s conftest$ac_exeext'
24206   { (eval echo "$as_me:24206: \"$ac_try\"") >&5
24207   (eval $ac_try) 2>&5
24208   ac_status=$?
24209   echo "$as_me:24209: \$? = $ac_status" >&5
24210   (exit $ac_status); }; }; then
24211
24212 cat >>confdefs.h <<\EOF
24213 #define HAVE_SETLOCALE 1
24214 EOF
24215
24216 else
24217   echo "$as_me: failed program was:" >&5
24218 cat conftest.$ac_ext >&5
24219 fi
24220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24221
24222 echo "$as_me:24222: checking if runtime has nl_langinfo support for first weekday" >&5
24223 echo $ECHO_N "checking if runtime has nl_langinfo support for first weekday... $ECHO_C" >&6
24224 if test "${cf_nl_langinfo_1stday+set}" = set; then
24225   echo $ECHO_N "(cached) $ECHO_C" >&6
24226 else
24227
24228         cat >conftest.$ac_ext <<_ACEOF
24229 #line 24229 "configure"
24230 #include "confdefs.h"
24231
24232 #include <langinfo.h>
24233 #include <locale.h>
24234
24235 int
24236 main (void)
24237 {
24238
24239         int first_weekday = nl_langinfo (_NL_TIME_FIRST_WEEKDAY)[0];
24240         long week_1stday_l = (long) nl_langinfo (_NL_TIME_WEEK_1STDAY);
24241
24242   ;
24243   return 0;
24244 }
24245 _ACEOF
24246 rm -f conftest.$ac_objext
24247 if { (eval echo "$as_me:24247: \"$ac_compile\"") >&5
24248   (eval $ac_compile) 2>&5
24249   ac_status=$?
24250   echo "$as_me:24250: \$? = $ac_status" >&5
24251   (exit $ac_status); } &&
24252          { ac_try='test -s conftest.$ac_objext'
24253   { (eval echo "$as_me:24253: \"$ac_try\"") >&5
24254   (eval $ac_try) 2>&5
24255   ac_status=$?
24256   echo "$as_me:24256: \$? = $ac_status" >&5
24257   (exit $ac_status); }; }; then
24258   cf_nl_langinfo_1stday=yes
24259
24260 else
24261   echo "$as_me: failed program was:" >&5
24262 cat conftest.$ac_ext >&5
24263 cf_nl_langinfo_1stday=no
24264
24265 fi
24266 rm -f conftest.$ac_objext conftest.$ac_ext
24267
24268 fi
24269 echo "$as_me:24269: result: $cf_nl_langinfo_1stday" >&5
24270 echo "${ECHO_T}$cf_nl_langinfo_1stday" >&6
24271 test "x$cf_nl_langinfo_1stday" = xyes && cat >>confdefs.h <<\EOF
24272 #define HAVE_NL_LANGINFO_1STDAY 1
24273 EOF
24274
24275 echo "$as_me:24275: checking if rpath-hack should be disabled" >&5
24276 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24277
24278 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24279 if test "${enable_rpath_hack+set}" = set; then
24280   enableval="$enable_rpath_hack"
24281   test "$enableval" != no && enableval=yes
24282         if test "$enableval" != "yes" ; then
24283     cf_disable_rpath_hack=yes
24284         else
24285                 cf_disable_rpath_hack=no
24286         fi
24287 else
24288   enableval=yes
24289         cf_disable_rpath_hack=no
24290
24291 fi;
24292 echo "$as_me:24292: result: $cf_disable_rpath_hack" >&5
24293 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24294 if test "$cf_disable_rpath_hack" = no ; then
24295
24296 echo "$as_me:24296: checking for updated LDFLAGS" >&5
24297 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24298 if test -n "$LD_RPATH_OPT" ; then
24299         echo "$as_me:24299: result: maybe" >&5
24300 echo "${ECHO_T}maybe" >&6
24301
24302         for ac_prog in ldd
24303 do
24304   # Extract the first word of "$ac_prog", so it can be a program name with args.
24305 set dummy $ac_prog; ac_word=$2
24306 echo "$as_me:24306: checking for $ac_word" >&5
24307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24308 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24309   echo $ECHO_N "(cached) $ECHO_C" >&6
24310 else
24311   if test -n "$cf_ldd_prog"; then
24312   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24313 else
24314   ac_save_IFS=$IFS; IFS=$ac_path_separator
24315 ac_dummy="$PATH"
24316 for ac_dir in $ac_dummy; do
24317   IFS=$ac_save_IFS
24318   test -z "$ac_dir" && ac_dir=.
24319   $as_executable_p "$ac_dir/$ac_word" || continue
24320 ac_cv_prog_cf_ldd_prog="$ac_prog"
24321 echo "$as_me:24321: found $ac_dir/$ac_word" >&5
24322 break
24323 done
24324
24325 fi
24326 fi
24327 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24328 if test -n "$cf_ldd_prog"; then
24329   echo "$as_me:24329: result: $cf_ldd_prog" >&5
24330 echo "${ECHO_T}$cf_ldd_prog" >&6
24331 else
24332   echo "$as_me:24332: result: no" >&5
24333 echo "${ECHO_T}no" >&6
24334 fi
24335
24336   test -n "$cf_ldd_prog" && break
24337 done
24338 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24339
24340         cf_rpath_list="/usr/lib /lib"
24341         if test "$cf_ldd_prog" != no
24342         then
24343                 cf_rpath_oops=
24344
24345 cat >conftest.$ac_ext <<_ACEOF
24346 #line 24346 "configure"
24347 #include "confdefs.h"
24348 #include <stdio.h>
24349 int
24350 main (void)
24351 {
24352 printf("Hello");
24353   ;
24354   return 0;
24355 }
24356 _ACEOF
24357 rm -f conftest.$ac_objext conftest$ac_exeext
24358 if { (eval echo "$as_me:24358: \"$ac_link\"") >&5
24359   (eval $ac_link) 2>&5
24360   ac_status=$?
24361   echo "$as_me:24361: \$? = $ac_status" >&5
24362   (exit $ac_status); } &&
24363          { ac_try='test -s conftest$ac_exeext'
24364   { (eval echo "$as_me:24364: \"$ac_try\"") >&5
24365   (eval $ac_try) 2>&5
24366   ac_status=$?
24367   echo "$as_me:24367: \$? = $ac_status" >&5
24368   (exit $ac_status); }; }; then
24369   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
24370                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
24371 else
24372   echo "$as_me: failed program was:" >&5
24373 cat conftest.$ac_ext >&5
24374 fi
24375 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24376
24377                 # If we passed the link-test, but get a "not found" on a given library,
24378                 # this could be due to inept reconfiguration of gcc to make it only
24379                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
24380                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
24381                 # /usr/local libraries.
24382                 if test -n "$cf_rpath_oops"
24383                 then
24384                         for cf_rpath_src in $cf_rpath_oops
24385                         do
24386                                 for cf_rpath_dir in \
24387                                         /usr/local \
24388                                         /usr/pkg \
24389                                         /opt/sfw
24390                                 do
24391                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
24392                                         then
24393                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
24394
24395 echo "${as_me:-configure}:24395: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
24396
24397                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
24398                                                 break
24399                                         fi
24400                                 done
24401                         done
24402                 fi
24403         fi
24404
24405         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24406
24407 echo "${as_me:-configure}:24407: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24408
24409 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
24410
24411 echo "${as_me:-configure}:24411: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
24412
24413 cf_rpath_dst=
24414 for cf_rpath_src in $LDFLAGS
24415 do
24416         case $cf_rpath_src in
24417         (-L*)
24418
24419                 # check if this refers to a directory which we will ignore
24420                 cf_rpath_skip=no
24421                 if test -n "$cf_rpath_list"
24422                 then
24423                         for cf_rpath_item in $cf_rpath_list
24424                         do
24425                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24426                                 then
24427                                         cf_rpath_skip=yes
24428                                         break
24429                                 fi
24430                         done
24431                 fi
24432
24433                 if test "$cf_rpath_skip" = no
24434                 then
24435                         # transform the option
24436                         if test "$LD_RPATH_OPT" = "-R " ; then
24437                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24438                         else
24439                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24440                         fi
24441
24442                         # if we have not already added this, add it now
24443                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24444                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24445                         then
24446                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24447
24448 echo "${as_me:-configure}:24448: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24449
24450                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24451                         fi
24452                 fi
24453                 ;;
24454         esac
24455         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24456 done
24457 LDFLAGS=$cf_rpath_dst
24458
24459 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
24460
24461 echo "${as_me:-configure}:24461: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
24462
24463 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
24464
24465 echo "${as_me:-configure}:24465: testing ...checking LIBS $LIBS ..." 1>&5
24466
24467 cf_rpath_dst=
24468 for cf_rpath_src in $LIBS
24469 do
24470         case $cf_rpath_src in
24471         (-L*)
24472
24473                 # check if this refers to a directory which we will ignore
24474                 cf_rpath_skip=no
24475                 if test -n "$cf_rpath_list"
24476                 then
24477                         for cf_rpath_item in $cf_rpath_list
24478                         do
24479                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24480                                 then
24481                                         cf_rpath_skip=yes
24482                                         break
24483                                 fi
24484                         done
24485                 fi
24486
24487                 if test "$cf_rpath_skip" = no
24488                 then
24489                         # transform the option
24490                         if test "$LD_RPATH_OPT" = "-R " ; then
24491                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24492                         else
24493                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24494                         fi
24495
24496                         # if we have not already added this, add it now
24497                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24498                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24499                         then
24500                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24501
24502 echo "${as_me:-configure}:24502: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24503
24504                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24505                         fi
24506                 fi
24507                 ;;
24508         esac
24509         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24510 done
24511 LIBS=$cf_rpath_dst
24512
24513 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
24514
24515 echo "${as_me:-configure}:24515: testing ...checked LIBS $LIBS ..." 1>&5
24516
24517         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24518
24519 echo "${as_me:-configure}:24519: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24520
24521 else
24522         echo "$as_me:24522: result: no" >&5
24523 echo "${ECHO_T}no" >&6
24524 fi
24525
24526 fi
24527
24528 cf_libname=\${LIB_BASENAME}
24529 cf_liblink=$cf_libname
24530 cf_libroot=$cf_libname
24531
24532 if test "x$cf_cv_do_symlinks" = xyes
24533 then
24534         case "x$cf_cv_shlib_version" in
24535         (xrel)
24536                 cf_liblink="\${LIB_ABI_NAME}"
24537                 cf_libname="\${LIB_REL_NAME}"
24538                 ;;
24539         (xabi)
24540                 cf_liblink="\${LIB_REL_NAME}"
24541                 cf_libname="\${LIB_ABI_NAME}"
24542                 ;;
24543         esac
24544 fi
24545 LIB_TARGET=$cf_libname
24546
24547 SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
24548 LIB_BASENAME    = \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
24549 LIB_REL_NAME    = \${LIB_BASENAME}.\${REL_VERSION}\\
24550 LIB_ABI_NAME    = \${LIB_BASENAME}.\${ABI_VERSION}\\
24551 LIB_TARGET      = $LIB_TARGET\\
24552 RM_SHARED_OPTS  = $RM_SHARED_OPTS\\
24553 # end CF__DEFINE_SHLIB_VARS"
24554
24555 ac_config_files="$ac_config_files dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE"
24556 ac_config_commands="$ac_config_commands default"
24557 cat >confcache <<\_ACEOF
24558 # This file is a shell script that caches the results of configure
24559 # tests run on this system so they can be shared between configure
24560 # scripts and configure runs, see configure's option --config-cache.
24561 # It is not useful on other systems.  If it contains results you don't
24562 # want to keep, you may remove or edit it.
24563 #
24564 # config.status only pays attention to the cache file if you give it
24565 # the --recheck option to rerun configure.
24566 #
24567 # `ac_cv_env_foo' variables (set or unset) will be overriden when
24568 # loading this file, other *unset* `ac_cv_foo' will be assigned the
24569 # following values.
24570
24571 _ACEOF
24572
24573 # The following way of writing the cache mishandles newlines in values,
24574 # but we know of no workaround that is simple, portable, and efficient.
24575 # So, don't put newlines in cache variables' values.
24576 # Ultrix sh set writes to stderr and can't be redirected directly,
24577 # and sets the high bit in the cache file unless we assign to the vars.
24578 {
24579   (set) 2>&1 |
24580     case `(ac_space=' '; set | grep ac_space) 2>&1` in
24581     *ac_space=\ *)
24582       # `set' does not quote correctly, so add quotes (double-quote
24583       # substitution turns \\\\ into \\, and sed turns \\ into \).
24584       sed -n \
24585         "s/'/'\\\\''/g;
24586           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24587       ;;
24588     *)
24589       # `set' quotes correctly as required by POSIX, so do not add quotes.
24590       sed -n \
24591         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24592       ;;
24593     esac;
24594 } |
24595   sed '
24596      t clear
24597      : clear
24598      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24599      t end
24600      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24601      : end' >>confcache
24602 if cmp -s $cache_file confcache; then :; else
24603   if test -w $cache_file; then
24604     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24605     cat confcache >$cache_file
24606   else
24607     echo "not updating unwritable cache $cache_file"
24608   fi
24609 fi
24610 rm -f confcache
24611
24612 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24613 # Let make expand exec_prefix.
24614 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24615
24616 # VPATH may cause trouble with some makes, so we remove $(srcdir),
24617 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24618 # trailing colons and then remove the whole line if VPATH becomes empty
24619 # (actually we leave an empty line to preserve line numbers).
24620 if test "x$srcdir" = x.; then
24621   ac_vpsub='/^[         ]*VPATH[        ]*=/{
24622 s/:*\$(srcdir):*/:/;
24623 s/:*\${srcdir}:*/:/;
24624 s/:*@srcdir@:*/:/;
24625 s/^\([^=]*=[    ]*\):*/\1/;
24626 s/:*$//;
24627 s/^[^=]*=[      ]*$//;
24628 }'
24629 fi
24630
24631 DEFS=-DHAVE_CONFIG_H
24632
24633 : ${CONFIG_STATUS=./config.status}
24634 ac_clean_files_save=$ac_clean_files
24635 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24636 { echo "$as_me:24636: creating $CONFIG_STATUS" >&5
24637 echo "$as_me: creating $CONFIG_STATUS" >&6;}
24638 cat >$CONFIG_STATUS <<_ACEOF
24639 #! $SHELL
24640 # Generated automatically by configure.
24641 # Run this file to recreate the current configuration.
24642 # Compiler output produced by configure, useful for debugging
24643 # configure, is in config.log if it exists.
24644
24645 debug=false
24646 SHELL=\${CONFIG_SHELL-$SHELL}
24647 ac_cs_invocation="\$0 \$@"
24648
24649 _ACEOF
24650
24651 cat >>$CONFIG_STATUS <<\_ACEOF
24652 # Be Bourne compatible
24653 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24654   emulate sh
24655   NULLCMD=:
24656 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24657   set -o posix
24658 fi
24659
24660 # Name of the executable.
24661 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24662
24663 if expr a : '\(a\)' >/dev/null 2>&1; then
24664   as_expr=expr
24665 else
24666   as_expr=false
24667 fi
24668
24669 rm -f conf$$ conf$$.exe conf$$.file
24670 echo >conf$$.file
24671 if ln -s conf$$.file conf$$ 2>/dev/null; then
24672   # We could just check for DJGPP; but this test a) works b) is more generic
24673   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24674   if test -f conf$$.exe; then
24675     # Don't use ln at all; we don't have any links
24676     as_ln_s='cp -p'
24677   else
24678     as_ln_s='ln -s'
24679   fi
24680 elif ln conf$$.file conf$$ 2>/dev/null; then
24681   as_ln_s=ln
24682 else
24683   as_ln_s='cp -p'
24684 fi
24685 rm -f conf$$ conf$$.exe conf$$.file
24686
24687 as_executable_p="test -f"
24688
24689 # Support unset when possible.
24690 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24691   as_unset=unset
24692 else
24693   as_unset=false
24694 fi
24695
24696 # NLS nuisances.
24697 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24698 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24699 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24700 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24701 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24702 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24703 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24704 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24705
24706 # IFS
24707 # We need space, tab and new line, in precisely that order.
24708 as_nl='
24709 '
24710 IFS="   $as_nl"
24711
24712 # CDPATH.
24713 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24714
24715 exec 6>&1
24716
24717 _ACEOF
24718
24719 # Files that config.status was made for.
24720 if test -n "$ac_config_files"; then
24721   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24722 fi
24723
24724 if test -n "$ac_config_headers"; then
24725   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24726 fi
24727
24728 if test -n "$ac_config_links"; then
24729   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24730 fi
24731
24732 if test -n "$ac_config_commands"; then
24733   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24734 fi
24735
24736 cat >>$CONFIG_STATUS <<\EOF
24737
24738 ac_cs_usage="\
24739 \`$as_me' instantiates files from templates according to the
24740 current configuration.
24741
24742 Usage: $0 [OPTIONS] [FILE]...
24743
24744   -h, --help       print this help, then exit
24745   -V, --version    print version number, then exit
24746   -d, --debug      don't remove temporary files
24747       --recheck    update $as_me by reconfiguring in the same conditions
24748   --file=FILE[:TEMPLATE]
24749                    instantiate the configuration file FILE
24750   --header=FILE[:TEMPLATE]
24751                    instantiate the configuration header FILE
24752
24753 Configuration files:
24754 $config_files
24755
24756 Configuration headers:
24757 $config_headers
24758
24759 Configuration commands:
24760 $config_commands
24761
24762 Report bugs to <dickey@invisible-island.net>."
24763 EOF
24764
24765 cat >>$CONFIG_STATUS <<EOF
24766 ac_cs_version="\\
24767 config.status
24768 configured by $0, generated by GNU Autoconf 2.52.20170501,
24769   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24770
24771 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24772 Free Software Foundation, Inc.
24773 This config.status script is free software; the Free Software Foundation
24774 gives unlimited permission to copy, distribute and modify it."
24775 srcdir=$srcdir
24776 INSTALL="$INSTALL"
24777 EOF
24778
24779 cat >>$CONFIG_STATUS <<\EOF
24780 # If no file are specified by the user, then we need to provide default
24781 # value.  By we need to know if files were specified by the user.
24782 ac_need_defaults=:
24783 while test $# != 0
24784 do
24785   case $1 in
24786   --*=*)
24787     ac_option=`expr "x$1" : 'x\([^=]*\)='`
24788     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24789     shift
24790     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24791     shift
24792     ;;
24793   -*);;
24794   *) # This is not an option, so the user has probably given explicit
24795      # arguments.
24796      ac_need_defaults=false;;
24797   esac
24798
24799   case $1 in
24800   # Handling of the options.
24801 EOF
24802 cat >>$CONFIG_STATUS <<EOF
24803   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24804     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24805     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24806 EOF
24807 cat >>$CONFIG_STATUS <<\EOF
24808   --version | --vers* | -V )
24809     echo "$ac_cs_version"; exit 0 ;;
24810   --he | --h)
24811     # Conflict between --help and --header
24812     { { echo "$as_me:24812: error: ambiguous option: $1
24813 Try \`$0 --help' for more information." >&5
24814 echo "$as_me: error: ambiguous option: $1
24815 Try \`$0 --help' for more information." >&2;}
24816    { (exit 1); exit 1; }; };;
24817   --help | --hel | -h )
24818     echo "$ac_cs_usage"; exit 0 ;;
24819   --debug | --d* | -d )
24820     debug=: ;;
24821   --file | --fil | --fi | --f )
24822     shift
24823     CONFIG_FILES="$CONFIG_FILES $1"
24824     ac_need_defaults=false;;
24825   --header | --heade | --head | --hea )
24826     shift
24827     CONFIG_HEADERS="$CONFIG_HEADERS $1"
24828     ac_need_defaults=false;;
24829
24830   # This is an error.
24831   -*) { { echo "$as_me:24831: error: unrecognized option: $1
24832 Try \`$0 --help' for more information." >&5
24833 echo "$as_me: error: unrecognized option: $1
24834 Try \`$0 --help' for more information." >&2;}
24835    { (exit 1); exit 1; }; } ;;
24836
24837   *) ac_config_targets="$ac_config_targets $1" ;;
24838
24839   esac
24840   shift
24841 done
24842
24843 exec 5>>config.log
24844 cat >&5 << _ACEOF
24845
24846 ## ----------------------- ##
24847 ## Running config.status.  ##
24848 ## ----------------------- ##
24849
24850 This file was extended by $as_me 2.52.20170501, executed with
24851   CONFIG_FILES    = $CONFIG_FILES
24852   CONFIG_HEADERS  = $CONFIG_HEADERS
24853   CONFIG_LINKS    = $CONFIG_LINKS
24854   CONFIG_COMMANDS = $CONFIG_COMMANDS
24855   > $ac_cs_invocation
24856 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24857
24858 _ACEOF
24859 EOF
24860
24861 cat >>$CONFIG_STATUS <<EOF
24862 #
24863 # INIT-COMMANDS section.
24864 #
24865
24866 ABI_VERSION="$ABI_VERSION"
24867 REL_VERSION="$REL_VERSION"
24868 LIB_MODEL="$LIB_MODEL"
24869 LIB_PREFIX="$LIB_PREFIX"
24870 LIB_ROOTNAME="$LIB_ROOTNAME"
24871 DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
24872 RM_SHARED_OPTS="$RM_SHARED_OPTS"
24873 cf_cv_do_symlinks="$cf_cv_do_symlinks"
24874 cf_cv_shlib_version="$cf_cv_shlib_version"
24875
24876 EOF
24877
24878 cat >>$CONFIG_STATUS <<\EOF
24879 for ac_config_target in $ac_config_targets
24880 do
24881   case "$ac_config_target" in
24882   # Handling of arguments.
24883   "dialog-config" ) CONFIG_FILES="$CONFIG_FILES dialog-config" ;;
24884   "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
24885   "$EXTRA_OUTPUT" ) CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;;
24886   "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
24887   "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
24888   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24889   "dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
24890   *) { { echo "$as_me:24890: error: invalid argument: $ac_config_target" >&5
24891 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24892    { (exit 1); exit 1; }; };;
24893   esac
24894 done
24895
24896 # If the user did not use the arguments to specify the items to instantiate,
24897 # then the envvar interface is used.  Set only those that are not.
24898 # We use the long form for the default assignment because of an extremely
24899 # bizarre bug on SunOS 4.1.3.
24900 if $ac_need_defaults; then
24901   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24902   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24903   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24904 fi
24905
24906 # Create a temporary directory, and hook for its removal unless debugging.
24907 $debug ||
24908 {
24909   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24910   trap '{ (exit 1); exit 1; }' 1 2 13 15
24911 }
24912
24913 # Create a (secure) tmp directory for tmp files.
24914 : ${TMPDIR=/tmp}
24915 {
24916   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24917   test -n "$tmp" && test -d "$tmp"
24918 }  ||
24919 {
24920   tmp=$TMPDIR/cs$$-$RANDOM
24921   (umask 077 && mkdir $tmp)
24922 } ||
24923 {
24924    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24925    { (exit 1); exit 1; }
24926 }
24927
24928 EOF
24929
24930 cat >>$CONFIG_STATUS <<EOF
24931
24932 #
24933 # CONFIG_FILES section.
24934 #
24935
24936 # No need to generate the scripts if there are no CONFIG_FILES.
24937 # This happens for instance when ./config.status config.h
24938 if test -n "\$CONFIG_FILES"; then
24939   # Protect against being on the right side of a sed subst in config.status.
24940   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24941    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24942 s,@SHELL@,$SHELL,;t t
24943 s,@exec_prefix@,$exec_prefix,;t t
24944 s,@prefix@,$prefix,;t t
24945 s,@program_transform_name@,$program_transform_name,;t t
24946 s,@bindir@,$bindir,;t t
24947 s,@sbindir@,$sbindir,;t t
24948 s,@libexecdir@,$libexecdir,;t t
24949 s,@datarootdir@,$datarootdir,;t t
24950 s,@datadir@,$datadir,;t t
24951 s,@sysconfdir@,$sysconfdir,;t t
24952 s,@sharedstatedir@,$sharedstatedir,;t t
24953 s,@localstatedir@,$localstatedir,;t t
24954 s,@libdir@,$libdir,;t t
24955 s,@includedir@,$includedir,;t t
24956 s,@oldincludedir@,$oldincludedir,;t t
24957 s,@infodir@,$infodir,;t t
24958 s,@mandir@,$mandir,;t t
24959 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24960 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24961 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24962 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24963 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24964 s,@build_alias@,$build_alias,;t t
24965 s,@host_alias@,$host_alias,;t t
24966 s,@target_alias@,$target_alias,;t t
24967 s,@ECHO_C@,$ECHO_C,;t t
24968 s,@ECHO_N@,$ECHO_N,;t t
24969 s,@ECHO_T@,$ECHO_T,;t t
24970 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24971 s,@DEFS@,$DEFS,;t t
24972 s,@LIBS@,$LIBS,;t t
24973 s,@DESTDIR@,$DESTDIR,;t t
24974 s,@CC@,$CC,;t t
24975 s,@CFLAGS@,$CFLAGS,;t t
24976 s,@LDFLAGS@,$LDFLAGS,;t t
24977 s,@CPPFLAGS@,$CPPFLAGS,;t t
24978 s,@ac_ct_CC@,$ac_ct_CC,;t t
24979 s,@EXEEXT@,$EXEEXT,;t t
24980 s,@OBJEXT@,$OBJEXT,;t t
24981 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24982 s,@CPP@,$CPP,;t t
24983 s,@SET_MAKE@,$SET_MAKE,;t t
24984 s,@RANLIB@,$RANLIB,;t t
24985 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24986 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24987 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24988 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24989 s,@LN_S@,$LN_S,;t t
24990 s,@LINT@,$LINT,;t t
24991 s,@LINT_OPTS@,$LINT_OPTS,;t t
24992 s,@GROFF_PATH@,$GROFF_PATH,;t t
24993 s,@NROFF_PATH@,$NROFF_PATH,;t t
24994 s,@TBL_PATH@,$TBL_PATH,;t t
24995 s,@GROFF_NOTE@,$GROFF_NOTE,;t t
24996 s,@NROFF_NOTE@,$NROFF_NOTE,;t t
24997 s,@AR@,$AR,;t t
24998 s,@ac_ct_AR@,$ac_ct_AR,;t t
24999 s,@ARFLAGS@,$ARFLAGS,;t t
25000 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25001 s,@CTAGS@,$CTAGS,;t t
25002 s,@ETAGS@,$ETAGS,;t t
25003 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25004 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25005 s,@ECHO_LT@,$ECHO_LT,;t t
25006 s,@ECHO_LD@,$ECHO_LD,;t t
25007 s,@RULE_CC@,$RULE_CC,;t t
25008 s,@SHOW_CC@,$SHOW_CC,;t t
25009 s,@ECHO_CC@,$ECHO_CC,;t t
25010 s,@build@,$build,;t t
25011 s,@build_cpu@,$build_cpu,;t t
25012 s,@build_vendor@,$build_vendor,;t t
25013 s,@build_os@,$build_os,;t t
25014 s,@host@,$host,;t t
25015 s,@host_cpu@,$host_cpu,;t t
25016 s,@host_vendor@,$host_vendor,;t t
25017 s,@host_os@,$host_os,;t t
25018 s,@PROG_EXT@,$PROG_EXT,;t t
25019 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25020 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25021 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25022 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25023 s,@VERSION@,$VERSION,;t t
25024 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25025 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25026 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25027 s,@PACKAGE@,$PACKAGE,;t t
25028 s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
25029 s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
25030 s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
25031 s,@SUB_INC@,$SUB_INC,;t t
25032 s,@cf_man2html@,$cf_man2html,;t t
25033 s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
25034 s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
25035 s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
25036 s,@CONFIG_H@,$CONFIG_H,;t t
25037 s,@ALLOCA@,$ALLOCA,;t t
25038 s,@GLIBC21@,$GLIBC21,;t t
25039 s,@LIBICONV@,$LIBICONV,;t t
25040 s,@USE_NLS@,$USE_NLS,;t t
25041 s,@MSGFMT@,$MSGFMT,;t t
25042 s,@GMSGFMT@,$GMSGFMT,;t t
25043 s,@XGETTEXT@,$XGETTEXT,;t t
25044 s,@INTLBISON@,$INTLBISON,;t t
25045 s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
25046 s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
25047 s,@CATALOGS@,$CATALOGS,;t t
25048 s,@CATOBJEXT@,$CATOBJEXT,;t t
25049 s,@GMOFILES@,$GMOFILES,;t t
25050 s,@INTLLIBS@,$INTLLIBS,;t t
25051 s,@INTLOBJS@,$INTLOBJS,;t t
25052 s,@POFILES@,$POFILES,;t t
25053 s,@POSUB@,$POSUB,;t t
25054 s,@DATADIRNAME@,$DATADIRNAME,;t t
25055 s,@INSTOBJEXT@,$INSTOBJEXT,;t t
25056 s,@GENCAT@,$GENCAT,;t t
25057 s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
25058 s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
25059 s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
25060 s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
25061 s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
25062 s,@GT_YES@,$GT_YES,;t t
25063 s,@GT_NO@,$GT_NO,;t t
25064 s,@LINK_PREFIX@,$LINK_PREFIX,;t t
25065 s,@ABI_VERSION@,$ABI_VERSION,;t t
25066 s,@REL_VERSION@,$REL_VERSION,;t t
25067 s,@shlibdir@,$shlibdir,;t t
25068 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25069 s,@LIBTOOL@,$LIBTOOL,;t t
25070 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25071 s,@LT_UNDEF@,$LT_UNDEF,;t t
25072 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25073 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25074 s,@LIB_CREATE@,$LIB_CREATE,;t t
25075 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25076 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25077 s,@LIB_PREP@,$LIB_PREP,;t t
25078 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25079 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25080 s,@LIB_LINK@,$LIB_LINK,;t t
25081 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25082 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25083 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25084 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25085 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25086 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25087 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25088 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25089 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25090 s,@LINK_PROGS@,$LINK_PROGS,;t t
25091 s,@LINK_TESTS@,$LINK_TESTS,;t t
25092 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25093 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25094 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25095 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25096 s,@RPATH_LIST@,$RPATH_LIST,;t t
25097 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25098 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25099 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25100 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25101 s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
25102 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25103 s,@LIB_MODEL@,$LIB_MODEL,;t t
25104 s,@LIBTOOL_MAKE@,$LIBTOOL_MAKE,;t t
25105 s,@MAKE_NORMAL@,$MAKE_NORMAL,;t t
25106 s,@MAKE_SHARED@,$MAKE_SHARED,;t t
25107 s,@MAKE_STATIC@,$MAKE_STATIC,;t t
25108 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
25109 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
25110 s,@X_CFLAGS@,$X_CFLAGS,;t t
25111 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
25112 s,@X_LIBS@,$X_LIBS,;t t
25113 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
25114 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
25115 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
25116 s,@EXTRAOBJS@,$EXTRAOBJS,;t t
25117 s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
25118 s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
25119 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25120 s,@SET_SHLIB_VARS@,$SET_SHLIB_VARS,;t t
25121 s,@LIB_TARGET@,$LIB_TARGET,;t t
25122 CEOF
25123
25124 EOF
25125
25126   cat >>$CONFIG_STATUS <<\EOF
25127   # Split the substitutions into bite-sized pieces for seds with
25128   # small command number limits, like on Digital OSF/1 and HP-UX.
25129   ac_max_sed_lines=48
25130   ac_sed_frag=1 # Number of current file.
25131   ac_beg=1 # First line for current file.
25132   ac_end=$ac_max_sed_lines # Line after last line for current file.
25133   ac_more_lines=:
25134   ac_sed_cmds=
25135   while $ac_more_lines; do
25136     if test $ac_beg -gt 1; then
25137       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25138     else
25139       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25140     fi
25141     if test ! -s $tmp/subs.frag; then
25142       ac_more_lines=false
25143     else
25144       # The purpose of the label and of the branching condition is to
25145       # speed up the sed processing (if there are no `@' at all, there
25146       # is no need to browse any of the substitutions).
25147       # These are the two extra sed commands mentioned above.
25148       (echo ':t
25149   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25150       # It is possible to make a multiline substitution using escaped newlines.
25151       # Ensure that we do not split the substitution between script fragments.
25152       ac_BEG=$ac_end
25153       ac_END=`expr $ac_end + $ac_max_sed_lines`
25154       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25155       if test -s $tmp/subs.next; then
25156         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25157         if test ! -s $tmp/subs.edit; then
25158           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25159           if test ! -s $tmp/subs.edit; then
25160             if test $ac_beg -gt 1; then
25161               ac_end=`expr $ac_end - 1`
25162               continue
25163             fi
25164           fi
25165         fi
25166       fi
25167
25168       if test -z "$ac_sed_cmds"; then
25169         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25170       else
25171         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25172       fi
25173       ac_sed_frag=`expr $ac_sed_frag + 1`
25174       ac_beg=$ac_end
25175       ac_end=`expr $ac_end + $ac_max_sed_lines`
25176     fi
25177   done
25178   if test -z "$ac_sed_cmds"; then
25179     ac_sed_cmds=cat
25180   fi
25181 fi # test -n "$CONFIG_FILES"
25182
25183 EOF
25184 cat >>$CONFIG_STATUS <<\EOF
25185 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25186   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25187   case $ac_file in
25188   - | *:- | *:-:* ) # input from stdin
25189         cat >$tmp/stdin
25190         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25191         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25192   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25193         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25194   * )   ac_file_in=$ac_file.in ;;
25195   esac
25196
25197   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25198   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25199          X"$ac_file" : 'X\(//\)[^/]' \| \
25200          X"$ac_file" : 'X\(//\)$' \| \
25201          X"$ac_file" : 'X\(/\)' \| \
25202          .     : '\(.\)' 2>/dev/null ||
25203 echo X"$ac_file" |
25204     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25205           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25206           /^X\(\/\/\)$/{ s//\1/; q; }
25207           /^X\(\/\).*/{ s//\1/; q; }
25208           s/.*/./; q'`
25209   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25210     { case "$ac_dir" in
25211   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25212   *)                      as_incr_dir=.;;
25213 esac
25214 as_dummy="$ac_dir"
25215 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25216   case $as_mkdir_dir in
25217     # Skip DOS drivespec
25218     ?:) as_incr_dir=$as_mkdir_dir ;;
25219     *)
25220       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25221       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25222     ;;
25223   esac
25224 done; }
25225
25226     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25227     # A "../" for each directory in $ac_dir_suffix.
25228     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25229   else
25230     ac_dir_suffix= ac_dots=
25231   fi
25232
25233   case $srcdir in
25234   .)  ac_srcdir=.
25235       if test -z "$ac_dots"; then
25236          ac_top_srcdir=.
25237       else
25238          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25239       fi ;;
25240   [\\/]* | ?:[\\/]* )
25241       ac_srcdir=$srcdir$ac_dir_suffix;
25242       ac_top_srcdir=$srcdir ;;
25243   *) # Relative path.
25244     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25245     ac_top_srcdir=$ac_dots$srcdir ;;
25246   esac
25247
25248   case $INSTALL in
25249   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25250   *) ac_INSTALL=$ac_dots$INSTALL ;;
25251   esac
25252
25253   if test x"$ac_file" != x-; then
25254     { echo "$as_me:25254: creating $ac_file" >&5
25255 echo "$as_me: creating $ac_file" >&6;}
25256     rm -f "$ac_file"
25257   fi
25258   # Let's still pretend it is `configure' which instantiates (i.e., don't
25259   # use $as_me), people would be surprised to read:
25260   #    /* config.h.  Generated automatically by config.status.  */
25261   configure_input="Generated automatically from `echo $ac_file_in |
25262                                                  sed 's,.*/,,'` by configure."
25263
25264   # First look for the input files in the build tree, otherwise in the
25265   # src tree.
25266   ac_file_inputs=`IFS=:
25267     for f in $ac_file_in; do
25268       case $f in
25269       -) echo $tmp/stdin ;;
25270       [\\/$]*)
25271          # Absolute (can't be DOS-style, as IFS=:)
25272          test -f "$f" || { { echo "$as_me:25272: error: cannot find input file: $f" >&5
25273 echo "$as_me: error: cannot find input file: $f" >&2;}
25274    { (exit 1); exit 1; }; }
25275          echo $f;;
25276       *) # Relative
25277          if test -f "$f"; then
25278            # Build tree
25279            echo $f
25280          elif test -f "$srcdir/$f"; then
25281            # Source tree
25282            echo $srcdir/$f
25283          else
25284            # /dev/null tree
25285            { { echo "$as_me:25285: error: cannot find input file: $f" >&5
25286 echo "$as_me: error: cannot find input file: $f" >&2;}
25287    { (exit 1); exit 1; }; }
25288          fi;;
25289       esac
25290     done` || { (exit 1); exit 1; }
25291 EOF
25292 cat >>$CONFIG_STATUS <<\EOF
25293   ac_warn_datarootdir=no
25294   if test x"$ac_file" != x-; then
25295     for ac_item in $ac_file_inputs
25296     do
25297       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
25298       if test -n "$ac_seen"; then
25299         ac_used=`grep '@datarootdir@' $ac_item`
25300         if test -z "$ac_used"; then
25301           { echo "$as_me:25301: WARNING: datarootdir was used implicitly but not set:
25302 $ac_seen" >&5
25303 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25304 $ac_seen" >&2;}
25305           ac_warn_datarootdir=yes
25306         fi
25307       fi
25308       ac_seen=`grep '${datarootdir}' $ac_item`
25309       if test -n "$ac_seen"; then
25310         { echo "$as_me:25310: WARNING: datarootdir was used explicitly but not set:
25311 $ac_seen" >&5
25312 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25313 $ac_seen" >&2;}
25314         ac_warn_datarootdir=yes
25315       fi
25316     done
25317   fi
25318
25319 if test "x$ac_warn_datarootdir" = xyes; then
25320   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25321 fi
25322
25323 EOF
25324 cat >>$CONFIG_STATUS <<EOF
25325   sed "$ac_vpsub
25326 $extrasub
25327 EOF
25328 cat >>$CONFIG_STATUS <<\EOF
25329 :t
25330 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25331 s,@configure_input@,$configure_input,;t t
25332 s,@srcdir@,$ac_srcdir,;t t
25333 s,@top_srcdir@,$ac_top_srcdir,;t t
25334 s,@INSTALL@,$ac_INSTALL,;t t
25335 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25336   rm -f $tmp/stdin
25337   if test x"$ac_file" != x-; then
25338     cp $tmp/out $ac_file
25339
25340     for ac_name in prefix exec_prefix datarootdir
25341     do
25342         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
25343         if test -n "$ac_seen"; then
25344             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
25345             if test -z "$ac_init"; then
25346               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25347               { echo "$as_me:25347: WARNING: Variable $ac_name is used but was not set:
25348 $ac_seen" >&5
25349 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25350 $ac_seen" >&2;}
25351             fi
25352         fi
25353     done
25354     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
25355     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
25356     if test -s $tmp/out; then
25357       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25358       { echo "$as_me:25358: WARNING: Some variables may not be substituted:
25359 $ac_seen" >&5
25360 echo "$as_me: WARNING: Some variables may not be substituted:
25361 $ac_seen" >&2;}
25362     fi
25363   else
25364     cat $tmp/out
25365   fi
25366   rm -f $tmp/out
25367
25368 done
25369 EOF
25370 cat >>$CONFIG_STATUS <<\EOF
25371
25372 #
25373 # CONFIG_HEADER section.
25374 #
25375
25376 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25377 # NAME is the cpp macro being defined and VALUE is the value it is being given.
25378 #
25379 # ac_d sets the value in "#define NAME VALUE" lines.
25380 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
25381 ac_dB='[        ].*$,\1#\2'
25382 ac_dC=' '
25383 ac_dD=',;t'
25384 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25385 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25386 ac_iB='\([      ]\),\1#\2define\3'
25387 ac_iC=' '
25388 ac_iD='\4,;t'
25389 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25390 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
25391 ac_uB='$,\1#\2define\3'
25392 ac_uC=' '
25393 ac_uD=',;t'
25394
25395 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25396   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25397   case $ac_file in
25398   - | *:- | *:-:* ) # input from stdin
25399         cat >$tmp/stdin
25400         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25401         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25402   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25403         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25404   * )   ac_file_in=$ac_file.in ;;
25405   esac
25406
25407   test x"$ac_file" != x- && { echo "$as_me:25407: creating $ac_file" >&5
25408 echo "$as_me: creating $ac_file" >&6;}
25409
25410   # First look for the input files in the build tree, otherwise in the
25411   # src tree.
25412   ac_file_inputs=`IFS=:
25413     for f in $ac_file_in; do
25414       case $f in
25415       -) echo $tmp/stdin ;;
25416       [\\/$]*)
25417          # Absolute (can't be DOS-style, as IFS=:)
25418          test -f "$f" || { { echo "$as_me:25418: error: cannot find input file: $f" >&5
25419 echo "$as_me: error: cannot find input file: $f" >&2;}
25420    { (exit 1); exit 1; }; }
25421          echo $f;;
25422       *) # Relative
25423          if test -f "$f"; then
25424            # Build tree
25425            echo $f
25426          elif test -f "$srcdir/$f"; then
25427            # Source tree
25428            echo $srcdir/$f
25429          else
25430            # /dev/null tree
25431            { { echo "$as_me:25431: error: cannot find input file: $f" >&5
25432 echo "$as_me: error: cannot find input file: $f" >&2;}
25433    { (exit 1); exit 1; }; }
25434          fi;;
25435       esac
25436     done` || { (exit 1); exit 1; }
25437   # Remove the trailing spaces.
25438   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
25439
25440 EOF
25441
25442 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
25443 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
25444 # be either 'cat' or 'sort'.
25445 sort -u confdefs.h | uniq >conftest.vals
25446
25447 # Break up conftest.vals because some shells have a limit on
25448 # the size of here documents, and old seds have small limits too.
25449
25450 rm -f conftest.tail
25451 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
25452 while grep . conftest.vals >/dev/null
25453 do
25454   # Write chunks of a limited-size here document to conftest.frag.
25455   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
25456   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
25457   echo 'CEOF' >> $CONFIG_STATUS
25458   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
25459   rm -f conftest.vals
25460   mv conftest.tail conftest.vals
25461 done
25462 rm -f conftest.vals
25463
25464 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25465 # marker @DEFS@.
25466 echo '  cat >> conftest.edit <<CEOF
25467 /@DEFS@/r conftest.frag
25468 /@DEFS@/d
25469 CEOF
25470 sed -f conftest.edit $tmp/in > $tmp/out
25471 rm -f $tmp/in
25472 mv $tmp/out $tmp/in
25473 rm -f conftest.edit conftest.frag
25474 ' >> $CONFIG_STATUS
25475
25476 cat >>$CONFIG_STATUS <<\EOF
25477   # Let's still pretend it is `configure' which instantiates (i.e., don't
25478   # use $as_me), people would be surprised to read:
25479   #    /* config.h.  Generated automatically by config.status.  */
25480   if test x"$ac_file" = x-; then
25481     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25482   else
25483     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25484   fi
25485   cat $tmp/in >>$tmp/config.h
25486   rm -f $tmp/in
25487   if test x"$ac_file" != x-; then
25488     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25489       { echo "$as_me:25489: $ac_file is unchanged" >&5
25490 echo "$as_me: $ac_file is unchanged" >&6;}
25491     else
25492       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25493          X"$ac_file" : 'X\(//\)[^/]' \| \
25494          X"$ac_file" : 'X\(//\)$' \| \
25495          X"$ac_file" : 'X\(/\)' \| \
25496          .     : '\(.\)' 2>/dev/null ||
25497 echo X"$ac_file" |
25498     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25499           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25500           /^X\(\/\/\)$/{ s//\1/; q; }
25501           /^X\(\/\).*/{ s//\1/; q; }
25502           s/.*/./; q'`
25503       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25504         { case "$ac_dir" in
25505   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25506   *)                      as_incr_dir=.;;
25507 esac
25508 as_dummy="$ac_dir"
25509 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25510   case $as_mkdir_dir in
25511     # Skip DOS drivespec
25512     ?:) as_incr_dir=$as_mkdir_dir ;;
25513     *)
25514       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25515       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25516     ;;
25517   esac
25518 done; }
25519
25520       fi
25521       rm -f $ac_file
25522       mv $tmp/config.h $ac_file
25523     fi
25524   else
25525     cat $tmp/config.h
25526     rm -f $tmp/config.h
25527   fi
25528 done
25529 EOF
25530 cat >>$CONFIG_STATUS <<\EOF
25531 #
25532 # CONFIG_COMMANDS section.
25533 #
25534 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25535   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25536   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25537
25538   case $ac_dest in
25539     default-1 ) for ac_file in $CONFIG_FILES; do
25540
25541         # Support "outfile[:infile[:infile...]]"
25542         case "$ac_file" in
25543           (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
25544         esac
25545
25546         # PO directories have a Makefile.in generated from Makefile.inn.
25547         case "$ac_file" in
25548         (*/[Mm]akefile.in)
25549           # Adjust a relative srcdir.
25550           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
25551           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
25552           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
25553           ac_base=`basename $ac_file .in`
25554           # In autoconf-2.13 it is called $ac_given_srcdir.
25555           # In autoconf-2.50 it is called $srcdir.
25556           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
25557
25558           case "$ac_given_srcdir" in
25559             (.)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
25560             (/*) top_srcdir="$ac_given_srcdir" ;;
25561             (*)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
25562           esac
25563
25564           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
25565             rm -f "$ac_dir/POTFILES"
25566             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
25567             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
25568             test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
25569             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
25570           fi
25571           ;;
25572         esac
25573       done ;;
25574     default )
25575
25576 cf_libname=\${LIB_BASENAME}
25577 cf_liblink=$cf_libname
25578 cf_libroot=$cf_libname
25579
25580 if test "x$cf_cv_do_symlinks" = xyes
25581 then
25582         case "x$cf_cv_shlib_version" in
25583         (xrel)
25584                 cf_liblink="\${LIB_ABI_NAME}"
25585                 cf_libname="\${LIB_REL_NAME}"
25586                 ;;
25587         (xabi)
25588                 cf_liblink="\${LIB_REL_NAME}"
25589                 cf_libname="\${LIB_ABI_NAME}"
25590                 ;;
25591         esac
25592 fi
25593 LIB_TARGET=$cf_libname
25594
25595 case x$LIB_MODEL in
25596 (xlibtool|xshared)
25597         cf_libdeps="\${LIBS} \${LDFLAGS}"
25598         ;;
25599 (x*)
25600         cf_libdeps=
25601         ;;
25602 esac
25603
25604 cat >>makefile <<CF_EOF
25605
25606 # generated by CF__ADD_SHLIB_RULES
25607 # libmodel: $LIB_MODEL
25608 # symlinks: $cf_cv_do_symlinks
25609 # shlibver: $cf_cv_shlib_version
25610
25611 CF_EOF
25612
25613 cat >>makefile <<CF_EOF
25614 $cf_libname :: \\
25615 CF_EOF
25616
25617 cat >>makefile <<CF_EOF
25618                 \${LIB_OBJECT}
25619         @echo linking \$@
25620         \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
25621 CF_EOF
25622
25623 if test "x$cf_cv_do_symlinks" = xyes
25624 then
25625 cat >>makefile <<CF_EOF
25626         \$(LN_S) $cf_libname $cf_liblink
25627         \$(LN_S) $cf_liblink $cf_libroot
25628 CF_EOF
25629 fi
25630
25631 cat >>makefile <<CF_EOF
25632
25633 install \\
25634 install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
25635
25636 \$(DESTDIR)\$(libdir)/$cf_libname :: \\
25637                 \$(DESTDIR)\$(libdir) \\
25638                 \${LIB_OBJECT}
25639         @echo linking \$@
25640         \$(LIBTOOL_CREATE) \${LIB_OBJECT} $cf_libdeps
25641 CF_EOF
25642
25643 if test "x$cf_cv_do_symlinks" = xyes
25644 then
25645 cat >>makefile <<CF_EOF
25646         cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
25647 CF_EOF
25648 fi
25649
25650 if test x$LIB_MODEL = xshared
25651 then
25652 cat >>makefile <<CF_EOF
25653         - \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
25654 CF_EOF
25655 fi
25656
25657 cat >>makefile <<CF_EOF
25658
25659 uninstall \\
25660 uninstall.libs ::
25661         @echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
25662 CF_EOF
25663
25664 if test "x$cf_cv_do_symlinks" = xyes
25665 then
25666 cat >>makefile <<CF_EOF
25667         -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
25668         -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
25669 CF_EOF
25670 fi
25671
25672 cat >>makefile <<CF_EOF
25673         -rm -f \$(DESTDIR)\$(libdir)/$cf_libname
25674
25675 clean \\
25676 clean.libs ::
25677 CF_EOF
25678
25679 if test "x$cf_cv_do_symlinks" = xyes
25680 then
25681 cat >>makefile <<CF_EOF
25682         -rm -f $cf_libroot
25683         -rm -f $cf_liblink
25684 CF_EOF
25685 fi
25686
25687 cat >>makefile <<CF_EOF
25688         -rm -f $cf_libname
25689
25690 mostlyclean::
25691         -rm -f \${LIB_OBJECT}
25692 # end generated by CF__ADD_SHLIB_RULES
25693 CF_EOF
25694
25695  ;;
25696   esac
25697 done
25698 EOF
25699
25700 cat >>$CONFIG_STATUS <<\EOF
25701
25702 { (exit 0); exit 0; }
25703 EOF
25704 chmod +x $CONFIG_STATUS
25705 ac_clean_files=$ac_clean_files_save
25706
25707 # configure is writing to config.log, and then calls config.status.
25708 # config.status does its own redirection, appending to config.log.
25709 # Unfortunately, on DOS this fails, as config.log is still kept open
25710 # by configure, so config.status won't be able to write to it; its
25711 # output is simply discarded.  So we exec the FD to /dev/null,
25712 # effectively closing config.log, so it can be properly (re)opened and
25713 # appended to by config.status.  When coming back to configure, we
25714 # need to make the FD available again.
25715 if test "$no_create" != yes; then
25716   ac_cs_success=:
25717   exec 5>/dev/null
25718   $SHELL $CONFIG_STATUS || ac_cs_success=false
25719   exec 5>>config.log
25720   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25721   # would make configure fail if this is the last instruction.
25722   $ac_cs_success || { (exit 1); exit 1; }
25723 fi
25724